85 lines
2.3 KiB
Java
85 lines
2.3 KiB
Java
package c.i.a.c.e2.u;
|
|
|
|
import c.i.a.c.e2.c;
|
|
import c.i.a.c.e2.f;
|
|
import c.i.a.c.i2.f0;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
/* compiled from: WebvttSubtitle */
|
|
public final class k implements f {
|
|
public final List<g> i;
|
|
public final long[] j;
|
|
public final long[] k;
|
|
|
|
public k(List<g> list) {
|
|
this.i = Collections.unmodifiableList(new ArrayList(list));
|
|
this.j = new long[(list.size() * 2)];
|
|
for (int i = 0; i < list.size(); i++) {
|
|
g gVar = list.get(i);
|
|
int i2 = i * 2;
|
|
long[] jArr = this.j;
|
|
jArr[i2] = gVar.b;
|
|
jArr[i2 + 1] = gVar.f855c;
|
|
}
|
|
long[] jArr2 = this.j;
|
|
long[] copyOf = Arrays.copyOf(jArr2, jArr2.length);
|
|
this.k = copyOf;
|
|
Arrays.sort(copyOf);
|
|
}
|
|
|
|
@Override // c.i.a.c.e2.f
|
|
public int f(long j) {
|
|
int b = f0.b(this.k, j, false, false);
|
|
if (b < this.k.length) {
|
|
return b;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // c.i.a.c.e2.f
|
|
public long g(int i) {
|
|
boolean z2 = true;
|
|
AnimatableValueParser.k(i >= 0);
|
|
if (i >= this.k.length) {
|
|
z2 = false;
|
|
}
|
|
AnimatableValueParser.k(z2);
|
|
return this.k[i];
|
|
}
|
|
|
|
@Override // c.i.a.c.e2.f
|
|
public List<c> h(long j) {
|
|
ArrayList arrayList = new ArrayList();
|
|
ArrayList arrayList2 = new ArrayList();
|
|
for (int i = 0; i < this.i.size(); i++) {
|
|
long[] jArr = this.j;
|
|
int i2 = i * 2;
|
|
if (jArr[i2] <= j && j < jArr[i2 + 1]) {
|
|
g gVar = this.i.get(i);
|
|
c cVar = gVar.a;
|
|
if (cVar.e == -3.4028235E38f) {
|
|
arrayList2.add(gVar);
|
|
} else {
|
|
arrayList.add(cVar);
|
|
}
|
|
}
|
|
}
|
|
Collections.sort(arrayList2, b.i);
|
|
for (int i3 = 0; i3 < arrayList2.size(); i3++) {
|
|
c.b a = ((g) arrayList2.get(i3)).a.a();
|
|
a.d = (float) (-1 - i3);
|
|
a.e = 1;
|
|
arrayList.add(a.a());
|
|
}
|
|
return arrayList;
|
|
}
|
|
|
|
@Override // c.i.a.c.e2.f
|
|
public int i() {
|
|
return this.k.length;
|
|
}
|
|
}
|