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

457 lines
16 KiB
Java

package o;
import android.content.res.Resources;
import com.facetec.sdk.FaceTecSessionResult;
import com.scb.phone.domain.errors.RetrofitException;
import java.io.File;
import o.C6776cbm;
import o.InterfaceC9497dkp;
import o.QuB;
import o.WeR;
import o.ZI;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import scb.yek.NdidKey;
/* renamed from: o.cbm, reason: case insensitive filesystem */
/* loaded from: classes4.dex */
public final class C6776cbm extends AbstractC4304bWR<InterfaceC9497dkp.Sts> {
private final C17524xW b;
private final C15970jz d;
private String e;
private final C17528xX k;
private SA n;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C6776cbm(C15970jz c15970jz, C17524xW c17524xW, C17528xX c17528xX, Resources resources, C16903sI c16903sI, mvt mvtVar, C15740iG c15740iG) {
super(c16903sI, mvtVar, c15740iG, resources);
C14957gcv.e(c15970jz, "");
C14957gcv.e(c17524xW, "");
C14957gcv.e(c17528xX, "");
C14957gcv.e(resources, "");
C14957gcv.e(c16903sI, "");
C14957gcv.e(mvtVar, "");
C14957gcv.e(c15740iG, "");
this.d = c15970jz;
this.b = c17524xW;
this.k = c17528xX;
this.e = "";
}
/* renamed from: o.cbm$IeS */
/* loaded from: classes4.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
public final void d(SA sa, String str) {
C14957gcv.e(str, "");
super.c();
this.n = sa;
this.e = str;
}
/* renamed from: o.cbm$LWm */
/* loaded from: classes4.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private C6776cbm a;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
Throwable th2 = th;
C14957gcv.e(th2, "");
C6776cbm.c(this.a, th2);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LWm(C6776cbm c6776cbm) {
super(1);
this.a = c6776cbm;
}
}
/* renamed from: o.cbm$Sts */
/* loaded from: classes4.dex */
static final class Sts extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
private C6776cbm d;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
C6776cbm.a(this.d);
C6776cbm c6776cbm = this.d;
ZI.IeS ieS = new ZI.IeS() { // from class: o.cbw
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9497dkp.Sts) obj).a();
}
};
if (c6776cbm.f != 0) {
ieS.e(c6776cbm.f);
}
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
Sts(C6776cbm c6776cbm) {
super(0);
this.d = c6776cbm;
}
}
/* renamed from: o.cbm$HBt */
/* loaded from: classes4.dex */
static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private C6776cbm d;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
Throwable th2 = th;
C14957gcv.e(th2, "");
C6776cbm c6776cbm = this.d;
ZI.IeS ieS = new ZI.IeS() { // from class: o.cby
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9497dkp.Sts) obj).d();
}
};
if (c6776cbm.f != 0) {
ieS.e(c6776cbm.f);
}
C6776cbm.c(this.d, th2);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
HBt(C6776cbm c6776cbm) {
super(1);
this.d = c6776cbm;
}
}
/* renamed from: o.cbm$RVV */
/* loaded from: classes4.dex */
static final class RVV extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
private C6776cbm b;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
final C6776cbm c6776cbm = this.b;
ZI.IeS ieS = new ZI.IeS(c6776cbm) { // from class: o.cbx
private C6776cbm c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6776cbm.RVV.d(this.c, (InterfaceC9497dkp.Sts) obj);
}
{
this.c = c6776cbm;
}
};
if (c6776cbm.f != 0) {
ieS.e(c6776cbm.f);
}
return C14866gag.c;
}
public static /* synthetic */ void d(C6776cbm c6776cbm, InterfaceC9497dkp.Sts sts) {
C14957gcv.e(c6776cbm, "");
sts.d();
C6776cbm.a(c6776cbm);
c6776cbm.i = false;
sts.a();
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
RVV(C6776cbm c6776cbm) {
super(0);
this.b = c6776cbm;
}
}
@Override // o.AbstractC4304bWR, o.ZI
public final void w_() {
this.d.a();
super.w_();
}
@Override // o.AbstractC4304bWR
public final void a(FaceTecSessionResult faceTecSessionResult, String str, String str2) {
C14957gcv.e(faceTecSessionResult, "");
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
long currentTimeMillis = System.currentTimeMillis();
String e = e(faceTecSessionResult.getAuditTrailCompressedBase64()[0], faceTecSessionResult.getLowQualityAuditTrailCompressedBase64()[0], String.valueOf(currentTimeMillis));
C14957gcv.c((Object) e, "");
String valueOf = String.valueOf(currentTimeMillis);
C15970jz c15970jz = this.d;
SA sa = this.n;
String str3 = sa != null ? sa.u : null;
if (str3 == null) {
str3 = "";
}
String faceScanBase64 = faceTecSessionResult.getFaceScanBase64();
C14957gcv.c((Object) faceScanBase64, "");
String[] auditTrailCompressedBase64 = faceTecSessionResult.getAuditTrailCompressedBase64();
C14957gcv.c(auditTrailCompressedBase64, "");
String[] strArr = auditTrailCompressedBase64;
C14957gcv.e(strArr, "");
C14957gcv.e(strArr, "");
String str4 = strArr.length + (-1) >= 0 ? strArr[0] : null;
if (str4 == null) {
str4 = "";
}
String[] lowQualityAuditTrailCompressedBase64 = faceTecSessionResult.getLowQualityAuditTrailCompressedBase64();
C14957gcv.c(lowQualityAuditTrailCompressedBase64, "");
String[] strArr2 = lowQualityAuditTrailCompressedBase64;
C14957gcv.e(strArr2, "");
C14957gcv.e(strArr2, "");
String str5 = strArr2.length + (-1) >= 0 ? strArr2[0] : null;
C6737cb c6737cb = new C6737cb(str3, str, str2, faceScanBase64, str4, str5 == null ? "" : str5, e);
RVV rvv = new RVV(this);
HBt hBt = new HBt(this);
C14957gcv.e(c6737cb, "");
C14957gcv.e(valueOf, "");
C14957gcv.e(rvv, "");
C14957gcv.e(hBt, "");
c15970jz.h.d(rvv, hBt, new QuB.Sts(c6737cb, valueOf), new fSC());
}
@Override // o.AbstractC4304bWR
public final void a() {
ZI.IeS ieS = new ZI.IeS() { // from class: o.cbs
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9497dkp.Sts) obj).c();
}
};
if (this.f != 0) {
ieS.e(this.f);
}
}
public static /* synthetic */ void e(C6776cbm c6776cbm, InterfaceC9497dkp.Sts sts) {
C14957gcv.e(c6776cbm, "");
sts.b("ndid_common_facial_matching_locked");
SA sa = c6776cbm.n;
String str = sa != null ? sa.y : null;
SA sa2 = c6776cbm.n;
sts.c(str, sa2 != null ? sa2.c : null);
}
public static /* synthetic */ void b(C6776cbm c6776cbm, Throwable th, InterfaceC9497dkp.Sts sts) {
C14957gcv.e(c6776cbm, "");
C14957gcv.e(th, "");
sts.e(c6776cbm.j.e(th));
}
public static final /* synthetic */ void a(C6776cbm c6776cbm) {
if (c6776cbm.f != 0) {
c6776cbm.f.ar_();
}
}
public static final /* synthetic */ void c(final C6776cbm c6776cbm, Throwable th) {
ggV ggv;
if (c6776cbm.f != 0) {
c6776cbm.f.ar_();
}
c6776cbm.i = false;
if (!(th instanceof RetrofitException)) {
c6776cbm.d(c6776cbm.h(th));
return;
}
VCl vCl = ((RetrofitException) th).e;
String str = (vCl == null || (ggv = vCl.c) == null) ? null : ggv.e;
if (str != null) {
switch (str.hashCode()) {
case 1567042:
if (str.equals("3016")) {
c6776cbm.d(c6776cbm.h(th));
ZI.IeS ieS = new ZI.IeS() { // from class: o.cbq
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9497dkp.Sts) obj).b("ndid_common_idp_liveness_check_fail");
}
};
if (c6776cbm.f != 0) {
ieS.e(c6776cbm.f);
return;
}
return;
}
break;
case 1567043:
if (str.equals("3017")) {
c6776cbm.d(c6776cbm.h(th));
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.cbu
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9497dkp.Sts) obj).b("ndid_common_photo_matching_fail");
}
};
if (c6776cbm.f != 0) {
ieS2.e(c6776cbm.f);
return;
}
return;
}
break;
case 1567044:
if (str.equals("3018")) {
ZI.IeS ieS3 = new ZI.IeS(c6776cbm) { // from class: o.cbt
private C6776cbm e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6776cbm.e(this.e, (InterfaceC9497dkp.Sts) obj);
}
{
this.e = c6776cbm;
}
};
if (c6776cbm.f != 0) {
ieS3.e(c6776cbm.f);
return;
}
return;
}
break;
}
}
c6776cbm.d(c6776cbm.h(th));
}
@Override // o.AbstractC4304bWR
public final void g(final Throwable th) {
C14957gcv.e(th, "");
if (this.f != 0) {
this.f.ar_();
}
ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.cbr
private C6776cbm a;
private Throwable d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C6776cbm.b(this.a, this.d, (InterfaceC9497dkp.Sts) obj);
}
{
this.a = this;
this.d = th;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
}
@Override // o.AbstractC4304bWR
public final void b(File file) {
C14957gcv.e(file, "");
SA sa = this.n;
String b = b(file, sa != null ? sa.u : null);
String absolutePath = file.getAbsolutePath();
SA sa2 = this.n;
if (sa2 != null) {
C14957gcv.c((Object) b, "");
String str = sa2.u;
C12144esf c12144esf = this.a;
C14957gcv.c(c12144esf, "");
String str2 = this.e;
C14957gcv.e(b, "");
C14957gcv.e(str, "");
C14957gcv.e(c12144esf, "");
C14957gcv.e(str2, "");
C14957gcv.e(b, "");
C14957gcv.e(str, "");
C14957gcv.e(c12144esf, "");
String b2 = C17528xX.b("jpg");
String b3 = C17528xX.b(b);
int i = c12144esf.a;
int i2 = c12144esf.b;
int i3 = c12144esf.h;
int i4 = c12144esf.i;
int i5 = c12144esf.c;
int i6 = c12144esf.d;
StringBuilder sb = new StringBuilder("{\"transactionId\":\"");
sb.append(str);
sb.append("\",\"imageFormat\":");
sb.append(b2);
sb.append(",\"imageData\":");
sb.append(b3);
sb.append(",\"imageHeight\":\"");
sb.append(i);
sb.append("\",\"imageWidth\":\"");
sb.append(i2);
sb.append("\",\"imageCropCoordinateX\":\"");
sb.append(i3);
sb.append("\",\"imageCropCoordinateY\":\"");
sb.append(i4);
sb.append("\",\"imageCropWidth\":\"");
sb.append(i6);
sb.append("\",\"imageCropHeight\":\"");
sb.append(i5);
sb.append("\"}");
String obj = sb.toString();
NdidKey ndidKey = new NdidKey();
C14957gcv.e(obj, "");
String e = ndidKey.e(gdZ.a(gdZ.a(obj, " ", ""), "\n", ""), str2);
C15970jz c15970jz = this.d;
C14957gcv.c((Object) absolutePath, "");
String str3 = sa2.u;
C12144esf c12144esf2 = this.a;
C14957gcv.c(c12144esf2, "");
C14957gcv.e(absolutePath, "");
C14957gcv.e(str3, "");
C14957gcv.e(c12144esf2, "");
C14957gcv.e(e, "");
C14957gcv.e(str3, "");
RequestBody create = RequestBody.Companion.create(str3, MediaType.Companion.parse("text/plain"));
C14957gcv.e("jpg", "");
RequestBody create2 = RequestBody.Companion.create("jpg", MediaType.Companion.parse("text/plain"));
MultipartBody.Part a = C15600gy.a("imageData", absolutePath);
String valueOf = String.valueOf(c12144esf2.a);
C14957gcv.e(valueOf, "");
RequestBody create3 = RequestBody.Companion.create(valueOf, MediaType.Companion.parse("text/plain"));
String valueOf2 = String.valueOf(c12144esf2.b);
C14957gcv.e(valueOf2, "");
RequestBody create4 = RequestBody.Companion.create(valueOf2, MediaType.Companion.parse("text/plain"));
String valueOf3 = String.valueOf(c12144esf2.h);
C14957gcv.e(valueOf3, "");
RequestBody create5 = RequestBody.Companion.create(valueOf3, MediaType.Companion.parse("text/plain"));
String valueOf4 = String.valueOf(c12144esf2.i);
C14957gcv.e(valueOf4, "");
RequestBody create6 = RequestBody.Companion.create(valueOf4, MediaType.Companion.parse("text/plain"));
String valueOf5 = String.valueOf(c12144esf2.c);
C14957gcv.e(valueOf5, "");
RequestBody create7 = RequestBody.Companion.create(valueOf5, MediaType.Companion.parse("text/plain"));
String valueOf6 = String.valueOf(c12144esf2.d);
C14957gcv.e(valueOf6, "");
RequestBody create8 = RequestBody.Companion.create(valueOf6, MediaType.Companion.parse("text/plain"));
C14957gcv.e(e, "");
C6949cf c6949cf = new C6949cf(create, create2, a, create3, create4, create5, create6, create8, create7, RequestBody.Companion.create(e, MediaType.Companion.parse("text/plain")));
Sts sts = new Sts(this);
LWm lWm = new LWm(this);
C14957gcv.e(c6949cf, "");
C14957gcv.e(sts, "");
C14957gcv.e(lWm, "");
c15970jz.i.d(sts, lWm, new WeR.HBt(c6949cf), new fSC());
}
}
static {
new IeS((byte) 0);
}
}