package o; import com.scb.phone.domain.errors.RetrofitException; import java.util.List; import o.C0690Mh; import o.C4414bZh; import o.ZI; import o.cXH; import o.rtJ; import o.wRi; /* renamed from: o.bZh, reason: case insensitive filesystem */ /* loaded from: classes4.dex */ public class C4414bZh extends ZI { private fSC a; public cXH.HBt.EnumC0104HBt b; private final C6149cKI c; private final Hdu d; public boolean e; private final rtJ h; @InterfaceC13391fZD public C4414bZh(C6149cKI c6149cKI, Hdu hdu, C17673yn c17673yn, rtJ rtj) { super(c17673yn); this.e = false; this.a = new fSC(); this.b = cXH.HBt.EnumC0104HBt.SCANNING_ID_STATE; this.c = c6149cKI; this.d = hdu; this.h = rtj; } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.bZh$5, reason: invalid class name */ /* loaded from: classes4.dex */ public static /* synthetic */ class AnonymousClass5 { static final int[] a; static { int[] iArr = new int[cXH.HBt.EnumC0104HBt.values().length]; a = iArr; try { iArr[cXH.HBt.EnumC0104HBt.SCANNING_ID_STATE.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { a[cXH.HBt.EnumC0104HBt.PENDING_VERIFYING_PARTNER_STATE.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { a[cXH.HBt.EnumC0104HBt.VERIFYING_PARTNER_STATE.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { a[cXH.HBt.EnumC0104HBt.LIVENESS_CHECK_STATE.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } try { a[cXH.HBt.EnumC0104HBt.FINISHED_FLOW_STATE.ordinal()] = 5; } catch (NoSuchFieldError unused5) { } } } public final void d(C c) { if (this.e) { this.e = false; if (this.b == null) { return; } int i = AnonymousClass5.a[this.b.ordinal()]; if (i == 1) { ZI.IeS ieS = new ZI.IeS() { // from class: o.bZm @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9486dke) obj).j(); } }; if (this.f != 0) { ieS.e(this.f); return; } return; } if (i == 2 || i == 3) { if (this.f != 0) { this.f.y(); } this.d.e(); Hdu hdu = this.d; hdu.d(hdu.i, new wRi.LWm>(this) { // from class: o.bZh.4 private C4414bZh a; { this.a = this; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { super.onNext((List) obj); this.a.e = true; C4414bZh.j(this.a); C4414bZh c4414bZh = this.a; ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bZr @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9486dke) obj2).f(); } }; if (c4414bZh.f != 0) { ieS2.e(c4414bZh.f); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { super.onError(th); this.a.e = true; C4414bZh.h(this.a); C4414bZh c4414bZh = this.a; c4414bZh.d(c4414bZh.j.e(th)); } }); return; } if (i == 4) { if (this.f != 0) { this.f.y(); } this.h.b(new InterfaceC13176fSx(this) { // from class: o.bZh.2 private C4414bZh c; @Override // o.InterfaceC13176fSx public final void onSubscribe(fSJ fsj) { } { this.c = this; } @Override // o.InterfaceC13176fSx public final /* synthetic */ void e(Pag pag) { C4414bZh.e(this.c); C4414bZh c4414bZh = this.c; ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bZq @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9486dke) obj).d(); } }; if (c4414bZh.f != 0) { ieS2.e(c4414bZh.f); } } @Override // o.InterfaceC13176fSx public final void onError(Throwable th) { String str; C4414bZh.b(this.c); this.c.e = true; if (!(th instanceof RetrofitException)) { C4414bZh.e(this.c, th, C0690Mh.IeS.JUST_DISMISS); return; } VCl vCl = ((RetrofitException) th).e; if (vCl == null || vCl.c == null) { str = ""; } else { str = vCl.c.e; } if ("3052".equalsIgnoreCase(str)) { C4414bZh c4414bZh = this.c; ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bZl @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9486dke) obj).c(); } }; if (c4414bZh.f != 0) { ieS2.e(c4414bZh.f); return; } return; } C4414bZh.b(this.c, th, C0690Mh.IeS.JUST_DISMISS); } }, new rtJ.Sts(new C4368bY("NDID_RP", "FACE")), this.a); } else if (i == 5) { if (this.f != 0) { this.f.y(); } this.c.d(c); C6149cKI c6149cKI = this.c; c6149cKI.d(c6149cKI.i, new AnonymousClass3(this)); } } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.bZh$3, reason: invalid class name */ /* loaded from: classes4.dex */ public final class AnonymousClass3 extends wRi.LWm { private C4414bZh d; AnonymousClass3(C4414bZh c4414bZh) { this.d = c4414bZh; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { final Boolean bool = (Boolean) obj; super.onNext(bool); this.d.e = true; C4414bZh.f(this.d); C4414bZh c4414bZh = this.d; ZI.IeS ieS = new ZI.IeS(this, bool) { // from class: o.bZo private Boolean a; private C4414bZh.AnonymousClass3 e; @Override // o.ZI.IeS public final void e(Object obj2) { C4414bZh.AnonymousClass3.c(this.e, this.a, (InterfaceC9486dke) obj2); } { this.e = this; this.a = bool; } }; if (c4414bZh.f != 0) { ieS.e(c4414bZh.f); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(final Throwable th) { super.onError(th); this.d.e = true; C4414bZh.i(this.d); C4414bZh c4414bZh = this.d; ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.bZs private Throwable a; private C4414bZh.AnonymousClass3 d; @Override // o.ZI.IeS public final void e(Object obj) { InterfaceC9486dke interfaceC9486dke = (InterfaceC9486dke) obj; interfaceC9486dke.e(this.d.d.j.e(this.a)); } { this.d = this; this.a = th; } }; if (c4414bZh.f != 0) { ieS.e(c4414bZh.f); } } public static /* synthetic */ void c(AnonymousClass3 anonymousClass3, Boolean bool, InterfaceC9486dke interfaceC9486dke) { if (!Boolean.TRUE.equals(bool)) { interfaceC9486dke.e(anonymousClass3.d.j.e(RetrofitException.c((VCl) null))); } else { interfaceC9486dke.b(); } } } @Override // o.ZI public final void w_() { Hdu hdu = this.d; if (!hdu.h.isDisposed()) { hdu.h.dispose(); } C6149cKI c6149cKI = this.c; if (!c6149cKI.h.isDisposed()) { c6149cKI.h.dispose(); } super.w_(); } public static /* synthetic */ void d(C4414bZh c4414bZh, InterfaceC9486dke interfaceC9486dke) { interfaceC9486dke.d(c4414bZh.b); if (c4414bZh.b == cXH.HBt.EnumC0104HBt.PENDING_VERIFYING_PARTNER_STATE) { interfaceC9486dke.g(); } } public static /* synthetic */ void a(C4414bZh c4414bZh, InterfaceC9486dke interfaceC9486dke) { if (cXH.HBt.EnumC0104HBt.SCANNING_ID_STATE == c4414bZh.b) { interfaceC9486dke.e(); } else { interfaceC9486dke.a(); } } public static /* synthetic */ void b(C4414bZh c4414bZh, InterfaceC9486dke interfaceC9486dke) { if (c4414bZh.b != null) { int i = AnonymousClass5.a[c4414bZh.b.ordinal()]; if (i == 1) { interfaceC9486dke.e("first_step"); return; } if (i == 2 || i == 3) { interfaceC9486dke.e("second_step"); } else if (i == 4) { interfaceC9486dke.e("third_step"); } else if (i == 5) { interfaceC9486dke.e("complete"); } } } static /* synthetic */ void e(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } static /* synthetic */ void b(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } static /* synthetic */ void b(C4414bZh c4414bZh, Throwable th, C0690Mh.IeS ieS) { if (c4414bZh.b(th)) { c4414bZh.d(c4414bZh.j.d(th, ieS)); } } static /* synthetic */ void e(C4414bZh c4414bZh, Throwable th, C0690Mh.IeS ieS) { if (c4414bZh.b(th)) { c4414bZh.d(c4414bZh.j.d(th, ieS)); } } static /* synthetic */ void h(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } static /* synthetic */ void j(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } static /* synthetic */ void i(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } static /* synthetic */ void f(C4414bZh c4414bZh) { if (c4414bZh.f != 0) { c4414bZh.f.ar_(); } } }