package com.bytedance.sdk.openadsdk.component.reward.lb.fm;

import com.bytedance.sdk.openadsdk.core.gof;
import com.bytedance.sdk.openadsdk.utils.zan;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;

/* JADX INFO: loaded from: classes2.dex */
public class yz {
    private float ajl;

    /* JADX INFO: renamed from: ef, reason: collision with root package name */
    private JSONObject f6953ef;
    private int fm;
    private float jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private String f6954lb;
    private boolean ro = true;
    private String vt;
    private float wsy;
    private String wu;
    private float yz;

    public float ajl() {
        return this.jnr;
    }

    public String ef() {
        return this.wu;
    }

    public String fm() {
        return this.vt;
    }

    public float jnr() {
        return this.yz;
    }

    public void lb(float f10) {
        this.ajl = f10;
    }

    public int ro() {
        return this.fm;
    }

    public float wsy() {
        return this.ajl;
    }

    public float wu() {
        return this.wsy;
    }

    public String yz() {
        return this.f6954lb;
    }

    public void fm(float f10) {
        this.yz = f10;
    }

    public void lb(String str) {
        this.wu = str;
    }

    public void ro(float f10) {
        this.jnr = f10;
    }

    public void yz(float f10) {
        this.wsy = f10;
    }

    public void fm(int i10) {
        this.fm = i10;
    }

    public boolean lb() {
        return this.ro;
    }

    public void ro(String str) {
        this.f6954lb = str;
    }

    public static yz ro(JSONObject jSONObject) {
        if (jSONObject == null) {
            return null;
        }
        yz yzVar = new yz();
        yzVar.ro(jSONObject.optString(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL));
        yzVar.fm(jSONObject.optInt("showType"));
        yzVar.fm(jSONObject.optBoolean("lpClickable", true));
        float fRo = zan.ro(gof.fm(), (float) jSONObject.optDouble("x"));
        float fRo2 = zan.ro(gof.fm(), (float) jSONObject.optDouble("y"));
        float fRo3 = zan.ro(gof.fm(), (float) jSONObject.optDouble("width"));
        float fRo4 = zan.ro(gof.fm(), (float) jSONObject.optDouble("height"));
        yzVar.fm(fRo);
        yzVar.ro(fRo2);
        yzVar.lb(fRo3);
        yzVar.yz(fRo4);
        yzVar.lb(jSONObject.optString("tag"));
        yzVar.fm(jSONObject.optString("sessionID"));
        JSONObject jSONObjectOptJSONObject = jSONObject.optJSONObject("materialDict");
        if (jSONObjectOptJSONObject != null) {
            yzVar.fm(jSONObjectOptJSONObject);
        }
        return yzVar;
    }

    public void fm(String str) {
        this.vt = str;
    }

    public void fm(JSONObject jSONObject) {
        this.f6953ef = jSONObject;
    }

    public void fm(boolean z10) {
        this.ro = z10;
    }

    public boolean fm(float f10, float f11) {
        if (f10 < jnr()) {
            return false;
        }
        if (f10 > wsy() + jnr() || f11 < ajl()) {
            return false;
        }
        return f11 <= wu() + ajl();
    }
}
