mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2024-12-26 19:58:25 +00:00
1020 lines
146 KiB
JavaScript
1020 lines
146 KiB
JavaScript
// based on https://github.com/jpeg-js/jpeg-js
|
|
/*
|
|
Copyright 2011 notmasteryet
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
var dctZigZag = new Int32Array([
|
|
0,
|
|
1, 8,
|
|
16, 9, 2,
|
|
3, 10, 17, 24,
|
|
32, 25, 18, 11, 4,
|
|
5, 12, 19, 26, 33, 40,
|
|
48, 41, 34, 27, 20, 13, 6,
|
|
7, 14, 21, 28, 35, 42, 49, 56,
|
|
57, 50, 43, 36, 29, 22, 15,
|
|
23, 30, 37, 44, 51, 58,
|
|
59, 52, 45, 38, 31,
|
|
39, 46, 53, 60,
|
|
61, 54, 47,
|
|
55, 62,
|
|
63
|
|
]);
|
|
var dctCos1 = 4017; // cos(pi/16)
|
|
var dctSin1 = 799; // sin(pi/16)
|
|
var dctCos3 = 3406; // cos(3*pi/16)
|
|
var dctSin3 = 2276; // sin(3*pi/16)
|
|
var dctCos6 = 1567; // cos(6*pi/16)
|
|
var dctSin6 = 3784; // sin(6*pi/16)
|
|
var dctSqrt2 = 5793; // sqrt(2)
|
|
var dctSqrt1d2 = 2896; // sqrt(2) / 2
|
|
var maxResolutionInMP = 100; // Don't decode more than 100 megapixels
|
|
var maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB
|
|
var totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content.
|
|
function requestMemoryAllocation(increaseAmount) {
|
|
var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount;
|
|
if (totalMemoryImpactBytes > maxMemoryUsageBytes) {
|
|
var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024);
|
|
throw new Error("Max memory limit exceeded by at least ".concat(exceededAmount, "MB"));
|
|
}
|
|
totalBytesAllocated = totalMemoryImpactBytes;
|
|
}
|
|
function buildHuffmanTable(codeLengths, values) {
|
|
var length = 16;
|
|
while (length > 0 && !codeLengths[length - 1])
|
|
length--;
|
|
var code = [{ children: [], index: 0 }];
|
|
var k = 0;
|
|
var p = code[0];
|
|
for (var i = 0; i < length; i++) {
|
|
for (var j = 0; j < codeLengths[i]; j++) {
|
|
p = code.pop();
|
|
p.children[p.index] = values[k];
|
|
while (p.index > 0) {
|
|
if (code.length === 0)
|
|
throw new Error('Could not recreate Huffman Table');
|
|
p = code.pop();
|
|
}
|
|
p.index++;
|
|
code.push(p);
|
|
while (code.length <= i) {
|
|
var q = { children: [], index: 0 };
|
|
code.push(q);
|
|
p.children[p.index] = q.children;
|
|
p = q;
|
|
}
|
|
k++;
|
|
}
|
|
if (i + 1 < length) {
|
|
// p here points to last code
|
|
var q = { children: [], index: 0 };
|
|
code.push(q);
|
|
p.children[p.index] = q.children;
|
|
p = q;
|
|
}
|
|
}
|
|
return code[0].children;
|
|
}
|
|
function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) {
|
|
var mcusPerLine = frame.mcusPerLine;
|
|
var progressive = frame.progressive;
|
|
var startOffset = offset;
|
|
var bitsData = 0;
|
|
var bitsCount = 0;
|
|
function readBit() {
|
|
if (bitsCount > 0) {
|
|
bitsCount--;
|
|
return (bitsData >> bitsCount) & 1;
|
|
}
|
|
bitsData = data[offset++];
|
|
if (bitsData == 0xFF) {
|
|
var nextByte = data[offset++];
|
|
if (nextByte)
|
|
throw new Error("unexpected marker: ".concat(((bitsData << 8) | nextByte).toString(16)));
|
|
// unstuff 0
|
|
}
|
|
bitsCount = 7;
|
|
return bitsData >>> 7;
|
|
}
|
|
function decodeHuffman(tree) {
|
|
var node = tree;
|
|
while (true) {
|
|
node = node[readBit()];
|
|
if (typeof node === 'number')
|
|
return node;
|
|
if (node === undefined)
|
|
throw new Error('invalid huffman sequence');
|
|
}
|
|
}
|
|
function receive(length) {
|
|
var n = 0;
|
|
while (length > 0) {
|
|
n = (n << 1) | readBit();
|
|
length--;
|
|
}
|
|
return n;
|
|
}
|
|
function receiveAndExtend(length) {
|
|
var n = receive(length);
|
|
if (n >= 1 << (length - 1))
|
|
return n;
|
|
return n + (-1 << length) + 1;
|
|
}
|
|
function decodeBaseline(component, zz) {
|
|
var t = decodeHuffman(component.huffmanTableDC);
|
|
var diff = t === 0 ? 0 : receiveAndExtend(t);
|
|
zz[0] = (component.pred += diff);
|
|
var k = 1;
|
|
while (k < 64) {
|
|
var rs = decodeHuffman(component.huffmanTableAC);
|
|
var s = rs & 15;
|
|
var r = rs >> 4;
|
|
if (s === 0) {
|
|
if (r < 15)
|
|
break;
|
|
k += 16;
|
|
continue;
|
|
}
|
|
k += r;
|
|
var z = dctZigZag[k];
|
|
zz[z] = receiveAndExtend(s);
|
|
k++;
|
|
}
|
|
}
|
|
function decodeDCFirst(component, zz) {
|
|
var t = decodeHuffman(component.huffmanTableDC);
|
|
var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);
|
|
zz[0] = (component.pred += diff);
|
|
}
|
|
function decodeDCSuccessive(_component, zz) {
|
|
zz[0] |= readBit() << successive;
|
|
}
|
|
var eobrun = 0;
|
|
function decodeACFirst(component, zz) {
|
|
if (eobrun > 0) {
|
|
eobrun--;
|
|
return;
|
|
}
|
|
var k = spectralStart, e = spectralEnd;
|
|
while (k <= e) {
|
|
var rs = decodeHuffman(component.huffmanTableAC);
|
|
var s = rs & 15;
|
|
var r = rs >> 4;
|
|
if (s === 0) {
|
|
if (r < 15) {
|
|
eobrun = receive(r) + (1 << r) - 1;
|
|
break;
|
|
}
|
|
k += 16;
|
|
continue;
|
|
}
|
|
k += r;
|
|
var z = dctZigZag[k];
|
|
zz[z] = receiveAndExtend(s) * (1 << successive);
|
|
k++;
|
|
}
|
|
}
|
|
var successiveACState = 0;
|
|
var successiveACNextValue = 0;
|
|
function decodeACSuccessive(component, zz) {
|
|
var k = spectralStart;
|
|
var e = spectralEnd;
|
|
var r = 0;
|
|
while (k <= e) {
|
|
var z = dctZigZag[k];
|
|
var direction = zz[z] < 0 ? -1 : 1;
|
|
switch (successiveACState) {
|
|
case 0: // initial state
|
|
var rs = decodeHuffman(component.huffmanTableAC);
|
|
var s = rs & 15;
|
|
r = rs >> 4; // this was new variable in old code
|
|
if (s === 0) {
|
|
if (r < 15) {
|
|
eobrun = receive(r) + (1 << r);
|
|
successiveACState = 4;
|
|
}
|
|
else {
|
|
r = 16;
|
|
successiveACState = 1;
|
|
}
|
|
}
|
|
else {
|
|
if (s !== 1)
|
|
throw new Error('invalid ACn encoding');
|
|
successiveACNextValue = receiveAndExtend(s);
|
|
successiveACState = r ? 2 : 3;
|
|
}
|
|
continue;
|
|
case 1: // skipping r zero items
|
|
case 2:
|
|
if (zz[z]) {
|
|
zz[z] += (readBit() << successive) * direction;
|
|
}
|
|
else {
|
|
r--;
|
|
if (r === 0)
|
|
successiveACState = successiveACState == 2 ? 3 : 0;
|
|
}
|
|
break;
|
|
case 3: // set value for a zero item
|
|
if (zz[z]) {
|
|
zz[z] += (readBit() << successive) * direction;
|
|
}
|
|
else {
|
|
zz[z] = successiveACNextValue << successive;
|
|
successiveACState = 0;
|
|
}
|
|
break;
|
|
case 4: // eob
|
|
if (zz[z]) {
|
|
zz[z] += (readBit() << successive) * direction;
|
|
}
|
|
break;
|
|
}
|
|
k++;
|
|
}
|
|
if (successiveACState === 4) {
|
|
eobrun--;
|
|
if (eobrun === 0)
|
|
successiveACState = 0;
|
|
}
|
|
}
|
|
function decodeMcu(component, decode, mcu, row, col) {
|
|
var mcuRow = (mcu / mcusPerLine) | 0;
|
|
var mcuCol = mcu % mcusPerLine;
|
|
var blockRow = mcuRow * component.v + row;
|
|
var blockCol = mcuCol * component.h + col;
|
|
// If the block is missing, just skip it.
|
|
if (component.blocks[blockRow] === undefined)
|
|
return;
|
|
decode(component, component.blocks[blockRow][blockCol]);
|
|
}
|
|
function decodeBlock(component, decode, mcu) {
|
|
var blockRow = (mcu / component.blocksPerLine) | 0;
|
|
var blockCol = mcu % component.blocksPerLine;
|
|
// If the block is missing, just skip it.
|
|
if (component.blocks[blockRow] === undefined)
|
|
return;
|
|
decode(component, component.blocks[blockRow][blockCol]);
|
|
}
|
|
var componentsLength = components.length;
|
|
var component;
|
|
var decodeFn;
|
|
if (progressive) {
|
|
if (spectralStart === 0) {
|
|
decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;
|
|
}
|
|
else {
|
|
decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;
|
|
}
|
|
}
|
|
else {
|
|
decodeFn = decodeBaseline;
|
|
}
|
|
var mcu = 0;
|
|
var mcuExpected;
|
|
if (componentsLength == 1) {
|
|
mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;
|
|
}
|
|
else {
|
|
mcuExpected = mcusPerLine * frame.mcusPerColumn;
|
|
}
|
|
if (!resetInterval)
|
|
resetInterval = mcuExpected;
|
|
var h;
|
|
var v;
|
|
var marker;
|
|
while (mcu < mcuExpected) {
|
|
// reset interval stuff
|
|
for (var i = 0; i < componentsLength; i++)
|
|
components[i].pred = 0;
|
|
eobrun = 0;
|
|
if (componentsLength == 1) {
|
|
component = components[0];
|
|
for (var n = 0; n < resetInterval; n++) {
|
|
decodeBlock(component, decodeFn, mcu);
|
|
mcu++;
|
|
}
|
|
}
|
|
else {
|
|
for (var n = 0; n < resetInterval; n++) {
|
|
for (var i = 0; i < componentsLength; i++) {
|
|
component = components[i];
|
|
h = component.h;
|
|
v = component.v;
|
|
for (var j = 0; j < v; j++) {
|
|
for (var k = 0; k < h; k++) {
|
|
decodeMcu(component, decodeFn, mcu, j, k);
|
|
}
|
|
}
|
|
}
|
|
mcu++;
|
|
// If we've reached our expected MCU's, stop decoding
|
|
if (mcu === mcuExpected)
|
|
break;
|
|
}
|
|
}
|
|
if (mcu === mcuExpected) {
|
|
// Skip trailing bytes at the end of the scan - until we reach the next marker
|
|
do {
|
|
if (data[offset] === 0xFF) {
|
|
if (data[offset + 1] !== 0x00) {
|
|
break;
|
|
}
|
|
}
|
|
offset += 1;
|
|
} while (offset < data.length - 2);
|
|
}
|
|
// find marker
|
|
bitsCount = 0;
|
|
marker = (data[offset] << 8) | data[offset + 1];
|
|
if (marker < 0xFF00)
|
|
throw new Error('marker was not found');
|
|
if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx
|
|
offset += 2;
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
return offset - startOffset;
|
|
}
|
|
function buildComponentData(component) {
|
|
var lines = [];
|
|
var blocksPerLine = component.blocksPerLine;
|
|
var blocksPerColumn = component.blocksPerColumn;
|
|
var samplesPerLine = blocksPerLine << 3;
|
|
// Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint.
|
|
var R = new Int32Array(64);
|
|
var r = new Uint8Array(64);
|
|
// A port of poppler's IDCT method which in turn is taken from:
|
|
// Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,
|
|
// "Practical Fast 1-D DCT Algorithms with 11 Multiplications",
|
|
// IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,
|
|
// 988-991.
|
|
function quantizeAndInverse(zz, dataOut, dataIn) {
|
|
var qt = component.quantizationTable;
|
|
var p = dataIn;
|
|
// dequant
|
|
for (var i = 0; i < 64; i++) {
|
|
p[i] = zz[i] * qt[i];
|
|
}
|
|
// inverse DCT on rows
|
|
for (var i = 0; i < 8; ++i) {
|
|
var row = 8 * i;
|
|
// check for all-zero AC coefficients
|
|
if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 &&
|
|
p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 &&
|
|
p[7 + row] == 0) {
|
|
var t_1 = (dctSqrt2 * p[0 + row] + 512) >> 10;
|
|
p[0 + row] = t_1;
|
|
p[1 + row] = t_1;
|
|
p[2 + row] = t_1;
|
|
p[3 + row] = t_1;
|
|
p[4 + row] = t_1;
|
|
p[5 + row] = t_1;
|
|
p[6 + row] = t_1;
|
|
p[7 + row] = t_1;
|
|
continue;
|
|
}
|
|
// stage 4
|
|
var v0 = (dctSqrt2 * p[0 + row] + 128) >> 8;
|
|
var v1 = (dctSqrt2 * p[4 + row] + 128) >> 8;
|
|
var v2 = p[2 + row];
|
|
var v3 = p[6 + row];
|
|
var v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8;
|
|
var v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8;
|
|
var v5 = p[3 + row] << 4;
|
|
var v6 = p[5 + row] << 4;
|
|
// stage 3
|
|
var t = (v0 - v1 + 1) >> 1;
|
|
v0 = (v0 + v1 + 1) >> 1;
|
|
v1 = t;
|
|
t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;
|
|
v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;
|
|
v3 = t;
|
|
t = (v4 - v6 + 1) >> 1;
|
|
v4 = (v4 + v6 + 1) >> 1;
|
|
v6 = t;
|
|
t = (v7 + v5 + 1) >> 1;
|
|
v5 = (v7 - v5 + 1) >> 1;
|
|
v7 = t;
|
|
// stage 2
|
|
t = (v0 - v3 + 1) >> 1;
|
|
v0 = (v0 + v3 + 1) >> 1;
|
|
v3 = t;
|
|
t = (v1 - v2 + 1) >> 1;
|
|
v1 = (v1 + v2 + 1) >> 1;
|
|
v2 = t;
|
|
t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
|
|
v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
|
|
v7 = t;
|
|
t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
|
|
v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
|
|
v6 = t;
|
|
// stage 1
|
|
p[0 + row] = v0 + v7;
|
|
p[7 + row] = v0 - v7;
|
|
p[1 + row] = v1 + v6;
|
|
p[6 + row] = v1 - v6;
|
|
p[2 + row] = v2 + v5;
|
|
p[5 + row] = v2 - v5;
|
|
p[3 + row] = v3 + v4;
|
|
p[4 + row] = v3 - v4;
|
|
}
|
|
// inverse DCT on columns
|
|
for (var i = 0; i < 8; ++i) {
|
|
var col = i;
|
|
// check for all-zero AC coefficients
|
|
if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 &&
|
|
p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 &&
|
|
p[7 * 8 + col] == 0) {
|
|
var t_2 = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14;
|
|
p[0 * 8 + col] = t_2;
|
|
p[1 * 8 + col] = t_2;
|
|
p[2 * 8 + col] = t_2;
|
|
p[3 * 8 + col] = t_2;
|
|
p[4 * 8 + col] = t_2;
|
|
p[5 * 8 + col] = t_2;
|
|
p[6 * 8 + col] = t_2;
|
|
p[7 * 8 + col] = t_2;
|
|
continue;
|
|
}
|
|
// stage 4
|
|
var v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12;
|
|
var v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12;
|
|
var v2 = p[2 * 8 + col];
|
|
var v3 = p[6 * 8 + col];
|
|
var v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12;
|
|
var v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12;
|
|
var v5 = p[3 * 8 + col];
|
|
var v6 = p[5 * 8 + col];
|
|
// stage 3
|
|
var t = (v0 - v1 + 1) >> 1;
|
|
v0 = (v0 + v1 + 1) >> 1;
|
|
v1 = t;
|
|
t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;
|
|
v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;
|
|
v3 = t;
|
|
t = (v4 - v6 + 1) >> 1;
|
|
v4 = (v4 + v6 + 1) >> 1;
|
|
v6 = t;
|
|
t = (v7 + v5 + 1) >> 1;
|
|
v5 = (v7 - v5 + 1) >> 1;
|
|
v7 = t;
|
|
// stage 2
|
|
t = (v0 - v3 + 1) >> 1;
|
|
v0 = (v0 + v3 + 1) >> 1;
|
|
v3 = t;
|
|
t = (v1 - v2 + 1) >> 1;
|
|
v1 = (v1 + v2 + 1) >> 1;
|
|
v2 = t;
|
|
t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
|
|
v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
|
|
v7 = t;
|
|
t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
|
|
v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
|
|
v6 = t;
|
|
// stage 1
|
|
p[0 * 8 + col] = v0 + v7;
|
|
p[7 * 8 + col] = v0 - v7;
|
|
p[1 * 8 + col] = v1 + v6;
|
|
p[6 * 8 + col] = v1 - v6;
|
|
p[2 * 8 + col] = v2 + v5;
|
|
p[5 * 8 + col] = v2 - v5;
|
|
p[3 * 8 + col] = v3 + v4;
|
|
p[4 * 8 + col] = v3 - v4;
|
|
}
|
|
// convert to 8-bit integers
|
|
for (var i = 0; i < 64; ++i) {
|
|
var sample = 128 + ((p[i] + 8) >> 4);
|
|
dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample;
|
|
}
|
|
}
|
|
requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8);
|
|
for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {
|
|
var scanLine = blockRow << 3;
|
|
for (var i = 0; i < 8; i++)
|
|
lines.push(new Uint8Array(samplesPerLine));
|
|
for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {
|
|
quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);
|
|
var offset = 0;
|
|
var sample = blockCol << 3;
|
|
for (var j = 0; j < 8; j++) {
|
|
var line = lines[scanLine + j];
|
|
for (var i = 0; i < 8; i++)
|
|
line[sample + i] = r[offset++];
|
|
}
|
|
}
|
|
}
|
|
return lines;
|
|
}
|
|
function clampTo8bit(a) {
|
|
return a < 0 ? 0 : a > 255 ? 255 : a;
|
|
}
|
|
function parse(data) {
|
|
var self = {
|
|
width: 0,
|
|
height: 0,
|
|
comments: [],
|
|
adobe: undefined,
|
|
components: [],
|
|
exifBuffer: undefined,
|
|
jfif: undefined,
|
|
};
|
|
var maxResolutionInPixels = maxResolutionInMP * 1000 * 1000;
|
|
var offset = 0;
|
|
function readUint16() {
|
|
var value = (data[offset] << 8) | data[offset + 1];
|
|
offset += 2;
|
|
return value;
|
|
}
|
|
function readDataBlock() {
|
|
var length = readUint16();
|
|
var array = data.subarray(offset, offset + length - 2);
|
|
offset += array.length;
|
|
return array;
|
|
}
|
|
function prepareComponents(frame) {
|
|
var maxH = 0, maxV = 0;
|
|
for (var componentId in frame.components) {
|
|
if (frame.components.hasOwnProperty(componentId)) {
|
|
var component = frame.components[componentId];
|
|
if (maxH < component.h)
|
|
maxH = component.h;
|
|
if (maxV < component.v)
|
|
maxV = component.v;
|
|
}
|
|
}
|
|
var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);
|
|
var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);
|
|
for (var componentId in frame.components) {
|
|
if (frame.components.hasOwnProperty(componentId)) {
|
|
var component = frame.components[componentId];
|
|
var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);
|
|
var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);
|
|
var blocksPerLineForMcu = mcusPerLine * component.h;
|
|
var blocksPerColumnForMcu = mcusPerColumn * component.v;
|
|
var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu;
|
|
var blocks = [];
|
|
// Each block is a Int32Array of length 64 (4 x 64 = 256 bytes)
|
|
requestMemoryAllocation(blocksToAllocate * 256);
|
|
for (var i = 0; i < blocksPerColumnForMcu; i++) {
|
|
var row = [];
|
|
for (var j = 0; j < blocksPerLineForMcu; j++) {
|
|
row.push(new Int32Array(64));
|
|
}
|
|
blocks.push(row);
|
|
}
|
|
component.blocksPerLine = blocksPerLine;
|
|
component.blocksPerColumn = blocksPerColumn;
|
|
component.blocks = blocks;
|
|
}
|
|
}
|
|
frame.maxH = maxH;
|
|
frame.maxV = maxV;
|
|
frame.mcusPerLine = mcusPerLine;
|
|
frame.mcusPerColumn = mcusPerColumn;
|
|
}
|
|
var jfif = null;
|
|
var adobe = null;
|
|
var frame = undefined;
|
|
var resetInterval = 0;
|
|
var quantizationTables = [];
|
|
var frames = [];
|
|
var huffmanTablesAC = [];
|
|
var huffmanTablesDC = [];
|
|
var fileMarker = readUint16();
|
|
var malformedDataOffset = -1;
|
|
if (fileMarker != 0xFFD8) { // SOI (Start of Image)
|
|
throw new Error('SOI not found');
|
|
}
|
|
fileMarker = readUint16();
|
|
while (fileMarker != 0xFFD9) { // EOI (End of image)
|
|
switch (fileMarker) {
|
|
case 0xFF00: break;
|
|
case 0xFFE0: // APP0 (Application Specific)
|
|
case 0xFFE1: // APP1
|
|
case 0xFFE2: // APP2
|
|
case 0xFFE3: // APP3
|
|
case 0xFFE4: // APP4
|
|
case 0xFFE5: // APP5
|
|
case 0xFFE6: // APP6
|
|
case 0xFFE7: // APP7
|
|
case 0xFFE8: // APP8
|
|
case 0xFFE9: // APP9
|
|
case 0xFFEA: // APP10
|
|
case 0xFFEB: // APP11
|
|
case 0xFFEC: // APP12
|
|
case 0xFFED: // APP13
|
|
case 0xFFEE: // APP14
|
|
case 0xFFEF: // APP15
|
|
case 0xFFFE: { // COM (Comment)
|
|
var appData = readDataBlock();
|
|
if (fileMarker === 0xFFFE) {
|
|
var comment = '';
|
|
for (var ii = 0; ii < appData.byteLength; ii++) {
|
|
comment += String.fromCharCode(appData[ii]);
|
|
}
|
|
self.comments.push(comment);
|
|
}
|
|
if (fileMarker === 0xFFE0) {
|
|
if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 &&
|
|
appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00'
|
|
jfif = {
|
|
version: { major: appData[5], minor: appData[6] },
|
|
densityUnits: appData[7],
|
|
xDensity: (appData[8] << 8) | appData[9],
|
|
yDensity: (appData[10] << 8) | appData[11],
|
|
thumbWidth: appData[12],
|
|
thumbHeight: appData[13],
|
|
thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13])
|
|
};
|
|
}
|
|
}
|
|
// TODO APP1 - Exif
|
|
if (fileMarker === 0xFFE1) {
|
|
if (appData[0] === 0x45 &&
|
|
appData[1] === 0x78 &&
|
|
appData[2] === 0x69 &&
|
|
appData[3] === 0x66 &&
|
|
appData[4] === 0) { // 'EXIF\x00'
|
|
self.exifBuffer = appData.subarray(5, appData.length);
|
|
}
|
|
}
|
|
if (fileMarker === 0xFFEE) {
|
|
if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F &&
|
|
appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00'
|
|
adobe = {
|
|
version: appData[6],
|
|
flags0: (appData[7] << 8) | appData[8],
|
|
flags1: (appData[9] << 8) | appData[10],
|
|
transformCode: appData[11]
|
|
};
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 0xFFDB: { // DQT (Define Quantization Tables)
|
|
var quantizationTablesLength = readUint16();
|
|
var quantizationTablesEnd = quantizationTablesLength + offset - 2;
|
|
while (offset < quantizationTablesEnd) {
|
|
var quantizationTableSpec = data[offset++];
|
|
requestMemoryAllocation(64 * 4);
|
|
var tableData = new Int32Array(64);
|
|
if ((quantizationTableSpec >> 4) === 0) { // 8 bit values
|
|
for (var j = 0; j < 64; j++) {
|
|
var z = dctZigZag[j];
|
|
tableData[z] = data[offset++];
|
|
}
|
|
}
|
|
else if ((quantizationTableSpec >> 4) === 1) { //16 bit
|
|
for (var j = 0; j < 64; j++) {
|
|
var z = dctZigZag[j];
|
|
tableData[z] = readUint16();
|
|
}
|
|
}
|
|
else
|
|
throw new Error('DQT: invalid table spec');
|
|
quantizationTables[quantizationTableSpec & 15] = tableData;
|
|
}
|
|
break;
|
|
}
|
|
case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)
|
|
case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)
|
|
case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT)
|
|
readUint16(); // skip data length
|
|
frame = {
|
|
extended: (fileMarker === 0xFFC1),
|
|
progressive: (fileMarker === 0xFFC2),
|
|
precision: data[offset++],
|
|
scanLines: readUint16(),
|
|
samplesPerLine: readUint16(),
|
|
components: {},
|
|
componentsOrder: [],
|
|
maxH: 0,
|
|
maxV: 0,
|
|
mcusPerLine: 0,
|
|
mcusPerColumn: 0,
|
|
};
|
|
var pixelsInFrame = frame.scanLines * frame.samplesPerLine;
|
|
if (pixelsInFrame > maxResolutionInPixels) {
|
|
var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6);
|
|
throw new Error("maxResolutionInMP limit exceeded by ".concat(exceededAmount, "MP"));
|
|
}
|
|
var componentsCount = data[offset++];
|
|
for (var i = 0; i < componentsCount; i++) {
|
|
var componentId = data[offset];
|
|
var h = data[offset + 1] >> 4;
|
|
var v = data[offset + 1] & 15;
|
|
var qId = data[offset + 2];
|
|
frame.componentsOrder.push(componentId);
|
|
frame.components[componentId] = {
|
|
h: h,
|
|
v: v,
|
|
quantizationIdx: qId,
|
|
blocksPerColumn: 0,
|
|
blocksPerLine: 0,
|
|
blocks: [],
|
|
pred: 0,
|
|
};
|
|
offset += 3;
|
|
}
|
|
prepareComponents(frame);
|
|
frames.push(frame);
|
|
break;
|
|
}
|
|
case 0xFFC4: { // DHT (Define Huffman Tables)
|
|
var huffmanLength = readUint16();
|
|
for (var i = 2; i < huffmanLength;) {
|
|
var huffmanTableSpec = data[offset++];
|
|
var codeLengths = new Uint8Array(16);
|
|
var codeLengthSum = 0;
|
|
for (var j = 0; j < 16; j++, offset++) {
|
|
codeLengthSum += (codeLengths[j] = data[offset]);
|
|
}
|
|
requestMemoryAllocation(16 + codeLengthSum);
|
|
var huffmanValues = new Uint8Array(codeLengthSum);
|
|
for (var j = 0; j < codeLengthSum; j++, offset++) {
|
|
huffmanValues[j] = data[offset];
|
|
}
|
|
i += 17 + codeLengthSum;
|
|
var index = huffmanTableSpec & 15;
|
|
var table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC;
|
|
table[index] = buildHuffmanTable(codeLengths, huffmanValues);
|
|
}
|
|
break;
|
|
}
|
|
case 0xFFDD: // DRI (Define Restart Interval)
|
|
readUint16(); // skip data length
|
|
resetInterval = readUint16();
|
|
break;
|
|
case 0xFFDC: // Number of Lines marker
|
|
readUint16(); // skip data length
|
|
readUint16(); // Ignore this data since it represents the image height
|
|
break;
|
|
case 0xFFDA: { // SOS (Start of Scan)
|
|
readUint16(); // skip data length
|
|
var selectorsCount = data[offset++];
|
|
var components = [];
|
|
for (var i = 0; i < selectorsCount; i++) {
|
|
var component = frame.components[data[offset++]];
|
|
var tableSpec = data[offset++];
|
|
component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];
|
|
component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];
|
|
components.push(component);
|
|
}
|
|
var spectralStart = data[offset++];
|
|
var spectralEnd = data[offset++];
|
|
var successiveApproximation = data[offset++];
|
|
var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15);
|
|
offset += processed;
|
|
break;
|
|
}
|
|
case 0xFFFF: // Fill bytes
|
|
if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.
|
|
offset--;
|
|
}
|
|
break;
|
|
default: {
|
|
if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {
|
|
// could be incorrect encoding -- last 0xFF byte of the previous
|
|
// block was eaten by the encoder
|
|
offset -= 3;
|
|
break;
|
|
}
|
|
else if (fileMarker === 0xE0 || fileMarker == 0xE1) {
|
|
// Recover from malformed APP1 markers popular in some phone models.
|
|
// See https://github.com/eugeneware/jpeg-js/issues/82
|
|
if (malformedDataOffset !== -1) {
|
|
throw new Error("first unknown JPEG marker at offset ".concat(malformedDataOffset.toString(16), ", second unknown JPEG marker ").concat(fileMarker.toString(16), " at offset ").concat((offset - 1).toString(16)));
|
|
}
|
|
malformedDataOffset = offset - 1;
|
|
var nextOffset = readUint16();
|
|
if (data[offset + nextOffset - 2] === 0xFF) {
|
|
offset += nextOffset - 2;
|
|
break;
|
|
}
|
|
}
|
|
throw new Error('unknown JPEG marker ' + fileMarker.toString(16));
|
|
}
|
|
}
|
|
fileMarker = readUint16();
|
|
}
|
|
if (frames.length != 1)
|
|
throw new Error('only single frame JPEGs supported');
|
|
// set each frame's components quantization table
|
|
for (var i = 0; i < frames.length; i++) {
|
|
var cp = frames[i].components;
|
|
for (var j in cp) { // TODO: don't use `in`
|
|
cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx];
|
|
delete cp[j].quantizationIdx; // TODO: why ???
|
|
}
|
|
}
|
|
self.width = frame.samplesPerLine;
|
|
self.height = frame.scanLines;
|
|
self.jfif = jfif;
|
|
self.adobe = adobe;
|
|
self.components = [];
|
|
for (var i = 0; i < frame.componentsOrder.length; i++) {
|
|
var component = frame.components[frame.componentsOrder[i]];
|
|
self.components.push({
|
|
lines: buildComponentData(component),
|
|
scaleX: component.h / frame.maxH,
|
|
scaleY: component.v / frame.maxV
|
|
});
|
|
}
|
|
return self;
|
|
}
|
|
function getData(decoded) {
|
|
var offset = 0;
|
|
var colorTransform = false;
|
|
var width = decoded.width;
|
|
var height = decoded.height;
|
|
var dataLength = width * height * decoded.components.length;
|
|
requestMemoryAllocation(dataLength);
|
|
var data = new Uint8Array(dataLength);
|
|
switch (decoded.components.length) {
|
|
case 1: {
|
|
var component1 = decoded.components[0];
|
|
for (var y = 0; y < height; y++) {
|
|
var component1Line = component1.lines[0 | (y * component1.scaleY)];
|
|
for (var x = 0; x < width; x++) {
|
|
var Y = component1Line[0 | (x * component1.scaleX)];
|
|
data[offset++] = Y;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 2: {
|
|
// PDF might compress two component data in custom colorspace
|
|
var component1 = decoded.components[0];
|
|
var component2 = decoded.components[1];
|
|
for (var y = 0; y < height; y++) {
|
|
var component1Line = component1.lines[0 | (y * component1.scaleY)];
|
|
var component2Line = component2.lines[0 | (y * component2.scaleY)];
|
|
for (var x = 0; x < width; x++) {
|
|
var Y1 = component1Line[0 | (x * component1.scaleX)];
|
|
data[offset++] = Y1;
|
|
var Y2 = component2Line[0 | (x * component2.scaleX)];
|
|
data[offset++] = Y2;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 3: {
|
|
// The default transform for three components is true
|
|
colorTransform = true;
|
|
// The adobe transform marker overrides any previous setting
|
|
if (decoded.adobe && decoded.adobe.transformCode)
|
|
colorTransform = true;
|
|
var component1 = decoded.components[0];
|
|
var component2 = decoded.components[1];
|
|
var component3 = decoded.components[2];
|
|
for (var y = 0; y < height; y++) {
|
|
var component1Line = component1.lines[0 | (y * component1.scaleY)];
|
|
var component2Line = component2.lines[0 | (y * component2.scaleY)];
|
|
var component3Line = component3.lines[0 | (y * component3.scaleY)];
|
|
for (var x = 0; x < width; x++) {
|
|
var Y = void 0, Cb = void 0, Cr = void 0, R = void 0, G = void 0, B = void 0;
|
|
if (!colorTransform) {
|
|
R = component1Line[0 | (x * component1.scaleX)];
|
|
G = component2Line[0 | (x * component2.scaleX)];
|
|
B = component3Line[0 | (x * component3.scaleX)];
|
|
}
|
|
else {
|
|
Y = component1Line[0 | (x * component1.scaleX)];
|
|
Cb = component2Line[0 | (x * component2.scaleX)];
|
|
Cr = component3Line[0 | (x * component3.scaleX)];
|
|
R = clampTo8bit(Y + 1.402 * (Cr - 128));
|
|
G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));
|
|
B = clampTo8bit(Y + 1.772 * (Cb - 128));
|
|
}
|
|
data[offset++] = R;
|
|
data[offset++] = G;
|
|
data[offset++] = B;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 4: {
|
|
if (!decoded.adobe)
|
|
throw new Error('Unsupported color mode (4 components)');
|
|
// The default transform for four components is false
|
|
colorTransform = false;
|
|
// The adobe transform marker overrides any previous setting
|
|
if (decoded.adobe && decoded.adobe.transformCode)
|
|
colorTransform = true;
|
|
var component1 = decoded.components[0];
|
|
var component2 = decoded.components[1];
|
|
var component3 = decoded.components[2];
|
|
var component4 = decoded.components[3];
|
|
for (var y = 0; y < height; y++) {
|
|
var component1Line = component1.lines[0 | (y * component1.scaleY)];
|
|
var component2Line = component2.lines[0 | (y * component2.scaleY)];
|
|
var component3Line = component3.lines[0 | (y * component3.scaleY)];
|
|
var component4Line = component4.lines[0 | (y * component4.scaleY)];
|
|
for (var x = 0; x < width; x++) {
|
|
var Y = void 0, Cb = void 0, Cr = void 0, K = void 0, C = void 0, M = void 0, Ye = void 0;
|
|
if (!colorTransform) {
|
|
C = component1Line[0 | (x * component1.scaleX)];
|
|
M = component2Line[0 | (x * component2.scaleX)];
|
|
Ye = component3Line[0 | (x * component3.scaleX)];
|
|
K = component4Line[0 | (x * component4.scaleX)];
|
|
}
|
|
else {
|
|
Y = component1Line[0 | (x * component1.scaleX)];
|
|
Cb = component2Line[0 | (x * component2.scaleX)];
|
|
Cr = component3Line[0 | (x * component3.scaleX)];
|
|
K = component4Line[0 | (x * component4.scaleX)];
|
|
C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128));
|
|
M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));
|
|
Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128));
|
|
}
|
|
data[offset++] = 255 - C;
|
|
data[offset++] = 255 - M;
|
|
data[offset++] = 255 - Ye;
|
|
data[offset++] = 255 - K;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
default:
|
|
throw new Error('Unsupported color mode');
|
|
}
|
|
return data;
|
|
}
|
|
export function decodeJpeg(encoded, createImageData) {
|
|
totalBytesAllocated = 0;
|
|
if (encoded.length === 0)
|
|
throw new Error('Empty jpeg buffer');
|
|
var decoded = parse(encoded);
|
|
requestMemoryAllocation(decoded.width * decoded.height * 4);
|
|
var data = getData(decoded);
|
|
var imageData = createImageData(decoded.width, decoded.height);
|
|
var width = imageData.width;
|
|
var height = imageData.height;
|
|
var imageDataArray = imageData.data;
|
|
var i = 0;
|
|
var j = 0;
|
|
switch (decoded.components.length) {
|
|
case 1:
|
|
for (var y = 0; y < height; y++) {
|
|
for (var x = 0; x < width; x++) {
|
|
var Y = data[i++];
|
|
imageDataArray[j++] = Y;
|
|
imageDataArray[j++] = Y;
|
|
imageDataArray[j++] = Y;
|
|
imageDataArray[j++] = 255;
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
for (var y = 0; y < height; y++) {
|
|
for (var x = 0; x < width; x++) {
|
|
var R = data[i++];
|
|
var G = data[i++];
|
|
var B = data[i++];
|
|
imageDataArray[j++] = R;
|
|
imageDataArray[j++] = G;
|
|
imageDataArray[j++] = B;
|
|
imageDataArray[j++] = 255;
|
|
}
|
|
}
|
|
break;
|
|
case 4:
|
|
for (var y = 0; y < height; y++) {
|
|
for (var x = 0; x < width; x++) {
|
|
var C = data[i++];
|
|
var M = data[i++];
|
|
var Y = data[i++];
|
|
var K = data[i++];
|
|
var R = 255 - clampTo8bit(C * (1 - K / 255) + K);
|
|
var G = 255 - clampTo8bit(M * (1 - K / 255) + K);
|
|
var B = 255 - clampTo8bit(Y * (1 - K / 255) + K);
|
|
imageDataArray[j++] = R;
|
|
imageDataArray[j++] = G;
|
|
imageDataArray[j++] = B;
|
|
imageDataArray[j++] = 255;
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
throw new Error('Unsupported color mode');
|
|
}
|
|
return imageData;
|
|
}
|
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImpwZWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsOENBQThDO0FBQzlDOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBNkNGLElBQU0sU0FBUyxHQUFHLElBQUksVUFBVSxDQUFDO0lBQy9CLENBQUM7SUFDRCxDQUFDLEVBQUUsQ0FBQztJQUNKLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQztJQUNSLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDYixFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUNqQixDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDckIsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUN6QixDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRTtJQUM3QixFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFO0lBQzFCLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRTtJQUN0QixFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRTtJQUNsQixFQUFFLEVBQUUsRUF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b21wb25lbnQuaHVmZm1hblRhYmxlQUMhKTtcclxuICAgICAgICAgIGNvbnN0IHMgPSBycyAmIDE1O1xyXG4gICAgICAgICAgciA9IHJzID4+IDQ7IC8vIHRoaXMgd2FzIG5ldyB2YXJpYWJsZSBpbiBvbGQgY29kZVxyXG4gICAgICAgICAgaWYgKHMgPT09IDApIHtcclxuICAgICAgICAgICAgaWYgKHIgPCAxNSkge1xyXG4gICAgICAgICAgICAgIGVvYnJ1biA9IHJlY2VpdmUocikgKyAoMSA8PCByKTtcclxuICAgICAgICAgICAgICBzdWNjZXNzaXZlQUNTdGF0ZSA9IDQ7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgciA9IDE2O1xyXG4gICAgICAgICAgICAgIHN1Y2Nlc3NpdmVBQ1N0YXRlID0gMTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKHMgIT09IDEpIHRocm93IG5ldyBFcnJvcignaW52YWxpZCBBQ24gZW5jb2RpbmcnKTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDTmV4dFZhbHVlID0gcmVjZWl2ZUFuZEV4dGVuZChzKTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDU3RhdGUgPSByID8gMiA6IDM7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICBjYXNlIDE6IC8vIHNraXBwaW5nIHIgemVybyBpdGVtc1xyXG4gICAgICAgIGNhc2UgMjpcclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgci0tO1xyXG4gICAgICAgICAgICBpZiAociA9PT0gMCkgc3VjY2Vzc2l2ZUFDU3RhdGUgPSBzdWNjZ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Blb2JydW4gPSAwO1xyXG5cclxuICAgIGlmIChjb21wb25lbnRzTGVuZ3RoID09IDEpIHtcclxuICAgICAgY29tcG9uZW50ID0gY29tcG9uZW50c1swXTtcclxuICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCByZXNldEludGVydmFsOyBuKyspIHtcclxuICAgICAgICBkZWNvZGVCbG9jayhjb21wb25lbnQsIGRlY29kZUZuLCBtY3UpO1xyXG4gICAgICAgIG1jdSsrO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBmb3IgKGxldCBuID0gMDsgbiA8IHJlc2V0SW50ZXJ2YWw7IG4rKykge1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29tcG9uZW50c0xlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICBjb21wb25lbnQgPSBjb21wb25lbnRzW2ldO1xyXG4gICAgICAgICAgaCA9IGNvbXBvbmVudC5oO1xyXG4gICAgICAgICAgdiA9IGNvbXBvbmVudC52O1xyXG4gICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCB2OyBqKyspIHtcclxuICAgICAgICAgICAgZm9yIChsZXQgayA9IDA7IGsgPCBoOyBrKyspIHtcclxuICAgICAgICAgICAgICBkZWNvZGVNY3UoY29tcG9uZW50LCBkZWNvZGVGbiwgbWN1LCBqLCBrKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBtY3UrKztcclxuXHJcbiAgICAgICAgLy8gSWYgd2UndmUgcmVhY2hlZCBvdXIgZXhwZWN0ZWQgTUNVJ3MsIHN0b3AgZGVjb2RpbmdcclxuICAgICAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkge1xyXG4gICAgICAvLyBTa2lwIHRyYWlsaW5nIGJ5dGVzIGF0IHRoZSBlbmQgb2YgdGhlIHNjYW4gLSB1bnRpbCB3ZSByZWFjaCB0aGUgbmV4dCBtYXJrZXJcclxuICAgICAgZG8ge1xyXG4gICAgICAgIGlmIChkYXRhW29mZnNldF0gPT09IDB4RkYpIHtcclxuICAgICAgICAgIGlmIChkYXRhW29mZnNldCArIDFdICE9PSAweDAwKSB7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBvZmZzZXQgKz0gMTtcclxuICAgICAgfSB3aGlsZSAob2Zmc2V0IDwgZGF0YS5sZW5ndGggLSAyKTtcclxuICAgIH1cclxuXHJcbiAgICAvLyBmaW5kIG1hcmtlclxyXG4gICAgYml0c0NvdW50ID0gMDtcclxuICAgIG1hcmtlciA9IChkYXRhW29mZnNldF0gPDwgOCkgfCBkYXRhW29mZnNldCArIDFdO1xyXG5cclxuICAgIGlmIChtYXJrZXIgPCAweEZGMDApIHRocm93IG5ldyBFcnJvcignbWFya2VyIHdhcyBub3QgZm91bmQnKTtcclxuXHJcbiAgICBpZiAobWFya2VyID49IDB4RkZEMCAmJiBtYXJrZXIgPD0gMHhGRkQ3KSB7IC8vIFJTVHhcclxuICAgICAgb2Zmc2V0ICs9IDI7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICB9XHJcblxyXG4gIHJldHVybiBvZmZzZXQgLSBzdGFydE9mZnNldDtcclxufVxyXG5cclxuZnVuY3Rpb24gYnVpbGRDb21wb25lbnREYXRhKGNvbXBvbmVudDogQ29tcG9uZW50KSB7XHJcbiAgY29uc3QgbGluZXMgPSBbXTtcclxuICBjb25zdCBibG9ja3NQZXJMaW5lID0gY29tcG9uZW50LmJsb2Nrc1BlckxpbmU7XHJcbiAgY29uc3QgYmxvY2tzUGVyQ29sdW1uID0gY29tcG9uZW50LmJsb2Nrc1BlckNvbHVtbjtcclxuICBjb25zdCBzYW1wbGVzUGVyTGluZSA9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GludmVyc2UgRENUIG9uIHJvd3NcclxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgODsgKytpKSB7XHJcbiAgICAgIGNvbnN0IHJvdyA9IDggKiBpO1xyXG5cclxuICAgICAgLy8gY2hlY2sgZm9yIGFsbC16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICsgcm93XSA9PSAwICYmIHBbMiArIHJvd10gPT0gMCAmJiBwWzMgKyByb3ddID09IDAgJiZcclxuICAgICAgICBwWzQgKyByb3ddID09IDAgJiYgcFs1ICsgcm93XSA9PSAwICYmIHBbNiArIHJvd10gPT0gMCAmJlxyXG4gICAgICAgIHBbNyArIHJvd10gPT0gMCkge1xyXG4gICAgICAgIGNvbnN0IHQgPSAoZGN0U3FydDIgKiBwWzAgKyByb3ddICsgNTEyKSA+PiAxMDtcclxuICAgICAgICBwWzAgKyByb3ddID0gdDtcclxuICAgICAgICBwWzEgKyByb3ddID0gdDtcclxuICAgICAgICBwWzIgKyByb3ddID0gdDtcclxuICAgICAgICBwWzMgKyByb3ddID0gdDtcclxuICAgICAgICBwWzQgKyByb3ddID0gdDtcclxuICAgICAgICBwWzUgKyByb3ddID0gdDtcclxuICAgICAgICBwWzYgKyByb3ddID0gdDtcclxuICAgICAgICBwWzcgKyByb3ddID0gdDtcclxuICAgICAgICBjb250aW51ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgLy8gc3RhZ2UgNFxyXG4gICAgICBsZXQgdjAgPSAoZGN0U3FydDIgKiBwWzAgKyByb3ddICsgMTI4KSA+PiA4O1xyXG4gICAgICBsZXQgdjEgPSAoZGN0U3FydDIgKiBwWzQgKyByb3ddICsgMTI4KSA+PiA4O1xyXG4gICAgICBsZXQgdjIgPSBwWzIgKyByb3ddO1xyXG4gICAgICBsZXQgdjMgPSBwWzYgKyByb3ddO1xyXG4gICAgICBsZXQgdjQgPSAoZGN0U3FydDFkMiAqIChwWzEgKyByb3ddIC0gcFs3ICsgcm93XSkgKyAxM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Q29zMyAtIHY3ICogZGN0U2luMyArIDIwNDgpID4+IDEyO1xyXG4gICAgICB2NyA9IHQ7XHJcbiAgICAgIHQgPSAodjUgKiBkY3RTaW4xICsgdjYgKiBkY3RDb3MxICsgMjA0OCkgPj4gMTI7XHJcbiAgICAgIHY1ID0gKHY1ICogZGN0Q29zMSAtIHY2ICogZGN0U2luMSArIDIwNDgpID4+IDEyO1xyXG4gICAgICB2NiA9IHQ7XHJcblxyXG4gICAgICAvLyBzdGFnZSAxXHJcbiAgICAgIHBbMCArIHJvd10gPSB2MCArIHY3O1xyXG4gICAgICBwWzcgKyByb3ddID0gdjAgLSB2NztcclxuICAgICAgcFsxICsgcm93XSA9IHYxICsgdjY7XHJcbiAgICAgIHBbNiArIHJvd10gPSB2MSAtIHY2O1xyXG4gICAgICBwWzIgKyByb3ddID0gdjIgKyB2NTtcclxuICAgICAgcFs1ICsgcm93XSA9IHYyIC0gdjU7XHJcbiAgICAgIHBbMyArIHJvd10gPSB2MyArIHY0O1xyXG4gICAgICBwWzQgKyByb3ddID0gdjMgLSB2NDtcclxuICAgIH1cclxuXHJcbiAgICAvLyBpbnZlcnNlIERDVCBvbiBjb2x1bW5zXHJcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IDg7ICsraSkge1xyXG4gICAgICBjb25zdCBjb2wgPSBpO1xyXG5cclxuICAgICAgLy8gY2hlY2sgZm9yIGFsbC16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICogOCArIGNvbF0gPT0gMCAmJiBwWzIgKiA4ICsgY29sXSA9PSAwICYmIHBbMyAqIDggKyBjb2xdID09IDAgJiZcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9PSAwICYmIHBbNSAqIDggKyBjb2xdID09IDAgJiYgcFs2ICogOCArIGNvbF0gPT0gMCAmJlxyXG4gICAgICAgIHBbNyAqIDggKyBjb2xdID09IDApIHtcclxuICAgICAgICBjb25zdCB0ID0gKGRjdFNxcnQyICogZGF0YUluW2kgKyAwXSArIDgxOTIpID4+IDE0O1xyXG4gICAgICAgIHBbMCAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzEgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFsyICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbMyAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFs1ICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbNiAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzcgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgY29udGludWU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIC8vIHN0YWdlIDRcclxuICAgICAgbGV0IHYwID0gKGRjdFNxcnQyICogcFswICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYxID0gKGRjdFNxcnQyICogcFs0ICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYyID0gcFsyICogOCArIGNvbF07XHJcbiAgICAgIGxldCB2MyA9IHBbNiAqIDggKyBjb2xdO1xyXG4gICAgICBsZXQgdjQgPSAoZGN0U3FydDFkMiAqIChwWzEgKiA4ICsgY29sXSAtIHBbNyAqIDggKyBjb2xdKSArIDIwNDgpID4+IDEyO1xyXG4gICAgICBsZXQgdjcgPSAoZGN0U3FydDFkMiAqIChwWzEgKiA4ICsgY29sXSArIHBbNyAqIDggKyBjb2xdKSArIDIwNDgpID4+IDEyO1xyXG4gICAgICBsZXQgdjUgPSBwWzMgKiA4ICsgY29sXTtcclxuICAgICAgbGV0IHY2ID0gcFs1ICogOCArIGNvbF07XHJcblxyXG4gICAgICAvLyBzdGFnZSAzXHJcbiAgICAgIGxldCB0ID0gKHYwIC0gdjEgKyAxKSA+PiAxO1xyXG4gICAgICB2MCA9ICh2MCArIHYxICsgMSkgPj4gMTtcclxuICAgICA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heVtdID0gW107XHJcbiAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGJsb2Nrc1BlckxpbmVGb3JNY3U7IGorKykge1xyXG4gICAgICAgICAgICByb3cucHVzaChuZXcgSW50MzJBcnJheSg2NCkpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgYmxvY2tzLnB1c2gocm93KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29tcG9uZW50LmJsb2Nrc1BlckxpbmUgPSBibG9ja3NQZXJMaW5lO1xyXG4gICAgICAgIGNvbXBvbmVudC5ibG9ja3NQZXJDb2x1bW4gPSBibG9ja3NQZXJDb2x1bW47XHJcbiAgICAgICAgY29tcG9uZW50LmJsb2NrcyA9IGJsb2NrcztcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZyYW1lLm1heEggPSBtYXhIO1xyXG4gICAgZnJhbWUubWF4ViA9IG1heFY7XHJcbiAgICBmcmFtZS5tY3VzUGVyTGluZSA9IG1jdXNQZXJMaW5lO1xyXG4gICAgZnJhbWUubWN1c1BlckNvbHVtbiA9IG1jdXNQZXJDb2x1bW47XHJcbiAgfVxyXG5cclxuICBsZXQgamZpZiA9IG51bGw7XHJcbiAgbGV0IGFkb2JlID0gbnVsbDtcclxuICBsZXQgZnJhbWU6IEZyYW1lIHwgdW5kZWZpbmVkID0gdW5kZWZpbmVkO1xyXG4gIGxldCByZXNldEludGVydmFsID0gMDtcclxuICBsZXQgcXVhbnRpemF0aW9uVGFibGVzID0gW107XHJcbiAgbGV0IGZyYW1lczogRnJhbWVbXSA9IFtdO1xyXG4gIGxldCBodWZmbWFuVGFibGVzQUM6IChudW1iZXJbXSB8IG51bWJlcltdW10pW10gPSBbXTtcclxuICBsZXQgaHVmZm1hblRhYmxlc0RDOiAobnVtYmVyW10gfCBudW1iZXJbXVtdKVtdID0gW107XHJcbiAgbGV0IGZpbGVNYXJrZXIgPSByZWFkVWludDE2KCk7XHJcbiAgbGV0IG1hbGZvcm1lZERhdG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1lbnQpXHJcbiAgICAgICAgY29uc3QgYXBwRGF0YSA9IHJlYWREYXRhQmxvY2soKTtcclxuXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZGRSkge1xyXG4gICAgICAgICAgbGV0IGNvbW1lbnQgPSAnJztcclxuICAgICAgICAgIGZvciAobGV0IGlpID0gMDsgaWkgPCBhcHBEYXRhLmJ5dGVMZW5ndGg7IGlpKyspIHtcclxuICAgICAgICAgICAgY29tbWVudCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGFwcERhdGFbaWldKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIHNlbGYuY29tbWVudHMucHVzaChjb21tZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRTApIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDRBICYmIGFwcERhdGFbMV0gPT09IDB4NDYgJiYgYXBwRGF0YVsyXSA9PT0gMHg0OSAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDQ2ICYmIGFwcERhdGFbNF0gPT09IDApIHsgLy8gJ0pGSUZcXHgwMCdcclxuICAgICAgICAgICAgamZpZiA9IHtcclxuICAgICAgICAgICAgICB2ZXJzaW9uOiB7IG1ham9yOiBhcHBEYXRhWzVdLCBtaW5vcjogYXBwRGF0YVs2XSB9LFxyXG4gICAgICAgICAgICAgIGRlbnNpdHlVbml0czogYXBwRGF0YVs3XSxcclxuICAgICAgICAgICAgICB4RGVuc2l0eTogKGFwcERhdGFbOF0gPDwgOCkgfCBhcHBEYXRhWzldLFxyXG4gICAgICAgICAgICAgIHlEZW5zaXR5OiAoYXBwRGF0YVsxMF0gPDwgOCkgfCBhcHBEYXRhWzExXSxcclxuICAgICAgICAgICAgICB0aHVtYldpZHRoOiBhcHBEYXRhWzEyXSxcclxuICAgICAgICAgICAgICB0aHVtYkhlaWdodDogYXBwRGF0YVsxM10sXHJcbiAgICAgICAgICAgICAgdGh1bWJEYXRhOiBhcHBEYXRhLnN1YmFycmF5KDE0LCAxNCArIDMgKiBhcHBEYXRhWzEyXSAqIGFwcERhdGFbMTNdKVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBUT0RPIEFQUDEgLSBFeGlmXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZFMSkge1xyXG4gICAgICAgICAgaWYgKGFwcERhdGFbMF0gPT09IDB4NDUgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVsxXSA9PT0gMHg3OCAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzJdID09PSAweDY5ICYmXHJcbiAgICAgICAgICAgIGFwcERhdGFbM10gPT09IDB4NjYgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVs0XSA9PT0gMCkgeyAvLyAnRVhJRlxceDAwJ1xyXG4gICAgICAgICAgICBzZWxmLmV4aWZCdWZmZXIgPSBhcHBEYXRhLnN1YmFycmF5KDUsIGFwcERhdGEubGVuZ3RoKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRUUpIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDQxICYmIGFwcERhdGFbMV0gPT09IDB4NjQgJiYgYXBwRGF0YVsyXSA9PT0gMHg2RiAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDYyICYmIGFwcERhdGFbNF0gPT09IDB4NjUgJiYgYXBwRGF0YVs1XSA9PT0gMCkgeyAvLyAnQWRvYmVcXHgwMCdcclxuICAgICAgICAgICAgYWRvYmUgPSB7XHJcbiAgICAgICAgICAgICAgdmVyc2lvbjogYXBwRGF0YVs2XSxcclxuICAgICAgICAgICAgICBmbGFnczA6IChhcHBEYXRhWzddIDw8IDgpIHwgYXBwRGF0YVs4XSxcclxuICAgICAgICAgICAgICBmbGFnczE6IChhcHBEYXRhWzldIDw8IDgpIHwgYXBwRGF0YVsxMF0sXHJcbiAgICAgICAgICAgICAgdHJhbnNmb3JtQ29kZTogYXBwRGF0YVsxMV1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGREI6IHsgLy8gRFFUIChEZWZpbmUgUXVhbnRpemF0aW9uIFRhYmxlcylcclxuICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZXNMZW5ndGggPSByZWFkVWludDE2KCk7XHJcbiAgICAgICAgY29uc3QgcXVhbnRpemF0aW9uVGFibGVzRW5kID0gcXVhbnRpemF0aW9uVGFibGVzTGVuZ3RoICsgb2Zmc2V0IC0gMjtcclxuICAgICAgICB3aGlsZSAob2Zmc2V0IDwgcXVhbnRpemF0aW9uVGFibGVzRW5kKSB7XHJcbiAgICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIHJlcXVlc3RNZW1vcnlBbGxvY2F0aW9uKDY0ICogNCk7XHJcbiAgICAgICAgICBjb25zdCB0YWJsZURhdGEgPSBuZXcgSW50MzJBcnJheSg2NCk7XHJcbiAgICAgICAgICBpZiAoKHF1YW50aXphdGlvblRhYmxlU3BlYyA+PiA0KSA9PT0gMCkgeyAvLyA4IGJpdCB2YWx1ZXNcclxuICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCA2NDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1tqXTtcclxuICAgICAgICAgICAgICB0YWJsZURhdGFbel0gPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIGlmICgocXVhbnRpemF0aW9uVGFibGVTcGVjID4+IDQpID09PSAxKSB7IC8vMTYgYml0XHJcbiAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgNjQ7IGorKykge1xyXG4gICAgICAgICAgICAgIGNvbnN0IHogPSBkY3RaaWdaYWdbal07XHJcbiAgICAgICAgICAgICAgdGFibGVEYXRhW3pdID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdEUVQ6IGludmFsaWQgdGFibGUgc3BlYycpO1xyXG4gICAgICAgICAgcXVhbnRpemF0aW9uVGFibGVzW3F1YW50aXphdGlvblRhYmxlU3BlYyAmIDE1XSA9IHRhYmxlRGF0YTtcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGQzA6IC8vIFNPRjAgKFN0YXJ0IG9mIEZyYW1lLCBCYXNlbGluZSBEQ1QpXHJcbiAgICAgIGNhc2UgMHhGRkMxOiAvLyBTT0YxIChTdGFydCBvZiBGcmFtZSwgRXh0ZW5kZWQgRENUKVxyXG4gICAgICBjYXNlIDB4RkZDMjogeyAvLyBTT0YyIChTdGFydCBvZiBGcmFtZSwgUHJvZ3Jlc3NpdmUgRENUKVxyXG4gICAgICAgIHJlYWRVaW50MTYoKTsgLy8gc2tpcCBkYXRhIGxlbmd0aFxyXG4gICAgICAgIGZyYW1lID0ge1xyXG4gICAgICAgICAgZXh0ZW5kZWQ6IChmaWxlTWFya2VyID09PSAweEZGQzEpLFxyXG4gICAgICAgICAgcHJvZ3Jlc3NpdmU6IChmaWxlTWFya2VyID09PSAweEZGQzIpLFxyXG4gICAgICAgICAgcHJlY2lzaW9uOiBkYXRhW29mZnNldCsrXSxcclxuICAgICAgICAgIHNjYW5MaW5lczogcmVhZFVpbnQxNigpLFxyXG4gICAgICAgICAgc2FtcGxlc1BlckxpbmU6IHJlYWRVaW50MTYoKSxcclxuICAgICAgICAgIGNvbXBvbmVudHM6IHt9LFxyXG4gICAgICAgICAgY29tcG9uZW50c09yZGVyOiBbXSxcclxuICAgICAgICAgIG1heEg6IDAsXHJcbiAgICAgICAgICBtYXhWOiAwLFxyXG4gICAgICAgICAgbWN1c1BlckxpbmU6IDAsXHJcbiAgICAgICAgICBtY3VzUGVyQ29sdW1uOiAwLFxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGNvbnN0IHBpeGVsc0luRnJhbWUgPSBmcmFtZSEuc2NhbkxpbmVzICogZnJhbWUhLnNhbXBsZXNQZXJMaW5lO1xyXG4gICAgICAgIGlmIChwaXhlbHNJbkZyYW1lID4gbWF4UmVzb2x1dGlvbkluUGl4ZWxzKSB7XHJcbiAgICAgICAgICBjb25zdCBleGNlZWRlZEFtb3VudCA9IE1hdGguY2VpbCgocGl4ZWxzSW5GcmFtZSAtIG1heFJlc29sdXRpb25JblBpeGVscykgLyAxZTYpO1xyXG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBtYXhSZXNvbHV0aW9uSW5NUCBsaW1pdCBleGNlZWRlZCBieSAke2V4Y2VlZGVkQW1vdW50fU1QYCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBjb21wb25lbnRzQ291bnQgPSBkYXRhW29mZnNldCsrXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzQ291bnQ7IGkrKykge1xyXG4gICAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSBkYXRhW29mZnNldF07XHJcbiAgICAgICAgICBjb25zdCBoID0gZGF0YVtvZmZzZXQgKyAxXSA+PiA0O1xyXG4gICAgICAgICAgY29uc3QgdiA9IGRhdGFbb2Zmc2V0ICsgMV0gJiAxNTtcclxuICAgICAgICAgIGNvbnN0IHFJZCA9IGRhdGFbb2Zmc2V0ICsgMl07XHJcbiAgICAgICAgICBmcmFtZSEuY29tcG9uZW50c09yZGVyLnB1c2goY29tcG9uZW50SWQpO1xyXG4gICAgICAgICAgZnJhbWUhLmNvbXBvbmVudHNbY29tcG9uZW50SWRdID0ge1xyXG4gICAgICAgICAgICBoOiBoLFxyXG4gICAgICAgICAgICB2OiB2LFxyXG4gICAgICAgICAgICBxdWFudGl6YXRpb25JZHg6IHFJZCxcclxuICAgICAgICAgICAgYmxvY2tzUGVyQ29sdW1uOiAwLFxyXG4gICAgICAgICAgICBibG9ja3NQZXJMaW5lOiAwLFxyXG4gICAgICAgICAgICBibG9ja3M6IFtdLFxyXG4gICAgICAgICAgICBwcmVkOiAwLFxyXG4gICAgICAgICAgfTtcclxuICAgICAgICAgIG9mZnNldCArPSAzO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwcmVwYXJlQ29tcG9uZW50cyhmcmFtZSEpO1xyXG4gICAgICAgIGZyYW1lcy5wdXNoKGZyYW1lKTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZDNDogey8vIERIVCAoRGVmaW5lIEh1ZmZtYW4gVGFibGVzKVxyXG4gICAgICAgIGNvbnN0IGh1ZmZtYW5MZW5ndGggPSByZWFkVWludDE2KCk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IGkgPSAyOyBpIDwgaHVmZm1hbkxlbmd0aDspIHtcclxuICAgICAgICAgIGNvbnN0IGh1ZmZtYW5UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIGNvbnN0IGNvZGVMZW5ndGhzID0gbmV3IFVpbnQ4QXJyYXkoMTYpO1xyXG4gICAgICAgICAgbGV0IGNvZGVMZW5ndGhTdW0gPSAwO1xyXG5cclxuICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgMTY7IGorKywgb2Zmc2V0KyspIHtcclxuICAgICAgICAgICAgY29kZUxlbmd0aFN1bSArPSAoY29kZUxlbmd0aHNbal0gPSBkYXRhW29mZnNldF0pO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICAgIHJlcXVlc3RNZW1vcnlBbGxvY2F0aW9uKDE2ICsgY29kZUxlbmd0aFN1bSk7XHJcbiAgICAgICAgICBjb25zdCBodWZmbWFuVmFsdWVzID0gbmV3IFVpbnQ4QXJyYXkoY29kZUxlbmd0aFN1bSk7XHJcblxyXG4gICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBjb2RlTGVuZ3RoU3VtOyBqKyssIG9mZnNldCsrKSB7XHJcbiAgICAgICAgICAgIGh1ZmZtYW5WYWx1ZXNbal0gPSBkYXRhW29mZnNldF07XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgaSArPSAxNyArIGNvZGVMZW5ndGhTdW07XHJcblxyXG4gICAgICAgICAgY29uc3QgaW5kZXggPSBodWZmbWFuVGFibGVTcGVjICYgMTU7XHJcbiAgICAgICAgICBjb25zdCB0YWJsZSA9IChodWZmbWFuVGFibGVTcGVjID4+IDQpID09PSAwID8gaHVmZm1hblRhYmxlc0RDIDogaHVmZm1hblRhYmxlc0FDO1xyXG4gICAgICAgICAgdGFibGVbaW5kZXhdID0gYnVpbGRIdWZmbWFuVGFibGUoY29kZUxlbmd0aHMsIGh1ZmZtYW5WYWx1ZXMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZERDogLy8gRFJJIChEZWZpbmUgUmVzdGFydCBJbnRlcnZhbClcclxuICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGhcclxuICAgICAgICByZXNldEludGVydmFsID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICBjYXNlIDB4RkZEQzogLy8gTnVtYmVyIG9mIExpbmVzIG1hcmtlclxyXG4gICAgICAgIHJlYWRVaW50MTYoKSAvLyBza2lwIGRhdGEgbGVuZ3RoXHJcbiAgICAgICAgcmVhZFVpbnQxNigpIC8vIElnbm9yZSB0aGlzIGRhdGEgc2luY2UgaXQgcmVwcmV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FyZS9qcGVnLWpzL2lzc3Vlcy84MlxyXG4gICAgICAgICAgaWYgKG1hbGZvcm1lZERhdGFPZmZzZXQgIT09IC0xKSB7XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgZmlyc3QgdW5rbm93biBKUEVHIG1hcmtlciBhdCBvZmZzZXQgJHttYWxmb3JtZWREYXRhT2Zmc2V0LnRvU3RyaW5nKDE2KX0sIHNlY29uZCB1bmtub3duIEpQRUcgbWFya2VyICR7ZmlsZU1hcmtlci50b1N0cmluZygxNil9IGF0IG9mZnNldCAkeyhvZmZzZXQgLSAxKS50b1N0cmluZygxNil9YCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBtYWxmb3JtZWREYXRhT2Zmc2V0ID0gb2Zmc2V0IC0gMTtcclxuICAgICAgICAgIGNvbnN0IG5leHRPZmZzZXQgPSByZWFkVWludDE2KCk7XHJcbiAgICAgICAgICBpZiAoZGF0YVtvZmZzZXQgKyBuZXh0T2Zmc2V0IC0gMl0gPT09IDB4RkYpIHtcclxuICAgICAgICAgICAgb2Zmc2V0ICs9IG5leHRPZmZzZXQgLSAyO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRocm93IG5ldyBFcnJvcigndW5rbm93biBKUEVHIG1hcmtlciAnICsgZmlsZU1hcmtlci50b1N0cmluZygxNikpO1xyXG4gICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZmlsZU1hcmtlciA9IHJlYWRVaW50MTYoKTtcclxuICB9XHJcblxyXG4gIGlmIChmcmFtZXMubGVuZ3RoICE9IDEpIHRocm93IG5ldyBFcnJvcignb25seSBzaW5nbGUgZnJhbWUgSlBFR3Mgc3VwcG9ydGVkJyk7XHJcblxyXG4gIC8vIHNldCBlYWNoIGZyYW1lJ3MgY29tcG9uZW50cyBxdWFudGl6YXRpb24gdGFibGVcclxuICBmb3IgKGxldCBpID0gMDsgaSA8IGZyY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VlO1xyXG5cclxuICAgICAgY29uc3QgY29tcG9uZW50MSA9IGRlY29kZWQuY29tcG9uZW50c1swXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MiA9IGRlY29kZWQuY29tcG9uZW50c1sxXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MyA9IGRlY29kZWQuY29tcG9uZW50c1syXTtcclxuXHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQxTGluZSA9IGNvbXBvbmVudDEubGluZXNbMCB8ICh5ICogY29tcG9uZW50MS5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQyTGluZSA9IGNvbXBvbmVudDIubGluZXNbMCB8ICh5ICogY29tcG9uZW50Mi5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQzTGluZSA9IGNvbXBvbmVudDMubGluZXNbMCB8ICh5ICogY29tcG9uZW50My5zY2FsZVkpXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICBsZXQgWSwgQ2IsIENyLCBSLCBHLCBCO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgUiA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEcgPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBCID0gY29tcG9uZW50M0xpbmVbMCB8ICh4ICogY29tcG9uZW50My5zY2FsZVgpXTtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIFkgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBD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G4gICAgICBjb25zdCBjb21wb25lbnQxID0gZGVjb2RlZC5jb21wb25lbnRzWzBdO1xyXG4gICAgICBjb25zdCBjb21wb25lbnQyID0gZGVjb2RlZC5jb21wb25lbnRzWzFdO1xyXG4gICAgICBjb25zdCBjb21wb25lbnQzID0gZGVjb2RlZC5jb21wb25lbnRzWzJdO1xyXG4gICAgICBjb25zdCBjb21wb25lbnQ0ID0gZGVjb2RlZC5jb21wb25lbnRzWzNdO1xyXG5cclxuICAgICAgZm9yIChsZXQgeSA9IDA7IHkgPCBoZWlnaHQ7IHkrKykge1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudDFMaW5lID0gY29tcG9uZW50MS5saW5lc1swIHwgKHkgKiBjb21wb25lbnQxLnNjYWxlWSldO1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudDJMaW5lID0gY29tcG9uZW50Mi5saW5lc1swIHwgKHkgKiBjb21wb25lbnQyLnNjYWxlWSldO1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudDNMaW5lID0gY29tcG9uZW50My5saW5lc1swIHwgKHkgKiBjb21wb25lbnQzLnNjYWxlWSldO1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudDRMaW5lID0gY29tcG9uZW50NC5saW5lc1swIHwgKHkgKiBjb21wb25lbnQ0LnNjYWxlWSldO1xyXG5cclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGxldCBZLCBDYiwgQ3IsIEssIEMsIE0sIFllO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgQyA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIE0gPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBZZSA9IGNvbXBvbmVudDNMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDMuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEsgPSBjb21wb25lbnQ0TGluZVswIHwgKHggKiBjb21wb25lbnQ0LnNjYWxlWCldO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgWSA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIENiID0gY29tcG9uZW50MkxpbmVbMCB8ICh4ICogY29tcG9uZW50Mi5zY2FsZVgpXTtcclxuICAgICAgICAgICAgQ3IgPSBjb21wb25lbnQzTGluZVswIHwgKHggKiBjb21wb25lbnQzLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBLID0gY29tcG9uZW50NExpbmVbMCB8ICh4ICogY29tcG9uZW50NC5zY2FsZVgpXTtcclxuXHJcbiAgICAgICAgICAgIEMgPSAyNTUgLSBjbGFtcFRvOGJpdChZICsgMS40MDIgKiAoQ3IgLSAxMjgpKTtcclxuICAgICAgICAgICAgTSA9IDI1NSAtIGNsYW1wVG84Yml0KFkgLSAwLjM0NDEzNjMgKiAoQ2IgLSAxMjgpIC0gMC43MTQxMzYzNiAqIChDciAtIDEyOCkpO1xyXG4gICAgICAgICAgICBZZSA9IDI1NSAtIGNsYW1wVG84Yml0KFkgKyAxLjc3MiAqIChDYiAtIDEyOCkpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSAyNTUgLSBDO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSAyNTUgLSBNO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSAyNTUgLSBZZTtcclxuICAgICAgICAgIGRhdGFbb2Zmc2V0KytdID0gMjU1IC0gSztcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICB9XHJcbiAgICBkZWZhdWx0OlxyXG4gICA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4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGNvbnN0IFkgPSBkYXRhW2krK107XHJcblxyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IFk7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gWTtcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBZO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IDI1NTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICBjYXNlIDM6XHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGNvbnN0IFIgPSBkYXRhW2krK107XHJcbiAgICAgICAgICBjb25zdCBHID0gZGF0YVtpKytdO1xyXG4gICAgICAgICAgY29uc3QgQiA9IGRhdGFbaSsrXTtcclxuXHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gUjtcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBHO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IEI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gMjU1O1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIGNhc2UgNDpcclxuICAgICAgZm9yIChsZXQgeSA9IDA7IHkgPCBoZWlnaHQ7IHkrKykge1xyXG4gICAgICAgIGZvciAobGV0IHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgY29uc3QgQyA9IGRhdGFbaSsrXTtcclxuICAgICAgICAgIGNvbnN0IE0gPSBkYXRhW2krK107XHJcbiAgICAgICAgICBjb25zdCBZID0gZGF0YVtpKytdO1xyXG4gICAgICAgICAgY29uc3QgSyA9IGRhdGFbaSsrXTtcclxuXHJcbiAgICAgICAgICBjb25zdCBSID0gMjU1IC0gY2xhbXBUbzhiaXQoQyAqICgxIC0gSyAvIDI1NSkgKyBLKTtcclxuICAgICAgICAgIGNvbnN0IEcgPSAyNTUgLSBjbGFtcFRvOGJpdChNICogKDEgLSBLIC8gMjU1KSArIEspO1xyXG4gICAgICAgICAgY29uc3QgQiA9IDI1NSAtIGNsYW1wVG84Yml0KFkgKiAoMSAtIEsgLyAyNTUpICsgSyk7XHJcblxyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IFI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gRztcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBCO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IDI1NTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICBkZWZhdWx0OlxyXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vuc3VwcG9ydGVkIGNvbG9yIG1vZGUnKTtcclxuICB9XHJcblxyXG4gIHJldHVybiBpbWFnZURhdGE7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ==
|