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

622 lines
19 KiB
Java

package o;
import com.scb.phone.domain.errors.RetrofitException;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import o.C0690Mh;
import o.C4401bZA;
import o.PRA;
import o.ZI;
import o.wRi;
/* renamed from: o.bZA */
/* loaded from: classes4.dex */
public class C4401bZA extends ZI<InterfaceC9492dkk> {
private final vij a;
public List<C0985Ta> b;
public List<C0405Fw> c;
public final C17800zpz d;
public boolean e;
public C0977Su g;
public final qBc h;
public final Obj i;
public final C15882jPm k;
public final C17513xR l;
public final fAZ m;
private final C16127lV n;
/* renamed from: o */
private int f8556o;
private boolean p;
private final C17695yw q;
private boolean r;
private boolean s;
private final PGF t;
private final THd v;
@InterfaceC13391fZD
public C4401bZA(fAZ faz, vij vijVar, PGF pgf, C17800zpz c17800zpz, qBc qbc, Obj obj, THd tHd, C17695yw c17695yw, C16903sI c16903sI, C16127lV c16127lV, C17513xR c17513xR, C15882jPm c15882jPm) {
super(c16903sI);
this.e = false;
this.f8556o = 0;
this.m = faz;
this.a = vijVar;
this.t = pgf;
this.d = c17800zpz;
this.h = qbc;
this.i = obj;
this.v = tHd;
this.q = c17695yw;
this.n = c16127lV;
this.l = c17513xR;
this.k = c15882jPm;
this.g = new C0977Su();
}
public void a(String str, int i) {
C0977Su c0977Su = this.g;
if (c0977Su != null && c0977Su.l != null) {
bZB bzb = new bZB(this);
if (this.f != 0) {
bzb.e(this.f);
}
}
this.g.l = str;
if (this.f != 0) {
this.f.y();
}
ZI.IeS ieS = new ZI.IeS(this, i) { // from class: o.bZF
private C4401bZA d;
private int e;
@Override // o.ZI.IeS
public final void e(Object obj) {
InterfaceC9492dkk interfaceC9492dkk = (InterfaceC9492dkk) obj;
interfaceC9492dkk.a(this.d.g.l, this.e);
}
{
this.d = this;
this.e = i;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
}
public final void d(String str, boolean z) {
boolean z2 = !gjJ.b((CharSequence) str) && str.length() == 17;
this.s = z2;
if (!z && z2) {
this.g.b = str.replace("-", "");
}
ZI.IeS ieS = new ZI.IeS(this, z, str) { // from class: o.bZC
private C4401bZA a;
private String d;
private boolean e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4401bZA c4401bZA = this.a;
boolean z3 = this.e;
String str2 = this.d;
((InterfaceC9492dkk) obj).c((r1 || gjJ.b((CharSequence) r2) || r0.s) ? false : true);
}
{
this.a = this;
this.e = z;
this.d = str;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
C4432bZz c4432bZz = new C4432bZz(this);
if (this.f != 0) {
c4432bZz.e(this.f);
}
}
/* renamed from: o.bZA$3 */
/* loaded from: classes4.dex */
public final class AnonymousClass3 extends wRi.LWm<zwR> {
private C4401bZA b;
private String c;
AnonymousClass3(C4401bZA c4401bZA, String str) {
this.b = c4401bZA;
this.c = str;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
zwR zwr = (zwR) obj;
C4401bZA c4401bZA = this.b;
c4401bZA.c = c4401bZA.n.a(zwr, this.c);
if (!"th".equalsIgnoreCase(this.c)) {
Collections.sort(this.b.c, new Comparator() { // from class: o.bZI
@Override // java.util.Comparator
public final int compare(Object obj2, Object obj3) {
int compareTo;
compareTo = ((C0405Fw) obj2).d.compareTo(((C0405Fw) obj3).d);
return compareTo;
}
});
}
ArrayList arrayList = new ArrayList();
int size = this.b.c.size();
for (int i = 0; i < size; i++) {
if ("TH".equalsIgnoreCase(((C0405Fw) this.b.c.get(i)).b)) {
this.b.f8556o = i;
}
arrayList.add(((C0405Fw) this.b.c.get(i)).d);
}
C0405Fw c0405Fw = new C0405Fw();
c0405Fw.c = arrayList;
c0405Fw.a = zwr.a;
C4401bZA c4401bZA2 = this.b;
ZI.IeS ieS = new ZI.IeS(this, c0405Fw) { // from class: o.bZN
private C4401bZA.AnonymousClass3 a;
private C0405Fw e;
@Override // o.ZI.IeS
public final void e(Object obj2) {
InterfaceC9492dkk interfaceC9492dkk = (InterfaceC9492dkk) obj2;
interfaceC9492dkk.d(this.e, this.a.b.f8556o);
}
{
this.a = this;
this.e = c0405Fw;
}
};
if (c4401bZA2.f != 0) {
ieS.e(c4401bZA2.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onComplete() {
C4401bZA.g(this.b);
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C4401bZA.f(this.b);
C4401bZA.a(this.b, th);
}
}
/* renamed from: o.bZA$5 */
/* loaded from: classes4.dex */
public final class AnonymousClass5 extends wRi.LWm<Boolean> {
private C4401bZA b;
AnonymousClass5(C4401bZA c4401bZA) {
this.b = c4401bZA;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
this.b.e = true;
C4401bZA.o(this.b);
C4401bZA.h(this.b);
C4401bZA c4401bZA = this.b;
ZI.IeS ieS = new ZI.IeS(this, (Boolean) obj) { // from class: o.bZL
private C4401bZA.AnonymousClass5 b;
private Boolean c;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C4401bZA.AnonymousClass5.b(this.b, this.c, (InterfaceC9492dkk) obj2);
}
{
this.b = this;
this.c = r2;
}
};
if (c4401bZA.f != 0) {
ieS.e(c4401bZA.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C4401bZA.k(this.b);
C4401bZA.d(this.b, th, C0690Mh.IeS.NAVIGATE_BACK);
this.b.e = true;
}
public static /* synthetic */ void b(AnonymousClass5 anonymousClass5, Boolean bool, InterfaceC9492dkk interfaceC9492dkk) {
if (!Boolean.TRUE.equals(bool)) {
interfaceC9492dkk.e(anonymousClass5.b.j.d(RetrofitException.c((VCl) null), C0690Mh.IeS.NAVIGATE_BACK));
} else {
interfaceC9492dkk.b();
}
}
}
/* renamed from: o.bZA$HBt */
/* loaded from: classes4.dex */
public class HBt extends wRi.LWm<List<Xfo>> {
private C4401bZA e;
public HBt(C4401bZA c4401bZA) {
this.e = c4401bZA;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
List list = (List) obj;
C4401bZA.t(this.e);
if (list == null || list.isEmpty()) {
return;
}
C4401bZA c4401bZA = this.e;
C17695yw unused = c4401bZA.q;
c4401bZA.b = (List) C16157lj.c(new Object[]{list, new InterfaceC1244Ytw(this) { // from class: o.bZU
private C4401bZA.HBt b;
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj2) {
return C4401bZA.HBt.b(this.b, (Xfo) obj2);
}
{
this.b = this;
}
}}, -1846295624, 1846295631, (int) System.currentTimeMillis());
C4401bZA c4401bZA2 = this.e;
ZI.IeS ieS = new ZI.IeS(this) { // from class: o.bZT
private C4401bZA.HBt c;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C4401bZA.HBt.e(this.c, (InterfaceC9492dkk) obj2);
}
{
this.c = this;
}
};
if (c4401bZA2.f != 0) {
ieS.e(c4401bZA2.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C4401bZA.q(this.e);
C4401bZA.b(this.e, th);
}
public static /* synthetic */ C0985Ta b(HBt hBt, Xfo xfo) {
C17695yw unused = hBt.e.q;
return C17695yw.c(xfo, hBt.e.m.b.M());
}
public static /* synthetic */ void e(HBt hBt, InterfaceC9492dkk interfaceC9492dkk) {
YKU yku = new YKU(hBt.e.b);
YKU yku2 = new YKU(yku.a, new C17745zRk(yku.b, new Comparator(hBt) { // from class: o.bZP
private C4401bZA.HBt d;
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
return C4401bZA.HBt.a((C0985Ta) obj, (C0985Ta) obj2);
}
{
this.d = hBt;
}
}));
interfaceC9492dkk.e((List<String>) new YKU(yku2.a, new wxK(yku2.b, new InterfaceC1244Ytw() { // from class: o.bZR
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj) {
return ((C0985Ta) obj).f;
}
})).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())));
}
public static /* synthetic */ int a(C0985Ta c0985Ta, C0985Ta c0985Ta2) {
if (c0985Ta.h > c0985Ta2.h) {
return 1;
}
return c0985Ta2.h > c0985Ta.h ? -1 : 0;
}
}
/* renamed from: o.bZA$LWm */
/* loaded from: classes4.dex */
public class LWm extends wRi.LWm<Boolean> {
private C4401bZA b;
public LWm(C4401bZA c4401bZA) {
this.b = c4401bZA;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
Boolean bool = (Boolean) obj;
this.b.e = true;
super.onNext(bool);
C4401bZA.i(this.b);
C4401bZA c4401bZA = this.b;
ZI.IeS ieS = new ZI.IeS(this, bool) { // from class: o.bZK
private Boolean b;
private C4401bZA.LWm c;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C4401bZA.LWm.e(this.c, this.b, (InterfaceC9492dkk) obj2);
}
{
this.c = this;
this.b = bool;
}
};
if (c4401bZA.f != 0) {
ieS.e(c4401bZA.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
super.onError(th);
this.b.e = true;
C4401bZA.m(this.b);
C4401bZA c4401bZA = this.b;
ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.bZJ
private C4401bZA.LWm a;
private Throwable d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4401bZA.LWm.a(this.a, this.d, (InterfaceC9492dkk) obj);
}
{
this.a = this;
this.d = th;
}
};
if (c4401bZA.f != 0) {
ieS.e(c4401bZA.f);
}
}
public static /* synthetic */ void a(LWm lWm, Throwable th, InterfaceC9492dkk interfaceC9492dkk) {
if (th instanceof RetrofitException) {
RetrofitException retrofitException = (RetrofitException) th;
if (retrofitException.d == RetrofitException.RVV.API_ERROR && retrofitException.e != null && retrofitException.e.c != null) {
String str = retrofitException.e.c.e;
if ("3014".equals(str)) {
interfaceC9492dkk.e();
return;
} else if ("9101".equals(str)) {
interfaceC9492dkk.c();
return;
} else if ("9102".equals(str)) {
interfaceC9492dkk.d();
return;
}
}
}
interfaceC9492dkk.e(lWm.b.j.e(th));
}
public static /* synthetic */ void e(LWm lWm, Boolean bool, InterfaceC9492dkk interfaceC9492dkk) {
if (!Boolean.TRUE.equals(bool)) {
interfaceC9492dkk.e(lWm.b.j.e(RetrofitException.c((VCl) null)));
} else {
interfaceC9492dkk.b(lWm.b.g);
}
}
}
@Override // o.ZI
public void w_() {
Obj obj = this.i;
if (!obj.h.isDisposed()) {
obj.h.dispose();
}
PGF pgf = this.t;
if (!pgf.h.isDisposed()) {
pgf.h.dispose();
}
fAZ faz = this.m;
if (!faz.h.isDisposed()) {
faz.h.dispose();
}
super.w_();
}
public static /* synthetic */ void e(C4401bZA c4401bZA, InterfaceC9492dkk interfaceC9492dkk) {
interfaceC9492dkk.e(c4401bZA.a());
}
static /* synthetic */ void h(C4401bZA c4401bZA) {
C4432bZz c4432bZz = new C4432bZz(c4401bZA);
if (c4401bZA.f != 0) {
c4432bZz.e(c4401bZA.f);
}
}
static /* synthetic */ void g(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void f(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void i(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void m(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void a(C4401bZA c4401bZA, Throwable th) {
if (c4401bZA.b(th)) {
c4401bZA.d(c4401bZA.j.e(th));
}
}
static /* synthetic */ void k(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void d(C4401bZA c4401bZA, Throwable th, C0690Mh.IeS ieS) {
if (c4401bZA.b(th)) {
c4401bZA.d(c4401bZA.j.d(th, ieS));
}
}
static /* synthetic */ void o(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void q(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
static /* synthetic */ void b(C4401bZA c4401bZA, Throwable th) {
if (c4401bZA.b(th)) {
c4401bZA.d(c4401bZA.j.e(th));
}
}
static /* synthetic */ void t(C4401bZA c4401bZA) {
if (c4401bZA.f != 0) {
c4401bZA.f.ar_();
}
}
private boolean b() {
String str = this.g.k;
return (str == null || str.isEmpty() || str.length() != 12) ? false : true;
}
public final boolean a() {
return (this.g.l == null || gjJ.b((CharSequence) this.g.h) || !this.r || !this.p || gjJ.b((CharSequence) this.g.c) || gjJ.b((CharSequence) this.g.j) || gjJ.b((CharSequence) this.g.a) || gjJ.b((CharSequence) this.g.g) || gjJ.b((CharSequence) this.g.f) || !b() || !this.s) ? false : true;
}
public void d(File file) {
if (this.f != 0) {
this.f.y();
}
this.t.b(file);
PGF pgf = this.t;
pgf.d(pgf.i, new AnonymousClass5(this));
}
public void d(String str) {
C4432bZz c4432bZz = new C4432bZz(this);
if (this.f != 0) {
c4432bZz.e(this.f);
}
bZG bzg = new bZG();
if (this.f != 0) {
bzg.e(this.f);
}
if (this.f != 0) {
this.f.y();
}
this.a.e();
vij vijVar = this.a;
vijVar.d(vijVar.i, new AnonymousClass3(this, str));
}
public final void e(String str, boolean z) {
this.p = !gjJ.b((CharSequence) str) && str.length() == 10 && THd.b(str);
ZI.IeS ieS = new ZI.IeS(this, z, str) { // from class: o.bZD
private boolean b;
private C4401bZA d;
private String e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4401bZA c4401bZA = this.d;
boolean z2 = this.b;
String str2 = this.e;
((InterfaceC9492dkk) obj).a((r1 || gjJ.b((CharSequence) r2) || r0.p) ? false : true);
}
{
this.d = this;
this.b = z;
this.e = str;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
if (this.p) {
this.g.d = cXG.a("dd/MM/yyyy", C15240gl.b(C15240gl.e(str, "/"))).format(C15554gto.ofPattern("dd/MM/yyyy"));
} else {
this.g.d = null;
}
C4432bZz c4432bZz = new C4432bZz(this);
if (this.f != 0) {
c4432bZz.e(this.f);
}
}
public final void a(String str, boolean z) {
this.r = !gjJ.b((CharSequence) str) && str.length() == 10 && cXG.c(str, "dd/MM/yyyy").booleanValue();
ZI.IeS ieS = new ZI.IeS(this, z, str) { // from class: o.bZE
private boolean a;
private String c;
private C4401bZA d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4401bZA c4401bZA = this.d;
boolean z2 = this.a;
String str2 = this.c;
((InterfaceC9492dkk) obj).b((r1 || gjJ.b((CharSequence) r2) || r0.r) ? false : true);
}
{
this.d = this;
this.a = z;
this.c = str;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
if (this.r) {
this.g.m = cXG.d(cXG.d("dd/MM/yyyy", str)).format(C15554gto.ofPattern("dd/MM/yyyy"));
} else {
this.g.m = null;
}
C4432bZz c4432bZz = new C4432bZz(this);
if (this.f != 0) {
c4432bZz.e(this.f);
}
}
}