package o; import com.scb.phone.domain.errors.RetrofitException; import com.scb.phone.presentation.mapper.transferandpay.BaseAssetsDisplayMapper; import java.util.ArrayList; import java.util.List; import java.util.Objects; import o.C0690Mh; import o.C1406aDS; import o.CKC; import o.PRA; import o.ZI; import o.wRi; /* renamed from: o.aDS */ /* loaded from: classes4.dex */ public class C1406aDS extends ZI { public List a; public final KMA b; public final kOa c; public final BaseAssetsDisplayMapper d; public String e; public int g; private final C16614pj h; public String i; private final C17411wa k; private final BPq l; private String m; private final FHl n; @InterfaceC13391fZD public C1406aDS(C16903sI c16903sI, KMA kma, BPq bPq, kOa koa, FHl fHl, C17411wa c17411wa, C16614pj c16614pj, BaseAssetsDisplayMapper baseAssetsDisplayMapper, String str) { super(c16903sI); this.g = 0; this.e = ""; this.b = kma; this.l = bPq; this.c = koa; this.n = fHl; this.k = c17411wa; this.h = c16614pj; this.d = baseAssetsDisplayMapper; this.m = str; } /* renamed from: o.aDS$2 */ /* loaded from: classes4.dex */ public class AnonymousClass2 extends wRi.LWm> { private C1406aDS d; public AnonymousClass2(C1406aDS c1406aDS) { this.d = c1406aDS; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { BPq bPq = this.d.l; YKU yku = new YKU((List) obj); YKU yku2 = new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw() { // from class: o.aDV @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { String str; str = ((C17480xBa) obj2).b; return str; } })); bPq.b(new CKC((List) new YKU(yku2.a, new wxK(yku2.b, new InterfaceC1244Ytw() { // from class: o.aDY @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { return C1406aDS.AnonymousClass2.e((String) obj2); } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())), this.d.m)); BPq bPq2 = this.d.l; bPq2.d(bPq2.i, new RVV(this.d)); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { if (this.d.i(th)) { return; } C1406aDS.c(this.d, th, C0690Mh.IeS.NAVIGATE_BACK); } public static /* synthetic */ CKC.RVV e(String str) { return new CKC.RVV(str); } } /* renamed from: o.aDS$RVV */ /* loaded from: classes4.dex */ public class RVV extends wRi.LWm { private C1406aDS a; public RVV(C1406aDS c1406aDS) { this.a = c1406aDS; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { C15684hja c15684hja = (C15684hja) obj; if (c15684hja.b.isEmpty()) { C1406aDS c1406aDS = this.a; ZI.IeS ieS = new ZI.IeS() { // from class: o.aEe @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9097ddL) obj2).d(); } }; if (c1406aDS.f != 0) { ieS.e(c1406aDS.f); } C1406aDS.f(this.a); return; } this.a.i = c15684hja.c; this.a.a = new ArrayList(); YKU yku = new YKU(c15684hja.b); YKU yku2 = new YKU(yku.a, new SJW(yku.b, new InterfaceC1244Ytw() { // from class: o.aEc @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { return C1406aDS.RVV.c((xiU) obj2); } })); YKU c = new YKU(yku2.a, new C17745zRk(yku2.b, xNZ.a(new InterfaceC1244Ytw() { // from class: o.aEd @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { String str; str = ((C1406aDS.LWm) obj2).e.a; return str; } }))).c(10L); List list = this.a.a; Objects.requireNonNull(list); YKU yku3 = new YKU(c.a, new LMX(c.b, new qsu(list) { // from class: o.aEa private List c; @Override // o.qsu public final void d(Object obj2) { this.c.add((C1406aDS.LWm) obj2); } { this.c = list; } })); YKU yku4 = new YKU(yku3.a, new wxK(yku3.b, new InterfaceC1244Ytw() { // from class: o.aEb @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { return ((C1406aDS.LWm) obj2).e; } })); List list2 = (List) new YKU(yku4.a, new wxK(yku4.b, new InterfaceC1244Ytw(this.a) { // from class: o.aEj private C1406aDS e; @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { QE b; b = C1406aDS.b(this.e, (IJa) obj2); return b; } { this.e = r1; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())); C1406aDS c1406aDS2 = this.a; ZI.IeS ieS2 = new ZI.IeS(this, list2) { // from class: o.aEi private C1406aDS.RVV b; private List c; @Override // o.ZI.IeS public final void e(Object obj2) { C1406aDS.RVV.b(this.b, this.c, (InterfaceC9097ddL) obj2); } { this.b = this; this.c = list2; } }; if (c1406aDS2.f != 0) { ieS2.e(c1406aDS2.f); } C1406aDS.j(this.a); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { if (this.a.i(th)) { return; } C1406aDS.a(this.a, th, C0690Mh.IeS.NAVIGATE_BACK); } public static /* synthetic */ void b(RVV rvv, List list, InterfaceC9097ddL interfaceC9097ddL) { interfaceC9097ddL.a((List) list); QK b = rvv.a.b(0); boolean z = false; boolean z2 = ((LWm) rvv.a.a.get(0)).e.g; interfaceC9097ddL.c(b); if (list.size() <= 10 && list.size() > 1) { z = true; } interfaceC9097ddL.c(z); C1406aDS.e(rvv.a); } public static /* synthetic */ LWm c(xiU xiu, IJa iJa) { return new LWm(xiu.b, xiu.d, iJa); } public static /* synthetic */ YKU c(xiU xiu) { YKU yku = new YKU(xiu.e); return new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw(xiu) { // from class: o.aDW private xiU a; @Override // o.InterfaceC1244Ytw public final Object d(Object obj) { return C1406aDS.RVV.c(this.a, (IJa) obj); } { this.a = xiu; } })); } } /* renamed from: o.aDS$HBt */ /* loaded from: classes4.dex */ public class HBt extends wRi.LWm { private C1406aDS c; public HBt(C1406aDS c1406aDS) { this.c = c1406aDS; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { C1406aDS.i(this.c); C1406aDS c1406aDS = this.c; ZI.IeS ieS = new ZI.IeS((C0731Nfa) obj) { // from class: o.aEg private C0731Nfa e; @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9097ddL) obj2).a(this.e.e.equals("PHYSICAL")); } { this.e = r1; } }; if (c1406aDS.f != 0) { ieS.e(c1406aDS.f); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { String str; if (this.c.i(th)) { return; } C1406aDS.g(this.c); if (th instanceof RetrofitException) { RetrofitException retrofitException = (RetrofitException) th; if (retrofitException.e == null || retrofitException.e.c == null) { str = ""; } else { str = retrofitException.e.c.e; } if ("3005".equals(str)) { C1406aDS.d(this.c, th, C0690Mh.IeS.NAVIGATE_BACK); return; } else { C1406aDS.e(this.c, th, C0690Mh.IeS.JUST_DISMISS); return; } } C1406aDS.b(this.c, th, C0690Mh.IeS.JUST_DISMISS); } } public QK b(int i) { return this.h.c(this.a.get(i).d, this.a.get(i).b, this.n.a.K().m > 0); } /* renamed from: o.aDS$LWm */ /* loaded from: classes4.dex */ public static class LWm { String b; String d; public IJa e; LWm(String str, String str2, IJa iJa) { this.d = str; this.b = str2; this.e = iJa; } } public static /* synthetic */ void c(String str, InterfaceC9097ddL interfaceC9097ddL) { interfaceC9097ddL.b(str.replace(" ", "").length() == 16); interfaceC9097ddL.a(C6583cXR.f(str)); } public static /* synthetic */ void e(C1406aDS c1406aDS, InterfaceC9097ddL interfaceC9097ddL) { if (c1406aDS.e.replace(" ", "").length() == 16) { interfaceC9097ddL.e(); } else if (c1406aDS.a.get(c1406aDS.g).e.g) { interfaceC9097ddL.b(); } else { interfaceC9097ddL.c(); } } public static /* synthetic */ void b(C1406aDS c1406aDS, int i, InterfaceC9097ddL interfaceC9097ddL) { c1406aDS.g = i; QK b = c1406aDS.b(i); boolean z = c1406aDS.a.get(i).e.g; interfaceC9097ddL.c(b); aDZ adz = new aDZ(c1406aDS, i); if (c1406aDS.f != 0) { adz.e(c1406aDS.f); } } public static /* synthetic */ void e(C1406aDS c1406aDS, int i, InterfaceC9097ddL interfaceC9097ddL) { if (c1406aDS.a.get(i).e.g) { interfaceC9097ddL.c(c1406aDS.h.g()); } else { interfaceC9097ddL.a(); } } static /* synthetic */ void e(C1406aDS c1406aDS) { aDZ adz = new aDZ(c1406aDS, 0); if (c1406aDS.f != 0) { adz.e(c1406aDS.f); } } public static /* bridge */ /* synthetic */ QE b(C1406aDS c1406aDS, IJa iJa) { return c1406aDS.k.b(iJa.f, iJa.a); } static /* synthetic */ void c(C1406aDS c1406aDS, Throwable th, C0690Mh.IeS ieS) { if (c1406aDS.b(th)) { c1406aDS.d(c1406aDS.j.d(th, ieS)); } } static /* synthetic */ void e(C1406aDS c1406aDS, Throwable th, C0690Mh.IeS ieS) { if (c1406aDS.b(th)) { c1406aDS.d(c1406aDS.j.d(th, ieS)); } } static /* synthetic */ void b(C1406aDS c1406aDS, Throwable th, C0690Mh.IeS ieS) { if (c1406aDS.b(th)) { c1406aDS.d(c1406aDS.j.d(th, ieS)); } } static /* synthetic */ void f(C1406aDS c1406aDS) { if (c1406aDS.f != 0) { c1406aDS.f.ar_(); } } static /* synthetic */ void j(C1406aDS c1406aDS) { if (c1406aDS.f != 0) { c1406aDS.f.ar_(); } } static /* synthetic */ void a(C1406aDS c1406aDS, Throwable th, C0690Mh.IeS ieS) { if (c1406aDS.b(th)) { c1406aDS.d(c1406aDS.j.d(th, ieS)); } } static /* synthetic */ void i(C1406aDS c1406aDS) { if (c1406aDS.f != 0) { c1406aDS.f.ar_(); } } static /* synthetic */ void g(C1406aDS c1406aDS) { if (c1406aDS.f != 0) { c1406aDS.f.ar_(); } } static /* synthetic */ void d(C1406aDS c1406aDS, Throwable th, C0690Mh.IeS ieS) { if (c1406aDS.b(th)) { c1406aDS.d(c1406aDS.j.d(th, ieS)); } } }