package com.bytedance.sdk.openadsdk.core.settings;

import android.text.TextUtils;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class DSW {
    public boolean AlY;
    public String tN;
    public boolean vc;
    public boolean wN;
    public static final DSW YFl = new DSW(null);
    public static String Sg = "";

    public DSW(String str) {
        this.tN = "https://sf19-static.i18n-pglstatp.com/obj/ad-pattern-sg/3p_monitor.9db44671.js";
        this.AlY = true;
        this.wN = true;
        this.vc = true;
        try {
            JSONObject optJSONObject = new JSONObject(str).optJSONObject("performance_js");
            String optString = optJSONObject.optString("url", "https://sf19-static.i18n-pglstatp.com/obj/ad-pattern-sg/3p_monitor.9db44671.js");
            if (!TextUtils.isEmpty(optString)) {
                this.tN = optString;
            }
            JSONArray optJSONArray = optJSONObject.optJSONArray("execute_time");
            ArrayList arrayList = new ArrayList();
            for (int i = 0; i < optJSONArray.length(); i++) {
                arrayList.add(optJSONArray.optString(i));
            }
            this.AlY = arrayList.contains("load_finish");
            this.vc = arrayList.contains("load_fail");
            this.wN = arrayList.contains("load");
        } catch (Exception unused) {
        }
    }
}
