package o; import o.C0217Bo; import o.InterfaceC9010dbe; import o.ZI; import o.cUO; import o.wRi; /* loaded from: classes4.dex */ public final class cUO extends AbstractC6226cMj { final C0347Ep a; final C17515xRi b; final C0217Bo c; private int d; private final tLY e; private C17434wjF g; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public cUO(tLY tly, C0347Ep c0347Ep, C0217Bo c0217Bo, C17515xRi c17515xRi, C16903sI c16903sI) { super(c16903sI); C14957gcv.e(tly, ""); C14957gcv.e(c0347Ep, ""); C14957gcv.e(c0217Bo, ""); C14957gcv.e(c17515xRi, ""); C14957gcv.e(c16903sI, ""); this.e = tly; this.a = c0347Ep; this.c = c0217Bo; this.b = c17515xRi; } @Override // o.AbstractC6226cMj public final void c() { this.d = 0; if (this.g == null) { ZI.IeS ieS = new ZI.IeS() { // from class: o.cUN @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9010dbe.IeS) obj).v(); } }; if (this.f != 0) { ieS.e(this.f); } C0217Bo c0217Bo = this.c; C0217Bo.Sts sts = C0217Bo.Sts.TOPUP; C14957gcv.e(sts, ""); c0217Bo.b = sts; this.e.a(Integer.valueOf(this.d)); tLY tly = this.e; tly.d(tly.i, new Sts(this)); } } @Override // o.ZI public final void w_() { super.w_(); this.g = null; tLY tly = this.e; if (tly.h.isDisposed()) { return; } tly.h.dispose(); } @Override // o.AbstractC6226cMj public final void b() { ZI.IeS ieS = new ZI.IeS() { // from class: o.cUL @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9010dbe.IeS) obj).e(); } }; if (this.f != 0) { ieS.e(this.f); } this.e.a(Integer.valueOf(this.d)); tLY tly = this.e; tly.d(tly.i, new Sts(this)); } @Override // o.AbstractC6226cMj public final void b(C1089Vj c1089Vj) { C14957gcv.e(c1089Vj, ""); ZI.IeS ieS = new ZI.IeS() { // from class: o.cUS @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9010dbe.IeS) obj).y(); } }; if (this.f != 0) { ieS.e(this.f); } tLY tly = this.e; C12949fM c12949fM = new C12949fM(); String str = c1089Vj.f; C14957gcv.e(str, ""); c12949fM.d = str; tly.a(c12949fM); tLY tly2 = this.e; tly2.d(tly2.i, new IeS(this)); } @Override // o.AbstractC6226cMj public final void a(final C1089Vj c1089Vj) { C14957gcv.e(c1089Vj, ""); ZI.IeS ieS = new ZI.IeS(c1089Vj) { // from class: o.cUP private C1089Vj e; @Override // o.ZI.IeS public final void e(Object obj) { cUO.b(this.e, (InterfaceC9010dbe.IeS) obj); } { this.e = c1089Vj; } }; if (this.f != 0) { ieS.e(this.f); } } /* loaded from: classes4.dex */ public final class Sts extends wRi.LWm { private cUO d; public Sts(cUO cuo) { this.d = cuo; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { C17434wjF c17434wjF = (C17434wjF) obj; C14957gcv.e(c17434wjF, ""); this.d.g = c17434wjF; if (this.d.f != 0) { final C1093Vl b = this.d.c.b(c17434wjF); if (b.d == 0) { if (this.d.d == 0) { cUO cuo = this.d; ZI.IeS ieS = new ZI.IeS() { // from class: o.cUU @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9010dbe.IeS) obj2).c(); } }; if (cuo.f != 0) { ieS.e(cuo.f); return; } return; } cUO cuo2 = this.d; ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cUR @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9010dbe.IeS) obj2).b(); } }; if (cuo2.f != 0) { ieS2.e(cuo2.f); return; } return; } if (this.d.d > 0) { cUO cuo3 = this.d; ZI.IeS ieS3 = new ZI.IeS(b) { // from class: o.cUT private C1093Vl d; @Override // o.ZI.IeS public final void e(Object obj2) { cUO.Sts.d(this.d, (InterfaceC9010dbe.IeS) obj2); } { this.d = b; } }; if (cuo3.f != 0) { ieS3.e(cuo3.f); } } else { cUO cuo4 = this.d; ZI.IeS ieS4 = new ZI.IeS(b) { // from class: o.cVc private C1093Vl a; @Override // o.ZI.IeS public final void e(Object obj2) { cUO.Sts.a(this.a, (InterfaceC9010dbe.IeS) obj2); } { this.a = b; } }; if (cuo4.f != 0) { ieS4.e(cuo4.f); } } this.d.d += b.c.size(); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { cUO.a(this.d); } public static /* synthetic */ void a(C1093Vl c1093Vl, InterfaceC9010dbe.IeS ieS) { C14957gcv.e(c1093Vl, ""); ieS.d(c1093Vl); } public static /* synthetic */ void d(C1093Vl c1093Vl, InterfaceC9010dbe.IeS ieS) { C14957gcv.e(c1093Vl, ""); ieS.a(c1093Vl); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { C14957gcv.e(th, ""); if (this.d.f == 0 || this.d.i(th)) { return; } cUO.a(this.d); cUO cuo = this.d; ZI.IeS ieS = new ZI.IeS() { // from class: o.cUV @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9010dbe.IeS) obj).a(); } }; if (cuo.f != 0) { ieS.e(cuo.f); } } } /* loaded from: classes4.dex */ public final class IeS extends wRi.LWm { private cUO d; public IeS(cUO cuo) { this.d = cuo; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { Ein ein = (Ein) obj; C14957gcv.e(ein, ""); C0347Ep c0347Ep = this.d.a; C1228Yn d = C0347Ep.d(ein); C1019Twi c1019Twi = new C1019Twi(); c1019Twi.a = d.e; c1019Twi.t = "TOPUP"; c1019Twi.x = d.c; c1019Twi.C = ein.j; C14957gcv.c(c1019Twi, ""); if (d.b != null) { c1019Twi.h = Double.parseDouble(d.b); C14957gcv.c(c1019Twi, ""); } if (d.a != null) { c1019Twi.D = d.a; C14957gcv.c(c1019Twi, ""); } this.d.b.e.d(c1019Twi); final cUO cuo = this.d; ZI.IeS ieS = new ZI.IeS(cuo) { // from class: o.cVb private cUO b; @Override // o.ZI.IeS public final void e(Object obj2) { cUO.IeS.c(this.b); } { this.b = cuo; } }; if (cuo.f != 0) { ieS.e(cuo.f); } cUO cuo2 = this.d; ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cUX @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC9010dbe.IeS) obj2).bq_(); } }; if (cuo2.f != 0) { ieS2.e(cuo2.f); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { cUO.b(this.d); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(final Throwable th) { C14957gcv.e(th, ""); if (this.d.i(th)) { return; } cUO.b(this.d); final cUO cuo = this.d; ZI.IeS ieS = new ZI.IeS(cuo, th) { // from class: o.cVa private Throwable a; private cUO b; @Override // o.ZI.IeS public final void e(Object obj) { cUO.IeS.b(this.b, this.a); } { this.b = cuo; this.a = th; } }; if (cuo.f != 0) { ieS.e(cuo.f); } } public static /* synthetic */ void b(cUO cuo, Throwable th) { C14957gcv.e(cuo, ""); C14957gcv.e(th, ""); cUO.d(cuo, th); } public static /* synthetic */ void c(cUO cuo) { C14957gcv.e(cuo, ""); cUO.b(cuo); } } public static /* synthetic */ void b(C1089Vj c1089Vj, InterfaceC9010dbe.IeS ieS) { C14957gcv.e(c1089Vj, ""); ieS.a(c1089Vj.f, QJy.TOPUP); } public static final /* synthetic */ void b(cUO cuo) { if (cuo.f != 0) { cuo.f.ar_(); } } public static final /* synthetic */ void a(cUO cuo) { if (cuo.f != 0) { cuo.f.aq_(); } } public static final /* synthetic */ void d(cUO cuo, Throwable th) { if (cuo.b(th)) { cuo.d(cuo.j.e(th)); } } }