@silurus/ooxml 0.87.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/assets/render-worker-1uPAxMZr.js +31 -0
  2. package/dist/assets/render-worker-BlvJybji.js +10 -0
  3. package/dist/assets/render-worker-CzmiJfFL.js +11 -0
  4. package/dist/{canvas-viewer-mechanics-Cpk0YFvM.js → canvas-viewer-mechanics-DbLz0rYW.js} +2 -2
  5. package/dist/chart-ex.mjs +581 -616
  6. package/dist/{comment-ui-runtime-BfE7MJZn.js → comment-ui-runtime-CWGqn5Vr.js} +1 -1
  7. package/dist/{document-pull-client-yKxI8aDH.js → document-pull-client-B9PTM-pL.js} +3824 -3795
  8. package/dist/{docx-BkSRiy07.js → docx-BF9WXrYH.js} +428 -320
  9. package/dist/docx.mjs +4 -4
  10. package/dist/docx_parser_bg.wasm +0 -0
  11. package/dist/{dom-interaction-boundary-CBUQJsIM.js → dom-interaction-boundary-Cnm8DSBN.js} +2 -2
  12. package/dist/{hyperlink-ArrU3ArU.js → hyperlink-Cxzhet30.js} +93 -94
  13. package/dist/index.mjs +3 -3
  14. package/dist/{line-distribute-Dtudnqhs.js → line-distribute-D1WNHKz_.js} +2 -2
  15. package/dist/node.mjs +8 -8
  16. package/dist/plot-area-frame-DLTYKHNP.js +4354 -0
  17. package/dist/{pptx-62MmVbYB.js → pptx-DkyYBYoL.js} +13 -11
  18. package/dist/pptx.mjs +5 -5
  19. package/dist/pptx_parser_bg.wasm +0 -0
  20. package/dist/region-map.mjs +4 -4
  21. package/dist/{render-8Zo7dnds.js → render-D3iqVKCo.js} +1 -1
  22. package/dist/{render-worker-host-BfbnEChF.js → render-worker-host-B5wQfB7U.js} +1 -1
  23. package/dist/{render-worker-host-DNL9dWRh.js → render-worker-host-D4123J27.js} +1 -1
  24. package/dist/{render-worker-host-IkHrYOci.js → render-worker-host-Di3LxLc0.js} +1 -1
  25. package/dist/renderer-B4GZb5We.js +6492 -0
  26. package/dist/{resource-measurement-CJsgolre.js → resource-measurement-SHQCbkh2.js} +3 -3
  27. package/dist/{session-CrU8f8DI.js → session-BGq81gRQ.js} +2 -2
  28. package/dist/{slide-pull-client-B9KA8bU6.js → slide-pull-client-DiPnm240.js} +46 -46
  29. package/dist/{three-d-YYghQndN.js → three-d-DJBl8g8M.js} +251 -435
  30. package/dist/three-d.mjs +998 -906
  31. package/dist/tiff.mjs +1 -1
  32. package/dist/types/chart-ex.d.ts +142 -4
  33. package/dist/types/docx.d.ts +148 -10
  34. package/dist/types/index.d.ts +122 -16
  35. package/dist/types/node.d.ts +113 -7
  36. package/dist/types/pptx.d.ts +116 -10
  37. package/dist/types/region-map.d.ts +142 -4
  38. package/dist/types/three-d.d.ts +142 -4
  39. package/dist/types/xlsx.d.ts +148 -10
  40. package/dist/{worksheet-pull-client-eIcQ-xlD.js → worksheet-pull-client-BM8ywvbu.js} +2 -2
  41. package/dist/{xlsx-CRcSzZNq.js → xlsx-C9NVjgaV.js} +122 -120
  42. package/dist/xlsx.mjs +5 -5
  43. package/dist/xlsx_parser_bg.wasm +0 -0
  44. package/package.json +1 -1
  45. package/dist/assets/render-worker-CeK_iqK3.js +0 -10
  46. package/dist/assets/render-worker-DusrDhPk.js +0 -11
  47. package/dist/assets/render-worker-n2ZG0lrQ.js +0 -31
  48. package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
  49. package/dist/renderer-XFSCOT6m.js +0 -5857
  50. /package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-9P63Bsk5.js} +0 -0
  51. /package/dist/{units-EJdC96r6.js → units-BzZ0gAxs.js} +0 -0
package/dist/docx.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { ln as e, r as t, un as n } from "./hyperlink-ArrU3ArU.js";
2
- import { T as r } from "./canvas-viewer-mechanics-Cpk0YFvM.js";
3
- import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d } from "./docx-BkSRiy07.js";
4
- import { l as f, s as p } from "./pixel-budget-Dgjw269h.js";
1
+ import { ln as e, r as t, un as n } from "./hyperlink-Cxzhet30.js";
2
+ import { T as r } from "./canvas-viewer-mechanics-DbLz0rYW.js";
3
+ import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d } from "./docx-BF9WXrYH.js";
4
+ import { l as f, s as p } from "./pixel-budget-9P63Bsk5.js";
5
5
  import { i as m, s as h } from "./raster-target-ojDdQizC.js";
6
6
  import { n as g, r as _ } from "./comments-Diid5ujN.js";
7
7
  export { a as DocxDocument, u as DocxScrollViewer, o as DocxViewer, p as OoxmlDecodedImageLimitError, e as OoxmlError, n as OoxmlResourceLimitError, m as TiffDecodeError, r as autoResize, l as buildDocxHighlightLayer, d as buildDocxTextLayer, f as isOoxmlDecodedImageLimitError, h as isTiffDecodeError, c as noteText, t as openExternalHyperlink, i as readDocxTextSelectionContext, g as resolveCommentAnchorRuns, _ as resolveDocxCommentThreads, s as resolveRevisionAnchorRuns };
Binary file
@@ -1,5 +1,5 @@
1
- import { Yt as e } from "./hyperlink-ArrU3ArU.js";
2
- import { A as t, E as n, j as r, k as i } from "./canvas-viewer-mechanics-Cpk0YFvM.js";
1
+ import { Yt as e } from "./hyperlink-Cxzhet30.js";
2
+ import { A as t, E as n, j as r, k as i } from "./canvas-viewer-mechanics-DbLz0rYW.js";
3
3
  //#region packages/core/src/fonts/embedded.ts
4
4
  function a(t, n = e) {
5
5
  return t.byteLength > 0 && t.byteLength <= n;
@@ -1,6 +1,5 @@
1
- import { cn as e, dn as t, fn as n, hn as r, ln as i, mn as a, pn as o, un as s } from "./plot-area-frame-D5hEOgkJ.js";
2
- import { a as c, c as l, i as u, l as d, n as f, o as p, r as m, s as h, t as g } from "./pixel-budget-Dgjw269h.js";
3
- import { L as _ } from "./three-d-YYghQndN.js";
1
+ import { At as e, Dt as t, Mt as n, Nt as r, Ot as i, Pt as a, jt as o, kt as s, lt as c } from "./plot-area-frame-DLTYKHNP.js";
2
+ import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _ } from "./pixel-budget-9P63Bsk5.js";
4
3
  import { a as v, c as y, i as b, n as x, o as S, r as C, s as ee } from "./raster-target-ojDdQizC.js";
5
4
  import { t as te } from "./mathjax-DoyWZbSp.js";
6
5
  //#region packages/core/src/errors/ooxml-error.ts
@@ -22863,44 +22862,44 @@ function Ft(e, t, n, r, i) {
22863
22862
  function It(e, t, n) {
22864
22863
  !e.pathDiscarded && t && e.curBrush?.fill != null && (e.ctx.fillStyle = e.curBrush.fill, e.ctx.fill(e.fillRule), e.drew = !0), !e.pathDiscarded && n && e.curPen?.stroke != null && (e.ctx.strokeStyle = e.curPen.stroke, e.ctx.lineWidth = P(e, e.curPen.width), e.ctx.stroke(), e.drew = !0), e.ctx.beginPath(), e.pathCommandCount = 0, e.pathDiscarded = !1;
22865
22864
  }
22866
- function Lt(t) {
22867
- let n = t.u32(), r = t.u32(), i = t.i32();
22868
- t.i32();
22869
- let a = t.u32();
22865
+ function Lt(e) {
22866
+ let n = e.u32(), r = e.u32(), i = e.i32();
22867
+ e.i32();
22868
+ let a = e.u32();
22870
22869
  return [n, {
22871
22870
  kind: "pen",
22872
- stroke: (r & 255) == 5 ? null : e(a),
22871
+ stroke: (r & 255) == 5 ? null : t(a),
22873
22872
  width: Math.abs(i)
22874
22873
  }];
22875
22874
  }
22876
- function Rt(t) {
22877
- let n = t.u32();
22878
- t.skip(16);
22879
- let r = t.u32(), i = t.u32();
22880
- t.u32();
22881
- let a = t.u32();
22875
+ function Rt(e) {
22876
+ let n = e.u32();
22877
+ e.skip(16);
22878
+ let r = e.u32(), i = e.u32();
22879
+ e.u32();
22880
+ let a = e.u32();
22882
22881
  return [n, {
22883
22882
  kind: "pen",
22884
- stroke: (r & 255) == 5 ? null : e(a),
22883
+ stroke: (r & 255) == 5 ? null : t(a),
22885
22884
  width: Math.abs(i)
22886
22885
  }];
22887
22886
  }
22888
- function zt(t) {
22889
- let n = t.u32(), r = t.u32(), i = t.u32();
22890
- return t.u32(), [n, {
22887
+ function zt(e) {
22888
+ let n = e.u32(), r = e.u32(), i = e.u32();
22889
+ return e.u32(), [n, {
22891
22890
  kind: "brush",
22892
- fill: r === 1 ? null : e(i)
22891
+ fill: r === 1 ? null : t(i)
22893
22892
  }];
22894
22893
  }
22895
22894
  function Bt(e, t, n) {
22896
- let r = e.u32();
22895
+ let i = e.u32();
22897
22896
  e.u32();
22898
- let i = e.u32(), o = e.u32(), s = e.u32(), c = e.u32(), l = "#808080";
22897
+ let a = e.u32(), o = e.u32(), s = e.u32(), c = e.u32(), l = "#808080";
22899
22898
  try {
22900
- let e = a(t, n + i, o, n + s, c);
22899
+ let e = r(t, n + a, o, n + s, c);
22901
22900
  e && (l = kt(e));
22902
22901
  } catch {}
22903
- return [r, {
22902
+ return [i, {
22904
22903
  kind: "brush",
22905
22904
  fill: l
22906
22905
  }];
@@ -22955,12 +22954,12 @@ function Ht(e, t, n, r) {
22955
22954
  e.drew = !0;
22956
22955
  } catch {}
22957
22956
  }
22958
- function Ut(e, t, n, r, i, s, c, l, u, d, f) {
22959
- if (i === 0 || c === 0) return;
22960
- let p = a(t, n + r, i, n + s, c);
22957
+ function Ut(e, t, i, a, o, s, c, l, u, d, f) {
22958
+ if (o === 0 || c === 0) return;
22959
+ let p = r(t, i + a, o, i + s, c);
22961
22960
  if (!p) return;
22962
22961
  let [m, h] = N(e, l, u), [g, _] = N(e, d, f);
22963
- o(e.ctx, p, m, h, g, _) && (e.drew = !0);
22962
+ n(e.ctx, p, m, h, g, _) && (e.drew = !0);
22964
22963
  }
22965
22964
  function Wt(e, t, n, r) {
22966
22965
  t.skip(16);
@@ -22976,9 +22975,9 @@ function Gt(e, t, n, r) {
22976
22975
  let u = t.i32(), d = t.i32();
22977
22976
  Ut(e, n, r, o, s, c, l, i, a, i + u, a + d);
22978
22977
  }
22979
- function Kt(t, n, r, a, o = {}) {
22980
- if (!i(t) || r <= 0 || a <= 0) return !1;
22981
- let s = new DataView(t.buffer, t.byteOffset, t.byteLength), c = {
22978
+ function Kt(e, n, r, a, o = {}) {
22979
+ if (!i(e) || r <= 0 || a <= 0) return !1;
22980
+ let s = new DataView(e.buffer, e.byteOffset, e.byteLength), c = {
22982
22981
  ctx: n,
22983
22982
  W: r,
22984
22983
  H: a,
@@ -23015,11 +23014,11 @@ function Kt(t, n, r, a, o = {}) {
23015
23014
  pathDiscarded: !1,
23016
23015
  maxPathCommands: Number.isSafeInteger(o.maxPathCommands) && o.maxPathCommands > 0 ? Math.min(o.maxPathCommands, lt) : lt
23017
23016
  }, l = 0;
23018
- for (; l + 8 <= t.length;) {
23017
+ for (; l + 8 <= e.length;) {
23019
23018
  let r = s.getUint32(l, !0), i = s.getUint32(l + 4, !0);
23020
23019
  if (i < 8 || i & 3) break;
23021
23020
  let a = l + i;
23022
- if (a > t.length || r === k.EOF) break;
23021
+ if (a > e.length || r === k.EOF) break;
23023
23022
  let o = new ct(s, l + 8, a);
23024
23023
  try {
23025
23024
  switch (r) {
@@ -23236,7 +23235,7 @@ function Kt(t, n, r, a, o = {}) {
23236
23235
  c.fillRule = o.u32() === 1 ? "evenodd" : "nonzero";
23237
23236
  break;
23238
23237
  case k.SETTEXTCOLOR:
23239
- c.textColor = e(o.u32());
23238
+ c.textColor = t(o.u32());
23240
23239
  break;
23241
23240
  case k.SETTEXTALIGN:
23242
23241
  c.textAlign = o.u32();
@@ -23262,10 +23261,10 @@ function Kt(t, n, r, a, o = {}) {
23262
23261
  }
23263
23262
  async function qt(e, t, n) {
23264
23263
  if (!i(e) || t <= 0 || n <= 0) return null;
23265
- let a = r(t, n);
23266
- if (!a) return null;
23267
- let o = a.getContext("2d");
23268
- return !o || (o.lineJoin = "round", o.lineCap = "round", !Kt(e, o, t, n)) ? null : createImageBitmap(a);
23264
+ let r = a(t, n);
23265
+ if (!r) return null;
23266
+ let o = r.getContext("2d");
23267
+ return !o || (o.lineJoin = "round", o.lineCap = "round", !Kt(e, o, t, n)) ? null : createImageBitmap(r);
23269
23268
  }
23270
23269
  //#endregion
23271
23270
  //#region packages/core/src/image/image-bitmap-lifecycle.ts
@@ -23391,11 +23390,11 @@ function an(e) {
23391
23390
  }
23392
23391
  function on(e) {
23393
23392
  let { width: t, height: n } = e;
23394
- return !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 || t > 32767 || n > 32767 ? !0 : t * n > u;
23393
+ return !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 || t > 32767 || n > 32767 ? !0 : t * n > d;
23395
23394
  }
23396
23395
  function sn(e) {
23397
23396
  let { width: t, height: n } = e;
23398
- return !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 || t > 134217728 || n > 134217728 ? !0 : t * n > p;
23397
+ return !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 || t > 134217728 || n > 134217728 ? !0 : t * n > m;
23399
23398
  }
23400
23399
  //#endregion
23401
23400
  //#region packages/core/src/image/raster-blob-inspection.ts
@@ -23578,52 +23577,52 @@ function Sn(e, t, n, r = !1) {
23578
23577
  }
23579
23578
  function Cn(e, t, n) {
23580
23579
  let r = Math.max(e.width, e.height);
23581
- if (!Number.isFinite(r) || r > t) return new h("image-dimension", t, Number.isFinite(r) ? r : 2 ** 53 - 1);
23580
+ if (!Number.isFinite(r) || r > t) return new g("image-dimension", t, Number.isFinite(r) ? r : 2 ** 53 - 1);
23582
23581
  let i = e.width * e.height;
23583
- return new h("image-pixels", n, Number.isSafeInteger(i) && i >= 0 ? i : 2 ** 53 - 1);
23582
+ return new g("image-pixels", n, Number.isSafeInteger(i) && i >= 0 ? i : 2 ** 53 - 1);
23584
23583
  }
23585
23584
  async function wn(e, t = {}) {
23586
23585
  return Tn(e, t);
23587
23586
  }
23588
- async function Tn(e, r = {}, a) {
23589
- let { widthPt: o = 0, heightPt: l = 0, suppressBoundaryFrame: f = !1, tiff: h, targetWidthPx: g, targetHeightPx: _, maxRetainedPixels: v = u } = r, y = Number.isSafeInteger(v) && v > 0 ? Math.min(v, u) : u, x = new Uint8Array(await e.slice(0, 64 * 1024).arrayBuffer());
23587
+ async function Tn(t, n = {}, r) {
23588
+ let { widthPt: a = 0, heightPt: c = 0, suppressBoundaryFrame: u = !1, tiff: p, targetWidthPx: g, targetHeightPx: _, maxRetainedPixels: v = d } = n, y = Number.isSafeInteger(v) && v > 0 ? Math.min(v, d) : d, x = new Uint8Array(await t.slice(0, 64 * 1024).arrayBuffer());
23590
23589
  if (s(x)) {
23591
- let { w: r, h: i } = n(o, l);
23592
- return En(await t(new Uint8Array(await e.arrayBuffer()), r, i, f), y);
23590
+ let { w: n, h: r } = o(a, c);
23591
+ return En(await e(new Uint8Array(await t.arrayBuffer()), n, r, u), y);
23593
23592
  }
23594
23593
  if (i(x)) {
23595
- let { w: t, h: r } = n(o, l);
23596
- return En(await qt(new Uint8Array(await e.arrayBuffer()), t, r), y);
23594
+ let { w: e, h: n } = o(a, c);
23595
+ return En(await qt(new Uint8Array(await t.arrayBuffer()), e, n), y);
23597
23596
  }
23598
- let C = (a ?? await hn(e, x)).dimensions;
23599
- if (C && sn(C)) throw Cn(C, c, p);
23600
- let te = S(x) || xn(e.type), w = C ? Sn(C, g, _, te) : null;
23601
- if (w && bn(w.retainedDimensions, y)) throw Cn(w.retainedDimensions, m, y);
23597
+ let C = (r ?? await hn(t, x)).dimensions;
23598
+ if (C && sn(C)) throw Cn(C, l, m);
23599
+ let te = S(x) || xn(t.type), w = C ? Sn(C, g, _, te) : null;
23600
+ if (w && bn(w.retainedDimensions, y)) throw Cn(w.retainedDimensions, h, y);
23602
23601
  if (te) {
23603
- if (!h) throw new gn("tiff");
23604
- let t;
23602
+ if (!p) throw new gn("tiff");
23603
+ let e;
23605
23604
  try {
23606
- t = await h.render(new Uint8Array(await e.arrayBuffer()), {
23605
+ e = await p.render(new Uint8Array(await t.arrayBuffer()), {
23607
23606
  targetWidthPx: g,
23608
23607
  targetHeightPx: _,
23609
23608
  maxRetainedPixels: y
23610
23609
  });
23611
23610
  } catch (e) {
23612
- throw d(e) || ee(e) ? e : new b("TIFF codec failed to decode the image", { cause: e });
23611
+ throw f(e) || ee(e) ? e : new b("TIFF codec failed to decode the image", { cause: e });
23613
23612
  }
23614
- if (!t) throw new b("TIFF codec failed to decode the image");
23615
- return En(t, y);
23613
+ if (!e) throw new b("TIFF codec failed to decode the image");
23614
+ return En(e, y);
23616
23615
  }
23617
- return En(w?.resizeOptions ? await createImageBitmap(e, w.resizeOptions) : await createImageBitmap(e), y);
23616
+ return En(w?.resizeOptions ? await createImageBitmap(t, w.resizeOptions) : await createImageBitmap(t), y);
23618
23617
  }
23619
- function En(e, t = u) {
23618
+ function En(e, t = d) {
23620
23619
  if (!e) return null;
23621
23620
  let n = {
23622
23621
  width: Number(e.width),
23623
23622
  height: Number(e.height)
23624
23623
  };
23625
23624
  if (!bn(n, t)) return e;
23626
- throw Jt(e), Cn(n, m, t);
23625
+ throw Jt(e), Cn(n, h, t);
23627
23626
  }
23628
23627
  //#endregion
23629
23628
  //#region packages/core/src/image/decode-gate.ts
@@ -23646,7 +23645,7 @@ async function On(e, t) {
23646
23645
  function kn(e = void 0) {
23647
23646
  if (e !== void 0 && (typeof e != "object" || !e || Array.isArray(e))) throw TypeError("imageResources must be an object when provided");
23648
23647
  let t = e?.decodedByteBudget ?? 134217728;
23649
- if (!Number.isSafeInteger(t) || t < 4 || t > 536870912) throw RangeError(`imageResources.decodedByteBudget must be a safe integer from 4 to ${g} bytes`);
23648
+ if (!Number.isSafeInteger(t) || t < 4 || t > 536870912) throw RangeError(`imageResources.decodedByteBudget must be a safe integer from 4 to ${_} bytes`);
23650
23649
  let n = e?.strategy ?? "adaptive";
23651
23650
  if (n !== "adaptive" && n !== "strict") throw TypeError("imageResources.strategy must be 'adaptive' or 'strict'");
23652
23651
  let r = e?.resolution ?? "native-if-fit";
@@ -23709,9 +23708,9 @@ function Nn(e, t) {
23709
23708
  });
23710
23709
  }, s = Mn(n, r), c = [...n.values()].every((e) => {
23711
23710
  let t = r(e);
23712
- return t.width * t.height <= u;
23713
- }), l = [...n.values()].some((e) => e.sourceWidth === void 0 || e.sourceHeight === void 0), d = t.resolution === "native-if-fit" && !l && c && s <= t.decodedByteBudget, f = Mn(n, (e) => a(e, 1));
23714
- if (d) {
23711
+ return t.width * t.height <= d;
23712
+ }), l = [...n.values()].some((e) => e.sourceWidth === void 0 || e.sourceHeight === void 0), u = t.resolution === "native-if-fit" && !l && c && s <= t.decodedByteBudget, f = Mn(n, (e) => a(e, 1));
23713
+ if (u) {
23715
23714
  let e = /* @__PURE__ */ new Map();
23716
23715
  for (let [t, i] of n) {
23717
23716
  let n = r(i);
@@ -23736,7 +23735,7 @@ function Nn(e, t) {
23736
23735
  let e = Math.sqrt(t.decodedByteBudget / Math.max(1, f));
23737
23736
  for (let t of n.values()) {
23738
23737
  let n = a(t, 1);
23739
- e = Math.min(e, Math.sqrt(u / (n.width * n.height)));
23738
+ e = Math.min(e, Math.sqrt(d / (n.width * n.height)));
23740
23739
  }
23741
23740
  let r = /* @__PURE__ */ new Map(), i = Math.floor(t.decodedByteBudget / 4), s = 0;
23742
23741
  for (let [t, c] of n) {
@@ -23753,10 +23752,10 @@ function Nn(e, t) {
23753
23752
  degraded: !1
23754
23753
  });
23755
23754
  }
23756
- if (t.strategy === "strict" && f > t.decodedByteBudget) throw new h("active-decoded-bytes", t.decodedByteBudget, f);
23755
+ if (t.strategy === "strict" && f > t.decodedByteBudget) throw new g("active-decoded-bytes", t.decodedByteBudget, f);
23757
23756
  if (t.strategy === "adaptive") {
23758
23757
  let e = Mn(n, (e) => a(e, 0));
23759
- if (e > t.decodedByteBudget) throw new h("active-decoded-bytes", t.decodedByteBudget, e);
23758
+ if (e > t.decodedByteBudget) throw new g("active-decoded-bytes", t.decodedByteBudget, e);
23760
23759
  }
23761
23760
  let p = 1;
23762
23761
  if (t.strategy === "adaptive" && f > t.decodedByteBudget) {
@@ -23769,14 +23768,14 @@ function Nn(e, t) {
23769
23768
  }
23770
23769
  let m = /* @__PURE__ */ new Map();
23771
23770
  for (let [e, t] of n) m.set(e, o(t, p));
23772
- let g = Mn(n, (e) => a(e, p)), _ = p < 1 && n.size > 0 ? Math.min(...[...n.entries()].flatMap(([e, t]) => {
23771
+ let h = Mn(n, (e) => a(e, p)), _ = p < 1 && n.size > 0 ? Math.min(...[...n.entries()].flatMap(([e, t]) => {
23773
23772
  let n = m.get(e);
23774
23773
  return [n.width / t.targetWidth, n.height / t.targetHeight];
23775
23774
  })) : p;
23776
23775
  return Object.freeze({
23777
23776
  targets: m,
23778
23777
  idealBytes: f,
23779
- plannedBytes: g,
23778
+ plannedBytes: h,
23780
23779
  qualityScale: _,
23781
23780
  degraded: p < 1
23782
23781
  });
@@ -23840,7 +23839,7 @@ function qn(e) {
23840
23839
  return t || (t = {
23841
23840
  entries: /* @__PURE__ */ new Map(),
23842
23841
  retainedBytes: 0,
23843
- retainedLimit: f
23842
+ retainedLimit: p
23844
23843
  }, R.set(e, t)), t;
23845
23844
  }
23846
23845
  var Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap();
@@ -23908,7 +23907,7 @@ function er(e, t) {
23908
23907
  for (let e of i.deferred) e.then((e) => Qn(e)).catch(() => {});
23909
23908
  i.deferred = [], i.activeBytes = 0, i.activeBitmaps = /* @__PURE__ */ new WeakSet(), Jn.delete(e);
23910
23909
  let t = R.get(e);
23911
- t && (t.retainedLimit = f);
23910
+ t && (t.retainedLimit = p);
23912
23911
  };
23913
23912
  }
23914
23913
  function tr(e) {
@@ -23921,7 +23920,7 @@ function nr(e, t) {
23921
23920
  let n = Jn.get(e);
23922
23921
  if (!n || n.count === 0 || n.activeBitmaps.has(t)) return;
23923
23922
  let r = n.activeBytes + tr(t);
23924
- if (r > n.activeLimit) throw new h("active-decoded-bytes", n.activeLimit, r);
23923
+ if (r > n.activeLimit) throw new g("active-decoded-bytes", n.activeLimit, r);
23925
23924
  n.activeBitmaps.add(t), n.activeBytes = r;
23926
23925
  }
23927
23926
  function rr(e, t, n) {
@@ -23950,17 +23949,17 @@ function ar(e) {
23950
23949
  }
23951
23950
  function V(e) {
23952
23951
  let t = e.maxRetainedPixels;
23953
- return typeof t == "number" && Number.isSafeInteger(t) && t > 0 ? Math.min(t, f / 4) : f / 4;
23952
+ return typeof t == "number" && Number.isSafeInteger(t) && t > 0 ? Math.min(t, p / 4) : p / 4;
23954
23953
  }
23955
23954
  function or(e) {
23956
- return V(e) < f / 4;
23955
+ return V(e) < p / 4;
23957
23956
  }
23958
23957
  function sr(e, t) {
23959
23958
  if (!e) return null;
23960
23959
  let n = V(t), r = Number(e.width), i = Number(e.height), a = Math.max(r, i);
23961
- if (!Number.isFinite(a) || a > 32767) throw new h("image-dimension", m, Number.isFinite(a) ? a : 2 ** 53 - 1);
23960
+ if (!Number.isFinite(a) || a > 32767) throw new g("image-dimension", h, Number.isFinite(a) ? a : 2 ** 53 - 1);
23962
23961
  let o = r * i;
23963
- if (!(r > 0) || !(i > 0) || o > n) throw new h("image-pixels", n, Number.isSafeInteger(o) && o >= 0 ? o : 2 ** 53 - 1);
23962
+ if (!(r > 0) || !(i > 0) || o > n) throw new g("image-pixels", n, Number.isSafeInteger(o) && o >= 0 ? o : 2 ** 53 - 1);
23964
23963
  return e;
23965
23964
  }
23966
23965
  function H(e, t = {}) {
@@ -23971,7 +23970,7 @@ function cr(e) {
23971
23970
  return e.inspection.format === "wmf" || e.inspection.format === "emf";
23972
23971
  }
23973
23972
  function lr(e) {
23974
- let t = n(e.widthPt ?? 0, e.heightPt ?? 0);
23973
+ let t = o(e.widthPt ?? 0, e.heightPt ?? 0);
23975
23974
  return {
23976
23975
  width: t.w,
23977
23976
  height: t.h,
@@ -24466,26 +24465,26 @@ function ci(e, t, n, r) {
24466
24465
  e.restore();
24467
24466
  }
24468
24467
  async function li(e, t) {
24469
- let { width: n, height: i } = _(e.widthEm * 256, (e.ascentEm + e.descentEm) * 256), a = r(n, i), o = a?.getContext("2d");
24470
- if (!a || !o || typeof Path2D > "u") throw Error("Math SVG rasterization requires Canvas 2D and Path2D support");
24471
- ci(o, ri(te(e.svg, t), e.widthEm, e.ascentEm + e.descentEm), n, i);
24472
- let s = a, c = n, l = i, u = ni / 256, d = Math.max(1, Math.round(n * u)), f = Math.max(1, Math.round(i * u));
24473
- for (; c > d || l > f;) {
24474
- let e = Math.max(d, Math.ceil(c / 2)), t = Math.max(f, Math.ceil(l / 2)), n = r(e, t), i = n?.getContext("2d");
24475
- if (!n || !i) break;
24476
- i.imageSmoothingEnabled = !0, i.imageSmoothingQuality = "high", i.drawImage(s, 0, 0, e, t), s = n, c = e, l = t;
24468
+ let { width: n, height: r } = c(e.widthEm * 256, (e.ascentEm + e.descentEm) * 256), i = a(n, r), o = i?.getContext("2d");
24469
+ if (!i || !o || typeof Path2D > "u") throw Error("Math SVG rasterization requires Canvas 2D and Path2D support");
24470
+ ci(o, ri(te(e.svg, t), e.widthEm, e.ascentEm + e.descentEm), n, r);
24471
+ let s = i, l = n, u = r, d = ni / 256, f = Math.max(1, Math.round(n * d)), p = Math.max(1, Math.round(r * d));
24472
+ for (; l > f || u > p;) {
24473
+ let e = Math.max(f, Math.ceil(l / 2)), t = Math.max(p, Math.ceil(u / 2)), n = a(e, t), r = n?.getContext("2d");
24474
+ if (!n || !r) break;
24475
+ r.imageSmoothingEnabled = !0, r.imageSmoothingQuality = "high", r.drawImage(s, 0, 0, e, t), s = n, l = e, u = t;
24477
24476
  }
24478
24477
  return {
24479
24478
  source: s,
24480
- widthPx: c,
24481
- heightPx: l
24479
+ widthPx: l,
24480
+ heightPx: u
24482
24481
  };
24483
24482
  }
24484
24483
  function ui(e, t) {
24485
- let n = r(e.widthPx, e.heightPx);
24484
+ let n = a(e.widthPx, e.heightPx);
24486
24485
  if (!n) return e.source;
24487
- let i = n.getContext("2d");
24488
- return i ? (i.drawImage(e.source, 0, 0, e.widthPx, e.heightPx), i.globalCompositeOperation = "source-in", i.fillStyle = t, i.fillRect(0, 0, e.widthPx, e.heightPx), n) : e.source;
24486
+ let r = n.getContext("2d");
24487
+ return r ? (r.drawImage(e.source, 0, 0, e.widthPx, e.heightPx), r.globalCompositeOperation = "source-in", r.fillStyle = t, r.fillRect(0, 0, e.widthPx, e.heightPx), n) : e.source;
24489
24488
  }
24490
24489
  //#endregion
24491
24490
  //#region packages/core/src/canvas/env.ts
@@ -24758,9 +24757,9 @@ function Ki(e) {
24758
24757
  if (!(r.code !== "ooxml-resource-limit" || !Hi(r.details))) return new T(Gi(r.details), r.details);
24759
24758
  }
24760
24759
  function qi(e) {
24761
- let t = l(e);
24760
+ let t = u(e);
24762
24761
  if (t) {
24763
- let e = new h(t.metric, t.limit, t.observed);
24762
+ let e = new g(t.metric, t.limit, t.observed);
24764
24763
  return {
24765
24764
  message: e.message,
24766
24765
  errorName: e.name,
@@ -24849,7 +24848,7 @@ function Qi(e, t) {
24849
24848
  }
24850
24849
  function $i(e) {
24851
24850
  let t = e.message, n = e.errorName, r = e.code, i = e.decodedImage, a = e.insufficientCredit, o = e.resourceLimit, s = typeof t == "string" ? t : "Worker operation failed with an invalid error payload", c = Fi(n, Oi) ? n : void 0, l = typeof r == "string" ? r : void 0, u = Qi(l, i);
24852
- if (u) return new h(u.metric, u.limit, u.observed);
24851
+ if (u) return new g(u.metric, u.limit, u.observed);
24853
24852
  if (l === "ooxml-tiff-decode") return new b(s);
24854
24853
  if (l === "ooxml-insufficient-credit" && xi(a)) return new Si(a);
24855
24854
  if (l === "ooxml-resource-limit" && Hi(o)) return new T(s, o);
@@ -25127,7 +25126,7 @@ function Aa(e) {
25127
25126
  metric: t.metric
25128
25127
  });
25129
25128
  }
25130
- if (e instanceof w || e instanceof h) return Object.freeze({ code: e.code });
25129
+ if (e instanceof w || e instanceof g) return Object.freeze({ code: e.code });
25131
25130
  if (e instanceof hi || typeof e == "object" && e && e.code === "parser-crashed") return Object.freeze({ code: "parser-crashed" });
25132
25131
  } catch {}
25133
25132
  return Object.freeze({});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./docx-BkSRiy07.js";
2
- import { t } from "./xlsx-CRcSzZNq.js";
3
- import { t as n } from "./pptx-62MmVbYB.js";
1
+ import { t as e } from "./docx-BF9WXrYH.js";
2
+ import { t } from "./xlsx-C9NVjgaV.js";
3
+ import { t as n } from "./pptx-DkyYBYoL.js";
4
4
  export { e as docx, n as pptx, t as xlsx };
@@ -1,5 +1,5 @@
1
- import { C as e, Ot as t, v as n, y as r } from "./hyperlink-ArrU3ArU.js";
2
- import { _ as i } from "./plot-area-frame-D5hEOgkJ.js";
1
+ import { C as e, Ot as t, v as n, y as r } from "./hyperlink-Cxzhet30.js";
2
+ import { ht as i } from "./plot-area-frame-DLTYKHNP.js";
3
3
  //#region packages/core/src/fonts/symbol-font.ts
4
4
  var a = {
5
5
  167: "♣",
package/dist/node.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { $t as t, F as n, G as r, H as i, Jt as a, K as o, L as s, N as c, P as l, V as ee, W as u, ft as d, lt as f, qt as p, un as m, z as h } from "./hyperlink-ArrU3ArU.js";
3
- import { a as te, c as ne, i as re, l as ie, r as ae, u as oe } from "./document-pull-client-yKxI8aDH.js";
2
+ import { $t as t, F as n, G as r, H as i, Jt as a, K as o, L as s, N as c, P as l, V as ee, W as u, ft as d, lt as f, qt as p, un as m, z as h } from "./hyperlink-Cxzhet30.js";
3
+ import { a as te, c as ne, i as re, l as ie, r as ae, u as oe } from "./document-pull-client-B9PTM-pL.js";
4
4
  import { n as se } from "./cjk-fallback-bLI3z70h.js";
5
- import { l as ce, s as le } from "./pixel-budget-Dgjw269h.js";
6
- import { t as ue } from "./slide-pull-client-B9KA8bU6.js";
5
+ import { l as ce, s as le } from "./pixel-budget-9P63Bsk5.js";
6
+ import { t as ue } from "./slide-pull-client-DiPnm240.js";
7
7
  import { t as de } from "./transfer-p6iCC2R7.js";
8
8
  import { t as fe } from "./bounded-raw-part-cache-Cg1BsSZQ.js";
9
- import { c as pe, d as me, f as he, l as ge, o as _e, r as ve, s as ye, t as be, u as xe } from "./worksheet-pull-client-eIcQ-xlD.js";
10
- import { a as Se, i as Ce, n as we, r as Te } from "./session-CrU8f8DI.js";
11
- import { a as Ee, n as De, r as Oe, t as ke } from "./render-8Zo7dnds.js";
9
+ import { c as pe, d as me, f as he, l as ge, o as _e, r as ve, s as ye, t as be, u as xe } from "./worksheet-pull-client-BM8ywvbu.js";
10
+ import { a as Se, i as Ce, n as we, r as Te } from "./session-BGq81gRQ.js";
11
+ import { a as Ee, n as De, r as Oe, t as ke } from "./render-D3iqVKCo.js";
12
12
  import { existsSync as Ae, readFileSync as je } from "node:fs";
13
13
  import { fileURLToPath as Me } from "node:url";
14
14
  import { basename as Ne, dirname as Pe, resolve as Fe } from "node:path";
@@ -135,7 +135,7 @@ var Ve = class {
135
135
  async renderSlide(e, t, n) {
136
136
  return this.assertOpen(), this.enqueueRender(async () => {
137
137
  b(this.signal);
138
- let { renderSlideNode: r } = await import("./render-8Zo7dnds.js").then((e) => e.i);
138
+ let { renderSlideNode: r } = await import("./render-D3iqVKCo.js").then((e) => e.i);
139
139
  await r(e, {
140
140
  slideWidth: this.slideWidth,
141
141
  slideHeight: this.slideHeight,