pptx-react-viewer 4.24.1 → 4.24.3
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/CHANGELOG.md +19 -0
- package/dist/{AiChatPanel-NBZ2IZQO.mjs → AiChatPanel-B7LBWZ46.mjs} +3 -3
- package/dist/AiChatPanel-B7LBWZ46.mjs.br +0 -0
- package/dist/AiChatPanel-B7LBWZ46.mjs.gz +0 -0
- package/dist/{AiChatPanel-6GZXTGXA.js → AiChatPanel-XFP4F344.js} +27 -27
- package/dist/AiChatPanel-XFP4F344.js.br +0 -0
- package/dist/AiChatPanel-XFP4F344.js.gz +0 -0
- package/dist/{Model3DScene-YQXR5Q7P.mjs → Model3DScene-FLE6KYYG.mjs} +1 -1
- package/dist/Model3DScene-FLE6KYYG.mjs.br +0 -0
- package/dist/Model3DScene-FLE6KYYG.mjs.gz +0 -0
- package/dist/{Model3DScene-5BX5BOJ2.js → Model3DScene-XCWVVQRN.js} +2 -2
- package/dist/Model3DScene-XCWVVQRN.js.br +0 -0
- package/dist/Model3DScene-XCWVVQRN.js.gz +0 -0
- package/dist/{chunk-J4Z3JQGJ.js → chunk-7MPBJ5S4.js} +1130 -1121
- package/dist/chunk-7MPBJ5S4.js.br +0 -0
- package/dist/chunk-7MPBJ5S4.js.gz +0 -0
- package/dist/{chunk-IYBAOA5G.js → chunk-7YRLWWRY.js} +835 -824
- package/dist/chunk-7YRLWWRY.js.br +0 -0
- package/dist/chunk-7YRLWWRY.js.gz +0 -0
- package/dist/{chunk-6UF53DM3.mjs → chunk-C7SKC34H.mjs} +9 -5
- package/dist/chunk-C7SKC34H.mjs.br +0 -0
- package/dist/chunk-C7SKC34H.mjs.gz +0 -0
- package/dist/{chunk-6WHSZZKP.mjs → chunk-HB5Z3SSC.mjs} +19 -8
- package/dist/chunk-HB5Z3SSC.mjs.br +0 -0
- package/dist/chunk-HB5Z3SSC.mjs.gz +0 -0
- package/dist/{chunk-CPPNOJCN.mjs → chunk-HF2JXYZT.mjs} +24 -15
- package/dist/chunk-HF2JXYZT.mjs.br +0 -0
- package/dist/chunk-HF2JXYZT.mjs.gz +0 -0
- package/dist/{chunk-OQ2LHVOJ.js → chunk-HNUSASYH.js} +5 -5
- package/dist/chunk-HNUSASYH.js.br +0 -0
- package/dist/chunk-HNUSASYH.js.gz +0 -0
- package/dist/{chunk-RACSFSEB.js → chunk-MDVRIMCW.js} +195 -191
- package/dist/chunk-MDVRIMCW.js.br +0 -0
- package/dist/chunk-MDVRIMCW.js.gz +0 -0
- package/dist/{chunk-EYHFT2GT.mjs → chunk-SDSL4ZDQ.mjs} +1 -1
- package/dist/chunk-SDSL4ZDQ.mjs.br +0 -0
- package/dist/chunk-SDSL4ZDQ.mjs.gz +0 -0
- package/dist/{chunk-TEXHBJQT.mjs → chunk-TJG3I5L4.mjs} +235 -146
- package/dist/chunk-TJG3I5L4.mjs.br +0 -0
- package/dist/chunk-TJG3I5L4.mjs.gz +0 -0
- package/dist/{chunk-EKHJAOUM.js → chunk-XEESKNA6.js} +236 -145
- package/dist/chunk-XEESKNA6.js.br +0 -0
- package/dist/chunk-XEESKNA6.js.gz +0 -0
- package/dist/index.js +61 -61
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +104 -104
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-6GZXTGXA.js.br +0 -0
- package/dist/AiChatPanel-6GZXTGXA.js.gz +0 -0
- package/dist/AiChatPanel-NBZ2IZQO.mjs.br +0 -0
- package/dist/AiChatPanel-NBZ2IZQO.mjs.gz +0 -0
- package/dist/Model3DScene-5BX5BOJ2.js.br +0 -0
- package/dist/Model3DScene-5BX5BOJ2.js.gz +0 -0
- package/dist/Model3DScene-YQXR5Q7P.mjs.br +0 -0
- package/dist/Model3DScene-YQXR5Q7P.mjs.gz +0 -0
- package/dist/chunk-6UF53DM3.mjs.br +0 -0
- package/dist/chunk-6UF53DM3.mjs.gz +0 -0
- package/dist/chunk-6WHSZZKP.mjs.br +0 -0
- package/dist/chunk-6WHSZZKP.mjs.gz +0 -0
- package/dist/chunk-CPPNOJCN.mjs.br +0 -0
- package/dist/chunk-CPPNOJCN.mjs.gz +0 -0
- package/dist/chunk-EKHJAOUM.js.br +0 -0
- package/dist/chunk-EKHJAOUM.js.gz +0 -0
- package/dist/chunk-EYHFT2GT.mjs.br +0 -0
- package/dist/chunk-EYHFT2GT.mjs.gz +0 -0
- package/dist/chunk-IYBAOA5G.js.br +0 -0
- package/dist/chunk-IYBAOA5G.js.gz +0 -0
- package/dist/chunk-J4Z3JQGJ.js.br +0 -0
- package/dist/chunk-J4Z3JQGJ.js.gz +0 -0
- package/dist/chunk-OQ2LHVOJ.js.br +0 -0
- package/dist/chunk-OQ2LHVOJ.js.gz +0 -0
- package/dist/chunk-RACSFSEB.js.br +0 -0
- package/dist/chunk-RACSFSEB.js.gz +0 -0
- package/dist/chunk-TEXHBJQT.mjs.br +0 -0
- package/dist/chunk-TEXHBJQT.mjs.gz +0 -0
|
Binary file
|
|
@@ -75495,20 +75495,20 @@ function descendantsOf(node, childrenOf) {
|
|
|
75495
75495
|
}
|
|
75496
75496
|
return out;
|
|
75497
75497
|
}
|
|
75498
|
-
function ancestorsOf(node,
|
|
75498
|
+
function ancestorsOf(node, parentOf2) {
|
|
75499
75499
|
const out = [];
|
|
75500
|
-
let current =
|
|
75500
|
+
let current = parentOf2.get(node.id);
|
|
75501
75501
|
while (current) {
|
|
75502
75502
|
out.push(current);
|
|
75503
|
-
current =
|
|
75503
|
+
current = parentOf2.get(current.id);
|
|
75504
75504
|
}
|
|
75505
75505
|
return out;
|
|
75506
75506
|
}
|
|
75507
|
-
function siblingGroupOf(node,
|
|
75508
|
-
const parent =
|
|
75507
|
+
function siblingGroupOf(node, parentOf2, childrenOf, roots) {
|
|
75508
|
+
const parent = parentOf2.get(node.id);
|
|
75509
75509
|
return parent ? childrenOf.get(parent.id) ?? [] : roots;
|
|
75510
75510
|
}
|
|
75511
|
-
function navigateAxisHop(current, axis, nodes, childrenOf,
|
|
75511
|
+
function navigateAxisHop(current, axis, nodes, childrenOf, parentOf2, roots) {
|
|
75512
75512
|
const out = [];
|
|
75513
75513
|
const seen = /* @__PURE__ */ new Set();
|
|
75514
75514
|
const add7 = (node) => {
|
|
@@ -75538,22 +75538,22 @@ function navigateAxisHop(current, axis, nodes, childrenOf, parentOf, roots) {
|
|
|
75538
75538
|
addAll2(descendantsOf(node, childrenOf));
|
|
75539
75539
|
break;
|
|
75540
75540
|
case "par": {
|
|
75541
|
-
const parent =
|
|
75541
|
+
const parent = parentOf2.get(node.id);
|
|
75542
75542
|
if (parent) {
|
|
75543
75543
|
add7(parent);
|
|
75544
75544
|
}
|
|
75545
75545
|
break;
|
|
75546
75546
|
}
|
|
75547
75547
|
case "ancst":
|
|
75548
|
-
addAll2(ancestorsOf(node,
|
|
75548
|
+
addAll2(ancestorsOf(node, parentOf2));
|
|
75549
75549
|
break;
|
|
75550
75550
|
case "ancstOrSelf":
|
|
75551
75551
|
add7(node);
|
|
75552
|
-
addAll2(ancestorsOf(node,
|
|
75552
|
+
addAll2(ancestorsOf(node, parentOf2));
|
|
75553
75553
|
break;
|
|
75554
75554
|
case "followSib":
|
|
75555
75555
|
case "precedSib": {
|
|
75556
|
-
const siblings = siblingGroupOf(node,
|
|
75556
|
+
const siblings = siblingGroupOf(node, parentOf2, childrenOf, roots);
|
|
75557
75557
|
const index = siblings.findIndex((sibling) => sibling.id === node.id);
|
|
75558
75558
|
addAll2(axis === "followSib" ? siblings.slice(index + 1) : siblings.slice(0, index));
|
|
75559
75559
|
break;
|
|
@@ -75565,7 +75565,7 @@ function navigateAxisHop(current, axis, nodes, childrenOf, parentOf, roots) {
|
|
|
75565
75565
|
break;
|
|
75566
75566
|
}
|
|
75567
75567
|
const excluded = new Set(
|
|
75568
|
-
(axis === "follow" ? descendantsOf(node, childrenOf) : ancestorsOf(node,
|
|
75568
|
+
(axis === "follow" ? descendantsOf(node, childrenOf) : ancestorsOf(node, parentOf2)).map(
|
|
75569
75569
|
(n) => n.id
|
|
75570
75570
|
)
|
|
75571
75571
|
);
|
|
@@ -75574,7 +75574,7 @@ function navigateAxisHop(current, axis, nodes, childrenOf, parentOf, roots) {
|
|
|
75574
75574
|
break;
|
|
75575
75575
|
}
|
|
75576
75576
|
case "root": {
|
|
75577
|
-
const ancestors = ancestorsOf(node,
|
|
75577
|
+
const ancestors = ancestorsOf(node, parentOf2);
|
|
75578
75578
|
add7(ancestors.length > 0 ? ancestors[ancestors.length - 1] : node);
|
|
75579
75579
|
break;
|
|
75580
75580
|
}
|
|
@@ -75620,11 +75620,11 @@ function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
|
75620
75620
|
}
|
|
75621
75621
|
const byId = new Map(nodes.map((n) => [n.id, n]));
|
|
75622
75622
|
const childrenOf = /* @__PURE__ */ new Map();
|
|
75623
|
-
const
|
|
75623
|
+
const parentOf2 = /* @__PURE__ */ new Map();
|
|
75624
75624
|
for (const node of nodes) {
|
|
75625
75625
|
const parent = node.parentId ? byId.get(node.parentId) : void 0;
|
|
75626
75626
|
if (parent) {
|
|
75627
|
-
|
|
75627
|
+
parentOf2.set(node.id, parent);
|
|
75628
75628
|
const list2 = childrenOf.get(parent.id);
|
|
75629
75629
|
if (list2) {
|
|
75630
75630
|
list2.push(node);
|
|
@@ -75644,7 +75644,7 @@ function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
|
75644
75644
|
nextHop = 1;
|
|
75645
75645
|
} else if (context !== void 0) {
|
|
75646
75646
|
current = applyPointTypeAndRange(
|
|
75647
|
-
navigateAxisHop(context, axis[0], nodes, childrenOf,
|
|
75647
|
+
navigateAxisHop(context, axis[0], nodes, childrenOf, parentOf2, roots),
|
|
75648
75648
|
pointTypes?.[0],
|
|
75649
75649
|
start?.[0],
|
|
75650
75650
|
count?.[0]
|
|
@@ -75656,7 +75656,7 @@ function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
|
75656
75656
|
}
|
|
75657
75657
|
for (let hop = nextHop; hop < axis.length; hop += 1) {
|
|
75658
75658
|
current = applyPointTypeAndRange(
|
|
75659
|
-
navigateAxisHop(current, axis[hop], nodes, childrenOf,
|
|
75659
|
+
navigateAxisHop(current, axis[hop], nodes, childrenOf, parentOf2, roots),
|
|
75660
75660
|
pointTypes?.[hop],
|
|
75661
75661
|
start?.[hop],
|
|
75662
75662
|
count?.[hop]
|
|
@@ -119499,7 +119499,7 @@ function nestLegacyCommentReplies(comments) {
|
|
|
119499
119499
|
byOwnKey.set(`${authorId}:${idx}`, comment);
|
|
119500
119500
|
}
|
|
119501
119501
|
}
|
|
119502
|
-
const
|
|
119502
|
+
const parentOf2 = /* @__PURE__ */ new Map();
|
|
119503
119503
|
const childrenOf = /* @__PURE__ */ new Map();
|
|
119504
119504
|
for (const comment of comments) {
|
|
119505
119505
|
const ref = parseLegacyThreadingParent(comment.rawXml);
|
|
@@ -119511,7 +119511,7 @@ function nestLegacyCommentReplies(comments) {
|
|
|
119511
119511
|
continue;
|
|
119512
119512
|
}
|
|
119513
119513
|
comment.parentId = parent.id;
|
|
119514
|
-
|
|
119514
|
+
parentOf2.set(comment.id, parent);
|
|
119515
119515
|
const siblings = childrenOf.get(parent.id) ?? [];
|
|
119516
119516
|
siblings.push(comment);
|
|
119517
119517
|
childrenOf.set(parent.id, siblings);
|
|
@@ -119523,7 +119523,7 @@ function nestLegacyCommentReplies(comments) {
|
|
|
119523
119523
|
let current = comment;
|
|
119524
119524
|
const seen = /* @__PURE__ */ new Set([comment.id]);
|
|
119525
119525
|
for (; ; ) {
|
|
119526
|
-
const parent =
|
|
119526
|
+
const parent = parentOf2.get(current.id);
|
|
119527
119527
|
if (!parent || seen.has(parent.id)) {
|
|
119528
119528
|
return current;
|
|
119529
119529
|
}
|
|
@@ -119532,7 +119532,7 @@ function nestLegacyCommentReplies(comments) {
|
|
|
119532
119532
|
}
|
|
119533
119533
|
};
|
|
119534
119534
|
for (const comment of comments) {
|
|
119535
|
-
if (
|
|
119535
|
+
if (parentOf2.has(comment.id) || childrenOf.has(comment.id)) {
|
|
119536
119536
|
comment.threadId = rootOf4(comment).id;
|
|
119537
119537
|
}
|
|
119538
119538
|
}
|
|
@@ -119550,7 +119550,7 @@ function nestLegacyCommentReplies(comments) {
|
|
|
119550
119550
|
};
|
|
119551
119551
|
const roots = [];
|
|
119552
119552
|
for (const comment of comments) {
|
|
119553
|
-
if (!
|
|
119553
|
+
if (!parentOf2.has(comment.id)) {
|
|
119554
119554
|
roots.push(nest(comment));
|
|
119555
119555
|
}
|
|
119556
119556
|
}
|
|
@@ -233355,8 +233355,8 @@ function getStrokeOnlyPresetPaths(element) {
|
|
|
233355
233355
|
}
|
|
233356
233356
|
const result = evaluatePresetShape(
|
|
233357
233357
|
shapeType,
|
|
233358
|
-
Math.max(element.width,
|
|
233359
|
-
Math.max(element.height,
|
|
233358
|
+
Math.max(element.width, 0),
|
|
233359
|
+
Math.max(element.height, 0),
|
|
233360
233360
|
element.shapeAdjustments
|
|
233361
233361
|
);
|
|
233362
233362
|
if (!result || !result.fillNone) {
|
|
@@ -234154,6 +234154,9 @@ function buildStrokeOutline(element) {
|
|
|
234154
234154
|
function strokeOutlineViewBox(element) {
|
|
234155
234155
|
const width = Math.max(element.width, 0);
|
|
234156
234156
|
const height = Math.max(element.height, 0);
|
|
234157
|
+
if (width < 1 || height < 1) {
|
|
234158
|
+
return void 0;
|
|
234159
|
+
}
|
|
234157
234160
|
return `0 0 ${width} ${height}`;
|
|
234158
234161
|
}
|
|
234159
234162
|
function suppressesCssBorder(element) {
|
|
@@ -275979,6 +275982,149 @@ function buildSmartArt3DSpecForElement(element, options2 = {}) {
|
|
|
275979
275982
|
});
|
|
275980
275983
|
return model.meshes.length > 0 ? model : null;
|
|
275981
275984
|
}
|
|
275985
|
+
function polygonBounds(points4) {
|
|
275986
|
+
const pairs3 = points4.trim().split(/\s+/u);
|
|
275987
|
+
let minX = Infinity;
|
|
275988
|
+
let minY = Infinity;
|
|
275989
|
+
let maxX = -Infinity;
|
|
275990
|
+
let maxY = -Infinity;
|
|
275991
|
+
for (const pair of pairs3) {
|
|
275992
|
+
const comma = pair.indexOf(",");
|
|
275993
|
+
if (comma < 0) {
|
|
275994
|
+
continue;
|
|
275995
|
+
}
|
|
275996
|
+
const x = parseFloat(pair.slice(0, comma));
|
|
275997
|
+
const y = parseFloat(pair.slice(comma + 1));
|
|
275998
|
+
if (!isFinite(x) || !isFinite(y)) {
|
|
275999
|
+
continue;
|
|
276000
|
+
}
|
|
276001
|
+
if (x < minX) {
|
|
276002
|
+
minX = x;
|
|
276003
|
+
}
|
|
276004
|
+
if (x > maxX) {
|
|
276005
|
+
maxX = x;
|
|
276006
|
+
}
|
|
276007
|
+
if (y < minY) {
|
|
276008
|
+
minY = y;
|
|
276009
|
+
}
|
|
276010
|
+
if (y > maxY) {
|
|
276011
|
+
maxY = y;
|
|
276012
|
+
}
|
|
276013
|
+
}
|
|
276014
|
+
if (!isFinite(minX)) {
|
|
276015
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
276016
|
+
}
|
|
276017
|
+
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
|
|
276018
|
+
}
|
|
276019
|
+
function renderedNodeToShape(rn, nodeId, family2) {
|
|
276020
|
+
const id = `reflow-${family2}-${nodeId}`;
|
|
276021
|
+
const text3 = rn.text || void 0;
|
|
276022
|
+
if (rn.kind === "rect") {
|
|
276023
|
+
return {
|
|
276024
|
+
id,
|
|
276025
|
+
shapeType: rn.rx > 0 ? "roundRect" : "rect",
|
|
276026
|
+
x: rn.x,
|
|
276027
|
+
y: rn.y,
|
|
276028
|
+
width: rn.width,
|
|
276029
|
+
height: rn.height,
|
|
276030
|
+
rotation: 0,
|
|
276031
|
+
fillColor: rn.fill,
|
|
276032
|
+
strokeColor: rn.stroke,
|
|
276033
|
+
strokeWidth: rn.strokeWidth,
|
|
276034
|
+
text: text3,
|
|
276035
|
+
fontSize: rn.fontSize
|
|
276036
|
+
};
|
|
276037
|
+
}
|
|
276038
|
+
if (rn.kind === "circle") {
|
|
276039
|
+
return {
|
|
276040
|
+
id,
|
|
276041
|
+
shapeType: "ellipse",
|
|
276042
|
+
x: rn.cx - rn.r,
|
|
276043
|
+
y: rn.cy - rn.r,
|
|
276044
|
+
width: rn.r * 2,
|
|
276045
|
+
height: rn.r * 2,
|
|
276046
|
+
rotation: 0,
|
|
276047
|
+
fillColor: rn.fill,
|
|
276048
|
+
strokeColor: rn.stroke,
|
|
276049
|
+
strokeWidth: rn.strokeWidth,
|
|
276050
|
+
text: text3,
|
|
276051
|
+
fontSize: rn.fontSize
|
|
276052
|
+
};
|
|
276053
|
+
}
|
|
276054
|
+
const bounds = polygonBounds(rn.points);
|
|
276055
|
+
return {
|
|
276056
|
+
id,
|
|
276057
|
+
shapeType: "chevron",
|
|
276058
|
+
x: bounds.x,
|
|
276059
|
+
y: bounds.y,
|
|
276060
|
+
width: bounds.width,
|
|
276061
|
+
height: bounds.height,
|
|
276062
|
+
rotation: 0,
|
|
276063
|
+
fillColor: rn.fill,
|
|
276064
|
+
strokeColor: rn.stroke,
|
|
276065
|
+
strokeWidth: rn.strokeWidth,
|
|
276066
|
+
text: text3,
|
|
276067
|
+
fontSize: rn.fontSize
|
|
276068
|
+
};
|
|
276069
|
+
}
|
|
276070
|
+
function reflowToDrawingShapes(layoutResult, nodes) {
|
|
276071
|
+
const flat = flattenNodes([...nodes]);
|
|
276072
|
+
const family2 = layoutResult.family;
|
|
276073
|
+
const shapes = [];
|
|
276074
|
+
for (let i2 = 0; i2 < layoutResult.nodes.length; i2++) {
|
|
276075
|
+
const rn = layoutResult.nodes[i2];
|
|
276076
|
+
const sourceNode = flat[i2];
|
|
276077
|
+
const nodeId = sourceNode?.id ?? rn.key;
|
|
276078
|
+
shapes.push(renderedNodeToShape(rn, nodeId, family2));
|
|
276079
|
+
}
|
|
276080
|
+
return shapes;
|
|
276081
|
+
}
|
|
276082
|
+
function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, elementId, box) {
|
|
276083
|
+
const shapes = smartArtData.drawingShapes;
|
|
276084
|
+
if (shapes === void 0 || shapes.length > 0 || smartArtData.nodes.length === 0) {
|
|
276085
|
+
return smartArtData;
|
|
276086
|
+
}
|
|
276087
|
+
const layoutResult = computeSmartArtElementLayout(
|
|
276088
|
+
{ ...smartArtData, layout },
|
|
276089
|
+
smartArtData.nodes,
|
|
276090
|
+
box,
|
|
276091
|
+
palette,
|
|
276092
|
+
style,
|
|
276093
|
+
elementId
|
|
276094
|
+
);
|
|
276095
|
+
return {
|
|
276096
|
+
...smartArtData,
|
|
276097
|
+
drawingShapes: reflowToDrawingShapes(layoutResult, smartArtData.nodes)
|
|
276098
|
+
};
|
|
276099
|
+
}
|
|
276100
|
+
function reflowed(element, next) {
|
|
276101
|
+
return rebuildDrawingShapesIfCleared(
|
|
276102
|
+
next,
|
|
276103
|
+
next.layout,
|
|
276104
|
+
resolvePalette(next),
|
|
276105
|
+
next.style ?? "flat",
|
|
276106
|
+
element.id,
|
|
276107
|
+
{ width: element.width, height: element.height }
|
|
276108
|
+
);
|
|
276109
|
+
}
|
|
276110
|
+
function commitSmartArtNodeText(element, nodeId, text3) {
|
|
276111
|
+
if (element.type !== "smartArt" || !element.smartArtData) {
|
|
276112
|
+
return null;
|
|
276113
|
+
}
|
|
276114
|
+
const data = element.smartArtData;
|
|
276115
|
+
if (!shouldCommitSmartArtNodeText(data, nodeId, text3)) {
|
|
276116
|
+
return null;
|
|
276117
|
+
}
|
|
276118
|
+
return reflowed(element, updateSmartArtNodeText(data, nodeId, text3));
|
|
276119
|
+
}
|
|
276120
|
+
function commitSmartArtNodeFill(element, nodeId, fill) {
|
|
276121
|
+
if (element.type !== "smartArt" || !element.smartArtData) {
|
|
276122
|
+
return null;
|
|
276123
|
+
}
|
|
276124
|
+
const data = element.smartArtData;
|
|
276125
|
+
const next = setSmartArtNodeStyle(data, nodeId, { fillColor: fill });
|
|
276126
|
+
return next === data ? null : reflowed(element, next);
|
|
276127
|
+
}
|
|
275982
276128
|
init_chart_3d_oblique_bars();
|
|
275983
276129
|
init_chart_view_model_chrome();
|
|
275984
276130
|
var PT = 4 / 3;
|
|
@@ -279950,7 +280096,7 @@ function isEditorTextInputTarget(target) {
|
|
|
279950
280096
|
return FORM_FIELD_TAGS.test(element.tagName) || element.isContentEditable === true;
|
|
279951
280097
|
}
|
|
279952
280098
|
var CANVAS_SELECTOR = "[data-pptx-viewport]";
|
|
279953
|
-
var
|
|
280099
|
+
var CONTROL_SELECTOR2 = [
|
|
279954
280100
|
"button",
|
|
279955
280101
|
"a[href]",
|
|
279956
280102
|
"summary",
|
|
@@ -280000,7 +280146,7 @@ function isEditorControlTarget(target) {
|
|
|
280000
280146
|
if (tag2.includes("-")) {
|
|
280001
280147
|
return true;
|
|
280002
280148
|
}
|
|
280003
|
-
return Boolean(element.closest(
|
|
280149
|
+
return Boolean(element.closest(CONTROL_SELECTOR2));
|
|
280004
280150
|
}
|
|
280005
280151
|
var GUARD_DEFAULTS = {
|
|
280006
280152
|
canEdit: true,
|
|
@@ -283545,121 +283691,6 @@ function createDefaultChartElement(chartKind = DEFAULT_INSERT_CHART_KIND, positi
|
|
|
283545
283691
|
}
|
|
283546
283692
|
);
|
|
283547
283693
|
}
|
|
283548
|
-
function polygonBounds(points4) {
|
|
283549
|
-
const pairs3 = points4.trim().split(/\s+/u);
|
|
283550
|
-
let minX = Infinity;
|
|
283551
|
-
let minY = Infinity;
|
|
283552
|
-
let maxX = -Infinity;
|
|
283553
|
-
let maxY = -Infinity;
|
|
283554
|
-
for (const pair of pairs3) {
|
|
283555
|
-
const comma = pair.indexOf(",");
|
|
283556
|
-
if (comma < 0) {
|
|
283557
|
-
continue;
|
|
283558
|
-
}
|
|
283559
|
-
const x = parseFloat(pair.slice(0, comma));
|
|
283560
|
-
const y = parseFloat(pair.slice(comma + 1));
|
|
283561
|
-
if (!isFinite(x) || !isFinite(y)) {
|
|
283562
|
-
continue;
|
|
283563
|
-
}
|
|
283564
|
-
if (x < minX) {
|
|
283565
|
-
minX = x;
|
|
283566
|
-
}
|
|
283567
|
-
if (x > maxX) {
|
|
283568
|
-
maxX = x;
|
|
283569
|
-
}
|
|
283570
|
-
if (y < minY) {
|
|
283571
|
-
minY = y;
|
|
283572
|
-
}
|
|
283573
|
-
if (y > maxY) {
|
|
283574
|
-
maxY = y;
|
|
283575
|
-
}
|
|
283576
|
-
}
|
|
283577
|
-
if (!isFinite(minX)) {
|
|
283578
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
283579
|
-
}
|
|
283580
|
-
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
|
|
283581
|
-
}
|
|
283582
|
-
function renderedNodeToShape(rn, nodeId, family2) {
|
|
283583
|
-
const id = `reflow-${family2}-${nodeId}`;
|
|
283584
|
-
const text3 = rn.text || void 0;
|
|
283585
|
-
if (rn.kind === "rect") {
|
|
283586
|
-
return {
|
|
283587
|
-
id,
|
|
283588
|
-
shapeType: rn.rx > 0 ? "roundRect" : "rect",
|
|
283589
|
-
x: rn.x,
|
|
283590
|
-
y: rn.y,
|
|
283591
|
-
width: rn.width,
|
|
283592
|
-
height: rn.height,
|
|
283593
|
-
rotation: 0,
|
|
283594
|
-
fillColor: rn.fill,
|
|
283595
|
-
strokeColor: rn.stroke,
|
|
283596
|
-
strokeWidth: rn.strokeWidth,
|
|
283597
|
-
text: text3,
|
|
283598
|
-
fontSize: rn.fontSize
|
|
283599
|
-
};
|
|
283600
|
-
}
|
|
283601
|
-
if (rn.kind === "circle") {
|
|
283602
|
-
return {
|
|
283603
|
-
id,
|
|
283604
|
-
shapeType: "ellipse",
|
|
283605
|
-
x: rn.cx - rn.r,
|
|
283606
|
-
y: rn.cy - rn.r,
|
|
283607
|
-
width: rn.r * 2,
|
|
283608
|
-
height: rn.r * 2,
|
|
283609
|
-
rotation: 0,
|
|
283610
|
-
fillColor: rn.fill,
|
|
283611
|
-
strokeColor: rn.stroke,
|
|
283612
|
-
strokeWidth: rn.strokeWidth,
|
|
283613
|
-
text: text3,
|
|
283614
|
-
fontSize: rn.fontSize
|
|
283615
|
-
};
|
|
283616
|
-
}
|
|
283617
|
-
const bounds = polygonBounds(rn.points);
|
|
283618
|
-
return {
|
|
283619
|
-
id,
|
|
283620
|
-
shapeType: "chevron",
|
|
283621
|
-
x: bounds.x,
|
|
283622
|
-
y: bounds.y,
|
|
283623
|
-
width: bounds.width,
|
|
283624
|
-
height: bounds.height,
|
|
283625
|
-
rotation: 0,
|
|
283626
|
-
fillColor: rn.fill,
|
|
283627
|
-
strokeColor: rn.stroke,
|
|
283628
|
-
strokeWidth: rn.strokeWidth,
|
|
283629
|
-
text: text3,
|
|
283630
|
-
fontSize: rn.fontSize
|
|
283631
|
-
};
|
|
283632
|
-
}
|
|
283633
|
-
function reflowToDrawingShapes(layoutResult, nodes) {
|
|
283634
|
-
const flat = flattenNodes([...nodes]);
|
|
283635
|
-
const family2 = layoutResult.family;
|
|
283636
|
-
const shapes = [];
|
|
283637
|
-
for (let i2 = 0; i2 < layoutResult.nodes.length; i2++) {
|
|
283638
|
-
const rn = layoutResult.nodes[i2];
|
|
283639
|
-
const sourceNode = flat[i2];
|
|
283640
|
-
const nodeId = sourceNode?.id ?? rn.key;
|
|
283641
|
-
shapes.push(renderedNodeToShape(rn, nodeId, family2));
|
|
283642
|
-
}
|
|
283643
|
-
return shapes;
|
|
283644
|
-
}
|
|
283645
|
-
function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, elementId, box) {
|
|
283646
|
-
const shapes = smartArtData.drawingShapes;
|
|
283647
|
-
if (shapes === void 0 || shapes.length > 0 || smartArtData.nodes.length === 0) {
|
|
283648
|
-
return smartArtData;
|
|
283649
|
-
}
|
|
283650
|
-
const layoutResult = computeSmartArtElementLayout(
|
|
283651
|
-
{ ...smartArtData, layout },
|
|
283652
|
-
smartArtData.nodes,
|
|
283653
|
-
box,
|
|
283654
|
-
palette,
|
|
283655
|
-
style,
|
|
283656
|
-
elementId
|
|
283657
|
-
);
|
|
283658
|
-
return {
|
|
283659
|
-
...smartArtData,
|
|
283660
|
-
drawingShapes: reflowToDrawingShapes(layoutResult, smartArtData.nodes)
|
|
283661
|
-
};
|
|
283662
|
-
}
|
|
283663
283694
|
function mediaPlaybackAttributes(source) {
|
|
283664
283695
|
return {
|
|
283665
283696
|
loop: source.loop === true,
|
|
@@ -296263,14 +296294,68 @@ function computeThreeViewSize(layoutWidth, layoutHeight, screenWidth, screenHeig
|
|
|
296263
296294
|
pixelHeight: clamp12(onScreenH * dpr)
|
|
296264
296295
|
};
|
|
296265
296296
|
}
|
|
296297
|
+
var IDENTITY6 = { a: 1, b: 0, c: 0, d: 1 };
|
|
296298
|
+
function compose(outer2, inner2) {
|
|
296299
|
+
return {
|
|
296300
|
+
a: outer2.a * inner2.a + outer2.c * inner2.b,
|
|
296301
|
+
b: outer2.b * inner2.a + outer2.d * inner2.b,
|
|
296302
|
+
c: outer2.a * inner2.c + outer2.c * inner2.d,
|
|
296303
|
+
d: outer2.b * inner2.c + outer2.d * inner2.d
|
|
296304
|
+
};
|
|
296305
|
+
}
|
|
296306
|
+
function parseComputedTransform(value) {
|
|
296307
|
+
const match = /^(matrix3d|matrix)\(([^)]*)\)$/u.exec((value ?? "").trim());
|
|
296308
|
+
if (!match) {
|
|
296309
|
+
return null;
|
|
296310
|
+
}
|
|
296311
|
+
const n = (match[2] ?? "").split(",").map((part) => Number.parseFloat(part));
|
|
296312
|
+
const at3 = match[1] === "matrix3d" ? [0, 1, 4, 5] : [0, 1, 2, 3];
|
|
296313
|
+
const [a, b, c, d] = at3.map((i2) => n[i2]);
|
|
296314
|
+
return [a, b, c, d].every((v) => v !== void 0 && Number.isFinite(v)) ? { a, b, c, d } : null;
|
|
296315
|
+
}
|
|
296316
|
+
function matrixScale(m) {
|
|
296317
|
+
return { x: Math.hypot(m.a, m.b), y: Math.hypot(m.c, m.d) };
|
|
296318
|
+
}
|
|
296319
|
+
function parentOf(node) {
|
|
296320
|
+
if (node.parentElement) {
|
|
296321
|
+
return node.parentElement;
|
|
296322
|
+
}
|
|
296323
|
+
const root = node.getRootNode?.();
|
|
296324
|
+
return root && "host" in root ? root.host ?? null : null;
|
|
296325
|
+
}
|
|
296326
|
+
function measureTransformScale(element) {
|
|
296327
|
+
const win = element.ownerDocument?.defaultView;
|
|
296328
|
+
if (!win) {
|
|
296329
|
+
return { x: 1, y: 1 };
|
|
296330
|
+
}
|
|
296331
|
+
let total = IDENTITY6;
|
|
296332
|
+
for (let node = element; node; node = parentOf(node)) {
|
|
296333
|
+
const style = win.getComputedStyle(node);
|
|
296334
|
+
if (style.scale && style.scale !== "none") {
|
|
296335
|
+
const [sx = "1", sy = sx] = style.scale.split(/\s+/u);
|
|
296336
|
+
const x = Number.parseFloat(sx);
|
|
296337
|
+
const y = Number.parseFloat(sy);
|
|
296338
|
+
if (Number.isFinite(x) && Number.isFinite(y)) {
|
|
296339
|
+
total = compose({ a: x, b: 0, c: 0, d: y }, total);
|
|
296340
|
+
}
|
|
296341
|
+
}
|
|
296342
|
+
const transform6 = parseComputedTransform(style.transform);
|
|
296343
|
+
if (transform6) {
|
|
296344
|
+
total = compose(transform6, total);
|
|
296345
|
+
}
|
|
296346
|
+
}
|
|
296347
|
+
return matrixScale(total);
|
|
296348
|
+
}
|
|
296266
296349
|
function measureThreeViewSize(element) {
|
|
296267
|
-
const rect32 = element.getBoundingClientRect();
|
|
296268
296350
|
const win = element.ownerDocument?.defaultView;
|
|
296351
|
+
const layoutWidth = element.clientWidth;
|
|
296352
|
+
const layoutHeight = element.clientHeight;
|
|
296353
|
+
const scale2 = measureTransformScale(element);
|
|
296269
296354
|
return computeThreeViewSize(
|
|
296270
|
-
|
|
296271
|
-
|
|
296272
|
-
|
|
296273
|
-
|
|
296355
|
+
layoutWidth,
|
|
296356
|
+
layoutHeight,
|
|
296357
|
+
layoutWidth * scale2.x,
|
|
296358
|
+
layoutHeight * scale2.y,
|
|
296274
296359
|
win?.devicePixelRatio ?? 1
|
|
296275
296360
|
);
|
|
296276
296361
|
}
|
|
@@ -296458,6 +296543,9 @@ function createElementClass() {
|
|
|
296458
296543
|
return PptxThreeView;
|
|
296459
296544
|
}
|
|
296460
296545
|
function defineThreeViewElement(registry) {
|
|
296546
|
+
if (typeof HTMLElement === "undefined") {
|
|
296547
|
+
return;
|
|
296548
|
+
}
|
|
296461
296549
|
const target = registry ?? (typeof customElements === "undefined" ? void 0 : customElements);
|
|
296462
296550
|
if (!target || target.get(THREE_VIEW_TAG)) {
|
|
296463
296551
|
return;
|
|
@@ -305466,6 +305554,7 @@ function buildSelectControl(ctx, control2) {
|
|
|
305466
305554
|
const label = homeLabel(state, control2.labelKey, control2.fallback);
|
|
305467
305555
|
if (select2.getAttribute("aria-label") !== label) {
|
|
305468
305556
|
select2.setAttribute("aria-label", label);
|
|
305557
|
+
select2.requestUpdate?.();
|
|
305469
305558
|
}
|
|
305470
305559
|
select2.title = label;
|
|
305471
305560
|
select2.hidden = Boolean(current?.hidden);
|
|
@@ -311865,6 +311954,8 @@ exports.collectUsedFonts = collectUsedFonts;
|
|
|
311865
311954
|
exports.colorWithOpacity = colorWithOpacity;
|
|
311866
311955
|
exports.commentMentionQuery = commentMentionQuery;
|
|
311867
311956
|
exports.commentTextSegments = commentTextSegments;
|
|
311957
|
+
exports.commitSmartArtNodeFill = commitSmartArtNodeFill;
|
|
311958
|
+
exports.commitSmartArtNodeText = commitSmartArtNodeText;
|
|
311868
311959
|
exports.comparePresentation = comparePresentation;
|
|
311869
311960
|
exports.compatibilityWarningToasts = compatibilityWarningToasts;
|
|
311870
311961
|
exports.compileEquationTemplateMathMl = compileEquationTemplateMathMl;
|
|
Binary file
|
|
Binary file
|