package p037.p065.p066;

import android.annotation.SuppressLint;
import android.util.Log;
import android.util.Property;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import p037.p065.p066.C1796;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: މ.ރ.ށ.ލ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C1825 extends C1829 {

    /* JADX INFO: renamed from: ޠ, reason: contains not printable characters */
    public WeakReference<Object> f6101;

    /* JADX INFO: renamed from: ޡ, reason: contains not printable characters */
    public String f6102;

    /* JADX INFO: renamed from: ޢ, reason: contains not printable characters */
    public Property f6103;

    /* JADX INFO: renamed from: ޣ, reason: contains not printable characters */
    public boolean f6104 = false;

    public C1825() {
    }

    public <T> C1825(T t, Property<T, ?> property) {
        if (m3606() != t) {
            if (this.f6132) {
                cancel();
            }
            this.f6101 = t == null ? null : new WeakReference<>(t);
            this.f6134 = false;
        }
        C1826[] c1826Arr = this.f6143;
        if (c1826Arr != null) {
            C1826 c1826 = c1826Arr[0];
            String str = c1826.f6110;
            c1826.mo3612((Property) property);
            this.f6144.remove(str);
            this.f6144.put(this.f6102, c1826);
        }
        if (this.f6103 != null) {
            this.f6102 = property.getName();
        }
        this.f6103 = property;
        this.f6134 = false;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> C1825 m3601(T t, Property<T, Float> property, float... fArr) {
        C1825 c1825 = new C1825(t, property);
        c1825.mo3602(fArr);
        return c1825;
    }

    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    @SuppressLint({"NoClone"})
    public C1825 clone() {
        return (C1825) super.clone();
    }

    @Override // p037.p065.p066.C1829
    public String toString() {
        StringBuilder sbM4889 = C2803.m4889("ObjectAnimator@");
        sbM4889.append(Integer.toHexString(hashCode()));
        sbM4889.append(", target ");
        sbM4889.append(m3606());
        String string = sbM4889.toString();
        if (this.f6143 != null) {
            for (int i = 0; i < this.f6143.length; i++) {
                StringBuilder sbM4897 = C2803.m4897(string, "\n    ");
                sbM4897.append(this.f6143[i].toString());
                string = sbM4897.toString();
            }
        }
        return string;
    }

    @Override // p037.p065.p066.C1829
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo3602(float... fArr) {
        C1826[] c1826Arr = this.f6143;
        if (c1826Arr != null && c1826Arr.length != 0) {
            super.mo3602(fArr);
            return;
        }
        Property property = this.f6103;
        if (property != null) {
            m3620(C1826.m3608((Property<?, Float>) property, fArr));
        } else {
            m3620(C1826.m3609(this.f6102, fArr));
        }
    }

    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    /* JADX INFO: renamed from: ހ */
    public AbstractC1802 mo3562(long j) {
        super.mo3562(j);
        return this;
    }

    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    /* JADX INFO: renamed from: ހ */
    public C1825 mo3562(long j) {
        super.mo3562(j);
        return this;
    }

    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    /* JADX INFO: renamed from: ހ */
    public C1829 mo3562(long j) {
        super.mo3562(j);
        return this;
    }

    @Override // p037.p065.p066.C1829
    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public void mo3603(float f) {
        Object objM3606 = m3606();
        if (this.f6101 != null && objM3606 == null) {
            cancel();
            return;
        }
        super.mo3603(f);
        int length = this.f6143.length;
        for (int i = 0; i < length; i++) {
            this.f6143[i].mo3613(objM3606);
        }
    }

    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    /* JADX INFO: renamed from: ކ */
    public boolean mo3565() {
        return this.f6134;
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x0059  */
    @Override // p037.p065.p066.C1829, p037.p065.p066.AbstractC1802
    /* JADX INFO: renamed from: ފ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void mo3569() {
        boolean z;
        C1796 c1796M3541 = C1796.m3541();
        int size = c1796M3541.m3542().size() - 1;
        while (true) {
            boolean z2 = false;
            if (size < 0) {
                m3622(false);
                return;
            }
            C1796.InterfaceC1798 interfaceC1798 = c1796M3541.m3542().get(size);
            if (interfaceC1798 != null) {
                if (interfaceC1798 instanceof C1825) {
                    C1825 c1825 = (C1825) interfaceC1798;
                    if (c1825.f6104) {
                        C1826[] c1826Arr = c1825.f6143;
                        if (c1825.m3606() == m3606() && this.f6143.length == c1826Arr.length) {
                            int i = 0;
                            while (true) {
                                C1826[] c1826Arr2 = this.f6143;
                                if (i >= c1826Arr2.length) {
                                    z = true;
                                    break;
                                }
                                C1826 c1826 = c1826Arr2[i];
                                C1826 c18262 = c1826Arr[i];
                                String str = c1826.f6110;
                                if (str == null || !str.equals(c18262.f6110)) {
                                    break;
                                } else {
                                    i++;
                                }
                            }
                            z = false;
                            if (z) {
                            }
                        } else {
                            z = false;
                            if (z) {
                                z2 = true;
                            }
                        }
                    }
                }
                if (z2) {
                    ((AbstractC1802) c1796M3541.m3542().get(size)).cancel();
                }
            }
            size--;
        }
    }

    @Override // p037.p065.p066.C1829
    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public String mo3604() {
        String str = this.f6146;
        if (str != null) {
            return str;
        }
        StringBuilder sbM4889 = C2803.m4889("animator:");
        String name = this.f6102;
        String string = null;
        if (name == null) {
            Property property = this.f6103;
            if (property != null) {
                name = property.getName();
            } else {
                C1826[] c1826Arr = this.f6143;
                if (c1826Arr != null && c1826Arr.length > 0) {
                    int i = 0;
                    while (i < this.f6143.length) {
                        StringBuilder sbM48892 = C2803.m4889(i == 0 ? "" : C2803.m4879(string, ","));
                        sbM48892.append(this.f6143[i].f6110);
                        string = sbM48892.toString();
                        i++;
                    }
                }
                name = string;
            }
        }
        sbM4889.append(name);
        return sbM4889.toString();
    }

    /* JADX WARN: Removed duplicated region for block: B:27:0x0076  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x00dc A[SYNTHETIC] */
    @Override // p037.p065.p066.C1829
    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void mo3605() {
        if (this.f6134) {
            return;
        }
        Object objM3606 = m3606();
        if (objM3606 != null) {
            int length = this.f6143.length;
            for (int i = 0; i < length; i++) {
                C1826 c1826 = this.f6143[i];
                if (c1826.f6111 != null) {
                    try {
                        List listMo3600 = c1826.f6115.mo3600();
                        int size = listMo3600 == null ? 0 : listMo3600.size();
                        Object obj = null;
                        for (int i2 = 0; i2 < size; i2++) {
                            AbstractC1819 abstractC1819 = (AbstractC1819) listMo3600.get(i2);
                            if (!abstractC1819.f6092 || abstractC1819.f6093) {
                                if (obj == null) {
                                    obj = c1826.f6111.get(objM3606);
                                }
                                abstractC1819.mo3598(obj);
                                abstractC1819.f6093 = true;
                            }
                        }
                    } catch (ClassCastException unused) {
                        StringBuilder sbM4889 = C2803.m4889("No such property (");
                        sbM4889.append(c1826.f6111.getName());
                        sbM4889.append(") on target object ");
                        sbM4889.append(objM3606);
                        sbM4889.append(". Trying reflection instead");
                        Log.w("PropertyValuesHolder", sbM4889.toString());
                        c1826.f6111 = null;
                        if (c1826.f6111 != null) {
                        }
                    }
                } else if (c1826.f6111 != null) {
                    Class<?> cls = objM3606.getClass();
                    if (c1826.f6112 == null) {
                        c1826.f6112 = c1826.m3611(cls, C1826.f6108, "set", c1826.f6114);
                    }
                    List listMo36002 = c1826.f6115.mo3600();
                    int size2 = listMo36002 == null ? 0 : listMo36002.size();
                    for (int i3 = 0; i3 < size2; i3++) {
                        AbstractC1819 abstractC18192 = (AbstractC1819) listMo36002.get(i3);
                        if (!abstractC18192.f6092 || abstractC18192.f6093) {
                            if (c1826.f6113 == null) {
                                Method methodM3611 = c1826.m3611(cls, C1826.f6109, "get", null);
                                c1826.f6113 = methodM3611;
                                if (methodM3611 == null) {
                                    break;
                                }
                            }
                            try {
                                abstractC18192.mo3598(c1826.f6113.invoke(objM3606, new Object[0]));
                                abstractC18192.f6093 = true;
                            } catch (IllegalAccessException e) {
                                Log.e("PropertyValuesHolder", e.toString());
                            } catch (InvocationTargetException e2) {
                                Log.e("PropertyValuesHolder", e2.toString());
                            }
                        }
                    }
                }
            }
        }
        super.mo3605();
    }

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public Object m3606() {
        WeakReference<Object> weakReference = this.f6101;
        if (weakReference == null) {
            return null;
        }
        return weakReference.get();
    }
}
