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


package com.shizhuang.duapp.modules.growth_order.shareorder;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Guideline;
import androidx.core.graphics.drawable.DrawableKt;
import androidx.core.view.OneShotPreDrawListener;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewKt;
import androidx.core.view.accessibility.AccessibilityEventCompat;
import cd.k;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.helper.net.ParamsBuilder;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.common.ui.view.SafeVideoView;
import com.shizhuang.duapp.libs.bpm.BM;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.du_mall_common.constant.MallABTest;
import com.shizhuang.duapp.modules.growth_common.http.GrowthService;
import com.shizhuang.duapp.modules.growth_order.GrowthOrderSensorUtil;
import com.shizhuang.duapp.modules.growth_order.shareorder.DuPublishDialog;
import com.shizhuang.duapp.modules.growth_order.shareorder.api.ShareOrderApi;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.AdventureShowInfo;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.GiftSingleInfo;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.GiftWrappingModel;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.HonoraryInfo;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.OrderInfoModel;
import com.shizhuang.duapp.modules.growth_order.shareorder.models.SubOrderModel;
import com.shizhuang.duapp.modules.growth_order.shareorder.utils.ShareOrderSavePicUtils;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.share.constance.SHARE_MEDIA;
import com.shizhuang.duapp.stream.MediaSdkManager;
import com.shizhuang.duapp.stream.util.ResourceHelper;
import com.shizhuang.dudatastatistics.factory.PoizonAnalyzeFactory;
import com.shizhuang.model.ShortUrlModel;
import com.tencent.mars.xlog.Xlog;
import df.b0;
import df.h0;
import ij.f0;
import ij.x;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt__IteratorsJVMKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
import kotlin.text.StringsKt__StringsKt;
import nd0.m;
import nd0.n;
import nd0.o;
import nd0.p;
import nd0.q;
import nd0.t;
import org.jetbrains.annotations.NotNull;
import rd.l;
import rd0.c;
import td.j;
import td.s;

@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0006\b\u0016\u0018\u00002\u00020\u0001:\u0001\u0007B\u0007¢\u0006\u0004\b\u0005\u0010\u0006J\b\u0010\u0003\u001a\u00020\u0002H\u0016J\b\u0010\u0004\u001a\u00020\u0002H\u0016¨\u0006\b"}, d2 = {"Lcom/shizhuang/duapp/modules/growth_order/shareorder/ShareOrderFragment;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "", "onPause", "onResume", "<init>", "()V", "a", "du_growth_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ShareOrderFragment.kt */
public class ShareOrderFragment extends BaseFragment {
    @NotNull
    public static final a I = new a(null);
    public static ChangeQuickRedirect changeQuickRedirect;
    public boolean A;
    public String B = "";
    public String C = "";
    public String D = "";
    public boolean E;
    public boolean F;
    public boolean G;
    public HashMap H;
    public Integer b;

    /* renamed from: c  reason: collision with root package name */
    public String f15717c;
    public String d = "";
    public String e = "";
    public OrderInfoModel f;

    /* renamed from: g  reason: collision with root package name */
    public boolean f15718g;

    /* renamed from: h  reason: collision with root package name */
    public final Handler f15719h = new Handler();
    public ObjectAnimator i;
    public ObjectAnimator j;
    public ValueAnimator k;
    public ObjectAnimator l;
    public ObjectAnimator m;
    public boolean n = true;
    public boolean o;
    public boolean p;

    /* renamed from: q  reason: collision with root package name */
    public String f15720q = "";
    public boolean r;
    public String s = "";
    public Xlog t;

    /* renamed from: u  reason: collision with root package name */
    public GiftWrappingModel f15721u;

    /* renamed from: v  reason: collision with root package name */
    public boolean f15722v;
    public String w;
    public String x;
    public int y = 1;
    public final Lazy z = LazyKt__LazyJVMKt.lazy(ShareOrderFragment$isForceHideVideo$2.INSTANCE);

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void FragmentMethodWeaver_onCreate(ShareOrderFragment shareOrderFragment, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{shareOrderFragment, bundle}, null, changeQuickRedirect, true, 154004, new Class[]{ShareOrderFragment.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareOrderFragment.d(shareOrderFragment, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareOrderFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.growth_order.shareorder.ShareOrderFragment")) {
                    jn.b.f34396a.fragmentOnCreateMethod(shareOrderFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreateView")
        @Keep
        public static View FragmentMethodWeaver_onCreateView(@NonNull ShareOrderFragment shareOrderFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{shareOrderFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 154006, new Class[]{ShareOrderFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            long currentTimeMillis = System.currentTimeMillis();
            View f = ShareOrderFragment.f(shareOrderFragment, layoutInflater, viewGroup, bundle);
            long currentTimeMillis2 = System.currentTimeMillis();
            if (shareOrderFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.growth_order.shareorder.ShareOrderFragment")) {
                jn.b.f34396a.fragmentOnCreateViewMethod(shareOrderFragment, currentTimeMillis, currentTimeMillis2);
            }
            return f;
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void FragmentMethodWeaver_onResume(ShareOrderFragment shareOrderFragment) {
            if (!PatchProxy.proxy(new Object[]{shareOrderFragment}, null, changeQuickRedirect, true, 154003, new Class[]{ShareOrderFragment.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareOrderFragment.c(shareOrderFragment);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareOrderFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.growth_order.shareorder.ShareOrderFragment")) {
                    jn.b.f34396a.fragmentOnResumeMethod(shareOrderFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void FragmentMethodWeaver_onStart(ShareOrderFragment shareOrderFragment) {
            if (!PatchProxy.proxy(new Object[]{shareOrderFragment}, null, changeQuickRedirect, true, 154005, new Class[]{ShareOrderFragment.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareOrderFragment.e(shareOrderFragment);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareOrderFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.growth_order.shareorder.ShareOrderFragment")) {
                    jn.b.f34396a.fragmentOnStartMethod(shareOrderFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onViewCreated")
        @Keep
        public static void FragmentMethodWeaver_onViewCreated(@NonNull ShareOrderFragment shareOrderFragment, @Nullable View view, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{shareOrderFragment, view, bundle}, null, changeQuickRedirect, true, 154007, new Class[]{ShareOrderFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareOrderFragment.g(shareOrderFragment, view, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareOrderFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.growth_order.shareorder.ShareOrderFragment")) {
                    jn.b.f34396a.fragmentOnViewCreatedMethod(shareOrderFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

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

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class b extends s<List<? extends ShortUrlModel>> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ Function1 f15723c;
        public final /* synthetic */ String d;

        public b(ShareOrderFragment shareOrderFragment, Function1 function1, String str) {
            this.b = shareOrderFragment;
            this.f15723c = function1;
            this.d = str;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [rd.l<java.util.List<com.shizhuang.model.ShortUrlModel>>] */
        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(@org.jetbrains.annotations.Nullable l<List<? extends ShortUrlModel>> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 154009, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                if (cd.l.c(this.b)) {
                    this.f15723c.invoke(this.d);
                }
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            String str;
            ShortUrlModel shortUrlModel;
            List list = (List) obj;
            if (!PatchProxy.proxy(new Object[]{list}, this, changeQuickRedirect, false, 154008, new Class[]{List.class}, Void.TYPE).isSupported) {
                super.onSuccess(list);
                if (cd.l.c(this.b)) {
                    Function1 function1 = this.f15723c;
                    if (list == null || (shortUrlModel = (ShortUrlModel) CollectionsKt___CollectionsKt.firstOrNull(list)) == null || (str = shortUrlModel.getShortUrl()) == null) {
                        str = this.d;
                    }
                    function1.invoke(str);
                }
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class c implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ File f15724c;

        public c(ShareOrderFragment shareOrderFragment, File file) {
            this.b = shareOrderFragment;
            this.f15724c = file;
        }

        /* JADX WARN: Multi-variable type inference failed */
        /* JADX WARN: Type inference failed for: r3v6, types: [java.io.FileOutputStream] */
        /* JADX WARN: Type inference failed for: r3v7 */
        /* JADX WARN: Type inference failed for: r3v8 */
        /* JADX WARN: Type inference failed for: r3v26 */
        /* JADX WARNING: Missing exception handler attribute for start block: B:89:0x0248 */
        /* JADX WARNING: Removed duplicated region for block: B:195:0x0408 A[SYNTHETIC, Splitter:B:195:0x0408] */
        /* JADX WARNING: Removed duplicated region for block: B:198:0x040d A[Catch:{ Exception -> 0x0410 }] */
        /* JADX WARNING: Removed duplicated region for block: B:202:0x0413  */
        /* JADX WARNING: Removed duplicated region for block: B:205:0x0419 A[SYNTHETIC, Splitter:B:205:0x0419] */
        /* JADX WARNING: Removed duplicated region for block: B:208:0x041e A[Catch:{ Exception -> 0x0421 }] */
        /* JADX WARNING: Removed duplicated region for block: B:94:0x0253  */
        public final void run() {
            String str;
            String str2;
            Bitmap bitmap;
            ByteArrayOutputStream byteArrayOutputStream;
            FileOutputStream fileOutputStream;
            Throwable th2;
            FileOutputStream fileOutputStream2;
            Exception e;
            ByteArrayOutputStream byteArrayOutputStream2;
            Bitmap bitmap2;
            File file;
            Resources resources;
            ZipFile zipFile;
            File[] listFiles;
            File file2;
            File file3;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 154010, new Class[0], Void.TYPE).isSupported) {
                ShareOrderFragment shareOrderFragment = this.b;
                File file4 = this.f15724c;
                PatchProxyResult proxy = PatchProxy.proxy(new Object[]{file4}, shareOrderFragment, ShareOrderFragment.changeQuickRedirect, false, 153924, new Class[]{File.class}, String.class);
                int i = 2;
                Object obj = null;
                String str3 = "";
                if (proxy.isSupported) {
                    str = (String) proxy.result;
                } else {
                    if (!(file4 == null || shareOrderFragment.getContext() == null)) {
                        c.a aVar = rd0.c.f37674a;
                        Context context = shareOrderFragment.getContext();
                        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{context, file4}, aVar, c.a.changeQuickRedirect, false, 154527, new Class[]{Context.class, File.class}, String.class);
                        if (proxy2.isSupported) {
                            str = (String) proxy2.result;
                        } else {
                            File file5 = new File(a.f.g(a.f.h(context != null ? ResourceHelper.f26082a.e(context) : null), File.separator, file4.getName().substring(StringsKt__StringsKt.lastIndexOf$default((CharSequence) file4.getName(), '/', 0, false, 6, (Object) null) + 1, StringsKt__StringsKt.lastIndexOf$default((CharSequence) file4.getName(), '.', 0, false, 6, (Object) null))));
                            if (file5.exists() && file5.isDirectory()) {
                                File[] listFiles2 = file5.listFiles();
                                if (listFiles2 != null) {
                                    if (listFiles2.length == 1) {
                                        File file6 = (File) ArraysKt___ArraysKt.getOrNull(listFiles2, 0);
                                        if (file6 != null) {
                                            str = file6.getAbsolutePath();
                                        }
                                    } else if (listFiles2.length > 1) {
                                        int length = listFiles2.length;
                                        int i3 = 0;
                                        while (true) {
                                            if (i3 >= length) {
                                                file3 = null;
                                                break;
                                            }
                                            file3 = listFiles2[i3];
                                            if (file3.isDirectory() && (Intrinsics.areEqual("__MACOSX", file3.getName()) ^ true)) {
                                                break;
                                            }
                                            i3++;
                                        }
                                        str = file3 != null ? file3.getAbsolutePath() : file5.getAbsolutePath();
                                    }
                                }
                                str = str3;
                            }
                            str = null;
                        }
                        if (TextUtils.isEmpty(str)) {
                            c.a aVar2 = rd0.c.f37674a;
                            Context context2 = shareOrderFragment.getContext();
                            PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{context2, file4}, aVar2, c.a.changeQuickRedirect, false, 154528, new Class[]{Context.class, File.class}, String.class);
                            if (proxy3.isSupported) {
                                str = (String) proxy3.result;
                            } else {
                                try {
                                    zipFile = new ZipFile(file4);
                                    String substring = zipFile.getName().substring(StringsKt__StringsKt.lastIndexOf$default((CharSequence) zipFile.getName(), '/', 0, false, 6, (Object) null) + 1, StringsKt__StringsKt.lastIndexOf$default((CharSequence) zipFile.getName(), '.', 0, false, 6, (Object) null));
                                    String e6 = context2 != null ? ResourceHelper.f26082a.e(context2) : null;
                                    if (!TextUtils.isEmpty(e6)) {
                                        File file7 = new File(a.f.g(a.f.h(e6), File.separator, substring));
                                        if (!file7.exists()) {
                                            file7.mkdirs();
                                        }
                                        try {
                                            Iterator it2 = CollectionsKt__IteratorsJVMKt.iterator(zipFile.entries());
                                            while (it2.hasNext()) {
                                                ZipEntry zipEntry = (ZipEntry) it2.next();
                                                String name = zipEntry.getName();
                                                if (!StringsKt__StringsKt.contains$default((CharSequence) name, (CharSequence) "../", false, i, obj)) {
                                                    InputStream inputStream = zipFile.getInputStream(zipEntry);
                                                    StringBuilder sb2 = new StringBuilder();
                                                    sb2.append(e6);
                                                    String str4 = File.separator;
                                                    sb2.append(str4);
                                                    sb2.append(substring);
                                                    sb2.append(str4);
                                                    sb2.append(name);
                                                    String sb3 = sb2.toString();
                                                    int lastIndexOf$default = StringsKt__StringsKt.lastIndexOf$default((CharSequence) sb3, '/', 0, false, 6, (Object) null);
                                                    if (sb3 != null) {
                                                        File file8 = new File(sb3.substring(0, lastIndexOf$default));
                                                        if (!file8.exists()) {
                                                            file8.mkdirs();
                                                        }
                                                        if (!new File(sb3).isDirectory()) {
                                                            FileOutputStream fileOutputStream3 = new FileOutputStream(sb3);
                                                            byte[] bArr = new byte[AccessibilityEventCompat.TYPE_WINDOW_CONTENT_CHANGED];
                                                            while (true) {
                                                                int read = inputStream.read(bArr);
                                                                if (read == -1) {
                                                                    break;
                                                                }
                                                                fileOutputStream3.write(bArr, 0, read);
                                                            }
                                                            inputStream.close();
                                                            fileOutputStream3.close();
                                                            i = 2;
                                                        }
                                                        obj = null;
                                                    } else {
                                                        throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
                                                    }
                                                }
                                            }
                                        } catch (Exception unknown) {
                                            zipFile.close();
                                            listFiles = file7.listFiles();
                                            if (listFiles != null) {
                                            }
                                        } catch (Throwable th3) {
                                            try {
                                                zipFile.close();
                                            } catch (Exception unused) {
                                            }
                                            throw th3;
                                        }
                                        try {
                                            zipFile.close();
                                        } catch (Exception unused2) {
                                        }
                                        listFiles = file7.listFiles();
                                        if (listFiles != null) {
                                            if (listFiles.length == 1) {
                                                File file9 = (File) ArraysKt___ArraysKt.getOrNull(listFiles, 0);
                                                if (file9 != null) {
                                                    str = file9.getAbsolutePath();
                                                }
                                            } else if (listFiles.length > 1) {
                                                int length2 = listFiles.length;
                                                int i12 = 0;
                                                while (true) {
                                                    if (i12 >= length2) {
                                                        file2 = null;
                                                        break;
                                                    }
                                                    file2 = listFiles[i12];
                                                    if (file2.isDirectory() && (Intrinsics.areEqual("__MACOSX", file2.getName()) ^ true)) {
                                                        break;
                                                    }
                                                    i12++;
                                                }
                                                str = file2 != null ? file2.getAbsolutePath() : file7.getAbsolutePath();
                                            }
                                        }
                                        str = str3;
                                    }
                                } catch (Exception e12) {
                                    file4.delete();
                                    e12.printStackTrace();
                                }
                            }
                        }
                    }
                    str = null;
                }
                if (str == null) {
                    str = str3;
                }
                shareOrderFragment.s = str;
                if (TextUtils.isEmpty(this.b.D)) {
                    ShareOrderFragment shareOrderFragment2 = this.b;
                    PatchProxyResult proxy4 = PatchProxy.proxy(new Object[0], shareOrderFragment2, ShareOrderFragment.changeQuickRedirect, false, 153925, new Class[0], String.class);
                    if (proxy4.isSupported) {
                        str2 = (String) proxy4.result;
                    } else if (!shareOrderFragment2.A) {
                        str2 = null;
                    } else {
                        c.a aVar3 = rd0.c.f37674a;
                        PatchProxyResult proxy5 = PatchProxy.proxy(new Object[0], shareOrderFragment2, ShareOrderFragment.changeQuickRedirect, false, 153987, new Class[0], Bitmap.class);
                        if (proxy5.isSupported) {
                            bitmap = (Bitmap) proxy5.result;
                        } else if (!shareOrderFragment2.z()) {
                            bitmap = null;
                        } else {
                            bitmap = ShareOrderSavePicUtils.f15749a.a((ConstraintLayout) shareOrderFragment2._$_findCachedViewById(R.id.awLayout));
                        }
                        Context context3 = shareOrderFragment2.getContext();
                        String str5 = shareOrderFragment2.s;
                        PatchProxyResult proxy6 = PatchProxy.proxy(new Object[]{bitmap, context3, str5}, aVar3, c.a.changeQuickRedirect, false, 154529, new Class[]{Bitmap.class, Context.class, String.class}, String.class);
                        if (proxy6.isSupported) {
                            str2 = (String) proxy6.result;
                        } else {
                            if (!StringsKt__StringsJVMKt.isBlank(str5)) {
                                try {
                                    String str6 = str5 + "/enterAnimation/resource/texture/";
                                    if (new File(str6).exists()) {
                                        String str7 = str6 + "enterAnimation.png";
                                        File file10 = new File(str7);
                                        if (file10.exists()) {
                                            file10.delete();
                                        }
                                        if (bitmap != null) {
                                            bitmap2 = null;
                                        } else {
                                            if (context3 == null || (resources = context3.getResources()) == null) {
                                                bitmap = null;
                                            } else {
                                                byteArrayOutputStream2 = null;
                                                try {
                                                    Drawable drawable = resources.getDrawable(R.drawable.enter_animation, null);
                                                    if (drawable != null) {
                                                        bitmap = DrawableKt.toBitmap$default(drawable, 0, 0, null, 7, null);
                                                        bitmap2 = null;
                                                    } else {
                                                        bitmap = null;
                                                    }
                                                } catch (Exception e13) {
                                                    e = e13;
                                                    byteArrayOutputStream = byteArrayOutputStream2;
                                                    fileOutputStream2 = byteArrayOutputStream;
                                                    try {
                                                        e.printStackTrace();
                                                        if (byteArrayOutputStream != null) {
                                                        }
                                                        if (fileOutputStream2 != 0) {
                                                        }
                                                        str2 = str3;
                                                        if (str2 != null) {
                                                        }
                                                        shareOrderFragment2.D = str3;
                                                        this.b.r = true;
                                                    } catch (Throwable th4) {
                                                        th2 = th4;
                                                        fileOutputStream = fileOutputStream2;
                                                        if (byteArrayOutputStream != null) {
                                                            try {
                                                                byteArrayOutputStream.close();
                                                            } catch (Exception unused3) {
                                                                throw th2;
                                                            }
                                                        }
                                                        if (fileOutputStream != null) {
                                                            fileOutputStream.close();
                                                        }
                                                        throw th2;
                                                    }
                                                } catch (Throwable th5) {
                                                    th2 = th5;
                                                    byteArrayOutputStream = byteArrayOutputStream2;
                                                    fileOutputStream = byteArrayOutputStream;
                                                    if (byteArrayOutputStream != null) {
                                                    }
                                                    if (fileOutputStream != null) {
                                                    }
                                                    throw th2;
                                                }
                                            }
                                            bitmap2 = bitmap;
                                        }
                                        if (bitmap != null) {
                                            try {
                                                file = new File(str7);
                                                byteArrayOutputStream = new ByteArrayOutputStream();
                                            } catch (Exception e14) {
                                                e = e14;
                                                byteArrayOutputStream2 = bitmap2;
                                                byteArrayOutputStream = byteArrayOutputStream2;
                                                fileOutputStream2 = byteArrayOutputStream;
                                                e.printStackTrace();
                                                if (byteArrayOutputStream != null) {
                                                }
                                                if (fileOutputStream2 != 0) {
                                                }
                                                str2 = str3;
                                                if (str2 != null) {
                                                }
                                                shareOrderFragment2.D = str3;
                                                this.b.r = true;
                                            } catch (Throwable th6) {
                                                th2 = th6;
                                                byteArrayOutputStream2 = bitmap2;
                                                byteArrayOutputStream = byteArrayOutputStream2;
                                                fileOutputStream = byteArrayOutputStream;
                                                if (byteArrayOutputStream != null) {
                                                }
                                                if (fileOutputStream != null) {
                                                }
                                                throw th2;
                                            }
                                            try {
                                                bitmap.compress(Bitmap.CompressFormat.PNG, 0, byteArrayOutputStream);
                                                byte[] byteArray = byteArrayOutputStream.toByteArray();
                                                byteArrayOutputStream.close();
                                                FileOutputStream fileOutputStream4 = new FileOutputStream(file);
                                                try {
                                                    fileOutputStream4.write(byteArray);
                                                    fileOutputStream4.close();
                                                    bitmap.recycle();
                                                    str2 = file.getAbsolutePath();
                                                    try {
                                                        byteArrayOutputStream.close();
                                                        fileOutputStream4.close();
                                                    } catch (Exception unused4) {
                                                    }
                                                } catch (Exception e15) {
                                                    e = e15;
                                                    fileOutputStream2 = fileOutputStream4;
                                                    e.printStackTrace();
                                                    if (byteArrayOutputStream != null) {
                                                    }
                                                    if (fileOutputStream2 != 0) {
                                                    }
                                                    str2 = str3;
                                                    if (str2 != null) {
                                                    }
                                                    shareOrderFragment2.D = str3;
                                                    this.b.r = true;
                                                } catch (Throwable th7) {
                                                    th2 = th7;
                                                    fileOutputStream = fileOutputStream4;
                                                    if (byteArrayOutputStream != null) {
                                                    }
                                                    if (fileOutputStream != null) {
                                                    }
                                                    throw th2;
                                                }
                                            } catch (Exception e16) {
                                                e = e16;
                                                fileOutputStream2 = bitmap2;
                                                e.printStackTrace();
                                                if (byteArrayOutputStream != null) {
                                                    try {
                                                        byteArrayOutputStream.close();
                                                    } catch (Exception unused5) {
                                                    }
                                                }
                                                if (fileOutputStream2 != 0) {
                                                    fileOutputStream2.close();
                                                }
                                                str2 = str3;
                                                if (str2 != null) {
                                                }
                                                shareOrderFragment2.D = str3;
                                                this.b.r = true;
                                            }
                                        }
                                    }
                                } catch (Exception e17) {
                                    e = e17;
                                    byteArrayOutputStream = null;
                                    fileOutputStream2 = byteArrayOutputStream;
                                    e.printStackTrace();
                                    if (byteArrayOutputStream != null) {
                                    }
                                    if (fileOutputStream2 != 0) {
                                    }
                                    str2 = str3;
                                    if (str2 != null) {
                                    }
                                    shareOrderFragment2.D = str3;
                                    this.b.r = true;
                                } catch (Throwable th8) {
                                    th2 = th8;
                                    byteArrayOutputStream = null;
                                    fileOutputStream = byteArrayOutputStream;
                                    if (byteArrayOutputStream != null) {
                                    }
                                    if (fileOutputStream != null) {
                                    }
                                    throw th2;
                                }
                            }
                            str2 = str3;
                        }
                    }
                    if (str2 != null) {
                        str3 = str2;
                    }
                    shareOrderFragment2.D = str3;
                }
                this.b.r = true;
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class d extends s<HonoraryInfo> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public d(ShareOrderFragment shareOrderFragment) {
            this.b = shareOrderFragment;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            GiftSingleInfo subOrderInfo;
            GiftSingleInfo subOrderInfo2;
            OrderInfoModel orderInfo;
            HonoraryInfo honoraryInfo = (HonoraryInfo) obj;
            if (!PatchProxy.proxy(new Object[]{honoraryInfo}, this, changeQuickRedirect, false, 154011, new Class[]{HonoraryInfo.class}, Void.TYPE).isSupported) {
                super.onSuccess(honoraryInfo);
                if (honoraryInfo != null && cd.l.c(this.b)) {
                    String subOrderNo = honoraryInfo.getSubOrderNo();
                    GiftWrappingModel giftWrappingModel = this.b.f15721u;
                    if (!(!Intrinsics.areEqual(subOrderNo, (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo = subOrderInfo2.getOrderInfo()) == null) ? null : orderInfo.getOrderNo()))) {
                        GiftWrappingModel giftWrappingModel2 = this.b.f15721u;
                        if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null)) {
                            subOrderInfo.setHonoraryInfo(honoraryInfo);
                        }
                        this.b.J(true);
                    }
                }
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class e implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ Function1 f15725c;

        public e(ShareOrderFragment shareOrderFragment, Function1 function1) {
            this.b = shareOrderFragment;
            this.f15725c = function1;
        }

        public final void run() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 154012, new Class[0], Void.TYPE).isSupported) {
                this.b.o(this.f15725c);
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class f extends AnimatorListenerAdapter {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public f(ShareOrderFragment shareOrderFragment) {
            this.b = shareOrderFragment;
        }

        public void onAnimationEnd(@org.jetbrains.annotations.Nullable Animator animator) {
            if (!PatchProxy.proxy(new Object[]{animator}, this, changeQuickRedirect, false, 154014, new Class[]{Animator.class}, Void.TYPE).isSupported) {
                this.b.O();
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class g implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        public g(ShareOrderFragment shareOrderFragment) {
            this.b = shareOrderFragment;
        }

        public final void run() {
            String str;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 154054, new Class[0], Void.TYPE).isSupported) {
                ShareOrderFragment shareOrderFragment = this.b;
                if (!PatchProxy.proxy(new Object[0], shareOrderFragment, ShareOrderFragment.changeQuickRedirect, false, 153922, new Class[0], Void.TYPE).isSupported && cd.l.c(shareOrderFragment)) {
                    PatchProxyResult proxy = PatchProxy.proxy(new Object[0], shareOrderFragment, ShareOrderFragment.changeQuickRedirect, false, 153917, new Class[0], Boolean.TYPE);
                    if (((Boolean) (proxy.isSupported ? proxy.result : shareOrderFragment.z.getValue())).booleanValue()) {
                        shareOrderFragment.n();
                        return;
                    }
                    if (TextUtils.isEmpty(shareOrderFragment.C)) {
                        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], shareOrderFragment, ShareOrderFragment.changeQuickRedirect, false, 153927, new Class[0], String.class);
                        if (proxy2.isSupported) {
                            str = (String) proxy2.result;
                        } else {
                            ConstraintLayout constraintLayout = (ConstraintLayout) shareOrderFragment._$_findCachedViewById(R.id.shareBlank);
                            if (constraintLayout != null) {
                                ShareOrderSavePicUtils.Companion companion = ShareOrderSavePicUtils.f15749a;
                                ((ImageView) shareOrderFragment._$_findCachedViewById(R.id.ivSnapshot)).setImageBitmap(companion.a(constraintLayout));
                                str = rd0.c.f37674a.a(companion.a((ImageView) shareOrderFragment._$_findCachedViewById(R.id.ivSnapshot)), shareOrderFragment.getContext());
                            } else {
                                str = null;
                            }
                        }
                        if (str == null) {
                            str = "";
                        }
                        shareOrderFragment.C = str;
                    }
                    if (TextUtils.isEmpty(shareOrderFragment.C)) {
                        shareOrderFragment.n();
                        return;
                    }
                    String str2 = (String) b0.f("key_share_order_normal_Template", "");
                    String str3 = (String) b0.f("key_share_order_holiday_Template", "");
                    GiftWrappingModel giftWrappingModel = shareOrderFragment.f15721u;
                    if (giftWrappingModel != null && giftWrappingModel.isHoliday() && !TextUtils.isEmpty(str3)) {
                        str2 = str3;
                    }
                    if (TextUtils.isEmpty(str2)) {
                        shareOrderFragment.n();
                        return;
                    }
                    File t = tl.a.t(str2);
                    if (t == null) {
                        shareOrderFragment.w = str2;
                        tl.a.n(str2, new q(shareOrderFragment));
                        return;
                    }
                    shareOrderFragment.l(t);
                }
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class h extends AnimatorListenerAdapter {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ boolean f15726c;

        public h(ShareOrderFragment shareOrderFragment, boolean z) {
            this.b = shareOrderFragment;
            this.f15726c = z;
        }

        public void onAnimationEnd(@org.jetbrains.annotations.Nullable Animator animator) {
            if (!PatchProxy.proxy(new Object[]{animator}, this, changeQuickRedirect, false, 154064, new Class[]{Animator.class}, Void.TYPE).isSupported && cd.l.c(this.b)) {
                this.b.H();
                if (!this.f15726c) {
                    this.b.B();
                    this.b.L();
                }
            }
        }
    }

    /* compiled from: ShareOrderFragment.kt */
    public static final class i implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ShareOrderFragment b;

        public i(ShareOrderFragment shareOrderFragment) {
            this.b = shareOrderFragment;
        }

        public final void run() {
            ObjectAnimator objectAnimator;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 154065, new Class[0], Void.TYPE).isSupported && cd.l.c(this.b) && (objectAnimator = this.b.j) != null) {
                objectAnimator.cancel();
                objectAnimator.start();
            }
        }
    }

    public static void S(ShareOrderFragment shareOrderFragment, View view, float f12, int i3, int i12, Object obj) {
        if ((i12 & 1) != 0) {
            f12 = (float) fi.b.b((float) 2);
        }
        if (!PatchProxy.proxy(new Object[]{view, new Float(f12), new Integer(i3)}, shareOrderFragment, changeQuickRedirect, false, 153951, new Class[]{View.class, Float.TYPE, Integer.TYPE}, Void.TYPE).isSupported) {
            GradientDrawable gradientDrawable = new GradientDrawable();
            gradientDrawable.setColor(i3);
            gradientDrawable.setCornerRadius(f12);
            Unit unit = Unit.INSTANCE;
            view.setBackground(gradientDrawable);
        }
    }

    public static void c(ShareOrderFragment shareOrderFragment) {
        boolean z4;
        GiftSingleInfo subOrderInfo;
        AdventureShowInfo adventureShowInfo;
        String valueOf;
        GiftSingleInfo subOrderInfo2;
        OrderInfoModel orderInfo;
        GiftSingleInfo subOrderInfo3;
        OrderInfoModel orderInfo2;
        boolean z5 = false;
        if (!PatchProxy.proxy(new Object[0], shareOrderFragment, changeQuickRedirect, false, 153957, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            ObjectAnimator objectAnimator = shareOrderFragment.i;
            if (objectAnimator != null) {
                objectAnimator.resume();
            }
            ObjectAnimator objectAnimator2 = shareOrderFragment.j;
            if (objectAnimator2 != null) {
                objectAnimator2.resume();
            }
            f0 f0Var = f0.f33460a;
            GiftWrappingModel giftWrappingModel = shareOrderFragment.f15721u;
            Integer num = null;
            String valueOf2 = String.valueOf((giftWrappingModel == null || (subOrderInfo3 = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo2 = subOrderInfo3.getOrderInfo()) == null) ? null : orderInfo2.getSpuId());
            GiftWrappingModel giftWrappingModel2 = shareOrderFragment.f15721u;
            String valueOf3 = String.valueOf((giftWrappingModel2 == null || (subOrderInfo2 = giftWrappingModel2.getSubOrderInfo()) == null || (orderInfo = subOrderInfo2.getOrderInfo()) == null) ? null : orderInfo.getSkuId());
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], shareOrderFragment, changeQuickRedirect, false, 153953, new Class[0], Boolean.TYPE);
            if (proxy.isSupported) {
                z4 = ((Boolean) proxy.result).booleanValue();
            } else {
                GiftWrappingModel giftWrappingModel3 = shareOrderFragment.f15721u;
                List<SubOrderModel> subOrderList = giftWrappingModel3 != null ? giftWrappingModel3.getSubOrderList() : null;
                z4 = (subOrderList == null || subOrderList.size() <= 1 || shareOrderFragment.f15717c == null) ? false : true;
            }
            String str = "";
            String str2 = z4 ? "切换商品" : str;
            Integer num2 = shareOrderFragment.b;
            if (!(num2 == null || (valueOf = String.valueOf(num2.intValue())) == null)) {
                str = valueOf;
            }
            String str3 = shareOrderFragment.A() ? "1" : "0";
            if (!PatchProxy.proxy(new Object[]{valueOf3, valueOf2, str2, str, str3}, f0Var, f0.changeQuickRedirect, false, 21014, new Class[]{String.class, String.class, String.class, String.class, String.class}, Void.TYPE).isSupported) {
                HashMap j12 = a01.a.j("current_page", "273", "block_type", "376");
                if (valueOf3.length() > 0) {
                    j12.put("sku_id", valueOf3);
                }
                if (valueOf2.length() > 0) {
                    j12.put("spu_id", valueOf2);
                }
                if (str2.length() > 0) {
                    j12.put("button_title", str2);
                }
                if (str.length() > 0) {
                    j12.put("channel_source", str);
                }
                if (str3.length() > 0) {
                    j12.put("activity_acting_status", str3);
                }
                PoizonAnalyzeFactory.a().track("activity_giftcard_exposure", j12);
            }
            if (shareOrderFragment.z()) {
                x xVar = x.f33480a;
                GiftWrappingModel giftWrappingModel4 = shareOrderFragment.f15721u;
                if (!(giftWrappingModel4 == null || (subOrderInfo = giftWrappingModel4.getSubOrderInfo()) == null || (adventureShowInfo = subOrderInfo.getAdventureShowInfo()) == null)) {
                    num = adventureShowInfo.getOwned();
                }
                String valueOf4 = String.valueOf(num);
                if (!PatchProxy.proxy(new Object[]{"奇遇世界按钮", valueOf4}, xVar, x.changeQuickRedirect, false, 20891, new Class[]{String.class, String.class}, Void.TYPE).isSupported) {
                    HashMap j13 = a01.a.j("current_page", "273", "block_type", "2807");
                    j13.put("button_title", "奇遇世界按钮");
                    if (valueOf4.length() > 0) {
                        z5 = true;
                    }
                    if (z5) {
                        j13.put("status", valueOf4);
                    }
                    PoizonAnalyzeFactory.a().track("activity_common_block_exposure", j13);
                }
            }
        }
    }

    public static void d(ShareOrderFragment shareOrderFragment, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, shareOrderFragment, changeQuickRedirect, false, 153995, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void e(ShareOrderFragment shareOrderFragment) {
        if (!PatchProxy.proxy(new Object[0], shareOrderFragment, changeQuickRedirect, false, 153997, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static View f(ShareOrderFragment shareOrderFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, shareOrderFragment, changeQuickRedirect, false, 153999, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
    }

    public static void g(ShareOrderFragment shareOrderFragment, View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, shareOrderFragment, changeQuickRedirect, false, 154001, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            super.onViewCreated(view, bundle);
        }
    }

    public static /* synthetic */ void i(ShareOrderFragment shareOrderFragment, String str, boolean z4, int i3, Integer num, int i12, Object obj) {
        if ((i12 & 4) != 0) {
            i3 = -1;
        }
        shareOrderFragment.h(str, z4, i3, null);
    }

    public final boolean A() {
        GiftSingleInfo subOrderInfo;
        HonoraryInfo honoraryInfo;
        GiftSingleInfo subOrderInfo2;
        HonoraryInfo honoraryInfo2;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153980, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        GiftWrappingModel giftWrappingModel = this.f15721u;
        String str = null;
        String scope = (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (honoraryInfo2 = subOrderInfo2.getHonoraryInfo()) == null) ? null : honoraryInfo2.getScope();
        GiftWrappingModel giftWrappingModel2 = this.f15721u;
        if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (honoraryInfo = subOrderInfo.getHonoraryInfo()) == null)) {
            str = honoraryInfo.getRankDesc();
        }
        if (scope == null || StringsKt__StringsJVMKt.isBlank(scope)) {
            return false;
        }
        if (!(str == null || StringsKt__StringsJVMKt.isBlank(str))) {
            return true;
        }
        return false;
    }

    public final void B() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153961, new Class[0], Void.TYPE).isSupported) {
            this.f15719h.post(new g(this));
        }
    }

    public final void C(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 153989, new Class[]{String.class}, Void.TYPE).isSupported && cd.l.c(this) && ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)) != null) {
            F(1);
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setVisibility(0);
            _$_findCachedViewById(R.id.surfaceBg).setVisibility(0);
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).stopPlayback();
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).suspend();
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setVideoPath(str);
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).start();
            ((DuImageLoaderView) _$_findCachedViewById(R.id.playBtnIcon)).setVisibility(8);
            ((TextView) _$_findCachedViewById(R.id.playBtnText)).setText("预览中");
            ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setClickable(false);
            ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setBackgroundColor(getResources().getColor(R.color.transparent));
        }
    }

    public final void D(View view, boolean z4) {
        if (!PatchProxy.proxy(new Object[]{view, new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153955, new Class[]{View.class, Boolean.TYPE}, Void.TYPE).isSupported) {
            ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) view.getLayoutParams();
            if (z4) {
                layoutParams.startToStart = ((Guideline) _$_findCachedViewById(R.id.guidelineV04)).getId();
                layoutParams.endToEnd = -1;
            } else {
                layoutParams.endToEnd = ((Guideline) _$_findCachedViewById(R.id.guidelineV04)).getId();
                layoutParams.startToStart = -1;
            }
            view.setLayoutParams(layoutParams);
        }
    }

    public final void E(boolean z4) {
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153928, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            Integer num = null;
            if (z4) {
                ((TextView) _$_findCachedViewById(R.id.btnVideo)).setBackground(getResources().getDrawable(R.drawable.btn_bg_white_left, null));
                ((TextView) _$_findCachedViewById(R.id.btnPic)).setBackground(getResources().getDrawable(R.drawable.btn_bg_border_right, null));
                ((TextView) _$_findCachedViewById(R.id.btnVideo)).setTextColor(getResources().getColor(R.color.color_gray_2b2b3c));
                ((TextView) _$_findCachedViewById(R.id.btnPic)).setTextColor(getResources().getColor(R.color.white));
                ((ImageView) _$_findCachedViewById(R.id.firstShareBtnPic)).setImageResource(R.mipmap.du_share_douyin);
                ((TextView) _$_findCachedViewById(R.id.firstShareBtnTitle)).setText("抖音");
                ImageView imageView = (ImageView) _$_findCachedViewById(R.id.ivDouYinAdv);
                GiftWrappingModel giftWrappingModel = this.f15721u;
                if (giftWrappingModel != null) {
                    num = giftWrappingModel.getTikTokPlaySwitch();
                }
                imageView.setVisibility(num != null && num.intValue() == 1 ? 0 : 8);
                ((ImageView) _$_findCachedViewById(R.id.secondShareBtnPic)).setImageResource(R.mipmap.du_share_wechat);
                ((TextView) _$_findCachedViewById(R.id.secondShareBtnTitle)).setText("微信好友");
                ((TextView) _$_findCachedViewById(R.id.tvShareFile)).setText("保存视频");
                K(0);
                this.f15718g = true;
            } else {
                ((TextView) _$_findCachedViewById(R.id.btnVideo)).setBackground(getResources().getDrawable(R.drawable.btn_bg_border_left, null));
                ((TextView) _$_findCachedViewById(R.id.btnPic)).setBackground(getResources().getDrawable(R.drawable.btn_bg_white_right, null));
                ((TextView) _$_findCachedViewById(R.id.btnPic)).setTextColor(getResources().getColor(R.color.color_gray_2b2b3c));
                ((TextView) _$_findCachedViewById(R.id.btnVideo)).setTextColor(getResources().getColor(R.color.white));
                ((ImageView) _$_findCachedViewById(R.id.firstShareBtnPic)).setImageResource(R.mipmap.du_share_wechat);
                ((TextView) _$_findCachedViewById(R.id.firstShareBtnTitle)).setText("微信好友");
                ((ImageView) _$_findCachedViewById(R.id.ivDouYinAdv)).setVisibility(8);
                ((ImageView) _$_findCachedViewById(R.id.secondShareBtnPic)).setImageResource(R.mipmap.du_share_wechat_circle);
                ((TextView) _$_findCachedViewById(R.id.secondShareBtnTitle)).setText("朋友圈");
                ((TextView) _$_findCachedViewById(R.id.tvShareFile)).setText("保存图片");
                K(1);
                this.f15718g = false;
            }
            s();
        }
    }

    public final void F(int i3) {
        if (PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 153990, new Class[]{Integer.TYPE}, Void.TYPE).isSupported || !cd.l.c(this)) {
            return;
        }
        if (i3 == 0) {
            this.n = false;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.playBtnIcon)).h(R.drawable.share_play_loading).x();
        } else if (i3 == 1) {
            this.n = false;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.playBtnIcon)).h(R.drawable.order_share_video_play).x();
        } else if (i3 == 2) {
            this.n = true;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.playBtnIcon)).h(R.drawable.order_share_video_play).x();
        }
    }

    public final void G(Function1<? super String, Unit> function1) {
        if (PatchProxy.proxy(new Object[]{function1}, this, changeQuickRedirect, false, 153933, new Class[]{Function1.class}, Void.TYPE).isSupported || !cd.l.c(this)) {
            return;
        }
        if (TextUtils.isEmpty(this.f15720q) || !new File(this.f15720q).exists()) {
            wc.b.d(getContext(), "", 0.85f);
            o(new ShareOrderFragment$shareVideo$1(this, function1));
            return;
        }
        function1.invoke(this.f15720q);
    }

    public final void H() {
        Resources resources;
        Resources resources2;
        GiftSingleInfo subOrderInfo;
        AdventureShowInfo adventureShowInfo;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153958, new Class[0], Void.TYPE).isSupported) {
            ((ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn)).setVisibility(0);
            GiftWrappingModel giftWrappingModel = this.f15721u;
            Drawable drawable = null;
            Integer owned = (giftWrappingModel == null || (subOrderInfo = giftWrappingModel.getSubOrderInfo()) == null || (adventureShowInfo = subOrderInfo.getAdventureShowInfo()) == null) ? null : adventureShowInfo.getOwned();
            if (owned != null && owned.intValue() == 1) {
                ImageView imageView = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn);
                Context context = getContext();
                if (!(context == null || (resources2 = context.getResources()) == null)) {
                    drawable = resources2.getDrawable(R.drawable.adventure_enter_black);
                }
                imageView.setImageDrawable(drawable);
            } else {
                ImageView imageView2 = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn);
                Context context2 = getContext();
                if (!(context2 == null || (resources = context2.getResources()) == null)) {
                    drawable = resources.getDrawable(R.drawable.adventure_enter_blue);
                }
                imageView2.setImageDrawable(drawable);
            }
            ViewExtensionKt.h((ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn), new ShareOrderFragment$showAwEnterBtn$1(this));
        }
    }

    public final void I(boolean z4) {
        GiftSingleInfo subOrderInfo;
        AdventureShowInfo adventureShowInfo;
        GiftSingleInfo subOrderInfo2;
        AdventureShowInfo adventureShowInfo2;
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153954, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            if (z()) {
                DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivAwAvatar);
                GiftWrappingModel giftWrappingModel = this.f15721u;
                Integer num = null;
                duImageLoaderView.i((giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (adventureShowInfo2 = subOrderInfo2.getAdventureShowInfo()) == null) ? null : adventureShowInfo2.getAwAvatar()).x();
                DuImageLoaderView duImageLoaderView2 = (DuImageLoaderView) _$_findCachedViewById(R.id.ivAwSpu);
                GiftWrappingModel giftWrappingModel2 = this.f15721u;
                duImageLoaderView2.i((giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (adventureShowInfo = subOrderInfo.getAdventureShowInfo()) == null) ? null : adventureShowInfo.getAwSpuImg()).x();
                ((Guideline) _$_findCachedViewById(R.id.guidelineV04)).setGuidelinePercent(0.35f);
                D((LinearLayout) _$_findCachedViewById(R.id.buyerInfoLayout), true);
                D((TextView) _$_findCachedViewById(R.id.orderProductPrice), true);
                D((TextView) _$_findCachedViewById(R.id.orderTime), true);
                if (z4) {
                    M(z4);
                    return;
                }
                GiftWrappingModel giftWrappingModel3 = this.f15721u;
                if (giftWrappingModel3 != null) {
                    num = giftWrappingModel3.getLocationTab();
                }
                if (num != null && num.intValue() == 2) {
                    ((ConstraintLayout) _$_findCachedViewById(R.id.awLayout)).setAlpha(1.0f);
                    H();
                    return;
                }
                return;
            }
            ((Guideline) _$_findCachedViewById(R.id.guidelineV04)).setGuidelinePercent(0.821f);
            D((LinearLayout) _$_findCachedViewById(R.id.buyerInfoLayout), false);
            D((TextView) _$_findCachedViewById(R.id.orderProductPrice), false);
            D((TextView) _$_findCachedViewById(R.id.orderTime), false);
            ((ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn)).setVisibility(8);
            ((ConstraintLayout) _$_findCachedViewById(R.id.awLayout)).setAlpha(o5.i.f36333a);
        }
    }

    public final void J(boolean z4) {
        String str;
        GiftSingleInfo subOrderInfo;
        HonoraryInfo honoraryInfo;
        GiftSingleInfo subOrderInfo2;
        HonoraryInfo honoraryInfo2;
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153964, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            GiftWrappingModel giftWrappingModel = this.f15721u;
            String str2 = null;
            String scope = (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (honoraryInfo2 = subOrderInfo2.getHonoraryInfo()) == null) ? null : honoraryInfo2.getScope();
            GiftWrappingModel giftWrappingModel2 = this.f15721u;
            if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (honoraryInfo = subOrderInfo.getHonoraryInfo()) == null)) {
                str2 = honoraryInfo.getRankDesc();
            }
            if (!(scope == null || StringsKt__StringsJVMKt.isBlank(scope))) {
                if (!(str2 == null || StringsKt__StringsJVMKt.isBlank(str2))) {
                    if (scope.length() > 8) {
                        str = a40.f.g(h6.a.k(scope, 0, 8, new StringBuilder(), "..."), str2);
                    } else {
                        str = a.f.e(scope, ' ', str2);
                    }
                    if (!z4) {
                        R(true);
                    }
                    ValueAnimator valueAnimator = this.k;
                    if (valueAnimator != null) {
                        valueAnimator.end();
                    }
                    ObjectAnimator objectAnimator = this.l;
                    if (objectAnimator != null) {
                        objectAnimator.end();
                    }
                    ObjectAnimator objectAnimator2 = this.m;
                    if (objectAnimator2 != null) {
                        objectAnimator2.end();
                    }
                    ((TextView) _$_findCachedViewById(R.id.tvLevel)).setText(str);
                    if (z4 && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153965, new Class[0], Void.TYPE).isSupported) {
                        TextView textView = (TextView) _$_findCachedViewById(R.id.tvLevel);
                        OneShotPreDrawListener.add(textView, new t(textView, this));
                        return;
                    }
                }
            }
            R(false);
            if (z4) {
            }
        }
    }

    public final void K(int i3) {
        if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 153932, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
            if (i3 == 0) {
                ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setVisibility(0);
                ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setVisibility(4);
            } else if (i3 == 1) {
                ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setVisibility(4);
                ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setVisibility(0);
            }
        }
    }

    public final void L() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153952, new Class[0], Void.TYPE).isSupported) {
            GiftWrappingModel giftWrappingModel = this.f15721u;
            List<SubOrderModel> subOrderList = giftWrappingModel != null ? giftWrappingModel.getSubOrderList() : null;
            if (subOrderList != null && subOrderList.size() > 1 && this.f15717c != null) {
                this.x = subOrderList.get(this.y).getSubOrderNo();
                ImageView imageView = (ImageView) _$_findCachedViewById(R.id.btnSwitchOrder);
                if (imageView != null) {
                    ViewKt.setVisible(imageView, true);
                }
            }
        }
    }

    public final void M(boolean z4) {
        ConstraintLayout constraintLayout;
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153969, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported && cd.l.c(this) && (constraintLayout = (ConstraintLayout) _$_findCachedViewById(R.id.awLayout)) != null) {
            AnimatorSet animatorSet = new AnimatorSet();
            animatorSet.addListener(new h(this, z4));
            ObjectAnimator ofFloat = ObjectAnimator.ofFloat(constraintLayout, "scaleY", 0.6f, 1.0f);
            ofFloat.setDuration(250L);
            ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(constraintLayout, "scaleX", 0.6f, 1.0f);
            ofFloat2.setDuration(250L);
            ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(constraintLayout, "alpha", 0.6f, 1.0f);
            ofFloat3.setDuration(250L);
            ArrayList arrayList = new ArrayList();
            arrayList.add(ofFloat);
            arrayList.add(ofFloat2);
            arrayList.add(ofFloat3);
            animatorSet.playTogether(arrayList);
            animatorSet.start();
        }
    }

    public final void N() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153931, new Class[0], Void.TYPE).isSupported && cd.l.c(this)) {
            View _$_findCachedViewById = _$_findCachedViewById(R.id.breatheView);
            if (_$_findCachedViewById != null) {
                _$_findCachedViewById.setVisibility(8);
            }
            Handler handler = this.f15719h;
            if (handler != null) {
                handler.postDelayed(new i(this), 300);
            }
        }
    }

    public final void O() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153930, new Class[0], Void.TYPE).isSupported && cd.l.c(this)) {
            View _$_findCachedViewById = _$_findCachedViewById(R.id.breatheView);
            if (_$_findCachedViewById != null) {
                _$_findCachedViewById.setVisibility(0);
            }
            ObjectAnimator objectAnimator = this.i;
            if (objectAnimator != null) {
                objectAnimator.cancel();
                objectAnimator.start();
            }
        }
    }

    public final void P() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153971, new Class[0], Void.TYPE).isSupported && ((OrderCutImageView) _$_findCachedViewById(R.id.shareProduct)) != null) {
            ((OrderCutImageView) _$_findCachedViewById(R.id.shareProduct)).o();
        }
    }

    public final void Q(SHARE_MEDIA share_media, String str) {
        if (!PatchProxy.proxy(new Object[]{share_media, str}, this, changeQuickRedirect, false, 153937, new Class[]{SHARE_MEDIA.class, String.class}, Void.TYPE).isSupported && cd.l.c(this)) {
            j(p(str), new ShareOrderFragment$startShare$1(this, share_media));
        }
    }

    public final void R(boolean z4) {
        if (!PatchProxy.proxy(new Object[]{new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 153963, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            if (z4) {
                ((TextView) _$_findCachedViewById(R.id.tvLevel)).setVisibility(0);
                ((ImageView) _$_findCachedViewById(R.id.ivLevelIconL)).setAlpha(1.0f);
                ((ImageView) _$_findCachedViewById(R.id.ivLevelIconR)).setAlpha(1.0f);
                ((ImageView) _$_findCachedViewById(R.id.dewuTitle)).setVisibility(4);
                return;
            }
            ((TextView) _$_findCachedViewById(R.id.tvLevel)).setVisibility(4);
            ((ImageView) _$_findCachedViewById(R.id.ivLevelIconL)).setAlpha(o5.i.f36333a);
            ((ImageView) _$_findCachedViewById(R.id.ivLevelIconR)).setAlpha(o5.i.f36333a);
            ((ImageView) _$_findCachedViewById(R.id.dewuTitle)).setVisibility(0);
        }
    }

    public View _$_findCachedViewById(int i3) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 153992, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.H == null) {
            this.H = new HashMap();
        }
        View view = (View) this.H.get(Integer.valueOf(i3));
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i3);
        this.H.put(Integer.valueOf(i3), findViewById);
        return findViewById;
    }

    @Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153946, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_share_order;
    }

    public final void h(String str, boolean z4, int i3, Integer num) {
        GiftSingleInfo subOrderInfo;
        OrderInfoModel orderInfo;
        if (!PatchProxy.proxy(new Object[]{str, new Byte(z4 ? (byte) 1 : 0), new Integer(i3), num}, this, changeQuickRedirect, false, 153941, new Class[]{String.class, Boolean.TYPE, Integer.TYPE, Integer.class}, Void.TYPE).isSupported) {
            GrowthOrderSensorUtil growthOrderSensorUtil = GrowthOrderSensorUtil.f15630a;
            GiftWrappingModel giftWrappingModel = this.f15721u;
            growthOrderSensorUtil.b(String.valueOf((giftWrappingModel == null || (subOrderInfo = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo = subOrderInfo.getOrderInfo()) == null) ? null : orderInfo.getSpuId()), str, i3, 0, this.b, z4, num, A() ? 1 : 0);
        }
    }

    @Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
    public void initData() {
        boolean z4 = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153947, new Class[0], Void.TYPE).isSupported;
    }

    @Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
    public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 153920, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            Bundle arguments = getArguments();
            Integer num = null;
            this.f15721u = (GiftWrappingModel) (arguments != null ? arguments.get("key_order_data") : null);
            Bundle arguments2 = getArguments();
            this.f15717c = arguments2 != null ? arguments2.getString("key_biz_no") : null;
            Bundle arguments3 = getArguments();
            if (arguments3 != null) {
                num = Integer.valueOf(arguments3.getInt("key_source_from"));
            }
            this.b = num;
            if (num != null && num.intValue() == 1) {
                h.a.u("type", PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START, BM.growth(), "growth_share_enjoy");
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153948, new Class[0], Void.TYPE).isSupported) {
                ((ConstraintLayout) _$_findCachedViewById(R.id.shareEnjoyLayout)).post(new m(this));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153945, new Class[0], Void.TYPE).isSupported) {
                ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setZOrderOnTop(true);
                ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setOnErrorListener(n.b);
                ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setOnPreparedListener(new o(this));
                ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setOnCompletionListener(new p(this));
                if (Build.VERSION.SDK_INT >= 26) {
                    ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setAudioFocusRequest(0);
                }
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153935, new Class[0], Void.TYPE).isSupported) {
                ViewExtensionKt.j((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder), 0, new ShareOrderFragment$initClick$1(this), 1);
                ViewExtensionKt.h((ConstraintLayout) _$_findCachedViewById(R.id.orderShareFirst), new ShareOrderFragment$initClick$2(this));
                ViewExtensionKt.h((LinearLayout) _$_findCachedViewById(R.id.orderShareSecond), new ShareOrderFragment$initClick$3(this));
                ViewExtensionKt.h((LinearLayout) _$_findCachedViewById(R.id.orderShareQQ), new ShareOrderFragment$initClick$4(this));
                ViewExtensionKt.h((LinearLayout) _$_findCachedViewById(R.id.orderShareDewu), new ShareOrderFragment$initClick$5(this));
                ViewExtensionKt.h((LinearLayout) _$_findCachedViewById(R.id.orderShareFile), new ShareOrderFragment$initClick$6(this));
                ViewExtensionKt.h((LinearLayout) _$_findCachedViewById(R.id.playLayout), new ShareOrderFragment$initClick$7(this));
                ViewExtensionKt.h((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn), new ShareOrderFragment$initClick$8(this));
                ViewExtensionKt.h((TextView) _$_findCachedViewById(R.id.btnVideo), new ShareOrderFragment$initClick$9(this));
                ViewExtensionKt.h((TextView) _$_findCachedViewById(R.id.btnPic), new ShareOrderFragment$initClick$10(this));
                ViewExtensionKt.h((ImageView) _$_findCachedViewById(R.id.ivDouYinAdv), new ShareOrderFragment$initClick$11(this));
            }
        }
    }

    public final void j(String str, Function1<? super String, Unit> function1) {
        if (!PatchProxy.proxy(new Object[]{str, function1}, this, changeQuickRedirect, false, 153936, new Class[]{String.class, Function1.class}, Void.TYPE).isSupported) {
            cd0.a aVar = cd0.a.f2483a;
            s withoutToast = new b(this, function1, str).withoutToast();
            if (!PatchProxy.proxy(new Object[]{str, withoutToast}, aVar, cd0.a.changeQuickRedirect, false, 152420, new Class[]{String.class, s.class}, Void.TYPE).isSupported) {
                j.doRequest(((GrowthService) j.getJavaGoApi(GrowthService.class)).shortUrlConvert(rd.g.a(ParamsBuilder.newParams().addParams("bizTag", "buckleNo").addParams("urls", CollectionsKt__CollectionsJVMKt.listOf(str)))), withoutToast);
            }
        }
    }

    public final void k() {
        boolean z4;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153940, new Class[0], Void.TYPE).isSupported) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153981, new Class[0], Boolean.TYPE);
            if (proxy.isSupported) {
                z4 = ((Boolean) proxy.result).booleanValue();
            } else {
                z4 = !A() ? !(!v() || !y() || !x()) : !(!v() || !y() || !x() || !w());
            }
            if (z4) {
                ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setText(getResources().getString(R.string.share_show_info));
                Drawable drawable = getResources().getDrawable(R.drawable.eye, null);
                drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
                ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setCompoundDrawables(drawable, null, null, null);
                this.f15722v = true;
                return;
            }
            ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setText(getResources().getString(R.string.share_hide_info));
            Drawable drawable2 = getResources().getDrawable(R.drawable.closed_eye, null);
            drawable2.setBounds(0, 0, drawable2.getMinimumWidth(), drawable2.getMinimumHeight());
            ((TextView) _$_findCachedViewById(R.id.showBuyerInfoBtn)).setCompoundDrawables(drawable2, null, null, null);
            this.f15722v = false;
        }
    }

    public final void l(File file) {
        if (!PatchProxy.proxy(new Object[]{file}, this, changeQuickRedirect, false, 153923, new Class[]{File.class}, Void.TYPE).isSupported && file != null) {
            try {
                fd.q.a(new c(this, file));
            } catch (Exception e6) {
                fo.a.j(e6, "ShareEnjoyDialog uzip failed", new Object[0]);
            }
        }
    }

    public final void m() {
        Integer num;
        GiftSingleInfo subOrderInfo;
        OrderInfoModel orderInfo;
        GiftSingleInfo subOrderInfo2;
        OrderInfoModel orderInfo2;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153966, new Class[0], Void.TYPE).isSupported && (num = this.b) != null && num.intValue() == 1 && !this.G) {
            this.G = true;
            qd0.a aVar = qd0.a.f37355a;
            GiftWrappingModel giftWrappingModel = this.f15721u;
            Long l12 = null;
            String orderNo = (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo2 = subOrderInfo2.getOrderInfo()) == null) ? null : orderInfo2.getOrderNo();
            GiftWrappingModel giftWrappingModel2 = this.f15721u;
            if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (orderInfo = subOrderInfo.getOrderInfo()) == null)) {
                l12 = orderInfo.getSpuId();
            }
            s withoutToast = new d(this).withoutToast();
            if (!PatchProxy.proxy(new Object[]{orderNo, l12, withoutToast}, aVar, qd0.a.changeQuickRedirect, false, 154244, new Class[]{String.class, Long.class, s.class}, Void.TYPE).isSupported) {
                if (!(orderNo == null || StringsKt__StringsJVMKt.isBlank(orderNo)) && l12 != null) {
                    j.doRequest(((ShareOrderApi) j.getJavaGoApi(ShareOrderApi.class)).getGiftHonorary(cd.c.b(TuplesKt.to("subOrderNo", orderNo), TuplesKt.to("spuId", l12))), withoutToast);
                }
            }
        }
    }

    public final void n() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153921, new Class[0], Void.TYPE).isSupported) {
            E(false);
            ((TextView) _$_findCachedViewById(R.id.btnVideo)).setVisibility(8);
            ((TextView) _$_findCachedViewById(R.id.btnPic)).setVisibility(8);
            K(1);
        }
    }

    public final void o(Function1<? super String, Unit> function1) {
        String str;
        Bitmap bitmap;
        boolean z4 = true;
        if (!PatchProxy.proxy(new Object[]{function1}, this, changeQuickRedirect, false, 153934, new Class[]{Function1.class}, Void.TYPE).isSupported) {
            if (!this.r) {
                this.f15719h.postDelayed(new e(this, function1), 200);
                return;
            }
            BM.growth().c("growth_generateShareVideo", null);
            if (TextUtils.isEmpty(this.B)) {
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153926, new Class[0], String.class);
                if (proxy.isSupported) {
                    str = (String) proxy.result;
                } else if (!this.A) {
                    str = null;
                } else {
                    PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153986, new Class[0], Bitmap.class);
                    if (proxy2.isSupported) {
                        bitmap = (Bitmap) proxy2.result;
                    } else {
                        ImageView imageView = (ImageView) _$_findCachedViewById(R.id.shareBgLogo);
                        if (imageView != null) {
                            imageView.setVisibility(4);
                        }
                        if (z()) {
                            ImageView imageView2 = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn);
                            if (imageView2 != null) {
                                imageView2.setVisibility(4);
                            }
                            ConstraintLayout constraintLayout = (ConstraintLayout) _$_findCachedViewById(R.id.awLayout);
                            if (constraintLayout != null) {
                                constraintLayout.setVisibility(4);
                            }
                        }
                        if (((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder)).getVisibility() != 0) {
                            z4 = false;
                        }
                        int i3 = 8;
                        ((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder)).setVisibility(8);
                        Bitmap a5 = ShareOrderSavePicUtils.f15749a.a((ConstraintLayout) _$_findCachedViewById(R.id.shareEnjoyLayout));
                        ImageView imageView3 = (ImageView) _$_findCachedViewById(R.id.shareBgLogo);
                        if (imageView3 != null) {
                            imageView3.setVisibility(0);
                        }
                        if (z()) {
                            ImageView imageView4 = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn);
                            if (imageView4 != null) {
                                imageView4.setVisibility(0);
                            }
                            ConstraintLayout constraintLayout2 = (ConstraintLayout) _$_findCachedViewById(R.id.awLayout);
                            if (constraintLayout2 != null) {
                                constraintLayout2.setVisibility(0);
                            }
                        }
                        ImageView imageView5 = (ImageView) _$_findCachedViewById(R.id.btnSwitchOrder);
                        if (z4) {
                            i3 = 0;
                        }
                        imageView5.setVisibility(i3);
                        bitmap = a5;
                    }
                    ((ImageView) _$_findCachedViewById(R.id.ivSnapshot)).setImageBitmap(bitmap);
                    str = rd0.c.f37674a.a(ShareOrderSavePicUtils.f15749a.a((ImageView) _$_findCachedViewById(R.id.ivSnapshot)), getContext());
                }
                if (str == null) {
                    str = "";
                }
                this.B = str;
            }
            if (TextUtils.isEmpty(this.B)) {
                df.q.v(getResources().getString(R.string.compile_error), 0);
                if (function1 != null) {
                    function1.invoke("");
                    return;
                }
                return;
            }
            BM.growth().c("growth_videoExport", null);
            MediaSdkManager.j(MediaSdkManager.f26043a, getContext(), new ShareOrderFragment$generateShareVideo$2(this, function1), null, 4);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 153994, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 153998, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onDestroyView() {
        HashMap hashMap;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153988, new Class[0], Void.TYPE).isSupported) {
            super.onDestroyView();
            this.f15719h.removeCallbacksAndMessages(null);
            String str = this.w;
            if (str != null) {
                tl.a.d(str);
            }
            try {
                SafeVideoView safeVideoView = (SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView);
                if (safeVideoView != null) {
                    safeVideoView.setOnErrorListener(null);
                    safeVideoView.setOnCompletionListener(null);
                }
                Xlog xlog = this.t;
                if (xlog != null) {
                    xlog.appenderClose();
                }
            } catch (Exception e6) {
                fo.a.j(e6, "", new Object[0]);
            }
            ObjectAnimator objectAnimator = this.j;
            if (objectAnimator != null) {
                objectAnimator.cancel();
            }
            ObjectAnimator objectAnimator2 = this.i;
            if (objectAnimator2 != null) {
                objectAnimator2.cancel();
            }
            ValueAnimator valueAnimator = this.k;
            if (valueAnimator != null) {
                valueAnimator.cancel();
            }
            ObjectAnimator objectAnimator3 = this.l;
            if (objectAnimator3 != null) {
                objectAnimator3.cancel();
            }
            ObjectAnimator objectAnimator4 = this.m;
            if (objectAnimator4 != null) {
                objectAnimator4.cancel();
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153993, new Class[0], Void.TYPE).isSupported && (hashMap = this.H) != null) {
                hashMap.clear();
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onPause() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153942, new Class[0], Void.TYPE).isSupported) {
            super.onPause();
            t();
            ObjectAnimator objectAnimator = this.i;
            if (objectAnimator != null) {
                objectAnimator.pause();
            }
            ObjectAnimator objectAnimator2 = this.j;
            if (objectAnimator2 != null) {
                objectAnimator2.pause();
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153956, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onResume(this);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153996, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onStart(this);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onStop() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153943, new Class[0], Void.TYPE).isSupported) {
            super.onStop();
            try {
                SafeVideoView safeVideoView = (SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView);
                if (safeVideoView != null) {
                    safeVideoView.stopPlayback();
                    safeVideoView.suspend();
                }
            } catch (Exception e6) {
                fo.a.j(e6, "", new Object[0]);
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onViewCreated(View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 154000, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
        }
    }

    public final String p(String str) {
        GiftSingleInfo subOrderInfo;
        OrderInfoModel orderInfo;
        Long skuId;
        GiftSingleInfo subOrderInfo2;
        OrderInfoModel orderInfo2;
        Long spuId;
        boolean z4 = true;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 153984, new Class[]{String.class}, String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        Uri.Builder buildUpon = Uri.parse("https://m.dewu.com/router/product/ProductDetail").buildUpon();
        GiftWrappingModel giftWrappingModel = this.f15721u;
        String str2 = null;
        buildUpon.appendQueryParameter("spuId", (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo2 = subOrderInfo2.getOrderInfo()) == null || (spuId = orderInfo2.getSpuId()) == null) ? null : String.valueOf(spuId.longValue()));
        GiftWrappingModel giftWrappingModel2 = this.f15721u;
        if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (orderInfo = subOrderInfo.getOrderInfo()) == null || (skuId = orderInfo.getSkuId()) == null)) {
            str2 = String.valueOf(skuId.longValue());
        }
        buildUpon.appendQueryParameter("skuId", str2);
        buildUpon.appendQueryParameter("sourceName", "giftCard");
        buildUpon.appendQueryParameter("share_platform_title", str);
        buildUpon.appendQueryParameter("outside_channel_type", PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START);
        String loginUserId = ServiceManager.d().getLoginUserId();
        if (loginUserId != null && !StringsKt__StringsJVMKt.isBlank(loginUserId)) {
            z4 = false;
        }
        if (!z4) {
            buildUpon.appendQueryParameter("fromUserId", ServiceManager.k().encryptAES(loginUserId));
        }
        return buildUpon.build().toString();
    }

    /* JADX WARNING: Code restructure failed: missing block: B:33:0x013f, code lost:
        if (r0.intValue() == 1) goto L_0x0143;
     */
    public final Bitmap q(String str) {
        Integer num;
        boolean z4;
        ImageView imageView;
        ImageView imageView2;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 153985, new Class[]{String.class}, Bitmap.class);
        if (proxy.isSupported) {
            return (Bitmap) proxy.result;
        }
        if (!this.A || !cd.l.c(this)) {
            return null;
        }
        Bitmap a5 = h0.a(str, fi.b.b((float) 36));
        ((ImageView) _$_findCachedViewById(R.id.ivQrCode)).setVisibility(0);
        ((TextView) _$_findCachedViewById(R.id.tvQrCode)).setVisibility(0);
        ((ImageView) _$_findCachedViewById(R.id.ivQrCode)).setImageBitmap(a5);
        ((ImageView) _$_findCachedViewById(R.id.shareSeal)).setAlpha(o5.i.f36333a);
        ((ImageView) _$_findCachedViewById(R.id.shareSealSnap)).setAlpha(1.0f);
        if (this.E) {
            num = (Integer) b0.f("key_share_order_holiday_background_color", Integer.valueOf((int) ViewCompat.MEASURED_STATE_MASK));
        } else {
            num = Integer.valueOf(Color.parseColor("#374045"));
        }
        ((ConstraintLayout) _$_findCachedViewById(R.id.shareEnjoyLayout)).setBackgroundColor(num.intValue());
        if (z() && (imageView2 = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn)) != null) {
            imageView2.setVisibility(4);
        }
        boolean z5 = ((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder)).getVisibility() == 0;
        ((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder)).setVisibility(8);
        Bitmap a12 = ShareOrderSavePicUtils.f15749a.a((ConstraintLayout) _$_findCachedViewById(R.id.shareEnjoyLayout));
        if (z() && (imageView = (ImageView) _$_findCachedViewById(R.id.ivAwEnterBtn)) != null) {
            imageView.setVisibility(0);
        }
        ((ImageView) _$_findCachedViewById(R.id.btnSwitchOrder)).setVisibility(z5 ? 0 : 8);
        ((ImageView) _$_findCachedViewById(R.id.ivQrCode)).setVisibility(4);
        ((TextView) _$_findCachedViewById(R.id.tvQrCode)).setVisibility(4);
        ((ImageView) _$_findCachedViewById(R.id.shareSeal)).setAlpha(1.0f);
        ((ImageView) _$_findCachedViewById(R.id.shareSealSnap)).setAlpha(o5.i.f36333a);
        Integer num2 = (Integer) b0.f("key_share_order_holiday_is_save_fullscreen", 0);
        if (num2 != null) {
            z4 = true;
        }
        z4 = false;
        if (!this.E || !z4) {
            if (a12 != null) {
                int ceil = (int) Math.ceil((((double) a12.getWidth()) * 75.0d) / 1125.0d);
                int ceil2 = (int) Math.ceil((((double) a12.getHeight()) * 48.0d) / 1590.0d);
                a12 = Bitmap.createBitmap(a12, ceil, ceil2, a12.getWidth() - (ceil * 2), a12.getHeight() - ceil2);
            }
        } else if (a12 != null) {
            int height = (int) ((((float) a12.getHeight()) * 48.0f) / 1590.0f);
            Bitmap createBitmap = Bitmap.createBitmap(a12.getWidth(), a12.getHeight() + height, Bitmap.Config.ARGB_8888);
            Canvas canvas = new Canvas(createBitmap);
            Paint paint = new Paint();
            paint.setColor(num.intValue());
            canvas.drawRoundRect(new RectF(o5.i.f36333a, o5.i.f36333a, (float) a12.getWidth(), (float) (a12.getHeight() + height)), o5.i.f36333a, o5.i.f36333a, paint);
            canvas.drawBitmap(a12, new Rect(0, 0, a12.getWidth(), a12.getHeight()), new Rect(0, 0, a12.getWidth(), a12.getHeight()), new Paint());
            a12 = createBitmap;
        }
        ((ConstraintLayout) _$_findCachedViewById(R.id.shareEnjoyLayout)).setBackgroundColor(0);
        return a12;
    }

    public final void r(String str, int i3) {
        DuPublishDialog duPublishDialog;
        GiftSingleInfo subOrderInfo;
        OrderInfoModel orderInfo;
        Long skuId;
        GiftSingleInfo subOrderInfo2;
        OrderInfoModel orderInfo2;
        Long spuId;
        if (!PatchProxy.proxy(new Object[]{str, new Integer(i3)}, this, changeQuickRedirect, false, 153938, new Class[]{String.class, Integer.TYPE}, Void.TYPE).isSupported) {
            DuPublishDialog.a aVar = DuPublishDialog.i;
            GiftWrappingModel giftWrappingModel = this.f15721u;
            long j12 = 0;
            long longValue = (giftWrappingModel == null || (subOrderInfo2 = giftWrappingModel.getSubOrderInfo()) == null || (orderInfo2 = subOrderInfo2.getOrderInfo()) == null || (spuId = orderInfo2.getSpuId()) == null) ? 0 : spuId.longValue();
            GiftWrappingModel giftWrappingModel2 = this.f15721u;
            if (!(giftWrappingModel2 == null || (subOrderInfo = giftWrappingModel2.getSubOrderInfo()) == null || (orderInfo = subOrderInfo.getOrderInfo()) == null || (skuId = orderInfo.getSkuId()) == null)) {
                j12 = skuId.longValue();
            }
            ShareOrderPublishBean shareOrderPublishBean = new ShareOrderPublishBean(str, 1691, "看看我新买了啥", i3, longValue, j12, false, 0, null, 448, null);
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{shareOrderPublishBean}, aVar, DuPublishDialog.a.changeQuickRedirect, false, 153665, new Class[]{ShareOrderPublishBean.class}, DuPublishDialog.class);
            if (proxy.isSupported) {
                duPublishDialog = (DuPublishDialog) proxy.result;
            } else {
                duPublishDialog = new DuPublishDialog();
                Bundle bundle = new Bundle();
                bundle.putParcelable("args_publish_bean", shareOrderPublishBean);
                Unit unit = Unit.INSTANCE;
                duPublishDialog.setArguments(bundle);
            }
            duPublishDialog.k(getChildFragmentManager());
        }
    }

    public final void s() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153929, new Class[0], Void.TYPE).isSupported) {
            if (this.i == null) {
                ObjectAnimator duration = ObjectAnimator.ofPropertyValuesHolder(_$_findCachedViewById(R.id.breatheView), PropertyValuesHolder.ofFloat("scaleX", 1.0f, 1.3f), PropertyValuesHolder.ofFloat("scaleY", 1.0f, 1.3f), PropertyValuesHolder.ofFloat("alpha", 1.0f, o5.i.f36333a)).setDuration(1000L);
                this.i = duration;
                if (duration != null) {
                    duration.setRepeatCount(-1);
                }
            }
            if (this.j == null) {
                ObjectAnimator duration2 = ObjectAnimator.ofFloat((ImageView) _$_findCachedViewById(R.id.firstShareBtnPic), "translationY", 0.0f, -((float) fi.b.b((float) 14)), 0.0f, -((float) fi.b.b((float) 9)), 0.0f, -((float) fi.b.b((float) 5)), 0.0f).setDuration(1300L);
                this.j = duration2;
                if (duration2 != null) {
                    duration2.setInterpolator(new AccelerateDecelerateInterpolator());
                }
                ObjectAnimator objectAnimator = this.j;
                if (objectAnimator != null) {
                    objectAnimator.addListener(new f(this));
                }
            }
            if (this.f15718g) {
                if (!this.o) {
                    this.o = true;
                    N();
                    return;
                }
                O();
            } else if (!this.p) {
                this.p = true;
                N();
            } else {
                O();
            }
        }
    }

    public final void t() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153949, new Class[0], Void.TYPE).isSupported) {
            ((SafeVideoView) _$_findCachedViewById(R.id.orderShareVideoView)).setVisibility(8);
            _$_findCachedViewById(R.id.surfaceBg).setVisibility(8);
            ((DuImageLoaderView) _$_findCachedViewById(R.id.playBtnIcon)).setVisibility(0);
            ((TextView) _$_findCachedViewById(R.id.playBtnText)).setText("预览");
            ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setBackgroundColor(getResources().getColor(R.color.black));
            ((LinearLayout) _$_findCachedViewById(R.id.playLayout)).setClickable(true);
            F(2);
        }
    }

    @SuppressLint({"DuPostDelayCheck"})
    public final void u(OrderInfoModel orderInfoModel) {
        String str;
        String obj;
        String obj2;
        if (!PatchProxy.proxy(new Object[]{orderInfoModel}, this, changeQuickRedirect, false, 153962, new Class[]{OrderInfoModel.class}, Void.TYPE).isSupported) {
            this.f = orderInfoModel;
            String receiverName = orderInfoModel.getReceiverName();
            String str2 = "*";
            if (receiverName == null || (str = StringsKt__StringsKt.trim((CharSequence) receiverName).toString()) == null) {
                str = str2;
            }
            this.d = str;
            StringBuilder h12 = a.f.h("By:");
            h12.append(this.d);
            ((TextView) _$_findCachedViewById(R.id.shareBuyerName)).setText(h12.toString());
            ((TextView) _$_findCachedViewById(R.id.orderProductOwner)).setText(this.d);
            if (!TextUtils.isEmpty(orderInfoModel.getGifUrl())) {
                ((co.c) ((OrderCutImageView) _$_findCachedViewById(R.id.shareProduct)).i(orderInfoModel.getGifUrl()).U(false).T(1).z().u(new ShareOrderFragment$initOrderData$1(this))).x();
            } else {
                ((co.c) ((OrderCutImageView) _$_findCachedViewById(R.id.shareProduct)).i(orderInfoModel.getSkuPic()).u(new ShareOrderFragment$initOrderData$2(this))).x();
            }
            ((TextView) _$_findCachedViewById(R.id.orderProductName)).setText(orderInfoModel.getSkuTitle());
            TextView textView = (TextView) _$_findCachedViewById(R.id.orderProductType);
            String skuProp = orderInfoModel.getSkuProp();
            String str3 = "--";
            if (skuProp == null) {
                skuProp = str3;
            }
            textView.setText(skuProp);
            String receiveTel = orderInfoModel.getReceiveTel();
            if (!(receiveTel == null || (obj2 = StringsKt__StringsKt.trim((CharSequence) receiveTel).toString()) == null)) {
                str2 = obj2;
            }
            this.e = str2;
            ((TextView) _$_findCachedViewById(R.id.phoneNo)).setText(this.e);
            TextView textView2 = (TextView) _$_findCachedViewById(R.id.orderTime);
            String createTime = orderInfoModel.getCreateTime();
            if (!(createTime == null || (obj = StringsKt__StringsKt.trim((CharSequence) createTime).toString()) == null)) {
                str3 = obj;
            }
            textView2.setText(str3);
            TextView textView3 = (TextView) _$_findCachedViewById(R.id.orderProductPrice);
            StringBuilder c5 = us.c.c(165);
            Integer actualAmount = orderInfoModel.getActualAmount();
            String str4 = null;
            if (actualAmount != null) {
                str4 = k.d(actualAmount.intValue(), false, null, 3);
            }
            c5.append(str4);
            textView3.setText(c5.toString());
            J(false);
        }
    }

    public final boolean v() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153973, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        return (Intrinsics.areEqual(((TextView) _$_findCachedViewById(R.id.phoneNo)).getText().toString(), this.e) ^ true) && (Intrinsics.areEqual(((TextView) _$_findCachedViewById(R.id.orderProductOwner)).getText().toString(), this.d) ^ true);
    }

    public final boolean w() {
        boolean z4 = false;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153979, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (((TextView) _$_findCachedViewById(R.id.tvLevel)).getVisibility() == 0) {
            z4 = true;
        }
        return !z4;
    }

    public final boolean x() {
        Integer actualAmount;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153978, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        String obj = ((TextView) _$_findCachedViewById(R.id.orderProductPrice)).getText().toString();
        StringBuilder c5 = us.c.c(165);
        OrderInfoModel orderInfoModel = this.f;
        String str = null;
        if (!(orderInfoModel == null || (actualAmount = orderInfoModel.getActualAmount()) == null)) {
            str = k.d(actualAmount.intValue(), false, null, 3);
        }
        c5.append(str);
        return !Intrinsics.areEqual(obj, c5.toString());
    }

    public final boolean y() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153976, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        String obj = ((TextView) _$_findCachedViewById(R.id.orderTime)).getText().toString();
        OrderInfoModel orderInfoModel = this.f;
        return !Intrinsics.areEqual(obj, orderInfoModel != null ? orderInfoModel.getCreateTime() : null);
    }

    public final boolean z() {
        GiftSingleInfo subOrderInfo;
        AdventureShowInfo adventureShowInfo;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 153970, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        GiftWrappingModel giftWrappingModel = this.f15721u;
        Integer showType = (giftWrappingModel == null || (subOrderInfo = giftWrappingModel.getSubOrderInfo()) == null || (adventureShowInfo = subOrderInfo.getAdventureShowInfo()) == null) ? null : adventureShowInfo.getShowType();
        return showType != null && showType.intValue() == 1 && fd.c.d(MallABTest.Keys.AB_SHARE_VIRTUAL, 0) == 1;
    }
}