pptxgenjs-plus 4.3.2 → 4.3.4

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.
@@ -1,4 +1,4 @@
1
- /* PptxGenJS 4.3.2 @ 2026-09-06T18:51:27.862Z */
1
+ /* PptxGenJS 4.3.4 @ 2026-09-24T17:18:00.535Z */
2
2
 
3
3
  "use strict";
4
4
  const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
@@ -38,6 +38,62 @@ __webpack_require__.d(__webpack_exports__, {
38
38
 
39
39
  ;// CONCATENATED MODULE: external "@node-projects/jszip"
40
40
  const jszip_namespaceObject = require("@node-projects/jszip");
41
+ ;// CONCATENATED MODULE: ./src/zip.ts
42
+ function _define_property(obj, key, value) {
43
+ if (key in obj) {
44
+ Object.defineProperty(obj, key, {
45
+ value: value,
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true
49
+ });
50
+ } else obj[key] = value;
51
+ return obj;
52
+ }
53
+ function _object_spread(target) {
54
+ for(var i = 1; i < arguments.length; i++){
55
+ var source = arguments[i] != null ? arguments[i] : {};
56
+ var ownKeys = Object.keys(source);
57
+ if (typeof Object.getOwnPropertySymbols === "function") {
58
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
59
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
60
+ }));
61
+ }
62
+ ownKeys.forEach(function(key) {
63
+ _define_property(target, key, source[key]);
64
+ });
65
+ }
66
+ return target;
67
+ }
68
+ function zip_ownKeys(object, enumerableOnly) {
69
+ var keys = Object.keys(object);
70
+ if (Object.getOwnPropertySymbols) {
71
+ var symbols = Object.getOwnPropertySymbols(object);
72
+ if (enumerableOnly) {
73
+ symbols = symbols.filter(function(sym) {
74
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
75
+ });
76
+ }
77
+ keys.push.apply(keys, symbols);
78
+ }
79
+ return keys;
80
+ }
81
+ function _object_spread_props(target, source) {
82
+ source = source != null ? source : {};
83
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
84
+ else {
85
+ zip_ownKeys(Object(source)).forEach(function(key) {
86
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
87
+ });
88
+ }
89
+ return target;
90
+ }
91
+ /** Add an OPC part without creating an explicit ZIP directory entry for its path. */ function addZipFile(zip, path, data, options = {}) {
92
+ zip.file(path, data, _object_spread_props(_object_spread({}, options), {
93
+ createFolders: false
94
+ }));
95
+ }
96
+
41
97
  ;// CONCATENATED MODULE: ./src/core-enums.ts
42
98
  /**
43
99
  * PptxGenJS Enums
@@ -1158,7 +1214,7 @@ const IMG_PLAYBTN = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAVnCAYAA
1158
1214
  ;// CONCATENATED MODULE: external "@rgrove/parse-xml"
1159
1215
  const parse_xml_namespaceObject = require("@rgrove/parse-xml");
1160
1216
  ;// CONCATENATED MODULE: ./src/gen-utils.ts
1161
- function _define_property(obj, key, value) {
1217
+ function gen_utils_define_property(obj, key, value) {
1162
1218
  if (key in obj) {
1163
1219
  Object.defineProperty(obj, key, {
1164
1220
  value: value,
@@ -1169,7 +1225,7 @@ function _define_property(obj, key, value) {
1169
1225
  } else obj[key] = value;
1170
1226
  return obj;
1171
1227
  }
1172
- function _object_spread(target) {
1228
+ function gen_utils_object_spread(target) {
1173
1229
  for(var i = 1; i < arguments.length; i++){
1174
1230
  var source = arguments[i] != null ? arguments[i] : {};
1175
1231
  var ownKeys = Object.keys(source);
@@ -1179,7 +1235,7 @@ function _object_spread(target) {
1179
1235
  }));
1180
1236
  }
1181
1237
  ownKeys.forEach(function(key) {
1182
- _define_property(target, key, source[key]);
1238
+ gen_utils_define_property(target, key, source[key]);
1183
1239
  });
1184
1240
  }
1185
1241
  return target;
@@ -1197,7 +1253,7 @@ function gen_utils_ownKeys(object, enumerableOnly) {
1197
1253
  }
1198
1254
  return keys;
1199
1255
  }
1200
- function _object_spread_props(target, source) {
1256
+ function gen_utils_object_spread_props(target, source) {
1201
1257
  source = source != null ? source : {};
1202
1258
  if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1203
1259
  else {
@@ -1459,14 +1515,29 @@ function _object_spread_props(target, source) {
1459
1515
  _warnedDeprecations.add(key);
1460
1516
  console.warn(`[pptxgenjs] DEPRECATED: ${message}`);
1461
1517
  }
1518
+ /**
1519
+ * Characters XML 1.0 forbids anywhere in a document (even when escaped):
1520
+ * C0 controls other than TAB / LF / CR, the non-characters U+FFFE / U+FFFF
1521
+ * and unpaired surrogates. A single one in a text run makes PowerPoint show
1522
+ * the repair prompt for the whole package.
1523
+ */ // eslint-disable-next-line no-control-regex
1524
+ const XML_ILLEGAL_CHARS = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
1525
+ /**
1526
+ * Drop every character that cannot appear in an XML 1.0 document
1527
+ * @param {string} text - text to sanitize
1528
+ * @returns {string} text without XML-illegal characters
1529
+ */ function stripXmlIllegalChars(text) {
1530
+ return text.replace(XML_ILLEGAL_CHARS, '');
1531
+ }
1462
1532
  /**
1463
1533
  * Replace special XML characters with HTML-encoded strings
1534
+ * - Also drops characters XML 1.0 forbids outright (control chars, lone surrogates)
1464
1535
  * @param {string} xml - XML string to encode
1465
1536
  * @returns {string} escaped XML
1466
1537
  */ function encodeXmlEntities(xml) {
1467
1538
  // NOTE: Dont use short-circuit eval here as value c/b "0" (zero) etc.!
1468
1539
  if (typeof xml === 'undefined' || xml == null) return '';
1469
- return xml.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
1540
+ return stripXmlIllegalChars(xml.toString()).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
1470
1541
  }
1471
1542
  /**
1472
1543
  * Check that a string is a well-formed XML fragment (strict XML 1.0 via
@@ -1781,7 +1852,7 @@ const FLAG_COLOR_MODIFIERS = [
1781
1852
  * only constructor of `ResolvedGlowProps` (no cast - the brand is added by this factory).
1782
1853
  */ function resolveGlowOptions(options) {
1783
1854
  if (!options) return undefined;
1784
- return _object_spread_props(_object_spread({}, DEF_TEXT_GLOW, options), {
1855
+ return gen_utils_object_spread_props(gen_utils_object_spread({}, DEF_TEXT_GLOW, options), {
1785
1856
  [glowBrand]: true
1786
1857
  });
1787
1858
  }
@@ -1969,7 +2040,7 @@ function createGlowElement(glow) {
1969
2040
  return;
1970
2041
  }
1971
2042
  // Work on a copy - never mutate the caller's options object
1972
- ShadowProps = _object_spread({}, ShadowProps);
2043
+ ShadowProps = gen_utils_object_spread({}, ShadowProps);
1973
2044
  // OPT: `type`
1974
2045
  if (ShadowProps.type !== 'outer' && ShadowProps.type !== 'inner' && ShadowProps.type !== 'none' && ShadowProps.type !== 'preset') {
1975
2046
  console.warn('Warning: shadow.type options are `outer`, `inner`, `preset` or `none`.');
@@ -3408,7 +3479,9 @@ const P1710_NS = 'http://schemas.microsoft.com/office/powerpoint/2017/10/main';
3408
3479
  * - Wraps in `<a14:m>` — PowerPoint silently drops bare `m:oMath` siblings of `a:r`.
3409
3480
  * @see MS-ODRAWXML Math / mc:AlternateContent; proven via PowerPoint 16 COM round-trip.
3410
3481
  */ function normalizeOmml(omml) {
3411
- let trimmed = omml.trim();
3482
+ // Control characters in math text (`<m:t>`) are a data defect, not a markup
3483
+ // one - drop them instead of failing the whole export over a single run.
3484
+ let trimmed = stripXmlIllegalChars(omml).trim();
3412
3485
  if (!trimmed) return '';
3413
3486
  // Malformed OMML would be embedded verbatim and corrupt the whole package
3414
3487
  // (PowerPoint repair prompt / open failure), so fail fast with a pointer.
@@ -7952,7 +8025,8 @@ function makeChartType(chartType, data, opts, valAxisId, catAxisId, _isMultiType
7952
8025
  strXml += ' <c:marker val="1"/>';
7953
8026
  }
7954
8027
  // 5: Add axisId (NOTE: order matters - category comes first)
7955
- strXml += `<c:axId val="${catAxisId}"/><c:axId val="${valAxisId}"/><c:axId val="${AXIS_ID_SERIES_PRIMARY}"/>`;
8028
+ strXml += `<c:axId val="${catAxisId}"/><c:axId val="${valAxisId}"/>`;
8029
+ if (chartType === core_enums_CHART_TYPE.BAR3D) strXml += `<c:axId val="${AXIS_ID_SERIES_PRIMARY}"/>`;
7956
8030
  // 6: Close Chart tag
7957
8031
  strXml += `</c:${chartType}Chart>`;
7958
8032
  break;
@@ -8513,6 +8587,7 @@ function _async_to_generator(fn) {
8513
8587
 
8514
8588
 
8515
8589
 
8590
+
8516
8591
  function getDataTableStyles(chartObject) {
8517
8592
  const dataTableFormats = Array.isArray(chartObject.opts._type) ? chartObject.opts._type.flatMap((type)=>{
8518
8593
  var _ref;
@@ -8541,7 +8616,6 @@ function makeNumberStyles(formats) {
8541
8616
  return _async_to_generator(function*() {
8542
8617
  const zipExcel = new jszip_namespaceObject.JSZip();
8543
8618
  const dataTableStyles = getDataTableStyles(chartObject);
8544
- addWorkbookFolders(zipExcel);
8545
8619
  addCoreWorkbookFiles(zipExcel, dataTableStyles.customFormats);
8546
8620
  addSharedStringsFile(chartObject, zipExcel);
8547
8621
  addTableFile(chartObject, zipExcel);
@@ -8549,30 +8623,21 @@ function makeNumberStyles(formats) {
8549
8623
  return yield addWorkbookToPresentation(chartObject, zipExcel, zip);
8550
8624
  })();
8551
8625
  }
8552
- /** Create the archive folders required by the embedded XLSX package. */ function addWorkbookFolders(zipExcel) {
8553
- zipExcel.folder('_rels');
8554
- zipExcel.folder('docProps');
8555
- zipExcel.folder('xl/_rels');
8556
- zipExcel.folder('xl/tables');
8557
- zipExcel.folder('xl/theme');
8558
- zipExcel.folder('xl/worksheets');
8559
- zipExcel.folder('xl/worksheets/_rels');
8560
- }
8561
8626
  /**
8562
8627
  * Write the fixed XLSX package parts: content types, root/workbook relationships, metadata, styles, theme, and workbook.
8563
8628
  * These parts are independent of chart data and must exist before the data-specific files are added.
8564
8629
  */ function addCoreWorkbookFiles(zipExcel, customFormats) {
8565
8630
  // B: Add core contents
8566
8631
  {
8567
- zipExcel.file('[Content_Types].xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">' + ' <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>' + ' <Default Extension="xml" ContentType="application/xml"/>' + ' <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>' + ' <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>' + ' <Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>' + ' <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>' + ' <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>' + ' <Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/>' + ' <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>' + ' <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>' + '</Types>\n');
8568
- zipExcel.file('_rels/.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>' + '</Relationships>\n');
8569
- zipExcel.file('docProps/app.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">' + '<Application>Microsoft Macintosh Excel</Application>' + '<DocSecurity>0</DocSecurity>' + '<ScaleCrop>false</ScaleCrop>' + '<HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs>' + '<TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts>' + '<Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion>' + '</Properties>\n');
8570
- zipExcel.file('docProps/core.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' + '<dc:creator>PptxGenJS</dc:creator>' + '<cp:lastModifiedBy>PptxGenJS</cp:lastModifiedBy>' + '<dcterms:created xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:created>' + '<dcterms:modified xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:modified>' + '</cp:coreProperties>');
8571
- zipExcel.file('xl/_rels/workbook.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>' + '<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>' + '</Relationships>');
8572
- zipExcel.file('xl/styles.xml', customFormats.length > 0 ? makeNumberStyles(customFormats) : '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><numFmts count="1"><numFmt numFmtId="0" formatCode="General"/></numFmts><fonts count="4"><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="10"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="18"/><color indexed="8"/>' + '<name val="Arial"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><dxfs count="0"/><tableStyles count="0"/><colors><indexedColors><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ffff0000"/><rgbColor rgb="ff00ff00"/><rgbColor rgb="ff0000ff"/>' + '<rgbColor rgb="ffffff00"/><rgbColor rgb="ffff00ff"/><rgbColor rgb="ff00ffff"/><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ff878787"/><rgbColor rgb="fff9f9f9"/></indexedColors></colors></styleSheet>\n');
8573
- zipExcel.file('xl/theme/theme1.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>');
8574
- zipExcel.file('xl/workbook.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">' + '<fileVersion appName="xl" lastEdited="7" lowestEdited="6" rupBuild="10507"/>' + '<workbookPr/>' + '<bookViews><workbookView xWindow="0" yWindow="500" windowWidth="20960" windowHeight="15960"/></bookViews>' + '<sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets>' + '<calcPr calcId="0" concurrentCalc="0"/>' + '</workbook>\n');
8575
- zipExcel.file('xl/worksheets/_rels/sheet1.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>' + '</Relationships>\n');
8632
+ addZipFile(zipExcel, '[Content_Types].xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">' + ' <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>' + ' <Default Extension="xml" ContentType="application/xml"/>' + ' <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>' + ' <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>' + ' <Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>' + ' <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>' + ' <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>' + ' <Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/>' + ' <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>' + ' <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>' + '</Types>\n');
8633
+ addZipFile(zipExcel, '_rels/.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>' + '</Relationships>\n');
8634
+ addZipFile(zipExcel, 'docProps/app.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">' + '<Application>Microsoft Macintosh Excel</Application>' + '<DocSecurity>0</DocSecurity>' + '<ScaleCrop>false</ScaleCrop>' + '<HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs>' + '<TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts>' + '<Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion>' + '</Properties>\n');
8635
+ addZipFile(zipExcel, 'docProps/core.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' + '<dc:creator>PptxGenJS</dc:creator>' + '<cp:lastModifiedBy>PptxGenJS</cp:lastModifiedBy>' + '<dcterms:created xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:created>' + '<dcterms:modified xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:modified>' + '</cp:coreProperties>');
8636
+ addZipFile(zipExcel, 'xl/_rels/workbook.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>' + '<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>' + '</Relationships>');
8637
+ addZipFile(zipExcel, 'xl/styles.xml', customFormats.length > 0 ? makeNumberStyles(customFormats) : '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><numFmts count="1"><numFmt numFmtId="0" formatCode="General"/></numFmts><fonts count="4"><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="10"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="18"/><color indexed="8"/>' + '<name val="Arial"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><dxfs count="0"/><tableStyles count="0"/><colors><indexedColors><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ffff0000"/><rgbColor rgb="ff00ff00"/><rgbColor rgb="ff0000ff"/>' + '<rgbColor rgb="ffffff00"/><rgbColor rgb="ffff00ff"/><rgbColor rgb="ff00ffff"/><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ff878787"/><rgbColor rgb="fff9f9f9"/></indexedColors></colors></styleSheet>\n');
8638
+ addZipFile(zipExcel, 'xl/theme/theme1.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>');
8639
+ addZipFile(zipExcel, 'xl/workbook.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">' + '<fileVersion appName="xl" lastEdited="7" lowestEdited="6" rupBuild="10507"/>' + '<workbookPr/>' + '<bookViews><workbookView xWindow="0" yWindow="500" windowWidth="20960" windowHeight="15960"/></bookViews>' + '<sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets>' + '<calcPr calcId="0" concurrentCalc="0"/>' + '</workbook>\n');
8640
+ addZipFile(zipExcel, 'xl/worksheets/_rels/sheet1.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>' + '</Relationships>\n');
8576
8641
  }
8577
8642
  }
8578
8643
  /**
@@ -8634,7 +8699,7 @@ function makeNumberStyles(formats) {
8634
8699
  }
8635
8700
  // DONE:
8636
8701
  strSharedStrings += '</sst>\n';
8637
- zipExcel.file('xl/sharedStrings.xml', strSharedStrings);
8702
+ addZipFile(zipExcel, 'xl/sharedStrings.xml', strSharedStrings);
8638
8703
  }
8639
8704
  }
8640
8705
  /** Write table metadata and the calculated cell range for the embedded workbook. */ function addTableFile(chartObject, zipExcel) {
@@ -8690,7 +8755,7 @@ function makeNumberStyles(formats) {
8690
8755
  strTableXml += '</tableColumns>';
8691
8756
  strTableXml += '<tableStyleInfo showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>';
8692
8757
  strTableXml += '</table>';
8693
- zipExcel.file('xl/tables/table1.xml', strTableXml);
8758
+ addZipFile(zipExcel, 'xl/tables/table1.xml', strTableXml);
8694
8759
  }
8695
8760
  }
8696
8761
  /**
@@ -9001,7 +9066,7 @@ function makeNumberStyles(formats) {
9001
9066
  // ....: Leaving this so nobody foolishly attempts to add this in the future
9002
9067
  // strSheetXml += '<tableParts count="1"><tablePart r:id="rId1"/></tableParts>'
9003
9068
  strSheetXml += '</worksheet>\n';
9004
- zipExcel.file('xl/worksheets/sheet1.xml', strSheetXml);
9069
+ addZipFile(zipExcel, 'xl/worksheets/sheet1.xml', strSheetXml);
9005
9070
  }
9006
9071
  }
9007
9072
  /**
@@ -9013,7 +9078,7 @@ function makeNumberStyles(formats) {
9013
9078
  type: 'base64'
9014
9079
  }).then((content)=>{
9015
9080
  // 1: Create the embedded Excel worksheet with labels and data
9016
- zip.file(`ppt/embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx`, content, {
9081
+ addZipFile(zip, `ppt/embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx`, content, {
9017
9082
  base64: true
9018
9083
  });
9019
9084
  // 2: Create the chart.xml and rel files
@@ -9023,12 +9088,12 @@ function makeNumberStyles(formats) {
9023
9088
  const isChartex = isChartexType(chartObject.opts._type);
9024
9089
  const writeStyleParts = wantsChartStyleParts(chartObject.opts);
9025
9090
  const styleRels = writeStyleParts ? `<Relationship Id="rId2" Type="${CHART_STYLE.colorsRelType}" Target="colors${chartObject.globalId}.xml"/>` + `<Relationship Id="rId3" Type="${CHART_STYLE.styleRelType}" Target="style${chartObject.globalId}.xml"/>` : '';
9026
- zip.file('ppt/charts/_rels/' + chartObject.fileName + '.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx"/>` + styleRels + '</Relationships>');
9027
- zip.file(`ppt/charts/${chartObject.fileName}`, isChartex ? makeXmlChartEx(chartObject) : makeXmlCharts(chartObject));
9091
+ addZipFile(zip, 'ppt/charts/_rels/' + chartObject.fileName + '.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx"/>` + styleRels + '</Relationships>');
9092
+ addZipFile(zip, `ppt/charts/${chartObject.fileName}`, isChartex ? makeXmlChartEx(chartObject) : makeXmlCharts(chartObject));
9028
9093
  if (writeStyleParts) {
9029
9094
  var _chartObject_opts, _chartObject_opts1;
9030
- zip.file(chartColorsPartName(chartObject.globalId), makeXmlChartColors((_chartObject_opts = chartObject.opts) === null || _chartObject_opts === void 0 ? void 0 : _chartObject_opts.chartColorStyle));
9031
- zip.file(chartStylePartName(chartObject.globalId), makeXmlChartStyle((_chartObject_opts1 = chartObject.opts) === null || _chartObject_opts1 === void 0 ? void 0 : _chartObject_opts1.chartStyle));
9095
+ addZipFile(zip, chartColorsPartName(chartObject.globalId), makeXmlChartColors((_chartObject_opts = chartObject.opts) === null || _chartObject_opts === void 0 ? void 0 : _chartObject_opts.chartColorStyle));
9096
+ addZipFile(zip, chartStylePartName(chartObject.globalId), makeXmlChartStyle((_chartObject_opts1 = chartObject.opts) === null || _chartObject_opts1 === void 0 ? void 0 : _chartObject_opts1.chartStyle));
9032
9097
  }
9033
9098
  // 3: Done
9034
9099
  resolve('');
@@ -17089,6 +17154,7 @@ function gen_fonts_async_to_generator(fn) {
17089
17154
  };
17090
17155
  }
17091
17156
 
17157
+
17092
17158
  /** High rId base so font relationships do not collide with slide/master rIds */ const FONT_RID_START = 201314;
17093
17159
  const FONT_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/font';
17094
17160
  /**
@@ -17193,18 +17259,18 @@ function appendFontRelationships(relsXml, fonts) {
17193
17259
  }
17194
17260
  const contentTypesFile = zip.file('[Content_Types].xml');
17195
17261
  if (!contentTypesFile) throw new Error('[Content_Types].xml not found');
17196
- zip.file('[Content_Types].xml', ensureFntdataContentType((yield contentTypesFile.async('string'))));
17262
+ addZipFile(zip, '[Content_Types].xml', ensureFntdataContentType((yield contentTypesFile.async('string'))));
17197
17263
  const presentationFile = zip.file('ppt/presentation.xml');
17198
17264
  if (!presentationFile) throw new Error('ppt/presentation.xml not found');
17199
17265
  let presentationXml = yield presentationFile.async('string');
17200
17266
  presentationXml = ensurePresentationFontAttrs(presentationXml);
17201
17267
  presentationXml = ensureEmbeddedFontLst(presentationXml, prepared);
17202
- zip.file('ppt/presentation.xml', presentationXml);
17268
+ addZipFile(zip, 'ppt/presentation.xml', presentationXml);
17203
17269
  const relsFile = zip.file('ppt/_rels/presentation.xml.rels');
17204
17270
  if (!relsFile) throw new Error('ppt/_rels/presentation.xml.rels not found');
17205
- zip.file('ppt/_rels/presentation.xml.rels', appendFontRelationships((yield relsFile.async('string')), prepared));
17271
+ addZipFile(zip, 'ppt/_rels/presentation.xml.rels', appendFontRelationships((yield relsFile.async('string')), prepared));
17206
17272
  for (const font of prepared){
17207
- zip.file(`ppt/fonts/${font.rid}.fntdata`, font.data, {
17273
+ addZipFile(zip, `ppt/fonts/${font.rid}.fntdata`, font.data, {
17208
17274
  binary: true,
17209
17275
  compression: 'DEFLATE'
17210
17276
  });
@@ -23432,6 +23498,7 @@ function pptxgen_define_property(obj, key, value) {
23432
23498
 
23433
23499
 
23434
23500
 
23501
+
23435
23502
  class PptxGenJS {
23436
23503
  set layout(value) {
23437
23504
  const newLayout = this.LAYOUTS[value];
@@ -23853,7 +23920,7 @@ class PptxGenJS {
23853
23920
  */ pptxgen_define_property(this, "_layout", void 0);
23854
23921
  /**
23855
23922
  * PptxGenJS Library Version
23856
- */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.2"));
23923
+ */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.4"));
23857
23924
  /**
23858
23925
  * @type {string}
23859
23926
  */ pptxgen_define_property(this, "_author", void 0);
@@ -24022,7 +24089,7 @@ class PptxGenJS {
24022
24089
  const mediaPath = rel.Target.replace(/\.\./g, 'ppt');
24023
24090
  if (mediaPaths.has(mediaPath)) return;
24024
24091
  mediaPaths.add(mediaPath);
24025
- zip.file(mediaPath, (_data_split_pop = data.split(',').pop()) !== null && _data_split_pop !== void 0 ? _data_split_pop : '', {
24092
+ addZipFile(zip, mediaPath, (_data_split_pop = data.split(',').pop()) !== null && _data_split_pop !== void 0 ? _data_split_pop : '', {
24026
24093
  base64: true
24027
24094
  });
24028
24095
  }
@@ -24084,7 +24151,6 @@ class PptxGenJS {
24084
24151
  }));
24085
24152
  // STEP 2: Wait for Promises (if any) then generate the PPTX file
24086
24153
  return yield Promise.all(arrMediaPromises).then(()=>pptxgen_async_to_generator(function*() {
24087
- var _zip_folder, _zip_folder1, _zip_folder2, _zip_folder3, _zip_folder4, _zip_folder5, _zip_folder6;
24088
24154
  // A: Size images added without `w`/`h` to their natural dimensions (media bytes are loaded by now)
24089
24155
  this.slides.forEach((slide)=>applyNaturalImageSizes(slide));
24090
24156
  this.slideLayouts.forEach((layout)=>applyNaturalImageSizes(layout));
@@ -24093,39 +24159,27 @@ class PptxGenJS {
24093
24159
  this.slides.forEach((slide)=>{
24094
24160
  if (slide._slideLayout) addPlaceholdersToSlideLayouts(slide);
24095
24161
  });
24096
- // B: Add all required folders and files
24097
- zip.folder('_rels');
24098
- zip.folder('docProps');
24099
- (_zip_folder = zip.folder('ppt')) === null || _zip_folder === void 0 ? void 0 : _zip_folder.folder('_rels');
24100
- (_zip_folder1 = zip.folder('ppt/charts')) === null || _zip_folder1 === void 0 ? void 0 : _zip_folder1.folder('_rels');
24101
- zip.folder('ppt/embeddings');
24102
- zip.folder('ppt/media');
24103
- (_zip_folder2 = zip.folder('ppt/slideLayouts')) === null || _zip_folder2 === void 0 ? void 0 : _zip_folder2.folder('_rels');
24104
- (_zip_folder3 = zip.folder('ppt/slideMasters')) === null || _zip_folder3 === void 0 ? void 0 : _zip_folder3.folder('_rels');
24105
- (_zip_folder4 = zip.folder('ppt/slides')) === null || _zip_folder4 === void 0 ? void 0 : _zip_folder4.folder('_rels');
24106
- zip.folder('ppt/theme');
24107
- (_zip_folder5 = zip.folder('ppt/notesMasters')) === null || _zip_folder5 === void 0 ? void 0 : _zip_folder5.folder('_rels');
24108
- (_zip_folder6 = zip.folder('ppt/notesSlides')) === null || _zip_folder6 === void 0 ? void 0 : _zip_folder6.folder('_rels');
24162
+ // B: Add all required OPC package parts.
24109
24163
  const trackingParts = {
24110
24164
  revisionInfo: wantsRevisionInfo(this.revisionInfo),
24111
24165
  changesInfo: wantsChangesInfo(this.changesInfo)
24112
24166
  };
24113
- zip.file('[Content_Types].xml', makeXmlContTypes(this.slides, this.slideLayouts, this.masterSlide, trackingParts)); // TODO: pass only `this` like below! 20200206
24114
- zip.file('_rels/.rels', makeXmlRootRels());
24115
- zip.file('docProps/app.xml', makeXmlApp(this.slides, this.company, this.documentProps)); // TODO: pass only `this` like below! 20200206
24116
- zip.file('docProps/core.xml', makeXmlCore(this.title, this.subject, this.author, this.revision, this.created, this.modified, this.documentProps)); // TODO: pass only `this` like below! 20200206
24117
- zip.file('ppt/_rels/presentation.xml.rels', makeXmlPresentationRels(this.slides, trackingParts));
24118
- zip.file('ppt/theme/theme1.xml', makeXmlTheme(this));
24167
+ addZipFile(zip, '[Content_Types].xml', makeXmlContTypes(this.slides, this.slideLayouts, this.masterSlide, trackingParts)); // TODO: pass only `this` like below! 20200206
24168
+ addZipFile(zip, '_rels/.rels', makeXmlRootRels());
24169
+ addZipFile(zip, 'docProps/app.xml', makeXmlApp(this.slides, this.company, this.documentProps)); // TODO: pass only `this` like below! 20200206
24170
+ addZipFile(zip, 'docProps/core.xml', makeXmlCore(this.title, this.subject, this.author, this.revision, this.created, this.modified, this.documentProps)); // TODO: pass only `this` like below! 20200206
24171
+ addZipFile(zip, 'ppt/_rels/presentation.xml.rels', makeXmlPresentationRels(this.slides, trackingParts));
24172
+ addZipFile(zip, 'ppt/theme/theme1.xml', makeXmlTheme(this));
24119
24173
  // notesMaster gets its own theme part (Office repair creates theme2 when notesMaster shares theme1; Juliussssssss 9bdfe09).
24120
- zip.file('ppt/theme/theme2.xml', makeXmlTheme(this, 'notes'));
24121
- zip.file('ppt/presentation.xml', makeXmlPresentation(this));
24122
- zip.file('ppt/presProps.xml', makeXmlPresProps(this));
24123
- zip.file('ppt/tableStyles.xml', makeXmlTableStyles(this._tableStyles));
24124
- zip.file('ppt/viewProps.xml', makeXmlViewProps(this));
24174
+ addZipFile(zip, 'ppt/theme/theme2.xml', makeXmlTheme(this, 'notes'));
24175
+ addZipFile(zip, 'ppt/presentation.xml', makeXmlPresentation(this));
24176
+ addZipFile(zip, 'ppt/presProps.xml', makeXmlPresProps(this));
24177
+ addZipFile(zip, 'ppt/tableStyles.xml', makeXmlTableStyles(this._tableStyles));
24178
+ addZipFile(zip, 'ppt/viewProps.xml', makeXmlViewProps(this));
24125
24179
  // C: Create a Layout/Master/Rel/Slide file for each SlideLayout and Slide
24126
24180
  this.slideLayouts.forEach((layout, idx)=>{
24127
- zip.file(`ppt/slideLayouts/slideLayout${idx + 1}.xml`, makeXmlLayout(layout));
24128
- zip.file(`ppt/slideLayouts/_rels/slideLayout${idx + 1}.xml.rels`, makeXmlSlideLayoutRel(idx + 1, this.slideLayouts));
24181
+ addZipFile(zip, `ppt/slideLayouts/slideLayout${idx + 1}.xml`, makeXmlLayout(layout));
24182
+ addZipFile(zip, `ppt/slideLayouts/_rels/slideLayout${idx + 1}.xml.rels`, makeXmlSlideLayoutRel(idx + 1, this.slideLayouts));
24129
24183
  });
24130
24184
  // Modern threaded comments (MS-PPTX §2.16): resolve authors once, emit authors + per-slide comment parts.
24131
24185
  const hasComments = this.slides.some((s)=>{
@@ -24134,32 +24188,31 @@ class PptxGenJS {
24134
24188
  });
24135
24189
  const commentAuthors = hasComments ? collectCommentAuthors(this.slides, this.commentAuthors) : [];
24136
24190
  if (hasComments) {
24137
- zip.folder('ppt/comments');
24138
- zip.file('ppt/authors.xml', makeXmlCommentAuthors(commentAuthors));
24191
+ addZipFile(zip, 'ppt/authors.xml', makeXmlCommentAuthors(commentAuthors));
24139
24192
  }
24140
24193
  if (trackingParts.revisionInfo) {
24141
- zip.file(REVISION_INFO_PART, makeXmlRevisionInfo(this.revisionInfo));
24194
+ addZipFile(zip, REVISION_INFO_PART, makeXmlRevisionInfo(this.revisionInfo));
24142
24195
  }
24143
24196
  if (trackingParts.changesInfo) {
24144
- zip.file(CHANGES_INFO_PART, makeXmlChangesInfo());
24197
+ addZipFile(zip, CHANGES_INFO_PART, makeXmlChangesInfo());
24145
24198
  }
24146
24199
  this.slides.forEach((slide, idx)=>{
24147
24200
  var _slide_comments;
24148
- zip.file(`ppt/slides/slide${idx + 1}.xml`, makeXmlSlide(slide, this._sections));
24149
- zip.file(`ppt/slides/_rels/slide${idx + 1}.xml.rels`, makeXmlSlideRel(this.slides, this.slideLayouts, idx + 1));
24201
+ addZipFile(zip, `ppt/slides/slide${idx + 1}.xml`, makeXmlSlide(slide, this._sections));
24202
+ addZipFile(zip, `ppt/slides/_rels/slide${idx + 1}.xml.rels`, makeXmlSlideRel(this.slides, this.slideLayouts, idx + 1));
24150
24203
  // Create all slide notes related items. Notes of empty strings are created for slides which do not have notes specified, to keep track of _rels.
24151
- zip.file(`ppt/notesSlides/notesSlide${idx + 1}.xml`, makeXmlNotesSlide(slide));
24152
- zip.file(`ppt/notesSlides/_rels/notesSlide${idx + 1}.xml.rels`, makeXmlNotesSlideRel(idx + 1));
24153
- if (((_slide_comments = slide.comments) !== null && _slide_comments !== void 0 ? _slide_comments : []).length > 0) zip.file(`ppt/comments/commentSlide${idx + 1}.xml`, makeXmlSlideComments(slide, commentAuthors));
24204
+ addZipFile(zip, `ppt/notesSlides/notesSlide${idx + 1}.xml`, makeXmlNotesSlide(slide));
24205
+ addZipFile(zip, `ppt/notesSlides/_rels/notesSlide${idx + 1}.xml.rels`, makeXmlNotesSlideRel(idx + 1));
24206
+ if (((_slide_comments = slide.comments) !== null && _slide_comments !== void 0 ? _slide_comments : []).length > 0) addZipFile(zip, `ppt/comments/commentSlide${idx + 1}.xml`, makeXmlSlideComments(slide, commentAuthors));
24154
24207
  for (const rel of slide._rels){
24155
24208
  if (rel.type !== (/* inlined export .SLIDE_OBJECT_TYPES.contentPart */"contentPart") && rel.type !== (/* inlined export .SLIDE_OBJECT_TYPES.officeApp */"officeApp")) continue;
24156
- zip.file(rel.Target.replace(/^\.\.\//, 'ppt/'), typeof rel.data === 'string' ? rel.data : '');
24209
+ addZipFile(zip, rel.Target.replace(/^\.\.\//, 'ppt/'), typeof rel.data === 'string' ? rel.data : '');
24157
24210
  }
24158
24211
  });
24159
- zip.file('ppt/slideMasters/slideMaster1.xml', makeXmlMaster(this.masterSlide, this.slideLayouts));
24160
- zip.file('ppt/slideMasters/_rels/slideMaster1.xml.rels', makeXmlMasterRel(this.masterSlide, this.slideLayouts));
24161
- zip.file('ppt/notesMasters/notesMaster1.xml', makeXmlNotesMaster());
24162
- zip.file('ppt/notesMasters/_rels/notesMaster1.xml.rels', makeXmlNotesMasterRel());
24212
+ addZipFile(zip, 'ppt/slideMasters/slideMaster1.xml', makeXmlMaster(this.masterSlide, this.slideLayouts));
24213
+ addZipFile(zip, 'ppt/slideMasters/_rels/slideMaster1.xml.rels', makeXmlMasterRel(this.masterSlide, this.slideLayouts));
24214
+ addZipFile(zip, 'ppt/notesMasters/notesMaster1.xml', makeXmlNotesMaster());
24215
+ addZipFile(zip, 'ppt/notesMasters/_rels/notesMaster1.xml.rels', makeXmlNotesMasterRel());
24163
24216
  // D: Create all Rels (images, media, chart data)
24164
24217
  const mediaPaths = new Set();
24165
24218
  this.slideLayouts.forEach((layout)=>{