package ῲ.ⁱ.K.ῲ;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseIntArray;
import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.constraintlayout.widget.ConstraintAttribute;
import androidx.constraintlayout.widget.R$styleable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import ඓ.K.K.K.C1293;
import ῲ.ⁱ.K.ῲ.AbstractC2169;

/* renamed from: ῲ.ⁱ.K.ῲ.ᕣ  reason: contains not printable characters */
/* compiled from: KeyTimeCycle */
public class C2135 extends AbstractC2109 {

    /* renamed from: Ԕ  reason: contains not printable characters */
    public float f7449 = Float.NaN;

    /* renamed from: Ԛ  reason: contains not printable characters */
    public float f7450 = 0.0f;

    /* renamed from: ؿ  reason: contains not printable characters */
    public float f7451 = Float.NaN;

    /* renamed from: ݜ  reason: contains not printable characters */
    public int f7452 = 0;

    /* renamed from: ඓ  reason: contains not printable characters */
    public String f7453;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public float f7454 = Float.NaN;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public float f7455 = Float.NaN;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public float f7456 = Float.NaN;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public float f7457 = Float.NaN;

    /* renamed from: 㑃  reason: contains not printable characters */
    public float f7458 = Float.NaN;

    /* renamed from: 㗗  reason: contains not printable characters */
    public float f7459 = Float.NaN;

    /* renamed from: 㗽  reason: contains not printable characters */
    public float f7460 = Float.NaN;

    /* renamed from: 㳳  reason: contains not printable characters */
    public float f7461 = Float.NaN;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f7462 = -1;

    /* renamed from: 㿎  reason: contains not printable characters */
    public float f7463 = Float.NaN;

    /* renamed from: 䀟  reason: contains not printable characters */
    public float f7464 = Float.NaN;

    /* renamed from: 䁗  reason: contains not printable characters */
    public float f7465 = Float.NaN;

    /* renamed from: ῲ.ⁱ.K.ῲ.ᕣ$K  reason: contains not printable characters */
    /* compiled from: KeyTimeCycle */
    public static class C2136 {

        /* renamed from: K  reason: contains not printable characters */
        public static SparseIntArray f7466 = new SparseIntArray();

        static {
            f7466.append(R$styleable.KeyTimeCycle_android_alpha, 1);
            f7466.append(R$styleable.KeyTimeCycle_android_elevation, 2);
            f7466.append(R$styleable.KeyTimeCycle_android_rotation, 4);
            f7466.append(R$styleable.KeyTimeCycle_android_rotationX, 5);
            f7466.append(R$styleable.KeyTimeCycle_android_rotationY, 6);
            f7466.append(R$styleable.KeyTimeCycle_android_scaleX, 7);
            f7466.append(R$styleable.KeyTimeCycle_transitionPathRotate, 8);
            f7466.append(R$styleable.KeyTimeCycle_transitionEasing, 9);
            f7466.append(R$styleable.KeyTimeCycle_motionTarget, 10);
            f7466.append(R$styleable.KeyTimeCycle_framePosition, 12);
            f7466.append(R$styleable.KeyTimeCycle_curveFit, 13);
            f7466.append(R$styleable.KeyTimeCycle_android_scaleY, 14);
            f7466.append(R$styleable.KeyTimeCycle_android_translationX, 15);
            f7466.append(R$styleable.KeyTimeCycle_android_translationY, 16);
            f7466.append(R$styleable.KeyTimeCycle_android_translationZ, 17);
            f7466.append(R$styleable.KeyTimeCycle_motionProgress, 18);
            f7466.append(R$styleable.KeyTimeCycle_wavePeriod, 20);
            f7466.append(R$styleable.KeyTimeCycle_waveOffset, 21);
            f7466.append(R$styleable.KeyTimeCycle_waveShape, 19);
        }

        /* renamed from: K  reason: contains not printable characters */
        public static void m5654(C2135 r5, TypedArray typedArray) {
            int indexCount = typedArray.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                int index = typedArray.getIndex(i);
                switch (f7466.get(index)) {
                    case 1:
                        r5.f7457 = typedArray.getFloat(index, r5.f7457);
                        break;
                    case 2:
                        r5.f7463 = typedArray.getDimension(index, r5.f7463);
                        break;
                    case 3:
                    case 11:
                    default:
                        StringBuilder r3 = C1293.m3416("unused attribute 0x");
                        r3.append(Integer.toHexString(index));
                        r3.append("   ");
                        r3.append(f7466.get(index));
                        Log.e("KeyTimeCycle", r3.toString());
                        break;
                    case 4:
                        r5.f7456 = typedArray.getFloat(index, r5.f7456);
                        break;
                    case 5:
                        r5.f7461 = typedArray.getFloat(index, r5.f7461);
                        break;
                    case 6:
                        r5.f7455 = typedArray.getFloat(index, r5.f7455);
                        break;
                    case 7:
                        r5.f7465 = typedArray.getFloat(index, r5.f7465);
                        break;
                    case 8:
                        r5.f7458 = typedArray.getFloat(index, r5.f7458);
                        break;
                    case 9:
                        r5.f7453 = typedArray.getString(index);
                        break;
                    case 10:
                        if (!MotionLayout.f691) {
                            if (typedArray.peekValue(index).type == 3) {
                                r5.f7329 = typedArray.getString(index);
                                break;
                            } else {
                                r5.f7330 = typedArray.getResourceId(index, r5.f7330);
                                break;
                            }
                        } else {
                            r5.f7330 = typedArray.getResourceId(index, r5.f7330);
                            if (r5.f7330 == -1) {
                                r5.f7329 = typedArray.getString(index);
                                break;
                            } else {
                                break;
                            }
                        }
                    case 12:
                        r5.f7331 = typedArray.getInt(index, r5.f7331);
                        break;
                    case 13:
                        r5.f7462 = typedArray.getInteger(index, r5.f7462);
                        break;
                    case 14:
                        r5.f7449 = typedArray.getFloat(index, r5.f7449);
                        break;
                    case 15:
                        r5.f7459 = typedArray.getDimension(index, r5.f7459);
                        break;
                    case 16:
                        r5.f7451 = typedArray.getDimension(index, r5.f7451);
                        break;
                    case 17:
                        int i2 = Build.VERSION.SDK_INT;
                        r5.f7454 = typedArray.getDimension(index, r5.f7454);
                        break;
                    case 18:
                        r5.f7460 = typedArray.getFloat(index, r5.f7460);
                        break;
                    case 19:
                        r5.f7452 = typedArray.getInt(index, r5.f7452);
                        break;
                    case 20:
                        r5.f7464 = typedArray.getFloat(index, r5.f7464);
                        break;
                    case 21:
                        if (typedArray.peekValue(index).type == 5) {
                            r5.f7450 = typedArray.getDimension(index, r5.f7450);
                            break;
                        } else {
                            r5.f7450 = typedArray.getFloat(index, r5.f7450);
                            break;
                        }
                }
            }
        }
    }

    public C2135() {
        this.f7332 = new HashMap<>();
    }

    /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARNING: Code restructure failed: missing block: B:17:0x007e, code lost:
        if (r1.equals("elevation") != false) goto L_0x00e0;
     */
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m5649(HashMap<String, AbstractC2169> hashMap) {
        Iterator<String> it2 = hashMap.keySet().iterator();
        while (it2.hasNext()) {
            String next = it2.next();
            AbstractC2169 r3 = hashMap.get(next);
            char c = 1;
            if (next.startsWith("CUSTOM")) {
                ConstraintAttribute constraintAttribute = this.f7332.get(next.substring(7));
                if (constraintAttribute != null) {
                    AbstractC2169.C2174 r32 = (AbstractC2169.C2174) r3;
                    int i = this.f7331;
                    float f = this.f7464;
                    int i2 = this.f7452;
                    float f2 = this.f7450;
                    r32.f7575.append(i, constraintAttribute);
                    r32.f7571.append(i, new float[]{f, f2});
                    r32.f7563 = Math.max(r32.f7563, i2);
                }
            } else {
                switch (next.hashCode()) {
                    case -1249320806:
                        if (next.equals("rotationX")) {
                            c = 3;
                            break;
                        }
                        c = 65535;
                        break;
                    case -1249320805:
                        if (next.equals("rotationY")) {
                            c = 4;
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497657:
                        if (next.equals("translationX")) {
                            c = '\b';
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497656:
                        if (next.equals("translationY")) {
                            c = '\t';
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497655:
                        if (next.equals("translationZ")) {
                            c = '\n';
                            break;
                        }
                        c = 65535;
                        break;
                    case -1001078227:
                        if (next.equals("progress")) {
                            c = 11;
                            break;
                        }
                        c = 65535;
                        break;
                    case -908189618:
                        if (next.equals("scaleX")) {
                            c = 6;
                            break;
                        }
                        c = 65535;
                        break;
                    case -908189617:
                        if (next.equals("scaleY")) {
                            c = 7;
                            break;
                        }
                        c = 65535;
                        break;
                    case -40300674:
                        if (next.equals("rotation")) {
                            c = 2;
                            break;
                        }
                        c = 65535;
                        break;
                    case -4379043:
                        break;
                    case 37232917:
                        if (next.equals("transitionPathRotate")) {
                            c = 5;
                            break;
                        }
                        c = 65535;
                        break;
                    case 92909918:
                        if (next.equals("alpha")) {
                            c = 0;
                            break;
                        }
                        c = 65535;
                        break;
                    default:
                        c = 65535;
                        break;
                }
                switch (c) {
                    case 0:
                        if (!Float.isNaN(this.f7457)) {
                            r3.m5700(this.f7331, this.f7457, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 1:
                        if (!Float.isNaN(this.f7463)) {
                            r3.m5700(this.f7331, this.f7463, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 2:
                        if (!Float.isNaN(this.f7456)) {
                            r3.m5700(this.f7331, this.f7456, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 3:
                        if (!Float.isNaN(this.f7461)) {
                            r3.m5700(this.f7331, this.f7461, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 4:
                        if (!Float.isNaN(this.f7455)) {
                            r3.m5700(this.f7331, this.f7455, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 5:
                        if (!Float.isNaN(this.f7458)) {
                            r3.m5700(this.f7331, this.f7458, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 6:
                        if (!Float.isNaN(this.f7465)) {
                            r3.m5700(this.f7331, this.f7465, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 7:
                        if (!Float.isNaN(this.f7449)) {
                            r3.m5700(this.f7331, this.f7449, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case '\b':
                        if (!Float.isNaN(this.f7459)) {
                            r3.m5700(this.f7331, this.f7459, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case '\t':
                        if (!Float.isNaN(this.f7451)) {
                            r3.m5700(this.f7331, this.f7451, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case '\n':
                        if (!Float.isNaN(this.f7454)) {
                            r3.m5700(this.f7331, this.f7454, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    case 11:
                        if (!Float.isNaN(this.f7460)) {
                            r3.m5700(this.f7331, this.f7460, this.f7464, this.f7452, this.f7450);
                            break;
                        } else {
                            continue;
                        }
                    default:
                        Log.e("KeyTimeCycles", "UNKNOWN addValues \"" + next + "\"");
                        continue;
                }
            }
        }
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m5650(HashMap<String, Integer> hashMap) {
        if (this.f7462 != -1) {
            if (!Float.isNaN(this.f7457)) {
                hashMap.put("alpha", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7463)) {
                hashMap.put("elevation", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7456)) {
                hashMap.put("rotation", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7461)) {
                hashMap.put("rotationX", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7455)) {
                hashMap.put("rotationY", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7459)) {
                hashMap.put("translationX", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7451)) {
                hashMap.put("translationY", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7454)) {
                hashMap.put("translationZ", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7458)) {
                hashMap.put("transitionPathRotate", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7465)) {
                hashMap.put("scaleX", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7465)) {
                hashMap.put("scaleY", Integer.valueOf(this.f7462));
            }
            if (!Float.isNaN(this.f7460)) {
                hashMap.put("progress", Integer.valueOf(this.f7462));
            }
            if (this.f7332.size() > 0) {
                for (String str : this.f7332.keySet()) {
                    hashMap.put(C1293.m3412("CUSTOM,", str), Integer.valueOf(this.f7462));
                }
            }
        }
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5651(Context context, AttributeSet attributeSet) {
        C2136.m5654(this, context.obtainStyledAttributes(attributeSet, R$styleable.KeyTimeCycle));
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5653(HashSet<String> hashSet) {
        if (!Float.isNaN(this.f7457)) {
            hashSet.add("alpha");
        }
        if (!Float.isNaN(this.f7463)) {
            hashSet.add("elevation");
        }
        if (!Float.isNaN(this.f7456)) {
            hashSet.add("rotation");
        }
        if (!Float.isNaN(this.f7461)) {
            hashSet.add("rotationX");
        }
        if (!Float.isNaN(this.f7455)) {
            hashSet.add("rotationY");
        }
        if (!Float.isNaN(this.f7459)) {
            hashSet.add("translationX");
        }
        if (!Float.isNaN(this.f7451)) {
            hashSet.add("translationY");
        }
        if (!Float.isNaN(this.f7454)) {
            hashSet.add("translationZ");
        }
        if (!Float.isNaN(this.f7458)) {
            hashSet.add("transitionPathRotate");
        }
        if (!Float.isNaN(this.f7465)) {
            hashSet.add("scaleX");
        }
        if (!Float.isNaN(this.f7449)) {
            hashSet.add("scaleY");
        }
        if (!Float.isNaN(this.f7460)) {
            hashSet.add("progress");
        }
        if (this.f7332.size() > 0) {
            Iterator<String> it2 = this.f7332.keySet().iterator();
            while (it2.hasNext()) {
                hashSet.add("CUSTOM," + it2.next());
            }
        }
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5652(HashMap<String, AbstractC2113> hashMap) {
        throw new IllegalArgumentException(" KeyTimeCycles do not support SplineSet");
    }
}
