Initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package com.google.zxing.oned.rss.expanded;
|
||||
|
||||
import com.google.zxing.common.BitArray;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class BitArrayBuilder {
|
||||
static BitArray a(List<ExpandedPair> list) {
|
||||
int size = (list.size() << 1) - 1;
|
||||
if (list.get(list.size() - 1).c() == null) {
|
||||
size--;
|
||||
}
|
||||
BitArray bitArray = new BitArray(size * 12);
|
||||
int b = list.get(0).c().b();
|
||||
int i = 0;
|
||||
for (int i2 = 11; i2 >= 0; i2--) {
|
||||
if (((1 << i2) & b) != 0) {
|
||||
bitArray.d(i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for (int i3 = 1; i3 < list.size(); i3++) {
|
||||
ExpandedPair expandedPair = list.get(i3);
|
||||
int b2 = expandedPair.b().b();
|
||||
int i4 = i;
|
||||
for (int i5 = 11; i5 >= 0; i5--) {
|
||||
if (((1 << i5) & b2) != 0) {
|
||||
bitArray.d(i4);
|
||||
}
|
||||
i4++;
|
||||
}
|
||||
if (expandedPair.c() != null) {
|
||||
int b3 = expandedPair.c().b();
|
||||
for (int i6 = 11; i6 >= 0; i6--) {
|
||||
if (((1 << i6) & b3) != 0) {
|
||||
bitArray.d(i4);
|
||||
}
|
||||
i4++;
|
||||
}
|
||||
}
|
||||
i = i4;
|
||||
}
|
||||
return bitArray;
|
||||
}
|
||||
}
|
68
sources/com/google/zxing/oned/rss/expanded/ExpandedPair.java
Normal file
68
sources/com/google/zxing/oned/rss/expanded/ExpandedPair.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package com.google.zxing.oned.rss.expanded;
|
||||
|
||||
import com.google.zxing.oned.rss.DataCharacter;
|
||||
import com.google.zxing.oned.rss.FinderPattern;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class ExpandedPair {
|
||||
private final DataCharacter a;
|
||||
private final DataCharacter b;
|
||||
private final FinderPattern c;
|
||||
|
||||
ExpandedPair(DataCharacter dataCharacter, DataCharacter dataCharacter2, FinderPattern finderPattern, boolean z) {
|
||||
this.a = dataCharacter;
|
||||
this.b = dataCharacter2;
|
||||
this.c = finderPattern;
|
||||
}
|
||||
|
||||
FinderPattern a() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
DataCharacter b() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
DataCharacter c() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public boolean d() {
|
||||
return this.b == null;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof ExpandedPair)) {
|
||||
return false;
|
||||
}
|
||||
ExpandedPair expandedPair = (ExpandedPair) obj;
|
||||
return a(this.a, expandedPair.a) && a(this.b, expandedPair.b) && a(this.c, expandedPair.c);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (a(this.a) ^ a(this.b)) ^ a(this.c);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("[ ");
|
||||
sb.append(this.a);
|
||||
sb.append(" , ");
|
||||
sb.append(this.b);
|
||||
sb.append(" : ");
|
||||
FinderPattern finderPattern = this.c;
|
||||
sb.append(finderPattern == null ? "null" : Integer.valueOf(finderPattern.c()));
|
||||
sb.append(" ]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static boolean a(Object obj, Object obj2) {
|
||||
return obj == null ? obj2 == null : obj.equals(obj2);
|
||||
}
|
||||
|
||||
private static int a(Object obj) {
|
||||
if (obj == null) {
|
||||
return 0;
|
||||
}
|
||||
return obj.hashCode();
|
||||
}
|
||||
}
|
45
sources/com/google/zxing/oned/rss/expanded/ExpandedRow.java
Normal file
45
sources/com/google/zxing/oned/rss/expanded/ExpandedRow.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.google.zxing.oned.rss.expanded;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class ExpandedRow {
|
||||
private final List<ExpandedPair> a;
|
||||
private final int b;
|
||||
private final boolean c;
|
||||
|
||||
ExpandedRow(List<ExpandedPair> list, int i, boolean z) {
|
||||
this.a = new ArrayList(list);
|
||||
this.b = i;
|
||||
this.c = z;
|
||||
}
|
||||
|
||||
List<ExpandedPair> a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
int b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof ExpandedRow)) {
|
||||
return false;
|
||||
}
|
||||
ExpandedRow expandedRow = (ExpandedRow) obj;
|
||||
return this.a.equals(expandedRow.a()) && this.c == expandedRow.c;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.a.hashCode() ^ Boolean.valueOf(this.c).hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "{ " + this.a + " }";
|
||||
}
|
||||
|
||||
boolean a(List<ExpandedPair> list) {
|
||||
return this.a.equals(list);
|
||||
}
|
||||
}
|
@@ -0,0 +1,653 @@
|
||||
package com.google.zxing.oned.rss.expanded;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.DecodeHintType;
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.ResultPoint;
|
||||
import com.google.zxing.common.BitArray;
|
||||
import com.google.zxing.common.detector.MathUtils;
|
||||
import com.google.zxing.oned.OneDReader;
|
||||
import com.google.zxing.oned.rss.AbstractRSSReader;
|
||||
import com.google.zxing.oned.rss.DataCharacter;
|
||||
import com.google.zxing.oned.rss.FinderPattern;
|
||||
import com.google.zxing.oned.rss.RSSUtils;
|
||||
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder;
|
||||
import com.twitter.sdk.android.core.TwitterAuthConfig;
|
||||
import com.ubt.jimu.base.entities.Constant;
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class RSSExpandedReader extends AbstractRSSReader {
|
||||
private static final int[] k = {7, 5, 4, 3, 1};
|
||||
private static final int[] l = {4, 20, 52, 104, 204};
|
||||
private static final int[] m = {0, 348, 1388, 2948, 3988};
|
||||
private static final int[][] n = {new int[]{1, 8, 4, 1}, new int[]{3, 6, 4, 1}, new int[]{3, 4, 6, 1}, new int[]{3, 2, 8, 1}, new int[]{2, 6, 5, 1}, new int[]{2, 2, 9, 1}};
|
||||
private static final int[][] o = {new int[]{1, 3, 9, 27, 81, 32, 96, 77}, new int[]{20, 60, 180, 118, 143, 7, 21, 63}, new int[]{189, 145, 13, 39, 117, TwitterAuthConfig.DEFAULT_AUTH_REQUEST_CODE, 209, 205}, new int[]{193, 157, 49, 147, 19, 57, 171, 91}, new int[]{62, 186, 136, 197, 169, 85, 44, 132}, new int[]{185, 133, 188, 142, 4, 12, 36, 108}, new int[]{113, PeripheralType.SERVO, 173, 97, 80, 29, 87, 50}, new int[]{150, 28, 84, 41, 123, 158, 52, 156}, new int[]{46, 138, 203, 187, 139, 206, 196, 166}, new int[]{76, 17, 51, 153, 37, 111, 122, 155}, new int[]{43, 129, 176, 106, 107, 110, 119, 146}, new int[]{16, 48, 144, 10, 30, 90, 59, 177}, new int[]{109, 116, 137, 200, 178, 112, 125, 164}, new int[]{70, 210, 208, Constant.Publish.REQUEST_CODE_PICK_FILE, 184, 130, 179, 115}, new int[]{134, 191, 151, 31, 93, 68, 204, 190}, new int[]{148, 22, 66, 198, 172, 94, 71, 2}, new int[]{6, 18, 54, 162, 64, 192, 154, 40}, new int[]{120, 149, 25, 75, 14, 42, 126, 167}, new int[]{79, 26, 78, 23, 69, 207, 199, 175}, new int[]{103, 98, 83, 38, 114, 131, 182, 124}, new int[]{161, 61, 183, 127, 170, 88, 53, 159}, new int[]{55, 165, 73, 8, 24, 72, 5, 15}, new int[]{45, 135, 194, 160, 58, 174, 100, 89}};
|
||||
private static final int[][] p = {new int[]{0, 0}, new int[]{0, 1, 1}, new int[]{0, 2, 1, 3}, new int[]{0, 4, 1, 3, 2}, new int[]{0, 4, 1, 3, 3, 5}, new int[]{0, 4, 1, 3, 4, 5, 5}, new int[]{0, 0, 1, 1, 2, 2, 3, 3}, new int[]{0, 0, 1, 1, 2, 2, 3, 4, 4}, new int[]{0, 0, 1, 1, 2, 2, 3, 4, 5, 5}, new int[]{0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5}};
|
||||
private final List<ExpandedPair> g = new ArrayList(11);
|
||||
private final List<ExpandedRow> h = new ArrayList();
|
||||
private final int[] i = new int[2];
|
||||
private boolean j;
|
||||
|
||||
private static boolean b(List<ExpandedPair> list) {
|
||||
boolean z;
|
||||
for (int[] iArr : p) {
|
||||
if (list.size() <= iArr.length) {
|
||||
int i = 0;
|
||||
while (true) {
|
||||
if (i >= list.size()) {
|
||||
z = true;
|
||||
break;
|
||||
}
|
||||
if (list.get(i).a().c() != iArr[i]) {
|
||||
z = false;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (z) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean g() {
|
||||
ExpandedPair expandedPair = this.g.get(0);
|
||||
DataCharacter b = expandedPair.b();
|
||||
DataCharacter c = expandedPair.c();
|
||||
if (c == null) {
|
||||
return false;
|
||||
}
|
||||
int a = c.a();
|
||||
int i = 2;
|
||||
for (int i2 = 1; i2 < this.g.size(); i2++) {
|
||||
ExpandedPair expandedPair2 = this.g.get(i2);
|
||||
a += expandedPair2.b().a();
|
||||
i++;
|
||||
DataCharacter c2 = expandedPair2.c();
|
||||
if (c2 != null) {
|
||||
a += c2.a();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return ((i + (-4)) * 211) + (a % 211) == b.b();
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.OneDReader
|
||||
public Result a(int i, BitArray bitArray, Map<DecodeHintType, ?> map) throws NotFoundException, FormatException {
|
||||
this.g.clear();
|
||||
this.j = false;
|
||||
try {
|
||||
return a(a(i, bitArray));
|
||||
} catch (NotFoundException unused) {
|
||||
this.g.clear();
|
||||
this.j = true;
|
||||
return a(a(i, bitArray));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.OneDReader, com.google.zxing.Reader
|
||||
public void reset() {
|
||||
this.g.clear();
|
||||
this.h.clear();
|
||||
}
|
||||
|
||||
private void b(BitArray bitArray, List<ExpandedPair> list, int i) throws NotFoundException {
|
||||
int[] b = b();
|
||||
b[0] = 0;
|
||||
b[1] = 0;
|
||||
b[2] = 0;
|
||||
b[3] = 0;
|
||||
int h = bitArray.h();
|
||||
if (i < 0) {
|
||||
i = list.isEmpty() ? 0 : list.get(list.size() - 1).a().b()[1];
|
||||
}
|
||||
boolean z = list.size() % 2 != 0;
|
||||
if (this.j) {
|
||||
z = !z;
|
||||
}
|
||||
boolean z2 = false;
|
||||
while (i < h) {
|
||||
z2 = !bitArray.a(i);
|
||||
if (!z2) {
|
||||
break;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
int i2 = i;
|
||||
int i3 = 0;
|
||||
while (i < h) {
|
||||
if (bitArray.a(i) != z2) {
|
||||
b[i3] = b[i3] + 1;
|
||||
} else {
|
||||
if (i3 == 3) {
|
||||
if (z) {
|
||||
b(b);
|
||||
}
|
||||
if (AbstractRSSReader.a(b)) {
|
||||
int[] iArr = this.i;
|
||||
iArr[0] = i2;
|
||||
iArr[1] = i;
|
||||
return;
|
||||
}
|
||||
if (z) {
|
||||
b(b);
|
||||
}
|
||||
i2 += b[0] + b[1];
|
||||
b[0] = b[2];
|
||||
b[1] = b[3];
|
||||
b[2] = 0;
|
||||
b[3] = 0;
|
||||
i3--;
|
||||
} else {
|
||||
i3++;
|
||||
}
|
||||
b[i3] = 1;
|
||||
z2 = !z2;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
List<ExpandedPair> a(int i, BitArray bitArray) throws NotFoundException {
|
||||
boolean z = false;
|
||||
while (!z) {
|
||||
try {
|
||||
this.g.add(a(bitArray, this.g, i));
|
||||
} catch (NotFoundException e) {
|
||||
if (this.g.isEmpty()) {
|
||||
throw e;
|
||||
}
|
||||
z = true;
|
||||
}
|
||||
}
|
||||
if (g()) {
|
||||
return this.g;
|
||||
}
|
||||
boolean z2 = !this.h.isEmpty();
|
||||
a(i, false);
|
||||
if (z2) {
|
||||
List<ExpandedPair> a = a(false);
|
||||
if (a != null) {
|
||||
return a;
|
||||
}
|
||||
List<ExpandedPair> a2 = a(true);
|
||||
if (a2 != null) {
|
||||
return a2;
|
||||
}
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
private List<ExpandedPair> a(boolean z) {
|
||||
List<ExpandedPair> list = null;
|
||||
if (this.h.size() > 25) {
|
||||
this.h.clear();
|
||||
return null;
|
||||
}
|
||||
this.g.clear();
|
||||
if (z) {
|
||||
Collections.reverse(this.h);
|
||||
}
|
||||
try {
|
||||
list = a(new ArrayList(), 0);
|
||||
} catch (NotFoundException unused) {
|
||||
}
|
||||
if (z) {
|
||||
Collections.reverse(this.h);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private List<ExpandedPair> a(List<ExpandedRow> list, int i) throws NotFoundException {
|
||||
while (i < this.h.size()) {
|
||||
ExpandedRow expandedRow = this.h.get(i);
|
||||
this.g.clear();
|
||||
Iterator<ExpandedRow> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
this.g.addAll(it.next().a());
|
||||
}
|
||||
this.g.addAll(expandedRow.a());
|
||||
if (b(this.g)) {
|
||||
if (g()) {
|
||||
return this.g;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList(list);
|
||||
arrayList.add(expandedRow);
|
||||
try {
|
||||
return a(arrayList, i + 1);
|
||||
} catch (NotFoundException unused) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
private static void b(int[] iArr) {
|
||||
int length = iArr.length;
|
||||
for (int i = 0; i < length / 2; i++) {
|
||||
int i2 = iArr[i];
|
||||
int i3 = (length - i) - 1;
|
||||
iArr[i] = iArr[i3];
|
||||
iArr[i3] = i2;
|
||||
}
|
||||
}
|
||||
|
||||
private void a(int i, boolean z) {
|
||||
boolean z2 = false;
|
||||
int i2 = 0;
|
||||
boolean z3 = false;
|
||||
while (true) {
|
||||
if (i2 >= this.h.size()) {
|
||||
break;
|
||||
}
|
||||
ExpandedRow expandedRow = this.h.get(i2);
|
||||
if (expandedRow.b() > i) {
|
||||
z2 = expandedRow.a(this.g);
|
||||
break;
|
||||
} else {
|
||||
z3 = expandedRow.a(this.g);
|
||||
i2++;
|
||||
}
|
||||
}
|
||||
if (z2 || z3 || a((Iterable<ExpandedPair>) this.g, (Iterable<ExpandedRow>) this.h)) {
|
||||
return;
|
||||
}
|
||||
this.h.add(i2, new ExpandedRow(this.g, i, z));
|
||||
a(this.g, this.h);
|
||||
}
|
||||
|
||||
private static void a(List<ExpandedPair> list, List<ExpandedRow> list2) {
|
||||
boolean z;
|
||||
Iterator<ExpandedRow> it = list2.iterator();
|
||||
while (it.hasNext()) {
|
||||
ExpandedRow next = it.next();
|
||||
if (next.a().size() != list.size()) {
|
||||
Iterator<ExpandedPair> it2 = next.a().iterator();
|
||||
while (true) {
|
||||
z = false;
|
||||
boolean z2 = true;
|
||||
if (!it2.hasNext()) {
|
||||
z = true;
|
||||
break;
|
||||
}
|
||||
ExpandedPair next2 = it2.next();
|
||||
Iterator<ExpandedPair> it3 = list.iterator();
|
||||
while (true) {
|
||||
if (!it3.hasNext()) {
|
||||
z2 = false;
|
||||
break;
|
||||
} else if (next2.equals(it3.next())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!z2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (z) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean a(Iterable<ExpandedPair> iterable, Iterable<ExpandedRow> iterable2) {
|
||||
boolean z;
|
||||
boolean z2;
|
||||
Iterator<ExpandedRow> it = iterable2.iterator();
|
||||
do {
|
||||
z = false;
|
||||
if (!it.hasNext()) {
|
||||
return false;
|
||||
}
|
||||
ExpandedRow next = it.next();
|
||||
Iterator<ExpandedPair> it2 = iterable.iterator();
|
||||
while (true) {
|
||||
if (!it2.hasNext()) {
|
||||
z = true;
|
||||
break;
|
||||
}
|
||||
ExpandedPair next2 = it2.next();
|
||||
Iterator<ExpandedPair> it3 = next.a().iterator();
|
||||
while (true) {
|
||||
if (!it3.hasNext()) {
|
||||
z2 = false;
|
||||
break;
|
||||
}
|
||||
if (next2.equals(it3.next())) {
|
||||
z2 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!z2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (!z);
|
||||
return true;
|
||||
}
|
||||
|
||||
static Result a(List<ExpandedPair> list) throws NotFoundException, FormatException {
|
||||
String c = AbstractExpandedDecoder.a(BitArrayBuilder.a(list)).c();
|
||||
ResultPoint[] a = list.get(0).a().a();
|
||||
ResultPoint[] a2 = list.get(list.size() - 1).a().a();
|
||||
return new Result(c, null, new ResultPoint[]{a[0], a[1], a2[0], a2[1]}, BarcodeFormat.RSS_EXPANDED);
|
||||
}
|
||||
|
||||
private static int a(BitArray bitArray, int i) {
|
||||
if (bitArray.a(i)) {
|
||||
return bitArray.b(bitArray.c(i));
|
||||
}
|
||||
return bitArray.c(bitArray.b(i));
|
||||
}
|
||||
|
||||
ExpandedPair a(BitArray bitArray, List<ExpandedPair> list, int i) throws NotFoundException {
|
||||
FinderPattern a;
|
||||
DataCharacter dataCharacter;
|
||||
boolean z = list.size() % 2 == 0;
|
||||
if (this.j) {
|
||||
z = !z;
|
||||
}
|
||||
int i2 = -1;
|
||||
boolean z2 = true;
|
||||
do {
|
||||
b(bitArray, list, i2);
|
||||
a = a(bitArray, i, z);
|
||||
if (a == null) {
|
||||
i2 = a(bitArray, this.i[0]);
|
||||
} else {
|
||||
z2 = false;
|
||||
}
|
||||
} while (z2);
|
||||
DataCharacter a2 = a(bitArray, a, z, true);
|
||||
if (!list.isEmpty() && list.get(list.size() - 1).d()) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
try {
|
||||
dataCharacter = a(bitArray, a, z, false);
|
||||
} catch (NotFoundException unused) {
|
||||
dataCharacter = null;
|
||||
}
|
||||
return new ExpandedPair(a2, dataCharacter, a, true);
|
||||
}
|
||||
|
||||
private FinderPattern a(BitArray bitArray, int i, boolean z) {
|
||||
int i2;
|
||||
int i3;
|
||||
int i4;
|
||||
if (z) {
|
||||
int i5 = this.i[0] - 1;
|
||||
while (i5 >= 0 && !bitArray.a(i5)) {
|
||||
i5--;
|
||||
}
|
||||
int i6 = i5 + 1;
|
||||
int[] iArr = this.i;
|
||||
int i7 = iArr[0] - i6;
|
||||
i3 = iArr[1];
|
||||
i4 = i6;
|
||||
i2 = i7;
|
||||
} else {
|
||||
int[] iArr2 = this.i;
|
||||
int i8 = iArr2[0];
|
||||
int c = bitArray.c(iArr2[1] + 1);
|
||||
i2 = c - this.i[1];
|
||||
i3 = c;
|
||||
i4 = i8;
|
||||
}
|
||||
int[] b = b();
|
||||
System.arraycopy(b, 0, b, 1, b.length - 1);
|
||||
b[0] = i2;
|
||||
try {
|
||||
return new FinderPattern(AbstractRSSReader.a(b, n), new int[]{i4, i3}, i4, i3, i);
|
||||
} catch (NotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
DataCharacter a(BitArray bitArray, FinderPattern finderPattern, boolean z, boolean z2) throws NotFoundException {
|
||||
int[] a = a();
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
a[i] = 0;
|
||||
}
|
||||
if (z2) {
|
||||
OneDReader.b(bitArray, finderPattern.b()[0], a);
|
||||
} else {
|
||||
OneDReader.a(bitArray, finderPattern.b()[1], a);
|
||||
int i2 = 0;
|
||||
for (int length = a.length - 1; i2 < length; length--) {
|
||||
int i3 = a[i2];
|
||||
a[i2] = a[length];
|
||||
a[length] = i3;
|
||||
i2++;
|
||||
}
|
||||
}
|
||||
float a2 = MathUtils.a(a) / 17.0f;
|
||||
float f = (finderPattern.b()[1] - finderPattern.b()[0]) / 15.0f;
|
||||
if (Math.abs(a2 - f) / f <= 0.3f) {
|
||||
int[] e = e();
|
||||
int[] c = c();
|
||||
float[] f2 = f();
|
||||
float[] d = d();
|
||||
for (int i4 = 0; i4 < a.length; i4++) {
|
||||
float f3 = (a[i4] * 1.0f) / a2;
|
||||
int i5 = (int) (0.5f + f3);
|
||||
int i6 = 8;
|
||||
if (i5 <= 0) {
|
||||
if (f3 < 0.3f) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
i6 = 1;
|
||||
} else if (i5 <= 8) {
|
||||
i6 = i5;
|
||||
} else if (f3 > 8.7f) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
int i7 = i4 / 2;
|
||||
if ((i4 & 1) == 0) {
|
||||
e[i7] = i6;
|
||||
f2[i7] = f3 - i6;
|
||||
} else {
|
||||
c[i7] = i6;
|
||||
d[i7] = f3 - i6;
|
||||
}
|
||||
}
|
||||
a(17);
|
||||
int c2 = (((finderPattern.c() * 4) + (z ? 0 : 2)) + (!z2 ? 1 : 0)) - 1;
|
||||
int i8 = 0;
|
||||
int i9 = 0;
|
||||
for (int length2 = e.length - 1; length2 >= 0; length2--) {
|
||||
if (a(finderPattern, z, z2)) {
|
||||
i8 += e[length2] * o[c2][length2 * 2];
|
||||
}
|
||||
i9 += e[length2];
|
||||
}
|
||||
int i10 = 0;
|
||||
for (int length3 = c.length - 1; length3 >= 0; length3--) {
|
||||
if (a(finderPattern, z, z2)) {
|
||||
i10 += c[length3] * o[c2][(length3 * 2) + 1];
|
||||
}
|
||||
}
|
||||
int i11 = i8 + i10;
|
||||
if ((i9 & 1) == 0 && i9 <= 13 && i9 >= 4) {
|
||||
int i12 = (13 - i9) / 2;
|
||||
int i13 = k[i12];
|
||||
return new DataCharacter((RSSUtils.a(e, i13, true) * l[i12]) + RSSUtils.a(c, 9 - i13, false) + m[i12], i11);
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
private static boolean a(FinderPattern finderPattern, boolean z, boolean z2) {
|
||||
return (finderPattern.c() == 0 && z && z2) ? false : true;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0038 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x003b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x007b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:24:0x0090 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:26:0x009d */
|
||||
/* JADX WARN: Removed duplicated region for block: B:31:0x00b2 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:33:? A[RETURN, SYNTHETIC] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:40:0x004f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:64:0x0033 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:65:0x0024 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:6:0x0021 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x0031 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
private void a(int r11) throws com.google.zxing.NotFoundException {
|
||||
/*
|
||||
r10 = this;
|
||||
int[] r0 = r10.e()
|
||||
int r0 = com.google.zxing.common.detector.MathUtils.a(r0)
|
||||
int[] r1 = r10.c()
|
||||
int r1 = com.google.zxing.common.detector.MathUtils.a(r1)
|
||||
r2 = 4
|
||||
r3 = 13
|
||||
r4 = 0
|
||||
r5 = 1
|
||||
if (r0 <= r3) goto L19
|
||||
r6 = 1
|
||||
goto L1e
|
||||
L19:
|
||||
r6 = 0
|
||||
if (r0 >= r2) goto L1e
|
||||
r7 = 1
|
||||
goto L1f
|
||||
L1e:
|
||||
r7 = 0
|
||||
L1f:
|
||||
if (r1 <= r3) goto L24
|
||||
r2 = 0
|
||||
r3 = 1
|
||||
goto L2a
|
||||
L24:
|
||||
if (r1 >= r2) goto L28
|
||||
r2 = 1
|
||||
goto L29
|
||||
L28:
|
||||
r2 = 0
|
||||
L29:
|
||||
r3 = 0
|
||||
L2a:
|
||||
int r8 = r0 + r1
|
||||
int r8 = r8 - r11
|
||||
r11 = r0 & 1
|
||||
if (r11 != r5) goto L33
|
||||
r11 = 1
|
||||
goto L34
|
||||
L33:
|
||||
r11 = 0
|
||||
L34:
|
||||
r9 = r1 & 1
|
||||
if (r9 != 0) goto L39
|
||||
r4 = 1
|
||||
L39:
|
||||
if (r8 != r5) goto L4f
|
||||
if (r11 == 0) goto L46
|
||||
if (r4 != 0) goto L41
|
||||
L3f:
|
||||
r6 = 1
|
||||
goto L79
|
||||
L41:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L46:
|
||||
if (r4 == 0) goto L4a
|
||||
r3 = 1
|
||||
goto L79
|
||||
L4a:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L4f:
|
||||
r9 = -1
|
||||
if (r8 != r9) goto L66
|
||||
if (r11 == 0) goto L5d
|
||||
if (r4 != 0) goto L58
|
||||
L56:
|
||||
r7 = 1
|
||||
goto L79
|
||||
L58:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L5d:
|
||||
if (r4 == 0) goto L61
|
||||
r2 = 1
|
||||
goto L79
|
||||
L61:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L66:
|
||||
if (r8 != 0) goto Lc3
|
||||
if (r11 == 0) goto L77
|
||||
if (r4 == 0) goto L72
|
||||
if (r0 >= r1) goto L70
|
||||
r3 = 1
|
||||
goto L56
|
||||
L70:
|
||||
r2 = 1
|
||||
goto L3f
|
||||
L72:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L77:
|
||||
if (r4 != 0) goto Lbe
|
||||
L79:
|
||||
if (r7 == 0) goto L8e
|
||||
if (r6 != 0) goto L89
|
||||
int[] r11 = r10.e()
|
||||
float[] r0 = r10.f()
|
||||
com.google.zxing.oned.rss.AbstractRSSReader.b(r11, r0)
|
||||
goto L8e
|
||||
L89:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
L8e:
|
||||
if (r6 == 0) goto L9b
|
||||
int[] r11 = r10.e()
|
||||
float[] r0 = r10.f()
|
||||
com.google.zxing.oned.rss.AbstractRSSReader.a(r11, r0)
|
||||
L9b:
|
||||
if (r2 == 0) goto Lb0
|
||||
if (r3 != 0) goto Lab
|
||||
int[] r11 = r10.c()
|
||||
float[] r0 = r10.f()
|
||||
com.google.zxing.oned.rss.AbstractRSSReader.b(r11, r0)
|
||||
goto Lb0
|
||||
Lab:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
Lb0:
|
||||
if (r3 == 0) goto Lbd
|
||||
int[] r11 = r10.c()
|
||||
float[] r0 = r10.d()
|
||||
com.google.zxing.oned.rss.AbstractRSSReader.a(r11, r0)
|
||||
Lbd:
|
||||
return
|
||||
Lbe:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
Lc3:
|
||||
com.google.zxing.NotFoundException r11 = com.google.zxing.NotFoundException.getNotFoundInstance()
|
||||
throw r11
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.oned.rss.expanded.RSSExpandedReader.a(int):void");
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI013103decoder extends AI013x0xDecoder {
|
||||
AI013103decoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected int a(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected void b(StringBuilder sb, int i) {
|
||||
sb.append("(3103)");
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.common.BitArray;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI01320xDecoder extends AI013x0xDecoder {
|
||||
AI01320xDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected int a(int i) {
|
||||
return i < 10000 ? i : i - XStream.PRIORITY_VERY_HIGH;
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected void b(StringBuilder sb, int i) {
|
||||
if (i < 10000) {
|
||||
sb.append("(3202)");
|
||||
} else {
|
||||
sb.append("(3203)");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI01392xDecoder extends AI01decoder {
|
||||
AI01392xDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException, FormatException {
|
||||
if (b().h() < 48) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
a(sb, 8);
|
||||
int a = a().a(48, 2);
|
||||
sb.append("(392");
|
||||
sb.append(a);
|
||||
sb.append(')');
|
||||
sb.append(a().a(50, (String) null).b());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI01393xDecoder extends AI01decoder {
|
||||
AI01393xDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException, FormatException {
|
||||
if (b().h() < 48) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
a(sb, 8);
|
||||
int a = a().a(48, 2);
|
||||
sb.append("(393");
|
||||
sb.append(a);
|
||||
sb.append(')');
|
||||
int a2 = a().a(50, 10);
|
||||
if (a2 / 100 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
if (a2 / 10 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
sb.append(a2);
|
||||
sb.append(a().a(60, (String) null).b());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI013x0x1xDecoder extends AI01weightDecoder {
|
||||
private final String c;
|
||||
private final String d;
|
||||
|
||||
AI013x0x1xDecoder(BitArray bitArray, String str, String str2) {
|
||||
super(bitArray);
|
||||
this.c = str2;
|
||||
this.d = str;
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected int a(int i) {
|
||||
return i % 100000;
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
|
||||
protected void b(StringBuilder sb, int i) {
|
||||
sb.append('(');
|
||||
sb.append(this.d);
|
||||
sb.append(i / 100000);
|
||||
sb.append(')');
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException {
|
||||
if (b().h() != 84) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
a(sb, 8);
|
||||
b(sb, 48, 20);
|
||||
c(sb, 68);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private void c(StringBuilder sb, int i) {
|
||||
int a = a().a(i, 16);
|
||||
if (a == 38400) {
|
||||
return;
|
||||
}
|
||||
sb.append('(');
|
||||
sb.append(this.c);
|
||||
sb.append(')');
|
||||
int i2 = a % 32;
|
||||
int i3 = a / 32;
|
||||
int i4 = (i3 % 12) + 1;
|
||||
int i5 = i3 / 12;
|
||||
if (i5 / 10 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
sb.append(i5);
|
||||
if (i4 / 10 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
sb.append(i4);
|
||||
if (i2 / 10 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
sb.append(i2);
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class AI013x0xDecoder extends AI01weightDecoder {
|
||||
AI013x0xDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException {
|
||||
if (b().h() != 60) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
a(sb, 5);
|
||||
b(sb, 45, 15);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AI01AndOtherAIs extends AI01decoder {
|
||||
AI01AndOtherAIs(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException, FormatException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("(01)");
|
||||
int length = sb.length();
|
||||
sb.append(a().a(4, 4));
|
||||
a(sb, 8, length);
|
||||
return a().a(sb, 48);
|
||||
}
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class AI01decoder extends AbstractExpandedDecoder {
|
||||
AI01decoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
private static void b(StringBuilder sb, int i) {
|
||||
int i2 = 0;
|
||||
for (int i3 = 0; i3 < 13; i3++) {
|
||||
int charAt = sb.charAt(i3 + i) - '0';
|
||||
if ((i3 & 1) == 0) {
|
||||
charAt *= 3;
|
||||
}
|
||||
i2 += charAt;
|
||||
}
|
||||
int i4 = 10 - (i2 % 10);
|
||||
sb.append(i4 != 10 ? i4 : 0);
|
||||
}
|
||||
|
||||
final void a(StringBuilder sb, int i) {
|
||||
sb.append("(01)");
|
||||
int length = sb.length();
|
||||
sb.append('9');
|
||||
a(sb, i, length);
|
||||
}
|
||||
|
||||
final void a(StringBuilder sb, int i, int i2) {
|
||||
for (int i3 = 0; i3 < 4; i3++) {
|
||||
int a = a().a((i3 * 10) + i, 10);
|
||||
if (a / 100 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
if (a / 10 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
sb.append(a);
|
||||
}
|
||||
b(sb, i2);
|
||||
}
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class AI01weightDecoder extends AI01decoder {
|
||||
AI01weightDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
protected abstract int a(int i);
|
||||
|
||||
protected abstract void b(StringBuilder sb, int i);
|
||||
|
||||
final void b(StringBuilder sb, int i, int i2) {
|
||||
int a = a().a(i, i2);
|
||||
b(sb, a);
|
||||
int a2 = a(a);
|
||||
int i3 = 100000;
|
||||
for (int i4 = 0; i4 < 5; i4++) {
|
||||
if (a2 / i3 == 0) {
|
||||
sb.append('0');
|
||||
}
|
||||
i3 /= 10;
|
||||
}
|
||||
sb.append(a2);
|
||||
}
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class AbstractExpandedDecoder {
|
||||
private final BitArray a;
|
||||
private final GeneralAppIdDecoder b;
|
||||
|
||||
AbstractExpandedDecoder(BitArray bitArray) {
|
||||
this.a = bitArray;
|
||||
this.b = new GeneralAppIdDecoder(bitArray);
|
||||
}
|
||||
|
||||
protected final GeneralAppIdDecoder a() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
protected final BitArray b() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public abstract String c() throws NotFoundException, FormatException;
|
||||
|
||||
public static AbstractExpandedDecoder a(BitArray bitArray) {
|
||||
if (bitArray.a(1)) {
|
||||
return new AI01AndOtherAIs(bitArray);
|
||||
}
|
||||
if (!bitArray.a(2)) {
|
||||
return new AnyAIDecoder(bitArray);
|
||||
}
|
||||
int a = GeneralAppIdDecoder.a(bitArray, 1, 4);
|
||||
if (a == 4) {
|
||||
return new AI013103decoder(bitArray);
|
||||
}
|
||||
if (a == 5) {
|
||||
return new AI01320xDecoder(bitArray);
|
||||
}
|
||||
int a2 = GeneralAppIdDecoder.a(bitArray, 1, 5);
|
||||
if (a2 == 12) {
|
||||
return new AI01392xDecoder(bitArray);
|
||||
}
|
||||
if (a2 == 13) {
|
||||
return new AI01393xDecoder(bitArray);
|
||||
}
|
||||
switch (GeneralAppIdDecoder.a(bitArray, 1, 7)) {
|
||||
case 56:
|
||||
return new AI013x0x1xDecoder(bitArray, "310", "11");
|
||||
case 57:
|
||||
return new AI013x0x1xDecoder(bitArray, "320", "11");
|
||||
case 58:
|
||||
return new AI013x0x1xDecoder(bitArray, "310", "13");
|
||||
case 59:
|
||||
return new AI013x0x1xDecoder(bitArray, "320", "13");
|
||||
case 60:
|
||||
return new AI013x0x1xDecoder(bitArray, "310", "15");
|
||||
case 61:
|
||||
return new AI013x0x1xDecoder(bitArray, "320", "15");
|
||||
case 62:
|
||||
return new AI013x0x1xDecoder(bitArray, "310", "17");
|
||||
case 63:
|
||||
return new AI013x0x1xDecoder(bitArray, "320", "17");
|
||||
default:
|
||||
throw new IllegalStateException("unknown decoder: ".concat(String.valueOf(bitArray)));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class AnyAIDecoder extends AbstractExpandedDecoder {
|
||||
AnyAIDecoder(BitArray bitArray) {
|
||||
super(bitArray);
|
||||
}
|
||||
|
||||
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
|
||||
public String c() throws NotFoundException, FormatException {
|
||||
return a().a(new StringBuilder(), 5);
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class BlockParsedResult {
|
||||
private final DecodedInformation a;
|
||||
private final boolean b;
|
||||
|
||||
BlockParsedResult(boolean z) {
|
||||
this(null, z);
|
||||
}
|
||||
|
||||
DecodedInformation a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
boolean b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
BlockParsedResult(DecodedInformation decodedInformation, boolean z) {
|
||||
this.b = z;
|
||||
this.a = decodedInformation;
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class CurrentParsingState {
|
||||
private int a = 0;
|
||||
private State b = State.NUMERIC;
|
||||
|
||||
private enum State {
|
||||
NUMERIC,
|
||||
ALPHA,
|
||||
ISO_IEC_646
|
||||
}
|
||||
|
||||
CurrentParsingState() {
|
||||
}
|
||||
|
||||
int a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
void b(int i) {
|
||||
this.a = i;
|
||||
}
|
||||
|
||||
boolean c() {
|
||||
return this.b == State.ISO_IEC_646;
|
||||
}
|
||||
|
||||
void d() {
|
||||
this.b = State.ALPHA;
|
||||
}
|
||||
|
||||
void e() {
|
||||
this.b = State.ISO_IEC_646;
|
||||
}
|
||||
|
||||
void f() {
|
||||
this.b = State.NUMERIC;
|
||||
}
|
||||
|
||||
void a(int i) {
|
||||
this.a += i;
|
||||
}
|
||||
|
||||
boolean b() {
|
||||
return this.b == State.ALPHA;
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class DecodedChar extends DecodedObject {
|
||||
private final char b;
|
||||
|
||||
DecodedChar(int i, char c) {
|
||||
super(i);
|
||||
this.b = c;
|
||||
}
|
||||
|
||||
char b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
boolean c() {
|
||||
return this.b == '$';
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class DecodedInformation extends DecodedObject {
|
||||
private final String b;
|
||||
private final int c;
|
||||
private final boolean d;
|
||||
|
||||
DecodedInformation(int i, String str) {
|
||||
super(i);
|
||||
this.b = str;
|
||||
this.d = false;
|
||||
this.c = 0;
|
||||
}
|
||||
|
||||
String b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
int c() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
boolean d() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
DecodedInformation(int i, String str, int i2) {
|
||||
super(i);
|
||||
this.d = true;
|
||||
this.c = i2;
|
||||
this.b = str;
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class DecodedNumeric extends DecodedObject {
|
||||
private final int b;
|
||||
private final int c;
|
||||
|
||||
DecodedNumeric(int i, int i2, int i3) throws FormatException {
|
||||
super(i);
|
||||
if (i2 < 0 || i2 > 10 || i3 < 0 || i3 > 10) {
|
||||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
this.b = i2;
|
||||
this.c = i3;
|
||||
}
|
||||
|
||||
int b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
int c() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
boolean d() {
|
||||
return this.b == 10;
|
||||
}
|
||||
|
||||
boolean e() {
|
||||
return this.c == 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class DecodedObject {
|
||||
private final int a;
|
||||
|
||||
DecodedObject(int i) {
|
||||
this.a = i;
|
||||
}
|
||||
|
||||
final int a() {
|
||||
return this.a;
|
||||
}
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import com.google.zxing.NotFoundException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class FieldParser {
|
||||
private static final Object a = new Object();
|
||||
private static final Object[][] b = {new Object[]{"00", 18}, new Object[]{"01", 14}, new Object[]{"02", 14}, new Object[]{"10", a, 20}, new Object[]{"11", 6}, new Object[]{"12", 6}, new Object[]{"13", 6}, new Object[]{"15", 6}, new Object[]{"17", 6}, new Object[]{"20", 2}, new Object[]{"21", a, 20}, new Object[]{"22", a, 29}, new Object[]{"30", a, 8}, new Object[]{"37", a, 8}, new Object[]{"90", a, 30}, new Object[]{"91", a, 30}, new Object[]{"92", a, 30}, new Object[]{"93", a, 30}, new Object[]{"94", a, 30}, new Object[]{"95", a, 30}, new Object[]{"96", a, 30}, new Object[]{"97", a, 30}, new Object[]{"98", a, 30}, new Object[]{"99", a, 30}};
|
||||
private static final Object[][] c = {new Object[]{"240", a, 30}, new Object[]{"241", a, 30}, new Object[]{"242", a, 6}, new Object[]{"250", a, 30}, new Object[]{"251", a, 30}, new Object[]{"253", a, 17}, new Object[]{"254", a, 20}, new Object[]{"400", a, 30}, new Object[]{"401", a, 30}, new Object[]{"402", 17}, new Object[]{"403", a, 30}, new Object[]{"410", 13}, new Object[]{"411", 13}, new Object[]{"412", 13}, new Object[]{"413", 13}, new Object[]{"414", 13}, new Object[]{"420", a, 20}, new Object[]{"421", a, 15}, new Object[]{"422", 3}, new Object[]{"423", a, 15}, new Object[]{"424", 3}, new Object[]{"425", 3}, new Object[]{"426", 3}};
|
||||
private static final Object[][] d = {new Object[]{"310", 6}, new Object[]{"311", 6}, new Object[]{"312", 6}, new Object[]{"313", 6}, new Object[]{"314", 6}, new Object[]{"315", 6}, new Object[]{"316", 6}, new Object[]{"320", 6}, new Object[]{"321", 6}, new Object[]{"322", 6}, new Object[]{"323", 6}, new Object[]{"324", 6}, new Object[]{"325", 6}, new Object[]{"326", 6}, new Object[]{"327", 6}, new Object[]{"328", 6}, new Object[]{"329", 6}, new Object[]{"330", 6}, new Object[]{"331", 6}, new Object[]{"332", 6}, new Object[]{"333", 6}, new Object[]{"334", 6}, new Object[]{"335", 6}, new Object[]{"336", 6}, new Object[]{"340", 6}, new Object[]{"341", 6}, new Object[]{"342", 6}, new Object[]{"343", 6}, new Object[]{"344", 6}, new Object[]{"345", 6}, new Object[]{"346", 6}, new Object[]{"347", 6}, new Object[]{"348", 6}, new Object[]{"349", 6}, new Object[]{"350", 6}, new Object[]{"351", 6}, new Object[]{"352", 6}, new Object[]{"353", 6}, new Object[]{"354", 6}, new Object[]{"355", 6}, new Object[]{"356", 6}, new Object[]{"357", 6}, new Object[]{"360", 6}, new Object[]{"361", 6}, new Object[]{"362", 6}, new Object[]{"363", 6}, new Object[]{"364", 6}, new Object[]{"365", 6}, new Object[]{"366", 6}, new Object[]{"367", 6}, new Object[]{"368", 6}, new Object[]{"369", 6}, new Object[]{"390", a, 15}, new Object[]{"391", a, 18}, new Object[]{"392", a, 15}, new Object[]{"393", a, 18}, new Object[]{"703", a, 30}};
|
||||
private static final Object[][] e = {new Object[]{"7001", 13}, new Object[]{"7002", a, 30}, new Object[]{"7003", 10}, new Object[]{"8001", 14}, new Object[]{"8002", a, 20}, new Object[]{"8003", a, 30}, new Object[]{"8004", a, 30}, new Object[]{"8005", 6}, new Object[]{"8006", 18}, new Object[]{"8007", a, 30}, new Object[]{"8008", a, 12}, new Object[]{"8018", 18}, new Object[]{"8020", a, 25}, new Object[]{"8100", 6}, new Object[]{"8101", 10}, new Object[]{"8102", 2}, new Object[]{"8110", a, 70}, new Object[]{"8200", a, 70}};
|
||||
|
||||
static String a(String str) throws NotFoundException {
|
||||
if (str.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (str.length() < 2) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
String substring = str.substring(0, 2);
|
||||
for (Object[] objArr : b) {
|
||||
if (objArr[0].equals(substring)) {
|
||||
return objArr[1] == a ? b(2, ((Integer) objArr[2]).intValue(), str) : a(2, ((Integer) objArr[1]).intValue(), str);
|
||||
}
|
||||
}
|
||||
if (str.length() < 3) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
String substring2 = str.substring(0, 3);
|
||||
for (Object[] objArr2 : c) {
|
||||
if (objArr2[0].equals(substring2)) {
|
||||
return objArr2[1] == a ? b(3, ((Integer) objArr2[2]).intValue(), str) : a(3, ((Integer) objArr2[1]).intValue(), str);
|
||||
}
|
||||
}
|
||||
for (Object[] objArr3 : d) {
|
||||
if (objArr3[0].equals(substring2)) {
|
||||
return objArr3[1] == a ? b(4, ((Integer) objArr3[2]).intValue(), str) : a(4, ((Integer) objArr3[1]).intValue(), str);
|
||||
}
|
||||
}
|
||||
if (str.length() < 4) {
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
String substring3 = str.substring(0, 4);
|
||||
for (Object[] objArr4 : e) {
|
||||
if (objArr4[0].equals(substring3)) {
|
||||
return objArr4[1] == a ? b(4, ((Integer) objArr4[2]).intValue(), str) : a(4, ((Integer) objArr4[1]).intValue(), str);
|
||||
}
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
private static String b(int i, int i2, String str) throws NotFoundException {
|
||||
String substring = str.substring(0, i);
|
||||
int i3 = i2 + i;
|
||||
if (str.length() < i3) {
|
||||
i3 = str.length();
|
||||
}
|
||||
String substring2 = str.substring(i, i3);
|
||||
String str2 = "(" + substring + ')' + substring2;
|
||||
String a2 = a(str.substring(i3));
|
||||
if (a2 == null) {
|
||||
return str2;
|
||||
}
|
||||
return str2 + a2;
|
||||
}
|
||||
|
||||
private static String a(int i, int i2, String str) throws NotFoundException {
|
||||
if (str.length() >= i) {
|
||||
String substring = str.substring(0, i);
|
||||
int i3 = i2 + i;
|
||||
if (str.length() >= i3) {
|
||||
String substring2 = str.substring(i, i3);
|
||||
String str2 = "(" + substring + ')' + substring2;
|
||||
String a2 = a(str.substring(i3));
|
||||
if (a2 == null) {
|
||||
return str2;
|
||||
}
|
||||
return str2 + a2;
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
}
|
@@ -0,0 +1,372 @@
|
||||
package com.google.zxing.oned.rss.expanded.decoders;
|
||||
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class GeneralAppIdDecoder {
|
||||
private final BitArray a;
|
||||
private final CurrentParsingState b = new CurrentParsingState();
|
||||
private final StringBuilder c = new StringBuilder();
|
||||
|
||||
GeneralAppIdDecoder(BitArray bitArray) {
|
||||
this.a = bitArray;
|
||||
}
|
||||
|
||||
private DecodedInformation b() throws FormatException {
|
||||
BlockParsedResult d;
|
||||
boolean b;
|
||||
do {
|
||||
int a = this.b.a();
|
||||
if (this.b.b()) {
|
||||
d = a();
|
||||
b = d.b();
|
||||
} else if (this.b.c()) {
|
||||
d = c();
|
||||
b = d.b();
|
||||
} else {
|
||||
d = d();
|
||||
b = d.b();
|
||||
}
|
||||
if (!(a != this.b.a()) && !b) {
|
||||
break;
|
||||
}
|
||||
} while (!b);
|
||||
return d.a();
|
||||
}
|
||||
|
||||
private DecodedNumeric c(int i) throws FormatException {
|
||||
int i2 = i + 7;
|
||||
if (i2 > this.a.h()) {
|
||||
int a = a(i, 4);
|
||||
return a == 0 ? new DecodedNumeric(this.a.h(), 10, 10) : new DecodedNumeric(this.a.h(), a - 1, 10);
|
||||
}
|
||||
int a2 = a(i, 7) - 8;
|
||||
return new DecodedNumeric(i2, a2 / 11, a2 % 11);
|
||||
}
|
||||
|
||||
private BlockParsedResult d() throws FormatException {
|
||||
while (i(this.b.a())) {
|
||||
DecodedNumeric c = c(this.b.a());
|
||||
this.b.b(c.a());
|
||||
if (c.d()) {
|
||||
return new BlockParsedResult(c.e() ? new DecodedInformation(this.b.a(), this.c.toString()) : new DecodedInformation(this.b.a(), this.c.toString(), c.c()), true);
|
||||
}
|
||||
this.c.append(c.b());
|
||||
if (c.e()) {
|
||||
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
|
||||
}
|
||||
this.c.append(c.c());
|
||||
}
|
||||
if (f(this.b.a())) {
|
||||
this.b.d();
|
||||
this.b.a(4);
|
||||
}
|
||||
return new BlockParsedResult(false);
|
||||
}
|
||||
|
||||
private boolean e(int i) {
|
||||
int i2;
|
||||
if (i + 1 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
for (int i3 = 0; i3 < 5 && (i2 = i3 + i) < this.a.h(); i3++) {
|
||||
if (i3 == 2) {
|
||||
if (!this.a.a(i + 2)) {
|
||||
return false;
|
||||
}
|
||||
} else if (this.a.a(i2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean f(int i) {
|
||||
int i2;
|
||||
if (i + 1 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
for (int i3 = 0; i3 < 4 && (i2 = i3 + i) < this.a.h(); i3++) {
|
||||
if (this.a.a(i2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean g(int i) {
|
||||
int a;
|
||||
if (i + 5 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
int a2 = a(i, 5);
|
||||
if (a2 < 5 || a2 >= 16) {
|
||||
return i + 6 <= this.a.h() && (a = a(i, 6)) >= 16 && a < 63;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean h(int i) {
|
||||
int a;
|
||||
if (i + 5 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
int a2 = a(i, 5);
|
||||
if (a2 >= 5 && a2 < 16) {
|
||||
return true;
|
||||
}
|
||||
if (i + 7 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
int a3 = a(i, 7);
|
||||
if (a3 < 64 || a3 >= 116) {
|
||||
return i + 8 <= this.a.h() && (a = a(i, 8)) >= 232 && a < 253;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean i(int i) {
|
||||
if (i + 7 > this.a.h()) {
|
||||
return i + 4 <= this.a.h();
|
||||
}
|
||||
int i2 = i;
|
||||
while (true) {
|
||||
int i3 = i + 3;
|
||||
if (i2 >= i3) {
|
||||
return this.a.a(i3);
|
||||
}
|
||||
if (this.a.a(i2)) {
|
||||
return true;
|
||||
}
|
||||
i2++;
|
||||
}
|
||||
}
|
||||
|
||||
String a(StringBuilder sb, int i) throws NotFoundException, FormatException {
|
||||
String str = null;
|
||||
while (true) {
|
||||
DecodedInformation a = a(i, str);
|
||||
String a2 = FieldParser.a(a.b());
|
||||
if (a2 != null) {
|
||||
sb.append(a2);
|
||||
}
|
||||
String valueOf = a.d() ? String.valueOf(a.c()) : null;
|
||||
if (i == a.a()) {
|
||||
return sb.toString();
|
||||
}
|
||||
i = a.a();
|
||||
str = valueOf;
|
||||
}
|
||||
}
|
||||
|
||||
private BlockParsedResult c() throws FormatException {
|
||||
while (h(this.b.a())) {
|
||||
DecodedChar b = b(this.b.a());
|
||||
this.b.b(b.a());
|
||||
if (b.c()) {
|
||||
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
|
||||
}
|
||||
this.c.append(b.b());
|
||||
}
|
||||
if (d(this.b.a())) {
|
||||
this.b.a(3);
|
||||
this.b.f();
|
||||
} else if (e(this.b.a())) {
|
||||
if (this.b.a() + 5 < this.a.h()) {
|
||||
this.b.a(5);
|
||||
} else {
|
||||
this.b.b(this.a.h());
|
||||
}
|
||||
this.b.d();
|
||||
}
|
||||
return new BlockParsedResult(false);
|
||||
}
|
||||
|
||||
int a(int i, int i2) {
|
||||
return a(this.a, i, i2);
|
||||
}
|
||||
|
||||
static int a(BitArray bitArray, int i, int i2) {
|
||||
int i3 = 0;
|
||||
for (int i4 = 0; i4 < i2; i4++) {
|
||||
if (bitArray.a(i + i4)) {
|
||||
i3 |= 1 << ((i2 - i4) - 1);
|
||||
}
|
||||
}
|
||||
return i3;
|
||||
}
|
||||
|
||||
DecodedInformation a(int i, String str) throws FormatException {
|
||||
this.c.setLength(0);
|
||||
if (str != null) {
|
||||
this.c.append(str);
|
||||
}
|
||||
this.b.b(i);
|
||||
DecodedInformation b = b();
|
||||
if (b != null && b.d()) {
|
||||
return new DecodedInformation(this.b.a(), this.c.toString(), b.c());
|
||||
}
|
||||
return new DecodedInformation(this.b.a(), this.c.toString());
|
||||
}
|
||||
|
||||
private DecodedChar b(int i) throws FormatException {
|
||||
char c;
|
||||
int a = a(i, 5);
|
||||
if (a == 15) {
|
||||
return new DecodedChar(i + 5, '$');
|
||||
}
|
||||
if (a >= 5 && a < 15) {
|
||||
return new DecodedChar(i + 5, (char) ((a + 48) - 5));
|
||||
}
|
||||
int a2 = a(i, 7);
|
||||
if (a2 >= 64 && a2 < 90) {
|
||||
return new DecodedChar(i + 7, (char) (a2 + 1));
|
||||
}
|
||||
if (a2 >= 90 && a2 < 116) {
|
||||
return new DecodedChar(i + 7, (char) (a2 + 7));
|
||||
}
|
||||
switch (a(i, 8)) {
|
||||
case 232:
|
||||
c = '!';
|
||||
break;
|
||||
case 233:
|
||||
c = '\"';
|
||||
break;
|
||||
case 234:
|
||||
c = '%';
|
||||
break;
|
||||
case 235:
|
||||
c = '&';
|
||||
break;
|
||||
case 236:
|
||||
c = '\'';
|
||||
break;
|
||||
case 237:
|
||||
c = '(';
|
||||
break;
|
||||
case 238:
|
||||
c = ')';
|
||||
break;
|
||||
case 239:
|
||||
c = '*';
|
||||
break;
|
||||
case 240:
|
||||
c = '+';
|
||||
break;
|
||||
case 241:
|
||||
c = ',';
|
||||
break;
|
||||
case 242:
|
||||
c = '-';
|
||||
break;
|
||||
case 243:
|
||||
c = '.';
|
||||
break;
|
||||
case 244:
|
||||
c = '/';
|
||||
break;
|
||||
case 245:
|
||||
c = ':';
|
||||
break;
|
||||
case 246:
|
||||
c = ';';
|
||||
break;
|
||||
case 247:
|
||||
c = '<';
|
||||
break;
|
||||
case 248:
|
||||
c = '=';
|
||||
break;
|
||||
case 249:
|
||||
c = '>';
|
||||
break;
|
||||
case ItemTouchHelper.Callback.DEFAULT_SWIPE_ANIMATION_DURATION /* 250 */:
|
||||
c = '?';
|
||||
break;
|
||||
case 251:
|
||||
c = '_';
|
||||
break;
|
||||
case 252:
|
||||
c = ' ';
|
||||
break;
|
||||
default:
|
||||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
return new DecodedChar(i + 8, c);
|
||||
}
|
||||
|
||||
private BlockParsedResult a() {
|
||||
while (g(this.b.a())) {
|
||||
DecodedChar a = a(this.b.a());
|
||||
this.b.b(a.a());
|
||||
if (a.c()) {
|
||||
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
|
||||
}
|
||||
this.c.append(a.b());
|
||||
}
|
||||
if (d(this.b.a())) {
|
||||
this.b.a(3);
|
||||
this.b.f();
|
||||
} else if (e(this.b.a())) {
|
||||
if (this.b.a() + 5 < this.a.h()) {
|
||||
this.b.a(5);
|
||||
} else {
|
||||
this.b.b(this.a.h());
|
||||
}
|
||||
this.b.e();
|
||||
}
|
||||
return new BlockParsedResult(false);
|
||||
}
|
||||
|
||||
private boolean d(int i) {
|
||||
int i2 = i + 3;
|
||||
if (i2 > this.a.h()) {
|
||||
return false;
|
||||
}
|
||||
while (i < i2) {
|
||||
if (this.a.a(i)) {
|
||||
return false;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private DecodedChar a(int i) {
|
||||
char c;
|
||||
int a = a(i, 5);
|
||||
if (a == 15) {
|
||||
return new DecodedChar(i + 5, '$');
|
||||
}
|
||||
if (a >= 5 && a < 15) {
|
||||
return new DecodedChar(i + 5, (char) ((a + 48) - 5));
|
||||
}
|
||||
int a2 = a(i, 6);
|
||||
if (a2 >= 32 && a2 < 58) {
|
||||
return new DecodedChar(i + 6, (char) (a2 + 33));
|
||||
}
|
||||
switch (a2) {
|
||||
case 58:
|
||||
c = '*';
|
||||
break;
|
||||
case 59:
|
||||
c = ',';
|
||||
break;
|
||||
case 60:
|
||||
c = '-';
|
||||
break;
|
||||
case 61:
|
||||
c = '.';
|
||||
break;
|
||||
case 62:
|
||||
c = '/';
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Decoding invalid alphanumeric value: ".concat(String.valueOf(a2)));
|
||||
}
|
||||
return new DecodedChar(i + 6, c);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user