package com.tencent.mm.plugin.appbrand.jsapi.d;

import com.tencent.mm.model.v;
import com.tencent.mm.plugin.appbrand.page.u;
import com.tencent.mm.plugin.appbrand.widget.input.d.f;
import com.tencent.ytcommon.BuildConfig;
import java.lang.ref.WeakReference;

abstract class a<P extends f> extends com.tencent.mm.plugin.appbrand.jsapi.a<u> {
    a() {
    }

    /* Access modifiers changed, original: protected */
    /* JADX WARNING: Removed duplicated region for block: B:18:0x0083  */
    /* JADX WARNING: Removed duplicated region for block: B:10:0x0045  */
    /* JADX WARNING: Removed duplicated region for block: B:17:0x0067  */
    /* JADX WARNING: Removed duplicated region for block: B:10:0x0045  */
    /* JADX WARNING: Removed duplicated region for block: B:18:0x0083  */
    public boolean a(P r7, org.json.JSONObject r8, com.tencent.mm.plugin.appbrand.page.u r9, int r10) {
        /*
        r6 = this;
        r1 = 1;
        r0 = 0;
        r4 = 0;
        r3 = new org.json.JSONObject;	 Catch:{ Exception -> 0x005f }
        r2 = "style";
        r2 = r8.getString(r2);	 Catch:{ Exception -> 0x005f }
        r3.<init>(r2);	 Catch:{ Exception -> 0x005f }
        r2 = "width";
        r2 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r2);	 Catch:{ Exception -> 0x0216 }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x0216 }
        r7.jjp = r2;	 Catch:{ Exception -> 0x0216 }
        r2 = "height";
        r2 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r2);	 Catch:{ Exception -> 0x0219 }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x0219 }
        r7.jjq = r2;	 Catch:{ Exception -> 0x0219 }
    L_0x0029:
        r2 = "top";
        r2 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r2);	 Catch:{ Exception -> 0x0216 }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x0216 }
        r7.jjr = r2;	 Catch:{ Exception -> 0x0216 }
        r2 = "left";
        r2 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r2);	 Catch:{ Exception -> 0x0216 }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x0216 }
        r7.jjs = r2;	 Catch:{ Exception -> 0x0216 }
    L_0x0043:
        if (r3 != 0) goto L_0x0083;
    L_0x0045:
        r2 = r6.aDx();
        if (r2 != 0) goto L_0x0130;
    L_0x004b:
        r1 = "MicroMsg.AppBrandJsApiInputBase";
        r2 = "null style obj";
        com.tencent.mm.sdk.platformtools.ab.e(r1, r2);
        r1 = "fail:invalid data";
        r1 = r6.j(r1, r4);
        r9.M(r10, r1);
    L_0x005e:
        return r0;
    L_0x005f:
        r2 = move-exception;
        r3 = r4;
    L_0x0061:
        r5 = r6.aDx();
        if (r5 != 0) goto L_0x0043;
    L_0x0067:
        r3 = "MicroMsg.AppBrandJsApiInputBase";
        r5 = "get position info from style, exp = %s";
        r1 = new java.lang.Object[r1];
        r2 = com.tencent.mm.sdk.platformtools.bo.l(r2);
        r1[r0] = r2;
        com.tencent.mm.sdk.platformtools.ab.e(r3, r5, r1);
        r1 = "fail:invalid data";
        r1 = r6.j(r1, r4);
        r9.M(r10, r1);
        goto L_0x005e;
    L_0x0083:
        r0 = "fontWeight";
        r0 = r3.optString(r0, r4);
        r7.hdi = r0;
        r0 = "minHeight";
        r0 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r0);	 Catch:{ Exception -> 0x0213 }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x0213 }
        r7.jjt = r0;	 Catch:{ Exception -> 0x0213 }
    L_0x0099:
        r0 = "maxHeight";
        r0 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r0);	 Catch:{ Exception -> 0x0210 }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x0210 }
        r7.jju = r0;	 Catch:{ Exception -> 0x0210 }
    L_0x00a6:
        r0 = "textAlign";
        r0 = r3.optString(r0, r4);
        r7.hdq = r0;
        r0 = "color";
        r0 = r3.getString(r0);	 Catch:{ Exception -> 0x020d }
        r2 = -16777216; // 0xffffffffff000000 float:-1.7014118E38 double:NaN;
        r0 = com.tencent.mm.plugin.appbrand.r.g.by(r0, r2);	 Catch:{ Exception -> 0x020d }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x020d }
        r7.jjw = r0;	 Catch:{ Exception -> 0x020d }
    L_0x00c2:
        r0 = "backgroundColor";
        r0 = r3.getString(r0);	 Catch:{ Exception -> 0x020a }
        r2 = 0;
        r0 = com.tencent.mm.plugin.appbrand.r.g.by(r0, r2);	 Catch:{ Exception -> 0x020a }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x020a }
        r7.jjv = r0;	 Catch:{ Exception -> 0x020a }
    L_0x00d4:
        r0 = "fontSize";
        r0 = com.tencent.mm.plugin.appbrand.r.g.i(r3, r0);	 Catch:{ Exception -> 0x0207 }
        r0 = java.lang.Float.valueOf(r0);	 Catch:{ Exception -> 0x0207 }
        r7.jjx = r0;	 Catch:{ Exception -> 0x0207 }
    L_0x00e1:
        r0 = "marginBottom";
        r0 = com.tencent.mm.plugin.appbrand.r.g.g(r3, r0);	 Catch:{ Exception -> 0x01ea }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x01ea }
        r7.jjJ = r0;	 Catch:{ Exception -> 0x01ea }
    L_0x00ee:
        r0 = "lineSpace";
        r0 = r3.opt(r0);
        r0 = com.tencent.mm.plugin.appbrand.widget.input.d.d.bv(r0);
        r7.jjN = r0;
        r0 = r7.jjN;
        if (r0 == 0) goto L_0x010f;
    L_0x00ff:
        r0 = r7.jjN;
        r0 = r0.intValue();
        r0 = com.tencent.mm.plugin.appbrand.r.g.qb(r0);
        r0 = java.lang.Integer.valueOf(r0);
        r7.jjN = r0;
    L_0x010f:
        r0 = "lineHeight";
        r0 = r3.opt(r0);
        r0 = com.tencent.mm.plugin.appbrand.widget.input.d.d.bv(r0);
        r7.jjO = r0;
        r0 = r7.jjO;
        if (r0 == 0) goto L_0x0130;
    L_0x0120:
        r0 = r7.jjO;
        r0 = r0.intValue();
        r0 = com.tencent.mm.plugin.appbrand.r.g.qb(r0);
        r0 = java.lang.Integer.valueOf(r0);
        r7.jjO = r0;
    L_0x0130:
        r0 = "autoSize";
        r0 = r8.getBoolean(r0);	 Catch:{ Exception -> 0x0204 }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ Exception -> 0x0204 }
        r7.jjH = r0;	 Catch:{ Exception -> 0x0204 }
    L_0x013d:
        r0 = "defaultValue";
        r2 = "value";
        r2 = r8.optString(r2, r4);
        r0 = r8.optString(r0, r2);
        r7.jjo = r0;
        r0 = "maxLength";
        r0 = r8.getInt(r0);	 Catch:{ Exception -> 0x0201 }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x0201 }
        r7.jjy = r0;	 Catch:{ Exception -> 0x0201 }
    L_0x015a:
        r0 = "placeholder";
        r0 = r8.optString(r0);
        r7.jjz = r0;
        r0 = new org.json.JSONObject;	 Catch:{ Exception -> 0x01ff }
        r2 = "placeholderStyle";
        r2 = r8.getString(r2);	 Catch:{ Exception -> 0x01ff }
        r0.<init>(r2);	 Catch:{ Exception -> 0x01ff }
        r2 = "color";
        r2 = r0.getString(r2);	 Catch:{ Exception -> 0x01ff }
        r2 = com.tencent.mm.plugin.appbrand.r.g.Ef(r2);	 Catch:{ Exception -> 0x01ff }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x01ff }
        r7.jjC = r2;	 Catch:{ Exception -> 0x01ff }
        r2 = "fontSize";
        r2 = com.tencent.mm.plugin.appbrand.r.g.g(r0, r2);	 Catch:{ Exception -> 0x01ff }
        r2 = java.lang.Integer.valueOf(r2);	 Catch:{ Exception -> 0x01ff }
        r7.jjB = r2;	 Catch:{ Exception -> 0x01ff }
        r2 = "fontWeight";
        r3 = "normal";
        r0 = r0.optString(r2, r3);	 Catch:{ Exception -> 0x01ff }
        r7.jjA = r0;	 Catch:{ Exception -> 0x01ff }
    L_0x0199:
        r0 = "hidden";
        r0 = r8.getBoolean(r0);	 Catch:{ JSONException -> 0x01ef }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ JSONException -> 0x01ef }
        r7.jjE = r0;	 Catch:{ JSONException -> 0x01ef }
    L_0x01a6:
        r0 = "disabled";
        r0 = r8.getBoolean(r0);	 Catch:{ Exception -> 0x01f3 }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ Exception -> 0x01f3 }
        r7.jjD = r0;	 Catch:{ Exception -> 0x01f3 }
    L_0x01b3:
        r0 = "fixed";
        r0 = r8.getBoolean(r0);	 Catch:{ Exception -> 0x01f7 }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ Exception -> 0x01f7 }
        r7.jjI = r0;	 Catch:{ Exception -> 0x01f7 }
    L_0x01c0:
        r0 = "confirmType";
        r0 = r8.optString(r0);
        r0 = com.tencent.mm.plugin.appbrand.widget.input.d.b.EI(r0);
        r7.jjK = r0;
        r0 = "confirmHold";
        r0 = r8.getBoolean(r0);	 Catch:{ Exception -> 0x01fb }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ Exception -> 0x01fb }
        r7.jjL = r0;	 Catch:{ Exception -> 0x01fb }
    L_0x01da:
        r0 = "adjustPosition";
        r0 = r8.opt(r0);
        r0 = com.tencent.mm.plugin.appbrand.s.k.bG(r0);
        r7.jjM = r0;
        r0 = r1;
        goto L_0x005e;
    L_0x01ea:
        r0 = move-exception;
        r7.jjJ = r4;
        goto L_0x00ee;
    L_0x01ef:
        r0 = move-exception;
        r7.jjE = r4;
        goto L_0x01a6;
    L_0x01f3:
        r0 = move-exception;
        r7.jjD = r4;
        goto L_0x01b3;
    L_0x01f7:
        r0 = move-exception;
        r7.jjI = r4;
        goto L_0x01c0;
    L_0x01fb:
        r0 = move-exception;
        r7.jjL = r4;
        goto L_0x01da;
    L_0x01ff:
        r0 = move-exception;
        goto L_0x0199;
    L_0x0201:
        r0 = move-exception;
        goto L_0x015a;
    L_0x0204:
        r0 = move-exception;
        goto L_0x013d;
    L_0x0207:
        r0 = move-exception;
        goto L_0x00e1;
    L_0x020a:
        r0 = move-exception;
        goto L_0x00d4;
    L_0x020d:
        r0 = move-exception;
        goto L_0x00c2;
    L_0x0210:
        r0 = move-exception;
        goto L_0x00a6;
    L_0x0213:
        r0 = move-exception;
        goto L_0x0099;
    L_0x0216:
        r2 = move-exception;
        goto L_0x0061;
    L_0x0219:
        r2 = move-exception;
        goto L_0x0029;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.d.a.a(com.tencent.mm.plugin.appbrand.widget.input.d.f, org.json.JSONObject, com.tencent.mm.plugin.appbrand.page.u, int):boolean");
    }

    /* Access modifiers changed, original: protected */
    public boolean aDx() {
        return false;
    }

    protected static String ol(int i) {
        return v.Zp().y("AppBrandJsInput@".concat(String.valueOf(i)), true).getString("passing_data", BuildConfig.FLAVOR);
    }

    protected static void S(int i, String str) {
        v.Zp().y("AppBrandJsInput@".concat(String.valueOf(i)), true).ae("passing_data", str);
    }

    protected static void a(int i, u uVar) {
        if (uVar != null) {
            v.Zp().y("AppBrandJsInput@".concat(String.valueOf(i)), true).j("webview_reference", new WeakReference(uVar));
        }
    }
}
