package f3;

import S4.p;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.internal.o;
import org.json.JSONArray;
import org.json.JSONObject;
import x4.AbstractC3252r;
import x4.y;

/* JADX INFO: renamed from: f3.e, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC2040e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final List f16417a = AbstractC3252r.B("CvlLuKMCPYmjkQwgzrcn0sAFrbb0xWcY", "sCm1yw6rN2xxTZb0CmPhE1z6GNG9A38w", "5YHJNeFkP4J5pWWmWwKa6tJS41Zg2JUj", "W0H6c204h2soZTeZpJIaAQBNSB51HI6g", "QdtH3Q2PDgrxGb2fLQoCGSCDWuHNwbeO", "6WbpPUxTp1JnM9C5uhOkWBWuqyPca00j", "6IVxvmxkeokeqp3EShcL4Gz1HhgnU8Z5", "ZR8c2sMAhPRycTCcBwT18FchJFdFLgwt");

    public static final List a(JSONObject jSONObject) {
        JSONObject jSONObjectOptJSONObject;
        JSONArray jSONArrayOptJSONArray;
        JSONObject jSONObjectOptJSONObject2;
        String string;
        JSONArray jSONArrayOptJSONArray2 = jSONObject.optJSONArray("data");
        if (jSONArrayOptJSONArray2 == null) {
            return y.f26065a;
        }
        ArrayList arrayList = new ArrayList();
        int length = jSONArrayOptJSONArray2.length();
        for (int i6 = 0; i6 < length; i6++) {
            JSONObject jSONObjectOptJSONObject3 = jSONArrayOptJSONArray2.optJSONObject(i6);
            if (jSONObjectOptJSONObject3 != null && (jSONObjectOptJSONObject = jSONObjectOptJSONObject3.optJSONObject("attributes")) != null && (jSONArrayOptJSONArray = jSONObjectOptJSONObject.optJSONArray("files")) != null && (jSONObjectOptJSONObject2 = jSONArrayOptJSONArray.optJSONObject(0)) != null) {
                Object objOpt = jSONObjectOptJSONObject2.opt("file_id");
                String string2 = (objOpt == null || (string = objOpt.toString()) == null) ? null : p.o1(string).toString();
                if (string2 == null) {
                    string2 = "";
                }
                if (string2.length() != 0) {
                    String strOptString = jSONObjectOptJSONObject.optString("release", "");
                    o.g(strOptString, "optString(...)");
                    String strOptString2 = jSONObjectOptJSONObject.optString("language", "en");
                    arrayList.add(new C2036a(strOptString, string2, p.Q0(strOptString2) ? "en" : strOptString2));
                }
            }
        }
        return arrayList;
    }
}
