pptx-react-viewer 2.12.1 → 2.13.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-CGGUPVQX.mjs → AiChatPanel-4YS6DEIT.mjs} +3 -3
  3. package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
  4. package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-UEFYTUJN.js → AiChatPanel-DEI3EQFM.js} +22 -22
  6. package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
  7. package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
  8. package/dist/{Model3DScene-TU4NTHRM.mjs → Model3DScene-JSNQCKCJ.mjs} +1 -1
  9. package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
  10. package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
  11. package/dist/{Model3DScene-QYXJNALP.js → Model3DScene-X4W7GZVY.js} +2 -2
  12. package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
  13. package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs → SurfaceChart3DScene-3MSU74YH.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs.br → SurfaceChart3DScene-3MSU74YH.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-4VCO3DRP.js → SurfaceChart3DScene-IZLUWT27.js} +2 -2
  18. package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
  20. package/dist/{chunk-CABQXGPI.mjs → chunk-4TD7EINA.mjs} +770 -358
  21. package/dist/chunk-4TD7EINA.mjs.br +0 -0
  22. package/dist/chunk-4TD7EINA.mjs.gz +0 -0
  23. package/dist/{chunk-4GYNTY2G.mjs → chunk-6KRNQ2KF.mjs} +2 -2
  24. package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
  25. package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
  26. package/dist/{chunk-TDUDH7S4.js → chunk-EFSQW6S5.js} +771 -357
  27. package/dist/chunk-EFSQW6S5.js.br +0 -0
  28. package/dist/chunk-EFSQW6S5.js.gz +0 -0
  29. package/dist/{chunk-UIWY4XJT.js → chunk-G2LZT5SV.js} +3 -3
  30. package/dist/chunk-G2LZT5SV.js.br +0 -0
  31. package/dist/chunk-G2LZT5SV.js.gz +0 -0
  32. package/dist/{chunk-YIPR3GKG.mjs → chunk-HRLF4REI.mjs} +34 -15
  33. package/dist/chunk-HRLF4REI.mjs.br +0 -0
  34. package/dist/chunk-HRLF4REI.mjs.gz +0 -0
  35. package/dist/{chunk-LE6YA5WB.js → chunk-IDW5UPXW.js} +264 -245
  36. package/dist/chunk-IDW5UPXW.js.br +0 -0
  37. package/dist/chunk-IDW5UPXW.js.gz +0 -0
  38. package/dist/{chunk-NUDH7TI2.js → chunk-RWIQHVZQ.js} +326 -326
  39. package/dist/chunk-RWIQHVZQ.js.br +0 -0
  40. package/dist/chunk-RWIQHVZQ.js.gz +0 -0
  41. package/dist/{chunk-GBKIWNW6.js → chunk-SHZ3GWOD.js} +1045 -1042
  42. package/dist/chunk-SHZ3GWOD.js.br +0 -0
  43. package/dist/chunk-SHZ3GWOD.js.gz +0 -0
  44. package/dist/{chunk-N3NKU7SC.mjs → chunk-WEU5EMKK.mjs} +1 -1
  45. package/dist/chunk-WEU5EMKK.mjs.br +0 -0
  46. package/dist/chunk-WEU5EMKK.mjs.gz +0 -0
  47. package/dist/{chunk-4SGXEGVL.mjs → chunk-YA7VFYTW.mjs} +17 -14
  48. package/dist/chunk-YA7VFYTW.mjs.br +0 -0
  49. package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
  50. package/dist/index.d.ts +18 -0
  51. package/dist/index.js +34 -34
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +18 -0
  58. package/dist/internals.js +78 -78
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +3 -3
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.d.ts +18 -0
  65. package/dist/viewer/index.js +21 -21
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +5 -5
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +1 -1
  72. package/dist/AiChatPanel-CGGUPVQX.mjs.br +0 -0
  73. package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
  74. package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
  75. package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
  76. package/dist/Model3DScene-QYXJNALP.js.br +0 -0
  77. package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
  78. package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
  79. package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
  80. package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
  81. package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
  82. package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
  83. package/dist/chunk-4GYNTY2G.mjs.br +0 -0
  84. package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
  85. package/dist/chunk-4SGXEGVL.mjs.br +0 -0
  86. package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
  87. package/dist/chunk-CABQXGPI.mjs.br +0 -0
  88. package/dist/chunk-CABQXGPI.mjs.gz +0 -0
  89. package/dist/chunk-GBKIWNW6.js.br +0 -0
  90. package/dist/chunk-GBKIWNW6.js.gz +0 -0
  91. package/dist/chunk-LE6YA5WB.js.br +0 -0
  92. package/dist/chunk-LE6YA5WB.js.gz +0 -0
  93. package/dist/chunk-N3NKU7SC.mjs.br +0 -0
  94. package/dist/chunk-N3NKU7SC.mjs.gz +0 -0
  95. package/dist/chunk-NUDH7TI2.js.br +0 -0
  96. package/dist/chunk-NUDH7TI2.js.gz +0 -0
  97. package/dist/chunk-TDUDH7S4.js.br +0 -0
  98. package/dist/chunk-TDUDH7S4.js.gz +0 -0
  99. package/dist/chunk-UIWY4XJT.js.br +0 -0
  100. package/dist/chunk-UIWY4XJT.js.gz +0 -0
  101. package/dist/chunk-YIPR3GKG.mjs.br +0 -0
  102. package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
@@ -2159,9 +2159,9 @@ function getStockObject(index) {
2159
2159
  }
2160
2160
  }
2161
2161
  async function blobToDataUrl(blob) {
2162
- return new Promise((resolve, reject) => {
2162
+ return new Promise((resolve2, reject) => {
2163
2163
  const reader = new FileReader();
2164
- reader.onload = () => resolve(reader.result);
2164
+ reader.onload = () => resolve2(reader.result);
2165
2165
  reader.onerror = () => reject(reader.error);
2166
2166
  reader.readAsDataURL(blob);
2167
2167
  });
@@ -9764,12 +9764,12 @@ function updateSection(section) {
9764
9764
  }
9765
9765
  return node;
9766
9766
  }
9767
- function applySections(presentation, sections, lookup, remap) {
9768
- if (sections === void 0) {
9767
+ function applySections(presentation, sections2, lookup, remap) {
9768
+ if (sections2 === void 0) {
9769
9769
  return;
9770
9770
  }
9771
9771
  let location = findSectionList(presentation, lookup);
9772
- if (sections.length === 0) {
9772
+ if (sections2.length === 0) {
9773
9773
  if (location) {
9774
9774
  delete location.parent[location.key];
9775
9775
  }
@@ -9786,14 +9786,14 @@ function applySections(presentation, sections, lookup, remap) {
9786
9786
  location = { parent: ext, key: "p14:sectionLst", list: ext["p14:sectionLst"] };
9787
9787
  }
9788
9788
  const list = cloneXmlObject(location.list) ?? {};
9789
- const effectiveSections = remap && remap.changed ? sections.map((section) => ({
9789
+ const effectiveSections = remap && remap.changed ? sections2.map((section) => ({
9790
9790
  ...section,
9791
9791
  slideIds: remapReferenceList(
9792
9792
  section.slideIds,
9793
9793
  remap.sldIdByOldSldId,
9794
9794
  remap.removedSldIds
9795
9795
  )
9796
- })) : sections;
9796
+ })) : sections2;
9797
9797
  replaceChildren(list, "section", effectiveSections.map(updateSection), "p14:section");
9798
9798
  location.parent[location.key] = list;
9799
9799
  }
@@ -13837,10 +13837,11 @@ var PptxShapeStyleExtractor = class {
13837
13837
  this.context.resolveThemeFillRef(styleNode["a:fillRef"], style);
13838
13838
  }
13839
13839
  const lineNode = shapeProps["a:ln"];
13840
+ if (styleNode?.["a:lnRef"]) {
13841
+ this.context.resolveThemeLineRef(styleNode["a:lnRef"], style);
13842
+ }
13840
13843
  if (lineNode) {
13841
13844
  applyLineProperties(lineNode, style, this.context);
13842
- } else if (styleNode?.["a:lnRef"]) {
13843
- this.context.resolveThemeLineRef(styleNode["a:lnRef"], style);
13844
13845
  }
13845
13846
  Object.assign(style, this.context.extractShadowStyle(shapeProps));
13846
13847
  Object.assign(style, this.context.extractInnerShadowStyle(shapeProps));
@@ -15166,7 +15167,10 @@ var PptxConnectorParser = class {
15166
15167
  const skewY = transform["@_skewY"] ? parseInt(String(transform["@_skewY"]), 10) / 6e4 : void 0;
15167
15168
  const { flipHorizontal, flipVertical } = this.context.readFlipState(transform);
15168
15169
  const cNvConnectionShapeProperties = connector2?.["p:nvCxnSpPr"]?.["p:cNvCxnSpPr"];
15169
- const shapeStyle = this.context.extractShapeStyle(shapeProperties);
15170
+ const shapeStyle = this.context.extractShapeStyle(
15171
+ shapeProperties,
15172
+ connector2["p:style"]
15173
+ );
15170
15174
  const startConnectionNode = cNvConnectionShapeProperties?.["a:stCxn"];
15171
15175
  if (startConnectionNode) {
15172
15176
  const startConnection = {};
@@ -15316,8 +15320,8 @@ var PptxLoadDataBuilder = class {
15316
15320
  this.customShows = customShows;
15317
15321
  return this;
15318
15322
  }
15319
- withSections(sections) {
15320
- this.sections = sections;
15323
+ withSections(sections2) {
15324
+ this.sections = sections2;
15321
15325
  return this;
15322
15326
  }
15323
15327
  withWarnings(warnings) {
@@ -18979,7 +18983,7 @@ function remapEditorAnimationsToShapeIds(elements2, animations, reservedMaxId =
18979
18983
  byId.set(el.id, el);
18980
18984
  }
18981
18985
  let nextId2 = Math.max(maxShapeId(flat), reservedMaxId) + 1;
18982
- const resolve = (elementId) => {
18986
+ const resolve2 = (elementId) => {
18983
18987
  const el = byId.get(elementId);
18984
18988
  if (!el) {
18985
18989
  return void 0;
@@ -18991,8 +18995,8 @@ function remapEditorAnimationsToShapeIds(elements2, animations, reservedMaxId =
18991
18995
  return el.shapeId;
18992
18996
  };
18993
18997
  return animations.map((anim) => {
18994
- const resolvedElement = resolve(anim.elementId);
18995
- const resolvedTrigger = anim.triggerShapeId !== void 0 ? resolve(anim.triggerShapeId) : void 0;
18998
+ const resolvedElement = resolve2(anim.elementId);
18999
+ const resolvedTrigger = anim.triggerShapeId !== void 0 ? resolve2(anim.triggerShapeId) : void 0;
18996
19000
  if (resolvedElement === void 0 && resolvedTrigger === void 0) {
18997
19001
  return anim;
18998
19002
  }
@@ -19994,7 +19998,7 @@ var PptxNativeAnimationService = class {
19994
19998
  * parent node. See `animation-group-context` for why the flat list
19995
19999
  * needs it.
19996
20000
  */
19997
- walkTimingTree(node, animations, currentTrigger, group = createGroupContext()) {
20001
+ walkTimingTree(node, animations, currentTrigger, group2 = createGroupContext()) {
19998
20002
  if (!node) {
19999
20003
  return;
20000
20004
  }
@@ -20093,8 +20097,8 @@ var PptxNativeAnimationService = class {
20093
20097
  textTarget: textTarget ?? void 0,
20094
20098
  cTnAttributes: roundTripAttrs,
20095
20099
  afterEffect: afterEffectFlag,
20096
- groupAutoStart: group.groupAutoStart,
20097
- parGroupIndex: group.parGroupIndex
20100
+ groupAutoStart: group2.groupAutoStart,
20101
+ parGroupIndex: group2.parGroupIndex
20098
20102
  });
20099
20103
  }
20100
20104
  const childTnList = cTn["p:childTnLst"];
@@ -20108,7 +20112,7 @@ var PptxNativeAnimationService = class {
20108
20112
  parallel,
20109
20113
  animations,
20110
20114
  trigger,
20111
- childGroupContext(group, parallel["p:cTn"], {
20115
+ childGroupContext(group2, parallel["p:cTn"], {
20112
20116
  isClickLevelGroup: isClickLevel
20113
20117
  })
20114
20118
  );
@@ -20117,11 +20121,11 @@ var PptxNativeAnimationService = class {
20117
20121
  if (isInteractiveSequence(sequence)) {
20118
20122
  continue;
20119
20123
  }
20120
- this.walkTimingTree(sequence, animations, trigger, group);
20124
+ this.walkTimingTree(sequence, animations, trigger, group2);
20121
20125
  }
20122
20126
  for (const excl of exclusives) {
20123
20127
  const exclAnims = [];
20124
- this.walkTimingTree(excl, exclAnims, trigger, group);
20128
+ this.walkTimingTree(excl, exclAnims, trigger, group2);
20125
20129
  for (const a of exclAnims) {
20126
20130
  a.exclusive = true;
20127
20131
  animations.push(a);
@@ -20136,7 +20140,7 @@ var PptxNativeAnimationService = class {
20136
20140
  parallel,
20137
20141
  animations,
20138
20142
  currentTrigger,
20139
- childGroupContext(group, parallel["p:cTn"], {
20143
+ childGroupContext(group2, parallel["p:cTn"], {
20140
20144
  isClickLevelGroup: false
20141
20145
  })
20142
20146
  );
@@ -20145,7 +20149,7 @@ var PptxNativeAnimationService = class {
20145
20149
  if (isInteractiveSequence(sequence)) {
20146
20150
  continue;
20147
20151
  }
20148
- this.walkTimingTree(sequence, animations, currentTrigger, group);
20152
+ this.walkTimingTree(sequence, animations, currentTrigger, group2);
20149
20153
  }
20150
20154
  }
20151
20155
  /**
@@ -22048,7 +22052,7 @@ var PptxAnimationWriteService = class {
22048
22052
  if (currentGroup.length > 0) {
22049
22053
  clickGroups.push(currentGroup);
22050
22054
  }
22051
- const nodes = clickGroups.map((group) => {
22055
+ const nodes = clickGroups.map((group2) => {
22052
22056
  const groupId = this.allocateId();
22053
22057
  return {
22054
22058
  "p:cTn": {
@@ -22060,7 +22064,7 @@ var PptxAnimationWriteService = class {
22060
22064
  }
22061
22065
  },
22062
22066
  "p:childTnLst": {
22063
- "p:par": group.length === 1 ? group[0] : group
22067
+ "p:par": group2.length === 1 ? group2[0] : group2
22064
22068
  }
22065
22069
  }
22066
22070
  };
@@ -23851,17 +23855,20 @@ var stripedRightArrow = {
23851
23855
  name: "stripedRightArrow",
23852
23856
  avLst: { adj1: 5e4, adj2: 5e4 },
23853
23857
  gdLst: [
23858
+ // Head length runs off `ss`, the short side, not `w`. See the note on
23859
+ // `rightArrow` in `preset-shape-definitions-table.ts`.
23860
+ gd3("maxAdj2", "*/ 84375 w ss"),
23854
23861
  gd3("a1", "pin 0 adj1 100000"),
23855
- gd3("a2", "pin 0 adj2 100000"),
23862
+ gd3("a2", "pin 0 adj2 maxAdj2"),
23856
23863
  gd3("y1", "*/ hd2 a1 100000"),
23857
23864
  gd3("y2", "+- vc 0 y1"),
23858
23865
  gd3("y3", "+- vc y1 0"),
23859
23866
  gd3("x2", "*/ ss 1 32"),
23860
23867
  gd3("x3", "*/ ss 2 32"),
23861
23868
  gd3("x4", "*/ ss 5 32"),
23862
- gd3("x5", "*/ w a2 100000"),
23869
+ gd3("x5", "*/ ss a2 100000"),
23863
23870
  gd3("x6", "+- r 0 x5"),
23864
- gd3("dx", "*/ hd2 x5 wd2"),
23871
+ gd3("dx", "*/ y1 x5 hd2"),
23865
23872
  gd3("x7", "+- x6 dx 0")
23866
23873
  ],
23867
23874
  rect: { l: "x4", t: "y2", r: "x7", b: "y3" },
@@ -23896,14 +23903,17 @@ var notchedRightArrow = {
23896
23903
  name: "notchedRightArrow",
23897
23904
  avLst: { adj1: 5e4, adj2: 5e4 },
23898
23905
  gdLst: [
23906
+ // Head length runs off `ss`, the short side, not `w`. See the note on
23907
+ // `rightArrow` in `preset-shape-definitions-table.ts`.
23908
+ gd3("maxAdj2", "*/ 100000 w ss"),
23899
23909
  gd3("a1", "pin 0 adj1 100000"),
23900
- gd3("a2", "pin 0 adj2 100000"),
23910
+ gd3("a2", "pin 0 adj2 maxAdj2"),
23901
23911
  gd3("y1", "*/ hd2 a1 100000"),
23902
23912
  gd3("y2", "+- vc 0 y1"),
23903
23913
  gd3("y3", "+- vc y1 0"),
23904
- gd3("x2", "*/ w a2 100000"),
23914
+ gd3("x2", "*/ ss a2 100000"),
23905
23915
  gd3("x1", "+- r 0 x2"),
23906
- gd3("dx2", "*/ hd2 x2 wd2"),
23916
+ gd3("dx2", "*/ y1 x2 hd2"),
23907
23917
  gd3("x3", "+- x1 dx2 0"),
23908
23918
  gd3("nx", "*/ y1 1 1")
23909
23919
  ],
@@ -23927,7 +23937,12 @@ var notchedRightArrow = {
23927
23937
  var homePlate = {
23928
23938
  name: "homePlate",
23929
23939
  avLst: { adj: 5e4 },
23930
- gdLst: [gd3("a", "pin 0 adj 100000"), gd3("x1", "*/ w a 100000")],
23940
+ gdLst: [
23941
+ gd3("maxAdj", "*/ 100000 w ss"),
23942
+ gd3("a", "pin 0 adj maxAdj"),
23943
+ gd3("dx1", "*/ ss a 100000"),
23944
+ gd3("x1", "+- r 0 dx1")
23945
+ ],
23931
23946
  rect: { l: "l", t: "t", r: "x1", b: "b" },
23932
23947
  pathLst: [
23933
23948
  {
@@ -23945,8 +23960,13 @@ var homePlate = {
23945
23960
  var chevron = {
23946
23961
  name: "chevron",
23947
23962
  avLst: { adj: 5e4 },
23948
- gdLst: [gd3("a", "pin 0 adj 100000"), gd3("x1", "*/ w a 100000"), gd3("x2", "+- r 0 x1")],
23949
- rect: { l: "l", t: "t", r: "x2", b: "b" },
23963
+ gdLst: [
23964
+ gd3("maxAdj", "*/ 100000 w ss"),
23965
+ gd3("a", "pin 0 adj maxAdj"),
23966
+ gd3("x1", "*/ ss a 100000"),
23967
+ gd3("x2", "+- r 0 x1")
23968
+ ],
23969
+ rect: { l: "x1", t: "t", r: "x2", b: "b" },
23950
23970
  pathLst: [
23951
23971
  {
23952
23972
  commands: [
@@ -29032,27 +29052,28 @@ var rightArrow = {
29032
29052
  name: "rightArrow",
29033
29053
  avLst: { adj1: 5e4, adj2: 5e4 },
29034
29054
  gdLst: [
29055
+ gd13("maxAdj2", "*/ 100000 w ss"),
29035
29056
  gd13("a1", "pin 0 adj1 100000"),
29036
- gd13("a2", "pin 0 adj2 100000"),
29037
- gd13("y1", "*/ hd2 a1 100000"),
29038
- gd13("y2", "+- vc 0 y1"),
29039
- gd13("y3", "+- vc y1 0"),
29040
- gd13("x2", "*/ w a2 100000"),
29041
- gd13("x1", "+- r 0 x2"),
29042
- gd13("dx2", "*/ hd2 x2 wd2"),
29043
- gd13("x3", "+- x1 dx2 0")
29057
+ gd13("a2", "pin 0 adj2 maxAdj2"),
29058
+ gd13("dx1", "*/ ss a2 100000"),
29059
+ gd13("x1", "+- r 0 dx1"),
29060
+ gd13("dy1", "*/ h a1 200000"),
29061
+ gd13("y1", "+- vc 0 dy1"),
29062
+ gd13("y2", "+- vc dy1 0"),
29063
+ gd13("dx2", "*/ y1 dx1 hd2"),
29064
+ gd13("x2", "+- x1 dx2 0")
29044
29065
  ],
29045
- rect: { l: "l", t: "y2", r: "x3", b: "y3" },
29066
+ rect: { l: "l", t: "y1", r: "x2", b: "y2" },
29046
29067
  pathLst: [
29047
29068
  {
29048
29069
  commands: [
29049
- { kind: "moveTo", x: "l", y: "y2" },
29050
- { kind: "lnTo", x: "x1", y: "y2" },
29070
+ { kind: "moveTo", x: "l", y: "y1" },
29071
+ { kind: "lnTo", x: "x1", y: "y1" },
29051
29072
  { kind: "lnTo", x: "x1", y: "t" },
29052
29073
  { kind: "lnTo", x: "r", y: "vc" },
29053
29074
  { kind: "lnTo", x: "x1", y: "b" },
29054
- { kind: "lnTo", x: "x1", y: "y3" },
29055
- { kind: "lnTo", x: "l", y: "y3" },
29075
+ { kind: "lnTo", x: "x1", y: "y2" },
29076
+ { kind: "lnTo", x: "l", y: "y2" },
29056
29077
  { kind: "close" }
29057
29078
  ]
29058
29079
  }
@@ -29062,26 +29083,28 @@ var leftArrow = {
29062
29083
  name: "leftArrow",
29063
29084
  avLst: { adj1: 5e4, adj2: 5e4 },
29064
29085
  gdLst: [
29086
+ gd13("maxAdj2", "*/ 100000 w ss"),
29065
29087
  gd13("a1", "pin 0 adj1 100000"),
29066
- gd13("a2", "pin 0 adj2 100000"),
29067
- gd13("y1", "*/ hd2 a1 100000"),
29068
- gd13("y2", "+- vc 0 y1"),
29069
- gd13("y3", "+- vc y1 0"),
29070
- gd13("x1", "*/ w a2 100000"),
29071
- gd13("dx2", "*/ hd2 x1 wd2"),
29072
- gd13("x2", "+- l dx2 0")
29088
+ gd13("a2", "pin 0 adj2 maxAdj2"),
29089
+ gd13("dx2", "*/ ss a2 100000"),
29090
+ gd13("x2", "+- l dx2 0"),
29091
+ gd13("dy1", "*/ h a1 200000"),
29092
+ gd13("y1", "+- vc 0 dy1"),
29093
+ gd13("y2", "+- vc dy1 0"),
29094
+ gd13("dx1", "*/ y1 dx2 hd2"),
29095
+ gd13("x1", "+- dx2 0 dx1")
29073
29096
  ],
29074
- rect: { l: "x2", t: "y2", r: "r", b: "y3" },
29097
+ rect: { l: "x1", t: "y1", r: "r", b: "y2" },
29075
29098
  pathLst: [
29076
29099
  {
29077
29100
  commands: [
29078
29101
  { kind: "moveTo", x: "l", y: "vc" },
29079
- { kind: "lnTo", x: "x1", y: "t" },
29080
- { kind: "lnTo", x: "x1", y: "y2" },
29102
+ { kind: "lnTo", x: "x2", y: "t" },
29103
+ { kind: "lnTo", x: "x2", y: "y1" },
29104
+ { kind: "lnTo", x: "r", y: "y1" },
29081
29105
  { kind: "lnTo", x: "r", y: "y2" },
29082
- { kind: "lnTo", x: "r", y: "y3" },
29083
- { kind: "lnTo", x: "x1", y: "y3" },
29084
- { kind: "lnTo", x: "x1", y: "b" },
29106
+ { kind: "lnTo", x: "x2", y: "y2" },
29107
+ { kind: "lnTo", x: "x2", y: "b" },
29085
29108
  { kind: "close" }
29086
29109
  ]
29087
29110
  }
@@ -29091,26 +29114,28 @@ var upArrow = {
29091
29114
  name: "upArrow",
29092
29115
  avLst: { adj1: 5e4, adj2: 5e4 },
29093
29116
  gdLst: [
29117
+ gd13("maxAdj2", "*/ 100000 h ss"),
29094
29118
  gd13("a1", "pin 0 adj1 100000"),
29095
- gd13("a2", "pin 0 adj2 100000"),
29096
- gd13("x1", "*/ wd2 a1 100000"),
29097
- gd13("x2", "+- hc 0 x1"),
29098
- gd13("x3", "+- hc x1 0"),
29099
- gd13("y2", "*/ h a2 100000"),
29100
- gd13("dy2", "*/ wd2 y2 hd2"),
29101
- gd13("y1", "+- t dy2 0")
29119
+ gd13("a2", "pin 0 adj2 maxAdj2"),
29120
+ gd13("dy2", "*/ ss a2 100000"),
29121
+ gd13("y2", "+- t dy2 0"),
29122
+ gd13("dx1", "*/ w a1 200000"),
29123
+ gd13("x1", "+- hc 0 dx1"),
29124
+ gd13("x2", "+- hc dx1 0"),
29125
+ gd13("dy1", "*/ x1 dy2 wd2"),
29126
+ gd13("y1", "+- y2 0 dy1")
29102
29127
  ],
29103
- rect: { l: "x2", t: "y1", r: "x3", b: "b" },
29128
+ rect: { l: "x1", t: "y1", r: "x2", b: "b" },
29104
29129
  pathLst: [
29105
29130
  {
29106
29131
  commands: [
29107
- { kind: "moveTo", x: "hc", y: "t" },
29132
+ { kind: "moveTo", x: "l", y: "y2" },
29133
+ { kind: "lnTo", x: "hc", y: "t" },
29108
29134
  { kind: "lnTo", x: "r", y: "y2" },
29109
- { kind: "lnTo", x: "x3", y: "y2" },
29110
- { kind: "lnTo", x: "x3", y: "b" },
29111
- { kind: "lnTo", x: "x2", y: "b" },
29112
29135
  { kind: "lnTo", x: "x2", y: "y2" },
29113
- { kind: "lnTo", x: "l", y: "y2" },
29136
+ { kind: "lnTo", x: "x2", y: "b" },
29137
+ { kind: "lnTo", x: "x1", y: "b" },
29138
+ { kind: "lnTo", x: "x1", y: "y2" },
29114
29139
  { kind: "close" }
29115
29140
  ]
29116
29141
  }
@@ -29120,26 +29145,27 @@ var downArrow = {
29120
29145
  name: "downArrow",
29121
29146
  avLst: { adj1: 5e4, adj2: 5e4 },
29122
29147
  gdLst: [
29148
+ gd13("maxAdj2", "*/ 100000 h ss"),
29123
29149
  gd13("a1", "pin 0 adj1 100000"),
29124
- gd13("a2", "pin 0 adj2 100000"),
29125
- gd13("x1", "*/ wd2 a1 100000"),
29126
- gd13("x2", "+- hc 0 x1"),
29127
- gd13("x3", "+- hc x1 0"),
29128
- gd13("y1", "*/ h a2 100000"),
29129
- gd13("y2", "+- b 0 y1"),
29130
- gd13("dy2", "*/ wd2 y1 hd2"),
29131
- gd13("y3", "+- b 0 dy2")
29150
+ gd13("a2", "pin 0 adj2 maxAdj2"),
29151
+ gd13("dy1", "*/ ss a2 100000"),
29152
+ gd13("y1", "+- b 0 dy1"),
29153
+ gd13("dx1", "*/ w a1 200000"),
29154
+ gd13("x1", "+- hc 0 dx1"),
29155
+ gd13("x2", "+- hc dx1 0"),
29156
+ gd13("dy2", "*/ x1 dy1 wd2"),
29157
+ gd13("y2", "+- b 0 dy2")
29132
29158
  ],
29133
- rect: { l: "x2", t: "t", r: "x3", b: "y3" },
29159
+ rect: { l: "x1", t: "t", r: "x2", b: "y2" },
29134
29160
  pathLst: [
29135
29161
  {
29136
29162
  commands: [
29137
- { kind: "moveTo", x: "l", y: "y2" },
29138
- { kind: "lnTo", x: "x2", y: "y2" },
29163
+ { kind: "moveTo", x: "l", y: "y1" },
29164
+ { kind: "lnTo", x: "x1", y: "y1" },
29165
+ { kind: "lnTo", x: "x1", y: "t" },
29139
29166
  { kind: "lnTo", x: "x2", y: "t" },
29140
- { kind: "lnTo", x: "x3", y: "t" },
29141
- { kind: "lnTo", x: "x3", y: "y2" },
29142
- { kind: "lnTo", x: "r", y: "y2" },
29167
+ { kind: "lnTo", x: "x2", y: "y1" },
29168
+ { kind: "lnTo", x: "r", y: "y1" },
29143
29169
  { kind: "lnTo", x: "hc", y: "b" },
29144
29170
  { kind: "close" }
29145
29171
  ]
@@ -32319,8 +32345,8 @@ function extractSectionMap(presentationData, lookup) {
32319
32345
  const orderedSections = [];
32320
32346
  const presentation = presentationData ? lookup.getChildByLocalName(presentationData, "presentation") : void 0;
32321
32347
  const sectionList = findSectionList2(presentation, lookup);
32322
- const sections = lookup.getChildrenArrayByLocalName(sectionList, "section");
32323
- sections.forEach((section, index) => {
32348
+ const sections2 = lookup.getChildrenArrayByLocalName(sectionList, "section");
32349
+ sections2.forEach((section, index) => {
32324
32350
  const sectionId = String(section["@_id"] || `section-${index + 1}`);
32325
32351
  const rawName = String(section["@_name"] || "").trim();
32326
32352
  const sectionName = rawName || `Section ${index + 1}`;
@@ -32795,8 +32821,8 @@ function scalar(parent, name, xmlLookup) {
32795
32821
  return node?.["#text"] === void 0 ? void 0 : String(node["#text"]);
32796
32822
  }
32797
32823
  function parseSeriesDataLabels(seriesNode, xmlLookup) {
32798
- const group = xmlLookup.getChildByLocalName(seriesNode, "dLbls");
32799
- const nodes = group ? xmlLookup.getChildrenArrayByLocalName(group, "dLbl") : xmlLookup.getChildrenArrayByLocalName(seriesNode, "dLbl");
32824
+ const group2 = xmlLookup.getChildByLocalName(seriesNode, "dLbls");
32825
+ const nodes = group2 ? xmlLookup.getChildrenArrayByLocalName(group2, "dLbl") : xmlLookup.getChildrenArrayByLocalName(seriesNode, "dLbl");
32800
32826
  return nodes.flatMap((node) => {
32801
32827
  const idx = uint32(xmlLookup.getChildByLocalName(node, "idx")?.["@_val"]);
32802
32828
  if (idx === void 0) {
@@ -32841,7 +32867,7 @@ function parseSeriesDataLabels(seriesNode, xmlLookup) {
32841
32867
  return [result];
32842
32868
  });
32843
32869
  }
32844
- function parseChartDataLabelOptions(group, xmlLookup) {
32870
+ function parseChartDataLabelOptions(group2, xmlLookup) {
32845
32871
  const result = {};
32846
32872
  const fields = [
32847
32873
  ["showVal", "showValue"],
@@ -32853,16 +32879,16 @@ function parseChartDataLabelOptions(group, xmlLookup) {
32853
32879
  ["showLeaderLines", "showLeaderLines"]
32854
32880
  ];
32855
32881
  for (const [xmlName, property] of fields) {
32856
- const value = bool(xmlLookup.getChildByLocalName(group, xmlName));
32882
+ const value = bool(xmlLookup.getChildByLocalName(group2, xmlName));
32857
32883
  if (value !== void 0) {
32858
32884
  result[property] = value;
32859
32885
  }
32860
32886
  }
32861
- const pos2 = position(xmlLookup.getChildByLocalName(group, "dLblPos"));
32887
+ const pos2 = position(xmlLookup.getChildByLocalName(group2, "dLblPos"));
32862
32888
  if (pos2) {
32863
32889
  result.position = pos2;
32864
32890
  }
32865
- const separator = scalar(group, "separator", xmlLookup);
32891
+ const separator = scalar(group2, "separator", xmlLookup);
32866
32892
  if (separator !== void 0) {
32867
32893
  result.separator = separator;
32868
32894
  }
@@ -38182,12 +38208,12 @@ function layoutGroupedList(nodes, bounds, themeColorMap) {
38182
38208
  const usableW = bounds.width - padding * 2;
38183
38209
  const groupW = (usableW - gap * (groups.length - 1)) / groups.length;
38184
38210
  const usableH = bounds.height - padding * 2;
38185
- groups.forEach((group, gi) => {
38211
+ groups.forEach((group2, gi) => {
38186
38212
  const fill = accentColor(gi, themeColorMap);
38187
38213
  const gx = bounds.x + padding + gi * (groupW + gap);
38188
38214
  const headerH = usableH * 0.2;
38189
38215
  const subItemGap = 3;
38190
- const subItemH = (usableH - headerH - 4 - subItemGap * (group.length - 1)) / group.length;
38216
+ const subItemH = (usableH - headerH - 4 - subItemGap * (group2.length - 1)) / group2.length;
38191
38217
  elements2.push(
38192
38218
  makeShapeElement(
38193
38219
  nextId("sa-grp-header"),
@@ -38205,7 +38231,7 @@ function layoutGroupedList(nodes, bounds, themeColorMap) {
38205
38231
  }
38206
38232
  )
38207
38233
  );
38208
- group.forEach((node, si) => {
38234
+ group2.forEach((node, si) => {
38209
38235
  const sy = bounds.y + padding + headerH + 4 + si * (subItemH + subItemGap);
38210
38236
  elements2.push(
38211
38237
  makeShapeElement(
@@ -41486,6 +41512,23 @@ var GENERIC_FAMILY_CONCRETE_FONTS = {
41486
41512
  cursive: ["Comic Sans MS", "cursive"],
41487
41513
  fantasy: ["Impact", "fantasy"]
41488
41514
  };
41515
+ function parsePanoseString(panoseStr) {
41516
+ if (!panoseStr) {
41517
+ return void 0;
41518
+ }
41519
+ const cleaned = panoseStr.trim();
41520
+ if (cleaned.length !== 20) {
41521
+ return void 0;
41522
+ }
41523
+ if (!/^[0-9a-fA-F]{20}$/.test(cleaned)) {
41524
+ return void 0;
41525
+ }
41526
+ const bytes = [];
41527
+ for (let i = 0; i < 20; i += 2) {
41528
+ bytes.push(parseInt(cleaned.substring(i, i + 2), 16));
41529
+ }
41530
+ return bytes;
41531
+ }
41489
41532
  function classifyPanose(panose) {
41490
41533
  if (!panose || panose.length < 4) {
41491
41534
  return "sans-serif";
@@ -49653,6 +49696,29 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
49653
49696
  return void 0;
49654
49697
  }
49655
49698
  }
49699
+ /**
49700
+ * Resolve the `c:spPr` fill of a chart container (`c:chartSpace` or
49701
+ * `c:plotArea`) to a colour string, or the literal `'none'` for
49702
+ * `<a:noFill/>`. Returns `undefined` when the container declares no fill at
49703
+ * all, which leaves the choice to the renderer.
49704
+ *
49705
+ * `<a:noFill/>` parses to the empty STRING, so presence - not truthiness -
49706
+ * has to decide.
49707
+ */
49708
+ parseChartContainerFill(container) {
49709
+ const shapeProperties = this.xmlLookupService.getChildByLocalName(container, "spPr");
49710
+ if (!shapeProperties) {
49711
+ return void 0;
49712
+ }
49713
+ const hasNoFill = Object.keys(shapeProperties).some(
49714
+ (key) => this.compatibilityService.getXmlLocalName(key) === "noFill"
49715
+ );
49716
+ if (hasNoFill) {
49717
+ return "none";
49718
+ }
49719
+ const solidFill2 = this.xmlLookupService.getChildByLocalName(shapeProperties, "solidFill");
49720
+ return solidFill2 ? this.parseColor(solidFill2) : void 0;
49721
+ }
49656
49722
  /**
49657
49723
  * Extract chart style metadata from chart XML.
49658
49724
  */
@@ -49667,6 +49733,11 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
49667
49733
  style.styleId = parseInt(String(styleNode["@_val"]));
49668
49734
  hasStyle = true;
49669
49735
  }
49736
+ const chartAreaFill2 = this.parseChartContainerFill(chartSpace);
49737
+ if (chartAreaFill2) {
49738
+ style.chartAreaFill = chartAreaFill2;
49739
+ hasStyle = true;
49740
+ }
49670
49741
  if (chartRoot) {
49671
49742
  const legend = this.xmlLookupService.getChildByLocalName(chartRoot, "legend");
49672
49743
  if (legend) {
@@ -49692,6 +49763,11 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
49692
49763
  }
49693
49764
  const plotArea = this.xmlLookupService.getChildByLocalName(chartRoot, "plotArea");
49694
49765
  if (plotArea) {
49766
+ const plotAreaFill2 = this.parseChartContainerFill(plotArea);
49767
+ if (plotAreaFill2) {
49768
+ style.plotAreaFill = plotAreaFill2;
49769
+ hasStyle = true;
49770
+ }
49695
49771
  const valAx = this.xmlLookupService.getChildByLocalName(plotArea, "valAx");
49696
49772
  if (valAx) {
49697
49773
  const majorGridlines = this.xmlLookupService.getChildByLocalName(valAx, "majorGridlines");
@@ -51025,32 +51101,32 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
51025
51101
  * Build a p:grpSp XML object from a GroupPptxElement.
51026
51102
  * Children are stored with coordinates relative to the group origin.
51027
51103
  */
51028
- buildGroupShapeXml(group) {
51029
- if (group.rawXml && group.children.length === 0) {
51030
- return group.rawXml;
51104
+ buildGroupShapeXml(group2) {
51105
+ if (group2.rawXml && group2.children.length === 0) {
51106
+ return group2.rawXml;
51031
51107
  }
51032
51108
  const EMU = _PptxHandlerRuntime3.EMU_PER_PX;
51033
- const offX = Math.round(group.x * EMU);
51034
- const offY = Math.round(group.y * EMU);
51035
- const extCx = Math.round(group.width * EMU);
51036
- const extCy = Math.round(group.height * EMU);
51109
+ const offX = Math.round(group2.x * EMU);
51110
+ const offY = Math.round(group2.y * EMU);
51111
+ const extCx = Math.round(group2.width * EMU);
51112
+ const extCy = Math.round(group2.height * EMU);
51037
51113
  const chOffX = 0;
51038
51114
  const chOffY = 0;
51039
51115
  const chExtCx = extCx;
51040
51116
  const chExtCy = extCy;
51041
51117
  const xfrmAttrs = {};
51042
- if (typeof group.rotation === "number" && group.rotation !== 0) {
51043
- xfrmAttrs["@_rot"] = String(Math.round(group.rotation * 6e4));
51118
+ if (typeof group2.rotation === "number" && group2.rotation !== 0) {
51119
+ xfrmAttrs["@_rot"] = String(Math.round(group2.rotation * 6e4));
51044
51120
  }
51045
- if (group.flipHorizontal) {
51121
+ if (group2.flipHorizontal) {
51046
51122
  xfrmAttrs["@_flipH"] = "1";
51047
51123
  }
51048
- if (group.flipVertical) {
51124
+ if (group2.flipVertical) {
51049
51125
  xfrmAttrs["@_flipV"] = "1";
51050
51126
  }
51051
51127
  const grpXml = {
51052
51128
  "p:nvGrpSpPr": {
51053
- "p:cNvPr": { "@_id": "0", "@_name": group.id },
51129
+ "p:cNvPr": { "@_id": "0", "@_name": group2.id },
51054
51130
  "p:cNvGrpSpPr": {},
51055
51131
  "p:nvPr": {}
51056
51132
  },
@@ -51079,7 +51155,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
51079
51155
  const childShapes = [];
51080
51156
  const childPics = [];
51081
51157
  const childConnectors = [];
51082
- for (const child202 of group.children) {
51158
+ for (const child202 of group2.children) {
51083
51159
  let xml = child202.rawXml;
51084
51160
  if (!xml && (child202.type === "text" || child202.type === "shape")) {
51085
51161
  xml = this.createElementXml(child202);
@@ -58601,12 +58677,12 @@ var PptxHandlerRuntime37 = class _PptxHandlerRuntime13 extends PptxHandlerRuntim
58601
58677
  updateSummaryFallback(shape, el, targets, relationships) {
58602
58678
  const block = this.alternateContentBlockByRawXml.get(shape);
58603
58679
  const fallback = block?.rawAc["mc:Fallback"];
58604
- const group = fallback?.["p:grpSp"];
58605
- if (!group) {
58680
+ const group2 = fallback?.["p:grpSp"];
58681
+ if (!group2) {
58606
58682
  return;
58607
58683
  }
58608
- const existing = this.ensureArray(group["p:pic"]);
58609
- group["p:pic"] = targets.map((target, index) => {
58684
+ const existing = this.ensureArray(group2["p:pic"]);
58685
+ group2["p:pic"] = targets.map((target, index) => {
58610
58686
  const tile = this.summaryTileElement(el, target, index);
58611
58687
  const picture = existing[index] ?? this.buildZoomFallbackPicture(tile, relationships[index]);
58612
58688
  this.applyZoomTransform(picture["p:spPr"] ??= {}, tile);
@@ -59992,7 +60068,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
59992
60068
  */
59993
60069
  buildFontSchemeObject(schemeName, fontMap, majorScripts, minorScripts) {
59994
60070
  const buildFontGroup = (latinKey, eaKey, csKey, scripts) => {
59995
- const group = {
60071
+ const group2 = {
59996
60072
  "a:latin": { "@_typeface": fontMap[latinKey] || "Calibri" },
59997
60073
  "a:ea": { "@_typeface": fontMap[eaKey] || "" },
59998
60074
  "a:cs": { "@_typeface": fontMap[csKey] || "" }
@@ -60003,9 +60079,9 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
60003
60079
  "@_script": script,
60004
60080
  "@_typeface": scripts[script]
60005
60081
  }));
60006
- group["a:font"] = fontEntries.length === 1 ? fontEntries[0] : fontEntries;
60082
+ group2["a:font"] = fontEntries.length === 1 ? fontEntries[0] : fontEntries;
60007
60083
  }
60008
- return group;
60084
+ return group2;
60009
60085
  };
60010
60086
  return {
60011
60087
  "@_name": schemeName,
@@ -64638,7 +64714,7 @@ function parseEmuInt2(value) {
64638
64714
  return parsed;
64639
64715
  }
64640
64716
  var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntime66 {
64641
- async parseGroupShape(group, baseId, slidePath, rawXmlStr, depth = 0) {
64717
+ async parseGroupShape(group2, baseId, slidePath, rawXmlStr, depth = 0) {
64642
64718
  if (depth > MAX_GROUP_DEPTH) {
64643
64719
  this.compatibilityService.reportWarning({
64644
64720
  code: "group-depth-exceeded",
@@ -64650,7 +64726,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64650
64726
  });
64651
64727
  return [];
64652
64728
  }
64653
- const grpSpPr = group["p:grpSpPr"];
64729
+ const grpSpPr = group2["p:grpSpPr"];
64654
64730
  const xfrm = grpSpPr?.["a:xfrm"];
64655
64731
  const EMU_PX = _PptxHandlerRuntime30.EMU_PER_PX;
64656
64732
  let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
@@ -64715,16 +64791,16 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64715
64791
  }
64716
64792
  return el;
64717
64793
  };
64718
- this.unwrapAlternateContent(group);
64794
+ this.unwrapAlternateContent(group2);
64719
64795
  const childOrder3 = this.extractSpTreeChildOrder(
64720
64796
  void 0,
64721
- group,
64797
+ group2,
64722
64798
  "p:grpSp"
64723
64799
  );
64724
64800
  const elements2 = [];
64725
64801
  for (const entry2 of childOrder3) {
64726
64802
  if (entry2.tag === "p:grpSp") {
64727
- const subArr = this.ensureArray(group["p:grpSp"]);
64803
+ const subArr = this.ensureArray(group2["p:grpSp"]);
64728
64804
  const subGroup = subArr[entry2.indexInType];
64729
64805
  if (!subGroup) {
64730
64806
  continue;
@@ -64742,12 +64818,12 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64742
64818
  const element = await this.parseSpTreeChild(
64743
64819
  entry2.tag,
64744
64820
  entry2.indexInType,
64745
- group,
64821
+ group2,
64746
64822
  slidePath,
64747
64823
  `${baseId}-`
64748
64824
  );
64749
64825
  if (element) {
64750
- const childNode2 = this.ensureArray(group[entry2.tag])[entry2.indexInType];
64826
+ const childNode2 = this.ensureArray(group2[entry2.tag])[entry2.indexInType];
64751
64827
  applyRawChildGeometry(element, childNode2);
64752
64828
  transformElement(element);
64753
64829
  elements2.push(element);
@@ -64760,8 +64836,8 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64760
64836
  * Parse a p:grpSp element into a GroupPptxElement with children.
64761
64837
  * Children have coordinates relative to the group's position.
64762
64838
  */
64763
- async parseGroupShapeAsGroup(group, baseId, slidePath, rawXmlStr) {
64764
- const grpSpPr = group["p:grpSpPr"];
64839
+ async parseGroupShapeAsGroup(group2, baseId, slidePath, rawXmlStr) {
64840
+ const grpSpPr = group2["p:grpSpPr"];
64765
64841
  const xfrm = grpSpPr?.["a:xfrm"];
64766
64842
  let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
64767
64843
  let groupRotation;
@@ -64787,7 +64863,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64787
64863
  }
64788
64864
  const grpFillStyle = grpSpPr ? this.extractShapeStyle(grpSpPr) : void 0;
64789
64865
  const hasGroupFill = grpFillStyle && grpFillStyle.fillMode && grpFillStyle.fillMode !== "none";
64790
- const children10 = await this.parseGroupShape(group, baseId, slidePath, rawXmlStr);
64866
+ const children10 = await this.parseGroupShape(group2, baseId, slidePath, rawXmlStr);
64791
64867
  if (children10.length === 0) {
64792
64868
  return null;
64793
64869
  }
@@ -64813,7 +64889,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64813
64889
  child202.x -= parentX;
64814
64890
  child202.y -= parentY;
64815
64891
  }
64816
- const grpCNvPr = group?.["p:nvGrpSpPr"]?.["p:cNvPr"];
64892
+ const grpCNvPr = group2?.["p:nvGrpSpPr"]?.["p:cNvPr"];
64817
64893
  const grpSlideRels = this.slideRelsMap.get(slidePath);
64818
64894
  const { actionClick: grpActionClick, actionHover: grpActionHover } = this.parseElementActions(
64819
64895
  grpCNvPr,
@@ -64833,7 +64909,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64833
64909
  flipHorizontal: flipHorizontal || void 0,
64834
64910
  flipVertical: flipVertical || void 0,
64835
64911
  children: children10,
64836
- rawXml: group,
64912
+ rawXml: group2,
64837
64913
  actionClick: grpActionClick,
64838
64914
  actionHover: grpActionHover,
64839
64915
  groupFill: hasGroupFill ? grpFillStyle : void 0
@@ -66300,12 +66376,12 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
66300
66376
  }
66301
66377
  } else if (entry2.tag === "p:grpSp") {
66302
66378
  const groups = this.ensureArray(spTree["p:grpSp"]);
66303
- const group = groups[entry2.indexInType];
66304
- if (!group) {
66379
+ const group2 = groups[entry2.indexInType];
66380
+ if (!group2) {
66305
66381
  continue;
66306
66382
  }
66307
66383
  const element = await this.parseGroupShapeAsGroup(
66308
- group,
66384
+ group2,
66309
66385
  `master-group-${masterToken}-${entry2.indexInType}`,
66310
66386
  masterPath
66311
66387
  );
@@ -66522,12 +66598,12 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
66522
66598
  }
66523
66599
  } else if (entry2.tag === "p:grpSp") {
66524
66600
  const groups = this.ensureArray(spTree["p:grpSp"]);
66525
- const group = groups[entry2.indexInType];
66526
- if (!group) {
66601
+ const group2 = groups[entry2.indexInType];
66602
+ if (!group2) {
66527
66603
  continue;
66528
66604
  }
66529
66605
  const element = await this.parseGroupShapeAsGroup(
66530
- group,
66606
+ group2,
66531
66607
  `layout-group-${layoutToken}-${entry2.indexInType}`,
66532
66608
  layoutPath
66533
66609
  );
@@ -68404,16 +68480,16 @@ function extractDrawingShapeTextStyle(txBody, deps) {
68404
68480
  }
68405
68481
  return { fontSize, fontColor };
68406
68482
  }
68407
- function resolveSmartArtTextStyles(paragraphs, resolve) {
68483
+ function resolveSmartArtTextStyles(paragraphs, resolve2) {
68408
68484
  for (const paragraph of paragraphs ?? []) {
68409
68485
  if (paragraph.endParaRPr) {
68410
- paragraph.endParaStyle = resolve(paragraph.endParaRPr);
68486
+ paragraph.endParaStyle = resolve2(paragraph.endParaRPr);
68411
68487
  }
68412
68488
  for (const item of paragraph.items) {
68413
68489
  if (item.kind === "run" && item.run.rPr) {
68414
- item.run.style = resolve(item.run.rPr);
68490
+ item.run.style = resolve2(item.run.rPr);
68415
68491
  } else if ((item.kind === "field" || item.kind === "break") && item.rPr) {
68416
- item.style = resolve(item.rPr);
68492
+ item.style = resolve2(item.rPr);
68417
68493
  }
68418
68494
  }
68419
68495
  }
@@ -69922,6 +69998,20 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
69922
69998
  const hasBlanks = expanded.some((value) => value === null);
69923
69999
  const values = hasBlanks ? expanded.map((value) => value ?? 0) : this.extractChartPointValues(valNode, true).map((value) => Number.parseFloat(value)).filter((value) => Number.isFinite(value));
69924
70000
  const blanks = hasBlanks ? expanded.map((value) => value === null) : void 0;
70001
+ const seriesNumberFormat = String(
70002
+ this.xmlLookupService.getChildByLocalName(
70003
+ this.xmlLookupService.getChildByLocalName(seriesNode, "dLbls"),
70004
+ "numFmt"
70005
+ )?.["@_formatCode"] ?? ""
70006
+ ).trim() || String(
70007
+ this.xmlLookupService.getScalarChildByLocalName(
70008
+ this.xmlLookupService.getChildByLocalName(
70009
+ this.xmlLookupService.getChildByLocalName(valNode, "numRef") ?? valNode,
70010
+ "numCache"
70011
+ ),
70012
+ "formatCode"
70013
+ ) ?? ""
70014
+ ).trim();
69925
70015
  const seriesShapeProperties = this.xmlLookupService.getChildByLocalName(seriesNode, "spPr");
69926
70016
  const seriesColor23 = this.parseColor(
69927
70017
  this.xmlLookupService.getChildByLocalName(seriesShapeProperties, "solidFill")
@@ -69953,6 +70043,7 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
69953
70043
  name: seriesName.trim().length > 0 ? seriesName : `Series ${seriesIndex + 1}`,
69954
70044
  values: fallbackValues,
69955
70045
  ...blanks ? { blanks } : {},
70046
+ ...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
69956
70047
  color: seriesColor23,
69957
70048
  ...trendlines.length > 0 ? { trendlines } : {},
69958
70049
  ...errBars.length > 0 ? { errBars } : {},
@@ -79979,9 +80070,9 @@ var SlideMetadataRenderer = class {
79979
80070
  const clickGroups = this.groupByClickSequence(items);
79980
80071
  const lines = ["### Animations"];
79981
80072
  for (let gi = 0; gi < clickGroups.length; gi += 1) {
79982
- const group = clickGroups[gi];
80073
+ const group2 = clickGroups[gi];
79983
80074
  lines.push(`- **Click ${gi + 1}:**`);
79984
- for (const anim of group) {
80075
+ for (const anim of group2) {
79985
80076
  lines.push(` - ${this.summariseAnimation(anim)}`);
79986
80077
  }
79987
80078
  }
@@ -80877,7 +80968,7 @@ var TextSegmentRenderer = class {
80877
80968
  return "";
80878
80969
  }
80879
80970
  const paragraphs = this.groupParagraphs(segments);
80880
- const renderedParagraphs = paragraphs.map((group) => this.renderParagraph(group, options)).filter((paragraph) => paragraph.text.length > 0);
80971
+ const renderedParagraphs = paragraphs.map((group2) => this.renderParagraph(group2, options)).filter((paragraph) => paragraph.text.length > 0);
80881
80972
  if (renderedParagraphs.length === 0) {
80882
80973
  return "";
80883
80974
  }
@@ -80909,7 +81000,7 @@ var TextSegmentRenderer = class {
80909
81000
  plainText(segments, options = {}) {
80910
81001
  const paragraphs = this.groupParagraphs(segments);
80911
81002
  const rendered = paragraphs.map(
80912
- (group) => group.segments.map((segment) => {
81003
+ (group2) => group2.segments.map((segment) => {
80913
81004
  const base = this.resolvePlainSegmentText(segment, options);
80914
81005
  if (segment.rubyText) {
80915
81006
  return `${base}(${segment.rubyText})`;
@@ -80939,8 +81030,8 @@ var TextSegmentRenderer = class {
80939
81030
  }
80940
81031
  return groups;
80941
81032
  }
80942
- renderParagraph(group, options) {
80943
- let rawText = group.segments.map((segment) => this.renderSegment(segment, options)).join("");
81033
+ renderParagraph(group2, options) {
81034
+ let rawText = group2.segments.map((segment) => this.renderSegment(segment, options)).join("");
80944
81035
  if (options.htmlFormatting) {
80945
81036
  rawText = rawText.replace(/<\/strong><strong>/g, "").replace(/<\/em><em>/g, "").replace(/<\/s><s>/g, "");
80946
81037
  } else {
@@ -80954,10 +81045,10 @@ var TextSegmentRenderer = class {
80954
81045
  return { text: "", isListItem: false };
80955
81046
  }
80956
81047
  if (!options.disableLists && !options.inlineMode) {
80957
- const bullet = group.segments.find((segment) => Boolean(segment.bulletInfo))?.bulletInfo;
81048
+ const bullet = group2.segments.find((segment) => Boolean(segment.bulletInfo))?.bulletInfo;
80958
81049
  if (bullet && !bullet.none) {
80959
- const level = resolveListLevel(bullet, group.index, options.paragraphIndents);
80960
- const marker = resolveListMarker(bullet, group.index);
81050
+ const level = resolveListLevel(bullet, group2.index, options.paragraphIndents);
81051
+ const marker = resolveListMarker(bullet, group2.index);
80961
81052
  const alreadyNumbered = bullet.autoNumType && /^\d+[.)]\s/.test(rawText);
80962
81053
  const prefix = alreadyNumbered ? "" : `${marker} `;
80963
81054
  if (options.htmlFormatting) {
@@ -80973,7 +81064,7 @@ var TextSegmentRenderer = class {
80973
81064
  };
80974
81065
  }
80975
81066
  }
80976
- const align = group.segments[0]?.style.align;
81067
+ const align = group2.segments[0]?.style.align;
80977
81068
  if (!options.disableAlignment && !options.inlineMode && align && align !== "left") {
80978
81069
  return {
80979
81070
  text: `<p align="${align}">${rawText}</p>`,
@@ -83822,8 +83913,8 @@ function buildStrokeOutline(element) {
83822
83913
  function suppressesCssBorder(element) {
83823
83914
  return buildStrokeOutline(element) !== void 0;
83824
83915
  }
83825
- function getGroupChildParentFill(group) {
83826
- return group.type === "group" ? group.groupFill : void 0;
83916
+ function getGroupChildParentFill(group2) {
83917
+ return group2.type === "group" ? group2.groupFill : void 0;
83827
83918
  }
83828
83919
  function resolveGroupChildFill(child22, parentGroupFill) {
83829
83920
  if (!parentGroupFill || !hasShapeProperties(child22) || child22.shapeStyle?.fillMode !== "group") {
@@ -86295,11 +86386,11 @@ var LatexParser = class {
86295
86386
  return tryParseScripts(this, base);
86296
86387
  }
86297
86388
  if (tok.type === "group_start") {
86298
- const group = this.parseGroup();
86299
- if (group.length === 0) {
86389
+ const group2 = this.parseGroup();
86390
+ if (group2.length === 0) {
86300
86391
  return null;
86301
86392
  }
86302
- const base = group.length === 1 ? group[0] : this.wrapE(group);
86393
+ const base = group2.length === 1 ? group2[0] : this.wrapE(group2);
86303
86394
  return tryParseScripts(this, base);
86304
86395
  }
86305
86396
  if (tok.type === "command") {
@@ -86707,6 +86798,273 @@ function latexToMathMl(source) {
86707
86798
  function compileEquationTemplateMathMl() {
86708
86799
  return EQUATION_TEMPLATES.map((tmpl) => latexToMathMl(tmpl.latex));
86709
86800
  }
86801
+ var NICE_STEPS = [1, 2, 2.5, 5, 10];
86802
+ var HEADROOM = 0.05;
86803
+ var ZERO_ANCHOR_RATIO = 5 / 6;
86804
+ function niceAxisStep(value) {
86805
+ if (!Number.isFinite(value) || value <= 0) {
86806
+ return 1;
86807
+ }
86808
+ const exponent = Math.floor(Math.log10(value));
86809
+ const power = 10 ** exponent;
86810
+ const mantissa = value / power;
86811
+ const step = NICE_STEPS.find((candidate) => mantissa <= candidate + 1e-12) ?? 10;
86812
+ return step * power;
86813
+ }
86814
+ function snap(value, unit, direction) {
86815
+ const scaled = value / unit;
86816
+ const rounded = direction === "up" ? Math.ceil(scaled - 1e-9) : Math.floor(scaled + 1e-9);
86817
+ return rounded * unit;
86818
+ }
86819
+ function niceValueAxisBounds(dataMin, dataMax, targetIntervals = 4) {
86820
+ if (!Number.isFinite(dataMin) || !Number.isFinite(dataMax)) {
86821
+ return { min: 0, max: 1, majorUnit: 0.5 };
86822
+ }
86823
+ const low = Math.min(dataMin, dataMax);
86824
+ const high = Math.max(dataMin, dataMax);
86825
+ const intervals = Math.max(1, Math.round(targetIntervals));
86826
+ if (low === high) {
86827
+ if (low === 0) {
86828
+ return { min: 0, max: 1, majorUnit: 1 / intervals };
86829
+ }
86830
+ const unit2 = niceAxisStep(Math.abs(low) / intervals);
86831
+ return low > 0 ? { min: 0, max: snap(low, unit2, "up") || unit2, majorUnit: unit2 } : { min: snap(low, unit2, "down"), max: 0, majorUnit: unit2 };
86832
+ }
86833
+ const dataSpan = high - low;
86834
+ const padding = dataSpan * HEADROOM;
86835
+ let paddedMin;
86836
+ let paddedMax;
86837
+ if (low >= 0) {
86838
+ paddedMin = low < high * ZERO_ANCHOR_RATIO ? 0 : low - padding;
86839
+ paddedMax = high + padding;
86840
+ } else if (high <= 0) {
86841
+ paddedMax = high > low * ZERO_ANCHOR_RATIO ? 0 : high + padding;
86842
+ paddedMin = low - padding;
86843
+ } else {
86844
+ paddedMin = low - padding;
86845
+ paddedMax = high + padding;
86846
+ }
86847
+ const unit = niceAxisStep((paddedMax - paddedMin) / intervals);
86848
+ const min = paddedMin === 0 ? 0 : snap(paddedMin, unit, "down");
86849
+ let max = paddedMax === 0 ? 0 : snap(paddedMax, unit, "up");
86850
+ if (max <= min) {
86851
+ max = min + unit;
86852
+ }
86853
+ return { min, max, majorUnit: unit };
86854
+ }
86855
+ var GENERAL = /* @__PURE__ */ new Set(["", "general", "@"]);
86856
+ function sections(code) {
86857
+ const out = [];
86858
+ let current = "";
86859
+ let inQuotes = false;
86860
+ for (let i = 0; i < code.length; i += 1) {
86861
+ const ch = code[i];
86862
+ if (ch === '"') {
86863
+ inQuotes = !inQuotes;
86864
+ current += ch;
86865
+ continue;
86866
+ }
86867
+ if (ch === "\\") {
86868
+ current += ch + (code[i + 1] ?? "");
86869
+ i += 1;
86870
+ continue;
86871
+ }
86872
+ if (ch === ";" && !inQuotes) {
86873
+ out.push(current);
86874
+ current = "";
86875
+ continue;
86876
+ }
86877
+ current += ch;
86878
+ }
86879
+ out.push(current);
86880
+ return out;
86881
+ }
86882
+ function sectionFor(value, parts) {
86883
+ if (parts.length === 1) {
86884
+ return { code: parts[0], forcePositive: false };
86885
+ }
86886
+ if (value < 0 && parts[1] !== void 0) {
86887
+ return { code: parts[1], forcePositive: true };
86888
+ }
86889
+ if (value === 0 && parts[2] !== void 0) {
86890
+ return { code: parts[2], forcePositive: false };
86891
+ }
86892
+ return { code: parts[0], forcePositive: false };
86893
+ }
86894
+ var PLACEHOLDER = /[0#?]/u;
86895
+ function parsePattern(code) {
86896
+ let scale = 1;
86897
+ let scientific = false;
86898
+ const chars = [];
86899
+ let inQuotes = false;
86900
+ for (let i = 0; i < code.length; i += 1) {
86901
+ const ch = code[i];
86902
+ if (ch === '"') {
86903
+ inQuotes = !inQuotes;
86904
+ continue;
86905
+ }
86906
+ if (inQuotes) {
86907
+ chars.push({ ch, literal: true });
86908
+ continue;
86909
+ }
86910
+ if (ch === "\\" || ch === "*" || ch === "_") {
86911
+ const next = code[i + 1];
86912
+ i += 1;
86913
+ if (ch === "\\" && next !== void 0) {
86914
+ chars.push({ ch: next, literal: true });
86915
+ }
86916
+ continue;
86917
+ }
86918
+ if (ch === "%") {
86919
+ scale *= 100;
86920
+ chars.push({ ch, literal: true });
86921
+ continue;
86922
+ }
86923
+ if (ch === "E" && (code[i + 1] === "+" || code[i + 1] === "-")) {
86924
+ scientific = true;
86925
+ chars.push({ ch: "E", literal: false });
86926
+ i += 1;
86927
+ continue;
86928
+ }
86929
+ if (ch === "[") {
86930
+ const close = code.indexOf("]", i);
86931
+ i = close === -1 ? code.length : close;
86932
+ continue;
86933
+ }
86934
+ chars.push({ ch, literal: false });
86935
+ }
86936
+ const firstDigit = chars.findIndex((c) => !c.literal && PLACEHOLDER.test(c.ch));
86937
+ if (firstDigit === -1) {
86938
+ return void 0;
86939
+ }
86940
+ let lastDigit = firstDigit;
86941
+ for (let i = chars.length - 1; i >= firstDigit; i -= 1) {
86942
+ const c = chars[i];
86943
+ if (!c.literal && (PLACEHOLDER.test(c.ch) || c.ch === "." || c.ch === "," || c.ch === "E")) {
86944
+ lastDigit = i;
86945
+ break;
86946
+ }
86947
+ }
86948
+ const numeric = chars.slice(firstDigit, lastDigit + 1);
86949
+ const prefix = chars.slice(0, firstDigit).map((c) => c.ch).join("");
86950
+ const suffix = chars.slice(lastDigit + 1).map((c) => c.ch).join("");
86951
+ let grouped = false;
86952
+ let intDigits = 0;
86953
+ let required = 0;
86954
+ let optional = 0;
86955
+ let afterPoint = false;
86956
+ let inExponent = false;
86957
+ for (let i = 0; i < numeric.length; i += 1) {
86958
+ const { ch, literal } = numeric[i];
86959
+ if (literal) {
86960
+ continue;
86961
+ }
86962
+ if (ch === "E") {
86963
+ inExponent = true;
86964
+ continue;
86965
+ }
86966
+ if (inExponent) {
86967
+ continue;
86968
+ }
86969
+ if (ch === ".") {
86970
+ afterPoint = true;
86971
+ continue;
86972
+ }
86973
+ if (ch === ",") {
86974
+ const next = numeric.slice(i + 1).find((c) => !c.literal);
86975
+ if (!next || next.ch === "." || !PLACEHOLDER.test(next.ch)) {
86976
+ scale /= 1e3;
86977
+ } else {
86978
+ grouped = true;
86979
+ }
86980
+ continue;
86981
+ }
86982
+ if (!PLACEHOLDER.test(ch)) {
86983
+ continue;
86984
+ }
86985
+ if (afterPoint) {
86986
+ if (ch === "0") {
86987
+ required += 1;
86988
+ } else {
86989
+ optional += 1;
86990
+ }
86991
+ } else if (ch === "0") {
86992
+ intDigits += 1;
86993
+ }
86994
+ }
86995
+ return {
86996
+ prefix,
86997
+ suffix,
86998
+ intDigits,
86999
+ decimals: { required, optional },
87000
+ grouped,
87001
+ scale,
87002
+ scientific
87003
+ };
87004
+ }
87005
+ function group(intPart) {
87006
+ return intPart.replace(/\B(?=(\d{3})+(?!\d))/gu, ",");
87007
+ }
87008
+ function applyPattern(value, pattern, forcePositive) {
87009
+ const scaled = value * pattern.scale;
87010
+ const magnitude = forcePositive ? Math.abs(scaled) : scaled;
87011
+ if (pattern.scientific) {
87012
+ const digits = pattern.decimals.required + pattern.decimals.optional;
87013
+ const exponential = magnitude.toExponential(digits);
87014
+ const [mantissa, exponent] = exponential.split("e");
87015
+ const sign = exponent.startsWith("-") ? "-" : "+";
87016
+ const power = Math.abs(Number(exponent)).toString().padStart(2, "0");
87017
+ return `${pattern.prefix}${mantissa}E${sign}${power}${pattern.suffix}`;
87018
+ }
87019
+ const maxDecimals = pattern.decimals.required + pattern.decimals.optional;
87020
+ let body = magnitude.toFixed(maxDecimals);
87021
+ if (pattern.decimals.optional > 0) {
87022
+ body = body.replace(/(\.\d*?)0+$/u, "$1").replace(/\.$/u, "");
87023
+ const [, frac = ""] = body.split(".");
87024
+ if (frac.length < pattern.decimals.required) {
87025
+ body = Number(body).toFixed(pattern.decimals.required);
87026
+ }
87027
+ }
87028
+ const [rawIntPart, fracPart] = body.split(".");
87029
+ let intPart = rawIntPart;
87030
+ const negative = intPart.startsWith("-");
87031
+ if (negative) {
87032
+ intPart = intPart.slice(1);
87033
+ }
87034
+ if (intPart.length < pattern.intDigits) {
87035
+ intPart = intPart.padStart(pattern.intDigits, "0");
87036
+ }
87037
+ if (pattern.intDigits === 0 && intPart === "0" && fracPart !== void 0) {
87038
+ intPart = "";
87039
+ }
87040
+ if (pattern.grouped) {
87041
+ intPart = group(intPart);
87042
+ }
87043
+ const number = fracPart === void 0 ? intPart : `${intPart}.${fracPart}`;
87044
+ return `${negative ? "-" : ""}${pattern.prefix}${number}${pattern.suffix}`;
87045
+ }
87046
+ function formatChartNumber(value, formatCode) {
87047
+ if (!Number.isFinite(value)) {
87048
+ return void 0;
87049
+ }
87050
+ const code = (formatCode ?? "").trim();
87051
+ if (GENERAL.has(code.toLowerCase())) {
87052
+ return void 0;
87053
+ }
87054
+ if (/(?:^|[^\\"])(?:yy|mm?m|dd?|hh|ss)/iu.test(code) && !/[0#?]/u.test(code)) {
87055
+ return void 0;
87056
+ }
87057
+ const { code: section, forcePositive } = sectionFor(value, sections(code));
87058
+ const pattern = parsePattern(section);
87059
+ if (!pattern) {
87060
+ return void 0;
87061
+ }
87062
+ try {
87063
+ return applyPattern(value, pattern, forcePositive);
87064
+ } catch {
87065
+ return void 0;
87066
+ }
87067
+ }
86710
87068
  var ACCENT1 = "#4472C4";
86711
87069
  var ACCENT2 = "#ED7D31";
86712
87070
  var ACCENT3 = "#A5A5A5";
@@ -86837,12 +87195,11 @@ function computeValueRange(series) {
86837
87195
  if (allValues.length === 0) {
86838
87196
  return { min: 0, max: 1, span: 1 };
86839
87197
  }
86840
- const dataMin = Math.min(...allValues);
86841
- const dataMax = Math.max(...allValues);
86842
- const min = Math.min(dataMin, 0);
86843
- const max = Math.max(dataMax, 0);
86844
- const span = Math.max(max - min, 1);
86845
- return { min, max, span };
87198
+ const { min, max, majorUnit } = niceValueAxisBounds(
87199
+ Math.min(...allValues),
87200
+ Math.max(...allValues)
87201
+ );
87202
+ return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
86846
87203
  }
86847
87204
  function valueToY(val2, range, topY, bottomY) {
86848
87205
  const usable = bottomY - topY;
@@ -86858,7 +87215,11 @@ function valueToY(val2, range, topY, bottomY) {
86858
87215
  }
86859
87216
  return range.reverseOrder ? topY + ratio * usable : bottomY - ratio * usable;
86860
87217
  }
86861
- function formatAxisValue(val2) {
87218
+ function formatAxisValue(val2, formatCode) {
87219
+ const formatted = formatChartNumber(val2, formatCode);
87220
+ if (formatted !== void 0) {
87221
+ return formatted;
87222
+ }
86862
87223
  if (Math.abs(val2) >= 1e6) {
86863
87224
  return `${(val2 / 1e6).toFixed(1)}M`;
86864
87225
  }
@@ -86914,6 +87275,19 @@ function computeLayout(elementWidth, elementHeight, style, hasAxes, legendPos, o
86914
87275
  svgHeight
86915
87276
  };
86916
87277
  }
87278
+ var DEFAULT_CHART_AREA_FILL = "#0f172a11";
87279
+ function resolve(fill, fallback) {
87280
+ if (fill === "none") {
87281
+ return void 0;
87282
+ }
87283
+ return fill ?? fallback;
87284
+ }
87285
+ function chartAreaFill(chartData) {
87286
+ return resolve(chartData?.style?.chartAreaFill, DEFAULT_CHART_AREA_FILL);
87287
+ }
87288
+ function plotAreaFill(chartData) {
87289
+ return resolve(chartData?.style?.plotAreaFill, void 0);
87290
+ }
86917
87291
  var LOG_EXPONENT_TOLERANCE = 1e-12;
86918
87292
  function computeLogValueRange(series, logBase) {
86919
87293
  const allValues = series.flatMap((item) => item.values).filter((value) => value > 0);
@@ -86942,6 +87316,7 @@ function computeValueRangeForAxis(series, axis) {
86942
87316
  const validMax = typeof axis?.max === "number" && Number.isFinite(axis.max) && (!logBase || axis.max > 0) ? axis.max : void 0;
86943
87317
  const min = validMin ?? automatic.min;
86944
87318
  let max = validMax ?? automatic.max;
87319
+ const majorUnit = validMin === void 0 && validMax === void 0 ? automatic.majorUnit : void 0;
86945
87320
  if (max <= min) {
86946
87321
  max = logBase ? min * logBase : min + 1;
86947
87322
  }
@@ -86950,6 +87325,7 @@ function computeValueRangeForAxis(series, axis) {
86950
87325
  min,
86951
87326
  max,
86952
87327
  span: Math.max(span, Number.EPSILON),
87328
+ ...majorUnit !== void 0 ? { majorUnit } : {},
86953
87329
  ...logBase ? { logScale: true, logBase } : {},
86954
87330
  ...axis?.orientation === "maxMin" ? { reverseOrder: true } : {}
86955
87331
  };
@@ -86989,6 +87365,10 @@ function generateAxisTicks(range, axis, defaultIntervals) {
86989
87365
  if (explicit.length > 0) {
86990
87366
  return explicit;
86991
87367
  }
87368
+ const automatic = generateIntervalTicks(range, range.majorUnit ?? 0);
87369
+ if (automatic.length > 0) {
87370
+ return automatic;
87371
+ }
86992
87372
  return Array.from(
86993
87373
  { length: defaultIntervals + 1 },
86994
87374
  (_, index) => range.min + range.span / defaultIntervals * index
@@ -87557,7 +87937,7 @@ function formatTick(val2, axis) {
87557
87937
  if (axis?.displayUnits) {
87558
87938
  return formatAxisValueWithUnits(val2, axis);
87559
87939
  }
87560
- return formatAxisValue2(val2);
87940
+ return formatAxisValue2(val2, axis?.numFmt?.formatCode);
87561
87941
  }
87562
87942
  function buildPrimaryAxis(range, layout, axis, axisX = layout.plotLeft) {
87563
87943
  const gridlines = [];
@@ -87754,7 +88134,11 @@ function hasRicherAxisFeatures(chartData) {
87754
88134
  return Boolean(
87755
88135
  chartData.dataTable || chartData.axes?.some(
87756
88136
  (axis) => axis.crosses !== void 0 || axis.crossesAt !== void 0 || axis.crossBetween !== void 0 || axis.axisType === "valAx" && Boolean(
87757
- axis.logScale || axis.displayUnits || axis.axPos === "r" || axis.orientation === "maxMin" || axis.majorUnit !== void 0 || axis.minorUnit !== void 0 || axis.minorGridlines || axis.majorTickMark !== void 0 || axis.minorTickMark !== void 0 || axis.tickLblPos !== void 0
88137
+ axis.logScale || axis.displayUnits || // A `c:numFmt` is only honoured on the `buildPrimaryAxis`
88138
+ // path; the fast path has no axis to read it from. The two
88139
+ // agree tick-for-tick when no log scale or display unit is
88140
+ // in play, so routing a formatted axis here costs nothing.
88141
+ axis.numFmt?.formatCode || axis.axPos === "r" || axis.orientation === "maxMin" || axis.majorUnit !== void 0 || axis.minorUnit !== void 0 || axis.minorGridlines || axis.majorTickMark !== void 0 || axis.minorTickMark !== void 0 || axis.tickLblPos !== void 0
87758
88142
  )
87759
88143
  )
87760
88144
  );
@@ -87864,7 +88248,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
87864
88248
  kind: "text",
87865
88249
  x: x + singleBarWidth / 2,
87866
88250
  y: val2 >= 0 ? y - 4 : y + h + 10,
87867
- text: formatAxisValue2(val2),
88251
+ text: formatAxisValue2(val2, series[si].numberFormat),
87868
88252
  fontSize: 7,
87869
88253
  fill: "#334155",
87870
88254
  textAnchor: "middle"
@@ -87969,7 +88353,7 @@ function pushClusteredStackedLabels(series, sourceIndices2, catCount, layout, ra
87969
88353
  kind: "text",
87970
88354
  x,
87971
88355
  y: labelY,
87972
- text: formatAxisValue2(val2),
88356
+ text: formatAxisValue2(val2, series[si].numberFormat),
87973
88357
  fontSize: 7,
87974
88358
  fill: "#334155",
87975
88359
  textAnchor: "middle"
@@ -88255,7 +88639,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
88255
88639
  kind: "text",
88256
88640
  x: pt.x,
88257
88641
  y: pt.y - 7,
88258
- text: formatAxisValue2(val2),
88642
+ text: formatAxisValue2(val2, series.numberFormat),
88259
88643
  fontSize: 7,
88260
88644
  fill: "#334155",
88261
88645
  textAnchor: "middle"
@@ -88327,7 +88711,7 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
88327
88711
  kind: "text",
88328
88712
  x: pt.x,
88329
88713
  y: pt.y - 6,
88330
- text: formatAxisValue2(val2),
88714
+ text: formatAxisValue2(val2, series.numberFormat),
88331
88715
  fontSize: 7,
88332
88716
  fill: "#334155",
88333
88717
  textAnchor: "middle"
@@ -88372,7 +88756,7 @@ function buildScatter(chartData, layout, range) {
88372
88756
  kind: "text",
88373
88757
  x: dot.cx,
88374
88758
  y: dot.cy - 6,
88375
- text: formatAxisValue2(val2),
88759
+ text: formatAxisValue2(val2, series.numberFormat),
88376
88760
  fontSize: 7,
88377
88761
  fill: "#334155",
88378
88762
  textAnchor: "middle"
@@ -88419,7 +88803,7 @@ function buildBubbles(chartData, layout, range) {
88419
88803
  kind: "text",
88420
88804
  x: dot.cx,
88421
88805
  y: dot.cy - 10,
88422
- text: formatAxisValue2(val2),
88806
+ text: formatAxisValue2(val2, series.numberFormat),
88423
88807
  fontSize: 7,
88424
88808
  fill: "#334155",
88425
88809
  textAnchor: "middle"
@@ -88573,18 +88957,18 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
88573
88957
  const bandHeight = Math.max(axis?.fontSize ?? 8, 8) + 4;
88574
88958
  return levels.flatMap((level, levelIndex) => {
88575
88959
  const values = sourceIndices2.map((sourceIndex) => level[sourceIndex] ?? "");
88576
- return groupedLabels(values).flatMap((group) => {
88577
- if (!group.text || group.start % skip !== 0) {
88960
+ return groupedLabels(values).flatMap((group2) => {
88961
+ if (!group2.text || group2.start % skip !== 0) {
88578
88962
  return [];
88579
88963
  }
88580
- const startX = categoryX2(group.start, sourceIndices2.length, layout, spacing);
88581
- const endX = categoryX2(group.end, sourceIndices2.length, layout, spacing);
88964
+ const startX = categoryX2(group2.start, sourceIndices2.length, layout, spacing);
88965
+ const endX = categoryX2(group2.end, sourceIndices2.length, layout, spacing);
88582
88966
  return [
88583
88967
  {
88584
88968
  kind: "text",
88585
88969
  x: (startX + endX) / 2,
88586
88970
  y: labelY + direction * (offset + levelIndex * bandHeight),
88587
- text: group.text,
88971
+ text: group2.text,
88588
88972
  textAnchor,
88589
88973
  ...chartAxisTextStyle(axis)
88590
88974
  }
@@ -89829,7 +90213,7 @@ function buildComboViewModel(element, chartData, categoryLabels) {
89829
90213
  kind: "text",
89830
90214
  x: point.x,
89831
90215
  y: point.y - 7,
89832
- text: formatAxisValue2(point.value),
90216
+ text: formatAxisValue2(point.value, series.numberFormat),
89833
90217
  fontSize: 7,
89834
90218
  fill: "#334155",
89835
90219
  textAnchor: "middle"
@@ -89884,7 +90268,7 @@ function appendBarLabels(series, chartData, layout, catCount, range, sourceIndic
89884
90268
  kind: "text",
89885
90269
  x: xPositions?.[displayIndex] ?? layout.plotLeft + groupWidth * displayIndex + offset + barWidth / 2,
89886
90270
  y: value >= 0 ? Math.min(zeroY, valueY) - 4 : Math.max(zeroY, valueY) + 10,
89887
- text: formatAxisValue2(value),
90271
+ text: formatAxisValue2(value, series.numberFormat),
89888
90272
  fontSize: 7,
89889
90273
  fill: "#334155",
89890
90274
  textAnchor: "middle"
@@ -90921,7 +91305,7 @@ function isOutsidePosition(position2) {
90921
91305
  return position2 === "outEnd" || position2 === "bestFit";
90922
91306
  }
90923
91307
  function buildPieDataLabels(params) {
90924
- const { slices, values, cx, cy, outerR, position: position2, showLeaderLines } = params;
91308
+ const { slices, values, cx, cy, outerR, position: position2, showLeaderLines, numberFormat } = params;
90925
91309
  const outside = isOutsidePosition(position2);
90926
91310
  const labels = [];
90927
91311
  const leaderLines = [];
@@ -90935,7 +91319,7 @@ function buildPieDataLabels(params) {
90935
91319
  kind: "text",
90936
91320
  x: slice.labelX,
90937
91321
  y: slice.labelY,
90938
- text: formatAxisValue2(val2),
91322
+ text: formatAxisValue2(val2, numberFormat),
90939
91323
  fontSize: 8,
90940
91324
  fill: "#ffffff",
90941
91325
  textAnchor: "middle",
@@ -90955,7 +91339,7 @@ function buildPieDataLabels(params) {
90955
91339
  kind: "text",
90956
91340
  x: labelX + (cos >= 0 ? 2 : -2),
90957
91341
  y: labelY,
90958
- text: formatAxisValue2(val2),
91342
+ text: formatAxisValue2(val2, numberFormat),
90959
91343
  fontSize: 8,
90960
91344
  fill: "#334155",
90961
91345
  textAnchor: anchor,
@@ -92224,10 +92608,8 @@ function computeValueRange2(series) {
92224
92608
  if (dataMin === Number.POSITIVE_INFINITY) {
92225
92609
  return { min: 0, max: 1, span: 1 };
92226
92610
  }
92227
- const min = Math.min(dataMin, 0);
92228
- const max = Math.max(dataMax, 0);
92229
- const span = Math.max(max - min, 1);
92230
- return { min, max, span };
92611
+ const { min, max, majorUnit } = niceValueAxisBounds(dataMin, dataMax);
92612
+ return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
92231
92613
  }
92232
92614
  function computeStackedValueRange(series, catCount) {
92233
92615
  let maxSum = 0;
@@ -92246,10 +92628,8 @@ function computeStackedValueRange(series, catCount) {
92246
92628
  maxSum = Math.max(maxSum, pos2);
92247
92629
  minSum = Math.min(minSum, neg);
92248
92630
  }
92249
- const min = Math.min(minSum, 0);
92250
- const max = Math.max(maxSum, 0);
92251
- const span = Math.max(max - min, 1);
92252
- return { min, max, span };
92631
+ const { min, max, majorUnit } = niceValueAxisBounds(Math.min(minSum, 0), Math.max(maxSum, 0));
92632
+ return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
92253
92633
  }
92254
92634
  function valueToY2(val2, range, topY, bottomY) {
92255
92635
  const usable = bottomY - topY;
@@ -92265,7 +92645,11 @@ function valueToY2(val2, range, topY, bottomY) {
92265
92645
  }
92266
92646
  return range.reverseOrder ? topY + ratio * usable : bottomY - ratio * usable;
92267
92647
  }
92268
- function formatAxisValue2(val2) {
92648
+ function formatAxisValue2(val2, formatCode) {
92649
+ const formatted = formatChartNumber(val2, formatCode);
92650
+ if (formatted !== void 0) {
92651
+ return formatted;
92652
+ }
92269
92653
  if (Math.abs(val2) >= 1e6) {
92270
92654
  return `${(val2 / 1e6).toFixed(1)}M`;
92271
92655
  }
@@ -92327,11 +92711,23 @@ var GRIDLINE_COLOR2 = "#e2e8f0";
92327
92711
  var AXIS_LABEL_COLOR = "#64748b";
92328
92712
  var ZERO_LINE_COLOR = "#94a3b8";
92329
92713
  var TICK_COUNT2 = 5;
92714
+ function axisTickValues(range) {
92715
+ const unit = range.majorUnit;
92716
+ if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
92717
+ const steps = Math.round((range.max - range.min) / unit);
92718
+ if (steps >= 1 && steps <= 100) {
92719
+ return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
92720
+ }
92721
+ }
92722
+ return Array.from(
92723
+ { length: TICK_COUNT2 + 1 },
92724
+ (_unused, index) => range.min + range.span / TICK_COUNT2 * index
92725
+ );
92726
+ }
92330
92727
  function buildGridlinesAndLabels(range, layout) {
92331
92728
  const gridlines = [];
92332
92729
  const axisLabels = [];
92333
- for (let i = 0; i <= TICK_COUNT2; i++) {
92334
- const val2 = range.min + range.span / TICK_COUNT2 * i;
92730
+ for (const val2 of axisTickValues(range)) {
92335
92731
  const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
92336
92732
  gridlines.push({
92337
92733
  kind: "line",
@@ -92649,13 +93045,26 @@ function buildChartViewModel(element) {
92649
93045
  const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0);
92650
93046
  const categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
92651
93047
  if (chartType === "ofPie") {
92652
- return withUserShapeOverlay(buildOfPieViewModel(element, chartData, categoryLabels), chartData);
93048
+ return withChartAreaFill(
93049
+ withUserShapeOverlay(buildOfPieViewModel(element, chartData, categoryLabels), chartData),
93050
+ chartData
93051
+ );
92653
93052
  }
92654
93053
  const flat = buildFlatViewModel(element, chartData, categoryLabels, kind);
92655
93054
  if (is3DChartType(chartType)) {
92656
- return withUserShapeOverlay(applyChart3DDepth(flat, chartType, chartData.view3D), chartData);
93055
+ return withChartAreaFill(
93056
+ withUserShapeOverlay(applyChart3DDepth(flat, chartType, chartData.view3D), chartData),
93057
+ chartData
93058
+ );
92657
93059
  }
92658
- return withUserShapeOverlay(flat, chartData);
93060
+ return withChartAreaFill(withUserShapeOverlay(flat, chartData), chartData);
93061
+ }
93062
+ function withChartAreaFill(vm, chartData) {
93063
+ return {
93064
+ ...vm,
93065
+ areaFill: chartAreaFill(chartData),
93066
+ plotFill: plotAreaFill(chartData)
93067
+ };
92659
93068
  }
92660
93069
  function withUserShapeOverlay(vm, chartData) {
92661
93070
  const overlay = buildChartUserShapeOverlay(chartData.userShapes, vm.svgWidth, vm.svgHeight);
@@ -92716,6 +93125,8 @@ function buildFallbackViewModel(width, height, label) {
92716
93125
  return {
92717
93126
  svgWidth,
92718
93127
  svgHeight,
93128
+ // No chart data to read a fill from, so the historical wash stands.
93129
+ areaFill: DEFAULT_CHART_AREA_FILL,
92719
93130
  title: void 0,
92720
93131
  titleX: svgWidth / 2,
92721
93132
  titleY: 14,
@@ -92787,7 +93198,8 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
92787
93198
  cy,
92788
93199
  outerR,
92789
93200
  position: chartData.style.dataLabels?.position,
92790
- showLeaderLines: chartData.style.dataLabels?.showLeaderLines
93201
+ showLeaderLines: chartData.style.dataLabels?.showLeaderLines,
93202
+ numberFormat: chartData.series[0]?.numberFormat
92791
93203
  });
92792
93204
  dataLabels.push(...labelResult.labels);
92793
93205
  primitives.push(...labelResult.leaderLines);
@@ -92906,7 +93318,7 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
92906
93318
  kind: "text",
92907
93319
  x: p.x,
92908
93320
  y: p.y - 8,
92909
- text: formatAxisValue2(val2),
93321
+ text: formatAxisValue2(val2, series.numberFormat),
92910
93322
  fontSize: 7,
92911
93323
  fill: "#334155",
92912
93324
  textAnchor: "middle"
@@ -93956,8 +94368,8 @@ function finalizeClickGroup(steps, options) {
93956
94368
  maxEnd = end;
93957
94369
  }
93958
94370
  }
93959
- const group = { steps, totalDurationMs: maxEnd };
93960
- return group;
94371
+ const group2 = { steps, totalDurationMs: maxEnd };
94372
+ return group2;
93961
94373
  }
93962
94374
  var CLICK_EVENTS = /* @__PURE__ */ new Set(["onClick", "onNext"]);
93963
94375
  var HOVER_EVENTS = /* @__PURE__ */ new Set(["onMouseOver"]);
@@ -94531,11 +94943,11 @@ function buildTimeline(nativeAnimations) {
94531
94943
  const isFirstAnimation = clickGroups.length === 0 && currentGroup.length === 0;
94532
94944
  if (isOnClick || isFirstAnimation) {
94533
94945
  if (currentGroup.length > 0) {
94534
- const group = finalizeClickGroup(currentGroup);
94946
+ const group2 = finalizeClickGroup(currentGroup);
94535
94947
  if (currentGroupAutoStart || !currentGroupIsClick && clickGroups.length > 0) {
94536
- group.autoAdvance = true;
94948
+ group2.autoAdvance = true;
94537
94949
  }
94538
- clickGroups.push(group);
94950
+ clickGroups.push(group2);
94539
94951
  }
94540
94952
  currentGroup = [];
94541
94953
  currentGroupIsClick = isOnClick || isFirstAnimation;
@@ -94579,15 +94991,15 @@ function buildTimeline(nativeAnimations) {
94579
94991
  }
94580
94992
  }
94581
94993
  if (currentGroup.length > 0) {
94582
- const group = finalizeClickGroup(currentGroup);
94994
+ const group2 = finalizeClickGroup(currentGroup);
94583
94995
  if (currentGroupAutoStart || !currentGroupIsClick && clickGroups.length > 0) {
94584
- group.autoAdvance = true;
94996
+ group2.autoAdvance = true;
94585
94997
  }
94586
- clickGroups.push(group);
94998
+ clickGroups.push(group2);
94587
94999
  }
94588
- for (const group of clickGroups) {
94589
- if (group.autoAdvance) {
94590
- group.autoAdvanceDelayMs = 0;
95000
+ for (const group2 of clickGroups) {
95001
+ if (group2.autoAdvance) {
95002
+ group2.autoAdvanceDelayMs = 0;
94591
95003
  }
94592
95004
  }
94593
95005
  const interactiveSequences = buildSequenceGroups(
@@ -94815,9 +95227,9 @@ var TimelineEngine = class _TimelineEngine {
94815
95227
  return null;
94816
95228
  }
94817
95229
  this.currentGroupIndex++;
94818
- const group = this.timeline.clickGroups[this.currentGroupIndex];
94819
- this.applyGroupSteps(group);
94820
- return group;
95230
+ const group2 = this.timeline.clickGroups[this.currentGroupIndex];
95231
+ this.applyGroupSteps(group2);
95232
+ return group2;
94821
95233
  }
94822
95234
  /**
94823
95235
  * Peek at the next click-group without advancing.
@@ -94929,9 +95341,9 @@ var TimelineEngine = class _TimelineEngine {
94929
95341
  return null;
94930
95342
  }
94931
95343
  this.interactiveGroupIndexes.set(triggerShapeId, nextIdx);
94932
- const group = groups[nextIdx];
94933
- this.applyGroupSteps(group);
94934
- return group;
95344
+ const group2 = groups[nextIdx];
95345
+ this.applyGroupSteps(group2);
95346
+ return group2;
94935
95347
  }
94936
95348
  /**
94937
95349
  * Advance the hover sequence for a given trigger shape.
@@ -94948,9 +95360,9 @@ var TimelineEngine = class _TimelineEngine {
94948
95360
  return null;
94949
95361
  }
94950
95362
  this.hoverGroupIndexes.set(triggerShapeId, nextIdx);
94951
- const group = groups[nextIdx];
94952
- this.applyGroupSteps(group);
94953
- return group;
95363
+ const group2 = groups[nextIdx];
95364
+ this.applyGroupSteps(group2);
95365
+ return group2;
94954
95366
  }
94955
95367
  /**
94956
95368
  * Reset the hover sequence for a given trigger shape so it can replay
@@ -94972,8 +95384,8 @@ var TimelineEngine = class _TimelineEngine {
94972
95384
  */
94973
95385
  completeAll() {
94974
95386
  this.reset();
94975
- for (const group of this.timeline.clickGroups) {
94976
- for (const step of group.steps) {
95387
+ for (const group2 of this.timeline.clickGroups) {
95388
+ for (const step of group2.steps) {
94977
95389
  if (step.build || step.colorTargets) {
94978
95390
  this.activeSteps.set(step.elementId, step);
94979
95391
  }
@@ -95002,8 +95414,8 @@ var TimelineEngine = class _TimelineEngine {
95002
95414
  /**
95003
95415
  * Apply a group's steps to the internal tracking state.
95004
95416
  */
95005
- applyGroupSteps(group) {
95006
- for (const step of group.steps) {
95417
+ applyGroupSteps(group2) {
95418
+ for (const step of group2.steps) {
95007
95419
  this.activeAnimations.set(step.elementId, step.cssAnimation);
95008
95420
  if (step.build || step.colorTargets) {
95009
95421
  this.activeSteps.set(step.elementId, step);
@@ -95576,9 +95988,9 @@ var PresentationAnimationController = class _PresentationAnimationController {
95576
95988
  * binding the group needs a requestAnimationFrame reveal loop; an empty result
95577
95989
  * means ordinary discrete click-advance is enough.
95578
95990
  */
95579
- static collectBuildStepIds(group) {
95991
+ static collectBuildStepIds(group2) {
95580
95992
  const ids = [];
95581
- for (const step of group.steps) {
95993
+ for (const step of group2.steps) {
95582
95994
  if (step.build) {
95583
95995
  ids.push(step.elementId);
95584
95996
  }
@@ -95645,8 +96057,8 @@ function findMediaElementByElementId(targetId, root) {
95645
96057
  }
95646
96058
  return void 0;
95647
96059
  }
95648
- function runMediaCommand(command, resolve) {
95649
- const el = resolve(command.targetId);
96060
+ function runMediaCommand(command, resolve2) {
96061
+ const el = resolve2(command.targetId);
95650
96062
  if (!el) {
95651
96063
  return false;
95652
96064
  }
@@ -96449,10 +96861,10 @@ function collectSections(entry2, tableData, pos2) {
96449
96861
  const isBottom = rowIndex === rowCount - 1;
96450
96862
  const isLeft = cellIndex === 0;
96451
96863
  const isRight = cellIndex === columnCount - 1;
96452
- const sections = [];
96864
+ const sections2 = [];
96453
96865
  const push2 = (borders, regionTop, regionBottom, regionLeft, regionRight) => {
96454
96866
  if (borders) {
96455
- sections.push({ borders, regionTop, regionBottom, regionLeft, regionRight });
96867
+ sections2.push({ borders, regionTop, regionBottom, regionLeft, regionRight });
96456
96868
  }
96457
96869
  };
96458
96870
  push2(entry2.wholeTblBorders, isTop, isBottom, isLeft, isRight);
@@ -96492,19 +96904,19 @@ function collectSections(entry2, tableData, pos2) {
96492
96904
  if (tableData.lastCol && isRight) {
96493
96905
  push2(entry2.lastColBorders, isTop, isBottom, true, true);
96494
96906
  }
96495
- return sections;
96907
+ return sections2;
96496
96908
  }
96497
- function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve) {
96909
+ function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve2) {
96498
96910
  if (!entry2) {
96499
96911
  return void 0;
96500
96912
  }
96501
- const sections = collectSections(entry2, tableData, pos2);
96502
- if (sections.length === 0) {
96913
+ const sections2 = collectSections(entry2, tableData, pos2);
96914
+ if (sections2.length === 0) {
96503
96915
  return void 0;
96504
96916
  }
96505
96917
  let tl2br;
96506
96918
  let bl2tr;
96507
- for (const section of sections) {
96919
+ for (const section of sections2) {
96508
96920
  if (section.borders.tl2br) {
96509
96921
  tl2br = section.borders.tl2br;
96510
96922
  }
@@ -96515,12 +96927,12 @@ function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve) {
96515
96927
  const info = {};
96516
96928
  let applied = false;
96517
96929
  if (tl2br && !tl2br.noFill) {
96518
- info.diagDownColor = tl2br.color ?? resolve(tl2br.fill) ?? "#000000";
96930
+ info.diagDownColor = tl2br.color ?? resolve2(tl2br.fill) ?? "#000000";
96519
96931
  info.diagDownWidth = tl2br.width ?? 1;
96520
96932
  applied = true;
96521
96933
  }
96522
96934
  if (bl2tr && !bl2tr.noFill) {
96523
- info.diagUpColor = bl2tr.color ?? resolve(bl2tr.fill) ?? "#000000";
96935
+ info.diagUpColor = bl2tr.color ?? resolve2(bl2tr.fill) ?? "#000000";
96524
96936
  info.diagUpWidth = bl2tr.width ?? 1;
96525
96937
  applied = true;
96526
96938
  }
@@ -97927,7 +98339,7 @@ function groupElements(elements, ids, groupId) {
97927
98339
  x: el.x - groupX,
97928
98340
  y: el.y - groupY
97929
98341
  }));
97930
- const group = {
98342
+ const group2 = {
97931
98343
  type: "group",
97932
98344
  id: groupId,
97933
98345
  name: "Group",
@@ -97946,7 +98358,7 @@ function groupElements(elements, ids, groupId) {
97946
98358
  }
97947
98359
  const result = [
97948
98360
  ...remaining.slice(0, adjustedIndex),
97949
- group,
98361
+ group2,
97950
98362
  ...remaining.slice(adjustedIndex)
97951
98363
  ];
97952
98364
  return { elements: result, groupId };
@@ -98178,38 +98590,38 @@ function resolveSlideId(slide, index) {
98178
98590
  const cSld = rawXml?.["p:sld"];
98179
98591
  return String(cSld?.["@_id"] || slide?.slideNumber || index + 1);
98180
98592
  }
98181
- function groupSlidesBySection(sections, slides) {
98593
+ function groupSlidesBySection(sections2, slides) {
98182
98594
  if (slides.length === 0) {
98183
98595
  return [];
98184
98596
  }
98185
- if (sections.length === 0) {
98597
+ if (sections2.length === 0) {
98186
98598
  return [
98187
98599
  { section: void 0, slides: [...slides], slideIndexes: slides.map((_slide, i) => i) }
98188
98600
  ];
98189
98601
  }
98190
- const sectionById = new Map(sections.map((section) => [section.id, section]));
98602
+ const sectionById = new Map(sections2.map((section) => [section.id, section]));
98191
98603
  const grouped = /* @__PURE__ */ new Map();
98192
98604
  const ungrouped = {
98193
98605
  section: void 0,
98194
98606
  slides: [],
98195
98607
  slideIndexes: []
98196
98608
  };
98197
- for (const section of sections) {
98609
+ for (const section of sections2) {
98198
98610
  grouped.set(section.id, { section, slides: [], slideIndexes: [] });
98199
98611
  }
98200
98612
  slides.forEach((slide, index) => {
98201
- const group = slide.sectionId ? grouped.get(slide.sectionId) : void 0;
98202
- const target = group && sectionById.has(slide.sectionId ?? "") ? group : ungrouped;
98613
+ const group2 = slide.sectionId ? grouped.get(slide.sectionId) : void 0;
98614
+ const target = group2 && sectionById.has(slide.sectionId ?? "") ? group2 : ungrouped;
98203
98615
  target.slides.push(slide);
98204
98616
  target.slideIndexes.push(index);
98205
98617
  });
98206
- const result = sections.map((section) => grouped.get(section.id)).filter((group) => group.slides.length > 0);
98618
+ const result = sections2.map((section) => grouped.get(section.id)).filter((group2) => group2.slides.length > 0);
98207
98619
  if (ungrouped.slides.length > 0) {
98208
98620
  result.push(ungrouped);
98209
98621
  }
98210
98622
  return result;
98211
98623
  }
98212
- function addSection(sections, slides, name, afterSlideIndex, idGenerator = generateSectionId) {
98624
+ function addSection(sections2, slides, name, afterSlideIndex, idGenerator = generateSectionId) {
98213
98625
  const newId = idGenerator();
98214
98626
  const slideAtIndex = slides[afterSlideIndex];
98215
98627
  const currentSectionId = slideAtIndex?.sectionId;
@@ -98224,9 +98636,9 @@ function addSection(sections, slides, name, afterSlideIndex, idGenerator = gener
98224
98636
  const nextSlides = slides.map(
98225
98637
  (s, i) => claimedSlideIndexes.includes(i) ? { ...s, sectionId: newId, sectionName: name } : s
98226
98638
  );
98227
- const insertIndex = currentSectionId !== void 0 ? sections.findIndex((sec) => sec.id === currentSectionId) + 1 : sections.length;
98639
+ const insertIndex = currentSectionId !== void 0 ? sections2.findIndex((sec) => sec.id === currentSectionId) + 1 : sections2.length;
98228
98640
  const newSectionSlideIds = claimedSlideIndexes.map((i) => resolveSlideId(slides[i], i));
98229
- const updated = sections.map(
98641
+ const updated = sections2.map(
98230
98642
  (sec) => sec.id === currentSectionId ? { ...sec, slideIds: sec.slideIds.filter((sid) => !newSectionSlideIds.includes(sid)) } : sec
98231
98643
  );
98232
98644
  const newSection = { id: newId, name, slideIds: newSectionSlideIds };
@@ -98234,20 +98646,20 @@ function addSection(sections, slides, name, afterSlideIndex, idGenerator = gener
98234
98646
  nextSections.splice(insertIndex, 0, newSection);
98235
98647
  return { sections: nextSections, slides: nextSlides };
98236
98648
  }
98237
- function renameSection(sections, slides, sectionId, newName) {
98649
+ function renameSection(sections2, slides, sectionId, newName) {
98238
98650
  return {
98239
- sections: sections.map((sec) => sec.id === sectionId ? { ...sec, name: newName } : sec),
98651
+ sections: sections2.map((sec) => sec.id === sectionId ? { ...sec, name: newName } : sec),
98240
98652
  slides: slides.map((s) => s.sectionId === sectionId ? { ...s, sectionName: newName } : s)
98241
98653
  };
98242
98654
  }
98243
- function deleteSection(sections, slides, sectionId) {
98244
- const idx = sections.findIndex((sec) => sec.id === sectionId);
98655
+ function deleteSection(sections2, slides, sectionId) {
98656
+ const idx = sections2.findIndex((sec) => sec.id === sectionId);
98245
98657
  if (idx === -1) {
98246
- return { sections, slides };
98658
+ return { sections: sections2, slides };
98247
98659
  }
98248
- const deletedSection = sections[idx];
98249
- const prevSection = idx > 0 ? sections[idx - 1] : void 0;
98250
- const filtered = sections.filter((sec) => sec.id !== sectionId);
98660
+ const deletedSection = sections2[idx];
98661
+ const prevSection = idx > 0 ? sections2[idx - 1] : void 0;
98662
+ const filtered = sections2.filter((sec) => sec.id !== sectionId);
98251
98663
  const nextSections = prevSection !== void 0 ? filtered.map(
98252
98664
  (sec) => sec.id === prevSection.id ? { ...sec, slideIds: [...sec.slideIds, ...deletedSection.slideIds] } : sec
98253
98665
  ) : filtered;
@@ -98262,34 +98674,34 @@ function deleteSection(sections, slides, sectionId) {
98262
98674
  });
98263
98675
  return { sections: nextSections, slides: nextSlides };
98264
98676
  }
98265
- function moveSectionUp(sections, sectionId) {
98266
- const idx = sections.findIndex((sec) => sec.id === sectionId);
98677
+ function moveSectionUp(sections2, sectionId) {
98678
+ const idx = sections2.findIndex((sec) => sec.id === sectionId);
98267
98679
  if (idx <= 0) {
98268
- return sections;
98680
+ return sections2;
98269
98681
  }
98270
- const next = [...sections];
98682
+ const next = [...sections2];
98271
98683
  [next[idx - 1], next[idx]] = [next[idx], next[idx - 1]];
98272
98684
  return next;
98273
98685
  }
98274
- function moveSectionDown(sections, sectionId) {
98275
- const idx = sections.findIndex((sec) => sec.id === sectionId);
98276
- if (idx === -1 || idx >= sections.length - 1) {
98277
- return sections;
98686
+ function moveSectionDown(sections2, sectionId) {
98687
+ const idx = sections2.findIndex((sec) => sec.id === sectionId);
98688
+ if (idx === -1 || idx >= sections2.length - 1) {
98689
+ return sections2;
98278
98690
  }
98279
- const next = [...sections];
98691
+ const next = [...sections2];
98280
98692
  [next[idx], next[idx + 1]] = [next[idx + 1], next[idx]];
98281
98693
  return next;
98282
98694
  }
98283
- function moveSlidesToSection(sections, slides, slideIndexes, targetSectionId) {
98284
- const targetSection = sections.find((sec) => sec.id === targetSectionId);
98695
+ function moveSlidesToSection(sections2, slides, slideIndexes, targetSectionId) {
98696
+ const targetSection = sections2.find((sec) => sec.id === targetSectionId);
98285
98697
  if (!targetSection) {
98286
- return { sections, slides };
98698
+ return { sections: sections2, slides };
98287
98699
  }
98288
98700
  const nextSlides = slides.map(
98289
98701
  (s, i) => slideIndexes.includes(i) ? { ...s, sectionId: targetSectionId, sectionName: targetSection.name } : s
98290
98702
  );
98291
98703
  const movedSlideIds = slideIndexes.map((i) => resolveSlideId(slides[i], i));
98292
- const nextSections = sections.map((sec) => {
98704
+ const nextSections = sections2.map((sec) => {
98293
98705
  if (sec.id === targetSectionId) {
98294
98706
  return {
98295
98707
  ...sec,
@@ -98864,7 +99276,7 @@ function buildTextBlockStyle(element, options = {}) {
98864
99276
  style.unicodeBidi = "plaintext";
98865
99277
  }
98866
99278
  style.fontSize = ts?.fontSize || DEFAULT_TEXT_FONT_SIZE;
98867
- style.fontFamily = ts?.fontFamily || DEFAULT_FONT_FAMILY;
99279
+ style.fontFamily = ts?.fontFamily ? getSubstituteFontFamily(ts.fontFamily, parsePanoseString(ts.latinFontPanose)) : DEFAULT_FONT_FAMILY;
98868
99280
  style.fontWeight = ts?.bold ? 700 : 400;
98869
99281
  style.fontStyle = ts?.italic ? "italic" : "normal";
98870
99282
  style.textDecorationLine = decorations.length > 0 ? decorations.join(" ") : "none";
@@ -99918,8 +100330,8 @@ function toAbsolute(child22, offsetX, offsetY) {
99918
100330
  function sameBox(a, b) {
99919
100331
  return Math.abs(a.x - b.x) <= 0.5 && Math.abs(a.y - b.y) <= 0.5 && Math.abs(a.width - b.width) <= 0.5 && Math.abs(a.height - b.height) <= 0.5;
99920
100332
  }
99921
- function correspondingGroup(group, candidates) {
99922
- const morphName = getElementMorphName(group);
100333
+ function correspondingGroup(group2, candidates) {
100334
+ const morphName = getElementMorphName(group2);
99923
100335
  return candidates.find((candidate) => {
99924
100336
  if (candidate.type !== "group") {
99925
100337
  return false;
@@ -99927,10 +100339,10 @@ function correspondingGroup(group, candidates) {
99927
100339
  if (morphName !== void 0 && getElementMorphName(candidate) === morphName) {
99928
100340
  return true;
99929
100341
  }
99930
- if (group.name && candidate.name === group.name) {
100342
+ if (group2.name && candidate.name === group2.name) {
99931
100343
  return true;
99932
100344
  }
99933
- return sameBox(group, candidate);
100345
+ return sameBox(group2, candidate);
99934
100346
  });
99935
100347
  }
99936
100348
  function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
@@ -106322,8 +106734,8 @@ async function loadOrbitControlsCtor() {
106322
106734
  }
106323
106735
  }
106324
106736
  function loadGltf(loader, url) {
106325
- return new Promise((resolve, reject) => {
106326
- loader.load(url, resolve, void 0, reject);
106737
+ return new Promise((resolve2, reject) => {
106738
+ loader.load(url, resolve2, void 0, reject);
106327
106739
  });
106328
106740
  }
106329
106741
  function centerAndFit(three, root) {
@@ -106790,9 +107202,9 @@ function isExportAbortError(err) {
106790
107202
  }
106791
107203
  var PPTX_OPEN_ACCEPT = ".pptx,.ppsx,.pptm,.potx";
106792
107204
  function openFilePicker(options = {}) {
106793
- return new Promise((resolve) => {
107205
+ return new Promise((resolve2) => {
106794
107206
  if (typeof document === "undefined") {
106795
- resolve(null);
107207
+ resolve2(null);
106796
107208
  return;
106797
107209
  }
106798
107210
  const input = document.createElement("input");
@@ -106808,7 +107220,7 @@ function openFilePicker(options = {}) {
106808
107220
  }
106809
107221
  settled = true;
106810
107222
  input.remove();
106811
- resolve(file);
107223
+ resolve2(file);
106812
107224
  };
106813
107225
  input.addEventListener("change", () => finish(input.files?.[0] ?? null));
106814
107226
  input.addEventListener("cancel", () => finish(null));
@@ -107375,7 +107787,7 @@ async function swapPresentationWindows(presenter, audience) {
107375
107787
  }
107376
107788
  }
107377
107789
  function openDeckDb() {
107378
- return new Promise((resolve, reject) => {
107790
+ return new Promise((resolve2, reject) => {
107379
107791
  const request = indexedDB.open(DB_NAME, DB_VERSION);
107380
107792
  request.onupgradeneeded = () => {
107381
107793
  const db = request.result;
@@ -107383,13 +107795,13 @@ function openDeckDb() {
107383
107795
  db.createObjectStore(STORE_NAME);
107384
107796
  }
107385
107797
  };
107386
- request.onsuccess = () => resolve(request.result);
107798
+ request.onsuccess = () => resolve2(request.result);
107387
107799
  request.onerror = () => reject(request.error);
107388
107800
  });
107389
107801
  }
107390
107802
  async function storePresentationDeck(sessionId, content) {
107391
107803
  const db = await openDeckDb();
107392
- return new Promise((resolve, reject) => {
107804
+ return new Promise((resolve2, reject) => {
107393
107805
  const tx = db.transaction(STORE_NAME, "readwrite");
107394
107806
  const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);
107395
107807
  tx.objectStore(STORE_NAME).put(
@@ -107398,7 +107810,7 @@ async function storePresentationDeck(sessionId, content) {
107398
107810
  );
107399
107811
  tx.oncomplete = () => {
107400
107812
  db.close();
107401
- resolve();
107813
+ resolve2();
107402
107814
  };
107403
107815
  tx.onerror = () => {
107404
107816
  db.close();
@@ -107409,17 +107821,17 @@ async function storePresentationDeck(sessionId, content) {
107409
107821
  async function loadPresentationDeck(sessionId) {
107410
107822
  try {
107411
107823
  const db = await openDeckDb();
107412
- return await new Promise((resolve, reject) => {
107824
+ return await new Promise((resolve2, reject) => {
107413
107825
  const request = db.transaction(STORE_NAME, "readonly").objectStore(STORE_NAME).get(sessionId);
107414
107826
  request.onsuccess = () => {
107415
107827
  db.close();
107416
107828
  const record = request.result;
107417
107829
  if (!record || Date.now() - record.createdAt > MAX_DECK_AGE_MS) {
107418
- resolve(null);
107830
+ resolve2(null);
107419
107831
  return;
107420
107832
  }
107421
107833
  const raw = record.bytes;
107422
- resolve(
107834
+ resolve2(
107423
107835
  raw instanceof Uint8Array ? raw : raw instanceof ArrayBuffer ? new Uint8Array(raw) : null
107424
107836
  );
107425
107837
  };
@@ -107435,16 +107847,16 @@ async function loadPresentationDeck(sessionId) {
107435
107847
  async function clearPresentationDeck(sessionId) {
107436
107848
  try {
107437
107849
  const db = await openDeckDb();
107438
- await new Promise((resolve) => {
107850
+ await new Promise((resolve2) => {
107439
107851
  const tx = db.transaction(STORE_NAME, "readwrite");
107440
107852
  tx.objectStore(STORE_NAME).delete(sessionId);
107441
107853
  tx.oncomplete = () => {
107442
107854
  db.close();
107443
- resolve();
107855
+ resolve2();
107444
107856
  };
107445
107857
  tx.onerror = () => {
107446
107858
  db.close();
107447
- resolve();
107859
+ resolve2();
107448
107860
  };
107449
107861
  });
107450
107862
  } catch {
@@ -107456,7 +107868,7 @@ var STORE_NAME2 = "content";
107456
107868
  var CONTENT_KEY = "pptx-bytes";
107457
107869
  var MAX_CONTENT_AGE_MS = 5 * 60 * 1e3;
107458
107870
  function openDb() {
107459
- return new Promise((resolve, reject) => {
107871
+ return new Promise((resolve2, reject) => {
107460
107872
  const request = indexedDB.open(DB_NAME2, DB_VERSION2);
107461
107873
  request.onupgradeneeded = () => {
107462
107874
  const db = request.result;
@@ -107464,7 +107876,7 @@ function openDb() {
107464
107876
  db.createObjectStore(STORE_NAME2);
107465
107877
  }
107466
107878
  };
107467
- request.onsuccess = () => resolve(request.result);
107879
+ request.onsuccess = () => resolve2(request.result);
107468
107880
  request.onerror = () => reject(request.error);
107469
107881
  });
107470
107882
  }
@@ -107473,7 +107885,7 @@ async function storeAudienceContent(content, sessionId) {
107473
107885
  return storePresentationDeck(sessionId, content);
107474
107886
  }
107475
107887
  const db = await openDb();
107476
- return new Promise((resolve, reject) => {
107888
+ return new Promise((resolve2, reject) => {
107477
107889
  const tx = db.transaction(STORE_NAME2, "readwrite");
107478
107890
  const store = tx.objectStore(STORE_NAME2);
107479
107891
  const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);
@@ -107481,7 +107893,7 @@ async function storeAudienceContent(content, sessionId) {
107481
107893
  store.put(record, CONTENT_KEY);
107482
107894
  tx.oncomplete = () => {
107483
107895
  db.close();
107484
- resolve();
107896
+ resolve2();
107485
107897
  };
107486
107898
  tx.onerror = () => {
107487
107899
  db.close();
@@ -107495,7 +107907,7 @@ async function loadAudienceContent(sessionId) {
107495
107907
  }
107496
107908
  try {
107497
107909
  const db = await openDb();
107498
- return new Promise((resolve, reject) => {
107910
+ return new Promise((resolve2, reject) => {
107499
107911
  const tx = db.transaction(STORE_NAME2, "readonly");
107500
107912
  const store = tx.objectStore(STORE_NAME2);
107501
107913
  const request = store.get(CONTENT_KEY);
@@ -107506,20 +107918,20 @@ async function loadAudienceContent(sessionId) {
107506
107918
  const record = result;
107507
107919
  const age = Date.now() - record.createdAt;
107508
107920
  if (age > MAX_CONTENT_AGE_MS) {
107509
- resolve(null);
107921
+ resolve2(null);
107510
107922
  return;
107511
107923
  }
107512
107924
  const raw = record.bytes;
107513
107925
  if (raw instanceof Uint8Array) {
107514
- resolve(raw);
107926
+ resolve2(raw);
107515
107927
  } else if (raw instanceof ArrayBuffer) {
107516
- resolve(new Uint8Array(raw));
107928
+ resolve2(new Uint8Array(raw));
107517
107929
  } else {
107518
- resolve(null);
107930
+ resolve2(null);
107519
107931
  }
107520
107932
  return;
107521
107933
  }
107522
- resolve(null);
107934
+ resolve2(null);
107523
107935
  };
107524
107936
  request.onerror = () => {
107525
107937
  db.close();
@@ -107536,17 +107948,17 @@ async function clearAudienceContent(sessionId) {
107536
107948
  }
107537
107949
  try {
107538
107950
  const db = await openDb();
107539
- return new Promise((resolve) => {
107951
+ return new Promise((resolve2) => {
107540
107952
  const tx = db.transaction(STORE_NAME2, "readwrite");
107541
107953
  const store = tx.objectStore(STORE_NAME2);
107542
107954
  store.delete(CONTENT_KEY);
107543
107955
  tx.oncomplete = () => {
107544
107956
  db.close();
107545
- resolve();
107957
+ resolve2();
107546
107958
  };
107547
107959
  tx.onerror = () => {
107548
107960
  db.close();
107549
- resolve();
107961
+ resolve2();
107550
107962
  };
107551
107963
  });
107552
107964
  } catch {
@@ -108101,19 +108513,19 @@ function groupElementParagraphs(element) {
108101
108513
  }
108102
108514
  return groups;
108103
108515
  }
108104
- function paragraphGroupText(group) {
108105
- return group.content.map((segment) => segment.isLineBreak ? " " : segment.text).join("");
108516
+ function paragraphGroupText(group2) {
108517
+ return group2.content.map((segment) => segment.isLineBreak ? " " : segment.text).join("");
108106
108518
  }
108107
- function paragraphGroupLevel(group) {
108108
- const first = group.marker ?? group.content[0];
108519
+ function paragraphGroupLevel(group2) {
108520
+ const first = group2.marker ?? group2.content[0];
108109
108521
  const level = first?.paragraphLevel;
108110
108522
  return typeof level === "number" && level > 0 ? Math.min(level, MAX_PARAGRAPH_LEVEL) : 0;
108111
108523
  }
108112
108524
  function readElementParagraphs(element) {
108113
108525
  const groups = groupElementParagraphs(element);
108114
- const paragraphs = groups.map((group) => ({
108115
- text: paragraphGroupText(group),
108116
- level: paragraphGroupLevel(group)
108526
+ const paragraphs = groups.map((group2) => ({
108527
+ text: paragraphGroupText(group2),
108528
+ level: paragraphGroupLevel(group2)
108117
108529
  }));
108118
108530
  let last = paragraphs.length - 1;
108119
108531
  while (last >= 0 && paragraphs[last].text.length === 0) {
@@ -108228,11 +108640,11 @@ function withLevel(segments, level) {
108228
108640
  return next;
108229
108641
  });
108230
108642
  }
108231
- function rebuildParagraph(group, donor, text2, elementStyle) {
108232
- if (group && paragraphGroupText(group) === text2) {
108233
- return [...group.marker ? [group.marker] : [], ...group.content];
108643
+ function rebuildParagraph(group2, donor, text2, elementStyle) {
108644
+ if (group2 && paragraphGroupText(group2) === text2) {
108645
+ return [...group2.marker ? [group2.marker] : [], ...group2.content];
108234
108646
  }
108235
- const source = group ?? donor;
108647
+ const source = group2 ?? donor;
108236
108648
  const marker = source?.marker ? [source.marker] : [];
108237
108649
  const content = remapTextToSegments(text2, source?.content, elementStyle);
108238
108650
  return [...marker, ...content];
@@ -109015,7 +109427,7 @@ function replacePixels(data, fromColor, toColor, threshold, toTransparent) {
109015
109427
  }
109016
109428
  var DEFAULT_COLOR_CHANGE_TOLERANCE = 12;
109017
109429
  function applyColorChange(imageDataUrl, fromHex, toHex22, tolerancePct = DEFAULT_COLOR_CHANGE_TOLERANCE, toTransparent = false) {
109018
- return new Promise((resolve, reject) => {
109430
+ return new Promise((resolve2, reject) => {
109019
109431
  const fromColor = parseHexToRgb(fromHex);
109020
109432
  const toColor = parseHexToRgb(toHex22);
109021
109433
  if (!fromColor || !toColor) {
@@ -109043,7 +109455,7 @@ function applyColorChange(imageDataUrl, fromHex, toHex22, tolerancePct = DEFAULT
109043
109455
  const threshold = toleranceToThreshold(tolerancePct);
109044
109456
  replacePixels(imageData.data, fromColor, toColor, threshold, toTransparent);
109045
109457
  ctx.putImageData(imageData, 0, 0);
109046
- resolve({
109458
+ resolve2({
109047
109459
  dataUrl: canvas.toDataURL("image/png"),
109048
109460
  width: w,
109049
109461
  height: h
@@ -109094,7 +109506,7 @@ function mapDuotonePixels(data, shadow, highlight) {
109094
109506
  }
109095
109507
  }
109096
109508
  function applyDuotone(imageDataUrl, shadowHex, highlightHex) {
109097
- return new Promise((resolve, reject) => {
109509
+ return new Promise((resolve2, reject) => {
109098
109510
  const shadow = parseHexToRgb(shadowHex);
109099
109511
  const highlight = parseHexToRgb(highlightHex);
109100
109512
  if (!shadow || !highlight) {
@@ -109121,7 +109533,7 @@ function applyDuotone(imageDataUrl, shadowHex, highlightHex) {
109121
109533
  const imageData = ctx.getImageData(0, 0, w, h);
109122
109534
  mapDuotonePixels(imageData.data, shadow, highlight);
109123
109535
  ctx.putImageData(imageData, 0, 0);
109124
- resolve({
109536
+ resolve2({
109125
109537
  dataUrl: canvas.toDataURL("image/png"),
109126
109538
  width: w,
109127
109539
  height: h
@@ -111210,7 +111622,7 @@ var AUTOSAVE_DB_NAME = "pptx-viewer-autosave";
111210
111622
  var AUTOSAVE_DB_VERSION = 1;
111211
111623
  var AUTOSAVE_STORE_NAME = "recoveryVersions";
111212
111624
  function openAutosaveDb() {
111213
- return new Promise((resolve, reject) => {
111625
+ return new Promise((resolve2, reject) => {
111214
111626
  const req = indexedDB.open(AUTOSAVE_DB_NAME, AUTOSAVE_DB_VERSION);
111215
111627
  req.onupgradeneeded = () => {
111216
111628
  const db = req.result;
@@ -111218,13 +111630,13 @@ function openAutosaveDb() {
111218
111630
  db.createObjectStore(AUTOSAVE_STORE_NAME, { keyPath: "key" });
111219
111631
  }
111220
111632
  };
111221
- req.onsuccess = () => resolve(req.result);
111633
+ req.onsuccess = () => resolve2(req.result);
111222
111634
  req.onerror = () => reject(req.error);
111223
111635
  });
111224
111636
  }
111225
111637
  async function deleteOldestAutosaveEntry() {
111226
111638
  const db = await openAutosaveDb();
111227
- return new Promise((resolve) => {
111639
+ return new Promise((resolve2) => {
111228
111640
  try {
111229
111641
  const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
111230
111642
  const store = tx.objectStore(AUTOSAVE_STORE_NAME);
@@ -111246,24 +111658,24 @@ async function deleteOldestAutosaveEntry() {
111246
111658
  };
111247
111659
  tx.oncomplete = () => {
111248
111660
  db.close();
111249
- resolve(oldestKey !== null);
111661
+ resolve2(oldestKey !== null);
111250
111662
  };
111251
111663
  tx.onerror = () => {
111252
111664
  db.close();
111253
- resolve(false);
111665
+ resolve2(false);
111254
111666
  };
111255
111667
  } catch {
111256
111668
  try {
111257
111669
  db.close();
111258
111670
  } catch {
111259
111671
  }
111260
- resolve(false);
111672
+ resolve2(false);
111261
111673
  }
111262
111674
  });
111263
111675
  }
111264
111676
  function putAutosaveRecord(filePath, data) {
111265
111677
  return openAutosaveDb().then(
111266
- (db) => new Promise((resolve, reject) => {
111678
+ (db) => new Promise((resolve2, reject) => {
111267
111679
  const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
111268
111680
  const store = tx.objectStore(AUTOSAVE_STORE_NAME);
111269
111681
  store.put({
@@ -111274,7 +111686,7 @@ function putAutosaveRecord(filePath, data) {
111274
111686
  });
111275
111687
  tx.oncomplete = () => {
111276
111688
  db.close();
111277
- resolve(true);
111689
+ resolve2(true);
111278
111690
  };
111279
111691
  tx.onerror = () => {
111280
111692
  db.close();
@@ -111285,23 +111697,23 @@ function putAutosaveRecord(filePath, data) {
111285
111697
  }
111286
111698
  async function getAutosaveSnapshot(filePath) {
111287
111699
  const db = await openAutosaveDb();
111288
- return new Promise((resolve) => {
111700
+ return new Promise((resolve2) => {
111289
111701
  const tx = db.transaction(AUTOSAVE_STORE_NAME, "readonly");
111290
111702
  const store = tx.objectStore(AUTOSAVE_STORE_NAME);
111291
111703
  const req = store.get(filePath);
111292
111704
  req.onsuccess = () => {
111293
111705
  db.close();
111294
- resolve(req.result);
111706
+ resolve2(req.result);
111295
111707
  };
111296
111708
  req.onerror = () => {
111297
111709
  db.close();
111298
- resolve(void 0);
111710
+ resolve2(void 0);
111299
111711
  };
111300
111712
  });
111301
111713
  }
111302
111714
  async function listAutosaveSnapshots() {
111303
111715
  const db = await openAutosaveDb();
111304
- return new Promise((resolve) => {
111716
+ return new Promise((resolve2) => {
111305
111717
  const results = [];
111306
111718
  try {
111307
111719
  const tx = db.transaction(AUTOSAVE_STORE_NAME, "readonly");
@@ -111317,42 +111729,42 @@ async function listAutosaveSnapshots() {
111317
111729
  };
111318
111730
  tx.oncomplete = () => {
111319
111731
  db.close();
111320
- resolve(results);
111732
+ resolve2(results);
111321
111733
  };
111322
111734
  tx.onerror = () => {
111323
111735
  db.close();
111324
- resolve([]);
111736
+ resolve2([]);
111325
111737
  };
111326
111738
  } catch {
111327
111739
  try {
111328
111740
  db.close();
111329
111741
  } catch {
111330
111742
  }
111331
- resolve([]);
111743
+ resolve2([]);
111332
111744
  }
111333
111745
  });
111334
111746
  }
111335
111747
  async function deleteAutosaveSnapshot(filePath) {
111336
111748
  const db = await openAutosaveDb();
111337
- return new Promise((resolve) => {
111749
+ return new Promise((resolve2) => {
111338
111750
  try {
111339
111751
  const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
111340
111752
  const store = tx.objectStore(AUTOSAVE_STORE_NAME);
111341
111753
  store.delete(filePath);
111342
111754
  tx.oncomplete = () => {
111343
111755
  db.close();
111344
- resolve(true);
111756
+ resolve2(true);
111345
111757
  };
111346
111758
  tx.onerror = () => {
111347
111759
  db.close();
111348
- resolve(false);
111760
+ resolve2(false);
111349
111761
  };
111350
111762
  } catch {
111351
111763
  try {
111352
111764
  db.close();
111353
111765
  } catch {
111354
111766
  }
111355
- resolve(false);
111767
+ resolve2(false);
111356
111768
  }
111357
111769
  });
111358
111770
  }
@@ -112185,17 +112597,17 @@ function shouldConfirmExternalHyperlink(options, href) {
112185
112597
  }
112186
112598
  return /^https?:/i.test(href);
112187
112599
  }
112188
- function toggle(group, key, labelKey, extra) {
112189
- return { kind: "toggle", group, key, labelKey, ...extra };
112600
+ function toggle(group2, key, labelKey, extra) {
112601
+ return { kind: "toggle", group: group2, key, labelKey, ...extra };
112190
112602
  }
112191
- function select(group, key, labelKey, choiceList) {
112192
- return { kind: "select", group, key, labelKey, choices: choiceList };
112603
+ function select(group2, key, labelKey, choiceList) {
112604
+ return { kind: "select", group: group2, key, labelKey, choices: choiceList };
112193
112605
  }
112194
- function numberControl(group, key, labelKey, min, max, unitKey) {
112195
- return { kind: "number", group, key, labelKey, min, max, unitKey };
112606
+ function numberControl(group2, key, labelKey, min, max, unitKey) {
112607
+ return { kind: "number", group: group2, key, labelKey, min, max, unitKey };
112196
112608
  }
112197
- function textControl(group, key, labelKey) {
112198
- return { kind: "text", group, key, labelKey, maxLength: 64 };
112609
+ function textControl(group2, key, labelKey) {
112610
+ return { kind: "text", group: group2, key, labelKey, maxLength: 64 };
112199
112611
  }
112200
112612
  function choices(prefix, values) {
112201
112613
  return values.map((value) => ({ value, labelKey: `${prefix}.${value}` }));
@@ -112677,17 +113089,17 @@ function createViewerOptionsStore(init) {
112677
113089
  return {
112678
113090
  getOptions: () => options,
112679
113091
  setOptions: (next) => commit(cloneOptions(next)),
112680
- setValue: (group, key, value) => {
112681
- const defaults = DEFAULT_VIEWER_OPTIONS[group];
113092
+ setValue: (group2, key, value) => {
113093
+ const defaults = DEFAULT_VIEWER_OPTIONS[group2];
112682
113094
  if (!(key in defaults) || typeof defaults[key] !== typeof value) {
112683
113095
  return;
112684
113096
  }
112685
113097
  const next = cloneOptions(options);
112686
- next[group][key] = value;
113098
+ next[group2][key] = value;
112687
113099
  commit(next);
112688
113100
  },
112689
- getValue: (group, key) => {
112690
- const record = options[group];
113101
+ getValue: (group2, key) => {
113102
+ const record = options[group2];
112691
113103
  const value = record[key];
112692
113104
  return typeof value === "boolean" || typeof value === "number" || typeof value === "string" ? value : void 0;
112693
113105
  },
@@ -112709,14 +113121,14 @@ function createViewerOptionsStore(init) {
112709
113121
  next.quickAccess.commandIds = [...commandIds];
112710
113122
  commit(next);
112711
113123
  },
112712
- reset: (group) => {
112713
- if (!group) {
113124
+ reset: (group2) => {
113125
+ if (!group2) {
112714
113126
  commit(cloneOptions(DEFAULT_VIEWER_OPTIONS));
112715
113127
  return;
112716
113128
  }
112717
113129
  const next = cloneOptions(options);
112718
113130
  const defaults = cloneOptions(DEFAULT_VIEWER_OPTIONS);
112719
- next[group] = defaults[group];
113131
+ next[group2] = defaults[group2];
112720
113132
  commit(next);
112721
113133
  },
112722
113134
  subscribe: (listener) => {
@@ -113666,7 +114078,7 @@ var VAR_DEPENDENT_PROPERTIES = [
113666
114078
  function resolveCustomProperties(root) {
113667
114079
  const elements = root.querySelectorAll("*");
113668
114080
  const view = root.ownerDocument?.defaultView ?? window;
113669
- const resolve = (el) => {
114081
+ const resolve2 = (el) => {
113670
114082
  const htmlEl = el;
113671
114083
  if (!htmlEl.style) {
113672
114084
  return;
@@ -113682,8 +114094,8 @@ function resolveCustomProperties(root) {
113682
114094
  }
113683
114095
  }
113684
114096
  };
113685
- resolve(root);
113686
- elements.forEach(resolve);
114097
+ resolve2(root);
114098
+ elements.forEach(resolve2);
113687
114099
  }
113688
114100
  function preprocessCssForCapture(root, options = {}) {
113689
114101
  const {
@@ -113721,9 +114133,9 @@ async function blobUrlToDataUrl(blobUrl) {
113721
114133
  try {
113722
114134
  const response = await fetch(blobUrl);
113723
114135
  const blob = await response.blob();
113724
- return await new Promise((resolve, reject) => {
114136
+ return await new Promise((resolve2, reject) => {
113725
114137
  const reader = new FileReader();
113726
- reader.onloadend = () => resolve(reader.result);
114138
+ reader.onloadend = () => resolve2(reader.result);
113727
114139
  reader.onerror = reject;
113728
114140
  reader.readAsDataURL(blob);
113729
114141
  });
@@ -113842,7 +114254,7 @@ var COMPLEX_COLOR_PROPERTIES = [
113842
114254
  ];
113843
114255
  function resolveUnsupportedColours(root) {
113844
114256
  const elements = root.querySelectorAll("*");
113845
- const resolve = (el) => {
114257
+ const resolve2 = (el) => {
113846
114258
  const htmlEl = el;
113847
114259
  if (!htmlEl.style) {
113848
114260
  return;
@@ -113872,8 +114284,8 @@ function resolveUnsupportedColours(root) {
113872
114284
  }
113873
114285
  }
113874
114286
  };
113875
- resolve(root);
113876
- elements.forEach(resolve);
114287
+ resolve2(root);
114288
+ elements.forEach(resolve2);
113877
114289
  }
113878
114290
  function resolveRootCustomProperties(doc) {
113879
114291
  const targets = [doc.documentElement, doc.body];
@@ -114601,6 +115013,7 @@ exports.canGoNext = canGoNext;
114601
115013
  exports.canGoPrevious = canGoPrevious;
114602
115014
  exports.canvasToJpegData = canvasToJpegData;
114603
115015
  exports.cell3DBevelCss = cell3DBevelCss;
115016
+ exports.chartAreaFill = chartAreaFill;
114604
115017
  exports.chartDataChangeType = chartDataChangeType;
114605
115018
  exports.chartPartToAttrs = chartPartToAttrs;
114606
115019
  exports.clampCropValue = clampCropValue;
@@ -114865,6 +115278,7 @@ exports.openUrlInNewTab = openUrlInNewTab;
114865
115278
  exports.paletteColor = paletteColor;
114866
115279
  exports.parseDrawingColor = parseDrawingColor;
114867
115280
  exports.parseDrawingColorOpacity = parseDrawingColorOpacity;
115281
+ exports.parsePanoseString = parsePanoseString;
114868
115282
  exports.parsePpactionUrl = parsePpactionUrl;
114869
115283
  exports.pickSupportedMimeType = pickSupportedMimeType;
114870
115284
  exports.placeAudienceWindow = placeAudienceWindow;