1030 lines
43 KiB
Java
1030 lines
43 KiB
Java
|
package o;
|
||
|
|
||
|
import android.util.SparseIntArray;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import com.airbnb.deeplinkdispatch.UrlTreeKt;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import com.google.common.base.Ascii;
|
||
|
import io.flutter.embedding.android.KeyboardMap;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Arrays;
|
||
|
import java.util.Collections;
|
||
|
import java.util.List;
|
||
|
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class EiS {
|
||
|
private boolean[] a;
|
||
|
public int[] b;
|
||
|
private long[] c;
|
||
|
public final DNa d;
|
||
|
public long[] e;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static class RVV {
|
||
|
public int a;
|
||
|
public List<C3223atU> d;
|
||
|
}
|
||
|
|
||
|
public EiS(DNa dNa) {
|
||
|
this.d = dNa;
|
||
|
}
|
||
|
|
||
|
public final List<IeS> e(int i) {
|
||
|
ArrayList arrayList = new ArrayList(i);
|
||
|
byte b = 0;
|
||
|
for (int i2 = 0; i2 < i; i2++) {
|
||
|
rqd rqdVar = (rqd) this.d.d(i2).getLayoutParams();
|
||
|
IeS ieS = new IeS(b);
|
||
|
ieS.a = rqdVar.m();
|
||
|
ieS.b = i2;
|
||
|
arrayList.add(ieS);
|
||
|
}
|
||
|
return arrayList;
|
||
|
}
|
||
|
|
||
|
public static int[] Ht_(int i, List<IeS> list, SparseIntArray sparseIntArray) {
|
||
|
Collections.sort(list);
|
||
|
sparseIntArray.clear();
|
||
|
int[] iArr = new int[i];
|
||
|
int i2 = 0;
|
||
|
for (IeS ieS : list) {
|
||
|
iArr[i2] = ieS.b;
|
||
|
sparseIntArray.append(ieS.b, ieS.a);
|
||
|
i2++;
|
||
|
}
|
||
|
return iArr;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:104:0x03d1 A[ADDED_TO_REGION, SYNTHETIC] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:107:0x0334 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:108:0x0329 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:109:0x031e */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:110:0x02f8 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:111:0x02ec */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:112:0x02e1 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:60:0x02d2 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:63:0x02dc */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:65:0x02e7 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:68:0x02f3 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:71:0x0319 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:73:0x0324 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:75:0x032f */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:78:0x0351 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:84:0x0386 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:89:0x03a2 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:97:0x03ca A[ADDED_TO_REGION] */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final void b(o.EiS.RVV r27, int r28, int r29, int r30, int r31, int r32, java.util.List<o.C3223atU> r33) {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 1008
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.EiS.b(o.EiS$RVV, int, int, int, int, int, java.util.List):void");
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:12:? A[RETURN, SYNTHETIC] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:13:0x0032 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:7:0x002d */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:9:0x0040 */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private void d(android.view.View r7, int r8) {
|
||
|
/*
|
||
|
r6 = this;
|
||
|
android.view.ViewGroup$LayoutParams r0 = r7.getLayoutParams()
|
||
|
o.rqd r0 = (o.rqd) r0
|
||
|
int r1 = r7.getMeasuredWidth()
|
||
|
int r2 = r7.getMeasuredHeight()
|
||
|
int r3 = r0.o()
|
||
|
r4 = 1
|
||
|
if (r1 >= r3) goto L1a
|
||
|
int r1 = r0.o()
|
||
|
goto L24
|
||
|
L1a:
|
||
|
int r3 = r0.n()
|
||
|
if (r1 <= r3) goto L26
|
||
|
int r1 = r0.n()
|
||
|
L24:
|
||
|
r3 = r4
|
||
|
goto L27
|
||
|
L26:
|
||
|
r3 = 0
|
||
|
L27:
|
||
|
int r5 = r0.k()
|
||
|
if (r2 >= r5) goto L32
|
||
|
int r2 = r0.k()
|
||
|
goto L3e
|
||
|
L32:
|
||
|
int r5 = r0.j()
|
||
|
if (r2 <= r5) goto L3d
|
||
|
int r2 = r0.j()
|
||
|
goto L3e
|
||
|
L3d:
|
||
|
r4 = r3
|
||
|
L3e:
|
||
|
if (r4 == 0) goto L55
|
||
|
r0 = 1073741824(0x40000000, float:2.0)
|
||
|
int r1 = android.view.View.MeasureSpec.makeMeasureSpec(r1, r0)
|
||
|
int r0 = android.view.View.MeasureSpec.makeMeasureSpec(r2, r0)
|
||
|
r7.measure(r1, r0)
|
||
|
r6.b(r8, r1, r0, r7)
|
||
|
o.DNa r0 = r6.d
|
||
|
r0.c(r8, r7)
|
||
|
L55:
|
||
|
return
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.EiS.d(android.view.View, int):void");
|
||
|
}
|
||
|
|
||
|
public final void e(int i, int i2, int i3) {
|
||
|
int size;
|
||
|
int paddingLeft;
|
||
|
int paddingRight;
|
||
|
int i4;
|
||
|
int i5;
|
||
|
List<C3223atU> list;
|
||
|
int i6;
|
||
|
int i7;
|
||
|
char c;
|
||
|
int i8;
|
||
|
int i9;
|
||
|
int i10;
|
||
|
boolean z;
|
||
|
int i11;
|
||
|
int i12;
|
||
|
int i13;
|
||
|
List<C3223atU> list2;
|
||
|
int i14;
|
||
|
int i15;
|
||
|
int max;
|
||
|
double d;
|
||
|
double d2;
|
||
|
int i16 = i;
|
||
|
int j = this.d.j();
|
||
|
boolean[] zArr = this.a;
|
||
|
boolean z2 = false;
|
||
|
if (zArr == null) {
|
||
|
if (j < 10) {
|
||
|
j = 10;
|
||
|
}
|
||
|
this.a = new boolean[j];
|
||
|
} else if (zArr.length < j) {
|
||
|
int length = zArr.length << 1;
|
||
|
if (length >= j) {
|
||
|
j = length;
|
||
|
}
|
||
|
this.a = new boolean[j];
|
||
|
} else {
|
||
|
Arrays.fill(zArr, false);
|
||
|
}
|
||
|
if (i3 >= this.d.j()) {
|
||
|
return;
|
||
|
}
|
||
|
int i17 = this.d.i();
|
||
|
int i18 = this.d.i();
|
||
|
if (i18 == 0 || i18 == 1) {
|
||
|
int mode = View.MeasureSpec.getMode(i);
|
||
|
size = View.MeasureSpec.getSize(i);
|
||
|
if (mode != 1073741824) {
|
||
|
size = this.d.f();
|
||
|
}
|
||
|
paddingLeft = this.d.getPaddingLeft();
|
||
|
paddingRight = this.d.getPaddingRight();
|
||
|
} else if (i18 == 2 || i18 == 3) {
|
||
|
int mode2 = View.MeasureSpec.getMode(i2);
|
||
|
size = View.MeasureSpec.getSize(i2);
|
||
|
if (mode2 != 1073741824) {
|
||
|
size = this.d.f();
|
||
|
}
|
||
|
paddingLeft = this.d.getPaddingTop();
|
||
|
paddingRight = this.d.getPaddingBottom();
|
||
|
} else {
|
||
|
throw new IllegalArgumentException("Invalid flex direction: ".concat(String.valueOf(i17)));
|
||
|
}
|
||
|
int i19 = paddingLeft + paddingRight;
|
||
|
int[] iArr = this.b;
|
||
|
int i20 = iArr != null ? iArr[i3] : 0;
|
||
|
List<C3223atU> h = this.d.h();
|
||
|
int size2 = h.size();
|
||
|
while (i20 < size2) {
|
||
|
C3223atU c3223atU = h.get(i20);
|
||
|
int i21 = c3223atU.i;
|
||
|
int i22 = PKIFailureInfo.systemUnavail;
|
||
|
if (i21 >= size) {
|
||
|
i4 = i20;
|
||
|
i5 = size;
|
||
|
list = h;
|
||
|
i6 = size2;
|
||
|
i7 = i19;
|
||
|
boolean z3 = false;
|
||
|
while (true) {
|
||
|
int i23 = c3223atU.i;
|
||
|
if (c3223atU.r > BitmapDescriptorFactory.HUE_RED) {
|
||
|
int i24 = i5;
|
||
|
if (i24 > c3223atU.i) {
|
||
|
i5 = i24;
|
||
|
break;
|
||
|
}
|
||
|
float f = (c3223atU.i - i24) / c3223atU.r;
|
||
|
c3223atU.i = c3223atU.d + i7;
|
||
|
if (!z3) {
|
||
|
c3223atU.b = PKIFailureInfo.systemUnavail;
|
||
|
}
|
||
|
float f2 = 0.0f;
|
||
|
boolean z4 = false;
|
||
|
int i25 = 0;
|
||
|
int i26 = 0;
|
||
|
while (i25 < c3223atU.h) {
|
||
|
int i27 = c3223atU.e + i25;
|
||
|
View c2 = this.d.c(i27);
|
||
|
if (c2 == null || c2.getVisibility() == 8) {
|
||
|
i8 = i23;
|
||
|
i9 = i24;
|
||
|
z4 = z4;
|
||
|
} else {
|
||
|
rqd rqdVar = (rqd) c2.getLayoutParams();
|
||
|
int i28 = this.d.i();
|
||
|
if (i28 != 0) {
|
||
|
i9 = i24;
|
||
|
if (i28 != 1) {
|
||
|
int measuredHeight = c2.getMeasuredHeight();
|
||
|
long[] jArr = this.c;
|
||
|
if (jArr != null) {
|
||
|
long j2 = jArr[i27];
|
||
|
i10 = i23;
|
||
|
measuredHeight = (int) (j2 >> 32);
|
||
|
} else {
|
||
|
i10 = i23;
|
||
|
}
|
||
|
int measuredWidth = c2.getMeasuredWidth();
|
||
|
long[] jArr2 = this.c;
|
||
|
i8 = i10;
|
||
|
boolean z5 = z4;
|
||
|
int i29 = jArr2 != null ? (int) jArr2[i27] : measuredWidth;
|
||
|
if (this.a[i27] || rqdVar.e() <= BitmapDescriptorFactory.HUE_RED) {
|
||
|
z4 = z5;
|
||
|
} else {
|
||
|
float e = measuredHeight - (rqdVar.e() * f);
|
||
|
if (i25 == c3223atU.h - 1) {
|
||
|
e += f2;
|
||
|
f2 = 0.0f;
|
||
|
}
|
||
|
int round = Math.round(e);
|
||
|
if (round < rqdVar.k()) {
|
||
|
round = rqdVar.k();
|
||
|
this.a[i27] = true;
|
||
|
c3223atU.r -= rqdVar.e();
|
||
|
z = true;
|
||
|
} else {
|
||
|
f2 += e - round;
|
||
|
double d3 = f2;
|
||
|
if (d3 > 1.0d) {
|
||
|
round++;
|
||
|
f2 -= 1.0f;
|
||
|
} else if (d3 < -1.0d) {
|
||
|
round--;
|
||
|
f2 += 1.0f;
|
||
|
}
|
||
|
z = z5;
|
||
|
}
|
||
|
int a = a(i16, rqdVar, c3223atU.m);
|
||
|
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(round, 1073741824);
|
||
|
c2.measure(a, makeMeasureSpec);
|
||
|
int measuredWidth2 = c2.getMeasuredWidth();
|
||
|
int measuredHeight2 = c2.getMeasuredHeight();
|
||
|
b(i27, a, makeMeasureSpec, c2);
|
||
|
this.d.c(i27, c2);
|
||
|
i29 = measuredWidth2;
|
||
|
z4 = z;
|
||
|
measuredHeight = measuredHeight2;
|
||
|
}
|
||
|
int max2 = Math.max(i26, i29 + rqdVar.f() + rqdVar.h() + this.d.d(c2));
|
||
|
c3223atU.i += measuredHeight + rqdVar.i() + rqdVar.g();
|
||
|
i26 = max2;
|
||
|
c3223atU.b = Math.max(c3223atU.b, i26);
|
||
|
} else {
|
||
|
i8 = i23;
|
||
|
}
|
||
|
} else {
|
||
|
i8 = i23;
|
||
|
i9 = i24;
|
||
|
}
|
||
|
boolean z6 = z4;
|
||
|
int measuredWidth3 = c2.getMeasuredWidth();
|
||
|
long[] jArr3 = this.c;
|
||
|
if (jArr3 != null) {
|
||
|
measuredWidth3 = (int) jArr3[i27];
|
||
|
}
|
||
|
int measuredHeight3 = c2.getMeasuredHeight();
|
||
|
long[] jArr4 = this.c;
|
||
|
if (jArr4 != null) {
|
||
|
measuredHeight3 = (int) (jArr4[i27] >> 32);
|
||
|
}
|
||
|
if (!this.a[i27] && rqdVar.e() > BitmapDescriptorFactory.HUE_RED) {
|
||
|
float e2 = measuredWidth3 - (rqdVar.e() * f);
|
||
|
if (i25 == c3223atU.h - 1) {
|
||
|
e2 += f2;
|
||
|
f2 = 0.0f;
|
||
|
}
|
||
|
int round2 = Math.round(e2);
|
||
|
if (round2 < rqdVar.o()) {
|
||
|
round2 = rqdVar.o();
|
||
|
this.a[i27] = true;
|
||
|
c3223atU.r -= rqdVar.e();
|
||
|
z6 = true;
|
||
|
} else {
|
||
|
f2 += e2 - round2;
|
||
|
double d4 = f2;
|
||
|
if (d4 > 1.0d) {
|
||
|
round2++;
|
||
|
f2 -= 1.0f;
|
||
|
} else {
|
||
|
if (d4 < -1.0d) {
|
||
|
round2--;
|
||
|
f2 += 1.0f;
|
||
|
}
|
||
|
int d5 = d(i2, rqdVar, c3223atU.m);
|
||
|
int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(round2, 1073741824);
|
||
|
c2.measure(makeMeasureSpec2, d5);
|
||
|
int measuredWidth4 = c2.getMeasuredWidth();
|
||
|
int measuredHeight4 = c2.getMeasuredHeight();
|
||
|
b(i27, makeMeasureSpec2, d5, c2);
|
||
|
this.d.c(i27, c2);
|
||
|
measuredWidth3 = measuredWidth4;
|
||
|
measuredHeight3 = measuredHeight4;
|
||
|
}
|
||
|
}
|
||
|
int d52 = d(i2, rqdVar, c3223atU.m);
|
||
|
int makeMeasureSpec22 = View.MeasureSpec.makeMeasureSpec(round2, 1073741824);
|
||
|
c2.measure(makeMeasureSpec22, d52);
|
||
|
int measuredWidth42 = c2.getMeasuredWidth();
|
||
|
int measuredHeight42 = c2.getMeasuredHeight();
|
||
|
b(i27, makeMeasureSpec22, d52, c2);
|
||
|
this.d.c(i27, c2);
|
||
|
measuredWidth3 = measuredWidth42;
|
||
|
measuredHeight3 = measuredHeight42;
|
||
|
}
|
||
|
z4 = z6;
|
||
|
int max3 = Math.max(i26, measuredHeight3 + rqdVar.i() + rqdVar.g() + this.d.d(c2));
|
||
|
c3223atU.i += measuredWidth3 + rqdVar.f() + rqdVar.h();
|
||
|
i26 = max3;
|
||
|
c3223atU.b = Math.max(c3223atU.b, i26);
|
||
|
}
|
||
|
i25++;
|
||
|
i16 = i;
|
||
|
i24 = i9;
|
||
|
i23 = i8;
|
||
|
}
|
||
|
int i30 = i23;
|
||
|
i5 = i24;
|
||
|
boolean z7 = z4;
|
||
|
c = Ascii.MIN;
|
||
|
if (z7 && i30 != c3223atU.i) {
|
||
|
i16 = i;
|
||
|
z3 = true;
|
||
|
}
|
||
|
} else {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
boolean z8 = z2;
|
||
|
while (c3223atU.n > BitmapDescriptorFactory.HUE_RED && size >= c3223atU.i) {
|
||
|
int i31 = c3223atU.i;
|
||
|
float f3 = (size - c3223atU.i) / c3223atU.n;
|
||
|
c3223atU.i = c3223atU.d + i19;
|
||
|
if (!z8) {
|
||
|
c3223atU.b = i22;
|
||
|
}
|
||
|
float f4 = 0.0f;
|
||
|
int i32 = 0;
|
||
|
int i33 = 0;
|
||
|
boolean z9 = false;
|
||
|
while (i32 < c3223atU.h) {
|
||
|
int i34 = c3223atU.e + i32;
|
||
|
View c3 = this.d.c(i34);
|
||
|
if (c3 != null) {
|
||
|
list2 = h;
|
||
|
i14 = size2;
|
||
|
if (c3.getVisibility() != 8) {
|
||
|
rqd rqdVar2 = (rqd) c3.getLayoutParams();
|
||
|
int i35 = this.d.i();
|
||
|
i11 = i20;
|
||
|
if (i35 == 0 || i35 == 1) {
|
||
|
i15 = i19;
|
||
|
i12 = size;
|
||
|
i13 = i31;
|
||
|
int measuredWidth5 = c3.getMeasuredWidth();
|
||
|
long[] jArr5 = this.c;
|
||
|
if (jArr5 != null) {
|
||
|
measuredWidth5 = (int) jArr5[i34];
|
||
|
}
|
||
|
int measuredHeight5 = c3.getMeasuredHeight();
|
||
|
long[] jArr6 = this.c;
|
||
|
if (jArr6 != null) {
|
||
|
measuredHeight5 = (int) (jArr6[i34] >> 32);
|
||
|
}
|
||
|
if (!this.a[i34] && rqdVar2.b() > BitmapDescriptorFactory.HUE_RED) {
|
||
|
float b = measuredWidth5 + (rqdVar2.b() * f3);
|
||
|
if (i32 == c3223atU.h - 1) {
|
||
|
b += f4;
|
||
|
f4 = 0.0f;
|
||
|
}
|
||
|
int round3 = Math.round(b);
|
||
|
if (round3 > rqdVar2.n()) {
|
||
|
round3 = rqdVar2.n();
|
||
|
this.a[i34] = true;
|
||
|
c3223atU.n -= rqdVar2.b();
|
||
|
z9 = true;
|
||
|
} else {
|
||
|
float f5 = f4 + (b - round3);
|
||
|
double d6 = f5;
|
||
|
if (d6 > 1.0d) {
|
||
|
round3++;
|
||
|
d = d6 - 1.0d;
|
||
|
} else {
|
||
|
if (d6 < -1.0d) {
|
||
|
round3--;
|
||
|
d = d6 + 1.0d;
|
||
|
}
|
||
|
f4 = f5;
|
||
|
}
|
||
|
f5 = (float) d;
|
||
|
f4 = f5;
|
||
|
}
|
||
|
int d7 = d(i2, rqdVar2, c3223atU.m);
|
||
|
int makeMeasureSpec3 = View.MeasureSpec.makeMeasureSpec(round3, 1073741824);
|
||
|
c3.measure(makeMeasureSpec3, d7);
|
||
|
int measuredWidth6 = c3.getMeasuredWidth();
|
||
|
int measuredHeight6 = c3.getMeasuredHeight();
|
||
|
b(i34, makeMeasureSpec3, d7, c3);
|
||
|
this.d.c(i34, c3);
|
||
|
measuredWidth5 = measuredWidth6;
|
||
|
measuredHeight5 = measuredHeight6;
|
||
|
}
|
||
|
max = Math.max(i33, measuredHeight5 + rqdVar2.i() + rqdVar2.g() + this.d.d(c3));
|
||
|
c3223atU.i += measuredWidth5 + rqdVar2.f() + rqdVar2.h();
|
||
|
} else {
|
||
|
int measuredHeight7 = c3.getMeasuredHeight();
|
||
|
long[] jArr7 = this.c;
|
||
|
if (jArr7 != null) {
|
||
|
long j3 = jArr7[i34];
|
||
|
i15 = i19;
|
||
|
measuredHeight7 = (int) (j3 >> 32);
|
||
|
} else {
|
||
|
i15 = i19;
|
||
|
}
|
||
|
int measuredWidth7 = c3.getMeasuredWidth();
|
||
|
long[] jArr8 = this.c;
|
||
|
i12 = size;
|
||
|
i13 = i31;
|
||
|
int i36 = jArr8 != null ? (int) jArr8[i34] : measuredWidth7;
|
||
|
if (!this.a[i34] && rqdVar2.b() > BitmapDescriptorFactory.HUE_RED) {
|
||
|
float b2 = measuredHeight7 + (rqdVar2.b() * f3);
|
||
|
if (i32 == c3223atU.h - 1) {
|
||
|
b2 += f4;
|
||
|
f4 = 0.0f;
|
||
|
}
|
||
|
int round4 = Math.round(b2);
|
||
|
if (round4 > rqdVar2.j()) {
|
||
|
round4 = rqdVar2.j();
|
||
|
this.a[i34] = true;
|
||
|
c3223atU.n -= rqdVar2.b();
|
||
|
z9 = true;
|
||
|
} else {
|
||
|
float f6 = f4 + (b2 - round4);
|
||
|
double d8 = f6;
|
||
|
if (d8 > 1.0d) {
|
||
|
round4++;
|
||
|
d2 = d8 - 1.0d;
|
||
|
} else {
|
||
|
if (d8 < -1.0d) {
|
||
|
round4--;
|
||
|
d2 = d8 + 1.0d;
|
||
|
}
|
||
|
f4 = f6;
|
||
|
}
|
||
|
f6 = (float) d2;
|
||
|
f4 = f6;
|
||
|
}
|
||
|
int a2 = a(i16, rqdVar2, c3223atU.m);
|
||
|
int makeMeasureSpec4 = View.MeasureSpec.makeMeasureSpec(round4, 1073741824);
|
||
|
c3.measure(a2, makeMeasureSpec4);
|
||
|
int measuredWidth8 = c3.getMeasuredWidth();
|
||
|
int measuredHeight8 = c3.getMeasuredHeight();
|
||
|
b(i34, a2, makeMeasureSpec4, c3);
|
||
|
this.d.c(i34, c3);
|
||
|
i36 = measuredWidth8;
|
||
|
measuredHeight7 = measuredHeight8;
|
||
|
}
|
||
|
max = Math.max(i33, i36 + rqdVar2.f() + rqdVar2.h() + this.d.d(c3));
|
||
|
c3223atU.i += measuredHeight7 + rqdVar2.i() + rqdVar2.g();
|
||
|
}
|
||
|
i33 = max;
|
||
|
c3223atU.b = Math.max(c3223atU.b, i33);
|
||
|
} else {
|
||
|
i11 = i20;
|
||
|
i15 = i19;
|
||
|
i12 = size;
|
||
|
i13 = i31;
|
||
|
}
|
||
|
} else {
|
||
|
i11 = i20;
|
||
|
i12 = size;
|
||
|
i13 = i31;
|
||
|
list2 = h;
|
||
|
i14 = size2;
|
||
|
i15 = i19;
|
||
|
}
|
||
|
i32++;
|
||
|
i19 = i15;
|
||
|
h = list2;
|
||
|
size2 = i14;
|
||
|
i20 = i11;
|
||
|
size = i12;
|
||
|
i31 = i13;
|
||
|
}
|
||
|
i4 = i20;
|
||
|
i5 = size;
|
||
|
int i37 = i31;
|
||
|
list = h;
|
||
|
i6 = size2;
|
||
|
i7 = i19;
|
||
|
if (!z9 || i37 == c3223atU.i) {
|
||
|
break;
|
||
|
}
|
||
|
i19 = i7;
|
||
|
h = list;
|
||
|
size2 = i6;
|
||
|
i20 = i4;
|
||
|
size = i5;
|
||
|
z8 = true;
|
||
|
i22 = PKIFailureInfo.systemUnavail;
|
||
|
}
|
||
|
i4 = i20;
|
||
|
i5 = size;
|
||
|
list = h;
|
||
|
i6 = size2;
|
||
|
i7 = i19;
|
||
|
}
|
||
|
c = Ascii.MIN;
|
||
|
i20 = i4 + 1;
|
||
|
i16 = i;
|
||
|
i19 = i7;
|
||
|
h = list;
|
||
|
size2 = i6;
|
||
|
size = i5;
|
||
|
z2 = false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private int a(int i, rqd rqdVar, int i2) {
|
||
|
DNa dNa = this.d;
|
||
|
int paddingLeft = dNa.getPaddingLeft();
|
||
|
int paddingRight = this.d.getPaddingRight();
|
||
|
int e = dNa.e(i, paddingLeft + paddingRight + rqdVar.f() + rqdVar.h() + i2, rqdVar.l());
|
||
|
int size = View.MeasureSpec.getSize(e);
|
||
|
if (size > rqdVar.n()) {
|
||
|
return View.MeasureSpec.makeMeasureSpec(rqdVar.n(), View.MeasureSpec.getMode(e));
|
||
|
}
|
||
|
return size < rqdVar.o() ? View.MeasureSpec.makeMeasureSpec(rqdVar.o(), View.MeasureSpec.getMode(e)) : e;
|
||
|
}
|
||
|
|
||
|
private int d(int i, rqd rqdVar, int i2) {
|
||
|
DNa dNa = this.d;
|
||
|
int paddingTop = dNa.getPaddingTop();
|
||
|
int paddingBottom = this.d.getPaddingBottom();
|
||
|
int c = dNa.c(i, paddingTop + paddingBottom + rqdVar.i() + rqdVar.g() + i2, rqdVar.d());
|
||
|
int size = View.MeasureSpec.getSize(c);
|
||
|
if (size > rqdVar.j()) {
|
||
|
return View.MeasureSpec.makeMeasureSpec(rqdVar.j(), View.MeasureSpec.getMode(c));
|
||
|
}
|
||
|
return size < rqdVar.k() ? View.MeasureSpec.makeMeasureSpec(rqdVar.k(), View.MeasureSpec.getMode(c)) : c;
|
||
|
}
|
||
|
|
||
|
public final void b(int i, int i2, int i3) {
|
||
|
int i4;
|
||
|
int i5;
|
||
|
int i6 = this.d.i();
|
||
|
if (i6 == 0 || i6 == 1) {
|
||
|
int mode = View.MeasureSpec.getMode(i2);
|
||
|
int size = View.MeasureSpec.getSize(i2);
|
||
|
i4 = mode;
|
||
|
i5 = size;
|
||
|
} else if (i6 == 2 || i6 == 3) {
|
||
|
i4 = View.MeasureSpec.getMode(i);
|
||
|
i5 = View.MeasureSpec.getSize(i);
|
||
|
} else {
|
||
|
throw new IllegalArgumentException("Invalid flex direction: ".concat(String.valueOf(i6)));
|
||
|
}
|
||
|
List<C3223atU> h = this.d.h();
|
||
|
if (i4 == 1073741824) {
|
||
|
int o2 = this.d.o() + i3;
|
||
|
int i7 = 0;
|
||
|
if (h.size() == 1) {
|
||
|
h.get(0).b = i5 - i3;
|
||
|
return;
|
||
|
}
|
||
|
if (h.size() >= 2) {
|
||
|
int b = this.d.b();
|
||
|
if (b == 1) {
|
||
|
C3223atU c3223atU = new C3223atU();
|
||
|
c3223atU.b = i5 - o2;
|
||
|
h.add(0, c3223atU);
|
||
|
return;
|
||
|
}
|
||
|
if (b == 2) {
|
||
|
this.d.setFlexLines(c(h, i5, o2));
|
||
|
return;
|
||
|
}
|
||
|
if (b == 3) {
|
||
|
if (o2 < i5) {
|
||
|
float size2 = (i5 - o2) / (h.size() - 1);
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
int size3 = h.size();
|
||
|
float f = 0.0f;
|
||
|
while (i7 < size3) {
|
||
|
arrayList.add(h.get(i7));
|
||
|
if (i7 != h.size() - 1) {
|
||
|
C3223atU c3223atU2 = new C3223atU();
|
||
|
if (i7 == h.size() - 2) {
|
||
|
c3223atU2.b = Math.round(f + size2);
|
||
|
f = 0.0f;
|
||
|
} else {
|
||
|
c3223atU2.b = Math.round(size2);
|
||
|
}
|
||
|
f += size2 - c3223atU2.b;
|
||
|
if (f > 1.0f) {
|
||
|
c3223atU2.b++;
|
||
|
f -= 1.0f;
|
||
|
} else if (f < -1.0f) {
|
||
|
c3223atU2.b--;
|
||
|
f += 1.0f;
|
||
|
}
|
||
|
arrayList.add(c3223atU2);
|
||
|
}
|
||
|
i7++;
|
||
|
}
|
||
|
this.d.setFlexLines(arrayList);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (b == 4) {
|
||
|
if (o2 >= i5) {
|
||
|
this.d.setFlexLines(c(h, i5, o2));
|
||
|
return;
|
||
|
}
|
||
|
int size4 = (i5 - o2) / (h.size() << 1);
|
||
|
ArrayList arrayList2 = new ArrayList();
|
||
|
C3223atU c3223atU3 = new C3223atU();
|
||
|
c3223atU3.b = size4;
|
||
|
for (C3223atU c3223atU4 : h) {
|
||
|
arrayList2.add(c3223atU3);
|
||
|
arrayList2.add(c3223atU4);
|
||
|
arrayList2.add(c3223atU3);
|
||
|
}
|
||
|
this.d.setFlexLines(arrayList2);
|
||
|
return;
|
||
|
}
|
||
|
if (b != 5 || o2 >= i5) {
|
||
|
return;
|
||
|
}
|
||
|
float size5 = (i5 - o2) / h.size();
|
||
|
int size6 = h.size();
|
||
|
float f2 = 0.0f;
|
||
|
while (i7 < size6) {
|
||
|
C3223atU c3223atU5 = h.get(i7);
|
||
|
float f3 = c3223atU5.b + size5;
|
||
|
if (i7 == h.size() - 1) {
|
||
|
f3 += f2;
|
||
|
f2 = 0.0f;
|
||
|
}
|
||
|
int round = Math.round(f3);
|
||
|
f2 += f3 - round;
|
||
|
if (f2 > 1.0f) {
|
||
|
round++;
|
||
|
f2 -= 1.0f;
|
||
|
} else if (f2 < -1.0f) {
|
||
|
round--;
|
||
|
f2 += 1.0f;
|
||
|
}
|
||
|
c3223atU5.b = round;
|
||
|
i7++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static List<C3223atU> c(List<C3223atU> list, int i, int i2) {
|
||
|
int i3 = (i - i2) / 2;
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
C3223atU c3223atU = new C3223atU();
|
||
|
c3223atU.b = i3;
|
||
|
int size = list.size();
|
||
|
for (int i4 = 0; i4 < size; i4++) {
|
||
|
if (i4 == 0) {
|
||
|
arrayList.add(c3223atU);
|
||
|
}
|
||
|
arrayList.add(list.get(i4));
|
||
|
if (i4 == list.size() - 1) {
|
||
|
arrayList.add(c3223atU);
|
||
|
}
|
||
|
}
|
||
|
return arrayList;
|
||
|
}
|
||
|
|
||
|
public final void b(int i) {
|
||
|
View c;
|
||
|
if (i >= this.d.j()) {
|
||
|
return;
|
||
|
}
|
||
|
int i2 = this.d.i();
|
||
|
if (this.d.a() == 4) {
|
||
|
int[] iArr = this.b;
|
||
|
List<C3223atU> h = this.d.h();
|
||
|
int size = h.size();
|
||
|
for (int i3 = iArr != null ? iArr[i] : 0; i3 < size; i3++) {
|
||
|
C3223atU c3223atU = h.get(i3);
|
||
|
int i4 = c3223atU.h;
|
||
|
for (int i5 = 0; i5 < i4; i5++) {
|
||
|
int i6 = c3223atU.e + i5;
|
||
|
if (i5 < this.d.j() && (c = this.d.c(i6)) != null && c.getVisibility() != 8) {
|
||
|
rqd rqdVar = (rqd) c.getLayoutParams();
|
||
|
if (rqdVar.a() == -1 || rqdVar.a() == 4) {
|
||
|
if (i2 == 0 || i2 == 1) {
|
||
|
a(c, c3223atU.b, i6);
|
||
|
} else if (i2 == 2 || i2 == 3) {
|
||
|
b(c, c3223atU.b, i6);
|
||
|
} else {
|
||
|
throw new IllegalArgumentException("Invalid flex direction: ".concat(String.valueOf(i2)));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
for (C3223atU c3223atU2 : this.d.h()) {
|
||
|
for (Integer num : c3223atU2.j) {
|
||
|
View c2 = this.d.c(num.intValue());
|
||
|
if (i2 == 0 || i2 == 1) {
|
||
|
a(c2, c3223atU2.b, num.intValue());
|
||
|
} else if (i2 == 2 || i2 == 3) {
|
||
|
b(c2, c3223atU2.b, num.intValue());
|
||
|
} else {
|
||
|
throw new IllegalArgumentException("Invalid flex direction: ".concat(String.valueOf(i2)));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void a(View view, int i, int i2) {
|
||
|
int measuredWidth;
|
||
|
rqd rqdVar = (rqd) view.getLayoutParams();
|
||
|
int i3 = rqdVar.i();
|
||
|
int min = Math.min(Math.max(((i - i3) - rqdVar.g()) - this.d.d(view), rqdVar.k()), rqdVar.j());
|
||
|
long[] jArr = this.c;
|
||
|
if (jArr != null) {
|
||
|
measuredWidth = (int) jArr[i2];
|
||
|
} else {
|
||
|
measuredWidth = view.getMeasuredWidth();
|
||
|
}
|
||
|
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824);
|
||
|
int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(min, 1073741824);
|
||
|
view.measure(makeMeasureSpec, makeMeasureSpec2);
|
||
|
b(i2, makeMeasureSpec, makeMeasureSpec2, view);
|
||
|
this.d.c(i2, view);
|
||
|
}
|
||
|
|
||
|
private void b(View view, int i, int i2) {
|
||
|
int measuredHeight;
|
||
|
rqd rqdVar = (rqd) view.getLayoutParams();
|
||
|
int f = rqdVar.f();
|
||
|
int min = Math.min(Math.max(((i - f) - rqdVar.h()) - this.d.d(view), rqdVar.o()), rqdVar.n());
|
||
|
long[] jArr = this.c;
|
||
|
if (jArr != null) {
|
||
|
measuredHeight = (int) (jArr[i2] >> 32);
|
||
|
} else {
|
||
|
measuredHeight = view.getMeasuredHeight();
|
||
|
}
|
||
|
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredHeight, 1073741824);
|
||
|
int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(min, 1073741824);
|
||
|
view.measure(makeMeasureSpec2, makeMeasureSpec);
|
||
|
b(i2, makeMeasureSpec2, makeMeasureSpec, view);
|
||
|
this.d.c(i2, view);
|
||
|
}
|
||
|
|
||
|
public final void d(View view, C3223atU c3223atU, int i, int i2, int i3, int i4) {
|
||
|
rqd rqdVar = (rqd) view.getLayoutParams();
|
||
|
int a = this.d.a();
|
||
|
if (rqdVar.a() != -1) {
|
||
|
a = rqdVar.a();
|
||
|
}
|
||
|
int i5 = c3223atU.b;
|
||
|
if (a != 0) {
|
||
|
if (a == 1) {
|
||
|
if (this.d.g() != 2) {
|
||
|
int i6 = i2 + i5;
|
||
|
int measuredHeight = view.getMeasuredHeight();
|
||
|
view.layout(i, (i6 - measuredHeight) - rqdVar.g(), i3, i6 - rqdVar.g());
|
||
|
return;
|
||
|
}
|
||
|
int measuredHeight2 = view.getMeasuredHeight();
|
||
|
view.layout(i, (i2 - i5) + measuredHeight2 + rqdVar.i(), i3, (i4 - i5) + view.getMeasuredHeight() + rqdVar.i());
|
||
|
return;
|
||
|
}
|
||
|
if (a == 2) {
|
||
|
int measuredHeight3 = (((i5 - view.getMeasuredHeight()) + rqdVar.i()) - rqdVar.g()) / 2;
|
||
|
if (this.d.g() != 2) {
|
||
|
int i7 = i2 + measuredHeight3;
|
||
|
view.layout(i, i7, i3, view.getMeasuredHeight() + i7);
|
||
|
return;
|
||
|
} else {
|
||
|
int i8 = i2 - measuredHeight3;
|
||
|
view.layout(i, i8, i3, view.getMeasuredHeight() + i8);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if (a == 3) {
|
||
|
if (this.d.g() != 2) {
|
||
|
int max = Math.max(c3223atU.l - view.getBaseline(), rqdVar.i());
|
||
|
view.layout(i, i2 + max, i3, i4 + max);
|
||
|
return;
|
||
|
}
|
||
|
int max2 = Math.max((c3223atU.l - view.getMeasuredHeight()) + view.getBaseline(), rqdVar.g());
|
||
|
view.layout(i, i2 - max2, i3, i4 - max2);
|
||
|
return;
|
||
|
}
|
||
|
if (a != 4) {
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if (this.d.g() != 2) {
|
||
|
view.layout(i, i2 + rqdVar.i(), i3, i4 + rqdVar.i());
|
||
|
} else {
|
||
|
view.layout(i, i2 - rqdVar.g(), i3, i4 - rqdVar.g());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void a(View view, C3223atU c3223atU, boolean z, int i, int i2, int i3, int i4) {
|
||
|
rqd rqdVar = (rqd) view.getLayoutParams();
|
||
|
int a = this.d.a();
|
||
|
if (rqdVar.a() != -1) {
|
||
|
a = rqdVar.a();
|
||
|
}
|
||
|
int i5 = c3223atU.b;
|
||
|
if (a != 0) {
|
||
|
if (a == 1) {
|
||
|
if (!z) {
|
||
|
int measuredWidth = view.getMeasuredWidth();
|
||
|
view.layout(((i + i5) - measuredWidth) - rqdVar.h(), i2, ((i3 + i5) - view.getMeasuredWidth()) - rqdVar.h(), i4);
|
||
|
return;
|
||
|
}
|
||
|
int measuredWidth2 = view.getMeasuredWidth();
|
||
|
view.layout((i - i5) + measuredWidth2 + rqdVar.f(), i2, (i3 - i5) + view.getMeasuredWidth() + rqdVar.f(), i4);
|
||
|
return;
|
||
|
}
|
||
|
if (a == 2) {
|
||
|
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
||
|
int measuredWidth3 = (((i5 - view.getMeasuredWidth()) + CYM.ry_(marginLayoutParams)) - CYM.rx_(marginLayoutParams)) / 2;
|
||
|
if (!z) {
|
||
|
view.layout(i + measuredWidth3, i2, i3 + measuredWidth3, i4);
|
||
|
return;
|
||
|
} else {
|
||
|
view.layout(i - measuredWidth3, i2, i3 - measuredWidth3, i4);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if (a != 3 && a != 4) {
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if (!z) {
|
||
|
view.layout(i + rqdVar.f(), i2, i3 + rqdVar.f(), i4);
|
||
|
} else {
|
||
|
view.layout(i - rqdVar.h(), i2, i3 - rqdVar.h(), i4);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void d(int i) {
|
||
|
long[] jArr = this.c;
|
||
|
if (jArr == null) {
|
||
|
if (i < 10) {
|
||
|
i = 10;
|
||
|
}
|
||
|
this.c = new long[i];
|
||
|
} else if (jArr.length < i) {
|
||
|
int length = jArr.length << 1;
|
||
|
if (length >= i) {
|
||
|
i = length;
|
||
|
}
|
||
|
this.c = Arrays.copyOf(jArr, i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void c(int i) {
|
||
|
long[] jArr = this.e;
|
||
|
if (jArr == null) {
|
||
|
if (i < 10) {
|
||
|
i = 10;
|
||
|
}
|
||
|
this.e = new long[i];
|
||
|
} else if (jArr.length < i) {
|
||
|
int length = jArr.length << 1;
|
||
|
if (length >= i) {
|
||
|
i = length;
|
||
|
}
|
||
|
this.e = Arrays.copyOf(jArr, i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void b(int i, int i2, int i3, View view) {
|
||
|
long[] jArr = this.e;
|
||
|
if (jArr != null) {
|
||
|
jArr[i] = (i2 & KeyboardMap.kValueMask) | (i3 << 32);
|
||
|
}
|
||
|
long[] jArr2 = this.c;
|
||
|
if (jArr2 != null) {
|
||
|
jArr2[i] = (view.getMeasuredWidth() & KeyboardMap.kValueMask) | (view.getMeasuredHeight() << 32);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void a(int i) {
|
||
|
int[] iArr = this.b;
|
||
|
if (iArr == null) {
|
||
|
if (i < 10) {
|
||
|
i = 10;
|
||
|
}
|
||
|
this.b = new int[i];
|
||
|
} else if (iArr.length < i) {
|
||
|
int length = iArr.length << 1;
|
||
|
if (length >= i) {
|
||
|
i = length;
|
||
|
}
|
||
|
this.b = Arrays.copyOf(iArr, i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void e(List<C3223atU> list, int i) {
|
||
|
int i2 = this.b[i];
|
||
|
if (i2 == -1) {
|
||
|
i2 = 0;
|
||
|
}
|
||
|
for (int size = list.size() - 1; size >= i2; size--) {
|
||
|
list.remove(size);
|
||
|
}
|
||
|
int[] iArr = this.b;
|
||
|
int length = iArr.length - 1;
|
||
|
if (i > length) {
|
||
|
Arrays.fill(iArr, -1);
|
||
|
} else {
|
||
|
Arrays.fill(iArr, i, length, -1);
|
||
|
}
|
||
|
long[] jArr = this.e;
|
||
|
int length2 = jArr.length - 1;
|
||
|
if (i > length2) {
|
||
|
Arrays.fill(jArr, 0L);
|
||
|
} else {
|
||
|
Arrays.fill(jArr, i, length2, 0L);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static class IeS implements Comparable<IeS> {
|
||
|
public int a;
|
||
|
public int b;
|
||
|
|
||
|
private IeS() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ IeS(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
|
||
|
@Override // java.lang.Comparable
|
||
|
public final /* bridge */ /* synthetic */ int compareTo(IeS ieS) {
|
||
|
IeS ieS2 = ieS;
|
||
|
int i = this.a;
|
||
|
int i2 = ieS2.a;
|
||
|
return i != i2 ? i - i2 : this.b - ieS2.b;
|
||
|
}
|
||
|
|
||
|
public final String toString() {
|
||
|
StringBuilder sb = new StringBuilder("Order{order=");
|
||
|
sb.append(this.a);
|
||
|
sb.append(", index=");
|
||
|
sb.append(this.b);
|
||
|
sb.append(UrlTreeKt.componentParamSuffixChar);
|
||
|
return sb.toString();
|
||
|
}
|
||
|
}
|
||
|
}
|