@silurus/ooxml 0.85.3 → 0.86.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 (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-D21h5TGR.js +10 -0
  3. package/dist/assets/render-worker-Dsfekaht.js +11 -0
  4. package/dist/assets/render-worker-DxU7IrKo.js +31 -0
  5. package/dist/bounded-raw-part-cache-BfbSxRIL.js +119 -0
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-DN5SqWGS.js} +329 -192
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-lXwVOgjW.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-uopDjRde.js} +4477 -4431
  13. package/dist/{docx-BYvm3TWw.js → docx-wPzeF76A.js} +519 -334
  14. package/dist/docx.mjs +7 -7
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-CswB9Tzi.js} +60 -57
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-BR1NCO7S.js} +954 -935
  18. package/dist/index.mjs +4 -4
  19. package/dist/{line-distribute-BsV4MVZ2.js → line-distribute-IsUGfHXm.js} +10 -10
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +266 -266
  22. package/dist/{pptx-BqpVTP8p.js → pptx-BxJ_RBSY.js} +173 -165
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DEiun_AH.js} +1 -1
  26. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-BEfLZvSL.js} +1 -1
  27. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-Ba6Fchqr.js} +1 -1
  28. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-C3xwtHnv.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-CclArDRs.js} +10 -10
  30. package/dist/{session-n2p5_jxV.js → session-BuJL_xcp.js} +87 -87
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-Ck8wfRT_.js} +1239 -1165
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -11
  34. package/dist/types/index.d.ts +38 -19
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-CAvuf22q.js} +72 -69
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-Bblm5r1h.js} +1752 -1592
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/bounded-raw-part-cache-C6ro6Ezf.js +0 -254
  51. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-CqejEuts.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
package/dist/pptx.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { u as e } from "./slide-pull-client-Dwek7xW8.js";
2
- import { a as t, cn as n, sn as r } from "./line-metrics-BGtFM-ec.js";
3
- import { T as i } from "./canvas-viewer-mechanics-CDNMJ-Yz.js";
1
+ import { u as e } from "./slide-pull-client-Ck8wfRT_.js";
2
+ import { cn as t, r as n, sn as r } from "./hyperlink-BR1NCO7S.js";
3
+ import { T as i } from "./canvas-viewer-mechanics-DN5SqWGS.js";
4
4
  import { l as a, s as o } from "./pixel-budget-Dgjw269h.js";
5
5
  import { i as s, s as c } from "./raster-target-ojDdQizC.js";
6
- import { a as l, i as u, n as d, o as f, r as p, s as m } from "./pptx-BqpVTP8p.js";
7
- export { o as OoxmlDecodedImageLimitError, r as OoxmlError, n as OoxmlResourceLimitError, l as PptxPresentation, d as PptxScrollViewer, p as PptxViewer, s as TiffDecodeError, i as autoResize, f as buildPptxHighlightLayer, m as buildPptxTextLayer, a as isOoxmlDecodedImageLimitError, c as isTiffDecodeError, t as openExternalHyperlink, u as readPptxTextSelectionContext, e as renderSlide };
6
+ import { a as l, i as u, n as d, o as f, r as p, s as m } from "./pptx-BxJ_RBSY.js";
7
+ export { o as OoxmlDecodedImageLimitError, r as OoxmlError, t as OoxmlResourceLimitError, l as PptxPresentation, d as PptxScrollViewer, p as PptxViewer, s as TiffDecodeError, i as autoResize, f as buildPptxHighlightLayer, m as buildPptxTextLayer, a as isOoxmlDecodedImageLimitError, c as isTiffDecodeError, n as openExternalHyperlink, u as readPptxTextSelectionContext, e as renderSlide };
Binary file
@@ -46,7 +46,7 @@ function a(e, t) {
46
46
  return n = o.then(() => void 0, () => void 0), o;
47
47
  }
48
48
  async function o(e, t, n, r = {}) {
49
- let { renderSlide: i } = await import("./session-n2p5_jxV.js").then((e) => e.t), o = t.slides[n];
49
+ let { renderSlide: i } = await import("./session-BuJL_xcp.js").then((e) => e.t), o = t.slides[n];
50
50
  if (!o) throw Error(`Slide index ${n} out of range`);
51
51
  let s = r.width ?? 960, c = r.dpr ?? 2, l = r.fetchImage ?? (async () => new Blob([])), u = async () => {
52
52
  await i(e, o, t.slideWidth, t.slideHeight, {
@@ -1,5 +1,5 @@
1
1
  //#region packages/pptx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-V2wWYA4O.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-Dsfekaht.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/pptx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,5 +1,5 @@
1
1
  //#region packages/xlsx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-DHP0rgcW.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-DxU7IrKo.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/xlsx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,5 +1,5 @@
1
1
  //#region packages/docx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-D1O73gYW.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-D21h5TGR.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/docx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,4 +1,4 @@
1
- import { ft as e, ht as t, mt as n, ot as r, yt as i } from "./line-metrics-BGtFM-ec.js";
1
+ import { at as e, dt as t, mt as n, pt as r, vt as i } from "./hyperlink-BR1NCO7S.js";
2
2
  import { an as a } from "./plot-area-frame-D5hEOgkJ.js";
3
3
  import { i as o } from "./pixel-budget-Dgjw269h.js";
4
4
  import { r as s } from "./raster-target-ojDdQizC.js";
@@ -15,23 +15,23 @@ async function u(u, d, f, p, m = {}) {
15
15
  ...v,
16
16
  targetWidthPx: void 0,
17
17
  targetHeightPx: void 0
18
- } : v, b = f ? e(p, l) : void 0, x = await n(u, d, p, y);
18
+ } : v, b = f ? t(p, l) : void 0, x = await r(u, d, p, y);
19
19
  if (!f || !x) return x;
20
20
  let S = await i(u, d, p, y, b, x), C = s(Number(x.width), Number(x.height), _.targetWidthPx, _.targetHeightPx), w = C ? `|resize:${C.resizeWidth}x${C.resizeHeight}` : "";
21
- return t(l, `${c(S, f)}${w}${g ? "|strict" : ""}`, p, async () => {
22
- let { w: e, h: t } = a(x);
23
- if (e <= 0 || t <= 0) return {
21
+ return n(l, `${c(S, f)}${w}${g ? "|strict" : ""}`, p, async () => {
22
+ let { w: t, h: n } = a(x);
23
+ if (t <= 0 || n <= 0) return {
24
24
  bitmap: g ? null : x,
25
25
  owned: !1
26
26
  };
27
- let n = await r(x, f, {
28
- width: e,
29
- height: t,
27
+ let r = await e(x, f, {
28
+ width: t,
29
+ height: n,
30
30
  offscreenFactory: h,
31
31
  targetWidthPx: _.targetWidthPx,
32
32
  targetHeightPx: _.targetHeightPx
33
33
  });
34
- if (n === x) {
34
+ if (r === x) {
35
35
  if (g) return {
36
36
  bitmap: null,
37
37
  owned: !1
@@ -47,7 +47,7 @@ async function u(u, d, f, p, m = {}) {
47
47
  owned: e !== x
48
48
  };
49
49
  }
50
- let i = n;
50
+ let i = r;
51
51
  return {
52
52
  bitmap: i,
53
53
  owned: i !== x
@@ -1,22 +1,22 @@
1
1
  import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { a as t, u as n } from "./slide-pull-client-Dwek7xW8.js";
3
- import { B as r, F as i, G as a, H as o, I as s, K as c, P as l, Q as u, R as d, U as f, W as p, X as m, Xt as h, Y as g, Z as _, cn as v, q as y } from "./line-metrics-BGtFM-ec.js";
4
- import { t as b } from "./transfer-mIj7E7NB.js";
2
+ import { a as t, u as n } from "./slide-pull-client-Ck8wfRT_.js";
3
+ import { F as r, G as i, H as a, J as o, K as s, L as c, N as l, P as u, U as d, V as ee, W as f, X as p, Xt as m, Y as h, Z as g, cn as _, z as v } from "./hyperlink-BR1NCO7S.js";
4
+ import { t as y } from "./transfer-mIj7E7NB.js";
5
5
  //#region packages/pptx/src/slide-cursor-operation.ts
6
- function x(e) {
6
+ function b(e) {
7
7
  try {
8
- return f(e((e) => e.slide_cursor_resource_usage()));
8
+ return a(e((e) => e.slide_cursor_resource_usage()));
9
9
  } catch (e) {
10
10
  if (String(e).includes("slide cursor usage is unavailable")) return;
11
11
  throw e;
12
12
  }
13
13
  }
14
- function ee(e, t, n, r, i) {
14
+ function te(e, t, n, r, i) {
15
15
  let a, o;
16
16
  try {
17
17
  if (i) {
18
18
  if (!r) throw Error("slide payload is missing before acknowledgement");
19
- let t = i(n, r, x(e));
19
+ let t = i(n, r, b(e));
20
20
  typeof t == "function" ? a = t : t && ({rollback: a, commit: o} = t);
21
21
  }
22
22
  e((e) => e.acknowledge_slide(t.operationId, t.generation)), o?.();
@@ -29,8 +29,8 @@ function ee(e, t, n, r, i) {
29
29
  }
30
30
  //#endregion
31
31
  //#region packages/pptx/src/slide-pull-worker.ts
32
- var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
33
- coordinatorGeneration = new s();
32
+ var ne = "ooxml-pull-resetting", re = "ooxml-pull-reset-failed", ie = class {
33
+ coordinatorGeneration = new r();
34
34
  sessions = /* @__PURE__ */ new Map();
35
35
  pendingOpens = /* @__PURE__ */ new Map();
36
36
  operationTail = Promise.resolve();
@@ -45,7 +45,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
45
45
  return this.coordinatorGeneration;
46
46
  }
47
47
  reserveOpen(e) {
48
- if (this.assertReady(), S(e), this.pendingOpens.has(e.sessionId) || this.sessions.has(e.sessionId)) throw Error("slide pull session id is already reserved");
48
+ if (this.assertReady(), x(e), this.pendingOpens.has(e.sessionId) || this.sessions.has(e.sessionId)) throw Error("slide pull session id is already reserved");
49
49
  this.pendingOpens.set(e.sessionId, {
50
50
  identity: e,
51
51
  canceled: !1
@@ -61,14 +61,14 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
61
61
  if (this.assertReady(), this.resourceFailure) throw this.resourceFailure;
62
62
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("slide index must be a non-negative safe integer");
63
63
  let n = this.pendingOpens.get(t.sessionId);
64
- if (!n || !C(n.identity, t)) throw Error("slide pull session open reservation is stale or missing");
65
- let r, a = new Promise((e) => {
64
+ if (!n || !S(n.identity, t)) throw Error("slide pull session open reservation is stale or missing");
65
+ let r, i = new Promise((e) => {
66
66
  r = e;
67
- }), o = this.operationTail.then(() => this.coordinator.enqueue(async () => {
67
+ }), a = this.operationTail.then(() => this.coordinator.enqueue(async () => {
68
68
  if (n.canceled) throw Error("slide pull session open was canceled");
69
- let a, o = !1, s = new i({
69
+ let i, a = !1, o = new u({
70
70
  ...t,
71
- maxByteCredit: h,
71
+ maxByteCredit: m,
72
72
  coordinator: this.coordinator,
73
73
  driver: {
74
74
  pull: (n) => {
@@ -76,38 +76,38 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
76
76
  try {
77
77
  r = this.executeArchive((r) => r.pull_slide(e, t.operationId, t.generation, n));
78
78
  } catch (e) {
79
- throw y(e, n, h) || (this.latchResourceFailure(e), e);
79
+ throw s(e, n, m) || (this.latchResourceFailure(e), e);
80
80
  }
81
- let i = b(r);
82
- return this.acceptSlide && (a = JSON.parse(new TextDecoder().decode(new Uint8Array(i)))), o = !0, {
83
- payload: i,
84
- byteLength: i.byteLength,
81
+ let o = y(r);
82
+ return this.acceptSlide && (i = JSON.parse(new TextDecoder().decode(new Uint8Array(o)))), a = !0, {
83
+ payload: o,
84
+ byteLength: o.byteLength,
85
85
  done: !0,
86
- transfer: [i]
86
+ transfer: [o]
87
87
  };
88
88
  },
89
89
  measureChunk: ({ payload: e }) => e.byteLength,
90
90
  acknowledge: () => {
91
- if (!o) throw Error("slide unit is not awaiting acknowledgement");
91
+ if (!a) throw Error("slide unit is not awaiting acknowledgement");
92
92
  try {
93
- ee(this.executeArchive, t, e, a, this.acceptSlide);
93
+ te(this.executeArchive, t, e, i, this.acceptSlide);
94
94
  } catch (e) {
95
95
  throw this.latchResourceFailure(e), e;
96
96
  }
97
- o = !1, a = void 0, this.sessions.delete(t.sessionId), r();
97
+ a = !1, i = void 0, this.sessions.delete(t.sessionId), r();
98
98
  },
99
99
  cancel: async () => {
100
100
  try {
101
101
  this.archive() && await this.executeArchive((e) => e.cancel_slide());
102
102
  } finally {
103
- a = void 0, o = !1, this.sessions.delete(t.sessionId), r();
103
+ i = void 0, a = !1, this.sessions.delete(t.sessionId), r();
104
104
  }
105
105
  },
106
106
  close: async () => {
107
107
  try {
108
108
  this.archive() && await this.executeArchive((e) => e.cancel_slide());
109
109
  } finally {
110
- a = void 0, o = !1, this.sessions.delete(t.sessionId), r();
110
+ i = void 0, a = !1, this.sessions.delete(t.sessionId), r();
111
111
  }
112
112
  },
113
113
  resourceUsage: () => {
@@ -120,13 +120,13 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
120
120
  }
121
121
  });
122
122
  this.sessions.set(t.sessionId, {
123
- host: s,
123
+ host: o,
124
124
  identity: t
125
125
  }), this.pendingOpens.delete(t.sessionId);
126
126
  }));
127
- this.operationTail = o.then(() => a, () => void 0);
127
+ this.operationTail = a.then(() => i, () => void 0);
128
128
  try {
129
- await o;
129
+ await a;
130
130
  } catch (e) {
131
131
  throw this.pendingOpens.delete(t.sessionId), r(), e;
132
132
  }
@@ -153,7 +153,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
153
153
  if (n) return n.host.dispatch(e, t);
154
154
  let r = this.pendingOpens.get(e.sessionId);
155
155
  if (r && (e.kind === "cancel" || e.kind === "close")) {
156
- let n = C(r.identity, e);
156
+ let n = S(r.identity, e);
157
157
  return n && (r.canceled = !0), t(n ? {
158
158
  protocol: l,
159
159
  kind: "accepted",
@@ -179,7 +179,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
179
179
  operationId: e.operationId,
180
180
  generation: e.generation,
181
181
  requestId: e.requestId,
182
- error: c(/* @__PURE__ */ Error("slide pull session is not open"))
182
+ error: i(/* @__PURE__ */ Error("slide pull session is not open"))
183
183
  }), Promise.resolve());
184
184
  }
185
185
  async dispatchSafely(e, t) {
@@ -194,7 +194,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
194
194
  operationId: e.operationId,
195
195
  generation: e.generation,
196
196
  requestId: e.requestId,
197
- error: c(n)
197
+ error: i(n)
198
198
  });
199
199
  } catch {}
200
200
  }
@@ -232,17 +232,17 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
232
232
  ...n,
233
233
  requestId: e++
234
234
  }, (e) => {
235
- e.kind === "error" && (r = p(e.error));
235
+ e.kind === "error" && (r = d(e.error));
236
236
  }), r) throw r;
237
237
  }
238
- this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.archive() && await this.executeArchive((e) => e.close_presentation_session()), this.coordinatorGeneration = new s(), this.resourceFailure = void 0;
238
+ this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.archive() && await this.executeArchive((e) => e.close_presentation_session()), this.coordinatorGeneration = new r(), this.resourceFailure = void 0;
239
239
  }
240
240
  assertReady() {
241
241
  if (this.lifecycleState !== "ready") throw this.lifecycleError();
242
242
  }
243
243
  lifecycleError() {
244
244
  let e = this.lifecycleState === "reset-failed", t = /* @__PURE__ */ Error(e ? "slide pull worker reset failed; retry reset before new work" : "slide pull worker reset is in progress");
245
- return t.name = "PullSessionLifecycleError", Object.assign(t, { code: e ? ne : te });
245
+ return t.name = "PullSessionLifecycleError", Object.assign(t, { code: e ? re : ne });
246
246
  }
247
247
  captureResetIdentities() {
248
248
  for (let { identity: e } of this.sessions.values()) this.resetIdentities.set(e.sessionId, e);
@@ -251,7 +251,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
251
251
  responseDuringReset(e) {
252
252
  if (e.kind === "cancel" || e.kind === "close") {
253
253
  let t = this.resetIdentities.get(e.sessionId);
254
- return t && !C(t, e) ? this.staleLifecycleResponse(e) : {
254
+ return t && !S(t, e) ? this.staleLifecycleResponse(e) : {
255
255
  protocol: l,
256
256
  kind: "accepted",
257
257
  sessionId: e.sessionId,
@@ -268,7 +268,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
268
268
  operationId: e.operationId,
269
269
  generation: e.generation,
270
270
  requestId: e.requestId,
271
- error: c(this.lifecycleError())
271
+ error: i(this.lifecycleError())
272
272
  };
273
273
  }
274
274
  requireArchive() {
@@ -289,13 +289,13 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
289
289
  return;
290
290
  }
291
291
  let n = this.pendingOpens.get(e.sessionId);
292
- n && C(n.identity, e) && (n.canceled = !0);
292
+ n && S(n.identity, e) && (n.canceled = !0);
293
293
  }
294
294
  readResourceUsage() {
295
- return x(this.executeArchive);
295
+ return b(this.executeArchive);
296
296
  }
297
297
  latchResourceFailure(e) {
298
- let t = e instanceof v ? e : a(e);
298
+ let t = e instanceof _ ? e : f(e);
299
299
  t && (this.resourceFailure ??= t);
300
300
  }
301
301
  staleLifecycleResponse(e) {
@@ -314,24 +314,24 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
314
314
  };
315
315
  }
316
316
  };
317
- function S(e) {
317
+ function x(e) {
318
318
  if (!Number.isSafeInteger(e.sessionId) || e.sessionId <= 0) throw RangeError("session id must be a positive safe integer");
319
319
  if (!Number.isSafeInteger(e.operationId) || e.operationId <= 0) throw RangeError("operation id must be a positive safe integer");
320
320
  if (!Number.isSafeInteger(e.generation) || e.generation <= 0) throw RangeError("generation must be a positive safe integer");
321
321
  }
322
- function C(e, t) {
322
+ function S(e, t) {
323
323
  return e.sessionId === t.sessionId && e.operationId === t.operationId && e.generation === t.generation;
324
324
  }
325
325
  //#endregion
326
326
  //#region packages/core/src/internal/wasm-runtime-generation.ts
327
- function ie(e) {
328
- return _(e) ? new g(`WASM parser trapped and was recycled: ${e instanceof Error ? e.message : String(e)}`) : null;
327
+ function ae(e) {
328
+ return p(e) ? new o(`WASM parser trapped and was recycled: ${e instanceof Error ? e.message : String(e)}`) : null;
329
329
  }
330
- var w = class {
330
+ var C = class {
331
331
  realm;
332
332
  live = /* @__PURE__ */ new Set();
333
333
  constructor(e, t) {
334
- this.realm = new u(() => e.initSync({ module: t }), () => e.reinit({ module_or_path: t }), ie), this.realm.onPoison((e) => {
334
+ this.realm = new g(() => e.initSync({ module: t }), () => e.reinit({ module_or_path: t }), ae), this.realm.onPoison((e) => {
335
335
  for (let t of this.live) t.poison(e);
336
336
  this.live.clear();
337
337
  });
@@ -341,7 +341,7 @@ var w = class {
341
341
  this.throwIfOpenAborted(t), await this.awaitReadyOrAbort(t), this.throwIfOpenAborted(t);
342
342
  let n = this.realm.tryRunReady(e);
343
343
  if (!n.current) continue;
344
- let r = new ae(this, n.value, n.generation);
344
+ let r = new oe(this, n.value, n.generation);
345
345
  if (this.live.add(r), t?.signal?.aborted) throw r.close(t.disposeOnAbort), t.abortError?.() ?? new DOMException("The operation was aborted", "AbortError");
346
346
  return r;
347
347
  }
@@ -373,7 +373,7 @@ var w = class {
373
373
  let n = e.detachForClose();
374
374
  this.live.delete(e), n && this.realm.run(() => t(n));
375
375
  }
376
- }, ae = class {
376
+ }, oe = class {
377
377
  archive;
378
378
  failure;
379
379
  proxy;
@@ -403,19 +403,19 @@ var w = class {
403
403
  }
404
404
  poison(e) {
405
405
  let t = this.archive;
406
- this.failure = e, this.archive = void 0, m(t);
406
+ this.failure = e, this.archive = void 0, h(t);
407
407
  }
408
- }, oe = /* @__PURE__ */ e({
409
- PptxArchive: () => T,
408
+ }, se = /* @__PURE__ */ e({
409
+ PptxArchive: () => w,
410
410
  default: () => Y,
411
- extract_font: () => se,
412
- extract_image: () => ce,
413
- extract_media: () => E,
411
+ extract_font: () => T,
412
+ extract_image: () => E,
413
+ extract_media: () => D,
414
414
  initSync: () => ue,
415
- parse_pptx: () => D,
416
- pptx_to_markdown: () => O,
415
+ parse_pptx: () => O,
416
+ pptx_to_markdown: () => ce,
417
417
  reinit: () => de
418
- }), T = class {
418
+ }), w = class {
419
419
  __destroy_into_raw() {
420
420
  let e = this.__wbg_ptr;
421
421
  return this.__wbg_ptr = 0, A.unregister(this), e;
@@ -503,32 +503,32 @@ var w = class {
503
503
  }
504
504
  }
505
505
  };
506
- Symbol.dispose && (T.prototype[Symbol.dispose] = T.prototype.free);
507
- function se(e, t, n, r) {
506
+ Symbol.dispose && (w.prototype[Symbol.dispose] = w.prototype.free);
507
+ function T(e, t, n, r) {
508
508
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_font(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
509
509
  if (c[3]) throw B(c[2]);
510
510
  var l = j(c[0], c[1]).slice();
511
511
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
512
512
  }
513
- function ce(e, t, n, r) {
513
+ function E(e, t, n, r) {
514
514
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_image(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
515
515
  if (c[3]) throw B(c[2]);
516
516
  var l = j(c[0], c[1]).slice();
517
517
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
518
518
  }
519
- function E(e, t, n, r) {
519
+ function D(e, t, n, r) {
520
520
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_media(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
521
521
  if (c[3]) throw B(c[2]);
522
522
  var l = j(c[0], c[1]).slice();
523
523
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
524
524
  }
525
- function D(e, t, n) {
525
+ function O(e, t, n) {
526
526
  let r = R(e, q.__wbindgen_malloc), i = K, a = q.parse_pptx(r, i, !L(t), L(t) ? BigInt(0) : t, !L(n), L(n) ? BigInt(0) : n);
527
527
  if (a[3]) throw B(a[2]);
528
528
  var o = j(a[0], a[1]).slice();
529
529
  return q.__wbindgen_free(a[0], a[1] * 1, 1), o;
530
530
  }
531
- function O(e, t, n) {
531
+ function ce(e, t, n) {
532
532
  let r, i;
533
533
  try {
534
534
  let s = R(e, q.__wbindgen_malloc), c = K, l = q.pptx_to_markdown(s, c, !L(t), L(t) ? BigInt(0) : t, !L(n), L(n) ? BigInt(0) : n);
@@ -690,43 +690,43 @@ async function de(e) {
690
690
  //#region packages/pptx/src/internal/node-acquisition.ts
691
691
  var X, Z;
692
692
  function fe(e) {
693
- if (!Z) X = e, Z = new w(oe, e);
693
+ if (!Z) X = e, Z = new C(se, e);
694
694
  else if (X !== e) throw Error("PPTX runtime was already initialized with another WebAssembly.Module");
695
695
  return Z;
696
696
  }
697
- async function pe(e, n, i = {}) {
698
- let s = r(i), c = new d({
699
- enabled: s.debug || s.onResourceMetrics !== void 0,
697
+ async function pe(e, n, r = {}) {
698
+ let i = v(r), a = new c({
699
+ enabled: i.debug || i.onResourceMetrics !== void 0,
700
700
  format: "pptx",
701
701
  mode: "node",
702
702
  scope: "session",
703
- policy: s.policy,
704
- onMetrics: s.onResourceMetrics,
705
- emitToConsole: s.debug
703
+ policy: i.policy,
704
+ onMetrics: i.onResourceMetrics,
705
+ emitToConsole: i.debug
706
706
  });
707
- c.setSourceBytes(e.byteLength);
708
- let l;
707
+ a.setSourceBytes(e.byteLength);
708
+ let o;
709
709
  try {
710
- Q(i.signal);
711
- let [r, a, u] = o(s.policy), d = T;
712
- l = await fe(n).open(() => new d(e, r, a, u), {
713
- signal: i.signal,
710
+ Q(r.signal);
711
+ let [s, c, l] = ee(i.policy), u = w;
712
+ o = await fe(n).open(() => new u(e, s, c, l), {
713
+ signal: r.signal,
714
714
  abortError: $,
715
715
  disposeOnAbort: (e) => e.free()
716
- }), Q(i.signal);
717
- let f = l.proxy, p = t(JSON.parse(new TextDecoder().decode(f.presentation_bootstrap())));
718
- return c.checkpoint("presentation bootstrap ready"), {
719
- archive: f,
720
- bootstrap: p,
721
- metrics: c,
722
- closeArchive: () => l?.close((e) => e.free())
716
+ }), Q(r.signal);
717
+ let d = o.proxy, f = t(JSON.parse(new TextDecoder().decode(d.presentation_bootstrap())));
718
+ return a.checkpoint("presentation bootstrap ready"), {
719
+ archive: d,
720
+ bootstrap: f,
721
+ metrics: a,
722
+ closeArchive: () => o?.close((e) => e.free())
723
723
  };
724
724
  } catch (e) {
725
725
  try {
726
- l?.close((e) => e.free());
726
+ o?.close((e) => e.free());
727
727
  } catch {}
728
- let t = a(e) ?? e;
729
- throw c.fail(t), t;
728
+ let t = f(e) ?? e;
729
+ throw a.fail(t), t;
730
730
  }
731
731
  }
732
732
  function Q(e) {
@@ -740,4 +740,4 @@ function $() {
740
740
  //#region packages/pptx/src/internal/session.ts
741
741
  var me = /* @__PURE__ */ e({ renderSlide: () => n });
742
742
  //#endregion
743
- export { x as a, re as i, pe as n, w as r, me as t };
743
+ export { b as a, ie as i, pe as n, C as r, me as t };