得物.apk(点击下载) / LikeIconResManager.java


package com.shizhuang.duapp.modules.du_community_common.manager;

import androidx.annotation.DrawableRes;
import androidx.lifecycle.LifecycleOwner;
import com.liulishuo.okdownload.core.cause.EndCause;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.bean.BaseResponse;
import com.shizhuang.duapp.libs.animation.DuAnimationError;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.du_community_common.facade.request.DuHttpRequest;
import com.shizhuang.duapp.modules.du_community_common.facade.request.WrappersKt;
import com.shizhuang.duapp.modules.du_community_common.model.CommentReplyLightIcon;
import com.shizhuang.duapp.modules.du_community_common.model.ContentLightIcon;
import com.shizhuang.duapp.modules.du_community_common.model.LikeResModel;
import com.shizhuang.duapp.modules.du_community_common.model.ReplyDissIcon;
import gg0.n;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.text.StringsKt__StringsJVMKt;
import kotlin.text.StringsKt__StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import retrofit2.http.GET;
import retrofit2.http.Query;
import v20.j;

/* compiled from: LikeIconResManager.kt */
public final class LikeIconResManager {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final d f = new d(null);

    /* renamed from: a  reason: collision with root package name */
    public final DuHttpRequest<LikeResModel> f12874a;
    public final List<ContentLightIcon> b = new ArrayList();

    /* renamed from: c  reason: collision with root package name */
    public CommentReplyLightIcon.Android f12875c;
    @Nullable
    public ReplyDissIcon.Android d;
    public boolean e;

    @Metadata(bv = {}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J\u001e\u0010\u0007\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00060\u00050\u00042\b\b\u0001\u0010\u0003\u001a\u00020\u0002H'¨\u0006\b"}, d2 = {"Lcom/shizhuang/duapp/modules/du_community_common/manager/LikeIconResManager$Api;", "", "", "angleAb", "Lbj1/e;", "Lcom/shizhuang/duapp/common/bean/BaseResponse;", "Lcom/shizhuang/duapp/modules/du_community_common/model/LikeResModel;", "getLightIcons", "du_community_common_release"}, k = 1, mv = {1, 4, 2})
    /* compiled from: LikeIconResManager.kt */
    public interface Api {
        @GET("/sns-light/v1/light-icon/get")
        @NotNull
        bj1.e<BaseResponse<LikeResModel>> getLightIcons(@NotNull @Query("angleAb") String str);
    }

    /* compiled from: DuAnimation.kt */
    public static final class a extends vl.a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(String str) {
        }

        @Override // vl.a
        public void onTaskEnd(@NotNull s9.c cVar, @NotNull EndCause endCause, @Nullable Exception exc) {
            if (!PatchProxy.proxy(new Object[]{cVar, endCause, exc}, this, changeQuickRedirect, false, 101704, new Class[]{s9.c.class, EndCause.class, Exception.class}, Void.TYPE).isSupported) {
                if (endCause == EndCause.COMPLETED) {
                    pi.e eVar = pi.e.f37087a;
                    pi.e.d().a();
                    eVar.l(cVar.d);
                    tl.a.w(cVar);
                    return;
                }
                pi.e eVar2 = pi.e.f37087a;
                if (pi.e.d().a()) {
                    Objects.toString(endCause);
                    Objects.toString(exc);
                }
                StringBuilder h12 = a.f.h("download ");
                h12.append(cVar.d);
                h12.append(" error, cause:");
                h12.append(endCause);
                new DuAnimationError(h12.toString(), exc);
                eVar2.f().remove(cVar);
            }
        }
    }

    /* compiled from: DuAnimation.kt */
    public static final class b extends vl.a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public b(String str) {
        }

        @Override // vl.a
        public void onTaskEnd(@NotNull s9.c cVar, @NotNull EndCause endCause, @Nullable Exception exc) {
            if (!PatchProxy.proxy(new Object[]{cVar, endCause, exc}, this, changeQuickRedirect, false, 101707, new Class[]{s9.c.class, EndCause.class, Exception.class}, Void.TYPE).isSupported) {
                if (endCause == EndCause.COMPLETED) {
                    pi.e eVar = pi.e.f37087a;
                    pi.e.d().a();
                    eVar.l(cVar.d);
                    tl.a.w(cVar);
                    return;
                }
                pi.e eVar2 = pi.e.f37087a;
                if (pi.e.d().a()) {
                    Objects.toString(endCause);
                    Objects.toString(exc);
                }
                StringBuilder h12 = a.f.h("download ");
                h12.append(cVar.d);
                h12.append(" error, cause:");
                h12.append(endCause);
                new DuAnimationError(h12.toString(), exc);
                eVar2.f().remove(cVar);
            }
        }
    }

    /* compiled from: DuAnimation.kt */
    public static final class c extends vl.a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public c(String str) {
        }

        @Override // vl.a
        public void onTaskEnd(@NotNull s9.c cVar, @NotNull EndCause endCause, @Nullable Exception exc) {
            if (!PatchProxy.proxy(new Object[]{cVar, endCause, exc}, this, changeQuickRedirect, false, 101710, new Class[]{s9.c.class, EndCause.class, Exception.class}, Void.TYPE).isSupported) {
                if (endCause == EndCause.COMPLETED) {
                    pi.e eVar = pi.e.f37087a;
                    pi.e.d().a();
                    eVar.l(cVar.d);
                    tl.a.w(cVar);
                    return;
                }
                pi.e eVar2 = pi.e.f37087a;
                if (pi.e.d().a()) {
                    Objects.toString(endCause);
                    Objects.toString(exc);
                }
                StringBuilder h12 = a.f.h("download ");
                h12.append(cVar.d);
                h12.append(" error, cause:");
                h12.append(endCause);
                new DuAnimationError(h12.toString(), exc);
                eVar2.f().remove(cVar);
            }
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static final class d {
        public static ChangeQuickRedirect changeQuickRedirect;

        public d(DefaultConstructorMarker defaultConstructorMarker) {
        }

        @NotNull
        public final LikeIconResManager a() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101731, new Class[0], LikeIconResManager.class);
            return proxy.isSupported ? (LikeIconResManager) proxy.result : e.f12877a.a();
        }

        @JvmStatic
        @NotNull
        public final h b(@NotNull i iVar) {
            h hVar;
            T t;
            T t4;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{iVar}, this, changeQuickRedirect, false, 101730, new Class[]{i.class}, h.class);
            if (proxy.isSupported) {
                return (h) proxy.result;
            }
            LikeIconResManager a5 = a();
            PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{iVar}, a5, LikeIconResManager.changeQuickRedirect, false, 101696, new Class[]{i.class}, h.class);
            if (proxy2.isSupported) {
                return (h) proxy2.result;
            }
            T t12 = null;
            if (iVar.a() != null) {
                Iterator<T> it2 = a5.b.iterator();
                while (true) {
                    if (!it2.hasNext()) {
                        t4 = null;
                        break;
                    }
                    t4 = it2.next();
                    String valueOf = String.valueOf(iVar.a());
                    String sign = t4.getSign();
                    if (Intrinsics.areEqual(valueOf, sign != null ? StringsKt__StringsKt.substringAfter$default(sign, "tag_", (String) null, 2, (Object) null) : null)) {
                        break;
                    }
                }
                T t13 = t4;
                if (t13 != null) {
                    Pair<g, f> b = a5.b(iVar, t13, a5.f12875c);
                    hVar = new h(b.component1(), b.component2());
                    return hVar;
                }
            }
            PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], a5, LikeIconResManager.changeQuickRedirect, false, 101697, new Class[0], ContentLightIcon.class);
            if (proxy3.isSupported) {
                t = (ContentLightIcon) proxy3.result;
            } else {
                Iterator<T> it3 = a5.b.iterator();
                while (true) {
                    if (!it3.hasNext()) {
                        break;
                    }
                    T next = it3.next();
                    if (Intrinsics.areEqual(next.getSign(), "default")) {
                        t12 = next;
                        break;
                    }
                }
                t = t12;
            }
            Pair<g, f> b2 = a5.b(iVar, t, a5.f12875c);
            hVar = new h(b2.component1(), b2.component2());
            return hVar;
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static final class e {
        @NotNull
        private static final LikeIconResManager INSTANCE = new LikeIconResManager(null);
        @NotNull

        /* renamed from: a  reason: collision with root package name */
        public static final e f12877a = new e();
        public static ChangeQuickRedirect changeQuickRedirect;

        @NotNull
        public final LikeIconResManager a() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101732, new Class[0], LikeIconResManager.class);
            return proxy.isSupported ? (LikeIconResManager) proxy.result : INSTANCE;
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static final class f {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final int f12878a;
        public final int b;
        @NotNull

        /* renamed from: c  reason: collision with root package name */
        public final String f12879c;
        public final boolean d;

        public f(@DrawableRes int i, @DrawableRes int i3, @NotNull String str, boolean z) {
            this.f12878a = i;
            this.b = i3;
            this.f12879c = str;
            this.d = z;
        }

        @NotNull
        public final String a() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101735, new Class[0], String.class);
            return proxy.isSupported ? (String) proxy.result : this.f12879c;
        }

        public final int b() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101734, new Class[0], Integer.TYPE);
            return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.b;
        }

        public final int c() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101733, new Class[0], Integer.TYPE);
            return proxy.isSupported ? ((Integer) proxy.result).intValue() : this.f12878a;
        }

        public boolean equals(@Nullable Object obj) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{obj}, this, changeQuickRedirect, false, 101744, new Class[]{Object.class}, Boolean.TYPE);
            if (proxy.isSupported) {
                return ((Boolean) proxy.result).booleanValue();
            }
            if (this != obj) {
                if (obj instanceof f) {
                    f fVar = (f) obj;
                    if (!(this.f12878a == fVar.f12878a && this.b == fVar.b && Intrinsics.areEqual(this.f12879c, fVar.f12879c) && this.d == fVar.d)) {
                        return false;
                    }
                }
                return false;
            }
            return true;
        }

        public int hashCode() {
            int i = 0;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101743, new Class[0], Integer.TYPE);
            if (proxy.isSupported) {
                return ((Integer) proxy.result).intValue();
            }
            int i3 = ((this.f12878a * 31) + this.b) * 31;
            String str = this.f12879c;
            if (str != null) {
                i = str.hashCode();
            }
            int i12 = (i3 + i) * 31;
            boolean z = this.d;
            if (z) {
                z = true;
            }
            int i13 = z ? 1 : 0;
            int i14 = z ? 1 : 0;
            int i15 = z ? 1 : 0;
            return i12 + i13;
        }

        @NotNull
        public String toString() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101742, new Class[0], String.class);
            if (proxy.isSupported) {
                return (String) proxy.result;
            }
            StringBuilder h12 = a.f.h("LocalResource(like=");
            h12.append(this.f12878a);
            h12.append(", dislike=");
            h12.append(this.b);
            h12.append(", anim=");
            h12.append(this.f12879c);
            h12.append(", isSolute=");
            return androidx.appcompat.widget.a.k(h12, this.d, ")");
        }

        public f(int i, int i3, String str, boolean z, int i12) {
            str = (i12 & 4) != 0 ? "" : str;
            z = (i12 & 8) != 0 ? false : z;
            this.f12878a = i;
            this.b = i3;
            this.f12879c = str;
            this.d = z;
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static final class g {
        public static ChangeQuickRedirect changeQuickRedirect;
        @NotNull

        /* renamed from: a  reason: collision with root package name */
        public final String f12880a;
        @NotNull
        public final String b;
        @NotNull

        /* renamed from: c  reason: collision with root package name */
        public final String f12881c;
        public final boolean d;

        public g(@NotNull String str, @NotNull String str2, @NotNull String str3, boolean z) {
            this.f12880a = str;
            this.b = str2;
            this.f12881c = str3;
            this.d = z;
        }

        @NotNull
        public final String a() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101748, new Class[0], String.class);
            return proxy.isSupported ? (String) proxy.result : this.f12881c;
        }

        @NotNull
        public final String b() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101747, new Class[0], String.class);
            return proxy.isSupported ? (String) proxy.result : this.b;
        }

        @NotNull
        public final String c() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101746, new Class[0], String.class);
            return proxy.isSupported ? (String) proxy.result : this.f12880a;
        }

        public boolean equals(@Nullable Object obj) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{obj}, this, changeQuickRedirect, false, 101757, new Class[]{Object.class}, Boolean.TYPE);
            if (proxy.isSupported) {
                return ((Boolean) proxy.result).booleanValue();
            }
            if (this != obj) {
                if (obj instanceof g) {
                    g gVar = (g) obj;
                    if (!Intrinsics.areEqual(this.f12880a, gVar.f12880a) || !Intrinsics.areEqual(this.b, gVar.b) || !Intrinsics.areEqual(this.f12881c, gVar.f12881c) || this.d != gVar.d) {
                        return false;
                    }
                }
                return false;
            }
            return true;
        }

        public int hashCode() {
            int i = 0;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101756, new Class[0], Integer.TYPE);
            if (proxy.isSupported) {
                return ((Integer) proxy.result).intValue();
            }
            String str = this.f12880a;
            int hashCode = (str != null ? str.hashCode() : 0) * 31;
            String str2 = this.b;
            int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
            String str3 = this.f12881c;
            if (str3 != null) {
                i = str3.hashCode();
            }
            int i3 = (hashCode2 + i) * 31;
            boolean z = this.d;
            if (z) {
                z = true;
            }
            int i12 = z ? 1 : 0;
            int i13 = z ? 1 : 0;
            int i14 = z ? 1 : 0;
            return i3 + i12;
        }

        @NotNull
        public String toString() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101755, new Class[0], String.class);
            if (proxy.isSupported) {
                return (String) proxy.result;
            }
            StringBuilder h12 = a.f.h("RemoteResource(like=");
            h12.append(this.f12880a);
            h12.append(", dislike=");
            h12.append(this.b);
            h12.append(", anim=");
            h12.append(this.f12881c);
            h12.append(", isSolute=");
            return androidx.appcompat.widget.a.k(h12, this.d, ")");
        }

        public g(String str, String str2, String str3, boolean z, int i) {
            z = (i & 8) != 0 ? false : z;
            this.f12880a = str;
            this.b = str2;
            this.f12881c = str3;
            this.d = z;
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static final class h {
        public static ChangeQuickRedirect changeQuickRedirect;
        @Nullable

        /* renamed from: a  reason: collision with root package name */
        public final g f12882a;
        @NotNull
        public final f b;

        public h(@Nullable g gVar, @NotNull f fVar) {
            this.f12882a = gVar;
            this.b = fVar;
        }

        public static void d(h hVar, DuImageLoaderView duImageLoaderView, boolean z, Function1 function1, Function1 function12, int i) {
            if ((i & 2) != 0) {
                z = false;
            }
            LikeIconResManager$ResourceConfig$init$2 likeIconResManager$ResourceConfig$init$2 = null;
            LikeIconResManager$ResourceConfig$init$1 likeIconResManager$ResourceConfig$init$1 = (i & 4) != 0 ? LikeIconResManager$ResourceConfig$init$1.INSTANCE : null;
            if ((i & 8) != 0) {
                likeIconResManager$ResourceConfig$init$2 = LikeIconResManager$ResourceConfig$init$2.INSTANCE;
            }
            byte b2 = z ? (byte) 1 : 0;
            byte b5 = z ? (byte) 1 : 0;
            byte b12 = z ? (byte) 1 : 0;
            if (!PatchProxy.proxy(new Object[]{duImageLoaderView, new Byte(b2), likeIconResManager$ResourceConfig$init$1, likeIconResManager$ResourceConfig$init$2}, hVar, changeQuickRedirect, false, 101764, new Class[]{DuImageLoaderView.class, Boolean.TYPE, Function1.class, Function1.class}, Void.TYPE).isSupported) {
                g gVar = hVar.f12882a;
                if (gVar == null) {
                    if (z) {
                        duImageLoaderView.setImageResource(hVar.b.c());
                    } else {
                        duImageLoaderView.setImageResource(hVar.b.b());
                    }
                    likeIconResManager$ResourceConfig$init$2.invoke((Object) hVar.b);
                    return;
                }
                if (z) {
                    duImageLoaderView.g(gVar.c());
                } else {
                    duImageLoaderView.g(gVar.b());
                }
                likeIconResManager$ResourceConfig$init$1.invoke((Object) hVar.f12882a);
            }
        }

        @NotNull
        public final String a() {
            String a5;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101759, new Class[0], String.class);
            if (proxy.isSupported) {
                return (String) proxy.result;
            }
            g gVar = this.f12882a;
            return (gVar == null || (a5 = gVar.a()) == null) ? this.b.a() : a5;
        }

        @NotNull
        public final f b() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101769, new Class[0], f.class);
            return proxy.isSupported ? (f) proxy.result : this.b;
        }

        @Nullable
        public final g c() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101768, new Class[0], g.class);
            return proxy.isSupported ? (g) proxy.result : this.f12882a;
        }
    }

    /* compiled from: LikeIconResManager.kt */
    public static abstract class i {
        public static ChangeQuickRedirect changeQuickRedirect;
        @Nullable

        /* renamed from: a  reason: collision with root package name */
        public final Integer f12883a;

        /* compiled from: LikeIconResManager.kt */
        public static final class a extends i {
            public a() {
                super((Integer) null, 1);
            }
        }

        /* compiled from: LikeIconResManager.kt */
        public static final class b extends i {
            public b(@Nullable Integer num) {
                super(num, (DefaultConstructorMarker) null);
            }

            public b(Integer num, int i) {
                super((Integer) null, (DefaultConstructorMarker) null);
            }
        }

        /* compiled from: LikeIconResManager.kt */
        public static final class c extends i {
            public c(@Nullable Integer num) {
                super(num, (DefaultConstructorMarker) null);
            }

            public c(Integer num, int i) {
                super((Integer) null, (DefaultConstructorMarker) null);
            }
        }

        /* compiled from: LikeIconResManager.kt */
        public static final class d extends i {
            public d(@Nullable Integer num) {
                super(num, (DefaultConstructorMarker) null);
            }

            public d(Integer num, int i) {
                super((Integer) null, (DefaultConstructorMarker) null);
            }
        }

        /* compiled from: LikeIconResManager.kt */
        public static final class e extends i {
            public e(@Nullable Integer num) {
                super(num, (DefaultConstructorMarker) null);
            }
        }

        /* compiled from: LikeIconResManager.kt */
        public static final class f extends i {
            public f(@Nullable Integer num) {
                super(num, (DefaultConstructorMarker) null);
            }

            public f(Integer num, int i) {
                super((Integer) null, (DefaultConstructorMarker) null);
            }
        }

        public i(Integer num, int i) {
            this.f12883a = null;
        }

        @Nullable
        public final Integer a() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101774, new Class[0], Integer.class);
            return proxy.isSupported ? (Integer) proxy.result : this.f12883a;
        }

        public i(Integer num, DefaultConstructorMarker defaultConstructorMarker) {
            this.f12883a = num;
        }
    }

    public LikeIconResManager() {
        T t;
        T t4;
        T t12 = null;
        DuHttpRequest<LikeResModel> duHttpRequest = new DuHttpRequest<>(null, LikeResModel.class, null, false);
        this.f12874a = duHttpRequest;
        LifecycleOwner a5 = WrappersKt.a();
        j jVar = new j(a5, duHttpRequest.isShowErrorToast(), null);
        Ref.BooleanRef booleanRef = new Ref.BooleanRef();
        booleanRef.element = duHttpRequest.getMutableAllStateLiveData().getValue() instanceof DuHttpRequest.b.a;
        duHttpRequest.getMutableAllStateLiveData().observe(v20.i.f39125a.a(a5), new LikeIconResManager$$special$$inlined$observeForever$1(duHttpRequest, jVar, booleanRef, this));
        pi.e eVar = pi.e.f37087a;
        if (eVar.i()) {
            String e6 = eVar.e();
            if (StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".png", false, 2, null)) {
                n.s(mn.a.f35714a, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp");
            } else if (eVar.g("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", e6, null) == null) {
                b bVar = new b("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp");
                if (pi.e.k("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp")) {
                    Iterator<T> it2 = eVar.f().iterator();
                    while (true) {
                        if (!it2.hasNext()) {
                            t4 = null;
                            break;
                        }
                        t4 = it2.next();
                        if (Intrinsics.areEqual(t4.d, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp")) {
                            break;
                        }
                    }
                    T t13 = t4;
                    if (t13 != null) {
                        t13.r = bVar;
                    }
                } else {
                    eVar.f().add(tl.a.r("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", e6, null, bVar));
                }
            }
            pi.e eVar2 = pi.e.f37087a;
            if (eVar2.i()) {
                String e12 = eVar2.e();
                if (StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".png", false, 2, null)) {
                    n.s(mn.a.f35714a, "https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp");
                } else if (eVar2.g("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", e12, null) == null) {
                    c cVar = new c("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp");
                    if (pi.e.k("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp")) {
                        Iterator<T> it3 = eVar2.f().iterator();
                        while (true) {
                            if (!it3.hasNext()) {
                                t = null;
                                break;
                            }
                            t = it3.next();
                            if (Intrinsics.areEqual(t.d, "https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp")) {
                                break;
                            }
                        }
                        T t14 = t;
                        if (t14 != null) {
                            t14.r = cVar;
                        }
                    } else {
                        eVar2.f().add(tl.a.r("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", e12, null, cVar));
                    }
                }
                pi.e eVar3 = pi.e.f37087a;
                if (eVar3.i()) {
                    String e13 = eVar3.e();
                    if (StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".png", false, 2, null)) {
                        n.s(mn.a.f35714a, "https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp");
                    } else if (eVar3.g("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", e13, null) == null) {
                        a aVar = new a("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp");
                        if (pi.e.k("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp")) {
                            Iterator<T> it4 = eVar3.f().iterator();
                            while (true) {
                                if (!it4.hasNext()) {
                                    break;
                                }
                                T next = it4.next();
                                if (Intrinsics.areEqual(next.d, "https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp")) {
                                    t12 = next;
                                    break;
                                }
                            }
                            T t15 = t12;
                            if (t15 != null) {
                                t15.r = aVar;
                                return;
                            }
                            return;
                        }
                        eVar3.f().add(tl.a.r("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", e13, null, aVar));
                    }
                } else {
                    throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
                }
            } else {
                throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
            }
        } else {
            throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
        }
    }

    @Nullable
    public final ReplyDissIcon.Android a() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 101695, new Class[0], ReplyDissIcon.Android.class);
        return proxy.isSupported ? (ReplyDissIcon.Android) proxy.result : this.d;
    }

    public final Pair<g, f> b(i iVar, ContentLightIcon contentLightIcon, CommentReplyLightIcon.Android android2) {
        Pair<g, f> pair;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{iVar, contentLightIcon, android2}, this, changeQuickRedirect, false, 101698, new Class[]{i.class, ContentLightIcon.class, CommentReplyLightIcon.Android.class}, Pair.class);
        if (proxy.isSupported) {
            return (Pair) proxy.result;
        }
        g gVar = null;
        String str = "";
        if (iVar instanceof i.d) {
            if (contentLightIcon != null) {
                String singleLight = contentLightIcon.getSingleLight();
                String str2 = singleLight != null ? singleLight : str;
                String singleUnLight = contentLightIcon.getSingleUnLight();
                String str3 = singleUnLight != null ? singleUnLight : str;
                String lightAeAndroid = contentLightIcon.getLightAeAndroid();
                gVar = new g(str2, str3, lightAeAndroid != null ? lightAeAndroid : str, false, 8);
            }
            pair = TuplesKt.to(gVar, new f(R.drawable.trend_global_like, R.drawable.trend_global_dislike, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", false, 8));
        } else if (iVar instanceof i.b) {
            if (contentLightIcon != null) {
                String multiLight = contentLightIcon.getMultiLight();
                String str4 = multiLight != null ? multiLight : str;
                String multiUnLight = contentLightIcon.getMultiUnLight();
                String str5 = multiUnLight != null ? multiUnLight : str;
                String lightAeAndroid2 = contentLightIcon.getLightAeAndroid();
                gVar = new g(str4, str5, lightAeAndroid2 != null ? lightAeAndroid2 : str, false, 8);
            }
            pair = TuplesKt.to(gVar, new f(R.drawable.trend_global_like_small, R.drawable.trend_global_dislike_small, null, false, 12));
        } else if (iVar instanceof i.c) {
            if (contentLightIcon != null) {
                String imageTextLight = contentLightIcon.getImageTextLight();
                String str6 = imageTextLight != null ? imageTextLight : str;
                String imageTextUnLight = contentLightIcon.getImageTextUnLight();
                String str7 = imageTextUnLight != null ? imageTextUnLight : str;
                String lightAeAndroid3 = contentLightIcon.getLightAeAndroid();
                gVar = new g(str6, str7, lightAeAndroid3 != null ? lightAeAndroid3 : str, false, 8);
            }
            pair = TuplesKt.to(gVar, new f(R.drawable.trend_global_like, R.drawable.trend_global_dislike, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", false, 8));
        } else if (iVar instanceof i.a) {
            if (android2 != null) {
                String light = android2.getLight();
                if (light == null) {
                    light = str;
                }
                String unLight = android2.getUnLight();
                if (unLight == null) {
                    unLight = str;
                }
                String lightAe = android2.getLightAe();
                if (lightAe != null) {
                    str = lightAe;
                }
                gVar = new g(light, unLight, str, this.e);
            }
            return TuplesKt.to(gVar, new f(R.drawable.trend_comment_salute_like, R.drawable.trend_comment_salute_dislike, "https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", true));
        } else if (iVar instanceof i.e) {
            if (contentLightIcon != null) {
                String videoLight = contentLightIcon.getVideoLight();
                String str8 = videoLight != null ? videoLight : str;
                String videoUnLight = contentLightIcon.getVideoUnLight();
                String str9 = videoUnLight != null ? videoUnLight : str;
                String lightAeAndroid4 = contentLightIcon.getLightAeAndroid();
                gVar = new g(str8, str9, lightAeAndroid4 != null ? lightAeAndroid4 : str, false, 8);
            }
            return TuplesKt.to(gVar, new f(R.drawable.trend_global_like_video_round, R.drawable.trend_global_dislike_video_round, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", false, 8));
        } else if (iVar instanceof i.f) {
            if (contentLightIcon != null) {
                String videoLightBottom = contentLightIcon.getVideoLightBottom();
                String str10 = videoLightBottom != null ? videoLightBottom : str;
                String videoUnLightBottom = contentLightIcon.getVideoUnLightBottom();
                String str11 = videoUnLightBottom != null ? videoUnLightBottom : str;
                String lightAeAndroid5 = contentLightIcon.getLightAeAndroid();
                gVar = new g(str10, str11, lightAeAndroid5 != null ? lightAeAndroid5 : str, false, 8);
            }
            return TuplesKt.to(gVar, new f(R.drawable.du_community_video_liked_v2_round, R.drawable.du_community_video_like_v2_round, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", false, 8));
        } else {
            throw new NoWhenBranchMatchedException();
        }
        return pair;
    }

    public LikeIconResManager(DefaultConstructorMarker defaultConstructorMarker) {
        T t;
        T t4;
        T t12 = null;
        DuHttpRequest<LikeResModel> duHttpRequest = new DuHttpRequest<>(null, LikeResModel.class, null, false);
        this.f12874a = duHttpRequest;
        LifecycleOwner a5 = WrappersKt.a();
        j jVar = new j(a5, duHttpRequest.isShowErrorToast(), null);
        Ref.BooleanRef booleanRef = new Ref.BooleanRef();
        booleanRef.element = duHttpRequest.getMutableAllStateLiveData().getValue() instanceof DuHttpRequest.b.a;
        duHttpRequest.getMutableAllStateLiveData().observe(v20.i.f39125a.a(a5), new LikeIconResManager$$special$$inlined$observeForever$1(duHttpRequest, jVar, booleanRef, this));
        pi.e eVar = pi.e.f37087a;
        if (eVar.i()) {
            String e6 = eVar.e();
            if (StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", ".png", false, 2, null)) {
                n.s(mn.a.f35714a, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp");
            } else if (eVar.g("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", e6, null) == null) {
                b bVar = new b("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp");
                if (pi.e.k("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp")) {
                    Iterator<T> it2 = eVar.f().iterator();
                    while (true) {
                        if (!it2.hasNext()) {
                            t4 = null;
                            break;
                        }
                        t4 = it2.next();
                        if (Intrinsics.areEqual(t4.d, "https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp")) {
                            break;
                        }
                    }
                    T t13 = t4;
                    if (t13 != null) {
                        t13.r = bVar;
                    }
                } else {
                    eVar.f().add(tl.a.r("https://apk.poizon.com/duApp/Android_Config/resource/community/big_rise_anim.webp", e6, null, bVar));
                }
            }
            pi.e eVar2 = pi.e.f37087a;
            if (eVar2.i()) {
                String e12 = eVar2.e();
                if (StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", ".png", false, 2, null)) {
                    n.s(mn.a.f35714a, "https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp");
                } else if (eVar2.g("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", e12, null) == null) {
                    c cVar = new c("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp");
                    if (pi.e.k("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp")) {
                        Iterator<T> it3 = eVar2.f().iterator();
                        while (true) {
                            if (!it3.hasNext()) {
                                t = null;
                                break;
                            }
                            t = it3.next();
                            if (Intrinsics.areEqual(t.d, "https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp")) {
                                break;
                            }
                        }
                        T t14 = t;
                        if (t14 != null) {
                            t14.r = cVar;
                        }
                    } else {
                        eVar2.f().add(tl.a.r("https://cdn.poizon.com/node-common/0e1c74c631a3a39d115d121fe65824b1.webp", e12, null, cVar));
                    }
                }
                pi.e eVar3 = pi.e.f37087a;
                if (eVar3.i()) {
                    String e13 = eVar3.e();
                    if (StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".webp", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".gif", false, 2, null) || StringsKt__StringsJVMKt.endsWith$default("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", ".png", false, 2, null)) {
                        n.s(mn.a.f35714a, "https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp");
                    } else if (eVar3.g("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", e13, null) == null) {
                        a aVar = new a("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp");
                        if (pi.e.k("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp")) {
                            Iterator<T> it4 = eVar3.f().iterator();
                            while (true) {
                                if (!it4.hasNext()) {
                                    break;
                                }
                                T next = it4.next();
                                if (Intrinsics.areEqual(next.d, "https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp")) {
                                    t12 = next;
                                    break;
                                }
                            }
                            T t15 = t12;
                            if (t15 != null) {
                                t15.r = aVar;
                                return;
                            }
                            return;
                        }
                        eVar3.f().add(tl.a.r("https://cdn.poizon.com/node-common/550913c9-d56d-e267-7429-a0e01891f65f.webp", e13, null, aVar));
                    }
                } else {
                    throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
                }
            } else {
                throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
            }
        } else {
            throw new IllegalStateException("You should call DuAnimation.initialize at first!!");
        }
    }
}