ooxml-core 1.16.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PptxHandler-7RNEJ2IO.mjs +4 -0
- package/dist/{PptxHandler-3A7VEXVK.cjs → PptxHandler-MK665E6Z.cjs} +3 -3
- package/dist/{PptxHandler-M35YFCUC.mjs → PptxHandler-ZF4G56V3.mjs} +2 -2
- package/dist/{PresentationBuilder-C7NPM7OQ.mjs → PresentationBuilder-HPHJTMIB.mjs} +2 -2
- package/dist/{PresentationBuilder-Y6DJK6H2.mjs → PresentationBuilder-J7HAJGMB.mjs} +2 -2
- package/dist/{PresentationBuilder-XVRTITYR.cjs → PresentationBuilder-JGYSF25G.cjs} +5 -5
- package/dist/automation/index.cjs +36 -9
- package/dist/automation/index.mjs +36 -9
- package/dist/chart/index.cjs +23 -4
- package/dist/chart/index.mjs +23 -4
- package/dist/{chunk-LM6VBPQJ.mjs → chunk-5ROLXCIY.mjs} +24 -5
- package/dist/{chunk-KOX5Y5E5.mjs → chunk-HMZFUT65.mjs} +1 -1
- package/dist/{chunk-WBCV52YV.mjs → chunk-IBFHMYJD.mjs} +1 -1
- package/dist/{chunk-UGWY72WC.cjs → chunk-K7Z2EDI5.cjs} +23 -4
- package/dist/{chunk-B37EVUMG.mjs → chunk-MVS2PT2Q.mjs} +1 -1
- package/dist/{chunk-AHRFBMLK.cjs → chunk-THEWZNWS.cjs} +1007 -1007
- package/dist/{chunk-WEFFRYXN.mjs → chunk-TWXBU7RE.mjs} +23 -4
- package/dist/{chunk-OKGQ2X7D.mjs → chunk-YQ7HJOEZ.mjs} +1 -1
- package/dist/{chunk-C2Y6SZDN.mjs → chunk-ZBCNC5RI.mjs} +4 -4
- package/dist/collab/broadcast-transport.d.ts.map +1 -1
- package/dist/collab/identity.d.ts +2 -0
- package/dist/collab/identity.d.ts.map +1 -1
- package/dist/collab/index.cjs +11 -2
- package/dist/collab/index.mjs +11 -3
- package/dist/crypto/index.cjs +23 -4
- package/dist/crypto/index.mjs +23 -4
- package/dist/diagram/index.cjs +23 -4
- package/dist/diagram/index.mjs +23 -4
- package/dist/docx/embedded.cjs +23 -4
- package/dist/docx/embedded.mjs +23 -4
- package/dist/docx/index.cjs +24 -5
- package/dist/docx/index.mjs +24 -5
- package/dist/docx/layout/index.cjs +24 -5
- package/dist/docx/layout/index.mjs +24 -5
- package/dist/docx/load/index.cjs +23 -4
- package/dist/docx/load/index.mjs +23 -4
- package/dist/docx/ui/index.cjs +32 -5
- package/dist/docx/ui/index.mjs +32 -5
- package/dist/drawingml/index.cjs +23 -4
- package/dist/drawingml/index.mjs +23 -4
- package/dist/index.cjs +23 -4
- package/dist/index.mjs +23 -4
- package/dist/math/index.cjs +23 -4
- package/dist/math/index.mjs +23 -4
- package/dist/opc/index.cjs +23 -4
- package/dist/opc/index.mjs +23 -4
- package/dist/pptx/automation/index.cjs +28 -9
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/cli/index.cjs +28 -9
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- 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 +28 -9
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +38 -9
- package/dist/teams/index.mjs +38 -9
- package/dist/visio/index.cjs +23 -4
- package/dist/visio/index.mjs +23 -4
- package/dist/visio/ui/index.cjs +23 -4
- package/dist/visio/ui/index.mjs +23 -4
- package/dist/xlsx/edit/slicers.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +36 -9
- package/dist/xlsx/index.mjs +36 -9
- package/dist/xlsx/load/index.cjs +26 -5
- package/dist/xlsx/load/index.mjs +26 -5
- package/dist/xlsx/ui/index.cjs +33 -8
- package/dist/xlsx/ui/index.mjs +33 -8
- package/dist/xml/index.cjs +23 -4
- package/dist/xml/index.mjs +23 -4
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-7POULDRL.mjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkTHEWZNWS_cjs = require('./chunk-THEWZNWS.cjs');
|
|
4
|
+
require('./chunk-K7Z2EDI5.cjs');
|
|
5
5
|
require('./chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('./chunk-5W2QL4SB.cjs');
|
|
7
7
|
|
|
@@ -9,5 +9,5 @@ require('./chunk-5W2QL4SB.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "PptxHandler", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkTHEWZNWS_cjs.PptxHandler; }
|
|
13
13
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { PptxHandler } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PptxHandler } from './chunk-IBFHMYJD.mjs';
|
|
2
|
+
import './chunk-5ROLXCIY.mjs';
|
|
3
3
|
import './chunk-M4XLF4R7.mjs';
|
|
4
4
|
import './chunk-3GXV5MPC.mjs';
|
|
5
5
|
import './chunk-54S5A5PZ.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-YQ7HJOEZ.mjs';
|
|
2
|
+
import './chunk-TWXBU7RE.mjs';
|
|
3
3
|
import './chunk-GXHKNSZX.mjs';
|
|
4
4
|
import './chunk-CA7KCNL3.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-IBFHMYJD.mjs';
|
|
2
|
+
import './chunk-5ROLXCIY.mjs';
|
|
3
3
|
import './chunk-M4XLF4R7.mjs';
|
|
4
4
|
import './chunk-3GXV5MPC.mjs';
|
|
5
5
|
import './chunk-54S5A5PZ.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkTHEWZNWS_cjs = require('./chunk-THEWZNWS.cjs');
|
|
4
|
+
require('./chunk-K7Z2EDI5.cjs');
|
|
5
5
|
require('./chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('./chunk-5W2QL4SB.cjs');
|
|
7
7
|
|
|
@@ -9,13 +9,13 @@ require('./chunk-5W2QL4SB.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "PresentationBuilder", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkTHEWZNWS_cjs.PresentationBuilder; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "STANDARD_LAYOUTS", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkTHEWZNWS_cjs.STANDARD_LAYOUTS; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "buildBlankPresentationArchive", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkTHEWZNWS_cjs.buildBlankPresentationArchive; }
|
|
21
21
|
});
|
|
@@ -80,15 +80,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
80
80
|
maxDepth: 512,
|
|
81
81
|
maxNodes: 5e6
|
|
82
82
|
};
|
|
83
|
-
var
|
|
83
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
84
|
+
var MARKUP_SKIPS = [
|
|
85
|
+
["<!--", "-->"],
|
|
86
|
+
["<![CDATA[", "]]>"],
|
|
87
|
+
["<?", "?>"]
|
|
88
|
+
];
|
|
84
89
|
function checkXmlLimits(xml, label2, limits = {}) {
|
|
85
90
|
const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
86
91
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
87
92
|
let depth = 0;
|
|
88
93
|
let nodes = 0;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
let at2 = xml.indexOf("<");
|
|
95
|
+
while (at2 !== -1) {
|
|
96
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at2));
|
|
97
|
+
if (skip) {
|
|
98
|
+
const end = xml.indexOf(skip[1], at2 + skip[0].length);
|
|
99
|
+
if (end === -1) return;
|
|
100
|
+
at2 = xml.indexOf("<", end + skip[1].length);
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
TAG_RE.lastIndex = at2;
|
|
104
|
+
const match2 = TAG_RE.exec(xml);
|
|
105
|
+
if (!match2) {
|
|
106
|
+
at2 = xml.indexOf("<", at2 + 1);
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const [, closing, , selfClosing] = match2;
|
|
110
|
+
at2 = xml.indexOf("<", at2 + match2[0].length);
|
|
92
111
|
if (closing) {
|
|
93
112
|
depth--;
|
|
94
113
|
continue;
|
|
@@ -44002,7 +44021,9 @@ function pivotTableXml(source2, cacheId, cache3) {
|
|
|
44002
44021
|
}
|
|
44003
44022
|
function dateFilterXml(pivot, filter2) {
|
|
44004
44023
|
const x15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main";
|
|
44005
|
-
const id3 = Number(
|
|
44024
|
+
const id3 = Number(
|
|
44025
|
+
/\bid="(\d+)"/.exec(/<filter\s[^>]*>/.exec(pivot.sourceXml ?? "")?.[0] ?? "")?.[1] ?? 1
|
|
44026
|
+
);
|
|
44006
44027
|
return `<filters count="1"><filter${attrs2({ fld: pivot.fields.indexOf(filter2.field), type: "dateBetween", evalOrder: -1, id: id3, name: filter2.field })}><autoFilter ref="A1"><filterColumn colId="0"><customFilters and="1"><customFilter operator="greaterThanOrEqual" val="${Math.floor(filter2.start)}"/><customFilter operator="lessThanOrEqual" val="${Math.floor(filter2.end)}"/></customFilters></filterColumn></autoFilter><extLst><ext uri="{0605FD5F-26C8-4aeb-8148-2DB25E43C511}" xmlns:x15="${x15}"><x15:pivotFilter useWholeDay="1"/></ext></extLst></filter></filters>`;
|
|
44007
44028
|
}
|
|
44008
44029
|
|
|
@@ -48620,7 +48641,7 @@ function addScenario(ctx, s, draft) {
|
|
|
48620
48641
|
}
|
|
48621
48642
|
function editScenario(ctx, s, index3, draft) {
|
|
48622
48643
|
const sheet = sheetAt(ctx.workbook, s);
|
|
48623
|
-
const existing = scenariosOf(sheet)[index3];
|
|
48644
|
+
const existing = Number.isInteger(index3) ? scenariosOf(sheet)[index3] : void 0;
|
|
48624
48645
|
if (!existing) throw new ScenarioError("missing");
|
|
48625
48646
|
if (existing.locked && sheet.protection) throw new ScenarioError("locked");
|
|
48626
48647
|
const name3 = checkName(sheet, draft.name, index3);
|
|
@@ -48631,7 +48652,7 @@ function editScenario(ctx, s, index3, draft) {
|
|
|
48631
48652
|
}
|
|
48632
48653
|
function deleteScenario(ctx, s, index3) {
|
|
48633
48654
|
const sheet = sheetAt(ctx.workbook, s);
|
|
48634
|
-
const existing = scenariosOf(sheet)[index3];
|
|
48655
|
+
const existing = Number.isInteger(index3) ? scenariosOf(sheet)[index3] : void 0;
|
|
48635
48656
|
if (!existing) throw new ScenarioError("missing");
|
|
48636
48657
|
if (existing.locked && sheet.protection) throw new ScenarioError("locked");
|
|
48637
48658
|
ctx.run("Delete scenario", "view", PARTS2(s), () => {
|
|
@@ -49409,7 +49430,10 @@ function insertTimeline(ctx, s, ref) {
|
|
|
49409
49430
|
const id3 = Math.max(
|
|
49410
49431
|
1,
|
|
49411
49432
|
...sheet.drawings.flatMap(
|
|
49412
|
-
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(
|
|
49433
|
+
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(/<[\w:]*cNvPr\b[^>]*>/g)].flatMap((m) => {
|
|
49434
|
+
const id4 = /\sid="(\d+)"/.exec(m[0])?.[1];
|
|
49435
|
+
return id4 ? [Number(id4)] : [];
|
|
49436
|
+
}) : []
|
|
49413
49437
|
)
|
|
49414
49438
|
) + 1;
|
|
49415
49439
|
ctx.run(
|
|
@@ -49947,7 +49971,10 @@ function insertSlicer(ctx, s, ref) {
|
|
|
49947
49971
|
const id3 = Math.max(
|
|
49948
49972
|
1,
|
|
49949
49973
|
...sheet.drawings.flatMap(
|
|
49950
|
-
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(
|
|
49974
|
+
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(/<[\w:]*cNvPr\b[^>]*>/g)].flatMap((m) => {
|
|
49975
|
+
const id4 = /\sid="(\d+)"/.exec(m[0])?.[1];
|
|
49976
|
+
return id4 ? [Number(id4)] : [];
|
|
49977
|
+
}) : []
|
|
49951
49978
|
)
|
|
49952
49979
|
) + 1;
|
|
49953
49980
|
ctx.run(
|
|
@@ -74,15 +74,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
74
74
|
maxDepth: 512,
|
|
75
75
|
maxNodes: 5e6
|
|
76
76
|
};
|
|
77
|
-
var
|
|
77
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
78
|
+
var MARKUP_SKIPS = [
|
|
79
|
+
["<!--", "-->"],
|
|
80
|
+
["<![CDATA[", "]]>"],
|
|
81
|
+
["<?", "?>"]
|
|
82
|
+
];
|
|
78
83
|
function checkXmlLimits(xml, label2, limits = {}) {
|
|
79
84
|
const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
80
85
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
81
86
|
let depth = 0;
|
|
82
87
|
let nodes = 0;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
let at2 = xml.indexOf("<");
|
|
89
|
+
while (at2 !== -1) {
|
|
90
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at2));
|
|
91
|
+
if (skip) {
|
|
92
|
+
const end = xml.indexOf(skip[1], at2 + skip[0].length);
|
|
93
|
+
if (end === -1) return;
|
|
94
|
+
at2 = xml.indexOf("<", end + skip[1].length);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
TAG_RE.lastIndex = at2;
|
|
98
|
+
const match2 = TAG_RE.exec(xml);
|
|
99
|
+
if (!match2) {
|
|
100
|
+
at2 = xml.indexOf("<", at2 + 1);
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const [, closing, , selfClosing] = match2;
|
|
104
|
+
at2 = xml.indexOf("<", at2 + match2[0].length);
|
|
86
105
|
if (closing) {
|
|
87
106
|
depth--;
|
|
88
107
|
continue;
|
|
@@ -43996,7 +44015,9 @@ function pivotTableXml(source2, cacheId, cache3) {
|
|
|
43996
44015
|
}
|
|
43997
44016
|
function dateFilterXml(pivot, filter2) {
|
|
43998
44017
|
const x15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main";
|
|
43999
|
-
const id3 = Number(
|
|
44018
|
+
const id3 = Number(
|
|
44019
|
+
/\bid="(\d+)"/.exec(/<filter\s[^>]*>/.exec(pivot.sourceXml ?? "")?.[0] ?? "")?.[1] ?? 1
|
|
44020
|
+
);
|
|
44000
44021
|
return `<filters count="1"><filter${attrs2({ fld: pivot.fields.indexOf(filter2.field), type: "dateBetween", evalOrder: -1, id: id3, name: filter2.field })}><autoFilter ref="A1"><filterColumn colId="0"><customFilters and="1"><customFilter operator="greaterThanOrEqual" val="${Math.floor(filter2.start)}"/><customFilter operator="lessThanOrEqual" val="${Math.floor(filter2.end)}"/></customFilters></filterColumn></autoFilter><extLst><ext uri="{0605FD5F-26C8-4aeb-8148-2DB25E43C511}" xmlns:x15="${x15}"><x15:pivotFilter useWholeDay="1"/></ext></extLst></filter></filters>`;
|
|
44001
44022
|
}
|
|
44002
44023
|
|
|
@@ -48614,7 +48635,7 @@ function addScenario(ctx, s, draft) {
|
|
|
48614
48635
|
}
|
|
48615
48636
|
function editScenario(ctx, s, index3, draft) {
|
|
48616
48637
|
const sheet = sheetAt(ctx.workbook, s);
|
|
48617
|
-
const existing = scenariosOf(sheet)[index3];
|
|
48638
|
+
const existing = Number.isInteger(index3) ? scenariosOf(sheet)[index3] : void 0;
|
|
48618
48639
|
if (!existing) throw new ScenarioError("missing");
|
|
48619
48640
|
if (existing.locked && sheet.protection) throw new ScenarioError("locked");
|
|
48620
48641
|
const name3 = checkName(sheet, draft.name, index3);
|
|
@@ -48625,7 +48646,7 @@ function editScenario(ctx, s, index3, draft) {
|
|
|
48625
48646
|
}
|
|
48626
48647
|
function deleteScenario(ctx, s, index3) {
|
|
48627
48648
|
const sheet = sheetAt(ctx.workbook, s);
|
|
48628
|
-
const existing = scenariosOf(sheet)[index3];
|
|
48649
|
+
const existing = Number.isInteger(index3) ? scenariosOf(sheet)[index3] : void 0;
|
|
48629
48650
|
if (!existing) throw new ScenarioError("missing");
|
|
48630
48651
|
if (existing.locked && sheet.protection) throw new ScenarioError("locked");
|
|
48631
48652
|
ctx.run("Delete scenario", "view", PARTS2(s), () => {
|
|
@@ -49403,7 +49424,10 @@ function insertTimeline(ctx, s, ref) {
|
|
|
49403
49424
|
const id3 = Math.max(
|
|
49404
49425
|
1,
|
|
49405
49426
|
...sheet.drawings.flatMap(
|
|
49406
|
-
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(
|
|
49427
|
+
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(/<[\w:]*cNvPr\b[^>]*>/g)].flatMap((m) => {
|
|
49428
|
+
const id4 = /\sid="(\d+)"/.exec(m[0])?.[1];
|
|
49429
|
+
return id4 ? [Number(id4)] : [];
|
|
49430
|
+
}) : []
|
|
49407
49431
|
)
|
|
49408
49432
|
) + 1;
|
|
49409
49433
|
ctx.run(
|
|
@@ -49941,7 +49965,10 @@ function insertSlicer(ctx, s, ref) {
|
|
|
49941
49965
|
const id3 = Math.max(
|
|
49942
49966
|
1,
|
|
49943
49967
|
...sheet.drawings.flatMap(
|
|
49944
|
-
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(
|
|
49968
|
+
(d) => "sourceXml" in d && d.sourceXml ? [...d.sourceXml.matchAll(/<[\w:]*cNvPr\b[^>]*>/g)].flatMap((m) => {
|
|
49969
|
+
const id4 = /\sid="(\d+)"/.exec(m[0])?.[1];
|
|
49970
|
+
return id4 ? [Number(id4)] : [];
|
|
49971
|
+
}) : []
|
|
49945
49972
|
)
|
|
49946
49973
|
) + 1;
|
|
49947
49974
|
ctx.run(
|
package/dist/chart/index.cjs
CHANGED
|
@@ -1817,15 +1817,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1817
1817
|
maxDepth: 512,
|
|
1818
1818
|
maxNodes: 5e6
|
|
1819
1819
|
};
|
|
1820
|
-
var
|
|
1820
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
1821
|
+
var MARKUP_SKIPS = [
|
|
1822
|
+
["<!--", "-->"],
|
|
1823
|
+
["<![CDATA[", "]]>"],
|
|
1824
|
+
["<?", "?>"]
|
|
1825
|
+
];
|
|
1821
1826
|
function checkXmlLimits(xml, label, limits = {}) {
|
|
1822
1827
|
const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
1823
1828
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
1824
1829
|
let depth = 0;
|
|
1825
1830
|
let nodes = 0;
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1831
|
+
let at = xml.indexOf("<");
|
|
1832
|
+
while (at !== -1) {
|
|
1833
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at));
|
|
1834
|
+
if (skip) {
|
|
1835
|
+
const end = xml.indexOf(skip[1], at + skip[0].length);
|
|
1836
|
+
if (end === -1) return;
|
|
1837
|
+
at = xml.indexOf("<", end + skip[1].length);
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1840
|
+
TAG_RE.lastIndex = at;
|
|
1841
|
+
const match = TAG_RE.exec(xml);
|
|
1842
|
+
if (!match) {
|
|
1843
|
+
at = xml.indexOf("<", at + 1);
|
|
1844
|
+
continue;
|
|
1845
|
+
}
|
|
1846
|
+
const [, closing, , selfClosing] = match;
|
|
1847
|
+
at = xml.indexOf("<", at + match[0].length);
|
|
1829
1848
|
if (closing) {
|
|
1830
1849
|
depth--;
|
|
1831
1850
|
continue;
|
package/dist/chart/index.mjs
CHANGED
|
@@ -1815,15 +1815,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1815
1815
|
maxDepth: 512,
|
|
1816
1816
|
maxNodes: 5e6
|
|
1817
1817
|
};
|
|
1818
|
-
var
|
|
1818
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
1819
|
+
var MARKUP_SKIPS = [
|
|
1820
|
+
["<!--", "-->"],
|
|
1821
|
+
["<![CDATA[", "]]>"],
|
|
1822
|
+
["<?", "?>"]
|
|
1823
|
+
];
|
|
1819
1824
|
function checkXmlLimits(xml, label, limits = {}) {
|
|
1820
1825
|
const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
1821
1826
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
1822
1827
|
let depth = 0;
|
|
1823
1828
|
let nodes = 0;
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1829
|
+
let at = xml.indexOf("<");
|
|
1830
|
+
while (at !== -1) {
|
|
1831
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at));
|
|
1832
|
+
if (skip) {
|
|
1833
|
+
const end = xml.indexOf(skip[1], at + skip[0].length);
|
|
1834
|
+
if (end === -1) return;
|
|
1835
|
+
at = xml.indexOf("<", end + skip[1].length);
|
|
1836
|
+
continue;
|
|
1837
|
+
}
|
|
1838
|
+
TAG_RE.lastIndex = at;
|
|
1839
|
+
const match = TAG_RE.exec(xml);
|
|
1840
|
+
if (!match) {
|
|
1841
|
+
at = xml.indexOf("<", at + 1);
|
|
1842
|
+
continue;
|
|
1843
|
+
}
|
|
1844
|
+
const [, closing, , selfClosing] = match;
|
|
1845
|
+
at = xml.indexOf("<", at + match[0].length);
|
|
1827
1846
|
if (closing) {
|
|
1828
1847
|
depth--;
|
|
1829
1848
|
continue;
|
|
@@ -21818,7 +21818,7 @@ function findTextBearingElementById(elements3, elementId) {
|
|
|
21818
21818
|
}
|
|
21819
21819
|
async function loadNestedDeck(pptxBytes) {
|
|
21820
21820
|
try {
|
|
21821
|
-
const { PptxHandler } = await import('./PptxHandler-
|
|
21821
|
+
const { PptxHandler } = await import('./PptxHandler-ZF4G56V3.mjs');
|
|
21822
21822
|
const handler = new PptxHandler();
|
|
21823
21823
|
const data = await handler.load(pptxBytes.buffer.slice(0));
|
|
21824
21824
|
return { handler, slides: data.slides };
|
|
@@ -38777,15 +38777,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
38777
38777
|
maxDepth: 512,
|
|
38778
38778
|
maxNodes: 5e6
|
|
38779
38779
|
};
|
|
38780
|
-
var
|
|
38780
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
38781
|
+
var MARKUP_SKIPS = [
|
|
38782
|
+
["<!--", "-->"],
|
|
38783
|
+
["<![CDATA[", "]]>"],
|
|
38784
|
+
["<?", "?>"]
|
|
38785
|
+
];
|
|
38781
38786
|
function checkXmlLimits(xml, label, limits = {}) {
|
|
38782
38787
|
const maxDepth2 = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
38783
38788
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
38784
38789
|
let depth = 0;
|
|
38785
38790
|
let nodes = 0;
|
|
38786
|
-
|
|
38787
|
-
|
|
38788
|
-
|
|
38791
|
+
let at2 = xml.indexOf("<");
|
|
38792
|
+
while (at2 !== -1) {
|
|
38793
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at2));
|
|
38794
|
+
if (skip) {
|
|
38795
|
+
const end = xml.indexOf(skip[1], at2 + skip[0].length);
|
|
38796
|
+
if (end === -1) return;
|
|
38797
|
+
at2 = xml.indexOf("<", end + skip[1].length);
|
|
38798
|
+
continue;
|
|
38799
|
+
}
|
|
38800
|
+
TAG_RE.lastIndex = at2;
|
|
38801
|
+
const match = TAG_RE.exec(xml);
|
|
38802
|
+
if (!match) {
|
|
38803
|
+
at2 = xml.indexOf("<", at2 + 1);
|
|
38804
|
+
continue;
|
|
38805
|
+
}
|
|
38806
|
+
const [, closing, , selfClosing] = match;
|
|
38807
|
+
at2 = xml.indexOf("<", at2 + match[0].length);
|
|
38789
38808
|
if (closing) {
|
|
38790
38809
|
depth--;
|
|
38791
38810
|
continue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escAttr, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, gradFill, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-
|
|
1
|
+
import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escAttr, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, gradFill, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-5ROLXCIY.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openNestedZip, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT } from './chunk-M4XLF4R7.mjs';
|
|
3
3
|
import { resolveSmartArtLayoutCategory } from './chunk-3GXV5MPC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-54S5A5PZ.mjs';
|
|
@@ -29124,15 +29124,34 @@ var DEFAULT_XML_LIMITS = {
|
|
|
29124
29124
|
maxDepth: 512,
|
|
29125
29125
|
maxNodes: 5e6
|
|
29126
29126
|
};
|
|
29127
|
-
var
|
|
29127
|
+
var TAG_RE = /<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/y;
|
|
29128
|
+
var MARKUP_SKIPS = [
|
|
29129
|
+
["<!--", "-->"],
|
|
29130
|
+
["<![CDATA[", "]]>"],
|
|
29131
|
+
["<?", "?>"]
|
|
29132
|
+
];
|
|
29128
29133
|
function checkXmlLimits(xml, label, limits = {}) {
|
|
29129
29134
|
const maxDepth2 = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
|
|
29130
29135
|
const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
|
|
29131
29136
|
let depth = 0;
|
|
29132
29137
|
let nodes = 0;
|
|
29133
|
-
|
|
29134
|
-
|
|
29135
|
-
|
|
29138
|
+
let at2 = xml.indexOf("<");
|
|
29139
|
+
while (at2 !== -1) {
|
|
29140
|
+
const skip = MARKUP_SKIPS.find(([open]) => xml.startsWith(open, at2));
|
|
29141
|
+
if (skip) {
|
|
29142
|
+
const end = xml.indexOf(skip[1], at2 + skip[0].length);
|
|
29143
|
+
if (end === -1) return;
|
|
29144
|
+
at2 = xml.indexOf("<", end + skip[1].length);
|
|
29145
|
+
continue;
|
|
29146
|
+
}
|
|
29147
|
+
TAG_RE.lastIndex = at2;
|
|
29148
|
+
const match = TAG_RE.exec(xml);
|
|
29149
|
+
if (!match) {
|
|
29150
|
+
at2 = xml.indexOf("<", at2 + 1);
|
|
29151
|
+
continue;
|
|
29152
|
+
}
|
|
29153
|
+
const [, closing, , selfClosing] = match;
|
|
29154
|
+
at2 = xml.indexOf("<", at2 + match[0].length);
|
|
29136
29155
|
if (closing) {
|
|
29137
29156
|
depth--;
|
|
29138
29157
|
continue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-5ROLXCIY.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|