package ῲ.ⁱ.K.K;

import android.util.Log;
import java.util.Arrays;
import ඓ.K.K.K.C1293;

/* renamed from: ῲ.ⁱ.K.K.ʬ  reason: contains not printable characters */
/* compiled from: Easing */
public class C2184 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public static String[] f7594 = {"standard", "accelerate", "decelerate", "linear"};

    /* renamed from: ῲ  reason: contains not printable characters */
    public static C2184 f7595 = new C2184();

    /* renamed from: K  reason: contains not printable characters */
    public String f7596 = "identity";

    /* renamed from: ῲ.ⁱ.K.K.ʬ$K  reason: contains not printable characters */
    /* compiled from: Easing */
    public static class C2185 extends C2184 {

        /* renamed from: ᨨ  reason: contains not printable characters */
        public static double f7597 = 1.0E-4d;

        /* renamed from: 㿎  reason: contains not printable characters */
        public static double f7598 = 0.01d;

        /* renamed from: ඓ  reason: contains not printable characters */
        public double f7599;

        /* renamed from: ⁱ  reason: contains not printable characters */
        public double f7600;

        /* renamed from: 㴹  reason: contains not printable characters */
        public double f7601;

        /* renamed from: 㸾  reason: contains not printable characters */
        public double f7602;

        public C2185(String str) {
            this.f7596 = str;
            int indexOf = str.indexOf(40);
            int indexOf2 = str.indexOf(44, indexOf);
            this.f7602 = Double.parseDouble(str.substring(indexOf + 1, indexOf2).trim());
            int i = indexOf2 + 1;
            int indexOf3 = str.indexOf(44, i);
            this.f7599 = Double.parseDouble(str.substring(i, indexOf3).trim());
            int i2 = indexOf3 + 1;
            int indexOf4 = str.indexOf(44, i2);
            this.f7601 = Double.parseDouble(str.substring(i2, indexOf4).trim());
            int i3 = indexOf4 + 1;
            this.f7600 = Double.parseDouble(str.substring(i3, str.indexOf(41, i3)).trim());
        }

        /* renamed from: ʬ  reason: contains not printable characters */
        public final double m5724(double d) {
            double d2 = 1.0d - d;
            double d3 = 3.0d * d2;
            double d4 = d2 * d3 * d;
            double d5 = d3 * d * d;
            return (this.f7601 * d5) + (this.f7602 * d4) + (d * d * d);
        }

        @Override // ῲ.ⁱ.K.K.C2184
        /* renamed from: ῲ  reason: contains not printable characters */
        public double m5725(double d) {
            double d2 = 0.5d;
            double d3 = 0.5d;
            while (d2 > f7597) {
                d2 *= 0.5d;
                d3 = m5724(d3) < d ? d3 + d2 : d3 - d2;
            }
            double d4 = d3 - d2;
            double d5 = d3 + d2;
            return (m5727(d5) - m5727(d4)) / (m5724(d5) - m5724(d4));
        }

        @Override // ῲ.ⁱ.K.K.C2184
        /* renamed from: K  reason: contains not printable characters */
        public double m5726(double d) {
            if (d <= 0.0d) {
                return 0.0d;
            }
            if (d >= 1.0d) {
                return 1.0d;
            }
            double d2 = 0.5d;
            double d3 = 0.5d;
            while (d2 > f7598) {
                d2 *= 0.5d;
                d3 = m5724(d3) < d ? d3 + d2 : d3 - d2;
            }
            double d4 = d3 - d2;
            double r6 = m5724(d4);
            double d5 = d3 + d2;
            double r2 = m5724(d5);
            double r0 = m5727(d4);
            return (((d - r6) * (m5727(d5) - r0)) / (r2 - r6)) + r0;
        }

        /* renamed from: 㸾  reason: contains not printable characters */
        public final double m5727(double d) {
            double d2 = 1.0d - d;
            double d3 = 3.0d * d2;
            double d4 = d2 * d3 * d;
            double d5 = d3 * d * d;
            return (this.f7600 * d5) + (this.f7599 * d4) + (d * d * d);
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C2184 m5721(String str) {
        if (str == null) {
            return null;
        }
        if (str.startsWith("cubic")) {
            return new C2185(str);
        }
        char c = 65535;
        switch (str.hashCode()) {
            case -1354466595:
                if (str.equals("accelerate")) {
                    c = 1;
                    break;
                }
                break;
            case -1263948740:
                if (str.equals("decelerate")) {
                    c = 2;
                    break;
                }
                break;
            case -1102672091:
                if (str.equals("linear")) {
                    c = 3;
                    break;
                }
                break;
            case 1312628413:
                if (str.equals("standard")) {
                    c = 0;
                    break;
                }
                break;
        }
        if (c == 0) {
            return new C2185("cubic(0.4, 0.0, 0.2, 1)");
        }
        if (c == 1) {
            return new C2185("cubic(0.4, 0.05, 0.8, 0.7)");
        }
        if (c == 2) {
            return new C2185("cubic(0.0, 0.0, 0.2, 0.95)");
        }
        if (c == 3) {
            return new C2185("cubic(1, 1, 0, 0)");
        }
        StringBuilder r5 = C1293.m3416("transitionEasing syntax error syntax:transitionEasing=\"cubic(1.0,0.5,0.0,0.6)\" or ");
        r5.append(Arrays.toString(f7594));
        Log.e("ConstraintSet", r5.toString());
        return f7595;
    }

    public String toString() {
        return this.f7596;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public double m5722(double d) {
        return 1.0d;
    }

    /* renamed from: K  reason: contains not printable characters */
    public double m5723(double d) {
        return d;
    }
}
