package d2;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import com.google.android.gms.internal.measurement.X1;
import java.io.IOException;
import java.util.ArrayDeque;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import v0.AbstractC1664c;

/* JADX INFO: loaded from: classes.dex */
public final class q extends h {

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public static final PorterDuff.Mode f11411z = PorterDuff.Mode.SRC_IN;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public o f11412r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public PorterDuffColorFilter f11413s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public ColorFilter f11414t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public boolean f11415u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public boolean f11416v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final float[] f11417w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final Matrix f11418x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final Rect f11419y;

    public q() {
        this.f11416v = true;
        this.f11417w = new float[9];
        this.f11418x = new Matrix();
        this.f11419y = new Rect();
        o oVar = new o();
        oVar.f11401c = null;
        oVar.f11402d = f11411z;
        oVar.f11400b = new n();
        this.f11412r = oVar;
    }

    public final PorterDuffColorFilter a(ColorStateList colorStateList, PorterDuff.Mode mode) {
        if (colorStateList == null || mode == null) {
            return null;
        }
        return new PorterDuffColorFilter(colorStateList.getColorForState(getState(), 0), mode);
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean canApplyTheme() {
        Drawable drawable = this.f11360q;
        if (drawable == null) {
            return false;
        }
        drawable.canApplyTheme();
        return false;
    }

    @Override // android.graphics.drawable.Drawable
    public final void draw(Canvas canvas) {
        Paint paint;
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.draw(canvas);
            return;
        }
        Rect rect = this.f11419y;
        copyBounds(rect);
        if (rect.width() <= 0 || rect.height() <= 0) {
            return;
        }
        ColorFilter colorFilter = this.f11414t;
        if (colorFilter == null) {
            colorFilter = this.f11413s;
        }
        Matrix matrix = this.f11418x;
        canvas.getMatrix(matrix);
        float[] fArr = this.f11417w;
        matrix.getValues(fArr);
        float fAbs = Math.abs(fArr[0]);
        float fAbs2 = Math.abs(fArr[4]);
        float fAbs3 = Math.abs(fArr[1]);
        float fAbs4 = Math.abs(fArr[3]);
        if (fAbs3 != 0.0f || fAbs4 != 0.0f) {
            fAbs = 1.0f;
            fAbs2 = 1.0f;
        }
        int iWidth = (int) (rect.width() * fAbs);
        int iMin = Math.min(2048, iWidth);
        int iMin2 = Math.min(2048, (int) (rect.height() * fAbs2));
        if (iMin <= 0 || iMin2 <= 0) {
            return;
        }
        int iSave = canvas.save();
        canvas.translate(rect.left, rect.top);
        if (isAutoMirrored() && getLayoutDirection() == 1) {
            canvas.translate(rect.width(), 0.0f);
            canvas.scale(-1.0f, 1.0f);
        }
        rect.offsetTo(0, 0);
        o oVar = this.f11412r;
        Bitmap bitmap = oVar.f11404f;
        if (bitmap == null || iMin != bitmap.getWidth() || iMin2 != oVar.f11404f.getHeight()) {
            oVar.f11404f = Bitmap.createBitmap(iMin, iMin2, Bitmap.Config.ARGB_8888);
            oVar.f11408k = true;
        }
        if (this.f11416v) {
            o oVar2 = this.f11412r;
            if (oVar2.f11408k || oVar2.f11405g != oVar2.f11401c || oVar2.f11406h != oVar2.f11402d || oVar2.f11407j != oVar2.f11403e || oVar2.i != oVar2.f11400b.getRootAlpha()) {
                o oVar3 = this.f11412r;
                oVar3.f11404f.eraseColor(0);
                Canvas canvas2 = new Canvas(oVar3.f11404f);
                n nVar = oVar3.f11400b;
                nVar.a(nVar.f11391g, n.f11384p, canvas2, iMin, iMin2);
                o oVar4 = this.f11412r;
                oVar4.f11405g = oVar4.f11401c;
                oVar4.f11406h = oVar4.f11402d;
                oVar4.i = oVar4.f11400b.getRootAlpha();
                oVar4.f11407j = oVar4.f11403e;
                oVar4.f11408k = false;
            }
        } else {
            o oVar5 = this.f11412r;
            oVar5.f11404f.eraseColor(0);
            Canvas canvas3 = new Canvas(oVar5.f11404f);
            n nVar2 = oVar5.f11400b;
            nVar2.a(nVar2.f11391g, n.f11384p, canvas3, iMin, iMin2);
        }
        o oVar6 = this.f11412r;
        if (oVar6.f11400b.getRootAlpha() >= 255 && colorFilter == null) {
            paint = null;
        } else {
            if (oVar6.f11409l == null) {
                Paint paint2 = new Paint();
                oVar6.f11409l = paint2;
                paint2.setFilterBitmap(true);
            }
            oVar6.f11409l.setAlpha(oVar6.f11400b.getRootAlpha());
            oVar6.f11409l.setColorFilter(colorFilter);
            paint = oVar6.f11409l;
        }
        canvas.drawBitmap(oVar6.f11404f, (Rect) null, rect, paint);
        canvas.restoreToCount(iSave);
    }

    @Override // android.graphics.drawable.Drawable
    public final int getAlpha() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.getAlpha() : this.f11412r.f11400b.getRootAlpha();
    }

    @Override // android.graphics.drawable.Drawable
    public final int getChangingConfigurations() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.getChangingConfigurations() : super.getChangingConfigurations() | this.f11412r.getChangingConfigurations();
    }

    @Override // android.graphics.drawable.Drawable
    public final ColorFilter getColorFilter() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.getColorFilter() : this.f11414t;
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable.ConstantState getConstantState() {
        if (this.f11360q != null && Build.VERSION.SDK_INT >= 24) {
            return new p(this.f11360q.getConstantState());
        }
        this.f11412r.f11399a = getChangingConfigurations();
        return this.f11412r;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicHeight() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.getIntrinsicHeight() : (int) this.f11412r.f11400b.i;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicWidth() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.getIntrinsicWidth() : (int) this.f11412r.f11400b.f11392h;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getOpacity() {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            return drawable.getOpacity();
        }
        return -3;
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet) throws XmlPullParserException, IOException {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.inflate(resources, xmlPullParser, attributeSet);
        } else {
            inflate(resources, xmlPullParser, attributeSet, null);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void invalidateSelf() {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.invalidateSelf();
        } else {
            super.invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isAutoMirrored() {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.isAutoMirrored() : this.f11412r.f11403e;
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isStateful() {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            return drawable.isStateful();
        }
        if (super.isStateful()) {
            return true;
        }
        o oVar = this.f11412r;
        if (oVar == null) {
            return false;
        }
        n nVar = oVar.f11400b;
        if (nVar.f11397n == null) {
            nVar.f11397n = Boolean.valueOf(nVar.f11391g.a());
        }
        if (nVar.f11397n.booleanValue()) {
            return true;
        }
        ColorStateList colorStateList = this.f11412r.f11401c;
        return colorStateList != null && colorStateList.isStateful();
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable mutate() {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.mutate();
            return this;
        }
        if (!this.f11415u && super.mutate() == this) {
            o oVar = this.f11412r;
            o oVar2 = new o();
            oVar2.f11401c = null;
            oVar2.f11402d = f11411z;
            if (oVar != null) {
                oVar2.f11399a = oVar.f11399a;
                n nVar = new n(oVar.f11400b);
                oVar2.f11400b = nVar;
                if (oVar.f11400b.f11389e != null) {
                    nVar.f11389e = new Paint(oVar.f11400b.f11389e);
                }
                if (oVar.f11400b.f11388d != null) {
                    oVar2.f11400b.f11388d = new Paint(oVar.f11400b.f11388d);
                }
                oVar2.f11401c = oVar.f11401c;
                oVar2.f11402d = oVar.f11402d;
                oVar2.f11403e = oVar.f11403e;
            }
            this.f11412r = oVar2;
            this.f11415u = true;
        }
        return this;
    }

    @Override // android.graphics.drawable.Drawable
    public final void onBoundsChange(Rect rect) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setBounds(rect);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean onStateChange(int[] iArr) {
        boolean z8;
        PorterDuff.Mode mode;
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            return drawable.setState(iArr);
        }
        o oVar = this.f11412r;
        ColorStateList colorStateList = oVar.f11401c;
        if (colorStateList == null || (mode = oVar.f11402d) == null) {
            z8 = false;
        } else {
            this.f11413s = a(colorStateList, mode);
            invalidateSelf();
            z8 = true;
        }
        n nVar = oVar.f11400b;
        if (nVar.f11397n == null) {
            nVar.f11397n = Boolean.valueOf(nVar.f11391g.a());
        }
        if (nVar.f11397n.booleanValue()) {
            boolean zB = oVar.f11400b.f11391g.b(iArr);
            oVar.f11408k |= zB;
            if (zB) {
                invalidateSelf();
                return true;
            }
        }
        return z8;
    }

    @Override // android.graphics.drawable.Drawable
    public final void scheduleSelf(Runnable runnable, long j8) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.scheduleSelf(runnable, j8);
        } else {
            super.scheduleSelf(runnable, j8);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAlpha(int i) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setAlpha(i);
        } else if (this.f11412r.f11400b.getRootAlpha() != i) {
            this.f11412r.f11400b.setRootAlpha(i);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAutoMirrored(boolean z8) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setAutoMirrored(z8);
        } else {
            this.f11412r.f11403e = z8;
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setColorFilter(ColorFilter colorFilter) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setColorFilter(colorFilter);
        } else {
            this.f11414t = colorFilter;
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTint(int i) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            X1.K(drawable, i);
        } else {
            setTintList(ColorStateList.valueOf(i));
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintList(ColorStateList colorStateList) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setTintList(colorStateList);
            return;
        }
        o oVar = this.f11412r;
        if (oVar.f11401c != colorStateList) {
            oVar.f11401c = colorStateList;
            this.f11413s = a(colorStateList, oVar.f11402d);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintMode(PorterDuff.Mode mode) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.setTintMode(mode);
            return;
        }
        o oVar = this.f11412r;
        if (oVar.f11402d != mode) {
            oVar.f11402d = mode;
            this.f11413s = a(oVar.f11401c, mode);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean setVisible(boolean z8, boolean z9) {
        Drawable drawable = this.f11360q;
        return drawable != null ? drawable.setVisible(z8, z9) : super.setVisible(z8, z9);
    }

    @Override // android.graphics.drawable.Drawable
    public final void unscheduleSelf(Runnable runnable) {
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.unscheduleSelf(runnable);
        } else {
            super.unscheduleSelf(runnable);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Resources.Theme theme) throws XmlPullParserException, IOException {
        n nVar;
        int i;
        boolean z8;
        char c3;
        int i5;
        Paint.Cap cap;
        Paint.Join join;
        Drawable drawable = this.f11360q;
        if (drawable != null) {
            drawable.inflate(resources, xmlPullParser, attributeSet, theme);
            return;
        }
        o oVar = this.f11412r;
        oVar.f11400b = new n();
        TypedArray typedArrayG = E.b.g(resources, theme, attributeSet, a.f11338a);
        o oVar2 = this.f11412r;
        n nVar2 = oVar2.f11400b;
        int i8 = !E.b.d(xmlPullParser, "tintMode") ? -1 : typedArrayG.getInt(6, -1);
        PorterDuff.Mode mode = PorterDuff.Mode.SRC_IN;
        if (i8 == 3) {
            mode = PorterDuff.Mode.SRC_OVER;
        } else if (i8 != 5) {
            if (i8 != 9) {
                switch (i8) {
                    case 14:
                        mode = PorterDuff.Mode.MULTIPLY;
                        break;
                    case 15:
                        mode = PorterDuff.Mode.SCREEN;
                        break;
                    case 16:
                        mode = PorterDuff.Mode.ADD;
                        break;
                }
            } else {
                mode = PorterDuff.Mode.SRC_ATOP;
            }
        }
        oVar2.f11402d = mode;
        int i9 = 1;
        ColorStateList colorStateListA = null;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "tint") != null) {
            TypedValue typedValue = new TypedValue();
            typedArrayG.getValue(1, typedValue);
            int i10 = typedValue.type;
            if (i10 == 2) {
                throw new UnsupportedOperationException("Failed to resolve attribute at index 1: " + typedValue);
            }
            if (i10 >= 28 && i10 <= 31) {
                colorStateListA = ColorStateList.valueOf(typedValue.data);
            } else {
                Resources resources2 = typedArrayG.getResources();
                int resourceId = typedArrayG.getResourceId(1, 0);
                ThreadLocal threadLocal = E.c.f1936a;
                try {
                    colorStateListA = E.c.a(resources2, resources2.getXml(resourceId), theme);
                } catch (Exception e8) {
                    Log.e("CSLCompat", "Failed to inflate ColorStateList.", e8);
                }
            }
        }
        ColorStateList colorStateList = colorStateListA;
        if (colorStateList != null) {
            oVar2.f11401c = colorStateList;
        }
        boolean z9 = oVar2.f11403e;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "autoMirrored") != null) {
            z9 = typedArrayG.getBoolean(5, z9);
        }
        oVar2.f11403e = z9;
        float f3 = nVar2.f11393j;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "viewportWidth") != null) {
            f3 = typedArrayG.getFloat(7, f3);
        }
        nVar2.f11393j = f3;
        float f7 = nVar2.f11394k;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "viewportHeight") != null) {
            f7 = typedArrayG.getFloat(8, f7);
        }
        nVar2.f11394k = f7;
        boolean z10 = false;
        if (nVar2.f11393j <= 0.0f) {
            throw new XmlPullParserException(typedArrayG.getPositionDescription() + "<vector> tag requires viewportWidth > 0");
        }
        if (f7 > 0.0f) {
            nVar2.f11392h = typedArrayG.getDimension(3, nVar2.f11392h);
            float dimension = typedArrayG.getDimension(2, nVar2.i);
            nVar2.i = dimension;
            if (nVar2.f11392h <= 0.0f) {
                throw new XmlPullParserException(typedArrayG.getPositionDescription() + "<vector> tag requires width > 0");
            }
            if (dimension > 0.0f) {
                float alpha = nVar2.getAlpha();
                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "alpha") != null) {
                    alpha = typedArrayG.getFloat(4, alpha);
                }
                nVar2.setAlpha(alpha);
                String string = typedArrayG.getString(0);
                if (string != null) {
                    nVar2.f11396m = string;
                    nVar2.f11398o.put(string, nVar2);
                }
                typedArrayG.recycle();
                oVar.f11399a = getChangingConfigurations();
                oVar.f11408k = true;
                o oVar3 = this.f11412r;
                n nVar3 = oVar3.f11400b;
                ArrayDeque arrayDeque = new ArrayDeque();
                arrayDeque.push(nVar3.f11391g);
                int eventType = xmlPullParser.getEventType();
                int depth = xmlPullParser.getDepth() + 1;
                boolean z11 = true;
                while (eventType != i9 && (xmlPullParser.getDepth() >= depth || eventType != 3)) {
                    if (eventType == 2) {
                        String name = xmlPullParser.getName();
                        k kVar = (k) arrayDeque.peek();
                        boolean zEquals = "path".equals(name);
                        i = depth;
                        q.e eVar = nVar3.f11398o;
                        if (zEquals) {
                            j jVar = new j();
                            jVar.f11362e = 0.0f;
                            jVar.f11364g = 1.0f;
                            jVar.f11365h = 1.0f;
                            nVar = nVar3;
                            jVar.i = 0.0f;
                            jVar.f11366j = 1.0f;
                            jVar.f11367k = 0.0f;
                            Paint.Cap cap2 = Paint.Cap.BUTT;
                            jVar.f11368l = cap2;
                            Paint.Join join2 = Paint.Join.MITER;
                            jVar.f11369m = join2;
                            jVar.f11370n = 4.0f;
                            TypedArray typedArrayG2 = E.b.g(resources, theme, attributeSet, a.f11340c);
                            if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) {
                                String string2 = typedArrayG2.getString(0);
                                if (string2 != null) {
                                    jVar.f11382b = string2;
                                }
                                String string3 = typedArrayG2.getString(2);
                                if (string3 != null) {
                                    jVar.f11381a = AbstractC1664c.m(string3);
                                }
                                jVar.f11363f = E.b.b(typedArrayG2, xmlPullParser, theme, "fillColor", 1);
                                float f8 = jVar.f11365h;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "fillAlpha") != null) {
                                    f8 = typedArrayG2.getFloat(12, f8);
                                }
                                jVar.f11365h = f8;
                                int i11 = xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeLineCap") != null ? typedArrayG2.getInt(8, -1) : -1;
                                Paint.Cap cap3 = jVar.f11368l;
                                if (i11 == 0) {
                                    cap = cap2;
                                } else if (i11 != 1) {
                                    cap = i11 != 2 ? cap3 : Paint.Cap.SQUARE;
                                } else {
                                    cap = Paint.Cap.ROUND;
                                }
                                jVar.f11368l = cap;
                                int i12 = xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeLineJoin") != null ? typedArrayG2.getInt(9, -1) : -1;
                                Paint.Join join3 = jVar.f11369m;
                                if (i12 == 0) {
                                    join = join2;
                                } else if (i12 != 1) {
                                    join = i12 != 2 ? join3 : Paint.Join.BEVEL;
                                } else {
                                    join = Paint.Join.ROUND;
                                }
                                jVar.f11369m = join;
                                float f9 = jVar.f11370n;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeMiterLimit") != null) {
                                    f9 = typedArrayG2.getFloat(10, f9);
                                }
                                jVar.f11370n = f9;
                                jVar.f11361d = E.b.b(typedArrayG2, xmlPullParser, theme, "strokeColor", 3);
                                float f10 = jVar.f11364g;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeAlpha") != null) {
                                    f10 = typedArrayG2.getFloat(11, f10);
                                }
                                jVar.f11364g = f10;
                                float f11 = jVar.f11362e;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeWidth") != null) {
                                    f11 = typedArrayG2.getFloat(4, f11);
                                }
                                jVar.f11362e = f11;
                                float f12 = jVar.f11366j;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathEnd") != null) {
                                    f12 = typedArrayG2.getFloat(6, f12);
                                }
                                jVar.f11366j = f12;
                                float f13 = jVar.f11367k;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathOffset") != null) {
                                    f13 = typedArrayG2.getFloat(7, f13);
                                }
                                jVar.f11367k = f13;
                                float f14 = jVar.i;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathStart") != null) {
                                    f14 = typedArrayG2.getFloat(5, f14);
                                }
                                jVar.i = f14;
                                int i13 = jVar.f11383c;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "fillType") != null) {
                                    i13 = typedArrayG2.getInt(13, i13);
                                }
                                jVar.f11383c = i13;
                            }
                            typedArrayG2.recycle();
                            kVar.f11372b.add(jVar);
                            if (jVar.getPathName() != null) {
                                eVar.put(jVar.getPathName(), jVar);
                            }
                            oVar3.f11399a = oVar3.f11399a;
                            z11 = false;
                            c3 = '\b';
                            z8 = false;
                        } else {
                            nVar = nVar3;
                            c3 = '\b';
                            z8 = false;
                            if ("clip-path".equals(name)) {
                                i iVar = new i();
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) {
                                    TypedArray typedArrayG3 = E.b.g(resources, theme, attributeSet, a.f11341d);
                                    String string4 = typedArrayG3.getString(0);
                                    if (string4 != null) {
                                        iVar.f11382b = string4;
                                    }
                                    String string5 = typedArrayG3.getString(1);
                                    if (string5 != null) {
                                        iVar.f11381a = AbstractC1664c.m(string5);
                                    }
                                    iVar.f11383c = !E.b.d(xmlPullParser, "fillType") ? 0 : typedArrayG3.getInt(2, 0);
                                    typedArrayG3.recycle();
                                }
                                kVar.f11372b.add(iVar);
                                if (iVar.getPathName() != null) {
                                    eVar.put(iVar.getPathName(), iVar);
                                }
                                oVar3.f11399a = oVar3.f11399a;
                            } else if ("group".equals(name)) {
                                k kVar2 = new k();
                                TypedArray typedArrayG4 = E.b.g(resources, theme, attributeSet, a.f11339b);
                                float f15 = kVar2.f11373c;
                                if (E.b.d(xmlPullParser, "rotation")) {
                                    f15 = typedArrayG4.getFloat(5, f15);
                                }
                                kVar2.f11373c = f15;
                                kVar2.f11374d = typedArrayG4.getFloat(1, kVar2.f11374d);
                                kVar2.f11375e = typedArrayG4.getFloat(2, kVar2.f11375e);
                                float f16 = kVar2.f11376f;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "scaleX") != null) {
                                    f16 = typedArrayG4.getFloat(3, f16);
                                }
                                kVar2.f11376f = f16;
                                float f17 = kVar2.f11377g;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "scaleY") != null) {
                                    f17 = typedArrayG4.getFloat(4, f17);
                                }
                                kVar2.f11377g = f17;
                                float f18 = kVar2.f11378h;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "translateX") != null) {
                                    f18 = typedArrayG4.getFloat(6, f18);
                                }
                                kVar2.f11378h = f18;
                                float f19 = kVar2.i;
                                if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "translateY") != null) {
                                    f19 = typedArrayG4.getFloat(7, f19);
                                }
                                kVar2.i = f19;
                                String string6 = typedArrayG4.getString(0);
                                if (string6 != null) {
                                    kVar2.f11380k = string6;
                                }
                                kVar2.c();
                                typedArrayG4.recycle();
                                kVar.f11372b.add(kVar2);
                                arrayDeque.push(kVar2);
                                if (kVar2.getGroupName() != null) {
                                    eVar.put(kVar2.getGroupName(), kVar2);
                                }
                                oVar3.f11399a = oVar3.f11399a;
                            }
                        }
                        i5 = 1;
                    } else {
                        nVar = nVar3;
                        i = depth;
                        z8 = z10;
                        c3 = '\b';
                        i5 = 1;
                        if (eventType == 3 && "group".equals(xmlPullParser.getName())) {
                            arrayDeque.pop();
                        }
                    }
                    eventType = xmlPullParser.next();
                    i9 = i5;
                    z10 = z8;
                    nVar3 = nVar;
                    depth = i;
                }
                if (!z11) {
                    this.f11413s = a(oVar.f11401c, oVar.f11402d);
                    return;
                }
                throw new XmlPullParserException("no path defined");
            }
            throw new XmlPullParserException(typedArrayG.getPositionDescription() + "<vector> tag requires height > 0");
        }
        throw new XmlPullParserException(typedArrayG.getPositionDescription() + "<vector> tag requires viewportHeight > 0");
    }

    public q(o oVar) {
        this.f11416v = true;
        this.f11417w = new float[9];
        this.f11418x = new Matrix();
        this.f11419y = new Rect();
        this.f11412r = oVar;
        this.f11413s = a(oVar.f11401c, oVar.f11402d);
    }
}
