pptx-viewer-core 1.1.33 → 1.1.34

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/dist/index.mjs CHANGED
@@ -6979,15 +6979,15 @@ var PptxMediaDataParser = class {
6979
6979
 
6980
6980
  // src/core/utils/ole-utils.ts
6981
6981
  var PROG_ID_MAP = [
6982
- { pattern: /^Excel\./i, type: "excel", extension: "xlsx" },
6983
- { pattern: /^Word\./i, type: "word", extension: "docx" },
6984
- { pattern: /^PowerPoint\./i, type: "excel", extension: "pptx" },
6985
- { pattern: /^Visio\./i, type: "visio", extension: "vsdx" },
6986
- { pattern: /^Equation\./i, type: "mathtype", extension: "wmf" },
6987
- { pattern: /^MathType/i, type: "mathtype", extension: "wmf" },
6988
- { pattern: /^AcroExch\./i, type: "pdf", extension: "pdf" },
6989
- { pattern: /^Acrobat\./i, type: "pdf", extension: "pdf" },
6990
- { pattern: /^Package$/i, type: "package", extension: "bin" }
6982
+ { pattern: /^Excel\./iu, type: "excel", extension: "xlsx" },
6983
+ { pattern: /^Word\./iu, type: "word", extension: "docx" },
6984
+ { pattern: /^PowerPoint\./iu, type: "excel", extension: "pptx" },
6985
+ { pattern: /^Visio\./iu, type: "visio", extension: "vsdx" },
6986
+ { pattern: /^Equation\./iu, type: "mathtype", extension: "wmf" },
6987
+ { pattern: /^MathType/iu, type: "mathtype", extension: "wmf" },
6988
+ { pattern: /^AcroExch\./iu, type: "pdf", extension: "pdf" },
6989
+ { pattern: /^Acrobat\./iu, type: "pdf", extension: "pdf" },
6990
+ { pattern: /^Package$/iu, type: "package", extension: "bin" }
6991
6991
  ];
6992
6992
  var CLSID_MAP = /* @__PURE__ */ new Map([
6993
6993
  // Excel Workbook
@@ -7014,7 +7014,7 @@ function detectOleObjectType(progId, clsId) {
7014
7014
  }
7015
7015
  }
7016
7016
  if (clsId) {
7017
- const normalised = clsId.replace(/[{}]/g, "").toUpperCase().trim();
7017
+ const normalised = clsId.replace(/[{}]/gu, "").toUpperCase().trim();
7018
7018
  const match = CLSID_MAP.get(normalised);
7019
7019
  if (match) {
7020
7020
  return { oleObjectType: match.type, oleFileExtension: match.extension };
@@ -7036,6 +7036,38 @@ function inferOleExtensionFromTarget(oleTarget) {
7036
7036
  }
7037
7037
  return void 0;
7038
7038
  }
7039
+ var OLE_EXTENSION_MIME_MAP = /* @__PURE__ */ new Map([
7040
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7041
+ ["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
7042
+ ["xls", "application/vnd.ms-excel"],
7043
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7044
+ ["docm", "application/vnd.ms-word.document.macroEnabled.12"],
7045
+ ["doc", "application/msword"],
7046
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7047
+ ["ppt", "application/vnd.ms-powerpoint"],
7048
+ ["vsdx", "application/vnd.ms-visio.drawing"],
7049
+ ["vsd", "application/vnd.visio"],
7050
+ ["pdf", "application/pdf"],
7051
+ ["rtf", "application/rtf"],
7052
+ ["txt", "text/plain"],
7053
+ ["csv", "text/csv"],
7054
+ ["png", "image/png"],
7055
+ ["jpg", "image/jpeg"],
7056
+ ["jpeg", "image/jpeg"],
7057
+ ["gif", "image/gif"],
7058
+ ["wmf", "image/wmf"],
7059
+ ["emf", "image/emf"],
7060
+ ["zip", "application/zip"]
7061
+ ]);
7062
+ function mimeTypeForOleFile(fileNameOrExtension) {
7063
+ const fallback = "application/octet-stream";
7064
+ if (!fileNameOrExtension) {
7065
+ return fallback;
7066
+ }
7067
+ const lastDot = fileNameOrExtension.lastIndexOf(".");
7068
+ const ext = (lastDot === -1 ? fileNameOrExtension : fileNameOrExtension.slice(lastDot + 1)).toLowerCase().trim();
7069
+ return OLE_EXTENSION_MIME_MAP.get(ext) ?? fallback;
7070
+ }
7039
7071
  function getOleObjectTypeLabel(oleObjectType) {
7040
7072
  switch (oleObjectType) {
7041
7073
  case "excel":
@@ -8762,6 +8794,7 @@ var PptxSlideLoaderService = class {
8762
8794
  if (mediaTimingMap.size > 0) {
8763
8795
  await params.enrichMediaElementsWithTiming(slideElements, mediaTimingMap);
8764
8796
  }
8797
+ await params.enrichOleElementsWithEmbeddedData(slideElements, path);
8765
8798
  const elements = [...layoutElements, ...slideElements];
8766
8799
  const backgroundColor = params.extractBackgroundColor(slideXmlObj) || await params.getLayoutBackgroundColor(path);
8767
8800
  const backgroundGradient = params.extractBackgroundGradient(slideXmlObj) || await params.getLayoutBackgroundGradient(path);
@@ -12343,6 +12376,321 @@ function resolveLayoutDisplayName(input) {
12343
12376
  return fallbackFromPath(input.path);
12344
12377
  }
12345
12378
 
12379
+ // src/core/utils/ole2-parser-types.ts
12380
+ var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
12381
+ var ENDOFCHAIN = 4294967294;
12382
+ var FREESECT = 4294967295;
12383
+ var FATSECT = 4294967293;
12384
+ var MAXREGSECT = 4294967290;
12385
+ var ENTRY_TYPE_EMPTY = 0;
12386
+ var ENTRY_TYPE_STREAM = 2;
12387
+ var ENTRY_TYPE_ROOT = 5;
12388
+ var DIR_ENTRY_SIZE = 128;
12389
+ var Ole2ParseError = class extends Error {
12390
+ constructor(message) {
12391
+ super(message);
12392
+ this.name = "Ole2ParseError";
12393
+ }
12394
+ };
12395
+
12396
+ // src/core/utils/ole2-parser-read.ts
12397
+ function parseOle2(buffer) {
12398
+ const data = new Uint8Array(buffer);
12399
+ const view = new DataView(buffer);
12400
+ for (let i = 0; i < OLE_MAGIC.length; i++) {
12401
+ if (data[i] !== OLE_MAGIC[i]) {
12402
+ throw new Ole2ParseError("Not a valid OLE2 compound file");
12403
+ }
12404
+ }
12405
+ view.getUint16(24, true);
12406
+ const majorVersion = view.getUint16(26, true);
12407
+ const byteOrder = view.getUint16(28, true);
12408
+ if (byteOrder !== 65534) {
12409
+ throw new Ole2ParseError("Invalid byte order mark");
12410
+ }
12411
+ const sectorSizePower = view.getUint16(30, true);
12412
+ const miniSectorSizePower = view.getUint16(32, true);
12413
+ const sectorSize = 1 << sectorSizePower;
12414
+ const miniSectorSize = 1 << miniSectorSizePower;
12415
+ const totalFATSectors = view.getUint32(44, true);
12416
+ const firstDirectorySector = view.getUint32(48, true);
12417
+ const miniStreamCutoff = view.getUint32(56, true);
12418
+ const firstMiniFATSector = view.getUint32(60, true);
12419
+ const totalMiniFATSectors = view.getUint32(64, true);
12420
+ const firstDIFATSector = view.getUint32(68, true);
12421
+ const totalDIFATSectors = view.getUint32(72, true);
12422
+ function sectorOffset(sector) {
12423
+ return (sector + 1) * sectorSize;
12424
+ }
12425
+ function readSector(sector) {
12426
+ const offset = sectorOffset(sector);
12427
+ if (offset + sectorSize > data.length) {
12428
+ throw new Ole2ParseError(
12429
+ `Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
12430
+ );
12431
+ }
12432
+ return data.subarray(offset, offset + sectorSize);
12433
+ }
12434
+ const fatSectors = [];
12435
+ for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
12436
+ const sector = view.getUint32(76 + i * 4, true);
12437
+ if (sector <= MAXREGSECT) {
12438
+ fatSectors.push(sector);
12439
+ }
12440
+ }
12441
+ let difatSector = firstDIFATSector;
12442
+ for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
12443
+ const difatData = readSector(difatSector);
12444
+ const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
12445
+ const entriesPerSector = (sectorSize - 4) / 4;
12446
+ for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
12447
+ const sector = difatView.getUint32(i * 4, true);
12448
+ if (sector <= MAXREGSECT) {
12449
+ fatSectors.push(sector);
12450
+ }
12451
+ }
12452
+ difatSector = difatView.getUint32(sectorSize - 4, true);
12453
+ }
12454
+ const fatEntries = [];
12455
+ for (const fatSector of fatSectors) {
12456
+ const fatData = readSector(fatSector);
12457
+ const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
12458
+ for (let i = 0; i < sectorSize / 4; i++) {
12459
+ fatEntries.push(fatView.getUint32(i * 4, true));
12460
+ }
12461
+ }
12462
+ function readSectorChain(startSector) {
12463
+ const sectors = [];
12464
+ let current = startSector;
12465
+ const visited = /* @__PURE__ */ new Set();
12466
+ while (current <= MAXREGSECT) {
12467
+ if (visited.has(current)) {
12468
+ throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
12469
+ }
12470
+ visited.add(current);
12471
+ sectors.push(readSector(current));
12472
+ current = fatEntries[current] ?? ENDOFCHAIN;
12473
+ }
12474
+ const totalLength = sectors.length * sectorSize;
12475
+ const result = new Uint8Array(totalLength);
12476
+ let offset = 0;
12477
+ for (const sector of sectors) {
12478
+ result.set(sector, offset);
12479
+ offset += sectorSize;
12480
+ }
12481
+ return result;
12482
+ }
12483
+ function readStream(startSector, size) {
12484
+ const raw = readSectorChain(startSector);
12485
+ return raw.subarray(0, Math.min(size, raw.length));
12486
+ }
12487
+ const miniFatEntries = [];
12488
+ if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
12489
+ const miniFatRaw = readSectorChain(firstMiniFATSector);
12490
+ const miniFatView = new DataView(
12491
+ miniFatRaw.buffer,
12492
+ miniFatRaw.byteOffset,
12493
+ miniFatRaw.byteLength
12494
+ );
12495
+ for (let i = 0; i < miniFatRaw.length / 4; i++) {
12496
+ miniFatEntries.push(miniFatView.getUint32(i * 4, true));
12497
+ }
12498
+ }
12499
+ const dirRaw = readSectorChain(firstDirectorySector);
12500
+ const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
12501
+ const entries = [];
12502
+ for (let i = 0; i < numEntries; i++) {
12503
+ const entryOffset = i * DIR_ENTRY_SIZE;
12504
+ const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
12505
+ const nameLen = entryView.getUint16(64, true);
12506
+ const objectType = entryView.getUint8(66);
12507
+ if (objectType === ENTRY_TYPE_EMPTY) {
12508
+ continue;
12509
+ }
12510
+ const nameBytes = Math.max(0, nameLen - 2);
12511
+ let name = "";
12512
+ for (let j = 0; j < nameBytes; j += 2) {
12513
+ name += String.fromCharCode(entryView.getUint16(j, true));
12514
+ }
12515
+ const leftSiblingId = entryView.getUint32(68, true);
12516
+ const rightSiblingId = entryView.getUint32(72, true);
12517
+ const childId = entryView.getUint32(76, true);
12518
+ const startSector = entryView.getUint32(116, true);
12519
+ const sizeLow = entryView.getUint32(120, true);
12520
+ let size = sizeLow;
12521
+ if (majorVersion === 4) {
12522
+ entryView.getUint32(124, true);
12523
+ size = sizeLow;
12524
+ }
12525
+ entries.push({
12526
+ name,
12527
+ type: objectType,
12528
+ startSector,
12529
+ size,
12530
+ childId: childId === 4294967295 ? -1 : childId,
12531
+ leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
12532
+ rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
12533
+ });
12534
+ }
12535
+ const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
12536
+ let miniStreamData;
12537
+ if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
12538
+ miniStreamData = readSectorChain(rootEntry.startSector);
12539
+ }
12540
+ function readMiniStream(startSector, size) {
12541
+ if (!miniStreamData) {
12542
+ throw new Ole2ParseError("Mini stream container not found");
12543
+ }
12544
+ const sectors = [];
12545
+ let current = startSector;
12546
+ const visited = /* @__PURE__ */ new Set();
12547
+ while (current <= MAXREGSECT) {
12548
+ if (visited.has(current)) {
12549
+ throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
12550
+ }
12551
+ visited.add(current);
12552
+ const offset2 = current * miniSectorSize;
12553
+ sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
12554
+ current = miniFatEntries[current] ?? ENDOFCHAIN;
12555
+ }
12556
+ const totalLength = sectors.length * miniSectorSize;
12557
+ const result = new Uint8Array(totalLength);
12558
+ let offset = 0;
12559
+ for (const sector of sectors) {
12560
+ result.set(sector, offset);
12561
+ offset += miniSectorSize;
12562
+ }
12563
+ return result.subarray(0, Math.min(size, result.length));
12564
+ }
12565
+ function getStream(name) {
12566
+ const entry = entries.find(
12567
+ (e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
12568
+ );
12569
+ if (!entry) {
12570
+ return void 0;
12571
+ }
12572
+ if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
12573
+ return readMiniStream(entry.startSector, entry.size);
12574
+ }
12575
+ return readStream(entry.startSector, entry.size);
12576
+ }
12577
+ return { entries, getStream };
12578
+ }
12579
+
12580
+ // src/core/utils/ole-embedded-extract.ts
12581
+ function oleBytesToDataUrl(bytes, mimeType) {
12582
+ let binary = "";
12583
+ const chunkSize = 32768;
12584
+ for (let i = 0; i < bytes.length; i += chunkSize) {
12585
+ const chunk = bytes.subarray(i, i + chunkSize);
12586
+ binary += String.fromCharCode.apply(null, Array.from(chunk));
12587
+ }
12588
+ return `data:${mimeType};base64,${btoa(binary)}`;
12589
+ }
12590
+ var OLE10_NATIVE_STREAM_NAMES = [`${String.fromCharCode(1)}Ole10Native`, "Ole10Native"];
12591
+ var CONTENTS_STREAM = "CONTENTS";
12592
+ function isOle2CompoundFile(bytes) {
12593
+ if (bytes.length < OLE_MAGIC.length) {
12594
+ return false;
12595
+ }
12596
+ for (let i = 0; i < OLE_MAGIC.length; i++) {
12597
+ if (bytes[i] !== OLE_MAGIC[i]) {
12598
+ return false;
12599
+ }
12600
+ }
12601
+ return true;
12602
+ }
12603
+ function baseNameFromPath(raw) {
12604
+ const trimmed = raw.trim();
12605
+ if (trimmed.length === 0) {
12606
+ return void 0;
12607
+ }
12608
+ const lastSlash = Math.max(trimmed.lastIndexOf("\\"), trimmed.lastIndexOf("/"));
12609
+ const base = lastSlash === -1 ? trimmed : trimmed.slice(lastSlash + 1);
12610
+ return base.length > 0 ? base : void 0;
12611
+ }
12612
+ function readAsciiZ(bytes, offset) {
12613
+ let end = offset;
12614
+ while (end < bytes.length && bytes[end] !== 0) {
12615
+ end++;
12616
+ }
12617
+ let value = "";
12618
+ for (let i = offset; i < end; i++) {
12619
+ value += String.fromCharCode(bytes[i]);
12620
+ }
12621
+ return { value, next: end < bytes.length ? end + 1 : end };
12622
+ }
12623
+ function decodeOle10Native(stream) {
12624
+ if (stream.length < 6) {
12625
+ return void 0;
12626
+ }
12627
+ const view = new DataView(stream.buffer, stream.byteOffset, stream.byteLength);
12628
+ const declaredSize = view.getUint32(0, true);
12629
+ const bodyEnd = Math.min(stream.length, 4 + declaredSize);
12630
+ if (bodyEnd <= 4) {
12631
+ return void 0;
12632
+ }
12633
+ let cursor = 6;
12634
+ const label = readAsciiZ(stream, cursor);
12635
+ cursor = label.next;
12636
+ const sourcePath = readAsciiZ(stream, cursor);
12637
+ cursor = sourcePath.next;
12638
+ if (cursor + 8 > stream.length) {
12639
+ return void 0;
12640
+ }
12641
+ cursor += 4;
12642
+ const tempLen = view.getUint32(cursor, true);
12643
+ cursor += 4;
12644
+ if (tempLen > stream.length) {
12645
+ return void 0;
12646
+ }
12647
+ cursor += tempLen;
12648
+ if (cursor + 4 > stream.length) {
12649
+ return void 0;
12650
+ }
12651
+ const nativeSize = view.getUint32(cursor, true);
12652
+ cursor += 4;
12653
+ const dataEnd = Math.min(stream.length, cursor + nativeSize);
12654
+ if (dataEnd <= cursor) {
12655
+ return void 0;
12656
+ }
12657
+ const data = stream.subarray(cursor, dataEnd);
12658
+ const fileName = baseNameFromPath(sourcePath.value) ?? baseNameFromPath(label.value) ?? void 0;
12659
+ return { fileName, data };
12660
+ }
12661
+ function unwrapOleEmbedding(bytes) {
12662
+ if (bytes.length === 0) {
12663
+ return { data: bytes };
12664
+ }
12665
+ if (!isOle2CompoundFile(bytes)) {
12666
+ return { data: bytes };
12667
+ }
12668
+ try {
12669
+ const buffer = bytes.buffer.slice(
12670
+ bytes.byteOffset,
12671
+ bytes.byteOffset + bytes.byteLength
12672
+ );
12673
+ const ole = parseOle2(buffer);
12674
+ for (const name of OLE10_NATIVE_STREAM_NAMES) {
12675
+ const ole10 = ole.getStream(name);
12676
+ if (!ole10) {
12677
+ continue;
12678
+ }
12679
+ const decoded = decodeOle10Native(ole10);
12680
+ if (decoded && decoded.data.length > 0) {
12681
+ return decoded;
12682
+ }
12683
+ return { data: ole10 };
12684
+ }
12685
+ const contents = ole.getStream(CONTENTS_STREAM);
12686
+ if (contents && contents.length > 0) {
12687
+ return { data: contents };
12688
+ }
12689
+ } catch {
12690
+ }
12691
+ return { data: bytes };
12692
+ }
12693
+
12346
12694
  // src/core/utils/signature-constants.ts
12347
12695
  var DIGITAL_SIGNATURE_ORIGIN_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
12348
12696
  var DIGITAL_SIGNATURE_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature";
@@ -18309,14 +18657,14 @@ function resolveLayoutCategory(layoutType) {
18309
18657
  }
18310
18658
 
18311
18659
  // src/core/utils/encryption-detection.ts
18312
- var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18660
+ var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18313
18661
  var ZIP_MAGIC = new Uint8Array([80, 75]);
18314
18662
  function detectFileFormat(data) {
18315
18663
  if (data.byteLength < 8) {
18316
18664
  return { format: "unknown", encrypted: false };
18317
18665
  }
18318
18666
  const header = new Uint8Array(data, 0, 8);
18319
- if (OLE_MAGIC.every((byte, i) => header[i] === byte)) {
18667
+ if (OLE_MAGIC2.every((byte, i) => header[i] === byte)) {
18320
18668
  return { format: "ole", encrypted: true };
18321
18669
  }
18322
18670
  if (header[0] === ZIP_MAGIC[0] && header[1] === ZIP_MAGIC[1]) {
@@ -18332,207 +18680,6 @@ var EncryptedFileError = class extends Error {
18332
18680
  }
18333
18681
  };
18334
18682
 
18335
- // src/core/utils/ole2-parser-types.ts
18336
- var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18337
- var ENDOFCHAIN = 4294967294;
18338
- var FREESECT = 4294967295;
18339
- var FATSECT = 4294967293;
18340
- var MAXREGSECT = 4294967290;
18341
- var ENTRY_TYPE_EMPTY = 0;
18342
- var ENTRY_TYPE_STREAM = 2;
18343
- var ENTRY_TYPE_ROOT = 5;
18344
- var DIR_ENTRY_SIZE = 128;
18345
- var Ole2ParseError = class extends Error {
18346
- constructor(message) {
18347
- super(message);
18348
- this.name = "Ole2ParseError";
18349
- }
18350
- };
18351
-
18352
- // src/core/utils/ole2-parser-read.ts
18353
- function parseOle2(buffer) {
18354
- const data = new Uint8Array(buffer);
18355
- const view = new DataView(buffer);
18356
- for (let i = 0; i < OLE_MAGIC2.length; i++) {
18357
- if (data[i] !== OLE_MAGIC2[i]) {
18358
- throw new Ole2ParseError("Not a valid OLE2 compound file");
18359
- }
18360
- }
18361
- view.getUint16(24, true);
18362
- const majorVersion = view.getUint16(26, true);
18363
- const byteOrder = view.getUint16(28, true);
18364
- if (byteOrder !== 65534) {
18365
- throw new Ole2ParseError("Invalid byte order mark");
18366
- }
18367
- const sectorSizePower = view.getUint16(30, true);
18368
- const miniSectorSizePower = view.getUint16(32, true);
18369
- const sectorSize = 1 << sectorSizePower;
18370
- const miniSectorSize = 1 << miniSectorSizePower;
18371
- const totalFATSectors = view.getUint32(44, true);
18372
- const firstDirectorySector = view.getUint32(48, true);
18373
- const miniStreamCutoff = view.getUint32(56, true);
18374
- const firstMiniFATSector = view.getUint32(60, true);
18375
- const totalMiniFATSectors = view.getUint32(64, true);
18376
- const firstDIFATSector = view.getUint32(68, true);
18377
- const totalDIFATSectors = view.getUint32(72, true);
18378
- function sectorOffset(sector) {
18379
- return (sector + 1) * sectorSize;
18380
- }
18381
- function readSector(sector) {
18382
- const offset = sectorOffset(sector);
18383
- if (offset + sectorSize > data.length) {
18384
- throw new Ole2ParseError(
18385
- `Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
18386
- );
18387
- }
18388
- return data.subarray(offset, offset + sectorSize);
18389
- }
18390
- const fatSectors = [];
18391
- for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
18392
- const sector = view.getUint32(76 + i * 4, true);
18393
- if (sector <= MAXREGSECT) {
18394
- fatSectors.push(sector);
18395
- }
18396
- }
18397
- let difatSector = firstDIFATSector;
18398
- for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
18399
- const difatData = readSector(difatSector);
18400
- const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
18401
- const entriesPerSector = (sectorSize - 4) / 4;
18402
- for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
18403
- const sector = difatView.getUint32(i * 4, true);
18404
- if (sector <= MAXREGSECT) {
18405
- fatSectors.push(sector);
18406
- }
18407
- }
18408
- difatSector = difatView.getUint32(sectorSize - 4, true);
18409
- }
18410
- const fatEntries = [];
18411
- for (const fatSector of fatSectors) {
18412
- const fatData = readSector(fatSector);
18413
- const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
18414
- for (let i = 0; i < sectorSize / 4; i++) {
18415
- fatEntries.push(fatView.getUint32(i * 4, true));
18416
- }
18417
- }
18418
- function readSectorChain(startSector) {
18419
- const sectors = [];
18420
- let current = startSector;
18421
- const visited = /* @__PURE__ */ new Set();
18422
- while (current <= MAXREGSECT) {
18423
- if (visited.has(current)) {
18424
- throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
18425
- }
18426
- visited.add(current);
18427
- sectors.push(readSector(current));
18428
- current = fatEntries[current] ?? ENDOFCHAIN;
18429
- }
18430
- const totalLength = sectors.length * sectorSize;
18431
- const result = new Uint8Array(totalLength);
18432
- let offset = 0;
18433
- for (const sector of sectors) {
18434
- result.set(sector, offset);
18435
- offset += sectorSize;
18436
- }
18437
- return result;
18438
- }
18439
- function readStream(startSector, size) {
18440
- const raw = readSectorChain(startSector);
18441
- return raw.subarray(0, Math.min(size, raw.length));
18442
- }
18443
- const miniFatEntries = [];
18444
- if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
18445
- const miniFatRaw = readSectorChain(firstMiniFATSector);
18446
- const miniFatView = new DataView(
18447
- miniFatRaw.buffer,
18448
- miniFatRaw.byteOffset,
18449
- miniFatRaw.byteLength
18450
- );
18451
- for (let i = 0; i < miniFatRaw.length / 4; i++) {
18452
- miniFatEntries.push(miniFatView.getUint32(i * 4, true));
18453
- }
18454
- }
18455
- const dirRaw = readSectorChain(firstDirectorySector);
18456
- const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
18457
- const entries = [];
18458
- for (let i = 0; i < numEntries; i++) {
18459
- const entryOffset = i * DIR_ENTRY_SIZE;
18460
- const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
18461
- const nameLen = entryView.getUint16(64, true);
18462
- const objectType = entryView.getUint8(66);
18463
- if (objectType === ENTRY_TYPE_EMPTY) {
18464
- continue;
18465
- }
18466
- const nameBytes = Math.max(0, nameLen - 2);
18467
- let name = "";
18468
- for (let j = 0; j < nameBytes; j += 2) {
18469
- name += String.fromCharCode(entryView.getUint16(j, true));
18470
- }
18471
- const leftSiblingId = entryView.getUint32(68, true);
18472
- const rightSiblingId = entryView.getUint32(72, true);
18473
- const childId = entryView.getUint32(76, true);
18474
- const startSector = entryView.getUint32(116, true);
18475
- const sizeLow = entryView.getUint32(120, true);
18476
- let size = sizeLow;
18477
- if (majorVersion === 4) {
18478
- entryView.getUint32(124, true);
18479
- size = sizeLow;
18480
- }
18481
- entries.push({
18482
- name,
18483
- type: objectType,
18484
- startSector,
18485
- size,
18486
- childId: childId === 4294967295 ? -1 : childId,
18487
- leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
18488
- rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
18489
- });
18490
- }
18491
- const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
18492
- let miniStreamData;
18493
- if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
18494
- miniStreamData = readSectorChain(rootEntry.startSector);
18495
- }
18496
- function readMiniStream(startSector, size) {
18497
- if (!miniStreamData) {
18498
- throw new Ole2ParseError("Mini stream container not found");
18499
- }
18500
- const sectors = [];
18501
- let current = startSector;
18502
- const visited = /* @__PURE__ */ new Set();
18503
- while (current <= MAXREGSECT) {
18504
- if (visited.has(current)) {
18505
- throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
18506
- }
18507
- visited.add(current);
18508
- const offset2 = current * miniSectorSize;
18509
- sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
18510
- current = miniFatEntries[current] ?? ENDOFCHAIN;
18511
- }
18512
- const totalLength = sectors.length * miniSectorSize;
18513
- const result = new Uint8Array(totalLength);
18514
- let offset = 0;
18515
- for (const sector of sectors) {
18516
- result.set(sector, offset);
18517
- offset += miniSectorSize;
18518
- }
18519
- return result.subarray(0, Math.min(size, result.length));
18520
- }
18521
- function getStream(name) {
18522
- const entry = entries.find(
18523
- (e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
18524
- );
18525
- if (!entry) {
18526
- return void 0;
18527
- }
18528
- if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
18529
- return readMiniStream(entry.startSector, entry.size);
18530
- }
18531
- return readStream(entry.startSector, entry.size);
18532
- }
18533
- return { entries, getStream };
18534
- }
18535
-
18536
18683
  // src/core/utils/ole2-parser-write.ts
18537
18684
  function compareDirEntryNames(a, b) {
18538
18685
  if (a.length !== b.length) {
@@ -18579,7 +18726,7 @@ function writeInt32Sectors(outBytes, int32Data, firstSector, numSectors, sectorS
18579
18726
  }
18580
18727
  }
18581
18728
  function writeHeader(outView, outBytes, params) {
18582
- outBytes.set(OLE_MAGIC2, 0);
18729
+ outBytes.set(OLE_MAGIC, 0);
18583
18730
  outView.setUint16(24, 62, true);
18584
18731
  outView.setUint16(26, 3, true);
18585
18732
  outView.setUint16(28, 65534, true);
@@ -45126,6 +45273,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
45126
45273
  };
45127
45274
 
45128
45275
  // src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts
45276
+ var MAX_OLE_EMBEDDING_BYTES = 25 * 1024 * 1024;
45129
45277
  var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime77 {
45130
45278
  isZipContainer(data) {
45131
45279
  const bytes = new Uint8Array(data);
@@ -45345,6 +45493,59 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
45345
45493
  orderedSections
45346
45494
  };
45347
45495
  }
45496
+ /**
45497
+ * Recover and attach the real embedded binary for each OLE element on a
45498
+ * slide so callers can download / open the inner file.
45499
+ *
45500
+ * For each embedded (non-linked) OLE object: resolve its relationship
45501
+ * target to a zip path (same resolution as images), read the bytes, unwrap
45502
+ * a generic "Package" wrapper (recovering the original file name) when
45503
+ * present, derive a MIME type, and expose the payload as a data-URL on the
45504
+ * element. Linked objects, missing targets, oversized payloads, and parse
45505
+ * failures are skipped silently so existing behaviour is preserved.
45506
+ */
45507
+ async enrichOleElementsWithEmbeddedData(elements, slidePath, depth = 0) {
45508
+ const MAX_OLE_DEPTH = 32;
45509
+ if (depth > MAX_OLE_DEPTH) {
45510
+ return;
45511
+ }
45512
+ for (const el of elements) {
45513
+ if (el.type === "group" && el.children) {
45514
+ await this.enrichOleElementsWithEmbeddedData(el.children, slidePath, depth + 1);
45515
+ continue;
45516
+ }
45517
+ if (el.type !== "ole" || el.isLinked || !el.oleTarget) {
45518
+ continue;
45519
+ }
45520
+ try {
45521
+ const embeddingPath = this.resolveImagePath(slidePath, el.oleTarget);
45522
+ if (!embeddingPath) {
45523
+ continue;
45524
+ }
45525
+ const file = this.zip.file(embeddingPath);
45526
+ if (!file) {
45527
+ continue;
45528
+ }
45529
+ const buffer = await file.async("arraybuffer");
45530
+ if (buffer.byteLength === 0 || buffer.byteLength > MAX_OLE_EMBEDDING_BYTES) {
45531
+ continue;
45532
+ }
45533
+ const unwrapped = unwrapOleEmbedding(new Uint8Array(buffer));
45534
+ if (unwrapped.data.length === 0) {
45535
+ continue;
45536
+ }
45537
+ const fileName = unwrapped.fileName ?? el.fileName ?? (el.oleName && el.oleFileExtension ? `${el.oleName}.${el.oleFileExtension}` : void 0);
45538
+ const mimeType = mimeTypeForOleFile(fileName ?? `x.${el.oleFileExtension ?? "bin"}`);
45539
+ el.oleEmbeddedData = oleBytesToDataUrl(unwrapped.data, mimeType);
45540
+ el.oleEmbeddedByteSize = unwrapped.data.length;
45541
+ el.oleEmbeddedMimeType = mimeType;
45542
+ if (fileName) {
45543
+ el.oleEmbeddedFileName = fileName;
45544
+ }
45545
+ } catch {
45546
+ }
45547
+ }
45548
+ }
45348
45549
  async loadSlidesForPresentation(sectionBySlideId) {
45349
45550
  if (!this.presentationData) {
45350
45551
  return [];
@@ -45372,6 +45573,7 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
45372
45573
  parseSlide: (slideXml2, slidePath) => this.parseSlide(slideXml2, slidePath),
45373
45574
  extractMediaTimingMap: (slideXml2, slidePath) => this.extractMediaTimingMap(slideXml2, slidePath),
45374
45575
  enrichMediaElementsWithTiming: (elements, timingMap) => this.enrichMediaElementsWithTiming(elements, timingMap),
45576
+ enrichOleElementsWithEmbeddedData: (elements, slidePath) => this.enrichOleElementsWithEmbeddedData(elements, slidePath),
45375
45577
  extractBackgroundColor: (slideXml2) => this.extractBackgroundColor(slideXml2),
45376
45578
  getLayoutBackgroundColor: (slidePath) => this.getLayoutBackgroundColor(slidePath),
45377
45579
  extractBackgroundGradient: (slideXml2) => this.extractBackgroundGradient(slideXml2),
@@ -63469,4 +63671,4 @@ var SvgExporter = class _SvgExporter {
63469
63671
  * `<p:extLst>` (optional)
63470
63672
  */
63471
63673
 
63472
- export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTableCellTextAndStyle, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };
63674
+ export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTableCellTextAndStyle, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };