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

300 lines
12 KiB
Java

package o;
import android.content.SharedPreferences;
import com.scb.phone.data.entity.transfer.SingleDataEntity;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.threeten.bp.OffsetDateTime;
/* loaded from: classes3.dex */
public final class hpU implements InterfaceC0956Sfx {
final swL a;
final zHK b;
final RTI c;
final C1180Xgg d;
final MXh e;
private final SharedPreferences h;
private final String i;
private final xph j;
@InterfaceC13391fZD
public hpU(String str, xph xphVar, zHK zhk, RTI rti, MXh mXh, swL swl, C1180Xgg c1180Xgg, SharedPreferences sharedPreferences) {
this.i = str;
this.j = xphVar;
this.b = zhk;
this.c = rti;
this.e = mXh;
this.a = swl;
this.d = c1180Xgg;
this.h = sharedPreferences;
}
@Override // o.InterfaceC0956Sfx
public final AbstractC13163fSk<DpR> c(C11741el c11741el) {
return this.j.d.confirmPurchase(c11741el).flatMap(new fSS(this) { // from class: o.wuW
private hpU b;
@Override // o.fSS
public final Object a(Object obj) {
RTI rti = this.b.c;
return AbstractC13163fSk.just(RTI.b((roP) ((SingleDataEntity) obj).getData()));
}
{
this.b = this;
}
});
}
@Override // o.InterfaceC0956Sfx
public final AbstractC13175fSw<C6162cKm> d(final String str) {
xph xphVar = this.j;
return new C13366fYe(xphVar.d.purchasesPaymentId(str, this.i, this.h.getString("USER_MODE", gHK.INDIVIDUAL.mode)), new fSS(this, str) { // from class: o.OGS
private String c;
private hpU d;
@Override // o.fSS
public final Object a(Object obj) {
C15758iOf c15758iOf;
Boolean bool;
ArrayList arrayList;
FFT fft;
hpU hpu = this.d;
String str2 = this.c;
MXh mXh = hpu.e;
VkC vkC = (VkC) ((SingleDataEntity) obj).getData();
C14957gcv.e(str2, "");
C14957gcv.e(vkC, "");
if (!C14957gcv.b((Object) str2, (Object) vkC.c)) {
throw new IllegalArgumentException();
}
Thv thv = vkC.e;
qKp qkp = thv != null ? new qKp(MXh.e(thv.a), MXh.e(thv.f), thv.d, thv.j, thv.c, thv.g, thv.e, thv.b) : null;
String str3 = vkC.g;
String str4 = vkC.j;
String str5 = vkC.i;
String str6 = vkC.h;
List<String> list = vkC.f;
mNT mnt = vkC.a;
cAV cav = mnt != null ? new cAV(mnt.a, mnt.c, mnt.b, mnt.e, mnt.d, mnt.i) : null;
RXU rxu = vkC.b;
C0894Qxm c0894Qxm = rxu != null ? new C0894Qxm(rxu.c, rxu.e, rxu.a, rxu.d) : null;
C16203mIE c16203mIE = vkC.d;
if (c16203mIE != null) {
String str7 = c16203mIE.d;
C15804ijY c15804ijY = c16203mIE.e;
xLZ xlz = c15804ijY != null ? new xLZ(c15804ijY.c, c15804ijY.d, c15804ijY.a, c15804ijY.b, c15804ijY.i, c15804ijY.e) : null;
List<mAw> list2 = c16203mIE.b;
if (list2 != null) {
List<mAw> list3 = list2;
C14957gcv.e(list3, "");
ArrayList arrayList2 = new ArrayList(list3 instanceof Collection ? list3.size() : 10);
for (Iterator it = list3.iterator(); it.hasNext(); it = it) {
mAw maw = (mAw) it.next();
arrayList2.add(new C16360nhu(maw.e, maw.d, maw.b, maw.a, maw.c));
}
arrayList = arrayList2;
} else {
arrayList = null;
}
PXR pxr = c16203mIE.c;
if (pxr != null) {
lge lgeVar = pxr.e;
fft = new FFT(lgeVar != null ? new wKJ(lgeVar.c, Integer.valueOf(lgeVar.b), lgeVar.d) : null);
} else {
fft = null;
}
c15758iOf = new C15758iOf(str7, xlz, arrayList, fft);
} else {
c15758iOf = null;
}
C16203mIE c16203mIE2 = vkC.d;
PXR pxr2 = c16203mIE2 != null ? c16203mIE2.c : null;
return AbstractC13175fSw.d(new C6162cKm(qkp, str3, str4, str5, str6, list, cav, c0894Qxm, c15758iOf, (pxr2 == null || (bool = pxr2.d) == null) ? true : bool.booleanValue(), vkC.c));
}
{
this.d = this;
this.c = str;
}
});
}
@Override // o.InterfaceC0956Sfx
public final AbstractC13175fSw<kVd> e(C11847en c11847en, String str, String str2) {
return new C13366fYe(this.j.d.purchasePaymentConfirmation(c11847en, str, str2), new fSS(this) { // from class: o.zhY
private hpU a;
@Override // o.fSS
public final Object a(Object obj) {
ArrayList arrayList;
String str3;
C1180Xgg c1180Xgg = this.a.d;
SEe sEe = (SEe) ((SingleDataEntity) obj).getData();
C14957gcv.e(sEe, "");
String str4 = sEe.b;
OffsetDateTime offsetDateTime = (OffsetDateTime) ZTC.e(new Object[]{sEe.i, null}, 267499366, -267499366, (int) System.currentTimeMillis());
double f = C1180Xgg.f(sEe.e);
double f2 = C1180Xgg.f(sEe.c);
C15758iOf c15758iOf = sEe.d;
List<OBW> list = sEe.a;
if (list != null) {
ArrayList arrayList2 = new ArrayList();
for (OBW obw : list) {
tlc tlcVar = (obw.a == null || obw.b == null) ? null : new tlc(obw.a, obw.b);
if (tlcVar != null) {
arrayList2.add(tlcVar);
}
}
arrayList = arrayList2;
} else {
arrayList = null;
}
String str5 = sEe.e;
return AbstractC13175fSw.d(new kVd(str4, offsetDateTime, Double.valueOf(f), Double.valueOf(f2), c15758iOf, arrayList, str5 == null || str5.length() == 0 || (str3 = sEe.c) == null || str3.length() == 0));
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC0956Sfx
public final AbstractC13175fSw<C8463dLv> d(C11635ej c11635ej) {
String str = this.i;
C14957gcv.e(str, "");
c11635ej.a = str;
xph xphVar = this.j;
DiG.e("9003");
return new C13366fYe(xphVar.d.verifyPurchase(c11635ej), new fSS(this) { // from class: o.Uok
private hpU a;
@Override // o.fSS
public final Object a(Object obj) {
String str2;
String str3;
String str4;
String str5;
C15758iOf c15758iOf;
xLZ xlz;
ArrayList arrayList;
FFT fft;
wKJ wkj;
SingleDataEntity singleDataEntity = (SingleDataEntity) obj;
swL swl = this.a.a;
C14957gcv.e(singleDataEntity, "");
String str6 = ((Yml) singleDataEntity.getData()).f8471o;
String str7 = ((Yml) singleDataEntity.getData()).j;
String str8 = ((Yml) singleDataEntity.getData()).d;
String str9 = ((Yml) singleDataEntity.getData()).i;
String str10 = ((Yml) singleDataEntity.getData()).b;
String str11 = str10 == null ? "" : str10;
String str12 = ((Yml) singleDataEntity.getData()).m;
String str13 = str12 == null ? "" : str12;
String str14 = ((Yml) singleDataEntity.getData()).e;
String str15 = ((Yml) singleDataEntity.getData()).c;
String str16 = ((Yml) singleDataEntity.getData()).g;
C16203mIE c16203mIE = ((Yml) singleDataEntity.getData()).f;
if (c16203mIE != null) {
String str17 = c16203mIE.d;
C15804ijY c15804ijY = c16203mIE.e;
if (c15804ijY != null) {
str5 = str16;
str4 = str15;
str3 = str14;
xlz = new xLZ(c15804ijY.c, c15804ijY.d, c15804ijY.a, c15804ijY.b, c15804ijY.i, c15804ijY.e);
} else {
str3 = str14;
str4 = str15;
str5 = str16;
xlz = null;
}
List<mAw> list = c16203mIE.b;
if (list != null) {
List<mAw> list2 = list;
C14957gcv.e(list2, "");
ArrayList arrayList2 = new ArrayList(list2 instanceof Collection ? list2.size() : 10);
Iterator it = list2.iterator();
while (it.hasNext()) {
mAw maw = (mAw) it.next();
arrayList2.add(new C16360nhu(maw.e, maw.d, maw.b, maw.a, maw.c));
it = it;
str13 = str13;
}
str2 = str13;
arrayList = arrayList2;
} else {
str2 = str13;
arrayList = null;
}
PXR pxr = c16203mIE.c;
if (pxr != null) {
lge lgeVar = pxr.e;
if (lgeVar != null) {
wkj = new wKJ(lgeVar.c, Integer.valueOf(lgeVar.b), lgeVar.d);
} else {
wkj = null;
}
fft = new FFT(wkj);
} else {
fft = null;
}
c15758iOf = new C15758iOf(str17, xlz, arrayList, fft);
} else {
str2 = str13;
str3 = str14;
str4 = str15;
str5 = str16;
c15758iOf = null;
}
return AbstractC13175fSw.d(new C8463dLv(str6, str7, str8, str9, str11, str2, str3, str4, str5, c15758iOf, ((Yml) singleDataEntity.getData()).a, ((Yml) singleDataEntity.getData()).h));
}
{
this.a = this;
}
});
}
@Override // o.InterfaceC0956Sfx
public final AbstractC13163fSk<UCy> b(C11582ei c11582ei) {
xph xphVar = this.j;
DiG.e("9003");
return xphVar.d.verifyPurchase(c11582ei).flatMap(new fSS(this) { // from class: o.oGj
private hpU b;
@Override // o.fSS
public final Object a(Object obj) {
String str;
String str2;
SingleDataEntity singleDataEntity = (SingleDataEntity) obj;
zHK zhk = this.b.b;
boolean equals = "9003".equals(singleDataEntity.getStatus().e);
String str3 = ((gAP) singleDataEntity.getData()).b;
String str4 = ((gAP) singleDataEntity.getData()).a;
String str5 = ((gAP) singleDataEntity.getData()).d;
String str6 = ((gAP) singleDataEntity.getData()).e;
String str7 = ((gAP) singleDataEntity.getData()).c;
if (!equals) {
str = "";
} else {
str = singleDataEntity.getStatus().h;
}
if (!equals) {
str2 = "";
} else {
str2 = singleDataEntity.getStatus().c;
}
return AbstractC13163fSk.just(new UCy(str3, str4, str5, str6, str7, equals, str, str2));
}
{
this.b = this;
}
});
}
}