package androidx.constraintlayout.motion.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.DashPathEffect; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; import android.graphics.RectF; import android.os.Bundle; import android.util.AttributeSet; import android.util.SparseArray; import android.util.SparseBooleanArray; import android.util.SparseIntArray; import android.view.Display; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.ViewGroup; import android.view.animation.Interpolator; import androidx.constraintlayout.widget.Barrier; import androidx.constraintlayout.widget.ConstraintHelper; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.Constraints; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; import o.AZC; import o.Bmx; import o.C11094eYU; import o.C15442gqk; import o.C15870jKt; import o.C16458oZD; import o.C16822rXU; import o.C17026tNn; import o.C3345avm; import o.C5928cDh; import o.C6805ccO; import o.InterfaceC15462grE; import o.NsV; import o.TqO; import o.WAE; import o.WqU; import o.ZXE; import o.ZhI; import o.ZmI; import o.gQG; import o.htg; import o.kpn; import o.ktU; import o.vbe; import o.wmX; import o.yqQ; import o.zvH; /* loaded from: classes.dex */ public class MotionLayout extends ConstraintLayout implements htg { public static boolean b = false; private boolean B; private float C; private float D; private boolean E; private ArrayList F; private long G; private LWm H; private RectF I; private boolean J; private int K; private boolean L; private boolean M; private Sts N; private Interpolator O; private Matrix P; private boolean Q; private boolean R; private boolean S; private long T; private float U; private ZhI V; private int W; public int a; private boolean aA; private Rect aB; private float aC; private boolean aD; private float aE; private saX aF; private long aG; private boolean aL; private int aa; private int ab; private int ac; private HBt ad; private int ae; private int af; private float ag; private boolean ah; private int ai; private ArrayList aj; private ArrayList ak; private int al; private int am; private int an; private int ao; private View ap; private int[] aq; private Interpolator ar; private long as; private float at; private float au; private tOB av; private float aw; private float ax; private ArrayList ay; private C5928cDh az; public int c; int d; public int e; int f; int g; public boolean h; int i; public HashMap j; HashMap k; protected boolean l; float m; public Runnable n; /* renamed from: o, reason: collision with root package name */ public float f6380o; int p; public C16822rXU q; public float r; int s; int t; public ZqN u; public CopyOnWriteArrayList v; int x; /* loaded from: classes.dex */ public interface RVV { void c(); float d(); float e(); void e(int i); void kV_(MotionEvent motionEvent); } /* loaded from: classes.dex */ public interface ZqN { } /* loaded from: classes.dex */ public enum saX { UNDEFINED, SETUP, MOVING, FINISHED } private static boolean d(float f, float f2, float f3) { if (f > BitmapDescriptorFactory.HUE_RED) { float f4 = f / f3; return f2 + ((f * f4) - (((f3 * f4) * f4) / 2.0f)) > 1.0f; } float f5 = (-f) / f3; return f2 + ((f * f5) + (((f3 * f5) * f5) / 2.0f)) < BitmapDescriptorFactory.HUE_RED; } @Override // o.FEJ public final void c(View view, int i, int i2, int i3, int i4, int i5) { } @Override // android.view.ViewGroup, android.view.ViewParent public boolean onNestedFling(View view, float f, float f2, boolean z) { return false; } @Override // android.view.ViewGroup, android.view.ViewParent public boolean onNestedPreFling(View view, float f, float f2) { return false; } static /* synthetic */ Rect kK_(MotionLayout motionLayout, C17026tNn c17026tNn) { motionLayout.aB.top = c17026tNn.l(); motionLayout.aB.left = c17026tNn.f(); motionLayout.aB.right = (c17026tNn.Z == 8 ? 0 : c17026tNn.ac) + motionLayout.aB.left; motionLayout.aB.bottom = (c17026tNn.Z != 8 ? c17026tNn.p : 0) + motionLayout.aB.top; return motionLayout.aB; } public MotionLayout(Context context) { super(context); this.ar = null; this.f6380o = BitmapDescriptorFactory.HUE_RED; this.d = -1; this.e = -1; this.a = -1; this.ac = 0; this.W = 0; this.h = true; this.j = new HashMap<>(); this.G = 0L; this.ax = 1.0f; this.aC = BitmapDescriptorFactory.HUE_RED; this.r = BitmapDescriptorFactory.HUE_RED; this.aE = BitmapDescriptorFactory.HUE_RED; this.L = false; this.R = false; this.c = 0; this.aA = false; this.az = new C5928cDh(); this.H = new LWm(this); this.B = true; this.aL = false; this.S = false; this.aj = null; this.ak = null; this.F = null; this.v = null; this.K = 0; this.T = -1L; this.U = BitmapDescriptorFactory.HUE_RED; this.af = 0; this.ag = BitmapDescriptorFactory.HUE_RED; this.Q = false; this.l = false; this.V = new ZhI(); this.M = false; this.n = null; this.aq = null; this.an = 0; this.J = false; this.t = 0; this.k = new HashMap<>(); this.aB = new Rect(); this.E = false; this.aF = saX.UNDEFINED; this.ad = new HBt(this); this.ah = false; this.I = new RectF(); this.ap = null; this.P = null; this.ay = new ArrayList<>(); kM_(null); } public MotionLayout(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.ar = null; this.f6380o = BitmapDescriptorFactory.HUE_RED; this.d = -1; this.e = -1; this.a = -1; this.ac = 0; this.W = 0; this.h = true; this.j = new HashMap<>(); this.G = 0L; this.ax = 1.0f; this.aC = BitmapDescriptorFactory.HUE_RED; this.r = BitmapDescriptorFactory.HUE_RED; this.aE = BitmapDescriptorFactory.HUE_RED; this.L = false; this.R = false; this.c = 0; this.aA = false; this.az = new C5928cDh(); this.H = new LWm(this); this.B = true; this.aL = false; this.S = false; this.aj = null; this.ak = null; this.F = null; this.v = null; this.K = 0; this.T = -1L; this.U = BitmapDescriptorFactory.HUE_RED; this.af = 0; this.ag = BitmapDescriptorFactory.HUE_RED; this.Q = false; this.l = false; this.V = new ZhI(); this.M = false; this.n = null; this.aq = null; this.an = 0; this.J = false; this.t = 0; this.k = new HashMap<>(); this.aB = new Rect(); this.E = false; this.aF = saX.UNDEFINED; this.ad = new HBt(this); this.ah = false; this.I = new RectF(); this.ap = null; this.P = null; this.ay = new ArrayList<>(); kM_(attributeSet); } public MotionLayout(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); this.ar = null; this.f6380o = BitmapDescriptorFactory.HUE_RED; this.d = -1; this.e = -1; this.a = -1; this.ac = 0; this.W = 0; this.h = true; this.j = new HashMap<>(); this.G = 0L; this.ax = 1.0f; this.aC = BitmapDescriptorFactory.HUE_RED; this.r = BitmapDescriptorFactory.HUE_RED; this.aE = BitmapDescriptorFactory.HUE_RED; this.L = false; this.R = false; this.c = 0; this.aA = false; this.az = new C5928cDh(); this.H = new LWm(this); this.B = true; this.aL = false; this.S = false; this.aj = null; this.ak = null; this.F = null; this.v = null; this.K = 0; this.T = -1L; this.U = BitmapDescriptorFactory.HUE_RED; this.af = 0; this.ag = BitmapDescriptorFactory.HUE_RED; this.Q = false; this.l = false; this.V = new ZhI(); this.M = false; this.n = null; this.aq = null; this.an = 0; this.J = false; this.t = 0; this.k = new HashMap<>(); this.aB = new Rect(); this.E = false; this.aF = saX.UNDEFINED; this.ad = new HBt(this); this.ah = false; this.I = new RectF(); this.ap = null; this.P = null; this.ay = new ArrayList<>(); kM_(attributeSet); } public static RVV b() { return IeS.b(); } public final void c(saX sax) { if (sax == saX.FINISHED && this.e == -1) { return; } saX sax2 = this.aF; this.aF = sax; if (sax2 == saX.MOVING && sax == saX.MOVING) { j(); } int i = AnonymousClass4.c[sax2.ordinal()]; if (i == 1 || i == 2) { if (sax == saX.MOVING) { j(); } if (sax == saX.FINISHED) { g(); return; } return; } if (i == 3 && sax == saX.FINISHED) { g(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: androidx.constraintlayout.motion.widget.MotionLayout$4, reason: invalid class name */ /* loaded from: classes.dex */ public static /* synthetic */ class AnonymousClass4 { static final int[] c; static { int[] iArr = new int[saX.values().length]; c = iArr; try { iArr[saX.UNDEFINED.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { c[saX.SETUP.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { c[saX.MOVING.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { c[saX.FINISHED.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } } } /* loaded from: classes.dex */ static class IeS implements RVV { private static IeS c = new IeS(); private VelocityTracker d; private IeS() { } public static IeS b() { c.d = VelocityTracker.obtain(); return c; } @Override // androidx.constraintlayout.motion.widget.MotionLayout.RVV public final void c() { VelocityTracker velocityTracker = this.d; if (velocityTracker != null) { velocityTracker.recycle(); this.d = null; } } @Override // androidx.constraintlayout.motion.widget.MotionLayout.RVV public final void kV_(MotionEvent motionEvent) { VelocityTracker velocityTracker = this.d; if (velocityTracker != null) { velocityTracker.addMovement(motionEvent); } } @Override // androidx.constraintlayout.motion.widget.MotionLayout.RVV public final void e(int i) { VelocityTracker velocityTracker = this.d; if (velocityTracker != null) { velocityTracker.computeCurrentVelocity(i); } } @Override // androidx.constraintlayout.motion.widget.MotionLayout.RVV public final float e() { VelocityTracker velocityTracker = this.d; return velocityTracker != null ? velocityTracker.getXVelocity() : BitmapDescriptorFactory.HUE_RED; } @Override // androidx.constraintlayout.motion.widget.MotionLayout.RVV public final float d() { VelocityTracker velocityTracker = this.d; return velocityTracker != null ? velocityTracker.getYVelocity() : BitmapDescriptorFactory.HUE_RED; } } public void setTransition(int i, int i2) { if (isAttachedToWindow()) { C16822rXU c16822rXU = this.q; if (c16822rXU != null) { this.d = i; this.a = i2; c16822rXU.c(i, i2); HBt hBt = this.ad; WqU wqU = this.z; hBt.a(this.q.e(i), this.q.e(i2)); this.ad.a(); invalidate(); this.r = BitmapDescriptorFactory.HUE_RED; e(BitmapDescriptorFactory.HUE_RED); return; } return; } if (this.av == null) { this.av = new tOB(this); } this.av.g = i; this.av.d = i2; } public final void d(C16822rXU.HBt hBt) { C16822rXU c16822rXU = this.q; c16822rXU.d = hBt; if (hBt != null && hBt.p != null) { c16822rXU.d.p.a(c16822rXU.c); } c(saX.SETUP); int i = this.e; C16822rXU.HBt hBt2 = this.q.d; float f = i == (hBt2 == null ? -1 : hBt2.c) ? 1.0f : BitmapDescriptorFactory.HUE_RED; this.r = f; this.aC = f; this.aE = f; this.aG = (hBt.t & 1) != 0 ? -1L : System.nanoTime(); C16822rXU.HBt hBt3 = this.q.d; int i2 = hBt3 == null ? -1 : hBt3.e; C16822rXU.HBt hBt4 = this.q.d; int i3 = hBt4 != null ? hBt4.c : -1; if (i2 == this.d && i3 == this.a) { return; } this.d = i2; this.a = i3; this.q.c(i2, i3); HBt hBt5 = this.ad; WqU wqU = this.z; hBt5.a(this.q.e(this.d), this.q.e(this.a)); HBt hBt6 = this.ad; int i4 = this.d; int i5 = this.a; hBt6.b = i4; hBt6.c = i5; this.ad.a(); this.ad.a(); invalidate(); } @Override // android.view.View public boolean isAttachedToWindow() { return super.isAttachedToWindow(); } @Override // androidx.constraintlayout.widget.ConstraintLayout public void setState(int i, int i2, int i3) { c(saX.SETUP); this.e = i; this.d = -1; this.a = -1; if (this.y != null) { this.y.a(i, i2, i3); return; } C16822rXU c16822rXU = this.q; if (c16822rXU != null) { c16822rXU.e(i).d(this); } } public void setInterpolatedProgress(float f) { if (this.q != null) { c(saX.MOVING); Interpolator kX_ = this.q.kX_(); if (kX_ != null) { setProgress(kX_.getInterpolation(f)); return; } } setProgress(f); } public void setProgress(float f, float f2) { if (isAttachedToWindow()) { setProgress(f); c(saX.MOVING); this.f6380o = f2; float f3 = BitmapDescriptorFactory.HUE_RED; if (f2 != BitmapDescriptorFactory.HUE_RED) { if (f2 > BitmapDescriptorFactory.HUE_RED) { f3 = 1.0f; } e(f3); return; } else { if (f == BitmapDescriptorFactory.HUE_RED || f == 1.0f) { return; } if (f > 0.5f) { f3 = 1.0f; } e(f3); return; } } if (this.av == null) { this.av = new tOB(this); } this.av.h = f; this.av.i = f2; } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public class tOB { final MotionLayout f; float h = Float.NaN; float i = Float.NaN; int g = -1; int d = -1; final String e = "motion.progress"; final String a = "motion.velocity"; final String c = "motion.StartState"; final String b = "motion.EndState"; tOB(MotionLayout motionLayout) { this.f = motionLayout; } final void c() { int i = this.g; if (i != -1 || this.d != -1) { if (i == -1) { this.f.c(this.d); } else { int i2 = this.d; if (i2 == -1) { this.f.setState(i, -1, -1); } else { this.f.setTransition(i, i2); } } this.f.c(saX.SETUP); } if (Float.isNaN(this.i)) { if (Float.isNaN(this.h)) { return; } this.f.setProgress(this.h); } else { this.f.setProgress(this.h, this.i); this.h = Float.NaN; this.i = Float.NaN; this.g = -1; this.d = -1; } } } public void setTransitionState(Bundle bundle) { if (this.av == null) { this.av = new tOB(this); } tOB tob = this.av; tob.h = bundle.getFloat("motion.progress"); tob.i = bundle.getFloat("motion.velocity"); tob.g = bundle.getInt("motion.StartState"); tob.d = bundle.getInt("motion.EndState"); if (isAttachedToWindow()) { this.av.c(); } } public void setProgress(float f) { if (!isAttachedToWindow()) { if (this.av == null) { this.av = new tOB(this); } this.av.h = f; return; } if (f <= BitmapDescriptorFactory.HUE_RED) { if (this.r == 1.0f && this.e == this.a) { c(saX.MOVING); } this.e = this.d; if (this.r == BitmapDescriptorFactory.HUE_RED) { c(saX.FINISHED); } } else if (f >= 1.0f) { if (this.r == BitmapDescriptorFactory.HUE_RED && this.e == this.d) { c(saX.MOVING); } this.e = this.a; if (this.r == 1.0f) { c(saX.FINISHED); } } else { this.e = -1; c(saX.MOVING); } if (this.q == null) { return; } this.aD = true; this.aE = f; this.aC = f; this.aG = -1L; this.G = -1L; this.O = null; this.L = true; invalidate(); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public class LWm extends wmX { final MotionLayout a; float c; float d = BitmapDescriptorFactory.HUE_RED; float e = BitmapDescriptorFactory.HUE_RED; LWm(MotionLayout motionLayout) { this.a = motionLayout; } @Override // android.animation.TimeInterpolator public final float getInterpolation(float f) { float f2; float f3; float f4 = this.d; if (f4 > BitmapDescriptorFactory.HUE_RED) { float f5 = this.c; float f6 = f4 / f5; if (f6 < f) { f = f6; } this.a.f6380o = f4 - (f5 * f); f2 = (this.d * f) - (((this.c * f) * f) / 2.0f); f3 = this.e; } else { float f7 = this.c; float f8 = (-f4) / f7; if (f8 < f) { f = f8; } this.a.f6380o = f4 + (f7 * f); f2 = (this.d * f) + (((this.c * f) * f) / 2.0f); f3 = this.e; } return f2 + f3; } @Override // o.wmX public final float a() { return this.a.f6380o; } } public final void e(float f) { int i; C16822rXU c16822rXU = this.q; if (c16822rXU == null) { return; } float f2 = this.r; float f3 = this.aC; if (f2 != f3 && this.aD) { this.r = f3; } float f4 = this.r; if (f4 == f) { return; } this.aA = false; this.aE = f; C16822rXU.HBt hBt = c16822rXU.d; if (hBt != null) { i = hBt.h; } else { i = c16822rXU.a; } this.ax = i / 1000.0f; setProgress(this.aE); this.O = null; this.ar = this.q.kX_(); this.aD = false; this.G = System.nanoTime(); this.L = true; this.aC = f4; this.r = f4; invalidate(); } public final void c(int i) { int i2; if (!isAttachedToWindow()) { if (this.av == null) { this.av = new tOB(this); } this.av.d = i; return; } C16822rXU c16822rXU = this.q; if (c16822rXU != null && c16822rXU.i != null) { C15442gqk c15442gqk = this.q.i; int i3 = this.e; C15442gqk.IeS ieS = c15442gqk.b.get(i); if (ieS == null) { i3 = i; } else if (ieS.a != i3) { Iterator it = ieS.d.iterator(); while (true) { if (it.hasNext()) { if (i3 == it.next().d) { break; } } else { i3 = ieS.a; break; } } } if (i3 != -1) { i = i3; } } int i4 = this.e; if (i4 != i) { if (this.d == i) { e(BitmapDescriptorFactory.HUE_RED); return; } if (this.a == i) { e(1.0f); return; } this.a = i; if (i4 != -1) { setTransition(i4, i); e(1.0f); this.r = BitmapDescriptorFactory.HUE_RED; e(1.0f); this.n = null; return; } this.aA = false; this.aE = 1.0f; this.aC = BitmapDescriptorFactory.HUE_RED; this.r = BitmapDescriptorFactory.HUE_RED; this.aG = System.nanoTime(); this.G = System.nanoTime(); this.aD = false; this.O = null; C16822rXU c16822rXU2 = this.q; C16822rXU.HBt hBt = c16822rXU2.d; if (hBt != null) { i2 = hBt.h; } else { i2 = c16822rXU2.a; } this.ax = i2 / 1000.0f; this.d = -1; this.q.c(-1, this.a); SparseArray sparseArray = new SparseArray(); int childCount = getChildCount(); this.j.clear(); for (int i5 = 0; i5 < childCount; i5++) { View childAt = getChildAt(i5); this.j.put(childAt, new C15870jKt(childAt)); sparseArray.put(childAt.getId(), this.j.get(childAt)); } this.L = true; HBt hBt2 = this.ad; WqU wqU = this.z; hBt2.a((yqQ) null, this.q.e(i)); this.ad.a(); invalidate(); this.ad.d(); int childCount2 = getChildCount(); for (int i6 = 0; i6 < childCount2; i6++) { View childAt2 = getChildAt(i6); C15870jKt c15870jKt = this.j.get(childAt2); if (c15870jKt != null) { c15870jKt.v.m = BitmapDescriptorFactory.HUE_RED; c15870jKt.v.l = BitmapDescriptorFactory.HUE_RED; C11094eYU c11094eYU = c15870jKt.v; float x = childAt2.getX(); float y = childAt2.getY(); float width = childAt2.getWidth(); float height = childAt2.getHeight(); c11094eYU.s = x; c11094eYU.r = y; c11094eYU.f8961o = width; c11094eYU.d = height; TqO tqO = c15870jKt.w; childAt2.getX(); childAt2.getY(); childAt2.getWidth(); childAt2.getHeight(); tqO.d(childAt2); } } int width2 = getWidth(); int height2 = getHeight(); for (int i7 = 0; i7 < childCount; i7++) { C15870jKt c15870jKt2 = this.j.get(getChildAt(i7)); if (c15870jKt2 != null) { this.q.e(c15870jKt2); c15870jKt2.b(width2, height2, System.nanoTime()); } } C16822rXU.HBt hBt3 = this.q.d; float f = hBt3 != null ? hBt3.q : 0.0f; if (f != BitmapDescriptorFactory.HUE_RED) { float f2 = Float.MAX_VALUE; float f3 = -3.4028235E38f; for (int i8 = 0; i8 < childCount; i8++) { C15870jKt c15870jKt3 = this.j.get(getChildAt(i8)); float f4 = c15870jKt3.h.r + c15870jKt3.h.s; f2 = Math.min(f2, f4); f3 = Math.max(f3, f4); } for (int i9 = 0; i9 < childCount; i9++) { C15870jKt c15870jKt4 = this.j.get(getChildAt(i9)); float f5 = c15870jKt4.h.s; float f6 = c15870jKt4.h.r; c15870jKt4.y = 1.0f / (1.0f - f); c15870jKt4.p = f - ((((f5 + f6) - f2) * f) / (f3 - f2)); } } this.aC = BitmapDescriptorFactory.HUE_RED; this.r = BitmapDescriptorFactory.HUE_RED; this.L = true; invalidate(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public class HBt { final MotionLayout a; int b; int c; private WqU j = new WqU(); private WqU e = new WqU(); private yqQ i = null; private yqQ d = null; HBt(MotionLayout motionLayout) { this.a = motionLayout; } final void a(yqQ yqq, yqQ yqq2) { this.i = yqq; this.d = yqq2; this.j = new WqU(); this.e = new WqU(); WqU wqU = this.j; zvH.RVV rvv = this.a.z.ao; wqU.ao = rvv; wqU.ai.d = rvv; WqU wqU2 = this.e; zvH.RVV rvv2 = this.a.z.ao; wqU2.ao = rvv2; wqU2.ai.d = rvv2; ((C16458oZD) this.j).az.clear(); ((C16458oZD) this.e).az.clear(); c(this.a.z, this.j); c(this.a.z, this.e); if (this.a.r > 0.5d) { if (yqq != null) { c(this.j, yqq); } c(this.e, yqq2); } else { c(this.e, yqq2); if (yqq != null) { c(this.j, yqq); } } this.j.aq = this.a.c(); WqU wqU3 = this.j; wqU3.e.d(wqU3); this.e.aq = this.a.c(); WqU wqU4 = this.e; wqU4.e.d(wqU4); ViewGroup.LayoutParams layoutParams = this.a.getLayoutParams(); if (layoutParams != null) { if (layoutParams.width == -2) { this.j.B[0] = C17026tNn.LWm.WRAP_CONTENT; this.e.B[0] = C17026tNn.LWm.WRAP_CONTENT; } if (layoutParams.height == -2) { this.j.B[1] = C17026tNn.LWm.WRAP_CONTENT; this.e.B[1] = C17026tNn.LWm.WRAP_CONTENT; } } } /* JADX WARN: Multi-variable type inference failed */ private void c(WqU wqU, yqQ yqq) { yqQ.Sts sts; yqQ.Sts sts2; SparseArray sparseArray = new SparseArray<>(); Constraints.HBt hBt = new Constraints.HBt(); sparseArray.clear(); sparseArray.put(0, wqU); sparseArray.put(this.a.getId(), wqU); if (yqq != null && yqq.d != 0) { MotionLayout motionLayout = this.a; motionLayout.a(this.e, motionLayout.z.an, View.MeasureSpec.makeMeasureSpec(this.a.getHeight(), 1073741824), View.MeasureSpec.makeMeasureSpec(this.a.getWidth(), 1073741824)); } Iterator it = ((C16458oZD) wqU).az.iterator(); while (it.hasNext()) { C17026tNn next = it.next(); next.l = true; sparseArray.put(((View) next.t).getId(), next); } Iterator it2 = ((C16458oZD) wqU).az.iterator(); while (it2.hasNext()) { C17026tNn next2 = it2.next(); View view = (View) next2.t; int id = view.getId(); if (yqq.a.containsKey(Integer.valueOf(id)) && (sts2 = yqq.a.get(Integer.valueOf(id))) != null) { sts2.b(hBt); } next2.i(yqq.b(view.getId()).a.X); next2.c(yqq.b(view.getId()).a.R); if (view instanceof ConstraintHelper) { ConstraintHelper constraintHelper = (ConstraintHelper) view; int id2 = constraintHelper.getId(); if (yqq.a.containsKey(Integer.valueOf(id2)) && (sts = yqq.a.get(Integer.valueOf(id2))) != null && (next2 instanceof NsV)) { constraintHelper.le_(sts, (NsV) next2, hBt, sparseArray); } if (view instanceof Barrier) { ((Barrier) view).d(); } } hBt.resolveLayoutDirection(this.a.getLayoutDirection()); this.a.li_(false, view, next2, hBt, sparseArray); if (yqq.b(view.getId()).g.c == 1) { next2.Z = view.getVisibility(); } else { next2.Z = yqq.b(view.getId()).g.a; } } Iterator it3 = ((C16458oZD) wqU).az.iterator(); while (it3.hasNext()) { C17026tNn next3 = it3.next(); if (next3 instanceof ZXE) { ConstraintHelper constraintHelper2 = (ConstraintHelper) next3.t; InterfaceC15462grE interfaceC15462grE = (InterfaceC15462grE) next3; constraintHelper2.lf_(interfaceC15462grE, sparseArray); ((ZXE) interfaceC15462grE).e(); } } } public final void a() { a(this.a.ac, this.a.W); MotionLayout.e(this.a); } private void a(int i, int i2) { int mode = View.MeasureSpec.getMode(i); int mode2 = View.MeasureSpec.getMode(i2); this.a.x = mode; this.a.f = mode2; int i3 = this.a.z.an; e(i, i2); if (!(this.a.getParent() instanceof MotionLayout) || mode != 1073741824 || mode2 != 1073741824) { e(i, i2); MotionLayout motionLayout = this.a; WqU wqU = this.j; motionLayout.p = wqU.Z == 8 ? 0 : wqU.ac; MotionLayout motionLayout2 = this.a; WqU wqU2 = this.j; motionLayout2.s = wqU2.Z == 8 ? 0 : wqU2.p; MotionLayout motionLayout3 = this.a; WqU wqU3 = this.e; motionLayout3.i = wqU3.Z == 8 ? 0 : wqU3.ac; MotionLayout motionLayout4 = this.a; WqU wqU4 = this.e; motionLayout4.g = wqU4.Z == 8 ? 0 : wqU4.p; MotionLayout motionLayout5 = this.a; motionLayout5.l = (motionLayout5.p == this.a.i && this.a.s == this.a.g) ? false : true; } int i4 = this.a.p; int i5 = this.a.s; if (this.a.x == Integer.MIN_VALUE || this.a.x == 0) { i4 = (int) (this.a.p + (this.a.m * (this.a.i - this.a.p))); } int i6 = i4; if (this.a.f == Integer.MIN_VALUE || this.a.f == 0) { i5 = (int) (this.a.s + (this.a.m * (this.a.g - this.a.s))); } this.a.e(i, i2, i6, i5, this.j.at || this.e.at, this.j.am || this.e.am); } private void e(int i, int i2) { int i3 = this.a.z.an; if (this.a.e == this.a.d) { MotionLayout motionLayout = this.a; WqU wqU = this.e; yqQ yqq = this.d; int i4 = (yqq == null || yqq.d == 0) ? i : i2; yqQ yqq2 = this.d; motionLayout.a(wqU, i3, i4, (yqq2 == null || yqq2.d == 0) ? i2 : i); yqQ yqq3 = this.i; if (yqq3 != null) { MotionLayout motionLayout2 = this.a; WqU wqU2 = this.j; int i5 = yqq3.d == 0 ? i : i2; if (this.i.d == 0) { i = i2; } motionLayout2.a(wqU2, i3, i5, i); return; } return; } yqQ yqq4 = this.i; if (yqq4 != null) { this.a.a(this.j, i3, yqq4.d == 0 ? i : i2, this.i.d == 0 ? i2 : i); } MotionLayout motionLayout3 = this.a; WqU wqU3 = this.e; yqQ yqq5 = this.d; int i6 = (yqq5 == null || yqq5.d == 0) ? i : i2; yqQ yqq6 = this.d; if (yqq6 == null || yqq6.d == 0) { i = i2; } motionLayout3.a(wqU3, i3, i6, i); } public final void d() { int childCount = this.a.getChildCount(); this.a.j.clear(); SparseArray sparseArray = new SparseArray(); int[] iArr = new int[childCount]; for (int i = 0; i < childCount; i++) { View childAt = this.a.getChildAt(i); C15870jKt c15870jKt = new C15870jKt(childAt); int id = childAt.getId(); iArr[i] = id; sparseArray.put(id, c15870jKt); this.a.j.put(childAt, c15870jKt); } for (int i2 = 0; i2 < childCount; i2++) { View childAt2 = this.a.getChildAt(i2); C15870jKt c15870jKt2 = this.a.j.get(childAt2); if (c15870jKt2 != null) { if (this.i == null) { if (this.a.J) { ZmI zmI = this.a.k.get(childAt2); int i3 = this.a.t; int unused = this.a.am; int unused2 = this.a.al; c15870jKt2.d(zmI, childAt2); } } else { C17026tNn c = c(this.j, childAt2); if (c != null) { c15870jKt2.kH_(MotionLayout.kK_(this.a, c), this.i, this.a.getWidth(), this.a.getHeight()); } else if (this.a.c != 0) { C6805ccO.a(); C6805ccO.d(childAt2); } } if (this.d != null) { C17026tNn c2 = c(this.e, childAt2); if (c2 != null) { c15870jKt2.kG_(MotionLayout.kK_(this.a, c2), this.d, this.a.getWidth(), this.a.getHeight()); } else if (this.a.c != 0) { C6805ccO.a(); C6805ccO.d(childAt2); } } } } for (int i4 = 0; i4 < childCount; i4++) { C15870jKt c15870jKt3 = (C15870jKt) sparseArray.get(iArr[i4]); int i5 = c15870jKt3.v.e; if (i5 != -1) { C15870jKt c15870jKt4 = (C15870jKt) sparseArray.get(i5); c15870jKt3.v.a(c15870jKt4, c15870jKt4.v); c15870jKt3.h.a(c15870jKt4, c15870jKt4.h); } } } private static void c(WqU wqU, WqU wqU2) { C17026tNn c17026tNn; ArrayList arrayList = ((C16458oZD) wqU).az; HashMap hashMap = new HashMap<>(); hashMap.put(wqU, wqU2); ((C16458oZD) wqU2).az.clear(); wqU2.e(wqU, hashMap); Iterator it = arrayList.iterator(); while (it.hasNext()) { C17026tNn next = it.next(); if (next instanceof kpn) { c17026tNn = new kpn(); } else if (next instanceof WAE) { c17026tNn = new WAE(); } else if (next instanceof gQG) { c17026tNn = new gQG(); } else if (next instanceof vbe) { c17026tNn = new vbe(); } else if (next instanceof InterfaceC15462grE) { c17026tNn = new NsV(); } else { c17026tNn = new C17026tNn(); } wqU2.c(c17026tNn); hashMap.put(next, c17026tNn); } Iterator it2 = arrayList.iterator(); while (it2.hasNext()) { C17026tNn next2 = it2.next(); hashMap.get(next2).e(next2, hashMap); } } private static C17026tNn c(WqU wqU, View view) { if (wqU.t == view) { return wqU; } ArrayList arrayList = ((C16458oZD) wqU).az; int size = arrayList.size(); for (int i = 0; i < size; i++) { C17026tNn c17026tNn = arrayList.get(i); if (c17026tNn.t == view) { return c17026tNn; } } return null; } } @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.View, android.view.ViewParent public void requestLayout() { C16822rXU c16822rXU; if (!this.l && this.e == -1 && (c16822rXU = this.q) != null && c16822rXU.d != null) { int i = this.q.d.m; if (i == 0) { return; } if (i == 2) { int childCount = getChildCount(); for (int i2 = 0; i2 < childCount; i2++) { this.j.get(getChildAt(i2)).g = true; } return; } } super.requestLayout(); } @Override // android.view.View public String toString() { Context context = getContext(); StringBuilder sb = new StringBuilder(); sb.append(C6805ccO.e(context, this.d)); sb.append("->"); sb.append(C6805ccO.e(context, this.a)); sb.append(" (pos:"); sb.append(this.r); sb.append(" Dpos/Dt:"); sb.append(this.f6380o); return sb.toString(); } /* JADX WARN: Code restructure failed: missing block: B:27:0x0050, code lost: if (r8 == r9.c) goto L35; */ /* JADX WARN: Removed duplicated region for block: B:36:0x00f6 */ /* JADX WARN: Removed duplicated region for block: B:39:0x0109 */ /* JADX WARN: Removed duplicated region for block: B:49:0x012b */ /* JADX WARN: Removed duplicated region for block: B:50:0x0135 */ /* JADX WARN: Removed duplicated region for block: B:57:0x015c */ /* JADX WARN: Removed duplicated region for block: B:60:0x0162 */ /* JADX WARN: Removed duplicated region for block: B:69:0x0181 */ /* JADX WARN: Removed duplicated region for block: B:71:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:81:0x0101 */ /* JADX WARN: Removed duplicated region for block: B:84:0x009e */ /* JADX WARN: Removed duplicated region for block: B:87:0x00aa */ /* JADX WARN: Removed duplicated region for block: B:97:0x00ac */ /* JADX WARN: Removed duplicated region for block: B:98:0x00a0 */ @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.View /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public void onMeasure(int r18, int r19) { /* Method dump skipped, instructions count: 389 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.motion.widget.MotionLayout.onMeasure(int, int):void"); } @Override // o.FEJ public final boolean c(View view, View view2, int i, int i2) { C16822rXU c16822rXU = this.q; return (c16822rXU == null || c16822rXU.d == null || this.q.d.p == null || (this.q.d.p.f & 2) != 0) ? false : true; } @Override // o.FEJ public final void a(View view, int i) { C16822rXU c16822rXU = this.q; if (c16822rXU != null) { float f = this.aw; float f2 = BitmapDescriptorFactory.HUE_RED; if (f != BitmapDescriptorFactory.HUE_RED) { float f3 = this.at / f; float f4 = this.au / f; C16822rXU.HBt hBt = c16822rXU.d; if (hBt == null || hBt.p == null) { return; } Bmx bmx = c16822rXU.d.p; bmx.c = false; float f5 = bmx.n.r; bmx.n.a(bmx.v, f5, bmx.x, bmx.z, bmx.e); float f6 = bmx.A; float[] fArr = bmx.e; float f7 = f6 != BitmapDescriptorFactory.HUE_RED ? (f3 * f6) / fArr[0] : (f4 * bmx.B) / fArr[1]; if (!Float.isNaN(f7)) { f5 += f7 / 3.0f; } if (f5 != BitmapDescriptorFactory.HUE_RED) { boolean z = f5 != 1.0f; int i2 = bmx.k; if ((i2 != 3) && z) { MotionLayout motionLayout = bmx.n; if (f5 >= 0.5d) { f2 = 1.0f; } motionLayout.a(i2, f2, f7); } } } } } @Override // o.htg public final void a(View view, int i, int i2, int i3, int i4, int i5, int[] iArr) { if (this.aL || i != 0 || i2 != 0) { iArr[0] = iArr[0] + i3; iArr[1] = iArr[1] + i4; } this.aL = false; } /* JADX WARN: Type inference failed for: r1v3 */ /* JADX WARN: Type inference failed for: r1v4, types: [boolean] */ /* JADX WARN: Type inference failed for: r1v5 */ @Override // o.FEJ public final void a(View view, int i, int i2, int[] iArr, int i3) { C16822rXU.HBt hBt; ?? r1; float f; float f2; Bmx bmx; int i4; C16822rXU c16822rXU = this.q; if (c16822rXU == null || (hBt = c16822rXU.d) == null || !(!hBt.g)) { return; } int i5 = -1; if (!(!hBt.g) || (bmx = hBt.p) == null || (i4 = bmx.D) == -1 || view.getId() == i4) { C16822rXU.HBt hBt2 = c16822rXU.d; if (hBt2 != null && hBt2.p != null && c16822rXU.d.p.m) { Bmx bmx2 = hBt.p; if (bmx2 != null && (bmx2.f & 4) != 0) { i5 = i2; } float f3 = this.aC; if ((f3 == 1.0f || f3 == BitmapDescriptorFactory.HUE_RED) && view.canScrollVertically(i5)) { return; } } if (hBt.p != null && (hBt.p.f & 1) != 0) { float f4 = i; float f5 = i2; C16822rXU.HBt hBt3 = c16822rXU.d; if (hBt3 == null || hBt3.p == null) { f2 = 0.0f; } else { Bmx bmx3 = c16822rXU.d.p; bmx3.n.a(bmx3.v, bmx3.n.r, bmx3.x, bmx3.z, bmx3.e); float f6 = bmx3.A; if (f6 != BitmapDescriptorFactory.HUE_RED) { float[] fArr = bmx3.e; if (fArr[0] == BitmapDescriptorFactory.HUE_RED) { fArr[0] = 1.0E-7f; } f2 = (f4 * f6) / fArr[0]; } else { float[] fArr2 = bmx3.e; if (fArr2[1] == BitmapDescriptorFactory.HUE_RED) { fArr2[1] = 1.0E-7f; } f2 = (f5 * bmx3.B) / fArr2[1]; } } float f7 = this.r; if ((f7 <= BitmapDescriptorFactory.HUE_RED && f2 < BitmapDescriptorFactory.HUE_RED) || (f7 >= 1.0f && f2 > BitmapDescriptorFactory.HUE_RED)) { view.setNestedScrollingEnabled(false); view.post(new Runnable(view) { // from class: androidx.constraintlayout.motion.widget.MotionLayout.5 final View b; { this.b = view; } @Override // java.lang.Runnable public final void run() { this.b.setNestedScrollingEnabled(true); } }); return; } } float f8 = this.aC; long nanoTime = System.nanoTime(); float f9 = i; this.at = f9; float f10 = i2; this.au = f10; this.aw = (float) ((nanoTime - this.as) * 1.0E-9d); this.as = nanoTime; C16822rXU.HBt hBt4 = c16822rXU.d; if (hBt4 != null && hBt4.p != null) { Bmx bmx4 = c16822rXU.d.p; float f11 = bmx4.n.r; if (!bmx4.c) { bmx4.c = true; bmx4.n.setProgress(f11); } bmx4.n.a(bmx4.v, f11, bmx4.x, bmx4.z, bmx4.e); float f12 = bmx4.A; float[] fArr3 = bmx4.e; if (Math.abs((f12 * fArr3[0]) + (bmx4.B * fArr3[1])) < 0.01d) { float[] fArr4 = bmx4.e; fArr4[0] = 0.01f; fArr4[1] = 0.01f; } float f13 = bmx4.A; if (f13 != BitmapDescriptorFactory.HUE_RED) { f = (f9 * f13) / bmx4.e[0]; } else { f = (f10 * bmx4.B) / bmx4.e[1]; } float max = Math.max(Math.min(f11 + f, 1.0f), BitmapDescriptorFactory.HUE_RED); if (max != bmx4.n.r) { bmx4.n.setProgress(max); } } if (f8 != this.aC) { iArr[0] = i; r1 = 1; iArr[1] = i2; } else { r1 = 1; } b(false); if (iArr[0] == 0 && iArr[r1] == 0) { return; } this.aL = r1; } } /* loaded from: classes.dex */ class Sts { Paint f; Paint g; float[] h; Paint i; int j; Path k; int[] l; Paint m; float[] n; /* renamed from: o, reason: collision with root package name */ float[] f6381o; final MotionLayout p; Paint q; private DashPathEffect s; final int c = -21965; final int b = -2067046; final int a = -13391360; final int d = 1996488704; final int e = 10; private Rect r = new Rect(); private boolean u = false; int t = 1; public Sts(MotionLayout motionLayout) { this.p = motionLayout; Paint paint = new Paint(); this.i = paint; paint.setAntiAlias(true); this.i.setColor(-21965); this.i.setStrokeWidth(2.0f); this.i.setStyle(Paint.Style.STROKE); Paint paint2 = new Paint(); this.m = paint2; paint2.setAntiAlias(true); this.m.setColor(-2067046); this.m.setStrokeWidth(2.0f); this.m.setStyle(Paint.Style.STROKE); Paint paint3 = new Paint(); this.f = paint3; paint3.setAntiAlias(true); this.f.setColor(-13391360); this.f.setStrokeWidth(2.0f); this.f.setStyle(Paint.Style.STROKE); Paint paint4 = new Paint(); this.q = paint4; paint4.setAntiAlias(true); this.q.setColor(-13391360); this.q.setTextSize(motionLayout.getContext().getResources().getDisplayMetrics().density * 12.0f); this.n = new float[8]; Paint paint5 = new Paint(); this.g = paint5; paint5.setAntiAlias(true); DashPathEffect dashPathEffect = new DashPathEffect(new float[]{4.0f, 8.0f}, BitmapDescriptorFactory.HUE_RED); this.s = dashPathEffect; this.f.setPathEffect(dashPathEffect); this.h = new float[100]; this.l = new int[50]; } public final void kT_(Canvas canvas, int i, int i2, C15870jKt c15870jKt) { if (i == 4) { kN_(canvas); } if (i == 2) { float[] fArr = this.f6381o; canvas.drawLine(fArr[0], fArr[1], fArr[fArr.length - 2], fArr[fArr.length - 1], this.f); } if (i == 3) { kO_(canvas); } canvas.drawLines(this.f6381o, this.i); kS_(canvas, i, i2, c15870jKt); } private void kS_(Canvas canvas, int i, int i2, C15870jKt c15870jKt) { int i3; int i4; float f; float f2; if (c15870jKt.x != null) { i3 = c15870jKt.x.getWidth(); i4 = c15870jKt.x.getHeight(); } else { i3 = 0; i4 = 0; } int i5 = 1; int i6 = 1; while (i6 < i2 - 1) { if (i != 4 || this.l[i6 - 1] != 0) { float[] fArr = this.h; int i7 = i6 << 1; float f3 = fArr[i7]; float f4 = fArr[i7 + i5]; this.k.reset(); this.k.moveTo(f3, f4 + 10.0f); this.k.lineTo(f3 + 10.0f, f4); this.k.lineTo(f3, f4 - 10.0f); this.k.lineTo(f3 - 10.0f, f4); this.k.close(); int i8 = i6 - 1; c15870jKt.k.get(i8); if (i == 4) { int i9 = this.l[i8]; if (i9 == i5) { kQ_(canvas, f3, f4); } else if (i9 == 0) { kP_(canvas, f3, f4); } else if (i9 == 2) { f = f4; f2 = f3; kR_(canvas, f3, f4, i3, i4); canvas.drawPath(this.k, this.g); } f = f4; f2 = f3; canvas.drawPath(this.k, this.g); } else { f = f4; f2 = f3; } if (i == 2) { kQ_(canvas, f2, f); } if (i == 3) { kP_(canvas, f2, f); } if (i == 6) { kR_(canvas, f2, f, i3, i4); } canvas.drawPath(this.k, this.g); } i6++; i5 = 1; } float[] fArr2 = this.f6381o; if (fArr2.length > 1) { canvas.drawCircle(fArr2[0], fArr2[1], 8.0f, this.m); float[] fArr3 = this.f6381o; canvas.drawCircle(fArr3[fArr3.length - 2], fArr3[fArr3.length - 1], 8.0f, this.m); } } private void kN_(Canvas canvas) { boolean z = false; boolean z2 = false; for (int i = 0; i < this.j; i++) { int i2 = this.l[i]; if (i2 == 1) { z = true; } if (i2 == 0) { z2 = true; } } if (z) { float[] fArr = this.f6381o; canvas.drawLine(fArr[0], fArr[1], fArr[fArr.length - 2], fArr[fArr.length - 1], this.f); } if (z2) { kO_(canvas); } } private void kQ_(Canvas canvas, float f, float f2) { float[] fArr = this.f6381o; float f3 = fArr[0]; float f4 = fArr[1]; float f5 = fArr[fArr.length - 2]; float f6 = fArr[fArr.length - 1]; float hypot = (float) Math.hypot(f3 - f5, f4 - f6); float f7 = f5 - f3; float f8 = f6 - f4; float f9 = (((f - f3) * f7) + ((f2 - f4) * f8)) / (hypot * hypot); float f10 = f3 + (f7 * f9); float f11 = f4 + (f9 * f8); Path path = new Path(); path.moveTo(f, f2); path.lineTo(f10, f11); float hypot2 = (float) Math.hypot(f10 - f, f11 - f2); StringBuilder sb = new StringBuilder(""); sb.append(((int) ((hypot2 * 100.0f) / hypot)) / 100.0f); String obj = sb.toString(); this.q.getTextBounds(obj, 0, obj.length(), this.r); canvas.drawTextOnPath(obj, path, (hypot2 / 2.0f) - (this.r.width() / 2), -20.0f, this.q); canvas.drawLine(f, f2, f10, f11, this.f); } private void kO_(Canvas canvas) { float[] fArr = this.f6381o; float f = fArr[0]; float f2 = fArr[1]; float f3 = fArr[fArr.length - 2]; float f4 = fArr[fArr.length - 1]; canvas.drawLine(Math.min(f, f3), Math.max(f2, f4), Math.max(f, f3), Math.max(f2, f4), this.f); canvas.drawLine(Math.min(f, f3), Math.min(f2, f4), Math.min(f, f3), Math.max(f2, f4), this.f); } private void kP_(Canvas canvas, float f, float f2) { float[] fArr = this.f6381o; float f3 = fArr[0]; float f4 = fArr[1]; float f5 = fArr[fArr.length - 2]; float f6 = fArr[fArr.length - 1]; float min = Math.min(f3, f5); float max = Math.max(f4, f6); float min2 = f - Math.min(f3, f5); float max2 = Math.max(f4, f6) - f2; StringBuilder sb = new StringBuilder(""); sb.append(((int) (((min2 * 100.0f) / Math.abs(f5 - f3)) + 0.5d)) / 100.0f); String obj = sb.toString(); this.q.getTextBounds(obj, 0, obj.length(), this.r); canvas.drawText(obj, ((min2 / 2.0f) - (this.r.width() / 2)) + min, f2 - 20.0f, this.q); canvas.drawLine(f, f2, Math.min(f3, f5), f2, this.f); StringBuilder sb2 = new StringBuilder(""); sb2.append(((int) (((max2 * 100.0f) / Math.abs(f6 - f4)) + 0.5d)) / 100.0f); String obj2 = sb2.toString(); this.q.getTextBounds(obj2, 0, obj2.length(), this.r); canvas.drawText(obj2, f + 5.0f, max - ((max2 / 2.0f) - (this.r.height() / 2)), this.q); canvas.drawLine(f, f2, f, Math.max(f4, f6), this.f); } private void kR_(Canvas canvas, float f, float f2, int i, int i2) { StringBuilder sb = new StringBuilder(""); sb.append(((int) ((((f - (i / 2)) * 100.0f) / (this.p.getWidth() - i)) + 0.5d)) / 100.0f); String obj = sb.toString(); this.q.getTextBounds(obj, 0, obj.length(), this.r); canvas.drawText(obj, ((f / 2.0f) - (this.r.width() / 2)) + BitmapDescriptorFactory.HUE_RED, f2 - 20.0f, this.q); canvas.drawLine(f, f2, Math.min(BitmapDescriptorFactory.HUE_RED, 1.0f), f2, this.f); StringBuilder sb2 = new StringBuilder(""); sb2.append(((int) ((((f2 - (i2 / 2)) * 100.0f) / (this.p.getHeight() - i2)) + 0.5d)) / 100.0f); String obj2 = sb2.toString(); this.q.getTextBounds(obj2, 0, obj2.length(), this.r); canvas.drawText(obj2, f + 5.0f, BitmapDescriptorFactory.HUE_RED - ((f2 / 2.0f) - (this.r.height() / 2)), this.q); canvas.drawLine(f, f2, f, Math.max(BitmapDescriptorFactory.HUE_RED, 1.0f), this.f); } } /* JADX WARN: Removed duplicated region for block: B:130:0x032c */ /* JADX WARN: Removed duplicated region for block: B:146:0x035d */ /* JADX WARN: Removed duplicated region for block: B:152:0x038c */ /* JADX WARN: Removed duplicated region for block: B:157:0x03bf */ /* JADX WARN: Removed duplicated region for block: B:159:0x03d9 */ /* JADX WARN: Removed duplicated region for block: B:162:0x03e5 */ /* JADX WARN: Removed duplicated region for block: B:166:0x03c9 */ /* JADX WARN: Removed duplicated region for block: B:168:0x0397 */ /* JADX WARN: Removed duplicated region for block: B:169:0x037a */ /* JADX WARN: Removed duplicated region for block: B:38:0x00ba */ /* JADX WARN: Removed duplicated region for block: B:41:0x00e0 */ /* JADX WARN: Removed duplicated region for block: B:44:0x0102 */ /* JADX WARN: Removed duplicated region for block: B:46:0x0105 */ /* JADX WARN: Removed duplicated region for block: B:48:0x00e2 */ /* JADX WARN: Removed duplicated region for block: B:49:0x00bc */ @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup, android.view.View /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public void dispatchDraw(android.graphics.Canvas r30) { /* Method dump skipped, instructions count: 1403 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.motion.widget.MotionLayout.dispatchDraw(android.graphics.Canvas):void"); } public final void e(boolean z) { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { C15870jKt c15870jKt = this.j.get(getChildAt(i)); if (c15870jKt != null && "button".equals(C6805ccO.d(c15870jKt.x)) && c15870jKt.f9181o != null) { int i2 = 0; while (true) { AZC[] azcArr = c15870jKt.f9181o; if (i2 < azcArr.length) { azcArr[i2].e(z ? -100.0f : 100.0f, c15870jKt.x); i2++; } } } } } @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup, android.view.View public void onLayout(boolean z, int i, int i2, int i3, int i4) { this.M = true; try { if (this.q == null) { super.onLayout(z, i, i2, i3, i4); return; } int i5 = i3 - i; int i6 = i4 - i2; if (this.aa != i5 || this.ab != i6) { this.ad.a(); invalidate(); b(true); } this.aa = i5; this.ab = i6; this.ai = i5; this.ae = i6; } finally { this.M = false; } } @Override // androidx.constraintlayout.widget.ConstraintLayout public final void e(int i) { this.y = null; } private void kM_(AttributeSet attributeSet) { C16822rXU c16822rXU; b = isInEditMode(); if (attributeSet != null) { TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, C3345avm.IeS.MotionLayout); int indexCount = obtainStyledAttributes.getIndexCount(); boolean z = true; for (int i = 0; i < indexCount; i++) { int index = obtainStyledAttributes.getIndex(i); if (index == C3345avm.IeS.MotionLayout_layoutDescription) { this.q = new C16822rXU(getContext(), this, obtainStyledAttributes.getResourceId(index, -1)); } else if (index == C3345avm.IeS.MotionLayout_currentState) { this.e = obtainStyledAttributes.getResourceId(index, -1); } else if (index == C3345avm.IeS.MotionLayout_motionProgress) { this.aE = obtainStyledAttributes.getFloat(index, BitmapDescriptorFactory.HUE_RED); this.L = true; } else if (index == C3345avm.IeS.MotionLayout_applyMotionScene) { z = obtainStyledAttributes.getBoolean(index, z); } else if (index == C3345avm.IeS.MotionLayout_showPaths) { if (this.c == 0) { this.c = obtainStyledAttributes.getBoolean(index, false) ? 2 : 0; } } else if (index == C3345avm.IeS.MotionLayout_motionDebug) { this.c = obtainStyledAttributes.getInt(index, 0); } } obtainStyledAttributes.recycle(); if (!z) { this.q = null; } } if (this.c != 0) { f(); } if (this.e != -1 || (c16822rXU = this.q) == null) { return; } C16822rXU.HBt hBt = c16822rXU.d; this.e = hBt == null ? -1 : hBt.e; C16822rXU.HBt hBt2 = this.q.d; this.d = hBt2 == null ? -1 : hBt2.e; C16822rXU.HBt hBt3 = this.q.d; this.a = hBt3 != null ? hBt3.c : -1; } public void setScene(C16822rXU c16822rXU) { this.q = c16822rXU; c16822rXU.d(c()); this.ad.a(); invalidate(); } private void f() { C16822rXU c16822rXU = this.q; if (c16822rXU == null) { return; } C16822rXU.HBt hBt = c16822rXU.d; int i = hBt == null ? -1 : hBt.e; C16822rXU c16822rXU2 = this.q; C16822rXU.HBt hBt2 = c16822rXU2.d; yqQ e = c16822rXU2.e(hBt2 != null ? hBt2.e : -1); C6805ccO.e(getContext(), i); int childCount = getChildCount(); for (int i2 = 0; i2 < childCount; i2++) { View childAt = getChildAt(i2); int id = childAt.getId(); if ((e.a.containsKey(Integer.valueOf(id)) ? e.a.get(Integer.valueOf(id)) : null) == null) { C6805ccO.d(childAt); } } Integer[] numArr = (Integer[]) e.a.keySet().toArray(new Integer[0]); int length = numArr.length; int[] iArr = new int[length]; for (int i3 = 0; i3 < length; i3++) { iArr[i3] = numArr[i3].intValue(); } for (int i4 = 0; i4 < length; i4++) { int i5 = iArr[i4]; C6805ccO.e(getContext(), i5); findViewById(iArr[i4]); int i6 = e.b(i5).a.R; int i7 = e.b(i5).a.X; } SparseIntArray sparseIntArray = new SparseIntArray(); SparseIntArray sparseIntArray2 = new SparseIntArray(); Iterator it = this.q.h.iterator(); while (it.hasNext()) { C16822rXU.HBt next = it.next(); C16822rXU.HBt hBt3 = this.q.d; int i8 = next.e; int i9 = next.c; int i10 = next.e; int i11 = next.c; C6805ccO.e(getContext(), i10); C6805ccO.e(getContext(), i11); sparseIntArray.get(i10); sparseIntArray2.get(i11); sparseIntArray.put(i10, i11); sparseIntArray2.put(i11, i10); this.q.e(i10); this.q.e(i11); } } public void setDebugMode(int i) { this.c = i; invalidate(); } private boolean kL_(float f, float f2, View view, MotionEvent motionEvent) { boolean z; boolean onTouchEvent; if (view instanceof ViewGroup) { ViewGroup viewGroup = (ViewGroup) view; for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) { if (kL_((r3.getLeft() + f) - view.getScrollX(), (r3.getTop() + f2) - view.getScrollY(), viewGroup.getChildAt(childCount), motionEvent)) { z = true; break; } } } z = false; if (!z) { this.I.set(f, f2, (view.getRight() + f) - view.getLeft(), (view.getBottom() + f2) - view.getTop()); if (motionEvent.getAction() != 0 || this.I.contains(motionEvent.getX(), motionEvent.getY())) { float f3 = -f; float f4 = -f2; Matrix matrix = view.getMatrix(); if (matrix.isIdentity()) { motionEvent.offsetLocation(f3, f4); onTouchEvent = view.onTouchEvent(motionEvent); motionEvent.offsetLocation(-f3, -f4); } else { MotionEvent obtain = MotionEvent.obtain(motionEvent); obtain.offsetLocation(f3, f4); if (this.P == null) { this.P = new Matrix(); } matrix.invert(this.P); obtain.transform(this.P); onTouchEvent = view.onTouchEvent(obtain); obtain.recycle(); } if (onTouchEvent) { return true; } } } return z; } /* JADX WARN: Removed duplicated region for block: B:71:0x00f2 */ @Override // android.view.ViewGroup /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public boolean onInterceptTouchEvent(android.view.MotionEvent r23) { /* Method dump skipped, instructions count: 446 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.motion.widget.MotionLayout.onInterceptTouchEvent(android.view.MotionEvent):boolean"); } @Override // android.view.View public boolean onTouchEvent(MotionEvent motionEvent) { C16822rXU c16822rXU = this.q; if (c16822rXU != null && this.h && c16822rXU.c()) { if (this.q.d != null && !(!r0.g)) { return super.onTouchEvent(motionEvent); } this.q.kY_(motionEvent, this.e, this); if ((this.q.d.t & 4) != 0) { return this.q.d.p.c; } return true; } return super.onTouchEvent(motionEvent); } @Override // android.view.ViewGroup, android.view.View protected void onAttachedToWindow() { int i; super.onAttachedToWindow(); Display display = getDisplay(); if (display != null) { this.ao = display.getRotation(); } C16822rXU c16822rXU = this.q; if (c16822rXU != null && (i = this.e) != -1) { yqQ e = c16822rXU.e(i); C16822rXU c16822rXU2 = this.q; loop0: for (int i2 = 0; i2 < c16822rXU2.b.size(); i2++) { int keyAt = c16822rXU2.b.keyAt(i2); int i3 = c16822rXU2.e.get(keyAt); int size = c16822rXU2.e.size(); while (i3 > 0) { if (i3 == keyAt || size < 0) { break loop0; } i3 = c16822rXU2.e.get(i3); size--; } c16822rXU2.e(keyAt, this); } if (e != null) { e.d(this); } this.d = this.e; } e(); tOB tob = this.av; if (tob != null) { if (this.E) { post(new Runnable(this) { // from class: androidx.constraintlayout.motion.widget.MotionLayout.3 final MotionLayout b; { this.b = this; } @Override // java.lang.Runnable public final void run() { this.b.av.c(); } }); return; } else { tob.c(); return; } } C16822rXU c16822rXU3 = this.q; if (c16822rXU3 == null || c16822rXU3.d == null || this.q.d.a != 4) { return; } e(1.0f); this.n = null; c(saX.SETUP); c(saX.MOVING); } @Override // android.view.View public void onRtlPropertiesChanged(int i) { C16822rXU c16822rXU = this.q; if (c16822rXU != null) { c16822rXU.d(c()); } } public final void e() { C16822rXU c16822rXU; C16822rXU.HBt hBt; C16822rXU c16822rXU2 = this.q; if (c16822rXU2 == null) { return; } if (c16822rXU2.a(this, this.e)) { requestLayout(); return; } int i = this.e; if (i != -1) { this.q.c(this, i); } if (!this.q.c() || (hBt = (c16822rXU = this.q).d) == null || hBt.p == null) { return; } c16822rXU.d.p.c(); } public final void a(int i, float f, float f2, float f3, float[] fArr) { double[] dArr; HashMap hashMap = this.j; View view = this.w.get(i); C15870jKt c15870jKt = hashMap.get(view); if (c15870jKt == null) { if (view != null) { view.getContext().getResources().getResourceName(i); return; } return; } float a = c15870jKt.a(f, c15870jKt.u); ktU[] ktuArr = c15870jKt.s; int i2 = 0; if (ktuArr != null) { double d = a; ktuArr[0].b(d, c15870jKt.n); c15870jKt.s[0].a(d, c15870jKt.f); float f4 = c15870jKt.u[0]; while (true) { dArr = c15870jKt.n; if (i2 >= dArr.length) { break; } dArr[i2] = dArr[i2] * f4; i2++; } ktU ktu = c15870jKt.b; if (ktu != null) { double[] dArr2 = c15870jKt.f; if (dArr2.length > 0) { ktu.a(d, dArr2); c15870jKt.b.b(d, c15870jKt.n); C11094eYU c11094eYU = c15870jKt.v; C11094eYU.c(f2, f3, fArr, c15870jKt.m, c15870jKt.n, c15870jKt.f); } } else { C11094eYU c11094eYU2 = c15870jKt.v; C11094eYU.c(f2, f3, fArr, c15870jKt.m, dArr, c15870jKt.f); } } else { float f5 = c15870jKt.h.s - c15870jKt.v.s; float f6 = c15870jKt.h.r - c15870jKt.v.r; float f7 = c15870jKt.h.f8961o; float f8 = c15870jKt.v.f8961o; float f9 = c15870jKt.h.d; float f10 = c15870jKt.v.d; fArr[0] = ((1.0f - f2) * f5) + (((f7 - f8) + f5) * f2); fArr[1] = ((1.0f - f3) * f6) + (((f9 - f10) + f6) * f3); } float y = view.getY(); this.C = f; this.D = y; } private void j() { CopyOnWriteArrayList copyOnWriteArrayList; if ((this.u == null && ((copyOnWriteArrayList = this.v) == null || copyOnWriteArrayList.isEmpty())) || this.ag == this.aC) { return; } if (this.af != -1) { CopyOnWriteArrayList copyOnWriteArrayList2 = this.v; if (copyOnWriteArrayList2 != null) { Iterator it = copyOnWriteArrayList2.iterator(); while (it.hasNext()) { it.next(); } } this.Q = true; } this.af = -1; this.ag = this.aC; CopyOnWriteArrayList copyOnWriteArrayList3 = this.v; if (copyOnWriteArrayList3 != null) { Iterator it2 = copyOnWriteArrayList3.iterator(); while (it2.hasNext()) { it2.next(); } } this.Q = true; } private void g() { int i; CopyOnWriteArrayList copyOnWriteArrayList; if ((this.u != null || ((copyOnWriteArrayList = this.v) != null && !copyOnWriteArrayList.isEmpty())) && this.af == -1) { this.af = this.e; if (this.ay.isEmpty()) { i = -1; } else { i = this.ay.get(r0.size() - 1).intValue(); } int i2 = this.e; if (i != i2 && i2 != -1) { this.ay.add(Integer.valueOf(i2)); } } h(); Runnable runnable = this.n; if (runnable != null) { runnable.run(); } } private void h() { CopyOnWriteArrayList copyOnWriteArrayList; if (this.u == null && ((copyOnWriteArrayList = this.v) == null || copyOnWriteArrayList.isEmpty())) { return; } this.Q = false; Iterator it = this.ay.iterator(); while (it.hasNext()) { it.next(); CopyOnWriteArrayList copyOnWriteArrayList2 = this.v; if (copyOnWriteArrayList2 != null) { Iterator it2 = copyOnWriteArrayList2.iterator(); while (it2.hasNext()) { it2.next(); } } } this.ay.clear(); } @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup public void onViewAdded(View view) { super.onViewAdded(view); if (view instanceof MotionHelper) { MotionHelper motionHelper = (MotionHelper) view; if (this.v == null) { this.v = new CopyOnWriteArrayList<>(); } this.v.add(motionHelper); if (motionHelper.d) { if (this.aj == null) { this.aj = new ArrayList<>(); } this.aj.add(motionHelper); } if (motionHelper.e) { if (this.ak == null) { this.ak = new ArrayList<>(); } this.ak.add(motionHelper); } } } @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup public void onViewRemoved(View view) { super.onViewRemoved(view); ArrayList arrayList = this.aj; if (arrayList != null) { arrayList.remove(view); } ArrayList arrayList2 = this.ak; if (arrayList2 != null) { arrayList2.remove(view); } } public void setOnShow(float f) { ArrayList arrayList = this.aj; if (arrayList != null) { int size = arrayList.size(); for (int i = 0; i < size; i++) { this.aj.get(i).setProgress(f); } } } public void setOnHide(float f) { ArrayList arrayList = this.ak; if (arrayList != null) { int size = arrayList.size(); for (int i = 0; i < size; i++) { this.ak.get(i).setProgress(f); } } } public final void d(int i, yqQ yqq) { C16822rXU c16822rXU = this.q; if (c16822rXU != null) { c16822rXU.b.put(i, yqq); } HBt hBt = this.ad; WqU wqU = this.z; hBt.a(this.q.e(this.d), this.q.e(this.a)); this.ad.a(); invalidate(); if (this.e == i) { yqq.d(this); } } public void setTransitionDuration(int i) { C16822rXU c16822rXU = this.q; if (c16822rXU == null) { return; } C16822rXU.HBt hBt = c16822rXU.d; if (hBt != null) { hBt.h = Math.max(i, 8); } else { c16822rXU.a = i; } } static /* synthetic */ void e(MotionLayout motionLayout) { int childCount = motionLayout.getChildCount(); motionLayout.ad.d(); motionLayout.L = true; SparseArray sparseArray = new SparseArray(); int i = 0; for (int i2 = 0; i2 < childCount; i2++) { View childAt = motionLayout.getChildAt(i2); sparseArray.put(childAt.getId(), motionLayout.j.get(childAt)); } int width = motionLayout.getWidth(); int height = motionLayout.getHeight(); C16822rXU.HBt hBt = motionLayout.q.d; int i3 = hBt != null ? hBt.k : -1; if (i3 != -1) { for (int i4 = 0; i4 < childCount; i4++) { C15870jKt c15870jKt = motionLayout.j.get(motionLayout.getChildAt(i4)); if (c15870jKt != null) { c15870jKt.r = i3; } } } SparseBooleanArray sparseBooleanArray = new SparseBooleanArray(); int[] iArr = new int[motionLayout.j.size()]; int i5 = 0; for (int i6 = 0; i6 < childCount; i6++) { C15870jKt c15870jKt2 = motionLayout.j.get(motionLayout.getChildAt(i6)); if (c15870jKt2.v.e != -1) { sparseBooleanArray.put(c15870jKt2.v.e, true); iArr[i5] = c15870jKt2.v.e; i5++; } } ArrayList arrayList = motionLayout.F; for (int i7 = 0; i7 < i5; i7++) { C15870jKt c15870jKt3 = motionLayout.j.get(motionLayout.findViewById(iArr[i7])); if (c15870jKt3 != null) { motionLayout.q.e(c15870jKt3); float f = motionLayout.ax; c15870jKt3.b(width, height, System.nanoTime()); } } for (int i8 = 0; i8 < childCount; i8++) { View childAt2 = motionLayout.getChildAt(i8); C15870jKt c15870jKt4 = motionLayout.j.get(childAt2); if (!sparseBooleanArray.get(childAt2.getId()) && c15870jKt4 != null) { motionLayout.q.e(c15870jKt4); float f2 = motionLayout.ax; c15870jKt4.b(width, height, System.nanoTime()); } } C16822rXU.HBt hBt2 = motionLayout.q.d; float f3 = hBt2 != null ? hBt2.q : 0.0f; if (f3 != BitmapDescriptorFactory.HUE_RED) { boolean z = ((double) f3) < 0.0d; float abs = Math.abs(f3); float f4 = Float.MAX_VALUE; float f5 = -3.4028235E38f; float f6 = Float.MAX_VALUE; float f7 = -3.4028235E38f; for (int i9 = 0; i9 < childCount; i9++) { C15870jKt c15870jKt5 = motionLayout.j.get(motionLayout.getChildAt(i9)); if (!Float.isNaN(c15870jKt5.q)) { for (int i10 = 0; i10 < childCount; i10++) { C15870jKt c15870jKt6 = motionLayout.j.get(motionLayout.getChildAt(i10)); if (!Float.isNaN(c15870jKt6.q)) { f4 = Math.min(f4, c15870jKt6.q); f5 = Math.max(f5, c15870jKt6.q); } } while (i < childCount) { C15870jKt c15870jKt7 = motionLayout.j.get(motionLayout.getChildAt(i)); if (!Float.isNaN(c15870jKt7.q)) { c15870jKt7.y = 1.0f / (1.0f - abs); if (z) { c15870jKt7.p = abs - (((f5 - c15870jKt7.q) / (f5 - f4)) * abs); } else { c15870jKt7.p = abs - (((c15870jKt7.q - f4) * abs) / (f5 - f4)); } } i++; } return; } float f8 = c15870jKt5.h.s; float f9 = c15870jKt5.h.r; float f10 = z ? f9 - f8 : f9 + f8; f6 = Math.min(f6, f10); f7 = Math.max(f7, f10); } while (i < childCount) { C15870jKt c15870jKt8 = motionLayout.j.get(motionLayout.getChildAt(i)); float f11 = c15870jKt8.h.s; float f12 = c15870jKt8.h.r; float f13 = z ? f12 - f11 : f12 + f11; c15870jKt8.y = 1.0f / (1.0f - abs); c15870jKt8.p = abs - (((f13 - f6) * abs) / (f7 - f6)); i++; } } } /* JADX WARN: Code restructure failed: missing block: B:19:0x024b, code lost: if (r1 != r2) goto L160; */ /* JADX WARN: Code restructure failed: missing block: B:20:0x024e, code lost: r6 = r7; */ /* JADX WARN: Code restructure failed: missing block: B:21:0x024f, code lost: r22.e = r2; r7 = r6; */ /* JADX WARN: Code restructure failed: missing block: B:33:0x025b, code lost: if (r1 != r2) goto L160; */ /* JADX WARN: Removed duplicated region for block: B:115:0x01be */ /* JADX WARN: Removed duplicated region for block: B:125:0x01ec */ /* JADX WARN: Removed duplicated region for block: B:158:0x0151 */ /* JADX WARN: Removed duplicated region for block: B:73:0x0111 */ /* JADX WARN: Removed duplicated region for block: B:75:0x0118 */ /* JADX WARN: Removed duplicated region for block: B:90:0x014f */ /* JADX WARN: Removed duplicated region for block: B:93:0x0159 */ /* JADX WARN: Removed duplicated region for block: B:96:0x0170 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void b(boolean r23) { /* Method dump skipped, instructions count: 625 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.motion.widget.MotionLayout.b(boolean):void"); } @Override // o.FEJ public final void e(View view, View view2, int i, int i2) { this.as = System.nanoTime(); this.aw = BitmapDescriptorFactory.HUE_RED; this.at = BitmapDescriptorFactory.HUE_RED; this.au = BitmapDescriptorFactory.HUE_RED; } /* JADX WARN: Code restructure failed: missing block: B:20:0x003d, code lost: if (r12 != 7) goto L117; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void a(int r12, float r13, float r14) { /* Method dump skipped, instructions count: 422 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.motion.widget.MotionLayout.a(int, float, float):void"); } public void setTransition(int i) { C16822rXU.HBt hBt; C16822rXU c16822rXU = this.q; if (c16822rXU != null) { Iterator it = c16822rXU.h.iterator(); while (true) { if (!it.hasNext()) { hBt = null; break; } else { hBt = it.next(); if (hBt.i == i) { break; } } } this.d = hBt.e; this.a = hBt.c; if (isAttachedToWindow()) { int i2 = this.e; float f = i2 == this.d ? 0.0f : i2 == this.a ? 1.0f : Float.NaN; C16822rXU c16822rXU2 = this.q; c16822rXU2.d = hBt; if (hBt != null && hBt.p != null) { c16822rXU2.d.p.a(c16822rXU2.c); } HBt hBt2 = this.ad; WqU wqU = this.z; hBt2.a(this.q.e(this.d), this.q.e(this.a)); this.ad.a(); invalidate(); if (this.r != f) { if (f == BitmapDescriptorFactory.HUE_RED) { e(true); this.q.e(this.d).d(this); } else if (f == 1.0f) { e(false); this.q.e(this.a).d(this); } } this.r = !Float.isNaN(f) ? f : 0.0f; if (Float.isNaN(f)) { C6805ccO.a(); e(BitmapDescriptorFactory.HUE_RED); return; } else { setProgress(f); return; } } if (this.av == null) { this.av = new tOB(this); } this.av.g = this.d; this.av.d = this.a; } } public void setTransitionListener(ZqN zqN) { this.u = zqN; } public void setInteractionEnabled(boolean z) { this.h = z; } public void setDelayedApplicationOfInitialState(boolean z) { this.E = z; } }