pptx-vue-viewer 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{AiChatPanel-DkpImFIU.cjs → AiChatPanel-CGUiGQHq.cjs} +1 -1
  3. package/dist/AiChatPanel-CGUiGQHq.cjs.br +0 -0
  4. package/dist/AiChatPanel-CGUiGQHq.cjs.gz +0 -0
  5. package/dist/{AiChatPanel-DGB_Bw7d.js → AiChatPanel-CiKUwNa7.js} +2 -2
  6. package/dist/AiChatPanel-CiKUwNa7.js.br +0 -0
  7. package/dist/AiChatPanel-CiKUwNa7.js.gz +0 -0
  8. package/dist/{dist-O5B4b6cK.js → dist-BrPQWoqf.js} +1 -1
  9. package/dist/dist-BrPQWoqf.js.br +0 -0
  10. package/dist/{dist-O5B4b6cK.js.gz → dist-BrPQWoqf.js.gz} +0 -0
  11. package/dist/{dist-DVTKkNd_.cjs → dist-CdhFHzWb.cjs} +2 -142
  12. package/dist/dist-CdhFHzWb.cjs.br +0 -0
  13. package/dist/{dist-DVTKkNd_.cjs.gz → dist-CdhFHzWb.cjs.gz} +0 -0
  14. package/dist/gif-encoder-5E-yGZpc.cjs +2 -0
  15. package/dist/gif-encoder-5E-yGZpc.cjs.br +0 -0
  16. package/dist/gif-encoder-5E-yGZpc.cjs.gz +0 -0
  17. package/dist/gif-encoder-6ImIq6nV.js +2 -0
  18. package/dist/gif-encoder-6ImIq6nV.js.br +0 -0
  19. package/dist/gif-encoder-6ImIq6nV.js.gz +0 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.cjs.br +0 -0
  22. package/dist/index.cjs.gz +0 -0
  23. package/dist/index.js +2 -2
  24. package/dist/index.js.br +0 -0
  25. package/dist/index.js.gz +0 -0
  26. package/dist/internals.cjs +1 -1
  27. package/dist/internals.cjs.br +0 -0
  28. package/dist/internals.cjs.gz +0 -0
  29. package/dist/internals.js +1 -1
  30. package/dist/internals.js.br +0 -0
  31. package/dist/internals.js.gz +0 -0
  32. package/dist/{useViewerSettingsDialog-BkxUrwyk.js → useViewerSettingsDialog-BO_xKhyt.js} +346 -346
  33. package/dist/useViewerSettingsDialog-BO_xKhyt.js.br +0 -0
  34. package/dist/useViewerSettingsDialog-BO_xKhyt.js.gz +0 -0
  35. package/dist/{useViewerSettingsDialog-D9H1CVYx.cjs → useViewerSettingsDialog-DBsbzYgS.cjs} +3 -3
  36. package/dist/useViewerSettingsDialog-DBsbzYgS.cjs.br +0 -0
  37. package/dist/useViewerSettingsDialog-DBsbzYgS.cjs.gz +0 -0
  38. package/dist/viewer/PowerPointViewer.vue.d.ts.map +1 -1
  39. package/dist/viewer/components/CollaborationCursors.vue.d.ts +17 -10
  40. package/dist/viewer/components/CollaborationCursors.vue.d.ts.map +1 -1
  41. package/dist/viewer/components/RemoteSelectionOverlay.vue.d.ts +10 -4
  42. package/dist/viewer/components/RemoteSelectionOverlay.vue.d.ts.map +1 -1
  43. package/dist/viewer/index.cjs +1 -1
  44. package/dist/viewer/index.cjs.br +0 -0
  45. package/dist/viewer/index.cjs.gz +0 -0
  46. package/dist/viewer/index.js +2 -2
  47. package/dist/viewer/index.js.br +0 -0
  48. package/dist/viewer/index.js.gz +0 -0
  49. package/dist/viewer-Cz4EufQD.cjs +60686 -0
  50. package/dist/viewer-Cz4EufQD.cjs.br +0 -0
  51. package/dist/viewer-Cz4EufQD.cjs.gz +0 -0
  52. package/dist/viewer-zKqroO4K.js +60470 -0
  53. package/dist/viewer-zKqroO4K.js.br +0 -0
  54. package/dist/viewer-zKqroO4K.js.gz +0 -0
  55. package/package.json +1 -1
  56. package/dist/AiChatPanel-DGB_Bw7d.js.br +0 -0
  57. package/dist/AiChatPanel-DGB_Bw7d.js.gz +0 -0
  58. package/dist/AiChatPanel-DkpImFIU.cjs.br +0 -0
  59. package/dist/AiChatPanel-DkpImFIU.cjs.gz +0 -0
  60. package/dist/dist-DVTKkNd_.cjs.br +0 -0
  61. package/dist/dist-O5B4b6cK.js.br +0 -0
  62. package/dist/gif-encoder-Cdh-ia4-.cjs +0 -2
  63. package/dist/gif-encoder-Cdh-ia4-.cjs.br +0 -0
  64. package/dist/gif-encoder-Cdh-ia4-.cjs.gz +0 -0
  65. package/dist/gif-encoder-N6lgh64R.js +0 -2
  66. package/dist/gif-encoder-N6lgh64R.js.br +0 -0
  67. package/dist/gif-encoder-N6lgh64R.js.gz +0 -0
  68. package/dist/useViewerSettingsDialog-BkxUrwyk.js.br +0 -0
  69. package/dist/useViewerSettingsDialog-BkxUrwyk.js.gz +0 -0
  70. package/dist/useViewerSettingsDialog-D9H1CVYx.cjs.br +0 -0
  71. package/dist/useViewerSettingsDialog-D9H1CVYx.cjs.gz +0 -0
  72. package/dist/viewer-D2Aqi7Ed.js +0 -33161
  73. package/dist/viewer-D2Aqi7Ed.js.br +0 -0
  74. package/dist/viewer-D2Aqi7Ed.js.gz +0 -0
  75. package/dist/viewer-DLN4eMIi.cjs +0 -33378
  76. package/dist/viewer-DLN4eMIi.cjs.br +0 -0
  77. package/dist/viewer-DLN4eMIi.cjs.gz +0 -0
@@ -1,4 +1,4 @@
1
- import { A as e, B as t, Bt as n, C as r, D as o, E as a, Et as i, F as s, G as l, Gt as c, H as u, I as p, K as d, Kt as f, L as h, M as g, N as y, Nt as x, O as v, Ot as b, P as w, T as k, Tt as M, V as S, Vt as I, W as C, Wt as T, Xt as A, Y as P, Zt as L, at as D, f as B, ft as R, gt as N, ht as _, in as W, j as Y, jt as X, k as z, l as j, lt as H, m as G, mt as K, nn as U, on as V, qt as J, rt as ee, s as te, tn as ne, tt as re, ut as oe, v as ae, vt as ie, w as se, wt as le, y as ce, z as ue, zt as pe } from "./dist-O5B4b6cK.js";
1
+ import { $ as e, A as t, B as r, C as o, Ct as a, D as i, Dt as s, E as l, Et as c, F as u, I as p, J as d, K as f, L as h, M as m, Mt as g, N as y, O as x, Ot as v, R as w, S as $, St as k, T as M, Tt as S, U as I, V as C, X as T, _t as L, at as F, b as D, bt as E, c as O, d as B, dt as R, et as N, ft as W, g as Y, gt as X, h as z, ht as j, it as H, j as G, jt as K, k as U, kt as V, nt as q, o as Z, p as Q, pt as ee, rt as te, st as re, w as ae, wt as ie, x as se, xt as le, y as ce, yt as ue, z as pe } from "./dist-BrPQWoqf.js";
2
2
  import { r as de } from "./i18n-DlbVzRoS.js";
3
3
  import * as fe from "vue";
4
4
  import { Text as me, computed as ge, createVNode as ye, getCurrentInstance as be, getCurrentScope as we, inject as ke, nextTick as Se, onBeforeUnmount as Ie, onMounted as Ce, onScopeDispose as Te, onUnmounted as Ae, provide as Pe, readonly as Le, ref as Fe, shallowRef as De, toRaw as Ee, toValue as Oe, unref as Be, watch as Re, watchEffect as Ne } from "vue";
@@ -171,7 +171,7 @@ function Qe(e, t = Je) {
171
171
  return t.find((t) => t.key === e)?.theme;
172
172
  }
173
173
  function et(e) {
174
- const t = G.find((t) => t.id === e);
174
+ const t = Q.find((t) => t.id === e);
175
175
  if (!t) throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${e}"`);
176
176
  return t;
177
177
  }
@@ -328,26 +328,26 @@ function at(e, t) {
328
328
  if (e) for (const t of e) n.push({
329
329
  id: t.id,
330
330
  axis: "horz" === t.orientation ? "h" : "v",
331
- position: K(t.positionEmu)
331
+ position: te(t.positionEmu)
332
332
  });
333
333
  if (t) for (const e of t) n.push({
334
334
  id: e.id,
335
335
  axis: "horz" === e.orientation ? "h" : "v",
336
- position: K(e.positionEmu)
336
+ position: te(e.positionEmu)
337
337
  });
338
338
  return n;
339
339
  }
340
- function it(e, t, n, r) {
341
- if (!e) return;
342
- if (!Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0) return H(e);
343
- if (r && Object.keys(r).length > 0) {
344
- const o = re(e, t, n, r);
345
- if (void 0 !== o) return o;
340
+ function it(t, n, r, o) {
341
+ if (!t) return;
342
+ if (!Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0) return e(t);
343
+ if (o && Object.keys(o).length > 0) {
344
+ const e = f(t, n, r, o);
345
+ if (void 0 !== e) return e;
346
346
  }
347
- const o = oe(e, t, n, r);
348
- if (void 0 !== o) return o;
349
- const a = ee(e, t, n);
350
- return void 0 !== a ? a : H(e);
347
+ const a = N(t, n, r, o);
348
+ if (void 0 !== a) return a;
349
+ const i = d(t, n, r);
350
+ return void 0 !== i ? i : e(t);
351
351
  }
352
352
  function st(e, t, n) {
353
353
  const r = "number" == typeof t ? t : e.width, o = "number" == typeof n ? n : e.height, a = e;
@@ -558,7 +558,7 @@ function gt(e, t, n) {
558
558
  }
559
559
  }
560
560
  function yt(e, t) {
561
- if (!_(e)) return;
561
+ if (!H(e)) return;
562
562
  const n = e.shapeStyle;
563
563
  return n ? "group" === n.fillMode ? t ? xt(t, e) : {} : xt(n, e) : {};
564
564
  }
@@ -908,7 +908,7 @@ function Gt(e) {
908
908
  };
909
909
  }
910
910
  function Kt(e) {
911
- if (ie(e)) return e.imageEffects;
911
+ if (re(e)) return e.imageEffects;
912
912
  }
913
913
  function Ut(e) {
914
914
  return `duotone-${e}`;
@@ -1135,7 +1135,7 @@ function an(e, t) {
1135
1135
  }
1136
1136
  }
1137
1137
  function sn(e) {
1138
- const t = [], n = function(e, t = ie(e) ? e.id : "") {
1138
+ const t = [], n = function(e, t = re(e) ? e.id : "") {
1139
1139
  const n = Kt(e);
1140
1140
  if (!n?.duotone) return;
1141
1141
  const r = Ut(t);
@@ -1149,7 +1149,7 @@ function sn(e) {
1149
1149
  id: n.id,
1150
1150
  markup: n.filterMarkup
1151
1151
  });
1152
- const r = function(e, t = ie(e) ? e.id : "") {
1152
+ const r = function(e, t = re(e) ? e.id : "") {
1153
1153
  const n = Kt(e);
1154
1154
  if (!n || !Qt(e)) return;
1155
1155
  const r = on(n);
@@ -1165,7 +1165,7 @@ function sn(e) {
1165
1165
  id: r.id,
1166
1166
  markup: r.filterMarkup
1167
1167
  });
1168
- const o = function(e, t = ie(e) ? e.id : "") {
1168
+ const o = function(e, t = re(e) ? e.id : "") {
1169
1169
  const n = Kt(e);
1170
1170
  if (!n?.artisticEffect || !Jt(n.artisticEffect)) return;
1171
1171
  const r = an(n.artisticEffect, n.artisticRadius ?? 5);
@@ -1447,7 +1447,7 @@ function xn(e) {
1447
1447
  return !(!e || "textNoShape" === e || "textPlain" === e) && mn.has(e);
1448
1448
  }
1449
1449
  function vn(e) {
1450
- return !!N(e) && xn(e.textStyle?.textWarpPreset);
1450
+ return !!F(e) && xn(e.textStyle?.textWarpPreset);
1451
1451
  }
1452
1452
  function bn(e, t, n, r, o, a, i) {
1453
1453
  const s = o <= 1 ? .5 : r / (o - 1), l = yn[e];
@@ -1746,7 +1746,7 @@ function Rn(e) {
1746
1746
  const t = [];
1747
1747
  for (const n of Object.keys(e)) {
1748
1748
  if (n.startsWith("@_")) continue;
1749
- const r = U(n);
1749
+ const r = V(n);
1750
1750
  if ("m:oMathPara" === r) continue;
1751
1751
  const o = Cn(e[n]);
1752
1752
  for (const e of o) {
@@ -1848,7 +1848,7 @@ function _n(e) {
1848
1848
  "m:sSub",
1849
1849
  "m:box"
1850
1850
  ]);
1851
- return Object.keys(e).some((e) => n.has(U(e))) ? [e] : [];
1851
+ return Object.keys(e).some((e) => n.has(V(e))) ? [e] : [];
1852
1852
  }(e);
1853
1853
  if (0 === t.length) return "";
1854
1854
  const n = t.map((e) => Rn(e)).join("");
@@ -1984,7 +1984,7 @@ function Gn(e) {
1984
1984
  const e = /* @__PURE__ */ new Map();
1985
1985
  for (const [n] of t) e.set(n, (e.get(n) ?? 0) + 1);
1986
1986
  const n = {};
1987
- for (const [r, [o, a]] of t.entries()) n[(e.get(o) ?? 0) > 1 ? le(o, r) : o] = a;
1987
+ for (const [r, [o, a]] of t.entries()) n[(e.get(o) ?? 0) > 1 ? R(o, r) : o] = a;
1988
1988
  return n;
1989
1989
  }
1990
1990
  const n = {};
@@ -2238,7 +2238,7 @@ function nr(e) {
2238
2238
  const t = [];
2239
2239
  for (const n of Object.keys(e)) {
2240
2240
  if (n.startsWith("@_")) continue;
2241
- const r = U(n), o = Qn(e[n]);
2241
+ const r = V(n), o = Qn(e[n]);
2242
2242
  for (const e of o) {
2243
2243
  const n = rr(r, e);
2244
2244
  n && t.push(n);
@@ -7977,7 +7977,7 @@ var il = class e {
7977
7977
  const n = /* @__PURE__ */ new Map();
7978
7978
  for (const r of t) if (r.buildType && "allAtOnce" !== r.buildType && r.targetId) {
7979
7979
  const t = e.elements.find((e) => e.id === r.targetId);
7980
- t && N(t) && t.textSegments && t.textSegments.length > 0 && n.set(r.targetId, zs(t.textSegments));
7980
+ t && F(t) && t.textSegments && t.textSegments.length > 0 && n.set(r.targetId, zs(t.textSegments));
7981
7981
  }
7982
7982
  return n;
7983
7983
  }(t, n), o = r.size > 0 ? function(e, t) {
@@ -8793,7 +8793,7 @@ function $l(e, t) {
8793
8793
  return `0 0 0 ${Math.max(1, Math.round(e.contourWidth / fl))}px ${xl(e.contourColor) ?? xl(t) ?? "#000000"}`;
8794
8794
  }
8795
8795
  function kl(e) {
8796
- if (!_(e)) return;
8796
+ if (!H(e)) return;
8797
8797
  const t = e.shapeStyle, n = t?.scene3d, r = t?.shape3d;
8798
8798
  if (!n && !r) return;
8799
8799
  const o = {}, { perspective: a, rotateX: i, rotateY: s, rotateZ: l } = pl(n), c = function(e, t) {
@@ -11067,7 +11067,7 @@ function ap(e, t) {
11067
11067
  r && (void 0 !== r.textDecorationStyle && (e.textDecorationStyle = r.textDecorationStyle), void 0 !== r.textDecorationThickness && (e.textDecorationThickness = r.textDecorationThickness), void 0 !== r.textUnderlineOffset && (e.textUnderlineOffset = r.textUnderlineOffset));
11068
11068
  }
11069
11069
  function ip(e, t) {
11070
- if (!N(e)) return [];
11070
+ if (!F(e)) return [];
11071
11071
  const n = e.textSegments;
11072
11072
  if (!n || 0 === n.length) return e.text ? [{
11073
11073
  runs: [{
@@ -11246,7 +11246,7 @@ function gp(e) {
11246
11246
  return t;
11247
11247
  }
11248
11248
  function yp(e) {
11249
- return !!e && (_(e) || N(e));
11249
+ return !!e && (H(e) || F(e));
11250
11250
  }
11251
11251
  function xp(e, t) {
11252
11252
  return void 0 !== e.equationXml && (t.equationXml = e.equationXml), void 0 !== e.equationNumber && (t.equationNumber = e.equationNumber), void 0 !== e.fieldType && (t.fieldType = e.fieldType), void 0 !== e.fieldGuid && (t.fieldGuid = e.fieldGuid), void 0 !== e.fieldGuidAttr && (t.fieldGuidAttr = e.fieldGuidAttr), void 0 !== e.fieldParagraphPropertiesXml && (t.fieldParagraphPropertiesXml = e.fieldParagraphPropertiesXml), t;
@@ -11260,7 +11260,7 @@ function wp(e) {
11260
11260
  return "number" == typeof t && Number.isFinite(t) ? bp(t) : 16667;
11261
11261
  }
11262
11262
  function $p(e) {
11263
- if (!_(e)) return null;
11263
+ if (!H(e)) return null;
11264
11264
  if ("roundrect" !== String(e.shapeType || "").toLowerCase()) return null;
11265
11265
  const t = wp(e), n = function(e) {
11266
11266
  const t = wp(e) / vp;
@@ -11829,7 +11829,7 @@ function yd(e, t, n, r = "pptx-viewer:local-sync") {
11829
11829
  }, r);
11830
11830
  }
11831
11831
  function xd(e) {
11832
- return N(e) ? e.textSegments && e.textSegments.length > 0 ? e.textSegments.map((e) => e.text).join("") : e.text ?? "" : "";
11832
+ return F(e) ? e.textSegments && e.textSegments.length > 0 ? e.textSegments.map((e) => e.text).join("") : e.text ?? "" : "";
11833
11833
  }
11834
11834
  function vd(e) {
11835
11835
  const t = e.type.charAt(0).toUpperCase() + e.type.slice(1), n = xd(e);
@@ -15199,13 +15199,13 @@ function Nm(e) {
15199
15199
  case "ole":
15200
15200
  case "contentPart":
15201
15201
  case "group": return "group";
15202
- case "shape": return N(e) && e.text ? "group" : "img";
15202
+ case "shape": return F(e) && e.text ? "group" : "img";
15203
15203
  default: return;
15204
15204
  }
15205
15205
  }
15206
15206
  function _m(e) {
15207
15207
  if (("image" === e.type || "picture" === e.type) && "altText" in e && "string" == typeof e.altText && e.altText.trim()) return e.altText.trim();
15208
- if (N(e) && e.text) {
15208
+ if (F(e) && e.text) {
15209
15209
  const t = e.text.trim();
15210
15210
  if (t) return t.length > 120 ? `${t.slice(0, 117)}...` : t;
15211
15211
  }
@@ -16528,7 +16528,7 @@ function Vg(e, t) {
16528
16528
  };
16529
16529
  }
16530
16530
  function qg(e, t) {
16531
- if (N(e)) {
16531
+ if (F(e)) {
16532
16532
  e.textStyle?.fontFamily && t.add(e.textStyle.fontFamily);
16533
16533
  for (const n of e.textSegments ?? []) n.style?.fontFamily && t.add(n.style.fontFamily);
16534
16534
  }
@@ -19910,7 +19910,7 @@ function H$(e) {
19910
19910
  const d = n.value, f = t.value;
19911
19911
  if (s = function(e, t) {
19912
19912
  if (!e) return;
19913
- const n = M(e);
19913
+ const n = W(e);
19914
19914
  if (!n) return;
19915
19915
  const r = new Uint8Array(n.bytes), o = new Blob([r], { type: t ?? "model/gltf-binary" });
19916
19916
  return URL.createObjectURL(o);
@@ -20046,8 +20046,8 @@ function ik(e, t) {
20046
20046
  function sk(e, t) {
20047
20047
  return ge(() => Vg(Oe(e), Oe(t)));
20048
20048
  }
20049
- function lk(e, t, r) {
20050
- const i = function() {
20049
+ function lk(e, t, n) {
20050
+ const r = function() {
20051
20051
  if (be()) {
20052
20052
  const { t: e } = F$();
20053
20053
  return (t, n) => e(t, n ?? {});
@@ -20057,18 +20057,18 @@ function lk(e, t, r) {
20057
20057
  if (t) for (const [e, r] of Object.entries(t)) n = n.replaceAll(`{{${e}}}`, String(r));
20058
20058
  return n;
20059
20059
  };
20060
- }(), s = (e) => r(e), l = (e) => {
20060
+ }(), i = (e) => n(e), l = (e) => {
20061
20061
  const n = t.value;
20062
20062
  if (n) {
20063
20063
  if (e.chartType && e.chartType !== n.chartType) {
20064
- const t = a(n, e.chartType), { chartType: r, ...o } = e;
20065
- s({
20064
+ const t = $(n, e.chartType), { chartType: r, ...o } = e;
20065
+ i({
20066
20066
  ...t,
20067
20067
  ...o
20068
20068
  });
20069
20069
  return;
20070
20070
  }
20071
- s({
20071
+ i({
20072
20072
  ...n,
20073
20073
  ...e
20074
20074
  });
@@ -20088,13 +20088,13 @@ function lk(e, t, r) {
20088
20088
  ...Ee(r),
20089
20089
  chartData: structuredClone(Ee(o))
20090
20090
  };
20091
- n(a), a.chartData && s(a.chartData);
20091
+ n(a), a.chartData && i(a.chartData);
20092
20092
  };
20093
20093
  return {
20094
20094
  patchChartData: l,
20095
20095
  updateStyle: (e) => {
20096
20096
  const n = t.value;
20097
- n && s({
20097
+ n && i({
20098
20098
  ...n,
20099
20099
  style: {
20100
20100
  ...n.style,
@@ -20117,15 +20117,15 @@ function lk(e, t, r) {
20117
20117
  setSeriesColor: (e, t) => u(e, { color: t ?? void 0 }),
20118
20118
  setSeriesTrendline: (e, t) => u(e, { trendlines: t ? [t] : [] }),
20119
20119
  setSeriesErrorBars: (e, t) => u(e, { errBars: t ? [t] : [] }),
20120
- setAxisLogScale: (e, t) => p((r) => n(r, e, t)),
20121
- setAxisTitleStyle: (e, t) => p((n) => I(n, e, t)),
20122
- setGridlineStyle: (e, t, n) => p((r) => pe(r, e, t, n)),
20123
- setSeriesMarker: (e, t) => p((n) => L(n, e, t)),
20124
- setSeriesType: (e, t) => p((n) => A(n, e, t)),
20125
- setPointFill: (e, t, n) => p((r) => c(r, e, t, n)),
20126
- setPointExplosion: (e, t, n) => p((r) => T(r, e, t, n)),
20127
- setPointMarker: (e, t, n) => p((r) => J(r, e, t, n)),
20128
- setPointLabel: (e, t, n) => p((r) => f(r, e, t, null !== n ? { text: n } : null)),
20120
+ setAxisLogScale: (e, t) => p((n) => E(n, e, t)),
20121
+ setAxisTitleStyle: (e, t) => p((n) => le(n, e, t)),
20122
+ setGridlineStyle: (e, t, n) => p((r) => ue(r, e, t, n)),
20123
+ setSeriesMarker: (e, t) => p((n) => s(n, e, t)),
20124
+ setSeriesType: (e, t) => p((n) => c(n, e, t)),
20125
+ setPointFill: (e, t, n) => p((r) => a(r, e, t, n)),
20126
+ setPointExplosion: (e, t, n) => p((r) => k(r, e, t, n)),
20127
+ setPointMarker: (e, t, n) => p((r) => S(r, e, t, n)),
20128
+ setPointLabel: (e, t, n) => p((r) => ie(r, e, t, null !== n ? { text: n } : null)),
20129
20129
  updateSeries: u,
20130
20130
  updateCategoryLabel: (e, n) => {
20131
20131
  const r = t.value;
@@ -20135,26 +20135,26 @@ function lk(e, t, r) {
20135
20135
  const o = t.value;
20136
20136
  if (!o) return;
20137
20137
  const a = Number.parseFloat(r);
20138
- Number.isFinite(a) && s(z(o, e, n, a));
20138
+ Number.isFinite(a) && i(M(o, e, n, a));
20139
20139
  },
20140
20140
  addSeries: () => {
20141
20141
  const e = t.value;
20142
- e && s(k(e, {
20143
- name: i("pptx.chart.seriesDefaultName", { number: e.series.length + 1 }),
20142
+ e && i(se(e, {
20143
+ name: r("pptx.chart.seriesDefaultName", { number: e.series.length + 1 }),
20144
20144
  values: e.categories.map(() => 0)
20145
20145
  }));
20146
20146
  },
20147
20147
  removeSeries: (e) => {
20148
20148
  const n = t.value;
20149
- !n || n.series.length <= 1 || s(v(n, e));
20149
+ !n || n.series.length <= 1 || i(ae(n, e));
20150
20150
  },
20151
20151
  addCategory: () => {
20152
20152
  const e = t.value;
20153
- e && s(se(e, `Cat ${e.categories.length + 1}`));
20153
+ e && i(D(e, `Cat ${e.categories.length + 1}`));
20154
20154
  },
20155
20155
  removeCategory: (e) => {
20156
20156
  const n = t.value;
20157
- !n || n.categories.length <= 1 || s(o(n, e));
20157
+ !n || n.categories.length <= 1 || i(o(n, e));
20158
20158
  }
20159
20159
  };
20160
20160
  }
@@ -20291,30 +20291,30 @@ function bk(e) {
20291
20291
  const o = e.box?.value, a = o ? fg(t, t.layout, oh(t), t.style ?? "flat", e.elementId ?? "smartart", o) : t;
20292
20292
  n({ smartArtData: a }), h(r);
20293
20293
  }
20294
- function g(e) {
20294
+ function y(e) {
20295
20295
  m({
20296
20296
  ...t.value,
20297
20297
  ...e
20298
20298
  });
20299
20299
  }
20300
- function y(e) {
20300
+ function x(e) {
20301
20301
  if (r.value.length <= 1) return !1;
20302
20302
  return !!r.value.find((t) => t.id === e)?.parentId || fk(i.value, s.value);
20303
20303
  }
20304
- function v(e) {
20305
- const n = b(t.value, e);
20304
+ function b(e) {
20305
+ const n = j(t.value, e);
20306
20306
  n !== t.value && m(n, e);
20307
20307
  }
20308
20308
  function w(e) {
20309
20309
  const n = function(e, t) {
20310
- const n = C(e, t);
20310
+ const n = pe(e, t);
20311
20311
  return n === e ? void 0 : n;
20312
20312
  }(t.value, e);
20313
20313
  n && m(n, e);
20314
20314
  }
20315
20315
  function $(e, n) {
20316
20316
  const r = function(e, t, n) {
20317
- const r = x(e, t, n);
20317
+ const r = L(e, t, n);
20318
20318
  return r === e ? void 0 : r;
20319
20319
  }(t.value, e, n);
20320
20320
  r && m(r, e);
@@ -20332,22 +20332,22 @@ function bk(e) {
20332
20332
  pendingFocusId: d,
20333
20333
  setInputEl: f,
20334
20334
  updateNodeText: function(e, n) {
20335
- m(V(t.value, e, n));
20335
+ m(g(t.value, e, n));
20336
20336
  },
20337
20337
  setNodeStyle: function(e, n) {
20338
- const r = ne(t.value, e, n);
20338
+ const r = v(t.value, e, n);
20339
20339
  r !== t.value && m(r);
20340
20340
  },
20341
20341
  addItem: function() {
20342
- l.value && m(ae(t.value, `Item ${r.value.length + 1}`));
20342
+ l.value && m(z(t.value, `Item ${r.value.length + 1}`));
20343
20343
  },
20344
20344
  addSubItem: function(e) {
20345
- m(ce(t.value, e, "Sub-item"));
20345
+ m(Y(t.value, e, "Sub-item"));
20346
20346
  },
20347
20347
  removeNode: function(e) {
20348
- y(e) && m(X(t.value, e));
20348
+ x(e) && m(X(t.value, e));
20349
20349
  },
20350
- promote: v,
20350
+ promote: b,
20351
20351
  demote: w,
20352
20352
  moveUp: (e) => $(e, -1),
20353
20353
  moveDown: (e) => $(e, 1),
@@ -20356,7 +20356,7 @@ function bk(e) {
20356
20356
  if ("Enter" === e.key) {
20357
20357
  e.preventDefault();
20358
20358
  const r = function(e, t) {
20359
- const n = ae(e, "", t);
20359
+ const n = z(e, "", t);
20360
20360
  if (n === e) return;
20361
20361
  const r = n.nodes.findIndex((e) => e.id === t);
20362
20362
  return {
@@ -20365,9 +20365,9 @@ function bk(e) {
20365
20365
  };
20366
20366
  }(t.value, n);
20367
20367
  r && m(r.data, r.focusNodeId);
20368
- } else if ("Backspace" !== e.key && "Delete" !== e.key || !a) "Tab" !== e.key || e.shiftKey ? "Tab" === e.key && e.shiftKey && (e.preventDefault(), v(n)) : (e.preventDefault(), w(n));
20368
+ } else if ("Backspace" !== e.key && "Delete" !== e.key || !a) "Tab" !== e.key || e.shiftKey ? "Tab" === e.key && e.shiftKey && (e.preventDefault(), b(n)) : (e.preventDefault(), w(n));
20369
20369
  else {
20370
- if (!y(n)) return;
20370
+ if (!x(n)) return;
20371
20371
  e.preventDefault();
20372
20372
  const r = function(e, t) {
20373
20373
  if (e.nodes.length <= 1) return;
@@ -20382,15 +20382,15 @@ function bk(e) {
20382
20382
  }
20383
20383
  },
20384
20384
  setColorScheme: function(e) {
20385
- e !== o.value && g({ colorScheme: e });
20385
+ e !== o.value && y({ colorScheme: e });
20386
20386
  },
20387
20387
  setStyle: function(e) {
20388
- e !== a.value && g({ style: e });
20388
+ e !== a.value && y({ style: e });
20389
20389
  },
20390
20390
  switchLayout: function(e) {
20391
20391
  if (e === i.value) return;
20392
- const n = W(t.value, e);
20393
- g({
20392
+ const n = K(t.value, e);
20393
+ y({
20394
20394
  layoutType: n.layoutType,
20395
20395
  resolvedLayoutType: n.resolvedLayoutType,
20396
20396
  layout: n.layout,
@@ -21426,14 +21426,14 @@ var uM = {
21426
21426
  warning: 1,
21427
21427
  tip: 2
21428
21428
  };
21429
- function pM(t, n = {}) {
21429
+ function pM(e, n = {}) {
21430
21430
  const r = ge(() => {
21431
- const r = Oe(t), o = Oe(n), a = o.minContrastRatio ?? 4.5, i = o.skipContrast ?? !1, l = o.skipBlankSlide ?? !1, c = [];
21432
- for (let t = 0; t < r.length; t++) {
21433
- const n = r[t];
21434
- c.push(...w(n, t)), c.push(...s(n, t)), i || c.push(...y(n, t, a, n.backgroundColor)), c.push(...Y(n, t)), l || c.push(...e(n, t));
21431
+ const r = Oe(e), o = Oe(n), a = o.minContrastRatio ?? 4.5, s = o.skipContrast ?? !1, c = o.skipBlankSlide ?? !1, u = [];
21432
+ for (let e = 0; e < r.length; e++) {
21433
+ const n = r[e];
21434
+ u.push(...t(n, e)), u.push(...G(n, e)), s || u.push(...U(n, e, a, n.backgroundColor)), u.push(...i(n, e)), c || u.push(...l(n, e));
21435
21435
  }
21436
- return c.push(...g(r)), c.sort((e, t) => e.slideIndex - t.slideIndex || uM[e.severity] - uM[t.severity]), c;
21436
+ return u.push(...x(r)), u.sort((e, t) => e.slideIndex - t.slideIndex || uM[e.severity] - uM[t.severity]), u;
21437
21437
  });
21438
21438
  return {
21439
21439
  issues: r,
@@ -21441,31 +21441,31 @@ function pM(t, n = {}) {
21441
21441
  };
21442
21442
  }
21443
21443
  function dM(e) {
21444
- const { selectedElements: n, selectedElementIds: r, activeSlideIndex: o, slides: a, pushHistory: i } = e;
21445
- function s(e) {
21444
+ const { selectedElements: t, selectedElementIds: n, activeSlideIndex: r, slides: o, pushHistory: a } = e;
21445
+ function i(e) {
21446
21446
  if (0 === e.size) return;
21447
- const t = o.value, n = a.value[t];
21447
+ const t = r.value, n = o.value[t];
21448
21448
  if (!n) return;
21449
- i();
21450
- const r = n.elements.map((t) => {
21449
+ a();
21450
+ const i = n.elements.map((t) => {
21451
21451
  const n = e.get(t.id);
21452
21452
  return n ? {
21453
21453
  ...t,
21454
21454
  ...void 0 === n.x ? {} : { x: n.x },
21455
21455
  ...void 0 === n.y ? {} : { y: n.y }
21456
21456
  } : t;
21457
- }), s = a.value.slice();
21457
+ }), s = o.value.slice();
21458
21458
  s[t] = {
21459
21459
  ...n,
21460
- elements: r
21461
- }, a.value = s;
21460
+ elements: i
21461
+ }, o.value = s;
21462
21462
  }
21463
21463
  return {
21464
- canGroup: ge(() => n.value.length >= 2),
21465
- canUngroup: ge(() => 1 === n.value.length && "group" === n.value[0]?.type),
21466
- canDistribute: ge(() => n.value.length >= 3),
21464
+ canGroup: ge(() => t.value.length >= 2),
21465
+ canUngroup: ge(() => 1 === t.value.length && "group" === t.value[0]?.type),
21466
+ canDistribute: ge(() => t.value.length >= 3),
21467
21467
  onAlign: function(e) {
21468
- s(function(e, t) {
21468
+ i(function(e, t) {
21469
21469
  const n = /* @__PURE__ */ new Map();
21470
21470
  if (e.length < 2) return n;
21471
21471
  const r = Math.min(...e.map((e) => e.x)), o = Math.min(...e.map((e) => e.y)), a = Math.max(...e.map((e) => e.x + e.width)), i = Math.max(...e.map((e) => e.y + e.height)), s = (r + a) / 2, l = (o + i) / 2;
@@ -21488,10 +21488,10 @@ function dM(e) {
21488
21488
  case "middle": n.set(c.id, { y: l - c.height / 2 });
21489
21489
  }
21490
21490
  return n;
21491
- }(n.value, e));
21491
+ }(t.value, e));
21492
21492
  },
21493
21493
  onDistribute: function(e) {
21494
- s(function(e, t) {
21494
+ i(function(e, t) {
21495
21495
  const n = /* @__PURE__ */ new Map();
21496
21496
  if (e.length < 3) return n;
21497
21497
  const r = "horizontal" === t, o = (e) => r ? e.x : e.y, a = (e) => r ? e.width : e.height, i = [...e].sort((e, t) => o(e) - o(t)), s = i[0], l = i[i.length - 1], c = (o(l) + a(l) - o(s) - i.reduce((e, t) => e + a(t), 0)) / (i.length - 1);
@@ -21501,12 +21501,12 @@ function dM(e) {
21501
21501
  r ? n.set(e.id, { x: t }) : n.set(e.id, { y: t }), u += a(e) + c;
21502
21502
  }
21503
21503
  return n;
21504
- }(n.value, e));
21504
+ }(t.value, e));
21505
21505
  },
21506
21506
  onGroup: function() {
21507
- const e = n.value, s = o.value, l = a.value[s];
21508
- if (e.length < 2 || !l) return;
21509
- const { elements: c, groupId: u } = function(e, t, n) {
21507
+ const e = t.value, i = r.value, s = o.value[i];
21508
+ if (e.length < 2 || !s) return;
21509
+ const { elements: l, groupId: c } = function(e, t, n) {
21510
21510
  const r = new Set(t), o = [];
21511
21511
  let a = -1;
21512
21512
  for (let t = 0; t < e.length; t++) {
@@ -21548,17 +21548,17 @@ function dM(e) {
21548
21548
  ],
21549
21549
  groupId: n
21550
21550
  };
21551
- }(l.elements, e.map((e) => e.id), t("grp"));
21552
- if (null === u) return;
21553
- i();
21554
- const p = a.value.slice();
21555
- p[s] = {
21556
- ...l,
21557
- elements: c
21558
- }, a.value = p, r.value = [u];
21551
+ }(s.elements, e.map((e) => e.id), p("grp"));
21552
+ if (null === c) return;
21553
+ a();
21554
+ const u = o.value.slice();
21555
+ u[i] = {
21556
+ ...s,
21557
+ elements: l
21558
+ }, o.value = u, n.value = [c];
21559
21559
  },
21560
21560
  onUngroup: function() {
21561
- const e = n.value[0], t = o.value, s = a.value[t];
21561
+ const e = t.value[0], i = r.value, s = o.value[i];
21562
21562
  if (!e || "group" !== e.type || !s) return;
21563
21563
  const l = (e.children ?? []).map((e) => e.id), { elements: c, childIds: u } = function(e, t, n) {
21564
21564
  const r = e.findIndex((e) => e.id === t);
@@ -21589,12 +21589,12 @@ function dM(e) {
21589
21589
  childIds: i
21590
21590
  };
21591
21591
  }(s.elements, e.id, l);
21592
- i();
21593
- const p = a.value.slice();
21594
- p[t] = {
21592
+ a();
21593
+ const p = o.value.slice();
21594
+ p[i] = {
21595
21595
  ...s,
21596
21596
  elements: c
21597
- }, a.value = p, r.value = u;
21597
+ }, o.value = p, n.value = u;
21598
21598
  }
21599
21599
  };
21600
21600
  }
@@ -21694,7 +21694,7 @@ function xM(e) {
21694
21694
  if (!n || !r.onWriteBack) return;
21695
21695
  const o = e.getSourceBytes?.();
21696
21696
  if (o) try {
21697
- const { PptxHandler: t } = await import("./dist-O5B4b6cK.js").then((e) => e.J), a = new t();
21697
+ const { PptxHandler: t } = await import("./dist-BrPQWoqf.js").then((e) => e.H), a = new t();
21698
21698
  await a.load(o.buffer);
21699
21699
  const i = id(n), s = e.mergeTemplateElements ? e.mergeTemplateElements(i, e.getTemplateElements?.() ?? {}) : i, l = await a.save(s);
21700
21700
  r.onWriteBack(l);
@@ -22450,13 +22450,13 @@ function CM(e, t, n) {
22450
22450
  o.value++;
22451
22451
  }, i = (e) => {
22452
22452
  const t = {};
22453
- for (const [n, r] of Object.entries(e)) t[n] = r.map(p);
22453
+ for (const [n, r] of Object.entries(e)) t[n] = r.map(m);
22454
22454
  return t;
22455
22455
  }, s = () => ({
22456
- slides: e.value.map(h),
22456
+ slides: e.value.map(y),
22457
22457
  template: i(t?.value ?? {})
22458
22458
  }), l = (n) => {
22459
- e.value = n.slides.map(h), t && (t.value = i(n.template));
22459
+ e.value = n.slides.map(y), t && (t.value = i(n.template));
22460
22460
  };
22461
22461
  return {
22462
22462
  canUndo: ge(() => (o.value, r.canUndo)),
@@ -22547,7 +22547,7 @@ function AM(e) {
22547
22547
  const { slides: t, activeSlideIndex: n, pushHistory: r } = e, o = e.selectedElementIds ?? Fe([]), a = ge(() => t.value[n.value]), i = (e) => {
22548
22548
  const o = n.value;
22549
22549
  t.value[o] && (r(), t.value = t.value.map((t, n) => n === o ? {
22550
- ...h(t),
22550
+ ...y(t),
22551
22551
  elements: e(t.elements)
22552
22552
  } : t));
22553
22553
  }, s = e.templateElementsBySlideId, l = (e, o) => {
@@ -22562,13 +22562,13 @@ function AM(e) {
22562
22562
  return r ? s && cc(e) ? s.value[r.id] ?? [] : r.elements : [];
22563
22563
  }, u = (e, t) => {
22564
22564
  l(e, (n) => n.map((n) => n.id === e ? {
22565
- ...p(n),
22565
+ ...m(n),
22566
22566
  ...t
22567
22567
  } : n));
22568
- }, d = (e, t) => {
22568
+ }, p = (e, t) => {
22569
22569
  const n = {};
22570
22570
  void 0 !== t.x && (n.x = t.x), void 0 !== t.y && (n.y = t.y), void 0 !== t.width && (n.width = t.width), void 0 !== t.height && (n.height = t.height), void 0 !== t.rotation && (n.rotation = t.rotation), u(e, n);
22571
- }, f = (e, t) => {
22571
+ }, d = (e, t) => {
22572
22572
  const n = c(e), r = n.findIndex((t) => t.id === e);
22573
22573
  if (-1 === r) return;
22574
22574
  const o = r + t;
@@ -22581,23 +22581,23 @@ function AM(e) {
22581
22581
  activeSlide: a,
22582
22582
  selectedElementIds: o,
22583
22583
  addElement: (e) => {
22584
- const t = p(e);
22584
+ const t = m(e);
22585
22585
  i((e) => [...e, t]), o.value = [t.id];
22586
22586
  },
22587
22587
  updateElement: u,
22588
22588
  removeElement: (e) => {
22589
22589
  l(e, (t) => t.filter((t) => t.id !== e)), o.value.includes(e) && (o.value = o.value.filter((t) => t !== e));
22590
22590
  },
22591
- transformElement: d,
22592
- moveElement: d,
22591
+ transformElement: p,
22592
+ moveElement: p,
22593
22593
  duplicateElement: (e) => {
22594
22594
  const t = c(e).find((t) => t.id === e);
22595
22595
  if (!t) return;
22596
- const n = P(t);
22596
+ const n = I(t);
22597
22597
  return n.x += 20, n.y += 20, i((e) => [...e, n]), o.value = [n.id], n.id;
22598
22598
  },
22599
- bringForward: (e) => f(e, 1),
22600
- sendBackward: (e) => f(e, -1),
22599
+ bringForward: (e) => d(e, 1),
22600
+ sendBackward: (e) => d(e, -1),
22601
22601
  reorder: (e, t) => {
22602
22602
  const n = c(e), r = n.findIndex((t) => t.id === e);
22603
22603
  if (-1 === r) return;
@@ -22611,11 +22611,11 @@ function AM(e) {
22611
22611
  l(e, (r) => r.map((r) => {
22612
22612
  if (r.id !== e) return r;
22613
22613
  if ("smartArt" === r.type) return n && r.smartArtData ? {
22614
- ...p(r),
22615
- smartArtData: V(r.smartArtData, n, t)
22614
+ ...m(r),
22615
+ smartArtData: g(r.smartArtData, n, t)
22616
22616
  } : r;
22617
22617
  if ("text" === r.type || "shape" === r.type) {
22618
- const e = p(r);
22618
+ const e = m(r);
22619
22619
  if (e.text = t, e.textSegments && e.textSegments.length > 0) {
22620
22620
  const n = e.textSegments[0].style;
22621
22621
  e.textSegments = [{
@@ -22632,17 +22632,17 @@ function AM(e) {
22632
22632
  };
22633
22633
  }
22634
22634
  function PM(e) {
22635
- const { findActiveElement: n, pushHistory: r, effectiveZoom: o, activeTemplateElements: a, activeSlide: i, activeSlideIndex: s, slides: l, templateElementsBySlideId: c, canvasSize: u, enterInlineEdit: p } = e, d = Fe(!1), f = Fe(!1), h = Fe([]), m = Fe([]);
22635
+ const { findActiveElement: t, pushHistory: n, effectiveZoom: r, activeTemplateElements: o, activeSlide: a, activeSlideIndex: i, slides: s, templateElementsBySlideId: l, canvasSize: c, enterInlineEdit: u } = e, d = Fe(!1), f = Fe(!1), h = Fe([]), m = Fe([]);
22636
22636
  let g = null;
22637
22637
  function y(e) {
22638
22638
  const t = g;
22639
22639
  if (!t) return;
22640
- const n = e.clientX - t.startClientX, s = e.clientY - t.startClientY;
22641
- if (!t.moved && (Math.abs(n) > 2 || Math.abs(s) > 2) && (t.moved = !0, r()), !t.moved) return;
22642
- const l = gc(t.startBox, n, s, o.value);
22640
+ const i = e.clientX - t.startClientX, s = e.clientY - t.startClientY;
22641
+ if (!t.moved && (Math.abs(i) > 2 || Math.abs(s) > 2) && (t.moved = !0, n()), !t.moved) return;
22642
+ const l = gc(t.startBox, i, s, r.value);
22643
22643
  let c = l.x, u = l.y;
22644
22644
  if (d.value && !l.rotation) {
22645
- const e = (cc(t.id) ? a.value : i.value?.elements ?? []).map((e) => ({
22645
+ const e = (cc(t.id) ? o.value : a.value?.elements ?? []).map((e) => ({
22646
22646
  id: e.id,
22647
22647
  x: e.x,
22648
22648
  y: e.y,
@@ -22739,23 +22739,23 @@ function PM(e) {
22739
22739
  }
22740
22740
  function x() {
22741
22741
  const e = g;
22742
- g = null, h.value.length > 0 && (h.value = []), window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", x), window.removeEventListener("pointercancel", x), e && !e.moved && e.wasSelected && p(e.id);
22742
+ g = null, h.value.length > 0 && (h.value = []), window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", x), window.removeEventListener("pointercancel", x), e && !e.moved && e.wasSelected && u(e.id);
22743
22743
  }
22744
22744
  function v(e, t) {
22745
- const n = s.value, r = l.value[n];
22745
+ const n = i.value, r = s.value[n];
22746
22746
  if (!r) return;
22747
22747
  if (cc(e)) {
22748
- const n = c.value[r.id];
22748
+ const n = l.value[r.id];
22749
22749
  if (!n) return;
22750
22750
  const o = n.map((n) => n.id === e ? t(n) : n);
22751
- c.value = lM(c.value, r.id, o);
22751
+ l.value = lM(l.value, r.id, o);
22752
22752
  return;
22753
22753
  }
22754
- const o = r.elements.map((n) => n.id === e ? t(n) : n), a = l.value.slice();
22754
+ const o = r.elements.map((n) => n.id === e ? t(n) : n), a = s.value.slice();
22755
22755
  a[n] = {
22756
22756
  ...r,
22757
22757
  elements: o
22758
- }, l.value = a;
22758
+ }, s.value = a;
22759
22759
  }
22760
22760
  function b(e) {
22761
22761
  const { x: n, y: r, width: o, height: a } = f.value && !e.rotation ? (s = 8, {
@@ -22794,7 +22794,7 @@ function PM(e) {
22794
22794
  snapLines: h,
22795
22795
  guides: m,
22796
22796
  addGuide: function(e) {
22797
- m.value = [...m.value, Cm(t("guide"), e, u.value)];
22797
+ m.value = [...m.value, Cm(p("guide"), e, c.value)];
22798
22798
  },
22799
22799
  onMoveGuide: function(e) {
22800
22800
  m.value = function(e, t, n, r) {
@@ -22806,19 +22806,19 @@ function PM(e) {
22806
22806
  position: Math.max(0, Math.min(o, n))
22807
22807
  };
22808
22808
  });
22809
- }(m.value, e.id, e.position, u.value);
22809
+ }(m.value, e.id, e.position, c.value);
22810
22810
  },
22811
22811
  onRemoveGuide: function(e) {
22812
22812
  m.value = function(e, t) {
22813
22813
  return e.filter((e) => e.id !== t);
22814
22814
  }(m.value, e);
22815
22815
  },
22816
- startElementDrag: function(e, t, r) {
22817
- const o = n(e);
22816
+ startElementDrag: function(e, n, r) {
22817
+ const o = t(e);
22818
22818
  o && (g = {
22819
22819
  id: e,
22820
- startClientX: t.clientX,
22821
- startClientY: t.clientY,
22820
+ startClientX: n.clientX,
22821
+ startClientY: n.clientY,
22822
22822
  startBox: {
22823
22823
  x: o.x,
22824
22824
  y: o.y,
@@ -22831,7 +22831,7 @@ function PM(e) {
22831
22831
  }, window.addEventListener("pointermove", y), window.addEventListener("pointerup", x), window.addEventListener("pointercancel", x));
22832
22832
  },
22833
22833
  onTransformStart: function() {
22834
- r();
22834
+ n();
22835
22835
  },
22836
22836
  onTransform: function(e) {
22837
22837
  b(e);
@@ -22840,7 +22840,7 @@ function PM(e) {
22840
22840
  b(e);
22841
22841
  },
22842
22842
  onAdjustStart: function() {
22843
- r();
22843
+ n();
22844
22844
  },
22845
22845
  onAdjust: function(e) {
22846
22846
  w(e.id, e.value);
@@ -22851,33 +22851,33 @@ function PM(e) {
22851
22851
  };
22852
22852
  }
22853
22853
  function LM(e) {
22854
- const { canvasSize: n, ops: r, selectedElementIds: o, slides: a, activeSlideIndex: i, pushHistory: s, handler: l } = e;
22855
- function c(e, t, r) {
22856
- e.width = t, e.height = r, e.x = Math.max(0, Math.round((n.value.width - t) / 2)), e.y = Math.max(0, Math.round((n.value.height - r) / 2));
22854
+ const { canvasSize: t, ops: n, selectedElementIds: r, slides: o, activeSlideIndex: a, pushHistory: i, handler: s } = e;
22855
+ function l(e, n, r) {
22856
+ e.width = n, e.height = r, e.x = Math.max(0, Math.round((t.value.width - n) / 2)), e.y = Math.max(0, Math.round((t.value.height - r) / 2));
22857
22857
  }
22858
- const p = Fe(null);
22858
+ const c = Fe(null);
22859
22859
  const d = Fe(null);
22860
22860
  return {
22861
- imageInputRef: p,
22861
+ imageInputRef: c,
22862
22862
  mediaInputRef: d,
22863
22863
  addText: function() {
22864
- const e = u("Text");
22865
- c(e, 320, 80), r.addElement(e), o.value = [e.id];
22864
+ const e = w("Text");
22865
+ l(e, 320, 80), n.addElement(e), r.value = [e.id];
22866
22866
  },
22867
22867
  addShape: function(e) {
22868
- const t = S(e);
22869
- c(t, 240, 160), r.addElement(t), o.value = [t.id];
22868
+ const t = h(e);
22869
+ l(t, 240, 160), n.addElement(t), r.value = [t.id];
22870
22870
  },
22871
22871
  addTable: function() {
22872
22872
  const e = {
22873
22873
  ...Tc(3, 3),
22874
- id: t("table")
22874
+ id: p("table")
22875
22875
  };
22876
- c(e, 600, 250), r.addElement(e), o.value = [e.id];
22876
+ l(e, 600, 250), n.addElement(e), r.value = [e.id];
22877
22877
  },
22878
22878
  addChart: function(e) {
22879
22879
  const t = function(e = "bar", t) {
22880
- return ue(e, {
22880
+ return u(e, {
22881
22881
  categories: [...cg],
22882
22882
  series: [{
22883
22883
  name: "Series 1",
@@ -22892,10 +22892,10 @@ function LM(e) {
22892
22892
  height: t?.height ?? lg
22893
22893
  });
22894
22894
  }(e);
22895
- c(t, t.width, t.height), r.addElement(t), o.value = [t.id];
22895
+ l(t, t.width, t.height), n.addElement(t), r.value = [t.id];
22896
22896
  },
22897
- addField: function(e, n) {
22898
- const s = function(e, t, n = 100, r = 200) {
22897
+ addField: function(e, t) {
22898
+ const i = function(e, t, n = 100, r = 200) {
22899
22899
  return {
22900
22900
  type: "shape",
22901
22901
  id: "",
@@ -22919,74 +22919,74 @@ function LM(e) {
22919
22919
  headerText: "Header",
22920
22920
  footerText: "Footer"
22921
22921
  });
22922
- }(e, i.value + 1, n));
22923
- s.id = t("field"), c(s, s.width, s.height), r.addElement(s), o.value = [s.id];
22922
+ }(e, a.value + 1, t));
22923
+ i.id = p("field"), l(i, i.width, i.height), n.addElement(i), r.value = [i.id];
22924
22924
  },
22925
22925
  openImagePicker: function() {
22926
- p.value?.click();
22926
+ c.value?.click();
22927
22927
  },
22928
22928
  onImageFileSelected: function(e) {
22929
- const a = e.target, i = a.files?.[0];
22930
- if (a.value = "", !i) return;
22931
- const s = new FileReader();
22932
- s.onload = () => {
22933
- const e = "string" == typeof s.result ? s.result : "";
22929
+ const o = e.target, a = o.files?.[0];
22930
+ if (o.value = "", !a) return;
22931
+ const i = new FileReader();
22932
+ i.onload = () => {
22933
+ const e = "string" == typeof i.result ? i.result : "";
22934
22934
  if (!e) return;
22935
- const a = new Image();
22936
- a.onload = () => {
22937
- const i = Math.round(.6 * n.value.width), s = a.width / Math.max(1, a.height), l = Math.min(i, a.width || i), u = Math.max(1, Math.round(l / (s || 1))), p = {
22938
- id: t("image"),
22935
+ const o = new Image();
22936
+ o.onload = () => {
22937
+ const a = Math.round(.6 * t.value.width), i = o.width / Math.max(1, o.height), s = Math.min(a, o.width || a), c = Math.max(1, Math.round(s / (i || 1))), u = {
22938
+ id: p("image"),
22939
22939
  type: "image",
22940
22940
  x: 0,
22941
22941
  y: 0,
22942
- width: l,
22943
- height: u,
22942
+ width: s,
22943
+ height: c,
22944
22944
  imageData: e
22945
22945
  };
22946
- c(p, l, u), r.addElement(p), o.value = [p.id];
22947
- }, a.src = e;
22948
- }, s.readAsDataURL(i);
22946
+ l(u, s, c), n.addElement(u), r.value = [u.id];
22947
+ }, o.src = e;
22948
+ }, i.readAsDataURL(a);
22949
22949
  },
22950
22950
  openMediaPicker: function() {
22951
22951
  d.value?.click();
22952
22952
  },
22953
22953
  onMediaFileSelected: function(e) {
22954
- const n = e.target, a = n.files?.[0];
22955
- if (n.value = "", !a) return;
22956
- const i = a.type.startsWith("audio/") ? "audio" : a.type.startsWith("video/") ? "video" : null;
22957
- if (!i) return;
22958
- const s = new FileReader();
22959
- s.onload = () => {
22960
- const e = "string" == typeof s.result ? s.result : "";
22954
+ const t = e.target, o = t.files?.[0];
22955
+ if (t.value = "", !o) return;
22956
+ const a = o.type.startsWith("audio/") ? "audio" : o.type.startsWith("video/") ? "video" : null;
22957
+ if (!a) return;
22958
+ const i = new FileReader();
22959
+ i.onload = () => {
22960
+ const e = "string" == typeof i.result ? i.result : "";
22961
22961
  if (!e) return;
22962
- const n = (n, s) => {
22963
- const l = {
22964
- id: t("media"),
22962
+ const t = (t, i) => {
22963
+ const s = {
22964
+ id: p("media"),
22965
22965
  type: "media",
22966
- mediaType: i,
22967
- mediaMimeType: a.type || void 0,
22966
+ mediaType: a,
22967
+ mediaMimeType: o.type || void 0,
22968
22968
  mediaData: e,
22969
22969
  x: 0,
22970
22970
  y: 0,
22971
- width: n,
22972
- height: s
22971
+ width: t,
22972
+ height: i
22973
22973
  };
22974
- c(l, n, s), r.addElement(l), o.value = [l.id];
22974
+ l(s, t, i), n.addElement(s), r.value = [s.id];
22975
22975
  };
22976
- if ("audio" === i) return void n(420, 64);
22977
- const l = document.createElement("video");
22978
- l.preload = "metadata", l.onloadedmetadata = () => {
22979
- let e = l.videoWidth || 640, t = l.videoHeight || 360;
22980
- if (e > 640 || t > 360) {
22981
- const n = Math.min(640 / e, 360 / t);
22982
- e = Math.round(e * n), t = Math.round(t * n);
22976
+ if ("audio" === a) return void t(420, 64);
22977
+ const s = document.createElement("video");
22978
+ s.preload = "metadata", s.onloadedmetadata = () => {
22979
+ let e = s.videoWidth || 640, n = s.videoHeight || 360;
22980
+ if (e > 640 || n > 360) {
22981
+ const t = Math.min(640 / e, 360 / n);
22982
+ e = Math.round(e * t), n = Math.round(n * t);
22983
22983
  }
22984
- n(e, t);
22985
- }, l.onerror = () => n(640, 360), l.src = e;
22986
- }, s.readAsDataURL(a);
22984
+ t(e, n);
22985
+ }, s.onerror = () => t(640, 360), s.src = e;
22986
+ }, i.readAsDataURL(o);
22987
22987
  },
22988
22988
  addActionButton: function(e) {
22989
- const n = function(e, t) {
22989
+ const t = function(e, t) {
22990
22990
  const n = bm[e];
22991
22991
  if (!n) return null;
22992
22992
  const r = n.jump ? vm[n.jump] : void 0;
@@ -23024,27 +23024,27 @@ function LM(e) {
23024
23024
  highlightClick: !0
23025
23025
  } } : {}
23026
23026
  };
23027
- }(e, t("action"));
23028
- n && (c(n, 120, 50), r.addElement(n), o.value = [n.id]);
23029
- },
23030
- insertSlideFromLayout: async function(e, n) {
23031
- const r = i.value + 1;
23032
- s();
23033
- const o = {
23034
- id: t("slide"),
23027
+ }(e, p("action"));
23028
+ t && (l(t, 120, 50), n.addElement(t), r.value = [t.id]);
23029
+ },
23030
+ insertSlideFromLayout: async function(e, t) {
23031
+ const n = a.value + 1;
23032
+ i();
23033
+ const r = {
23034
+ id: p("slide"),
23035
23035
  rId: "",
23036
- slideNumber: a.value.length + 1,
23036
+ slideNumber: o.value.length + 1,
23037
23037
  elements: [],
23038
23038
  layoutPath: e,
23039
- ...n ? { layoutName: n } : {}
23040
- }, c = a.value.slice();
23041
- c.splice(r, 0, o), a.value = c, i.value = r;
23042
- const u = l.value;
23043
- if (!u) return;
23044
- const p = await u.applyLayoutToSlide(r, e, a.value).catch(() => null);
23045
- if (p && p.id === o.id && a.value[r]?.id === o.id) {
23046
- const e = a.value.slice();
23047
- e[r] = p, a.value = e;
23039
+ ...t ? { layoutName: t } : {}
23040
+ }, l = o.value.slice();
23041
+ l.splice(n, 0, r), o.value = l, a.value = n;
23042
+ const c = s.value;
23043
+ if (!c) return;
23044
+ const u = await c.applyLayoutToSlide(n, e, o.value).catch(() => null);
23045
+ if (u && u.id === r.id && o.value[n]?.id === r.id) {
23046
+ const e = o.value.slice();
23047
+ e[n] = u, o.value = e;
23048
23048
  }
23049
23049
  }
23050
23050
  };
@@ -23067,31 +23067,31 @@ var BM = {
23067
23067
  function RM(e) {
23068
23068
  const t = "string" == typeof e.name ? e.name.trim() : "";
23069
23069
  if (0 === t.length || FM.test(t)) return null;
23070
- const n = e.bold ? "700" : "400", r = e.italic ? "italic" : "normal";
23071
- if ("string" == typeof (o = e.dataUrl) && 0 !== o.length && (o.startsWith("blob:") || EM.test(o))) {
23072
- const o = e.format && DM.has(e.format) ? e.format : "truetype";
23070
+ const n = e.bold ? "700" : "400", o = e.italic ? "italic" : "normal";
23071
+ if ("string" == typeof (a = e.dataUrl) && 0 !== a.length && (a.startsWith("blob:") || EM.test(a))) {
23072
+ const r = e.format && DM.has(e.format) ? e.format : "truetype";
23073
23073
  return {
23074
23074
  name: t,
23075
23075
  url: e.dataUrl,
23076
- format: o,
23076
+ format: r,
23077
23077
  weight: n,
23078
- style: r
23078
+ style: o
23079
23079
  };
23080
23080
  }
23081
- var o;
23081
+ var a;
23082
23082
  if (!OM()) return null;
23083
- let a;
23084
- if (e.rawFontData && e.rawFontData.length > 0 ? a = e.rawFontData : e.originalPartBytes && e.originalPartBytes.length > 0 && e.fontGuid && (a = l(e.originalPartBytes, e.fontGuid)), !a || a.length < 4) return null;
23085
- const i = d(a), s = DM.has(i) ? i : "truetype", c = BM[s] ?? "font/ttf", u = new Uint8Array(a.length);
23086
- u.set(a);
23087
- const p = new Blob([u], { type: c }), f = URL.createObjectURL(p);
23083
+ let i;
23084
+ if (e.rawFontData && e.rawFontData.length > 0 ? i = e.rawFontData : e.originalPartBytes && e.originalPartBytes.length > 0 && e.fontGuid && (i = r(e.originalPartBytes, e.fontGuid)), !i || i.length < 4) return null;
23085
+ const s = C(i), l = DM.has(s) ? s : "truetype", c = BM[l] ?? "font/ttf", u = new Uint8Array(i.length);
23086
+ u.set(i);
23087
+ const p = new Blob([u], { type: c }), d = URL.createObjectURL(p);
23088
23088
  return {
23089
23089
  name: t,
23090
- url: f,
23091
- format: s,
23090
+ url: d,
23091
+ format: l,
23092
23092
  weight: n,
23093
- style: r,
23094
- objectUrl: f
23093
+ style: o,
23094
+ objectUrl: d
23095
23095
  };
23096
23096
  }
23097
23097
  function NM(e) {
@@ -23118,7 +23118,7 @@ function _M(e) {
23118
23118
  return t = a, r(o), i;
23119
23119
  }), a = ge(() => o.value.map(NM).join("\n\n")), i = ge(() => {
23120
23120
  const e = /* @__PURE__ */ new Set(), t = [];
23121
- for (const n of o.value) e.has(n.name) || (e.add(n.name), t.push(R(n.name)));
23121
+ for (const n of o.value) e.has(n.name) || (e.add(n.name), t.push(q(n.name)));
23122
23122
  return t;
23123
23123
  }), s = Re(a, (e) => {
23124
23124
  if ("undefined" != typeof document && "function" == typeof document.createElement && void 0 !== document.head) {
@@ -23285,7 +23285,7 @@ function qM(e) {
23285
23285
  if (e?.aborted) throw new DOMException("Export cancelled", "AbortError");
23286
23286
  }
23287
23287
  function ZM(e) {
23288
- const { slideCount: t, rasterizeSlide: n } = e, r = e.loadGifEncoder ?? (async () => (await import("./gif-encoder-N6lgh64R.js")).encodeGif), o = e.createRecorder ?? VM, a = e.createCanvas ?? (() => document.createElement("canvas")), i = e.downloadBlob ?? Ky, s = Fe(!1), l = Fe(0);
23288
+ const { slideCount: t, rasterizeSlide: n } = e, r = e.loadGifEncoder ?? (async () => (await import("./gif-encoder-6ImIq6nV.js")).encodeGif), o = e.createRecorder ?? VM, a = e.createCanvas ?? (() => document.createElement("canvas")), i = e.downloadBlob ?? Ky, s = Fe(!1), l = Fe(0);
23289
23289
  return {
23290
23290
  exporting: s,
23291
23291
  progress: l,
@@ -23452,8 +23452,8 @@ function eS(e, t, n) {
23452
23452
  const r = n ? t : t.toLowerCase(), o = [];
23453
23453
  return e.forEach((e, t) => {
23454
23454
  for (const a of e.elements ?? []) {
23455
- if (!N(a)) continue;
23456
- const e = D(a);
23455
+ if (!F(a)) continue;
23456
+ const e = T(a);
23457
23457
  (n ? e : e.toLowerCase()).includes(r) && o.push({
23458
23458
  slideIndex: t,
23459
23459
  elementId: a.id,
@@ -23492,7 +23492,7 @@ function nS({ slides: e, activeSlideIndex: t, pushHistory: n }) {
23492
23492
  }
23493
23493
  for (const [t, n] of i) {
23494
23494
  const i = e.value[t];
23495
- i?.elements && (i.elements = i.elements.map((e) => n.has(e.id) && N(e) ? tS(e, r.value, o.value, a.value) : e));
23495
+ i?.elements && (i.elements = i.elements.map((e) => n.has(e.id) && F(e) ? tS(e, r.value, o.value, a.value) : e));
23496
23496
  }
23497
23497
  }
23498
23498
  return {
@@ -23544,7 +23544,7 @@ function oS(e) {
23544
23544
  const e = t.value[0];
23545
23545
  e && yp(e) && (a.value = function(e) {
23546
23546
  const t = {};
23547
- if (_(e) && e.shapeStyle) {
23547
+ if (H(e) && e.shapeStyle) {
23548
23548
  const n = e.shapeStyle;
23549
23549
  t.shapeStyle = {
23550
23550
  fillColor: n.fillColor,
@@ -23573,7 +23573,7 @@ function oS(e) {
23573
23573
  softEdgeRadius: n.softEdgeRadius
23574
23574
  };
23575
23575
  }
23576
- if (N(e) && e.textStyle) {
23576
+ if (F(e) && e.textStyle) {
23577
23577
  const n = e.textStyle;
23578
23578
  t.textStyle = {
23579
23579
  fontFamily: n.fontFamily,
@@ -23600,13 +23600,13 @@ function oS(e) {
23600
23600
  if (!t || !o) return;
23601
23601
  const i = function(e, t) {
23602
23602
  let n = { ...e };
23603
- return t.shapeStyle && _(n) && (n = {
23603
+ return t.shapeStyle && H(n) && (n = {
23604
23604
  ...n,
23605
23605
  shapeStyle: {
23606
23606
  ...n.shapeStyle,
23607
23607
  ...gp(t.shapeStyle)
23608
23608
  }
23609
- }), t.textStyle && N(n) && (n = {
23609
+ }), t.textStyle && F(n) && (n = {
23610
23610
  ...n,
23611
23611
  textStyle: {
23612
23612
  ...n.textStyle,
@@ -23628,32 +23628,32 @@ function aS(e) {
23628
23628
  };
23629
23629
  }
23630
23630
  function iS(e) {
23631
- const { canEdit: n, presenting: r, activeTool: o, activeSlide: a, selectedElementIds: i, ops: s } = e;
23631
+ const { canEdit: t, presenting: n, activeTool: r, activeSlide: o, selectedElementIds: a, ops: i } = e;
23632
23632
  return {
23633
- drawingActive: ge(() => n() && !r.value && "select" !== o.value),
23633
+ drawingActive: ge(() => t() && !n.value && "select" !== r.value),
23634
23634
  addInkStroke: function(e) {
23635
- const n = e.points;
23636
- if (n.length < 2) return;
23637
- const r = "highlighter" === e.tool, o = r ? 3 * e.width : e.width, a = Math.max(2, o), l = n.map((e) => e.x), c = n.map((e) => e.y), u = Math.min(...l) - a, p = Math.min(...c) - a, d = Math.max(...l) + a, f = Math.max(...c) + a, h = `M ${n.map((e) => `${(e.x - u).toFixed(1)} ${(e.y - p).toFixed(1)}`).join(" L ")}`, m = {
23638
- id: t("ink"),
23635
+ const t = e.points;
23636
+ if (t.length < 2) return;
23637
+ const n = "highlighter" === e.tool, r = n ? 3 * e.width : e.width, o = Math.max(2, r), s = t.map((e) => e.x), l = t.map((e) => e.y), c = Math.min(...s) - o, u = Math.min(...l) - o, d = Math.max(...s) + o, f = Math.max(...l) + o, h = `M ${t.map((e) => `${(e.x - c).toFixed(1)} ${(e.y - u).toFixed(1)}`).join(" L ")}`, m = {
23638
+ id: p("ink"),
23639
23639
  type: "ink",
23640
- x: u,
23641
- y: p,
23642
- width: d - u,
23643
- height: f - p,
23640
+ x: c,
23641
+ y: u,
23642
+ width: d - c,
23643
+ height: f - u,
23644
23644
  inkPaths: [h],
23645
23645
  inkColors: [e.color],
23646
- inkWidths: [o],
23647
- inkOpacities: [r ? .4 : 1],
23646
+ inkWidths: [r],
23647
+ inkOpacities: [n ? .4 : 1],
23648
23648
  inkTool: e.tool
23649
23649
  };
23650
- s.addElement(m), i.value = [];
23650
+ i.addElement(m), a.value = [];
23651
23651
  },
23652
23652
  eraseInkAt: function(e) {
23653
- const t = a.value;
23653
+ const t = o.value;
23654
23654
  if (t) for (let n = t.elements.length - 1; n >= 0; n--) {
23655
23655
  const r = t.elements[n];
23656
- if ("ink" === r.type && e.x >= r.x && e.x <= r.x + r.width && e.y >= r.y && e.y <= r.y + r.height) return void s.removeElement(r.id);
23656
+ if ("ink" === r.type && e.x >= r.x && e.x <= r.x + r.width && e.y >= r.y && e.y <= r.y + r.height) return void i.removeElement(r.id);
23657
23657
  }
23658
23658
  }
23659
23659
  };
@@ -23691,7 +23691,7 @@ function sS(e) {
23691
23691
  inlineEditingElement: ge(() => a.value ? n(a.value) : void 0),
23692
23692
  enterInlineEdit: function(e) {
23693
23693
  const t = n(e);
23694
- t && N(t) && !t.locks?.noTextEdit && (t.textSegments?.some((e) => e.equationXml) || (a.value = e, i.value = t.text ?? ""));
23694
+ t && F(t) && !t.locks?.noTextEdit && (t.textSegments?.some((e) => e.equationXml) || (a.value = e, i.value = t.text ?? ""));
23695
23695
  },
23696
23696
  commitInlineEdit: function() {
23697
23697
  const e = a.value;
@@ -23820,7 +23820,7 @@ function lS(e) {
23820
23820
  t.addElement(e), n.value = [e.id], o.value = !1, a.value = !1, i.value = null, s.value = null;
23821
23821
  },
23822
23822
  openEquationEditorForElement: function(e) {
23823
- if (!N(e)) return !1;
23823
+ if (!F(e)) return !1;
23824
23824
  const t = e.textSegments?.find((e) => e.equationXml);
23825
23825
  return !!t?.equationXml && (s.value = e.id, i.value = t.equationXml, n.value.includes(e.id) || (n.value = [e.id]), a.value = !0, !0);
23826
23826
  },
@@ -23881,22 +23881,22 @@ function pS(e, t) {
23881
23881
  const n = De([]), r = De({}), o = Fe({
23882
23882
  width: 1280,
23883
23883
  height: 720
23884
- }), a = De(void 0), s = De(void 0), l = De([]), c = De([]), u = De(/* @__PURE__ */ new Map()), p = Fe(!1), d = Fe(null), f = Fe(!1), h = De(null), m = De(void 0), g = De([]), y = De(void 0), x = De([]), v = De([]), b = De([]), w = De(void 0), $ = De([]), k = De([]), M = De({}), S = De(void 0), I = De(void 0), C = De(void 0), T = De([]), A = Fe(void 0);
23885
- let P = 0, L = [];
23886
- const F = (e) => {
23884
+ }), a = De(void 0), i = De(void 0), s = De([]), l = De([]), c = De(/* @__PURE__ */ new Map()), u = Fe(!1), p = Fe(null), d = Fe(!1), f = De(null), h = De(void 0), m = De([]), g = De(void 0), y = De([]), x = De([]), v = De([]), b = De(void 0), w = De([]), $ = De([]), k = De({}), M = De(void 0), S = De(void 0), I = De(void 0), C = De([]), T = Fe(void 0);
23885
+ let A = 0, P = [];
23886
+ const L = (e) => {
23887
23887
  for (const t of e) t.startsWith("blob:") && URL.revokeObjectURL(t);
23888
- }, D = async (e) => {
23889
- const D = ++P, E = [];
23888
+ }, F = async (e) => {
23889
+ const F = ++A, D = [];
23890
23890
  try {
23891
- p.value = !0, d.value = null, f.value = !1;
23892
- const O = e instanceof Uint8Array ? e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength) : e, B = O.slice(0), R = O instanceof ArrayBuffer ? O.byteLength / 1048576 : 0;
23891
+ u.value = !0, p.value = null, d.value = !1;
23892
+ const E = e instanceof Uint8Array ? e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength) : e, B = E.slice(0), R = E instanceof ArrayBuffer ? E.byteLength / 1048576 : 0;
23893
23893
  R > 50 && console.warn(`[pptx] Large file detected (${R.toFixed(1)} MB). Loading may use significant memory.`);
23894
- const N = h.value, _ = new j(), W = await _.load(O);
23895
- if (D !== P) return void _.dispose();
23894
+ const N = f.value, _ = new O(), W = await _.load(E);
23895
+ if (F !== A) return void _.dispose();
23896
23896
  N && N.dispose();
23897
23897
  const Y = [];
23898
23898
  for (const e of W.slides) nt(e.elements, Y);
23899
- F(Array.from(u.value.values()));
23899
+ L(Array.from(c.value.values()));
23900
23900
  const X = /* @__PURE__ */ new Map();
23901
23901
  await Promise.all(Y.map(async (e) => {
23902
23902
  const t = e.mediaPath;
@@ -23905,7 +23905,7 @@ function pS(e, t) {
23905
23905
  const n = await _.getMediaArrayBuffer(t);
23906
23906
  if (n) {
23907
23907
  const r = e.mediaMimeType || "application/octet-stream", o = new Blob([n], { type: r }), a = URL.createObjectURL(o);
23908
- E.push(a), X.set(t, a);
23908
+ D.push(a), X.set(t, a);
23909
23909
  } else e.mediaMissing = !0;
23910
23910
  } else {
23911
23911
  const n = await _.getImageData(t);
@@ -23916,8 +23916,8 @@ function pS(e, t) {
23916
23916
  }
23917
23917
  else e.mediaMissing = !0;
23918
23918
  }));
23919
- const { paths: z, refs: H } = rt(W.slides);
23920
- let G = W.slides;
23919
+ const { paths: z, refs: j } = rt(W.slides);
23920
+ let H = W.slides;
23921
23921
  if (z.size > 0) {
23922
23922
  const e = /* @__PURE__ */ new Map();
23923
23923
  await Promise.all(Array.from(z).map(async (t) => {
@@ -23927,7 +23927,7 @@ function pS(e, t) {
23927
23927
  } catch {}
23928
23928
  }));
23929
23929
  const t = /* @__PURE__ */ new Map();
23930
- for (const n of H) {
23930
+ for (const n of j) {
23931
23931
  const r = e.get(n.path);
23932
23932
  if (!r) continue;
23933
23933
  const o = n.element.id, a = t.get(o) ?? {};
@@ -23953,7 +23953,7 @@ function pS(e, t) {
23953
23953
  });
23954
23954
  return r ? o : n;
23955
23955
  };
23956
- G = W.slides.map((t) => {
23956
+ H = W.slides.map((t) => {
23957
23957
  const n = e(t.elements);
23958
23958
  return n === t.elements ? t : {
23959
23959
  ...t,
@@ -23962,7 +23962,7 @@ function pS(e, t) {
23962
23962
  });
23963
23963
  }
23964
23964
  }
23965
- const K = function(e) {
23965
+ const G = function(e) {
23966
23966
  const t = {};
23967
23967
  return {
23968
23968
  slides: e.map((e) => {
@@ -23976,14 +23976,14 @@ function pS(e, t) {
23976
23976
  }),
23977
23977
  templateElementsBySlideId: t
23978
23978
  };
23979
- }(G);
23980
- F(L), L = E, h.value = _, n.value = K.slides, r.value = K.templateElementsBySlideId, u.value = X, o.value = {
23979
+ }(H);
23980
+ L(P), P = D, f.value = _, n.value = G.slides, r.value = G.templateElementsBySlideId, c.value = X, o.value = {
23981
23981
  width: W.width ?? 1280,
23982
23982
  height: W.height ?? 720
23983
- }, a.value = W.theme, s.value = W.themeColorMap, l.value = W.slideMasters ?? [], c.value = W.layoutOptions ?? [], m.value = W.coreProperties, g.value = W.customProperties ?? [], y.value = W.appProperties, x.value = W.tags ?? [], v.value = W.embeddedFonts ?? [], w.value = W.tableStyleMap, $.value = W.sections ?? [], k.value = W.customShows ?? [], M.value = W.presentationProperties ?? {}, S.value = W.headerFooter, I.value = W.notesMaster, C.value = W.handoutMaster, T.value = W.themeOptions ?? [], A.value = "number" == typeof W.notesWidthEmu && "number" == typeof W.notesHeightEmu && W.notesWidthEmu > 0 && W.notesHeightEmu > 0 ? {
23983
+ }, a.value = W.theme, i.value = W.themeColorMap, s.value = W.slideMasters ?? [], l.value = W.layoutOptions ?? [], h.value = W.coreProperties, m.value = W.customProperties ?? [], g.value = W.appProperties, y.value = W.tags ?? [], x.value = W.embeddedFonts ?? [], b.value = W.tableStyleMap, w.value = W.sections ?? [], $.value = W.customShows ?? [], k.value = W.presentationProperties ?? {}, M.value = W.headerFooter, S.value = W.notesMaster, I.value = W.handoutMaster, C.value = W.themeOptions ?? [], T.value = "number" == typeof W.notesWidthEmu && "number" == typeof W.notesHeightEmu && W.notesWidthEmu > 0 && W.notesHeightEmu > 0 ? {
23984
23984
  width: Math.round(W.notesWidthEmu / 9525),
23985
23985
  height: Math.round(W.notesHeightEmu / 9525)
23986
- } : void 0, b.value = W.hasDigitalSignatures && B instanceof ArrayBuffer ? await async function(e) {
23986
+ } : void 0, v.value = W.hasDigitalSignatures && B instanceof ArrayBuffer ? await async function(e) {
23987
23987
  try {
23988
23988
  const [{ default: t }, { XMLParser: n }] = await Promise.all([import("jszip"), import("fast-xml-parser")]), r = await t.loadAsync(e), o = new n({
23989
23989
  ignoreAttributes: !1,
@@ -23991,7 +23991,7 @@ function pS(e, t) {
23991
23991
  }), a = [];
23992
23992
  for (const e of Object.keys(r.files)) if (e.startsWith("_xmlsignatures/") && e.endsWith(".xml")) {
23993
23993
  const t = await r.files[e].async("string");
23994
- a.push(i(o.parse(t), e));
23994
+ a.push(ee(o.parse(t), e));
23995
23995
  }
23996
23996
  return a;
23997
23997
  } catch {
@@ -23999,61 +23999,61 @@ function pS(e, t) {
23999
23999
  }
24000
24000
  }(B) : [], t?.onContentApplied?.();
24001
24001
  } catch (e) {
24002
- D === P && (e instanceof te ? f.value = !0 : d.value = e instanceof Error ? e.message : String(e));
24002
+ F === A && (e instanceof Z ? d.value = !0 : p.value = e instanceof Error ? e.message : String(e));
24003
24003
  } finally {
24004
- D === P && (p.value = !1);
24005
- }
24006
- }, E = async (e) => {
24007
- if (!h.value) throw new Error("No presentation is loaded.");
24008
- return h.value.save(sM(n.value, r.value), {
24009
- coreProperties: m.value,
24010
- customProperties: g.value,
24011
- appProperties: y.value,
24012
- sections: $.value,
24013
- customShows: k.value,
24014
- presentationProperties: M.value,
24015
- headerFooter: S.value,
24016
- slideMasters: l.value,
24017
- notesMaster: I.value,
24018
- handoutMaster: C.value,
24019
- tags: x.value.length > 0 ? x.value : void 0,
24004
+ F === A && (u.value = !1);
24005
+ }
24006
+ }, D = async (e) => {
24007
+ if (!f.value) throw new Error("No presentation is loaded.");
24008
+ return f.value.save(sM(n.value, r.value), {
24009
+ coreProperties: h.value,
24010
+ customProperties: m.value,
24011
+ appProperties: g.value,
24012
+ sections: w.value,
24013
+ customShows: $.value,
24014
+ presentationProperties: k.value,
24015
+ headerFooter: M.value,
24016
+ slideMasters: s.value,
24017
+ notesMaster: S.value,
24018
+ handoutMaster: I.value,
24019
+ tags: y.value.length > 0 ? y.value : void 0,
24020
24020
  outputFormat: e
24021
24021
  });
24022
24022
  };
24023
24023
  return Re(() => Oe(e), (e) => {
24024
- e && D(e);
24024
+ e && F(e);
24025
24025
  }, { immediate: !0 }), Te(() => {
24026
- P++, F(L), F(Array.from(u.value.values())), h.value && (h.value.dispose(), h.value = null);
24026
+ A++, L(P), L(Array.from(c.value.values())), f.value && (f.value.dispose(), f.value = null);
24027
24027
  }), {
24028
24028
  slides: n,
24029
24029
  templateElementsBySlideId: r,
24030
- layoutOptions: c,
24030
+ layoutOptions: l,
24031
24031
  canvasSize: o,
24032
24032
  theme: a,
24033
- themeColorMap: s,
24034
- slideMasters: l,
24035
- mediaDataUrls: u,
24036
- loading: p,
24037
- error: d,
24038
- isEncrypted: f,
24039
- handler: h,
24040
- coreProperties: m,
24041
- customProperties: g,
24042
- appProperties: y,
24043
- tagCollections: x,
24044
- embeddedFonts: v,
24045
- signatures: b,
24046
- tableStyleMap: w,
24047
- sections: $,
24048
- customShows: k,
24049
- presentationProperties: M,
24050
- headerFooter: S,
24051
- notesMaster: I,
24052
- handoutMaster: C,
24053
- themeOptions: T,
24054
- notesCanvasSize: A,
24055
- saveAs: E,
24056
- getContent: () => E("pptx")
24033
+ themeColorMap: i,
24034
+ slideMasters: s,
24035
+ mediaDataUrls: c,
24036
+ loading: u,
24037
+ error: p,
24038
+ isEncrypted: d,
24039
+ handler: f,
24040
+ coreProperties: h,
24041
+ customProperties: m,
24042
+ appProperties: g,
24043
+ tagCollections: y,
24044
+ embeddedFonts: x,
24045
+ signatures: v,
24046
+ tableStyleMap: b,
24047
+ sections: w,
24048
+ customShows: $,
24049
+ presentationProperties: k,
24050
+ headerFooter: M,
24051
+ notesMaster: S,
24052
+ handoutMaster: I,
24053
+ themeOptions: C,
24054
+ notesCanvasSize: T,
24055
+ saveAs: D,
24056
+ getContent: () => D("pptx")
24057
24057
  };
24058
24058
  }
24059
24059
  function dS() {
@@ -24355,7 +24355,7 @@ function IS(e) {
24355
24355
  rows: s
24356
24356
  } });
24357
24357
  }(r, e);
24358
- if (!N(r)) return;
24358
+ if (!F(r)) return;
24359
24359
  const a = {
24360
24360
  ...r.textStyle,
24361
24361
  ...e
@@ -24375,7 +24375,7 @@ function IS(e) {
24375
24375
  const t = i.value[0];
24376
24376
  if (!t) return;
24377
24377
  const n = s.value?.elements.find((e) => e.id === t);
24378
- if (!n || !N(n)) return;
24378
+ if (!n || !F(n)) return;
24379
24379
  const r = {};
24380
24380
  n.textSegments && n.textSegments.length > 0 && (r.textSegments = n.textSegments.map((t) => t.isParagraphBreak || "\n" === t.text ? t : {
24381
24381
  ...t,
@@ -24951,7 +24951,7 @@ function OS(e) {
24951
24951
  if (e < 0 || e >= t.value.length) return;
24952
24952
  r();
24953
24953
  const o = t.value[e], a = {
24954
- ...h(o),
24954
+ ...y(o),
24955
24955
  id: Dc()
24956
24956
  }, i = [...t.value];
24957
24957
  i.splice(e + 1, 0, a), t.value = i, n.value = e + 1;
@@ -25004,7 +25004,7 @@ function RS(e) {
25004
25004
  const s = n(e);
25005
25005
  if (!s || "smartArt" !== s.type) return;
25006
25006
  const l = s.smartArtData;
25007
- l && r(e, { smartArtData: a(s, V(l, o, i)) });
25007
+ l && r(e, { smartArtData: a(s, g(l, o, i)) });
25008
25008
  },
25009
25009
  commitStyle: (e, o) => {
25010
25010
  if (!t()) return;
@@ -25050,23 +25050,23 @@ function NS(e) {
25050
25050
  }), { tableSelection: i };
25051
25051
  }
25052
25052
  function _S(e) {
25053
- const { slides: t, pptxTheme: n, themeColorMap: o, pushHistory: a, themeGalleryOpen: i, themeEditorOpen: s } = e;
25054
- function l(e, i, s) {
25055
- a();
25056
- const l = r({
25053
+ const { slides: t, pptxTheme: n, themeColorMap: r, pushHistory: o, themeGalleryOpen: a, themeEditorOpen: i } = e;
25054
+ function s(e, a, i) {
25055
+ o();
25056
+ const s = ce({
25057
25057
  slides: t.value,
25058
25058
  theme: n.value,
25059
- themeColorMap: o.value
25060
- }, e, i, s);
25061
- t.value = l.slides, n.value = l.theme, o.value = l.themeColorMap;
25059
+ themeColorMap: r.value
25060
+ }, e, a, i);
25061
+ t.value = s.slides, n.value = s.theme, r.value = s.themeColorMap;
25062
25062
  }
25063
25063
  return {
25064
- applyTheme: l,
25064
+ applyTheme: s,
25065
25065
  applyThemePreset: function(e) {
25066
- l(e.colorScheme, e.fontScheme, e.name), i.value = !1;
25066
+ s(e.colorScheme, e.fontScheme, e.name), a.value = !1;
25067
25067
  },
25068
25068
  applyThemeEdit: function(e) {
25069
- l(e.colorScheme, e.fontScheme, e.name), s.value = !1;
25069
+ s(e.colorScheme, e.fontScheme, e.name), i.value = !1;
25070
25070
  }
25071
25071
  };
25072
25072
  }
@@ -25075,7 +25075,7 @@ function XS(e) {
25075
25075
  return `ver-${e}-${YS += 1}-${Math.random().toString(36).slice(2, 6)}`;
25076
25076
  }
25077
25077
  function zS(e) {
25078
- return e.map(h);
25078
+ return e.map(y);
25079
25079
  }
25080
25080
  function jS(e) {
25081
25081
  const { slides: t, pushHistory: n } = e, r = Math.max(1, e.maxVersions ?? 50), o = De([]);