package o; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Locale; import o.InterfaceC6664cZg; /* renamed from: o.bzb, reason: case insensitive filesystem */ /* loaded from: classes4.dex */ public final class C5784bzb extends ZI { public PW a; public C0855Qa b; public final C17350vy c; public final SMl d; public final C15720hy e; private final C17809ztu g; public PE h; public PA i; private fSJ m; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ @InterfaceC13391fZD public C5784bzb(C17809ztu c17809ztu, SMl sMl, C15720hy c15720hy, C17350vy c17350vy, C16903sI c16903sI) { super(c16903sI); C14957gcv.e(c17809ztu, ""); C14957gcv.e(sMl, ""); C14957gcv.e(c15720hy, ""); C14957gcv.e(c17350vy, ""); C14957gcv.e(c16903sI, ""); this.g = c17809ztu; this.d = sMl; this.e = c15720hy; this.c = c17350vy; } public final C0855Qa d(String str) { C14851gaI c14851gaI; C14957gcv.e(str, ""); if (str.length() == 0) { return this.b; } C0855Qa c0855Qa = this.b; if (c0855Qa == null || (c14851gaI = c0855Qa.d) == null) { c14851gaI = C14851gaI.c; } if (!(!c14851gaI.isEmpty())) { return new C0855Qa(C14851gaI.c); } ArrayList arrayList = new ArrayList(); for (Object obj : c14851gaI) { String str2 = ((C0845Pv) obj).d; if (str2 != null) { Locale locale = Locale.getDefault(); C14957gcv.c(locale, ""); String lowerCase = str2.toLowerCase(locale); C14957gcv.c((Object) lowerCase, ""); if (lowerCase != null) { Locale locale2 = Locale.getDefault(); C14957gcv.c(locale2, ""); String lowerCase2 = str.toLowerCase(locale2); C14957gcv.c((Object) lowerCase2, ""); if (gdZ.d((CharSequence) lowerCase, (CharSequence) lowerCase2, false)) { arrayList.add(obj); } } } } return new C0855Qa(arrayList); } public final PE a(String str) { C14851gaI c14851gaI; C14957gcv.e(str, ""); if (str.length() == 0) { return this.h; } PE pe = this.h; if (pe == null || (c14851gaI = pe.b) == null) { c14851gaI = C14851gaI.c; } if (!(!c14851gaI.isEmpty())) { return new PE(C14851gaI.c); } ArrayList arrayList = new ArrayList(); for (Object obj : c14851gaI) { String str2 = ((PB) obj).f8312o; if (str2 != null) { Locale locale = Locale.getDefault(); C14957gcv.c(locale, ""); String lowerCase = str2.toLowerCase(locale); C14957gcv.c((Object) lowerCase, ""); if (lowerCase != null) { Locale locale2 = Locale.getDefault(); C14957gcv.c(locale2, ""); String lowerCase2 = str.toLowerCase(locale2); C14957gcv.c((Object) lowerCase2, ""); if (gdZ.d((CharSequence) lowerCase, (CharSequence) lowerCase2, false)) { arrayList.add(obj); } } } } return new PE(arrayList); } public final PA c(String str) { C14957gcv.e(str, ""); if (str.length() == 0) { return this.i; } PA pa = this.i; C14851gaI c14851gaI = pa != null ? pa.b : null; if (c14851gaI == null) { c14851gaI = C14851gaI.c; } if (!(!c14851gaI.isEmpty())) { return new PA(C14851gaI.c); } ArrayList arrayList = new ArrayList(); for (Object obj : c14851gaI) { String str2 = ((PD) obj).g; Locale locale = Locale.getDefault(); C14957gcv.c(locale, ""); String lowerCase = str2.toLowerCase(locale); C14957gcv.c((Object) lowerCase, ""); Locale locale2 = Locale.getDefault(); C14957gcv.c(locale2, ""); String lowerCase2 = str.toLowerCase(locale2); C14957gcv.c((Object) lowerCase2, ""); if (gdZ.d((CharSequence) lowerCase, (CharSequence) lowerCase2, false)) { arrayList.add(obj); } } return new PA(arrayList); } @Override // o.ZI public final void w_() { C15720hy c15720hy = this.e; c15720hy.a = null; c15720hy.e.edit().remove("PURCHASE_SEARCH_LIST_SHARED_PREF").apply(); C17809ztu c17809ztu = this.g; if (!c17809ztu.h.isDisposed()) { c17809ztu.h.dispose(); } super.w_(); } /* renamed from: o.bzb$IeS */ /* loaded from: classes4.dex */ public static final class IeS { private IeS() { } public /* synthetic */ IeS(byte b) { this(); } } public static /* synthetic */ void e(String str, EQ eq, InterfaceC6664cZg.RVV rvv) { C14957gcv.e(eq, ""); if (str != null) { switch (str.hashCode()) { case -2111590015: if (str.equals("FUND_ACTION_SWITCH_IN")) { rvv.e((PA) eq); return; } return; case -1575706677: if (str.equals("FUND_ACTION_REDEEM")) { rvv.e((C0855Qa) eq); return; } return; case -1034774958: if (str.equals("FUND_ACTION_SWITCH_OUT")) { rvv.d((PE) eq); return; } return; case 97916784: if (str.equals("FUND_ACTION_PURCHASE")) { rvv.c((PW) eq); return; } return; default: return; } } } public static /* synthetic */ void a(C5784bzb c5784bzb, C0857Qb c0857Qb, List list, EnumC0861Qd enumC0861Qd, InterfaceC6664cZg.RVV rvv) { C14957gcv.e(c5784bzb, ""); C14957gcv.e(c0857Qb, ""); C14957gcv.e(list, ""); C14957gcv.e(enumC0861Qd, ""); rvv.d(c5784bzb.a); rvv.c(C14881gav.a((Collection) c0857Qb.c), list, list.contains(enumC0861Qd) ? list.indexOf(enumC0861Qd) : 0); } public static List d(List list, String str) { if (list == null) { list = C14851gaI.c; } Locale locale = Locale.getDefault(); C14957gcv.c(locale, ""); String lowerCase = str.toLowerCase(locale); C14957gcv.c((Object) lowerCase, ""); ArrayList arrayList = new ArrayList(); for (Object obj : list) { PY py = (PY) obj; String str2 = py.a; Locale locale2 = Locale.getDefault(); C14957gcv.c(locale2, ""); String lowerCase2 = str2.toLowerCase(locale2); C14957gcv.c((Object) lowerCase2, ""); String str3 = lowerCase; if (!gdZ.d((CharSequence) lowerCase2, (CharSequence) str3, false)) { String str4 = py.d; Locale locale3 = Locale.getDefault(); C14957gcv.c(locale3, ""); String lowerCase3 = str4.toLowerCase(locale3); C14957gcv.c((Object) lowerCase3, ""); if (gdZ.d((CharSequence) lowerCase3, (CharSequence) str3, false)) { } } arrayList.add(obj); } return arrayList; } static { new IeS((byte) 0); } }