package ඓ.㴹.K;

import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import ඓ.K.K.K.C1293;
import ඓ.㴹.ῲ.AbstractC1317;
import ඓ.㴹.ῲ.AbstractC1319;
import ඓ.㴹.K.AbstractC1362;

/* renamed from: ඓ.㴹.K.㑃  reason: contains not printable characters */
/* compiled from: PropertyValuesHolder */
public class C1356 implements Cloneable {

    /* renamed from: Ԕ  reason: contains not printable characters */
    public static Class[] f5191;

    /* renamed from: ؿ  reason: contains not printable characters */
    public static Class[] f5192;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public static final HashMap<Class, HashMap<String, Method>> f5193 = new HashMap<>();

    /* renamed from: 㑃  reason: contains not printable characters */
    public static final AbstractC1364 f5194 = new C1353();

    /* renamed from: 㗗  reason: contains not printable characters */
    public static Class[] f5195;

    /* renamed from: 㗽  reason: contains not printable characters */
    public static final HashMap<Class, HashMap<String, Method>> f5196 = new HashMap<>();

    /* renamed from: 䁗  reason: contains not printable characters */
    public static final AbstractC1364 f5197 = new C1335();

    /* renamed from: ʬ  reason: contains not printable characters */
    public AbstractC1317 f5198;

    /* renamed from: ඓ  reason: contains not printable characters */
    public Method f5199;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public Object f5200;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final Object[] f5201;

    /* renamed from: ῲ  reason: contains not printable characters */
    public String f5202;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public C1351 f5203;

    /* renamed from: 㳳  reason: contains not printable characters */
    public AbstractC1364 f5204;

    /* renamed from: 㴹  reason: contains not printable characters */
    public Class f5205;

    /* renamed from: 㸾  reason: contains not printable characters */
    public Method f5206;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final ReentrantReadWriteLock f5207;

    static {
        Class cls = Integer.TYPE;
        f5191 = new Class[]{Float.TYPE, Float.class, Double.TYPE, cls, Double.class, Integer.class};
        Class cls2 = Double.TYPE;
        f5195 = new Class[]{cls, Integer.class, Float.TYPE, cls2, Float.class, Double.class};
        f5192 = new Class[]{cls2, Double.class, Float.TYPE, Integer.TYPE, Float.class, Integer.class};
    }

    public /* synthetic */ C1356(String str, C1358 k) {
        this.f5206 = null;
        this.f5199 = null;
        this.f5203 = null;
        this.f5207 = new ReentrantReadWriteLock();
        this.f5201 = new Object[1];
        this.f5202 = str;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1356 m3522(String str, float... fArr) {
        return new C1357(str, fArr);
    }

    public String toString() {
        return this.f5202 + ": " + this.f5203.toString();
    }

    /* renamed from: ඓ.㴹.K.㑃$ῲ  reason: contains not printable characters */
    /* compiled from: PropertyValuesHolder */
    public static class C1357 extends C1356 {

        /* renamed from: Ԛ  reason: contains not printable characters */
        public float f5208;

        /* renamed from: ݜ  reason: contains not printable characters */
        public AbstractC1319 f5209;

        /* renamed from: 䀟  reason: contains not printable characters */
        public C1360 f5210 = ((C1360) this.f5203);

        public C1357(String str, float... fArr) {
            super(str, (C1358) null);
            C1356.super.m3530(fArr);
        }

        @Override // java.lang.Object, ඓ.㴹.K.C1356, ඓ.㴹.K.C1356
        /* renamed from: clone  reason: collision with other method in class */
        public C1356 m3536clone() {
            C1357 r0 = (C1357) C1356.super.clone();
            r0.f5210 = (C1360) r0.f5203;
            return r0;
        }

        @Override // ඓ.㴹.K.C1356
        /* renamed from: K  reason: contains not printable characters */
        public void m3535(float... fArr) {
            C1356.super.m3530(fArr);
            this.f5210 = (C1360) this.f5203;
        }

        @Override // java.lang.Object, ඓ.㴹.K.C1356, ඓ.㴹.K.C1356
        public Object clone() throws CloneNotSupportedException {
            C1357 r0 = (C1357) C1356.super.clone();
            r0.f5210 = (C1360) r0.f5203;
            return r0;
        }

        @Override // ඓ.㴹.K.C1356
        /* renamed from: K  reason: contains not printable characters */
        public void m3532(float f) {
            this.f5208 = this.f5210.m3545(f);
        }

        public C1357(AbstractC1317 r2, float... fArr) {
            super(r2, (C1358) null);
            C1356.super.m3530(fArr);
            if (r2 instanceof AbstractC1319) {
                this.f5209 = (AbstractC1319) this.f5198;
            }
        }

        @Override // ඓ.㴹.K.C1356
        /* renamed from: K  reason: contains not printable characters */
        public Object m3531() {
            return Float.valueOf(this.f5208);
        }

        @Override // ඓ.㴹.K.C1356
        /* renamed from: K  reason: contains not printable characters */
        public void m3534(Object obj) {
            AbstractC1319 k = this.f5209;
            if (k != null) {
                k.m3452(obj, this.f5208);
                return;
            }
            AbstractC1317 r1 = this.f5198;
            if (r1 != null) {
                r1.m3449(obj, Float.valueOf(this.f5208));
            } else if (this.f5206 != null) {
                try {
                    this.f5201[0] = Float.valueOf(this.f5208);
                    this.f5206.invoke(obj, this.f5201);
                } catch (InvocationTargetException e) {
                    Log.e("PropertyValuesHolder", e.toString());
                } catch (IllegalAccessException e2) {
                    Log.e("PropertyValuesHolder", e2.toString());
                }
            }
        }

        @Override // ඓ.㴹.K.C1356
        /* renamed from: K  reason: contains not printable characters */
        public void m3533(Class cls) {
            if (this.f5198 == null) {
                C1356.super.m3528(cls);
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1356 m3523(AbstractC1317<?, Float> r1, float... fArr) {
        return new C1357(r1, fArr);
    }

    @Override // java.lang.Object
    public C1356 clone() {
        try {
            C1356 r0 = (C1356) super.clone();
            r0.f5202 = this.f5202;
            r0.f5198 = this.f5198;
            r0.f5203 = this.f5203.clone();
            r0.f5204 = this.f5204;
            return r0;
        } catch (CloneNotSupportedException unused) {
            return null;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3530(float... fArr) {
        this.f5205 = Float.TYPE;
        int length = fArr.length;
        AbstractC1362.C1363[] kArr = new AbstractC1362.C1363[Math.max(length, 2)];
        if (length == 1) {
            kArr[0] = (AbstractC1362.C1363) AbstractC1362.m3547(0.0f);
            kArr[1] = new AbstractC1362.C1363(1.0f, fArr[0]);
        } else {
            kArr[0] = (AbstractC1362.C1363) AbstractC1362.m3548(0.0f, fArr[0]);
            for (int i = 1; i < length; i++) {
                kArr[i] = new AbstractC1362.C1363(((float) i) / ((float) (length - 1)), fArr[i]);
            }
        }
        this.f5203 = new C1360(kArr);
    }

    public /* synthetic */ C1356(AbstractC1317 r1, C1358 k) {
        this.f5206 = null;
        this.f5199 = null;
        this.f5203 = null;
        this.f5207 = new ReentrantReadWriteLock();
        this.f5201 = new Object[1];
        this.f5198 = r1;
        if (r1 != null) {
            this.f5202 = r1.f5117;
        }
    }

    /* JADX WARNING: Can't wrap try/catch for region: R(7:26|27|28|30|31|38|32) */
    /* JADX WARNING: Code restructure failed: missing block: B:29:0x0098, code lost:
        return r3;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:33:0x00a3, code lost:
        r6 = r6 + 1;
     */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Missing exception handler attribute for start block: B:30:0x0099 */
    /* renamed from: K  reason: contains not printable characters */
    public final Method m3525(Class cls, String str, Class cls2) {
        Class<?>[] clsArr;
        String str2 = this.f5202;
        if (!(str2 == null || str2.length() == 0)) {
            str = str + Character.toUpperCase(str2.charAt(0)) + str2.substring(1);
        }
        Method method = null;
        if (cls2 == null) {
            try {
                return cls.getMethod(str, null);
            } catch (NoSuchMethodException e) {
                try {
                    method = cls.getDeclaredMethod(str, null);
                    method.setAccessible(true);
                } catch (NoSuchMethodException unused) {
                    StringBuilder r9 = C1293.m3416("Couldn't find no-arg method for property ");
                    r9.append(this.f5202);
                    r9.append(": ");
                    r9.append(e);
                    Log.e("PropertyValuesHolder", r9.toString());
                }
            }
        } else {
            Class<?>[] clsArr2 = new Class[1];
            if (this.f5205.equals(Float.class)) {
                clsArr = f5191;
            } else if (this.f5205.equals(Integer.class)) {
                clsArr = f5195;
            } else {
                clsArr = this.f5205.equals(Double.class) ? f5192 : new Class[]{this.f5205};
            }
            int length = clsArr.length;
            int i = 0;
            while (i < length) {
                Class<?> cls3 = clsArr[i];
                clsArr2[0] = cls3;
                method = cls.getMethod(str, clsArr2);
                this.f5205 = cls3;
                method = cls.getDeclaredMethod(str, clsArr2);
                method.setAccessible(true);
                this.f5205 = cls3;
                return method;
            }
            StringBuilder r92 = C1293.m3416("Couldn't find setter/getter for property ");
            r92.append(this.f5202);
            r92.append(" with value type ");
            r92.append(this.f5205);
            Log.e("PropertyValuesHolder", r92.toString());
            return method;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final Method m3526(Class cls, HashMap<Class, HashMap<String, Method>> hashMap, String str, Class cls2) {
        try {
            this.f5207.writeLock().lock();
            HashMap<String, Method> hashMap2 = hashMap.get(cls);
            Method method = hashMap2 != null ? hashMap2.get(this.f5202) : null;
            if (method == null) {
                method = m3525(cls, str, cls2);
                if (hashMap2 == null) {
                    hashMap2 = new HashMap<>();
                    hashMap.put(cls, hashMap2);
                }
                hashMap2.put(this.f5202, method);
            }
            return method;
        } finally {
            this.f5207.writeLock().unlock();
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3528(Class cls) {
        this.f5206 = m3526(cls, f5193, "set", this.f5205);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3529(Object obj) {
        AbstractC1317 r1 = this.f5198;
        if (r1 != null) {
            r1.m3449(obj, m3524());
        }
        if (this.f5206 != null) {
            try {
                this.f5201[0] = m3524();
                this.f5206.invoke(obj, this.f5201);
            } catch (InvocationTargetException e) {
                Log.e("PropertyValuesHolder", e.toString());
            } catch (IllegalAccessException e2) {
                Log.e("PropertyValuesHolder", e2.toString());
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3527(float f) {
        this.f5200 = this.f5203.m3510(f);
    }

    /* renamed from: K  reason: contains not printable characters */
    public Object m3524() {
        return this.f5200;
    }
}
