ooxml-ui 1.49.1 → 1.50.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 (132) hide show
  1. package/README.md +10 -2
  2. package/dist/{chunk-3WJUMM5D.js → chunk-63ELC26U.js} +1 -1
  3. package/dist/docx/building-blocks-read-aloud.d.ts +24 -0
  4. package/dist/docx/building-blocks.d.ts +5 -0
  5. package/dist/docx/editor-core.d.ts +3 -0
  6. package/dist/docx/element-api.d.ts +7 -0
  7. package/dist/docx/index.d.ts +2 -0
  8. package/dist/docx/read-aloud-session.d.ts +39 -0
  9. package/dist/docx/read-aloud.d.ts +14 -1
  10. package/dist/docx/view-options.d.ts +3 -0
  11. package/dist/docx.js +272 -154
  12. package/dist/image-native-size.d.ts +1 -0
  13. package/dist/index.js +2 -2
  14. package/dist/pptx/{chunk-WBGU7BWD.cjs → chunk-2JR2CHTG.cjs} +31 -1
  15. package/dist/pptx/{chunk-UFJBHFSD.cjs → chunk-3JGYWDMR.cjs} +5 -0
  16. package/dist/pptx/{chunk-URAPHGDB.cjs → chunk-3YKUOEZ5.cjs} +42 -42
  17. package/dist/pptx/{chunk-ZFZNX62I.mjs → chunk-74ESWHDZ.mjs} +1 -1
  18. package/dist/pptx/{chunk-PJQNDNOH.cjs → chunk-N7RS46HM.cjs} +2412 -483
  19. package/dist/pptx/{chunk-ZZJ7KTSD.mjs → chunk-OWXWCDNG.mjs} +2320 -483
  20. package/dist/pptx/{chunk-PTIGQSTY.mjs → chunk-QYBBLVGY.mjs} +31 -1
  21. package/dist/pptx/{chunk-2P6TH4ZE.mjs → chunk-VOBKKF45.mjs} +5 -0
  22. package/dist/pptx/dom/index.cjs +375 -375
  23. package/dist/pptx/dom/index.mjs +7 -7
  24. package/dist/pptx/i18n/index.cjs +6 -6
  25. package/dist/pptx/i18n/index.mjs +1 -1
  26. package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
  27. package/dist/pptx/index.cjs +3443 -3075
  28. package/dist/pptx/index.mjs +3 -3
  29. package/dist/pptx/render/building-block-actions.d.ts +106 -0
  30. package/dist/pptx/render/building-block-actions.d.ts.map +1 -0
  31. package/dist/pptx/render/building-block-custom-shows.d.ts +74 -0
  32. package/dist/pptx/render/building-block-custom-shows.d.ts.map +1 -0
  33. package/dist/pptx/render/building-block-document-properties.d.ts +78 -0
  34. package/dist/pptx/render/building-block-document-properties.d.ts.map +1 -0
  35. package/dist/pptx/render/building-block-font-embedding.d.ts +42 -0
  36. package/dist/pptx/render/building-block-font-embedding.d.ts.map +1 -0
  37. package/dist/pptx/render/building-block-password.d.ts +71 -0
  38. package/dist/pptx/render/building-block-password.d.ts.map +1 -0
  39. package/dist/pptx/render/building-block-show-dialogs.d.ts +61 -0
  40. package/dist/pptx/render/building-block-show-dialogs.d.ts.map +1 -0
  41. package/dist/pptx/render/building-block-show-settings.d.ts +61 -0
  42. package/dist/pptx/render/building-block-show-settings.d.ts.map +1 -0
  43. package/dist/pptx/render/building-block-signatures.d.ts +68 -0
  44. package/dist/pptx/render/building-block-signatures.d.ts.map +1 -0
  45. package/dist/pptx/render/building-blocks/action-groups.d.ts +61 -0
  46. package/dist/pptx/render/building-blocks/action-groups.d.ts.map +1 -0
  47. package/dist/pptx/render/building-blocks/actions-types.d.ts +110 -0
  48. package/dist/pptx/render/building-blocks/actions-types.d.ts.map +1 -0
  49. package/dist/pptx/render/building-blocks/find-bar-controller.d.ts +18 -0
  50. package/dist/pptx/render/building-blocks/find-bar-controller.d.ts.map +1 -0
  51. package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts +20 -0
  52. package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts.map +1 -0
  53. package/dist/pptx/render/building-blocks/find-layout.d.ts +62 -0
  54. package/dist/pptx/render/building-blocks/find-layout.d.ts.map +1 -0
  55. package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts +45 -0
  56. package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts.map +1 -0
  57. package/dist/pptx/render/building-blocks/groups/index.d.ts +25 -0
  58. package/dist/pptx/render/building-blocks/groups/index.d.ts.map +1 -0
  59. package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts +79 -0
  60. package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts.map +1 -0
  61. package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts +57 -0
  62. package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts.map +1 -0
  63. package/dist/pptx/render/building-blocks/index.d.ts +19 -0
  64. package/dist/pptx/render/building-blocks/index.d.ts.map +1 -0
  65. package/dist/pptx/render/building-blocks/media-element-from-file.d.ts +23 -0
  66. package/dist/pptx/render/building-blocks/media-element-from-file.d.ts.map +1 -0
  67. package/dist/pptx/render/building-blocks/mode.d.ts +11 -0
  68. package/dist/pptx/render/building-blocks/mode.d.ts.map +1 -0
  69. package/dist/pptx/render/building-blocks/requests.d.ts +96 -0
  70. package/dist/pptx/render/building-blocks/requests.d.ts.map +1 -0
  71. package/dist/pptx/render/building-blocks/session.d.ts +84 -0
  72. package/dist/pptx/render/building-blocks/session.d.ts.map +1 -0
  73. package/dist/pptx/render/building-blocks/toolbar.d.ts +56 -0
  74. package/dist/pptx/render/building-blocks/toolbar.d.ts.map +1 -0
  75. package/dist/pptx/render/controller/index.d.ts +4 -0
  76. package/dist/pptx/render/controller/index.d.ts.map +1 -1
  77. package/dist/pptx/render/controller/ribbon-display-controller.d.ts +80 -0
  78. package/dist/pptx/render/controller/ribbon-display-controller.d.ts.map +1 -0
  79. package/dist/pptx/render/controller/save-revision.d.ts +83 -0
  80. package/dist/pptx/render/controller/save-revision.d.ts.map +1 -0
  81. package/dist/pptx/render/editor-chrome/ribbon-css.d.ts +1 -1
  82. package/dist/pptx/render/editor-chrome/ribbon-css.d.ts.map +1 -1
  83. package/dist/pptx/render/font-catalog.cjs +3 -3
  84. package/dist/pptx/render/font-catalog.d.ts +27 -3
  85. package/dist/pptx/render/font-catalog.d.ts.map +1 -1
  86. package/dist/pptx/render/font-catalog.mjs +1 -1
  87. package/dist/pptx/render/index.d.ts +12 -0
  88. package/dist/pptx/render/index.d.ts.map +1 -1
  89. package/dist/pptx/render/insert-chart.d.ts +12 -0
  90. package/dist/pptx/render/insert-chart.d.ts.map +1 -1
  91. package/dist/pptx/render/read-only-recommendation.d.ts +2 -0
  92. package/dist/pptx/render/read-only-recommendation.d.ts.map +1 -1
  93. package/dist/pptx/render/ribbon-display.d.ts +50 -0
  94. package/dist/pptx/render/ribbon-display.d.ts.map +1 -0
  95. package/dist/pptx/render/ribbon-home-state-extras.d.ts.map +1 -1
  96. package/dist/pptx/render/stage-element-ids.d.ts +9 -0
  97. package/dist/pptx/render/stage-element-ids.d.ts.map +1 -1
  98. package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
  99. package/dist/pptx/render/viewer-zoom-store.d.ts.map +1 -1
  100. package/dist/pptx/render/viewport-navigation.d.ts +93 -0
  101. package/dist/pptx/render/viewport-navigation.d.ts.map +1 -0
  102. package/dist/pptx/render/zoom-step.d.ts +9 -2
  103. package/dist/pptx/render/zoom-step.d.ts.map +1 -1
  104. package/dist/pptx/{smartart-insert-preview-WYVZOCHF.cjs → smartart-insert-preview-WPIGM6UQ.cjs} +5 -5
  105. package/dist/pptx/{smartart-insert-preview-WXVMLDH4.mjs → smartart-insert-preview-ZHDQ5QDD.mjs} +4 -4
  106. package/dist/pptx/types.d.ts +20 -0
  107. package/dist/pptx/types.d.ts.map +1 -1
  108. package/dist/ribbon/color-preview.d.ts +0 -1
  109. package/dist/teams.js +1 -1
  110. package/dist/theme.d.ts +1 -0
  111. package/dist/visio/controller.d.ts +11 -0
  112. package/dist/visio/index.d.ts +1 -0
  113. package/dist/visio/text-edit-outcome.d.ts +41 -0
  114. package/dist/visio/viewer-inline-text.d.ts +7 -0
  115. package/dist/visio.js +133 -10
  116. package/dist/xlsx/building-blocks.d.ts +24 -0
  117. package/dist/xlsx/commands/test-support.d.ts +1 -0
  118. package/dist/xlsx/component.d.ts +7 -0
  119. package/dist/xlsx/context-menu/host-api.d.ts +55 -0
  120. package/dist/xlsx/context-menu/menu.d.ts +9 -0
  121. package/dist/xlsx/dialogs/find-replace.d.ts +2 -4
  122. package/dist/xlsx/editor-core.d.ts +2 -0
  123. package/dist/xlsx/host-find.d.ts +3 -0
  124. package/dist/xlsx/host-function.d.ts +3 -0
  125. package/dist/xlsx/host-open.d.ts +10 -0
  126. package/dist/xlsx/host-workflows.d.ts +9 -0
  127. package/dist/xlsx/index.d.ts +1 -0
  128. package/dist/xlsx/surface-actions.d.ts +20 -4
  129. package/dist/xlsx/surface-workflows.d.ts +132 -0
  130. package/dist/xlsx.js +539 -201
  131. package/package.json +2 -2
  132. /package/dist/{chunk-XWGWPYG5.js → chunk-BY7X2LNM.js} +0 -0
@@ -7,7 +7,7 @@ var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
7
7
  var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
8
8
  var chunkXFQ2RD4I_cjs = require('./chunk-XFQ2RD4I.cjs');
9
9
  var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
10
- var chunkWBGU7BWD_cjs = require('./chunk-WBGU7BWD.cjs');
10
+ var chunk2JR2CHTG_cjs = require('./chunk-2JR2CHTG.cjs');
11
11
  var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
12
12
  var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
13
13
  var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
@@ -24,7 +24,7 @@ var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
24
24
  var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
25
25
  var chunkXZSGVMRN_cjs = require('./chunk-XZSGVMRN.cjs');
26
26
  var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
27
- var chunkUFJBHFSD_cjs = require('./chunk-UFJBHFSD.cjs');
27
+ var chunk3JGYWDMR_cjs = require('./chunk-3JGYWDMR.cjs');
28
28
  var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
29
29
  var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
30
30
  var pptx = require('ooxml-core/pptx');
@@ -5099,8 +5099,8 @@ function createGlyphOutlineLookup(cache3) {
5099
5099
 
5100
5100
  // src/pptx/render/text-warp-outline-font-cache.ts
5101
5101
  function toArrayBuffer(bytes) {
5102
- const copy = bytes.slice();
5103
- return copy.buffer;
5102
+ const copy2 = bytes.slice();
5103
+ return copy2.buffer;
5104
5104
  }
5105
5105
  function primaryFontFamily(family2) {
5106
5106
  const first = family2.split(",")[0] ?? family2;
@@ -24904,6 +24904,119 @@ function newEquationElement(x = DEFAULT_X, y = EQUATION_DEFAULT_Y) {
24904
24904
  ]
24905
24905
  };
24906
24906
  }
24907
+
24908
+ // src/pptx/render/ribbon-display.ts
24909
+ var RIBBON_DISPLAY_MODES = ["fullScreen", "tabs", "always"];
24910
+ var DEFAULT_RIBBON_DISPLAY_MODE = "always";
24911
+ var LABEL_KEYS = {
24912
+ fullScreen: "pptx.ribbon.display.fullScreen",
24913
+ tabs: "pptx.ribbon.display.tabs",
24914
+ always: "pptx.ribbon.display.always"
24915
+ };
24916
+ var RIBBON_DISPLAY_OPTIONS_LABEL_KEY = "pptx.ribbon.displayOptions";
24917
+ var RIBBON_DISPLAY_REVEAL_LABEL_KEY = "pptx.ribbon.showRibbon";
24918
+ function normalizeRibbonDisplayMode(value) {
24919
+ return RIBBON_DISPLAY_MODES.includes(value) ? value : DEFAULT_RIBBON_DISPLAY_MODE;
24920
+ }
24921
+ function ribbonDisplayMenu(current) {
24922
+ return RIBBON_DISPLAY_MODES.map((mode) => ({
24923
+ mode,
24924
+ labelKey: LABEL_KEYS[mode],
24925
+ checked: mode === current
24926
+ }));
24927
+ }
24928
+ function toggleRibbonCollapsed(mode) {
24929
+ return mode === "always" ? "tabs" : "always";
24930
+ }
24931
+ function ribbonDisplayLayout(mode, peek) {
24932
+ if (mode === "always") return { titleBar: true, tabs: true, commands: "docked", reveal: false };
24933
+ if (mode === "tabs")
24934
+ return { titleBar: true, tabs: true, commands: peek ? "overlay" : "hidden", reveal: false };
24935
+ return { titleBar: false, tabs: peek, commands: peek ? "overlay" : "hidden", reveal: !peek };
24936
+ }
24937
+
24938
+ // src/pptx/render/controller/ribbon-display-controller.ts
24939
+ var RIBBON_AUTO_COLLAPSE_MEDIA = "(max-height: 500px)";
24940
+ function derive(inputs) {
24941
+ const automatic = inputs.mode === "always" && inputs.autoCollapse && inputs.shortViewport && !inputs.chosen;
24942
+ const effectiveMode = automatic ? "tabs" : inputs.mode;
24943
+ const peek = effectiveMode === "always" ? false : inputs.peek;
24944
+ return {
24945
+ mode: inputs.mode,
24946
+ effectiveMode,
24947
+ peek,
24948
+ menuOpen: inputs.menuOpen,
24949
+ layout: ribbonDisplayLayout(effectiveMode, peek),
24950
+ menu: ribbonDisplayMenu(effectiveMode)
24951
+ };
24952
+ }
24953
+ function createRibbonDisplayController(options = {}) {
24954
+ let inputs = {
24955
+ mode: normalizeRibbonDisplayMode(options.initial),
24956
+ peek: false,
24957
+ menuOpen: false,
24958
+ autoCollapse: false,
24959
+ shortViewport: false,
24960
+ chosen: false
24961
+ };
24962
+ const store = chunk3RIGT7H6_cjs.createControllerStore(derive(inputs));
24963
+ const commit = (patch) => {
24964
+ const next2 = { ...inputs, ...patch };
24965
+ if (Object.keys(next2).every((key) => next2[key] === inputs[key])) {
24966
+ return;
24967
+ }
24968
+ inputs = next2;
24969
+ store.set(derive(inputs));
24970
+ };
24971
+ const choose = (mode) => {
24972
+ const changed = mode !== store.getSnapshot().effectiveMode;
24973
+ commit({ mode, chosen: true, peek: false, menuOpen: false });
24974
+ if (changed) {
24975
+ options.onChange?.(mode);
24976
+ }
24977
+ };
24978
+ const dismiss = () => commit({ peek: false, menuOpen: false });
24979
+ return {
24980
+ getSnapshot: store.getSnapshot,
24981
+ subscribe: store.subscribe,
24982
+ setMode: (mode) => commit({ mode: normalizeRibbonDisplayMode(mode), peek: false, menuOpen: false }),
24983
+ choose,
24984
+ toggleCollapsed: () => choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode)),
24985
+ tabChosen(tab) {
24986
+ if (tab !== "file" && store.getSnapshot().effectiveMode === "tabs") {
24987
+ commit({ peek: true });
24988
+ }
24989
+ },
24990
+ reveal() {
24991
+ if (store.getSnapshot().effectiveMode === "fullScreen") {
24992
+ commit({ peek: true });
24993
+ }
24994
+ },
24995
+ dismiss,
24996
+ setMenuOpen: (open) => commit({ menuOpen: open }),
24997
+ toggleMenu: () => commit({ menuOpen: !inputs.menuOpen }),
24998
+ // Changing the setting is a fresh instruction: it applies again even after the user
24999
+ // picked a mode by hand.
25000
+ setAutoCollapse: (enabled) => commit({
25001
+ autoCollapse: enabled,
25002
+ chosen: enabled === inputs.autoCollapse ? inputs.chosen : false
25003
+ }),
25004
+ setShortViewport: (short) => commit({ shortViewport: short }),
25005
+ handleKeydown(event) {
25006
+ if (event.key === "F1" && event.ctrlKey) {
25007
+ event.preventDefault();
25008
+ choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode));
25009
+ return true;
25010
+ }
25011
+ const { peek, menuOpen } = store.getSnapshot();
25012
+ if (event.key === "Escape" && (peek || menuOpen)) {
25013
+ dismiss();
25014
+ return true;
25015
+ }
25016
+ return false;
25017
+ }
25018
+ };
25019
+ }
24907
25020
  function clampDepth(depth) {
24908
25021
  const value = depth ?? editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
24909
25022
  return Number.isFinite(value) ? Math.max(1, Math.floor(value)) : editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
@@ -27127,6 +27240,49 @@ function withSaveProgress(storage, controller) {
27127
27240
  }
27128
27241
  });
27129
27242
  }
27243
+
27244
+ // src/pptx/render/controller/save-revision.ts
27245
+ function createSaveRevisionController(deps) {
27246
+ let revision = 0;
27247
+ let mark;
27248
+ let savedRevision = 0;
27249
+ const observe = () => {
27250
+ const sources = deps.getSources();
27251
+ if (sources.length === 0 || autosaveSourcesChanged(mark, sources)) {
27252
+ revision += 1;
27253
+ mark = autosaveSnapshotMark("", sources);
27254
+ }
27255
+ return revision;
27256
+ };
27257
+ return {
27258
+ getRevision: observe,
27259
+ getSavedRevision: () => savedRevision,
27260
+ async snapshot() {
27261
+ const at = observe();
27262
+ const content = await deps.serialize();
27263
+ return { revision: at, content };
27264
+ },
27265
+ acknowledge(acknowledged) {
27266
+ const current = observe();
27267
+ if (!Number.isInteger(acknowledged) || acknowledged < 1 || acknowledged > current) {
27268
+ return { status: "unknown", revision: acknowledged };
27269
+ }
27270
+ if (acknowledged < savedRevision) {
27271
+ return { status: "stale", revision: acknowledged, savedRevision };
27272
+ }
27273
+ const repeated = acknowledged === savedRevision;
27274
+ savedRevision = acknowledged;
27275
+ if (acknowledged !== current) {
27276
+ return { status: "pending", revision: acknowledged, currentRevision: current };
27277
+ }
27278
+ deps.markClean();
27279
+ if (!repeated) {
27280
+ deps.discardRecovery();
27281
+ }
27282
+ return { status: "clean", revision: acknowledged };
27283
+ }
27284
+ };
27285
+ }
27130
27286
  var TEMPLATE_REF_WIDTH_EMU = 12192e3;
27131
27287
  var TEMPLATE_REF_HEIGHT_EMU = 6858e3;
27132
27288
  var DEFAULT_SLIDE_WIDTH_PX = 1280;
@@ -27168,7 +27324,7 @@ function createTemplateContext(options = {}) {
27168
27324
  const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
27169
27325
  let counter = 0;
27170
27326
  const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
27171
- const dictionary = chunkUFJBHFSD_cjs.translationsEn;
27327
+ const dictionary = chunk3JGYWDMR_cjs.translationsEn;
27172
27328
  const translate2 = options.translate ?? ((key) => dictionary[key] ?? key);
27173
27329
  return {
27174
27330
  scheme,
@@ -37278,10 +37434,10 @@ function buildMorphTextBodyPlan(pairs, context3, durationMs, measure2) {
37278
37434
  plan.parts.set(outgoingId, part2);
37279
37435
  plan.parts.set(incomingId, part2);
37280
37436
  const body = part2 === "body";
37281
- const copy = body ? morphBodyCopy : morphTextCopy;
37437
+ const copy2 = body ? morphBodyCopy : morphTextCopy;
37282
37438
  plan.groups.push({
37283
- outgoing: copy(body ? from : upright.from, outgoingId),
37284
- incoming: copy(body ? to : upright.to, incomingId)
37439
+ outgoing: copy2(body ? from : upright.from, outgoingId),
37440
+ incoming: copy2(body ? to : upright.to, incomingId)
37285
37441
  });
37286
37442
  }
37287
37443
  }
@@ -48027,18 +48183,18 @@ function recordLiveColorLeaves(leaves, value, patch) {
48027
48183
  }
48028
48184
  function writeLeaf(container, path, leaf) {
48029
48185
  const [head, ...rest] = path;
48030
- const copy = Array.isArray(container) ? [...container] : { ...isContainer(container) ? container : {} };
48031
- const record = copy;
48186
+ const copy2 = Array.isArray(container) ? [...container] : { ...isContainer(container) ? container : {} };
48187
+ const record = copy2;
48032
48188
  if (rest.length > 0) {
48033
48189
  record[head] = writeLeaf(record[head], rest, leaf);
48034
48190
  } else if (leaf.present) {
48035
48191
  record[head] = leaf.value;
48036
- } else if (Array.isArray(copy)) {
48192
+ } else if (Array.isArray(copy2)) {
48037
48193
  record[head] = void 0;
48038
48194
  } else {
48039
48195
  delete record[head];
48040
48196
  }
48041
- return copy;
48197
+ return copy2;
48042
48198
  }
48043
48199
  function isEmptyContainer(value) {
48044
48200
  return isContainer(value) && Object.keys(value).length === 0;
@@ -49098,9 +49254,9 @@ var mintObjectUrl = (bytes, mime) => {
49098
49254
  if (!hasObjectUrlSupport()) {
49099
49255
  return null;
49100
49256
  }
49101
- const copy = new Uint8Array(bytes.length);
49102
- copy.set(bytes);
49103
- return URL.createObjectURL(new Blob([copy], { type: mime }));
49257
+ const copy2 = new Uint8Array(bytes.length);
49258
+ copy2.set(bytes);
49259
+ return URL.createObjectURL(new Blob([copy2], { type: mime }));
49104
49260
  };
49105
49261
  function createEmbeddedFontsSheet(doc, styleId) {
49106
49262
  let liveUrls = [];
@@ -50528,7 +50684,7 @@ function createViewerCommandStore(initial, reduce) {
50528
50684
 
50529
50685
  // src/pptx/render/zoom-step.ts
50530
50686
  var ZOOM_STEP = 0.1;
50531
- var MIN_ZOOM_SCALE = 0.2;
50687
+ var MIN_ZOOM_SCALE = 0.1;
50532
50688
  var MAX_ZOOM_SCALE = 5;
50533
50689
  function roundZoom(scale3) {
50534
50690
  return Math.round(scale3 * 100) / 100;
@@ -50560,8 +50716,14 @@ var DEFAULT_VIEWER_ZOOM_STATE = {
50560
50716
  fitScale: 1,
50561
50717
  manual: false
50562
50718
  };
50719
+ function atFit(state) {
50720
+ return state.zoom === 1 && !state.manual ? state : { ...state, zoom: 1, manual: false };
50721
+ }
50563
50722
  function withZoom(state, zoom) {
50564
50723
  const clamped = clampZoomScale(zoom);
50724
+ if (clamped === 1) {
50725
+ return atFit(state);
50726
+ }
50565
50727
  if (clamped === state.zoom && state.manual) {
50566
50728
  return state;
50567
50729
  }
@@ -50576,7 +50738,7 @@ function reduceViewerZoom(state, command2) {
50576
50738
  case "set-zoom":
50577
50739
  return withZoom(state, command2.zoom);
50578
50740
  case "zoom-to-fit":
50579
- return state.zoom === 1 && !state.manual ? state : { ...state, zoom: 1, manual: false };
50741
+ return atFit(state);
50580
50742
  case "set-fit-scale": {
50581
50743
  const fitScale = Number.isFinite(command2.fitScale) && command2.fitScale > 0 ? command2.fitScale : 1;
50582
50744
  return fitScale === state.fitScale ? state : { ...state, fitScale };
@@ -50598,6 +50760,344 @@ function viewerZoomPercent(zoom) {
50598
50760
  return Math.round(zoom * 100);
50599
50761
  }
50600
50762
 
50763
+ // src/pptx/render/viewport-navigation.ts
50764
+ var VIEWPORT_STAGE_SELECTOR = '[aria-roledescription="slide"]';
50765
+ var DRAG_PAN_THRESHOLD_PX = 4;
50766
+ var MAX_LAYOUT_FRAMES = 6;
50767
+ var ANCHOR_REUSE_MS = 400;
50768
+ var ANCHOR_REUSE_DISTANCE_PX = 2;
50769
+ function zoomAnchorAt(stage, clientX, clientY) {
50770
+ if (!(stage.width > 0) || !(stage.height > 0)) {
50771
+ return null;
50772
+ }
50773
+ return {
50774
+ fx: (clientX - stage.left) / stage.width,
50775
+ fy: (clientY - stage.top) / stage.height,
50776
+ clientX,
50777
+ clientY
50778
+ };
50779
+ }
50780
+ function anchoredScrollPosition(scroll, stage, anchor) {
50781
+ return {
50782
+ left: scroll.left + stage.left + anchor.fx * stage.width - anchor.clientX,
50783
+ top: scroll.top + stage.top + anchor.fy * stage.height - anchor.clientY
50784
+ };
50785
+ }
50786
+ function viewportCanPan(viewport) {
50787
+ return viewport.scrollWidth > viewport.clientWidth || viewport.scrollHeight > viewport.clientHeight;
50788
+ }
50789
+ function resetViewportScroll(viewport) {
50790
+ viewport.scrollLeft = 0;
50791
+ viewport.scrollTop = 0;
50792
+ }
50793
+ var SPACE_OWNER_SELECTOR = [
50794
+ "input",
50795
+ "textarea",
50796
+ "select",
50797
+ "button",
50798
+ "a[href]",
50799
+ // Space toggles a disclosure and plays or pauses media with native controls.
50800
+ "summary",
50801
+ "video[controls]",
50802
+ "audio[controls]",
50803
+ '[role="button"]',
50804
+ '[role="checkbox"]',
50805
+ '[role="combobox"]',
50806
+ '[role="menuitem"]',
50807
+ '[role="menuitemcheckbox"]',
50808
+ '[role="menuitemradio"]',
50809
+ '[role="option"]',
50810
+ '[role="radio"]',
50811
+ '[role="searchbox"]',
50812
+ '[role="switch"]',
50813
+ '[role="tab"]',
50814
+ '[role="textbox"]'
50815
+ ].join(",");
50816
+ function eventOwnsSpaceKey(event) {
50817
+ return targetOwnsSpaceKey(event.composedPath?.()[0] ?? event.target);
50818
+ }
50819
+ function targetOwnsSpaceKey(target) {
50820
+ const element = target;
50821
+ if (!element || typeof element.closest !== "function") {
50822
+ return false;
50823
+ }
50824
+ return element.isContentEditable === true || element.closest(SPACE_OWNER_SELECTOR) !== null;
50825
+ }
50826
+ var TOUCH_EVENTS = ["touchstart", "touchend", "touchcancel"];
50827
+ function attachViewportNavigation(viewport, options) {
50828
+ const doc = viewport.ownerDocument;
50829
+ const win = doc.defaultView;
50830
+ const requestFrame = options.requestFrame ?? ((callback) => win?.requestAnimationFrame(callback) ?? 0);
50831
+ const cancelFrame = options.cancelFrame ?? ((handle) => win?.cancelAnimationFrame(handle));
50832
+ const now = options.now ?? (() => win?.performance.now() ?? Date.now());
50833
+ const isActive = () => options.isActive?.() ?? true;
50834
+ const wheelBuffer = createWheelStepBuffer();
50835
+ const originalCursor = viewport.style.cursor;
50836
+ let pending3 = null;
50837
+ let gesture = null;
50838
+ let frame = 0;
50839
+ let gestureStartZoom = null;
50840
+ let fingers = 0;
50841
+ let hovering = false;
50842
+ let spaceHeld = false;
50843
+ let pan = null;
50844
+ const findStage = () => viewport.querySelector(VIEWPORT_STAGE_SELECTOR);
50845
+ const applyPending = () => {
50846
+ frame = 0;
50847
+ if (!pending3) {
50848
+ return;
50849
+ }
50850
+ const rect3 = findStage()?.getBoundingClientRect();
50851
+ if (!rect3 || rect3.width === pending3.width) {
50852
+ pending3.frames += 1;
50853
+ if (pending3.frames < MAX_LAYOUT_FRAMES) {
50854
+ frame = requestFrame(applyPending);
50855
+ } else {
50856
+ pending3 = null;
50857
+ }
50858
+ return;
50859
+ }
50860
+ const next2 = anchoredScrollPosition(
50861
+ { left: viewport.scrollLeft, top: viewport.scrollTop },
50862
+ rect3,
50863
+ pending3.anchor
50864
+ );
50865
+ pending3 = null;
50866
+ viewport.scrollLeft = next2.left;
50867
+ viewport.scrollTop = next2.top;
50868
+ };
50869
+ const gestureAnchor = (rect3, clientX, clientY) => {
50870
+ const time = now();
50871
+ const continues = gesture !== null && time - gesture.time <= ANCHOR_REUSE_MS && Math.abs(clientX - gesture.anchor.clientX) <= ANCHOR_REUSE_DISTANCE_PX && Math.abs(clientY - gesture.anchor.clientY) <= ANCHOR_REUSE_DISTANCE_PX;
50872
+ const anchor = continues ? { ...gesture.anchor, clientX, clientY } : rect3 ? zoomAnchorAt(rect3, clientX, clientY) : null;
50873
+ gesture = anchor ? { anchor, time } : null;
50874
+ return anchor;
50875
+ };
50876
+ const zoomAt = (zoom, clientX, clientY) => {
50877
+ const before = options.getZoom();
50878
+ const rect3 = findStage()?.getBoundingClientRect();
50879
+ const anchor = gestureAnchor(rect3, clientX, clientY);
50880
+ if (rect3 && pending3 && pending3.width === rect3.width) {
50881
+ if (anchor) {
50882
+ pending3.anchor = anchor;
50883
+ }
50884
+ } else {
50885
+ pending3 = rect3 && anchor ? { anchor, width: rect3.width, frames: 0 } : null;
50886
+ }
50887
+ options.setZoom(zoom);
50888
+ if (options.getZoom() === before) {
50889
+ pending3 = null;
50890
+ return;
50891
+ }
50892
+ if (pending3 && frame === 0) {
50893
+ frame = requestFrame(applyPending);
50894
+ }
50895
+ };
50896
+ const onWheel = (event) => {
50897
+ if (!isActive()) {
50898
+ return;
50899
+ }
50900
+ const mapped = mapEditingWheel(event, wheelBuffer, true);
50901
+ if (mapped.intent !== "zoom") {
50902
+ return;
50903
+ }
50904
+ event.preventDefault();
50905
+ zoomAt(options.getZoom() + mapped.deltaScale, event.clientX, event.clientY);
50906
+ };
50907
+ const onTouches = (event) => {
50908
+ fingers = event.touches.length;
50909
+ };
50910
+ const onGestureStart = (event) => {
50911
+ if (!isActive() || fingers > 0) {
50912
+ return;
50913
+ }
50914
+ event.preventDefault();
50915
+ gestureStartZoom = options.getZoom();
50916
+ };
50917
+ const onGestureChange = (event) => {
50918
+ if (gestureStartZoom === null) {
50919
+ return;
50920
+ }
50921
+ event.preventDefault();
50922
+ const gesture2 = event;
50923
+ zoomAt(gestureStartZoom * gesture2.scale, gesture2.clientX, gesture2.clientY);
50924
+ };
50925
+ const onGestureEnd = (event) => {
50926
+ if (gestureStartZoom === null) {
50927
+ return;
50928
+ }
50929
+ event.preventDefault();
50930
+ gestureStartZoom = null;
50931
+ };
50932
+ const updateCursor = () => {
50933
+ if (pan?.started) {
50934
+ viewport.style.cursor = "grabbing";
50935
+ } else if (spaceHeld && hovering) {
50936
+ viewport.style.cursor = "grab";
50937
+ } else {
50938
+ viewport.style.cursor = originalCursor;
50939
+ }
50940
+ };
50941
+ const onPointerEnter = () => {
50942
+ hovering = true;
50943
+ updateCursor();
50944
+ };
50945
+ const onPointerLeave = () => {
50946
+ hovering = false;
50947
+ updateCursor();
50948
+ };
50949
+ const onKeyDown = (event) => {
50950
+ if (event.key !== " " || event.ctrlKey || event.metaKey || event.altKey) {
50951
+ return;
50952
+ }
50953
+ if (spaceHeld) {
50954
+ event.preventDefault();
50955
+ return;
50956
+ }
50957
+ if (!hovering || !isActive() || eventOwnsSpaceKey(event) || !viewportCanPan(viewport)) {
50958
+ return;
50959
+ }
50960
+ event.preventDefault();
50961
+ spaceHeld = true;
50962
+ updateCursor();
50963
+ };
50964
+ const releaseSpace = () => {
50965
+ if (!spaceHeld) {
50966
+ return;
50967
+ }
50968
+ spaceHeld = false;
50969
+ updateCursor();
50970
+ };
50971
+ const onKeyUp = (event) => {
50972
+ if (event.key === " " && spaceHeld) {
50973
+ event.preventDefault();
50974
+ releaseSpace();
50975
+ }
50976
+ };
50977
+ const suppressNextClick = () => {
50978
+ const onClick = (event) => {
50979
+ event.preventDefault();
50980
+ event.stopPropagation();
50981
+ };
50982
+ viewport.addEventListener("click", onClick, { capture: true, once: true });
50983
+ win?.setTimeout(() => viewport.removeEventListener("click", onClick, true), 0);
50984
+ };
50985
+ const startPanning = (event) => {
50986
+ if (!pan) {
50987
+ return;
50988
+ }
50989
+ pan.started = true;
50990
+ try {
50991
+ viewport.setPointerCapture(event.pointerId);
50992
+ } catch {
50993
+ }
50994
+ updateCursor();
50995
+ };
50996
+ const onPointerDown = (event) => {
50997
+ if (pan || !isActive() || !viewportCanPan(viewport)) {
50998
+ return;
50999
+ }
51000
+ const middle = event.button === 1;
51001
+ const spaceDrag = event.button === 0 && spaceHeld;
51002
+ const plainDrag = event.button === 0 && !spaceHeld && event.pointerType !== "touch" && (options.dragPans?.() ?? false);
51003
+ if (!middle && !spaceDrag && !plainDrag) {
51004
+ return;
51005
+ }
51006
+ pan = {
51007
+ pointerId: event.pointerId,
51008
+ startX: event.clientX,
51009
+ startY: event.clientY,
51010
+ left: viewport.scrollLeft,
51011
+ top: viewport.scrollTop,
51012
+ started: false,
51013
+ thresholded: plainDrag
51014
+ };
51015
+ if (!plainDrag) {
51016
+ event.preventDefault();
51017
+ event.stopPropagation();
51018
+ startPanning(event);
51019
+ }
51020
+ };
51021
+ const onPointerMove = (event) => {
51022
+ if (!pan || event.pointerId !== pan.pointerId) {
51023
+ return;
51024
+ }
51025
+ const dx = event.clientX - pan.startX;
51026
+ const dy = event.clientY - pan.startY;
51027
+ if (!pan.started) {
51028
+ if (Math.hypot(dx, dy) < DRAG_PAN_THRESHOLD_PX) {
51029
+ return;
51030
+ }
51031
+ startPanning(event);
51032
+ }
51033
+ event.preventDefault();
51034
+ viewport.scrollLeft = pan.left - dx;
51035
+ viewport.scrollTop = pan.top - dy;
51036
+ };
51037
+ const endPan = (event) => {
51038
+ if (!pan || event.pointerId !== pan.pointerId) {
51039
+ return;
51040
+ }
51041
+ const { started, thresholded } = pan;
51042
+ pan = null;
51043
+ if (started) {
51044
+ try {
51045
+ viewport.releasePointerCapture(event.pointerId);
51046
+ } catch {
51047
+ }
51048
+ if (thresholded && event.type === "pointerup") {
51049
+ suppressNextClick();
51050
+ }
51051
+ }
51052
+ updateCursor();
51053
+ };
51054
+ const onWindowBlur = () => {
51055
+ releaseSpace();
51056
+ };
51057
+ viewport.addEventListener("wheel", onWheel, { passive: false });
51058
+ for (const type of TOUCH_EVENTS) {
51059
+ viewport.addEventListener(type, onTouches, { passive: true });
51060
+ }
51061
+ viewport.addEventListener("gesturestart", onGestureStart);
51062
+ viewport.addEventListener("gesturechange", onGestureChange);
51063
+ viewport.addEventListener("gestureend", onGestureEnd);
51064
+ viewport.addEventListener("pointerenter", onPointerEnter);
51065
+ viewport.addEventListener("pointerleave", onPointerLeave);
51066
+ viewport.addEventListener("pointerdown", onPointerDown, true);
51067
+ viewport.addEventListener("pointermove", onPointerMove, true);
51068
+ viewport.addEventListener("pointerup", endPan, true);
51069
+ viewport.addEventListener("pointercancel", endPan, true);
51070
+ doc.addEventListener("keydown", onKeyDown, true);
51071
+ doc.addEventListener("keyup", onKeyUp, true);
51072
+ win?.addEventListener("blur", onWindowBlur);
51073
+ return () => {
51074
+ if (frame !== 0) {
51075
+ cancelFrame(frame);
51076
+ frame = 0;
51077
+ }
51078
+ pending3 = null;
51079
+ pan = null;
51080
+ spaceHeld = false;
51081
+ viewport.style.cursor = originalCursor;
51082
+ viewport.removeEventListener("wheel", onWheel);
51083
+ for (const type of TOUCH_EVENTS) {
51084
+ viewport.removeEventListener(type, onTouches);
51085
+ }
51086
+ viewport.removeEventListener("gesturestart", onGestureStart);
51087
+ viewport.removeEventListener("gesturechange", onGestureChange);
51088
+ viewport.removeEventListener("gestureend", onGestureEnd);
51089
+ viewport.removeEventListener("pointerenter", onPointerEnter);
51090
+ viewport.removeEventListener("pointerleave", onPointerLeave);
51091
+ viewport.removeEventListener("pointerdown", onPointerDown, true);
51092
+ viewport.removeEventListener("pointermove", onPointerMove, true);
51093
+ viewport.removeEventListener("pointerup", endPan, true);
51094
+ viewport.removeEventListener("pointercancel", endPan, true);
51095
+ doc.removeEventListener("keydown", onKeyDown, true);
51096
+ doc.removeEventListener("keyup", onKeyUp, true);
51097
+ win?.removeEventListener("blur", onWindowBlur);
51098
+ };
51099
+ }
51100
+
50601
51101
  // src/pptx/render/audience-content-store.ts
50602
51102
  var DB_NAME3 = "pptx-viewer-audience";
50603
51103
  var DB_VERSION3 = 1;
@@ -52708,7 +53208,7 @@ function resolveSlidePaneClick(input) {
52708
53208
  }
52709
53209
 
52710
53210
  // src/pptx/render/slide-pane-context-menu.ts
52711
- var LABEL_KEYS = {
53211
+ var LABEL_KEYS2 = {
52712
53212
  "new-slide": "pptx.slidesPane.contextMenu.newSlide",
52713
53213
  duplicate: "pptx.slidesPane.contextMenu.duplicate",
52714
53214
  delete: "pptx.slidesPane.contextMenu.delete",
@@ -52721,11 +53221,11 @@ var COUNT_LABEL_KEYS = {
52721
53221
  delete: "pptx.slidesPane.contextMenu.deleteCount"
52722
53222
  };
52723
53223
  function slidePaneContextMenuLabelKey(id) {
52724
- return LABEL_KEYS[id];
53224
+ return LABEL_KEYS2[id];
52725
53225
  }
52726
53226
  function entry(id, context3, extra = {}) {
52727
53227
  const countKey = context3.selectedCount > 1 ? COUNT_LABEL_KEYS[id] : void 0;
52728
- return { id, labelKey: countKey ?? LABEL_KEYS[id], countLabelKey: countKey, ...extra };
53228
+ return { id, labelKey: countKey ?? LABEL_KEYS2[id], countLabelKey: countKey, ...extra };
52729
53229
  }
52730
53230
  function buildSlidePaneContextMenuEntries(context3) {
52731
53231
  const showsHide = context3.hasVisibleInSelection || !context3.hasHiddenInSelection;
@@ -52743,7 +53243,7 @@ function buildSlidePaneContextMenuEntries(context3) {
52743
53243
  }
52744
53244
 
52745
53245
  // src/pptx/render/section-context-menu.ts
52746
- var LABEL_KEYS2 = {
53246
+ var LABEL_KEYS3 = {
52747
53247
  rename: "pptx.sections.rename",
52748
53248
  delete: "pptx.sections.delete",
52749
53249
  "move-up": "pptx.sections.moveUp",
@@ -52751,24 +53251,24 @@ var LABEL_KEYS2 = {
52751
53251
  "add-after": "pptx.sections.addAfter"
52752
53252
  };
52753
53253
  function sectionContextMenuLabelKey(id) {
52754
- return LABEL_KEYS2[id];
53254
+ return LABEL_KEYS3[id];
52755
53255
  }
52756
53256
  function buildSectionContextMenuEntries(context3) {
52757
53257
  return [
52758
- { id: "rename", labelKey: LABEL_KEYS2.rename },
52759
- { id: "delete", labelKey: LABEL_KEYS2.delete },
53258
+ { id: "rename", labelKey: LABEL_KEYS3.rename },
53259
+ { id: "delete", labelKey: LABEL_KEYS3.delete },
52760
53260
  {
52761
53261
  id: "move-up",
52762
- labelKey: LABEL_KEYS2["move-up"],
53262
+ labelKey: LABEL_KEYS3["move-up"],
52763
53263
  separatorBefore: true,
52764
53264
  disabled: context3.sectionIndex <= 0
52765
53265
  },
52766
53266
  {
52767
53267
  id: "move-down",
52768
- labelKey: LABEL_KEYS2["move-down"],
53268
+ labelKey: LABEL_KEYS3["move-down"],
52769
53269
  disabled: context3.sectionIndex >= context3.totalSections - 1
52770
53270
  },
52771
- { id: "add-after", labelKey: LABEL_KEYS2["add-after"], separatorBefore: true }
53271
+ { id: "add-after", labelKey: LABEL_KEYS3["add-after"], separatorBefore: true }
52772
53272
  ];
52773
53273
  }
52774
53274
  function sectionAddAfterSlideIndex(lastSlideIndexOfSection, totalSlides) {
@@ -53539,7 +54039,7 @@ function hasMultipleSelectedTableCells(cells, tableData) {
53539
54039
  }
53540
54040
  return false;
53541
54041
  }
53542
- var LABEL_KEYS3 = {
54042
+ var LABEL_KEYS4 = {
53543
54043
  copy: "pptx.contextMenu.copy",
53544
54044
  cut: "pptx.contextMenu.cut",
53545
54045
  paste: "pptx.contextMenu.paste",
@@ -53580,10 +54080,10 @@ var LABEL_KEYS3 = {
53580
54080
  delete: "pptx.contextMenu.delete"
53581
54081
  };
53582
54082
  function contextMenuLabelKey(id) {
53583
- return LABEL_KEYS3[id];
54083
+ return LABEL_KEYS4[id];
53584
54084
  }
53585
54085
  function entry2(id, extra = {}) {
53586
- return { id, labelKey: LABEL_KEYS3[id], ...extra };
54086
+ return { id, labelKey: LABEL_KEYS4[id], ...extra };
53587
54087
  }
53588
54088
  function tableEntries(table2) {
53589
54089
  if (!table2) {
@@ -53679,7 +54179,7 @@ function buildContextMenuEntries(context3 = {}) {
53679
54179
  }
53680
54180
 
53681
54181
  // src/pptx/render/canvas-context-menu-commands.ts
53682
- var LABEL_KEYS4 = {
54182
+ var LABEL_KEYS5 = {
53683
54183
  paste: "pptx.contextMenu.paste",
53684
54184
  layout: "pptx.canvasContextMenu.layout",
53685
54185
  "reset-slide": "pptx.canvasContextMenu.resetSlide",
@@ -53688,10 +54188,10 @@ var LABEL_KEYS4 = {
53688
54188
  ruler: "pptx.canvasContextMenu.ruler"
53689
54189
  };
53690
54190
  function canvasContextMenuLabelKey(id) {
53691
- return LABEL_KEYS4[id];
54191
+ return LABEL_KEYS5[id];
53692
54192
  }
53693
54193
  function entry3(id, extra = {}) {
53694
- return { id, labelKey: LABEL_KEYS4[id], ...extra };
54194
+ return { id, labelKey: LABEL_KEYS5[id], ...extra };
53695
54195
  }
53696
54196
  function buildCanvasContextMenuEntries(context3 = {}) {
53697
54197
  const { hasClipboard, showGrid, showRulers } = context3;
@@ -56493,16 +56993,22 @@ var GROUPED_INSERT_CHART_KINDS = [
56493
56993
  "line",
56494
56994
  "area"
56495
56995
  ];
56996
+ function isValidInsertChartData(data) {
56997
+ return data !== void 0 && data.categories.length > 0 && data.series.length > 0 && data.series.every(
56998
+ (series) => series.values.length === data.categories.length && series.values.every((value) => Number.isFinite(value))
56999
+ );
57000
+ }
56496
57001
  function createDefaultChartElement(chartKind = DEFAULT_INSERT_CHART_KIND, position, options = {}) {
56497
57002
  const option = INSERT_CHART_TYPES.find((entry6) => entry6.id === chartKind);
56498
57003
  const chartType = option?.type ?? chartKind;
56499
57004
  const chartExData = buildChartExInsertData(option?.id ?? chartKind);
57005
+ const hostData = isValidInsertChartData(options.data) ? options.data : void 0;
56500
57006
  return pptx.createChartElement(
56501
57007
  chartType,
56502
57008
  {
56503
- categories: chartExData?.categories ?? [...DEFAULT_CATEGORIES],
56504
- series: chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
56505
- ...chartExData?.categoryLevels ? { categoryLevels: chartExData.categoryLevels } : {},
57009
+ categories: hostData ? [...hostData.categories] : chartExData?.categories ?? [...DEFAULT_CATEGORIES],
57010
+ series: hostData ? hostData.series.map((s) => ({ name: s.name, values: [...s.values] })) : chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
57011
+ ...!hostData && chartExData?.categoryLevels ? { categoryLevels: chartExData.categoryLevels } : {},
56506
57012
  ...options.title === void 0 ? { title: "Chart Title" } : options.title.trim() ? { title: options.title.trim() } : {},
56507
57013
  hasLegend: options.hasLegend ?? true,
56508
57014
  ...options.grouping !== void 0 && GROUPED_INSERT_CHART_KINDS.includes(option?.id ?? chartKind) ? { grouping: options.grouping } : {},
@@ -57728,6 +58234,1729 @@ function classifyMediaType(mimeType) {
57728
58234
  return null;
57729
58235
  }
57730
58236
 
58237
+ // src/pptx/render/building-block-actions.ts
58238
+ var BUILDING_BLOCK_OK = { ok: true };
58239
+ function buildingBlockFailure(code) {
58240
+ return { ok: false, code };
58241
+ }
58242
+ var HOST_IMAGE_MAX_BYTES = 25 * 1024 * 1024;
58243
+ var HOST_MEDIA_MAX_BYTES = 100 * 1024 * 1024;
58244
+ function validateHostImageFile(file, maxBytes = HOST_IMAGE_MAX_BYTES) {
58245
+ if (!file) {
58246
+ return buildingBlockFailure("no-file");
58247
+ }
58248
+ if (!file.type.startsWith("image/")) {
58249
+ return buildingBlockFailure("unsupported-type");
58250
+ }
58251
+ if (file.size === 0) {
58252
+ return buildingBlockFailure("empty-file");
58253
+ }
58254
+ return file.size > maxBytes ? buildingBlockFailure("file-too-large") : BUILDING_BLOCK_OK;
58255
+ }
58256
+ function validateHostMediaFile(file, maxBytes = HOST_MEDIA_MAX_BYTES) {
58257
+ if (!file) {
58258
+ return buildingBlockFailure("no-file");
58259
+ }
58260
+ const mediaType = classifyMediaType(file.type);
58261
+ if (!mediaType) {
58262
+ return buildingBlockFailure("unsupported-type");
58263
+ }
58264
+ if (file.size === 0) {
58265
+ return buildingBlockFailure("empty-file");
58266
+ }
58267
+ return file.size > maxBytes ? buildingBlockFailure("file-too-large") : { ok: true, mediaType };
58268
+ }
58269
+ var BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = [
58270
+ // The other dialogs raise host requests now (`actions.passwordProtection`, `.documentProperties`,
58271
+ // `.fontEmbedding`, `.digitalSignatures`, `.setUpSlideShow`, `.customShows`, `.shortcuts`);
58272
+ // Broadcast cannot be completed.
58273
+ "onOpenBroadcastDialog"
58274
+ ];
58275
+ function describeBuildingBlockActions(input) {
58276
+ const gate = () => {
58277
+ if (!input.ready) {
58278
+ return "not-ready";
58279
+ }
58280
+ if (!input.canEdit || !input.editing) {
58281
+ return "read-only";
58282
+ }
58283
+ return input.canInsert ? void 0 : "protected";
58284
+ };
58285
+ const state = (needsHostUi, ...conditions) => {
58286
+ const reason = [gate(), ...conditions].find((code) => code !== void 0);
58287
+ return reason === void 0 ? { available: true, needsHostUi } : { available: false, reason, needsHostUi };
58288
+ };
58289
+ const slide = input.hasActiveSlide ? void 0 : "no-slide";
58290
+ const selection = input.hasSelection ? void 0 : "no-selection";
58291
+ return {
58292
+ insertImage: state(true, slide),
58293
+ insertMedia: state(true, slide),
58294
+ hyperlink: state(true, selection),
58295
+ removeHyperlink: state(
58296
+ false,
58297
+ selection,
58298
+ input.selectionHasHyperlink ? void 0 : "no-hyperlink"
58299
+ ),
58300
+ insertSmartArt: state(true, slide),
58301
+ insertChart: state(true, slide),
58302
+ insertEquation: state(true, slide),
58303
+ editEquation: state(true, selection, input.selectionHasEquation ? void 0 : "no-equation"),
58304
+ replace: state(false),
58305
+ applyLayout: state(
58306
+ false,
58307
+ slide,
58308
+ input.hasHandler && input.layoutCount > 0 ? void 0 : "no-layout"
58309
+ ),
58310
+ resetLayout: state(
58311
+ false,
58312
+ slide,
58313
+ input.hasHandler && input.hasCurrentLayout ? void 0 : "no-layout"
58314
+ ),
58315
+ // Apply is gated like an edit; the request itself also fires read-only (see the file dialogs).
58316
+ passwordProtection: state(true),
58317
+ documentProperties: state(true),
58318
+ fontEmbedding: state(true),
58319
+ digitalSignatures: state(true)
58320
+ };
58321
+ }
58322
+
58323
+ // src/pptx/render/building-block-document-properties.ts
58324
+ var EDITABLE_CORE_PROPERTY_KEYS = [
58325
+ "title",
58326
+ "subject",
58327
+ "creator",
58328
+ "keywords",
58329
+ "description",
58330
+ "category"
58331
+ ];
58332
+ var EDITABLE_APP_PROPERTY_KEYS = ["company", "manager"];
58333
+ var CUSTOM_PROPERTY_TYPES = ["lpwstr", "i4", "filetime", "bool"];
58334
+ function documentPropertiesChanged(current, draft) {
58335
+ return EDITABLE_CORE_PROPERTY_KEYS.some(
58336
+ (key) => (draft.core[key] ?? "") !== (current.core[key] ?? "")
58337
+ ) || appPropertiesChanged(current.app, draft.app) || draft.custom.length !== current.custom.length || draft.custom.some((property, index) => {
58338
+ const existing = current.custom[index];
58339
+ return property.name !== existing?.name || property.value !== existing?.value || property.type !== existing?.type;
58340
+ });
58341
+ }
58342
+ function appPropertiesChanged(current, draft) {
58343
+ return EDITABLE_APP_PROPERTY_KEYS.some((key) => (draft?.[key] ?? "") !== (current?.[key] ?? ""));
58344
+ }
58345
+ function validCustomProperty(property) {
58346
+ if (typeof property.name !== "string" || property.name.trim() === "") {
58347
+ return false;
58348
+ }
58349
+ if (!CUSTOM_PROPERTY_TYPES.includes(property.type)) {
58350
+ return false;
58351
+ }
58352
+ if (typeof property.value !== "string") {
58353
+ return false;
58354
+ }
58355
+ switch (property.type) {
58356
+ case "i4":
58357
+ return /^-?\d+$/u.test(property.value.trim());
58358
+ case "bool":
58359
+ return property.value === "true" || property.value === "false";
58360
+ case "filetime":
58361
+ return !Number.isNaN(Date.parse(property.value));
58362
+ default:
58363
+ return true;
58364
+ }
58365
+ }
58366
+ function planDocumentPropertiesPatch(current, patch) {
58367
+ const invalid = { ok: false, code: "invalid-data" };
58368
+ const coreEntries = Object.entries(patch.core ?? {});
58369
+ const appEntries = Object.entries(patch.app ?? {});
58370
+ for (const [key, value] of coreEntries) {
58371
+ if (!EDITABLE_CORE_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
58372
+ return invalid;
58373
+ }
58374
+ }
58375
+ for (const [key, value] of appEntries) {
58376
+ if (!EDITABLE_APP_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
58377
+ return invalid;
58378
+ }
58379
+ }
58380
+ const set = patch.custom?.set ?? [];
58381
+ if (!set.every(validCustomProperty)) {
58382
+ return invalid;
58383
+ }
58384
+ const core = Object.fromEntries(coreEntries);
58385
+ const app = Object.fromEntries(appEntries);
58386
+ const hasCustom = set.length > 0 || (patch.custom?.remove?.length ?? 0) > 0;
58387
+ let custom = current.custom;
58388
+ if (hasCustom) {
58389
+ const removed = new Set(patch.custom?.remove ?? []);
58390
+ custom = [
58391
+ ...current.custom.flatMap((property) => {
58392
+ if (removed.has(property.name)) {
58393
+ return [];
58394
+ }
58395
+ const replacement = set.find((next2) => next2.name === property.name);
58396
+ return [replacement ? { ...replacement } : property];
58397
+ }),
58398
+ ...set.filter((next2) => !current.custom.some((property) => property.name === next2.name))
58399
+ ];
58400
+ }
58401
+ const changed = documentPropertiesChanged(
58402
+ { core: current.core, custom: current.custom, app: current.app },
58403
+ { core: { ...current.core, ...core }, custom, app: { ...current.app, ...app } }
58404
+ );
58405
+ return {
58406
+ ok: true,
58407
+ changed,
58408
+ ...coreEntries.length > 0 ? { core } : {},
58409
+ ...hasCustom ? { custom } : {},
58410
+ ...appPropertiesChanged(current.app, { ...current.app, ...app }) ? { app } : {}
58411
+ };
58412
+ }
58413
+ function copy(snapshot) {
58414
+ return {
58415
+ core: { ...snapshot.core },
58416
+ custom: snapshot.custom.map((property) => ({ ...property })),
58417
+ app: { ...snapshot.app }
58418
+ };
58419
+ }
58420
+ function buildDocumentPropertiesActions(input) {
58421
+ return {
58422
+ current: copy(input.current()),
58423
+ apply: (patch) => {
58424
+ const denied = input.refuse();
58425
+ if (denied) {
58426
+ return denied;
58427
+ }
58428
+ const plan = planDocumentPropertiesPatch(input.current(), patch);
58429
+ if (!plan.ok) {
58430
+ return buildingBlockFailure(plan.code);
58431
+ }
58432
+ if (plan.changed) {
58433
+ input.applyUpdate({
58434
+ ...plan.core ? { core: plan.core } : {},
58435
+ ...plan.custom ? { custom: plan.custom } : {},
58436
+ ...plan.app ? { app: plan.app } : {}
58437
+ });
58438
+ }
58439
+ return input.complete(BUILDING_BLOCK_OK);
58440
+ }
58441
+ };
58442
+ }
58443
+
58444
+ // src/pptx/render/font-embedding.ts
58445
+ var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
58446
+ function describeFontEmbedding(embeddedFamilies) {
58447
+ const seen = /* @__PURE__ */ new Set();
58448
+ const families = [];
58449
+ for (const raw of embeddedFamilies ?? []) {
58450
+ const family2 = raw?.trim();
58451
+ if (!family2) {
58452
+ continue;
58453
+ }
58454
+ const key = family2.toLowerCase();
58455
+ if (seen.has(key)) {
58456
+ continue;
58457
+ }
58458
+ seen.add(key);
58459
+ families.push(family2);
58460
+ }
58461
+ const hasAny = families.length > 0;
58462
+ return {
58463
+ embeddedFamilies: families,
58464
+ interactive: hasAny,
58465
+ initialEnabled: hasAny,
58466
+ ...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
58467
+ };
58468
+ }
58469
+ function embeddedFontSaveOptions(embedFonts) {
58470
+ return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
58471
+ }
58472
+
58473
+ // src/pptx/render/building-block-font-embedding.ts
58474
+ function describeFontEmbeddingState(input) {
58475
+ const descriptor = input.descriptor ?? describeFontEmbedding(input.embeddedFamilies);
58476
+ return {
58477
+ embedFonts: input.embedFonts,
58478
+ embeddedFamilies: descriptor.embeddedFamilies,
58479
+ usedFamilies: [...input.usedFamilies],
58480
+ canEmbed: descriptor.interactive,
58481
+ ...descriptor.disabledReasonKey ? { unavailableReasonKey: descriptor.disabledReasonKey } : {}
58482
+ };
58483
+ }
58484
+ function buildFontEmbeddingActions(input) {
58485
+ return {
58486
+ state: input.state,
58487
+ setEmbedFonts: (enabled) => {
58488
+ const denied = input.refuse();
58489
+ if (denied) {
58490
+ return denied;
58491
+ }
58492
+ const latest = input.latest();
58493
+ if (enabled && !latest.canEmbed) {
58494
+ return buildingBlockFailure("unsupported");
58495
+ }
58496
+ if (latest.embedFonts !== enabled) {
58497
+ input.apply(enabled);
58498
+ input.markDirty();
58499
+ }
58500
+ return input.complete(BUILDING_BLOCK_OK);
58501
+ }
58502
+ };
58503
+ }
58504
+
58505
+ // src/pptx/render/password-protection.ts
58506
+ function getPasswordStrength(password) {
58507
+ if (!password) {
58508
+ return 0;
58509
+ }
58510
+ let score2 = 0;
58511
+ if (password.length >= 8) {
58512
+ score2 += 1;
58513
+ }
58514
+ if (password.length >= 12) {
58515
+ score2 += 1;
58516
+ }
58517
+ if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
58518
+ score2 += 1;
58519
+ }
58520
+ if (/\d/u.test(password)) {
58521
+ score2 += 1;
58522
+ }
58523
+ if (/[^A-Za-z0-9]/u.test(password)) {
58524
+ score2 += 1;
58525
+ }
58526
+ return Math.min(score2, 4);
58527
+ }
58528
+ function validatePasswordPair(password, confirmation) {
58529
+ if (!password) {
58530
+ return "required";
58531
+ }
58532
+ if (password !== confirmation) {
58533
+ return "mismatch";
58534
+ }
58535
+ if (password.length < 4) {
58536
+ return "tooShort";
58537
+ }
58538
+ return null;
58539
+ }
58540
+ var NOT_RECOMMENDED = {
58541
+ kind: null,
58542
+ messageKey: "",
58543
+ defaultReadOnly: false,
58544
+ requiresPassword: false
58545
+ };
58546
+ var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
58547
+ function isTruthyCustomPropertyValue(value) {
58548
+ const normalized = value.trim().toLowerCase();
58549
+ return normalized === "true" || normalized === "1" || normalized === "yes";
58550
+ }
58551
+ function isMarkedAsFinal(customProperties) {
58552
+ if (!customProperties) {
58553
+ return false;
58554
+ }
58555
+ return customProperties.some(
58556
+ (property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
58557
+ );
58558
+ }
58559
+ function readOnlyRecommendation(data) {
58560
+ if (!data) {
58561
+ return NOT_RECOMMENDED;
58562
+ }
58563
+ const verifier = data.modifyVerifier;
58564
+ if (verifier && (verifier.hashData || verifier.algorithmName)) {
58565
+ return {
58566
+ kind: "modifyVerifier",
58567
+ messageKey: "pptx.readOnly.modifyVerifierRecommended",
58568
+ defaultReadOnly: true,
58569
+ // A hash this viewer can actually check requires the password before
58570
+ // "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
58571
+ // of this check (see the field doc comment above): only a missing hash
58572
+ // or an unrecognised algorithm falls back to the plain "Edit anyway"
58573
+ // every other recommendation already has.
58574
+ requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
58575
+ };
58576
+ }
58577
+ if (isMarkedAsFinal(data.customProperties)) {
58578
+ return {
58579
+ kind: "markedFinal",
58580
+ messageKey: "pptx.readOnly.markedFinal",
58581
+ defaultReadOnly: true,
58582
+ requiresPassword: false
58583
+ };
58584
+ }
58585
+ return NOT_RECOMMENDED;
58586
+ }
58587
+
58588
+ // src/pptx/render/building-block-password.ts
58589
+ var MIN_OPEN_PASSWORD_LENGTH = 4;
58590
+ var PASSWORD_CODES = {
58591
+ required: "password-required",
58592
+ mismatch: "password-mismatch",
58593
+ tooShort: "password-too-short"
58594
+ };
58595
+ var MARK_AS_FINAL_PROPERTY = "_MarkAsFinal";
58596
+ function validateOpenPassword(password, confirmation) {
58597
+ const invalid = validatePasswordPair(password, confirmation);
58598
+ return invalid === null ? BUILDING_BLOCK_OK : buildingBlockFailure(PASSWORD_CODES[invalid]);
58599
+ }
58600
+ function describePasswordProtection(input) {
58601
+ return {
58602
+ openPassword: input.openPasswordSet,
58603
+ modifyPassword: input.hasModifyVerifier,
58604
+ readOnlyRecommended: input.recommendation.kind !== null,
58605
+ markedFinal: isMarkedAsFinal(input.customProperties),
58606
+ supported: {
58607
+ openPassword: true,
58608
+ markedFinal: true,
58609
+ modifyPassword: false,
58610
+ readOnlyRecommended: false
58611
+ }
58612
+ };
58613
+ }
58614
+ function markAsFinalProperties(customProperties, final) {
58615
+ if (isMarkedAsFinal(customProperties) === final) {
58616
+ return void 0;
58617
+ }
58618
+ const others = customProperties.filter((property) => property.name !== MARK_AS_FINAL_PROPERTY);
58619
+ return final ? [...others, { name: MARK_AS_FINAL_PROPERTY, value: "true", type: "bool" }] : others;
58620
+ }
58621
+ function buildPasswordProtectionActions(input) {
58622
+ const guard = (run2) => input.refuse() ?? run2();
58623
+ return {
58624
+ state: input.state,
58625
+ setOpenPassword: (password, confirmation) => guard(() => {
58626
+ const checked = validateOpenPassword(password, confirmation);
58627
+ if (!checked.ok) {
58628
+ return checked;
58629
+ }
58630
+ input.applyOpenPassword(password);
58631
+ input.markDirty();
58632
+ return input.complete(BUILDING_BLOCK_OK);
58633
+ }),
58634
+ clearOpenPassword: () => guard(() => {
58635
+ input.applyOpenPassword(null);
58636
+ input.markDirty();
58637
+ return input.complete(BUILDING_BLOCK_OK);
58638
+ }),
58639
+ setMarkedFinal: (final) => guard(() => {
58640
+ const next2 = markAsFinalProperties(input.customProperties(), final);
58641
+ if (next2) {
58642
+ input.applyCustomProperties(next2);
58643
+ }
58644
+ return input.complete(BUILDING_BLOCK_OK);
58645
+ }),
58646
+ setModifyPassword: () => input.refuse() ?? buildingBlockFailure("unsupported")
58647
+ };
58648
+ }
58649
+ function describeSignaturesState(input) {
58650
+ return {
58651
+ signed: input.signed,
58652
+ count: input.count,
58653
+ removedOnSave: true,
58654
+ supported: { list: true, remove: true, create: false, trust: false }
58655
+ };
58656
+ }
58657
+ function toHostSignatureInfo(signature) {
58658
+ const { certificate } = signature;
58659
+ return {
58660
+ path: signature.signaturePath,
58661
+ ...certificate?.subject ? { signer: certificate.subject } : {},
58662
+ ...certificate?.issuer ? { issuer: certificate.issuer } : {},
58663
+ ...certificate?.validFrom ? { validFrom: certificate.validFrom } : {},
58664
+ ...certificate?.validTo ? { validTo: certificate.validTo } : {},
58665
+ expired: signature.status === "expired",
58666
+ integrity: signature.integrity
58667
+ };
58668
+ }
58669
+ async function listPackageSignatures(content) {
58670
+ if (!content) {
58671
+ return [];
58672
+ }
58673
+ return (await pptx.inspectSignaturesFromBuffer(content)).map(toHostSignatureInfo);
58674
+ }
58675
+ function buildSignatureActions(input) {
58676
+ return {
58677
+ state: input.state,
58678
+ list: () => listPackageSignatures(input.content()),
58679
+ remove: () => {
58680
+ const denied = input.refuse();
58681
+ if (denied) {
58682
+ return denied;
58683
+ }
58684
+ if (!input.state.signed) {
58685
+ return buildingBlockFailure("no-signatures");
58686
+ }
58687
+ input.markDirty();
58688
+ return input.complete(BUILDING_BLOCK_OK);
58689
+ },
58690
+ sign: () => buildingBlockFailure("unsupported")
58691
+ };
58692
+ }
58693
+
58694
+ // src/pptx/render/building-block-show-settings.ts
58695
+ var SHOW_TYPES = ["presented", "browsed", "kiosk"];
58696
+ var ADVANCE_MODES = ["manual", "useTimings"];
58697
+ var SLIDES_MODES = ["all", "range", "customShow"];
58698
+ function applySlideShowSettingsPatch(current, patch, context3) {
58699
+ const next2 = { ...current, ...patch };
58700
+ if (patch.showType === "kiosk") {
58701
+ next2.loopContinuously = true;
58702
+ }
58703
+ if (patch.showSlidesMode === "range") {
58704
+ next2.showSlidesFrom = patch.showSlidesFrom ?? current.showSlidesFrom ?? 1;
58705
+ next2.showSlidesTo = patch.showSlidesTo ?? current.showSlidesTo ?? context3.slideCount;
58706
+ }
58707
+ if (patch.showSlidesMode === "customShow") {
58708
+ const id = patch.showSlidesCustomShowId ?? current.showSlidesCustomShowId ?? context3.customShows[0]?.id;
58709
+ if (id !== void 0) {
58710
+ next2.showSlidesCustomShowId = id;
58711
+ }
58712
+ }
58713
+ return next2;
58714
+ }
58715
+ function validateSlideShowSettings(settings, context3) {
58716
+ const known = (value, list2) => value === void 0 || list2.includes(value);
58717
+ if (!known(settings.showType, SHOW_TYPES) || !known(settings.advanceMode, ADVANCE_MODES) || !known(settings.showSlidesMode, SLIDES_MODES)) {
58718
+ return buildingBlockFailure("invalid-data");
58719
+ }
58720
+ if (settings.showSlidesMode === "range") {
58721
+ const from = settings.showSlidesFrom ?? 1;
58722
+ const to = settings.showSlidesTo ?? context3.slideCount;
58723
+ if (!Number.isInteger(from) || !Number.isInteger(to) || from < 1 || to > context3.slideCount || from > to) {
58724
+ return buildingBlockFailure("invalid-range");
58725
+ }
58726
+ }
58727
+ if (settings.showSlidesMode === "customShow" && !context3.customShows.some((show) => show.id === settings.showSlidesCustomShowId)) {
58728
+ return buildingBlockFailure("unknown-show");
58729
+ }
58730
+ if (settings.penColor !== void 0 && !/^#?[0-9a-f]{6}$/i.test(settings.penColor)) {
58731
+ return buildingBlockFailure("invalid-data");
58732
+ }
58733
+ return BUILDING_BLOCK_OK;
58734
+ }
58735
+ function describeSlideShowSettings(settings, context3) {
58736
+ return {
58737
+ showType: settings.showType ?? "presented",
58738
+ loop: Boolean(settings.loopContinuously),
58739
+ playNarration: settings.showWithNarration !== false,
58740
+ playAnimation: settings.showWithAnimation !== false,
58741
+ subtitles: Boolean(settings.showSubtitles),
58742
+ advanceMode: settings.advanceMode ?? "useTimings",
58743
+ slidesMode: settings.showSlidesMode ?? "all",
58744
+ rangeFrom: settings.showSlidesFrom ?? 1,
58745
+ rangeTo: settings.showSlidesTo ?? context3.slideCount,
58746
+ customShowId: settings.showSlidesCustomShowId,
58747
+ penColor: settings.penColor,
58748
+ kioskRestartTime: settings.kioskRestartTime,
58749
+ showScrollbar: settings.showScrollbar ?? true,
58750
+ slideCount: context3.slideCount,
58751
+ customShows: context3.customShows.map(({ id, name }) => ({ id, name }))
58752
+ };
58753
+ }
58754
+ function resolveSlideShowSettings(current, patch, context3) {
58755
+ const settings = applySlideShowSettingsPatch(current, patch, context3);
58756
+ const checked = validateSlideShowSettings(settings, context3);
58757
+ return checked.ok ? { ok: true, settings } : { ok: false, code: checked.code };
58758
+ }
58759
+ function applyCustomShowEdit(shows, slides, edit) {
58760
+ const known = new Set(slides.map((slide) => slide.rId));
58761
+ const fail = (code) => ({ ok: false, code });
58762
+ if ("id" in edit && !shows.some((show) => show.id === edit.id)) {
58763
+ return fail("unknown-show");
58764
+ }
58765
+ if ((edit.kind === "create" || edit.kind === "rename") && edit.name.trim() === "") {
58766
+ return fail("invalid-name");
58767
+ }
58768
+ const rIds = edit.kind === "create" || edit.kind === "setSlides" ? edit.slideRIds : void 0;
58769
+ if (rIds?.some((rId) => !known.has(rId))) {
58770
+ return fail("unknown-slide");
58771
+ }
58772
+ const controller = createCustomShowsController(shows, "id" in edit ? edit.id : null);
58773
+ let showId = "id" in edit ? edit.id : void 0;
58774
+ let next2;
58775
+ if (edit.kind === "setSlides") {
58776
+ next2 = customShowOperations.setCustomShowSlides(shows, edit.id, edit.slideRIds).shows;
58777
+ } else {
58778
+ if (edit.kind === "create") {
58779
+ controller.create(edit.name);
58780
+ } else if (edit.kind === "rename") {
58781
+ controller.rename(edit.name);
58782
+ } else if (edit.kind === "copy") {
58783
+ controller.copySelected(edit.name);
58784
+ } else {
58785
+ controller.removeSelected();
58786
+ }
58787
+ const state = controller.getSnapshot();
58788
+ next2 = state.shows;
58789
+ showId = edit.kind === "remove" ? void 0 : state.selectedId ?? void 0;
58790
+ }
58791
+ if (edit.kind === "create" && rIds && rIds.length > 0 && showId !== void 0) {
58792
+ next2 = customShowOperations.setCustomShowSlides(next2, showId, rIds).shows;
58793
+ }
58794
+ const result = controller.result(slides);
58795
+ return {
58796
+ ok: true,
58797
+ shows: next2.map((show) => ({ ...show, slideRIds: [...show.slideRIds] })),
58798
+ slides: result.slides,
58799
+ showId
58800
+ };
58801
+ }
58802
+ function resolveCustomShowStart(shows, slides, id) {
58803
+ const show = shows.find((candidate) => candidate.id === id);
58804
+ if (!show) {
58805
+ return { ok: false, code: "unknown-show" };
58806
+ }
58807
+ const first = customShowOperations.customShowSlides(show, slides)[0];
58808
+ return first ? { ok: true, firstSlideIndex: slides.indexOf(first) } : { ok: false, code: "no-slide" };
58809
+ }
58810
+ function describeCustomShows(shows, slides) {
58811
+ return {
58812
+ shows: shows.map((show) => ({
58813
+ id: show.id,
58814
+ name: show.name,
58815
+ slideRIds: [...show.slideRIds],
58816
+ slideCount: customShowOperations.customShowSlides(show, slides).length
58817
+ })),
58818
+ slides: slides.map((slide, index) => ({ rId: slide.rId, number: index + 1 }))
58819
+ };
58820
+ }
58821
+
58822
+ // src/pptx/render/viewer-preferences.ts
58823
+ var DEFAULT_VIEWER_PREFERENCES = {
58824
+ autoSave: true,
58825
+ spellCheck: false,
58826
+ showGrid: false,
58827
+ showRulers: false,
58828
+ snapToGrid: false,
58829
+ reducedMotion: false
58830
+ };
58831
+ var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
58832
+ var VIEWER_SHORTCUT_REFERENCE = [
58833
+ { actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
58834
+ {
58835
+ actionKey: "pptx.toolbar.redo",
58836
+ shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
58837
+ group: "history"
58838
+ },
58839
+ { actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
58840
+ { actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
58841
+ { actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
58842
+ {
58843
+ actionKey: "pptx.shortcuts.action.duplicateElement",
58844
+ shortcut: "Ctrl/Cmd+D",
58845
+ group: "editing"
58846
+ },
58847
+ {
58848
+ actionKey: "pptx.shortcuts.action.deleteElement",
58849
+ shortcut: "Delete / Backspace",
58850
+ group: "editing"
58851
+ },
58852
+ { actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
58853
+ { actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
58854
+ { actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
58855
+ { actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
58856
+ {
58857
+ actionKey: "pptx.shortcuts.action.nudgeElementLarge",
58858
+ shortcut: "Shift+Arrow keys",
58859
+ group: "editing"
58860
+ },
58861
+ {
58862
+ actionKey: "pptx.shortcuts.action.prevSlide",
58863
+ shortcut: "Left or Up arrow, Page Up",
58864
+ group: "navigation"
58865
+ },
58866
+ {
58867
+ actionKey: "pptx.shortcuts.action.nextSlide",
58868
+ shortcut: "Right or Down arrow, Page Down",
58869
+ group: "navigation"
58870
+ },
58871
+ {
58872
+ actionKey: "pptx.shortcuts.action.zoomCanvas",
58873
+ shortcut: "Ctrl/Cmd+Mouse wheel",
58874
+ group: "navigation"
58875
+ },
58876
+ {
58877
+ actionKey: "pptx.shortcuts.action.commitTextEdit",
58878
+ shortcut: "Ctrl/Cmd+Enter",
58879
+ group: "editing"
58880
+ },
58881
+ { actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
58882
+ // Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
58883
+ // bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
58884
+ // was advertising neither. The help panel is the keymap's documentation: a
58885
+ // chord missing here is a chord nobody discovers.
58886
+ { actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
58887
+ { actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
58888
+ { actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
58889
+ { actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
58890
+ ];
58891
+ var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
58892
+ history: "pptx.editorToolbar.history",
58893
+ clipboard: "pptx.ribbon.clipboard",
58894
+ editing: "pptx.shortcuts.group.editing",
58895
+ navigation: "pptx.shortcuts.group.navigation",
58896
+ general: "pptx.settings.general"
58897
+ };
58898
+ function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
58899
+ const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
58900
+ return order.map((group) => ({
58901
+ group,
58902
+ labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
58903
+ shortcuts: items.filter((item4) => item4.group === group)
58904
+ })).filter((bucket) => bucket.shortcuts.length > 0);
58905
+ }
58906
+ var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
58907
+ var VIEWER_PREFERENCE_TOGGLES = [
58908
+ { key: "autoSave", labelKey: "pptx.settings.autoSave" },
58909
+ { key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
58910
+ { key: "showGrid", labelKey: "pptx.settings.showGrid" },
58911
+ { key: "showRulers", labelKey: "pptx.settings.showRulers" },
58912
+ { key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
58913
+ { key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
58914
+ ];
58915
+ var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
58916
+ function updateViewerPreference(preferences, key, value) {
58917
+ return { ...preferences, [key]: value };
58918
+ }
58919
+ function viewerPreferencesFromViewProperties(data, defaults) {
58920
+ const slideViewPr = data.viewProperties?.slideViewPr;
58921
+ const gridSpacing = data.viewProperties?.gridSpacing;
58922
+ return {
58923
+ ...defaults,
58924
+ snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
58925
+ snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
58926
+ showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
58927
+ gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
58928
+ gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
58929
+ };
58930
+ }
58931
+ function viewPropertiesPatchFromPreferences(preferences) {
58932
+ const patch = {
58933
+ slideViewPr: {
58934
+ snapToGrid: preferences.snapToGrid,
58935
+ snapToObjects: preferences.snapToObjects ?? false,
58936
+ showGuides: preferences.showGuides ?? false
58937
+ }
58938
+ };
58939
+ if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
58940
+ patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
58941
+ }
58942
+ return patch;
58943
+ }
58944
+
58945
+ // src/pptx/render/building-block-show-dialogs.ts
58946
+ function describeShowDialogActions(input) {
58947
+ const gate = describeBuildingBlockActions(input).replace;
58948
+ const edit = () => gate.available ? { available: true, needsHostUi: true } : { available: false, reason: gate.reason ?? "not-ready", needsHostUi: true };
58949
+ return {
58950
+ setUpSlideShow: edit(),
58951
+ customShows: edit(),
58952
+ broadcast: { available: false, reason: "unsupported", needsHostUi: true },
58953
+ shortcuts: { available: true, needsHostUi: true }
58954
+ };
58955
+ }
58956
+ function describeBroadcastSupport() {
58957
+ return { supported: false, reason: "unsupported", requires: "collaboration-service" };
58958
+ }
58959
+ function describeShortcutCatalogue(translate2) {
58960
+ return groupShortcutReference(VIEWER_SHORTCUT_REFERENCE).flatMap(
58961
+ (bucket) => bucket.shortcuts.map((item4) => ({
58962
+ id: item4.actionKey.replace(/^pptx\./, "").replace(/^shortcuts\.action\./, ""),
58963
+ descriptionKey: item4.actionKey,
58964
+ description: translate2(item4.actionKey),
58965
+ keys: item4.shortcut,
58966
+ alternatives: item4.shortcut.split(" or ").map((part2) => part2.trim()),
58967
+ group: item4.group,
58968
+ groupLabel: translate2(bucket.labelKey)
58969
+ }))
58970
+ );
58971
+ }
58972
+
58973
+ // src/pptx/render/building-blocks/action-groups.ts
58974
+ function defineBuildingBlockActionGroup(group) {
58975
+ return group;
58976
+ }
58977
+ function createBuildingBlockGroupContext(requests, refuse, ready) {
58978
+ return {
58979
+ refuse,
58980
+ ready,
58981
+ request: (next2) => requests.request(next2),
58982
+ complete: (kind, result) => requests.complete(kind, result)
58983
+ };
58984
+ }
58985
+
58986
+ // src/pptx/render/find-replace-session.ts
58987
+ var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
58988
+ matchCase: false,
58989
+ includeNotes: false,
58990
+ includeChartTitles: true,
58991
+ includeChartData: false
58992
+ });
58993
+ var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
58994
+ query: "",
58995
+ replacement: "",
58996
+ options: DEFAULT_FIND_REPLACE_OPTIONS,
58997
+ matches: Object.freeze([]),
58998
+ current: -1,
58999
+ pendingRefind: null
59000
+ });
59001
+ function search(slides, session) {
59002
+ return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
59003
+ }
59004
+ function cursorAfterReplace(pending3, count) {
59005
+ if (count === 0) {
59006
+ return -1;
59007
+ }
59008
+ if (pending3.scope === "all") {
59009
+ return 0;
59010
+ }
59011
+ const created = Math.max(0, count - (pending3.count - 1));
59012
+ return (pending3.index + created) % count;
59013
+ }
59014
+ function reduceFindReplaceSession(session, event) {
59015
+ switch (event.type) {
59016
+ case "search": {
59017
+ const next2 = {
59018
+ ...session,
59019
+ query: event.query ?? session.query,
59020
+ options: event.options ? { ...session.options, ...event.options } : session.options,
59021
+ pendingRefind: null
59022
+ };
59023
+ const matches = search(event.slides, next2);
59024
+ return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
59025
+ }
59026
+ case "setReplacement":
59027
+ return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
59028
+ case "step": {
59029
+ const count = session.matches.length;
59030
+ if (count === 0) {
59031
+ return session;
59032
+ }
59033
+ const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
59034
+ const current = (from + event.direction + count) % count;
59035
+ return current === session.current ? session : { ...session, current };
59036
+ }
59037
+ case "replaced":
59038
+ return {
59039
+ ...session,
59040
+ pendingRefind: {
59041
+ scope: event.plan.scope,
59042
+ index: event.plan.index,
59043
+ count: event.plan.count,
59044
+ base: event.slides
59045
+ }
59046
+ };
59047
+ case "slidesChanged": {
59048
+ const pending3 = session.pendingRefind;
59049
+ if (!pending3 || event.slides === pending3.base) {
59050
+ return session;
59051
+ }
59052
+ const matches = search(event.slides, session);
59053
+ return {
59054
+ ...session,
59055
+ matches,
59056
+ current: cursorAfterReplace(pending3, matches.length),
59057
+ pendingRefind: null
59058
+ };
59059
+ }
59060
+ case "close":
59061
+ return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
59062
+ }
59063
+ }
59064
+ function findReplaceStatus(session) {
59065
+ const total = session.matches.length;
59066
+ return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
59067
+ }
59068
+ function findReplaceTarget(session) {
59069
+ const match = session.current >= 0 ? session.matches[session.current] : void 0;
59070
+ if (!match) {
59071
+ return null;
59072
+ }
59073
+ return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
59074
+ }
59075
+ function matchKey(match) {
59076
+ return JSON.stringify([
59077
+ match.slideIndex,
59078
+ match.elementId,
59079
+ match.elementPath ?? null,
59080
+ match.tableCell ?? null,
59081
+ match.smartArtNodeId ?? null,
59082
+ match.notes ?? false,
59083
+ match.chartTitle ?? false,
59084
+ match.chartSeriesIndex ?? null,
59085
+ match.chartCategoryIndex ?? null,
59086
+ match.segmentIndex,
59087
+ match.startOffset,
59088
+ match.length
59089
+ ]);
59090
+ }
59091
+ function planFindReplace(session, slides, scope) {
59092
+ const found = search(slides, session);
59093
+ let matches = found;
59094
+ let index = -1;
59095
+ if (scope === "current") {
59096
+ const current = session.current >= 0 ? session.matches[session.current] : void 0;
59097
+ const key = current ? matchKey(current) : null;
59098
+ index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
59099
+ matches = index >= 0 ? [found[index]] : [];
59100
+ }
59101
+ if (matches.length === 0 || matches.some((match) => match.readOnly)) {
59102
+ return null;
59103
+ }
59104
+ return { scope, matches, replacement: session.replacement, count: found.length, index };
59105
+ }
59106
+
59107
+ // src/pptx/render/find-replace-session-actions.ts
59108
+ function findReplaceSessionActions(store, host2) {
59109
+ const apply7 = (event) => {
59110
+ const current = store.get();
59111
+ const next2 = reduceFindReplaceSession(current, event);
59112
+ if (next2 !== current) {
59113
+ store.set(next2);
59114
+ }
59115
+ return next2 !== current;
59116
+ };
59117
+ const show = () => {
59118
+ const target = findReplaceTarget(store.get());
59119
+ if (target) {
59120
+ host2.navigate(target);
59121
+ }
59122
+ };
59123
+ const step2 = (direction) => {
59124
+ apply7({ type: "step", direction });
59125
+ show();
59126
+ };
59127
+ const slidesChanged = () => {
59128
+ if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
59129
+ show();
59130
+ }
59131
+ };
59132
+ const replace = (scope) => {
59133
+ const slides = host2.slides();
59134
+ const plan = planFindReplace(store.get(), slides, scope);
59135
+ if (!plan) {
59136
+ return 0;
59137
+ }
59138
+ const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
59139
+ if (result.replacements === 0) {
59140
+ return 0;
59141
+ }
59142
+ host2.commit(result.slides, scope);
59143
+ apply7({ type: "replaced", plan, slides });
59144
+ slidesChanged();
59145
+ return result.replacements;
59146
+ };
59147
+ return {
59148
+ search: (change = {}) => {
59149
+ apply7({ type: "search", slides: host2.slides(), ...change });
59150
+ show();
59151
+ },
59152
+ setReplacement: (replacement) => {
59153
+ apply7({ type: "setReplacement", replacement });
59154
+ },
59155
+ next: () => step2(1),
59156
+ previous: () => step2(-1),
59157
+ replaceCurrent: () => replace("current"),
59158
+ replaceAll: () => replace("all"),
59159
+ slidesChanged,
59160
+ close: () => {
59161
+ apply7({ type: "close" });
59162
+ }
59163
+ };
59164
+ }
59165
+
59166
+ // src/pptx/render/building-blocks/find-bar-controller.ts
59167
+ function createFindBarController(host2) {
59168
+ const store = chunk3RIGT7H6_cjs.createControllerStore({
59169
+ open: false,
59170
+ session: INITIAL_FIND_REPLACE_SESSION
59171
+ });
59172
+ const actions = findReplaceSessionActions(
59173
+ {
59174
+ get: () => store.getSnapshot().session,
59175
+ set: (session) => store.update((current) => ({ ...current, session }))
59176
+ },
59177
+ host2
59178
+ );
59179
+ const setOpen = (open) => {
59180
+ if (store.getSnapshot().open === open) {
59181
+ return;
59182
+ }
59183
+ if (!open) {
59184
+ actions.close();
59185
+ }
59186
+ store.update((current) => ({ ...current, open }));
59187
+ };
59188
+ return {
59189
+ getSnapshot: store.getSnapshot,
59190
+ subscribe: store.subscribe,
59191
+ setOpen,
59192
+ toggle: () => setOpen(!store.getSnapshot().open),
59193
+ slidesChanged: () => actions.slidesChanged(),
59194
+ port() {
59195
+ const { open, session } = store.getSnapshot();
59196
+ return {
59197
+ open,
59198
+ setOpen,
59199
+ query: session.query,
59200
+ replacement: session.replacement,
59201
+ options: session.options,
59202
+ matches: session.matches,
59203
+ currentIndex: session.current,
59204
+ setQuery: (query) => actions.search({ query }),
59205
+ setReplacement: (replacement) => actions.setReplacement(replacement),
59206
+ setOptions: (change) => actions.search({ options: change }),
59207
+ find: () => actions.search(),
59208
+ navigate: (delta) => delta > 0 ? actions.next() : actions.previous(),
59209
+ replaceCurrent: () => void actions.replaceCurrent(),
59210
+ replaceAll: () => void actions.replaceAll()
59211
+ };
59212
+ }
59213
+ };
59214
+ }
59215
+
59216
+ // src/pptx/render/building-blocks/find-layout.ts
59217
+ function buildFindReplaceActions(port, refuseReplace) {
59218
+ const { matches, currentIndex } = port;
59219
+ return {
59220
+ open: port.open,
59221
+ setOpen: port.setOpen,
59222
+ query: port.query,
59223
+ replacement: port.replacement,
59224
+ options: port.options,
59225
+ matches,
59226
+ currentIndex,
59227
+ currentMatch: matches[currentIndex] ?? null,
59228
+ setQuery: port.setQuery,
59229
+ setReplacement: port.setReplacement,
59230
+ setOptions: port.setOptions,
59231
+ find: port.find,
59232
+ next: () => port.navigate(1),
59233
+ previous: () => port.navigate(-1),
59234
+ replaceCurrent: () => refuseReplace() ?? (matches[currentIndex] === void 0 ? buildingBlockFailure("no-match") : (port.replaceCurrent(), BUILDING_BLOCK_OK)),
59235
+ replaceAll: () => refuseReplace() ?? (matches.length === 0 ? buildingBlockFailure("no-match") : (port.replaceAll(), BUILDING_BLOCK_OK))
59236
+ };
59237
+ }
59238
+ function findHighlightTargets(matches, currentIndex, slideIndex) {
59239
+ const targets = /* @__PURE__ */ new Map();
59240
+ matches.forEach((match, index) => {
59241
+ if (match.slideIndex === slideIndex) {
59242
+ targets.set(
59243
+ match.elementId,
59244
+ (targets.get(match.elementId) ?? false) || index === currentIndex
59245
+ );
59246
+ }
59247
+ });
59248
+ return [...targets].map(([elementId, current]) => ({ elementId, current }));
59249
+ }
59250
+ function buildLayoutActions(deps) {
59251
+ const apply7 = async (path, requireListed) => {
59252
+ const denied = deps.refuse("applyLayout");
59253
+ if (denied) {
59254
+ return denied;
59255
+ }
59256
+ if (requireListed && !deps.getScopedLayouts().some((layout) => layout.path === path)) {
59257
+ return buildingBlockFailure("unknown-layout");
59258
+ }
59259
+ try {
59260
+ await deps.applyLayout(path);
59261
+ return BUILDING_BLOCK_OK;
59262
+ } catch {
59263
+ return buildingBlockFailure("unknown-layout");
59264
+ }
59265
+ };
59266
+ const reset = async () => {
59267
+ const path = chunkCWWL7MCL_cjs.resetSlideLayoutPath(deps.getActiveSlide());
59268
+ if (path === void 0) {
59269
+ return buildingBlockFailure("no-layout");
59270
+ }
59271
+ return deps.refuse("resetLayout") ?? apply7(path, false);
59272
+ };
59273
+ return {
59274
+ layout: {
59275
+ current: deps.scopedLayouts.find((layout) => layout.path === deps.activeSlide?.layoutPath),
59276
+ currentPath: deps.activeSlide?.layoutPath,
59277
+ available: deps.scopedLayouts,
59278
+ apply: (path) => apply7(path, true),
59279
+ reset
59280
+ },
59281
+ apply: apply7,
59282
+ reset
59283
+ };
59284
+ }
59285
+
59286
+ // src/pptx/render/building-blocks/find-highlight-dom.ts
59287
+ var FIND_MATCH_ATTRIBUTE = "data-pptx-find-match";
59288
+ function markFindHighlights(root, targets) {
59289
+ const marks = new Map(
59290
+ targets.map((target) => [target.elementId, target.current ? "current" : "match"])
59291
+ );
59292
+ for (const node of root.querySelectorAll(`[${FIND_MATCH_ATTRIBUTE}]`)) {
59293
+ if (!marks.has(node.getAttribute("data-element-id") ?? "")) {
59294
+ node.removeAttribute(FIND_MATCH_ATTRIBUTE);
59295
+ }
59296
+ }
59297
+ if (marks.size === 0) {
59298
+ return;
59299
+ }
59300
+ for (const node of root.querySelectorAll("[data-element-id]")) {
59301
+ const mark = marks.get(node.getAttribute("data-element-id") ?? "");
59302
+ if (mark && node.getAttribute(FIND_MATCH_ATTRIBUTE) !== mark) {
59303
+ node.setAttribute(FIND_MATCH_ATTRIBUTE, mark);
59304
+ }
59305
+ }
59306
+ }
59307
+ function syncFindHighlights(root, matches, currentIndex, slideIndex) {
59308
+ markFindHighlights(root, findHighlightTargets(matches, currentIndex, slideIndex));
59309
+ }
59310
+
59311
+ // src/pptx/render/building-blocks/groups/file-dialog-groups.ts
59312
+ var passwordProtectionGroup = defineBuildingBlockActionGroup({
59313
+ id: "passwordProtection",
59314
+ create: (context3, port) => buildPasswordProtectionActions({
59315
+ state: describePasswordProtection(port.input()),
59316
+ customProperties: () => port.customProperties(),
59317
+ refuse: () => context3.refuse("passwordProtection"),
59318
+ applyOpenPassword: (password) => port.applyOpenPassword(password),
59319
+ applyCustomProperties: (next2) => port.applyCustomProperties(next2),
59320
+ markDirty: () => port.markDirty(),
59321
+ complete: (result) => context3.complete("passwordProtection", result)
59322
+ })
59323
+ });
59324
+ var documentPropertiesGroup = defineBuildingBlockActionGroup({
59325
+ id: "documentProperties",
59326
+ create: (context3, port) => buildDocumentPropertiesActions({
59327
+ current: () => port.current(),
59328
+ refuse: () => context3.refuse("documentProperties"),
59329
+ applyUpdate: (update) => port.applyUpdate(update),
59330
+ complete: (result) => context3.complete("documentProperties", result)
59331
+ })
59332
+ });
59333
+ var fontEmbeddingGroup = defineBuildingBlockActionGroup({
59334
+ id: "fontEmbedding",
59335
+ create: (context3, port) => buildFontEmbeddingActions({
59336
+ state: describeFontEmbeddingState(port.input()),
59337
+ refuse: () => context3.refuse("fontEmbedding"),
59338
+ latest: () => {
59339
+ const { embedFonts, canEmbed } = describeFontEmbeddingState(port.input());
59340
+ return { embedFonts, canEmbed };
59341
+ },
59342
+ apply: (enabled) => port.apply(enabled),
59343
+ markDirty: () => port.markDirty(),
59344
+ complete: (result) => context3.complete("fontEmbedding", result)
59345
+ })
59346
+ });
59347
+ var digitalSignaturesGroup = defineBuildingBlockActionGroup({
59348
+ id: "digitalSignatures",
59349
+ create: (context3, port) => buildSignatureActions({
59350
+ state: describeSignaturesState({ signed: port.signed(), count: port.count() }),
59351
+ content: () => port.content(),
59352
+ refuse: () => context3.refuse("digitalSignatures"),
59353
+ markDirty: () => port.markDirty(),
59354
+ complete: (result) => context3.complete("digitalSignatures", result)
59355
+ })
59356
+ });
59357
+
59358
+ // src/pptx/render/building-blocks/groups/show-dialog-groups.ts
59359
+ var settingsContext = (port) => ({
59360
+ slideCount: port.slideCount(),
59361
+ customShows: [...port.customShows()]
59362
+ });
59363
+ var setUpSlideShowGroup = defineBuildingBlockActionGroup({
59364
+ id: "setUpSlideShow",
59365
+ create: (context3, port) => ({
59366
+ current: describeSlideShowSettings(port.presentationProperties(), settingsContext(port)),
59367
+ apply: (patch) => {
59368
+ const denied = context3.refuse("setUpSlideShow");
59369
+ if (denied) {
59370
+ return denied;
59371
+ }
59372
+ const resolved2 = resolveSlideShowSettings(
59373
+ port.presentationProperties(),
59374
+ patch,
59375
+ settingsContext(port)
59376
+ );
59377
+ if (!resolved2.ok) {
59378
+ return buildingBlockFailure(resolved2.code);
59379
+ }
59380
+ port.save(resolved2.settings);
59381
+ return context3.complete("setUpSlideShow", BUILDING_BLOCK_OK);
59382
+ }
59383
+ })
59384
+ });
59385
+ var customShowsGroup = defineBuildingBlockActionGroup({
59386
+ id: "customShows",
59387
+ create: (context3, port) => {
59388
+ const edit = (change) => {
59389
+ const denied = context3.refuse("customShows");
59390
+ if (denied) {
59391
+ return denied;
59392
+ }
59393
+ const outcome = applyCustomShowEdit(port.customShows(), port.slides(), change);
59394
+ if (!outcome.ok) {
59395
+ return buildingBlockFailure(outcome.code);
59396
+ }
59397
+ port.commit(outcome.shows, outcome.slides);
59398
+ return BUILDING_BLOCK_OK;
59399
+ };
59400
+ return {
59401
+ ...describeCustomShows(port.customShows(), port.slides()),
59402
+ activeId: port.activeId(),
59403
+ create: (name, slideRIds) => edit({ kind: "create", name, ...slideRIds ? { slideRIds } : {} }),
59404
+ rename: (id, name) => edit({ kind: "rename", id, name }),
59405
+ setSlides: (id, slideRIds) => edit({ kind: "setSlides", id, slideRIds }),
59406
+ copy: (id, name) => edit({ kind: "copy", id, ...name === void 0 ? {} : { name } }),
59407
+ remove: (id) => edit({ kind: "remove", id }),
59408
+ start: (id) => {
59409
+ if (!context3.ready()) {
59410
+ return buildingBlockFailure("not-ready");
59411
+ }
59412
+ const target = resolveCustomShowStart(port.customShows(), port.slides(), id);
59413
+ if (!target.ok) {
59414
+ return buildingBlockFailure(target.code);
59415
+ }
59416
+ port.start(id);
59417
+ return context3.complete("customShows", BUILDING_BLOCK_OK);
59418
+ }
59419
+ };
59420
+ }
59421
+ });
59422
+ var broadcastGroup = defineBuildingBlockActionGroup({
59423
+ id: "broadcast",
59424
+ create: (_context, _port) => describeBroadcastSupport()
59425
+ });
59426
+ var shortcutsGroup = defineBuildingBlockActionGroup({
59427
+ id: "shortcuts",
59428
+ create: (_context, port) => ({
59429
+ open: port.open(),
59430
+ setOpen: (open) => port.setOpen(open),
59431
+ toggle: () => port.toggle(),
59432
+ catalogue: describeShortcutCatalogue((key) => port.translate(key))
59433
+ })
59434
+ });
59435
+
59436
+ // src/pptx/render/building-blocks/groups/index.ts
59437
+ var BUILDING_BLOCK_GROUP_IDS = [
59438
+ "passwordProtection",
59439
+ "documentProperties",
59440
+ "fontEmbedding",
59441
+ "digitalSignatures",
59442
+ "setUpSlideShow",
59443
+ "customShows",
59444
+ "broadcast",
59445
+ "shortcuts"
59446
+ ];
59447
+ function registerBuildingBlockGroups(session, ports) {
59448
+ const stops = [
59449
+ session.register(passwordProtectionGroup, ports.passwordProtection),
59450
+ session.register(documentPropertiesGroup, ports.documentProperties),
59451
+ session.register(fontEmbeddingGroup, ports.fontEmbedding),
59452
+ session.register(digitalSignaturesGroup, ports.digitalSignatures),
59453
+ session.register(setUpSlideShowGroup, ports.setUpSlideShow),
59454
+ session.register(customShowsGroup, ports.customShows),
59455
+ session.register(broadcastGroup, null),
59456
+ session.register(shortcutsGroup, ports.shortcuts)
59457
+ ];
59458
+ return () => {
59459
+ for (const stop of stops) {
59460
+ stop();
59461
+ }
59462
+ };
59463
+ }
59464
+
59465
+ // src/pptx/render/building-blocks/hyperlink-edit-data.ts
59466
+ var HYPERLINK_ACTION_VERB_MAP = {
59467
+ "ppaction://hlinkshowjump?jump=nextslide": "nextSlide",
59468
+ "ppaction://hlinkshowjump?jump=previousslide": "prevSlide",
59469
+ "ppaction://hlinkshowjump?jump=firstslide": "firstSlide",
59470
+ "ppaction://hlinkshowjump?jump=lastslide": "lastSlide",
59471
+ "ppaction://hlinkshowjump?jump=endshow": "endShow"
59472
+ };
59473
+ var HYPERLINK_ACTION_VERB_TO_PPACTION = {
59474
+ nextSlide: "ppaction://hlinkshowjump?jump=nextslide",
59475
+ prevSlide: "ppaction://hlinkshowjump?jump=previousslide",
59476
+ firstSlide: "ppaction://hlinkshowjump?jump=firstslide",
59477
+ lastSlide: "ppaction://hlinkshowjump?jump=lastslide",
59478
+ endShow: "ppaction://hlinkshowjump?jump=endshow"
59479
+ };
59480
+ function detectHyperlinkTargetType(url, action) {
59481
+ if (action && action.startsWith("ppaction://")) {
59482
+ if (action.includes("hlinksldjump")) {
59483
+ return "slide";
59484
+ }
59485
+ return "action";
59486
+ }
59487
+ if (!url) {
59488
+ return "url";
59489
+ }
59490
+ if (url.startsWith("mailto:")) {
59491
+ return "email";
59492
+ }
59493
+ if (/^[a-zA-Z]:\\|^\.\.?[/\\]|^file:/i.test(url)) {
59494
+ return "file";
59495
+ }
59496
+ return "url";
59497
+ }
59498
+ function parseHyperlinkEmailUrl(url) {
59499
+ if (!url.startsWith("mailto:")) {
59500
+ return { address: url, subject: "" };
59501
+ }
59502
+ const withoutScheme = url.slice(7);
59503
+ const qIdx = withoutScheme.indexOf("?");
59504
+ if (qIdx < 0) {
59505
+ return { address: withoutScheme, subject: "" };
59506
+ }
59507
+ const address = withoutScheme.slice(0, qIdx);
59508
+ const params = new URLSearchParams(withoutScheme.slice(qIdx + 1));
59509
+ return { address, subject: params.get("subject") || "" };
59510
+ }
59511
+ function parseHyperlinkSlideNumber(url, action) {
59512
+ if (action === "ppaction://hlinksldjump" && url) {
59513
+ const match = url.match(/slide(\d+)\.xml$/i);
59514
+ if (match?.[1]) {
59515
+ return parseInt(match[1], 10);
59516
+ }
59517
+ }
59518
+ if (url) {
59519
+ const hashMatch = url.match(/#\s*Slide\s+(\d+)/i);
59520
+ if (hashMatch?.[1]) {
59521
+ return parseInt(hashMatch[1], 10);
59522
+ }
59523
+ }
59524
+ return 1;
59525
+ }
59526
+ function resolveHyperlinkEditResult(data) {
59527
+ const tooltip = data.tooltip.trim() || void 0;
59528
+ const withTooltip = (value) => tooltip === void 0 ? value : { ...value, tooltip };
59529
+ switch (data.targetType) {
59530
+ case "email": {
59531
+ const mailto = data.emailSubject ? `mailto:${data.emailAddress}?subject=${encodeURIComponent(data.emailSubject)}` : `mailto:${data.emailAddress}`;
59532
+ return withTooltip({ url: mailto });
59533
+ }
59534
+ case "slide":
59535
+ return withTooltip({
59536
+ url: `slide${data.slideNumber}.xml`,
59537
+ action: "ppaction://hlinksldjump"
59538
+ });
59539
+ case "file":
59540
+ return withTooltip({ url: data.filePath });
59541
+ case "action":
59542
+ return withTooltip({ url: "", action: HYPERLINK_ACTION_VERB_TO_PPACTION[data.actionVerb] });
59543
+ case "url":
59544
+ default:
59545
+ return withTooltip({ url: data.url });
59546
+ }
59547
+ }
59548
+ function hyperlinkEditDataFromAction(actionClick) {
59549
+ if (!actionClick || !actionClick.url && !actionClick.action) {
59550
+ return null;
59551
+ }
59552
+ const { url, action, tooltip } = actionClick;
59553
+ const targetType = detectHyperlinkTargetType(url, action);
59554
+ const email = parseHyperlinkEmailUrl(url ?? "");
59555
+ return {
59556
+ targetType,
59557
+ url: targetType === "url" ? url ?? "" : "",
59558
+ tooltip: tooltip ?? "",
59559
+ emailAddress: targetType === "email" ? email.address : "",
59560
+ emailSubject: targetType === "email" ? email.subject : "",
59561
+ slideNumber: parseHyperlinkSlideNumber(url, action),
59562
+ filePath: targetType === "file" ? url ?? "" : "",
59563
+ actionVerb: action && HYPERLINK_ACTION_VERB_MAP[action.toLowerCase()] || "nextSlide"
59564
+ };
59565
+ }
59566
+ function hyperlinkEditPatch(data) {
59567
+ const resolved2 = resolveHyperlinkEditResult(data);
59568
+ if (resolved2.url && !chunkFFWLDANS_cjs.isUrlSafe(resolved2.url)) {
59569
+ return { ok: false, code: "unsafe-url" };
59570
+ }
59571
+ const actionClick = {};
59572
+ if (resolved2.url) {
59573
+ actionClick.url = resolved2.url;
59574
+ }
59575
+ if (resolved2.action !== void 0) {
59576
+ actionClick.action = resolved2.action;
59577
+ }
59578
+ if (resolved2.tooltip !== void 0) {
59579
+ actionClick.tooltip = resolved2.tooltip;
59580
+ }
59581
+ return { ok: true, actionClick };
59582
+ }
59583
+ var MEDIA_AUDIO_SIZE = { width: 420, height: 64 };
59584
+ var MEDIA_VIDEO_MAX_SIZE = { width: 640, height: 360 };
59585
+ function probeVideoSize(doc, dataUrl) {
59586
+ const max = MEDIA_VIDEO_MAX_SIZE;
59587
+ return new Promise((resolve) => {
59588
+ const probe = doc.createElement("video");
59589
+ probe.preload = "metadata";
59590
+ probe.onloadedmetadata = () => {
59591
+ const width = probe.videoWidth || max.width;
59592
+ const height = probe.videoHeight || max.height;
59593
+ if (width > max.width || height > max.height) {
59594
+ const scale3 = Math.min(max.width / width, max.height / height);
59595
+ resolve({ width: Math.round(width * scale3), height: Math.round(height * scale3) });
59596
+ return;
59597
+ }
59598
+ resolve({ width, height });
59599
+ };
59600
+ probe.onerror = () => resolve({ width: max.width, height: max.height });
59601
+ probe.src = dataUrl;
59602
+ });
59603
+ }
59604
+ function mediaElementFromFile(file, canvasSize, doc = document) {
59605
+ const mediaType = classifyMediaType(file.type);
59606
+ if (!mediaType) {
59607
+ return Promise.resolve(null);
59608
+ }
59609
+ return new Promise((resolve) => {
59610
+ const reader = new FileReader();
59611
+ reader.onload = async () => {
59612
+ const dataUrl = typeof reader.result === "string" ? reader.result : "";
59613
+ if (!dataUrl) {
59614
+ resolve(null);
59615
+ return;
59616
+ }
59617
+ const size2 = mediaType === "audio" ? { ...MEDIA_AUDIO_SIZE } : await probeVideoSize(doc, dataUrl);
59618
+ resolve({
59619
+ id: pptx.createEditorId("media"),
59620
+ type: "media",
59621
+ mediaType,
59622
+ mediaMimeType: file.type || void 0,
59623
+ mediaData: dataUrl,
59624
+ x: Math.max(0, Math.round((canvasSize.width - size2.width) / 2)),
59625
+ y: Math.max(0, Math.round((canvasSize.height - size2.height) / 2)),
59626
+ width: size2.width,
59627
+ height: size2.height
59628
+ });
59629
+ };
59630
+ reader.onerror = () => resolve(null);
59631
+ reader.readAsDataURL(file);
59632
+ });
59633
+ }
59634
+
59635
+ // src/pptx/render/building-blocks/mode.ts
59636
+ function resolveBuildingBlockMode(mode, canEdit) {
59637
+ return mode === "edit" && !canEdit ? "preview" : mode;
59638
+ }
59639
+
59640
+ // src/pptx/render/building-blocks/requests.ts
59641
+ var BUILDING_BLOCK_REQUEST_ACTIONS = {
59642
+ image: () => "insertImage",
59643
+ media: () => "insertMedia",
59644
+ hyperlink: () => "hyperlink",
59645
+ smartArt: () => "insertSmartArt",
59646
+ chart: () => "insertChart",
59647
+ equation: (request) => request.existingOmml ? "editEquation" : "insertEquation",
59648
+ passwordProtection: () => "passwordProtection",
59649
+ documentProperties: () => "documentProperties",
59650
+ fontEmbedding: () => "fontEmbedding",
59651
+ digitalSignatures: () => "digitalSignatures",
59652
+ setUpSlideShow: () => "setUpSlideShow",
59653
+ customShows: () => "customShows",
59654
+ shortcuts: () => "shortcuts"
59655
+ };
59656
+ var BUILDING_BLOCK_VIEWABLE_REQUESTS = /* @__PURE__ */ new Set([
59657
+ "passwordProtection",
59658
+ "documentProperties",
59659
+ "fontEmbedding",
59660
+ "digitalSignatures"
59661
+ ]);
59662
+ function buildingBlockRequestAction(request) {
59663
+ const resolve = BUILDING_BLOCK_REQUEST_ACTIONS[request.kind];
59664
+ return resolve(request);
59665
+ }
59666
+ function createBuildingBlockRequests(deps) {
59667
+ const store = chunk3RIGT7H6_cjs.createControllerStore(null);
59668
+ return {
59669
+ getSnapshot: store.getSnapshot,
59670
+ subscribe: store.subscribe,
59671
+ request(next2) {
59672
+ const { available, reason } = deps.state(buildingBlockRequestAction(next2));
59673
+ const allowed = BUILDING_BLOCK_VIEWABLE_REQUESTS.has(next2.kind) ? reason !== "not-ready" : available;
59674
+ if (!allowed) {
59675
+ return false;
59676
+ }
59677
+ store.set(next2);
59678
+ deps.onRequest?.(next2);
59679
+ return true;
59680
+ },
59681
+ complete(kind, result) {
59682
+ if (result.ok) {
59683
+ store.update((current) => current?.kind === kind ? null : current);
59684
+ }
59685
+ return result;
59686
+ },
59687
+ cancel: () => store.set(null),
59688
+ announce(next2, open) {
59689
+ if (open) {
59690
+ store.set(next2);
59691
+ } else {
59692
+ store.update((current) => current?.kind === next2.kind ? null : current);
59693
+ }
59694
+ deps.onRequest?.(next2);
59695
+ }
59696
+ };
59697
+ }
59698
+
59699
+ // src/pptx/render/building-blocks/session.ts
59700
+ function describeBuildingBlockAvailability(input) {
59701
+ return { ...describeBuildingBlockActions(input), ...describeShowDialogActions(input) };
59702
+ }
59703
+ function selectionEquation(element) {
59704
+ const segments = element?.textSegments;
59705
+ const found = segments?.find((segment) => segment.equationXml)?.equationXml;
59706
+ return found ? found : null;
59707
+ }
59708
+ function createPptxBuildingBlockSession(port) {
59709
+ const availability = () => describeBuildingBlockAvailability(port.availabilityInput());
59710
+ const refuse = (id) => {
59711
+ const { available, reason } = availability()[id];
59712
+ return available ? void 0 : buildingBlockFailure(reason ?? "not-ready");
59713
+ };
59714
+ const requests = createBuildingBlockRequests({
59715
+ state: (id) => availability()[id],
59716
+ onRequest: (request) => port.onRequest?.(request)
59717
+ });
59718
+ const context3 = createBuildingBlockGroupContext(
59719
+ requests,
59720
+ refuse,
59721
+ () => port.availabilityInput().ready
59722
+ );
59723
+ const groups = /* @__PURE__ */ new Map();
59724
+ const gated = (id, kind, run2) => {
59725
+ const denied = refuse(id);
59726
+ if (denied) {
59727
+ return denied;
59728
+ }
59729
+ run2();
59730
+ return requests.complete(kind, BUILDING_BLOCK_OK);
59731
+ };
59732
+ const insertImage = async (file) => {
59733
+ const denied = refuse("insertImage");
59734
+ if (denied) {
59735
+ return denied;
59736
+ }
59737
+ const checked = validateHostImageFile(file, port.fileLimits()?.imageBytes);
59738
+ if (!checked.ok) {
59739
+ return checked;
59740
+ }
59741
+ const before = port.target();
59742
+ const decode = port.decodeImage ?? chunkZJFN5POF_cjs.createImageElementFromFile;
59743
+ const element = await decode(file, port.canvasSize());
59744
+ if (!element) {
59745
+ return buildingBlockFailure("decode-failed");
59746
+ }
59747
+ const now = port.target();
59748
+ if (now.deck !== before.deck || now.slideId !== before.slideId) {
59749
+ return buildingBlockFailure("stale-target");
59750
+ }
59751
+ const stillDenied = refuse("insertImage");
59752
+ if (stillDenied) {
59753
+ return stillDenied;
59754
+ }
59755
+ port.addElement(element);
59756
+ return requests.complete("image", BUILDING_BLOCK_OK);
59757
+ };
59758
+ const insertMedia = async (file) => {
59759
+ const denied = refuse("insertMedia");
59760
+ if (denied) {
59761
+ return denied;
59762
+ }
59763
+ const checked = validateHostMediaFile(file, port.fileLimits()?.mediaBytes);
59764
+ if (!checked.ok) {
59765
+ return checked;
59766
+ }
59767
+ const before = port.target();
59768
+ const sameTarget = () => {
59769
+ const now = port.target();
59770
+ return now.deck === before.deck && now.slideId === before.slideId && now.slideIndex === before.slideIndex && availability().insertMedia.available;
59771
+ };
59772
+ return requests.complete("media", await port.insertMediaFile(file, sameTarget));
59773
+ };
59774
+ const layoutActions = () => buildLayoutActions({
59775
+ activeSlide: port.activeSlide(),
59776
+ scopedLayouts: port.scopedLayouts(),
59777
+ getScopedLayouts: () => port.scopedLayouts(),
59778
+ getActiveSlide: () => port.activeSlide(),
59779
+ refuse: (id) => refuse(id),
59780
+ applyLayout: (path) => port.applyLayout(path)
59781
+ });
59782
+ const hyperlinkApply = (data) => {
59783
+ const denied = refuse("hyperlink");
59784
+ if (denied) {
59785
+ return denied;
59786
+ }
59787
+ const resolved2 = resolveHyperlinkEditResult(data);
59788
+ if (!resolved2.url && !resolved2.action) {
59789
+ return buildingBlockFailure("invalid-target");
59790
+ }
59791
+ return requests.complete("hyperlink", port.applyHyperlink(data));
59792
+ };
59793
+ const hyperlinkRemove = () => refuse("removeHyperlink") ?? port.removeHyperlink();
59794
+ const smartArtInsert = (layout, items) => gated("insertSmartArt", "smartArt", () => port.insertSmartArt(layout, items));
59795
+ const chartInsert = (kind, options) => {
59796
+ if (options?.data !== void 0 && !isValidInsertChartData(options.data)) {
59797
+ return refuse("insertChart") ?? buildingBlockFailure("invalid-data");
59798
+ }
59799
+ return gated("insertChart", "chart", () => port.insertChart(kind, options));
59800
+ };
59801
+ const equationInsert = (omml) => gated("insertEquation", "equation", () => port.insertEquation(omml));
59802
+ const equationUpdate = (omml) => gated("editEquation", "equation", () => port.updateEquation(omml));
59803
+ const cancel = () => {
59804
+ requests.cancel();
59805
+ port.onCancel?.();
59806
+ };
59807
+ return {
59808
+ requests,
59809
+ context: context3,
59810
+ request: (next2) => requests.request(next2),
59811
+ announce: (next2, open) => requests.announce(next2, open),
59812
+ applyLayout: (path) => layoutActions().apply(path, true),
59813
+ resetSlide: () => layoutActions().reset(),
59814
+ register(group, groupPort) {
59815
+ const create = () => group.create(context3, groupPort);
59816
+ groups.set(group.id, create);
59817
+ return () => {
59818
+ if (groups.get(group.id) === create) {
59819
+ groups.delete(group.id);
59820
+ }
59821
+ };
59822
+ },
59823
+ actions() {
59824
+ const selected = port.selectedElement();
59825
+ const extensions = {};
59826
+ for (const [id, create] of groups) {
59827
+ Reflect.set(extensions, id, create());
59828
+ }
59829
+ return {
59830
+ ...extensions,
59831
+ availability: availability(),
59832
+ unmountedDialogActions: BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS,
59833
+ pending: requests.getSnapshot(),
59834
+ cancel,
59835
+ insertImage,
59836
+ insertMedia,
59837
+ hyperlink: {
59838
+ current: hyperlinkEditDataFromAction(selected?.actionClick),
59839
+ slideCount: port.slideCount(),
59840
+ apply: hyperlinkApply,
59841
+ remove: hyperlinkRemove
59842
+ },
59843
+ smartArt: { insert: smartArtInsert },
59844
+ chart: { insert: chartInsert },
59845
+ equation: {
59846
+ current: selectionEquation(selected),
59847
+ insert: equationInsert,
59848
+ update: equationUpdate
59849
+ },
59850
+ findReplace: buildFindReplaceActions(port.findReplace(), () => refuse("replace")),
59851
+ layout: layoutActions().layout
59852
+ };
59853
+ }
59854
+ };
59855
+ }
59856
+
59857
+ // src/pptx/render/building-blocks/toolbar.ts
59858
+ var LABELS = {
59859
+ undo: "pptx.toolbar.undo",
59860
+ redo: "pptx.toolbar.redo",
59861
+ insertImage: "pptx.insert.pictures",
59862
+ insertMedia: "pptx.ribbon.media",
59863
+ insertChart: "pptx.ribbon.chart",
59864
+ insertSmartArt: "pptx.ribbon.smartArt",
59865
+ insertEquation: "pptx.ribbon.equation",
59866
+ hyperlink: "pptx.ribbon.link",
59867
+ find: "pptx.toolbar.findAndReplace",
59868
+ resetLayout: "pptx.ribbon.groupReset",
59869
+ zoomOut: "pptx.statusBar.zoomOut",
59870
+ zoomIn: "pptx.statusBar.zoomIn",
59871
+ zoomToFit: "pptx.statusBar.zoomToFit",
59872
+ previousSlide: "pptx.mobileBar.previousSlide",
59873
+ nextSlide: "pptx.mobileBar.nextSlide"
59874
+ };
59875
+ var HIDDEN_BY = {
59876
+ undo: "undo",
59877
+ redo: "redo",
59878
+ insertImage: "insert",
59879
+ insertMedia: "insert",
59880
+ insertChart: "insert",
59881
+ insertSmartArt: "insert",
59882
+ insertEquation: "insert",
59883
+ hyperlink: "insert",
59884
+ zoomOut: "zoom",
59885
+ zoomIn: "zoom",
59886
+ zoomToFit: "zoom",
59887
+ previousSlide: "navigation",
59888
+ nextSlide: "navigation"
59889
+ };
59890
+ function describeBuildingBlockToolbar(input) {
59891
+ const hidden = new Set(input.hiddenActions ?? []);
59892
+ const control4 = (id, disabled, pressed) => {
59893
+ const by = HIDDEN_BY[id];
59894
+ if (by !== void 0 && hidden.has(by)) {
59895
+ return void 0;
59896
+ }
59897
+ const base2 = { id, labelKey: LABELS[id], disabled };
59898
+ return pressed === void 0 ? base2 : { ...base2, pressed };
59899
+ };
59900
+ const action = (id) => control4(id, !input.availability[id].available);
59901
+ const groups = [
59902
+ ["history", [control4("undo", !input.canUndo), control4("redo", !input.canRedo)]],
59903
+ [
59904
+ "insert",
59905
+ [
59906
+ action("insertImage"),
59907
+ action("insertMedia"),
59908
+ action("insertChart"),
59909
+ action("insertSmartArt"),
59910
+ action("insertEquation"),
59911
+ action("hyperlink")
59912
+ ]
59913
+ ],
59914
+ ["editing", [control4("find", false, input.findOpen), action("resetLayout")]],
59915
+ ["view", [control4("zoomOut", false), control4("zoomIn", false), control4("zoomToFit", false)]],
59916
+ [
59917
+ "navigation",
59918
+ [
59919
+ control4("previousSlide", input.slideIndex <= 0),
59920
+ control4("nextSlide", input.slideIndex >= input.slideCount - 1)
59921
+ ]
59922
+ ]
59923
+ ];
59924
+ return groups.map(([id, controls2]) => ({
59925
+ id,
59926
+ controls: controls2.filter((entry6) => !!entry6)
59927
+ })).filter((group) => group.controls.length > 0);
59928
+ }
59929
+ function runBuildingBlockToolbarControl(id, session, view2) {
59930
+ switch (id) {
59931
+ case "insertImage":
59932
+ session.request({ kind: "image" });
59933
+ return;
59934
+ case "insertMedia":
59935
+ session.request({ kind: "media" });
59936
+ return;
59937
+ case "insertChart":
59938
+ session.request({ kind: "chart" });
59939
+ return;
59940
+ case "insertSmartArt":
59941
+ session.request({ kind: "smartArt" });
59942
+ return;
59943
+ case "insertEquation":
59944
+ session.request({ kind: "equation", existingOmml: null });
59945
+ return;
59946
+ case "hyperlink":
59947
+ session.request({ kind: "hyperlink" });
59948
+ return;
59949
+ case "resetLayout":
59950
+ void session.resetSlide();
59951
+ return;
59952
+ case "find":
59953
+ view2.toggleFind();
59954
+ return;
59955
+ default:
59956
+ view2[id]();
59957
+ }
59958
+ }
59959
+
57731
59960
  // src/pptx/render/template-background-rows.ts
57732
59961
  function resolveTemplateBackgroundRows(activeSlide, slideMasters, fallbackLayoutLabel, fallbackMasterLabel) {
57733
59962
  const result = {};
@@ -58748,35 +60977,6 @@ function homeRow(item4, sectionId, groupKey, group) {
58748
60977
  };
58749
60978
  }
58750
60979
  var homeShapeValue = (value) => value.replace(/^recent:/u, "");
58751
-
58752
- // src/pptx/render/font-embedding.ts
58753
- var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
58754
- function describeFontEmbedding(embeddedFamilies) {
58755
- const seen = /* @__PURE__ */ new Set();
58756
- const families = [];
58757
- for (const raw of embeddedFamilies ?? []) {
58758
- const family2 = raw?.trim();
58759
- if (!family2) {
58760
- continue;
58761
- }
58762
- const key = family2.toLowerCase();
58763
- if (seen.has(key)) {
58764
- continue;
58765
- }
58766
- seen.add(key);
58767
- families.push(family2);
58768
- }
58769
- const hasAny = families.length > 0;
58770
- return {
58771
- embeddedFamilies: families,
58772
- interactive: hasAny,
58773
- initialEnabled: hasAny,
58774
- ...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
58775
- };
58776
- }
58777
- function embeddedFontSaveOptions(embedFonts) {
58778
- return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
58779
- }
58780
60980
  var OFFICE_COLOR_SWATCHES = [
58781
60981
  { hex: "#000000", label: "Black", labelKey: "pptx.colorPicker.standard.black" },
58782
60982
  { hex: "#ffffff", label: "White", labelKey: "pptx.colorPicker.standard.white" },
@@ -60791,42 +62991,6 @@ async function scanAvailableFontFamilies(families, source = browserFontSource())
60791
62991
  }
60792
62992
  }
60793
62993
 
60794
- // src/pptx/render/password-protection.ts
60795
- function getPasswordStrength(password) {
60796
- if (!password) {
60797
- return 0;
60798
- }
60799
- let score2 = 0;
60800
- if (password.length >= 8) {
60801
- score2 += 1;
60802
- }
60803
- if (password.length >= 12) {
60804
- score2 += 1;
60805
- }
60806
- if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
60807
- score2 += 1;
60808
- }
60809
- if (/\d/u.test(password)) {
60810
- score2 += 1;
60811
- }
60812
- if (/[^A-Za-z0-9]/u.test(password)) {
60813
- score2 += 1;
60814
- }
60815
- return Math.min(score2, 4);
60816
- }
60817
- function validatePasswordPair(password, confirmation) {
60818
- if (!password) {
60819
- return "required";
60820
- }
60821
- if (password !== confirmation) {
60822
- return "mismatch";
60823
- }
60824
- if (password.length < 4) {
60825
- return "tooShort";
60826
- }
60827
- return null;
60828
- }
60829
-
60830
62994
  // src/pptx/render/theme-write-queue.ts
60831
62995
  var pendingWrites = /* @__PURE__ */ new WeakMap();
60832
62996
  function startWrite(write) {
@@ -61040,129 +63204,6 @@ function buildDeckSaveOptions(state) {
61040
63204
  };
61041
63205
  }
61042
63206
 
61043
- // src/pptx/render/viewer-preferences.ts
61044
- var DEFAULT_VIEWER_PREFERENCES = {
61045
- autoSave: true,
61046
- spellCheck: false,
61047
- showGrid: false,
61048
- showRulers: false,
61049
- snapToGrid: false,
61050
- reducedMotion: false
61051
- };
61052
- var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
61053
- var VIEWER_SHORTCUT_REFERENCE = [
61054
- { actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
61055
- {
61056
- actionKey: "pptx.toolbar.redo",
61057
- shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
61058
- group: "history"
61059
- },
61060
- { actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
61061
- { actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
61062
- { actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
61063
- {
61064
- actionKey: "pptx.shortcuts.action.duplicateElement",
61065
- shortcut: "Ctrl/Cmd+D",
61066
- group: "editing"
61067
- },
61068
- {
61069
- actionKey: "pptx.shortcuts.action.deleteElement",
61070
- shortcut: "Delete / Backspace",
61071
- group: "editing"
61072
- },
61073
- { actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
61074
- { actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
61075
- { actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
61076
- { actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
61077
- {
61078
- actionKey: "pptx.shortcuts.action.nudgeElementLarge",
61079
- shortcut: "Shift+Arrow keys",
61080
- group: "editing"
61081
- },
61082
- {
61083
- actionKey: "pptx.shortcuts.action.prevSlide",
61084
- shortcut: "Left or Up arrow, Page Up",
61085
- group: "navigation"
61086
- },
61087
- {
61088
- actionKey: "pptx.shortcuts.action.nextSlide",
61089
- shortcut: "Right or Down arrow, Page Down",
61090
- group: "navigation"
61091
- },
61092
- {
61093
- actionKey: "pptx.shortcuts.action.zoomCanvas",
61094
- shortcut: "Ctrl/Cmd+Mouse wheel",
61095
- group: "navigation"
61096
- },
61097
- {
61098
- actionKey: "pptx.shortcuts.action.commitTextEdit",
61099
- shortcut: "Ctrl/Cmd+Enter",
61100
- group: "editing"
61101
- },
61102
- { actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
61103
- // Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
61104
- // bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
61105
- // was advertising neither. The help panel is the keymap's documentation: a
61106
- // chord missing here is a chord nobody discovers.
61107
- { actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
61108
- { actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
61109
- { actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
61110
- { actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
61111
- ];
61112
- var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
61113
- history: "pptx.editorToolbar.history",
61114
- clipboard: "pptx.ribbon.clipboard",
61115
- editing: "pptx.shortcuts.group.editing",
61116
- navigation: "pptx.shortcuts.group.navigation",
61117
- general: "pptx.settings.general"
61118
- };
61119
- function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
61120
- const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
61121
- return order.map((group) => ({
61122
- group,
61123
- labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
61124
- shortcuts: items.filter((item4) => item4.group === group)
61125
- })).filter((bucket) => bucket.shortcuts.length > 0);
61126
- }
61127
- var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
61128
- var VIEWER_PREFERENCE_TOGGLES = [
61129
- { key: "autoSave", labelKey: "pptx.settings.autoSave" },
61130
- { key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
61131
- { key: "showGrid", labelKey: "pptx.settings.showGrid" },
61132
- { key: "showRulers", labelKey: "pptx.settings.showRulers" },
61133
- { key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
61134
- { key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
61135
- ];
61136
- var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
61137
- function updateViewerPreference(preferences, key, value) {
61138
- return { ...preferences, [key]: value };
61139
- }
61140
- function viewerPreferencesFromViewProperties(data, defaults) {
61141
- const slideViewPr = data.viewProperties?.slideViewPr;
61142
- const gridSpacing = data.viewProperties?.gridSpacing;
61143
- return {
61144
- ...defaults,
61145
- snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
61146
- snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
61147
- showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
61148
- gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
61149
- gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
61150
- };
61151
- }
61152
- function viewPropertiesPatchFromPreferences(preferences) {
61153
- const patch = {
61154
- slideViewPr: {
61155
- snapToGrid: preferences.snapToGrid,
61156
- snapToObjects: preferences.snapToObjects ?? false,
61157
- showGuides: preferences.showGuides ?? false
61158
- }
61159
- };
61160
- if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
61161
- patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
61162
- }
61163
- return patch;
61164
- }
61165
-
61166
63207
  // src/pptx/render/presentation-ole-verb.ts
61167
63208
  var SHOW_VERBS = /* @__PURE__ */ new Set([1, -2]);
61168
63209
  function resolveOleVerbTarget(slide, elementId, verb) {
@@ -72533,53 +74574,6 @@ function placeholderPromptDescriptor(element, mode) {
72533
74574
  }
72534
74575
  return { text: promptText, style: PLACEHOLDER_PROMPT_STYLE };
72535
74576
  }
72536
- var NOT_RECOMMENDED = {
72537
- kind: null,
72538
- messageKey: "",
72539
- defaultReadOnly: false,
72540
- requiresPassword: false
72541
- };
72542
- var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
72543
- function isTruthyCustomPropertyValue(value) {
72544
- const normalized = value.trim().toLowerCase();
72545
- return normalized === "true" || normalized === "1" || normalized === "yes";
72546
- }
72547
- function isMarkedAsFinal(customProperties) {
72548
- if (!customProperties) {
72549
- return false;
72550
- }
72551
- return customProperties.some(
72552
- (property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
72553
- );
72554
- }
72555
- function readOnlyRecommendation(data) {
72556
- if (!data) {
72557
- return NOT_RECOMMENDED;
72558
- }
72559
- const verifier = data.modifyVerifier;
72560
- if (verifier && (verifier.hashData || verifier.algorithmName)) {
72561
- return {
72562
- kind: "modifyVerifier",
72563
- messageKey: "pptx.readOnly.modifyVerifierRecommended",
72564
- defaultReadOnly: true,
72565
- // A hash this viewer can actually check requires the password before
72566
- // "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
72567
- // of this check (see the field doc comment above): only a missing hash
72568
- // or an unrecognised algorithm falls back to the plain "Edit anyway"
72569
- // every other recommendation already has.
72570
- requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
72571
- };
72572
- }
72573
- if (isMarkedAsFinal(data.customProperties)) {
72574
- return {
72575
- kind: "markedFinal",
72576
- messageKey: "pptx.readOnly.markedFinal",
72577
- defaultReadOnly: true,
72578
- requiresPassword: false
72579
- };
72580
- }
72581
- return NOT_RECOMMENDED;
72582
- }
72583
74577
  async function checkModifyPassword(verifier, password) {
72584
74578
  if (!verifier?.hashData || !pptx.resolveModifyVerifierAlgorithmName(verifier)) {
72585
74579
  return { ok: false, reason: "unsupported-algorithm" };
@@ -74180,7 +76174,7 @@ var EDIT_POINTS_COMMAND_IDS = [
74180
76174
  "curved-segment",
74181
76175
  "exit"
74182
76176
  ];
74183
- var LABEL_KEYS5 = {
76177
+ var LABEL_KEYS6 = {
74184
76178
  "add-point": "pptx.editPoints.addPoint",
74185
76179
  "delete-point": "pptx.editPoints.deletePoint",
74186
76180
  "delete-segment": "pptx.editPoints.deleteSegment",
@@ -74194,10 +76188,10 @@ var LABEL_KEYS5 = {
74194
76188
  exit: "pptx.editPoints.exit"
74195
76189
  };
74196
76190
  function editPointsCommandLabelKey(id) {
74197
- return LABEL_KEYS5[id];
76191
+ return LABEL_KEYS6[id];
74198
76192
  }
74199
76193
  function entry4(id, extra = {}) {
74200
- return { id, labelKey: LABEL_KEYS5[id], ...extra };
76194
+ return { id, labelKey: LABEL_KEYS6[id], ...extra };
74201
76195
  }
74202
76196
  function pointCount2(geometry) {
74203
76197
  return geometry.subpaths.reduce((sum, sub) => sum + sub.nodes.length, 0);
@@ -75769,6 +77763,16 @@ var EDITOR_RIBBON_CSS = `
75769
77763
  background: color-mix(in oklab, var(--pptx-secondary) 50%, transparent);
75770
77764
  color: var(--pptx-foreground); border-bottom: 1px solid var(--pptx-border);
75771
77765
  }
77766
+ /* Full-screen mode lays the whole ribbon over the slide: the half-transparent fill above
77767
+ would let the slide show through, so the page background goes underneath it. */
77768
+ [data-pptx-editor-chrome] [data-pptx-chrome="ribbon"][data-ribbon-display="fullScreen"][data-ribbon-peek] {
77769
+ background:
77770
+ linear-gradient(
77771
+ color-mix(in oklab, var(--pptx-secondary) 50%, transparent),
77772
+ color-mix(in oklab, var(--pptx-secondary) 50%, transparent)
77773
+ ),
77774
+ var(--pptx-background);
77775
+ }
75772
77776
  [data-pptx-editor-chrome] [data-pptx-chrome="ribbon-primary"] {
75773
77777
  min-height: 32px; height: 32px; padding: 2px 6px; gap: 2px;
75774
77778
  border: 0; box-sizing: border-box;
@@ -78198,14 +80202,27 @@ function homeGalleryApply(family2, controlId, itemId, context3) {
78198
80202
  return spec5?.gallery ? applyRibbonGalleryItem(spec5.gallery.id, itemId, context3) : void 0;
78199
80203
  }
78200
80204
  function fontFamilyItems(catalog, t2) {
78201
- return chunkWBGU7BWD_cjs.buildFontCatalog(catalog).flatMap(
78202
- (group) => group.entries.map((entry6) => ({
78203
- value: entry6.family,
78204
- label: entry6.family,
78205
- group: t2(group.labelKey),
78206
- fontFamily: entry6.family,
78207
- ...entry6.themeRole && { description: t2(`pptx.font.role.${entry6.themeRole}`) }
78208
- }))
80205
+ const groups = chunk2JR2CHTG_cjs.buildFontCatalog({ ...catalog, includeWeightVariants: true });
80206
+ const claimed = new Set(
80207
+ groups.flatMap((group) => group.entries.map((entry6) => entry6.family.toLowerCase()))
80208
+ );
80209
+ return groups.flatMap(
80210
+ (group) => group.entries.flatMap((entry6) => {
80211
+ const row2 = {
80212
+ value: entry6.family,
80213
+ label: entry6.family,
80214
+ group: t2(group.labelKey),
80215
+ fontFamily: entry6.family,
80216
+ ...entry6.themeRole && { description: t2(`pptx.font.role.${entry6.themeRole}`) }
80217
+ };
80218
+ const variants = (entry6.variants ?? []).flatMap(({ family: family2 }) => {
80219
+ const key = family2.toLowerCase();
80220
+ if (claimed.has(key)) return [];
80221
+ claimed.add(key);
80222
+ return [{ value: family2, label: family2, group: row2.group, fontFamily: family2 }];
80223
+ });
80224
+ return [row2, ...variants];
80225
+ })
78209
80226
  );
78210
80227
  }
78211
80228
  function fontPickerHomeControls(input, t2) {
@@ -79368,186 +81385,6 @@ function autosaveStatusKind(status) {
79368
81385
  return state === "saving" || state === "saved" || state === "error" ? state : "idle";
79369
81386
  }
79370
81387
 
79371
- // src/pptx/render/find-replace-session.ts
79372
- var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
79373
- matchCase: false,
79374
- includeNotes: false,
79375
- includeChartTitles: true,
79376
- includeChartData: false
79377
- });
79378
- var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
79379
- query: "",
79380
- replacement: "",
79381
- options: DEFAULT_FIND_REPLACE_OPTIONS,
79382
- matches: Object.freeze([]),
79383
- current: -1,
79384
- pendingRefind: null
79385
- });
79386
- function search(slides, session) {
79387
- return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
79388
- }
79389
- function cursorAfterReplace(pending3, count) {
79390
- if (count === 0) {
79391
- return -1;
79392
- }
79393
- if (pending3.scope === "all") {
79394
- return 0;
79395
- }
79396
- const created = Math.max(0, count - (pending3.count - 1));
79397
- return (pending3.index + created) % count;
79398
- }
79399
- function reduceFindReplaceSession(session, event) {
79400
- switch (event.type) {
79401
- case "search": {
79402
- const next2 = {
79403
- ...session,
79404
- query: event.query ?? session.query,
79405
- options: event.options ? { ...session.options, ...event.options } : session.options,
79406
- pendingRefind: null
79407
- };
79408
- const matches = search(event.slides, next2);
79409
- return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
79410
- }
79411
- case "setReplacement":
79412
- return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
79413
- case "step": {
79414
- const count = session.matches.length;
79415
- if (count === 0) {
79416
- return session;
79417
- }
79418
- const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
79419
- const current = (from + event.direction + count) % count;
79420
- return current === session.current ? session : { ...session, current };
79421
- }
79422
- case "replaced":
79423
- return {
79424
- ...session,
79425
- pendingRefind: {
79426
- scope: event.plan.scope,
79427
- index: event.plan.index,
79428
- count: event.plan.count,
79429
- base: event.slides
79430
- }
79431
- };
79432
- case "slidesChanged": {
79433
- const pending3 = session.pendingRefind;
79434
- if (!pending3 || event.slides === pending3.base) {
79435
- return session;
79436
- }
79437
- const matches = search(event.slides, session);
79438
- return {
79439
- ...session,
79440
- matches,
79441
- current: cursorAfterReplace(pending3, matches.length),
79442
- pendingRefind: null
79443
- };
79444
- }
79445
- case "close":
79446
- return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
79447
- }
79448
- }
79449
- function findReplaceStatus(session) {
79450
- const total = session.matches.length;
79451
- return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
79452
- }
79453
- function findReplaceTarget(session) {
79454
- const match = session.current >= 0 ? session.matches[session.current] : void 0;
79455
- if (!match) {
79456
- return null;
79457
- }
79458
- return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
79459
- }
79460
- function matchKey(match) {
79461
- return JSON.stringify([
79462
- match.slideIndex,
79463
- match.elementId,
79464
- match.elementPath ?? null,
79465
- match.tableCell ?? null,
79466
- match.smartArtNodeId ?? null,
79467
- match.notes ?? false,
79468
- match.chartTitle ?? false,
79469
- match.chartSeriesIndex ?? null,
79470
- match.chartCategoryIndex ?? null,
79471
- match.segmentIndex,
79472
- match.startOffset,
79473
- match.length
79474
- ]);
79475
- }
79476
- function planFindReplace(session, slides, scope) {
79477
- const found = search(slides, session);
79478
- let matches = found;
79479
- let index = -1;
79480
- if (scope === "current") {
79481
- const current = session.current >= 0 ? session.matches[session.current] : void 0;
79482
- const key = current ? matchKey(current) : null;
79483
- index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
79484
- matches = index >= 0 ? [found[index]] : [];
79485
- }
79486
- if (matches.length === 0 || matches.some((match) => match.readOnly)) {
79487
- return null;
79488
- }
79489
- return { scope, matches, replacement: session.replacement, count: found.length, index };
79490
- }
79491
-
79492
- // src/pptx/render/find-replace-session-actions.ts
79493
- function findReplaceSessionActions(store, host2) {
79494
- const apply7 = (event) => {
79495
- const current = store.get();
79496
- const next2 = reduceFindReplaceSession(current, event);
79497
- if (next2 !== current) {
79498
- store.set(next2);
79499
- }
79500
- return next2 !== current;
79501
- };
79502
- const show = () => {
79503
- const target = findReplaceTarget(store.get());
79504
- if (target) {
79505
- host2.navigate(target);
79506
- }
79507
- };
79508
- const step2 = (direction) => {
79509
- apply7({ type: "step", direction });
79510
- show();
79511
- };
79512
- const slidesChanged = () => {
79513
- if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
79514
- show();
79515
- }
79516
- };
79517
- const replace = (scope) => {
79518
- const slides = host2.slides();
79519
- const plan = planFindReplace(store.get(), slides, scope);
79520
- if (!plan) {
79521
- return 0;
79522
- }
79523
- const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
79524
- if (result.replacements === 0) {
79525
- return 0;
79526
- }
79527
- host2.commit(result.slides, scope);
79528
- apply7({ type: "replaced", plan, slides });
79529
- slidesChanged();
79530
- return result.replacements;
79531
- };
79532
- return {
79533
- search: (change = {}) => {
79534
- apply7({ type: "search", slides: host2.slides(), ...change });
79535
- show();
79536
- },
79537
- setReplacement: (replacement) => {
79538
- apply7({ type: "setReplacement", replacement });
79539
- },
79540
- next: () => step2(1),
79541
- previous: () => step2(-1),
79542
- replaceCurrent: () => replace("current"),
79543
- replaceAll: () => replace("all"),
79544
- slidesChanged,
79545
- close: () => {
79546
- apply7({ type: "close" });
79547
- }
79548
- };
79549
- }
79550
-
79551
81388
  // src/pptx/render/viewer-api-guard.ts
79552
81389
  var GATED_VIEWER_EDIT_METHODS = [
79553
81390
  "addSlide",
@@ -79889,7 +81726,7 @@ function createMobileIcon(doc, icon2) {
79889
81726
 
79890
81727
  // src/pptx/web-components/mobile-bar.ts
79891
81728
  var identity = (key) => key;
79892
- var LABEL_KEYS6 = {
81729
+ var LABEL_KEYS7 = {
79893
81730
  slides: "pptx.sections.slides",
79894
81731
  insert: "pptx.mobileBar.insert",
79895
81732
  inspector: "pptx.field.format",
@@ -79960,7 +81797,7 @@ function definePptxMobileBar(registry2) {
79960
81797
  if (id === "notes") {
79961
81798
  button.setAttribute("aria-label", t2("pptx.statusBar.toggleNotes"));
79962
81799
  }
79963
- label2.textContent = t2(LABEL_KEYS6[id]);
81800
+ label2.textContent = t2(LABEL_KEYS7[id]);
79964
81801
  const count = id === "comments" ? s.commentCount ?? 0 : 0;
79965
81802
  badge.hidden = count <= 0;
79966
81803
  badge.textContent = count > 99 ? "99+" : String(count);
@@ -83211,28 +85048,28 @@ function axisView(axis, advanced = false) {
83211
85048
  logScale: axis.scaling.logBase !== void 0,
83212
85049
  numberFormat: axis.numberFormat && !axis.numberFormat.sourceLinked ? axis.numberFormat.formatCode : ""
83213
85050
  };
83214
- const copy = (key, value) => {
85051
+ const copy2 = (key, value) => {
83215
85052
  if (value !== void 0) view2[key] = value;
83216
85053
  };
83217
- copy("min", axis.scaling.min);
83218
- copy("max", axis.scaling.max);
83219
- copy("logBase", axis.scaling.logBase);
83220
- copy("majorUnit", axis.majorUnit);
83221
- copy("minorUnit", axis.minorUnit);
83222
- copy("crosses", axis.crosses);
83223
- copy("crossesAt", axis.crossesAt);
83224
- copy("displayUnits", axis.displayUnits?.builtInUnit);
83225
- copy("majorTickMark", axis.majorTickMark);
83226
- copy("minorTickMark", axis.minorTickMark);
83227
- copy("tickLabelPosition", axis.tickLabelPosition);
85054
+ copy2("min", axis.scaling.min);
85055
+ copy2("max", axis.scaling.max);
85056
+ copy2("logBase", axis.scaling.logBase);
85057
+ copy2("majorUnit", axis.majorUnit);
85058
+ copy2("minorUnit", axis.minorUnit);
85059
+ copy2("crosses", axis.crosses);
85060
+ copy2("crossesAt", axis.crossesAt);
85061
+ copy2("displayUnits", axis.displayUnits?.builtInUnit);
85062
+ copy2("majorTickMark", axis.majorTickMark);
85063
+ copy2("minorTickMark", axis.minorTickMark);
85064
+ copy2("tickLabelPosition", axis.tickLabelPosition);
83228
85065
  if (advanced) {
83229
85066
  view2.title = axis.title?.text ?? "";
83230
85067
  if (axis.numberFormat) view2.numberFormatSourceLinked = axis.numberFormat.sourceLinked ?? true;
83231
85068
  if (axis.kind === "date") {
83232
85069
  view2.timeUnitsEditable = true;
83233
- copy("baseTimeUnit", axis.baseTimeUnit);
83234
- copy("majorTimeUnit", axis.majorTimeUnit);
83235
- copy("minorTimeUnit", axis.minorTimeUnit);
85070
+ copy2("baseTimeUnit", axis.baseTimeUnit);
85071
+ copy2("majorTimeUnit", axis.majorTimeUnit);
85072
+ copy2("minorTimeUnit", axis.minorTimeUnit);
83236
85073
  }
83237
85074
  }
83238
85075
  return view2;
@@ -83358,13 +85195,13 @@ function chartSpaceFormatSource(space, options = {}) {
83358
85195
  labelOptions: labels
83359
85196
  };
83360
85197
  }
83361
- var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkUFJBHFSD_cjs.CHART_FORMAT_LOCALES, "en");
85198
+ var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunk3JGYWDMR_cjs.CHART_FORMAT_LOCALES, "en");
83362
85199
  function chartFormatTranslator(locale, override) {
83363
- const strings = chunkUFJBHFSD_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
85200
+ const strings = chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
83364
85201
  return (key, params, fallback) => {
83365
85202
  const own = override?.(key, params, fallback);
83366
85203
  if (own && own !== key) return own;
83367
- return strings[key] ?? chunkUFJBHFSD_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
85204
+ return strings[key] ?? chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
83368
85205
  };
83369
85206
  }
83370
85207
 
@@ -88485,7 +90322,7 @@ function definePptxInsertSmartArtDialog(registry2) {
88485
90322
  if (this.#live || this.#draw) {
88486
90323
  return;
88487
90324
  }
88488
- this.#live = import('./smartart-insert-preview-WYVZOCHF.cjs').then((module) => {
90325
+ this.#live = import('./smartart-insert-preview-WPIGM6UQ.cjs').then((module) => {
88489
90326
  if (this.#draw || !this.#picker) {
88490
90327
  return;
88491
90328
  }
@@ -97439,6 +99276,11 @@ exports.BI_LEVEL_THRESHOLDS = BI_LEVEL_THRESHOLDS;
97439
99276
  exports.BOTTOM_TRIGGER_FRACTION = BOTTOM_TRIGGER_FRACTION;
97440
99277
  exports.BRIGHTNESS_CONTRAST_STEPS = BRIGHTNESS_CONTRAST_STEPS;
97441
99278
  exports.BROADCAST_THROTTLE_MS = BROADCAST_THROTTLE_MS;
99279
+ exports.BUILDING_BLOCK_GROUP_IDS = BUILDING_BLOCK_GROUP_IDS;
99280
+ exports.BUILDING_BLOCK_OK = BUILDING_BLOCK_OK;
99281
+ exports.BUILDING_BLOCK_REQUEST_ACTIONS = BUILDING_BLOCK_REQUEST_ACTIONS;
99282
+ exports.BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS;
99283
+ exports.BUILDING_BLOCK_VIEWABLE_REQUESTS = BUILDING_BLOCK_VIEWABLE_REQUESTS;
97442
99284
  exports.CANVAS_CONTEXT_MENU_COMMAND_IDS = CANVAS_CONTEXT_MENU_COMMAND_IDS;
97443
99285
  exports.CANVAS_DIMENSION_CANDIDATES = CANVAS_DIMENSION_CANDIDATES;
97444
99286
  exports.CATEGORIES = CATEGORIES;
@@ -97496,6 +99338,7 @@ exports.CROP_HANDLE_THICKNESS_PX = CROP_HANDLE_THICKNESS_PX;
97496
99338
  exports.CROP_LABEL_KEY = CROP_LABEL_KEY;
97497
99339
  exports.CROP_MODE_HINT_KEY = CROP_MODE_HINT_KEY;
97498
99340
  exports.CURSOR_PALETTE = CURSOR_PALETTE;
99341
+ exports.CUSTOM_PROPERTY_TYPES = CUSTOM_PROPERTY_TYPES;
97499
99342
  exports.DATA_LABEL_CONTENT_OPTIONS = DATA_LABEL_CONTENT_OPTIONS;
97500
99343
  exports.DATA_LABEL_POSITION_OPTIONS = DATA_LABEL_POSITION_OPTIONS;
97501
99344
  exports.DEBOUNCE_MS = DEBOUNCE_MS;
@@ -97524,6 +99367,7 @@ exports.DEFAULT_PALETTE = DEFAULT_PALETTE;
97524
99367
  exports.DEFAULT_POINTER_PRESSURE = DEFAULT_POINTER_PRESSURE;
97525
99368
  exports.DEFAULT_PREVIEW_ELEMENT_CAP = DEFAULT_PREVIEW_ELEMENT_CAP;
97526
99369
  exports.DEFAULT_QUICK_ACCESS_COMMAND_IDS = DEFAULT_QUICK_ACCESS_COMMAND_IDS;
99370
+ exports.DEFAULT_RIBBON_DISPLAY_MODE = DEFAULT_RIBBON_DISPLAY_MODE;
97527
99371
  exports.DEFAULT_RIBBON_TRANSITION_DURATION_SEC = DEFAULT_RIBBON_TRANSITION_DURATION_SEC;
97528
99372
  exports.DEFAULT_ROUND_RECT_ADJUSTMENT = DEFAULT_ROUND_RECT_ADJUSTMENT;
97529
99373
  exports.DEFAULT_ROW_HEIGHT = DEFAULT_ROW_HEIGHT;
@@ -97547,7 +99391,9 @@ exports.DRAW_RIBBON_TOOLS = DRAW_RIBBON_TOOLS;
97547
99391
  exports.DRAW_WIDTH_PRESETS = DRAW_WIDTH_PRESETS;
97548
99392
  exports.DUOTONE_PRESETS = DUOTONE_PRESETS;
97549
99393
  exports.EASE = EASE;
99394
+ exports.EDITABLE_APP_PROPERTY_KEYS = EDITABLE_APP_PROPERTY_KEYS;
97550
99395
  exports.EDITABLE_AXIS_ROWS = EDITABLE_AXIS_ROWS;
99396
+ exports.EDITABLE_CORE_PROPERTY_KEYS = EDITABLE_CORE_PROPERTY_KEYS;
97551
99397
  exports.EDITOR_CHROME_CSS = EDITOR_CHROME_CSS;
97552
99398
  exports.EDITOR_SHORTCUT_ACTION_IDS = EDITOR_SHORTCUT_ACTION_IDS;
97553
99399
  exports.EDITOR_SHORTCUT_DESCRIPTIONS = EDITOR_SHORTCUT_DESCRIPTIONS;
@@ -97594,6 +99440,7 @@ exports.EditPointsSession = EditPointsSession;
97594
99440
  exports.FEATURE_ENTRY_POINTS = FEATURE_ENTRY_POINTS;
97595
99441
  exports.FILL_MODE_OPTIONS = FILL_MODE_OPTIONS;
97596
99442
  exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
99443
+ exports.FIND_MATCH_ATTRIBUTE = FIND_MATCH_ATTRIBUTE;
97597
99444
  exports.FIXED_SPACING_RUN_LINE_HEIGHT = FIXED_SPACING_RUN_LINE_HEIGHT;
97598
99445
  exports.FIXED_TAB_GALLERIES = FIXED_TAB_GALLERIES;
97599
99446
  exports.FLY_SUBTYPE_TO_EDGE = FLY_SUBTYPE_TO_EDGE;
@@ -97648,6 +99495,10 @@ exports.HOME_MERGE_ITEMS = HOME_MERGE_ITEMS;
97648
99495
  exports.HOME_SELECT_ITEMS = HOME_SELECT_ITEMS;
97649
99496
  exports.HOME_SHAPE_ITEMS = HOME_SHAPE_ITEMS;
97650
99497
  exports.HOME_TEXT_DIRECTION_ITEMS = HOME_TEXT_DIRECTION_ITEMS;
99498
+ exports.HOST_IMAGE_MAX_BYTES = HOST_IMAGE_MAX_BYTES;
99499
+ exports.HOST_MEDIA_MAX_BYTES = HOST_MEDIA_MAX_BYTES;
99500
+ exports.HYPERLINK_ACTION_VERB_MAP = HYPERLINK_ACTION_VERB_MAP;
99501
+ exports.HYPERLINK_ACTION_VERB_TO_PPACTION = HYPERLINK_ACTION_VERB_TO_PPACTION;
97651
99502
  exports.INDENT_PX = INDENT_PX;
97652
99503
  exports.INITIAL_FIND_REPLACE_SESSION = INITIAL_FIND_REPLACE_SESSION;
97653
99504
  exports.INITIAL_READ_ONLY_SESSION = INITIAL_READ_ONLY_SESSION;
@@ -97694,9 +99545,11 @@ exports.MAX_INDENT_LEVEL = MAX_INDENT_LEVEL;
97694
99545
  exports.MAX_LABEL_CHARS = MAX_LABEL_CHARS;
97695
99546
  exports.MAX_PARAGRAPH_LEVEL = MAX_PARAGRAPH_LEVEL;
97696
99547
  exports.MAX_ZOOM_SCALE = MAX_ZOOM_SCALE;
99548
+ exports.MEDIA_AUDIO_SIZE = MEDIA_AUDIO_SIZE;
97697
99549
  exports.MEDIA_CHROME_ATTRIBUTE = MEDIA_CHROME_ATTRIBUTE;
97698
99550
  exports.MEDIA_FALLBACK_ICONS = MEDIA_FALLBACK_ICONS;
97699
99551
  exports.MEDIA_FULLSCREEN_OVERLAY_STYLE = MEDIA_FULLSCREEN_OVERLAY_STYLE;
99552
+ exports.MEDIA_VIDEO_MAX_SIZE = MEDIA_VIDEO_MAX_SIZE;
97700
99553
  exports.MERGE_CURVE_SEGMENTS = MERGE_CURVE_SEGMENTS;
97701
99554
  exports.MERGE_SHAPES_HINT_KEY = MERGE_SHAPES_HINT_KEY;
97702
99555
  exports.MERGE_SHAPES_LABEL_KEY = MERGE_SHAPES_LABEL_KEY;
@@ -97706,6 +99559,7 @@ exports.MIN_COLUMN_PROPORTION = MIN_COLUMN_PROPORTION;
97706
99559
  exports.MIN_COLUMN_WIDTH_FRACTION = MIN_COLUMN_WIDTH_FRACTION;
97707
99560
  exports.MIN_CROP_FRAME_PX = MIN_CROP_FRAME_PX;
97708
99561
  exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE4;
99562
+ exports.MIN_OPEN_PASSWORD_LENGTH = MIN_OPEN_PASSWORD_LENGTH;
97709
99563
  exports.MIN_ROW_HEIGHT = MIN_ROW_HEIGHT;
97710
99564
  exports.MIN_TOUCH_TARGET_PX = MIN_TOUCH_TARGET_PX;
97711
99565
  exports.MIN_ZOOM_SCALE = MIN_ZOOM_SCALE;
@@ -97847,6 +99701,7 @@ exports.RECORD_COMMAND_GROUPS = RECORD_COMMAND_GROUPS;
97847
99701
  exports.REVIEW_COMMENT_COMMAND_IDS = REVIEW_COMMENT_COMMAND_IDS;
97848
99702
  exports.RGBA_BYTES_PER_PIXEL = RGBA_BYTES_PER_PIXEL;
97849
99703
  exports.RIBBON_ADD_IN_TAB_ATTR = RIBBON_ADD_IN_TAB_ATTR;
99704
+ exports.RIBBON_AUTO_COLLAPSE_MEDIA = RIBBON_AUTO_COLLAPSE_MEDIA;
97850
99705
  exports.RIBBON_CONTEXTUAL_TABS = RIBBON_CONTEXTUAL_TABS;
97851
99706
  exports.RIBBON_CONTEXTUAL_TAB_ATTR = RIBBON_CONTEXTUAL_TAB_ATTR;
97852
99707
  exports.RIBBON_CONTROL_ALIASES = RIBBON_CONTROL_ALIASES;
@@ -97854,6 +99709,9 @@ exports.RIBBON_CONTROL_ATTR = RIBBON_CONTROL_ATTR;
97854
99709
  exports.RIBBON_CONTROL_CATALOG = RIBBON_CONTROL_CATALOG;
97855
99710
  exports.RIBBON_CONTROL_ICONS = RIBBON_CONTROL_ICONS;
97856
99711
  exports.RIBBON_CONTROL_IDS = RIBBON_CONTROL_IDS;
99712
+ exports.RIBBON_DISPLAY_MODES = RIBBON_DISPLAY_MODES;
99713
+ exports.RIBBON_DISPLAY_OPTIONS_LABEL_KEY = RIBBON_DISPLAY_OPTIONS_LABEL_KEY;
99714
+ exports.RIBBON_DISPLAY_REVEAL_LABEL_KEY = RIBBON_DISPLAY_REVEAL_LABEL_KEY;
97857
99715
  exports.RIBBON_GALLERY_ATTR = RIBBON_GALLERY_ATTR;
97858
99716
  exports.RIBBON_GALLERY_IDS = RIBBON_GALLERY_IDS;
97859
99717
  exports.RIBBON_GALLERY_ITEM_ATTR = RIBBON_GALLERY_ITEM_ATTR;
@@ -98047,6 +99905,7 @@ exports.alignPatch = alignPatch;
98047
99905
  exports.angularAdjustmentKeys = angularAdjustmentKeys;
98048
99906
  exports.annotationCapturesPointer = annotationCapturesPointer;
98049
99907
  exports.annotationOverlayZIndex = annotationOverlayZIndex;
99908
+ exports.appPropertiesChanged = appPropertiesChanged;
98050
99909
  exports.appendPresentationInkPoint = appendPresentationInkPoint;
98051
99910
  exports.apply3dEffects = apply3dEffects;
98052
99911
  exports.applyAcceptAllSlides = applyAcceptAllSlides;
@@ -98066,6 +99925,7 @@ exports.applyChartFormatField = applyChartFormatField;
98066
99925
  exports.applyChartRevealDescriptor = applyChartRevealDescriptor;
98067
99926
  exports.applyChartStylePreset = applyChartStylePreset;
98068
99927
  exports.applyColorChange = applyColorChange;
99928
+ exports.applyCustomShowEdit = applyCustomShowEdit;
98069
99929
  exports.applyDiagramRevealDescriptor = applyDiagramRevealDescriptor;
98070
99930
  exports.applyDrawingColorTransforms = applyDrawingColorTransforms;
98071
99931
  exports.applyDuotone = applyDuotone;
@@ -98096,6 +99956,7 @@ exports.applyRenderedElementAccessibility = applyRenderedElementAccessibility;
98096
99956
  exports.applyReroutedConnectors = applyReroutedConnectors;
98097
99957
  exports.applyRibbonGalleryItem = applyRibbonGalleryItem;
98098
99958
  exports.applyRibbonTransitionDraft = applyRibbonTransitionDraft;
99959
+ exports.applySlideShowSettingsPatch = applySlideShowSettingsPatch;
98099
99960
  exports.applySlideTransitionSound = applySlideTransitionSound;
98100
99961
  exports.applySmartArtTextPaneRequest = applySmartArtTextPaneRequest;
98101
99962
  exports.applySorterAction = applySorterAction;
@@ -98130,6 +99991,7 @@ exports.attachPresentationVisibilityPause = attachPresentationVisibilityPause;
98130
99991
  exports.attachRibbonOverflow = attachRibbonOverflow;
98131
99992
  exports.attachRotateHandlePlacement = attachRotateHandlePlacement;
98132
99993
  exports.attachViewerHyperlinks = attachViewerHyperlinks;
99994
+ exports.attachViewportNavigation = attachViewportNavigation;
98133
99995
  exports.authorConnectorBetweenSites = authorConnectorBetweenSites;
98134
99996
  exports.authoredLetterSpacingPx = authoredLetterSpacingPx;
98135
99997
  exports.autoFitModeOf = autoFitModeOf;
@@ -98165,6 +100027,7 @@ exports.boundsOf = boundsOf;
98165
100027
  exports.boxForAnimation = boxForAnimation;
98166
100028
  exports.boxOverlapRatio = boxOverlapRatio;
98167
100029
  exports.boxesOverlap = boxesOverlap;
100030
+ exports.broadcastGroup = broadcastGroup;
98168
100031
  exports.build3DExtrusionData = build3DExtrusionData;
98169
100032
  exports.buildAbsoluteRotationKeyframe = buildAbsoluteRotationKeyframe;
98170
100033
  exports.buildAbsoluteScaleKeyframe = buildAbsoluteScaleKeyframe;
@@ -98200,6 +100063,7 @@ exports.buildCropOverlay = buildCropOverlay;
98200
100063
  exports.buildDeckJson = buildDeckJson;
98201
100064
  exports.buildDeckSaveOptions = buildDeckSaveOptions;
98202
100065
  exports.buildDirectionGrid = buildDirectionGrid;
100066
+ exports.buildDocumentPropertiesActions = buildDocumentPropertiesActions;
98203
100067
  exports.buildDuotoneCacheKey = buildDuotoneCacheKey;
98204
100068
  exports.buildDynamicKeyframe = buildDynamicKeyframe;
98205
100069
  exports.buildDynamicKeyframes = buildDynamicKeyframes;
@@ -98209,6 +100073,8 @@ exports.buildElementClipboardPayload = buildElementClipboardPayload;
98209
100073
  exports.buildEmbeddedFontStyles = buildEmbeddedFontStyles;
98210
100074
  exports.buildEquationBlockStyle = buildEquationBlockStyle;
98211
100075
  exports.buildFieldSubstitutionContext = buildFieldSubstitutionContext;
100076
+ exports.buildFindReplaceActions = buildFindReplaceActions;
100077
+ exports.buildFontEmbeddingActions = buildFontEmbeddingActions;
98212
100078
  exports.buildFontFaceRule = buildFontFaceRule;
98213
100079
  exports.buildForeignObjectSvgBody = buildForeignObjectSvgBody;
98214
100080
  exports.buildFreeformShapeElement = buildFreeformShapeElement;
@@ -98229,6 +100095,7 @@ exports.buildInlineListStylePatch = buildInlineListStylePatch;
98229
100095
  exports.buildInlineStyleText = buildInlineStyleText;
98230
100096
  exports.buildInlineTextCommitPatch = buildInlineTextCommitPatch;
98231
100097
  exports.buildJoinCollaborationConfig = buildJoinCollaborationConfig;
100098
+ exports.buildLayoutActions = buildLayoutActions;
98232
100099
  exports.buildLiveInkStrokeView = buildLiveInkStrokeView;
98233
100100
  exports.buildMirrorTiledBackground = buildMirrorTiledBackground;
98234
100101
  exports.buildMorphAnimationRules = buildMorphAnimationRules;
@@ -98250,6 +100117,7 @@ exports.buildOptionsBaseline = buildOptionsBaseline;
98250
100117
  exports.buildOutline = buildOutline;
98251
100118
  exports.buildOutlinePrintJobDocument = buildOutlinePrintJobDocument;
98252
100119
  exports.buildParagraphs = buildParagraphs;
100120
+ exports.buildPasswordProtectionActions = buildPasswordProtectionActions;
98253
100121
  exports.buildPngChunk = buildPngChunk;
98254
100122
  exports.buildPptxOptionCategories = buildPptxOptionCategories;
98255
100123
  exports.buildPresentationAudienceUrl = buildPresentationAudienceUrl;
@@ -98272,6 +100140,7 @@ exports.buildRunTabLines = buildRunTabLines;
98272
100140
  exports.buildSectionContextMenuEntries = buildSectionContextMenuEntries;
98273
100141
  exports.buildShareConfig = buildShareConfig;
98274
100142
  exports.buildShareUrl = buildShareUrl;
100143
+ exports.buildSignatureActions = buildSignatureActions;
98275
100144
  exports.buildSlideOverflowMap = buildSlideOverflowMap;
98276
100145
  exports.buildSlidePaneContextMenuEntries = buildSlidePaneContextMenuEntries;
98277
100146
  exports.buildSlideSorterContextMenuEntries = buildSlideSorterContextMenuEntries;
@@ -98320,6 +100189,8 @@ exports.buildWarpPath = buildWarpPath;
98320
100189
  exports.buildWarpedGlyphOutlinePathD = buildWarpedGlyphOutlinePathD;
98321
100190
  exports.buildWrapperStyle = buildWrapperStyle;
98322
100191
  exports.buildZoomTransitionOverride = buildZoomTransitionOverride;
100192
+ exports.buildingBlockFailure = buildingBlockFailure;
100193
+ exports.buildingBlockRequestAction = buildingBlockRequestAction;
98323
100194
  exports.builtinTableStyleMap = builtinTableStyleMap;
98324
100195
  exports.calculateContinuationPageMaxLines = calculateContinuationPageMaxLines;
98325
100196
  exports.calculateNotesPageLayout = calculateNotesPageLayout;
@@ -98541,6 +100412,8 @@ exports.createActiveAnimationGroup = createActiveAnimationGroup;
98541
100412
  exports.createAutosaveController = createAutosaveController;
98542
100413
  exports.createAutosaveRecoveryController = createAutosaveRecoveryController;
98543
100414
  exports.createBackstagePresentation = createBackstagePresentation;
100415
+ exports.createBuildingBlockGroupContext = createBuildingBlockGroupContext;
100416
+ exports.createBuildingBlockRequests = createBuildingBlockRequests;
98544
100417
  exports.createCloudDocumentController = createCloudDocumentController;
98545
100418
  exports.createCollabProvider = createCollabProvider;
98546
100419
  exports.createCollaborationHistory = createCollaborationHistory;
@@ -98557,6 +100430,7 @@ exports.createEditorHistoryController = createEditorHistoryController;
98557
100430
  exports.createEmbeddedFontsSheet = createEmbeddedFontsSheet;
98558
100431
  exports.createEmbeddedOutlineFontsSlot = createEmbeddedOutlineFontsSlot;
98559
100432
  exports.createEnvelopeWarp = createEnvelopeWarp;
100433
+ exports.createFindBarController = createFindBarController;
98560
100434
  exports.createGalleryPreviewController = createGalleryPreviewController;
98561
100435
  exports.createGestureController = createGestureController;
98562
100436
  exports.createGlyphOutlineLookup = createGlyphOutlineLookup;
@@ -98567,6 +100441,7 @@ exports.createInlineListSeed = createInlineListSeed;
98567
100441
  exports.createInspectorColorFields = createInspectorColorFields;
98568
100442
  exports.createLiveColorInput = createLiveColorInput;
98569
100443
  exports.createPlainNotesSegments = createPlainNotesSegments;
100444
+ exports.createPptxBuildingBlockSession = createPptxBuildingBlockSession;
98570
100445
  exports.createPresenceProjector = createPresenceProjector;
98571
100446
  exports.createPresencePublisher = createPresencePublisher;
98572
100447
  exports.createPresentationKeyBuffer = createPresentationKeyBuffer;
@@ -98576,7 +100451,9 @@ exports.createPresenterShowGuard = createPresenterShowGuard;
98576
100451
  exports.createPresenterTimer = createPresenterTimer;
98577
100452
  exports.createPreviewEditGuard = createPreviewEditGuard;
98578
100453
  exports.createRibbonControlIcon = createRibbonControlIcon;
100454
+ exports.createRibbonDisplayController = createRibbonDisplayController;
98579
100455
  exports.createSaveProgressController = createSaveProgressController;
100456
+ exports.createSaveRevisionController = createSaveRevisionController;
98580
100457
  exports.createSheetDismissGesture = createSheetDismissGesture;
98581
100458
  exports.createSlidePackageClipboard = createSlidePackageClipboard;
98582
100459
  exports.createSlideSorterState = createSlideSorterState;
@@ -98610,6 +100487,7 @@ exports.cssKeyframeName = cssKeyframeName;
98610
100487
  exports.cubicBounds = cubicBounds;
98611
100488
  exports.cubicPointAt = cubicPointAt;
98612
100489
  exports.cursorForTool = cursorForTool;
100490
+ exports.customShowsGroup = customShowsGroup;
98613
100491
  exports.customizeBackstageCards = customizeBackstageCards;
98614
100492
  exports.customizeBackstageNav = customizeBackstageNav;
98615
100493
  exports.customizeCanvasContextMenuEntries = customizeCanvasContextMenuEntries;
@@ -98623,6 +100501,7 @@ exports.defaultDuration = defaultDuration;
98623
100501
  exports.defaultGradientState = defaultGradientState;
98624
100502
  exports.defaultMentionId = defaultMentionId;
98625
100503
  exports.defaultRichEnabled = defaultRichEnabled;
100504
+ exports.defineBuildingBlockActionGroup = defineBuildingBlockActionGroup;
98626
100505
  exports.deleteAutosaveSnapshot = deleteAutosaveSnapshot;
98627
100506
  exports.deleteEditPoint = deleteEditPoint;
98628
100507
  exports.deleteEditSegment = deleteEditSegment;
@@ -98635,20 +100514,33 @@ exports.derivePresenceList = derivePresenceList;
98635
100514
  exports.derivePresetAdjustmentHandles = derivePresetAdjustmentHandles;
98636
100515
  exports.deriveSlideFieldContext = deriveSlideFieldContext;
98637
100516
  exports.deriveViewportBreakpoints = deriveViewportBreakpoints;
100517
+ exports.describeBroadcastSupport = describeBroadcastSupport;
100518
+ exports.describeBuildingBlockActions = describeBuildingBlockActions;
100519
+ exports.describeBuildingBlockAvailability = describeBuildingBlockAvailability;
100520
+ exports.describeBuildingBlockToolbar = describeBuildingBlockToolbar;
98638
100521
  exports.describeCollaborationShellState = describeCollaborationShellState;
100522
+ exports.describeCustomShows = describeCustomShows;
98639
100523
  exports.describeElementChange = describeElementChange;
98640
100524
  exports.describeFontEmbedding = describeFontEmbedding;
100525
+ exports.describeFontEmbeddingState = describeFontEmbeddingState;
100526
+ exports.describePasswordProtection = describePasswordProtection;
98641
100527
  exports.describePptxChart = describePptxChart;
100528
+ exports.describeShortcutCatalogue = describeShortcutCatalogue;
100529
+ exports.describeShowDialogActions = describeShowDialogActions;
100530
+ exports.describeSignaturesState = describeSignaturesState;
100531
+ exports.describeSlideShowSettings = describeSlideShowSettings;
98642
100532
  exports.describeSmartArtBounds = describeSmartArtBounds;
98643
100533
  exports.describeSmartArtDiagram = describeSmartArtDiagram;
98644
100534
  exports.deserializeElementClipboard = deserializeElementClipboard;
98645
100535
  exports.designCommandState = designCommandState;
100536
+ exports.detectHyperlinkTargetType = detectHyperlinkTargetType;
98646
100537
  exports.detectOrientation = detectOrientation;
98647
100538
  exports.detectTouchDevice = detectTouchDevice;
98648
100539
  exports.diffOptionsAgainstBaseline = diffOptionsAgainstBaseline;
98649
100540
  exports.diffSlideElements = diffSlideElements;
98650
100541
  exports.diffTokens = diffTokens;
98651
100542
  exports.diffViewerOptions = diffViewerOptions;
100543
+ exports.digitalSignaturesGroup = digitalSignaturesGroup;
98652
100544
  exports.disableGlowPatch = disableGlowPatch;
98653
100545
  exports.disableInnerShadowPatch = disableInnerShadowPatch;
98654
100546
  exports.disableOuterShadowPatch = disableOuterShadowPatch;
@@ -98660,6 +100552,8 @@ exports.dispatchCropRequest = dispatchCropRequest;
98660
100552
  exports.dispatchEditorKey = dispatchEditorKey;
98661
100553
  exports.dispatchReadOnlyBannerIntent = dispatchReadOnlyBannerIntent;
98662
100554
  exports.dispatchStatusBarIntent = dispatchStatusBarIntent;
100555
+ exports.documentPropertiesChanged = documentPropertiesChanged;
100556
+ exports.documentPropertiesGroup = documentPropertiesGroup;
98663
100557
  exports.dominantDisplacement = dominantDisplacement;
98664
100558
  exports.downloadBlob = downloadBlob;
98665
100559
  exports.downloadDataUrl = downloadDataUrl;
@@ -98764,6 +100658,7 @@ exports.findConnectorSiteNear = findConnectorSiteNear;
98764
100658
  exports.findEffectSoundCatalogueEntry = findEffectSoundCatalogueEntry;
98765
100659
  exports.findEraserHitElementId = findEraserHitElementId;
98766
100660
  exports.findHighlightClickTarget = findHighlightClickTarget;
100661
+ exports.findHighlightTargets = findHighlightTargets;
98767
100662
  exports.findMediaBookmarkGatedSteps = findMediaBookmarkGatedSteps;
98768
100663
  exports.findMediaElementByElementId = findMediaElementByElementId;
98769
100664
  exports.findMediaEndGatedSteps = findMediaEndGatedSteps;
@@ -98790,6 +100685,7 @@ exports.flattenViewerOptions = flattenViewerOptions;
98790
100685
  exports.followCommentEdit = followCommentEdit;
98791
100686
  exports.followingText = followingText;
98792
100687
  exports.fontAlignmentVerticalAlign = fontAlignmentVerticalAlign;
100688
+ exports.fontEmbeddingGroup = fontEmbeddingGroup;
98793
100689
  exports.fontFamilyItems = fontFamilyItems;
98794
100690
  exports.fontHomeControls = fontHomeControls;
98795
100691
  exports.fontMimeForFormat = fontMimeForFormat;
@@ -99031,6 +100927,8 @@ exports.homeSnapshotTranslator = homeSnapshotTranslator;
99031
100927
  exports.hostFontDownloadLock = hostFontDownloadLock;
99032
100928
  exports.hostMenuLabel = hostMenuLabel;
99033
100929
  exports.hslToRgb = hslToRgb;
100930
+ exports.hyperlinkEditDataFromAction = hyperlinkEditDataFromAction;
100931
+ exports.hyperlinkEditPatch = hyperlinkEditPatch;
99034
100932
  exports.imageAdjustmentsPatch = imageAdjustmentsPatch;
99035
100933
  exports.imageAdjustmentsStateOf = imageAdjustmentsStateOf;
99036
100934
  exports.imageCropPatch = imageCropPatch;
@@ -99115,6 +101013,7 @@ exports.isKoreanLanguage = isKoreanLanguage;
99115
101013
  exports.isLegacyBinaryPresentation = isLegacyBinaryPresentation;
99116
101014
  exports.isLinkedTextBox = isLinkedTextBox;
99117
101015
  exports.isLinkedTextBoxHead = isLinkedTextBoxHead;
101016
+ exports.isMarkedAsFinal = isMarkedAsFinal;
99118
101017
  exports.isMasterViewEditable = isMasterViewEditable;
99119
101018
  exports.isMediaCommandAnimation = isMediaCommandAnimation;
99120
101019
  exports.isMediaEndGated = isMediaEndGated;
@@ -99152,6 +101051,7 @@ exports.isSettingLocked = isSettingLocked;
99152
101051
  exports.isSettingVisible = isSettingVisible;
99153
101052
  exports.isSupportedPresentationFile = isSupportedPresentationFile;
99154
101053
  exports.isTabletViewport = isTabletViewport;
101054
+ exports.isValidInsertChartData = isValidInsertChartData;
99155
101055
  exports.isValidRoomId = isValidRoomId;
99156
101056
  exports.isVerticalTextDirection = isVerticalTextDirection;
99157
101057
  exports.issueTrackKey = issueTrackKey;
@@ -99171,6 +101071,7 @@ exports.listChartFormatTargets = listChartFormatTargets;
99171
101071
  exports.listChartUserShapeRows = listChartUserShapeRows;
99172
101072
  exports.listCommentLocations = listCommentLocations;
99173
101073
  exports.listMediaBookmarkOptions = listMediaBookmarkOptions;
101074
+ exports.listPackageSignatures = listPackageSignatures;
99174
101075
  exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
99175
101076
  exports.loadAudienceContent = loadAudienceContent;
99176
101077
  exports.loadDeckWebfontOutlines = loadDeckWebfontOutlines;
@@ -99194,6 +101095,8 @@ exports.mapReadingViewKey = mapReadingViewKey;
99194
101095
  exports.mapSlideShowStartKey = mapSlideShowStartKey;
99195
101096
  exports.mapSlideSorterKey = mapSlideSorterKey;
99196
101097
  exports.markAnimationGroupActive = markAnimationGroupActive;
101098
+ exports.markAsFinalProperties = markAsFinalProperties;
101099
+ exports.markFindHighlights = markFindHighlights;
99197
101100
  exports.markInsertedParagraph = markInsertedParagraph;
99198
101101
  exports.maskEdgeDecl = maskEdgeDecl;
99199
101102
  exports.maskEdgeInitialStyle = maskEdgeInitialStyle;
@@ -99227,6 +101130,7 @@ exports.measureViewportClientSize = measureViewportClientSize;
99227
101130
  exports.measureWarpParagraphWidth = measureWarpParagraphWidth;
99228
101131
  exports.mediaControlBarEnabled = mediaControlBarEnabled;
99229
101132
  exports.mediaControlBarVisible = mediaControlBarVisible;
101133
+ exports.mediaElementFromFile = mediaElementFromFile;
99230
101134
  exports.mediaFallbackIcon = mediaFallbackIcon;
99231
101135
  exports.mediaFallbackLabelKey = mediaFallbackLabelKey;
99232
101136
  exports.mediaFallbackVisual = mediaFallbackVisual;
@@ -99304,6 +101208,7 @@ exports.normalizeFontFormat = normalizeFontFormat;
99304
101208
  exports.normalizeNotesLinkUrl = normalizeNotesLinkUrl;
99305
101209
  exports.normalizeOutlinePair = normalizeOutlinePair;
99306
101210
  exports.normalizeRegion = normalizeRegion;
101211
+ exports.normalizeRibbonDisplayMode = normalizeRibbonDisplayMode;
99307
101212
  exports.normalizeSegments = normalizeSegments;
99308
101213
  exports.normalizeSubtitleSettings = normalizeSubtitleSettings;
99309
101214
  exports.normalizeWheelDelta = normalizeWheelDelta;
@@ -99364,6 +101269,8 @@ exports.parseEditPointsTarget = parseEditPointsTarget;
99364
101269
  exports.parseGradientCssStops = parseGradientCssStops;
99365
101270
  exports.parseHexColor = parseHexColor;
99366
101271
  exports.parseHexToRgb = parseHexToRgb;
101272
+ exports.parseHyperlinkEmailUrl = parseHyperlinkEmailUrl;
101273
+ exports.parseHyperlinkSlideNumber = parseHyperlinkSlideNumber;
99367
101274
  exports.parseMediaCommand = parseMediaCommand;
99368
101275
  exports.parseOoxmlBezierCurve = parseOoxmlBezierCurve;
99369
101276
  exports.parseOptionValueKey = parseOptionValueKey;
@@ -99378,6 +101285,7 @@ exports.parseSvgPath = parseSvgPath;
99378
101285
  exports.parseViewBox = parseViewBox;
99379
101286
  exports.partitionMasterViewElements = partitionMasterViewElements;
99380
101287
  exports.passesClicksThroughBox = passesClicksThroughBox;
101288
+ exports.passwordProtectionGroup = passwordProtectionGroup;
99381
101289
  exports.pasteElementHasText = pasteElementHasText;
99382
101290
  exports.patchChartData = patchChartData;
99383
101291
  exports.patchHeaderFooterDraft = patchHeaderFooterDraft;
@@ -99397,6 +101305,7 @@ exports.placeCaretAt = placeCaretAt;
99397
101305
  exports.placeCaretAtEnd = placeCaretAtEnd;
99398
101306
  exports.placeTileOnPage = placeTileOnPage;
99399
101307
  exports.placeholderPromptDescriptor = placeholderPromptDescriptor;
101308
+ exports.planDocumentPropertiesPatch = planDocumentPropertiesPatch;
99400
101309
  exports.planFindReplace = planFindReplace;
99401
101310
  exports.planGifFrames = planGifFrames;
99402
101311
  exports.planMergeShapes = planMergeShapes;
@@ -99449,6 +101358,7 @@ exports.printJobRasterFallback = printJobRasterFallback;
99449
101358
  exports.probeAutosaveRecovery = probeAutosaveRecovery;
99450
101359
  exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
99451
101360
  exports.probeNativeImageSize = probeNativeImageSize;
101361
+ exports.probeVideoSize = probeVideoSize;
99452
101362
  exports.projectDrawingShapes = projectDrawingShapes;
99453
101363
  exports.projectSmartArtViewBoxRect = projectSmartArtViewBoxRect;
99454
101364
  exports.promote = promote;
@@ -99524,6 +101434,7 @@ exports.reflowToDrawingShapes = reflowToDrawingShapes;
99524
101434
  exports.refreshSilhouetteMorphFilters = refreshSilhouetteMorphFilters;
99525
101435
  exports.refreshSmartArtPictureImage = refreshSmartArtPictureImage;
99526
101436
  exports.regionArea = regionArea;
101437
+ exports.registerBuildingBlockGroups = registerBuildingBlockGroups;
99527
101438
  exports.registerCollaborationTeardown = registerCollaborationTeardown;
99528
101439
  exports.registerCrossSlideAudio = registerCrossSlideAudio;
99529
101440
  exports.registerInlineListParagraphFormat = registerInlineListParagraphFormat;
@@ -99555,6 +101466,7 @@ exports.resetGlyphTraceCache = resetGlyphTraceCache;
99555
101466
  exports.resetGoogleWebfontSessionCache = resetGoogleWebfontSessionCache;
99556
101467
  exports.resetMetricTrackingCache = resetMetricTrackingCache;
99557
101468
  exports.resetPresenterTimer = resetPresenterTimer;
101469
+ exports.resetViewportScroll = resetViewportScroll;
99558
101470
  exports.resizeSelection = resizeSelection;
99559
101471
  exports.resolve3DRenderingFlags = resolve3DRenderingFlags;
99560
101472
  exports.resolveAbuttingEdgeBleeds = resolveAbuttingEdgeBleeds;
@@ -99577,6 +101489,7 @@ exports.resolveAutosaveFileKey = resolveAutosaveFileKey;
99577
101489
  exports.resolveAutosaveIntervalMs = resolveAutosaveIntervalMs;
99578
101490
  exports.resolveAutosaveIntervalSeconds = resolveAutosaveIntervalSeconds;
99579
101491
  exports.resolveBlockFont = resolveBlockFont;
101492
+ exports.resolveBuildingBlockMode = resolveBuildingBlockMode;
99580
101493
  exports.resolveChartBuildMode = resolveChartBuildMode;
99581
101494
  exports.resolveChartFormatTarget = resolveChartFormatTarget;
99582
101495
  exports.resolveChartRevealDescriptor = resolveChartRevealDescriptor;
@@ -99590,6 +101503,7 @@ exports.resolveColorChangedImageSource = resolveColorChangedImageSource;
99590
101503
  exports.resolveConnectorEndpointUpdate = resolveConnectorEndpointUpdate;
99591
101504
  exports.resolveCssProperties = resolveCssProperties;
99592
101505
  exports.resolveCssTextAlign = resolveCssTextAlign;
101506
+ exports.resolveCustomShowStart = resolveCustomShowStart;
99593
101507
  exports.resolveCustomization = resolveCustomization;
99594
101508
  exports.resolveDefaultPrintSettings = resolveDefaultPrintSettings;
99595
101509
  exports.resolveDiagramBuildMode = resolveDiagramBuildMode;
@@ -99627,6 +101541,7 @@ exports.resolveGroupDoubleClickTarget = resolveGroupDoubleClickTarget;
99627
101541
  exports.resolveGroupPressTarget = resolveGroupPressTarget;
99628
101542
  exports.resolveHighlightClickForElementId = resolveHighlightClickForElementId;
99629
101543
  exports.resolveHistoryDepth = resolveHistoryDepth;
101544
+ exports.resolveHyperlinkEditResult = resolveHyperlinkEditResult;
99630
101545
  exports.resolveHyperlinkTargetAttrs = resolveHyperlinkTargetAttrs;
99631
101546
  exports.resolveImageResolutionPpi = resolveImageResolutionPpi;
99632
101547
  exports.resolveImageResolutionScale = resolveImageResolutionScale;
@@ -99689,6 +101604,7 @@ exports.resolveShowForward = resolveShowForward;
99689
101604
  exports.resolveShowSlideIndexes = resolveShowSlideIndexes;
99690
101605
  exports.resolveSlideOutlineElements = resolveSlideOutlineElements;
99691
101606
  exports.resolveSlidePaneClick = resolveSlidePaneClick;
101607
+ exports.resolveSlideShowSettings = resolveSlideShowSettings;
99692
101608
  exports.resolveSlideSizeSelection = resolveSlideSizeSelection;
99693
101609
  exports.resolveSlideTitle = resolveSlideTitle;
99694
101610
  exports.resolveSlideTransition = resolveSlideTransition;
@@ -99750,6 +101666,8 @@ exports.ribbonAddInControlId = ribbonAddInControlId;
99750
101666
  exports.ribbonAddInGroupViews = ribbonAddInGroupViews;
99751
101667
  exports.ribbonControlAttrs = ribbonControlAttrs;
99752
101668
  exports.ribbonCustomizationCss = ribbonCustomizationCss;
101669
+ exports.ribbonDisplayLayout = ribbonDisplayLayout;
101670
+ exports.ribbonDisplayMenu = ribbonDisplayMenu;
99753
101671
  exports.ribbonGroupAttrs = ribbonGroupAttrs;
99754
101672
  exports.ribbonGroupOfControl = ribbonGroupOfControl;
99755
101673
  exports.ribbonGroupViews = ribbonGroupViews;
@@ -99763,6 +101681,7 @@ exports.routeEditLayerPointerToNodes = routeEditLayerPointerToNodes;
99763
101681
  exports.rowHandleSegments = rowHandleSegments;
99764
101682
  exports.rowIndexAtOffset = rowIndexAtOffset;
99765
101683
  exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
101684
+ exports.runBuildingBlockToolbarControl = runBuildingBlockToolbarControl;
99766
101685
  exports.runEditPointsCommand = runEditPointsCommand;
99767
101686
  exports.runEquationMathMl = runEquationMathMl;
99768
101687
  exports.runMediaCommand = runMediaCommand;
@@ -99827,6 +101746,7 @@ exports.selectedBookmarkOptionValue = selectedBookmarkOptionValue;
99827
101746
  exports.selectedParagraphBulletKind = selectedParagraphBulletKind;
99828
101747
  exports.selectionBounds = selectionBounds;
99829
101748
  exports.selectionBulletKind = selectionBulletKind;
101749
+ exports.selectionEquation = selectionEquation;
99830
101750
  exports.serializeElementClipboard = serializeElementClipboard;
99831
101751
  exports.serializeShapeAdjustments = serializeShapeAdjustments;
99832
101752
  exports.serializeSvgPath = serializeSvgPath;
@@ -99846,6 +101766,7 @@ exports.setPendingCaretPoint = setPendingCaretPoint;
99846
101766
  exports.setPendingSelectionRestore = setPendingSelectionRestore;
99847
101767
  exports.setSelectionBullets = setSelectionBullets;
99848
101768
  exports.setTriggerBookmark = setTriggerBookmark;
101769
+ exports.setUpSlideShowGroup = setUpSlideShowGroup;
99849
101770
  exports.settleBaselines = settleBaselines;
99850
101771
  exports.settleThemeWrites = settleThemeWrites;
99851
101772
  exports.shapeGalleryItem = shapeGalleryItem;
@@ -99857,6 +101778,7 @@ exports.shapeStyleWithoutFormatting = shapeStyleWithoutFormatting;
99857
101778
  exports.shapeThumbnailPath = shapeThumbnailPath;
99858
101779
  exports.shapeTileSvg = shapeTileSvg;
99859
101780
  exports.sheetAfterNavigate = sheetAfterNavigate;
101781
+ exports.shortcutsGroup = shortcutsGroup;
99860
101782
  exports.shortestRotationTarget = shortestRotationTarget;
99861
101783
  exports.shouldAutoFollowBroadcaster = shouldAutoFollowBroadcaster;
99862
101784
  exports.shouldAutoHide = shouldAutoHide;
@@ -99967,6 +101889,7 @@ exports.svgTile = svgTile;
99967
101889
  exports.svgToDataUrl = svgToDataUrl;
99968
101890
  exports.swapPresentationWindows = swapPresentationWindows;
99969
101891
  exports.switchSmartArtLayoutData = switchSmartArtLayoutData;
101892
+ exports.syncFindHighlights = syncFindHighlights;
99970
101893
  exports.syncGoogleWebfontStylesheet = syncGoogleWebfontStylesheet;
99971
101894
  exports.tabRowActionsAttributes = tabRowActionsAttributes;
99972
101895
  exports.tableCellCss = tableCellCss;
@@ -100012,12 +101935,14 @@ exports.toCssVerticalDirection = toCssVerticalDirection;
100012
101935
  exports.toCssWritingMode = toCssWritingMode;
100013
101936
  exports.toElementAxes = toElementAxes;
100014
101937
  exports.toGestureTransform = toGestureTransform;
101938
+ exports.toHostSignatureInfo = toHostSignatureInfo;
100015
101939
  exports.toSlideIndex = toSlideIndex;
100016
101940
  exports.toggle = toggle;
100017
101941
  exports.toggleBlackboard = toggleBlackboard;
100018
101942
  exports.toggleCommentResolvedInList = toggleCommentResolvedInList;
100019
101943
  exports.toggleInList = toggleInList;
100020
101944
  exports.togglePresenterTimer = togglePresenterTimer;
101945
+ exports.toggleRibbonCollapsed = toggleRibbonCollapsed;
100021
101946
  exports.toggleSelectionBullets = toggleSelectionBullets;
100022
101947
  exports.toggleSheet = toggleSheet;
100023
101948
  exports.toggleStageElementMedia = toggleStageElementMedia;
@@ -100049,9 +101974,13 @@ exports.updateSubtitleSettings = updateSubtitleSettings;
100049
101974
  exports.updateTagInCollections = updateTagInCollections;
100050
101975
  exports.updateViewerPreference = updateViewerPreference;
100051
101976
  exports.vAlignPatch = vAlignPatch;
101977
+ exports.validateHostImageFile = validateHostImageFile;
101978
+ exports.validateHostMediaFile = validateHostMediaFile;
100052
101979
  exports.validateMediaTrimRange = validateMediaTrimRange;
101980
+ exports.validateOpenPassword = validateOpenPassword;
100053
101981
  exports.validatePasswordPair = validatePasswordPair;
100054
101982
  exports.validateRoomId = validateRoomId;
101983
+ exports.validateSlideShowSettings = validateSlideShowSettings;
100055
101984
  exports.viewLabel = viewLabel;
100056
101985
  exports.viewPropertiesPatchFromPreferences = viewPropertiesPatchFromPreferences;
100057
101986
  exports.viewerOptionsToPreferences = viewerOptionsToPreferences;