78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], G15: 1335, G18: 7973, G15_MASK: 21522, getBCHTypeInfo: function (a) { for (var c = a << 10; 0 <= j.getBCHDigit(c) – j.getBCHDigit(j.G15); ) c ^= j.G15 << j.getBCHDigit(c) – j.getBCHDigit(j.G15); return (a << 10 | c) ^ j.G15_MASK }, getBCHTypeNumber: function (a) {
for (var c = a << 12; 0 <= j.getBCHDigit(c) –
j.getBCHDigit(j.G18); ) c ^= j.G18 << j.getBCHDigit(c) – j.getBCHDigit(j.G18); return a << 12 | c
}, getBCHDigit: function (a) { for (var c = 0; 0 != a; ) c++, a >>>= 1; return c }, getPatternPosition: function (a) { return j.PATTERN_POSITION_TABLE[a – 1] }, getMask: function (a, c, d) {
switch (a) {
case 0: return 0 == (c + d) % 2; case 1: return 0 == c % 2; case 2: return 0 == d % 3; case 3: return 0 == (c + d) % 3; case 4: return 0 == (Math.floor(c / 2) + Math.floor(d / 3)) % 2; case 5: return 0 == c * d % 2 + c * d % 3; case 6: return 0 == (c * d % 2 + c * d % 3) % 2; case 7: return 0 == (c * d % 3 + (c + d) % 2) % 2; default: throw Error(“bad maskPattern:” +
a);
}
}, getErrorCorrectPolynomial: function (a) { for (var c = new q([1], 0), d = 0; d < a; d++) c = c.multiply(new q([1, l.gexp(d)], 0)); return c }, getLengthInBits: function (a, c) {
if (1 <= c && 10 > c) switch (a) { case 1: return 10; case 2: return 9; case s: return 8; case 8: return 8; default: throw Error(“mode:” + a); } else if (27 > c) switch (a) { case 1: return 12; case 2: return 11; case s: return 16; case 8: return 10; default: throw Error(“mode:” + a); } else if (41 > c) switch (a) {
case 1: return 14; case 2: return 13; case s: return 16; case 8: return 12; default: throw Error(“mode:” +
a);
} else throw Error(“type:” + c);
}, getLostPoint: function (a) {
for (var c = a.getModuleCount(), d = 0, b = 0; b < c; b++) for (var e = 0; e < c; e++) { for (var f = 0, i = a.isDark(b, e), g = -1; 1 >= g; g++) if (!(0 > b + g || c <= b + g)) for (var h = -1; 1 >= h; h++) 0 > e + h || c <= e + h || 0 == g && 0 == h || i == a.isDark(b + g, e + h) && f++; 5 < f && (d += 3 + f – 5) } for (b = 0; b < c – 1; b++) for (e = 0; e < c – 1; e++) if (f = 0, a.isDark(b, e) && f++, a.isDark(b + 1, e) && f++, a.isDark(b, e + 1) && f++, a.isDark(b + 1, e + 1) && f++, 0 == f || 4 == f) d += 3; for (b = 0; b < c; b++) for (e = 0; e < c – 6; e++) a.isDark(b, e) && !a.isDark(b, e + 1) && a.isDark(b, e +










