зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1518139 - Update pdf.js to version 2.1.176. r=bdahl
This commit is contained in:
Родитель
2dc267cbf3
Коммит
7a023634d0
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.1.153
|
||||
Current extension version is: 2.1.176
|
||||
|
||||
Taken from upstream commit: 5a2bd9fc
|
||||
Taken from upstream commit: e4d2a160
|
||||
|
|
|
@ -42,6 +42,7 @@ var PdfJsDefaultPreferences = Object.freeze({
|
|||
"disableOpenActionDestination": true,
|
||||
"disablePageMode": false,
|
||||
"disablePageLabels": false,
|
||||
"historyUpdateUrl": false,
|
||||
"scrollModeOnLoad": 0,
|
||||
"spreadModeOnLoad": 0
|
||||
});
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.1.153';
|
||||
var pdfjsBuild = '5a2bd9fc';
|
||||
var pdfjsVersion = '2.1.176';
|
||||
var pdfjsBuild = 'e4d2a160';
|
||||
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -5154,7 +5154,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.1.153',
|
||||
apiVersion: '2.1.176',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -6885,9 +6885,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
return InternalRenderTask;
|
||||
}();
|
||||
|
||||
const version = '2.1.153';
|
||||
const version = '2.1.176';
|
||||
exports.version = version;
|
||||
const build = '5a2bd9fc';
|
||||
const build = 'e4d2a160';
|
||||
exports.build = build;
|
||||
|
||||
/***/ }),
|
||||
|
@ -10699,7 +10699,7 @@ function isWhitespaceString(s) {
|
|||
|
||||
class XMLParserBase {
|
||||
_resolveEntities(s) {
|
||||
return s.replace(/&([^;]+);/g, function (all, entity) {
|
||||
return s.replace(/&([^;]+);/g, (all, entity) => {
|
||||
if (entity.substring(0, 2) === '#x') {
|
||||
return String.fromCharCode(parseInt(entity.substring(2), 16));
|
||||
} else if (entity.substring(0, 1) === '#') {
|
||||
|
@ -10989,6 +10989,11 @@ class SimpleDOMNode {
|
|||
}
|
||||
|
||||
const index = childNodes.indexOf(this);
|
||||
|
||||
if (index === -1) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return childNodes[index + 1];
|
||||
}
|
||||
|
||||
|
@ -11078,9 +11083,13 @@ class SimpleXMLParser extends XMLParserBase {
|
|||
}
|
||||
|
||||
onEndElement(name) {
|
||||
this._currentFragment = this._stack.pop();
|
||||
this._currentFragment = this._stack.pop() || [];
|
||||
const lastElement = this._currentFragment[this._currentFragment.length - 1];
|
||||
|
||||
if (!lastElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0, ii = lastElement.childNodes.length; i < ii; i++) {
|
||||
lastElement.childNodes[i].parentNode = lastElement;
|
||||
}
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.1.153';
|
||||
var pdfjsBuild = '5a2bd9fc';
|
||||
var pdfjsVersion = '2.1.176';
|
||||
var pdfjsBuild = 'e4d2a160';
|
||||
|
||||
var pdfjsCoreWorker = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -375,7 +375,7 @@ var WorkerMessageHandler = {
|
|||
var cancelXHRs = null;
|
||||
var WorkerTasks = [];
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.1.153';
|
||||
let workerVersion = '2.1.176';
|
||||
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
|
@ -14942,246 +14942,245 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
exports.ArithmeticDecoder = void 0;
|
||||
const QeTable = [{
|
||||
qe: 0x5601,
|
||||
nmps: 1,
|
||||
nlps: 1,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x3401,
|
||||
nmps: 2,
|
||||
nlps: 6,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1801,
|
||||
nmps: 3,
|
||||
nlps: 9,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0AC1,
|
||||
nmps: 4,
|
||||
nlps: 12,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0521,
|
||||
nmps: 5,
|
||||
nlps: 29,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0221,
|
||||
nmps: 38,
|
||||
nlps: 33,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 7,
|
||||
nlps: 6,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x5401,
|
||||
nmps: 8,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x4801,
|
||||
nmps: 9,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3801,
|
||||
nmps: 10,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3001,
|
||||
nmps: 11,
|
||||
nlps: 17,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2401,
|
||||
nmps: 12,
|
||||
nlps: 18,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1C01,
|
||||
nmps: 13,
|
||||
nlps: 20,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1601,
|
||||
nmps: 29,
|
||||
nlps: 21,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 15,
|
||||
nlps: 14,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x5401,
|
||||
nmps: 16,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5101,
|
||||
nmps: 17,
|
||||
nlps: 15,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x4801,
|
||||
nmps: 18,
|
||||
nlps: 16,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3801,
|
||||
nmps: 19,
|
||||
nlps: 17,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3401,
|
||||
nmps: 20,
|
||||
nlps: 18,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3001,
|
||||
nmps: 21,
|
||||
nlps: 19,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2801,
|
||||
nmps: 22,
|
||||
nlps: 19,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2401,
|
||||
nmps: 23,
|
||||
nlps: 20,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2201,
|
||||
nmps: 24,
|
||||
nlps: 21,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1C01,
|
||||
nmps: 25,
|
||||
nlps: 22,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1801,
|
||||
nmps: 26,
|
||||
nlps: 23,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1601,
|
||||
nmps: 27,
|
||||
nlps: 24,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1401,
|
||||
nmps: 28,
|
||||
nlps: 25,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1201,
|
||||
nmps: 29,
|
||||
nlps: 26,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1101,
|
||||
nmps: 30,
|
||||
nlps: 27,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0AC1,
|
||||
nmps: 31,
|
||||
nlps: 28,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x09C1,
|
||||
nmps: 32,
|
||||
nlps: 29,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x08A1,
|
||||
nmps: 33,
|
||||
nlps: 30,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0521,
|
||||
nmps: 34,
|
||||
nlps: 31,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0441,
|
||||
nmps: 35,
|
||||
nlps: 32,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x02A1,
|
||||
nmps: 36,
|
||||
nlps: 33,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0221,
|
||||
nmps: 37,
|
||||
nlps: 34,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0141,
|
||||
nmps: 38,
|
||||
nlps: 35,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0111,
|
||||
nmps: 39,
|
||||
nlps: 36,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0085,
|
||||
nmps: 40,
|
||||
nlps: 37,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0049,
|
||||
nmps: 41,
|
||||
nlps: 38,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0025,
|
||||
nmps: 42,
|
||||
nlps: 39,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0015,
|
||||
nmps: 43,
|
||||
nlps: 40,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0009,
|
||||
nmps: 44,
|
||||
nlps: 41,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0005,
|
||||
nmps: 45,
|
||||
nlps: 42,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0001,
|
||||
nmps: 45,
|
||||
nlps: 43,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 46,
|
||||
nlps: 46,
|
||||
switchFlag: 0
|
||||
}];
|
||||
|
||||
var ArithmeticDecoder = function ArithmeticDecoderClosure() {
|
||||
var QeTable = [{
|
||||
qe: 0x5601,
|
||||
nmps: 1,
|
||||
nlps: 1,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x3401,
|
||||
nmps: 2,
|
||||
nlps: 6,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1801,
|
||||
nmps: 3,
|
||||
nlps: 9,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0AC1,
|
||||
nmps: 4,
|
||||
nlps: 12,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0521,
|
||||
nmps: 5,
|
||||
nlps: 29,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0221,
|
||||
nmps: 38,
|
||||
nlps: 33,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 7,
|
||||
nlps: 6,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x5401,
|
||||
nmps: 8,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x4801,
|
||||
nmps: 9,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3801,
|
||||
nmps: 10,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3001,
|
||||
nmps: 11,
|
||||
nlps: 17,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2401,
|
||||
nmps: 12,
|
||||
nlps: 18,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1C01,
|
||||
nmps: 13,
|
||||
nlps: 20,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1601,
|
||||
nmps: 29,
|
||||
nlps: 21,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 15,
|
||||
nlps: 14,
|
||||
switchFlag: 1
|
||||
}, {
|
||||
qe: 0x5401,
|
||||
nmps: 16,
|
||||
nlps: 14,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5101,
|
||||
nmps: 17,
|
||||
nlps: 15,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x4801,
|
||||
nmps: 18,
|
||||
nlps: 16,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3801,
|
||||
nmps: 19,
|
||||
nlps: 17,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3401,
|
||||
nmps: 20,
|
||||
nlps: 18,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x3001,
|
||||
nmps: 21,
|
||||
nlps: 19,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2801,
|
||||
nmps: 22,
|
||||
nlps: 19,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2401,
|
||||
nmps: 23,
|
||||
nlps: 20,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x2201,
|
||||
nmps: 24,
|
||||
nlps: 21,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1C01,
|
||||
nmps: 25,
|
||||
nlps: 22,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1801,
|
||||
nmps: 26,
|
||||
nlps: 23,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1601,
|
||||
nmps: 27,
|
||||
nlps: 24,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1401,
|
||||
nmps: 28,
|
||||
nlps: 25,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1201,
|
||||
nmps: 29,
|
||||
nlps: 26,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x1101,
|
||||
nmps: 30,
|
||||
nlps: 27,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0AC1,
|
||||
nmps: 31,
|
||||
nlps: 28,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x09C1,
|
||||
nmps: 32,
|
||||
nlps: 29,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x08A1,
|
||||
nmps: 33,
|
||||
nlps: 30,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0521,
|
||||
nmps: 34,
|
||||
nlps: 31,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0441,
|
||||
nmps: 35,
|
||||
nlps: 32,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x02A1,
|
||||
nmps: 36,
|
||||
nlps: 33,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0221,
|
||||
nmps: 37,
|
||||
nlps: 34,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0141,
|
||||
nmps: 38,
|
||||
nlps: 35,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0111,
|
||||
nmps: 39,
|
||||
nlps: 36,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0085,
|
||||
nmps: 40,
|
||||
nlps: 37,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0049,
|
||||
nmps: 41,
|
||||
nlps: 38,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0025,
|
||||
nmps: 42,
|
||||
nlps: 39,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0015,
|
||||
nmps: 43,
|
||||
nlps: 40,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0009,
|
||||
nmps: 44,
|
||||
nlps: 41,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0005,
|
||||
nmps: 45,
|
||||
nlps: 42,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x0001,
|
||||
nmps: 45,
|
||||
nlps: 43,
|
||||
switchFlag: 0
|
||||
}, {
|
||||
qe: 0x5601,
|
||||
nmps: 46,
|
||||
nlps: 46,
|
||||
switchFlag: 0
|
||||
}];
|
||||
|
||||
function ArithmeticDecoder(data, start, end) {
|
||||
class ArithmeticDecoder {
|
||||
constructor(data, start, end) {
|
||||
this.data = data;
|
||||
this.bp = start;
|
||||
this.dataEnd = end;
|
||||
|
@ -15194,98 +15193,95 @@ var ArithmeticDecoder = function ArithmeticDecoderClosure() {
|
|||
this.a = 0x8000;
|
||||
}
|
||||
|
||||
ArithmeticDecoder.prototype = {
|
||||
byteIn: function ArithmeticDecoder_byteIn() {
|
||||
var data = this.data;
|
||||
var bp = this.bp;
|
||||
byteIn() {
|
||||
const data = this.data;
|
||||
let bp = this.bp;
|
||||
|
||||
if (data[bp] === 0xFF) {
|
||||
var b1 = data[bp + 1];
|
||||
|
||||
if (b1 > 0x8F) {
|
||||
this.clow += 0xFF00;
|
||||
this.ct = 8;
|
||||
} else {
|
||||
bp++;
|
||||
this.clow += data[bp] << 9;
|
||||
this.ct = 7;
|
||||
this.bp = bp;
|
||||
}
|
||||
if (data[bp] === 0xFF) {
|
||||
if (data[bp + 1] > 0x8F) {
|
||||
this.clow += 0xFF00;
|
||||
this.ct = 8;
|
||||
} else {
|
||||
bp++;
|
||||
this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xFF00;
|
||||
this.ct = 8;
|
||||
this.clow += data[bp] << 9;
|
||||
this.ct = 7;
|
||||
this.bp = bp;
|
||||
}
|
||||
|
||||
if (this.clow > 0xFFFF) {
|
||||
this.chigh += this.clow >> 16;
|
||||
this.clow &= 0xFFFF;
|
||||
}
|
||||
},
|
||||
readBit: function ArithmeticDecoder_readBit(contexts, pos) {
|
||||
var cx_index = contexts[pos] >> 1,
|
||||
cx_mps = contexts[pos] & 1;
|
||||
var qeTableIcx = QeTable[cx_index];
|
||||
var qeIcx = qeTableIcx.qe;
|
||||
var d;
|
||||
var a = this.a - qeIcx;
|
||||
|
||||
if (this.chigh < qeIcx) {
|
||||
if (a < qeIcx) {
|
||||
a = qeIcx;
|
||||
d = cx_mps;
|
||||
cx_index = qeTableIcx.nmps;
|
||||
} else {
|
||||
a = qeIcx;
|
||||
d = 1 ^ cx_mps;
|
||||
|
||||
if (qeTableIcx.switchFlag === 1) {
|
||||
cx_mps = d;
|
||||
}
|
||||
|
||||
cx_index = qeTableIcx.nlps;
|
||||
}
|
||||
} else {
|
||||
this.chigh -= qeIcx;
|
||||
|
||||
if ((a & 0x8000) !== 0) {
|
||||
this.a = a;
|
||||
return cx_mps;
|
||||
}
|
||||
|
||||
if (a < qeIcx) {
|
||||
d = 1 ^ cx_mps;
|
||||
|
||||
if (qeTableIcx.switchFlag === 1) {
|
||||
cx_mps = d;
|
||||
}
|
||||
|
||||
cx_index = qeTableIcx.nlps;
|
||||
} else {
|
||||
d = cx_mps;
|
||||
cx_index = qeTableIcx.nmps;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
if (this.ct === 0) {
|
||||
this.byteIn();
|
||||
}
|
||||
|
||||
a <<= 1;
|
||||
this.chigh = this.chigh << 1 & 0xFFFF | this.clow >> 15 & 1;
|
||||
this.clow = this.clow << 1 & 0xFFFF;
|
||||
this.ct--;
|
||||
} while ((a & 0x8000) === 0);
|
||||
|
||||
this.a = a;
|
||||
contexts[pos] = cx_index << 1 | cx_mps;
|
||||
return d;
|
||||
} else {
|
||||
bp++;
|
||||
this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xFF00;
|
||||
this.ct = 8;
|
||||
this.bp = bp;
|
||||
}
|
||||
};
|
||||
return ArithmeticDecoder;
|
||||
}();
|
||||
|
||||
if (this.clow > 0xFFFF) {
|
||||
this.chigh += this.clow >> 16;
|
||||
this.clow &= 0xFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
readBit(contexts, pos) {
|
||||
let cx_index = contexts[pos] >> 1,
|
||||
cx_mps = contexts[pos] & 1;
|
||||
const qeTableIcx = QeTable[cx_index];
|
||||
const qeIcx = qeTableIcx.qe;
|
||||
let d;
|
||||
let a = this.a - qeIcx;
|
||||
|
||||
if (this.chigh < qeIcx) {
|
||||
if (a < qeIcx) {
|
||||
a = qeIcx;
|
||||
d = cx_mps;
|
||||
cx_index = qeTableIcx.nmps;
|
||||
} else {
|
||||
a = qeIcx;
|
||||
d = 1 ^ cx_mps;
|
||||
|
||||
if (qeTableIcx.switchFlag === 1) {
|
||||
cx_mps = d;
|
||||
}
|
||||
|
||||
cx_index = qeTableIcx.nlps;
|
||||
}
|
||||
} else {
|
||||
this.chigh -= qeIcx;
|
||||
|
||||
if ((a & 0x8000) !== 0) {
|
||||
this.a = a;
|
||||
return cx_mps;
|
||||
}
|
||||
|
||||
if (a < qeIcx) {
|
||||
d = 1 ^ cx_mps;
|
||||
|
||||
if (qeTableIcx.switchFlag === 1) {
|
||||
cx_mps = d;
|
||||
}
|
||||
|
||||
cx_index = qeTableIcx.nlps;
|
||||
} else {
|
||||
d = cx_mps;
|
||||
cx_index = qeTableIcx.nmps;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
if (this.ct === 0) {
|
||||
this.byteIn();
|
||||
}
|
||||
|
||||
a <<= 1;
|
||||
this.chigh = this.chigh << 1 & 0xFFFF | this.clow >> 15 & 1;
|
||||
this.clow = this.clow << 1 & 0xFFFF;
|
||||
this.ct--;
|
||||
} while ((a & 0x8000) === 0);
|
||||
|
||||
this.a = a;
|
||||
contexts[pos] = cx_index << 1 | cx_mps;
|
||||
return d;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.ArithmeticDecoder = ArithmeticDecoder;
|
||||
|
||||
|
@ -21985,7 +21981,8 @@ class AnnotationBorderStyle {
|
|||
|
||||
setWidth(width) {
|
||||
if ((0, _primitives.isName)(width)) {
|
||||
width = parseFloat(width.name);
|
||||
this.width = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Number.isInteger(width)) {
|
||||
|
@ -28769,7 +28766,19 @@ var Font = function FontClosure() {
|
|||
}
|
||||
|
||||
font.pos = (font.start ? font.start : 0) + header.offset;
|
||||
font.pos += header.length - 2;
|
||||
font.pos += 4;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 2;
|
||||
font.pos += 8;
|
||||
font.pos += 2;
|
||||
var numOfMetrics = font.getUint16();
|
||||
|
||||
if (numOfMetrics > numGlyphs) {
|
||||
|
@ -32260,11 +32269,11 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
exports.ExpertSubsetCharset = exports.ExpertCharset = exports.ISOAdobeCharset = void 0;
|
||||
var ISOAdobeCharset = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron'];
|
||||
const ISOAdobeCharset = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron'];
|
||||
exports.ISOAdobeCharset = ISOAdobeCharset;
|
||||
var ExpertCharset = ['.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];
|
||||
const ExpertCharset = ['.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];
|
||||
exports.ExpertCharset = ExpertCharset;
|
||||
var ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior'];
|
||||
const ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior'];
|
||||
exports.ExpertSubsetCharset = ExpertSubsetCharset;
|
||||
|
||||
/***/ }),
|
||||
|
@ -36871,7 +36880,7 @@ exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForAr
|
|||
|
||||
var _util = __w_pdfjs_require__(2);
|
||||
|
||||
var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t['ArialNarrow'] = 'Helvetica';
|
||||
t['ArialNarrow-Bold'] = 'Helvetica-Bold';
|
||||
t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique';
|
||||
|
@ -36930,7 +36939,7 @@ var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
|||
t['TimesNewRomanPSMT-Italic'] = 'Times-Italic';
|
||||
});
|
||||
exports.getStdFontMap = getStdFontMap;
|
||||
var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t['Calibri'] = 'Helvetica';
|
||||
t['Calibri-Bold'] = 'Helvetica-Bold';
|
||||
t['Calibri-BoldItalic'] = 'Helvetica-BoldOblique';
|
||||
|
@ -36968,7 +36977,7 @@ var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
|||
t['Wingdings'] = 'ZapfDingbats';
|
||||
});
|
||||
exports.getNonStdFontMap = getNonStdFontMap;
|
||||
var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getSerifFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t['Adobe Jenson'] = true;
|
||||
t['Adobe Text'] = true;
|
||||
t['Albertus'] = true;
|
||||
|
@ -37104,13 +37113,13 @@ var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) {
|
|||
t['XITS'] = true;
|
||||
});
|
||||
exports.getSerifFonts = getSerifFonts;
|
||||
var getSymbolsFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getSymbolsFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t['Dingbats'] = true;
|
||||
t['Symbol'] = true;
|
||||
t['ZapfDingbats'] = true;
|
||||
});
|
||||
exports.getSymbolsFonts = getSymbolsFonts;
|
||||
var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t[2] = 10;
|
||||
t[3] = 32;
|
||||
t[4] = 33;
|
||||
|
@ -37506,13 +37515,13 @@ var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t)
|
|||
t[3416] = 8377;
|
||||
});
|
||||
exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts;
|
||||
var getSupplementalGlyphMapForArialBlack = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getSupplementalGlyphMapForArialBlack = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t[227] = 322;
|
||||
t[264] = 261;
|
||||
t[291] = 346;
|
||||
});
|
||||
exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack;
|
||||
let getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(function (t) {
|
||||
const getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(function (t) {
|
||||
t[1] = 32;
|
||||
t[4] = 65;
|
||||
t[17] = 66;
|
||||
|
|
|
@ -1021,8 +1021,11 @@ let PDFViewerApplication = {
|
|||
this.loadingBar.setWidth(this.appConfig.viewerContainer);
|
||||
|
||||
if (!_app_options.AppOptions.get('disableHistory') && !this.isViewerEmbedded) {
|
||||
let resetHistory = !_app_options.AppOptions.get('showPreviousViewOnLoad');
|
||||
this.pdfHistory.initialize(pdfDocument.fingerprint, resetHistory);
|
||||
this.pdfHistory.initialize({
|
||||
fingerprint: pdfDocument.fingerprint,
|
||||
resetHistory: !_app_options.AppOptions.get('showPreviousViewOnLoad'),
|
||||
updateUrl: _app_options.AppOptions.get('historyUpdateUrl')
|
||||
});
|
||||
|
||||
if (this.pdfHistory.initialBookmark) {
|
||||
this.initialBookmark = this.pdfHistory.initialBookmark;
|
||||
|
@ -3928,6 +3931,10 @@ const defaultOptions = {
|
|||
value: 0,
|
||||
kind: OptionKind.VIEWER
|
||||
},
|
||||
historyUpdateUrl: {
|
||||
value: false,
|
||||
kind: OptionKind.VIEWER
|
||||
},
|
||||
imageResourcesPath: {
|
||||
value: './images/',
|
||||
kind: OptionKind.VIEWER
|
||||
|
@ -5798,7 +5805,11 @@ class PDFHistory {
|
|||
});
|
||||
}
|
||||
|
||||
initialize(fingerprint, resetHistory = false) {
|
||||
initialize({
|
||||
fingerprint,
|
||||
resetHistory = false,
|
||||
updateUrl = false
|
||||
}) {
|
||||
if (!fingerprint || typeof fingerprint !== 'string') {
|
||||
console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');
|
||||
return;
|
||||
|
@ -5806,6 +5817,7 @@ class PDFHistory {
|
|||
|
||||
let reInitialized = this.initialized && this.fingerprint !== fingerprint;
|
||||
this.fingerprint = fingerprint;
|
||||
this._updateUrl = updateUrl === true;
|
||||
|
||||
if (!this.initialized) {
|
||||
this._bindEvents();
|
||||
|
@ -5823,7 +5835,7 @@ class PDFHistory {
|
|||
this._destination = null;
|
||||
this._position = null;
|
||||
|
||||
if (!this._isValidState(state) || resetHistory) {
|
||||
if (!this._isValidState(state, true) || resetHistory) {
|
||||
let {
|
||||
hash,
|
||||
page,
|
||||
|
@ -5970,11 +5982,21 @@ class PDFHistory {
|
|||
|
||||
this._updateInternalState(destination, newState.uid);
|
||||
|
||||
let newUrl;
|
||||
|
||||
if (this._updateUrl && destination && destination.hash) {
|
||||
const baseUrl = document.location.href.split('#')[0];
|
||||
|
||||
if (!baseUrl.startsWith('file://')) {
|
||||
newUrl = `${baseUrl}#${destination.hash}`;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldReplace) {
|
||||
window.history.replaceState(newState, '');
|
||||
window.history.replaceState(newState, '', newUrl);
|
||||
} else {
|
||||
this._maxUid = this._uid;
|
||||
window.history.pushState(newState, '');
|
||||
window.history.pushState(newState, '', newUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6023,13 +6045,25 @@ class PDFHistory {
|
|||
this._pushOrReplaceState(position, forceReplace);
|
||||
}
|
||||
|
||||
_isValidState(state) {
|
||||
_isValidState(state, checkReload = false) {
|
||||
if (!state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state.fingerprint !== this.fingerprint) {
|
||||
return false;
|
||||
if (checkReload) {
|
||||
if (typeof state.fingerprint !== 'string' || state.fingerprint.length !== this.fingerprint.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const [perfEntry] = performance.getEntriesByType('navigation');
|
||||
|
||||
if (!perfEntry || perfEntry.type !== 'reload') {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Number.isInteger(state.uid) || state.uid < 0) {
|
||||
|
@ -11600,6 +11634,7 @@ function getDefaultPreferences() {
|
|||
"disableOpenActionDestination": true,
|
||||
"disablePageMode": false,
|
||||
"disablePageLabels": false,
|
||||
"historyUpdateUrl": false,
|
||||
"scrollModeOnLoad": 0,
|
||||
"spreadModeOnLoad": 0
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: version 2.1.153
|
||||
release: version 2.1.176
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
Загрузка…
Ссылка в новой задаче