package com.bytedance.adsdk.ugeno.ro;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.ImageView;
import com.bytedance.adsdk.ugeno.core.IAnimation;
import com.bytedance.adsdk.ugeno.core.fhx;
import com.bytedance.adsdk.ugeno.core.gof;
import com.bytedance.adsdk.ugeno.core.irt;
import com.bytedance.adsdk.ugeno.core.ku;
import com.bytedance.adsdk.ugeno.core.ro.ajl;
import com.bytedance.adsdk.ugeno.core.ro.jnr;
import com.bytedance.adsdk.ugeno.core.ro.yz;
import com.bytedance.adsdk.ugeno.core.vt;
import com.bytedance.adsdk.ugeno.core.wsy;
import com.bytedance.adsdk.ugeno.core.wu;
import com.bytedance.adsdk.ugeno.fm;
import com.bytedance.adsdk.ugeno.ro.fm;
import com.bytedance.adsdk.ugeno.wsy.fm;
import com.bytedance.adsdk.ugeno.yz;
import com.bytedance.adsdk.ugeno.yz.dsz;
import com.bytedance.adsdk.ugeno.yz.ef;
import com.bytedance.adsdk.ugeno.yz.onz;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import okio.Utf8;
import org.json.JSONException;
import org.json.JSONObject;
import xyz.stream.download.config.InnerConstant;

/* JADX INFO: loaded from: classes.dex */
public abstract class lb<T extends View> implements View.OnTouchListener, fhx.fm, fhx.ro, yz {
    protected int ado;
    protected float ai;
    protected fm<ViewGroup> ajl;
    private boolean anz;
    protected ViewGroup.LayoutParams aws;
    protected boolean bkb;
    private com.bytedance.adsdk.ugeno.core.fm bp;
    protected String bwv;
    protected ImageView.ScaleType bx;

    /* JADX INFO: renamed from: cc, reason: collision with root package name */
    private long f6373cc;
    protected float cg;
    protected wu cpu;
    private boolean cyr;
    protected float daz;
    protected float dsz;
    protected String duv;

    /* JADX INFO: renamed from: ef, reason: collision with root package name */
    protected ku f6374ef;
    private boolean eo;
    private boolean ew;
    private boolean ex;
    private boolean eys;

    /* JADX INFO: renamed from: ff, reason: collision with root package name */
    @Deprecated
    private ajl f6375ff;
    protected float fhx;
    private boolean fm;

    /* JADX INFO: renamed from: gc, reason: collision with root package name */
    protected boolean f6376gc;
    protected float gof;
    protected float gqi;
    protected com.bytedance.adsdk.ugeno.core.ajl grs;
    private boolean gt;
    protected float gzf;

    /* JADX INFO: renamed from: ha, reason: collision with root package name */
    protected boolean f6377ha;
    protected boolean hi;
    protected boolean hlt;
    protected ef hm;
    private vt hou;
    protected boolean hxv;
    private JSONObject iat;

    /* JADX INFO: renamed from: ib, reason: collision with root package name */
    protected float f6378ib;
    protected float irt;
    protected float jm;
    protected fhx jn;
    protected T jnr;

    /* JADX INFO: renamed from: kc, reason: collision with root package name */
    private GradientDrawable f6379kc;
    private boolean kec;
    private onz kh;
    protected String ku;
    protected float kwx;
    private boolean ky;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    protected JSONObject f6380lb;
    protected float lcp;

    /* JADX INFO: renamed from: le, reason: collision with root package name */
    @Deprecated
    private com.bytedance.adsdk.ugeno.core.ro.ro f6381le;
    protected boolean lmk;
    private boolean lsa;
    protected boolean lse;
    protected boolean lz;
    protected boolean maa;
    protected float mj;
    protected String mon;
    protected boolean mpp;
    protected float mq;
    private float mu;

    /* JADX INFO: renamed from: ne, reason: collision with root package name */
    protected float f6382ne;
    private dsz nk;
    private gof nn;
    protected float no;
    protected float nt;
    protected float ol;
    protected float onz;
    private boolean oy;
    protected com.bytedance.adsdk.ugeno.fm.ajl pbk;
    protected float pcm;

    /* JADX INFO: renamed from: pf, reason: collision with root package name */
    protected Map<Integer, com.bytedance.adsdk.ugeno.core.dsz> f6383pf;
    protected boolean pkk;
    private boolean po;

    @Deprecated
    private jnr pyj;

    /* JADX INFO: renamed from: qb, reason: collision with root package name */
    protected float f6384qb;

    /* JADX INFO: renamed from: qf, reason: collision with root package name */
    protected float f6385qf;
    protected float qhl;
    private boolean qlg;
    protected float qph;

    @Deprecated
    private com.bytedance.adsdk.ugeno.core.ro.lb rbn;
    protected com.bytedance.adsdk.ugeno.fm.fm rka;
    protected Context ro;
    protected float sds;
    protected float si;
    private com.bytedance.adsdk.ugeno.yz.fm.fm siu;
    protected boolean so;

    /* JADX INFO: renamed from: te, reason: collision with root package name */
    protected float f6386te;
    protected float ttj;
    protected boolean tzk;
    private boolean ucr;
    private String ug;
    private String vj;
    private boolean vod;
    protected boolean vt;
    protected boolean vvj;
    protected boolean wbw;
    protected float wey;
    private boolean wjb;
    protected fm<ViewGroup> wsy;
    protected wsy.fm wu;
    protected float xca;
    protected int xgn;

    @Deprecated
    private yz.fm xp;
    private boolean xw;

    /* JADX INFO: renamed from: ya, reason: collision with root package name */
    private boolean f6387ya;
    protected int ywr;
    protected JSONObject yz;
    protected float zan;
    private boolean zes;
    protected boolean zh;
    protected irt zjk;
    protected float zow;
    private boolean zzm;
    protected fm.C0020fm zzn;

    public lb(Context context) {
        this(context, null);
    }

    private void mpp() {
        if (TextUtils.equals("dashed", this.bwv)) {
            GradientDrawable gradientDrawable = this.f6379kc;
            float f10 = this.mj;
            gradientDrawable.setStroke((int) f10, this.ado, 3.0f * f10, f10);
        } else {
            if (!TextUtils.equals("dotted", this.bwv)) {
                this.f6379kc.setStroke((int) this.mj, this.ado);
                return;
            }
            GradientDrawable gradientDrawable2 = this.f6379kc;
            float f11 = this.mj;
            gradientDrawable2.setStroke((int) f11, this.ado, f11 / 2.0f, f11);
        }
    }

    private void vvj() {
        float f10 = this.bkb ? this.si : this.f6385qf;
        float f11 = this.lmk ? this.f6382ne : this.f6385qf;
        float f12 = this.mpp ? this.f6378ib : this.f6385qf;
        float f13 = this.vvj ? this.kwx : this.f6385qf;
        this.f6379kc.setCornerRadii(new float[]{f10, f10, f11, f11, f13, f13, f12, f12});
    }

    @Deprecated
    private void yz() {
        com.bytedance.adsdk.ugeno.core.ro.yz yzVarYz;
        this.jnr.setVisibility(this.ywr);
        float f10 = this.daz;
        if (f10 != 0.0f) {
            this.jnr.setRotation(f10);
        }
        wsy.fm fmVar = this.wu;
        if (fmVar != null && TextUtils.isEmpty(fmVar.ro())) {
            this.jnr.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.adsdk.ugeno.ro.lb.1
                @Override // android.view.View.OnClickListener
                public void onClick(View view) {
                    lb lbVar = lb.this;
                    if (lbVar.cpu != null) {
                        boolean unused = lbVar.anz;
                    }
                }
            });
        } else if (ro(1) && !this.zzm) {
            this.jnr.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.adsdk.ugeno.ro.lb.2
                @Override // android.view.View.OnClickListener
                public void onClick(View view) {
                    lb lbVar = lb.this;
                    if (lbVar.jn == null || !lbVar.anz) {
                        return;
                    }
                    lb lbVar2 = lb.this;
                    fhx fhxVar = lbVar2.jn;
                    com.bytedance.adsdk.ugeno.core.dsz dszVar = lbVar2.f6383pf.get(1);
                    lb lbVar3 = lb.this;
                    fhxVar.fm(dszVar, lbVar3, lbVar3);
                }
            });
        }
        if (this.jn != null && ro(4)) {
            if (ro(1)) {
                pkk();
                this.qlg = true;
                this.pyj = new jnr(this.ro, this.f6383pf.get(4), this.f6383pf.get(1), this.qlg, lmk(), this.kec);
            } else {
                pkk();
                this.pyj = new jnr(this.ro, this.f6383pf.get(4), this.qlg, lmk(), this.kec);
            }
        }
        if (this.jn != null && ro(1) && this.zzm) {
            pkk();
            this.rbn = new com.bytedance.adsdk.ugeno.core.ro.lb(this.ro, this.f6383pf.get(1));
        }
        ef();
        if (this.jn != null && ro(3) && (yzVarYz = com.bytedance.adsdk.ugeno.jnr.fm().yz()) != null) {
            this.xp = yzVarYz.fm(this.ro, this);
            new Object() { // from class: com.bytedance.adsdk.ugeno.ro.lb.3
            };
        }
        if (this.jn != null && ro(9)) {
            ajl ajlVar = new ajl(this.ro, this.f6383pf.get(9), this);
            this.f6375ff = ajlVar;
            ajlVar.fm(this.jn);
        }
        if (ro(10)) {
            com.bytedance.adsdk.ugeno.core.ro.ro roVar = new com.bytedance.adsdk.ugeno.core.ro.ro(this.ro, this.f6383pf.get(10), this);
            this.f6381le = roVar;
            roVar.fm(this.jn);
        }
    }

    public ViewGroup.LayoutParams ai() {
        return this.aws;
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void ajl() {
        if (this.nn == null || this.eo) {
            return;
        }
        this.eo = true;
    }

    public boolean bkb() {
        return this.oy;
    }

    public int bx() {
        return this.xgn;
    }

    public void dsz() {
        boolean zOptBoolean = this.yz.optBoolean("gesture_through_enable", false);
        wsy.fm fmVar = this.wu;
        this.ew = zOptBoolean && (fmVar == null || fmVar.lb());
        this.kec = this.yz.optBoolean("is_adapt_two_finger", false);
    }

    public JSONObject duv() {
        return this.yz;
    }

    public void ef(String str) {
        this.ku = str;
    }

    public float fhx() {
        return this.no;
    }

    public T fm() {
        return null;
    }

    public int gc() {
        return (int) this.dsz;
    }

    public float gof() {
        return this.f6386te;
    }

    public float gqi() {
        return this.xca;
    }

    public void gzf() {
        com.bytedance.adsdk.ugeno.jnr.fm().ro().fm(this.f6374ef, this.mon, new fm.InterfaceC0016fm() { // from class: com.bytedance.adsdk.ugeno.ro.lb.4
            @Override // com.bytedance.adsdk.ugeno.fm.InterfaceC0016fm
            public void fm(final Bitmap bitmap) {
                if (bitmap == null) {
                    return;
                }
                lb lbVar = lb.this;
                if (!lbVar.tzk) {
                    com.bytedance.adsdk.ugeno.wsy.wu.fm(new Runnable() { // from class: com.bytedance.adsdk.ugeno.ro.lb.4.2
                        @Override // java.lang.Runnable
                        public void run() {
                            lb.this.fm(new BitmapDrawable(bitmap));
                        }
                    });
                    return;
                }
                final Bitmap bitmapFm = com.bytedance.adsdk.ugeno.wsy.wu.fm(lbVar.ro, bitmap, (int) lbVar.zan);
                if (bitmapFm != null) {
                    com.bytedance.adsdk.ugeno.wsy.wu.fm(new Runnable() { // from class: com.bytedance.adsdk.ugeno.ro.lb.4.1
                        @Override // java.lang.Runnable
                        public void run() {
                            lb.this.fm(new BitmapDrawable(bitmapFm));
                        }
                    });
                }
            }
        });
    }

    public fm ha() {
        return this.ajl;
    }

    public long hi() {
        return this.f6373cc;
    }

    public fhx hlt() {
        return this.jn;
    }

    public String hxv() {
        return this.duv;
    }

    public float ib() {
        T t10 = this.jnr;
        if (t10 instanceof com.bytedance.adsdk.ugeno.fm.wsy) {
            return ((com.bytedance.adsdk.ugeno.fm.wsy) t10).getShine();
        }
        return 0.0f;
    }

    public float irt() {
        return this.lcp;
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void jnr() {
        if (this.nn == null || this.eys) {
            return;
        }
        this.eys = true;
    }

    public T ku() {
        return this.jnr;
    }

    public float kwx() {
        T t10 = this.jnr;
        if (t10 instanceof com.bytedance.adsdk.ugeno.fm.wsy) {
            return ((com.bytedance.adsdk.ugeno.fm.wsy) t10).getRubIn();
        }
        return 0.0f;
    }

    public void lb(JSONObject jSONObject) {
        this.f6380lb = jSONObject;
    }

    public boolean lmk() {
        return this.ew;
    }

    public float lse() {
        return this.f6385qf;
    }

    public void lz() {
    }

    public float maa() {
        return this.qph;
    }

    public boolean mon() {
        return this.so;
    }

    public void mq() {
        BitmapDrawable bitmapDrawable;
        Bitmap bitmapFm;
        if (TextUtils.isEmpty(this.mon)) {
            if (this.zh) {
                fm(this.zzn);
                return;
            } else {
                this.f6379kc.setColor(this.xgn);
                yz(this.xgn);
                return;
            }
        }
        if (!this.mon.startsWith("local://")) {
            gzf();
            return;
        }
        String strReplace = this.mon.replace("local://", "");
        try {
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inPreferredConfig = this.tzk ? Bitmap.Config.ARGB_4444 : Bitmap.Config.RGB_565;
            options.inPurgeable = true;
            options.inInputShareable = true;
            Bitmap bitmapDecodeStream = BitmapFactory.decodeStream(this.ro.getResources().openRawResource(com.bytedance.adsdk.ugeno.wsy.yz.ro(this.ro, strReplace)), null, options);
            if (this.tzk && (bitmapFm = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, bitmapDecodeStream, (int) this.zan)) != null) {
                bitmapDrawable = new BitmapDrawable(this.ro.getResources(), bitmapFm);
                fm(bitmapDrawable);
            } else {
                BitmapDrawable bitmapDrawable2 = new BitmapDrawable(this.ro.getResources(), bitmapDecodeStream);
                bitmapDrawable = bitmapDrawable2;
                fm(bitmapDrawable);
            }
        } catch (Throwable unused) {
        }
    }

    public float ne() {
        T t10 = this.jnr;
        if (t10 instanceof com.bytedance.adsdk.ugeno.fm.wsy) {
            return ((com.bytedance.adsdk.ugeno.fm.wsy) t10).getStretch();
        }
        return 0.0f;
    }

    public JSONObject nt() {
        return this.f6380lb;
    }

    public wsy.fm ol() {
        return this.wu;
    }

    @Override // android.view.View.OnTouchListener
    public boolean onTouch(View view, MotionEvent motionEvent) {
        jnr jnrVar;
        fhx fhxVar;
        com.bytedance.adsdk.ugeno.core.ro.lb lbVar;
        motionEvent.toString();
        int action = motionEvent.getAction();
        if (action == 0) {
            tzk();
        } else if (action == 1 || action == 3) {
            lz();
        }
        irt irtVar = this.zjk;
        if (irtVar != null) {
            irtVar.fm(this, motionEvent);
        }
        if (ro(17) && motionEvent.getAction() == 0) {
            this.jn.fm(this.f6383pf.get(17), this, this);
        }
        if (ro(1) && this.zzm && (fhxVar = this.jn) != null && (lbVar = this.rbn) != null) {
            return lbVar.fm(fhxVar, this, motionEvent);
        }
        fhx fhxVar2 = this.jn;
        if (fhxVar2 != null && (jnrVar = this.pyj) != null) {
            return jnrVar.fm(fhxVar2, this, motionEvent, lmk());
        }
        ef efVar = this.hm;
        if (efVar != null) {
            return efVar.fm(motionEvent);
        }
        return false;
    }

    public void onz() {
        this.jnr.setPadding((int) (this.f6377ha ? this.mq : this.nt), (int) (this.hxv ? this.ai : this.nt), (int) (this.pkk ? this.gzf : this.nt), (int) (this.f6376gc ? this.ol : this.nt));
    }

    public String pkk() {
        return this.ku;
    }

    public boolean qf() {
        return this.pcm > 0.0f;
    }

    public float qhl() {
        return this.f6384qb;
    }

    public void ro(JSONObject jSONObject) {
        this.yz = jSONObject;
        dsz();
    }

    public float sds() {
        return this.daz;
    }

    public float si() {
        T t10 = this.jnr;
        if (t10 instanceof com.bytedance.adsdk.ugeno.fm.wsy) {
            return ((com.bytedance.adsdk.ugeno.fm.wsy) t10).getRipple();
        }
        return 0.0f;
    }

    public void tzk() {
    }

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

    public boolean wbw() {
        return this.vt;
    }

    public float wey() {
        return this.ttj;
    }

    public void wsy() {
        com.bytedance.adsdk.ugeno.core.fm fmVar = this.bp;
        if (fmVar != null) {
            vt vtVar = new vt(this.jnr, fmVar);
            this.hou = vtVar;
            vtVar.fm();
        }
        com.bytedance.adsdk.ugeno.fm.fm fmVar2 = this.rka;
        if (fmVar2 != null) {
            fmVar2.fm();
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            ajlVar.ro();
        }
        ef efVar = this.hm;
        if (efVar != null) {
            efVar.jnr();
        }
        if (this.f6381le != null && ro(10)) {
            this.f6381le.fm();
        }
        if (this.f6375ff != null && ro(9)) {
            this.f6375ff.fm();
        }
        jnr jnrVar = this.pyj;
        if (jnrVar != null) {
            jnrVar.fm();
        }
        this.f6373cc = System.currentTimeMillis();
    }

    public void wu() {
        vt vtVar = this.hou;
        if (vtVar != null) {
            vtVar.ro();
        }
        com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
        if (fmVar != null) {
            fmVar.lb();
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            ajlVar.lb();
        }
    }

    public int xgn() {
        return (int) this.onz;
    }

    public com.bytedance.adsdk.ugeno.yz.fm.fm zan() {
        return this.siu;
    }

    public lb(Context context, fm<ViewGroup> fmVar) {
        this.dsz = -2.0f;
        this.onz = -2.0f;
        this.bwv = "solid";
        this.ywr = 0;
        this.so = true;
        this.jm = 0.0f;
        this.no = 0.0f;
        this.lcp = 0.0f;
        this.zow = 1.0f;
        this.f6384qb = 1.0f;
        this.f6386te = 1.0f;
        this.cg = 0.0f;
        this.xca = 0.0f;
        this.ttj = 0.0f;
        this.daz = 0.0f;
        this.qph = 1.0f;
        this.ky = true;
        this.anz = true;
        this.f6387ya = false;
        this.gt = false;
        this.ew = false;
        this.kec = false;
        this.mu = 12.0f;
        this.ro = context;
        this.ajl = fmVar;
        this.f6383pf = new HashMap();
        this.f6379kc = new GradientDrawable();
        this.jnr = (T) fm();
    }

    private void ef() {
        com.bytedance.adsdk.ugeno.core.dsz dszVar;
        if (this.jn == null || !ro(18) || (dszVar = this.f6383pf.get(18)) == null) {
            return;
        }
        JSONObject jSONObjectLb = dszVar.lb();
        if (jSONObjectLb != null) {
            try {
                jSONObjectLb.put("rotateZ", com.bytedance.adsdk.ugeno.lb.ro.fm(jSONObjectLb.optString("rotateZ"), this.yz));
            } catch (JSONException unused) {
            }
        }
        this.jn.fm(dszVar, this, this);
    }

    private boolean onz(String str) {
        return TextUtils.isEmpty(str) || !TextUtils.equals(str, "hidden");
    }

    private void vt() {
        StringBuilder sb = new StringBuilder();
        sb.append(this.ku);
        this.jnr.setContentDescription(sb);
    }

    public lb<T> ajl(String str) {
        return ro(str);
    }

    public com.bytedance.adsdk.ugeno.fm.fm duv(String str) {
        com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
        if (fmVar != null && TextUtils.equals(str, fmVar.jnr())) {
            return this.rka;
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            return ajlVar.fm(str);
        }
        return null;
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void fm(int i10, int i11, int i12, int i13) {
        if (this.nn == null || this.zes) {
            return;
        }
        this.zes = true;
    }

    public lb<T> jnr(String str) {
        return fm(str);
    }

    public List<com.bytedance.adsdk.ugeno.yz.yz.lb> ku(String str) {
        ef efVar;
        if (TextUtils.isEmpty(str) || (efVar = this.hm) == null) {
            return null;
        }
        return efVar.fm(str);
    }

    @SuppressLint({"ClickableViewAccessibility"})
    public void ro() {
        mq();
        onz();
        lb(this.ywr);
        lb();
        yz();
        ef efVar = this.hm;
        if (efVar != null) {
            efVar.fm();
            this.hm.ro();
            this.hm.lb();
        }
        this.jnr.setOnTouchListener(this);
        vt();
        ViewGroup viewGroup = (ViewGroup) this.jnr.getParent();
        if (viewGroup != null) {
            viewGroup.setClipChildren(!this.ky);
        }
        com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
        if (fmVar != null) {
            fmVar.yz();
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            ajlVar.fm();
        }
        ef efVar2 = this.hm;
        if (efVar2 != null) {
            efVar2.yz();
        }
        if (this.jn == null || !ro(22)) {
            return;
        }
        this.jn.fm(this.f6383pf.get(22), this, this);
    }

    private void lb() {
        if (this.fm) {
            this.jnr.setTranslationX(this.no);
        }
        if (this.cyr) {
            this.jnr.setTranslationY(this.lcp);
        }
        if (this.ucr) {
            this.jnr.setScaleX(this.f6384qb);
        }
        if (this.po) {
            this.jnr.setScaleY(this.f6386te);
        }
        if (this.vod) {
            this.jnr.setRotation(this.cg);
        }
        if (this.lsa) {
            this.jnr.setRotationX(this.xca);
        }
        if (this.ex) {
            this.jnr.setRotationY(-this.ttj);
        }
        if (this.wjb) {
            this.jnr.setAlpha(this.qph);
        }
        float f10 = this.daz;
        if (f10 != 0.0f) {
            this.jnr.setRotation(f10);
        }
        if (this.vod || this.lsa || this.ex) {
            this.jnr.setCameraDistance(10000.0f);
        }
    }

    public void ajl(int i10) {
        if (wbw()) {
            T t10 = this.jnr;
            if (t10 instanceof ro) {
                ((ro) t10).ro(i10);
                return;
            }
            ViewParent viewParent = (ViewGroup) t10.getParent();
            if (viewParent instanceof ro) {
                ((ro) viewParent).ro(this.jnr, i10);
                return;
            }
            return;
        }
        ViewGroup.LayoutParams layoutParams = this.jnr.getLayoutParams();
        layoutParams.height = i10;
        this.jnr.setLayoutParams(layoutParams);
    }

    public void fm(com.bytedance.adsdk.ugeno.core.ajl ajlVar) {
        this.grs = ajlVar;
    }

    public void jnr(int i10) {
        if (wbw()) {
            T t10 = this.jnr;
            if (t10 instanceof ro) {
                ((ro) t10).fm(i10);
                return;
            }
            ViewParent viewParent = (ViewGroup) t10.getParent();
            if (viewParent instanceof ro) {
                ((ro) viewParent).fm(this.jnr, i10);
                return;
            }
            return;
        }
        ViewGroup.LayoutParams layoutParams = this.jnr.getLayoutParams();
        layoutParams.width = i10;
        this.jnr.setLayoutParams(layoutParams);
    }

    private ImageView.ScaleType dsz(String str) {
        str.getClass();
        switch (str) {
            case "center":
                this.bx = ImageView.ScaleType.CENTER;
                break;
            case "fit":
                this.bx = ImageView.ScaleType.FIT_CENTER;
                break;
            case "crop":
                this.bx = ImageView.ScaleType.CENTER_CROP;
                break;
            default:
                this.bx = ImageView.ScaleType.FIT_XY;
                break;
        }
        return this.bx;
    }

    public void fm(fhx fhxVar) {
        this.jn = fhxVar;
    }

    public lb<T> wu(String str) {
        return yz(str);
    }

    public void fm(gof gofVar) {
        this.nn = gofVar;
    }

    public void fm(irt irtVar) {
        this.zjk = irtVar;
    }

    public void fm(ku kuVar) {
        this.f6374ef = kuVar;
    }

    public void fm(wsy.fm fmVar) {
        this.wu = fmVar;
    }

    public void fm(wu wuVar) {
        this.cpu = wuVar;
    }

    public void fm(fm fmVar) {
        this.ajl = fmVar;
    }

    public void fm(com.bytedance.adsdk.ugeno.yz.fm.fm fmVar) {
        this.siu = fmVar;
    }

    public void fm(String str, Map<String, Object> map) {
    }

    public lb<T> wsy(String str) {
        return lb(str);
    }

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

    public void lb(int i10) {
        ViewParent viewParent = (ViewGroup) this.jnr.getParent();
        if (viewParent instanceof ro) {
            ((ro) viewParent).lb(this.jnr, i10);
        } else {
            this.jnr.setVisibility(i10);
        }
    }

    public void fm(JSONObject jSONObject) {
        this.yz = jSONObject;
        dsz();
        JSONObject jSONObject2 = this.f6380lb;
        if (jSONObject2 == null) {
            return;
        }
        Iterator<String> itKeys = jSONObject2.keys();
        fm<ViewGroup> fmVar = this.ajl;
        fm.C0019fm c0019fmVt = fmVar instanceof fm ? fmVar.vt() : null;
        while (itKeys.hasNext()) {
            String next = itKeys.next();
            String strFm = com.bytedance.adsdk.ugeno.lb.ro.fm(this.f6380lb.optString(next), jSONObject);
            fm(next, strFm);
            if (c0019fmVt != null) {
                c0019fmVt.fm(this.ro, next, strFm);
            }
        }
        if (c0019fmVt != null) {
            fm(c0019fmVt.fm());
        }
        if (this.iat == null || this.yz == null) {
            return;
        }
        try {
            if (wbw()) {
                JSONObject jSONObject3 = new JSONObject();
                jSONObject3.put("i18n", this.iat);
                this.yz.put("xNode", jSONObject3);
                return;
            }
            this.yz.put("i18n", this.iat);
        } catch (JSONException unused) {
        }
    }

    public lb<T> lb(String str) {
        if (!TextUtils.isEmpty(this.duv) && TextUtils.equals(this.duv, str) && this.ywr == 0) {
            return this;
        }
        return null;
    }

    public boolean ro(int i10) {
        Map<Integer, com.bytedance.adsdk.ugeno.core.dsz> map = this.f6383pf;
        return map != null && map.containsKey(Integer.valueOf(i10));
    }

    public lb<T> ro(String str) {
        if (TextUtils.isEmpty(this.duv) || !TextUtils.equals(this.duv, str)) {
            return null;
        }
        return this;
    }

    public void ro(String str, String str2) {
        if (TextUtils.isEmpty(str2) || this.f6383pf == null) {
            return;
        }
        try {
            int iFm = com.bytedance.adsdk.ugeno.core.onz.fm(str).fm();
            com.bytedance.adsdk.ugeno.core.dsz dszVar = new com.bytedance.adsdk.ugeno.core.dsz();
            dszVar.fm(iFm);
            dszVar.fm(this);
            JSONObject jSONObject = new JSONObject(str2);
            if (iFm == 3) {
                try {
                    this.mu = Float.parseFloat(com.bytedance.adsdk.ugeno.lb.ro.fm(jSONObject.optString("shakeAmplitude"), this.yz));
                } catch (NumberFormatException unused) {
                    this.mu = 12.0f;
                }
            }
            if (!(this.jn instanceof com.bytedance.adsdk.ugeno.core.fm.ro)) {
                fm(iFm, jSONObject, dszVar);
                return;
            }
            throw null;
        } catch (JSONException unused2) {
        }
    }

    public void yz(int i10) {
        this.f6379kc.setShape(0);
        this.f6379kc.setColor(i10);
        vvj();
        mpp();
        this.jnr.setBackground(this.f6379kc);
    }

    public void fm(fm.C0020fm c0020fm) {
        if (c0020fm == null) {
            return;
        }
        this.f6379kc.setShape(0);
        this.f6379kc.setOrientation(c0020fm.fm);
        if (Build.VERSION.SDK_INT >= 29) {
            this.f6379kc.setColors(c0020fm.ro, c0020fm.f6388lb);
        } else {
            this.f6379kc.setColors(c0020fm.ro);
        }
        vvj();
        mpp();
        this.jnr.setBackground(this.f6379kc);
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void ro(Canvas canvas) {
        if (this instanceof fm) {
            com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
            if (fmVar != null) {
                fmVar.ro(canvas);
            }
            com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
            if (ajlVar != null) {
                ajlVar.ro(canvas);
            }
        }
    }

    public lb<T> yz(String str) {
        if (duv(str) != null) {
            return this;
        }
        return null;
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void ro(int i10, int i11, int i12, int i13) {
        vt vtVar = this.hou;
        if (vtVar != null) {
            vtVar.fm(i10, i11);
        }
        com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
        if (fmVar != null) {
            fmVar.fm(i10, i11);
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            ajlVar.fm(i10, i11);
        }
    }

    public void fm(Drawable drawable) {
        this.jnr.setBackground(drawable);
    }

    public void fm(ViewGroup.LayoutParams layoutParams) {
        T t10 = this.jnr;
        if (t10 != null) {
            t10.setLayoutParams(layoutParams);
        }
        this.aws = layoutParams;
    }

    public void fm(boolean z10, boolean z11) {
        if (this.jnr != null) {
            fm(this.aws);
            if (z10) {
                jnr((int) this.dsz);
            }
            if (z11) {
                ajl((int) this.onz);
            }
        }
    }

    public lb ro(lb lbVar) {
        return (lbVar.ha() == null && (lbVar instanceof fm)) ? lbVar : ro(lbVar.ha());
    }

    public lb<T> fm(String str) {
        if (TextUtils.isEmpty(this.ku) || !TextUtils.equals(this.ku, str)) {
            return null;
        }
        return this;
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    public void fm(String str, String str2) {
        if (TextUtils.isEmpty(str)) {
        }
        str.getClass();
        byte b10 = -1;
        switch (str.hashCode()) {
            case -1964681502:
                if (str.equals("clickable")) {
                    b10 = 0;
                }
                break;
            case -1901681170:
                if (str.equals("onRenderSuccess")) {
                    b10 = 1;
                }
                break;
            case -1721943862:
                if (str.equals("translateX")) {
                    b10 = 2;
                }
                break;
            case -1721943861:
                if (str.equals("translateY")) {
                    b10 = 3;
                }
                break;
            case -1501175880:
                if (str.equals("paddingLeft")) {
                    b10 = 4;
                }
                break;
            case -1375815020:
                if (str.equals("minWidth")) {
                    b10 = 5;
                }
                break;
            case -1351184668:
                if (str.equals("onDelay")) {
                    b10 = 6;
                }
                break;
            case -1337252761:
                if (str.equals("onShake")) {
                    b10 = 7;
                }
                break;
            case -1337126126:
                if (str.equals("onSlide")) {
                    b10 = 8;
                }
                break;
            case -1336288090:
                if (str.equals("onTimer")) {
                    b10 = 9;
                }
                break;
            case -1335874424:
                if (str.equals("onTwist")) {
                    b10 = 10;
                }
                break;
            case -1332194002:
                if (str.equals("background")) {
                    b10 = 11;
                }
                break;
            case -1291329255:
                if (str.equals("events")) {
                    b10 = 12;
                }
                break;
            case -1267206133:
                if (str.equals("opacity")) {
                    b10 = 13;
                }
                break;
            case -1228066334:
                if (str.equals("borderTopLeftRadius")) {
                    b10 = 14;
                }
                break;
            case -1221029593:
                if (str.equals("height")) {
                    b10 = 15;
                }
                break;
            case -1081309778:
                if (str.equals("margin")) {
                    b10 = 16;
                }
                break;
            case -1044792121:
                if (str.equals("marginTop")) {
                    b10 = 17;
                }
                break;
            case -1013407967:
                if (str.equals("onDown")) {
                    b10 = 18;
                }
                break;
            case -933876756:
                if (str.equals("backgroundDrawable")) {
                    b10 = 19;
                }
                break;
            case -925180581:
                if (str.equals("rotate")) {
                    b10 = 20;
                }
                break;
            case -908189618:
                if (str.equals("scaleX")) {
                    b10 = 21;
                }
                break;
            case -908189617:
                if (str.equals("scaleY")) {
                    b10 = 22;
                }
                break;
            case -806339567:
                if (str.equals("padding")) {
                    b10 = 23;
                }
                break;
            case -681357156:
                if (str.equals("triggerFunc")) {
                    b10 = 24;
                }
                break;
            case -289173127:
                if (str.equals("marginBottom")) {
                    b10 = 25;
                }
                break;
            case -133587431:
                if (str.equals("minHeight")) {
                    b10 = 26;
                }
                break;
            case 3355:
                if (str.equals(InnerConstant.Db.f36069id)) {
                    b10 = 27;
                }
                break;
            case 3176990:
                if (str.equals("i18n")) {
                    b10 = 28;
                }
                break;
            case 3373707:
                if (str.equals("name")) {
                    b10 = 29;
                }
                break;
            case 87811796:
                if (str.equals("backgroundImageBlur")) {
                    b10 = 30;
                }
                break;
            case 90130308:
                if (str.equals("paddingTop")) {
                    b10 = 31;
                }
                break;
            case 94750088:
                if (str.equals("click")) {
                    b10 = 32;
                }
                break;
            case 105871684:
                if (str.equals("onTap")) {
                    b10 = 33;
                }
                break;
            case 108285963:
                if (str.equals("ratio")) {
                    b10 = 34;
                }
                break;
            case 109250890:
                if (str.equals("scale")) {
                    b10 = 35;
                }
                break;
            case 113126854:
                if (str.equals("width")) {
                    b10 = 36;
                }
                break;
            case 202355100:
                if (str.equals("paddingBottom")) {
                    b10 = 37;
                }
                break;
            case 314070383:
                if (str.equals("animations")) {
                    b10 = 38;
                }
                break;
            case 320386138:
                if (str.equals("onLoadMore")) {
                    b10 = 39;
                }
                break;
            case 333432965:
                if (str.equals("borderTopRightRadius")) {
                    b10 = 40;
                }
                break;
            case 529642498:
                if (str.equals("overflow")) {
                    b10 = 41;
                }
                break;
            case 581268560:
                if (str.equals("borderBottomLeftRadius")) {
                    b10 = 42;
                }
                break;
            case 588239831:
                if (str.equals("borderBottomRightRadius")) {
                    b10 = 43;
                }
                break;
            case 713848971:
                if (str.equals("paddingRight")) {
                    b10 = 44;
                }
                break;
            case 722830999:
                if (str.equals("borderColor")) {
                    b10 = 45;
                }
                break;
            case 737768677:
                if (str.equals("borderStyle")) {
                    b10 = 46;
                }
                break;
            case 741115130:
                if (str.equals("borderWidth")) {
                    b10 = 47;
                }
                break;
            case 843948038:
                if (str.equals("onExposure")) {
                    b10 = 48;
                }
                break;
            case 975087886:
                if (str.equals("marginRight")) {
                    b10 = 49;
                }
                break;
            case 1052832078:
                if (str.equals("translate")) {
                    b10 = 50;
                }
                break;
            case 1087723621:
                if (str.equals("onAnimation")) {
                    b10 = 51;
                }
                break;
            case 1118509956:
                if (str.equals("animation")) {
                    b10 = 52;
                }
                break;
            case 1151851515:
                if (str.equals("animatorSet")) {
                    b10 = 53;
                }
                break;
            case 1158381436:
                if (str.equals("onPullToRefresh")) {
                    b10 = 54;
                }
                break;
            case 1287124693:
                if (str.equals("backgroundColor")) {
                    b10 = 55;
                }
                break;
            case 1292595405:
                if (str.equals("backgroundImage")) {
                    b10 = 56;
                }
                break;
            case 1301532860:
                if (str.equals("backgroundScale")) {
                    b10 = 57;
                }
                break;
            case 1349188574:
                if (str.equals("borderRadius")) {
                    b10 = 58;
                }
                break;
            case 1384173149:
                if (str.equals("rotateX")) {
                    b10 = 59;
                }
                break;
            case 1384173150:
                if (str.equals("rotateY")) {
                    b10 = 60;
                }
                break;
            case 1384173151:
                if (str.equals("rotateZ")) {
                    b10 = 61;
                }
                break;
            case 1490730380:
                if (str.equals("onScroll")) {
                    b10 = 62;
                }
                break;
            case 1671308008:
                if (str.equals("disable")) {
                    b10 = Utf8.REPLACEMENT_BYTE;
                }
                break;
            case 1685004456:
                if (str.equals("onLongTap")) {
                    b10 = 64;
                }
                break;
            case 1941332754:
                if (str.equals("visibility")) {
                    b10 = 65;
                }
                break;
            case 1970934485:
                if (str.equals("marginLeft")) {
                    b10 = 66;
                }
                break;
            case 1997542747:
                if (str.equals("availability")) {
                    b10 = 67;
                }
                break;
        }
        switch (b10) {
            case 0:
                this.anz = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, true);
                break;
            case 1:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            case 18:
            case 33:
            case 39:
            case 48:
            case 51:
            case 54:
            case 62:
            case 64:
                ro(str, str2);
                break;
            case 2:
                this.fm = true;
                this.no = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f));
                break;
            case 3:
                this.cyr = true;
                this.lcp = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f));
                break;
            case 4:
                this.mq = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.f6377ha = true;
                break;
            case 5:
                this.wey = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 11:
            case 55:
                if (com.bytedance.adsdk.ugeno.wsy.fm.lb(str2)) {
                    this.zh = true;
                    this.zzn = com.bytedance.adsdk.ugeno.wsy.fm.ro(str2);
                } else {
                    this.xgn = com.bytedance.adsdk.ugeno.wsy.fm.fm(str2, 0);
                    this.zh = false;
                }
                break;
            case 12:
                this.hm = ef.fm(this, str2);
                break;
            case 13:
                this.wjb = true;
                this.qph = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 1.0f);
                break;
            case 14:
                this.si = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.bkb = true;
                break;
            case 15:
                if (TextUtils.equals(str2, "match_parent")) {
                    this.onz = -1.0f;
                } else if (TextUtils.equals(str2, "wrap_content")) {
                    this.onz = -2.0f;
                } else {
                    this.onz = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                }
                this.gt = true;
                break;
            case 16:
                this.fhx = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                break;
            case 17:
                this.gof = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.hlt = true;
                break;
            case 19:
            case 56:
                this.mon = str2;
                break;
            case 20:
                this.vod = true;
                this.cg = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 21:
                this.ucr = true;
                this.f6384qb = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 22:
                this.po = true;
                this.f6386te = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 23:
                this.nt = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.wbw = true;
                break;
            case 24:
                this.vj = str2;
                break;
            case 25:
                this.gqi = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.hi = true;
                break;
            case 26:
                this.sds = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 27:
                this.ku = str2;
                break;
            case 28:
                this.iat = com.bytedance.adsdk.ugeno.wsy.ro.fm(str2, (JSONObject) null);
                break;
            case 29:
                this.duv = str2;
                break;
            case 30:
                float fFm = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                this.zan = fFm;
                if (fFm > 0.0f) {
                    this.tzk = true;
                }
                break;
            case 31:
                this.ai = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.hxv = true;
                break;
            case 32:
                this.ug = str2;
                break;
            case 34:
                this.pcm = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 35:
                this.ucr = true;
                this.po = true;
                float[] fArrRo = com.bytedance.adsdk.ugeno.fm.yz.ro(str2, this.yz);
                this.f6384qb = fArrRo[0];
                this.f6386te = fArrRo[1];
                break;
            case 36:
                if (TextUtils.equals(str2, "match_parent")) {
                    this.dsz = -1.0f;
                } else if (TextUtils.equals(str2, "wrap_content")) {
                    this.dsz = -2.0f;
                } else {
                    this.dsz = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                }
                this.f6387ya = true;
                break;
            case 37:
                this.ol = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.f6376gc = true;
                break;
            case 38:
                List<com.bytedance.adsdk.ugeno.fm.lb> listFm = com.bytedance.adsdk.ugeno.fm.yz.fm(str2, this.yz);
                if (listFm != null && !listFm.isEmpty()) {
                    this.pbk = new com.bytedance.adsdk.ugeno.fm.ajl(this.ro, this, listFm);
                    break;
                }
                break;
            case 40:
                this.f6382ne = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.lmk = true;
                break;
            case 41:
                this.ky = onz(str2);
                break;
            case 42:
                this.f6378ib = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.mpp = true;
                break;
            case 43:
                this.kwx = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.vvj = true;
                break;
            case 44:
                this.gzf = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.pkk = true;
                break;
            case 45:
                this.ado = com.bytedance.adsdk.ugeno.wsy.fm.fm(str2);
                break;
            case 46:
                this.bwv = str2;
                break;
            case 47:
                this.mj = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                break;
            case 49:
                this.qhl = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.lse = true;
                break;
            case 50:
                this.fm = true;
                this.cyr = true;
                float[] fArrRo2 = com.bytedance.adsdk.ugeno.fm.yz.ro(str2, this.yz);
                this.no = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, fArrRo2[0]);
                this.lcp = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, fArrRo2[1]);
                break;
            case 52:
                try {
                    this.rka = new com.bytedance.adsdk.ugeno.fm.fm(this.ro, this, com.bytedance.adsdk.ugeno.fm.yz.fm(new JSONObject(str2), this.yz));
                } catch (JSONException unused) {
                    return;
                }
                break;
            case 53:
                this.bp = com.bytedance.adsdk.ugeno.core.fm.fm(str2, this);
                break;
            case 57:
                this.lz = true;
                this.bx = dsz(str2);
                break;
            case 58:
                this.f6385qf = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                break;
            case 59:
                this.lsa = true;
                this.xca = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 60:
                this.ex = true;
                this.ttj = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 61:
                this.daz = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, 0.0f);
                break;
            case 63:
                this.oy = com.bytedance.adsdk.ugeno.wsy.lb.fm(str2, false);
                break;
            case 65:
                if (TextUtils.equals("visible", str2)) {
                    this.ywr = 0;
                } else if (TextUtils.equals("invisible", str2)) {
                    this.ywr = 4;
                } else if (TextUtils.equals("gone", str2) || TextUtils.equals("hidden", str2)) {
                    this.ywr = 8;
                }
                this.jnr.setVisibility(this.ywr);
                break;
            case 66:
                this.irt = com.bytedance.adsdk.ugeno.wsy.wu.fm(this.ro, str2);
                this.maa = true;
                break;
            case 67:
                this.so = !TextUtils.equals(str2, "unavailable");
                break;
        }
    }

    @Deprecated
    public void fm(int i10, JSONObject jSONObject, com.bytedance.adsdk.ugeno.core.dsz dszVar) {
        JSONObject jSONObjectOptJSONObject = jSONObject.optJSONObject("success");
        if (jSONObjectOptJSONObject != null) {
            com.bytedance.adsdk.ugeno.core.dsz dszVar2 = new com.bytedance.adsdk.ugeno.core.dsz();
            dszVar2.fm(jSONObjectOptJSONObject);
            dszVar2.fm(this);
            dszVar.fm(dszVar2);
        }
        JSONObject jSONObjectOptJSONObject2 = jSONObject.optJSONObject("fail");
        if (jSONObjectOptJSONObject2 != null) {
            com.bytedance.adsdk.ugeno.core.dsz dszVar3 = new com.bytedance.adsdk.ugeno.core.dsz();
            dszVar3.fm(jSONObjectOptJSONObject2);
            dszVar3.fm(this);
            dszVar.ro(dszVar3);
        }
        dszVar.fm(jSONObject);
        this.f6383pf.put(Integer.valueOf(i10), dszVar);
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public int[] fm(int i10, int i11) {
        if (this.pcm > 0.0f) {
            if (this.f6387ya) {
                int size = View.MeasureSpec.getSize(i10);
                float f10 = this.pcm;
                if (f10 != 0.0f) {
                    i11 = View.MeasureSpec.makeMeasureSpec((int) (size / f10), 1073741824);
                }
            } else if (this.gt) {
                int size2 = View.MeasureSpec.getSize(i11);
                float f11 = this.pcm;
                if (f11 != 0.0f) {
                    i10 = View.MeasureSpec.makeMeasureSpec((int) (size2 * f11), 1073741824);
                }
            }
        }
        if (this.nn != null && !this.xw) {
            this.xw = true;
        }
        return new int[]{i10, i11};
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void fm(Canvas canvas, IAnimation iAnimation) {
        vt vtVar = this.hou;
        if (vtVar != null) {
            vtVar.fm(canvas, iAnimation);
        }
    }

    @Override // com.bytedance.adsdk.ugeno.yz
    public void fm(Canvas canvas) {
        if (this instanceof fm) {
            return;
        }
        com.bytedance.adsdk.ugeno.fm.fm fmVar = this.rka;
        if (fmVar != null) {
            fmVar.fm(canvas);
        }
        com.bytedance.adsdk.ugeno.fm.ajl ajlVar = this.pbk;
        if (ajlVar != null) {
            ajlVar.fm(canvas);
        }
    }

    @Override // com.bytedance.adsdk.ugeno.core.fhx.ro
    public void fm(com.bytedance.adsdk.ugeno.core.dsz dszVar) {
        fm<ViewGroup> fmVar;
        lb<T> lbVarJnr;
        if (dszVar == null || dszVar.lb() == null || !TextUtils.equals(dszVar.lb().optString("type"), "onDismiss")) {
            return;
        }
        String strOptString = dszVar.lb().optString("nodeId");
        lb(8);
        this.wsy = (fm) ro(this);
        if (TextUtils.isEmpty(strOptString) || (fmVar = this.wsy) == null || (lbVarJnr = fmVar.jnr(strOptString)) == null) {
            return;
        }
        lbVarJnr.lb(8);
    }

    public void fm(String str, Object... objArr) {
        List<com.bytedance.adsdk.ugeno.yz.yz.lb> listKu = ku(str);
        if (listKu == null || listKu.isEmpty()) {
            return;
        }
        for (com.bytedance.adsdk.ugeno.yz.yz.lb lbVar : listKu) {
            lbVar.fm(this.hm);
            lbVar.fm(objArr);
        }
    }

    public void fm(com.bytedance.adsdk.ugeno.core.jnr jnrVar) {
        ef efVar = this.hm;
        if (efVar != null) {
            efVar.fm(jnrVar);
        }
    }

    public void fm(onz onzVar) {
        ef efVar = this.hm;
        if (efVar != null) {
            efVar.fm(onzVar);
        }
        this.kh = onzVar;
    }

    public void fm(dsz dszVar) {
        ef efVar = this.hm;
        if (efVar != null) {
            efVar.fm(dszVar);
        }
        this.nk = dszVar;
    }
}
