package com.bytedance.sdk.openadsdk.core.YoT.Sg;

import android.text.TextUtils;
import com.bytedance.sdk.openadsdk.core.YoT.Sg.tN;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import com.revenuecat.purchases.common.Constants;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class YFl extends tN implements Comparable<YFl> {
    public long YFl;

    protected YFl(long j, String str, tN.EnumC0145tN enumC0145tN, Boolean bool) {
        super(str, enumC0145tN, bool);
        this.YFl = j;
    }

    public static int YFl(String str) {
        if (TextUtils.isEmpty(str)) {
            return Integer.MIN_VALUE;
        }
        String[] split = str.split(Constants.SUBS_ID_BASE_PLAN_ID_SEPARATOR);
        if (split.length == 3) {
            try {
                return (int) ((Integer.parseInt(split[0]) * 3600000) + (Integer.parseInt(split[1]) * MBridgeCommon.DEFAULT_LOAD_TIMEOUT) + (Float.parseFloat(split[2]) * 1000.0f));
            } catch (Throwable unused) {
            }
        }
        return Integer.MIN_VALUE;
    }

    public boolean YFl(long j) {
        return this.YFl <= j && !wN();
    }

    @Override // java.lang.Comparable
    /* renamed from: YFl */
    public int compareTo(YFl yFl) {
        if (yFl != null) {
            long j = this.YFl;
            long j2 = yFl.YFl;
            if (j > j2) {
                return 1;
            }
            return j < j2 ? -1 : 0;
        }
        return 1;
    }

    /* renamed from: com.bytedance.sdk.openadsdk.core.YoT.Sg.YFl$YFl  reason: collision with other inner class name */
    /* loaded from: classes2.dex */
    public static class C0144YFl {
        private final long Sg;
        private final String YFl;
        private tN.EnumC0145tN tN = tN.EnumC0145tN.TRACKING_URL;
        private boolean AlY = false;

        public C0144YFl(String str, long j) {
            this.YFl = str;
            this.Sg = j;
        }

        public YFl YFl() {
            return new YFl(this.Sg, this.YFl, this.tN, Boolean.valueOf(this.AlY));
        }
    }

    public JSONObject YFl() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("content", tN());
        jSONObject.put("trackingMilliseconds", this.YFl);
        return jSONObject;
    }
}
