244 lines
8.7 KiB
Java
244 lines
8.7 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.SharedPreferences;
|
||
|
import android.content.res.Resources;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Collection;
|
||
|
import java.util.Collections;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import o.C15715hv;
|
||
|
import o.EW;
|
||
|
import o.QG;
|
||
|
import o.QK;
|
||
|
import o.QN;
|
||
|
import o.QR;
|
||
|
import o.YO;
|
||
|
import o.YP;
|
||
|
import org.threeten.bp.OffsetDateTime;
|
||
|
|
||
|
/* renamed from: o.nV, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes3.dex */
|
||
|
public final class C16324nV extends C16157lj {
|
||
|
private final String d;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
@InterfaceC13391fZD
|
||
|
public C16324nV(Resources resources, SharedPreferences sharedPreferences, String str) {
|
||
|
super(resources, sharedPreferences);
|
||
|
C14957gcv.e(resources, "");
|
||
|
C14957gcv.e(sharedPreferences, "");
|
||
|
C14957gcv.e(str, "");
|
||
|
this.d = str;
|
||
|
}
|
||
|
|
||
|
public final EW e(gkG gkg) {
|
||
|
EnumC1276Zl enumC1276Zl;
|
||
|
EnumC1276Zl enumC1276Zl2;
|
||
|
QR qr;
|
||
|
List<String> list;
|
||
|
QN qn;
|
||
|
C14957gcv.e(gkg, "");
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
EnumC1276Zl enumC1276Zl3 = EnumC1276Zl.DEFAULT;
|
||
|
new C0527It();
|
||
|
luP lup = gkg.b;
|
||
|
if (lup != null) {
|
||
|
C14957gcv.e(lup, "");
|
||
|
C0521Ip c0521Ip = new C0521Ip(lup.e, lup.c, lup.d, lup.a, lup.b);
|
||
|
C14957gcv.e(c0521Ip, "");
|
||
|
if (c0521Ip.e.length() > 0) {
|
||
|
QN.HBt a = QN.a();
|
||
|
a.f = c0521Ip.d;
|
||
|
a.h = k(c0521Ip.b);
|
||
|
a.a = c(C15715hv.tOB.ref_id, c0521Ip.c);
|
||
|
a.c = c0521Ip.e;
|
||
|
a.d = C15715hv.IeS.ic_check_circle_black_48dp;
|
||
|
qn = new QN(a, YD.REVAMP_SUCCESS_HEADER, (byte) 0);
|
||
|
C14957gcv.c(qn, "");
|
||
|
} else {
|
||
|
QN.HBt a2 = QN.a();
|
||
|
a2.f = c0521Ip.d;
|
||
|
a2.a = k(c0521Ip.b);
|
||
|
a2.c = c(C15715hv.tOB.ref_id, c0521Ip.c);
|
||
|
a2.d = C15715hv.IeS.ic_check_circle_black_48dp;
|
||
|
qn = new QN(a2, YD.REVAMP_SUCCESS_HEADER, (byte) 0);
|
||
|
C14957gcv.c(qn, "");
|
||
|
}
|
||
|
arrayList.add(qn);
|
||
|
}
|
||
|
List<lWG> list2 = gkg.e;
|
||
|
if (list2 != null) {
|
||
|
C14957gcv.e(list2, "");
|
||
|
List<lWG> list3 = list2;
|
||
|
C14957gcv.e(list3, "");
|
||
|
ArrayList arrayList2 = new ArrayList(list3 instanceof Collection ? list3.size() : 10);
|
||
|
Iterator it = list3.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
lWG lwg = (lWG) it.next();
|
||
|
C14957gcv.e(lwg, "");
|
||
|
boolean z = lwg.a;
|
||
|
YP.IeS ieS = YP.c;
|
||
|
EnumC1268Zh b = YP.IeS.b(lwg.j);
|
||
|
YP.IeS ieS2 = YP.c;
|
||
|
EnumC1268Zh b2 = YP.IeS.b(lwg.g);
|
||
|
YO.RVV rvv = YO.c;
|
||
|
EnumC1265Zg c = YO.RVV.c(lwg.f);
|
||
|
String str = lwg.b;
|
||
|
String str2 = lwg.h;
|
||
|
List<String> list4 = lwg.e;
|
||
|
C14957gcv.e(list4, "");
|
||
|
StringBuilder sb = new StringBuilder("");
|
||
|
EnumC1276Zl enumC1276Zl4 = enumC1276Zl3;
|
||
|
int size = list4.size();
|
||
|
Iterator it2 = it;
|
||
|
int i = 0;
|
||
|
while (i < size) {
|
||
|
if (list4.get(i).length() > 0) {
|
||
|
list = list4;
|
||
|
sb.append(list4.get(i));
|
||
|
if (i < size - 1) {
|
||
|
sb.append("\n");
|
||
|
}
|
||
|
} else {
|
||
|
list = list4;
|
||
|
}
|
||
|
i++;
|
||
|
list4 = list;
|
||
|
}
|
||
|
String obj = sb.toString();
|
||
|
C14957gcv.c((Object) obj, "");
|
||
|
arrayList2.add(new C0516Ik(z, b, b2, c, str, str2, obj, m(lwg.c), lwg.i, lwg.d));
|
||
|
enumC1276Zl3 = enumC1276Zl4;
|
||
|
it = it2;
|
||
|
}
|
||
|
enumC1276Zl = enumC1276Zl3;
|
||
|
ArrayList<C0516Ik> arrayList3 = arrayList2;
|
||
|
C14957gcv.e(arrayList3, "");
|
||
|
ArrayList arrayList4 = new ArrayList();
|
||
|
for (C0516Ik c0516Ik : arrayList3) {
|
||
|
if (c0516Ik.e && c0516Ik.j != EnumC1265Zg.UNKNOWN) {
|
||
|
arrayList4.add(new QQ(true));
|
||
|
}
|
||
|
if (c0516Ik.j == EnumC1265Zg.TEXT_TWO_COLUMNS) {
|
||
|
C14957gcv.e(c0516Ik, "");
|
||
|
QK.LWm e = QK.e();
|
||
|
e.g = c0516Ik.a;
|
||
|
e.h = c0516Ik.f;
|
||
|
if (c0516Ik.b.length() > 0) {
|
||
|
e.c = c0516Ik.b;
|
||
|
}
|
||
|
if (c0516Ik.c.length() > 0) {
|
||
|
e.a = c0516Ik.c;
|
||
|
}
|
||
|
if (c0516Ik.g == EnumC1268Zh.SMALL) {
|
||
|
e.k = true;
|
||
|
}
|
||
|
if (c0516Ik.h == EnumC1268Zh.SMALL) {
|
||
|
e.l = true;
|
||
|
}
|
||
|
if (c0516Ik.d) {
|
||
|
e.m = true;
|
||
|
}
|
||
|
QK qk = new QK(e, (byte) 0);
|
||
|
C14957gcv.c(qk, "");
|
||
|
arrayList4.add(qk);
|
||
|
} else if (c0516Ik.j == EnumC1265Zg.TEXT) {
|
||
|
C14957gcv.e(c0516Ik, "");
|
||
|
if (c0516Ik.f.length() > 0) {
|
||
|
QR.LWm b3 = QR.b();
|
||
|
b3.g = c0516Ik.a;
|
||
|
b3.a = c0516Ik.f;
|
||
|
b3.c = C15715hv.LWm.gray;
|
||
|
if (c0516Ik.d) {
|
||
|
b3.i = true;
|
||
|
}
|
||
|
qr = new QR(b3, (byte) 0);
|
||
|
} else {
|
||
|
qr = null;
|
||
|
}
|
||
|
if (qr != null) {
|
||
|
arrayList4.add(qr);
|
||
|
}
|
||
|
} else if (c0516Ik.j == EnumC1265Zg.MINI_QR) {
|
||
|
C14957gcv.e(c0516Ik, "");
|
||
|
QG.RVV a3 = QG.a();
|
||
|
List<XL> singletonList = Collections.singletonList(new XL(c0516Ik.j.toString(), c0516Ik.a, null, null, null, c0516Ik.i));
|
||
|
C14957gcv.c(singletonList, "");
|
||
|
a3.e = singletonList;
|
||
|
QG qg = new QG((QG.RVV<?>) a3);
|
||
|
C14957gcv.c(qg, "");
|
||
|
arrayList4.add(qg);
|
||
|
}
|
||
|
}
|
||
|
arrayList.addAll(arrayList4);
|
||
|
} else {
|
||
|
enumC1276Zl = enumC1276Zl3;
|
||
|
}
|
||
|
try {
|
||
|
enumC1276Zl2 = EnumC1276Zl.valueOf(gkg.h);
|
||
|
} catch (IllegalArgumentException unused) {
|
||
|
enumC1276Zl2 = enumC1276Zl;
|
||
|
}
|
||
|
EW.LWm b4 = EW.b(arrayList, "slip");
|
||
|
List<zQA> list5 = gkg.a;
|
||
|
if (list5 != null) {
|
||
|
C14957gcv.e(list5, "");
|
||
|
ArrayList arrayList5 = new ArrayList();
|
||
|
for (zQA zqa : list5) {
|
||
|
C14957gcv.e(zqa, "");
|
||
|
YD n = n(zqa.e);
|
||
|
QL ql = (((n == YD.FOOTER_CONTENT || n == YD.FOOTER_REMARK) && zqa.a.length() == 0) || (n == YD.FOOTER_IMAGE && zqa.b.length() == 0)) ? null : new QL(zqa.a, n(zqa.e), m(zqa.b));
|
||
|
if (ql != null) {
|
||
|
arrayList5.add(ql);
|
||
|
}
|
||
|
}
|
||
|
b4.b = arrayList5;
|
||
|
}
|
||
|
b4.l = enumC1276Zl2;
|
||
|
EW c2 = b4.c();
|
||
|
C14957gcv.c(c2, "");
|
||
|
return c2;
|
||
|
}
|
||
|
|
||
|
private String k(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
if (str.length() == 0) {
|
||
|
return str;
|
||
|
}
|
||
|
String d = d(OffsetDateTime.parse(cXG.a(str)));
|
||
|
C14957gcv.c((Object) d, "");
|
||
|
return d;
|
||
|
}
|
||
|
|
||
|
private static YD n(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
String d = C2974aoj.d(str);
|
||
|
int hashCode = d.hashCode();
|
||
|
if (hashCode != -911436124) {
|
||
|
if (hashCode != -314580553) {
|
||
|
if (hashCode == 1670366677 && d.equals("footer_content")) {
|
||
|
return YD.FOOTER_CONTENT;
|
||
|
}
|
||
|
} else if (d.equals("footer_image")) {
|
||
|
return YD.FOOTER_IMAGE;
|
||
|
}
|
||
|
} else if (d.equals("footer_remark")) {
|
||
|
return YD.FOOTER_REMARK;
|
||
|
}
|
||
|
return YD.FOOTER_CONTENT;
|
||
|
}
|
||
|
|
||
|
private String m(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
if (str.length() == 0 || gdZ.e(str, "http", false)) {
|
||
|
return str;
|
||
|
}
|
||
|
String string = this.c.getString("BASE_ASSETS_URL", this.d);
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(string);
|
||
|
sb.append(str);
|
||
|
return sb.toString();
|
||
|
}
|
||
|
}
|