package com.shizhuang.duapp.modules.product_detail.detailv3.views; import a.f; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Color; import android.os.Bundle; import android.os.Parcelable; import android.text.TextUtils; import android.util.ArrayMap; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import androidx.core.os.BundleKt; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import androidx.lifecycle.ViewModelLazy; 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.adapter.DuFragmentStateAdapter; import com.shizhuang.duapp.common.component.module.IModuleExposureObserver; import com.shizhuang.duapp.common.exposure.DuExposureHelper; import com.shizhuang.duapp.common.extension.ViewExtensionKt; import com.shizhuang.duapp.common.utils.livebus.PageEventBus; import com.shizhuang.duapp.filament.biz.FilamentABTest; import com.shizhuang.duapp.filament.biz.FilamentGpuUtil; import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions; import com.shizhuang.duapp.modules.du_mall_common.constant.MallABTest; import com.shizhuang.duapp.modules.du_mall_common.widget.NestScrollViewPager; import com.shizhuang.duapp.modules.du_mall_common.widget.pulllayout.EasyPullLayout; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmFocusImageItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmFocusMapItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmFocusMapModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmFocusMoreTipModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmImageItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmPanoramaItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmPropertyItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmSpuImageModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmThreeDimensionItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmVideoItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmWearCollocationFocusModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmWearCollocationItemModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmWearCollocationModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmWearCollocationProductModel; import com.shizhuang.duapp.modules.product_detail.detailv3.model.PmWearCollocationTrendModel; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderARController; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderPanoramaController; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderThreeDController; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderVideoController; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderWearCollocationController; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmPanoramaViewModel; import com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmThreeDimensionViewModel; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmBaseFocusFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmHeaderImageFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmHeaderPanoramaFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmHeaderThreeDFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmHeaderVideoFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.ui.fragment.PmHeaderWearCollocationFragment; import com.shizhuang.duapp.modules.product_detail.detailv3.vm.PmFocusMapViewModel; import com.shizhuang.duapp.modules.product_detail.detailv3.vm.PmViewModel; import com.shizhuang.duapp.modules.product_detail.detailv3.vm.PmViewModelExtKt; import com.shizhuang.duapp.modules.product_detail.model.RelationTrendTipsModel; import com.shizhuang.duapp.modules.product_detail.model.TalentAndRelationTrendModel; import df.r0; import i60.b; import j50.i; import j60.j; import j60.z; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.SortedMap; import kotlin.Lazy; import kotlin.Metadata; import kotlin.TuplesKt; import kotlin.Unit; import kotlin.collections.CollectionsKt__CollectionsKt; import kotlin.collections.CollectionsKt__IterablesKt; import kotlin.collections.CollectionsKt___CollectionsKt; import kotlin.collections.MapsKt__MapsKt; import kotlin.jvm.JvmOverloads; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Reflection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import q01.m; import q01.o; import r01.h; import u21.a; @Metadata(bv = {}, d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u0003:\u0001&B'\b\u0007\u0012\u0006\u0010 \u001a\u00020\u001f\u0012\n\b\u0002\u0010\"\u001a\u0004\u0018\u00010!\u0012\b\b\u0002\u0010#\u001a\u00020\t¢\u0006\u0004\b$\u0010%J\u0016\u0010\b\u001a\u00020\u00072\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004H\u0002J\b\u0010\n\u001a\u00020\tH\u0016J\b\u0010\u000b\u001a\u00020\tH\u0002R\u001b\u0010\u0011\u001a\u00020\f8BX\u0002¢\u0006\f\n\u0004\b\r\u0010\u000e\u001a\u0004\b\u000f\u0010\u0010R\u001b\u0010\u0016\u001a\u00020\u00128BX\u0002¢\u0006\f\n\u0004\b\u0013\u0010\u000e\u001a\u0004\b\u0014\u0010\u0015R\u001b\u0010\u001b\u001a\u00020\u00178BX\u0002¢\u0006\f\n\u0004\b\u0018\u0010\u000e\u001a\u0004\b\u0019\u0010\u001aR\u0014\u0010\u001e\u001a\u00020\t8VX\u0004¢\u0006\u0006\u001a\u0004\b\u001c\u0010\u001d¨\u0006'"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/detailv3/views/PmHeaderView;", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/views/PmBaseView;", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/model/PmFocusMapModel;", "Lcom/shizhuang/duapp/common/component/module/IModuleExposureObserver;", "", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/model/PmFocusMapItemModel;", "list", "", "setPagerData", "", "getLayoutId", "getDefaultIndex", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/vm/PmFocusMapViewModel;", "d", "Lkotlin/Lazy;", "getFocusMapViewModel", "()Lcom/shizhuang/duapp/modules/product_detail/detailv3/vm/PmFocusMapViewModel;", "focusMapViewModel", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/threedimesion/PmThreeDimensionViewModel;", "e", "getTdViewModel", "()Lcom/shizhuang/duapp/modules/product_detail/detailv3/threedimesion/PmThreeDimensionViewModel;", "tdViewModel", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/threedimesion/PmPanoramaViewModel;", "f", "getPanoramaViewModel", "()Lcom/shizhuang/duapp/modules/product_detail/detailv3/threedimesion/PmPanoramaViewModel;", "panoramaViewModel", "getBlockViewOffset", "()I", "blockViewOffset", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "HeaderPagerAdapter", "du_product_detail_release"}, k = 1, mv = {1, 4, 2}) /* compiled from: PmHeaderView.kt */ public final class PmHeaderView extends PmBaseView<PmFocusMapModel> implements IModuleExposureObserver { public static ChangeQuickRedirect changeQuickRedirect; public final Lazy d; public final Lazy e; public final Lazy f; /* renamed from: g reason: collision with root package name */ public PmHeaderVideoController f22307g; /* renamed from: h reason: collision with root package name */ public PmHeaderThreeDController f22308h; public PmHeaderPanoramaController i; public PmHeaderARController j; public PmHeaderWearCollocationController k; public final int l; public final HeaderPagerAdapter m; public int n; public boolean o; public boolean p; /* renamed from: q reason: collision with root package name */ public boolean f22309q; public PmFocusMoreTipModel r; public final List<PmFocusMapItemModel> s; public boolean t; /* renamed from: u reason: collision with root package name */ public HashMap f22310u; @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/detailv3/views/PmHeaderView$HeaderPagerAdapter;", "Lcom/shizhuang/duapp/common/adapter/DuFragmentStateAdapter;", "Lcom/shizhuang/duapp/modules/product_detail/detailv3/model/PmFocusMapItemModel;", "du_product_detail_release"}, k = 1, mv = {1, 4, 2}) /* compiled from: PmHeaderView.kt */ public final class HeaderPagerAdapter extends DuFragmentStateAdapter<PmFocusMapItemModel> { public static ChangeQuickRedirect changeQuickRedirect; public HeaderPagerAdapter(@NotNull FragmentManager fragmentManager) { super(fragmentManager); List<Fragment> fragments = fragmentManager.getFragments(); if (!fragments.isEmpty()) { FragmentTransaction beginTransaction = fragmentManager.beginTransaction(); for (Fragment fragment : fragments) { if (fragment instanceof PmBaseFocusFragment) { beginTransaction.remove(fragment); } } beginTransaction.commitAllowingStateLoss(); fragmentManager.executePendingTransactions(); } } @NotNull public final PmFocusMapItemModel a(int i) { PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 270971, new Class[]{Integer.TYPE}, PmFocusMapItemModel.class); return proxy.isSupported ? (PmFocusMapItemModel) proxy.result : (PmFocusMapItemModel) getList().get(i); } @Override // androidx.fragment.app.FragmentStatePagerAdapter @NotNull public Fragment getItem(int i) { Fragment fragment; PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 270972, new Class[]{Integer.TYPE}, Fragment.class); if (proxy.isSupported) { return (Fragment) proxy.result; } PmFocusMapItemModel a5 = a(i); Parcelable item = a5.getItem(); if (item instanceof PmFocusImageItemModel) { PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], PmHeaderImageFragment.f22234h, PmHeaderImageFragment.a.changeQuickRedirect, false, 270069, new Class[0], PmHeaderImageFragment.class); if (proxy2.isSupported) { fragment = (PmHeaderImageFragment) proxy2.result; } else { fragment = new PmHeaderImageFragment(); } } else if (item instanceof PmVideoItemModel) { PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], PmHeaderVideoFragment.r, PmHeaderVideoFragment.a.changeQuickRedirect, false, 270216, new Class[0], PmHeaderVideoFragment.class); if (proxy3.isSupported) { fragment = (PmHeaderVideoFragment) proxy3.result; } else { fragment = new PmHeaderVideoFragment(); } } else if (item instanceof PmThreeDimensionItemModel) { PatchProxyResult proxy4 = PatchProxy.proxy(new Object[0], PmHeaderThreeDFragment.m, PmHeaderThreeDFragment.a.changeQuickRedirect, false, 270156, new Class[0], PmHeaderThreeDFragment.class); if (proxy4.isSupported) { fragment = (PmHeaderThreeDFragment) proxy4.result; } else { fragment = new PmHeaderThreeDFragment(); } } else if (item instanceof PmPanoramaItemModel) { PatchProxyResult proxy5 = PatchProxy.proxy(new Object[0], PmHeaderPanoramaFragment.o, PmHeaderPanoramaFragment.a.changeQuickRedirect, false, 270109, new Class[0], PmHeaderPanoramaFragment.class); if (proxy5.isSupported) { fragment = (PmHeaderPanoramaFragment) proxy5.result; } else { fragment = new PmHeaderPanoramaFragment(); } } else if (item instanceof PmWearCollocationFocusModel) { PatchProxyResult proxy6 = PatchProxy.proxy(new Object[0], PmHeaderWearCollocationFragment.f22251h, PmHeaderWearCollocationFragment.a.changeQuickRedirect, false, 270268, new Class[0], PmHeaderWearCollocationFragment.class); if (proxy6.isSupported) { fragment = (PmHeaderWearCollocationFragment) proxy6.result; } else { fragment = new PmHeaderWearCollocationFragment(); } } else { throw new IllegalArgumentException("FocusPagerAdapter can not found type " + item); } fragment.setArguments(BundleKt.bundleOf(TuplesKt.to("arg_spuId", Long.valueOf(a5.getSpuId())), TuplesKt.to("arg_position", Integer.valueOf(i)), TuplesKt.to("arg_data", item), TuplesKt.to("arg_block_position", Integer.valueOf(PmHeaderView.this.getBlockPosition())))); return fragment; } @Override // androidx.viewpager.widget.PagerAdapter public int getItemPosition(@NotNull Object obj) { long j; PatchProxyResult proxy = PatchProxy.proxy(new Object[]{obj}, this, changeQuickRedirect, false, 270973, new Class[]{Object.class}, Integer.TYPE); if (proxy.isSupported) { return ((Integer) proxy.result).intValue(); } if (!(obj instanceof PmBaseFocusFragment)) { return -2; } PmBaseFocusFragment pmBaseFocusFragment = (PmBaseFocusFragment) obj; int m = pmBaseFocusFragment.m(); Parcelable l = pmBaseFocusFragment.l(); PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], pmBaseFocusFragment, PmBaseFocusFragment.changeQuickRedirect, false, 270035, new Class[0], Long.TYPE); if (proxy2.isSupported) { j = ((Long) proxy2.result).longValue(); } else { Bundle arguments = pmBaseFocusFragment.getArguments(); j = arguments != null ? arguments.getLong("arg_spuId") : 0; } PmFocusMapItemModel pmFocusMapItemModel = (PmFocusMapItemModel) CollectionsKt___CollectionsKt.getOrNull(getList(), m); if (!Intrinsics.areEqual(pmFocusMapItemModel != null ? pmFocusMapItemModel.getItem() : null, l) || pmFocusMapItemModel == null || pmFocusMapItemModel.getSpuId() != j) { h hVar = h.f37582a; hVar.a("PmHeaderView getItemPosition " + m + " POSITION_NONE"); return -2; } h hVar2 = h.f37582a; hVar2.a("PmHeaderView getItemPosition " + m + " POSITION_UNCHANGED"); return -1; } } @JvmOverloads public PmHeaderView(@NotNull Context context) { this(context, null, 0, 6); } @JvmOverloads public PmHeaderView(@NotNull Context context, @Nullable AttributeSet attributeSet) { this(context, attributeSet, 0, 4); } /* JADX INFO: this call moved to the top of the method (can break code semantics) */ public /* synthetic */ PmHeaderView(Context context, AttributeSet attributeSet, int i3, int i12) { this(context, (i12 & 2) != 0 ? null : attributeSet, (i12 & 4) != 0 ? 0 : i3); } private final PmPanoramaViewModel getPanoramaViewModel() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270922, new Class[0], PmPanoramaViewModel.class); return (PmPanoramaViewModel) (proxy.isSupported ? proxy.result : this.f.getValue()); } private final PmThreeDimensionViewModel getTdViewModel() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270921, new Class[0], PmThreeDimensionViewModel.class); return (PmThreeDimensionViewModel) (proxy.isSupported ? proxy.result : this.e.getValue()); } private final void setPagerData(List<PmFocusMapItemModel> list) { if (!PatchProxy.proxy(new Object[]{list}, this, changeQuickRedirect, false, 270933, new Class[]{List.class}, Void.TYPE).isSupported) { this.m.setItems(list); SortedMap<Integer, PmPropertyItemModel> value = getViewModel$du_product_detail_release().getSelectedProperties().getValue(); if (value == null) { value = MapsKt__MapsKt.emptyMap(); } b(value, getDefaultIndex()); l(((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).getCurrentItem()); m(); this.f22309q = false; } } public View _$_findCachedViewById(int i3) { PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 270961, new Class[]{Integer.TYPE}, View.class); if (proxy.isSupported) { return (View) proxy.result; } if (this.f22310u == null) { this.f22310u = new HashMap(); } View view = (View) this.f22310u.get(Integer.valueOf(i3)); if (view != null) { return view; } View findViewById = findViewById(i3); this.f22310u.put(Integer.valueOf(i3), findViewById); return findViewById; } /* JADX WARNING: Removed duplicated region for block: B:40:0x00ef */ /* JADX WARNING: Removed duplicated region for block: B:41:0x00f3 */ public final void b(Map<Integer, PmPropertyItemModel> map, int i3) { int i12; boolean z; boolean z4; boolean z5 = true; if (!PatchProxy.proxy(new Object[]{map, new Integer(i3)}, this, changeQuickRedirect, false, 270938, new Class[]{Map.class, Integer.TYPE}, Void.TYPE).isSupported) { Collection<PmPropertyItemModel> values = map.values(); ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(values, 10)); Iterator<T> it2 = values.iterator(); while (it2.hasNext()) { arrayList.add(Long.valueOf(it2.next().getPropertyValueId())); } if (!getViewModel$du_product_detail_release().b0()) { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270941, new Class[0], Boolean.TYPE); if (proxy.isSupported) { z = ((Boolean) proxy.result).booleanValue(); } else { ArrayList list = this.m.getList(); if (!(list instanceof Collection) || !list.isEmpty()) { Iterator it3 = list.iterator(); while (true) { if (!it3.hasNext()) { break; } PmFocusMapItemModel pmFocusMapItemModel = (PmFocusMapItemModel) it3.next(); if ((pmFocusMapItemModel.getItem() instanceof PmVideoItemModel) || (pmFocusMapItemModel.getItem() instanceof PmThreeDimensionItemModel) || (pmFocusMapItemModel.getItem() instanceof PmPanoramaItemModel)) { z4 = true; continue; } else { z4 = false; continue; } if (z4) { break; } } z = z5; } z5 = false; z = z5; } if (z) { i12 = 0; if (i12 < 0) { c(i12, false); return; } else if (i3 >= 0) { c(i3, false); return; } else { return; } } } Iterator it4 = this.m.getList().iterator(); i12 = 0; while (true) { if (!it4.hasNext()) { i12 = -1; break; } else if (arrayList.contains(Long.valueOf(((PmFocusMapItemModel) it4.next()).getPropertyValueId()))) { break; } else { i12++; } } if (i12 < 0) { } } } public final void c(int i3, boolean z) { if (!PatchProxy.proxy(new Object[]{new Integer(i3), new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 270939, new Class[]{Integer.TYPE, Boolean.TYPE}, Void.TYPE).isSupported) { h hVar = h.f37582a; hVar.a("PmHeaderView changePosition: " + i3); if (i3 >= 0 && i3 <= this.m.getCount() - 1) { this.n = i3; ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).setCurrentItem(i3, z); if (!((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).isAttachedToWindow()) { ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).requestLayout(); } } } } /* JADX WARNING: Code restructure failed: missing block: B:20:0x0050, code lost: if ((((android.widget.LinearLayout) _$_findCachedViewById(com.shizhuang.duapp.R.id.layArButton)).getVisibility() == 0) != false) goto L_0x0052; */ public final void d() { boolean z = false; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270936, new Class[0], Void.TYPE).isSupported) { PmHeaderPanoramaController pmHeaderPanoramaController = this.i; if (pmHeaderPanoramaController != null) { pmHeaderPanoramaController.c(true); } PmHeaderThreeDController pmHeaderThreeDController = this.f22308h; if (pmHeaderThreeDController != null) { pmHeaderThreeDController.c(true); } if (this.f22307g != null) { if (!(((LinearLayout) _$_findCachedViewById(R.id.lay3dButton)).getVisibility() == 0)) { } z = true; PmHeaderVideoController pmHeaderVideoController = this.f22307g; if (pmHeaderVideoController != null) { pmHeaderVideoController.c(z); } } } } public final void e() { boolean z = false; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270935, new Class[0], Void.TYPE).isSupported) { EasyPullLayout easyPullLayout = (EasyPullLayout) _$_findCachedViewById(R.id.itemPullLayout); PmFocusMoreTipModel pmFocusMoreTipModel = this.r; if (pmFocusMoreTipModel != null && pmFocusMoreTipModel != null && pmFocusMoreTipModel.getHasMore() && (!getViewModel$du_product_detail_release().W() || getViewModel$du_product_detail_release().Y())) { z = true; } easyPullLayout.setEnabled(z); } } /* JADX WARNING: Removed duplicated region for block: B:53:0x0221 */ /* JADX WARNING: Removed duplicated region for block: B:58:? A[RETURN, SYNTHETIC] */ public final void f() { int i3; int i12; a aVar; Object[] objArr; ChangeQuickRedirect changeQuickRedirect2; Class[] clsArr; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270954, new Class[0], Void.TYPE).isSupported) { if (((LinearLayout) _$_findCachedViewById(R.id.layArButton)).getVisibility() == 0) { if (this.j.g() == PmHeaderARController.ARType.TYPE_WEAR) { this.p = true; i3 = 3; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270956, new Class[0], Void.TYPE).isSupported) { a aVar2 = a.f38776a; Long valueOf = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf2 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!PatchProxy.proxy(new Object[]{"AR试戴", valueOf, valueOf2}, aVar2, a.changeQuickRedirect, false, 282474, new Class[]{Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { b bVar = b.f33293a; ArrayMap c5 = g00.a.c(8, "block_content_title", "AR试戴", "spu_id", valueOf); c5.put(MallABTest.Keys.PRODUCT_DETAIL_TYPE, valueOf2); bVar.b("trade_product_detail_block_exposure", "400000", "1209", c5); } } } else { i3 = 3; } if (this.j.g() == PmHeaderARController.ARType.TYPE_MAKE_UP) { this.p = true; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270955, new Class[0], Void.TYPE).isSupported) { a aVar3 = a.f38776a; Long valueOf3 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Float valueOf4 = Float.valueOf(getBlockScreenRatio()); Integer valueOf5 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); Object[] objArr2 = new Object[i3]; objArr2[0] = valueOf3; objArr2[1] = valueOf4; objArr2[2] = valueOf5; ChangeQuickRedirect changeQuickRedirect3 = a.changeQuickRedirect; Class[] clsArr2 = new Class[i3]; clsArr2[0] = Object.class; clsArr2[1] = Object.class; clsArr2[2] = Object.class; if (!PatchProxy.proxy(objArr2, aVar3, changeQuickRedirect3, false, 282477, clsArr2, Void.TYPE).isSupported) { b bVar2 = b.f33293a; ArrayMap arrayMap = new ArrayMap(8); arrayMap.put("spu_id", valueOf3); arrayMap.put("screen_ratio", valueOf4); arrayMap.put(MallABTest.Keys.PRODUCT_DETAIL_TYPE, valueOf5); bVar2.b("trade_product_detail_block_exposure", "400000", "508", arrayMap); } } } if (this.j.g() == PmHeaderARController.ARType.TYPE_WEAR_SHOE) { this.p = true; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270957, new Class[0], Void.TYPE).isSupported) { if (((LinearLayout) _$_findCachedViewById(R.id.layVideoButton)).getVisibility() == 0) { if (((LinearLayout) _$_findCachedViewById(R.id.lay3dButton)).getVisibility() == 0) { i12 = 2; aVar = a.f38776a; Integer valueOf6 = Integer.valueOf(i12 + 1); Long valueOf7 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf8 = Integer.valueOf(getBlockPosition()); Integer valueOf9 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); objArr = new Object[5]; objArr[0] = "AR试穿"; objArr[1] = valueOf6; objArr[2] = valueOf7; objArr[i3] = valueOf8; objArr[4] = valueOf9; changeQuickRedirect2 = a.changeQuickRedirect; clsArr = new Class[5]; clsArr[0] = Object.class; clsArr[1] = Object.class; clsArr[2] = Object.class; clsArr[i3] = Object.class; clsArr[4] = Object.class; if (!PatchProxy.proxy(objArr, aVar, changeQuickRedirect2, false, 282476, clsArr, Void.TYPE).isSupported) { b bVar3 = b.f33293a; ArrayMap b = f.b(8, "block_content_title", "AR试穿", "block_content_position", valueOf6); b.put("spu_id", valueOf7); b.put("block_position", valueOf8); b.put(MallABTest.Keys.PRODUCT_DETAIL_TYPE, valueOf9); bVar3.b("trade_product_detail_block_exposure", "400000", "27", b); return; } return; } } if (!(((LinearLayout) _$_findCachedViewById(R.id.layVideoButton)).getVisibility() == 0)) { if (!(((LinearLayout) _$_findCachedViewById(R.id.lay3dButton)).getVisibility() == 0)) { i12 = 0; aVar = a.f38776a; Integer valueOf62 = Integer.valueOf(i12 + 1); Long valueOf72 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf82 = Integer.valueOf(getBlockPosition()); Integer valueOf92 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); objArr = new Object[5]; objArr[0] = "AR试穿"; objArr[1] = valueOf62; objArr[2] = valueOf72; objArr[i3] = valueOf82; objArr[4] = valueOf92; changeQuickRedirect2 = a.changeQuickRedirect; clsArr = new Class[5]; clsArr[0] = Object.class; clsArr[1] = Object.class; clsArr[2] = Object.class; clsArr[i3] = Object.class; clsArr[4] = Object.class; if (!PatchProxy.proxy(objArr, aVar, changeQuickRedirect2, false, 282476, clsArr, Void.TYPE).isSupported) { } } } i12 = 1; aVar = a.f38776a; Integer valueOf622 = Integer.valueOf(i12 + 1); Long valueOf722 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf822 = Integer.valueOf(getBlockPosition()); Integer valueOf922 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); objArr = new Object[5]; objArr[0] = "AR试穿"; objArr[1] = valueOf622; objArr[2] = valueOf722; objArr[i3] = valueOf822; objArr[4] = valueOf922; changeQuickRedirect2 = a.changeQuickRedirect; clsArr = new Class[5]; clsArr[0] = Object.class; clsArr[1] = Object.class; clsArr[2] = Object.class; clsArr[i3] = Object.class; clsArr[4] = Object.class; if (!PatchProxy.proxy(objArr, aVar, changeQuickRedirect2, false, 282476, clsArr, Void.TYPE).isSupported) { } } } } } } public final void g() { String str; String str2; String str3; String str4; String str5; String str6; PmVideoItemModel f12; Long l12; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270951, new Class[0], Void.TYPE).isSupported) { f(); String str7 = "400000"; String str8 = "trade_product_detail_block_exposure"; if (((LinearLayout) _$_findCachedViewById(R.id.lay3dButton)).getVisibility() == 0) { str2 = ""; if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270958, new Class[0], Void.TYPE).isSupported) { Iterator it2 = this.m.getList().iterator(); int i3 = 0; while (true) { if (!it2.hasNext()) { i3 = -1; break; } PmFocusMapItemModel pmFocusMapItemModel = (PmFocusMapItemModel) it2.next(); if ((pmFocusMapItemModel.getItem() instanceof PmPanoramaItemModel) || (pmFocusMapItemModel.getItem() instanceof PmThreeDimensionItemModel)) { break; } i3++; } PmHeaderThreeDController pmHeaderThreeDController = this.f22308h; if (pmHeaderThreeDController != null) { l12 = Long.valueOf(pmHeaderThreeDController.g()); } else { PmHeaderPanoramaController pmHeaderPanoramaController = this.i; l12 = pmHeaderPanoramaController != null ? Long.valueOf(pmHeaderPanoramaController.i()) : null; } long longValue = l12 != null ? l12.longValue() : 0; a aVar = a.f38776a; Integer valueOf = Integer.valueOf(i3 + 1); Long valueOf2 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Float valueOf3 = Float.valueOf(getBlockScreenRatio()); Integer valueOf4 = Integer.valueOf(getBlockPosition()); Long valueOf5 = Long.valueOf(longValue); Integer valueOf6 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!PatchProxy.proxy(new Object[]{str2, "3D空间", valueOf, valueOf2, str2, valueOf3, valueOf4, valueOf5, valueOf6}, aVar, a.changeQuickRedirect, false, 282469, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { b bVar = b.f33293a; ArrayMap e6 = g.a.e(8, "block_content_id", str2, "block_content_title", "3D空间"); e6.put("block_content_position", valueOf); str = "spu_id"; e6.put(str, valueOf2); e6.put("block_content_cspuid", str2); e6.put("screen_ratio", valueOf3); e6.put("block_position", valueOf4); e6.put("property_value_id", valueOf5); str3 = MallABTest.Keys.PRODUCT_DETAIL_TYPE; e6.put(str3, valueOf6); str8 = str8; str7 = str7; bVar.b(str8, str7, "2085", e6); } } str = "spu_id"; str3 = MallABTest.Keys.PRODUCT_DETAIL_TYPE; str8 = str8; str7 = str7; } else { str = "spu_id"; str2 = ""; str3 = MallABTest.Keys.PRODUCT_DETAIL_TYPE; } if (((LinearLayout) _$_findCachedViewById(R.id.layVideoButton)).getVisibility() == 0) { if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270959, new Class[0], Void.TYPE).isSupported) { a aVar2 = a.f38776a; String str9 = Intrinsics.areEqual(getFocusMapViewModel().d().getValue(), Boolean.TRUE) ? "开始播放" : "暂停播放"; PmHeaderVideoController pmHeaderVideoController = this.f22307g; String url = (pmHeaderVideoController == null || (f12 = pmHeaderVideoController.f()) == null) ? null : f12.getUrl(); if (url == null) { url = str2; } Long valueOf7 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Float valueOf8 = Float.valueOf(getBlockScreenRatio()); Integer valueOf9 = Integer.valueOf(getBlockPosition()); Integer valueOf10 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!PatchProxy.proxy(new Object[]{str2, str9, "1", url, valueOf7, str2, valueOf8, valueOf9, 0, valueOf10}, aVar2, a.changeQuickRedirect, false, 282279, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { b bVar2 = b.f33293a; ArrayMap e12 = g.a.e(8, "block_content_id", str2, "block_content_title", str9); e12.put("block_content_position", "1"); e12.put("jump_content_url", url); e12.put(str, valueOf7); e12.put("block_content_cspuid", str2); e12.put("screen_ratio", valueOf8); e12.put("block_position", valueOf9); e12.put("property_value_id", 0); str5 = str3; e12.put(str5, valueOf10); str4 = str8; str6 = str7; bVar2.b(str4, str6, "2084", e12); } } str4 = str8; str6 = str7; str5 = str3; } else { str4 = str8; str6 = str7; str5 = str3; } if (((LinearLayout) _$_findCachedViewById(R.id.layWearButton)).isShown() && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270960, new Class[0], Void.TYPE).isSupported) { a aVar3 = a.f38776a; Long valueOf11 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf12 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!PatchProxy.proxy(new Object[]{valueOf11, valueOf12}, aVar3, a.changeQuickRedirect, false, 282217, new Class[]{Object.class, Object.class}, Void.TYPE).isSupported) { b.f33293a.b(str4, str6, "3023", g.a.c(8, str, valueOf11, str5, valueOf12)); } } } } @Override // com.shizhuang.duapp.modules.product_detail.detailv3.views.PmBaseView public int getBlockViewOffset() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270923, new Class[0], Integer.TYPE); if (proxy.isSupported) { return ((Integer) proxy.result).intValue(); } if (getViewModel$du_product_detail_release().W()) { return 0; } return r0.i(getContext()); } public final int getDefaultIndex() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270940, new Class[0], Integer.TYPE); if (proxy.isSupported) { return ((Integer) proxy.result).intValue(); } return 0; } public final PmFocusMapViewModel getFocusMapViewModel() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270920, new Class[0], PmFocusMapViewModel.class); return (PmFocusMapViewModel) (proxy.isSupported ? proxy.result : this.d.getValue()); } @Override // com.shizhuang.duapp.common.component.module.AbsModuleView public int getLayoutId() { PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270924, new Class[0], Integer.TYPE); return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_pm_header_view; } /* JADX WARNING: Code restructure failed: missing block: B:19:0x00e3, code lost: if (r0 != null) goto L_0x00e8; */ /* JADX WARNING: Code restructure failed: missing block: B:29:0x0106, code lost: if (r1 != null) goto L_0x010b; */ public final void h(String str) { String str2; String str3; String str4; String str5; Class cls; String str6; Object obj; String str7; PmWearCollocationItemModel pmWearCollocationItemModel; if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 270952, new Class[]{String.class}, Void.TYPE).isSupported) { int currentItem = ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).getCurrentItem(); PmFocusMapItemModel pmFocusMapItemModel = (PmFocusMapItemModel) CollectionsKt___CollectionsKt.getOrNull(this.m.getList(), currentItem); if (pmFocusMapItemModel != null) { Parcelable item = pmFocusMapItemModel.getItem(); if (item instanceof PmWearCollocationFocusModel) { PmWearCollocationFocusModel pmWearCollocationFocusModel = (PmWearCollocationFocusModel) item; if (!PatchProxy.proxy(new Object[]{pmWearCollocationFocusModel, new Integer(currentItem)}, this, changeQuickRedirect, false, 270953, new Class[]{PmWearCollocationFocusModel.class, Integer.TYPE}, Void.TYPE).isSupported) { if (pmWearCollocationFocusModel.getViewType() != 4) { List<PmWearCollocationItemModel> wearInfoList = pmWearCollocationFocusModel.getWearCollocation().getWearInfoList(); if (wearInfoList != null) { ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(wearInfoList, 10)); Iterator<T> it2 = wearInfoList.iterator(); while (it2.hasNext()) { arrayList.add(Long.valueOf(it2.next().getId())); } str4 = CollectionsKt___CollectionsKt.joinToString$default(arrayList, ",", null, null, 0, null, null, 62, null); } else { str4 = null; } } str4 = ""; if (pmWearCollocationFocusModel.getViewType() == 1) { List<PmWearCollocationItemModel> wearInfoList2 = pmWearCollocationFocusModel.getWearCollocation().getWearInfoList(); str5 = (wearInfoList2 == null || (pmWearCollocationItemModel = (PmWearCollocationItemModel) CollectionsKt___CollectionsKt.firstOrNull(wearInfoList2)) == null) ? null : pmWearCollocationItemModel.getSpuSkuString(); } str5 = ""; int viewType = pmWearCollocationFocusModel.getViewType(); int i3 = viewType != 1 ? viewType != 4 ? 2 : 3 : 1; a aVar = a.f38776a; int i12 = currentItem + 1; Integer valueOf = Integer.valueOf(i12); Long valueOf2 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf3 = Integer.valueOf(i3); Integer valueOf4 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (PatchProxy.proxy(new Object[]{str4, valueOf, valueOf2, str5, valueOf3, valueOf4}, aVar, a.changeQuickRedirect, false, 282209, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { cls = Object.class; str6 = "400000"; obj = MallABTest.Keys.PRODUCT_DETAIL_TYPE; } else { b bVar = b.f33293a; cls = Object.class; ArrayMap b = f.b(8, "block_content_id", str4, "block_content_position", valueOf); b.put("spu_id", valueOf2); b.put("target_spu_id", str5); b.put("appear_type", valueOf3); obj = MallABTest.Keys.PRODUCT_DETAIL_TYPE; b.put(obj, valueOf4); str6 = "400000"; bVar.b("trade_product_detail_block_exposure", str6, "3032", b); } if (pmWearCollocationFocusModel.getViewType() == 1) { List<PmWearCollocationItemModel> wearInfoList3 = pmWearCollocationFocusModel.getWearCollocation().getWearInfoList(); PmWearCollocationItemModel pmWearCollocationItemModel2 = wearInfoList3 != null ? (PmWearCollocationItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) wearInfoList3) : null; if (pmWearCollocationItemModel2 != null && pmWearCollocationItemModel2.getAltogetherBuy()) { Long valueOf5 = Long.valueOf(pmWearCollocationItemModel2.getId()); Integer valueOf6 = Integer.valueOf(i12); List<PmWearCollocationProductModel> collocation = pmWearCollocationItemModel2.getCollocation(); if (collocation != null) { ArrayList arrayList2 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(collocation, 10)); Iterator<T> it3 = collocation.iterator(); while (it3.hasNext()) { arrayList2.add(Long.valueOf(it3.next().getSkuId())); } str7 = CollectionsKt___CollectionsKt.joinToString$default(arrayList2, ",", null, null, 0, null, null, 62, null); } else { str7 = null; } if (str7 == null) { str7 = ""; } String discountLabel = pmWearCollocationItemModel2.getDiscountLabel(); if (discountLabel == null) { discountLabel = ""; } Long valueOf7 = Long.valueOf(getViewModel$du_product_detail_release().getSpuId()); Integer valueOf8 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!PatchProxy.proxy(new Object[]{valueOf5, valueOf6, str7, discountLabel, valueOf7, 1, valueOf8}, aVar, a.changeQuickRedirect, false, 282229, new Class[]{cls, cls, cls, cls, cls, cls, cls}, Void.TYPE).isSupported) { b bVar2 = b.f33293a; ArrayMap c5 = g.a.c(8, "block_content_id", valueOf5, "block_content_position", valueOf6); c5.put("sku_id", str7); c5.put("button_title", discountLabel); c5.put("page_content_id", valueOf7); c5.put("appear_type", 1); c5.put(obj, valueOf8); bVar2.b("trade_outfit_purchase_exposure", str6, "3032", c5); return; } return; } return; } return; } return; } Parcelable item2 = pmFocusMapItemModel.getItem(); if (item2 instanceof PmVideoItemModel) { str2 = PushConstants.PUSH_TYPE_UPLOAD_LOG; } else if (item2 instanceof PmThreeDimensionItemModel) { str2 = PushConstants.PUSH_TYPE_WITHDRAW_NOTIFICATION; } else if (item2 instanceof PmFocusImageItemModel) { str2 = ((PmFocusImageItemModel) pmFocusMapItemModel.getItem()).getDataType(); } else { str2 = ""; } a aVar2 = a.f38776a; String valueOf9 = String.valueOf(currentItem + 1); String valueOf10 = String.valueOf(getViewModel$du_product_detail_release().getSpuId()); String valueOf11 = String.valueOf(getBlockScreenRatio()); String valueOf12 = String.valueOf(getBlockPosition()); String valueOf13 = String.valueOf(pmFocusMapItemModel.getPropertyValueId()); Integer valueOf14 = Integer.valueOf(getViewModel$du_product_detail_release().k().O()); if (!(pmFocusMapItemModel.getItem() instanceof PmFocusImageItemModel) || (str3 = ((PmFocusImageItemModel) pmFocusMapItemModel.getItem()).getItem().getPropertyValue()) == null) { str3 = ""; } if (!PatchProxy.proxy(new Object[]{str, valueOf9, valueOf10, str2, valueOf11, valueOf12, valueOf13, valueOf14, str3}, aVar2, a.changeQuickRedirect, false, 282496, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) { b bVar3 = b.f33293a; ArrayMap e6 = g.a.e(8, "block_content_title", str, "block_content_position", valueOf9); e6.put("spu_id", valueOf10); e6.put("block_element_type", str2); e6.put("screen_ratio", valueOf11); e6.put("block_position", valueOf12); e6.put("property_value_id", valueOf13); e6.put(MallABTest.Keys.PRODUCT_DETAIL_TYPE, valueOf14); e6.put("properties_label", str3); bVar3.b("trade_product_detail_block_exposure", "400000", "13", e6); } } } } public final String i(boolean z) { String str; PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 270928, new Class[]{Boolean.TYPE}, String.class); if (proxy.isSupported) { return (String) proxy.result; } StringBuilder sb2 = new StringBuilder(); sb2.append(z ? "释放查看" : "滑动查看"); PmFocusMoreTipModel pmFocusMoreTipModel = this.r; if (pmFocusMoreTipModel == null || (str = pmFocusMoreTipModel.getTips()) == null) { str = "详情"; } sb2.append(str); return sb2.toString(); } public final boolean j(long j12) { boolean z; boolean z4; PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Long(j12)}, this, changeQuickRedirect, false, 270937, new Class[]{Long.TYPE}, Boolean.TYPE); if (proxy.isSupported) { return ((Boolean) proxy.result).booleanValue(); } if (!getViewModel$du_product_detail_release().k().z() || j12 == 0) { return false; } List<PmFocusMapItemModel> list = this.s; if (!(list instanceof Collection) || !list.isEmpty()) { Iterator<T> it2 = list.iterator(); while (true) { if (!it2.hasNext()) { break; } T next = it2.next(); if (!(next.getItem() instanceof PmFocusImageItemModel) || next.getPropertyValueId() != j12) { z4 = false; continue; } else { z4 = true; continue; } if (z4) { z = true; break; } } } z = false; if (!z) { return false; } List<PmFocusMapItemModel> list2 = this.s; ArrayList arrayList = new ArrayList(); for (T t4 : list2) { T t12 = t4; if (!(t12.getItem() instanceof PmFocusImageItemModel) || t12.getPropertyValueId() == j12) { arrayList.add(t4); } } if (getViewModel$du_product_detail_release().b0()) { this.f22309q = true; } setPagerData(arrayList); if (getViewModel$du_product_detail_release().b0()) { h(""); this.f22309q = false; } return true; } public final void k(TalentAndRelationTrendModel talentAndRelationTrendModel, PmWearCollocationModel pmWearCollocationModel) { String str; int i3 = 2; boolean z = false; if (!PatchProxy.proxy(new Object[]{talentAndRelationTrendModel, pmWearCollocationModel}, this, changeQuickRedirect, false, 270927, new Class[]{TalentAndRelationTrendModel.class, PmWearCollocationModel.class}, Void.TYPE).isSupported) { PmFocusMoreTipModel pmFocusMoreTipModel = null; pmFocusMoreTipModel = null; String str2 = null; if (pmWearCollocationModel == null || pmWearCollocationModel.isEmpty()) { if (getViewModel$du_product_detail_release().k().q()) { pmFocusMoreTipModel = new PmFocusMoreTipModel(true, "项目详情", "项目详情", 1); } else if (talentAndRelationTrendModel != null) { String str3 = ""; if (talentAndRelationTrendModel.getTotal() > getViewModel$du_product_detail_release().k().i()) { i3 = 3; RelationTrendTipsModel addRelationTrendTips = talentAndRelationTrendModel.getAddRelationTrendTips(); String tips = addRelationTrendTips != null ? addRelationTrendTips.getTips() : null; if (tips == null) { tips = str3; } if (tips.length() > 0) { z = true; } str = (String) i.b(z, tips, i.b(getViewModel$du_product_detail_release().k().B(), "穿搭精选", "开箱精选")); } else { str = "图文详情"; } RelationTrendTipsModel addRelationTrendTips2 = talentAndRelationTrendModel.getAddRelationTrendTips(); if (addRelationTrendTips2 != null) { str2 = addRelationTrendTips2.getEntryTips(); } if (str2 != null) { str3 = str2; } pmFocusMoreTipModel = new PmFocusMoreTipModel(true, str, str3, i3); } } this.r = pmFocusMoreTipModel; e(); } } public final void l(int i3) { int i12 = 0; if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 270945, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) { Parcelable parcelable = null; PmFocusMapItemModel a5 = (i3 < 0 || i3 >= this.m.getCount()) ? null : this.m.a(i3); if (a5 != null) { parcelable = a5.getItem(); } PmHeaderPanoramaController pmHeaderPanoramaController = this.i; if (pmHeaderPanoramaController != null) { boolean z = parcelable instanceof PmPanoramaItemModel; if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, pmHeaderPanoramaController, PmHeaderPanoramaController.changeQuickRedirect, false, 269414, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) { h hVar = h.f37582a; hVar.a("PmHeaderPanoramaController onPageSelected " + z); pmHeaderPanoramaController.i = z; } } boolean z4 = !(parcelable instanceof PmVideoItemModel) && !(parcelable instanceof PmWearCollocationFocusModel); ((LinearLayout) _$_findCachedViewById(R.id.layBottomView)).setVisibility(z4 ? 0 : 8); ((TextView) _$_findCachedViewById(R.id.itemIndicator)).setVisibility((parcelable instanceof PmWearCollocationFocusModel) ^ true ? 0 : 8); d(); if (z4 && !this.o) { g(); } this.o = z4; if (parcelable instanceof PmFocusImageItemModel) { z.b.a((TextView) _$_findCachedViewById(R.id.itemPropertyValue), fi.b.b((float) 11), Integer.valueOf(Color.parseColor("#B3FFFFFF"))); TextView textView = (TextView) _$_findCachedViewById(R.id.itemPropertyValue); PmFocusImageItemModel pmFocusImageItemModel = (PmFocusImageItemModel) parcelable; String propertyValue = pmFocusImageItemModel.getItem().getPropertyValue(); if (!(!(propertyValue == null || propertyValue.length() == 0))) { i12 = 8; } textView.setVisibility(i12); TextView textView2 = (TextView) _$_findCachedViewById(R.id.itemPropertyValue); j jVar = j.f34200a; String propertyValue2 = pmFocusImageItemModel.getItem().getPropertyValue(); if (propertyValue2 == null) { propertyValue2 = ""; } textView2.setText(jVar.a(propertyValue2, getViewModel$du_product_detail_release().k().m())); return; } ((TextView) _$_findCachedViewById(R.id.itemPropertyValue)).setVisibility(8); } } @SuppressLint({"SetTextI18n"}) public final void m() { if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270943, new Class[0], Void.TYPE).isSupported) { StringBuilder sb2 = new StringBuilder(); sb2.append(((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).getCurrentItem() + 1); sb2.append('/'); sb2.append(this.m.getCount()); ((TextView) _$_findCachedViewById(R.id.itemIndicator)).setText(sb2.toString()); } } public void onAttachedToWindow() { if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270947, new Class[0], Void.TYPE).isSupported) { super.onAttachedToWindow(); getFocusMapViewModel().b().postValue(Boolean.TRUE); } } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX DEBUG: Multi-variable search result rejected for r3v6, resolved type: com.shizhuang.duapp.modules.product_detail.detailv3.threedimesion.PmHeaderWearCollocationController */ /* JADX WARN: Multi-variable type inference failed */ @Override // com.shizhuang.duapp.modules.product_detail.detailv3.views.PmBaseView, com.shizhuang.duapp.common.component.module.AbsModuleView public void onChanged(PmFocusMapModel pmFocusMapModel) { boolean z; PmWearCollocationTrendModel pmWearCollocationTrendModel; PmWearCollocationTrendModel pmWearCollocationTrendModel2; Long l12; PmThreeDimensionItemModel threeDimension; PmThreeDimensionItemModel pmThreeDimensionItemModel; PmFocusMapModel pmFocusMapModel2 = pmFocusMapModel; boolean z4 = true; if (!PatchProxy.proxy(new Object[]{pmFocusMapModel2}, this, changeQuickRedirect, false, 270932, new Class[]{PmFocusMapModel.class}, Void.TYPE).isSupported) { super.onChanged(pmFocusMapModel2); AppCompatActivity a5 = a(); ArrayList arrayList = new ArrayList(); PmSpuImageModel spuImage = pmFocusMapModel2.getSpuImage(); long spuId = getViewModel$du_product_detail_release().getSpuId(); PmHeaderVideoController pmHeaderVideoController = this.f22307g; if (pmHeaderVideoController != null) { pmHeaderVideoController.onDestroy(); } if (spuImage.getVideo() != null) { arrayList.add(new PmFocusMapItemModel(spuImage.getVideo(), 0, spuId, 2, null)); PmHeaderVideoController pmHeaderVideoController2 = new PmHeaderVideoController(a5, spuImage.getVideo(), this); pmHeaderVideoController2.d(arrayList.size()); Unit unit = Unit.INSTANCE; this.f22307g = pmHeaderVideoController2; } else { this.f22307g = null; } PmHeaderPanoramaController pmHeaderPanoramaController = this.i; if (pmHeaderPanoramaController != null) { pmHeaderPanoramaController.onDestroy(); } if (!spuImage.isSupportPanorama() || spuImage.getPanorama() == null) { this.i = null; } else { arrayList.add(new PmFocusMapItemModel(spuImage.getPanorama(), 0, spuId, 2, null)); PmHeaderPanoramaController pmHeaderPanoramaController2 = new PmHeaderPanoramaController(a5, this, spuId, spuImage.getPanorama()); pmHeaderPanoramaController2.d(arrayList.size()); Unit unit2 = Unit.INSTANCE; this.i = pmHeaderPanoramaController2; } PmHeaderThreeDController pmHeaderThreeDController = this.f22308h; if (pmHeaderThreeDController != null) { pmHeaderThreeDController.onDestroy(); } PatchProxyResult proxy = PatchProxy.proxy(new Object[]{spuImage}, this, changeQuickRedirect, false, 270934, new Class[]{PmSpuImageModel.class}, Boolean.TYPE); if (proxy.isSupported) { z = ((Boolean) proxy.result).booleanValue(); } else { PmThreeDimensionItemModel threeDimension2 = spuImage.getThreeDimension(); if (!TextUtils.isEmpty(threeDimension2 != null ? threeDimension2.getObjFileUrl() : null)) { PmThreeDimensionItemModel threeDimension3 = spuImage.getThreeDimension(); if (!TextUtils.isEmpty(threeDimension3 != null ? threeDimension3.getKey() : null)) { z = true; PmThreeDimensionItemModel threeDimension4 = spuImage.getThreeDimension(); if (threeDimension4 != null && threeDimension4.isMultiMesh() && (!FilamentABTest.isSupportMultiMeshAB() || !FilamentABTest.isHitTest(getContext(), spuImage.getThreeDimension().isMultiMesh()) || !FilamentGpuUtil.isCompatibleGpu())) { z = false; } } } z = false; PmThreeDimensionItemModel threeDimension42 = spuImage.getThreeDimension(); z = false; } if (!z || (threeDimension = spuImage.getThreeDimension()) == null || !threeDimension.show3d()) { pmWearCollocationTrendModel = null; this.f22308h = null; } else { String coverUrl = spuImage.getThreeDimension().getCoverUrl(); if (coverUrl == null || coverUrl.length() == 0) { List<PmImageItemModel> images = spuImage.getImages(); if (!(images == null || images.isEmpty())) { PmThreeDimensionItemModel threeDimension5 = spuImage.getThreeDimension(); PmImageItemModel pmImageItemModel = (PmImageItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) spuImage.getImages()); pmThreeDimensionItemModel = PmThreeDimensionItemModel.copy$default(threeDimension5, null, pmImageItemModel != null ? pmImageItemModel.getUrl() : null, null, null, null, 0, 0, 0, 253, null); pmWearCollocationTrendModel = null; arrayList.add(new PmFocusMapItemModel(pmThreeDimensionItemModel, 0, spuId, 2, null)); PmHeaderThreeDController pmHeaderThreeDController2 = new PmHeaderThreeDController(a5, this, pmThreeDimensionItemModel); pmHeaderThreeDController2.d(arrayList.size()); Unit unit3 = Unit.INSTANCE; this.f22308h = pmHeaderThreeDController2; ((DuRequestOptions) mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/common/animation3d_bg_product_detail_3d.webp").d()).y(); } } pmThreeDimensionItemModel = spuImage.getThreeDimension(); pmWearCollocationTrendModel = null; arrayList.add(new PmFocusMapItemModel(pmThreeDimensionItemModel, 0, spuId, 2, null)); PmHeaderThreeDController pmHeaderThreeDController22 = new PmHeaderThreeDController(a5, this, pmThreeDimensionItemModel); pmHeaderThreeDController22.d(arrayList.size()); Unit unit32 = Unit.INSTANCE; this.f22308h = pmHeaderThreeDController22; ((DuRequestOptions) mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/common/animation3d_bg_product_detail_3d.webp").d()).y(); } List<PmImageItemModel> images2 = spuImage.getImages(); if (images2 == null) { images2 = CollectionsKt__CollectionsKt.emptyList(); } ArrayList arrayList2 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(images2, 10)); int i3 = 0; for (T t4 : images2) { int i12 = i3 + 1; if (i3 < 0) { CollectionsKt__CollectionsKt.throwIndexOverflow(); } T t12 = t4; arrayList2.add(new PmFocusImageItemModel(t12, i3, t12.isWearImage() ? "1_2" : "1_1")); i3 = i12; } ArrayList arrayList3 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList2, 10)); Iterator it2 = arrayList2.iterator(); while (it2.hasNext()) { PmFocusImageItemModel pmFocusImageItemModel = (PmFocusImageItemModel) it2.next(); arrayList3.add(new PmFocusMapItemModel(pmFocusImageItemModel, pmFocusImageItemModel.getItem().getPropertyValueId(), spuId)); pmWearCollocationTrendModel = pmWearCollocationTrendModel; } arrayList.addAll(arrayList3); PmHeaderWearCollocationController pmHeaderWearCollocationController = this.k; if (pmHeaderWearCollocationController != null) { pmHeaderWearCollocationController.onDestroy(); } PmWearCollocationModel wearCollocationModel = spuImage.getWearCollocationModel(); if (wearCollocationModel == null || wearCollocationModel.isEmpty()) { PmHeaderWearCollocationController pmHeaderWearCollocationController2 = pmWearCollocationTrendModel; this.k = pmHeaderWearCollocationController2; pmWearCollocationTrendModel2 = pmHeaderWearCollocationController2; } else { this.k = new PmHeaderWearCollocationController(a5, this); TalentAndRelationTrendModel value = getViewModel$du_product_detail_release().R().getValue(); if (value == null || value.getTotal() <= getViewModel$du_product_detail_release().k().i()) { z4 = false; } pmWearCollocationTrendModel2 = pmWearCollocationTrendModel; arrayList.add(new PmFocusMapItemModel(new PmWearCollocationFocusModel(wearCollocationModel, (PmWearCollocationTrendModel) i.b(z4, value != null ? value.toWearTrend() : pmWearCollocationTrendModel, pmWearCollocationTrendModel)), 0, spuId, 2, null)); } this.s.clear(); this.s.addAll(arrayList); k(getViewModel$du_product_detail_release().R().getValue(), spuImage.getWearCollocationModel()); d(); PmPropertyItemModel value2 = getViewModel$du_product_detail_release().E().getValue(); if (value2 != null) { l12 = Long.valueOf(value2.getPropertyValueId()); } else { PmModel value3 = getViewModel$du_product_detail_release().getModel().getValue(); l12 = value3 != null ? Long.valueOf(value3.fetchCustomPropertyValueId()) : pmWearCollocationTrendModel2; } if (!j(l12 != null ? l12.longValue() : 0)) { setPagerData(arrayList); } } } public void onDetachedFromWindow() { if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270948, new Class[0], Void.TYPE).isSupported) { super.onDetachedFromWindow(); getFocusMapViewModel().b().postValue(Boolean.FALSE); } } @Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver public void onExposure(@Nullable DuExposureHelper.State state) { if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 270949, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) { h(""); g(); } } @Override // com.shizhuang.duapp.modules.product_detail.detailv3.views.PmBaseView, com.shizhuang.duapp.common.component.module.AbsModuleView public void onMeasure(int i3, int i12) { float f12; Object[] objArr = {new Integer(i3), new Integer(i12)}; ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect; Class cls = Integer.TYPE; if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 270946, new Class[]{cls, cls}, Void.TYPE).isSupported) { float size = (float) View.MeasureSpec.getSize(i3); PmViewModel viewModel$du_product_detail_release = getViewModel$du_product_detail_release(); PatchProxyResult proxy = PatchProxy.proxy(new Object[]{viewModel$du_product_detail_release}, null, PmViewModelExtKt.changeQuickRedirect, true, 272183, new Class[]{PmViewModel.class}, Float.TYPE); if (proxy.isSupported) { f12 = ((Float) proxy.result).floatValue(); } else { f12 = viewModel$du_product_detail_release.W() ? 0.7f : 1.0f; } super.onMeasure(i3, View.MeasureSpec.makeMeasureSpec(getPaddingBottom() + getPaddingTop() + ((int) (size * f12)), 1073741824)); } } @JvmOverloads public PmHeaderView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i3) { super(context, attributeSet, i3); AppCompatActivity g3 = ViewExtensionKt.g(this); this.d = new ViewModelLazy(Reflection.getOrCreateKotlinClass(PmFocusMapViewModel.class), new PmHeaderView$$special$$inlined$activityViewModels$2(g3), new PmHeaderView$$special$$inlined$activityViewModels$1(g3)); AppCompatActivity g6 = ViewExtensionKt.g(this); this.e = new ViewModelLazy(Reflection.getOrCreateKotlinClass(PmThreeDimensionViewModel.class), new PmHeaderView$$special$$inlined$activityViewModels$4(g6), new PmHeaderView$$special$$inlined$activityViewModels$3(g6)); AppCompatActivity g12 = ViewExtensionKt.g(this); this.f = new ViewModelLazy(Reflection.getOrCreateKotlinClass(PmPanoramaViewModel.class), new PmHeaderView$$special$$inlined$activityViewModels$6(g12), new PmHeaderView$$special$$inlined$activityViewModels$5(g12)); this.j = new PmHeaderARController(a(), this); int i12 = context.getResources().getDisplayMetrics().widthPixels / 2; this.l = i12; HeaderPagerAdapter headerPagerAdapter = new HeaderPagerAdapter(((FragmentActivity) context).getSupportFragmentManager()); this.m = headerPagerAdapter; this.o = true; this.f22309q = true; this.s = new ArrayList(); setBackgroundColor(-1); setPadding(getPaddingLeft(), getViewModel$du_product_detail_release().W() ? 0 : r0.i(context), getPaddingRight(), getPaddingBottom()); ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).setAdapter(headerPagerAdapter); ViewExtensionKt.o((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager), new Function1<Integer, Unit>(this) { /* class com.shizhuang.duapp.modules.product_detail.detailv3.views.PmHeaderView.AnonymousClass1 */ public static ChangeQuickRedirect changeQuickRedirect; public final /* synthetic */ PmHeaderView this$0; { this.this$0 = r1; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Integer num) { invoke(num.intValue()); return Unit.INSTANCE; } public final void invoke(int i) { if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 270969, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) { h hVar = h.f37582a; hVar.a("PmHeaderView doOnPageSelected position = " + i); this.this$0.m(); this.this$0.l(i); PmHeaderView pmHeaderView = this.this$0; int i3 = pmHeaderView.n; String str = i > i3 ? "右滑" : i < i3 ? "左滑" : ""; pmHeaderView.n = i; if (!pmHeaderView.f22309q) { pmHeaderView.h(str); } this.this$0.f22309q = false; } } }); PmHeaderARController pmHeaderARController = this.j; AnonymousClass2 r12 = new Function2<Boolean, Boolean, Unit>(this) { /* class com.shizhuang.duapp.modules.product_detail.detailv3.views.PmHeaderView.AnonymousClass2 */ public static ChangeQuickRedirect changeQuickRedirect; public final /* synthetic */ PmHeaderView this$0; { this.this$0 = r1; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(Boolean bool, Boolean bool2) { invoke(bool.booleanValue(), bool2.booleanValue()); return Unit.INSTANCE; } public final void invoke(boolean z, boolean z4) { Object[] objArr = {new Byte(z ? (byte) 1 : 0), new Byte(z4 ? (byte) 1 : 0)}; ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect; Class cls = Boolean.TYPE; if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 270970, new Class[]{cls, cls}, Void.TYPE).isSupported && z && !z4) { PmHeaderView pmHeaderView = this.this$0; if (!PatchProxy.proxy(new Object[0], pmHeaderView, PmHeaderView.changeQuickRedirect, false, 270950, new Class[0], Void.TYPE).isSupported && !pmHeaderView.p) { pmHeaderView.f(); pmHeaderView.p = true; } } } }; if (!PatchProxy.proxy(new Object[]{r12}, pmHeaderARController, PmHeaderARController.changeQuickRedirect, false, 269393, new Class[]{Function2.class}, Void.TYPE).isSupported) { pmHeaderARController.f22168g = r12; } if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270925, new Class[0], Void.TYPE).isSupported) { ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).post(new w01.i(this)); ((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager)).setOnTouchListener(new w01.j(this)); ViewExtensionKt.n((NestScrollViewPager) _$_findCachedViewById(R.id.itemViewPager), new PmHeaderView$initObserver$3(this)); getTdViewModel().d().observe(a(), new PmHeaderView$initObserver$4(this)); getPanoramaViewModel().e().observe(a(), new PmHeaderView$initObserver$5(this)); getFocusMapViewModel().c().observe(a(), new PmHeaderView$initObserver$6(this)); getViewModel$du_product_detail_release().getSelectedProperties().observe(a(), new PmHeaderView$initObserver$7(this)); getViewModel$du_product_detail_release().E().observe(a(), new PmHeaderView$initObserver$8(this)); getViewModel$du_product_detail_release().R().observe(a(), new PmHeaderView$initObserver$9(this)); getViewModel$du_product_detail_release().X().observe(a(), new PmHeaderView$initObserver$10(this)); PageEventBus.g(getContext()).a(m.class).observe(a(), new PmHeaderView$initObserver$11(this)); PageEventBus.g(getContext()).a(o.class).observe(a(), new PmHeaderView$initObserver$12(this)); PageEventBus.g(getContext()).a(q01.f.class).observe(a(), new PmHeaderView$initObserver$13(this)); } if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 270926, new Class[0], Void.TYPE).isSupported) { EasyPullLayout easyPullLayout = (EasyPullLayout) _$_findCachedViewById(R.id.itemPullLayout); easyPullLayout.setMaxOffsetRight(i12); easyPullLayout.setStickyFactor(o5.i.f36333a); easyPullLayout.setTriggerOffsetRight(fi.b.b((float) 70)); easyPullLayout.setEnabled(false); easyPullLayout.setAutoTriggerWhen2Max(!getViewModel$du_product_detail_release().k().q()); ((EasyPullLayout) _$_findCachedViewById(R.id.itemPullLayout)).setOnPullListener(new PmHeaderView$initPullLayout$2(this)); ((EasyPullLayout) _$_findCachedViewById(R.id.itemPullLayout)).setOnTriggerListener(new PmHeaderView$initPullLayout$3(this)); } } }