modern-pdf-lib 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/dist/{batchOptimize-C1W3O68Q.cjs → batchOptimize-CXC9gNqD.cjs} +55 -55
- package/dist/{batchOptimize-BCJEEN8J.mjs → batchOptimize-CjLGD5ie.mjs} +25 -25
- package/dist/{bridge-DMEuGtfn.cjs → bridge-ByvzPu5h.cjs} +29 -31
- package/dist/{bridge-DaS-gzEd.mjs → bridge-ZD6O6QQa.mjs} +4 -5
- package/dist/browser.cjs +245 -154
- package/dist/browser.d.cts +166 -166
- package/dist/browser.d.cts.map +1 -1
- package/dist/browser.d.mts +166 -166
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +15 -19
- package/dist/cli/index.cjs +7 -7
- package/dist/cli/index.mjs +8 -8
- package/dist/{compressionAnalysis-CwknBtqx.mjs → compressionAnalysis-BgKy45pA.mjs} +55 -69
- package/dist/{compressionAnalysis-Ch7t-HXn.d.mts → compressionAnalysis-CDOp_vPr.d.mts} +136 -136
- package/dist/compressionAnalysis-CDOp_vPr.d.mts.map +1 -0
- package/dist/{compressionAnalysis-B-FPzgzw.cjs → compressionAnalysis-Djv-Zvcd.cjs} +85 -99
- package/dist/{compressionAnalysis-Dgv1TtHJ.d.cts → compressionAnalysis-UfmonqbM.d.cts} +136 -136
- package/dist/compressionAnalysis-UfmonqbM.d.cts.map +1 -0
- package/dist/create.cjs +21 -23
- package/dist/create.d.cts +2 -2
- package/dist/create.d.mts +2 -2
- package/dist/create.mjs +3 -5
- package/dist/{deduplicateImages-DIon68zB.mjs → deduplicateImages-BTCyAPfJ.mjs} +4 -5
- package/dist/{deduplicateImages-cKsnD6Ep.cjs → deduplicateImages-CaGgaqyS.cjs} +14 -15
- package/dist/{fieldAppearance-C8PoLFSc.d.mts → fieldAppearance-Df1262CT.d.cts} +44 -44
- package/dist/fieldAppearance-Df1262CT.d.cts.map +1 -0
- package/dist/{fieldAppearance-CdiGFG5e.d.cts → fieldAppearance-_CZdoUCD.d.mts} +44 -44
- package/dist/fieldAppearance-_CZdoUCD.d.mts.map +1 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts +677 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts.map +1 -0
- package/dist/fontEmbed-DtA_riGC.d.mts +677 -0
- package/dist/fontEmbed-DtA_riGC.d.mts.map +1 -0
- package/dist/forms.cjs +3 -4
- package/dist/forms.d.cts +2 -2
- package/dist/forms.d.mts +2 -2
- package/dist/forms.mjs +2 -3
- package/dist/{grayscaleDetect-C6kFF3dk.mjs → grayscaleDetect-6GJrgBRT.mjs} +3 -3
- package/dist/{grayscaleDetect-C2m-eEXR.cjs → grayscaleDetect-DAUqxjgR.cjs} +13 -14
- package/dist/{imageExtract-zEb1gnkb.cjs → imageExtract-DT50Hp_g.cjs} +13 -14
- package/dist/{imageExtract-Dnk_Ssv7.mjs → imageExtract-Dapir-ux.mjs} +3 -4
- package/dist/index-C1lZe66f.d.mts +8682 -0
- package/dist/index-C1lZe66f.d.mts.map +1 -0
- package/dist/index-D1SvXWSI.d.cts +8682 -0
- package/dist/index-D1SvXWSI.d.cts.map +1 -0
- package/dist/index.cjs +245 -153
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +14 -17
- package/dist/{layout-DQh05VP-.cjs → layout-C4vbTlBW.cjs} +184 -134
- package/dist/{layout-CrqeJBMI.mjs → layout-lO4x64kY.mjs} +50 -12
- package/dist/{loader-CVB-c_3Z.mjs → loader-B1Ix7ozU.mjs} +248 -12
- package/dist/{loader-DYCH3n7d.cjs → loader-DR7H0XOf.cjs} +332 -66
- package/dist/parse.cjs +7 -8
- package/dist/parse.d.cts +3 -3
- package/dist/parse.d.mts +3 -3
- package/dist/parse.mjs +6 -7
- package/dist/pdfDocument-CH2E4UCc.d.mts +5160 -0
- package/dist/pdfDocument-CH2E4UCc.d.mts.map +1 -0
- package/dist/{pdfDocument-D9uYNSb-.cjs → pdfDocument-C_7mrBCL.cjs} +22409 -11624
- package/dist/pdfDocument-CzOipXnw.d.cts +5160 -0
- package/dist/pdfDocument-CzOipXnw.d.cts.map +1 -0
- package/dist/{pdfDocument-D7aFSQEY.mjs → pdfDocument-DRbT6HZw.mjs} +10830 -855
- package/dist/{pdfForm-BpqDGp29.cjs → pdfForm-BVS_do95.cjs} +112 -107
- package/dist/pdfForm-Ca86NDWn.d.cts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.cts.map +1 -0
- package/dist/pdfForm-Ca86NDWn.d.mts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.mts.map +1 -0
- package/dist/{pdfForm-C3mC9FoQ.mjs → pdfForm-CfLnlsj-.mjs} +22 -17
- package/dist/{pdfObjects-1veop1_d.cjs → pdfObjects-BcPlSI0a.cjs} +62 -53
- package/dist/{pdfObjects-uEsWlfzU.mjs → pdfObjects-CB7TEdbW.mjs} +12 -2
- package/dist/rolldown-runtime-ak5kbic3.cjs +18 -0
- package/dist/{src-lFqJHb1C.cjs → src-C-IDXuvi.cjs} +8692 -1916
- package/dist/{src-QZWP21qF.mjs → src-DJaD-bJ2.mjs} +7278 -982
- package/dist/{streamDecode-Bj568Nc9.mjs → streamDecode-BamENT3k.mjs} +129 -150
- package/dist/{streamDecode-CvgErkFu.cjs → streamDecode-DcaZz309.cjs} +139 -160
- package/package.json +25 -22
- package/dist/compressionAnalysis-Ch7t-HXn.d.mts.map +0 -1
- package/dist/compressionAnalysis-Dgv1TtHJ.d.cts.map +0 -1
- package/dist/fflateAdapter-DuNiByKx.mjs +0 -196
- package/dist/fflateAdapter-LTAeAhaD.cjs +0 -207
- package/dist/fieldAppearance-C8PoLFSc.d.mts.map +0 -1
- package/dist/fieldAppearance-CdiGFG5e.d.cts.map +0 -1
- package/dist/fontEmbed-3YhUPLFj.d.cts +0 -659
- package/dist/fontEmbed-3YhUPLFj.d.cts.map +0 -1
- package/dist/fontEmbed-DlVnVCZU.d.mts +0 -659
- package/dist/fontEmbed-DlVnVCZU.d.mts.map +0 -1
- package/dist/fontSubset-5SLWMmEw.cjs +0 -518
- package/dist/fontSubset-BGFDIMmT.mjs +0 -495
- package/dist/index-B4S61WjK.d.mts +0 -6507
- package/dist/index-B4S61WjK.d.mts.map +0 -1
- package/dist/index-xfJP6Ycm.d.cts +0 -6507
- package/dist/index-xfJP6Ycm.d.cts.map +0 -1
- package/dist/libdeflateWasm-CcA1W04G.mjs +0 -220
- package/dist/libdeflateWasm-DLw-I1CY.cjs +0 -237
- package/dist/pdfCatalog-Bqq4FiLn.cjs +0 -174
- package/dist/pdfCatalog-CnKMAtIo.mjs +0 -139
- package/dist/pdfDocument-Bc_vAO74.d.cts +0 -4758
- package/dist/pdfDocument-Bc_vAO74.d.cts.map +0 -1
- package/dist/pdfDocument-Bi-NoyXv.d.mts +0 -4758
- package/dist/pdfDocument-Bi-NoyXv.d.mts.map +0 -1
- package/dist/pdfForm-BiyNtYem.d.mts +0 -905
- package/dist/pdfForm-BiyNtYem.d.mts.map +0 -1
- package/dist/pdfForm-SOXJ72LW.d.cts +0 -905
- package/dist/pdfForm-SOXJ72LW.d.cts.map +0 -1
- package/dist/pdfPage-BJIE5hc6.mjs +0 -8180
- package/dist/pdfPage-C_tjEjj1.cjs +0 -8893
- package/dist/pngEmbed-CGi7cym7.mjs +0 -552
- package/dist/pngEmbed-CTn9IeNB.cjs +0 -563
- package/dist/rolldown-runtime-CKhH4XqG.cjs +0 -24
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_pdfObjects = require(
|
|
1
|
+
const require_pdfObjects = require("./pdfObjects-BcPlSI0a.cjs");
|
|
2
2
|
let fflate = require("fflate");
|
|
3
|
-
|
|
4
3
|
//#region src/parser/ccittDecode.ts
|
|
5
4
|
/**
|
|
6
5
|
* Decode CCITTFaxDecode stream data.
|
|
@@ -40,6 +39,7 @@ function dictBool(dict, key, fallback) {
|
|
|
40
39
|
return fallback;
|
|
41
40
|
}
|
|
42
41
|
var BitReader = class {
|
|
42
|
+
data;
|
|
43
43
|
bytePos = 0;
|
|
44
44
|
bitPos = 0;
|
|
45
45
|
constructor(data) {
|
|
@@ -1135,7 +1135,6 @@ function decodeGroup3_1D(data, params) {
|
|
|
1135
1135
|
const maxRows = rows > 0 ? rows : 1e5;
|
|
1136
1136
|
while (rowCount < maxRows) {
|
|
1137
1137
|
if (encodedByteAlign) reader.alignToByte();
|
|
1138
|
-
skipEOL(reader);
|
|
1139
1138
|
const line = decodeGroup3Line(reader, columns);
|
|
1140
1139
|
if (!line) break;
|
|
1141
1140
|
const packed = packBits(line, columns, blackIs1);
|
|
@@ -1145,7 +1144,6 @@ function decodeGroup3_1D(data, params) {
|
|
|
1145
1144
|
}
|
|
1146
1145
|
return new Uint8Array(output);
|
|
1147
1146
|
}
|
|
1148
|
-
function skipEOL(reader) {}
|
|
1149
1147
|
function decodeGroup3Line(reader, columns) {
|
|
1150
1148
|
const line = new Uint8Array(columns);
|
|
1151
1149
|
let pos = 0;
|
|
@@ -1210,69 +1208,41 @@ function decodeGroup4(data, params) {
|
|
|
1210
1208
|
}
|
|
1211
1209
|
return new Uint8Array(output);
|
|
1212
1210
|
}
|
|
1213
|
-
/**
|
|
1214
|
-
* 2D mode codes:
|
|
1215
|
-
* Pass mode: 0001
|
|
1216
|
-
* Horizontal mode: 001
|
|
1217
|
-
* Vertical(0): 1
|
|
1218
|
-
* Vertical(+1): 011
|
|
1219
|
-
* Vertical(-1): 010
|
|
1220
|
-
* Vertical(+2): 000011
|
|
1221
|
-
* Vertical(-2): 000010
|
|
1222
|
-
* Vertical(+3): 0000011
|
|
1223
|
-
* Vertical(-3): 0000010
|
|
1224
|
-
*
|
|
1225
|
-
* EOFB (Group 4 end): 000000000001 000000000001 (two EOLs)
|
|
1226
|
-
*/
|
|
1227
|
-
var Mode2D = /* @__PURE__ */ function(Mode2D) {
|
|
1228
|
-
Mode2D[Mode2D["PASS"] = 0] = "PASS";
|
|
1229
|
-
Mode2D[Mode2D["HORIZONTAL"] = 1] = "HORIZONTAL";
|
|
1230
|
-
Mode2D[Mode2D["VERTICAL_0"] = 2] = "VERTICAL_0";
|
|
1231
|
-
Mode2D[Mode2D["VERTICAL_PLUS_1"] = 3] = "VERTICAL_PLUS_1";
|
|
1232
|
-
Mode2D[Mode2D["VERTICAL_MINUS_1"] = 4] = "VERTICAL_MINUS_1";
|
|
1233
|
-
Mode2D[Mode2D["VERTICAL_PLUS_2"] = 5] = "VERTICAL_PLUS_2";
|
|
1234
|
-
Mode2D[Mode2D["VERTICAL_MINUS_2"] = 6] = "VERTICAL_MINUS_2";
|
|
1235
|
-
Mode2D[Mode2D["VERTICAL_PLUS_3"] = 7] = "VERTICAL_PLUS_3";
|
|
1236
|
-
Mode2D[Mode2D["VERTICAL_MINUS_3"] = 8] = "VERTICAL_MINUS_3";
|
|
1237
|
-
Mode2D[Mode2D["EOL"] = 9] = "EOL";
|
|
1238
|
-
Mode2D[Mode2D["ERROR"] = 10] = "ERROR";
|
|
1239
|
-
return Mode2D;
|
|
1240
|
-
}(Mode2D || {});
|
|
1241
1211
|
function read2DMode(reader) {
|
|
1242
1212
|
let bit = reader.readBit();
|
|
1243
|
-
if (bit < 0) return
|
|
1244
|
-
if (bit === 1) return
|
|
1213
|
+
if (bit < 0) return 9;
|
|
1214
|
+
if (bit === 1) return 2;
|
|
1245
1215
|
bit = reader.readBit();
|
|
1246
|
-
if (bit < 0) return
|
|
1216
|
+
if (bit < 0) return 9;
|
|
1247
1217
|
if (bit === 1) {
|
|
1248
1218
|
bit = reader.readBit();
|
|
1249
|
-
if (bit < 0) return
|
|
1250
|
-
if (bit === 0) return
|
|
1251
|
-
return
|
|
1219
|
+
if (bit < 0) return 9;
|
|
1220
|
+
if (bit === 0) return 4;
|
|
1221
|
+
return 3;
|
|
1252
1222
|
}
|
|
1253
1223
|
bit = reader.readBit();
|
|
1254
|
-
if (bit < 0) return
|
|
1255
|
-
if (bit === 1) return
|
|
1224
|
+
if (bit < 0) return 9;
|
|
1225
|
+
if (bit === 1) return 1;
|
|
1256
1226
|
bit = reader.readBit();
|
|
1257
|
-
if (bit < 0) return
|
|
1258
|
-
if (bit === 1) return
|
|
1227
|
+
if (bit < 0) return 9;
|
|
1228
|
+
if (bit === 1) return 0;
|
|
1259
1229
|
bit = reader.readBit();
|
|
1260
|
-
if (bit < 0) return
|
|
1230
|
+
if (bit < 0) return 9;
|
|
1261
1231
|
if (bit === 1) {
|
|
1262
1232
|
bit = reader.readBit();
|
|
1263
|
-
if (bit < 0) return
|
|
1264
|
-
if (bit === 0) return
|
|
1265
|
-
return
|
|
1233
|
+
if (bit < 0) return 9;
|
|
1234
|
+
if (bit === 0) return 6;
|
|
1235
|
+
return 5;
|
|
1266
1236
|
}
|
|
1267
1237
|
bit = reader.readBit();
|
|
1268
|
-
if (bit < 0) return
|
|
1238
|
+
if (bit < 0) return 9;
|
|
1269
1239
|
if (bit === 1) {
|
|
1270
1240
|
bit = reader.readBit();
|
|
1271
|
-
if (bit < 0) return
|
|
1272
|
-
if (bit === 0) return
|
|
1273
|
-
return
|
|
1241
|
+
if (bit < 0) return 9;
|
|
1242
|
+
if (bit === 0) return 8;
|
|
1243
|
+
return 7;
|
|
1274
1244
|
}
|
|
1275
|
-
return
|
|
1245
|
+
return 9;
|
|
1276
1246
|
}
|
|
1277
1247
|
/**
|
|
1278
1248
|
* Find b1: the position of the first changing element on the reference
|
|
@@ -1311,7 +1281,7 @@ function decode2DLine(reader, referenceLine, columns) {
|
|
|
1311
1281
|
while (a0 < columns) {
|
|
1312
1282
|
const mode = read2DMode(reader);
|
|
1313
1283
|
switch (mode) {
|
|
1314
|
-
case
|
|
1284
|
+
case 0: {
|
|
1315
1285
|
const b2 = findB2(referenceLine, findB1(referenceLine, a0IsBeforeLine ? -1 : a0, currentColor, columns), columns);
|
|
1316
1286
|
const fillEnd = Math.min(b2, columns);
|
|
1317
1287
|
for (let i = a0IsBeforeLine ? 0 : a0; i < fillEnd; i++) line[i] = currentColor;
|
|
@@ -1319,7 +1289,7 @@ function decode2DLine(reader, referenceLine, columns) {
|
|
|
1319
1289
|
a0IsBeforeLine = false;
|
|
1320
1290
|
break;
|
|
1321
1291
|
}
|
|
1322
|
-
case
|
|
1292
|
+
case 1: {
|
|
1323
1293
|
const tree1 = currentColor === 0 ? whiteTree : blackTree;
|
|
1324
1294
|
const tree2 = currentColor === 0 ? blackTree : whiteTree;
|
|
1325
1295
|
const run1 = readRunLength(reader, tree1);
|
|
@@ -1336,21 +1306,21 @@ function decode2DLine(reader, referenceLine, columns) {
|
|
|
1336
1306
|
a0IsBeforeLine = false;
|
|
1337
1307
|
break;
|
|
1338
1308
|
}
|
|
1339
|
-
case
|
|
1340
|
-
case
|
|
1341
|
-
case
|
|
1342
|
-
case
|
|
1343
|
-
case
|
|
1344
|
-
case
|
|
1345
|
-
case
|
|
1309
|
+
case 2:
|
|
1310
|
+
case 3:
|
|
1311
|
+
case 4:
|
|
1312
|
+
case 5:
|
|
1313
|
+
case 6:
|
|
1314
|
+
case 7:
|
|
1315
|
+
case 8: {
|
|
1346
1316
|
const offset = {
|
|
1347
|
-
[
|
|
1348
|
-
[
|
|
1349
|
-
[
|
|
1350
|
-
[
|
|
1351
|
-
[
|
|
1352
|
-
[
|
|
1353
|
-
[
|
|
1317
|
+
[2]: 0,
|
|
1318
|
+
[3]: 1,
|
|
1319
|
+
[4]: -1,
|
|
1320
|
+
[5]: 2,
|
|
1321
|
+
[6]: -2,
|
|
1322
|
+
[7]: 3,
|
|
1323
|
+
[8]: -3
|
|
1354
1324
|
}[mode];
|
|
1355
1325
|
const b1 = findB1(referenceLine, a0IsBeforeLine ? -1 : a0, currentColor, columns);
|
|
1356
1326
|
const a1 = Math.max(0, Math.min(b1 + offset, columns));
|
|
@@ -1361,13 +1331,12 @@ function decode2DLine(reader, referenceLine, columns) {
|
|
|
1361
1331
|
currentColor = currentColor === 0 ? 1 : 0;
|
|
1362
1332
|
break;
|
|
1363
1333
|
}
|
|
1364
|
-
case
|
|
1334
|
+
case 9:
|
|
1365
1335
|
if (a0 > 0 || !a0IsBeforeLine) {
|
|
1366
1336
|
for (let i = a0; i < columns; i++) line[i] = currentColor;
|
|
1367
1337
|
return line;
|
|
1368
1338
|
}
|
|
1369
1339
|
return null;
|
|
1370
|
-
case Mode2D.ERROR:
|
|
1371
1340
|
default: return a0 > 0 ? line : null;
|
|
1372
1341
|
}
|
|
1373
1342
|
}
|
|
@@ -1406,7 +1375,6 @@ function packBits(pixels, columns, blackIs1) {
|
|
|
1406
1375
|
}
|
|
1407
1376
|
return packed;
|
|
1408
1377
|
}
|
|
1409
|
-
|
|
1410
1378
|
//#endregion
|
|
1411
1379
|
//#region src/parser/jbig2Decode.ts
|
|
1412
1380
|
/**
|
|
@@ -2040,7 +2008,6 @@ var JBIG2Decoder = class {
|
|
|
2040
2008
|
offset++;
|
|
2041
2009
|
const htMMR = htFlags & 1;
|
|
2042
2010
|
const htTemplate = htFlags >>> 1 & 3;
|
|
2043
|
-
htFlags >>> 3 & 1;
|
|
2044
2011
|
const htCombOp = htFlags >>> 4 & 7;
|
|
2045
2012
|
const htDefPixel = htFlags >>> 7 & 1;
|
|
2046
2013
|
const gridW = readUint32BE$1(data, offset);
|
|
@@ -2147,7 +2114,6 @@ var JBIG2Decoder = class {
|
|
|
2147
2114
|
}
|
|
2148
2115
|
}
|
|
2149
2116
|
const arithData = data.subarray(offset);
|
|
2150
|
-
Math.ceil(regionWidth / 8);
|
|
2151
2117
|
let bitmap;
|
|
2152
2118
|
if (refBitmap) bitmap = decodeRefinementBitmap(arithData, regionWidth, regionHeight, grTemplate, refBitmap.data, refBitmap.width, refBitmap.height);
|
|
2153
2119
|
else bitmap = decodeArithmeticGenericRegion(arithData, regionWidth, regionHeight, grTemplate, false);
|
|
@@ -2163,7 +2129,7 @@ var JBIG2Decoder = class {
|
|
|
2163
2129
|
*/
|
|
2164
2130
|
getPageBitmap() {
|
|
2165
2131
|
if (this.pageBitmap) return this.pageBitmap;
|
|
2166
|
-
return new Uint8Array(0);
|
|
2132
|
+
return /* @__PURE__ */ new Uint8Array(0);
|
|
2167
2133
|
}
|
|
2168
2134
|
};
|
|
2169
2135
|
/**
|
|
@@ -2190,6 +2156,7 @@ function decodeMMRBitmap(data, width, height) {
|
|
|
2190
2156
|
* Simple bit reader for MMR data.
|
|
2191
2157
|
*/
|
|
2192
2158
|
var MMRBitReader = class {
|
|
2159
|
+
data;
|
|
2193
2160
|
bytePos = 0;
|
|
2194
2161
|
bitPos = 0;
|
|
2195
2162
|
constructor(data) {
|
|
@@ -2209,45 +2176,32 @@ var MMRBitReader = class {
|
|
|
2209
2176
|
return this.bytePos >= this.data.length;
|
|
2210
2177
|
}
|
|
2211
2178
|
};
|
|
2212
|
-
var MMRMode = /* @__PURE__ */ function(MMRMode) {
|
|
2213
|
-
MMRMode[MMRMode["PASS"] = 0] = "PASS";
|
|
2214
|
-
MMRMode[MMRMode["HORIZONTAL"] = 1] = "HORIZONTAL";
|
|
2215
|
-
MMRMode[MMRMode["VERTICAL_0"] = 2] = "VERTICAL_0";
|
|
2216
|
-
MMRMode[MMRMode["VERTICAL_R1"] = 3] = "VERTICAL_R1";
|
|
2217
|
-
MMRMode[MMRMode["VERTICAL_L1"] = 4] = "VERTICAL_L1";
|
|
2218
|
-
MMRMode[MMRMode["VERTICAL_R2"] = 5] = "VERTICAL_R2";
|
|
2219
|
-
MMRMode[MMRMode["VERTICAL_L2"] = 6] = "VERTICAL_L2";
|
|
2220
|
-
MMRMode[MMRMode["VERTICAL_R3"] = 7] = "VERTICAL_R3";
|
|
2221
|
-
MMRMode[MMRMode["VERTICAL_L3"] = 8] = "VERTICAL_L3";
|
|
2222
|
-
MMRMode[MMRMode["EOFB"] = 9] = "EOFB";
|
|
2223
|
-
return MMRMode;
|
|
2224
|
-
}(MMRMode || {});
|
|
2225
2179
|
function readMMRMode(reader) {
|
|
2226
2180
|
let bit = reader.readBit();
|
|
2227
|
-
if (bit === 1) return
|
|
2181
|
+
if (bit === 1) return 2;
|
|
2228
2182
|
bit = reader.readBit();
|
|
2229
2183
|
if (bit === 1) {
|
|
2230
2184
|
bit = reader.readBit();
|
|
2231
|
-
if (bit === 0) return
|
|
2232
|
-
return
|
|
2185
|
+
if (bit === 0) return 4;
|
|
2186
|
+
return 3;
|
|
2233
2187
|
}
|
|
2234
2188
|
bit = reader.readBit();
|
|
2235
|
-
if (bit === 1) return
|
|
2189
|
+
if (bit === 1) return 1;
|
|
2236
2190
|
bit = reader.readBit();
|
|
2237
|
-
if (bit === 1) return
|
|
2191
|
+
if (bit === 1) return 0;
|
|
2238
2192
|
bit = reader.readBit();
|
|
2239
2193
|
if (bit === 1) {
|
|
2240
2194
|
bit = reader.readBit();
|
|
2241
|
-
if (bit === 0) return
|
|
2242
|
-
return
|
|
2195
|
+
if (bit === 0) return 6;
|
|
2196
|
+
return 5;
|
|
2243
2197
|
}
|
|
2244
2198
|
bit = reader.readBit();
|
|
2245
2199
|
if (bit === 1) {
|
|
2246
2200
|
bit = reader.readBit();
|
|
2247
|
-
if (bit === 0) return
|
|
2248
|
-
return
|
|
2201
|
+
if (bit === 0) return 8;
|
|
2202
|
+
return 7;
|
|
2249
2203
|
}
|
|
2250
|
-
return
|
|
2204
|
+
return 9;
|
|
2251
2205
|
}
|
|
2252
2206
|
function buildMMRTree(terminating, makeup, common) {
|
|
2253
2207
|
const root = { children: [null, null] };
|
|
@@ -3302,7 +3256,7 @@ function decodeMMRLine(reader, referenceLine, columns) {
|
|
|
3302
3256
|
if (reader.eof) break;
|
|
3303
3257
|
const mode = readMMRMode(reader);
|
|
3304
3258
|
switch (mode) {
|
|
3305
|
-
case
|
|
3259
|
+
case 0: {
|
|
3306
3260
|
const b2 = mmrFindB2(referenceLine, mmrFindB1(referenceLine, a0IsBeforeLine ? -1 : a0, currentColor, columns), columns);
|
|
3307
3261
|
const fillEnd = Math.min(b2, columns);
|
|
3308
3262
|
for (let i = a0IsBeforeLine ? 0 : a0; i < fillEnd; i++) line[i] = currentColor;
|
|
@@ -3310,7 +3264,7 @@ function decodeMMRLine(reader, referenceLine, columns) {
|
|
|
3310
3264
|
a0IsBeforeLine = false;
|
|
3311
3265
|
break;
|
|
3312
3266
|
}
|
|
3313
|
-
case
|
|
3267
|
+
case 1: {
|
|
3314
3268
|
const tree1 = currentColor === 0 ? mmrWhiteTree : mmrBlackTree;
|
|
3315
3269
|
const tree2 = currentColor === 0 ? mmrBlackTree : mmrWhiteTree;
|
|
3316
3270
|
const run1 = readMMRRunLength(reader, tree1);
|
|
@@ -3327,21 +3281,21 @@ function decodeMMRLine(reader, referenceLine, columns) {
|
|
|
3327
3281
|
a0IsBeforeLine = false;
|
|
3328
3282
|
break;
|
|
3329
3283
|
}
|
|
3330
|
-
case
|
|
3331
|
-
case
|
|
3332
|
-
case
|
|
3333
|
-
case
|
|
3334
|
-
case
|
|
3335
|
-
case
|
|
3336
|
-
case
|
|
3284
|
+
case 2:
|
|
3285
|
+
case 3:
|
|
3286
|
+
case 4:
|
|
3287
|
+
case 5:
|
|
3288
|
+
case 6:
|
|
3289
|
+
case 7:
|
|
3290
|
+
case 8: {
|
|
3337
3291
|
const off = {
|
|
3338
|
-
[
|
|
3339
|
-
[
|
|
3340
|
-
[
|
|
3341
|
-
[
|
|
3342
|
-
[
|
|
3343
|
-
[
|
|
3344
|
-
[
|
|
3292
|
+
[2]: 0,
|
|
3293
|
+
[3]: 1,
|
|
3294
|
+
[4]: -1,
|
|
3295
|
+
[5]: 2,
|
|
3296
|
+
[6]: -2,
|
|
3297
|
+
[7]: 3,
|
|
3298
|
+
[8]: -3
|
|
3345
3299
|
}[mode];
|
|
3346
3300
|
const b1 = mmrFindB1(referenceLine, a0IsBeforeLine ? -1 : a0, currentColor, columns);
|
|
3347
3301
|
const a1 = Math.max(0, Math.min(b1 + off, columns));
|
|
@@ -3352,7 +3306,6 @@ function decodeMMRLine(reader, referenceLine, columns) {
|
|
|
3352
3306
|
currentColor = currentColor === 0 ? 1 : 0;
|
|
3353
3307
|
break;
|
|
3354
3308
|
}
|
|
3355
|
-
case MMRMode.EOFB:
|
|
3356
3309
|
default:
|
|
3357
3310
|
for (let i = a0IsBeforeLine ? 0 : a0; i < columns; i++) line[i] = currentColor;
|
|
3358
3311
|
return line;
|
|
@@ -3372,8 +3325,7 @@ function decodeArithmeticGenericRegion(data, width, height, templateId, _typical
|
|
|
3372
3325
|
const rowBytes = Math.ceil(width / 8);
|
|
3373
3326
|
const output = new Uint8Array(rowBytes * height);
|
|
3374
3327
|
const decoder = new ArithmeticDecoder(data);
|
|
3375
|
-
const
|
|
3376
|
-
const stats = new Uint8Array(1 << contextSize);
|
|
3328
|
+
const stats = new Uint8Array(1 << (templateId === 0 ? 16 : templateId === 1 ? 13 : templateId === 2 ? 10 : 10));
|
|
3377
3329
|
for (let row = 0; row < height; row++) for (let col = 0; col < width; col++) {
|
|
3378
3330
|
const cx = buildGenericContext(output, rowBytes, width, row, col, templateId);
|
|
3379
3331
|
if (decoder.decodeBit(stats, cx)) {
|
|
@@ -3829,6 +3781,41 @@ var ArithmeticDecoder = class {
|
|
|
3829
3781
|
}
|
|
3830
3782
|
};
|
|
3831
3783
|
/**
|
|
3784
|
+
* Magnitude classes for the JBIG2 integer-arithmetic decoding procedure
|
|
3785
|
+
* (ITU-T T.88 §A.3). A unary prefix of bits selects a class; the class fixes
|
|
3786
|
+
* the number of magnitude bits to read (`width`) and the value `offset` added
|
|
3787
|
+
* to them. The classes must tile `[0, ∞)` contiguously — each `offset` equals
|
|
3788
|
+
* the previous `offset + 2 ** previous width` — or the codec desyncs.
|
|
3789
|
+
*
|
|
3790
|
+
* @internal
|
|
3791
|
+
*/
|
|
3792
|
+
const JBIG2_INTEGER_MAGNITUDE_CLASSES = [
|
|
3793
|
+
{
|
|
3794
|
+
width: 2,
|
|
3795
|
+
offset: 0
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
width: 4,
|
|
3799
|
+
offset: 4
|
|
3800
|
+
},
|
|
3801
|
+
{
|
|
3802
|
+
width: 6,
|
|
3803
|
+
offset: 20
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
width: 8,
|
|
3807
|
+
offset: 84
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
width: 12,
|
|
3811
|
+
offset: 340
|
|
3812
|
+
},
|
|
3813
|
+
{
|
|
3814
|
+
width: 32,
|
|
3815
|
+
offset: 4436
|
|
3816
|
+
}
|
|
3817
|
+
];
|
|
3818
|
+
/**
|
|
3832
3819
|
* Decodes signed integers using the JBIG2 arithmetic integer procedure.
|
|
3833
3820
|
*
|
|
3834
3821
|
* The procedure uses a 9-bit context model (512 entries) with a
|
|
@@ -3840,7 +3827,7 @@ var ArithmeticDecoder = class {
|
|
|
3840
3827
|
* @internal
|
|
3841
3828
|
*/
|
|
3842
3829
|
var IntegerDecoder = class {
|
|
3843
|
-
stats = new Uint8Array(512);
|
|
3830
|
+
stats = /* @__PURE__ */ new Uint8Array(512);
|
|
3844
3831
|
decode(decoder) {
|
|
3845
3832
|
let prev = 1;
|
|
3846
3833
|
const readBits = (n) => {
|
|
@@ -3853,13 +3840,16 @@ var IntegerDecoder = class {
|
|
|
3853
3840
|
return v;
|
|
3854
3841
|
};
|
|
3855
3842
|
const sign = readBits(1);
|
|
3856
|
-
let
|
|
3857
|
-
if (readBits(1) === 0)
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3843
|
+
let selected = JBIG2_INTEGER_MAGNITUDE_CLASSES.at(-1);
|
|
3844
|
+
for (let i = 0; i < JBIG2_INTEGER_MAGNITUDE_CLASSES.length - 1; i++) if (readBits(1) === 0) {
|
|
3845
|
+
selected = JBIG2_INTEGER_MAGNITUDE_CLASSES[i];
|
|
3846
|
+
break;
|
|
3847
|
+
}
|
|
3848
|
+
const { width, offset } = selected ?? {
|
|
3849
|
+
width: 32,
|
|
3850
|
+
offset: 4436
|
|
3851
|
+
};
|
|
3852
|
+
const value = readBits(width) + offset;
|
|
3863
3853
|
if (sign) return value > 0 ? -value : null;
|
|
3864
3854
|
return value;
|
|
3865
3855
|
}
|
|
@@ -3901,8 +3891,7 @@ var IAIDDecoder = class {
|
|
|
3901
3891
|
function decodeGenericBitmap(decoder, width, height, templateId) {
|
|
3902
3892
|
const rowBytes = Math.ceil(width / 8);
|
|
3903
3893
|
const output = new Uint8Array(rowBytes * height);
|
|
3904
|
-
const
|
|
3905
|
-
const stats = new Uint8Array(1 << contextSize);
|
|
3894
|
+
const stats = new Uint8Array(1 << (templateId === 0 ? 16 : templateId === 1 ? 13 : 10));
|
|
3906
3895
|
for (let row = 0; row < height; row++) for (let col = 0; col < width; col++) {
|
|
3907
3896
|
const cx = buildGenericContext(output, rowBytes, width, row, col, templateId);
|
|
3908
3897
|
if (decoder.decodeBit(stats, cx)) {
|
|
@@ -3974,8 +3963,7 @@ function decodeRefinementBitmap(data, width, height, templateId, refBitmap, refW
|
|
|
3974
3963
|
const refRowBytes = Math.ceil(refWidth / 8);
|
|
3975
3964
|
const output = new Uint8Array(rowBytes * height);
|
|
3976
3965
|
const decoder = new ArithmeticDecoder(data);
|
|
3977
|
-
const
|
|
3978
|
-
const stats = new Uint8Array(1 << contextSize);
|
|
3966
|
+
const stats = new Uint8Array(1 << (templateId === 0 ? 13 : 10));
|
|
3979
3967
|
function getPixel(bitmap, rBytes, r, c, w, h) {
|
|
3980
3968
|
if (r < 0 || c < 0 || r >= h || c >= w) return 0;
|
|
3981
3969
|
return bitmap[r * rBytes + (c >>> 3)] >>> 7 - (c & 7) & 1;
|
|
@@ -4033,7 +4021,6 @@ function signExtend(value, bits) {
|
|
|
4033
4021
|
const sign = 1 << bits - 1;
|
|
4034
4022
|
return (value ^ sign) - sign;
|
|
4035
4023
|
}
|
|
4036
|
-
|
|
4037
4024
|
//#endregion
|
|
4038
4025
|
//#region src/parser/jpeg2000Decode.ts
|
|
4039
4026
|
/**
|
|
@@ -4094,6 +4081,7 @@ const JP2_SIGNATURE = new Uint8Array([
|
|
|
4094
4081
|
135,
|
|
4095
4082
|
10
|
|
4096
4083
|
]);
|
|
4084
|
+
/** JP2 box type constants. */
|
|
4097
4085
|
const BOX_JP2H = 1785737832;
|
|
4098
4086
|
const BOX_COLR = 1668246642;
|
|
4099
4087
|
const BOX_CDEF = 1667523942;
|
|
@@ -4122,7 +4110,7 @@ function readUint16BE(data, offset) {
|
|
|
4122
4110
|
* Parse JP2 file format boxes to extract the codestream and metadata.
|
|
4123
4111
|
*/
|
|
4124
4112
|
function parseJP2Boxes(data) {
|
|
4125
|
-
const result = { codestream: new Uint8Array(0) };
|
|
4113
|
+
const result = { codestream: /* @__PURE__ */ new Uint8Array(0) };
|
|
4126
4114
|
let offset = 0;
|
|
4127
4115
|
while (offset + 8 <= data.length) {
|
|
4128
4116
|
let boxLength = readUint32BE(data, offset);
|
|
@@ -4567,7 +4555,7 @@ function decodeTiles(cs, reduceResolution, numComponents) {
|
|
|
4567
4555
|
*/
|
|
4568
4556
|
function decodeTileComponent(tileData, tileWidth, tileHeight, componentIndex, numComponents, cod, qcd, bpc, reduceResolution) {
|
|
4569
4557
|
const numResLevels = cod.numResolutions - reduceResolution;
|
|
4570
|
-
if (numResLevels <= 0) return new Float64Array(1);
|
|
4558
|
+
if (numResLevels <= 0) return /* @__PURE__ */ new Float64Array(1);
|
|
4571
4559
|
const divisor = 1 << reduceResolution;
|
|
4572
4560
|
const reducedW = Math.ceil(tileWidth / divisor);
|
|
4573
4561
|
const reducedH = Math.ceil(tileHeight / divisor);
|
|
@@ -4584,12 +4572,6 @@ function buildSubbands(width, height, numDecompLevels, cod) {
|
|
|
4584
4572
|
let w = width;
|
|
4585
4573
|
let h = height;
|
|
4586
4574
|
for (let level = numDecompLevels; level >= 1; level--) {
|
|
4587
|
-
Math.ceil(w / 2);
|
|
4588
|
-
Math.floor(h / 2) + h % 2;
|
|
4589
|
-
Math.floor(w / 2) + w % 2;
|
|
4590
|
-
Math.ceil(h / 2);
|
|
4591
|
-
Math.ceil(w / 2);
|
|
4592
|
-
Math.ceil(h / 2);
|
|
4593
4575
|
const llW = Math.floor(w / 2) + w % 2;
|
|
4594
4576
|
const llH = Math.floor(h / 2) + h % 2;
|
|
4595
4577
|
subbands.push(createSubband("HL", level, w - llW, llH, cod));
|
|
@@ -4706,7 +4688,7 @@ var BitstreamReader = class {
|
|
|
4706
4688
|
* zero bit-planes, and coded data lengths, then collect the coded data
|
|
4707
4689
|
* for Tier-1 decoding.
|
|
4708
4690
|
*/
|
|
4709
|
-
function decodePackets(reader, subbands,
|
|
4691
|
+
function decodePackets(reader, subbands, _cod, _numComponents, _componentIndex) {
|
|
4710
4692
|
if (subbands.reduce((sum, sb) => sum + sb.codeBlocks.length, 0) === 0 || !reader.hasMore) return;
|
|
4711
4693
|
for (const subband of subbands) {
|
|
4712
4694
|
if (subband.width === 0 || subband.height === 0) continue;
|
|
@@ -5127,7 +5109,6 @@ var MQDecoder = class MQDecoder {
|
|
|
5127
5109
|
this.renormalize();
|
|
5128
5110
|
} else d = cx.mps;
|
|
5129
5111
|
else {
|
|
5130
|
-
this.c >>> 16;
|
|
5131
5112
|
this.c -= this.a << 16;
|
|
5132
5113
|
if (this.a < qe) {
|
|
5133
5114
|
d = cx.mps;
|
|
@@ -5353,7 +5334,6 @@ function dequantize(subbands, qcd, bpc, reversible) {
|
|
|
5353
5334
|
const base = qcd.stepSizes[0];
|
|
5354
5335
|
if (sb.type === "LL") stepSize = base;
|
|
5355
5336
|
else {
|
|
5356
|
-
sb.resLevel * 3;
|
|
5357
5337
|
const idx = Math.min(subbandIndex, qcd.stepSizes.length - 1);
|
|
5358
5338
|
stepSize = qcd.stepSizes[idx] ?? base;
|
|
5359
5339
|
}
|
|
@@ -5631,7 +5611,6 @@ function interleaveComponents(components, output, width, height, numComponents,
|
|
|
5631
5611
|
}
|
|
5632
5612
|
}
|
|
5633
5613
|
}
|
|
5634
|
-
|
|
5635
5614
|
//#endregion
|
|
5636
5615
|
//#region src/parser/streamDecode.ts
|
|
5637
5616
|
/**
|
|
@@ -5687,9 +5666,9 @@ function getStreamFilters(dict) {
|
|
|
5687
5666
|
if (filterObj instanceof require_pdfObjects.PdfName) filters = [filterObj.value.replace(/^\//, "")];
|
|
5688
5667
|
else if (filterObj instanceof require_pdfObjects.PdfArray) filters = filterObj.items.map((item) => {
|
|
5689
5668
|
if (item instanceof require_pdfObjects.PdfName) return item.value.replace(/^\//, "");
|
|
5690
|
-
return
|
|
5669
|
+
return "";
|
|
5691
5670
|
});
|
|
5692
|
-
else filters = [
|
|
5671
|
+
else filters = [""];
|
|
5693
5672
|
const decodeParms = normalizeDecodeParms(dict.get("/DecodeParms"), filters.length);
|
|
5694
5673
|
return {
|
|
5695
5674
|
filters,
|
|
@@ -5978,7 +5957,7 @@ function hexValue(ch) {
|
|
|
5978
5957
|
function decodeASCII85(data) {
|
|
5979
5958
|
let out = new Uint8Array(Math.max(data.length * 4 / 5 | 0, 256));
|
|
5980
5959
|
let outPos = 0;
|
|
5981
|
-
const group = new Uint8Array(5);
|
|
5960
|
+
const group = /* @__PURE__ */ new Uint8Array(5);
|
|
5982
5961
|
let groupLen = 0;
|
|
5983
5962
|
let i = 0;
|
|
5984
5963
|
function ensureOut(needed) {
|
|
@@ -6075,9 +6054,9 @@ function lzwDecompress(data, earlyChange) {
|
|
|
6075
6054
|
}
|
|
6076
6055
|
return result;
|
|
6077
6056
|
}
|
|
6078
|
-
let tableBuf = new Uint8Array(65536);
|
|
6079
|
-
const tableOff = new Int32Array(4096);
|
|
6080
|
-
const tableLen = new Int32Array(4096);
|
|
6057
|
+
let tableBuf = /* @__PURE__ */ new Uint8Array(65536);
|
|
6058
|
+
const tableOff = /* @__PURE__ */ new Int32Array(4096);
|
|
6059
|
+
const tableLen = /* @__PURE__ */ new Int32Array(4096);
|
|
6081
6060
|
let tableBufUsed = 256;
|
|
6082
6061
|
let codeSize = 9;
|
|
6083
6062
|
let nextCode = 258;
|
|
@@ -6131,7 +6110,7 @@ function lzwDecompress(data, earlyChange) {
|
|
|
6131
6110
|
resetTable();
|
|
6132
6111
|
code = readBits(codeSize);
|
|
6133
6112
|
}
|
|
6134
|
-
if (code === EOD) return new Uint8Array(0);
|
|
6113
|
+
if (code === EOD) return /* @__PURE__ */ new Uint8Array(0);
|
|
6135
6114
|
writeEntry(code);
|
|
6136
6115
|
let prevCode = code;
|
|
6137
6116
|
while (true) {
|
|
@@ -6196,21 +6175,21 @@ function decodeRunLength(data) {
|
|
|
6196
6175
|
* `/DecodeParms` dictionary may specify a color space override, but
|
|
6197
6176
|
* the decoded data is always raw interleaved component bytes.
|
|
6198
6177
|
*/
|
|
6199
|
-
function decodeJPX(data,
|
|
6178
|
+
function decodeJPX(data, _parms) {
|
|
6200
6179
|
return decodeJpeg2000(data).data;
|
|
6201
6180
|
}
|
|
6202
|
-
|
|
6203
6181
|
//#endregion
|
|
6204
|
-
Object.defineProperty(exports,
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6182
|
+
Object.defineProperty(exports, "decodeStream", {
|
|
6183
|
+
enumerable: true,
|
|
6184
|
+
get: function() {
|
|
6185
|
+
return decodeStream;
|
|
6186
|
+
}
|
|
6209
6187
|
});
|
|
6210
|
-
Object.defineProperty(exports,
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6188
|
+
Object.defineProperty(exports, "getStreamFilters", {
|
|
6189
|
+
enumerable: true,
|
|
6190
|
+
get: function() {
|
|
6191
|
+
return getStreamFilters;
|
|
6192
|
+
}
|
|
6215
6193
|
});
|
|
6216
|
-
|
|
6194
|
+
|
|
6195
|
+
//# sourceMappingURL=streamDecode-DcaZz309.cjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-pdf-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "A modern, WASM-accelerated PDF creation engine for every JavaScript runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"README.md"
|
|
64
64
|
],
|
|
65
65
|
"engines": {
|
|
66
|
-
"node": ">=
|
|
66
|
+
"node": ">=26.4"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
69
|
"scripts": {
|
|
@@ -78,39 +78,42 @@
|
|
|
78
78
|
"test:integration": "vitest run tests/integration",
|
|
79
79
|
"test:e2e": "playwright test",
|
|
80
80
|
"test:bench": "vitest bench",
|
|
81
|
-
"
|
|
81
|
+
"bench": "tsx tests/benchmarks/run.ts",
|
|
82
|
+
"lint": "oxlint --type-aware src tests",
|
|
83
|
+
"lint:fix": "oxlint --type-aware --fix src tests",
|
|
84
|
+
"format": "prettier --write \"{src,tests,scripts}/**/*.ts\"",
|
|
85
|
+
"format:check": "prettier --check \"{src,tests,scripts}/**/*.ts\"",
|
|
82
86
|
"typecheck": "tsc --noEmit",
|
|
83
87
|
"prepublishOnly": "npm run typecheck && npm test && npm run build",
|
|
84
88
|
"docs:dev": "vitepress dev docs",
|
|
85
89
|
"docs:build": "vitepress build docs",
|
|
86
|
-
"docs:api": "typedoc",
|
|
90
|
+
"docs:api": "node tools/docs/node_modules/typedoc/bin/typedoc",
|
|
87
91
|
"validate-pdf": "tsx scripts/validate-pdf.ts",
|
|
88
92
|
"generate:wasm-inline": "tsx scripts/generate-inline-wasm.ts",
|
|
89
93
|
"clean": "rm -rf dist coverage"
|
|
90
94
|
},
|
|
91
95
|
"dependencies": {
|
|
92
|
-
"fflate": "0.8.
|
|
96
|
+
"fflate": "0.8.3"
|
|
93
97
|
},
|
|
94
98
|
"devDependencies": {
|
|
95
|
-
"@
|
|
96
|
-
"
|
|
97
|
-
"esbuild": "0.27.3",
|
|
98
|
-
"eslint": "10.0.2",
|
|
99
|
+
"@playwright/test": "1.62.0-alpha-2026-06-25",
|
|
100
|
+
"esbuild": "0.28.1",
|
|
99
101
|
"fast-png": "8.0.0",
|
|
100
|
-
"miniflare": "4.
|
|
102
|
+
"miniflare": "4.20260623.0",
|
|
103
|
+
"oxlint": "^1.71.0",
|
|
104
|
+
"oxlint-tsgolint": "^0.23.0",
|
|
101
105
|
"pdf-lib": "^1.17.1",
|
|
102
|
-
"prettier": "
|
|
103
|
-
"rollup": "4.
|
|
104
|
-
"tsdown": "0.
|
|
105
|
-
"tsx": "4.
|
|
106
|
-
"typedoc": "0.28.
|
|
107
|
-
"typedoc-plugin-markdown": "4.
|
|
108
|
-
"typescript": "
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"wasm-pack": "0.14.0"
|
|
106
|
+
"prettier": "4.0.0-alpha.13",
|
|
107
|
+
"rollup": "4.62.2",
|
|
108
|
+
"tsdown": "0.22.3",
|
|
109
|
+
"tsx": "4.22.4",
|
|
110
|
+
"typedoc": "0.28.19",
|
|
111
|
+
"typedoc-plugin-markdown": "4.12.0",
|
|
112
|
+
"typescript": "7.0.1-rc",
|
|
113
|
+
"vite": "8.1.0",
|
|
114
|
+
"vitepress": "2.0.0-alpha.17",
|
|
115
|
+
"vitest": "5.0.0-beta.5",
|
|
116
|
+
"wasm-pack": "0.15.0"
|
|
114
117
|
},
|
|
115
118
|
"keywords": [
|
|
116
119
|
"pdf",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressionAnalysis-Ch7t-HXn.d.mts","names":[],"sources":["../src/parser/contentStreamParser.ts","../src/parser/textExtractor.ts","../src/parser/streamDecode.ts","../src/parser/parseError.ts","../src/assets/image/imageExtract.ts","../src/assets/image/compressionAnalysis.ts"],"mappings":";;;;;AAmEA;;;;;;;;;KAlCY,OAAA,sCAA6C,OAAA,GAAU,OAAA;;;ACHnE;UDQiB,qBAAA;;EAEf,QAAA;ECRA;EDUA,QAAA,EAAU,OAAA;AAAA;ACiCZ;;;;;;AAAA,iBDRgB,kBAAA,CAAmB,IAAA,EAAM,UAAA,GAAa,qBAAA;;;;;;UCrCrC,QAAA;EDqC0D;ECnCzE,IAAA;;EAEA,CAAA;;EAEA,CAAA;EANuB;EAQvB,KAAA;EARuB;EAUvB,MAAA;EANA;EAQA,QAAA;EAJA;EAMA,QAAA;AAAA;;;;UAMe,qBAAA;EAAqB;;;;EAKpC,aAAA;AAAA;;;;;;;;;;;;;;iBAoBc,WAAA,CACd,SAAA,EAAW,qBAAA,IACX,SAAA,GAAY,OAAA,EACZ,OAAA,GAAU,qBAAA;AA6LZ;;;;;;;;;;AAAA,iBAAgB,wBAAA,CACd,SAAA,EAAW,qBAAA,IACX,SAAA,GAAY,OAAA,GACX,QAAA;;;;;;;;;AD3MH;;;;;;;iBE/BgB,YAAA,CACd,IAAA,EAAM,UAAA,EACN,OAAA,qBACA,WAAA,GAAc,OAAA,GAAU,OAAA,YACvB,UAAA;;;;;;;AFPH;cG3Ba,aAAA,SAAsB,KAAA;EAAA,SACf,IAAA;EAAA,SACT,MAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EAAA,SACA,UAAA;cAEG,OAAA;IACV,OAAA;IACA,MAAA;IACA,QAAA;IACA,MAAA;IACA,IAAA,GAAO,UAAA;IACP,KAAA,GAAQ,KAAA;EAAA;AAAA;AAAA,iBAiBI,gBAAA,CAAiB,IAAA,EAAM,UAAA,EAAY,MAAA,UAAgB,UAAA;;;;;;UCJlD,SAAA;EJUE;EAAA,SIRR,MAAA,EAAQ,SAAA;EJiCH;EAAA,SI/BL,GAAA,EAAK,MAAA;;WAEL,IAAA;EJ6B8B;EAAA,SI3B9B,SAAA;EJ2B2C;EAAA,SIzB3C,KAAA;EJyBgE;EAAA,SIvBhE,MAAA;;WAEA,gBAAA;EHhBM;EAAA,SGkBN,UAAA;;WAEA,QAAA;EHlBT;EAAA,SGoBS,OAAA;EHhBT;EAAA,SGkBS,cAAA;AAAA;;;;;AHJX;;;;;AAyBA;;;;;;;;;;;;iBG6FgB,aAAA,CAAc,GAAA,EAAK,WAAA,GAAc,SAAA;;;;AHmGjD;;;;;;;;iBGagB,iBAAA,CAAkB,SAAA,EAAW,SAAA,GAAY,UAAA;;;;;;UC/PxC,aAAA;ELiBE;EAAA,SKfR,IAAA;ELwCK;EAAA,SKtCL,SAAA;;WAEA,KAAA;ELoC8B;EAAA,SKlC9B,MAAA;ELkC2C;EAAA,SKhC3C,WAAA;ELgCgE;EAAA,SK9BhE,aAAA;;WAEA,UAAA;EJTM;EAAA,SIWN,iBAAA;;WAEA,gBAAA;EJXT;EAAA,SIaS,cAAA;EJTT;EAAA,SIWS,WAAA;EJPT;EAAA,SISS,YAAA;EJLT;EAAA,SIOS,cAAA;AAAA;AJDX;;;AAAA,UIOiB,cAAA;EJFF;EAAA,SIIJ,MAAA,WAAiB,aAAA;EJgBD;EAAA,SIdhB,gBAAA;EJeE;EAAA,SIbF,kBAAA;EJeC;EAAA,SIbD,YAAA;EJasB;EAAA,SIXtB,mBAAA;AAAA;;;;UAUM,oBAAA;EJCgB;;AA6LjC;;;EA7LiC,SIKtB,OAAA;EJ0LG;;;;;;EAAA,SInLH,MAAA;AAAA;;;;;;;AHtDX;;;;;;;;;;;;;;;;;;;iBGkKgB,aAAA,CACd,GAAA,EAAK,WAAA,EACL,OAAA,GAAU,oBAAA,GACT,cAAA"}
|