AdGuard v3.6.45版本的 MD5 值为:ce30a13dcef92cf942973fffcc6d20fb
以下内容为反编译后的 SVGParser.java 源代码,内容仅作参考
package com.caverock.androidsvg;
import android.graphics.Matrix;
import android.support.v4.media.session.PlaybackStateCompat;
import android.util.Log;
import android.util.Xml;
import androidx.core.internal.view.SupportMenu;
import androidx.core.view.InputDeviceCompat;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.joran.action.Action;
import ch.qos.logback.core.util.FileSize;
import com.caverock.androidsvg.CSSParser;
import com.caverock.androidsvg.PreserveAspectRatio;
import com.caverock.androidsvg.SVG;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.zip.GZIPInputStream;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.ext.DefaultHandler2;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public final class SVGParser {
private int d;
private SVG f1019a = null;
private SVG.ag b = null;
private boolean c = false;
private boolean e = false;
private SVGElem f = null;
private StringBuilder g = null;
private boolean h = false;
private StringBuilder i = null;
public static class AnonymousClass1 {
static final int[] f1020a;
static {
int[] iArr = new int[SVGAttr.values().length];
b = iArr;
try {
iArr[SVGAttr.x.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[SVGAttr.y.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[SVGAttr.width.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
b[SVGAttr.height.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
b[SVGAttr.version.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
b[SVGAttr.href.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
b[SVGAttr.preserveAspectRatio.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
b[SVGAttr.d.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
b[SVGAttr.pathLength.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
b[SVGAttr.rx.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
b[SVGAttr.ry.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
b[SVGAttr.cx.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
try {
b[SVGAttr.cy.ordinal()] = 13;
} catch (NoSuchFieldError unused13) {
}
try {
b[SVGAttr.r.ordinal()] = 14;
} catch (NoSuchFieldError unused14) {
}
try {
b[SVGAttr.x1.ordinal()] = 15;
} catch (NoSuchFieldError unused15) {
}
try {
b[SVGAttr.y1.ordinal()] = 16;
} catch (NoSuchFieldError unused16) {
}
try {
b[SVGAttr.x2.ordinal()] = 17;
} catch (NoSuchFieldError unused17) {
}
try {
b[SVGAttr.y2.ordinal()] = 18;
} catch (NoSuchFieldError unused18) {
}
try {
b[SVGAttr.dx.ordinal()] = 19;
} catch (NoSuchFieldError unused19) {
}
try {
b[SVGAttr.dy.ordinal()] = 20;
} catch (NoSuchFieldError unused20) {
}
try {
b[SVGAttr.requiredFeatures.ordinal()] = 21;
} catch (NoSuchFieldError unused21) {
}
try {
b[SVGAttr.requiredExtensions.ordinal()] = 22;
} catch (NoSuchFieldError unused22) {
}
try {
b[SVGAttr.systemLanguage.ordinal()] = 23;
} catch (NoSuchFieldError unused23) {
}
try {
b[SVGAttr.requiredFormats.ordinal()] = 24;
} catch (NoSuchFieldError unused24) {
}
try {
b[SVGAttr.requiredFonts.ordinal()] = 25;
} catch (NoSuchFieldError unused25) {
}
try {
b[SVGAttr.refX.ordinal()] = 26;
} catch (NoSuchFieldError unused26) {
}
try {
b[SVGAttr.refY.ordinal()] = 27;
} catch (NoSuchFieldError unused27) {
}
try {
b[SVGAttr.markerWidth.ordinal()] = 28;
} catch (NoSuchFieldError unused28) {
}
try {
b[SVGAttr.markerHeight.ordinal()] = 29;
} catch (NoSuchFieldError unused29) {
}
try {
b[SVGAttr.markerUnits.ordinal()] = 30;
} catch (NoSuchFieldError unused30) {
}
try {
b[SVGAttr.orient.ordinal()] = 31;
} catch (NoSuchFieldError unused31) {
}
try {
b[SVGAttr.gradientUnits.ordinal()] = 32;
} catch (NoSuchFieldError unused32) {
}
try {
b[SVGAttr.gradientTransform.ordinal()] = 33;
} catch (NoSuchFieldError unused33) {
}
try {
b[SVGAttr.spreadMethod.ordinal()] = 34;
} catch (NoSuchFieldError unused34) {
}
try {
b[SVGAttr.fx.ordinal()] = 35;
} catch (NoSuchFieldError unused35) {
}
try {
b[SVGAttr.fy.ordinal()] = 36;
} catch (NoSuchFieldError unused36) {
}
try {
b[SVGAttr.offset.ordinal()] = 37;
} catch (NoSuchFieldError unused37) {
}
try {
b[SVGAttr.clipPathUnits.ordinal()] = 38;
} catch (NoSuchFieldError unused38) {
}
try {
b[SVGAttr.startOffset.ordinal()] = 39;
} catch (NoSuchFieldError unused39) {
}
try {
b[SVGAttr.patternUnits.ordinal()] = 40;
} catch (NoSuchFieldError unused40) {
}
try {
b[SVGAttr.patternContentUnits.ordinal()] = 41;
} catch (NoSuchFieldError unused41) {
}
try {
b[SVGAttr.patternTransform.ordinal()] = 42;
} catch (NoSuchFieldError unused42) {
}
try {
b[SVGAttr.maskUnits.ordinal()] = 43;
} catch (NoSuchFieldError unused43) {
}
try {
b[SVGAttr.maskContentUnits.ordinal()] = 44;
} catch (NoSuchFieldError unused44) {
}
try {
b[SVGAttr.style.ordinal()] = 45;
} catch (NoSuchFieldError unused45) {
}
try {
b[SVGAttr.CLASS.ordinal()] = 46;
} catch (NoSuchFieldError unused46) {
}
try {
b[SVGAttr.fill.ordinal()] = 47;
} catch (NoSuchFieldError unused47) {
}
try {
b[SVGAttr.fill_rule.ordinal()] = 48;
} catch (NoSuchFieldError unused48) {
}
try {
b[SVGAttr.fill_opacity.ordinal()] = 49;
} catch (NoSuchFieldError unused49) {
}
try {
b[SVGAttr.stroke.ordinal()] = 50;
} catch (NoSuchFieldError unused50) {
}
try {
b[SVGAttr.stroke_opacity.ordinal()] = 51;
} catch (NoSuchFieldError unused51) {
}
try {
b[SVGAttr.stroke_width.ordinal()] = 52;
} catch (NoSuchFieldError unused52) {
}
try {
b[SVGAttr.stroke_linecap.ordinal()] = 53;
} catch (NoSuchFieldError unused53) {
}
try {
b[SVGAttr.stroke_linejoin.ordinal()] = 54;
} catch (NoSuchFieldError unused54) {
}
try {
b[SVGAttr.stroke_miterlimit.ordinal()] = 55;
} catch (NoSuchFieldError unused55) {
}
try {
b[SVGAttr.stroke_dasharray.ordinal()] = 56;
} catch (NoSuchFieldError unused56) {
}
try {
b[SVGAttr.stroke_dashoffset.ordinal()] = 57;
} catch (NoSuchFieldError unused57) {
}
try {
b[SVGAttr.opacity.ordinal()] = 58;
} catch (NoSuchFieldError unused58) {
}
try {
b[SVGAttr.color.ordinal()] = 59;
} catch (NoSuchFieldError unused59) {
}
try {
b[SVGAttr.font.ordinal()] = 60;
} catch (NoSuchFieldError unused60) {
}
try {
b[SVGAttr.font_family.ordinal()] = 61;
} catch (NoSuchFieldError unused61) {
}
try {
b[SVGAttr.font_size.ordinal()] = 62;
} catch (NoSuchFieldError unused62) {
}
try {
b[SVGAttr.font_weight.ordinal()] = 63;
} catch (NoSuchFieldError unused63) {
}
try {
b[SVGAttr.font_style.ordinal()] = 64;
} catch (NoSuchFieldError unused64) {
}
try {
b[SVGAttr.text_decoration.ordinal()] = 65;
} catch (NoSuchFieldError unused65) {
}
try {
b[SVGAttr.direction.ordinal()] = 66;
} catch (NoSuchFieldError unused66) {
}
try {
b[SVGAttr.text_anchor.ordinal()] = 67;
} catch (NoSuchFieldError unused67) {
}
try {
b[SVGAttr.overflow.ordinal()] = 68;
} catch (NoSuchFieldError unused68) {
}
try {
b[SVGAttr.marker.ordinal()] = 69;
} catch (NoSuchFieldError unused69) {
}
try {
b[SVGAttr.marker_start.ordinal()] = 70;
} catch (NoSuchFieldError unused70) {
}
try {
b[SVGAttr.marker_mid.ordinal()] = 71;
} catch (NoSuchFieldError unused71) {
}
try {
b[SVGAttr.marker_end.ordinal()] = 72;
} catch (NoSuchFieldError unused72) {
}
try {
b[SVGAttr.display.ordinal()] = 73;
} catch (NoSuchFieldError unused73) {
}
try {
b[SVGAttr.visibility.ordinal()] = 74;
} catch (NoSuchFieldError unused74) {
}
try {
b[SVGAttr.stop_color.ordinal()] = 75;
} catch (NoSuchFieldError unused75) {
}
try {
b[SVGAttr.stop_opacity.ordinal()] = 76;
} catch (NoSuchFieldError unused76) {
}
try {
b[SVGAttr.clip.ordinal()] = 77;
} catch (NoSuchFieldError unused77) {
}
try {
b[SVGAttr.clip_path.ordinal()] = 78;
} catch (NoSuchFieldError unused78) {
}
try {
b[SVGAttr.clip_rule.ordinal()] = 79;
} catch (NoSuchFieldError unused79) {
}
try {
b[SVGAttr.mask.ordinal()] = 80;
} catch (NoSuchFieldError unused80) {
}
try {
b[SVGAttr.solid_color.ordinal()] = 81;
} catch (NoSuchFieldError unused81) {
}
try {
b[SVGAttr.solid_opacity.ordinal()] = 82;
} catch (NoSuchFieldError unused82) {
}
try {
b[SVGAttr.viewport_fill.ordinal()] = 83;
} catch (NoSuchFieldError unused83) {
}
try {
b[SVGAttr.viewport_fill_opacity.ordinal()] = 84;
} catch (NoSuchFieldError unused84) {
}
try {
b[SVGAttr.vector_effect.ordinal()] = 85;
} catch (NoSuchFieldError unused85) {
}
try {
b[SVGAttr.image_rendering.ordinal()] = 86;
} catch (NoSuchFieldError unused86) {
}
try {
b[SVGAttr.viewBox.ordinal()] = 87;
} catch (NoSuchFieldError unused87) {
}
try {
b[SVGAttr.type.ordinal()] = 88;
} catch (NoSuchFieldError unused88) {
}
try {
b[SVGAttr.media.ordinal()] = 89;
} catch (NoSuchFieldError unused89) {
}
int[] iArr2 = new int[SVGElem.values().length];
f1020a = iArr2;
try {
iArr2[SVGElem.svg.ordinal()] = 1;
} catch (NoSuchFieldError unused90) {
}
try {
f1020a[SVGElem.g.ordinal()] = 2;
} catch (NoSuchFieldError unused91) {
}
try {
f1020a[SVGElem.a.ordinal()] = 3;
} catch (NoSuchFieldError unused92) {
}
try {
f1020a[SVGElem.defs.ordinal()] = 4;
} catch (NoSuchFieldError unused93) {
}
try {
f1020a[SVGElem.use.ordinal()] = 5;
} catch (NoSuchFieldError unused94) {
}
try {
f1020a[SVGElem.path.ordinal()] = 6;
} catch (NoSuchFieldError unused95) {
}
try {
f1020a[SVGElem.rect.ordinal()] = 7;
} catch (NoSuchFieldError unused96) {
}
try {
f1020a[SVGElem.circle.ordinal()] = 8;
} catch (NoSuchFieldError unused97) {
}
try {
f1020a[SVGElem.ellipse.ordinal()] = 9;
} catch (NoSuchFieldError unused98) {
}
try {
f1020a[SVGElem.line.ordinal()] = 10;
} catch (NoSuchFieldError unused99) {
}
try {
f1020a[SVGElem.polyline.ordinal()] = 11;
} catch (NoSuchFieldError unused100) {
}
try {
f1020a[SVGElem.polygon.ordinal()] = 12;
} catch (NoSuchFieldError unused101) {
}
try {
f1020a[SVGElem.text.ordinal()] = 13;
} catch (NoSuchFieldError unused102) {
}
try {
f1020a[SVGElem.tspan.ordinal()] = 14;
} catch (NoSuchFieldError unused103) {
}
try {
f1020a[SVGElem.tref.ordinal()] = 15;
} catch (NoSuchFieldError unused104) {
}
try {
f1020a[SVGElem.SWITCH.ordinal()] = 16;
} catch (NoSuchFieldError unused105) {
}
try {
f1020a[SVGElem.symbol.ordinal()] = 17;
} catch (NoSuchFieldError unused106) {
}
try {
f1020a[SVGElem.marker.ordinal()] = 18;
} catch (NoSuchFieldError unused107) {
}
try {
f1020a[SVGElem.linearGradient.ordinal()] = 19;
} catch (NoSuchFieldError unused108) {
}
try {
f1020a[SVGElem.radialGradient.ordinal()] = 20;
} catch (NoSuchFieldError unused109) {
}
try {
f1020a[SVGElem.stop.ordinal()] = 21;
} catch (NoSuchFieldError unused110) {
}
try {
f1020a[SVGElem.title.ordinal()] = 22;
} catch (NoSuchFieldError unused111) {
}
try {
f1020a[SVGElem.desc.ordinal()] = 23;
} catch (NoSuchFieldError unused112) {
}
try {
f1020a[SVGElem.clipPath.ordinal()] = 24;
} catch (NoSuchFieldError unused113) {
}
try {
f1020a[SVGElem.textPath.ordinal()] = 25;
} catch (NoSuchFieldError unused114) {
}
try {
f1020a[SVGElem.pattern.ordinal()] = 26;
} catch (NoSuchFieldError unused115) {
}
try {
f1020a[SVGElem.image.ordinal()] = 27;
} catch (NoSuchFieldError unused116) {
}
try {
f1020a[SVGElem.view.ordinal()] = 28;
} catch (NoSuchFieldError unused117) {
}
try {
f1020a[SVGElem.mask.ordinal()] = 29;
} catch (NoSuchFieldError unused118) {
}
try {
f1020a[SVGElem.style.ordinal()] = 30;
} catch (NoSuchFieldError unused119) {
}
try {
f1020a[SVGElem.solidColor.ordinal()] = 31;
} catch (NoSuchFieldError unused120) {
}
}
}
public enum SVGAttr {
CLASS,
clip,
clip_path,
clipPathUnits,
clip_rule,
color,
cx,
cy,
direction,
dx,
dy,
fx,
fy,
d,
display,
fill,
fill_rule,
fill_opacity,
font,
font_family,
font_size,
font_weight,
font_style,
gradientTransform,
gradientUnits,
height,
href,
image_rendering,
marker,
marker_start,
marker_mid,
marker_end,
markerHeight,
markerUnits,
markerWidth,
mask,
maskContentUnits,
maskUnits,
media,
offset,
opacity,
orient,
overflow,
pathLength,
patternContentUnits,
patternTransform,
patternUnits,
points,
preserveAspectRatio,
r,
refX,
refY,
requiredFeatures,
requiredExtensions,
requiredFormats,
requiredFonts,
rx,
ry,
solid_color,
solid_opacity,
spreadMethod,
startOffset,
stop_color,
stop_opacity,
stroke,
stroke_dasharray,
stroke_dashoffset,
stroke_linecap,
stroke_linejoin,
stroke_miterlimit,
stroke_opacity,
stroke_width,
style,
systemLanguage,
text_anchor,
text_decoration,
transform,
type,
vector_effect,
version,
viewBox,
width,
x,
y,
x1,
y1,
x2,
y2,
viewport_fill,
viewport_fill_opacity,
visibility,
UNSUPPORTED;
private static final Map<String, SVGAttr> cache = new HashMap();
static {
SVGAttr[] values;
for (SVGAttr sVGAttr : values()) {
if (sVGAttr == CLASS) {
cache.put(Action.CLASS_ATTRIBUTE, sVGAttr);
} else if (sVGAttr != UNSUPPORTED) {
cache.put(sVGAttr.name().replace('_', CoreConstants.DASH_CHAR), sVGAttr);
}
}
}
public static SVGAttr fromString(String str) {
SVGAttr sVGAttr = cache.get(str);
return sVGAttr != null ? sVGAttr : UNSUPPORTED;
}
}
public enum SVGElem {
svg,
a,
circle,
clipPath,
defs,
desc,
ellipse,
g,
image,
line,
linearGradient,
marker,
mask,
path,
pattern,
polygon,
polyline,
radialGradient,
rect,
solidColor,
stop,
style,
SWITCH,
symbol,
text,
textPath,
title,
tref,
tspan,
use,
view,
UNSUPPORTED;
private static final Map<String, SVGElem> cache = new HashMap();
static {
SVGElem[] values;
for (SVGElem sVGElem : values()) {
if (sVGElem == SWITCH) {
cache.put("switch", sVGElem);
} else if (sVGElem != UNSUPPORTED) {
cache.put(sVGElem.name(), sVGElem);
}
}
}
public static SVGElem fromString(String str) {
SVGElem sVGElem = cache.get(str);
return sVGElem != null ? sVGElem : UNSUPPORTED;
}
}
public static class a {
private static final Map<String, PreserveAspectRatio.Alignment> f1022a;
static {
HashMap hashMap = new HashMap(10);
f1022a = hashMap;
hashMap.put("none", PreserveAspectRatio.Alignment.none);
f1022a.put("xMinYMin", PreserveAspectRatio.Alignment.xMinYMin);
f1022a.put("xMidYMin", PreserveAspectRatio.Alignment.xMidYMin);
f1022a.put("xMaxYMin", PreserveAspectRatio.Alignment.xMaxYMin);
f1022a.put("xMinYMid", PreserveAspectRatio.Alignment.xMinYMid);
f1022a.put("xMidYMid", PreserveAspectRatio.Alignment.xMidYMid);
f1022a.put("xMaxYMid", PreserveAspectRatio.Alignment.xMaxYMid);
f1022a.put("xMinYMax", PreserveAspectRatio.Alignment.xMinYMax);
f1022a.put("xMidYMax", PreserveAspectRatio.Alignment.xMidYMax);
f1022a.put("xMaxYMax", PreserveAspectRatio.Alignment.xMaxYMax);
}
static PreserveAspectRatio.Alignment a(String str) {
return f1022a.get(str);
}
}
public static class b {
private static final Map<String, Integer> f1023a;
static {
HashMap hashMap = new HashMap(47);
f1023a = hashMap;
hashMap.put("aliceblue", -984833);
f1023a.put("antiquewhite", -332841);
f1023a.put("aqua", -16711681);
f1023a.put("aquamarine", -8388652);
f1023a.put("azure", -983041);
f1023a.put("beige", -657956);
f1023a.put("bisque", -6972);
f1023a.put("black", Integer.valueOf((int) ViewCompat.MEASURED_STATE_MASK));
f1023a.put("blanchedalmond", -5171);
f1023a.put("blue", -16776961);
f1023a.put("blueviolet", -7722014);
f1023a.put("brown", -5952982);
f1023a.put("burlywood", -2180985);
f1023a.put("cadetblue", -10510688);
f1023a.put("chartreuse", -8388864);
f1023a.put("chocolate", -2987746);
f1023a.put("coral", -32944);
f1023a.put("cornflowerblue", -10185235);
f1023a.put("cornsilk", -1828);
f1023a.put("crimson", -2354116);
f1023a.put("cyan", -16711681);
f1023a.put("darkblue", -16777077);
f1023a.put("darkcyan", -16741493);
f1023a.put("darkgoldenrod", -4684277);
f1023a.put("darkgray", -5658199);
f1023a.put("darkgreen", -16751616);
f1023a.put("darkgrey", -5658199);
f1023a.put("darkkhaki", -4343957);
f1023a.put("darkmagenta", -7667573);
f1023a.put("darkolivegreen", -11179217);
f1023a.put("darkorange", -29696);
f1023a.put("darkorchid", -6737204);
f1023a.put("darkred", -7667712);
f1023a.put("darksalmon", -1468806);
f1023a.put("darkseagreen", -7357297);
f1023a.put("darkslateblue", -12042869);
f1023a.put("darkslategray", -13676721);
f1023a.put("darkslategrey", -13676721);
f1023a.put("darkturquoise", -16724271);
f1023a.put("darkviolet", -7077677);
f1023a.put("deeppink", -60269);
f1023a.put("deepskyblue", -16728065);
f1023a.put("dimgray", -9868951);
f1023a.put("dimgrey", -9868951);
f1023a.put("dodgerblue", -14774017);
f1023a.put("firebrick", -5103070);
f1023a.put("floralwhite", -1296);
f1023a.put("forestgreen", -14513374);
f1023a.put("fuchsia", -65281);
f1023a.put("gainsboro", -2302756);
f1023a.put("ghostwhite", -460545);
f1023a.put("gold", -10496);
f1023a.put("goldenrod", -2448096);
f1023a.put("gray", -8355712);
f1023a.put("green", -16744448);
f1023a.put("greenyellow", -5374161);
f1023a.put("grey", -8355712);
f1023a.put("honeydew", -983056);
f1023a.put("hotpink", -38476);
f1023a.put("indianred", -3318692);
f1023a.put("indigo", -11861886);
f1023a.put("ivory", -16);
f1023a.put("khaki", -989556);
f1023a.put("lavender", -1644806);
f1023a.put("lavenderblush", -3851);
f1023a.put("lawngreen", -8586240);
f1023a.put("lemonchiffon", -1331);
f1023a.put("lightblue", -5383962);
f1023a.put("lightcoral", -1015680);
f1023a.put("lightcyan", -2031617);
f1023a.put("lightgoldenrodyellow", -329006);
f1023a.put("lightgray", -2894893);
f1023a.put("lightgreen", -7278960);
f1023a.put("lightgrey", -2894893);
f1023a.put("lightpink", -18751);
f1023a.put("lightsalmon", -24454);
f1023a.put("lightseagreen", -14634326);
f1023a.put("lightskyblue", -7876870);
f1023a.put("lightslategray", -8943463);
f1023a.put("lightslategrey", -8943463);
f1023a.put("lightsteelblue", -5192482);
f1023a.put("lightyellow", -32);
f1023a.put("lime", -16711936);
f1023a.put("limegreen", -13447886);
f1023a.put("linen", -331546);
f1023a.put("magenta", -65281);
f1023a.put("maroon", -8388608);
f1023a.put("mediumaquamarine", -10039894);
f1023a.put("mediumblue", -16777011);
f1023a.put("mediumorchid", -4565549);
f1023a.put("mediumpurple", -7114533);
f1023a.put("mediumseagreen", -12799119);
f1023a.put("mediumslateblue", -8689426);
f1023a.put("mediumspringgreen", -16713062);
f1023a.put("mediumturquoise", -12004916);
f1023a.put("mediumvioletred", -3730043);
f1023a.put("midnightblue", -15132304);
f1023a.put("mintcream", -655366);
f1023a.put("mistyrose", -6943);
f1023a.put("moccasin", -6987);
f1023a.put("navajowhite", -8531);
f1023a.put("navy", -16777088);
f1023a.put("oldlace", -133658);
f1023a.put("olive", -8355840);
f1023a.put("olivedrab", -9728477);
f1023a.put("orange", -23296);
f1023a.put("orangered", -47872);
f1023a.put("orchid", -2461482);
f1023a.put("palegoldenrod", -1120086);
f1023a.put("palegreen", -6751336);
f1023a.put("paleturquoise", -5247250);
f1023a.put("palevioletred", -2396013);
f1023a.put("papayawhip", -4139);
f1023a.put("peachpuff", -9543);
f1023a.put("peru", -3308225);
f1023a.put("pink", -16181);
f1023a.put("plum", -2252579);
f1023a.put("powderblue", -5185306);
f1023a.put("purple", -8388480);
f1023a.put("rebeccapurple", -10079335);
f1023a.put("red", Integer.valueOf((int) SupportMenu.CATEGORY_MASK));
f1023a.put("rosybrown", -4419697);
f1023a.put("royalblue", -12490271);
f1023a.put("saddlebrown", -7650029);
f1023a.put("salmon", -360334);
f1023a.put("sandybrown", -744352);
f1023a.put("seagreen", -13726889);
f1023a.put("seashell", -2578);
f1023a.put("sienna", -6270419);
f1023a.put("silver", -4144960);
f1023a.put("skyblue", -7876885);
f1023a.put("slateblue", -9807155);
f1023a.put("slategray", -9404272);
f1023a.put("slategrey", -9404272);
f1023a.put("snow", -1286);
f1023a.put("springgreen", -16711809);
f1023a.put("steelblue", -12156236);
f1023a.put("tan", -2968436);
f1023a.put("teal", -16744320);
f1023a.put("thistle", -2572328);
f1023a.put("tomato", -40121);
f1023a.put("turquoise", -12525360);
f1023a.put("violet", -1146130);
f1023a.put("wheat", -663885);
f1023a.put("white", -1);
f1023a.put("whitesmoke", -657931);
f1023a.put("yellow", Integer.valueOf((int) InputDeviceCompat.SOURCE_ANY));
f1023a.put("yellowgreen", -6632142);
f1023a.put("transparent", 0);
}
static Integer a(String str) {
return f1023a.get(str);
}
}
public static class c {
private static final Map<String, SVG.n> f1024a;
static {
HashMap hashMap = new HashMap(9);
f1024a = hashMap;
hashMap.put("xx-small", new SVG.n(0.694f, SVG.Unit.pt));
f1024a.put("x-small", new SVG.n(0.833f, SVG.Unit.pt));
f1024a.put("small", new SVG.n(10.0f, SVG.Unit.pt));
f1024a.put("medium", new SVG.n(12.0f, SVG.Unit.pt));
f1024a.put("large", new SVG.n(14.4f, SVG.Unit.pt));
f1024a.put("x-large", new SVG.n(17.3f, SVG.Unit.pt));
f1024a.put("xx-large", new SVG.n(20.7f, SVG.Unit.pt));
f1024a.put("smaller", new SVG.n(83.33f, SVG.Unit.percent));
f1024a.put("larger", new SVG.n(120.0f, SVG.Unit.percent));
}
static SVG.n a(String str) {
return f1024a.get(str);
}
}
public static class d {
private static final Map<String, Integer> f1025a;
static {
HashMap hashMap = new HashMap(13);
f1025a = hashMap;
hashMap.put("normal", 400);
f1025a.put("bold", 700);
f1025a.put("bolder", 1);
f1025a.put("lighter", -1);
f1025a.put("100", 100);
f1025a.put("200", Integer.valueOf((int) ItemTouchHelper.Callback.DEFAULT_DRAG_ANIMATION_DURATION));
f1025a.put("300", 300);
f1025a.put("400", 400);
f1025a.put("500", 500);
f1025a.put("600", 600);
f1025a.put("700", 700);
f1025a.put("800", 800);
f1025a.put("900", 900);
}
static Integer a(String str) {
return f1025a.get(str);
}
}
public class e extends DefaultHandler2 {
private e() {
}
e(SVGParser sVGParser, byte b) {
this();
}
@Override
public final void characters(char[] cArr, int i, int i2) {
SVGParser.this.a(new String(cArr, i, i2));
}
@Override
public final void endDocument() {
}
@Override
public final void endElement(String str, String str2, String str3) {
SVGParser.this.a(str, str2, str3);
}
@Override
public final void processingInstruction(String str, String str2) {
SVGParser.a(str, SVGParser.a(new f(str2)));
}
@Override
public final void startDocument() {
SVGParser.this.a();
}
@Override
public final void startElement(String str, String str2, String str3, Attributes attributes) {
SVGParser.this.a(str, str2, str3, attributes);
}
}
public static class f {
String f1027a;
int c;
int b = 0;
private com.caverock.androidsvg.d d = new com.caverock.androidsvg.d();
public f(String str) {
this.c = 0;
String trim = str.trim();
this.f1027a = trim;
this.c = trim.length();
}
private Boolean a() {
int i = this.b;
if (i == this.c) {
return null;
}
char charAt = this.f1027a.charAt(i);
if (charAt == '0' || charAt == '1') {
this.b++;
return Boolean.valueOf(charAt == '1');
}
return null;
}
public static boolean b(int i) {
return i == 32 || i == 10 || i == 13 || i == 9;
}
final float a(float f) {
if (Float.isNaN(f)) {
return Float.NaN;
}
f();
return g();
}
final float a(Boolean bool) {
if (bool == null) {
return Float.NaN;
}
f();
return g();
}
final Boolean a(Object obj) {
if (obj == null) {
return null;
}
f();
return a();
}
public final String a(char c, boolean z) {
if (d()) {
return null;
}
char charAt = this.f1027a.charAt(this.b);
if ((z || !b((int) charAt)) && charAt != c) {
int i = this.b;
int k = k();
while (k != -1 && k != c && (z || !b(k))) {
k = k();
}
return this.f1027a.substring(i, this.b);
}
return null;
}
public final boolean a(char c) {
int i = this.b;
boolean z = i < this.c && this.f1027a.charAt(i) == c;
if (z) {
this.b++;
}
return z;
}
public final boolean a(String str) {
int length = str.length();
int i = this.b;
boolean z = i <= this.c - length && this.f1027a.substring(i, i + length).equals(str);
if (z) {
this.b += length;
}
return z;
}
final String b(char c) {
return a(c, false);
}
public final boolean d() {
return this.b == this.c;
}
public final void e() {
while (true) {
int i = this.b;
if (i >= this.c || !b((int) this.f1027a.charAt(i))) {
return;
}
this.b++;
}
}
public final boolean f() {
e();
int i = this.b;
if (i != this.c && this.f1027a.charAt(i) == ',') {
this.b++;
e();
return true;
}
return false;
}
final float g() {
float a2 = this.d.a(this.f1027a, this.b, this.c);
if (!Float.isNaN(a2)) {
this.b = this.d.f1031a;
}
return a2;
}
final float h() {
f();
float a2 = this.d.a(this.f1027a, this.b, this.c);
if (!Float.isNaN(a2)) {
this.b = this.d.f1031a;
}
return a2;
}
public final Integer i() {
int i = this.b;
if (i == this.c) {
return null;
}
String str = this.f1027a;
this.b = i + 1;
return Integer.valueOf(str.charAt(i));
}
final SVG.n j() {
float g = g();
if (Float.isNaN(g)) {
return null;
}
SVG.Unit p = p();
return p == null ? new SVG.n(g, SVG.Unit.px) : new SVG.n(g, p);
}
public final int k() {
int i = this.b;
int i2 = this.c;
if (i == i2) {
return -1;
}
int i3 = i + 1;
this.b = i3;
if (i3 < i2) {
return this.f1027a.charAt(i3);
}
return -1;
}
final String l() {
return a(' ', false);
}
public final String m() {
if (d()) {
return null;
}
int i = this.b;
char charAt = this.f1027a.charAt(i);
if ((charAt < 'A' || charAt > 'Z') && (charAt < 'a' || charAt > 'z')) {
this.b = i;
return null;
}
int k = k();
while (true) {
if ((k < 65 || k > 90) && (k < 97 || k > 122)) {
break;
}
k = k();
}
return this.f1027a.substring(i, this.b);
}
final String n() {
if (d()) {
return null;
}
int i = this.b;
int charAt = this.f1027a.charAt(i);
while (true) {
if ((charAt < 97 || charAt > 122) && (charAt < 65 || charAt > 90)) {
break;
}
charAt = k();
}
int i2 = this.b;
while (b(charAt)) {
charAt = k();
}
if (charAt == 40) {
this.b++;
return this.f1027a.substring(i, i2);
}
this.b = i;
return null;
}
final String o() {
int i = this.b;
while (!d() && !b((int) this.f1027a.charAt(this.b))) {
this.b++;
}
String substring = this.f1027a.substring(i, this.b);
this.b = i;
return substring;
}
final SVG.Unit p() {
if (d()) {
return null;
}
if (this.f1027a.charAt(this.b) == '%') {
this.b++;
return SVG.Unit.percent;
}
int i = this.b;
if (i > this.c - 2) {
return null;
}
try {
SVG.Unit valueOf = SVG.Unit.valueOf(this.f1027a.substring(i, i + 2).toLowerCase(Locale.US));
this.b += 2;
return valueOf;
} catch (IllegalArgumentException unused) {
return null;
}
}
final boolean q() {
int i = this.b;
if (i == this.c) {
return false;
}
char charAt = this.f1027a.charAt(i);
if (charAt < 'a' || charAt > 'z') {
return charAt >= 'A' && charAt <= 'Z';
}
return true;
}
public final String r() {
int k;
if (d()) {
return null;
}
int i = this.b;
char charAt = this.f1027a.charAt(i);
if (charAt == '\'' || charAt == '\"') {
do {
k = k();
if (k == -1) {
break;
}
} while (k != charAt);
if (k == -1) {
this.b = i;
return null;
}
int i2 = this.b + 1;
this.b = i2;
return this.f1027a.substring(i + 1, i2 - 1);
}
return null;
}
final String s() {
if (d()) {
return null;
}
int i = this.b;
this.b = this.c;
return this.f1027a.substring(i);
}
}
public class g implements Attributes {
private XmlPullParser b;
public g(XmlPullParser xmlPullParser) {
this.b = xmlPullParser;
}
@Override
public final int getIndex(String str) {
return -1;
}
@Override
public final int getIndex(String str, String str2) {
return -1;
}
@Override
public final int getLength() {
return this.b.getAttributeCount();
}
@Override
public final String getLocalName(int i) {
return this.b.getAttributeName(i);
}
@Override
public final String getQName(int i) {
String attributeName = this.b.getAttributeName(i);
if (this.b.getAttributePrefix(i) != null) {
return this.b.getAttributePrefix(i) + CoreConstants.COLON_CHAR + attributeName;
}
return attributeName;
}
@Override
public final String getType(int i) {
return null;
}
@Override
public final String getType(String str) {
return null;
}
@Override
public final String getType(String str, String str2) {
return null;
}
@Override
public final String getURI(int i) {
return this.b.getAttributeNamespace(i);
}
@Override
public final String getValue(int i) {
return this.b.getAttributeValue(i);
}
@Override
public final String getValue(String str) {
return null;
}
@Override
public final String getValue(String str, String str2) {
return null;
}
}
private static SVG.Style.VectorEffect A(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode != 3387192) {
if (hashCode == 1629199934 && str.equals("non-scaling-stroke")) {
c2 = 1;
}
c2 = 65535;
} else {
if (str.equals("none")) {
c2 = 0;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
return null;
}
return SVG.Style.VectorEffect.NonScalingStroke;
}
return SVG.Style.VectorEffect.None;
}
private void A(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.q qVar = new SVG.q();
qVar.u = this.f1019a;
qVar.v = this.b;
a((SVG.ai) qVar, attributes);
b(qVar, attributes);
a((SVG.ad) qVar, attributes);
a(qVar, attributes);
this.b.a(qVar);
this.b = qVar;
}
private static SVG.Style.RenderQuality B(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode == -933002398) {
if (str.equals("optimizeQuality")) {
c2 = 1;
}
c2 = 65535;
} else if (hashCode != 3005871) {
if (hashCode == 362741610 && str.equals("optimizeSpeed")) {
c2 = 2;
}
c2 = 65535;
} else {
if (str.equals("auto")) {
c2 = 0;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
if (c2 != 2) {
return null;
}
return SVG.Style.RenderQuality.optimizeSpeed;
}
return SVG.Style.RenderQuality.optimizeQuality;
}
return SVG.Style.RenderQuality.auto;
}
private void B(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
String str = "all";
boolean z = true;
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 88) {
z = trim.equals("text/css");
} else if (i2 == 89) {
str = trim;
}
}
if (z && CSSParser.a(str, CSSParser.MediaType.screen)) {
this.h = true;
return;
}
this.c = true;
this.d = 1;
}
private static SVG.u C(String str) {
float a2;
float a3;
float f2;
float f3;
f fVar = new f(str);
SVG.u uVar = new SVG.u();
if (fVar.d()) {
return uVar;
}
int intValue = fVar.i().intValue();
int i = 109;
if (intValue != 77 && intValue != 109) {
return uVar;
}
int i2 = intValue;
float f4 = 0.0f;
float f5 = 0.0f;
float f6 = 0.0f;
float f7 = 0.0f;
float f8 = 0.0f;
float f9 = 0.0f;
while (true) {
fVar.e();
switch (i2) {
case 65:
case 97:
float g2 = fVar.g();
float a4 = fVar.a(g2);
float a5 = fVar.a(a4);
Boolean a6 = fVar.a(Float.valueOf(a5));
Boolean a7 = fVar.a((Object) a6);
float a8 = fVar.a(a7);
float a9 = fVar.a(a8);
if (!Float.isNaN(a9) && g2 >= 0.0f && a4 >= 0.0f) {
if (i2 == 97) {
a8 += f4;
a9 += f6;
}
uVar.a(g2, a4, a5, a6.booleanValue(), a7.booleanValue(), a8, a9);
f4 = a8;
f5 = f4;
f6 = a9;
f7 = f6;
break;
}
break;
case 67:
case 99:
float g3 = fVar.g();
float a10 = fVar.a(g3);
float a11 = fVar.a(a10);
float a12 = fVar.a(a11);
a2 = fVar.a(a12);
a3 = fVar.a(a2);
if (!Float.isNaN(a3)) {
if (i2 == 99) {
a2 += f4;
a3 += f6;
g3 += f4;
a10 += f6;
a11 += f4;
a12 += f6;
}
f2 = a11;
f3 = a12;
uVar.a(g3, a10, f2, f3, a2, a3);
f5 = f2;
f4 = a2;
f7 = f3;
f6 = a3;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 72:
case 104:
float g4 = fVar.g();
if (!Float.isNaN(g4)) {
if (i2 == 104) {
g4 += f4;
}
f4 = g4;
uVar.b(f4, f6);
f5 = f4;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 76:
case 108:
float g5 = fVar.g();
float a13 = fVar.a(g5);
if (!Float.isNaN(a13)) {
if (i2 == 108) {
g5 += f4;
a13 += f6;
}
f4 = g5;
f6 = a13;
uVar.b(f4, f6);
f5 = f4;
f7 = f6;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 77:
case 109:
float g6 = fVar.g();
float a14 = fVar.a(g6);
if (!Float.isNaN(a14)) {
if (i2 == i && !uVar.a()) {
g6 += f4;
a14 += f6;
}
f4 = g6;
f6 = a14;
uVar.a(f4, f6);
f5 = f4;
f8 = f5;
f7 = f6;
f9 = f7;
i2 = i2 != i ? 76 : 108;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 81:
case 113:
f5 = fVar.g();
f7 = fVar.a(f5);
float a15 = fVar.a(f7);
float a16 = fVar.a(a15);
if (!Float.isNaN(a16)) {
if (i2 == 113) {
a15 += f4;
a16 += f6;
f5 += f4;
f7 += f6;
}
f4 = a15;
f6 = a16;
uVar.a(f5, f7, f4, f6);
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 83:
case 115:
float f10 = (f4 * 2.0f) - f5;
float f11 = (2.0f * f6) - f7;
float g7 = fVar.g();
float a17 = fVar.a(g7);
a2 = fVar.a(a17);
a3 = fVar.a(a2);
if (!Float.isNaN(a3)) {
if (i2 == 115) {
a2 += f4;
a3 += f6;
g7 += f4;
a17 += f6;
}
f2 = g7;
f3 = a17;
uVar.a(f10, f11, f2, f3, a2, a3);
f5 = f2;
f4 = a2;
f7 = f3;
f6 = a3;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 84:
case 116:
f5 = (f4 * 2.0f) - f5;
f7 = (2.0f * f6) - f7;
float g8 = fVar.g();
float a18 = fVar.a(g8);
if (!Float.isNaN(a18)) {
if (i2 == 116) {
g8 += f4;
a18 += f6;
}
f4 = g8;
f6 = a18;
uVar.a(f5, f7, f4, f6);
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 86:
case 118:
float g9 = fVar.g();
if (!Float.isNaN(g9)) {
if (i2 == 118) {
g9 += f6;
}
f6 = g9;
uVar.b(f4, f6);
f7 = f6;
break;
} else {
Log.e("SVGParser", "Bad path coords for " + ((char) i2) + " path segment");
return uVar;
}
case 90:
case 122:
uVar.a((byte) 8);
f4 = f8;
f5 = f4;
f6 = f9;
f7 = f6;
break;
default:
return uVar;
}
fVar.f();
if (fVar.d()) {
return uVar;
}
if (fVar.q()) {
i2 = fVar.i().intValue();
}
i = 109;
}
}
private static Set<String> D(String str) {
f fVar = new f(str);
HashSet hashSet = new HashSet();
while (!fVar.d()) {
String l = fVar.l();
if (l.startsWith("http://www.w3.org/TR/SVG11/feature#")) {
hashSet.add(l.substring(35));
} else {
hashSet.add("UNSUPPORTED");
}
fVar.e();
}
return hashSet;
}
private static Set<String> E(String str) {
f fVar = new f(str);
HashSet hashSet = new HashSet();
while (!fVar.d()) {
String l = fVar.l();
int indexOf = l.indexOf(45);
if (indexOf != -1) {
l = l.substring(0, indexOf);
}
hashSet.add(new Locale(l, "", "").getLanguage());
fVar.e();
}
return hashSet;
}
private static Set<String> F(String str) {
f fVar = new f(str);
HashSet hashSet = new HashSet();
while (!fVar.d()) {
hashSet.add(fVar.l());
fVar.e();
}
return hashSet;
}
private static String G(String str) {
if (!str.equals("none") && str.startsWith("url(")) {
return str.endsWith(")") ? str.substring(4, str.length() - 1).trim() : str.substring(4).trim();
}
return null;
}
private void H(String str) {
this.f1019a.a(new CSSParser(CSSParser.MediaType.screen, CSSParser.Source.Document).a(str));
}
private static float a(String str, int i) {
float a2 = new com.caverock.androidsvg.d().a(str, 0, i);
if (Float.isNaN(a2)) {
throw new i("Invalid float value: ".concat(String.valueOf(str)));
}
return a2;
}
private static int a(float f2) {
if (f2 < 0.0f) {
return 0;
}
if (f2 > 255.0f) {
return 255;
}
return Math.round(f2);
}
private static int a(float f2, float f3, float f4) {
int i = (f2 > 0.0f ? 1 : (f2 == 0.0f ? 0 : -1));
float f5 = f2 % 360.0f;
if (i < 0) {
f5 += 360.0f;
}
float f6 = f5 / 60.0f;
float f7 = f3 / 100.0f;
float f8 = f4 / 100.0f;
if (f7 < 0.0f) {
f7 = 0.0f;
} else if (f7 > 1.0f) {
f7 = 1.0f;
}
float f9 = f8 >= 0.0f ? f8 > 1.0f ? 1.0f : f8 : 0.0f;
float f10 = f9 <= 0.5f ? (f7 + 1.0f) * f9 : (f9 + f7) - (f7 * f9);
float f11 = (f9 * 2.0f) - f10;
return a(b(f11, f10, f6 - 2.0f) * 256.0f) | (a(b(f11, f10, f6 + 2.0f) * 256.0f) << 16) | (a(b(f11, f10, f6) * 256.0f) << 8);
}
static Map<String, String> a(f fVar) {
HashMap hashMap = new HashMap();
fVar.e();
String b2 = fVar.b('=');
while (b2 != null) {
fVar.a('=');
hashMap.put(b2, fVar.r());
fVar.e();
b2 = fVar.b('=');
}
return hashMap;
}
private static void a(SVG.Style style, String str) {
String b2;
if ("|caption|icon|menu|message-box|small-caption|status-bar|".contains("|" + str + '|')) {
f fVar = new f(str);
Integer num = null;
SVG.Style.FontStyle fontStyle = null;
String str2 = null;
while (true) {
b2 = fVar.b('/');
fVar.e();
if (b2 != null) {
if (num != null && fontStyle != null) {
break;
} else if (!b2.equals("normal") && (num != null || (num = d.a(b2)) == null)) {
if (fontStyle != null || (fontStyle = q(b2)) == null) {
if (str2 != null || !b2.equals("small-caps")) {
break;
}
str2 = b2;
}
}
} else {
return;
}
}
SVG.n p = p(b2);
if (fVar.a('/')) {
fVar.e();
String l = fVar.l();
if (l != null) {
try {
e(l);
} catch (i unused) {
return;
}
}
fVar.e();
}
style.o = o(fVar.s());
style.p = p;
style.q = Integer.valueOf(num == null ? 400 : num.intValue());
if (fontStyle == null) {
fontStyle = SVG.Style.FontStyle.Normal;
}
style.r = fontStyle;
style.f989a |= 122880;
}
}
public static void a(SVG.Style style, String str, String str2) {
if (str2.length() == 0 || str2.equals("inherit")) {
return;
}
switch (SVGAttr.fromString(str)) {
case fill:
style.b = k(str2);
if (style.b != null) {
style.f989a |= 1;
return;
}
return;
case fill_rule:
style.c = t(str2);
if (style.c != null) {
style.f989a |= 2;
return;
}
return;
case fill_opacity:
style.d = h(str2);
if (style.d != null) {
style.f989a |= 4;
return;
}
return;
case stroke:
style.e = k(str2);
if (style.e != null) {
style.f989a |= 8;
return;
}
return;
case stroke_opacity:
style.f = h(str2);
if (style.f != null) {
style.f989a |= 16;
return;
}
return;
case stroke_width:
try {
style.g = e(str2);
style.f989a |= 32;
return;
} catch (i unused) {
return;
}
case stroke_linecap:
style.h = u(str2);
if (style.h != null) {
style.f989a |= 64;
return;
}
return;
case stroke_linejoin:
style.i = v(str2);
if (style.i != null) {
style.f989a |= 128;
return;
}
return;
case stroke_miterlimit:
try {
style.j = Float.valueOf(g(str2));
style.f989a |= 256;
return;
} catch (i unused2) {
return;
}
case stroke_dasharray:
if ("none".equals(str2)) {
style.k = null;
style.f989a |= 512;
return;
}
style.k = w(str2);
if (style.k != null) {
style.f989a |= 512;
return;
}
return;
case stroke_dashoffset:
try {
style.l = e(str2);
style.f989a |= 1024;
return;
} catch (i unused3) {
return;
}
case opacity:
style.m = h(str2);
style.f989a |= PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH;
return;
case color:
try {
style.n = m(str2);
style.f989a |= PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM;
return;
} catch (i unused4) {
return;
}
case font:
a(style, str2);
return;
case font_family:
style.o = o(str2);
if (style.o != null) {
style.f989a |= 8192;
return;
}
return;
case font_size:
style.p = p(str2);
if (style.p != null) {
style.f989a |= PlaybackStateCompat.ACTION_PREPARE;
return;
}
return;
case font_weight:
style.q = d.a(str2);
if (style.q != null) {
style.f989a |= PlaybackStateCompat.ACTION_PREPARE_FROM_MEDIA_ID;
return;
}
return;
case font_style:
style.r = q(str2);
if (style.r != null) {
style.f989a |= PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH;
return;
}
return;
case text_decoration:
style.s = r(str2);
if (style.s != null) {
style.f989a |= PlaybackStateCompat.ACTION_PREPARE_FROM_URI;
return;
}
return;
case direction:
style.t = s(str2);
if (style.t != null) {
style.f989a |= 68719476736L;
return;
}
return;
case text_anchor:
style.u = x(str2);
if (style.u != null) {
style.f989a |= PlaybackStateCompat.ACTION_SET_REPEAT_MODE;
return;
}
return;
case overflow:
style.v = y(str2);
if (style.v != null) {
style.f989a |= PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE_ENABLED;
return;
}
return;
case marker:
style.x = G(str2);
style.y = style.x;
style.z = style.x;
style.f989a |= 14680064;
return;
case marker_start:
style.x = G(str2);
style.f989a |= PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE;
return;
case marker_mid:
style.y = G(str2);
style.f989a |= 4194304;
return;
case marker_end:
style.z = G(str2);
style.f989a |= 8388608;
return;
case display:
if (str2.indexOf(124) < 0) {
if ("|inline|block|list-item|run-in|compact|marker|table|inline-table|table-row-group|table-header-group|table-footer-group|table-row|table-column-group|table-column|table-cell|table-caption|none|".contains("|" + str2 + '|')) {
style.A = Boolean.valueOf(!str2.equals("none"));
style.f989a |= 16777216;
return;
}
return;
}
return;
case visibility:
if (str2.indexOf(124) < 0) {
if ("|visible|hidden|collapse|".contains("|" + str2 + '|')) {
style.B = Boolean.valueOf(str2.equals("visible"));
style.f989a |= 33554432;
return;
}
return;
}
return;
case stop_color:
if (str2.equals("currentColor")) {
style.C = SVG.f.a();
} else {
try {
style.C = m(str2);
} catch (i e2) {
Log.w("SVGParser", e2.getMessage());
return;
}
}
style.f989a |= 67108864;
return;
case stop_opacity:
style.D = h(str2);
style.f989a |= 134217728;
return;
case clip:
style.w = z(str2);
if (style.w != null) {
style.f989a |= 1048576;
return;
}
return;
case clip_path:
style.E = G(str2);
style.f989a |= 268435456;
return;
case clip_rule:
style.F = t(str2);
style.f989a |= 536870912;
return;
case mask:
style.G = G(str2);
style.f989a |= FileSize.GB_COEFFICIENT;
return;
case solid_color:
if (str2.equals("currentColor")) {
style.H = SVG.f.a();
} else {
try {
style.H = m(str2);
} catch (i e3) {
Log.w("SVGParser", e3.getMessage());
return;
}
}
style.f989a |= 2147483648L;
return;
case solid_opacity:
style.I = h(str2);
style.f989a |= 4294967296L;
return;
case viewport_fill:
if (str2.equals("currentColor")) {
style.J = SVG.f.a();
} else {
try {
style.J = m(str2);
} catch (i e4) {
Log.w("SVGParser", e4.getMessage());
return;
}
}
style.f989a |= 8589934592L;
return;
case viewport_fill_opacity:
style.K = h(str2);
style.f989a |= 17179869184L;
return;
case vector_effect:
style.L = A(str2);
if (style.L != null) {
style.f989a |= 34359738368L;
return;
}
return;
case image_rendering:
style.M = B(str2);
if (style.M != null) {
style.f989a |= 137438953472L;
return;
}
return;
default:
return;
}
}
private static void a(SVG.ab abVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()] == 37) {
abVar.f991a = c(trim);
}
}
}
private static void a(SVG.ac acVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
acVar.f992a = e(trim);
} else if (i2 == 2) {
acVar.b = e(trim);
} else if (i2 == 3) {
acVar.c = e(trim);
if (acVar.c.b()) {
throw new i("Invalid <svg> element. width cannot be negative");
}
} else if (i2 == 4) {
acVar.d = e(trim);
if (acVar.d.b()) {
throw new i("Invalid <svg> element. height cannot be negative");
}
} else if (i2 == 5) {
acVar.e = trim;
}
}
}
private static void a(SVG.ad adVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case requiredFeatures:
adVar.a(D(trim));
break;
case requiredExtensions:
adVar.a(trim);
break;
case systemLanguage:
adVar.b(E(trim));
break;
case requiredFormats:
adVar.c(F(trim));
break;
case requiredFonts:
List<String> o = o(trim);
adVar.d(o != null ? new HashSet(o) : new HashSet(0));
break;
}
}
}
private static void a(SVG.ai aiVar, String str) {
f fVar = new f(str.replaceAll("/\\*.*?\\*/", ""));
while (true) {
String a2 = fVar.a(CoreConstants.COLON_CHAR, false);
fVar.e();
if (!fVar.a(CoreConstants.COLON_CHAR)) {
return;
}
fVar.e();
String a3 = fVar.a(';', true);
if (a3 == null) {
return;
}
fVar.e();
if (fVar.d() || fVar.a(';')) {
if (aiVar.s == null) {
aiVar.s = new SVG.Style();
}
a(aiVar.s, a2, a3);
fVar.e();
}
}
}
private static void a(SVG.ai aiVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String qName = attributes.getQName(i);
if (qName.equals("id") || qName.equals("xml:id")) {
aiVar.p = attributes.getValue(i).trim();
return;
} else if (qName.equals("xml:space")) {
String trim = attributes.getValue(i).trim();
if ("default".equals(trim)) {
aiVar.q = Boolean.FALSE;
return;
} else if (!"preserve".equals(trim)) {
throw new i("Invalid value for \"xml:space\" attribute: ".concat(String.valueOf(trim)));
} else {
aiVar.q = Boolean.TRUE;
return;
}
}
}
}
private static void a(SVG.aj ajVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case x1:
ajVar.f = e(trim);
break;
case y1:
ajVar.g = e(trim);
break;
case x2:
ajVar.h = e(trim);
break;
case y2:
ajVar.i = e(trim);
break;
}
}
}
private static void a(SVG.am amVar, String str) {
amVar.w = j(str);
}
private static void a(SVG.an anVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 35) {
anVar.i = e(trim);
} else if (i2 != 36) {
switch (i2) {
case 12:
anVar.f = e(trim);
continue;
case 13:
anVar.g = e(trim);
continue;
case 14:
anVar.h = e(trim);
if (anVar.h.b()) {
throw new i("Invalid <radialGradient> element. r cannot be negative");
}
continue;
}
} else {
anVar.j = e(trim);
}
}
}
private static void a(SVG.ao aoVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 7) {
a((SVG.am) aoVar, trim);
} else if (i2 == 87) {
aoVar.x = i(trim);
}
}
}
private static void a(SVG.ar arVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()] == 6 && ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i)))) {
arVar.f993a = trim;
}
}
}
private static void a(SVG.aw awVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 != 6) {
if (i2 == 39) {
awVar.b = e(trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
awVar.f996a = trim;
}
}
}
private static void a(SVG.ax axVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
axVar.b = f(trim);
} else if (i2 == 2) {
axVar.c = f(trim);
} else if (i2 == 19) {
axVar.d = f(trim);
} else if (i2 == 20) {
axVar.e = f(trim);
}
}
}
private static void a(SVG.ba baVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
baVar.c = e(trim);
} else if (i2 == 2) {
baVar.d = e(trim);
} else if (i2 == 3) {
baVar.e = e(trim);
if (baVar.e.b()) {
throw new i("Invalid <use> element. width cannot be negative");
}
} else if (i2 == 4) {
baVar.f = e(trim);
if (baVar.f.b()) {
throw new i("Invalid <use> element. height cannot be negative");
}
} else if (i2 == 6 && ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i)))) {
baVar.f999a = trim;
}
}
}
private static void a(SVG.c cVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case cx:
cVar.f1000a = e(trim);
break;
case cy:
cVar.b = e(trim);
break;
case r:
cVar.c = e(trim);
if (cVar.c.b()) {
throw new i("Invalid <circle> element. r cannot be negative");
}
break;
}
}
}
private static void a(SVG.d dVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()] == 38) {
if ("objectBoundingBox".equals(trim)) {
dVar.f1001a = Boolean.FALSE;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new i("Invalid value for attribute clipPathUnits");
} else {
dVar.f1001a = Boolean.TRUE;
}
}
}
}
private static void a(SVG.h hVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case rx:
hVar.c = e(trim);
if (hVar.c.b()) {
throw new i("Invalid <ellipse> element. rx cannot be negative");
}
break;
case ry:
hVar.d = e(trim);
if (hVar.d.b()) {
throw new i("Invalid <ellipse> element. ry cannot be negative");
}
break;
case cx:
hVar.f1004a = e(trim);
break;
case cy:
hVar.b = e(trim);
break;
}
}
}
private static void a(SVG.i iVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 != 6) {
switch (i2) {
case 32:
if (!"objectBoundingBox".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
iVar.b = Boolean.TRUE;
break;
} else {
throw new i("Invalid value for attribute gradientUnits");
}
} else {
iVar.b = Boolean.FALSE;
continue;
}
case 33:
iVar.c = d(trim);
continue;
case 34:
try {
iVar.d = SVG.GradientSpread.valueOf(trim);
continue;
} catch (IllegalArgumentException unused) {
throw new i("Invalid spreadMethod attribute. \"" + trim + "\" is not a valid value.");
}
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
iVar.e = trim;
}
}
}
private static void a(SVG.l lVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
if (SVGAttr.fromString(attributes.getLocalName(i)) == SVGAttr.transform) {
lVar.a(d(attributes.getValue(i)));
}
}
}
private static void a(SVG.m mVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
mVar.b = e(trim);
} else if (i2 == 2) {
mVar.c = e(trim);
} else if (i2 == 3) {
mVar.d = e(trim);
if (mVar.d.b()) {
throw new i("Invalid <use> element. width cannot be negative");
}
} else if (i2 == 4) {
mVar.e = e(trim);
if (mVar.e.b()) {
throw new i("Invalid <use> element. height cannot be negative");
}
} else if (i2 != 6) {
if (i2 == 7) {
a((SVG.am) mVar, trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
mVar.f1006a = trim;
}
}
}
private static void a(SVG.o oVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case x1:
oVar.f1008a = e(trim);
break;
case y1:
oVar.b = e(trim);
break;
case x2:
oVar.c = e(trim);
break;
case y2:
oVar.d = e(trim);
break;
}
}
}
private static void a(SVG.p pVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (SVGAttr.fromString(attributes.getLocalName(i))) {
case refX:
pVar.b = e(trim);
break;
case refY:
pVar.c = e(trim);
break;
case markerWidth:
pVar.d = e(trim);
if (pVar.d.b()) {
throw new i("Invalid <marker> element. markerWidth cannot be negative");
}
break;
case markerHeight:
pVar.e = e(trim);
if (pVar.e.b()) {
throw new i("Invalid <marker> element. markerHeight cannot be negative");
}
break;
case markerUnits:
if (!"strokeWidth".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
pVar.f1009a = true;
break;
} else {
throw new i("Invalid value for attribute markerUnits");
}
} else {
pVar.f1009a = false;
break;
}
case orient:
if ("auto".equals(trim)) {
pVar.f = Float.valueOf(Float.NaN);
break;
} else {
pVar.f = Float.valueOf(g(trim));
break;
}
}
}
}
private static void a(SVG.q qVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
qVar.c = e(trim);
} else if (i2 == 2) {
qVar.d = e(trim);
} else if (i2 == 3) {
qVar.e = e(trim);
if (qVar.e.b()) {
throw new i("Invalid <mask> element. width cannot be negative");
}
} else if (i2 == 4) {
qVar.f = e(trim);
if (qVar.f.b()) {
throw new i("Invalid <mask> element. height cannot be negative");
}
} else if (i2 != 43) {
if (i2 != 44) {
continue;
} else if ("objectBoundingBox".equals(trim)) {
qVar.b = Boolean.FALSE;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new i("Invalid value for attribute maskContentUnits");
} else {
qVar.b = Boolean.TRUE;
}
} else if ("objectBoundingBox".equals(trim)) {
qVar.f1010a = Boolean.FALSE;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new i("Invalid value for attribute maskUnits");
} else {
qVar.f1010a = Boolean.TRUE;
}
}
}
private static void a(SVG.t tVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 8) {
tVar.f1012a = C(trim);
} else if (i2 != 9) {
continue;
} else {
tVar.b = Float.valueOf(g(trim));
if (tVar.b.floatValue() < 0.0f) {
throw new i("Invalid <path> element. pathLength cannot be negative");
}
}
}
}
private static void a(SVG.w wVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
wVar.d = e(trim);
} else if (i2 == 2) {
wVar.e = e(trim);
} else if (i2 == 3) {
wVar.f = e(trim);
if (wVar.f.b()) {
throw new i("Invalid <pattern> element. width cannot be negative");
}
} else if (i2 == 4) {
wVar.g = e(trim);
if (wVar.g.b()) {
throw new i("Invalid <pattern> element. height cannot be negative");
}
} else if (i2 != 6) {
switch (i2) {
case 40:
if (!"objectBoundingBox".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
wVar.f1014a = Boolean.TRUE;
break;
} else {
throw new i("Invalid value for attribute patternUnits");
}
} else {
wVar.f1014a = Boolean.FALSE;
continue;
}
case 41:
if (!"objectBoundingBox".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
wVar.b = Boolean.TRUE;
break;
} else {
throw new i("Invalid value for attribute patternContentUnits");
}
} else {
wVar.b = Boolean.FALSE;
continue;
}
case 42:
wVar.c = d(trim);
continue;
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
wVar.h = trim;
}
}
}
private static void a(SVG.x xVar, Attributes attributes, String str) {
for (int i = 0; i < attributes.getLength(); i++) {
if (SVGAttr.fromString(attributes.getLocalName(i)) == SVGAttr.points) {
f fVar = new f(attributes.getValue(i));
ArrayList<Float> arrayList = new ArrayList();
fVar.e();
while (!fVar.d()) {
float g2 = fVar.g();
if (Float.isNaN(g2)) {
throw new i("Invalid <" + str + "> points attribute. Non-coordinate content found in list.");
}
fVar.f();
float g3 = fVar.g();
if (Float.isNaN(g3)) {
throw new i("Invalid <" + str + "> points attribute. There should be an even number of coordinates.");
}
fVar.f();
arrayList.add(Float.valueOf(g2));
arrayList.add(Float.valueOf(g3));
}
xVar.f1015a = new float[arrayList.size()];
int i2 = 0;
for (Float f2 : arrayList) {
xVar.f1015a[i2] = f2.floatValue();
i2++;
}
}
}
}
private static void a(SVG.z zVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
zVar.f1016a = e(trim);
} else if (i2 == 2) {
zVar.b = e(trim);
} else if (i2 == 3) {
zVar.c = e(trim);
if (zVar.c.b()) {
throw new i("Invalid <rect> element. width cannot be negative");
}
} else if (i2 == 4) {
zVar.d = e(trim);
if (zVar.d.b()) {
throw new i("Invalid <rect> element. height cannot be negative");
}
} else if (i2 == 10) {
zVar.f = e(trim);
if (zVar.f.b()) {
throw new i("Invalid <rect> element. rx cannot be negative");
}
} else if (i2 != 11) {
continue;
} else {
zVar.g = e(trim);
if (zVar.g.b()) {
throw new i("Invalid <rect> element. ry cannot be negative");
}
}
}
}
static void a(String str, Map<String, String> map) {
if (!str.equals("xml-stylesheet") || SVG.c() == null) {
return;
}
if (map.get("type") == null || "text/css".equals(map.get("type"))) {
if ((map.get("alternate") == null || "no".equals(map.get("alternate"))) && map.get("href") != null) {
SVG.c();
}
}
}
private void a(Attributes attributes) {
SVG.ac acVar = new SVG.ac();
acVar.u = this.f1019a;
acVar.v = this.b;
a((SVG.ai) acVar, attributes);
b(acVar, attributes);
a((SVG.ad) acVar, attributes);
a((SVG.ao) acVar, attributes);
a(acVar, attributes);
SVG.ag agVar = this.b;
if (agVar == null) {
this.f1019a.f987a = acVar;
} else {
agVar.a(acVar);
}
this.b = acVar;
}
private static float b(float f2, float f3, float f4) {
float f5;
if (f4 < 0.0f) {
f4 += 6.0f;
}
if (f4 >= 6.0f) {
f4 -= 6.0f;
}
if (f4 < 1.0f) {
f5 = (f3 - f2) * f4;
} else if (f4 < 3.0f) {
return f3;
} else {
if (f4 >= 4.0f) {
return f2;
}
f5 = (f3 - f2) * (4.0f - f4);
}
return f5 + f2;
}
private static SVG.n b(f fVar) {
return fVar.a("auto") ? new SVG.n(0.0f) : fVar.j();
}
private static void b(SVG.ai aiVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (trim.length() != 0) {
int i2 = AnonymousClass1.b[SVGAttr.fromString(attributes.getLocalName(i)).ordinal()];
if (i2 == 45) {
a(aiVar, trim);
} else if (i2 != 46) {
if (aiVar.r == null) {
aiVar.r = new SVG.Style();
}
a(aiVar.r, attributes.getLocalName(i), attributes.getValue(i).trim());
} else {
aiVar.t = CSSParser.b(trim);
}
}
}
}
private void b(InputStream inputStream, boolean z) {
try {
try {
XmlPullParser newPullParser = Xml.newPullParser();
g gVar = new g(newPullParser);
newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-docdecl", false);
newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-namespaces", true);
newPullParser.setInput(inputStream, null);
for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.nextToken()) {
if (eventType == 0) {
a();
} else if (eventType == 8) {
Log.d("SVGParser", "PROC INSTR: " + newPullParser.getText());
f fVar = new f(newPullParser.getText());
a(fVar.l(), a(fVar));
} else if (eventType != 10) {
if (eventType == 2) {
String name = newPullParser.getName();
if (newPullParser.getPrefix() != null) {
name = newPullParser.getPrefix() + CoreConstants.COLON_CHAR + name;
}
a(newPullParser.getNamespace(), newPullParser.getName(), name, gVar);
} else if (eventType == 3) {
String name2 = newPullParser.getName();
if (newPullParser.getPrefix() != null) {
name2 = newPullParser.getPrefix() + CoreConstants.COLON_CHAR + name2;
}
a(newPullParser.getNamespace(), newPullParser.getName(), name2);
} else if (eventType == 4) {
int[] iArr = new int[2];
char[] textCharacters = newPullParser.getTextCharacters(iArr);
int i = iArr[0];
int i2 = iArr[1];
if (!this.c) {
if (this.e) {
if (this.g == null) {
this.g = new StringBuilder(i2);
}
this.g.append(textCharacters, i, i2);
} else if (this.h) {
if (this.i == null) {
this.i = new StringBuilder(i2);
}
this.i.append(textCharacters, i, i2);
} else if (this.b instanceof SVG.av) {
b(new String(textCharacters, i, i2));
}
}
} else if (eventType == 5) {
a(newPullParser.getText());
}
} else if (z && this.f1019a.f987a == null && newPullParser.getText().contains("<!ENTITY ")) {
try {
Log.d("SVGParser", "Switching to SAX parser to process entities");
inputStream.reset();
Log.d("SVGParser", "Falling back to SAX parser");
try {
SAXParserFactory newInstance = SAXParserFactory.newInstance();
newInstance.setFeature("http://xml.org/sax/features/external-general-entities", false);
newInstance.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
XMLReader xMLReader = newInstance.newSAXParser().getXMLReader();
e eVar = new e(this, (byte) 0);
xMLReader.setContentHandler(eVar);
xMLReader.setProperty("http://xml.org/sax/properties/lexical-handler", eVar);
xMLReader.parse(new InputSource(inputStream));
return;
} catch (IOException e2) {
throw new i("Stream error", e2);
} catch (ParserConfigurationException e3) {
throw new i("XML parser problem", e3);
} catch (SAXException e4) {
throw new i("SVG parse error", e4);
}
} catch (IOException unused) {
Log.w("SVGParser", "Detected internal entity definitions, but could not parse them.");
return;
}
}
}
} catch (IOException e5) {
throw new i("Stream error", e5);
}
} catch (XmlPullParserException e6) {
throw new i("XML parser problem", e6);
}
}
private void b(String str) {
SVG.ae aeVar = (SVG.ae) this.b;
int size = aeVar.i.size();
SVG.ak akVar = size == 0 ? null : aeVar.i.get(size - 1);
if (!(akVar instanceof SVG.az)) {
this.b.a(new SVG.az(str));
return;
}
StringBuilder sb = new StringBuilder();
SVG.az azVar = (SVG.az) akVar;
sb.append(azVar.f997a);
sb.append(str);
azVar.f997a = sb.toString();
}
private void b(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.k kVar = new SVG.k();
kVar.u = this.f1019a;
kVar.v = this.b;
a((SVG.ai) kVar, attributes);
b(kVar, attributes);
a((SVG.l) kVar, attributes);
a((SVG.ad) kVar, attributes);
this.b.a(kVar);
this.b = kVar;
}
private static Float c(String str) {
if (str.length() != 0) {
int length = str.length();
boolean z = false;
if (str.charAt(str.length() - 1) == '%') {
length--;
z = true;
}
try {
float a2 = a(str, length);
float f2 = 100.0f;
if (z) {
a2 /= 100.0f;
}
if (a2 < 0.0f) {
f2 = 0.0f;
} else if (a2 <= 100.0f) {
f2 = a2;
}
return Float.valueOf(f2);
} catch (NumberFormatException e2) {
throw new i("Invalid offset value in <stop>: ".concat(String.valueOf(str)), e2);
}
}
throw new i("Invalid offset value in <stop> (empty string)");
}
private void c(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.g gVar = new SVG.g();
gVar.u = this.f1019a;
gVar.v = this.b;
a((SVG.ai) gVar, attributes);
b(gVar, attributes);
a((SVG.l) gVar, attributes);
this.b.a(gVar);
this.b = gVar;
}
private static Matrix d(String str) {
Matrix matrix = new Matrix();
f fVar = new f(str);
fVar.e();
while (!fVar.d()) {
String n = fVar.n();
if (n == null) {
throw new i("Bad transform function encountered in transform list: ".concat(String.valueOf(str)));
}
char c2 = 65535;
switch (n.hashCode()) {
case -1081239615:
if (n.equals("matrix")) {
c2 = 0;
break;
}
break;
case -925180581:
if (n.equals("rotate")) {
c2 = 3;
break;
}
break;
case 109250890:
if (n.equals("scale")) {
c2 = 2;
break;
}
break;
case 109493390:
if (n.equals("skewX")) {
c2 = 4;
break;
}
break;
case 109493391:
if (n.equals("skewY")) {
c2 = 5;
break;
}
break;
case 1052832078:
if (n.equals("translate")) {
c2 = 1;
break;
}
break;
}
if (c2 == 0) {
fVar.e();
float g2 = fVar.g();
fVar.f();
float g3 = fVar.g();
fVar.f();
float g4 = fVar.g();
fVar.f();
float g5 = fVar.g();
fVar.f();
float g6 = fVar.g();
fVar.f();
float g7 = fVar.g();
fVar.e();
if (Float.isNaN(g7) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
Matrix matrix2 = new Matrix();
matrix2.setValues(new float[]{g2, g4, g6, g3, g5, g7, 0.0f, 0.0f, 1.0f});
matrix.preConcat(matrix2);
} else if (c2 == 1) {
fVar.e();
float g8 = fVar.g();
float h = fVar.h();
fVar.e();
if (Float.isNaN(g8) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
if (Float.isNaN(h)) {
matrix.preTranslate(g8, 0.0f);
} else {
matrix.preTranslate(g8, h);
}
} else if (c2 == 2) {
fVar.e();
float g9 = fVar.g();
float h2 = fVar.h();
fVar.e();
if (Float.isNaN(g9) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
if (Float.isNaN(h2)) {
matrix.preScale(g9, g9);
} else {
matrix.preScale(g9, h2);
}
} else if (c2 == 3) {
fVar.e();
float g10 = fVar.g();
float h3 = fVar.h();
float h4 = fVar.h();
fVar.e();
if (Float.isNaN(g10) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
if (Float.isNaN(h3)) {
matrix.preRotate(g10);
} else if (Float.isNaN(h4)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
} else {
matrix.preRotate(g10, h3, h4);
}
} else if (c2 == 4) {
fVar.e();
float g11 = fVar.g();
fVar.e();
if (Float.isNaN(g11) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
matrix.preSkew((float) Math.tan(Math.toRadians(g11)), 0.0f);
} else if (c2 != 5) {
throw new i("Invalid transform list fn: " + n + ")");
} else {
fVar.e();
float g12 = fVar.g();
fVar.e();
if (Float.isNaN(g12) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Invalid transform list: ".concat(String.valueOf(str)));
}
matrix.preSkew(0.0f, (float) Math.tan(Math.toRadians(g12)));
}
if (fVar.d()) {
return matrix;
}
fVar.f();
}
return matrix;
}
private void d(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.ba baVar = new SVG.ba();
baVar.u = this.f1019a;
baVar.v = this.b;
a((SVG.ai) baVar, attributes);
b(baVar, attributes);
a((SVG.l) baVar, attributes);
a((SVG.ad) baVar, attributes);
a(baVar, attributes);
this.b.a(baVar);
this.b = baVar;
}
private static SVG.n e(String str) {
if (str.length() != 0) {
int length = str.length();
SVG.Unit unit = SVG.Unit.px;
char charAt = str.charAt(length - 1);
if (charAt == '%') {
length--;
unit = SVG.Unit.percent;
} else if (length > 2 && Character.isLetter(charAt) && Character.isLetter(str.charAt(length - 2))) {
length -= 2;
try {
unit = SVG.Unit.valueOf(str.substring(length).toLowerCase(Locale.US));
} catch (IllegalArgumentException unused) {
throw new i("Invalid length unit specifier: ".concat(String.valueOf(str)));
}
}
try {
return new SVG.n(a(str, length), unit);
} catch (NumberFormatException e2) {
throw new i("Invalid length value: ".concat(String.valueOf(str)), e2);
}
}
throw new i("Invalid length value (empty string)");
}
private void e(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.m mVar = new SVG.m();
mVar.u = this.f1019a;
mVar.v = this.b;
a((SVG.ai) mVar, attributes);
b(mVar, attributes);
a((SVG.l) mVar, attributes);
a((SVG.ad) mVar, attributes);
a(mVar, attributes);
this.b.a(mVar);
this.b = mVar;
}
private static List<SVG.n> f(String str) {
if (str.length() != 0) {
ArrayList arrayList = new ArrayList(1);
f fVar = new f(str);
fVar.e();
while (!fVar.d()) {
float g2 = fVar.g();
if (Float.isNaN(g2)) {
throw new i("Invalid length list value: " + fVar.o());
}
SVG.Unit p = fVar.p();
if (p == null) {
p = SVG.Unit.px;
}
arrayList.add(new SVG.n(g2, p));
fVar.f();
}
return arrayList;
}
throw new i("Invalid length list (empty string)");
}
private void f(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.t tVar = new SVG.t();
tVar.u = this.f1019a;
tVar.v = this.b;
a((SVG.ai) tVar, attributes);
b(tVar, attributes);
a((SVG.l) tVar, attributes);
a((SVG.ad) tVar, attributes);
a(tVar, attributes);
this.b.a(tVar);
}
private static float g(String str) {
int length = str.length();
if (length != 0) {
return a(str, length);
}
throw new i("Invalid float value (empty string)");
}
private void g(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.z zVar = new SVG.z();
zVar.u = this.f1019a;
zVar.v = this.b;
a((SVG.ai) zVar, attributes);
b(zVar, attributes);
a((SVG.l) zVar, attributes);
a((SVG.ad) zVar, attributes);
a(zVar, attributes);
this.b.a(zVar);
}
private static Float h(String str) {
try {
float g2 = g(str);
if (g2 < 0.0f) {
g2 = 0.0f;
} else if (g2 > 1.0f) {
g2 = 1.0f;
}
return Float.valueOf(g2);
} catch (i unused) {
return null;
}
}
private void h(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.c cVar = new SVG.c();
cVar.u = this.f1019a;
cVar.v = this.b;
a((SVG.ai) cVar, attributes);
b(cVar, attributes);
a((SVG.l) cVar, attributes);
a((SVG.ad) cVar, attributes);
a(cVar, attributes);
this.b.a(cVar);
}
private static SVG.a i(String str) {
f fVar = new f(str);
fVar.e();
float g2 = fVar.g();
fVar.f();
float g3 = fVar.g();
fVar.f();
float g4 = fVar.g();
fVar.f();
float g5 = fVar.g();
if (Float.isNaN(g2) || Float.isNaN(g3) || Float.isNaN(g4) || Float.isNaN(g5)) {
throw new i("Invalid viewBox definition - should have four numbers");
}
if (g4 >= 0.0f) {
if (g5 >= 0.0f) {
return new SVG.a(g2, g3, g4, g5);
}
throw new i("Invalid viewBox. height cannot be negative");
}
throw new i("Invalid viewBox. width cannot be negative");
}
private void i(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.h hVar = new SVG.h();
hVar.u = this.f1019a;
hVar.v = this.b;
a((SVG.ai) hVar, attributes);
b(hVar, attributes);
a((SVG.l) hVar, attributes);
a((SVG.ad) hVar, attributes);
a(hVar, attributes);
this.b.a(hVar);
}
private static PreserveAspectRatio j(String str) {
f fVar = new f(str);
fVar.e();
char c2 = 0;
String a2 = fVar.a(' ', false);
if ("defer".equals(a2)) {
fVar.e();
a2 = fVar.a(' ', false);
}
PreserveAspectRatio.Alignment a3 = a.a(a2);
PreserveAspectRatio.Scale scale = null;
fVar.e();
if (!fVar.d()) {
String a4 = fVar.a(' ', false);
int hashCode = a4.hashCode();
if (hashCode != 3347527) {
if (hashCode == 109526418 && a4.equals("slice")) {
c2 = 1;
if (c2 != 0) {
scale = PreserveAspectRatio.Scale.meet;
} else if (c2 != 1) {
throw new i("Invalid preserveAspectRatio definition: ".concat(String.valueOf(str)));
} else {
scale = PreserveAspectRatio.Scale.slice;
}
}
c2 = 65535;
if (c2 != 0) {
}
}
}
return new PreserveAspectRatio(a3, scale);
}
private void j(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.o oVar = new SVG.o();
oVar.u = this.f1019a;
oVar.v = this.b;
a((SVG.ai) oVar, attributes);
b(oVar, attributes);
a((SVG.l) oVar, attributes);
a((SVG.ad) oVar, attributes);
a(oVar, attributes);
this.b.a(oVar);
}
private static SVG.al k(String str) {
if (str.startsWith("url(")) {
int indexOf = str.indexOf(")");
if (indexOf != -1) {
String trim = str.substring(4, indexOf).trim();
String trim2 = str.substring(indexOf + 1).trim();
return new SVG.s(trim, trim2.length() > 0 ? l(trim2) : null);
}
return new SVG.s(str.substring(4).trim(), null);
}
return l(str);
}
private void k(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.x xVar = new SVG.x();
xVar.u = this.f1019a;
xVar.v = this.b;
a((SVG.ai) xVar, attributes);
b(xVar, attributes);
a((SVG.l) xVar, attributes);
a((SVG.ad) xVar, attributes);
a(xVar, attributes, "polyline");
this.b.a(xVar);
}
private static SVG.al l(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode != 3387192) {
if (hashCode == 1442907498 && str.equals("currentColor")) {
c2 = 1;
}
c2 = 65535;
} else {
if (str.equals("none")) {
c2 = 0;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
try {
return m(str);
} catch (i unused) {
return null;
}
}
return SVG.f.a();
}
return SVG.e.c;
}
private void l(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.y yVar = new SVG.y();
yVar.u = this.f1019a;
yVar.v = this.b;
a((SVG.ai) yVar, attributes);
b(yVar, attributes);
a((SVG.l) yVar, attributes);
a((SVG.ad) yVar, attributes);
a(yVar, attributes, "polygon");
this.b.a(yVar);
}
private static SVG.e m(String str) {
if (str.charAt(0) == '#') {
com.caverock.androidsvg.c a2 = com.caverock.androidsvg.c.a(str, str.length());
if (a2 != null) {
int i = a2.f1030a;
if (i == 4) {
int i2 = (int) a2.b;
int i3 = i2 & 3840;
int i4 = i2 & 240;
int i5 = i2 & 15;
return new SVG.e(i5 | (i3 << 8) | (-16777216) | (i3 << 12) | (i4 << 8) | (i4 << 4) | (i5 << 4));
} else if (i != 5) {
if (i != 7) {
if (i == 9) {
return new SVG.e((((int) a2.b) >>> 8) | (((int) a2.b) << 24));
}
throw new i("Bad hex colour value: ".concat(String.valueOf(str)));
}
return new SVG.e(((int) a2.b) | ViewCompat.MEASURED_STATE_MASK);
} else {
int i6 = (int) a2.b;
int i7 = 61440 & i6;
int i8 = i6 & 3840;
int i9 = i6 & 240;
int i10 = i6 & 15;
return new SVG.e((i10 << 24) | (i10 << 28) | (i7 << 8) | (i7 << 4) | (i8 << 4) | i8 | i9 | (i9 >> 4));
}
}
throw new i("Bad hex colour value: ".concat(String.valueOf(str)));
}
String lowerCase = str.toLowerCase(Locale.US);
boolean startsWith = lowerCase.startsWith("rgba(");
if (!startsWith && !lowerCase.startsWith("rgb(")) {
boolean startsWith2 = lowerCase.startsWith("hsla(");
if (startsWith2 || lowerCase.startsWith("hsl(")) {
f fVar = new f(str.substring(startsWith2 ? 5 : 4));
fVar.e();
float g2 = fVar.g();
float a3 = fVar.a(g2);
if (!Float.isNaN(a3)) {
fVar.a(CoreConstants.PERCENT_CHAR);
}
float a4 = fVar.a(a3);
if (!Float.isNaN(a4)) {
fVar.a(CoreConstants.PERCENT_CHAR);
}
if (!startsWith2) {
fVar.e();
if (Float.isNaN(a4) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Bad hsl() colour value: ".concat(String.valueOf(str)));
}
return new SVG.e(a(g2, a3, a4) | ViewCompat.MEASURED_STATE_MASK);
}
float a5 = fVar.a(a4);
fVar.e();
if (Float.isNaN(a5) || !fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Bad hsla() colour value: ".concat(String.valueOf(str)));
}
return new SVG.e((a(a5 * 256.0f) << 24) | a(g2, a3, a4));
}
return n(lowerCase);
}
f fVar2 = new f(str.substring(startsWith ? 5 : 4));
fVar2.e();
float g3 = fVar2.g();
if (!Float.isNaN(g3) && fVar2.a(CoreConstants.PERCENT_CHAR)) {
g3 = (g3 * 256.0f) / 100.0f;
}
float a6 = fVar2.a(g3);
if (!Float.isNaN(a6) && fVar2.a(CoreConstants.PERCENT_CHAR)) {
a6 = (a6 * 256.0f) / 100.0f;
}
float a7 = fVar2.a(a6);
if (!Float.isNaN(a7) && fVar2.a(CoreConstants.PERCENT_CHAR)) {
a7 = (a7 * 256.0f) / 100.0f;
}
if (!startsWith) {
fVar2.e();
if (Float.isNaN(a7) || !fVar2.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Bad rgb() colour value: ".concat(String.valueOf(str)));
}
return new SVG.e((a(g3) << 16) | ViewCompat.MEASURED_STATE_MASK | (a(a6) << 8) | a(a7));
}
float a8 = fVar2.a(a7);
fVar2.e();
if (Float.isNaN(a8) || !fVar2.a(CoreConstants.RIGHT_PARENTHESIS_CHAR)) {
throw new i("Bad rgba() colour value: ".concat(String.valueOf(str)));
}
return new SVG.e((a(a8 * 256.0f) << 24) | (a(g3) << 16) | (a(a6) << 8) | a(a7));
}
private void m(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.at atVar = new SVG.at();
atVar.u = this.f1019a;
atVar.v = this.b;
a((SVG.ai) atVar, attributes);
b(atVar, attributes);
a((SVG.l) atVar, attributes);
a((SVG.ad) atVar, attributes);
a((SVG.ax) atVar, attributes);
this.b.a(atVar);
this.b = atVar;
}
private static SVG.e n(String str) {
Integer a2 = b.a(str);
if (a2 != null) {
return new SVG.e(a2.intValue());
}
throw new i("Invalid colour keyword: ".concat(String.valueOf(str)));
}
private void n(Attributes attributes) {
SVG.ag agVar = this.b;
if (agVar == null) {
throw new i("Invalid document. Root element must be <svg>");
}
if (!(agVar instanceof SVG.av)) {
throw new i("Invalid document. <tspan> elements are only valid inside <text> or other <tspan> elements.");
}
SVG.as asVar = new SVG.as();
asVar.u = this.f1019a;
asVar.v = this.b;
a((SVG.ai) asVar, attributes);
b(asVar, attributes);
a((SVG.ad) asVar, attributes);
a((SVG.ax) asVar, attributes);
this.b.a(asVar);
this.b = asVar;
if (asVar.v instanceof SVG.ay) {
asVar.f994a = (SVG.ay) asVar.v;
} else {
asVar.f994a = ((SVG.au) asVar.v).h();
}
}
private static List<String> o(String str) {
f fVar = new f(str);
ArrayList arrayList = null;
do {
String r = fVar.r();
if (r == null) {
r = fVar.a(CoreConstants.COMMA_CHAR, true);
}
if (r == null) {
break;
}
if (arrayList == null) {
arrayList = new ArrayList();
}
arrayList.add(r);
fVar.f();
} while (!fVar.d());
return arrayList;
}
private void o(Attributes attributes) {
SVG.ag agVar = this.b;
if (agVar == null) {
throw new i("Invalid document. Root element must be <svg>");
}
if (!(agVar instanceof SVG.av)) {
throw new i("Invalid document. <tref> elements are only valid inside <text> or <tspan> elements.");
}
SVG.ar arVar = new SVG.ar();
arVar.u = this.f1019a;
arVar.v = this.b;
a((SVG.ai) arVar, attributes);
b(arVar, attributes);
a((SVG.ad) arVar, attributes);
a(arVar, attributes);
this.b.a(arVar);
if (arVar.v instanceof SVG.ay) {
arVar.b = (SVG.ay) arVar.v;
} else {
arVar.b = ((SVG.au) arVar.v).h();
}
}
private static SVG.n p(String str) {
try {
SVG.n a2 = c.a(str);
return a2 == null ? e(str) : a2;
} catch (i unused) {
return null;
}
}
private void p(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.ap apVar = new SVG.ap();
apVar.u = this.f1019a;
apVar.v = this.b;
a((SVG.ai) apVar, attributes);
b(apVar, attributes);
a((SVG.l) apVar, attributes);
a((SVG.ad) apVar, attributes);
this.b.a(apVar);
this.b = apVar;
}
private static SVG.Style.FontStyle q(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode == -1657669071) {
if (str.equals("oblique")) {
c2 = 2;
}
c2 = 65535;
} else if (hashCode != -1178781136) {
if (hashCode == -1039745817 && str.equals("normal")) {
c2 = 1;
}
c2 = 65535;
} else {
if (str.equals("italic")) {
c2 = 0;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
if (c2 != 2) {
return null;
}
return SVG.Style.FontStyle.Oblique;
}
return SVG.Style.FontStyle.Normal;
}
return SVG.Style.FontStyle.Italic;
}
private void q(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.aq aqVar = new SVG.aq();
aqVar.u = this.f1019a;
aqVar.v = this.b;
a((SVG.ai) aqVar, attributes);
b(aqVar, attributes);
a((SVG.ad) aqVar, attributes);
a((SVG.ao) aqVar, attributes);
this.b.a(aqVar);
this.b = aqVar;
}
private static SVG.Style.TextDecoration r(String str) {
char c2;
switch (str.hashCode()) {
case -1171789332:
if (str.equals("line-through")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -1026963764:
if (str.equals("underline")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case 3387192:
if (str.equals("none")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case 93826908:
if (str.equals("blink")) {
c2 = 4;
break;
}
c2 = 65535;
break;
case 529818312:
if (str.equals("overline")) {
c2 = 2;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
if (c2 != 0) {
if (c2 != 1) {
if (c2 != 2) {
if (c2 != 3) {
if (c2 != 4) {
return null;
}
return SVG.Style.TextDecoration.Blink;
}
return SVG.Style.TextDecoration.LineThrough;
}
return SVG.Style.TextDecoration.Overline;
}
return SVG.Style.TextDecoration.Underline;
}
return SVG.Style.TextDecoration.None;
}
private void r(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.p pVar = new SVG.p();
pVar.u = this.f1019a;
pVar.v = this.b;
a((SVG.ai) pVar, attributes);
b(pVar, attributes);
a((SVG.ad) pVar, attributes);
a((SVG.ao) pVar, attributes);
a(pVar, attributes);
this.b.a(pVar);
this.b = pVar;
}
private static SVG.Style.TextDirection s(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode != 107498) {
if (hashCode == 113258 && str.equals("rtl")) {
c2 = 1;
}
c2 = 65535;
} else {
if (str.equals("ltr")) {
c2 = 0;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
return null;
}
return SVG.Style.TextDirection.RTL;
}
return SVG.Style.TextDirection.LTR;
}
private void s(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.aj ajVar = new SVG.aj();
ajVar.u = this.f1019a;
ajVar.v = this.b;
a((SVG.ai) ajVar, attributes);
b(ajVar, attributes);
a((SVG.i) ajVar, attributes);
a(ajVar, attributes);
this.b.a(ajVar);
this.b = ajVar;
}
private static SVG.Style.FillRule t(String str) {
if ("nonzero".equals(str)) {
return SVG.Style.FillRule.NonZero;
}
if ("evenodd".equals(str)) {
return SVG.Style.FillRule.EvenOdd;
}
return null;
}
private void t(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.an anVar = new SVG.an();
anVar.u = this.f1019a;
anVar.v = this.b;
a((SVG.ai) anVar, attributes);
b(anVar, attributes);
a((SVG.i) anVar, attributes);
a(anVar, attributes);
this.b.a(anVar);
this.b = anVar;
}
private static SVG.Style.LineCap u(String str) {
if ("butt".equals(str)) {
return SVG.Style.LineCap.Butt;
}
if ("round".equals(str)) {
return SVG.Style.LineCap.Round;
}
if ("square".equals(str)) {
return SVG.Style.LineCap.Square;
}
return null;
}
private void u(Attributes attributes) {
SVG.ag agVar = this.b;
if (agVar == null) {
throw new i("Invalid document. Root element must be <svg>");
}
if (!(agVar instanceof SVG.i)) {
throw new i("Invalid document. <stop> elements are only valid inside <linearGradient> or <radialGradient> elements.");
}
SVG.ab abVar = new SVG.ab();
abVar.u = this.f1019a;
abVar.v = this.b;
a((SVG.ai) abVar, attributes);
b(abVar, attributes);
a(abVar, attributes);
this.b.a(abVar);
this.b = abVar;
}
private static SVG.Style.LineJoin v(String str) {
if ("miter".equals(str)) {
return SVG.Style.LineJoin.Miter;
}
if ("round".equals(str)) {
return SVG.Style.LineJoin.Round;
}
if ("bevel".equals(str)) {
return SVG.Style.LineJoin.Bevel;
}
return null;
}
private void v(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.aa aaVar = new SVG.aa();
aaVar.u = this.f1019a;
aaVar.v = this.b;
a(aaVar, attributes);
b(aaVar, attributes);
this.b.a(aaVar);
this.b = aaVar;
}
private void w(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.d dVar = new SVG.d();
dVar.u = this.f1019a;
dVar.v = this.b;
a((SVG.ai) dVar, attributes);
b(dVar, attributes);
a((SVG.l) dVar, attributes);
a((SVG.ad) dVar, attributes);
a(dVar, attributes);
this.b.a(dVar);
this.b = dVar;
}
private static SVG.n[] w(String str) {
SVG.n j;
f fVar = new f(str);
fVar.e();
if (fVar.d() || (j = fVar.j()) == null || j.b()) {
return null;
}
float f2 = j.f1007a;
ArrayList arrayList = new ArrayList();
arrayList.add(j);
while (!fVar.d()) {
fVar.f();
SVG.n j2 = fVar.j();
if (j2 == null || j2.b()) {
return null;
}
arrayList.add(j2);
f2 += j2.f1007a;
}
if (f2 == 0.0f) {
return null;
}
return (SVG.n[]) arrayList.toArray(new SVG.n[arrayList.size()]);
}
private static SVG.Style.TextAnchor x(String str) {
char c2;
int hashCode = str.hashCode();
if (hashCode == -1074341483) {
if (str.equals("middle")) {
c2 = 1;
}
c2 = 65535;
} else if (hashCode != 100571) {
if (hashCode == 109757538 && str.equals("start")) {
c2 = 0;
}
c2 = 65535;
} else {
if (str.equals("end")) {
c2 = 2;
}
c2 = 65535;
}
if (c2 != 0) {
if (c2 != 1) {
if (c2 != 2) {
return null;
}
return SVG.Style.TextAnchor.End;
}
return SVG.Style.TextAnchor.Middle;
}
return SVG.Style.TextAnchor.Start;
}
private void x(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.aw awVar = new SVG.aw();
awVar.u = this.f1019a;
awVar.v = this.b;
a((SVG.ai) awVar, attributes);
b(awVar, attributes);
a((SVG.ad) awVar, attributes);
a(awVar, attributes);
this.b.a(awVar);
this.b = awVar;
if (awVar.v instanceof SVG.ay) {
awVar.c = (SVG.ay) awVar.v;
} else {
awVar.c = ((SVG.au) awVar.v).h();
}
}
private static Boolean y(String str) {
char c2;
switch (str.hashCode()) {
case -1217487446:
if (str.equals("hidden")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -907680051:
if (str.equals("scroll")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case 3005871:
if (str.equals("auto")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case 466743410:
if (str.equals("visible")) {
c2 = 0;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
if (c2 == 0 || c2 == 1) {
return Boolean.TRUE;
}
if (c2 == 2 || c2 == 3) {
return Boolean.FALSE;
}
return null;
}
private void y(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.w wVar = new SVG.w();
wVar.u = this.f1019a;
wVar.v = this.b;
a((SVG.ai) wVar, attributes);
b(wVar, attributes);
a((SVG.ad) wVar, attributes);
a((SVG.ao) wVar, attributes);
a(wVar, attributes);
this.b.a(wVar);
this.b = wVar;
}
private static SVG.b z(String str) {
if (!"auto".equals(str) && str.startsWith("rect(")) {
f fVar = new f(str.substring(5));
fVar.e();
SVG.n b2 = b(fVar);
fVar.f();
SVG.n b3 = b(fVar);
fVar.f();
SVG.n b4 = b(fVar);
fVar.f();
SVG.n b5 = b(fVar);
fVar.e();
if (fVar.a(CoreConstants.RIGHT_PARENTHESIS_CHAR) || fVar.d()) {
return new SVG.b(b2, b3, b4, b5);
}
return null;
}
return null;
}
private void z(Attributes attributes) {
if (this.b == null) {
throw new i("Invalid document. Root element must be <svg>");
}
SVG.bb bbVar = new SVG.bb();
bbVar.u = this.f1019a;
bbVar.v = this.b;
a((SVG.ai) bbVar, attributes);
a((SVG.ad) bbVar, attributes);
a((SVG.ao) bbVar, attributes);
this.b.a(bbVar);
this.b = bbVar;
}
public final SVG a(InputStream inputStream, boolean z) {
if (!inputStream.markSupported()) {
inputStream = new BufferedInputStream(inputStream);
}
try {
inputStream.mark(3);
int read = inputStream.read() + (inputStream.read() << 8);
inputStream.reset();
if (read == 35615) {
inputStream = new BufferedInputStream(new GZIPInputStream(inputStream));
}
} catch (IOException unused) {
}
try {
inputStream.mark(4096);
b(inputStream, z);
return this.f1019a;
} finally {
try {
inputStream.close();
} catch (IOException unused2) {
Log.e("SVGParser", "Exception thrown closing input stream");
}
}
}
final void a() {
this.f1019a = new SVG();
}
final void a(String str) {
if (this.c) {
return;
}
if (this.e) {
if (this.g == null) {
this.g = new StringBuilder(str.length());
}
this.g.append(str);
} else if (this.h) {
if (this.i == null) {
this.i = new StringBuilder(str.length());
}
this.i.append(str);
} else if (this.b instanceof SVG.av) {
b(str);
}
}
final void a(String str, String str2, String str3) {
if (this.c) {
int i = this.d - 1;
this.d = i;
if (i == 0) {
this.c = false;
return;
}
}
if ("http://www.w3.org/2000/svg".equals(str) || "".equals(str)) {
if (str2.length() <= 0) {
str2 = str3;
}
int i2 = AnonymousClass1.f1020a[SVGElem.fromString(str2).ordinal()];
if (i2 != 1 && i2 != 2 && i2 != 4 && i2 != 5 && i2 != 13 && i2 != 14) {
switch (i2) {
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 31:
break;
case 22:
case 23:
this.e = false;
if (this.g != null) {
if (this.f == SVGElem.title) {
this.f1019a.b = this.g.toString();
} else if (this.f == SVGElem.desc) {
this.f1019a.c = this.g.toString();
}
this.g.setLength(0);
return;
}
return;
case 30:
StringBuilder sb = this.i;
if (sb != null) {
this.h = false;
H(sb.toString());
this.i.setLength(0);
return;
}
return;
default:
return;
}
}
this.b = ((SVG.ak) this.b).v;
}
}
final void a(String str, String str2, String str3, Attributes attributes) {
if (this.c) {
this.d++;
} else if ("http://www.w3.org/2000/svg".equals(str) || "".equals(str)) {
if (str2.length() <= 0) {
str2 = str3;
}
SVGElem fromString = SVGElem.fromString(str2);
switch (AnonymousClass1.f1020a[fromString.ordinal()]) {
case 1:
a(attributes);
return;
case 2:
case 3:
b(attributes);
return;
case 4:
c(attributes);
return;
case 5:
d(attributes);
return;
case 6:
f(attributes);
return;
case 7:
g(attributes);
return;
case 8:
h(attributes);
return;
case 9:
i(attributes);
return;
case 10:
j(attributes);
return;
case 11:
k(attributes);
return;
case 12:
l(attributes);
return;
case 13:
m(attributes);
return;
case 14:
n(attributes);
return;
case 15:
o(attributes);
return;
case 16:
p(attributes);
return;
case 17:
q(attributes);
return;
case 18:
r(attributes);
return;
case 19:
s(attributes);
return;
case 20:
t(attributes);
return;
case 21:
u(attributes);
return;
case 22:
case 23:
this.e = true;
this.f = fromString;
return;
case 24:
w(attributes);
return;
case 25:
x(attributes);
return;
case 26:
y(attributes);
return;
case 27:
e(attributes);
return;
case 28:
z(attributes);
return;
case 29:
A(attributes);
return;
case 30:
B(attributes);
return;
case 31:
v(attributes);
return;
default:
this.c = true;
this.d = 1;
return;
}
}
}
}