Bug 1739229 - Update pdf.js to version 2.12.126 r=pdfjs-reviewers,marco

Differential Revision: https://phabricator.services.mozilla.com/D130308
This commit is contained in:
Brendan Dahl 2021-11-03 22:18:53 +00:00
Родитель 144e97d457
Коммит c6f5412eb2
8 изменённых файлов: 1215 добавлений и 700 удалений

Просмотреть файл

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.12.69
Current extension version is: 2.12.126
Taken from upstream commit: e788665a2
Taken from upstream commit: e1a35e7bb

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1100,9 +1100,9 @@ exports.CheckboxField = CheckboxField;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.FieldType = void 0;
exports.createActionsMap = createActionsMap;
exports.getFieldType = getFieldType;
exports.FieldType = void 0;
const FieldType = {
none: 0,
number: 1,
@ -1990,8 +1990,8 @@ var _thermometer = __w_pdfjs_require__(12);
const VIEWER_TYPE = "PDF.js";
const VIEWER_VARIATION = "Full";
const VIEWER_VERSION = "10.0";
const FORMS_VERSION = undefined;
const VIEWER_VERSION = 21.00720099;
const FORMS_VERSION = 21.00720099;
class App extends _pdf_object.PDFObject {
constructor(data) {
@ -3078,6 +3078,7 @@ class Doc extends _pdf_object.PDFObject {
this._numPages = data.numPages || 1;
this._pageNum = data.pageNum || 0;
this._producer = data.Producer || "";
this._securityHandler = data.EncryptFilterName || null;
this._subject = data.Subject || "";
this._title = data.Title || "";
this._URL = data.URL || "";
@ -3529,7 +3530,7 @@ class Doc extends _pdf_object.PDFObject {
}
get securityHandler() {
return null;
return this._securityHandler;
}
set securityHandler(_) {
@ -4944,8 +4945,8 @@ Object.defineProperty(exports, "initSandbox", ({
var _initialization = __w_pdfjs_require__(1);
const pdfjsVersion = '2.12.69';
const pdfjsBuild = 'e788665a2';
const pdfjsVersion = '2.12.126';
const pdfjsBuild = 'e1a35e7bb';
})();
/******/ return __webpack_exports__;

Просмотреть файл

@ -125,7 +125,7 @@ class WorkerMessageHandler {
const WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.12.69';
const workerVersion = '2.12.126';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -717,6 +717,7 @@ if (typeof window === "undefined" && !_is_node.isNodeJS && typeof self !== "unde
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.VerbosityLevel = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.UNSUPPORTED_FEATURES = exports.TextRenderingMode = exports.StreamType = exports.RenderingIntentFlag = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.IsLittleEndianCached = exports.IsEvalSupportedCached = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMode = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0;
exports.arrayByteLength = arrayByteLength;
exports.arraysToBytes = arraysToBytes;
exports.assert = assert;
@ -748,7 +749,6 @@ exports.stringToUTF8String = stringToUTF8String;
exports.unreachable = unreachable;
exports.utf8StringToString = utf8StringToString;
exports.warn = warn;
exports.VerbosityLevel = exports.Util = exports.UNSUPPORTED_FEATURES = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.RenderingIntentFlag = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.IsLittleEndianCached = exports.IsEvalSupportedCached = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMode = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0;
__w_pdfjs_require__(3);
@ -1519,6 +1519,75 @@ class Util {
return result;
}
static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3) {
const tvalues = [],
bounds = [[], []];
let a, b, c, t, t1, t2, b2ac, sqrtb2ac;
for (let i = 0; i < 2; ++i) {
if (i === 0) {
b = 6 * x0 - 12 * x1 + 6 * x2;
a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;
c = 3 * x1 - 3 * x0;
} else {
b = 6 * y0 - 12 * y1 + 6 * y2;
a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;
c = 3 * y1 - 3 * y0;
}
if (Math.abs(a) < 1e-12) {
if (Math.abs(b) < 1e-12) {
continue;
}
t = -c / b;
if (0 < t && t < 1) {
tvalues.push(t);
}
continue;
}
b2ac = b * b - 4 * c * a;
sqrtb2ac = Math.sqrt(b2ac);
if (b2ac < 0) {
continue;
}
t1 = (-b + sqrtb2ac) / (2 * a);
if (0 < t1 && t1 < 1) {
tvalues.push(t1);
}
t2 = (-b - sqrtb2ac) / (2 * a);
if (0 < t2 && t2 < 1) {
tvalues.push(t2);
}
}
let j = tvalues.length,
mt;
const jlen = j;
while (j--) {
t = tvalues[j];
mt = 1 - t;
bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;
bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;
}
bounds[0][jlen] = x0;
bounds[1][jlen] = y0;
bounds[0][jlen + 1] = x3;
bounds[1][jlen + 1] = y3;
bounds[0].length = bounds[1].length = jlen + 2;
return [Math.min(...bounds[0]), Math.min(...bounds[1]), Math.max(...bounds[0]), Math.max(...bounds[1])];
}
}
exports.Util = Util;
@ -1640,7 +1709,7 @@ function createPromiseCapability() {
}
function createObjectURL(data, contentType = "", forceDataSchema = false) {
if (URL.createObjectURL && !forceDataSchema) {
if (URL.createObjectURL && typeof Blob !== "undefined" && !forceDataSchema) {
return URL.createObjectURL(new Blob([data], {
type: contentType
}));
@ -1695,6 +1764,7 @@ exports.isNodeJS = isNodeJS;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.EOF = exports.Dict = exports.Cmd = void 0;
exports.clearPrimitiveCaches = clearPrimitiveCaches;
exports.isCmd = isCmd;
exports.isDict = isDict;
@ -1702,7 +1772,6 @@ exports.isName = isName;
exports.isRef = isRef;
exports.isRefsEqual = isRefsEqual;
exports.isStream = isStream;
exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.EOF = exports.Dict = exports.Cmd = void 0;
var _util = __w_pdfjs_require__(2);
@ -2978,6 +3047,7 @@ exports.ChunkedStreamManager = ChunkedStreamManager;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.XRefParseException = exports.XRefEntryException = exports.ParserEOFException = exports.MissingDataException = void 0;
exports.collectActions = collectActions;
exports.encodeToXmlString = encodeToXmlString;
exports.escapePDFName = escapePDFName;
@ -2993,7 +3063,6 @@ exports.readUint32 = readUint32;
exports.recoverJsURL = recoverJsURL;
exports.toRomanNumerals = toRomanNumerals;
exports.validateCSSFont = validateCSSFont;
exports.XRefParseException = exports.XRefEntryException = exports.ParserEOFException = exports.MissingDataException = void 0;
var _util = __w_pdfjs_require__(2);
@ -3522,7 +3591,7 @@ exports.NullStream = NullStream;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.PDFDocument = exports.Page = void 0;
exports.Page = exports.PDFDocument = void 0;
var _util = __w_pdfjs_require__(2);
@ -4528,6 +4597,7 @@ class PDFDocument {
const docInfo = {
PDFFormatVersion: version,
Language: this.catalog.lang,
EncryptFilterName: this.xref.encrypt ? this.xref.encrypt.filterName : null,
IsLinearized: !!this.linearization,
IsAcroFormPresent: this.formInfo.hasAcroForm,
IsXFAPresent: this.formInfo.hasXfa,
@ -5227,11 +5297,11 @@ exports.SegoeuiRegularMetrics = SegoeuiRegularMetrics;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.SEAC_ANALYSIS_ENABLED = exports.MacStandardGlyphOrdering = exports.FontFlags = void 0;
exports.getFontType = getFontType;
exports.normalizeFontName = normalizeFontName;
exports.recoverGlyphName = recoverGlyphName;
exports.type1FontGlyphMapping = type1FontGlyphMapping;
exports.SEAC_ANALYSIS_ENABLED = exports.MacStandardGlyphOrdering = exports.FontFlags = void 0;
var _util = __w_pdfjs_require__(2);
@ -5400,8 +5470,8 @@ function normalizeFontName(name) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getEncoding = getEncoding;
exports.ZapfDingbatsEncoding = exports.WinAnsiEncoding = exports.SymbolSetEncoding = exports.StandardEncoding = exports.MacRomanEncoding = exports.ExpertEncoding = void 0;
exports.getEncoding = getEncoding;
const ExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "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.ExpertEncoding = ExpertEncoding;
const MacExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "", "threequartersemdash", "", "questionsmall", "", "", "", "", "Ethsmall", "", "", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "", "", "", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hypheninferior", "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", "", "", "asuperior", "centsuperior", "", "", "", "", "Aacutesmall", "Agravesmall", "Acircumflexsmall", "Adieresissmall", "Atildesmall", "Aringsmall", "Ccedillasmall", "Eacutesmall", "Egravesmall", "Ecircumflexsmall", "Edieresissmall", "Iacutesmall", "Igravesmall", "Icircumflexsmall", "Idieresissmall", "Ntildesmall", "Oacutesmall", "Ogravesmall", "Ocircumflexsmall", "Odieresissmall", "Otildesmall", "Uacutesmall", "Ugravesmall", "Ucircumflexsmall", "Udieresissmall", "", "eightsuperior", "fourinferior", "threeinferior", "sixinferior", "eightinferior", "seveninferior", "Scaronsmall", "", "centinferior", "twoinferior", "", "Dieresissmall", "", "Caronsmall", "osuperior", "fiveinferior", "", "commainferior", "periodinferior", "Yacutesmall", "", "dollarinferior", "", "", "Thornsmall", "", "nineinferior", "zeroinferior", "Zcaronsmall", "AEsmall", "Oslashsmall", "questiondownsmall", "oneinferior", "Lslashsmall", "", "", "", "", "", "", "Cedillasmall", "", "", "", "", "", "OEsmall", "figuredash", "hyphensuperior", "", "", "", "", "exclamdownsmall", "", "Ydieresissmall", "", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "ninesuperior", "zerosuperior", "", "esuperior", "rsuperior", "tsuperior", "", "", "isuperior", "ssuperior", "dsuperior", "", "", "", "", "", "lsuperior", "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", "msuperior", "commasuperior", "periodsuperior", "Dotaccentsmall", "Ringsmall", "", "", "", ""];
@ -5475,11 +5545,11 @@ exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getNormalizedUnicodes = void 0;
exports.getUnicodeForGlyph = getUnicodeForGlyph;
exports.getUnicodeRangeFor = getUnicodeRangeFor;
exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues;
exports.reverseIfRtl = reverseIfRtl;
exports.getNormalizedUnicodes = void 0;
var _core_utils = __w_pdfjs_require__(9);
@ -5986,8 +6056,8 @@ function reverseIfRtl(chars) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getQuadPoints = getQuadPoints;
exports.MarkupAnnotation = exports.AnnotationFactory = exports.AnnotationBorderStyle = exports.Annotation = void 0;
exports.getQuadPoints = getQuadPoints;
var _util = __w_pdfjs_require__(2);
@ -6013,6 +6083,8 @@ var _stream = __w_pdfjs_require__(10);
var _writer = __w_pdfjs_require__(71);
var _factory = __w_pdfjs_require__(74);
class AnnotationFactory {
static create(xref, ref, pdfManager, idFactory, collectFields) {
return Promise.all([pdfManager.ensureCatalog("acroForm"), collectFields ? this._getPageIndex(xref, ref, pdfManager) : -1]).then(([acroForm, pageIndex]) => pdfManager.ensure(this, "_create", [xref, ref, pdfManager, idFactory, acroForm, collectFields, pageIndex]));
@ -6435,7 +6507,7 @@ class Annotation {
this.borderStyle.setWidth(array[2], this.rectangle);
if (array.length === 4) {
this.borderStyle.setDashArray(array[3]);
this.borderStyle.setDashArray(array[3], true);
}
}
} else {
@ -6647,7 +6719,7 @@ class AnnotationBorderStyle {
}
}
setDashArray(dashArray) {
setDashArray(dashArray, forceStyle = false) {
if (Array.isArray(dashArray) && dashArray.length > 0) {
let isValid = true;
let allZeros = true;
@ -6665,6 +6737,10 @@ class AnnotationBorderStyle {
if (isValid && !allZeros) {
this.dashArray = dashArray;
if (forceStyle) {
this.setStyle(_primitives.Name.get("D"));
}
} else {
this.width = 0;
}
@ -6740,6 +6816,10 @@ class MarkupAnnotation extends Annotation {
this.data.color = null;
}
}
if (dict.has("RC")) {
this.data.richText = _factory.XFAFactory.getRichTextAsHtml(dict.get("RC"));
}
}
setCreationDate(creationDate) {
@ -7959,6 +8039,10 @@ class PopupAnnotation extends Annotation {
this.data.titleObj = this._title;
this.setContents(parentItem.get("Contents"));
this.data.contentsObj = this._contents;
if (parentItem.has("RC")) {
this.data.richText = _factory.XFAFactory.getRichTextAsHtml(parentItem.get("RC"));
}
}
}
@ -14072,7 +14156,14 @@ class CMap {
while (low <= high) {
this._map[low++] = dstLow;
dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(dstLow.charCodeAt(lastByte) + 1);
const nextCharCode = dstLow.charCodeAt(lastByte) + 1;
if (nextCharCode > 0xff) {
dstLow = dstLow.substring(0, lastByte - 1) + String.fromCharCode(dstLow.charCodeAt(lastByte - 1) + 1) + "\x00";
continue;
}
dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(nextCharCode);
}
}
@ -29310,8 +29401,9 @@ exports.ExpertSubsetCharset = ExpertSubsetCharset;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getSerifFonts = exports.getNonStdFontMap = exports.getGlyphMapForStandardFonts = exports.getFontNameToFileMap = void 0;
exports.getStandardFontName = getStandardFontName;
exports.getSymbolsFonts = exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getStdFontMap = exports.getSerifFonts = exports.getNonStdFontMap = exports.getGlyphMapForStandardFonts = exports.getFontNameToFileMap = void 0;
exports.getSymbolsFonts = exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getStdFontMap = void 0;
var _core_utils = __w_pdfjs_require__(9);
@ -33205,8 +33297,8 @@ exports.Type1Parser = Type1Parser;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getTilingPatternIR = getTilingPatternIR;
exports.Pattern = void 0;
exports.getTilingPatternIR = getTilingPatternIR;
var _util = __w_pdfjs_require__(2);
@ -34148,8 +34240,8 @@ function getTilingPatternIR(operatorList, dict, color) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.isPDFFunction = isPDFFunction;
exports.PostScriptEvaluator = exports.PostScriptCompiler = exports.PDFFunctionFactory = void 0;
exports.isPDFFunction = isPDFFunction;
var _primitives = __w_pdfjs_require__(5);
@ -36160,7 +36252,7 @@ function bidi(str, startLevel = -1, vertical = false) {
}
if (startLevel === -1) {
if (numBidi / strLength < 0.3) {
if (numBidi / strLength < 0.3 && strLength > 4) {
isLTR = true;
startLevel = 0;
} else {
@ -44107,8 +44199,9 @@ function incrementalUpdate({
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.calculateSHA256 = exports.calculateMD5 = exports.PDF20 = exports.PDF17 = exports.CipherTransformFactory = exports.ARCFourCipher = exports.AES256Cipher = exports.AES128Cipher = void 0;
exports.calculateSHA384 = calculateSHA384;
exports.PDF20 = exports.PDF17 = exports.CipherTransformFactory = exports.calculateSHA512 = exports.calculateSHA256 = exports.calculateMD5 = exports.ARCFourCipher = exports.AES256Cipher = exports.AES128Cipher = void 0;
exports.calculateSHA512 = void 0;
var _util = __w_pdfjs_require__(2);
@ -45569,6 +45662,7 @@ const CipherTransformFactory = function CipherTransformFactoryClosure() {
throw new _util.FormatError("unknown encryption method");
}
this.filterName = filter.name;
this.dict = dict;
const algorithm = dict.get("V");
@ -45771,6 +45865,8 @@ var _util = __w_pdfjs_require__(2);
var _parser = __w_pdfjs_require__(86);
var _xhtml = __w_pdfjs_require__(96);
class XFAFactory {
constructor(data) {
try {
@ -45866,6 +45962,54 @@ class XFAFactory {
return Object.values(data).join("");
}
static getRichTextAsHtml(rc) {
if (!rc || typeof rc !== "string") {
return null;
}
try {
let root = new _parser.XFAParser(_xhtml.XhtmlNamespace, true).parse(rc);
if (!["body", "xhtml"].includes(root[_xfa_object.$nodeName])) {
const newRoot = _xhtml.XhtmlNamespace.body({});
newRoot[_xfa_object.$appendChild](root);
root = newRoot;
}
const result = root[_xfa_object.$toHTML]();
if (!result.success) {
return null;
}
const {
html
} = result;
const {
attributes
} = html;
if (attributes) {
if (attributes.class) {
attributes.class = attributes.class.filter(attr => !attr.startsWith("xfa"));
}
attributes.dir = "auto";
}
return {
html,
str: root[_xfa_object.$text]()
};
} catch (e) {
(0, _util.warn)(`XFA - an error occurred during parsing of rich text: ${e}`);
}
return null;
}
}
exports.XFAFactory = XFAFactory;
@ -47073,6 +47217,7 @@ exports.Option10 = Option10;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.HTMLResult = void 0;
exports.getBBox = getBBox;
exports.getColor = getColor;
exports.getFloat = getFloat;
@ -47083,7 +47228,6 @@ exports.getRatio = getRatio;
exports.getRelevant = getRelevant;
exports.getStringOption = getStringOption;
exports.stripQuotes = stripQuotes;
exports.HTMLResult = void 0;
var _util = __w_pdfjs_require__(2);
@ -55253,9 +55397,14 @@ function setPara(node, nodeStyle, value) {
}
function setFontFamily(xfaFont, node, fontFinder, style) {
if (!fontFinder) {
delete style.fontFamily;
return;
}
const name = (0, _utils.stripQuotes)(xfaFont.typeface);
const typeface = fontFinder.find(name);
style.fontFamily = `"${name}"`;
const typeface = fontFinder.find(name);
if (typeface) {
const {
@ -55301,9 +55450,9 @@ function fixURL(str) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.FontFinder = void 0;
exports.getMetrics = getMetrics;
exports.selectFont = selectFont;
exports.FontFinder = void 0;
var _xfa_object = __w_pdfjs_require__(75);
@ -55866,9 +56015,9 @@ var _builder = __w_pdfjs_require__(87);
var _util = __w_pdfjs_require__(2);
class XFAParser extends _xml_parser.XMLParserBase {
constructor() {
constructor(rootNameSpace = null, richText = false) {
super();
this._builder = new _builder.Builder();
this._builder = new _builder.Builder(rootNameSpace);
this._stack = [];
this._globalData = {
usedTypefaces: new Set()
@ -55878,6 +56027,7 @@ class XFAParser extends _xml_parser.XMLParserBase {
this._errorCode = _xml_parser.XMLParserErrorCode.NoError;
this._whiteRegex = /^\s+$/;
this._nbsps = /\xa0+/g;
this._richText = richText;
}
parse(data) {
@ -55895,8 +56045,8 @@ class XFAParser extends _xml_parser.XMLParserBase {
onText(text) {
text = text.replace(this._nbsps, match => match.slice(1) + " ");
if (this._current[_xfa_object.$acceptWhitespace]()) {
this._current[_xfa_object.$onText](text);
if (this._richText || this._current[_xfa_object.$acceptWhitespace]()) {
this._current[_xfa_object.$onText](text, this._richText);
return;
}
@ -56099,7 +56249,7 @@ class Empty extends _xfa_object.XFAObject {
}
class Builder {
constructor() {
constructor(rootNameSpace = null) {
this._namespaceStack = [];
this._nsAgnosticLevel = 0;
this._namespacePrefixes = new Map();
@ -56107,7 +56257,7 @@ class Builder {
this._nextNsId = Math.max(...Object.values(_namespaces.NamespaceIds).map(({
id
}) => id));
this._currentNamespace = new _unknown.UnknownNamespace(++this._nextNsId);
this._currentNamespace = rootNameSpace || new _unknown.UnknownNamespace(++this._nextNsId);
}
buildRoot(ids) {
@ -58978,6 +59128,7 @@ var _html_utils = __w_pdfjs_require__(82);
var _utils = __w_pdfjs_require__(76);
const XHTML_NS_ID = _namespaces.NamespaceIds.xhtml.id;
const $richText = Symbol();
const VALID_STYLES = new Set(["color", "font", "font-family", "font-size", "font-stretch", "font-style", "font-weight", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "letter-spacing", "line-height", "orphans", "page-break-after", "page-break-before", "page-break-inside", "tab-interval", "tab-stop", "text-align", "text-decoration", "text-indent", "vertical-align", "widows", "kerning-mode", "xfa-font-horizontal-scale", "xfa-font-vertical-scale", "xfa-spacerun", "xfa-tab-stops"]);
const StyleMapping = new Map([["page-break-after", "breakAfter"], ["page-break-before", "breakBefore"], ["page-break-inside", "breakInside"], ["kerning-mode", value => value === "none" ? "none" : "normal"], ["xfa-font-horizontal-scale", value => `scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-font-vertical-scale", value => `scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-spacerun", ""], ["xfa-tab-stops", ""], ["font-size", (value, original) => {
value = original.fontSize = (0, _utils.getMeasurement)(value);
@ -58985,6 +59136,7 @@ const StyleMapping = new Map([["page-break-after", "breakAfter"], ["page-break-b
}], ["letter-spacing", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["line-height", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["margin", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["margin-bottom", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["margin-left", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["margin-right", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["margin-top", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["text-indent", value => (0, _html_utils.measureToString)((0, _utils.getMeasurement)(value))], ["font-family", value => value]]);
const spacesRegExp = /\s+/g;
const crlfRegExp = /[\r\n]+/g;
const crlfForRichTextRegExp = /\r\n?/g;
function mapStyle(styleStr, node) {
const style = Object.create(null);
@ -59055,6 +59207,7 @@ const NoWhites = new Set(["body", "html"]);
class XhtmlObject extends _xfa_object.XmlObject {
constructor(attributes, name) {
super(XHTML_NS_ID, name);
this[$richText] = false;
this.style = attributes.style || "";
}
@ -59068,11 +59221,15 @@ class XhtmlObject extends _xfa_object.XmlObject {
return !NoWhites.has(this[_xfa_object.$nodeName]);
}
[_xfa_object.$onText](str) {
str = str.replace(crlfRegExp, "");
[_xfa_object.$onText](str, richText = false) {
if (!richText) {
str = str.replace(crlfRegExp, "");
if (!this.style.includes("xfa-spacerun:yes")) {
str = str.replace(spacesRegExp, " ");
if (!this.style.includes("xfa-spacerun:yes")) {
str = str.replace(spacesRegExp, " ");
}
} else {
this[$richText] = true;
}
if (str) {
@ -59195,6 +59352,14 @@ class XhtmlObject extends _xfa_object.XmlObject {
return _utils.HTMLResult.EMPTY;
}
let value;
if (this[$richText]) {
value = this[_xfa_object.$content] ? this[_xfa_object.$content].replace(crlfForRichTextRegExp, "\n") : undefined;
} else {
value = this[_xfa_object.$content] || undefined;
}
return _utils.HTMLResult.success({
name: this[_xfa_object.$nodeName],
attributes: {
@ -59202,7 +59367,7 @@ class XhtmlObject extends _xfa_object.XmlObject {
style: mapStyle(this.style, this)
},
children,
value: this[_xfa_object.$content] || ""
value
});
}
@ -59366,6 +59531,12 @@ class P extends XhtmlObject {
}
[_xfa_object.$text]() {
const siblings = this[_xfa_object.$getParent]()[_xfa_object.$getChildren]();
if (siblings[siblings.length - 1] === this) {
return super[_xfa_object.$text]();
}
return super[_xfa_object.$text]() + "\n";
}
@ -61021,8 +61192,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({
var _worker = __w_pdfjs_require__(1);
const pdfjsVersion = '2.12.69';
const pdfjsBuild = 'e788665a2';
const pdfjsVersion = '2.12.126';
const pdfjsBuild = 'e1a35e7bb';
})();
/******/ return __webpack_exports__;

Просмотреть файл

@ -292,6 +292,7 @@ const Stepper = (function StepperClosure() {
this.breakPoints = initialBreakPoints;
this.currentIdx = -1;
this.operatorListIdx = 0;
this.indentLevel = 0;
}
init(operatorList) {
@ -382,8 +383,14 @@ const Stepper = (function StepperClosure() {
table.appendChild(charCodeRow);
table.appendChild(fontCharRow);
table.appendChild(unicodeRow);
} else if (fn === "restore") {
this.indentLevel--;
}
line.appendChild(c("td", fn));
line.appendChild(c("td", " ".repeat(this.indentLevel * 2) + fn));
if (fn === "save") {
this.indentLevel++;
}
if (decArgs instanceof HTMLElement) {
line.appendChild(decArgs);
} else {

Просмотреть файл

@ -266,17 +266,21 @@
display: inline-block;
}
.annotationLayer .popup span {
.annotationLayer .popupDate {
display: inline-block;
margin-left: 5px;
}
.annotationLayer .popup p {
.annotationLayer .popupContent {
border-top: 1px solid rgba(51, 51, 51, 1);
margin-top: 2px;
padding-top: 2px;
}
.annotationLayer .richText > * {
white-space: pre-wrap;
}
.annotationLayer .highlightAnnotation,
.annotationLayer .underlineAnnotation,
.annotationLayer .squigglyAnnotation,
@ -505,6 +509,9 @@
.xfaLink {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.xfaCheckbox,
@ -2384,6 +2391,7 @@ html[dir="rtl"] #documentPropertiesOverlay .row > * {
}
#PDFBug table {
font-size: 10px;
white-space: pre;
}
#PDFBug table.showText {
border-collapse: collapse;

Просмотреть файл

@ -32,7 +32,7 @@
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.OptionKind = exports.compatibilityParams = exports.AppOptions = void 0;
exports.compatibilityParams = exports.OptionKind = exports.AppOptions = void 0;
const compatibilityParams = Object.create(null);
exports.compatibilityParams = compatibilityParams;
;
@ -1589,19 +1589,22 @@ const PDFViewerApplication = {
}
const numLabels = labels.length;
let standardLabels = 0,
emptyLabels = 0;
if (numLabels !== this.pagesCount) {
console.error("The number of Page Labels does not match the number of pages in the document.");
return;
for (let i = 0; i < numLabels; i++) {
const label = labels[i];
if (label === (i + 1).toString()) {
standardLabels++;
} else if (label === "") {
emptyLabels++;
} else {
break;
}
}
let i = 0;
while (i < numLabels && labels[i] === (i + 1).toString()) {
i++;
}
if (i === numLabels) {
if (standardLabels >= numLabels || emptyLabels >= numLabels) {
return;
}
@ -2292,25 +2295,23 @@ function webViewerPresentationModeChanged(evt) {
function webViewerSidebarViewChanged(evt) {
PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;
const store = PDFViewerApplication.store;
if (store && PDFViewerApplication.isInitialViewSet) {
store.set("sidebarView", evt.view).catch(function () {});
if (PDFViewerApplication.isInitialViewSet) {
PDFViewerApplication.store?.set("sidebarView", evt.view).catch(() => {});
}
}
function webViewerUpdateViewarea(evt) {
const location = evt.location,
store = PDFViewerApplication.store;
const location = evt.location;
if (store && PDFViewerApplication.isInitialViewSet) {
store.setMultiple({
if (PDFViewerApplication.isInitialViewSet) {
PDFViewerApplication.store?.setMultiple({
page: location.pageNumber,
zoom: location.scale,
scrollLeft: location.left,
scrollTop: location.top,
rotation: location.rotation
}).catch(function () {});
}).catch(() => {});
}
const href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams);
@ -2322,18 +2323,14 @@ function webViewerUpdateViewarea(evt) {
}
function webViewerScrollModeChanged(evt) {
const store = PDFViewerApplication.store;
if (store && PDFViewerApplication.isInitialViewSet) {
store.set("scrollMode", evt.mode).catch(function () {});
if (PDFViewerApplication.isInitialViewSet) {
PDFViewerApplication.store?.set("scrollMode", evt.mode).catch(() => {});
}
}
function webViewerSpreadModeChanged(evt) {
const store = PDFViewerApplication.store;
if (store && PDFViewerApplication.isInitialViewSet) {
store.set("spreadMode", evt.mode).catch(function () {});
if (PDFViewerApplication.isInitialViewSet) {
PDFViewerApplication.store?.set("spreadMode", evt.mode).catch(() => {});
}
}
@ -2873,10 +2870,7 @@ function webViewerKeyDown(evt) {
break;
}
if (PDFViewerApplication.page > 1) {
PDFViewerApplication.page--;
}
pdfViewer.previousPage();
handled = true;
break;
@ -2928,6 +2922,7 @@ exports.PDFPrintServiceFactory = PDFPrintServiceFactory;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.animationStarted = exports.WaitOnType = exports.VERTICAL_PADDING = exports.UNKNOWN_SCALE = exports.TextLayerMode = exports.SpreadMode = exports.SidebarView = exports.ScrollMode = exports.SCROLLBAR_PADDING = exports.RendererType = exports.ProgressBar = exports.PresentationModeState = exports.MIN_SCALE = exports.MAX_SCALE = exports.MAX_AUTO_SCALE = exports.EventBus = exports.DEFAULT_SCALE_VALUE = exports.DEFAULT_SCALE_DELTA = exports.DEFAULT_SCALE = exports.AutomationEventBus = exports.AutoPrintRegExp = void 0;
exports.apiPageLayoutToViewerModes = apiPageLayoutToViewerModes;
exports.apiPageModeToSidebarView = apiPageModeToSidebarView;
exports.approximateFraction = approximateFraction;
@ -2950,7 +2945,6 @@ exports.roundToDivide = roundToDivide;
exports.scrollIntoView = scrollIntoView;
exports.waitOnEventOrTimeout = waitOnEventOrTimeout;
exports.watchScroll = watchScroll;
exports.WaitOnType = exports.VERTICAL_PADDING = exports.UNKNOWN_SCALE = exports.TextLayerMode = exports.SpreadMode = exports.SidebarView = exports.ScrollMode = exports.SCROLLBAR_PADDING = exports.RendererType = exports.ProgressBar = exports.PresentationModeState = exports.MIN_SCALE = exports.MAX_SCALE = exports.MAX_AUTO_SCALE = exports.EventBus = exports.DEFAULT_SCALE_VALUE = exports.DEFAULT_SCALE_DELTA = exports.DEFAULT_SCALE = exports.AutoPrintRegExp = exports.AutomationEventBus = exports.animationStarted = void 0;
const DEFAULT_SCALE_VALUE = "auto";
exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE;
const DEFAULT_SCALE = 1.0;
@ -4041,10 +4035,8 @@ class PDFRenderingQueue {
return;
}
if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) {
if (this.pdfThumbnailViewer.forceRendering()) {
return;
}
if (this.isThumbnailViewEnabled && this.pdfThumbnailViewer?.forceRendering()) {
return;
}
if (this.printing) {
@ -4057,14 +4049,14 @@ class PDFRenderingQueue {
}
getHighestPriority(visible, views, scrolledDown, preRenderExtra = false) {
const visibleViews = visible.views;
const numVisible = visibleViews.length;
const visibleViews = visible.views,
numVisible = visibleViews.length;
if (numVisible === 0) {
return null;
}
for (let i = 0; i < numVisible; ++i) {
for (let i = 0; i < numVisible; i++) {
const view = visibleViews[i].view;
if (!this.isViewFinished(view)) {
@ -4075,8 +4067,8 @@ class PDFRenderingQueue {
const firstId = visible.first.id,
lastId = visible.last.id;
if (lastId - firstId > 1) {
for (let i = 0, ii = lastId - firstId; i <= ii; i++) {
if (lastId - firstId + 1 > numVisible) {
for (let i = 1, ii = lastId - firstId; i < ii; i++) {
const holeId = scrolledDown ? firstId + i : lastId - i,
holeView = views[holeId - 1];
@ -5832,8 +5824,8 @@ exports.PDFFindController = PDFFindController;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getCharacterType = getCharacterType;
exports.CharacterType = void 0;
exports.getCharacterType = getCharacterType;
const CharacterType = {
SPACE: 0,
ALPHA_LETTER: 1,
@ -5927,9 +5919,9 @@ function getCharacterType(charCode) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.PDFHistory = void 0;
exports.isDestArraysEqual = isDestArraysEqual;
exports.isDestHashesEqual = isDestHashesEqual;
exports.PDFHistory = void 0;
var _ui_utils = __webpack_require__(3);
@ -9127,10 +9119,21 @@ class PDFThumbnailViewer {
return promise;
}
#getScrollAhead(visible) {
if (visible.first?.id === 1) {
return true;
} else if (visible.last?.id === this._thumbnails.length) {
return false;
}
return this.scroll.down;
}
forceRendering() {
const visibleThumbs = this._getVisibleThumbs();
const thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, this.scroll.down);
const scrollAhead = this.#getScrollAhead(visibleThumbs);
const thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, scrollAhead);
if (thumbView) {
this._ensurePdfPageLoaded(thumbView).then(() => {
@ -9169,43 +9172,36 @@ const MAX_NUM_SCALING_STEPS = 3;
const THUMBNAIL_CANVAS_BORDER_WIDTH = 1;
const THUMBNAIL_WIDTH = 98;
const TempImageFactory = function TempImageFactoryClosure() {
let tempCanvasCache = null;
return {
getCanvas(width, height) {
let tempCanvas = tempCanvasCache;
class TempImageFactory {
static #tempCanvas = null;
if (!tempCanvas) {
tempCanvas = document.createElement("canvas");
tempCanvasCache = tempCanvas;
}
static getCanvas(width, height) {
const tempCanvas = this.#tempCanvas ||= document.createElement("canvas");
tempCanvas.width = width;
tempCanvas.height = height;
tempCanvas.mozOpaque = true;
const ctx = tempCanvas.getContext("2d", {
alpha: false
});
ctx.save();
ctx.fillStyle = "rgb(255, 255, 255)";
ctx.fillRect(0, 0, width, height);
ctx.restore();
return [tempCanvas, tempCanvas.getContext("2d")];
}
tempCanvas.width = width;
tempCanvas.height = height;
tempCanvas.mozOpaque = true;
const ctx = tempCanvas.getContext("2d", {
alpha: false
});
ctx.save();
ctx.fillStyle = "rgb(255, 255, 255)";
ctx.fillRect(0, 0, width, height);
ctx.restore();
return [tempCanvas, tempCanvas.getContext("2d")];
},
static destroyCanvas() {
const tempCanvas = this.#tempCanvas;
destroyCanvas() {
const tempCanvas = tempCanvasCache;
if (tempCanvas) {
tempCanvas.width = 0;
tempCanvas.height = 0;
}
tempCanvasCache = null;
if (tempCanvas) {
tempCanvas.width = 0;
tempCanvas.height = 0;
}
};
}();
this.#tempCanvas = null;
}
}
exports.TempImageFactory = TempImageFactory;
@ -9681,12 +9677,14 @@ function isSameScale(oldScale, newScale) {
}
class BaseViewer {
#scrollModePageState = null;
constructor(options) {
if (this.constructor === BaseViewer) {
throw new Error("Cannot initialize BaseViewer.");
}
const viewerVersion = '2.12.69';
const viewerVersion = '2.12.126';
if (_pdfjsLib.version !== viewerVersion) {
throw new Error(`The API version "${_pdfjsLib.version}" does not match the Viewer version "${viewerVersion}".`);
@ -9995,7 +9993,7 @@ class BaseViewer {
this._firstPageCapability.resolve(firstPdfPage);
this._optionalContentConfigPromise = optionalContentConfigPromise;
const viewerElement = this._scrollMode === _ui_utils.ScrollMode.PAGE ? this._scrollModePageState.shadowViewer : this.viewer;
const viewerElement = this._scrollMode === _ui_utils.ScrollMode.PAGE ? null : this.viewer;
const scale = this.currentScale;
const viewport = firstPdfPage.getViewport({
scale: scale * _pdfjsLib.PixelsPerInch.PDF_TO_CSS_UNITS
@ -10137,8 +10135,7 @@ class BaseViewer {
this._scrollMode = _ui_utils.ScrollMode.VERTICAL;
this._previousScrollMode = _ui_utils.ScrollMode.UNKNOWN;
this._spreadMode = _ui_utils.SpreadMode.NONE;
this._scrollModePageState = {
shadowViewer: document.createDocumentFragment(),
this.#scrollModePageState = {
previousPageNumber: 1,
scrollDown: true,
pages: []
@ -10167,17 +10164,9 @@ class BaseViewer {
}
const pageNumber = this._currentPageNumber,
state = this._scrollModePageState,
state = this.#scrollModePageState,
viewer = this.viewer;
if (viewer.hasChildNodes()) {
viewer.textContent = "";
for (const pageView of this._pages) {
state.shadowViewer.appendChild(pageView.div);
}
}
viewer.textContent = "";
state.pages.length = 0;
if (this._spreadMode === _ui_utils.SpreadMode.NONE) {
@ -10656,7 +10645,7 @@ class BaseViewer {
return this._getCurrentVisiblePage();
}
const views = this._scrollMode === _ui_utils.ScrollMode.PAGE ? this._scrollModePageState.pages : this._pages,
const views = this._scrollMode === _ui_utils.ScrollMode.PAGE ? this.#scrollModePageState.pages : this._pages,
horizontal = this._scrollMode === _ui_utils.ScrollMode.HORIZONTAL,
rtl = horizontal && this._isContainerRtl;
return (0, _ui_utils.getVisibleElements)({
@ -10746,10 +10735,16 @@ class BaseViewer {
return promise;
}
get _scrollAhead() {
#getScrollAhead(visible) {
if (visible.first?.id === 1) {
return true;
} else if (visible.last?.id === this.pagesCount) {
return false;
}
switch (this._scrollMode) {
case _ui_utils.ScrollMode.PAGE:
return this._scrollModePageState.scrollDown;
return this.#scrollModePageState.scrollDown;
case _ui_utils.ScrollMode.HORIZONTAL:
return this.scroll.right;
@ -10761,7 +10756,7 @@ class BaseViewer {
forceRendering(currentlyVisiblePages) {
const visiblePages = currentlyVisiblePages || this._getVisiblePages();
const scrollAhead = this._scrollAhead;
const scrollAhead = this.#getScrollAhead(visiblePages);
const preRenderExtra = this._spreadMode !== _ui_utils.SpreadMode.NONE && this._scrollMode !== _ui_utils.ScrollMode.HORIZONTAL;
const pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead, preRenderExtra);
@ -11340,9 +11335,9 @@ exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.NullL10n = void 0;
exports.fixupLangCode = fixupLangCode;
exports.getL10nFallback = getL10nFallback;
exports.NullL10n = void 0;
const DEFAULT_L10N_STRINGS = {
of_pages: "of {{pagesCount}}",
page_of_pages: "({{pageNumber}} of {{pagesCount}})",
@ -11533,7 +11528,7 @@ class PDFPageView {
div.setAttribute("aria-label", msg);
});
this.div = div;
container.appendChild(div);
container?.appendChild(div);
}
setPdfPage(pdfPage) {
@ -13887,6 +13882,11 @@ class FirefoxExternalServices extends _app.DefaultExternalServices {
switch (args.pdfjsLoadAction) {
case "supportsRangedLoading":
if (args.done && !args.data) {
callbacks.onError();
break;
}
pdfDataRangeTransport = new FirefoxComDataRangeTransport(args.length, args.data, args.done, args.filename);
callbacks.onOpenWithTransport(args.pdfUrl, args.length, pdfDataRangeTransport);
break;
@ -13905,10 +13905,7 @@ class FirefoxExternalServices extends _app.DefaultExternalServices {
break;
case "progressiveDone":
if (pdfDataRangeTransport) {
pdfDataRangeTransport.onDataProgressiveDone();
}
pdfDataRangeTransport?.onDataProgressiveDone();
break;
case "progress":
@ -14439,25 +14436,25 @@ var exports = __webpack_exports__;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
Object.defineProperty(exports, "PDFViewerApplicationOptions", ({
enumerable: true,
get: function () {
return _app_options.AppOptions;
}
}));
Object.defineProperty(exports, "PDFViewerApplication", ({
enumerable: true,
get: function () {
return _app.PDFViewerApplication;
}
}));
Object.defineProperty(exports, "PDFViewerApplicationOptions", ({
enumerable: true,
get: function () {
return _app_options.AppOptions;
}
}));
var _app_options = __webpack_require__(1);
var _app = __webpack_require__(2);
const pdfjsVersion = '2.12.69';
const pdfjsBuild = 'e788665a2';
const pdfjsVersion = '2.12.126';
const pdfjsBuild = 'e1a35e7bb';
window.PDFViewerApplication = _app.PDFViewerApplication;
window.PDFViewerApplicationOptions = _app_options.AppOptions;
;

Просмотреть файл

@ -20,7 +20,7 @@ origin:
# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: version 2.12.69
release: version 2.12.126
# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/