ooxml-core 1.25.1 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/{PptxHandler-AUK27AQD.mjs → PptxHandler-5QBRBXRX.mjs} +3 -3
- package/dist/{PptxHandler-QBGEZDCO.cjs → PptxHandler-CVYP5PAN.cjs} +3 -3
- package/dist/PptxHandler-TOAD6P7N.mjs +4 -0
- package/dist/{PresentationBuilder-RX7D75GZ.mjs → PresentationBuilder-EBVNYMLE.mjs} +2 -2
- package/dist/{PresentationBuilder-MEETJGEA.mjs → PresentationBuilder-M5UXW4AF.mjs} +3 -3
- package/dist/{PresentationBuilder-CI45KEHL.cjs → PresentationBuilder-RVQZCTIO.cjs} +5 -5
- package/dist/automation/index.cjs +273 -156
- package/dist/automation/index.mjs +273 -156
- package/dist/automation/xlsx-read.d.ts +2 -8
- package/dist/automation/xlsx-read.d.ts.map +1 -1
- package/dist/automation/xlsx.d.ts +2 -2
- package/dist/chart/index.cjs +89 -47
- package/dist/chart/index.mjs +89 -47
- package/dist/{chunk-6DHZZD5R.mjs → chunk-2XMK5SXU.mjs} +106 -48
- package/dist/{chunk-TX2QFS3J.mjs → chunk-4IIR2QEH.mjs} +608 -371
- package/dist/{chunk-635WPRNJ.mjs → chunk-DNYZX6YG.mjs} +19 -3
- package/dist/{chunk-VGDHSED6.mjs → chunk-EBJ724RB.mjs} +1 -1
- package/dist/{chunk-GMETZZ3V.cjs → chunk-EEHK52XB.cjs} +1677 -1440
- package/dist/{chunk-E2PYQQQV.mjs → chunk-JJ37PCNR.mjs} +89 -47
- package/dist/{chunk-5F7OB7PA.mjs → chunk-K6OFJ5GJ.mjs} +605 -368
- package/dist/{chunk-HVRFRYYS.mjs → chunk-KONCS53X.mjs} +5 -5
- package/dist/{chunk-S5TGOEQX.cjs → chunk-MU3XSASV.cjs} +106 -47
- package/dist/{chunk-E3PRAHL6.mjs → chunk-ZXPPM63Y.mjs} +1 -1
- package/dist/docx/embedded.cjs +89 -47
- package/dist/docx/embedded.mjs +89 -47
- package/dist/docx/index.cjs +89 -47
- package/dist/docx/index.mjs +89 -47
- package/dist/docx/layout/index.cjs +2 -2
- package/dist/docx/layout/index.mjs +2 -2
- package/dist/docx/layout/input.d.ts +6 -1
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +1 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +89 -47
- package/dist/docx/load/index.mjs +89 -47
- package/dist/index.cjs +128 -53
- package/dist/index.mjs +128 -53
- package/dist/opc/index.cjs +90 -47
- package/dist/opc/index.mjs +90 -48
- package/dist/opc/zip-limits.d.ts +6 -0
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +766 -444
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{index-CgjEEpfK.d.ts → index-B94RKk84.d.ts} +276 -115
- package/dist/pptx/chunks/index-B94RKk84.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CX0RM1fF.d.ts → index-BOpULlxB.d.ts} +3 -3
- package/dist/pptx/chunks/{index-CX0RM1fF.d.ts.map → index-BOpULlxB.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DCbp5fOs.d.ts → index-D3gKRIAi.d.ts} +12 -5
- package/dist/pptx/chunks/{index-DCbp5fOs.d.ts.map → index-D3gKRIAi.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CjalmJIi.d.ts → text-operations-CNfUj45U.d.ts} +16 -2
- package/dist/pptx/chunks/{text-operations-CjalmJIi.d.ts.map → text-operations-CNfUj45U.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +766 -444
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/editor-history.cjs +21 -0
- package/dist/pptx/editor/render/editor-history.d.ts +9 -0
- package/dist/pptx/editor/render/editor-history.d.ts.map +1 -1
- package/dist/pptx/editor/render/editor-history.mjs +21 -0
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +765 -442
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/signature-node/index.cjs +89 -47
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/visio/index.cjs +266 -150
- package/dist/visio/index.mjs +266 -150
- package/dist/visio/ui/index.cjs +266 -150
- package/dist/visio/ui/index.mjs +266 -150
- package/dist/xlsx/index.cjs +518 -153
- package/dist/xlsx/index.mjs +518 -154
- package/dist/xlsx/load/index.cjs +266 -150
- package/dist/xlsx/load/index.mjs +266 -150
- package/dist/xlsx/numfmt/view.d.ts +13 -0
- package/dist/xlsx/numfmt/view.d.ts.map +1 -0
- package/dist/xlsx/read/index.d.ts +1 -0
- package/dist/xlsx/read/index.d.ts.map +1 -1
- package/dist/xlsx/read/limits.d.ts +5 -0
- package/dist/xlsx/read/limits.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts +6 -0
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/rows-stream.d.ts +12 -0
- package/dist/xlsx/read/rows-stream.d.ts.map +1 -0
- package/dist/xlsx/read/rows.d.ts +37 -0
- package/dist/xlsx/read/rows.d.ts.map +1 -0
- package/dist/xlsx/read/shared-strings.d.ts +6 -1
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data-source.d.ts +30 -3
- package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data.d.ts +13 -2
- package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +266 -150
- package/dist/xlsx/ui/index.mjs +266 -150
- package/dist/xml/index.cjs +38 -6
- package/dist/xml/index.mjs +37 -7
- package/dist/xml/lite.d.ts +15 -0
- package/dist/xml/lite.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-5UO5DD5K.mjs +0 -4
- package/dist/pptx/chunks/index-CgjEEpfK.d.ts.map +0 -1
package/dist/pptx/index.cjs
CHANGED
|
@@ -5020,57 +5020,98 @@ function resolveLimits(limits) {
|
|
|
5020
5020
|
fail: (message, limit, kind) => create2 ? create2(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
5021
5021
|
};
|
|
5022
5022
|
}
|
|
5023
|
-
function inflateEntryGuarded(entry2, alreadyRead, limits) {
|
|
5023
|
+
async function inflateEntryGuarded(entry2, alreadyRead, limits) {
|
|
5024
|
+
const chunks = [];
|
|
5025
|
+
let size = 0;
|
|
5026
|
+
for await (const chunk2 of streamEntryGuarded(entry2, alreadyRead, limits)) {
|
|
5027
|
+
chunks.push(chunk2);
|
|
5028
|
+
size += chunk2.byteLength;
|
|
5029
|
+
}
|
|
5030
|
+
if (chunks.length === 1 && chunks[0]) return chunks[0];
|
|
5031
|
+
const out = new Uint8Array(size);
|
|
5032
|
+
let offset = 0;
|
|
5033
|
+
for (const chunk2 of chunks) {
|
|
5034
|
+
out.set(chunk2, offset);
|
|
5035
|
+
offset += chunk2.byteLength;
|
|
5036
|
+
}
|
|
5037
|
+
return out;
|
|
5038
|
+
}
|
|
5039
|
+
async function* streamEntryGuarded(entry2, alreadyRead, limits) {
|
|
5024
5040
|
const r = resolveLimits(limits);
|
|
5025
5041
|
const declared = declaredEntrySize(entry2);
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
if (size > declared || size > r.maxEntryBytes)
|
|
5042
|
-
return abort(
|
|
5043
|
-
r.fail(
|
|
5044
|
-
`${r.label} part ${entry2.name} inflates past its declared size`,
|
|
5045
|
-
r.maxEntryBytes,
|
|
5046
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
5047
|
-
)
|
|
5048
|
-
);
|
|
5049
|
-
if (alreadyRead + size > r.maxTotalBytes)
|
|
5050
|
-
return abort(
|
|
5051
|
-
r.fail(
|
|
5052
|
-
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
5053
|
-
r.maxTotalBytes,
|
|
5054
|
-
"maxTotalBytes"
|
|
5055
|
-
)
|
|
5056
|
-
);
|
|
5057
|
-
chunks.push(chunk2);
|
|
5058
|
-
});
|
|
5059
|
-
stream.on("error", (error) => abort(error));
|
|
5060
|
-
stream.on("end", () => {
|
|
5061
|
-
if (done) return;
|
|
5062
|
-
done = true;
|
|
5063
|
-
if (chunks.length === 1 && chunks[0]) return resolvePromise(chunks[0]);
|
|
5064
|
-
const out = new Uint8Array(size);
|
|
5065
|
-
let offset = 0;
|
|
5066
|
-
for (const chunk2 of chunks) {
|
|
5067
|
-
out.set(chunk2, offset);
|
|
5068
|
-
offset += chunk2.byteLength;
|
|
5069
|
-
}
|
|
5070
|
-
resolvePromise(out);
|
|
5071
|
-
});
|
|
5042
|
+
const stream = entry2.internalStream("uint8array");
|
|
5043
|
+
const queue = [];
|
|
5044
|
+
let size = 0;
|
|
5045
|
+
let ended = false;
|
|
5046
|
+
let stopped = false;
|
|
5047
|
+
let failure;
|
|
5048
|
+
let paused = false;
|
|
5049
|
+
let wake;
|
|
5050
|
+
const pause = () => {
|
|
5051
|
+
paused = true;
|
|
5052
|
+
stream.pause();
|
|
5053
|
+
};
|
|
5054
|
+
const resume = () => {
|
|
5055
|
+
if (!paused || stopped) return;
|
|
5056
|
+
paused = false;
|
|
5072
5057
|
stream.resume();
|
|
5058
|
+
};
|
|
5059
|
+
const fail2 = (error) => {
|
|
5060
|
+
failure ??= error;
|
|
5061
|
+
stopped = true;
|
|
5062
|
+
queue.length = 0;
|
|
5063
|
+
pause();
|
|
5064
|
+
wake?.();
|
|
5065
|
+
};
|
|
5066
|
+
stream.on("data", (chunk2) => {
|
|
5067
|
+
if (stopped) return pause();
|
|
5068
|
+
size += chunk2.byteLength;
|
|
5069
|
+
if (size > declared || size > r.maxEntryBytes)
|
|
5070
|
+
return fail2(
|
|
5071
|
+
r.fail(
|
|
5072
|
+
`${r.label} part ${entry2.name} inflates past its declared size`,
|
|
5073
|
+
r.maxEntryBytes,
|
|
5074
|
+
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
5075
|
+
)
|
|
5076
|
+
);
|
|
5077
|
+
if (alreadyRead + size > r.maxTotalBytes)
|
|
5078
|
+
return fail2(
|
|
5079
|
+
r.fail(
|
|
5080
|
+
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
5081
|
+
r.maxTotalBytes,
|
|
5082
|
+
"maxTotalBytes"
|
|
5083
|
+
)
|
|
5084
|
+
);
|
|
5085
|
+
queue.push(chunk2);
|
|
5086
|
+
if (queue.length >= AHEAD) pause();
|
|
5087
|
+
wake?.();
|
|
5088
|
+
});
|
|
5089
|
+
stream.on("error", (error) => fail2(error));
|
|
5090
|
+
stream.on("end", () => {
|
|
5091
|
+
ended = true;
|
|
5092
|
+
wake?.();
|
|
5073
5093
|
});
|
|
5094
|
+
stream.resume();
|
|
5095
|
+
try {
|
|
5096
|
+
for (; ; ) {
|
|
5097
|
+
if (failure) throw failure;
|
|
5098
|
+
const chunk2 = queue.shift();
|
|
5099
|
+
if (chunk2) {
|
|
5100
|
+
if (queue.length < AHEAD / 2) resume();
|
|
5101
|
+
yield chunk2;
|
|
5102
|
+
continue;
|
|
5103
|
+
}
|
|
5104
|
+
if (ended) return;
|
|
5105
|
+
await new Promise((resolve) => {
|
|
5106
|
+
wake = resolve;
|
|
5107
|
+
resume();
|
|
5108
|
+
});
|
|
5109
|
+
wake = void 0;
|
|
5110
|
+
}
|
|
5111
|
+
} finally {
|
|
5112
|
+
stopped = true;
|
|
5113
|
+
if (!ended) pause();
|
|
5114
|
+
}
|
|
5074
5115
|
}
|
|
5075
5116
|
function toBase64(bytes) {
|
|
5076
5117
|
let binary = "";
|
|
@@ -5149,7 +5190,7 @@ async function openZip(input, limits = {}) {
|
|
|
5149
5190
|
);
|
|
5150
5191
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
5151
5192
|
}
|
|
5152
|
-
var DEFAULT_ZIP_LIMITS, ZipLimitError, mib;
|
|
5193
|
+
var DEFAULT_ZIP_LIMITS, ZipLimitError, mib, AHEAD;
|
|
5153
5194
|
var init_zip_limits = __esm({
|
|
5154
5195
|
"opc/zip-limits.ts"() {
|
|
5155
5196
|
DEFAULT_ZIP_LIMITS = {
|
|
@@ -5171,6 +5212,7 @@ var init_zip_limits = __esm({
|
|
|
5171
5212
|
}
|
|
5172
5213
|
};
|
|
5173
5214
|
mib = (bytes) => Math.round(bytes / 1048576);
|
|
5215
|
+
AHEAD = 8;
|
|
5174
5216
|
}
|
|
5175
5217
|
});
|
|
5176
5218
|
|
|
@@ -62993,6 +63035,22 @@ function findThemeEffectSchemeByName(name) {
|
|
|
62993
63035
|
const wanted = name.trim().toLowerCase();
|
|
62994
63036
|
return exports.THEME_EFFECT_SCHEMES.find((scheme) => scheme.name.toLowerCase() === wanted);
|
|
62995
63037
|
}
|
|
63038
|
+
function formatSchemeKey(scheme) {
|
|
63039
|
+
const raw2 = (styles) => (styles ?? []).map((style) => style.rawNode ?? null);
|
|
63040
|
+
const lists = [scheme.fillStyles, scheme.lineStyles, scheme.effectStyles];
|
|
63041
|
+
return JSON.stringify(
|
|
63042
|
+
[scheme.name ?? null, ...lists.map(raw2), raw2(scheme.backgroundFillStyles)],
|
|
63043
|
+
(_key, value) => {
|
|
63044
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
63045
|
+
return value;
|
|
63046
|
+
}
|
|
63047
|
+
const entries = Object.entries(value);
|
|
63048
|
+
const isAttribute = ([key2]) => key2.startsWith("@_");
|
|
63049
|
+
const attributes3 = entries.filter(isAttribute).sort(([x], [y]) => x < y ? -1 : 1);
|
|
63050
|
+
return Object.fromEntries([...attributes3, ...entries.filter((entry2) => !isAttribute(entry2))]);
|
|
63051
|
+
}
|
|
63052
|
+
);
|
|
63053
|
+
}
|
|
62996
63054
|
function wrapFormatSchemeXml(fmtSchemeXml) {
|
|
62997
63055
|
return fmtSchemeXml.replace(
|
|
62998
63056
|
/^<a:fmtScheme/u,
|
|
@@ -108473,6 +108531,42 @@ var init_master_save_helpers = __esm({
|
|
|
108473
108531
|
}
|
|
108474
108532
|
});
|
|
108475
108533
|
|
|
108534
|
+
// pptx/core/core/runtime/held-format-schemes.ts
|
|
108535
|
+
function partsKey(deckScheme, themePaths) {
|
|
108536
|
+
return JSON.stringify([formatSchemeKey(deckScheme), [...new Set(themePaths)].sort()]);
|
|
108537
|
+
}
|
|
108538
|
+
var HeldFormatSchemes;
|
|
108539
|
+
var init_held_format_schemes = __esm({
|
|
108540
|
+
"pptx/core/core/runtime/held-format-schemes.ts"() {
|
|
108541
|
+
init_theme_effect_schemes();
|
|
108542
|
+
HeldFormatSchemes = class {
|
|
108543
|
+
elements = /* @__PURE__ */ new Map();
|
|
108544
|
+
partsByDeckScheme = /* @__PURE__ */ new Map();
|
|
108545
|
+
/** Keep `element`, which `scheme` was parsed from. */
|
|
108546
|
+
hold(scheme, element) {
|
|
108547
|
+
this.elements.set(formatSchemeKey(scheme), structuredClone(element));
|
|
108548
|
+
}
|
|
108549
|
+
/** The element `scheme` was parsed from, if one was held. */
|
|
108550
|
+
element(scheme) {
|
|
108551
|
+
return this.elements.get(formatSchemeKey(scheme));
|
|
108552
|
+
}
|
|
108553
|
+
/** What each part in `parts` held while the deck's scheme was `deckScheme`. */
|
|
108554
|
+
holdParts(deckScheme, parts) {
|
|
108555
|
+
if (parts.size > 0) {
|
|
108556
|
+
this.partsByDeckScheme.set(partsKey(deckScheme, [...parts.keys()]), new Map(parts));
|
|
108557
|
+
}
|
|
108558
|
+
}
|
|
108559
|
+
/**
|
|
108560
|
+
* The element each of `themePaths` held the last time the deck's scheme was `deckScheme` over
|
|
108561
|
+
* exactly those parts, if known.
|
|
108562
|
+
*/
|
|
108563
|
+
parts(deckScheme, themePaths) {
|
|
108564
|
+
return this.partsByDeckScheme.get(partsKey(deckScheme, themePaths));
|
|
108565
|
+
}
|
|
108566
|
+
};
|
|
108567
|
+
}
|
|
108568
|
+
});
|
|
108569
|
+
|
|
108476
108570
|
// pptx/core/builders/fluent/PptxXmlBuilder.ts
|
|
108477
108571
|
exports.PptxXmlBuilder = void 0; exports.PptxSlideBuilder = void 0; exports.PptxSlideElementsBuilder = void 0; exports.PptxSlideNotesBuilder = void 0;
|
|
108478
108572
|
var init_PptxXmlBuilder = __esm({
|
|
@@ -135058,6 +135152,11 @@ var init_PptxHandlerRuntimeDocProperties = __esm({
|
|
|
135058
135152
|
const upSegments = Array.from({ length: fromParts.length }).fill("..");
|
|
135059
135153
|
return [...upSegments, ...toParts].join("/");
|
|
135060
135154
|
}
|
|
135155
|
+
/**
|
|
135156
|
+
* Point a slide master's theme relationship at `themePath`.
|
|
135157
|
+
*
|
|
135158
|
+
* @returns whether the master had a theme relationship to rewrite
|
|
135159
|
+
*/
|
|
135061
135160
|
async setMasterThemeRelationship(masterPath, themePath) {
|
|
135062
135161
|
const relsPath2 = masterPath.replace(
|
|
135063
135162
|
/ppt\/slideMasters\/(slideMaster\d+)\.xml/,
|
|
@@ -135065,7 +135164,7 @@ var init_PptxHandlerRuntimeDocProperties = __esm({
|
|
|
135065
135164
|
);
|
|
135066
135165
|
const relsFile = this.zip.file(relsPath2);
|
|
135067
135166
|
if (!relsFile) {
|
|
135068
|
-
return;
|
|
135167
|
+
return false;
|
|
135069
135168
|
}
|
|
135070
135169
|
const relsXml = await relsFile.async("string");
|
|
135071
135170
|
const relsData = this.parser.parse(relsXml);
|
|
@@ -135073,28 +135172,13 @@ var init_PptxHandlerRuntimeDocProperties = __esm({
|
|
|
135073
135172
|
const relationships3 = this.ensureArray(relRoot["Relationship"]);
|
|
135074
135173
|
const themeRel = relationships3.find((rel) => String(rel["@_Type"] || "").includes("/theme"));
|
|
135075
135174
|
if (!themeRel) {
|
|
135076
|
-
return;
|
|
135175
|
+
return false;
|
|
135077
135176
|
}
|
|
135078
135177
|
themeRel["@_Target"] = this.buildRelativeTargetPath(masterPath, themePath);
|
|
135079
135178
|
relRoot["Relationship"] = relationships3;
|
|
135080
135179
|
relsData["Relationships"] = relRoot;
|
|
135081
135180
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
135082
|
-
|
|
135083
|
-
async setPresentationTheme(themePath, applyToAllMasters = true) {
|
|
135084
|
-
const normalizedThemePath = themePath.trim().replace(/\\/g, "/");
|
|
135085
|
-
if (!normalizedThemePath.startsWith("ppt/theme/")) {
|
|
135086
|
-
return;
|
|
135087
|
-
}
|
|
135088
|
-
const masterFiles = this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);
|
|
135089
|
-
if (!masterFiles || masterFiles.length === 0) {
|
|
135090
|
-
return;
|
|
135091
|
-
}
|
|
135092
|
-
const targetMasters = applyToAllMasters ? masterFiles : [masterFiles[0]];
|
|
135093
|
-
await Promise.all(
|
|
135094
|
-
targetMasters.map(async (masterFile) => {
|
|
135095
|
-
await this.setMasterThemeRelationship(masterFile.name, normalizedThemePath);
|
|
135096
|
-
})
|
|
135097
|
-
);
|
|
135181
|
+
return true;
|
|
135098
135182
|
}
|
|
135099
135183
|
/** The text of a package part, or `undefined` when the package has no such part. */
|
|
135100
135184
|
async readPartText(path3) {
|
|
@@ -135424,8 +135508,6 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
|
|
|
135424
135508
|
this.masterXmlMap.set(path3, data);
|
|
135425
135509
|
}
|
|
135426
135510
|
const masterCSldName = (xmlAttr(sldMaster["p:cSld"], "name") ?? "").trim();
|
|
135427
|
-
const bg = sldMaster["p:cSld"]?.["p:bg"];
|
|
135428
|
-
const backgroundColor = this.parseBackgroundColor(bg);
|
|
135429
135511
|
const spTree = sldMaster["p:cSld"]?.["p:spTree"];
|
|
135430
135512
|
const placeholders = this.extractPlaceholderList(spTree);
|
|
135431
135513
|
let preserve;
|
|
@@ -135479,7 +135561,6 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
|
|
|
135479
135561
|
results.push({
|
|
135480
135562
|
path: path3,
|
|
135481
135563
|
name: masterCSldName.length > 0 ? masterCSldName : void 0,
|
|
135482
|
-
backgroundColor,
|
|
135483
135564
|
themePath,
|
|
135484
135565
|
layoutPaths: layoutPaths.length > 0 ? layoutPaths : void 0,
|
|
135485
135566
|
layouts: layouts.length > 0 ? layouts : void 0,
|
|
@@ -135617,11 +135698,6 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
|
|
|
135617
135698
|
layout.clrMapOverride = overrideMap;
|
|
135618
135699
|
}
|
|
135619
135700
|
}
|
|
135620
|
-
const bg = xmlPath(sldLayout, "p:cSld", "p:bg");
|
|
135621
|
-
const bgColor = this.parseBackgroundColor(bg);
|
|
135622
|
-
if (bgColor) {
|
|
135623
|
-
layout.backgroundColor = bgColor;
|
|
135624
|
-
}
|
|
135625
135701
|
const spTree = xmlPath(sldLayout, "p:cSld", "p:spTree");
|
|
135626
135702
|
const placeholders = this.extractPlaceholderList(spTree);
|
|
135627
135703
|
if (placeholders.length > 0) {
|
|
@@ -151405,7 +151481,23 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
151405
151481
|
}
|
|
151406
151482
|
return this.isStrictOoxml ? "strict" : "transitional";
|
|
151407
151483
|
}
|
|
151484
|
+
/** The save running now, or the last one: see {@link save}. */
|
|
151485
|
+
saveQueue = Promise.resolve();
|
|
151486
|
+
/**
|
|
151487
|
+
* Saves run one at a time. A save rewrites `this.zip` in place across many awaits and moves
|
|
151488
|
+
* per-part baselines (slide fingerprints, chart data, pending chart updates) while it runs, so
|
|
151489
|
+
* a second save that starts mid-way (a viewer's autosave snapshot firing during the user's own
|
|
151490
|
+
* save) read half-written state: it skipped the slide as unchanged and wrote the chart part's
|
|
151491
|
+
* original XML back over the edit, in both outputs. Each save now waits for the one before it;
|
|
151492
|
+
* one that fails does not hold up the next.
|
|
151493
|
+
*/
|
|
151408
151494
|
async save(slides, options) {
|
|
151495
|
+
const run2 = this.saveQueue.then(() => this.saveNow(slides, options));
|
|
151496
|
+
this.saveQueue = run2.catch(() => void 0);
|
|
151497
|
+
return run2;
|
|
151498
|
+
}
|
|
151499
|
+
/** One save, with the package to itself; callers go through {@link save}. */
|
|
151500
|
+
async saveNow(slides, options) {
|
|
151409
151501
|
validateSlideGeometry(slides);
|
|
151410
151502
|
const templates = [
|
|
151411
151503
|
...options?.slideMasters ?? [],
|
|
@@ -151423,7 +151515,7 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
151423
151515
|
return this.saveAsLegacyPpt(
|
|
151424
151516
|
slides,
|
|
151425
151517
|
options,
|
|
151426
|
-
() => this.
|
|
151518
|
+
() => this.saveNow(slides, {
|
|
151427
151519
|
...options,
|
|
151428
151520
|
pptPassword: void 0,
|
|
151429
151521
|
outputFormat: "pptx",
|
|
@@ -156410,6 +156502,25 @@ var init_PptxHandlerRuntimeBackgroundParsing = __esm({
|
|
|
156410
156502
|
}
|
|
156411
156503
|
return void 0;
|
|
156412
156504
|
}
|
|
156505
|
+
/**
|
|
156506
|
+
* The colour a slide master or layout paints from its own `p:bg`, resolved exactly as a
|
|
156507
|
+
* slide's background is: through the active master's colour map and format scheme, with
|
|
156508
|
+
* `clrMapOverride` (a layout's `p:clrMapOvr`, or `null`) taking precedence. The caller makes
|
|
156509
|
+
* the part's master active first; a master's `bgRef` on `bg1` means `dk1` under a dark
|
|
156510
|
+
* `p:clrMap`, which no other state can tell.
|
|
156511
|
+
*/
|
|
156512
|
+
extractTemplateBackgroundColor(partXml, rootTag2, clrMapOverride) {
|
|
156513
|
+
if (!partXml) {
|
|
156514
|
+
return void 0;
|
|
156515
|
+
}
|
|
156516
|
+
const previousOverride = this.currentSlideClrMapOverride;
|
|
156517
|
+
this.currentSlideClrMapOverride = clrMapOverride;
|
|
156518
|
+
try {
|
|
156519
|
+
return this.extractBackgroundColor(partXml, rootTag2);
|
|
156520
|
+
} finally {
|
|
156521
|
+
this.currentSlideClrMapOverride = previousOverride;
|
|
156522
|
+
}
|
|
156523
|
+
}
|
|
156413
156524
|
/**
|
|
156414
156525
|
* Composite a resolved background colour with its `a:alpha` (or
|
|
156415
156526
|
* `a:alphaMod`/`a:alphaOff`) opacity onto opaque white.
|
|
@@ -156976,6 +157087,31 @@ var init_PptxHandlerRuntimeSlideUtils = __esm({
|
|
|
156976
157087
|
const masterFormatScheme = this.masterThemeFormatSchemes.get(masterPath);
|
|
156977
157088
|
this.themeFormatScheme = masterFormatScheme ?? this.globalThemeFormatSchemeSnapshot;
|
|
156978
157089
|
}
|
|
157090
|
+
/**
|
|
157091
|
+
* Run `work` with one master's theme state active and no slide colour-map override, then
|
|
157092
|
+
* put back whatever state was active before, so a part parsed on request (a layout preview)
|
|
157093
|
+
* resolves through its own master without disturbing the caller's.
|
|
157094
|
+
*/
|
|
157095
|
+
async withMasterThemeState(masterPath, work) {
|
|
157096
|
+
const saved = {
|
|
157097
|
+
colors: this.themeColorMap,
|
|
157098
|
+
fonts: this.themeFontMap,
|
|
157099
|
+
format: this.themeFormatScheme,
|
|
157100
|
+
clrMap: this.currentMasterClrMap,
|
|
157101
|
+
slideClrMap: this.currentSlideClrMapOverride
|
|
157102
|
+
};
|
|
157103
|
+
this.applyMasterThemeState(masterPath);
|
|
157104
|
+
this.currentSlideClrMapOverride = null;
|
|
157105
|
+
try {
|
|
157106
|
+
return await work();
|
|
157107
|
+
} finally {
|
|
157108
|
+
this.themeColorMap = saved.colors;
|
|
157109
|
+
this.themeFontMap = saved.fonts;
|
|
157110
|
+
this.themeFormatScheme = saved.format;
|
|
157111
|
+
this.currentMasterClrMap = saved.clrMap;
|
|
157112
|
+
this.currentSlideClrMapOverride = saved.slideClrMap;
|
|
157113
|
+
}
|
|
157114
|
+
}
|
|
156979
157115
|
/**
|
|
156980
157116
|
* Extract the `p:bg/@showAnimation` flag from a slide's XML.
|
|
156981
157117
|
* Returns `true` when the background should animate, `false` when
|
|
@@ -157890,18 +158026,33 @@ var init_PptxHandlerRuntimeAuxiliaryMasterElements = __esm({
|
|
|
157890
158026
|
this.rememberUnparsedMasterNodes(partPath, spTree, part.elements);
|
|
157891
158027
|
}
|
|
157892
158028
|
/**
|
|
157893
|
-
*
|
|
158029
|
+
* Resolve the background of every slide master and of each of its layouts,
|
|
158030
|
+
* and populate their `elements`.
|
|
157894
158031
|
*
|
|
157895
|
-
* Scheme colours on a master
|
|
157896
|
-
* master's colour map and theme, so the active master state is
|
|
157897
|
-
* per part and reset to the deck-wide snapshot afterwards.
|
|
158032
|
+
* Scheme colours on a master, its own `p:bgRef` included, must resolve
|
|
158033
|
+
* through that master's colour map and theme, so the active master state is
|
|
158034
|
+
* switched per part and reset to the deck-wide snapshot afterwards.
|
|
157898
158035
|
*/
|
|
157899
158036
|
async enrichSlideMasterElements(masters) {
|
|
157900
158037
|
for (const master of masters) {
|
|
157901
158038
|
try {
|
|
157902
158039
|
this.applyMasterThemeState(master.path);
|
|
158040
|
+
master.backgroundColor = this.extractTemplateBackgroundColor(
|
|
158041
|
+
this.masterXmlMap.get(master.path),
|
|
158042
|
+
"p:sldMaster",
|
|
158043
|
+
null
|
|
158044
|
+
);
|
|
157903
158045
|
await this.enrichMasterPartElements(master, "p:sldMaster");
|
|
157904
158046
|
for (const layout of master.layouts ?? []) {
|
|
158047
|
+
const layoutXml3 = this.layoutXmlMap.get(layout.path);
|
|
158048
|
+
const backgroundColor = this.extractTemplateBackgroundColor(
|
|
158049
|
+
layoutXml3,
|
|
158050
|
+
"p:sldLayout",
|
|
158051
|
+
layoutXml3 ? this.parseLayoutClrMapOverride(layoutXml3) : null
|
|
158052
|
+
);
|
|
158053
|
+
if (backgroundColor) {
|
|
158054
|
+
layout.backgroundColor = backgroundColor;
|
|
158055
|
+
}
|
|
157905
158056
|
await this.enrichMasterPartElements(layout, "p:sldLayout");
|
|
157906
158057
|
}
|
|
157907
158058
|
} catch (e) {
|
|
@@ -158172,20 +158323,23 @@ var init_PptxHandlerRuntimeLayoutPreviews = __esm({
|
|
|
158172
158323
|
this.layoutCache.delete(layoutPath);
|
|
158173
158324
|
this.eagerDecodeImages = true;
|
|
158174
158325
|
}
|
|
158175
|
-
|
|
158326
|
+
const masterPath = this.resolveMasterPathForLayout(layoutPath);
|
|
158327
|
+
let parsed;
|
|
158176
158328
|
try {
|
|
158177
|
-
|
|
158329
|
+
parsed = await this.withMasterThemeState(masterPath, async () => ({
|
|
158330
|
+
elements: await this.getLayoutElementsByPath(layoutPath),
|
|
158331
|
+
background: this.resolveLayoutPreviewBackground(layoutXml3, masterPath)
|
|
158332
|
+
}));
|
|
158178
158333
|
} finally {
|
|
158179
158334
|
this.eagerDecodeImages = previousEagerDecode;
|
|
158180
158335
|
}
|
|
158181
158336
|
const cSld = xmlPath(layoutXml3, "p:sldLayout", "p:cSld");
|
|
158182
|
-
const background = this.resolveLayoutPreviewBackground(layoutPath, cSld);
|
|
158183
158337
|
const preview = {
|
|
158184
158338
|
path: layoutPath,
|
|
158185
158339
|
width: this.rawSlideWidthEmu / exports.EMU_PER_PX,
|
|
158186
158340
|
height: this.rawSlideHeightEmu / exports.EMU_PER_PX,
|
|
158187
|
-
...background,
|
|
158188
|
-
elements:
|
|
158341
|
+
...parsed.background,
|
|
158342
|
+
elements: parsed.elements,
|
|
158189
158343
|
placeholders: this.extractPlaceholderList(xmlChild(cSld, "p:spTree"))
|
|
158190
158344
|
};
|
|
158191
158345
|
this.layoutPreviewCache.set(layoutPath, preview);
|
|
@@ -158221,19 +158375,18 @@ var init_PptxHandlerRuntimeLayoutPreviews = __esm({
|
|
|
158221
158375
|
}
|
|
158222
158376
|
/**
|
|
158223
158377
|
* Resolve the background a layout thumbnail should paint, falling back to
|
|
158224
|
-
* the layout's master when the layout itself declares none.
|
|
158378
|
+
* the layout's master when the layout itself declares none. Runs with the
|
|
158379
|
+
* master active; the layout's own colour map override applies to an
|
|
158380
|
+
* inherited background too, as a slide's does.
|
|
158225
158381
|
*/
|
|
158226
|
-
resolveLayoutPreviewBackground(
|
|
158227
|
-
const
|
|
158228
|
-
|
|
158229
|
-
|
|
158230
|
-
|
|
158231
|
-
|
|
158232
|
-
const masterXml = masterPath ? this.masterXmlMap.get(masterPath) : void 0;
|
|
158233
|
-
const masterBackground = this.parseBackgroundColor(
|
|
158234
|
-
xmlChild(xmlPath(masterXml, "p:sldMaster", "p:cSld"), "p:bg")
|
|
158382
|
+
resolveLayoutPreviewBackground(layoutXml3, masterPath) {
|
|
158383
|
+
const clrMapOverride = this.parseLayoutClrMapOverride(layoutXml3);
|
|
158384
|
+
const backgroundColor = this.extractTemplateBackgroundColor(layoutXml3, "p:sldLayout", clrMapOverride) ?? this.extractTemplateBackgroundColor(
|
|
158385
|
+
masterPath ? this.masterXmlMap.get(masterPath) : void 0,
|
|
158386
|
+
"p:sldMaster",
|
|
158387
|
+
clrMapOverride
|
|
158235
158388
|
);
|
|
158236
|
-
return
|
|
158389
|
+
return backgroundColor ? { backgroundColor } : {};
|
|
158237
158390
|
}
|
|
158238
158391
|
};
|
|
158239
158392
|
}
|
|
@@ -159041,15 +159194,298 @@ var init_PptxHandlerRuntimeThemeRefResolution = __esm({
|
|
|
159041
159194
|
}
|
|
159042
159195
|
});
|
|
159043
159196
|
|
|
159197
|
+
// pptx/core/core/runtime/theme-scheme-edit.ts
|
|
159198
|
+
function normalizeHex6(hex3) {
|
|
159199
|
+
return hex3.replace(/^#/, "").toUpperCase();
|
|
159200
|
+
}
|
|
159201
|
+
function buildSrgbClrNode(hex3) {
|
|
159202
|
+
return { "a:srgbClr": { "@_val": normalizeHex6(hex3) } };
|
|
159203
|
+
}
|
|
159204
|
+
function themeElementsOf(data) {
|
|
159205
|
+
const root = data["a:theme"];
|
|
159206
|
+
return root?.["a:themeElements"];
|
|
159207
|
+
}
|
|
159208
|
+
function applyColorSchemeToThemeXml(data, colorScheme) {
|
|
159209
|
+
const themeElements = themeElementsOf(data);
|
|
159210
|
+
if (!themeElements) {
|
|
159211
|
+
return false;
|
|
159212
|
+
}
|
|
159213
|
+
const clrScheme = themeElements["a:clrScheme"] ?? {};
|
|
159214
|
+
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159215
|
+
clrScheme[`a:${key2}`] = buildSrgbClrNode(colorScheme[key2]);
|
|
159216
|
+
}
|
|
159217
|
+
themeElements["a:clrScheme"] = clrScheme;
|
|
159218
|
+
return true;
|
|
159219
|
+
}
|
|
159220
|
+
function applyLatinTypeface(group, latin) {
|
|
159221
|
+
const font = group ?? {};
|
|
159222
|
+
font["a:latin"] = { "@_typeface": latin };
|
|
159223
|
+
if (!font["a:ea"]) {
|
|
159224
|
+
font["a:ea"] = { "@_typeface": "" };
|
|
159225
|
+
}
|
|
159226
|
+
if (!font["a:cs"]) {
|
|
159227
|
+
font["a:cs"] = { "@_typeface": "" };
|
|
159228
|
+
}
|
|
159229
|
+
return font;
|
|
159230
|
+
}
|
|
159231
|
+
function applyFontSchemeToThemeXml(data, fontScheme) {
|
|
159232
|
+
const themeElements = themeElementsOf(data);
|
|
159233
|
+
if (!themeElements) {
|
|
159234
|
+
return false;
|
|
159235
|
+
}
|
|
159236
|
+
const fntScheme = themeElements["a:fontScheme"] ?? {};
|
|
159237
|
+
if (fontScheme.majorFont?.latin) {
|
|
159238
|
+
fntScheme["a:majorFont"] = applyLatinTypeface(
|
|
159239
|
+
fntScheme["a:majorFont"],
|
|
159240
|
+
fontScheme.majorFont.latin
|
|
159241
|
+
);
|
|
159242
|
+
}
|
|
159243
|
+
if (fontScheme.minorFont?.latin) {
|
|
159244
|
+
fntScheme["a:minorFont"] = applyLatinTypeface(
|
|
159245
|
+
fntScheme["a:minorFont"],
|
|
159246
|
+
fontScheme.minorFont.latin
|
|
159247
|
+
);
|
|
159248
|
+
}
|
|
159249
|
+
themeElements["a:fontScheme"] = fntScheme;
|
|
159250
|
+
return true;
|
|
159251
|
+
}
|
|
159252
|
+
function applyColorSchemeToMap(map, colorScheme, clrMap) {
|
|
159253
|
+
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159254
|
+
map[key2] = normalizeHex6(colorScheme[key2]);
|
|
159255
|
+
}
|
|
159256
|
+
for (const [alias, defaultTarget] of Object.entries(DEFAULT_CLR_MAP_ALIASES)) {
|
|
159257
|
+
const target = clrMap?.[alias] ?? defaultTarget;
|
|
159258
|
+
const resolved = map[target];
|
|
159259
|
+
if (resolved !== void 0) {
|
|
159260
|
+
map[alias] = resolved;
|
|
159261
|
+
}
|
|
159262
|
+
}
|
|
159263
|
+
}
|
|
159264
|
+
function applyFontSchemeToMap(map, fontScheme) {
|
|
159265
|
+
if (fontScheme.majorFont?.latin) {
|
|
159266
|
+
map["mj-lt"] = fontScheme.majorFont.latin;
|
|
159267
|
+
map["mj-ea"] = fontScheme.majorFont.latin;
|
|
159268
|
+
map["mj-cs"] = fontScheme.majorFont.latin;
|
|
159269
|
+
}
|
|
159270
|
+
if (fontScheme.minorFont?.latin) {
|
|
159271
|
+
map["mn-lt"] = fontScheme.minorFont.latin;
|
|
159272
|
+
map["mn-ea"] = fontScheme.minorFont.latin;
|
|
159273
|
+
map["mn-cs"] = fontScheme.minorFont.latin;
|
|
159274
|
+
}
|
|
159275
|
+
}
|
|
159276
|
+
var THEME_COLOR_SCHEME_KEYS2, DEFAULT_CLR_MAP_ALIASES;
|
|
159277
|
+
var init_theme_scheme_edit = __esm({
|
|
159278
|
+
"pptx/core/core/runtime/theme-scheme-edit.ts"() {
|
|
159279
|
+
THEME_COLOR_SCHEME_KEYS2 = [
|
|
159280
|
+
"dk1",
|
|
159281
|
+
"lt1",
|
|
159282
|
+
"dk2",
|
|
159283
|
+
"lt2",
|
|
159284
|
+
"accent1",
|
|
159285
|
+
"accent2",
|
|
159286
|
+
"accent3",
|
|
159287
|
+
"accent4",
|
|
159288
|
+
"accent5",
|
|
159289
|
+
"accent6",
|
|
159290
|
+
"hlink",
|
|
159291
|
+
"folHlink"
|
|
159292
|
+
];
|
|
159293
|
+
DEFAULT_CLR_MAP_ALIASES = {
|
|
159294
|
+
tx1: "dk1",
|
|
159295
|
+
bg1: "lt1",
|
|
159296
|
+
tx2: "dk2",
|
|
159297
|
+
bg2: "lt2"
|
|
159298
|
+
};
|
|
159299
|
+
}
|
|
159300
|
+
});
|
|
159301
|
+
|
|
159302
|
+
// pptx/core/core/runtime/theme-part-model.ts
|
|
159303
|
+
function colorSchemeFromMap(colorMap) {
|
|
159304
|
+
const scheme = {};
|
|
159305
|
+
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159306
|
+
scheme[key2] = colorMap[key2] || "";
|
|
159307
|
+
}
|
|
159308
|
+
return scheme;
|
|
159309
|
+
}
|
|
159310
|
+
function fontGroup(fontMap, prefix, byScript) {
|
|
159311
|
+
const latin = fontMap[`${prefix}-lt`];
|
|
159312
|
+
const eastAsia = fontMap[`${prefix}-ea`];
|
|
159313
|
+
const complexScript = fontMap[`${prefix}-cs`];
|
|
159314
|
+
return {
|
|
159315
|
+
...latin ? { latin } : {},
|
|
159316
|
+
...eastAsia ? { eastAsia } : {},
|
|
159317
|
+
...complexScript ? { complexScript } : {},
|
|
159318
|
+
...Object.keys(byScript).length > 0 ? { byScript: { ...byScript } } : {}
|
|
159319
|
+
};
|
|
159320
|
+
}
|
|
159321
|
+
function fontSchemeFromMap(fontMap, majorByScript, minorByScript) {
|
|
159322
|
+
return {
|
|
159323
|
+
majorFont: fontGroup(fontMap, "mj", majorByScript),
|
|
159324
|
+
minorFont: fontGroup(fontMap, "mn", minorByScript)
|
|
159325
|
+
};
|
|
159326
|
+
}
|
|
159327
|
+
var init_theme_part_model = __esm({
|
|
159328
|
+
"pptx/core/core/runtime/theme-part-model.ts"() {
|
|
159329
|
+
init_theme_scheme_edit();
|
|
159330
|
+
}
|
|
159331
|
+
});
|
|
159332
|
+
|
|
159333
|
+
// pptx/core/core/runtime/PptxHandlerRuntimeThemePartModel.ts
|
|
159334
|
+
var FONT_SLOTS, PptxHandlerRuntime84;
|
|
159335
|
+
var init_PptxHandlerRuntimeThemePartModel = __esm({
|
|
159336
|
+
"pptx/core/core/runtime/PptxHandlerRuntimeThemePartModel.ts"() {
|
|
159337
|
+
init_PptxHandlerRuntimeThemeRefResolution();
|
|
159338
|
+
init_theme_part_model();
|
|
159339
|
+
init_theme_scheme_edit();
|
|
159340
|
+
FONT_SLOTS = [
|
|
159341
|
+
["mj", "a:majorFont"],
|
|
159342
|
+
["mn", "a:minorFont"]
|
|
159343
|
+
];
|
|
159344
|
+
PptxHandlerRuntime84 = class extends PptxHandlerRuntime83 {
|
|
159345
|
+
/** Parse one theme part's XML. Side-effect free. */
|
|
159346
|
+
parseThemePartXml(themeXml3) {
|
|
159347
|
+
const themeData = this.parser.parse(themeXml3);
|
|
159348
|
+
const themeRoot = themeData["a:theme"];
|
|
159349
|
+
const themeElements = themeRoot?.["a:themeElements"];
|
|
159350
|
+
const colorScheme = themeElements?.["a:clrScheme"];
|
|
159351
|
+
const fontScheme = themeElements?.["a:fontScheme"];
|
|
159352
|
+
const fmtScheme = themeElements?.["a:fmtScheme"];
|
|
159353
|
+
const text2 = (value) => String(value || "").trim() || void 0;
|
|
159354
|
+
const colorMap = { ...this.getDefaultSchemeColorMap() };
|
|
159355
|
+
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159356
|
+
const parsed = this.parseColorChoice(colorScheme?.[`a:${key2}`]);
|
|
159357
|
+
if (parsed) {
|
|
159358
|
+
colorMap[key2] = parsed;
|
|
159359
|
+
}
|
|
159360
|
+
}
|
|
159361
|
+
const fontMap = {};
|
|
159362
|
+
const typeface = (node) => this.normalizeTypefaceToken(String(node?.["@_typeface"] || ""));
|
|
159363
|
+
for (const [prefix, tag] of FONT_SLOTS) {
|
|
159364
|
+
const group = fontScheme?.[tag];
|
|
159365
|
+
const latin = typeface(group?.["a:latin"]);
|
|
159366
|
+
if (latin) {
|
|
159367
|
+
fontMap[`${prefix}-lt`] = latin;
|
|
159368
|
+
fontMap[`${prefix}-ea`] = latin;
|
|
159369
|
+
fontMap[`${prefix}-cs`] = latin;
|
|
159370
|
+
}
|
|
159371
|
+
const eastAsia = typeface(group?.["a:ea"]);
|
|
159372
|
+
if (eastAsia) {
|
|
159373
|
+
fontMap[`${prefix}-ea`] = eastAsia;
|
|
159374
|
+
}
|
|
159375
|
+
const complexScript = typeface(group?.["a:cs"]);
|
|
159376
|
+
if (complexScript) {
|
|
159377
|
+
fontMap[`${prefix}-cs`] = complexScript;
|
|
159378
|
+
}
|
|
159379
|
+
}
|
|
159380
|
+
const objectDefaultsNode = themeRoot?.["a:objectDefaults"];
|
|
159381
|
+
const objectDefaults = objectDefaultsNode && {
|
|
159382
|
+
spDef: objectDefaultsNode["a:spDef"],
|
|
159383
|
+
lnDef: objectDefaultsNode["a:lnDef"],
|
|
159384
|
+
txDef: objectDefaultsNode["a:txDef"]
|
|
159385
|
+
};
|
|
159386
|
+
const hasObjectDefaults = objectDefaults !== void 0 && (objectDefaults.spDef !== void 0 || objectDefaults.lnDef !== void 0 || objectDefaults.txDef !== void 0);
|
|
159387
|
+
return {
|
|
159388
|
+
name: text2(themeRoot?.["@_name"]),
|
|
159389
|
+
colorSchemeName: text2(colorScheme?.["@_name"]),
|
|
159390
|
+
fontSchemeName: text2(fontScheme?.["@_name"]),
|
|
159391
|
+
colorMap,
|
|
159392
|
+
fontMap,
|
|
159393
|
+
// Per-script fonts (`<a:font script="Hans|Hant|Arab|...">`): M4.
|
|
159394
|
+
majorFontScripts: this.collectFontScriptOverrides(
|
|
159395
|
+
fontScheme?.["a:majorFont"]
|
|
159396
|
+
),
|
|
159397
|
+
minorFontScripts: this.collectFontScriptOverrides(
|
|
159398
|
+
fontScheme?.["a:minorFont"]
|
|
159399
|
+
),
|
|
159400
|
+
// objectDefaults: M5.
|
|
159401
|
+
objectDefaults: hasObjectDefaults ? objectDefaults : void 0,
|
|
159402
|
+
extraClrSchemeLst: themeRoot?.["a:extraClrSchemeLst"],
|
|
159403
|
+
custClrLst: themeRoot?.["a:custClrLst"],
|
|
159404
|
+
extLst: themeRoot?.["a:extLst"],
|
|
159405
|
+
formatScheme: fmtScheme ? this.parseFormatScheme(fmtScheme) : void 0
|
|
159406
|
+
};
|
|
159407
|
+
}
|
|
159408
|
+
/**
|
|
159409
|
+
* Record a parsed part under its path: its original XML (byte-stable passthrough on save,
|
|
159410
|
+
* C-H3), its names, per-script fonts and the raw subtrees the save re-emits.
|
|
159411
|
+
*/
|
|
159412
|
+
cacheThemePartModel(themePath, themeXml3, model) {
|
|
159413
|
+
this.originalThemeXmlByPath.set(themePath, themeXml3);
|
|
159414
|
+
const keyed = [
|
|
159415
|
+
[this.masterThemeNames, model.name],
|
|
159416
|
+
[this.masterThemeColorSchemeNames, model.colorSchemeName],
|
|
159417
|
+
[this.masterThemeFontSchemeNames, model.fontSchemeName],
|
|
159418
|
+
[this.masterThemeObjectDefaults, model.objectDefaults],
|
|
159419
|
+
[this.masterThemeExtraClrSchemeLst, model.extraClrSchemeLst],
|
|
159420
|
+
[this.masterThemeCustClrLst, model.custClrLst],
|
|
159421
|
+
[this.masterThemeExtLst, model.extLst]
|
|
159422
|
+
];
|
|
159423
|
+
for (const [map, value] of keyed) {
|
|
159424
|
+
if (value !== void 0) {
|
|
159425
|
+
map.set(themePath, value);
|
|
159426
|
+
}
|
|
159427
|
+
}
|
|
159428
|
+
if (Object.keys(model.majorFontScripts).length > 0) {
|
|
159429
|
+
this.masterThemeMajorFontScripts.set(themePath, model.majorFontScripts);
|
|
159430
|
+
}
|
|
159431
|
+
if (Object.keys(model.minorFontScripts).length > 0) {
|
|
159432
|
+
this.masterThemeMinorFontScripts.set(themePath, model.minorFontScripts);
|
|
159433
|
+
}
|
|
159434
|
+
}
|
|
159435
|
+
/**
|
|
159436
|
+
* Parse `<a:font script="..." typeface="..."/>` children of a major or minor font node into a
|
|
159437
|
+
* `script -> typeface` dictionary. fast-xml-parser collapses repeated tags into arrays, so the
|
|
159438
|
+
* array form is walked regardless of how many siblings are present. Phase 4 Stream A / M4.
|
|
159439
|
+
*/
|
|
159440
|
+
collectFontScriptOverrides(fontNode) {
|
|
159441
|
+
const overrides28 = {};
|
|
159442
|
+
if (!fontNode) {
|
|
159443
|
+
return overrides28;
|
|
159444
|
+
}
|
|
159445
|
+
const fontEntries = this.ensureArray(fontNode["a:font"]);
|
|
159446
|
+
for (const entry2 of fontEntries) {
|
|
159447
|
+
const script = String(entry2?.["@_script"] || "").trim();
|
|
159448
|
+
const typeface = this.normalizeTypefaceToken(String(entry2?.["@_typeface"] || ""));
|
|
159449
|
+
if (script && typeface) {
|
|
159450
|
+
overrides28[script] = typeface;
|
|
159451
|
+
}
|
|
159452
|
+
}
|
|
159453
|
+
return overrides28;
|
|
159454
|
+
}
|
|
159455
|
+
/**
|
|
159456
|
+
* The colour, font and format schemes and name of one theme part in the package, as the part holds
|
|
159457
|
+
* them now (a scheme edit already written to it included). Reads only: the loaded theme, the
|
|
159458
|
+
* masters and what a save writes are unchanged. `undefined` when the package has no such part.
|
|
159459
|
+
*/
|
|
159460
|
+
async getThemePartSchemes(themePath) {
|
|
159461
|
+
const path3 = themePath.trim().replace(/\\/g, "/");
|
|
159462
|
+
const themeXml3 = await this.zip.file(path3)?.async("string");
|
|
159463
|
+
if (themeXml3 === void 0) {
|
|
159464
|
+
return void 0;
|
|
159465
|
+
}
|
|
159466
|
+
const model = this.parseThemePartXml(themeXml3);
|
|
159467
|
+
return {
|
|
159468
|
+
path: path3,
|
|
159469
|
+
...model.name ? { name: model.name } : {},
|
|
159470
|
+
colorScheme: colorSchemeFromMap(model.colorMap),
|
|
159471
|
+
fontScheme: fontSchemeFromMap(model.fontMap, model.majorFontScripts, model.minorFontScripts),
|
|
159472
|
+
...model.formatScheme ? { formatScheme: model.formatScheme } : {}
|
|
159473
|
+
};
|
|
159474
|
+
}
|
|
159475
|
+
};
|
|
159476
|
+
}
|
|
159477
|
+
});
|
|
159478
|
+
|
|
159044
159479
|
// pptx/core/core/runtime/PptxHandlerRuntimeThemeLoading.ts
|
|
159045
159480
|
function isPresentationThemePartPath(path3) {
|
|
159046
159481
|
return /^ppt\/theme\/(?!themeOverride)[^/]+\.xml$/iu.test(path3);
|
|
159047
159482
|
}
|
|
159048
|
-
var
|
|
159483
|
+
var PptxHandlerRuntime85;
|
|
159049
159484
|
var init_PptxHandlerRuntimeThemeLoading = __esm({
|
|
159050
159485
|
"pptx/core/core/runtime/PptxHandlerRuntimeThemeLoading.ts"() {
|
|
159051
|
-
|
|
159052
|
-
|
|
159486
|
+
init_PptxHandlerRuntimeThemePartModel();
|
|
159487
|
+
init_theme_part_model();
|
|
159488
|
+
PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
159053
159489
|
async resolvePrimaryThemePath() {
|
|
159054
159490
|
const masterFiles = this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);
|
|
159055
159491
|
if (!masterFiles || masterFiles.length === 0) {
|
|
@@ -159125,42 +159561,12 @@ var init_PptxHandlerRuntimeThemeLoading = __esm({
|
|
|
159125
159561
|
if (!hasColors && !hasFonts) {
|
|
159126
159562
|
return void 0;
|
|
159127
159563
|
}
|
|
159128
|
-
|
|
159129
|
-
|
|
159130
|
-
|
|
159131
|
-
|
|
159132
|
-
|
|
159133
|
-
|
|
159134
|
-
lt2: this.themeColorMap["lt2"] || "",
|
|
159135
|
-
accent1: this.themeColorMap["accent1"] || "",
|
|
159136
|
-
accent2: this.themeColorMap["accent2"] || "",
|
|
159137
|
-
accent3: this.themeColorMap["accent3"] || "",
|
|
159138
|
-
accent4: this.themeColorMap["accent4"] || "",
|
|
159139
|
-
accent5: this.themeColorMap["accent5"] || "",
|
|
159140
|
-
accent6: this.themeColorMap["accent6"] || "",
|
|
159141
|
-
hlink: this.themeColorMap["hlink"] || "",
|
|
159142
|
-
folHlink: this.themeColorMap["folHlink"] || ""
|
|
159143
|
-
};
|
|
159144
|
-
}
|
|
159145
|
-
let fontScheme;
|
|
159146
|
-
if (hasFonts) {
|
|
159147
|
-
const majorByScript = this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts);
|
|
159148
|
-
const minorByScript = this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);
|
|
159149
|
-
fontScheme = {
|
|
159150
|
-
majorFont: {
|
|
159151
|
-
latin: this.themeFontMap["mj-lt"],
|
|
159152
|
-
eastAsia: this.themeFontMap["mj-ea"],
|
|
159153
|
-
complexScript: this.themeFontMap["mj-cs"],
|
|
159154
|
-
...Object.keys(majorByScript).length > 0 ? { byScript: majorByScript } : {}
|
|
159155
|
-
},
|
|
159156
|
-
minorFont: {
|
|
159157
|
-
latin: this.themeFontMap["mn-lt"],
|
|
159158
|
-
eastAsia: this.themeFontMap["mn-ea"],
|
|
159159
|
-
complexScript: this.themeFontMap["mn-cs"],
|
|
159160
|
-
...Object.keys(minorByScript).length > 0 ? { byScript: minorByScript } : {}
|
|
159161
|
-
}
|
|
159162
|
-
};
|
|
159163
|
-
}
|
|
159564
|
+
const colorScheme = hasColors ? colorSchemeFromMap(this.themeColorMap) : void 0;
|
|
159565
|
+
const fontScheme = hasFonts ? fontSchemeFromMap(
|
|
159566
|
+
this.themeFontMap,
|
|
159567
|
+
this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts),
|
|
159568
|
+
this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts)
|
|
159569
|
+
) : void 0;
|
|
159164
159570
|
return {
|
|
159165
159571
|
colorScheme,
|
|
159166
159572
|
fontScheme,
|
|
@@ -159237,134 +159643,10 @@ var init_PptxHandlerRuntimeThemeLoading = __esm({
|
|
|
159237
159643
|
return null;
|
|
159238
159644
|
}
|
|
159239
159645
|
const themeXml3 = await themeFile.async("string");
|
|
159240
|
-
this.
|
|
159241
|
-
|
|
159242
|
-
|
|
159243
|
-
const themeElements = themeRoot?.["a:themeElements"];
|
|
159244
|
-
const colorScheme = themeElements?.["a:clrScheme"];
|
|
159245
|
-
const fontScheme = themeElements?.["a:fontScheme"];
|
|
159246
|
-
const fmtScheme = themeElements?.["a:fmtScheme"];
|
|
159247
|
-
const themeName = String(themeRoot?.["@_name"] || "").trim();
|
|
159248
|
-
if (themeName) {
|
|
159249
|
-
this.masterThemeNames.set(themePath, themeName);
|
|
159250
|
-
}
|
|
159251
|
-
const colorSchemeName = String(colorScheme?.["@_name"] || "").trim();
|
|
159252
|
-
if (colorSchemeName) {
|
|
159253
|
-
this.masterThemeColorSchemeNames.set(themePath, colorSchemeName);
|
|
159254
|
-
}
|
|
159255
|
-
const fontSchemeName = String(fontScheme?.["@_name"] || "").trim();
|
|
159256
|
-
if (fontSchemeName) {
|
|
159257
|
-
this.masterThemeFontSchemeNames.set(themePath, fontSchemeName);
|
|
159258
|
-
}
|
|
159259
|
-
const defaultMap = this.getDefaultSchemeColorMap();
|
|
159260
|
-
const colorMap = { ...defaultMap };
|
|
159261
|
-
if (colorScheme) {
|
|
159262
|
-
const schemeKeys = [
|
|
159263
|
-
"dk1",
|
|
159264
|
-
"lt1",
|
|
159265
|
-
"dk2",
|
|
159266
|
-
"lt2",
|
|
159267
|
-
"accent1",
|
|
159268
|
-
"accent2",
|
|
159269
|
-
"accent3",
|
|
159270
|
-
"accent4",
|
|
159271
|
-
"accent5",
|
|
159272
|
-
"accent6",
|
|
159273
|
-
"hlink",
|
|
159274
|
-
"folHlink"
|
|
159275
|
-
];
|
|
159276
|
-
for (const key2 of schemeKeys) {
|
|
159277
|
-
const colorNode = colorScheme[`a:${key2}`];
|
|
159278
|
-
const parsed = this.parseColorChoice(colorNode);
|
|
159279
|
-
if (parsed) {
|
|
159280
|
-
colorMap[key2] = parsed;
|
|
159281
|
-
}
|
|
159282
|
-
}
|
|
159283
|
-
}
|
|
159284
|
-
const majorFontNode = fontScheme?.["a:majorFont"];
|
|
159285
|
-
const minorFontNode = fontScheme?.["a:minorFont"];
|
|
159286
|
-
const majorLatin = majorFontNode?.["a:latin"];
|
|
159287
|
-
const minorLatin = minorFontNode?.["a:latin"];
|
|
159288
|
-
const majorFont = this.normalizeTypefaceToken(String(majorLatin?.["@_typeface"] || ""));
|
|
159289
|
-
const minorFont = this.normalizeTypefaceToken(String(minorLatin?.["@_typeface"] || ""));
|
|
159290
|
-
const fontMap = {};
|
|
159291
|
-
if (majorFont) {
|
|
159292
|
-
fontMap["mj-lt"] = majorFont;
|
|
159293
|
-
fontMap["mj-ea"] = majorFont;
|
|
159294
|
-
fontMap["mj-cs"] = majorFont;
|
|
159295
|
-
}
|
|
159296
|
-
if (minorFont) {
|
|
159297
|
-
fontMap["mn-lt"] = minorFont;
|
|
159298
|
-
fontMap["mn-ea"] = minorFont;
|
|
159299
|
-
fontMap["mn-cs"] = minorFont;
|
|
159300
|
-
}
|
|
159301
|
-
const majorEa = this.normalizeTypefaceToken(
|
|
159302
|
-
String(majorFontNode?.["a:ea"]?.["@_typeface"] || "")
|
|
159303
|
-
);
|
|
159304
|
-
if (majorEa) {
|
|
159305
|
-
fontMap["mj-ea"] = majorEa;
|
|
159306
|
-
}
|
|
159307
|
-
const majorCs = this.normalizeTypefaceToken(
|
|
159308
|
-
String(majorFontNode?.["a:cs"]?.["@_typeface"] || "")
|
|
159309
|
-
);
|
|
159310
|
-
if (majorCs) {
|
|
159311
|
-
fontMap["mj-cs"] = majorCs;
|
|
159312
|
-
}
|
|
159313
|
-
const minorEa = this.normalizeTypefaceToken(
|
|
159314
|
-
String(minorFontNode?.["a:ea"]?.["@_typeface"] || "")
|
|
159315
|
-
);
|
|
159316
|
-
if (minorEa) {
|
|
159317
|
-
fontMap["mn-ea"] = minorEa;
|
|
159318
|
-
}
|
|
159319
|
-
const minorCs = this.normalizeTypefaceToken(
|
|
159320
|
-
String(minorFontNode?.["a:cs"]?.["@_typeface"] || "")
|
|
159321
|
-
);
|
|
159322
|
-
if (minorCs) {
|
|
159323
|
-
fontMap["mn-cs"] = minorCs;
|
|
159324
|
-
}
|
|
159325
|
-
const majorScripts = this.collectFontScriptOverrides(majorFontNode);
|
|
159326
|
-
if (Object.keys(majorScripts).length > 0) {
|
|
159327
|
-
this.masterThemeMajorFontScripts.set(themePath, majorScripts);
|
|
159328
|
-
}
|
|
159329
|
-
const minorScripts = this.collectFontScriptOverrides(minorFontNode);
|
|
159330
|
-
if (Object.keys(minorScripts).length > 0) {
|
|
159331
|
-
this.masterThemeMinorFontScripts.set(themePath, minorScripts);
|
|
159332
|
-
}
|
|
159333
|
-
const objectDefaultsNode = themeRoot?.["a:objectDefaults"];
|
|
159334
|
-
if (objectDefaultsNode) {
|
|
159335
|
-
const od = {
|
|
159336
|
-
spDef: objectDefaultsNode["a:spDef"],
|
|
159337
|
-
lnDef: objectDefaultsNode["a:lnDef"],
|
|
159338
|
-
txDef: objectDefaultsNode["a:txDef"]
|
|
159339
|
-
};
|
|
159340
|
-
if (od.spDef !== void 0 || od.lnDef !== void 0 || od.txDef !== void 0) {
|
|
159341
|
-
this.masterThemeObjectDefaults.set(themePath, od);
|
|
159342
|
-
}
|
|
159343
|
-
}
|
|
159344
|
-
const extraClrSchemeLst = themeRoot?.["a:extraClrSchemeLst"];
|
|
159345
|
-
if (extraClrSchemeLst !== void 0) {
|
|
159346
|
-
this.masterThemeExtraClrSchemeLst.set(themePath, extraClrSchemeLst);
|
|
159347
|
-
}
|
|
159348
|
-
const custClrLst = themeRoot?.["a:custClrLst"];
|
|
159349
|
-
if (custClrLst !== void 0) {
|
|
159350
|
-
this.masterThemeCustClrLst.set(themePath, custClrLst);
|
|
159351
|
-
}
|
|
159352
|
-
const themeExtLst = themeRoot?.["a:extLst"];
|
|
159353
|
-
if (themeExtLst !== void 0) {
|
|
159354
|
-
this.masterThemeExtLst.set(themePath, themeExtLst);
|
|
159355
|
-
}
|
|
159356
|
-
const formatScheme = fmtScheme ? this.parseFormatScheme(fmtScheme) : void 0;
|
|
159357
|
-
return { colorMap, fontMap, formatScheme };
|
|
159646
|
+
const model = this.parseThemePartXml(themeXml3);
|
|
159647
|
+
this.cacheThemePartModel(themePath, themeXml3, model);
|
|
159648
|
+
return { colorMap: model.colorMap, fontMap: model.fontMap, formatScheme: model.formatScheme };
|
|
159358
159649
|
}
|
|
159359
|
-
/**
|
|
159360
|
-
* Parse `<a:font script="…" typeface="…"/>` children of a major or
|
|
159361
|
-
* minor font node into a `script -> typeface` dictionary.
|
|
159362
|
-
*
|
|
159363
|
-
* fast-xml-parser collapses repeated tags into arrays, so iterate
|
|
159364
|
-
* over the array form regardless of how many siblings are present.
|
|
159365
|
-
*
|
|
159366
|
-
* Phase 4 Stream A / M4.
|
|
159367
|
-
*/
|
|
159368
159650
|
/**
|
|
159369
159651
|
* Flatten a per-theme-path script-override map (`themePath -> {script ->
|
|
159370
159652
|
* typeface}`) into a single `{script -> typeface}` lookup for
|
|
@@ -159382,21 +159664,6 @@ var init_PptxHandlerRuntimeThemeLoading = __esm({
|
|
|
159382
159664
|
}
|
|
159383
159665
|
return aggregate;
|
|
159384
159666
|
}
|
|
159385
|
-
collectFontScriptOverrides(fontNode) {
|
|
159386
|
-
const overrides28 = {};
|
|
159387
|
-
if (!fontNode) {
|
|
159388
|
-
return overrides28;
|
|
159389
|
-
}
|
|
159390
|
-
const fontEntries = this.ensureArray(fontNode["a:font"]);
|
|
159391
|
-
for (const entry2 of fontEntries) {
|
|
159392
|
-
const script = String(entry2?.["@_script"] || "").trim();
|
|
159393
|
-
const typeface = this.normalizeTypefaceToken(String(entry2?.["@_typeface"] || ""));
|
|
159394
|
-
if (script && typeface) {
|
|
159395
|
-
overrides28[script] = typeface;
|
|
159396
|
-
}
|
|
159397
|
-
}
|
|
159398
|
-
return overrides28;
|
|
159399
|
-
}
|
|
159400
159667
|
/**
|
|
159401
159668
|
* Resolve the theme file path referenced by a given master's `.rels`.
|
|
159402
159669
|
* Returns `undefined` when the master has no theme relationship.
|
|
@@ -159482,119 +159749,14 @@ var init_PptxHandlerRuntimeThemeLoading = __esm({
|
|
|
159482
159749
|
}
|
|
159483
159750
|
});
|
|
159484
159751
|
|
|
159485
|
-
// pptx/core/core/runtime/theme-scheme-edit.ts
|
|
159486
|
-
function normalizeHex6(hex3) {
|
|
159487
|
-
return hex3.replace(/^#/, "").toUpperCase();
|
|
159488
|
-
}
|
|
159489
|
-
function buildSrgbClrNode(hex3) {
|
|
159490
|
-
return { "a:srgbClr": { "@_val": normalizeHex6(hex3) } };
|
|
159491
|
-
}
|
|
159492
|
-
function themeElementsOf(data) {
|
|
159493
|
-
const root = data["a:theme"];
|
|
159494
|
-
return root?.["a:themeElements"];
|
|
159495
|
-
}
|
|
159496
|
-
function applyColorSchemeToThemeXml(data, colorScheme) {
|
|
159497
|
-
const themeElements = themeElementsOf(data);
|
|
159498
|
-
if (!themeElements) {
|
|
159499
|
-
return false;
|
|
159500
|
-
}
|
|
159501
|
-
const clrScheme = themeElements["a:clrScheme"] ?? {};
|
|
159502
|
-
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159503
|
-
clrScheme[`a:${key2}`] = buildSrgbClrNode(colorScheme[key2]);
|
|
159504
|
-
}
|
|
159505
|
-
themeElements["a:clrScheme"] = clrScheme;
|
|
159506
|
-
return true;
|
|
159507
|
-
}
|
|
159508
|
-
function applyLatinTypeface(group, latin) {
|
|
159509
|
-
const font = group ?? {};
|
|
159510
|
-
font["a:latin"] = { "@_typeface": latin };
|
|
159511
|
-
if (!font["a:ea"]) {
|
|
159512
|
-
font["a:ea"] = { "@_typeface": "" };
|
|
159513
|
-
}
|
|
159514
|
-
if (!font["a:cs"]) {
|
|
159515
|
-
font["a:cs"] = { "@_typeface": "" };
|
|
159516
|
-
}
|
|
159517
|
-
return font;
|
|
159518
|
-
}
|
|
159519
|
-
function applyFontSchemeToThemeXml(data, fontScheme) {
|
|
159520
|
-
const themeElements = themeElementsOf(data);
|
|
159521
|
-
if (!themeElements) {
|
|
159522
|
-
return false;
|
|
159523
|
-
}
|
|
159524
|
-
const fntScheme = themeElements["a:fontScheme"] ?? {};
|
|
159525
|
-
if (fontScheme.majorFont?.latin) {
|
|
159526
|
-
fntScheme["a:majorFont"] = applyLatinTypeface(
|
|
159527
|
-
fntScheme["a:majorFont"],
|
|
159528
|
-
fontScheme.majorFont.latin
|
|
159529
|
-
);
|
|
159530
|
-
}
|
|
159531
|
-
if (fontScheme.minorFont?.latin) {
|
|
159532
|
-
fntScheme["a:minorFont"] = applyLatinTypeface(
|
|
159533
|
-
fntScheme["a:minorFont"],
|
|
159534
|
-
fontScheme.minorFont.latin
|
|
159535
|
-
);
|
|
159536
|
-
}
|
|
159537
|
-
themeElements["a:fontScheme"] = fntScheme;
|
|
159538
|
-
return true;
|
|
159539
|
-
}
|
|
159540
|
-
function applyColorSchemeToMap(map, colorScheme, clrMap) {
|
|
159541
|
-
for (const key2 of THEME_COLOR_SCHEME_KEYS2) {
|
|
159542
|
-
map[key2] = normalizeHex6(colorScheme[key2]);
|
|
159543
|
-
}
|
|
159544
|
-
for (const [alias, defaultTarget] of Object.entries(DEFAULT_CLR_MAP_ALIASES)) {
|
|
159545
|
-
const target = clrMap?.[alias] ?? defaultTarget;
|
|
159546
|
-
const resolved = map[target];
|
|
159547
|
-
if (resolved !== void 0) {
|
|
159548
|
-
map[alias] = resolved;
|
|
159549
|
-
}
|
|
159550
|
-
}
|
|
159551
|
-
}
|
|
159552
|
-
function applyFontSchemeToMap(map, fontScheme) {
|
|
159553
|
-
if (fontScheme.majorFont?.latin) {
|
|
159554
|
-
map["mj-lt"] = fontScheme.majorFont.latin;
|
|
159555
|
-
map["mj-ea"] = fontScheme.majorFont.latin;
|
|
159556
|
-
map["mj-cs"] = fontScheme.majorFont.latin;
|
|
159557
|
-
}
|
|
159558
|
-
if (fontScheme.minorFont?.latin) {
|
|
159559
|
-
map["mn-lt"] = fontScheme.minorFont.latin;
|
|
159560
|
-
map["mn-ea"] = fontScheme.minorFont.latin;
|
|
159561
|
-
map["mn-cs"] = fontScheme.minorFont.latin;
|
|
159562
|
-
}
|
|
159563
|
-
}
|
|
159564
|
-
var THEME_COLOR_SCHEME_KEYS2, DEFAULT_CLR_MAP_ALIASES;
|
|
159565
|
-
var init_theme_scheme_edit = __esm({
|
|
159566
|
-
"pptx/core/core/runtime/theme-scheme-edit.ts"() {
|
|
159567
|
-
THEME_COLOR_SCHEME_KEYS2 = [
|
|
159568
|
-
"dk1",
|
|
159569
|
-
"lt1",
|
|
159570
|
-
"dk2",
|
|
159571
|
-
"lt2",
|
|
159572
|
-
"accent1",
|
|
159573
|
-
"accent2",
|
|
159574
|
-
"accent3",
|
|
159575
|
-
"accent4",
|
|
159576
|
-
"accent5",
|
|
159577
|
-
"accent6",
|
|
159578
|
-
"hlink",
|
|
159579
|
-
"folHlink"
|
|
159580
|
-
];
|
|
159581
|
-
DEFAULT_CLR_MAP_ALIASES = {
|
|
159582
|
-
tx1: "dk1",
|
|
159583
|
-
bg1: "lt1",
|
|
159584
|
-
tx2: "dk2",
|
|
159585
|
-
bg2: "lt2"
|
|
159586
|
-
};
|
|
159587
|
-
}
|
|
159588
|
-
});
|
|
159589
|
-
|
|
159590
159752
|
// pptx/core/core/runtime/PptxHandlerRuntimeThemeProcessing.ts
|
|
159591
|
-
var THEME_PART_PATTERN,
|
|
159753
|
+
var THEME_PART_PATTERN, PptxHandlerRuntime86;
|
|
159592
159754
|
var init_PptxHandlerRuntimeThemeProcessing = __esm({
|
|
159593
159755
|
"pptx/core/core/runtime/PptxHandlerRuntimeThemeProcessing.ts"() {
|
|
159594
159756
|
init_PptxHandlerRuntimeThemeLoading();
|
|
159595
159757
|
init_theme_scheme_edit();
|
|
159596
159758
|
THEME_PART_PATTERN = /^ppt\/theme\/theme\d+\.xml$/;
|
|
159597
|
-
|
|
159759
|
+
PptxHandlerRuntime86 = class extends PptxHandlerRuntime85 {
|
|
159598
159760
|
/**
|
|
159599
159761
|
* The theme parts an edit should touch, primary theme first.
|
|
159600
159762
|
*
|
|
@@ -159635,8 +159797,9 @@ var init_PptxHandlerRuntimeThemeProcessing = __esm({
|
|
|
159635
159797
|
return this.parser.parse(xml);
|
|
159636
159798
|
}
|
|
159637
159799
|
/**
|
|
159638
|
-
* Parse, edit, and write back every target theme part
|
|
159639
|
-
* cannot apply to (no `a:themeElements`)
|
|
159800
|
+
* Parse, edit, and write back every target theme part (`edit` gets the
|
|
159801
|
+
* part's path too). Parts the edit cannot apply to (no `a:themeElements`)
|
|
159802
|
+
* are left untouched.
|
|
159640
159803
|
*
|
|
159641
159804
|
* @returns the paths that were rewritten
|
|
159642
159805
|
*/
|
|
@@ -159644,7 +159807,7 @@ var init_PptxHandlerRuntimeThemeProcessing = __esm({
|
|
|
159644
159807
|
const written = [];
|
|
159645
159808
|
for (const path3 of await this.resolveThemeEditTargets(themePaths)) {
|
|
159646
159809
|
const data = await this.readThemePart(path3);
|
|
159647
|
-
if (!data || !edit(data)) {
|
|
159810
|
+
if (!data || !edit(data, path3)) {
|
|
159648
159811
|
continue;
|
|
159649
159812
|
}
|
|
159650
159813
|
this.zip.file(path3, this.builder.build(data));
|
|
@@ -159748,15 +159911,90 @@ var init_PptxHandlerRuntimeThemeProcessing = __esm({
|
|
|
159748
159911
|
}
|
|
159749
159912
|
});
|
|
159750
159913
|
|
|
159914
|
+
// pptx/core/core/runtime/PptxHandlerRuntimeThemeSwitching.ts
|
|
159915
|
+
function themePartPath(themePath) {
|
|
159916
|
+
const path3 = themePath.trim().replace(/\\/g, "/");
|
|
159917
|
+
return path3.startsWith("ppt/theme/") ? path3 : void 0;
|
|
159918
|
+
}
|
|
159919
|
+
var SLIDE_MASTER_PART, PptxHandlerRuntime87;
|
|
159920
|
+
var init_PptxHandlerRuntimeThemeSwitching = __esm({
|
|
159921
|
+
"pptx/core/core/runtime/PptxHandlerRuntimeThemeSwitching.ts"() {
|
|
159922
|
+
init_PptxHandlerRuntimeThemeProcessing();
|
|
159923
|
+
SLIDE_MASTER_PART = /^ppt\/slideMasters\/slideMaster\d+\.xml$/;
|
|
159924
|
+
PptxHandlerRuntime87 = class extends PptxHandlerRuntime86 {
|
|
159925
|
+
/**
|
|
159926
|
+
* Point the first slide master, or every one, at a theme part already in the package. Does
|
|
159927
|
+
* nothing when the package has no such part.
|
|
159928
|
+
*/
|
|
159929
|
+
async setPresentationTheme(themePath, applyToAllMasters = true) {
|
|
159930
|
+
const path3 = themePartPath(themePath);
|
|
159931
|
+
if (!path3 || !this.zip.file(path3)) {
|
|
159932
|
+
return;
|
|
159933
|
+
}
|
|
159934
|
+
const masters = this.zip.file(SLIDE_MASTER_PART);
|
|
159935
|
+
for (const master of applyToAllMasters ? masters : masters.slice(0, 1)) {
|
|
159936
|
+
await this.retargetMasterTheme(master.name, path3);
|
|
159937
|
+
}
|
|
159938
|
+
}
|
|
159939
|
+
/**
|
|
159940
|
+
* Point one slide master at a theme part already in the package (Undo of a theme switch puts
|
|
159941
|
+
* each master back on its own part). Does nothing when the package has no such master or part.
|
|
159942
|
+
*/
|
|
159943
|
+
async setSlideMasterTheme(masterPath, themePath) {
|
|
159944
|
+
const path3 = themePartPath(themePath);
|
|
159945
|
+
if (!path3 || !this.zip.file(path3) || !SLIDE_MASTER_PART.test(masterPath)) {
|
|
159946
|
+
return;
|
|
159947
|
+
}
|
|
159948
|
+
if (this.zip.file(masterPath)) {
|
|
159949
|
+
await this.retargetMasterTheme(masterPath, path3);
|
|
159950
|
+
}
|
|
159951
|
+
}
|
|
159952
|
+
async retargetMasterTheme(masterPath, themePath) {
|
|
159953
|
+
if (await this.setMasterThemeRelationship(masterPath, themePath)) {
|
|
159954
|
+
await this.adoptMasterTheme(masterPath, themePath);
|
|
159955
|
+
}
|
|
159956
|
+
}
|
|
159957
|
+
/** Point the runtime's theme state for `masterPath` at the part it now uses. */
|
|
159958
|
+
async adoptMasterTheme(masterPath, themePath) {
|
|
159959
|
+
const themeXml3 = await this.zip.file(themePath)?.async("string");
|
|
159960
|
+
if (themeXml3 === void 0) {
|
|
159961
|
+
return;
|
|
159962
|
+
}
|
|
159963
|
+
const model = this.parseThemePartXml(themeXml3);
|
|
159964
|
+
if (!this.originalThemeXmlByPath.has(themePath)) {
|
|
159965
|
+
this.cacheThemePartModel(themePath, themeXml3, model);
|
|
159966
|
+
}
|
|
159967
|
+
this.masterThemePaths.set(masterPath, themePath);
|
|
159968
|
+
this.masterThemeColorMaps.set(masterPath, { ...model.colorMap });
|
|
159969
|
+
this.masterThemeFontMaps.set(masterPath, { ...model.fontMap });
|
|
159970
|
+
if (model.formatScheme) {
|
|
159971
|
+
this.masterThemeFormatSchemes.set(masterPath, model.formatScheme);
|
|
159972
|
+
} else {
|
|
159973
|
+
this.masterThemeFormatSchemes.delete(masterPath);
|
|
159974
|
+
}
|
|
159975
|
+
if (this.zip.file(SLIDE_MASTER_PART)[0]?.name !== masterPath) {
|
|
159976
|
+
return;
|
|
159977
|
+
}
|
|
159978
|
+
this.themeColorMap = { ...model.colorMap };
|
|
159979
|
+
this.themeFontMap = { ...model.fontMap };
|
|
159980
|
+
this.themeFormatScheme = model.formatScheme;
|
|
159981
|
+
this.globalThemeColorMapSnapshot = { ...model.colorMap };
|
|
159982
|
+
this.globalThemeFontMapSnapshot = { ...model.fontMap };
|
|
159983
|
+
this.globalThemeFormatSchemeSnapshot = model.formatScheme;
|
|
159984
|
+
}
|
|
159985
|
+
};
|
|
159986
|
+
}
|
|
159987
|
+
});
|
|
159988
|
+
|
|
159751
159989
|
// pptx/core/core/runtime/PptxHandlerRuntimeComments.ts
|
|
159752
|
-
var
|
|
159990
|
+
var PptxHandlerRuntime88;
|
|
159753
159991
|
var init_PptxHandlerRuntimeComments = __esm({
|
|
159754
159992
|
"pptx/core/core/runtime/PptxHandlerRuntimeComments.ts"() {
|
|
159755
159993
|
init_legacy_comment_threading();
|
|
159756
159994
|
init_modern_comment_xml();
|
|
159757
159995
|
init_xml_access();
|
|
159758
|
-
|
|
159759
|
-
|
|
159996
|
+
init_PptxHandlerRuntimeThemeSwitching();
|
|
159997
|
+
PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime87 {
|
|
159760
159998
|
/**
|
|
159761
159999
|
* Parse modern threaded comments (PowerPoint 2019+ / Office 365).
|
|
159762
160000
|
* Modern comments use `p188:cmLst`/`p15:cmLst` roots within
|
|
@@ -159985,7 +160223,7 @@ var init_PptxHandlerRuntimeComments = __esm({
|
|
|
159985
160223
|
});
|
|
159986
160224
|
|
|
159987
160225
|
// pptx/core/core/runtime/PptxHandlerRuntimeSmartArtXmlUtils.ts
|
|
159988
|
-
var
|
|
160226
|
+
var PptxHandlerRuntime89;
|
|
159989
160227
|
var init_PptxHandlerRuntimeSmartArtXmlUtils = __esm({
|
|
159990
160228
|
"pptx/core/core/runtime/PptxHandlerRuntimeSmartArtXmlUtils.ts"() {
|
|
159991
160229
|
init_smartart_color_lists();
|
|
@@ -159993,7 +160231,7 @@ var init_PptxHandlerRuntimeSmartArtXmlUtils = __esm({
|
|
|
159993
160231
|
init_smart_art_text_helpers();
|
|
159994
160232
|
init_PptxHandlerRuntimeComments();
|
|
159995
160233
|
init_smartart_text_paragraphs();
|
|
159996
|
-
|
|
160234
|
+
PptxHandlerRuntime89 = class extends PptxHandlerRuntime88 {
|
|
159997
160235
|
async readXmlPartByRelationshipId(slidePath, relationshipId2) {
|
|
159998
160236
|
const normalizedRelationshipId = String(relationshipId2 || "").trim();
|
|
159999
160237
|
if (normalizedRelationshipId.length === 0) {
|
|
@@ -160597,7 +160835,7 @@ var init_smartart_text_style_resolution = __esm({
|
|
|
160597
160835
|
});
|
|
160598
160836
|
|
|
160599
160837
|
// pptx/core/core/runtime/PptxHandlerRuntimeSmartArtParsing.ts
|
|
160600
|
-
var
|
|
160838
|
+
var PptxHandlerRuntime90;
|
|
160601
160839
|
var init_PptxHandlerRuntimeSmartArtParsing = __esm({
|
|
160602
160840
|
"pptx/core/core/runtime/PptxHandlerRuntimeSmartArtParsing.ts"() {
|
|
160603
160841
|
init_diagram();
|
|
@@ -160611,7 +160849,7 @@ var init_PptxHandlerRuntimeSmartArtParsing = __esm({
|
|
|
160611
160849
|
init_smartart_style_label_refs();
|
|
160612
160850
|
init_smartart_text_paragraphs();
|
|
160613
160851
|
init_smartart_text_style_resolution();
|
|
160614
|
-
|
|
160852
|
+
PptxHandlerRuntime90 = class _PptxHandlerRuntime extends PptxHandlerRuntime89 {
|
|
160615
160853
|
reportIncompleteSmartArtRelationships(graphicFrame, relationshipIds, slidePath) {
|
|
160616
160854
|
const missing = [
|
|
160617
160855
|
["dm", relationshipIds?.dataRelId],
|
|
@@ -161006,7 +161244,7 @@ var init_smartart_layout_category = __esm({
|
|
|
161006
161244
|
});
|
|
161007
161245
|
|
|
161008
161246
|
// pptx/core/core/runtime/PptxHandlerRuntimeSmartArt.ts
|
|
161009
|
-
var
|
|
161247
|
+
var PptxHandlerRuntime91;
|
|
161010
161248
|
var init_PptxHandlerRuntimeSmartArt = __esm({
|
|
161011
161249
|
"pptx/core/core/runtime/PptxHandlerRuntimeSmartArt.ts"() {
|
|
161012
161250
|
init_utils();
|
|
@@ -161021,7 +161259,7 @@ var init_PptxHandlerRuntimeSmartArt = __esm({
|
|
|
161021
161259
|
init_smartart_text_paragraphs();
|
|
161022
161260
|
init_smartart_text_style_resolution();
|
|
161023
161261
|
init_smartart_xml_builders();
|
|
161024
|
-
|
|
161262
|
+
PptxHandlerRuntime91 = class _PptxHandlerRuntime extends PptxHandlerRuntime90 {
|
|
161025
161263
|
async getSmartArtDataForGraphicFrame(slidePath, graphicFrame) {
|
|
161026
161264
|
const graphicData = this.xmlLookupService.getChildByLocalName(
|
|
161027
161265
|
this.xmlLookupService.getChildByLocalName(graphicFrame, "graphic"),
|
|
@@ -161197,12 +161435,12 @@ var init_PptxHandlerRuntimeSmartArt = __esm({
|
|
|
161197
161435
|
});
|
|
161198
161436
|
|
|
161199
161437
|
// pptx/core/core/runtime/PptxHandlerRuntimeChartDetection.ts
|
|
161200
|
-
var
|
|
161438
|
+
var PptxHandlerRuntime92;
|
|
161201
161439
|
var init_PptxHandlerRuntimeChartDetection = __esm({
|
|
161202
161440
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartDetection.ts"() {
|
|
161203
161441
|
init_chart_multi_level_category_parser();
|
|
161204
161442
|
init_PptxHandlerRuntimeSmartArt();
|
|
161205
|
-
|
|
161443
|
+
PptxHandlerRuntime92 = class extends PptxHandlerRuntime91 {
|
|
161206
161444
|
detectChartType(plotArea) {
|
|
161207
161445
|
if (!plotArea) {
|
|
161208
161446
|
return "unknown";
|
|
@@ -161413,14 +161651,14 @@ function parseNumberVal(node) {
|
|
|
161413
161651
|
const num4 = Number.parseFloat(String(raw2));
|
|
161414
161652
|
return Number.isFinite(num4) ? num4 : void 0;
|
|
161415
161653
|
}
|
|
161416
|
-
var CHART_DATA_DISPLAY_OPTIONS_EXT_URI2,
|
|
161654
|
+
var CHART_DATA_DISPLAY_OPTIONS_EXT_URI2, PptxHandlerRuntime93;
|
|
161417
161655
|
var init_PptxHandlerRuntimeChartParsingHelpers = __esm({
|
|
161418
161656
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartParsingHelpers.ts"() {
|
|
161419
161657
|
init_chart_ext_lookup();
|
|
161420
161658
|
init_chart_pivot_source2();
|
|
161421
161659
|
init_PptxHandlerRuntimeChartDetection();
|
|
161422
161660
|
CHART_DATA_DISPLAY_OPTIONS_EXT_URI2 = "{56B9EC1D-385E-4148-901F-78D8002777C0}";
|
|
161423
|
-
|
|
161661
|
+
PptxHandlerRuntime93 = class extends PptxHandlerRuntime92 {
|
|
161424
161662
|
/**
|
|
161425
161663
|
* Parse `c:plotVisOnly` from the chart root element.
|
|
161426
161664
|
*
|
|
@@ -161680,14 +161918,14 @@ var init_PptxHandlerRuntimeChartParsingHelpers = __esm({
|
|
|
161680
161918
|
});
|
|
161681
161919
|
|
|
161682
161920
|
// pptx/core/core/runtime/PptxHandlerRuntimeChartExternalData.ts
|
|
161683
|
-
var CHART_USER_SHAPES_REL_TYPE2,
|
|
161921
|
+
var CHART_USER_SHAPES_REL_TYPE2, PptxHandlerRuntime94;
|
|
161684
161922
|
var init_PptxHandlerRuntimeChartExternalData = __esm({
|
|
161685
161923
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartExternalData.ts"() {
|
|
161686
161924
|
init_chart_user_shapes_parser();
|
|
161687
161925
|
init_chart_xlsx_parser();
|
|
161688
161926
|
init_PptxHandlerRuntimeChartParsingHelpers();
|
|
161689
161927
|
CHART_USER_SHAPES_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes";
|
|
161690
|
-
|
|
161928
|
+
PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
161691
161929
|
/**
|
|
161692
161930
|
* Parse `c:externalData` from the chart's `c:chartSpace` and resolve
|
|
161693
161931
|
* the external relationship target from the chart part's .rels file.
|
|
@@ -161849,12 +162087,12 @@ var init_PptxHandlerRuntimeChartExternalData = __esm({
|
|
|
161849
162087
|
});
|
|
161850
162088
|
|
|
161851
162089
|
// pptx/core/core/runtime/PptxHandlerRuntimeChartColorStyle.ts
|
|
161852
|
-
var
|
|
162090
|
+
var PptxHandlerRuntime95;
|
|
161853
162091
|
var init_PptxHandlerRuntimeChartColorStyle = __esm({
|
|
161854
162092
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartColorStyle.ts"() {
|
|
161855
162093
|
init_chart_style_definition_parser();
|
|
161856
162094
|
init_PptxHandlerRuntimeChartExternalData();
|
|
161857
|
-
|
|
162095
|
+
PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
|
|
161858
162096
|
/**
|
|
161859
162097
|
* Parse the Office 2013+ chart-style part (`ppt/charts/style#.xml`)
|
|
161860
162098
|
* referenced from the chart's relationships, sibling to
|
|
@@ -162015,7 +162253,7 @@ var init_PptxHandlerRuntimeChartColorStyle = __esm({
|
|
|
162015
162253
|
});
|
|
162016
162254
|
|
|
162017
162255
|
// pptx/core/core/runtime/PptxHandlerRuntimeChartExParsing.ts
|
|
162018
|
-
var
|
|
162256
|
+
var PptxHandlerRuntime96;
|
|
162019
162257
|
var init_PptxHandlerRuntimeChartExParsing = __esm({
|
|
162020
162258
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartExParsing.ts"() {
|
|
162021
162259
|
init_chart_cx_parser();
|
|
@@ -162025,7 +162263,7 @@ var init_PptxHandlerRuntimeChartExParsing = __esm({
|
|
|
162025
162263
|
init_chart_protection2();
|
|
162026
162264
|
init_chart_space_flags();
|
|
162027
162265
|
init_PptxHandlerRuntimeChartColorStyle();
|
|
162028
|
-
|
|
162266
|
+
PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
|
|
162029
162267
|
/**
|
|
162030
162268
|
* The facts of a chart part that live outside the plot (or in other parts): the external data
|
|
162031
162269
|
* reference and the embedded workbook's rows, pivot source and formats, the colour-style and
|
|
@@ -162145,7 +162383,7 @@ var init_PptxHandlerRuntimeChartExParsing = __esm({
|
|
|
162145
162383
|
});
|
|
162146
162384
|
|
|
162147
162385
|
// pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.ts
|
|
162148
|
-
var
|
|
162386
|
+
var PptxHandlerRuntime97;
|
|
162149
162387
|
var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
162150
162388
|
"pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"() {
|
|
162151
162389
|
init_chart_element_format_read_xml();
|
|
@@ -162167,7 +162405,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
162167
162405
|
init_chart_element_pictures();
|
|
162168
162406
|
init_chart_embedded_fallback();
|
|
162169
162407
|
init_PptxHandlerRuntimeChartExParsing();
|
|
162170
|
-
|
|
162408
|
+
PptxHandlerRuntime97 = class extends PptxHandlerRuntime96 {
|
|
162171
162409
|
/**
|
|
162172
162410
|
* Parse chart data from a graphic frame element on a slide.
|
|
162173
162411
|
*
|
|
@@ -162451,7 +162689,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
162451
162689
|
});
|
|
162452
162690
|
|
|
162453
162691
|
// pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts
|
|
162454
|
-
var XSD_INT_MIN, XSD_INT_MAX,
|
|
162692
|
+
var XSD_INT_MIN, XSD_INT_MAX, PptxHandlerRuntime98;
|
|
162455
162693
|
var init_PptxHandlerRuntimePresentationStructure = __esm({
|
|
162456
162694
|
"pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts"() {
|
|
162457
162695
|
init_kinsoku_parser();
|
|
@@ -162460,7 +162698,7 @@ var init_PptxHandlerRuntimePresentationStructure = __esm({
|
|
|
162460
162698
|
init_PptxHandlerRuntimeChartParsing();
|
|
162461
162699
|
XSD_INT_MIN = -2147483648;
|
|
162462
162700
|
XSD_INT_MAX = 2147483647;
|
|
162463
|
-
|
|
162701
|
+
PptxHandlerRuntime98 = class extends PptxHandlerRuntime97 {
|
|
162464
162702
|
parseEditorAnimations(slideXml3) {
|
|
162465
162703
|
return this.editorAnimationService.parseEditorAnimations(slideXml3);
|
|
162466
162704
|
}
|
|
@@ -162663,7 +162901,7 @@ var init_PptxHandlerRuntimePresentationStructure = __esm({
|
|
|
162663
162901
|
});
|
|
162664
162902
|
|
|
162665
162903
|
// pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts
|
|
162666
|
-
var
|
|
162904
|
+
var PptxHandlerRuntime99;
|
|
162667
162905
|
var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
|
|
162668
162906
|
"pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts"() {
|
|
162669
162907
|
init_eot_parser();
|
|
@@ -162672,7 +162910,7 @@ var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
|
|
|
162672
162910
|
init_strip_parent_dir_segments();
|
|
162673
162911
|
init_xml_access();
|
|
162674
162912
|
init_PptxHandlerRuntimePresentationStructure();
|
|
162675
|
-
|
|
162913
|
+
PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
162676
162914
|
async getEmbeddedFonts(fontList) {
|
|
162677
162915
|
if (!fontList || fontList.fonts.length === 0) {
|
|
162678
162916
|
return [];
|
|
@@ -162874,7 +163112,7 @@ var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
|
|
|
162874
163112
|
};
|
|
162875
163113
|
}
|
|
162876
163114
|
});
|
|
162877
|
-
var MAX_OLE_EMBEDDING_BYTES,
|
|
163115
|
+
var MAX_OLE_EMBEDDING_BYTES, PptxHandlerRuntime100;
|
|
162878
163116
|
var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
162879
163117
|
"pptx/core/core/runtime/PptxHandlerRuntimeLoadSession.ts"() {
|
|
162880
163118
|
init_zip_limits();
|
|
@@ -162886,7 +163124,7 @@ var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
|
162886
163124
|
init_bullet_picture_image_enrichment();
|
|
162887
163125
|
init_PptxHandlerRuntimeEmbeddedFonts();
|
|
162888
163126
|
MAX_OLE_EMBEDDING_BYTES = 25 * 1024 * 1024;
|
|
162889
|
-
|
|
163127
|
+
PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime99 {
|
|
162890
163128
|
isZipContainer(data) {
|
|
162891
163129
|
const bytes = new Uint8Array(data);
|
|
162892
163130
|
if (bytes.byteLength < 4) {
|
|
@@ -163254,7 +163492,7 @@ var init_PptxHandlerRuntimeLoadSession = __esm({
|
|
|
163254
163492
|
});
|
|
163255
163493
|
|
|
163256
163494
|
// pptx/core/core/runtime/PptxHandlerRuntimeLoadPipeline.ts
|
|
163257
|
-
var
|
|
163495
|
+
var PptxHandlerRuntime101;
|
|
163258
163496
|
var init_PptxHandlerRuntimeLoadPipeline = __esm({
|
|
163259
163497
|
"pptx/core/core/runtime/PptxHandlerRuntimeLoadPipeline.ts"() {
|
|
163260
163498
|
init_fluent();
|
|
@@ -163270,7 +163508,7 @@ var init_PptxHandlerRuntimeLoadPipeline = __esm({
|
|
|
163270
163508
|
init_layout_switch_placeholder_prompts();
|
|
163271
163509
|
init_PptxHandlerRuntimeLoadSession();
|
|
163272
163510
|
init_slide_fingerprint();
|
|
163273
|
-
|
|
163511
|
+
PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
163274
163512
|
async buildLoadData(presentationState, slidesWithWarnings, slideMasters) {
|
|
163275
163513
|
const headerFooter = this.extractHeaderFooter();
|
|
163276
163514
|
const presentationProperties = await this.parsePresentationProperties();
|
|
@@ -163770,12 +164008,12 @@ function refIndex2(node) {
|
|
|
163770
164008
|
const idx = Number.parseInt(String(node["@_idx"] ?? ""), 10);
|
|
163771
164009
|
return Number.isFinite(idx) ? idx : void 0;
|
|
163772
164010
|
}
|
|
163773
|
-
var
|
|
164011
|
+
var PptxHandlerRuntime102;
|
|
163774
164012
|
var init_PptxHandlerRuntimeStyleMatrixResolve = __esm({
|
|
163775
164013
|
"pptx/core/core/runtime/PptxHandlerRuntimeStyleMatrixResolve.ts"() {
|
|
163776
164014
|
init_authored_shape_style();
|
|
163777
164015
|
init_PptxHandlerRuntimeLoadPipeline();
|
|
163778
|
-
|
|
164016
|
+
PptxHandlerRuntime102 = class extends PptxHandlerRuntime101 {
|
|
163779
164017
|
/**
|
|
163780
164018
|
* Resolve a `<p:style>` node (`a:lnRef`, `a:fillRef`, `a:effectRef`,
|
|
163781
164019
|
* `a:fontRef`) against the current theme's format scheme, with the same
|
|
@@ -163840,14 +164078,17 @@ function withKeys(style, from, keys) {
|
|
|
163840
164078
|
function refNode(idx, colorXml2) {
|
|
163841
164079
|
return { "@_idx": String(idx), ...colorXml2 ?? {} };
|
|
163842
164080
|
}
|
|
163843
|
-
var
|
|
164081
|
+
var PptxHandlerRuntime103;
|
|
163844
164082
|
var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
163845
164083
|
"pptx/core/core/runtime/PptxHandlerRuntimeThemeEffects.ts"() {
|
|
163846
164084
|
init_theme_effect_schemes();
|
|
163847
164085
|
init_authored_shape_style();
|
|
164086
|
+
init_held_format_schemes();
|
|
163848
164087
|
init_PptxHandlerRuntimeStyleMatrixResolve();
|
|
163849
|
-
|
|
164088
|
+
PptxHandlerRuntime103 = class extends PptxHandlerRuntime102 {
|
|
163850
164089
|
effectSchemeCache = /* @__PURE__ */ new Map();
|
|
164090
|
+
/** Every `a:fmtScheme` written into a theme part or over one ({@link restoreThemeFormatScheme}). */
|
|
164091
|
+
heldFormatSchemes = new HeldFormatSchemes();
|
|
163851
164092
|
/**
|
|
163852
164093
|
* Resolve a `<p:style>` node as the base class does, against built-in effect scheme
|
|
163853
164094
|
* `effectSchemeId` instead of the deck's own (the Effects gallery draws each tile this way).
|
|
@@ -163900,32 +164141,79 @@ var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
|
163900
164141
|
*/
|
|
163901
164142
|
async applyThemeFormatSchemeXml(fmtSchemeXml) {
|
|
163902
164143
|
const parsed = this.parseEffectScheme({ fmtSchemeXml });
|
|
163903
|
-
|
|
163904
|
-
|
|
164144
|
+
return parsed ? this.writeFormatScheme(() => parsed.node) : void 0;
|
|
164145
|
+
}
|
|
164146
|
+
/**
|
|
164147
|
+
* Put back a format scheme the deck held before (Undo and Redo of an Effects pick), as the parts
|
|
164148
|
+
* held it: each theme part a master references gets back what it held the last time the deck's
|
|
164149
|
+
* scheme was `scheme` over those same parts, so a part with a scheme of its own gets its own back
|
|
164150
|
+
* (with no such time, `scheme`'s own element goes into every one). With `themePaths`, `scheme`'s
|
|
164151
|
+
* own element goes into those parts only.
|
|
164152
|
+
*
|
|
164153
|
+
* @returns the deck's format scheme now, or `undefined` (nothing written) for a scheme no part
|
|
164154
|
+
* held while this handler wrote into it
|
|
164155
|
+
*/
|
|
164156
|
+
async restoreThemeFormatScheme(scheme, themePaths) {
|
|
164157
|
+
const parts = themePaths ? void 0 : this.heldFormatSchemes.parts(scheme, await this.resolveThemeEditTargets());
|
|
164158
|
+
if (parts) {
|
|
164159
|
+
return this.writeFormatScheme((path3) => parts.get(path3));
|
|
163905
164160
|
}
|
|
163906
|
-
const
|
|
164161
|
+
const element = this.heldFormatSchemes.element(scheme);
|
|
164162
|
+
return element ? this.writeFormatScheme(() => element, themePaths) : void 0;
|
|
164163
|
+
}
|
|
164164
|
+
/**
|
|
164165
|
+
* Write `elementFor(part)` into every theme part a master references (or only `themePaths`),
|
|
164166
|
+
* skipping a part it gives none, holding what each part held and now holds, and refresh the
|
|
164167
|
+
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
164168
|
+
* them, the deck's.
|
|
164169
|
+
*/
|
|
164170
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
164171
|
+
const deckBefore = this.getThemeFormatScheme();
|
|
164172
|
+
const replaced = /* @__PURE__ */ new Map();
|
|
164173
|
+
const schemes = /* @__PURE__ */ new Map();
|
|
164174
|
+
const written = await this.rewriteThemeParts(themePaths, (data, path3) => {
|
|
164175
|
+
const element = elementFor(path3);
|
|
163907
164176
|
const elements3 = data["a:theme"]?.["a:themeElements"];
|
|
163908
|
-
if (!elements3) {
|
|
164177
|
+
if (!element || !elements3) {
|
|
163909
164178
|
return false;
|
|
163910
164179
|
}
|
|
163911
|
-
elements3["a:fmtScheme"]
|
|
164180
|
+
const previous = elements3["a:fmtScheme"];
|
|
164181
|
+
if (previous) {
|
|
164182
|
+
this.heldFormatSchemes.hold(this.parseFormatScheme(previous), previous);
|
|
164183
|
+
replaced.set(path3, structuredClone(previous));
|
|
164184
|
+
}
|
|
164185
|
+
const scheme = this.parseFormatScheme(element);
|
|
164186
|
+
this.heldFormatSchemes.hold(scheme, element);
|
|
164187
|
+
elements3["a:fmtScheme"] = structuredClone(element);
|
|
164188
|
+
schemes.set(path3, scheme);
|
|
163912
164189
|
return true;
|
|
163913
164190
|
});
|
|
163914
164191
|
if (written.length === 0) {
|
|
163915
164192
|
return void 0;
|
|
163916
164193
|
}
|
|
164194
|
+
if (deckBefore) {
|
|
164195
|
+
this.heldFormatSchemes.holdParts(deckBefore, replaced);
|
|
164196
|
+
}
|
|
163917
164197
|
for (const path3 of written) {
|
|
163918
164198
|
const xml = await this.zip.file(path3)?.async("string");
|
|
163919
164199
|
if (xml !== void 0) {
|
|
163920
164200
|
this.originalThemeXmlByPath.set(path3, xml);
|
|
163921
164201
|
}
|
|
164202
|
+
for (const masterPath of this.mastersUsingThemes([path3])) {
|
|
164203
|
+
this.masterThemeFormatSchemes.set(masterPath, schemes.get(path3));
|
|
164204
|
+
}
|
|
163922
164205
|
}
|
|
163923
|
-
|
|
163924
|
-
|
|
164206
|
+
const primary = await this.resolvePrimaryThemePath();
|
|
164207
|
+
const deck = primary === void 0 ? void 0 : schemes.get(primary);
|
|
164208
|
+
if (deck) {
|
|
164209
|
+
this.globalThemeFormatSchemeSnapshot = deck;
|
|
164210
|
+
this.themeFormatScheme = deck;
|
|
164211
|
+
this.heldFormatSchemes.holdParts(
|
|
164212
|
+
deck,
|
|
164213
|
+
new Map(written.map((path3) => [path3, elementFor(path3)]))
|
|
164214
|
+
);
|
|
163925
164215
|
}
|
|
163926
|
-
this.
|
|
163927
|
-
this.themeFormatScheme = parsed.scheme;
|
|
163928
|
-
return parsed.scheme;
|
|
164216
|
+
return this.getThemeFormatScheme();
|
|
163929
164217
|
}
|
|
163930
164218
|
/** The real theme variants the loaded package carries, or none. */
|
|
163931
164219
|
getThemeVariants() {
|
|
@@ -164051,7 +164339,7 @@ function schemeFromColorMap(map) {
|
|
|
164051
164339
|
folHlink: pick("folHlink")
|
|
164052
164340
|
};
|
|
164053
164341
|
}
|
|
164054
|
-
var
|
|
164342
|
+
var PptxHandlerRuntime104;
|
|
164055
164343
|
var init_PptxHandlerRuntimeBackgroundStyles = __esm({
|
|
164056
164344
|
"pptx/core/core/runtime/PptxHandlerRuntimeBackgroundStyles.ts"() {
|
|
164057
164345
|
init_background_style();
|
|
@@ -164059,7 +164347,7 @@ var init_PptxHandlerRuntimeBackgroundStyles = __esm({
|
|
|
164059
164347
|
init_theme_switching();
|
|
164060
164348
|
init_master_save_helpers();
|
|
164061
164349
|
init_PptxHandlerRuntimeThemeEffects();
|
|
164062
|
-
|
|
164350
|
+
PptxHandlerRuntime104 = class extends PptxHandlerRuntime103 {
|
|
164063
164351
|
resolveBackgroundStyle(preset2) {
|
|
164064
164352
|
const xml = {
|
|
164065
164353
|
"p:sld": { "p:cSld": { "p:bg": backgroundRefNode(preset2.idx, preset2.scheme) } }
|
|
@@ -164319,14 +164607,14 @@ var init_sdk_placeholder = __esm({
|
|
|
164319
164607
|
});
|
|
164320
164608
|
|
|
164321
164609
|
// pptx/core/core/runtime/PptxHandlerRuntimeSdkPlaceholders.ts
|
|
164322
|
-
var
|
|
164610
|
+
var PptxHandlerRuntime105;
|
|
164323
164611
|
var init_PptxHandlerRuntimeSdkPlaceholders = __esm({
|
|
164324
164612
|
"pptx/core/core/runtime/PptxHandlerRuntimeSdkPlaceholders.ts"() {
|
|
164325
164613
|
init_placeholder_remap();
|
|
164326
164614
|
init_xml_access();
|
|
164327
164615
|
init_PptxHandlerRuntimeBackgroundStyles();
|
|
164328
164616
|
init_sdk_placeholder();
|
|
164329
|
-
|
|
164617
|
+
PptxHandlerRuntime105 = class _PptxHandlerRuntime extends PptxHandlerRuntime104 {
|
|
164330
164618
|
createPlaceholderElement(layoutPath, input, type, options) {
|
|
164331
164619
|
if (input.type !== "text") throw new Error("Placeholder input must be text");
|
|
164332
164620
|
const layout = this.layoutXmlMap.get(layoutPath);
|
|
@@ -164380,14 +164668,14 @@ var init_PptxHandlerRuntimeSdkPlaceholders = __esm({
|
|
|
164380
164668
|
};
|
|
164381
164669
|
}
|
|
164382
164670
|
});
|
|
164383
|
-
var
|
|
164671
|
+
var PptxHandlerRuntime106;
|
|
164384
164672
|
var init_PptxHandlerRuntimeImplementation = __esm({
|
|
164385
164673
|
"pptx/core/core/runtime/PptxHandlerRuntimeImplementation.ts"() {
|
|
164386
164674
|
init_PptxElementXmlBuilder();
|
|
164387
164675
|
init_builders();
|
|
164388
164676
|
init_factories();
|
|
164389
164677
|
init_PptxHandlerRuntimeSdkPlaceholders();
|
|
164390
|
-
|
|
164678
|
+
PptxHandlerRuntime106 = class _PptxHandlerRuntime extends PptxHandlerRuntime105 {
|
|
164391
164679
|
constructor(dependencyFactory = new exports.PptxRuntimeDependencyFactory()) {
|
|
164392
164680
|
super();
|
|
164393
164681
|
this.dependencyFactory = dependencyFactory;
|
|
@@ -164531,7 +164819,7 @@ exports.PptxHandlerRuntime = void 0;
|
|
|
164531
164819
|
var init_PptxHandlerRuntime = __esm({
|
|
164532
164820
|
"pptx/core/core/PptxHandlerRuntime.ts"() {
|
|
164533
164821
|
init_PptxHandlerRuntimeImplementation();
|
|
164534
|
-
exports.PptxHandlerRuntime = class extends
|
|
164822
|
+
exports.PptxHandlerRuntime = class extends PptxHandlerRuntime106 {
|
|
164535
164823
|
};
|
|
164536
164824
|
}
|
|
164537
164825
|
});
|
|
@@ -167918,10 +168206,32 @@ var init_PptxHandlerCore = __esm({
|
|
|
167918
168206
|
async setPresentationTheme(themePath, applyToAllMasters = true) {
|
|
167919
168207
|
await this.runtime.setPresentationTheme(themePath, applyToAllMasters);
|
|
167920
168208
|
}
|
|
168209
|
+
/**
|
|
168210
|
+
* Point one slide master at a theme part already in the package; scheme edits and saves follow
|
|
168211
|
+
* it. Does nothing when the package has no such master or part.
|
|
168212
|
+
*
|
|
168213
|
+
* @param masterPath - The master's part path (e.g. `ppt/slideMasters/slideMaster2.xml`).
|
|
168214
|
+
* @param themePath - The theme part's path (e.g. `ppt/theme/theme1.xml`).
|
|
168215
|
+
*/
|
|
168216
|
+
async setSlideMasterTheme(masterPath, themePath) {
|
|
168217
|
+
await this.runtime.setSlideMasterTheme(masterPath, themePath);
|
|
168218
|
+
}
|
|
168219
|
+
/**
|
|
168220
|
+
* Read one theme part's colour, font and format schemes and its name without changing the
|
|
168221
|
+
* loaded theme, for example to show what switching to it would apply.
|
|
168222
|
+
*
|
|
168223
|
+
* @param themePath - The theme part's path (e.g. `ppt/theme/theme2.xml`).
|
|
168224
|
+
* @returns The part's schemes, or `undefined` when the package has no such part.
|
|
168225
|
+
*/
|
|
168226
|
+
async getThemePartSchemes(themePath) {
|
|
168227
|
+
return this.runtime.getThemePartSchemes(themePath);
|
|
168228
|
+
}
|
|
167921
168229
|
/**
|
|
167922
168230
|
* Modify the theme’s colour scheme (accent colours, background, text, etc.).
|
|
167923
168231
|
*
|
|
167924
168232
|
* @param colorScheme - A {@link PptxThemeColorScheme} with hex colour values.
|
|
168233
|
+
* @param themePaths - Only these theme parts (e.g. `ppt/theme/theme2.xml`); every part a slide
|
|
168234
|
+
* master uses when omitted.
|
|
167925
168235
|
*
|
|
167926
168236
|
* @example
|
|
167927
168237
|
* ```ts
|
|
@@ -167934,13 +168244,15 @@ var init_PptxHandlerCore = __esm({
|
|
|
167934
168244
|
* // => void — colour scheme updated in the in-memory theme XML
|
|
167935
168245
|
* ```
|
|
167936
168246
|
*/
|
|
167937
|
-
async updateThemeColorScheme(colorScheme) {
|
|
167938
|
-
await this.runtime.updateThemeColorScheme(colorScheme);
|
|
168247
|
+
async updateThemeColorScheme(colorScheme, themePaths) {
|
|
168248
|
+
await this.runtime.updateThemeColorScheme(colorScheme, themePaths);
|
|
167939
168249
|
}
|
|
167940
168250
|
/**
|
|
167941
168251
|
* Update the theme’s font scheme (heading + body typefaces).
|
|
167942
168252
|
*
|
|
167943
168253
|
* @param fontScheme - A {@link PptxThemeFontScheme} with font family names.
|
|
168254
|
+
* @param themePaths - Only these theme parts (e.g. `ppt/theme/theme2.xml`); every part a slide
|
|
168255
|
+
* master uses when omitted.
|
|
167944
168256
|
*
|
|
167945
168257
|
* @example
|
|
167946
168258
|
* ```ts
|
|
@@ -167951,16 +168263,18 @@ var init_PptxHandlerCore = __esm({
|
|
|
167951
168263
|
* // => void — font scheme updated in the in-memory theme XML
|
|
167952
168264
|
* ```
|
|
167953
168265
|
*/
|
|
167954
|
-
async updateThemeFontScheme(fontScheme) {
|
|
167955
|
-
await this.runtime.updateThemeFontScheme(fontScheme);
|
|
168266
|
+
async updateThemeFontScheme(fontScheme, themePaths) {
|
|
168267
|
+
await this.runtime.updateThemeFontScheme(fontScheme, themePaths);
|
|
167956
168268
|
}
|
|
167957
168269
|
/**
|
|
167958
168270
|
* Rename the presentation theme.
|
|
167959
168271
|
*
|
|
167960
168272
|
* @param name - New display name for the theme.
|
|
168273
|
+
* @param themePaths - Only these theme parts (e.g. `ppt/theme/theme2.xml`); every part a slide
|
|
168274
|
+
* master uses when omitted.
|
|
167961
168275
|
*/
|
|
167962
|
-
async updateThemeName(name) {
|
|
167963
|
-
await this.runtime.updateThemeName(name);
|
|
168276
|
+
async updateThemeName(name, themePaths) {
|
|
168277
|
+
await this.runtime.updateThemeName(name, themePaths);
|
|
167964
168278
|
}
|
|
167965
168279
|
/**
|
|
167966
168280
|
* Resolve a `<p:style>` block (`a:lnRef` / `a:fillRef` / `a:effectRef` /
|
|
@@ -167983,6 +168297,14 @@ var init_PptxHandlerCore = __esm({
|
|
|
167983
168297
|
async applyThemeFormatSchemeXml(fmtSchemeXml) {
|
|
167984
168298
|
return this.runtime.applyThemeFormatSchemeXml(fmtSchemeXml);
|
|
167985
168299
|
}
|
|
168300
|
+
/**
|
|
168301
|
+
* Put a format scheme a theme part held before back into the theme parts (or only `themePaths`),
|
|
168302
|
+
* as the part held it: Undo and Redo of an Effects pick. Only a scheme this handler wrote into a
|
|
168303
|
+
* part or over one can come back; for any other it writes nothing and returns `undefined`.
|
|
168304
|
+
*/
|
|
168305
|
+
async restoreThemeFormatScheme(scheme, themePaths) {
|
|
168306
|
+
return this.runtime.restoreThemeFormatScheme(scheme, themePaths);
|
|
168307
|
+
}
|
|
167986
168308
|
/** The real theme variants the loaded package carries (`themeVariants/` parts), or none. */
|
|
167987
168309
|
getThemeVariants() {
|
|
167988
168310
|
return this.runtime.getThemeVariants();
|
|
@@ -187154,6 +187476,7 @@ exports.flattenChartUserShapes = flattenChartUserShapes;
|
|
|
187154
187476
|
exports.flattenNodes = flattenNodes;
|
|
187155
187477
|
exports.formatAutoNumberMarker = formatAutoNumberMarker;
|
|
187156
187478
|
exports.formatCommentTimestamp = formatCommentTimestamp;
|
|
187479
|
+
exports.formatSchemeKey = formatSchemeKey;
|
|
187157
187480
|
exports.formatScriptAutoNumber = formatScriptAutoNumber;
|
|
187158
187481
|
exports.fragmentShapes = fragmentShapes;
|
|
187159
187482
|
exports.gearPoints = gearPoints;
|