what-the-bank/sources/o/C1275ZkA.java

462 lines
17 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.text.TextUtils;
import com.prolificinteractive.materialcalendarview.TitleChanger;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.ToIntFunction;
import java.util.stream.Collectors;
import org.bouncycastle.asn1.x509.DisplayText;
/* renamed from: o.ZkA, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1275ZkA extends C0619KuQ {
public C13967fkM c;
private int d = 2;
private int e;
@InterfaceC13391fZD
public C1275ZkA(C13967fkM c13967fkM, String str) {
this.e = 0;
this.c = c13967fkM;
try {
this.e = Integer.parseInt(str);
} catch (Exception e) {
guQ.e(e, "not able to parse tile version as Integer", new Object[0]);
}
}
private uxC a(C17104tuu c17104tuu, String str, int i) {
uxC uxc = new uxC();
String str2 = "";
if (c17104tuu.k != null) {
int i2 = AnonymousClass1.c[c17104tuu.l.ordinal()];
if (i2 != 1) {
if (i2 != 2) {
if (i2 != 3) {
if (i2 == 4 && c17104tuu.k.f != null) {
str2 = c17104tuu.k.f.q;
}
} else if (c17104tuu.k.i != null) {
str2 = c17104tuu.k.i.q;
}
} else if (c17104tuu.k.e != null) {
str2 = c17104tuu.k.e.a;
}
} else if (c17104tuu.k.c != null) {
str2 = c17104tuu.k.c.a();
}
}
return uxc.g(str2).e(c17104tuu.b).a(i).g(c17104tuu.d).g(c17104tuu.c == 1).f(c17104tuu.g == 1).d(c17104tuu.h).s(a(c17104tuu, str)).a(c17104tuu.l).c(d(c17104tuu.m)).b(c17104tuu.k != null ? this.b.e(c17104tuu.k) : null).b(c17104tuu.a);
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.ZkA$1, reason: invalid class name */
/* loaded from: classes.dex */
public static /* synthetic */ class AnonymousClass1 {
static final int[] c;
static {
int[] iArr = new int[EnumC15824isw.values().length];
c = iArr;
try {
iArr[EnumC15824isw.BILLERTOPUP.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
c[EnumC15824isw.BILLERPAYMENT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
c[EnumC15824isw.FAVOURITE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
c[EnumC15824isw.TRANSFER.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public uxC d(QJg qJg, int i) {
uxC d = uxC.b().c(AyW.STATIC_SHORTCUT).a(g(qJg.F)).d(qJg.A);
StringBuilder sb = new StringBuilder();
sb.append(a(qJg.I, qJg.D));
sb.append("\n");
sb.append(a(qJg.G, qJg.C));
uxC a = d.s(sb.toString()).a(qJg.p + i).f(j(qJg.E)).e(qJg.k).b(qJg.q == 1).a().k(qJg.z).c(qJg.f).b(qJg.m).f(qJg.B == 1).g(qJg.t == 1).n(qJg.H).a(qJg.j);
Ikx a2 = Ikx.a();
a2.d = qJg.i;
C1170Xbv c1170Xbv = this.b;
a2.k = EnumC15824isw.c(qJg.l);
a2.b = qJg.d;
a2.h = qJg.K;
a2.g = qJg.J;
uxC b = a.b(a2);
b.d = qJg.c;
return b.a(qJg.e).d(b(qJg.M, i)).t(qJg.h).d(qJg.s);
}
public final uxC d(QJg qJg, String str) {
String a;
uxC d = d(qJg, 0);
if ("en".equalsIgnoreCase(str)) {
a = a(qJg.I, qJg.D);
} else {
a = a(qJg.G, qJg.C);
}
return d.s(a);
}
private static String a(String str, String str2) {
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(TextUtils.isEmpty(str2) ? "" : " ".concat(String.valueOf(str2)));
return sb.toString();
}
private List<uxC> b(List<QJg> list, final int i) {
if (list == null) {
return new ArrayList();
}
return (List) list.stream().map(new Function(this, i) { // from class: o.mrT
private C1275ZkA c;
private int d;
@Override // java.util.function.Function
public final Object apply(Object obj) {
uxC d;
d = this.c.d((QJg) obj, this.d);
return d;
}
{
this.c = this;
this.d = i;
}
}).collect(Collectors.toList());
}
private static EnumC15824isw g(String str) {
if ("FUNCTION".equalsIgnoreCase(str)) {
return EnumC15824isw.FUNCTION;
}
if ("APPLICATION".equalsIgnoreCase(str)) {
return EnumC15824isw.APPLICATION;
}
if ("TILE".equalsIgnoreCase(str)) {
return EnumC15824isw.TILES;
}
if (EnumC15824isw.TILE_CATEGORY.name().equals(str)) {
return EnumC15824isw.TILE_CATEGORY;
}
if (EnumC15824isw.CARD_TILE_VERTICAL.name().equals(str)) {
return EnumC15824isw.CARD_TILE_VERTICAL;
}
if (EnumC15824isw.CARD_TILE_HORIZONTAL.name().equals(str)) {
return EnumC15824isw.CARD_TILE_HORIZONTAL;
}
if (EnumC15824isw.WEBVIEW_PARTNER.name().equals(str)) {
return EnumC15824isw.WEBVIEW_PARTNER;
}
if (EnumC15824isw.SME_SERVICES.name().equalsIgnoreCase(str)) {
return EnumC15824isw.SME_SERVICES;
}
if (EnumC15824isw.DEEPLINK.name().equalsIgnoreCase(str)) {
return EnumC15824isw.DEEPLINK;
}
if (EnumC15824isw.FINANCIAL_MALL.name().equalsIgnoreCase(str)) {
return EnumC15824isw.FINANCIAL_MALL;
}
return EnumC15824isw.WEBVIEWTILE;
}
public final List<Rgo> c(List<Rgo> list, final List<VAh> list2) {
return (List) list.stream().map(new Function(this, list2) { // from class: o.zqM
private C1275ZkA c;
private List d;
@Override // java.util.function.Function
public final Object apply(Object obj) {
return C1275ZkA.a(this.c, this.d, (Rgo) obj);
}
{
this.c = this;
this.d = list2;
}
}).collect(Collectors.toList());
}
private static YMu a(YMu yMu, List<VAh> list, int i) {
final String b = b(i);
final ArrayList arrayList = new ArrayList();
if (list != null) {
list.forEach(new Consumer(b, arrayList) { // from class: o.ilX
private String d;
private List e;
@Override // java.util.function.Consumer
public final void accept(Object obj) {
C1275ZkA.a(this.d, this.e, (VAh) obj);
}
{
this.d = b;
this.e = arrayList;
}
});
}
return new YMu(yMu != null ? yMu.k : null, yMu != null ? yMu.h : null, yMu != null ? yMu.f8461o : null, yMu != null ? yMu.j : null, yMu != null ? yMu.e : null, yMu != null ? yMu.i : null, yMu != null ? yMu.g : null, yMu != null ? yMu.c : null, yMu != null ? yMu.f : null, yMu != null ? yMu.a : null, yMu != null ? yMu.d : null, arrayList);
}
public static /* synthetic */ Rgo e(C1275ZkA c1275ZkA, List list, Rgo rgo) {
if (rgo.s == 200) {
return d(rgo, DisplayText.DISPLAY_TEXT_MAXIMUM_SIZE, (List<VAh>) list);
}
if (rgo.s == 300) {
return d(rgo, 300, (List<VAh>) list);
}
if (rgo.s == 400) {
return d(rgo, TitleChanger.DEFAULT_ANIMATION_DELAY, (List<VAh>) list);
}
return rgo.s == 500 ? d(rgo, 500, (List<VAh>) list) : rgo;
}
public static /* synthetic */ boolean a(C1275ZkA c1275ZkA, QJg qJg) {
return qJg.n <= c1275ZkA.e;
}
public static /* synthetic */ uxC c(C1275ZkA c1275ZkA, String str, QJg qJg) {
String str2;
String str3;
String str4;
uxC d = uxC.b().c(AyW.BANNER).a(g(qJg.F)).d(qJg.A);
StringBuilder sb = new StringBuilder();
sb.append(a(qJg.I, qJg.D));
sb.append("\n");
sb.append(a(qJg.G, qJg.C));
uxC g = d.s(sb.toString()).a(qJg.p).f(j(qJg.E)).e(qJg.k).b(qJg.q == 1).a().k(qJg.z).c(qJg.f).b(qJg.m).f(qJg.B == 1).g(qJg.t == 1);
Ikx a = Ikx.a();
a.f = qJg.u;
if ("en".equalsIgnoreCase(str)) {
str2 = qJg.y;
} else {
str2 = qJg.v;
}
a.i = str2;
C1170Xbv c1170Xbv = c1275ZkA.b;
a.k = EnumC15824isw.c(qJg.l);
a.h = qJg.K;
a.g = qJg.J;
uxC n = g.b(a).e(qJg.i).d(qJg.d).k(qJg.u).n(qJg.H);
if ("en".equalsIgnoreCase(str)) {
str3 = qJg.r;
} else {
str3 = qJg.x;
}
uxC o2 = n.o(str3);
if ("en".equalsIgnoreCase(str)) {
str4 = qJg.y;
} else {
str4 = qJg.v;
}
uxC t = o2.n(str4).t(qJg.h);
t.b = qJg.g;
uxC a2 = t.a(qJg.j);
a2.a = qJg.a;
a2.c = qJg.b;
return a2.d(c1275ZkA.b(qJg.M, c1275ZkA.d)).h(qJg.f8323o);
}
public static /* synthetic */ Rgo a(final C1275ZkA c1275ZkA, final List list, Rgo rgo) {
String str;
String str2;
String str3;
long j = rgo.s;
String str4 = rgo.z;
String str5 = rgo.B;
String str6 = rgo.q;
String str7 = rgo.y;
String str8 = rgo.v;
String str9 = rgo.w;
String str10 = rgo.u;
String str11 = rgo.k;
String str12 = rgo.l;
String str13 = rgo.i;
int i = rgo.j;
int i2 = rgo.t;
String str14 = rgo.C;
String str15 = rgo.r;
int i3 = rgo.n;
int i4 = rgo.x;
String str16 = rgo.f8346o;
String str17 = rgo.p;
int i5 = rgo.f;
int i6 = rgo.h;
int i7 = rgo.g;
String str18 = rgo.b;
List<C14264fpt> list2 = rgo.d;
String str19 = rgo.c;
int i8 = rgo.D;
String str20 = rgo.e;
List list3 = null;
String str21 = rgo.a != null ? rgo.a.k : null;
String str22 = rgo.a.h;
String str23 = rgo.a.f8461o;
String str24 = rgo.a.j;
Integer num = rgo.a.e;
Integer num2 = rgo.a.i;
if (rgo.a == null || rgo.a.g == null) {
str = str8;
str2 = str9;
str3 = str10;
} else {
str3 = str10;
str = str8;
str2 = str9;
list3 = (List) rgo.a.g.stream().map(new Function(c1275ZkA, list) { // from class: o.nMI
private List b;
private C1275ZkA e;
@Override // java.util.function.Function
public final Object apply(Object obj) {
return C1275ZkA.e(this.e, this.b, (Rgo) obj);
}
{
this.e = c1275ZkA;
this.b = list;
}
}).collect(Collectors.toList());
}
return new Rgo(j, str4, str5, str6, str7, str, str2, str3, str11, str12, str13, i, i2, str14, str15, i3, i4, str16, str17, i5, i6, i7, str18, list2, str19, i8, str20, new YMu(str21, str22, str23, str24, num, num2, list3, rgo.a.c, rgo.a.f, rgo.a.a, rgo.a.d, rgo.a.b), rgo.A);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ void a(String str, List list, VAh vAh) {
if (vAh.d.equalsIgnoreCase(str)) {
list.addAll(vAh.a);
}
}
private static Rgo d(Rgo rgo, int i, List<VAh> list) {
return new Rgo(rgo.s, rgo.z, rgo.B, rgo.q, rgo.y, rgo.v, rgo.w, rgo.u, rgo.k, rgo.l, rgo.i, rgo.j, rgo.t, rgo.C, rgo.r, rgo.n, rgo.x, rgo.f8346o, rgo.p, rgo.f, rgo.h, rgo.g, rgo.b, rgo.d, rgo.c, rgo.D, rgo.e, a(rgo.a, list, i), rgo.A);
}
public final EQY b(C4212bTg c4212bTg, final String str, EnumC17751zVK enumC17751zVK, EnumC17751zVK enumC17751zVK2, EnumC17751zVK enumC17751zVK3) {
List arrayList;
this.d = c4212bTg.g;
ArrayList arrayList2 = new ArrayList();
if (enumC17751zVK == EnumC17751zVK.SUCCESS) {
if (c4212bTg.c != null) {
arrayList = c4212bTg.c;
} else {
arrayList = new ArrayList();
}
List list = (List) arrayList.stream().filter(new Predicate(this) { // from class: o.JEN
private C1275ZkA a;
@Override // java.util.function.Predicate
public final boolean test(Object obj) {
return C0619KuQ.a((C17104tuu) obj);
}
{
this.a = this;
}
}).sorted(Comparator.comparingInt(new ToIntFunction() { // from class: o.HhY
@Override // java.util.function.ToIntFunction
public final int applyAsInt(Object obj) {
return ((C17104tuu) obj).d;
}
})).collect(Collectors.toList());
if (list.isEmpty()) {
arrayList2.add(uxC.b().a(arrayList2.size()).b(0L).f(2).c(AyW.ADD_SHORTCUT));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
} else if (list.size() == 1) {
arrayList2.add(a((C17104tuu) list.get(0), str, arrayList2.size()));
arrayList2.add(uxC.b().a(arrayList2.size()).b(0L).c(AyW.ADD_SHORTCUT));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
} else if (list.size() == 2) {
arrayList2.add(a((C17104tuu) list.get(0), str, arrayList2.size()));
arrayList2.add(a((C17104tuu) list.get(1), str, arrayList2.size()));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
arrayList2.add(uxC.b().a(arrayList2.size()).b(0L).f(3).c(AyW.ADD_SHORTCUT));
} else if (list.size() > 2) {
arrayList2.add(a((C17104tuu) list.get(0), str, arrayList2.size()));
arrayList2.add(a((C17104tuu) list.get(1), str, arrayList2.size()));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
for (int i = 2; i < list.size(); i++) {
arrayList2.add(a((C17104tuu) list.get(i), str, arrayList2.size()));
}
if (arrayList2.size() < c4212bTg.g + 1) {
arrayList2.add(uxC.b().a(arrayList2.size()).b(0L).f(3 - (arrayList2.size() % 3)).c(AyW.ADD_SHORTCUT));
}
}
} else if (enumC17751zVK == EnumC17751zVK.LOADING) {
arrayList2.add(uxC.b().c(AyW.LOADING).a(arrayList2.size()).f(2));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
} else {
arrayList2.add(uxC.b().c(AyW.ERROR).a(arrayList2.size()).f(2));
arrayList2.add(uxC.b().c(AyW.SCB).a(arrayList2.size()));
}
List<uxC> list2 = (List) this.c.b(c4212bTg.d).stream().filter(new Predicate(this) { // from class: o.Afy
private C1275ZkA a;
@Override // java.util.function.Predicate
public final boolean test(Object obj) {
return C1275ZkA.a(this.a, (QJg) obj);
}
{
this.a = this;
}
}).map(new Function(this, str) { // from class: o.Uei
private C1275ZkA c;
private String e;
@Override // java.util.function.Function
public final Object apply(Object obj) {
return C1275ZkA.c(this.c, this.e, (QJg) obj);
}
{
this.c = this;
this.e = str;
}
}).collect(Collectors.toList());
if (enumC17751zVK3 == EnumC17751zVK.SUCCESS) {
if (list2 != null && !list2.isEmpty()) {
arrayList2.add(new uxC().c(AyW.BANNER).f(3).a(arrayList2.size()).d(list2));
}
} else if (enumC17751zVK3 == EnumC17751zVK.LOADING) {
arrayList2.add(new uxC().c(AyW.LOADING).f(3).a(arrayList2.size()).d(list2));
}
List<QJg> b = this.c.b(c4212bTg.i);
int size = arrayList2.size();
ArrayList arrayList3 = new ArrayList();
Iterator<QJg> it = b.iterator();
while (it.hasNext()) {
arrayList3.add(d(it.next(), size));
}
arrayList2.addAll(arrayList3);
EQY c = EQY.c();
c.i = arrayList2;
c.a = c4212bTg.b;
c.c = c4212bTg.g;
c.d = enumC17751zVK2;
return c;
}
private static String b(int i) {
return i != 200 ? i != 300 ? i != 400 ? i != 500 ? "" : "MEMBERSHIP_CARDS_LANDING" : "EASYMALL_LANDING" : "INSURANCE_LANDING" : "INVESTMENTS_LANDING";
}
}