@silurus/ooxml 0.89.7 → 0.89.8

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 (73) hide show
  1. package/dist/assets/render-worker-Ck21oePL.js +16 -0
  2. package/dist/assets/render-worker-DJiGqgi0.js +15 -0
  3. package/dist/assets/render-worker-hPLJ82d2.js +35 -0
  4. package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
  5. package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
  6. package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
  7. package/dist/chart-ex.mjs +367 -367
  8. package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
  9. package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
  10. package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
  11. package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-90ext13g.js} +37 -37
  12. package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-DSYpUET2.js} +17109 -13858
  13. package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
  14. package/dist/{docx-BgCQiuuN.js → docx-DCCDnwrG.js} +593 -593
  15. package/dist/{docx-BWyACb-n.js → docx-G7pt7ajR.js} +33 -33
  16. package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-Beon3BD5.js} +6 -6
  17. package/dist/docx.mjs +4 -4
  18. package/dist/docx_parser_bg.wasm +0 -0
  19. package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
  20. package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
  21. package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
  22. package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
  23. package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
  24. package/dist/{host-layout-measure-CXKOWA5J.js → host-layout-measure-Z2fIsmDw.js} +1 -1
  25. package/dist/index.mjs +3 -3
  26. package/dist/internal-companion.mjs +2 -2
  27. package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
  28. package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
  29. package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
  30. package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
  31. package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
  32. package/dist/node.mjs +5 -5
  33. package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
  34. package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
  35. package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
  36. package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
  37. package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
  38. package/dist/pptx.mjs +5 -5
  39. package/dist/pptx_parser_bg.wasm +0 -0
  40. package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
  41. package/dist/region-map.mjs +39 -39
  42. package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
  43. package/dist/{render-worker-host-CZHIKTtZ.js → render-worker-host-BZoh-wqR.js} +1 -1
  44. package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BmVeB_mR.js} +1 -1
  45. package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-CVr53kg0.js} +1 -1
  46. package/dist/{renderer-B4KIpz-2.js → renderer-CCA_bQB8.js} +439 -439
  47. package/dist/renderer-DpTePxGq.js +5887 -0
  48. package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
  49. package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
  50. package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
  51. package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
  52. package/dist/three-d.mjs +678 -678
  53. package/dist/types/chart-ex.d.ts +5 -2
  54. package/dist/types/docx.d.ts +29 -7
  55. package/dist/types/index.d.ts +34 -11
  56. package/dist/types/node.d.ts +27 -5
  57. package/dist/types/pptx.d.ts +11 -7
  58. package/dist/types/region-map.d.ts +5 -2
  59. package/dist/types/three-d.d.ts +5 -2
  60. package/dist/types/xlsx.d.ts +10 -7
  61. package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
  62. package/dist/{workbook-model-source-J9ir5Kov.js → workbook-model-source-BHR8shXr.js} +6 -6
  63. package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
  64. package/dist/{xlsx-BbQ7RcNc.js → xlsx-7aY3Pbvh.js} +44 -44
  65. package/dist/{xlsx-ClQiNSrr.js → xlsx-DTtDjzFq.js} +299 -299
  66. package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-DXKvb90T.js} +36 -36
  67. package/dist/xlsx.mjs +5 -5
  68. package/dist/xlsx_parser_bg.wasm +0 -0
  69. package/package.json +1 -1
  70. package/dist/assets/render-worker-B3hF7Akg.js +0 -35
  71. package/dist/assets/render-worker-B5HWxkbU.js +0 -16
  72. package/dist/assets/render-worker-DNGf06QT.js +0 -15
  73. package/dist/renderer-xdugdcMd.js +0 -5769
@@ -1,53 +1,53 @@
1
- import { Aa as e, An as t, Ao as n, Br as r, Co as i, Dn as a, Do as o, Dr as s, En as c, Eo as l, Kr as u, Mn as d, On as f, Oo as p, So as m, Tn as h, Vr as g, Zr as _, _o as v, ao as y, ar as b, cr as x, do as S, ei as C, fo as w, fr as T, go as E, ja as D, jn as O, kn as k, ko as A, lo as j, mo as M, nr as N, oo as P, or as ee, po as te, pr as F, qr as I, so as L, u as R, uo as z, wn as B, xr as V, yo as ne } from "./plot-area-frame-D3JtHvov.js";
2
- import { $ as re, $t as H, C as U, En as W, Ft as G, Q as ie, Qt as K, X as q, Z as ae, _ as oe, at as se, b as ce, bt as le, cn as J, f as ue, g as de, gn as fe, h as pe, it as me, jt as he, o as ge, on as _e, p as ve, r as ye, rn as be, sn as xe, tn as Se, v as Ce, w as we, y as Te } from "./bounded-raw-part-cache-B8t03tSP.js";
3
- import { H as Ee, r as De } from "./renderer-xdugdcMd.js";
4
- import { r as Oe } from "./drawingml-shape-BcXkRayC.js";
5
- import { _ as ke, v as Ae } from "./worksheet-pull-client-Du0MuIro.js";
6
- import { _ as je, a as Me, c as Ne, d as Pe, g as Fe, h as Ie, i as Le, l as Re, m as ze, o as Be, p as Ve, s as He, u as Ue, v as We, y as Ge } from "./resource-measurement-D2bu0Qfx.js";
7
- import { c as Ke, m as qe, p as Je, s as Ye, t as Xe } from "./grid-geometry-CqTDvpDr.js";
1
+ import { An as e, Br as t, Dn as n, Do as r, Dr as i, En as a, Fa as o, Ia as s, Io as c, Jr as l, Kr as u, Mn as d, Mo as f, No as p, On as m, Oo as h, Po as g, So as _, Tn as v, Vr as y, _o as b, ai as x, ar as S, cr as C, do as w, fo as T, fr as E, go as D, ho as O, jn as k, jo as A, kn as j, mo as M, ni as N, nr as P, or as ee, pr as te, u as F, uo as I, vo as L, wn as R, wo as z, xo as B, xr as V, yo as ne } from "./plot-area-frame-DNYMd9Pf.js";
2
+ import { $ as re, C as H, Ct as U, D as W, E as G, Pt as K, Rt as ie, S as q, a as ae, b as oe, ct as se, dn as ce, et as le, g as J, h as ue, in as de, kn as fe, l as pe, ln as me, nn as he, nt as ge, on as _e, st as ve, tn as ye, tt as be, un as xe, v as Se, x as Ce, y as we, yn as Te } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
+ import { H as Ee, r as De } from "./renderer-DpTePxGq.js";
4
+ import { r as Oe } from "./drawingml-shape-B1_kg4BV.js";
5
+ import { _ as ke, v as Ae } from "./worksheet-pull-client-BudfclVl.js";
6
+ import { _ as je, a as Me, c as Ne, d as Pe, g as Fe, h as Ie, i as Le, l as Re, m as ze, o as Be, p as Ve, s as He, u as Ue, v as We, y as Ge } from "./resource-measurement-CfJtbwiR.js";
7
+ import { c as Ke, m as qe, p as Je, s as Ye, t as Xe } from "./grid-geometry-DpMAiSZb.js";
8
8
  function Ze(e, t, n) {
9
9
  let { values: r } = n;
10
10
  if (r.length === 0 || t.w <= 0 || t.h <= 0) return;
11
- let i = n.colorSeries ?? "#5B9BD5", a = Math.min(2, t.w * .08), o = Math.max(2, t.h * .2), s = t.x + a, c = t.y + o, l = Math.max(1, t.w - a * 2), u = Math.max(1, t.h - o * 2), d = r.filter((e) => typeof e == "number");
12
- if (d.length === 0) return;
13
- let f = Math.min(...d), p = Math.max(...d), m = n.min ?? f, h = n.max ?? p;
14
- m === h && (h = m + 1, --m);
15
- let g = h - m, _ = (e) => c + u - (e - m) / g * u;
11
+ let i = n.colorSeries ?? "#5B9BD5", a = Math.min(2, t.w * .08), o = Math.max(2, t.h * .2), c = t.x + a, l = t.y + o, u = Math.max(1, t.w - a * 2), d = Math.max(1, t.h - o * 2), f = r.filter((e) => typeof e == "number");
12
+ if (f.length === 0) return;
13
+ let p = Math.min(...f), m = Math.max(...f), h = n.min ?? p, g = n.max ?? m;
14
+ h === g && (g = h + 1, --h);
15
+ let _ = g - h, v = (e) => l + d - (e - h) / _ * d;
16
16
  if (n.kind === "stem") {
17
- et(e, n, s, c, l, u);
17
+ et(e, n, c, l, u, d);
18
18
  return;
19
19
  }
20
20
  if (n.kind === "column") {
21
- $e(e, n, r, s, c, l, u, m, h);
21
+ $e(e, n, r, c, l, u, d, h, g);
22
22
  return;
23
23
  }
24
- if (n.displayXAxis && m < 0 && h > 0) {
24
+ if (n.displayXAxis && h < 0 && g > 0) {
25
25
  e.save(), e.strokeStyle = n.colorAxis ?? "#000000", e.lineWidth = 1, e.beginPath();
26
- let t = _(0);
27
- e.moveTo(s, t), e.lineTo(s + l, t), e.stroke(), e.restore();
26
+ let t = v(0);
27
+ e.moveTo(c, t), e.lineTo(c + u, t), e.stroke(), e.restore();
28
28
  }
29
- let v = r.length, y = (e) => v === 1 ? s + l / 2 : s + e / (v - 1) * l;
30
- e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * D, e.beginPath();
31
- let b = !1, x = n.displayEmptyCellsAs ?? "gap";
32
- for (let t = 0; t < v; t++) {
29
+ let y = r.length, b = (e) => y === 1 ? c + u / 2 : c + e / (y - 1) * u;
30
+ e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * s, e.beginPath();
31
+ let x = !1, S = n.displayEmptyCellsAs ?? "gap";
32
+ for (let t = 0; t < y; t++) {
33
33
  let n = r[t];
34
34
  if (n == null) {
35
- if (x === "zero") {
36
- let n = y(t), r = _(0);
37
- b ? e.lineTo(n, r) : (e.moveTo(n, r), b = !0);
38
- } else x === "gap" && (b = !1);
35
+ if (S === "zero") {
36
+ let n = b(t), r = v(0);
37
+ x ? e.lineTo(n, r) : (e.moveTo(n, r), x = !0);
38
+ } else S === "gap" && (x = !1);
39
39
  continue;
40
40
  }
41
- let i = y(t), a = _(n);
42
- b ? e.lineTo(i, a) : (e.moveTo(i, a), b = !0);
41
+ let i = b(t), a = v(n);
42
+ x ? e.lineTo(i, a) : (e.moveTo(i, a), x = !0);
43
43
  }
44
44
  e.stroke(), e.restore();
45
- let S = Math.max(1, Math.min(2.5, u * .12)), C = Qe(r, n);
46
- for (let t = 0; t < v; t++) {
45
+ let C = Math.max(1, Math.min(2.5, d * .12)), w = Qe(r, n);
46
+ for (let t = 0; t < y; t++) {
47
47
  let a = r[t];
48
48
  if (a == null) continue;
49
- let o = C[t];
50
- (n.markers || o != null) && (e.save(), e.fillStyle = o ?? n.colorMarkers ?? i, e.beginPath(), e.arc(y(t), _(a), S, 0, Math.PI * 2), e.fill(), e.restore());
49
+ let o = w[t];
50
+ (n.markers || o != null) && (e.save(), e.fillStyle = o ?? n.colorMarkers ?? i, e.beginPath(), e.arc(b(t), v(a), C, 0, Math.PI * 2), e.fill(), e.restore());
51
51
  }
52
52
  }
53
53
  function Qe(e, t) {
@@ -88,7 +88,7 @@ function et(e, t, n, r, i, a) {
88
88
  }
89
89
  }
90
90
  function tt(e, t) {
91
- return e === !0 ? "rtl" : e === !1 ? "ltr" : I().computeLevels(t, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
91
+ return e === !0 ? "rtl" : e === !1 ? "ltr" : l().computeLevels(t, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
92
92
  }
93
93
  function nt(e, t, n, r) {
94
94
  let i = t;
@@ -162,7 +162,7 @@ function gt(e) {
162
162
  }
163
163
  var _t = (e) => e.source === "macos-system" || e.source === "macos-supplemental";
164
164
  function vt(e) {
165
- if (e.source !== "published-open-font" && !(e.farEastCodePage == null || !e.win)) return ge({
165
+ if (e.source !== "published-open-font" && !(e.farEastCodePage == null || !e.win)) return pe({
166
166
  faceSource: _t(e) ? "system" : "office-bundle",
167
167
  unitsPerEm: e.unitsPerEm,
168
168
  hhea: e.hhea,
@@ -187,7 +187,7 @@ function bt(e, t) {
187
187
  function xt(e, t, n) {
188
188
  let r = ct(e);
189
189
  if (!r || !t || t.source !== "local" || t.metric.synthesized || !t.resourceIdentity.startsWith("office-local:") || t.requestedFamily.toLocaleLowerCase("en-US") !== r.toLocaleLowerCase("en-US") || t.weight !== (e.bold ? 700 : 400) || t.style !== (e.italic ? "italic" : "normal")) return;
190
- let i = v(r, {
190
+ let i = _(r, {
191
191
  weight: t.weight,
192
192
  style: t.style
193
193
  });
@@ -200,33 +200,33 @@ function xt(e, t, n) {
200
200
  if (s.length !== 0 && !(i.some(_t) && !s.every(_t))) return yt(s);
201
201
  }
202
202
  var St = {
203
- ...l,
204
- ...L
203
+ ...A,
204
+ ...T
205
205
  };
206
206
  function* Ct(e) {
207
207
  for (let t of e?.sharedStrings ?? []) if (t.runs && t.runs.length > 0) for (let e of t.runs) yield e.text;
208
208
  else yield t.text;
209
209
  }
210
210
  function wt(e, t) {
211
- let r = /* @__PURE__ */ new Set(), i = null;
211
+ let n = /* @__PURE__ */ new Set(), r = null;
212
212
  for (let t of e?.styles?.fonts ?? []) if (t.name) {
213
- r.add(t.name);
213
+ n.add(t.name);
214
214
  let e = /^(.*?)\s+Regular$/i.exec(t.name.trim());
215
215
  if (e) {
216
- let t = e[1].trim(), i = n(St, t.toLocaleLowerCase("en-US"));
217
- i && (!i.loadFamily || i.loadFamily.toLocaleLowerCase("en-US") === t.toLocaleLowerCase("en-US")) && r.add(t);
216
+ let t = e[1].trim(), r = c(St, t.toLocaleLowerCase("en-US"));
217
+ r && (!r.loadFamily || r.loadFamily.toLocaleLowerCase("en-US") === t.toLocaleLowerCase("en-US")) && n.add(t);
218
218
  }
219
- i ??= S(t.name);
219
+ r ??= D(t.name);
220
220
  }
221
- for (let n of E(Ct(e), i ?? t ?? null)) r.add(n);
222
- return r;
221
+ for (let i of B(Ct(e), r ?? t ?? null)) n.add(i);
222
+ return n;
223
223
  }
224
224
  function Tt(e, t) {
225
225
  for (let t of e?.styles?.fonts ?? []) {
226
- let n = S(t.name);
227
- if (n) return z(Ct(e), n);
226
+ let n = D(t.name);
227
+ if (n) return O(Ct(e), n);
228
228
  }
229
- return z(Ct(e), t);
229
+ return O(Ct(e), t);
230
230
  }
231
231
  function Et(e) {
232
232
  let t = /* @__PURE__ */ new Map(), n = (e, n, r) => {
@@ -244,7 +244,7 @@ function Et(e) {
244
244
  }
245
245
  function Dt(e) {
246
246
  let t = /* @__PURE__ */ new Map(), n = e.defaultFontFamily?.trim(), r = e.defaultFontBold ? 700 : 400, i = e.defaultFontItalic ? "italic" : "normal";
247
- if (n && v(n, {
247
+ if (n && _(n, {
248
248
  weight: r,
249
249
  style: i
250
250
  }).length) {
@@ -267,7 +267,7 @@ function Dt(e) {
267
267
  }
268
268
  for (let n of e.shapeGroups ?? []) for (let e of n.shapes) if (e.text) for (let n of lt(e.text)) {
269
269
  let e = n.bold ? 700 : 400, r = n.italic ? "italic" : "normal";
270
- if (v(n.fontFace, {
270
+ if (_(n.fontFace, {
271
271
  weight: e,
272
272
  style: r
273
273
  }).length === 0) continue;
@@ -283,13 +283,13 @@ function Dt(e) {
283
283
  function Ot(e, t) {
284
284
  if (e.length === 0 || t.length === 0) return 0;
285
285
  let n = [...e, ...t], r = e.length;
286
- return r - U(n, r, we, 1);
286
+ return r - G(n, r, W, 1);
287
287
  }
288
288
  function kt(e, t) {
289
289
  let n = t;
290
290
  for (; n < e.length;) {
291
291
  let t = e[e.length - n - 1], r = e[e.length - n], i = t?.codePointAt(0), a = r?.codePointAt(0);
292
- if (i !== void 0 && a !== void 0 && J(i) && J(a)) n++;
292
+ if (i !== void 0 && a !== void 0 && ce(i) && ce(a)) n++;
293
293
  else break;
294
294
  }
295
295
  return n >= e.length ? t : n;
@@ -297,10 +297,10 @@ function kt(e, t) {
297
297
  function At(e, t) {
298
298
  if (e.length === 0 || t.length === 0) return 0;
299
299
  let n = t[0].codePointAt(0), r = e.length - 1, i = e[r].codePointAt(0);
300
- if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !ce(i, n)) return 0;
300
+ if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !H(i, n)) return 0;
301
301
  for (; r > 0;) {
302
302
  let t = e[r - 1].codePointAt(0), n = e[r].codePointAt(0);
303
- if (t === void 0 || n === void 0 || !ce(t, n)) break;
303
+ if (t === void 0 || n === void 0 || !H(t, n)) break;
304
304
  r--;
305
305
  }
306
306
  return r === 0 ? 0 : e.length - r;
@@ -321,7 +321,7 @@ function jt(e, t, n) {
321
321
  if (n === " " || xe(r)) break;
322
322
  t += r > 65535 ? 2 : 1;
323
323
  }
324
- let n = e.slice(a, t), r = K(n) ? _e(n) : null;
324
+ let n = e.slice(a, t), r = ye(n) ? me(n) : null;
325
325
  if (r && r.length > 0) {
326
326
  let e = 0;
327
327
  for (let t of r) i.push(n.slice(e, t)), e = t;
@@ -373,7 +373,7 @@ function Mt(e, t, n, r, i, a, o) {
373
373
  let i = e.measureText(t).width;
374
374
  if (c.length > 0 && l + i > r) {
375
375
  let r = c.flatMap((e) => [...e.text]), i = Ot(r, [...t]);
376
- i > 0 ? i = kt(r, i) : !K(t) && !K(c[c.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(r.at(-1) ?? "") && (i = At(r, [...t]));
376
+ i > 0 ? i = kt(r, i) : !ye(t) && !ye(c[c.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(r.at(-1) ?? "") && (i = At(r, [...t]));
377
377
  let o = c[c.length - 1], s = [...o.text];
378
378
  i > s.length && (i = s.length);
379
379
  let d = null;
@@ -399,21 +399,21 @@ function Mt(e, t, n, r, i, a, o) {
399
399
  width: i
400
400
  }), l += i, n.size > u && (u = n.size);
401
401
  }, g = (t, n) => {
402
- let i = _e(t);
402
+ let i = me(t);
403
403
  if (i.length === 0) {
404
404
  h(t, n);
405
405
  return;
406
406
  }
407
407
  a(n, t);
408
- let o = (t) => e.measureText(t).width, s = be(t), c = t.length, u = 0;
408
+ let o = (t) => e.measureText(t).width, s = _e(t), c = t.length, u = 0;
409
409
  for (; u < c;) {
410
- let e = r - l, a = H(t, i, u, e, o, s);
410
+ let e = r - l, a = he(t, i, u, e, o, s);
411
411
  if (a <= u) {
412
412
  if (l > 0) {
413
413
  p();
414
414
  continue;
415
415
  }
416
- let n = i.find((e) => e > u) ?? c, r = t.slice(u, n), d = Se(r), f = H(r, d, 0, e, o, s);
416
+ let n = i.find((e) => e > u) ?? c, r = t.slice(u, n), d = de(r), f = he(r, d, 0, e, o, s);
417
417
  f <= 0 && (f = d.length > 0 ? d[0] : r.length), a = u + f;
418
418
  }
419
419
  h(t.slice(u, a), n), u = a, u < c && p();
@@ -439,7 +439,7 @@ function Mt(e, t, n, r, i, a, o) {
439
439
  r.push(e.text.slice(a, t)), a = t;
440
440
  }
441
441
  }
442
- for (let e of r) e === "\n" ? (m(), f++) : K(e) ? g(e, t) : h(e, t);
442
+ for (let e of r) e === "\n" ? (m(), f++) : ye(e) ? g(e, t) : h(e, t);
443
443
  }
444
444
  return (c.length > 0 || s.length > 0) && m(), s;
445
445
  }
@@ -591,7 +591,7 @@ var Pt = [
591
591
  function Ft(e, t) {
592
592
  if (e.font) return e.fontToggles ? e.fontToggles[t] : e.font[t] || void 0;
593
593
  }
594
- var It = fe, Lt = 2 ** 53 - 1 - 1;
594
+ var It = Te, Lt = 2 ** 53 - 1 - 1;
595
595
  function Rt(e) {
596
596
  let t = e.limit;
597
597
  if (t === void 0) return It;
@@ -600,7 +600,7 @@ function Rt(e) {
600
600
  return t;
601
601
  }
602
602
  function zt(e, t, n, r) {
603
- return new ne(`XLSX renderer ${e.resource} exceeded its limit of ${t} entries`, {
603
+ return new z(`XLSX renderer ${e.resource} exceeded its limit of ${t} entries`, {
604
604
  stage: "rendering",
605
605
  violation: {
606
606
  format: "xlsx",
@@ -1088,7 +1088,7 @@ function ln(e, t, n, r = !1) {
1088
1088
  return vn(e.value.number, o, s, r);
1089
1089
  }
1090
1090
  function un(e, t) {
1091
- let n = f(t), r = k(n);
1091
+ let n = m(t), r = j(n);
1092
1092
  if (r < 0) return e;
1093
1093
  let i = n[r];
1094
1094
  if (i === "") return "";
@@ -1150,11 +1150,11 @@ function _n(e) {
1150
1150
  return t ? `-${i}` : i;
1151
1151
  }
1152
1152
  function vn(e, t, n, r = !1) {
1153
- if (t === 14 && !n) return yn(B(e, r), e, r);
1153
+ if (t === 14 && !n) return yn(R(e, r), e, r);
1154
1154
  if (n && n.trim().toLowerCase() === "general") return { text: _n(e) };
1155
1155
  if (n) return jn(e, n, r);
1156
1156
  let i = dn[t];
1157
- if (i) return yn(c(e, i, r), e, r);
1157
+ if (i) return yn(a(e, i, r), e, r);
1158
1158
  switch (t) {
1159
1159
  case 0: return { text: _n(e) };
1160
1160
  case 1: return jn(e, "0");
@@ -1174,7 +1174,7 @@ function vn(e, t, n, r = !1) {
1174
1174
  }
1175
1175
  }
1176
1176
  function yn(e, t, n) {
1177
- return e === "#" && !O(t, n) ? {
1177
+ return e === "#" && !k(t, n) ? {
1178
1178
  text: e,
1179
1179
  fill: !0
1180
1180
  } : { text: e };
@@ -1204,7 +1204,7 @@ function Sn(e) {
1204
1204
  continue;
1205
1205
  }
1206
1206
  let s = e.slice(i + 1, o), c = s.toLowerCase(), l = c.match(/^color(\d{1,2})$/), u = s.match(/^(<=|>=|<>|<|>|=)\s*(-?[0-9.]+(?:[eE][-+]?\d+)?)$/);
1207
- if (A(bn, c)) n = bn[c];
1207
+ if (g(bn, c)) n = bn[c];
1208
1208
  else if (l) {
1209
1209
  let e = parseInt(l[1], 10);
1210
1210
  e >= 1 && e <= 56 && (n = xn[e + 7] ?? n);
@@ -1374,11 +1374,11 @@ function kn(e, t, n) {
1374
1374
  }
1375
1375
  if (r.exp) {
1376
1376
  let e = Math.max(r.intSpec.length, 1), t = r.fracSpec.length, n = 0, i = 0;
1377
- o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(h(n, t)) >= 10 ** e && (i += e, n = o / 10 ** i));
1378
- let [s, c = ""] = h(n, t).split(".");
1377
+ o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(v(n, t)) >= 10 ** e && (i += e, n = o / 10 ** i));
1378
+ let [s, c = ""] = v(n, t).split(".");
1379
1379
  return a + An(r, En(s, r.intSpec, !1), Dn(c, r.fracSpec), "E" + (i < 0 ? "-" : r.exp.plus ? "+" : "") + String(Math.abs(i)).padStart(r.exp.width, "0"));
1380
1380
  }
1381
- let s = r.fracSpec.length, [c, l = ""] = h(o, s).split("."), u = c.replace(/^0+/, ""), d = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
1381
+ let s = r.fracSpec.length, [c, l = ""] = v(o, s).split("."), u = c.replace(/^0+/, ""), d = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
1382
1382
  return u === "" && d && (u = "0"), a + An(r, En(u, r.intSpec, r.grouping), Dn(l, r.fracSpec), "");
1383
1383
  }
1384
1384
  function An(e, t, n, r) {
@@ -1405,13 +1405,13 @@ function An(e, t, n, r) {
1405
1405
  }
1406
1406
  return f;
1407
1407
  }
1408
- function jn(e, t, n = !1) {
1409
- let r = f(t), i = k(r), o = r.filter((e, t) => t !== i).map(Sn);
1410
- if (o.length === 0) return { text: _n(e) };
1411
- let s = o.some((e) => e.condition), l, u = !1;
1412
- if (s) {
1408
+ function jn(e, t, r = !1) {
1409
+ let i = m(t), o = j(i), s = i.filter((e, t) => t !== o).map(Sn);
1410
+ if (s.length === 0) return { text: _n(e) };
1411
+ let c = s.some((e) => e.condition), l, u = !1;
1412
+ if (c) {
1413
1413
  let t = !1;
1414
- for (let n of o) if (n.condition) {
1414
+ for (let n of s) if (n.condition) {
1415
1415
  if (Cn(n.condition, e)) {
1416
1416
  l = n, t = !0;
1417
1417
  break;
@@ -1419,12 +1419,12 @@ function jn(e, t, n = !1) {
1419
1419
  } else if (l ??= n, l === n) break;
1420
1420
  if (!l) return { text: "#" };
1421
1421
  u = t && e < 0;
1422
- } else e > 0 ? l = o[0] : e < 0 ? o.length > 1 ? (l = o[1], u = !0) : l = o[0] : l = o.length > 2 ? o[2] : o[0];
1423
- let d = u ? Math.abs(e) : e, p = a(l.body) ? yn(c(d, l.body, n), d, n) : { text: kn(e, l.body, u) };
1422
+ } else e > 0 ? l = s[0] : e < 0 ? s.length > 1 ? (l = s[1], u = !0) : l = s[0] : l = s.length > 2 ? s[2] : s[0];
1423
+ let d = u ? Math.abs(e) : e, f = n(l.body) ? yn(a(d, l.body, r), d, r) : { text: kn(e, l.body, u) };
1424
1424
  return l.color ? {
1425
- ...p,
1425
+ ...f,
1426
1426
  color: l.color
1427
- } : p;
1427
+ } : f;
1428
1428
  }
1429
1429
  var Mn = Object.freeze({
1430
1430
  kind: "unsupported",
@@ -2007,9 +2007,9 @@ var Ar = {
2007
2007
  WEEKDAY: [1, 2]
2008
2008
  };
2009
2009
  function jr(e, t) {
2010
- let r = n(Ar, e);
2011
- if (!r) throw new Y("unsupported");
2012
- if (t < r[0] || t > r[1] || e === "IFS" && t % 2 != 0) throw new Y("invalid");
2010
+ let n = c(Ar, e);
2011
+ if (!n) throw new Y("unsupported");
2012
+ if (t < n[0] || t > n[1] || e === "IFS" && t % 2 != 0) throw new Y("invalid");
2013
2013
  }
2014
2014
  function Mr(e) {
2015
2015
  let t = e.match(/^(?:'[^']*'|[A-Za-z_][A-Za-z0-9_.]*)!(.*)$/);
@@ -2326,8 +2326,8 @@ function Yr() {
2326
2326
  function Xr(e, t, n) {
2327
2327
  return Math.floor(d(new Date(Date.UTC(e, t - 1, n)), !1));
2328
2328
  }
2329
- function Zr(e) {
2330
- return t(Math.floor(e), !1);
2329
+ function Zr(t) {
2330
+ return e(Math.floor(t), !1);
2331
2331
  }
2332
2332
  function Qr(e) {
2333
2333
  let t = Zr(e);
@@ -2647,7 +2647,7 @@ function bi(e, t) {
2647
2647
  baseRtl: n && yi(e, t)
2648
2648
  };
2649
2649
  }
2650
- var xi = (e, t) => ye(e, t);
2650
+ var xi = (e, t) => ae(e, t);
2651
2651
  function Si(e) {
2652
2652
  let t = /^\$?([A-Z]+)\$?(\d+)$/.exec(e.trim());
2653
2653
  if (!t) return null;
@@ -2670,41 +2670,41 @@ function Ci(e, t) {
2670
2670
  function wi(e, t, n, r, i, a = !1, o = (t, n, r) => e.fillText(t, n, r)) {
2671
2671
  let s = t.codePointAt(0) ?? 0, c = oe(s);
2672
2672
  if (a && Ce(s)) {
2673
- e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle", ve(e, () => o(t, 0, 0)), e.restore();
2673
+ e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle", J(e, () => o(t, 0, 0)), e.restore();
2674
2674
  return;
2675
2675
  }
2676
2676
  if (c === "Tr") {
2677
- let a = pe(s);
2677
+ let a = Se(s);
2678
2678
  if (a !== null) {
2679
2679
  o(String.fromCodePoint(a), n, r);
2680
2680
  return;
2681
2681
  }
2682
- if (Te(s)) {
2682
+ if (q(s)) {
2683
2683
  o(t, n, r);
2684
2684
  return;
2685
2685
  }
2686
2686
  e.save(), e.translate(n, r + i / 2), e.rotate(Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", o(t, 0, 0), e.restore();
2687
2687
  return;
2688
2688
  }
2689
- let l = c === "Tu" ? de(s) : null;
2689
+ let l = c === "Tu" ? we(s) : null;
2690
2690
  o(l === null ? t : String.fromCodePoint(l), n, r);
2691
2691
  }
2692
2692
  function Ti(e) {
2693
2693
  return e.editAs === "oneCell" && (e.nativeExtCx ?? 0) > 0 && (e.nativeExtCy ?? 0) > 0;
2694
2694
  }
2695
- function Ei(t, n, r, i, a) {
2696
- let o = n.offsetOf(t.fromCol + 1) + t.fromColOff * i / e, s = r.offsetOf(t.fromRow + 1) + t.fromRowOff * i / e, c = Di(t, a);
2695
+ function Ei(e, t, n, r, i) {
2696
+ let a = t.offsetOf(e.fromCol + 1) + e.fromColOff * r / o, s = n.offsetOf(e.fromRow + 1) + e.fromRowOff * r / o, c = Di(e, i);
2697
2697
  if (c) return {
2698
- x: o,
2698
+ x: a,
2699
2699
  y: s,
2700
- width: c.cx * i / e,
2701
- height: c.cy * i / e
2700
+ width: c.cx * r / o,
2701
+ height: c.cy * r / o
2702
2702
  };
2703
- let l = n.offsetOf(t.toCol + 1) + t.toColOff * i / e, u = r.offsetOf(t.toRow + 1) + t.toRowOff * i / e;
2703
+ let l = t.offsetOf(e.toCol + 1) + e.toColOff * r / o, u = n.offsetOf(e.toRow + 1) + e.toRowOff * r / o;
2704
2704
  return {
2705
- x: o,
2705
+ x: a,
2706
2706
  y: s,
2707
- width: l - o,
2707
+ width: l - a,
2708
2708
  height: u - s
2709
2709
  };
2710
2710
  }
@@ -2746,9 +2746,9 @@ function Pi(e) {
2746
2746
  }
2747
2747
  return t;
2748
2748
  }
2749
- function Fi(t) {
2750
- let n = t * e;
2751
- return Number.isFinite(n) && n > 0 ? n : 0;
2749
+ function Fi(e) {
2750
+ let t = e * o;
2751
+ return Number.isFinite(t) && t > 0 ? t : 0;
2752
2752
  }
2753
2753
  function Ii(e) {
2754
2754
  throw Error(`XLSX initial anchor size reference does not match this worksheet projection: ${e}`);
@@ -2867,7 +2867,7 @@ function Ji(e, t, n = 0, r = !1, i = !1) {
2867
2867
  };
2868
2868
  }
2869
2869
  function Yi(e, t, n, r, i) {
2870
- let a = C(e);
2870
+ let a = x(e);
2871
2871
  if (!a || !(a.width > 0) || !(a.height > 0)) return null;
2872
2872
  let o = e, s = r / a.width, c = i / a.height;
2873
2873
  return {
@@ -2914,7 +2914,7 @@ function Qi(e) {
2914
2914
  widthPt: 0,
2915
2915
  heightPt: 0
2916
2916
  };
2917
- let t = s(e.cx / 12700, e.cy / 12700, e.srcRect, null);
2917
+ let t = i(e.cx / 12700, e.cy / 12700, e.srcRect, null);
2918
2918
  return {
2919
2919
  widthPt: t.width,
2920
2920
  heightPt: t.height
@@ -2950,7 +2950,7 @@ function ta(e, t) {
2950
2950
  hostFlipV: t?.flipV ?? !1
2951
2951
  } : e.duotone ?? null;
2952
2952
  }
2953
- var na = y.map((e) => `"${e}"`).join(", "), ra = P.map((e) => `"${e}"`).join(", "), ia = `"Calibri", Arial, ${na}, sans-serif`, aa = `"Calibri", "Carlito", Arial, ${na}, sans-serif`, oa = `Arial, Helvetica, "Liberation Sans", ${na}, sans-serif`, sa = `"Times New Roman", "Liberation Serif", ${ra}, serif`, ca = `"Carlito", ${oa}`, la = `"Caladea", ${sa}`, ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap();
2953
+ var na = I.map((e) => `"${e}"`).join(", "), ra = w.map((e) => `"${e}"`).join(", "), ia = `"Calibri", Arial, ${na}, sans-serif`, aa = `"Calibri", "Carlito", Arial, ${na}, sans-serif`, oa = `Arial, Helvetica, "Liberation Sans", ${na}, sans-serif`, sa = `"Times New Roman", "Liberation Serif", ${ra}, serif`, ca = `"Carlito", ${oa}`, la = `"Caladea", ${sa}`, ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap();
2954
2954
  function ya(e, t) {
2955
2955
  let n = ot(t), r = va.get(t);
2956
2956
  (!r || r.japanese !== n || r.themeJapaneseMajorFont !== t.themeJapaneseMajorFont || r.themeJapaneseMinorFont !== t.themeJapaneseMinorFont) && (r = {
@@ -2965,17 +2965,17 @@ function ba(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
2965
2965
  family: e.defaultFontFamily,
2966
2966
  weight: e.defaultFontBold ? 700 : 400,
2967
2967
  style: e.defaultFontItalic ? "italic" : "normal"
2968
- }) : null, s = o === null ? void 0 : t?.[o], c = {
2968
+ }) : null, s = o === null || !t ? void 0 : c(t, o), l = {
2969
2969
  tupleKey: o,
2970
2970
  route: s,
2971
2971
  hasDeclaredFace: e.defaultFontFamily ? Fa(e.defaultFontFamily, n) : !1,
2972
2972
  canvasMdw: i && e.defaultFontFamily && e.defaultFontSize ? Na(e.defaultFontFamily, e.defaultFontSize, s, r, e.defaultFontBold ? 700 : 400, e.defaultFontItalic ? "italic" : "normal", i, a.get(e.defaultFontFamily.trim().toLocaleLowerCase("en-US"))) : void 0
2973
- }, l = fa.get(e);
2974
- (!l || l.tupleKey !== c.tupleKey || l.route !== c.route || l.hasDeclaredFace !== c.hasDeclaredFace || l.canvasMdw !== c.canvasMdw) && Xe.invalidate(e), fa.set(e, c);
2973
+ }, u = fa.get(e);
2974
+ (!u || u.tupleKey !== l.tupleKey || u.route !== l.route || u.hasDeclaredFace !== l.hasDeclaredFace || u.canvasMdw !== l.canvasMdw) && Xe.invalidate(e), fa.set(e, l);
2975
2975
  }
2976
2976
  function xa(e, t, n, r = !1) {
2977
2977
  ya(e, t), (da.get(t) !== n || ma.get(t) !== r) && Xe.invalidate(t), pa.set(e, r);
2978
- let i = (q(e.canvas) ? e.canvas.ownerDocument?.fonts : void 0) ?? W(), a = r ? o(i, St) : /* @__PURE__ */ new Map();
2978
+ let i = (re(e.canvas) ? e.canvas.ownerDocument?.fonts : void 0) ?? fe(), a = r ? f(i, St) : /* @__PURE__ */ new Map();
2979
2979
  ha.set(e, a), ga.set(t, a), ba(t, n, i, r, e, a), ma.set(t, r), n ? (ua.set(e, n), da.set(t, n)) : (ua.delete(e), da.delete(t));
2980
2980
  }
2981
2981
  function Sa(e, t) {
@@ -2983,7 +2983,7 @@ function Sa(e, t) {
2983
2983
  }
2984
2984
  function Ca(e, t, n = !1) {
2985
2985
  (da.get(e) !== t || ma.get(e) !== n) && Xe.invalidate(e), t ? da.set(e, t) : da.delete(e), ma.set(e, n);
2986
- let r = W(), i = n ? o(r, St) : /* @__PURE__ */ new Map();
2986
+ let r = fe(), i = n ? f(r, St) : /* @__PURE__ */ new Map();
2987
2987
  ga.set(e, i), ba(e, t, r, n, void 0, i);
2988
2988
  }
2989
2989
  function wa(e, t, n = !1, r = !1) {
@@ -2991,8 +2991,8 @@ function wa(e, t, n = !1, r = !1) {
2991
2991
  family: t?.trim() || "Calibri",
2992
2992
  weight: n ? 700 : 400,
2993
2993
  style: r ? "italic" : "normal"
2994
- });
2995
- return ua.get(e)?.[i];
2994
+ }), a = ua.get(e);
2995
+ return a ? c(a, i) : void 0;
2996
2996
  }
2997
2997
  function Ta(e, t) {
2998
2998
  if (t !== void 0) {
@@ -3001,19 +3001,19 @@ function Ta(e, t) {
3001
3001
  }
3002
3002
  }
3003
3003
  var Ea = "\"Courier New\", \"Liberation Mono\", monospace";
3004
- function Da(e, t, n = !1, r = "") {
3005
- let a = e?.trim() || null, o = a ? S(a) : null, s = w(a), c = (e, n = !0) => {
3006
- let a = [...n && t ? j(t, s === "serif" ? "serif" : "sans") : [], ...i(r) ? m(s === "serif") : []];
3004
+ function Da(e, t, n = !1, i = "") {
3005
+ let a = e?.trim() || null, o = a ? D(a) : null, s = b(a), c = (e, n = !0) => {
3006
+ let a = [...n && t ? M(t, s === "serif" ? "serif" : "sans") : [], ...h(i) ? r(s === "serif") : []];
3007
3007
  if (a.length === 0) return e;
3008
3008
  let o = e.lastIndexOf(",");
3009
3009
  return `${e.slice(0, o)}, ${a.map((e) => `"${e}"`).join(", ")}${e.slice(o)}`;
3010
3010
  };
3011
3011
  if (!o) return c(a ? a.toLowerCase() === "calibri" ? n ? ca : oa : a.toLowerCase() === "cambria" ? n ? la : sa : s === "serif" ? sa : s === "mono" ? Ea : oa : n ? aa : ia);
3012
- let l = s === "serif", u = M(a), d = [...u ? [u] : [], ...j(o, l ? "serif" : "sans").filter((e) => e !== u)].map((e) => `"${e}"`).join(", ");
3012
+ let l = s === "serif", u = ne(a), d = [...u ? [u] : [], ...M(o, l ? "serif" : "sans").filter((e) => e !== u)].map((e) => `"${e}"`).join(", ");
3013
3013
  return c(`${d ? `${d}, ` : ""}${l ? sa : oa}`, !1);
3014
3014
  }
3015
3015
  function Oa(e, t, n = "", r, i = !1, a, o) {
3016
- let s = e?.trim(), c = te(n) ? t : void 0, l = r && (s?.toLocaleLowerCase("en-US") || "calibri") === r.requestedFamily.trim().toLocaleLowerCase("en-US") ? r : void 0, u = a && a.toLocaleLowerCase("en-US") !== s?.toLocaleLowerCase("en-US") ? `${p(a)}, ` : "", d = o && o.toLocaleLowerCase("en-US") !== s?.toLocaleLowerCase("en-US") ? `${p(o)}, ` : "";
3016
+ let s = e?.trim(), c = L(n) ? t : void 0, l = r && (s?.toLocaleLowerCase("en-US") || "calibri") === r.requestedFamily.trim().toLocaleLowerCase("en-US") ? r : void 0, u = a && a.toLocaleLowerCase("en-US") !== s?.toLocaleLowerCase("en-US") ? `${p(a)}, ` : "", d = o && o.toLocaleLowerCase("en-US") !== s?.toLocaleLowerCase("en-US") ? `${p(o)}, ` : "";
3017
3017
  return l ? `${p(l.family)}, ${u}${d}${Da(s, c, i, n)}` : s ? `${p(s)}, ${u}${d}${Da(s, c, i, n)}` : Da(null, c, i, n);
3018
3018
  }
3019
3019
  var ka = 11;
@@ -3024,21 +3024,21 @@ function ja(e, t, n, r) {
3024
3024
  return r ? Aa(e, t, n) : e;
3025
3025
  }
3026
3026
  var Ma = "#7a7a7a";
3027
- function Na(e, t, n, r = !1, i = 400, a = "normal", o, s) {
3028
- let c = t * D, l = o ? null : typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null, u = o ?? l?.getContext("2d");
3029
- if (!u) return 8;
3030
- let d = i !== 400 || a !== "normal" ? `${a} ${i} ` : "";
3031
- o && u.save();
3027
+ function Na(e, t, n, r = !1, i = 400, a = "normal", o, c) {
3028
+ let l = t * s, u = o ? null : typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null, d = o ?? u?.getContext("2d");
3029
+ if (!d) return 8;
3030
+ let f = i !== 400 || a !== "normal" ? `${a} ${i} ` : "";
3031
+ o && d.save();
3032
3032
  try {
3033
- u.font = `${d}${c}px ${Oa(e, void 0, "", n, r, void 0, s)}`;
3033
+ d.font = `${f}${l}px ${Oa(e, void 0, "", n, r, void 0, c)}`;
3034
3034
  let t = 0;
3035
3035
  for (let e of "0123456789") {
3036
- let n = u.measureText(e).width;
3036
+ let n = d.measureText(e).width;
3037
3037
  n > t && (t = n);
3038
3038
  }
3039
3039
  return Pa(t);
3040
3040
  } finally {
3041
- o && u.restore();
3041
+ o && d.restore();
3042
3042
  }
3043
3043
  }
3044
3044
  function Pa(e) {
@@ -3056,8 +3056,8 @@ function Ia(e) {
3056
3056
  family: e.defaultFontFamily,
3057
3057
  weight: t,
3058
3058
  style: n
3059
- }), i = da.get(e)?.[r];
3060
- return fa.get(e)?.canvasMdw ?? Na(e.defaultFontFamily, e.defaultFontSize, i, ma.get(e) === !0, t, n, void 0, ga.get(e)?.get(e.defaultFontFamily.trim().toLocaleLowerCase("en-US")));
3059
+ }), i = da.get(e), a = i ? c(i, r) : void 0;
3060
+ return fa.get(e)?.canvasMdw ?? Na(e.defaultFontFamily, e.defaultFontSize, a, ma.get(e) === !0, t, n, void 0, ga.get(e)?.get(e.defaultFontFamily.trim().toLocaleLowerCase("en-US")));
3061
3061
  }
3062
3062
  function La(e) {
3063
3063
  return Xe.forWorksheetMeasured(e, () => Ia(e));
@@ -3066,8 +3066,8 @@ function Ra(e, t, n, r, i, a, o) {
3066
3066
  if (!(i <= 0 || a <= 0)) {
3067
3067
  if (o) {
3068
3068
  let a = e.createLinearGradient(n, r, n + i, r);
3069
- a.addColorStop(0, b(t, .85)), a.addColorStop(1, b(t, .15)), e.fillStyle = a;
3070
- } else e.fillStyle = b(t);
3069
+ a.addColorStop(0, S(t, .85)), a.addColorStop(1, S(t, .15)), e.fillStyle = a;
3070
+ } else e.fillStyle = S(t);
3071
3071
  e.fillRect(n, r, i, a);
3072
3072
  }
3073
3073
  }
@@ -3256,38 +3256,38 @@ var Ba = /* @__PURE__ */ new Map(), Va = {
3256
3256
  153
3257
3257
  ]
3258
3258
  };
3259
- function Ha(e, t, r, i) {
3260
- let a = e.getTransform(), o = Math.max(1, Math.round(Math.hypot(a.a, a.b))), s = Math.max(1, Math.round(Math.hypot(a.c, a.d))), c = `${t}|${r}|${i}|${o}|${s}`;
3261
- if (Ba.has(c)) return Ba.get(c);
3262
- let l = n(Va, t);
3263
- if (!l) return Ba.set(c, null), null;
3264
- let u = l.length, d = _(u, u);
3265
- if (!d) return Ba.set(c, null), null;
3259
+ function Ha(e, t, n, r) {
3260
+ let i = e.getTransform(), a = Math.max(1, Math.round(Math.hypot(i.a, i.b))), o = Math.max(1, Math.round(Math.hypot(i.c, i.d))), s = `${t}|${n}|${r}|${a}|${o}`;
3261
+ if (Ba.has(s)) return Ba.get(s);
3262
+ let l = c(Va, t);
3263
+ if (!l) return Ba.set(s, null), null;
3264
+ let u = l.length, d = N(u, u);
3265
+ if (!d) return Ba.set(s, null), null;
3266
3266
  let f = d.getContext("2d");
3267
- if (!f) return Ba.set(c, null), null;
3268
- f.fillStyle = b(i), f.fillRect(0, 0, u, u), f.fillStyle = b(r);
3267
+ if (!f) return Ba.set(s, null), null;
3268
+ f.fillStyle = S(r), f.fillRect(0, 0, u, u), f.fillStyle = S(n);
3269
3269
  for (let e = 0; e < u; e++) {
3270
3270
  let t = l[e];
3271
3271
  for (let n = 0; n < u; n++) t & 1 << u - 1 - n && f.fillRect(n, e, 1, 1);
3272
3272
  }
3273
3273
  let p = e.createPattern(d, "repeat");
3274
- if (p && typeof DOMMatrix < "u" && (o >= 2 || s >= 2)) {
3274
+ if (p && typeof DOMMatrix < "u" && (a >= 2 || o >= 2)) {
3275
3275
  let e = new DOMMatrix();
3276
- e.scaleSelf(1 / o, 1 / s), p.setTransform(e);
3276
+ e.scaleSelf(1 / a, 1 / o), p.setTransform(e);
3277
3277
  }
3278
- return Ba.set(c, p), p;
3278
+ return Ba.set(s, p), p;
3279
3279
  }
3280
3280
  function Ua(e, t, n, r, i, a) {
3281
3281
  if (t.gradient && t.gradient.stops.length > 0) return e.fillStyle = Wa(e, t.gradient, n, r, i, a), e.fillRect(n, r, i, a), !0;
3282
3282
  let o = t.patternType;
3283
3283
  if (!o || o === "none") return !1;
3284
3284
  let s = t.fgColor ?? "000000", c = t.bgColor ?? "FFFFFF";
3285
- if (o === "solid") return e.fillStyle = b(s), e.fillRect(n, r, i, a), !0;
3285
+ if (o === "solid") return e.fillStyle = S(s), e.fillRect(n, r, i, a), !0;
3286
3286
  let l = Ha(e, o, s, c);
3287
3287
  if (l) e.fillStyle = l;
3288
3288
  else {
3289
3289
  let t = za(o);
3290
- e.fillStyle = t >= 1 ? b(s) : qa(s, c, t);
3290
+ e.fillStyle = t >= 1 ? S(s) : qa(s, c, t);
3291
3291
  }
3292
3292
  return e.fillRect(n, r, i, a), !0;
3293
3293
  }
@@ -3302,7 +3302,7 @@ function Wa(e, t, n, r, i, a) {
3302
3302
  }
3303
3303
  for (let e of t.stops) {
3304
3304
  let t = Math.min(1, Math.max(0, e.position));
3305
- o.addColorStop(t, b(e.color));
3305
+ o.addColorStop(t, S(e.color));
3306
3306
  }
3307
3307
  return o;
3308
3308
  }
@@ -3316,7 +3316,7 @@ function qa(e, t, n) {
3316
3316
  return `rgb(${Math.round(a * d + c * (1 - d))},${Math.round(o * d + l * (1 - d))},${Math.round(s * d + u * (1 - d))})`;
3317
3317
  }
3318
3318
  function $(e, t, n = 1) {
3319
- return Math.round(e * D * n * t);
3319
+ return Math.round(e * s * n * t);
3320
3320
  }
3321
3321
  function Ja(e, t) {
3322
3322
  let n = {
@@ -3326,7 +3326,7 @@ function Ja(e, t) {
3326
3326
  if (!ot(t)) return n;
3327
3327
  let r = Ya(e, t);
3328
3328
  if (!r) return n;
3329
- let i = v(r, { source: "office-mac" }), a = new Set(i.map((e) => e.weight)), o = a.size === 1 ? i[0].weight : 400, s = !i.length || a.has(n.weight) ? n.weight : o, c = i.filter((e) => e.weight === s), l = c.filter((t) => t.style === (e.italic ? "italic" : "normal")), u = l.length ? l : c, d = new Set(u.flatMap((e) => e.aliases).filter((e) => /-(?:Regular|Bold|Italic|BoldItalic|Light|Medium)$/i.test(e)).map((e) => e.replace(/-(?:Regular|Bold|Italic|BoldItalic|Light|Medium)$/i, ""))), f = new Set(u.map((e) => e.family)), p = d.size === 1 ? [...d][0] : f.size === 1 ? [...f][0] : void 0;
3329
+ let i = _(r, { source: "office-mac" }), a = new Set(i.map((e) => e.weight)), o = a.size === 1 ? i[0].weight : 400, s = !i.length || a.has(n.weight) ? n.weight : o, c = i.filter((e) => e.weight === s), l = c.filter((t) => t.style === (e.italic ? "italic" : "normal")), u = l.length ? l : c, d = new Set(u.flatMap((e) => e.aliases).filter((e) => /-(?:Regular|Bold|Italic|BoldItalic|Light|Medium)$/i.test(e)).map((e) => e.replace(/-(?:Regular|Bold|Italic|BoldItalic|Light|Medium)$/i, ""))), f = new Set(u.map((e) => e.family)), p = d.size === 1 ? [...d][0] : f.size === 1 ? [...f][0] : void 0;
3330
3330
  return {
3331
3331
  family: r,
3332
3332
  weight: s,
@@ -3349,11 +3349,11 @@ function Xa(e, t) {
3349
3349
  function Za(e, t, n, r, i, a = 1) {
3350
3350
  if (e.fillText(t, n, r), !i.bold) return;
3351
3351
  let o = _a.get(e);
3352
- !o?.japanese || !Xa(i, o).syntheticBold || (e.save(), e.strokeStyle = e.fillStyle, e.lineWidth = Math.max(1, Math.round(i.size * D * a)) / 35, e.setLineDash([]), e.lineJoin = "miter", e.miterLimit = 10, e.strokeText(t, n, r), e.restore());
3352
+ !o?.japanese || !Xa(i, o).syntheticBold || (e.save(), e.strokeStyle = e.fillStyle, e.lineWidth = Math.max(1, Math.round(i.size * s * a)) / 35, e.setLineDash([]), e.lineJoin = "miter", e.miterLimit = 10, e.strokeText(t, n, r), e.restore());
3353
3353
  }
3354
3354
  function Qa(e, t, n = 1, r, i = "") {
3355
- let a = t.italic ? "italic " : "", o = Math.max(1, Math.round(t.size * D * n)), s = Xa(t, _a.get(e));
3356
- return `${a}${s.weight === 400 ? "" : `${s.weight} `}${o}px ${Oa(s.family, r, i, wa(e, s.family, t.bold, t.italic), pa.get(e) === !0, s.fallbackAlias, Sa(e, s.family))}`;
3355
+ let a = t.italic ? "italic " : "", o = Math.max(1, Math.round(t.size * s * n)), c = Xa(t, _a.get(e));
3356
+ return `${a}${c.weight === 400 ? "" : `${c.weight} `}${o}px ${Oa(c.family, r, i, wa(e, c.family, t.bold, t.italic), pa.get(e) === !0, c.fallbackAlias, Sa(e, c.family))}`;
3357
3357
  }
3358
3358
  function $a(e, t, n, r, i, a, o, s, c, l, u) {
3359
3359
  if (t.length === 0) return;
@@ -3392,10 +3392,10 @@ function eo(e, t, n) {
3392
3392
  }
3393
3393
  function to(e, t, n, r, i, a, o = 1) {
3394
3394
  if (e.save(), e.strokeStyle = i, e.lineWidth = .5, e.beginPath(), a) {
3395
- let i = r - 1, a = r + 1, s = i + g(i, .5, o), c = a + g(a, .5, o);
3395
+ let i = r - 1, a = r + 1, s = i + y(i, .5, o), c = a + y(a, .5, o);
3396
3396
  e.moveTo(t, s), e.lineTo(n, s), e.moveTo(t, c), e.lineTo(n, c);
3397
3397
  } else {
3398
- let i = r + g(r, .5, o);
3398
+ let i = r + y(r, .5, o);
3399
3399
  e.moveTo(t, i), e.lineTo(n, i);
3400
3400
  }
3401
3401
  e.stroke(), e.restore();
@@ -3517,19 +3517,19 @@ function mo(e, t, n, r, i, a, o, s, c) {
3517
3517
  let p = t[f], m = po(p.font);
3518
3518
  e.font = Qa(e, m, a, c, p.text);
3519
3519
  let h = s.fontColor ?? p.font.color;
3520
- e.fillStyle = h ? b(h) : "#000000";
3521
- let _ = $(p.font.size, a), v = 0;
3522
- p.font.vertAlign === "superscript" ? v = -Math.round(_ * .35) : p.font.vertAlign === "subscript" && (v = Math.round(_ * .1)), Za(e, p.text, d, r + v, m, a);
3523
- let y = $(m.size, a);
3520
+ e.fillStyle = h ? S(h) : "#000000";
3521
+ let g = $(p.font.size, a), _ = 0;
3522
+ p.font.vertAlign === "superscript" ? _ = -Math.round(g * .35) : p.font.vertAlign === "subscript" && (_ = Math.round(g * .1)), Za(e, p.text, d, r + _, m, a);
3523
+ let v = $(m.size, a);
3524
3524
  if (p.font.underline || p.font.strike) {
3525
- let t = uo(i, r, y);
3525
+ let t = uo(i, r, v);
3526
3526
  if (p.font.underline) {
3527
- let n = h ? b(h) : "#000000", r = p.font.underlineStyle === "double" || p.font.underlineStyle === "doubleAccounting";
3528
- to(e, d, d + p.width, t.underline + v, n, r, o);
3527
+ let n = h ? S(h) : "#000000", r = p.font.underlineStyle === "double" || p.font.underlineStyle === "doubleAccounting";
3528
+ to(e, d, d + p.width, t.underline + _, n, r, o);
3529
3529
  }
3530
3530
  if (p.font.strike) {
3531
- let n = t.strike + v, r = n + g(n, .5, o);
3532
- e.save(), e.strokeStyle = h ? b(h) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(d, r), e.lineTo(d + p.width, r), e.stroke(), e.restore();
3531
+ let n = t.strike + _, r = n + y(n, .5, o);
3532
+ e.save(), e.strokeStyle = h ? S(h) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(d, r), e.lineTo(d + p.width, r), e.stroke(), e.restore();
3533
3533
  }
3534
3534
  }
3535
3535
  d += p.width;
@@ -3696,42 +3696,42 @@ function ko(e) {
3696
3696
  }
3697
3697
  return t;
3698
3698
  }
3699
- function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3699
+ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
3700
3700
  if (m <= 0 || h <= 0) return;
3701
- let { styles: v, cellMap: y, mergeAnchorMap: x, mergeSkipSet: S, cfContext: C, cs: w, dpr: T } = t, E = i.length, D = a.length, O = new Set(s), k = new Set(o), A = (e, n) => t.rtl ? Aa(e, n, t.canvasW) : e, j = [], M = -c;
3701
+ let { styles: _, cellMap: v, mergeAnchorMap: b, mergeSkipSet: x, cfContext: C, cs: w, dpr: T } = t, E = i.length, D = a.length, O = new Set(s), k = new Set(o), A = (e, n) => t.rtl ? Aa(e, n, t.canvasW) : e, j = [], M = -c;
3702
3702
  for (let e = 0; e < E; e++) j.push(M), M += i[e];
3703
3703
  let N = [], P = -l;
3704
3704
  for (let e = 0; e < D; e++) N.push(P), P += a[e];
3705
3705
  e.save(), e.beginPath(), e.rect(A(f, m), p, m, h), e.clip();
3706
3706
  let ee = [], te = [], F = [];
3707
3707
  for (let i of t.worksheet.mergeCells ?? []) {
3708
- let a = i.top, g = i.left;
3709
- if (O.has(a) && k.has(g) || !s.some((e) => e >= i.top && e <= i.bottom) || !o.some((e) => e >= i.left && e <= i.right)) continue;
3710
- let y = t.mergeAnchorMap.get(`${a}:${g}`);
3708
+ let a = i.top, v = i.left;
3709
+ if (O.has(a) && k.has(v) || !s.some((e) => e >= i.top && e <= i.bottom) || !o.some((e) => e >= i.left && e <= i.right)) continue;
3710
+ let y = t.mergeAnchorMap.get(`${a}:${v}`);
3711
3711
  if (!y) continue;
3712
- let x = u - c + t.colAxis.offsetOf(g) - t.colAxis.offsetOf(r), S = d - l + t.rowAxis.offsetOf(a) - t.rowAxis.offsetOf(n), E = y.totalW, D = y.totalH;
3713
- if (x + E <= f || x >= f + m || S + D <= p || S >= p + h) continue;
3714
- x = A(x, E);
3715
- let j = `${a}:${g}`, M = t.cellMap.get(j), { font: N, fill: P, border: ee, xf: F } = ro(v, ao(t.worksheet, M, g)), I = vi(M, a, g, C, v.dxfs ?? []), L = I.fill ?? P, R = t.structuredStyleMap.get(j);
3716
- if (!Ua(e, L, x, S, E, D) && R?.fill && Ua(e, R.fill, x, S, E, D), I.dataBar && I.dataBar.ratio > 0) {
3712
+ let b = u - c + t.colAxis.offsetOf(v) - t.colAxis.offsetOf(r), x = d - l + t.rowAxis.offsetOf(a) - t.rowAxis.offsetOf(n), E = y.totalW, D = y.totalH;
3713
+ if (b + E <= f || b >= f + m || x + D <= p || x >= p + h) continue;
3714
+ b = A(b, E);
3715
+ let j = `${a}:${v}`, M = t.cellMap.get(j), { font: N, fill: P, border: ee, xf: F } = ro(_, ao(t.worksheet, M, v)), I = vi(M, a, v, C, _.dxfs ?? []), L = I.fill ?? P, R = t.structuredStyleMap.get(j);
3716
+ if (!Ua(e, L, b, x, E, D) && R?.fill && Ua(e, R.fill, b, x, E, D), I.dataBar && I.dataBar.ratio > 0) {
3717
3717
  let t = Math.max(0, (E - 4) * I.dataBar.ratio);
3718
- Ra(e, I.dataBar.color, x + 2, S + 2, t, D - 4, I.dataBar.gradient);
3718
+ Ra(e, I.dataBar.color, b + 2, x + 2, t, D - 4, I.dataBar.gradient);
3719
3719
  }
3720
- let z = Ts(ws(ee, a, g, y.right, y.bottom, t.cellMap, v), I.border);
3721
- if (te.push(() => Ds(e, z, x, S, E, D, T)), !M) continue;
3722
- let B = ln(M, v, I.numFmt, t.worksheet.date1904), V = B.text;
3720
+ let z = Ts(ws(ee, a, v, y.right, y.bottom, t.cellMap, _), I.border);
3721
+ if (te.push(() => Ds(e, z, b, x, E, D, T)), !M) continue;
3722
+ let B = ln(M, _, I.numFmt, t.worksheet.date1904), V = B.text;
3723
3723
  if (!V || V === "0" && t.worksheet.showZeros === !1) continue;
3724
3724
  let ne = Bo(N, I, R);
3725
- e.font = Qa(e, ne, w, _, V);
3725
+ e.font = Qa(e, ne, w, g, V);
3726
3726
  let re = t.hyperlinkMap.get(j), H = Ro(R, F), U = re ? "#0563C1" : I.fontColor ?? B.color ?? H ?? N.color;
3727
- e.fillStyle = U ? b(U) : "#000000";
3728
- let W = F.alignH ?? lo(M.value.type), G = F.alignV ?? "bottom", ie = F.indent ? Math.round(F.indent * 3 * t.mdw) : 0, K = 3 + (W === "left" || !F.alignH ? ie : 0);
3729
- if (e.save(), e.beginPath(), e.rect(x, S, E, D), e.clip(), B.fill) {
3730
- yo(e, x, S, E, D, G, ne, w), e.restore();
3727
+ e.fillStyle = U ? S(U) : "#000000";
3728
+ let W = F.alignH ?? lo(M.value.type), G = F.alignV ?? "bottom", K = F.indent ? Math.round(F.indent * 3 * t.mdw) : 0, ie = 3 + (W === "left" || !F.alignH ? K : 0);
3729
+ if (e.save(), e.beginPath(), e.rect(b, x, E, D), e.clip(), B.fill) {
3730
+ yo(e, b, x, E, D, G, ne, w), e.restore();
3731
3731
  continue;
3732
3732
  }
3733
3733
  let q;
3734
- W === "right" ? (q = x + E - 3, e.textAlign = "right") : W === "center" ? (q = x + E / 2, e.textAlign = "center") : (q = x + K, e.textAlign = "left");
3734
+ W === "right" ? (q = b + E - 3, e.textAlign = "right") : W === "center" ? (q = b + E / 2, e.textAlign = "center") : (q = b + ie, e.textAlign = "left");
3735
3735
  let ae = Io(R, F), oe = M.value.type === "text" ? M.value.runs : void 0, se = oe && zo(oe, ae), ce = ae == null ? ne : {
3736
3736
  ...ne,
3737
3737
  color: ae
@@ -3739,51 +3739,51 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3739
3739
  if (F.wrapText && le) So(e, se, ce, {
3740
3740
  alignH: W,
3741
3741
  alignV: G,
3742
- cx: x,
3743
- cy: S,
3742
+ cx: b,
3743
+ cy: x,
3744
3744
  cellW: E,
3745
3745
  cellH: D,
3746
- leftPad: K,
3746
+ leftPad: ie,
3747
3747
  paddingX: 3,
3748
3748
  paddingY: 2
3749
3749
  }, w, T, {
3750
3750
  fontColor: I.fontColor,
3751
3751
  readingOrder: F.readingOrder
3752
- }, _);
3752
+ }, g);
3753
3753
  else if (F.wrapText) xo(e, V, q, ne, {
3754
3754
  alignH: W,
3755
3755
  alignV: G,
3756
- cx: x,
3757
- cy: S,
3756
+ cx: b,
3757
+ cy: x,
3758
3758
  cellW: E,
3759
3759
  cellH: D,
3760
- leftPad: K,
3760
+ leftPad: ie,
3761
3761
  paddingX: 3,
3762
3762
  paddingY: 2
3763
3763
  }, w);
3764
3764
  else if (le) bo(e, se, ce, {
3765
3765
  alignH: W,
3766
3766
  alignV: G,
3767
- cx: x,
3768
- cy: S,
3767
+ cx: b,
3768
+ cy: x,
3769
3769
  cellW: E,
3770
3770
  cellH: D,
3771
- leftPad: K,
3771
+ leftPad: ie,
3772
3772
  paddingX: 3,
3773
3773
  paddingY: 2
3774
3774
  }, w, T, {
3775
3775
  fontColor: I.fontColor,
3776
3776
  readingOrder: F.readingOrder
3777
- }, _);
3777
+ }, g);
3778
3778
  else {
3779
3779
  let { baseline: t, textY: n } = fo({
3780
3780
  alignH: W,
3781
3781
  alignV: G,
3782
- cx: x,
3783
- cy: S,
3782
+ cx: b,
3783
+ cy: x,
3784
3784
  cellW: E,
3785
3785
  cellH: D,
3786
- leftPad: K,
3786
+ leftPad: ie,
3787
3787
  paddingX: 3,
3788
3788
  paddingY: 2
3789
3789
  });
@@ -3794,7 +3794,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3794
3794
  for (let n = 0; n < D; n++) {
3795
3795
  let r = s[n], c = d + N[n], l = a[n];
3796
3796
  if ((c + l <= p || c >= p + h) && !o.some((e) => {
3797
- let t = x.get(`${r}:${e}`);
3797
+ let t = b.get(`${r}:${e}`);
3798
3798
  return t != null && c + t.totalH > p && c < p + h;
3799
3799
  })) continue;
3800
3800
  let D = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Set(), k = -1, M = (e) => {
@@ -3808,9 +3808,9 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3808
3808
  let n = !1, i = !1;
3809
3809
  if (e < E && o[e] <= t.selectionLastCol) {
3810
3810
  let a = `${r}:${o[e]}`;
3811
- if (!S.has(a) && !x.has(a)) {
3812
- let r = y.get(a);
3813
- n = ro(v, ao(t.worksheet, r, o[e])).xf.alignH === "centerContinuous", i = !!(r && r.value && r.value.type !== "empty");
3811
+ if (!x.has(a) && !b.has(a)) {
3812
+ let r = v.get(a);
3813
+ n = ro(_, ao(t.worksheet, r, o[e])).xf.alignH === "centerContinuous", i = !!(r && r.value && r.value.type !== "empty");
3814
3814
  }
3815
3815
  }
3816
3816
  n ? i && k >= 0 && e > k ? (M(e), k = e) : k < 0 && (k = e) : M(e);
@@ -3818,61 +3818,61 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3818
3818
  let P = !0;
3819
3819
  for (let a = 0; a < E; a++) {
3820
3820
  let s = o[a], d = u + j[a], k = i[a], M = s === t.firstViewportCol && P, N = `${r}:${s}`;
3821
- if (S.has(N)) {
3821
+ if (x.has(N)) {
3822
3822
  P = d + k <= f || d >= f + m;
3823
3823
  continue;
3824
3824
  }
3825
- let I = x.get(N), L = I ? I.totalW : k, R = I ? I.totalH : l, z = d + L <= f || d >= f + m;
3825
+ let I = b.get(N), L = I ? I.totalW : k, R = I ? I.totalH : l, z = d + L <= f || d >= f + m;
3826
3826
  if (c + R <= p || c >= p + h || z && !t.overflowTextAnchors.has(N)) {
3827
3827
  P = !0;
3828
3828
  continue;
3829
3829
  }
3830
3830
  P = !1;
3831
- let B = A(d, L), V = y.get(N), { font: ne, fill: re, border: H, xf: U } = ro(v, ao(t.worksheet, V, s)), W = vi(V, r, s, C, v.dxfs ?? []), G = Ua(e, W.fill ?? re, B, c, L, R), ie = t.structuredStyleMap.get(N);
3832
- if (!G && ie?.fill && (G = Ua(e, ie.fill, B, c, L, R)), t.commentCells.has(N) && Ka(e, B, c, L, R), W.dataBar && W.dataBar.ratio > 0) {
3831
+ let B = A(d, L), V = v.get(N), { font: ne, fill: re, border: H, xf: U } = ro(_, ao(t.worksheet, V, s)), W = vi(V, r, s, C, _.dxfs ?? []), G = Ua(e, W.fill ?? re, B, c, L, R), K = t.structuredStyleMap.get(N);
3832
+ if (!G && K?.fill && (G = Ua(e, K.fill, B, c, L, R)), t.commentCells.has(N) && Ka(e, B, c, L, R), W.dataBar && W.dataBar.ratio > 0) {
3833
3833
  let t = Math.max(0, (L - 4) * W.dataBar.ratio);
3834
3834
  Ra(e, W.dataBar.color, B + 2, c + 2, t, R - 4, W.dataBar.gradient);
3835
3835
  }
3836
- let K = t.sparklineMap.get(N);
3837
- if (K && Ze(e, {
3836
+ let ie = t.sparklineMap.get(N);
3837
+ if (ie && Ze(e, {
3838
3838
  x: B,
3839
3839
  y: c,
3840
3840
  w: L,
3841
3841
  h: R
3842
- }, K), t.worksheet.isChartSheet !== !0 && t.worksheet.showGridlines !== !1 && !G) {
3842
+ }, ie), t.worksheet.isChartSheet !== !0 && t.worksheet.showGridlines !== !1 && !G) {
3843
3843
  if (e.strokeStyle = "#d0d0d0", e.lineWidth = .5, e.beginPath(), !D.has(a)) {
3844
- let t = B + L + g(B + L, .5, T);
3844
+ let t = B + L + y(B + L, .5, T);
3845
3845
  e.moveTo(t, c), e.lineTo(t, c + R);
3846
3846
  }
3847
- let t = c + R + g(c + R, .5, T);
3847
+ let t = c + R + y(c + R, .5, T);
3848
3848
  if (e.moveTo(B, t), e.lineTo(B + L, t), n === 0) {
3849
- let t = c + g(c, .5, T);
3849
+ let t = c + y(c, .5, T);
3850
3850
  e.moveTo(B, t), e.lineTo(B + L, t);
3851
3851
  }
3852
3852
  if (M) {
3853
- let t = B + g(B, .5, T);
3853
+ let t = B + y(B, .5, T);
3854
3854
  e.moveTo(t, c), e.lineTo(t, c + R);
3855
3855
  }
3856
3856
  e.stroke();
3857
3857
  }
3858
- let q = Ts(I ? ws(H, r, s, I.right, I.bottom, y, v) : H, W.border);
3859
- ie && (q = {
3858
+ let q = Ts(I ? ws(H, r, s, I.right, I.bottom, v, _) : H, W.border);
3859
+ K && (q = {
3860
3860
  ...q,
3861
- top: q.top?.style ? q.top : ie.top ?? q.top,
3862
- bottom: q.bottom?.style ? q.bottom : ie.bottom ?? q.bottom,
3863
- left: q.left?.style ? q.left : ie.left ?? q.left,
3864
- right: q.right?.style ? q.right : ie.right ?? q.right
3861
+ top: q.top?.style ? q.top : K.top ?? q.top,
3862
+ bottom: q.bottom?.style ? q.bottom : K.bottom ?? q.bottom,
3863
+ left: q.left?.style ? q.left : K.left ?? q.left,
3864
+ right: q.right?.style ? q.right : K.right ?? q.right
3865
3865
  }), (D.has(a) || O.has(a)) && (q = {
3866
3866
  ...q,
3867
3867
  left: O.has(a) ? null : q.left,
3868
3868
  right: D.has(a) ? null : q.right
3869
3869
  });
3870
- let ae = y.get(`${r - 1}:${s}`), oe = ae ? ro(v, ao(t.worksheet, ae, s)).border.bottom : null;
3870
+ let ae = v.get(`${r - 1}:${s}`), oe = ae ? ro(_, ao(t.worksheet, ae, s)).border.bottom : null;
3871
3871
  if (oe?.style && (n === 0 || q.top?.style) && (q = {
3872
3872
  ...q,
3873
3873
  top: js(q.top, oe)
3874
3874
  }), !O.has(a)) {
3875
- let e = y.get(`${r}:${s - 1}`), n = e ? ro(v, ao(t.worksheet, e, s - 1)).border.right : null;
3875
+ let e = v.get(`${r}:${s - 1}`), n = e ? ro(_, ao(t.worksheet, e, s - 1)).border.right : null;
3876
3876
  n?.style && (M || q.left?.style) && (q = {
3877
3877
  ...q,
3878
3878
  left: js(q.left, n)
@@ -3891,18 +3891,18 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3891
3891
  });
3892
3892
  }
3893
3893
  if (!V) continue;
3894
- let le = ln(V, v, W.numFmt, t.worksheet.date1904), J = le.text;
3894
+ let le = ln(V, _, W.numFmt, t.worksheet.date1904), J = le.text;
3895
3895
  !J || J === "0" && t.worksheet.showZeros === !1 || ee.push(() => {
3896
- let n = Bo(ne, W, ie);
3897
- e.font = Qa(e, n, w, _, J);
3898
- let l = t.hyperlinkMap.get(N), u = Ro(ie, U), f = l ? "#0563C1" : W.fontColor ?? le.color ?? u ?? ne.color;
3899
- e.fillStyle = f ? b(f) : "#000000";
3896
+ let n = Bo(ne, W, K);
3897
+ e.font = Qa(e, n, w, g, J);
3898
+ let l = t.hyperlinkMap.get(N), u = Ro(K, U), f = l ? "#0563C1" : W.fontColor ?? le.color ?? u ?? ne.color;
3899
+ e.fillStyle = f ? S(f) : "#000000";
3900
3900
  let p = V.value.type === "number", m = U.alignH ?? lo(V.value.type), h = U.alignV ?? "bottom", C = U.indent ? Math.round(U.indent * 3 * t.mdw) : 0, D = W.iconSet ? Math.max(8, Math.round(Math.min(L, R) * .55)) : 0, O = D > 0 ? D + 4 : 0, k = 3 + (m === "left" || !U.alignH ? C : 0) + O, j = L, M = a;
3901
3901
  if (m === "centerContinuous" && !I) for (let e = a + 1; e < E && o[e] <= t.selectionLastCol; e++) {
3902
3902
  let n = `${r}:${o[e]}`;
3903
- if (S.has(n) || x.has(n)) break;
3904
- let a = y.get(n);
3905
- if (a && a.value.type !== "empty" || ro(v, ao(t.worksheet, a, o[e])).xf.alignH !== "centerContinuous") break;
3903
+ if (x.has(n) || b.has(n)) break;
3904
+ let a = v.get(n);
3905
+ if (a && a.value.type !== "empty" || ro(_, ao(t.worksheet, a, o[e])).xf.alignH !== "centerContinuous") break;
3906
3906
  j += i[e], M = e;
3907
3907
  }
3908
3908
  let P = t.rtl ? B - (j - L) : B, ee = m === "centerContinuous" ? P : B, te = m === "centerContinuous" ? j : L, F = J.includes("\n");
@@ -3916,8 +3916,8 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3916
3916
  let e = n;
3917
3917
  for (let t = f; t >= 0 && t < E && e > 0; t += d) {
3918
3918
  let n = `${r}:${o[t]}`;
3919
- if (S.has(n) || x.has(n)) break;
3920
- let a = y.get(n);
3919
+ if (x.has(n) || b.has(n)) break;
3920
+ let a = v.get(n);
3921
3921
  if (a && a.value.type !== "empty") break;
3922
3922
  te += i[t], e -= i[t];
3923
3923
  }
@@ -3926,8 +3926,8 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3926
3926
  let e = u;
3927
3927
  for (let t = h; t >= 0 && t < E && e > 0; t += p) {
3928
3928
  let n = `${r}:${o[t]}`;
3929
- if (S.has(n) || x.has(n)) break;
3930
- let a = y.get(n);
3929
+ if (x.has(n) || b.has(n)) break;
3930
+ let a = v.get(n);
3931
3931
  if (a && a.value.type !== "empty") break;
3932
3932
  ee -= i[t], te += i[t], e -= i[t];
3933
3933
  }
@@ -3948,7 +3948,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3948
3948
  }
3949
3949
  let H, G;
3950
3950
  m === "right" ? (H = B + L - 3, G = "right") : m === "center" ? (H = B + L / 2, G = "center") : m === "centerContinuous" ? (H = P + j / 2, G = "center") : m === "distributed" || m === "justify" && !U.wrapText && !F ? (H = B + 3, G = "left") : (H = B + k, G = "left");
3951
- let K = U.textRotation ?? 0, q = K === 255, ae = K > 0 && K !== 255;
3951
+ let ie = U.textRotation ?? 0, q = ie === 255, ae = ie > 0 && ie !== 255;
3952
3952
  if (W.iconSet && D > 0 && (e.save(), e.beginPath(), e.rect(B, c, L, R), e.clip(), Do(e, W.iconSet.name, W.iconSet.index, B + 2, c + (R - D) / 2, D), e.restore()), e.save(), e.beginPath(), e.rect(ee, c, te, R), e.clip(), le.fill) {
3953
3953
  yo(e, B, c, L, R, h, n, w), e.restore();
3954
3954
  return;
@@ -3965,7 +3965,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3965
3965
  return;
3966
3966
  }
3967
3967
  if (ae) {
3968
- let t = K <= 90 ? -(K * Math.PI / 180) : (K - 90) * Math.PI / 180;
3968
+ let t = ie <= 90 ? -(ie * Math.PI / 180) : (ie - 90) * Math.PI / 180;
3969
3969
  e.translate(B + L / 2, c + R / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", Za(e, J, 0, 0, n, w), e.restore();
3970
3970
  return;
3971
3971
  }
@@ -3982,7 +3982,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3982
3982
  try {
3983
3983
  e.direction = yi(U.readingOrder, J) ? "rtl" : "ltr";
3984
3984
  } catch {}
3985
- let oe = Io(ie, U), se = V.value.type === "text" ? V.value.runs : void 0, ce = se && zo(se, oe), de = oe == null ? n : {
3985
+ let oe = Io(K, U), se = V.value.type === "text" ? V.value.runs : void 0, ce = se && zo(se, oe), de = oe == null ? n : {
3986
3986
  ...n,
3987
3987
  color: oe
3988
3988
  }, fe = ce && ce.length > 0;
@@ -3999,7 +3999,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
3999
3999
  }, w, T, {
4000
4000
  fontColor: W.fontColor,
4001
4001
  readingOrder: U.readingOrder
4002
- }, _);
4002
+ }, g);
4003
4003
  else if (U.wrapText) xo(e, J, H, n, {
4004
4004
  alignH: m,
4005
4005
  alignV: h,
@@ -4024,7 +4024,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
4024
4024
  }, w, T, {
4025
4025
  fontColor: W.fontColor,
4026
4026
  readingOrder: U.readingOrder
4027
- }, _);
4027
+ }, g);
4028
4028
  else {
4029
4029
  let t = n.vertAlign, r = $(ne.size, w), i = 0;
4030
4030
  t === "superscript" ? i = -Math.round(r * .35) : t === "subscript" && (i = Math.round(r * .1));
@@ -4032,7 +4032,7 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
4032
4032
  ...n,
4033
4033
  size: n.size * .65
4034
4034
  } : n;
4035
- t && (e.font = Qa(e, a, w, _, J));
4035
+ t && (e.font = Qa(e, a, w, g, J));
4036
4036
  let o = null, s = () => o ??= e.measureText(J), u = () => {
4037
4037
  let e = Math.min(s().width, te - k - 3);
4038
4038
  return {
@@ -4041,12 +4041,12 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
4041
4041
  };
4042
4042
  }, d = $(a.size, w);
4043
4043
  if (n.underline || l) {
4044
- let { x: t, width: r } = u(), a = (h === "top" ? c + 2 + d + 1 : h === "center" ? c + R / 2 + Math.round(d * .55) : c + R - 2 + 1) + i, o = l ? "#0563C1" : f ? b(f) : "#000000", s = n.underlineStyle === "double" || n.underlineStyle === "doubleAccounting";
4044
+ let { x: t, width: r } = u(), a = (h === "top" ? c + 2 + d + 1 : h === "center" ? c + R / 2 + Math.round(d * .55) : c + R - 2 + 1) + i, o = l ? "#0563C1" : f ? S(f) : "#000000", s = n.underlineStyle === "double" || n.underlineStyle === "doubleAccounting";
4045
4045
  to(e, t, t + r, a, o, s, T);
4046
4046
  }
4047
4047
  if (n.strike) {
4048
- let { x: t, width: n } = u(), r = (h === "top" ? c + 2 + Math.round(d * .5) : h === "center" ? c + R / 2 : c + R - 2 - Math.round(d * .35)) + i, a = r + g(r, .5, T);
4049
- e.save(), e.strokeStyle = f ? b(f) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(t, a), e.lineTo(t + n, a), e.stroke(), e.restore();
4048
+ let { x: t, width: n } = u(), r = (h === "top" ? c + 2 + Math.round(d * .5) : h === "center" ? c + R / 2 : c + R - 2 - Math.round(d * .35)) + i, a = r + y(r, .5, T);
4049
+ e.save(), e.strokeStyle = f ? S(f) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(t, a), e.lineTo(t + n, a), e.stroke(), e.restore();
4050
4050
  }
4051
4051
  if (J.includes("\n")) {
4052
4052
  let t = J.split("\n"), n = $(ne.size, w, 1.2), r = t.length * n, o;
@@ -4069,10 +4069,10 @@ function Ao(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _) {
4069
4069
  }
4070
4070
  let pe = V.value.type === "text" ? V.value.phoneticRuns : void 0;
4071
4071
  if (V.showPhonetic && pe && pe.length > 0 && !J.includes("\n")) {
4072
- let t = Qa(e, n, w, _, J), r = eo(e, J, t), i;
4072
+ let t = Qa(e, n, w, g, J), r = eo(e, J, t), i;
4073
4073
  i = m === "right" ? B + L - 3 - r : m === "center" ? B + L / 2 - r / 2 : B + k;
4074
- let a = f ? b(f) : "#000000";
4075
- $a(e, pe, V.value.type === "text" ? V.value.phoneticPr : void 0, J, t, v, i, c, w, a, _);
4074
+ let a = f ? S(f) : "#000000";
4075
+ $a(e, pe, V.value.type === "text" ? V.value.phoneticPr : void 0, J, t, _, i, c, w, a, g);
4076
4076
  }
4077
4077
  if (e.restore(), J && t.textRuns) {
4078
4078
  let e = s >= t.textRunPane.first && s <= t.textRunPane.last, n = e ? t.textRuns.owned : t.textRuns.foreign;
@@ -4367,17 +4367,17 @@ function rs(e, t, n, r, i = {}, a) {
4367
4367
  xa(e, t, i.officeFontRoutes, i.googleSubstitutes === !0), Ta(t, i.authoritativeMdw);
4368
4368
  let o = i.dpr ?? 1, s = i.cellScale ?? 1, c = t.isChartSheet === !0, l = La(t), u = l.maximumDigitWidth, d = e.canvas.width / o, f = e.canvas.height / o;
4369
4369
  e.clearRect(0, 0, d, f), e.fillStyle = "#ffffff", e.fillRect(0, 0, d, f);
4370
- let p = (e) => Math.round(e * s), m = c ? 0 : p(50), h = c ? 0 : p(22), { rows: _, cols: v } = r, y = Math.max(1, Math.trunc(r.row) || 1), b = Math.max(1, Math.trunc(r.col) || 1), x = (i.scrollOffsetX ?? 0) * s, S = (i.scrollOffsetY ?? 0) * s, { col: C, row: w } = l.axesAtScale(s), T = C.bandsToCover(1, c ? 0 : i.freezeCols ?? 0, Math.max(0, d - m)), E = w.bandsToCover(1, c ? 0 : i.freezeRows ?? 0, Math.max(0, f - h)), D = E.at(-1)?.index ?? 0, O = T.at(-1)?.index ?? 0, k = T.map(({ index: e }) => e), A = E.map(({ index: e }) => e), j = T.map(({ size: e }) => e), M = E.map(({ size: e }) => e), N = j.reduce((e, t) => e + t, 0), P = M.reduce((e, t) => e + t, 0), ee = C.bandsToCover(b, Math.min(16384, b + v - 1)), te = w.bandsToCover(y, Math.min(1048576, y + _ - 1)), F = ee.map(({ index: e }) => e), I = te.map(({ index: e }) => e), L = ee.map(({ size: e }) => e), R = te.map(({ size: e }) => e), { cellMap: z, cfContext: B, mergeSkipSet: V, autoFilterCells: ne, hyperlinkMap: re, commentCells: H, structuredStyleMap: U, sparklineMap: W, nonEmptyColsByRow: G } = Po(t, n), ie = /* @__PURE__ */ new Map(), K = No(t, "worksheet-merge-anchor-index", "index-merge-anchor-coordinates");
4370
+ let p = (e) => Math.round(e * s), m = c ? 0 : p(50), h = c ? 0 : p(22), { rows: g, cols: _ } = r, v = Math.max(1, Math.trunc(r.row) || 1), b = Math.max(1, Math.trunc(r.col) || 1), x = (i.scrollOffsetX ?? 0) * s, S = (i.scrollOffsetY ?? 0) * s, { col: C, row: w } = l.axesAtScale(s), T = C.bandsToCover(1, c ? 0 : i.freezeCols ?? 0, Math.max(0, d - m)), E = w.bandsToCover(1, c ? 0 : i.freezeRows ?? 0, Math.max(0, f - h)), D = E.at(-1)?.index ?? 0, O = T.at(-1)?.index ?? 0, k = T.map(({ index: e }) => e), A = E.map(({ index: e }) => e), j = T.map(({ size: e }) => e), M = E.map(({ size: e }) => e), N = j.reduce((e, t) => e + t, 0), P = M.reduce((e, t) => e + t, 0), ee = C.bandsToCover(b, Math.min(16384, b + _ - 1)), te = w.bandsToCover(v, Math.min(1048576, v + g - 1)), F = ee.map(({ index: e }) => e), I = te.map(({ index: e }) => e), L = ee.map(({ size: e }) => e), R = te.map(({ size: e }) => e), { cellMap: z, cfContext: B, mergeSkipSet: V, autoFilterCells: ne, hyperlinkMap: re, commentCells: H, structuredStyleMap: U, sparklineMap: W, nonEmptyColsByRow: G } = Po(t, n), K = /* @__PURE__ */ new Map(), ie = No(t, "worksheet-merge-anchor-index", "index-merge-anchor-coordinates");
4371
4371
  for (let e of t.mergeCells ?? []) {
4372
4372
  let t = C.offsetOf(e.right + 1) - C.offsetOf(e.left), n = w.offsetOf(e.bottom + 1) - w.offsetOf(e.top);
4373
- Vt(ie, `${e.top}:${e.left}`, {
4373
+ Vt(K, `${e.top}:${e.left}`, {
4374
4374
  totalW: t,
4375
4375
  totalH: n,
4376
4376
  right: e.right,
4377
4377
  bottom: e.bottom
4378
- }, K);
4378
+ }, ie);
4379
4379
  }
4380
- let q = F[0] ?? b, ae = F.at(-1) ?? Math.min(16384, b + v - 1), oe = [...new Set([...A, ...I])], se = ts(e, t, n, z, G, B, U, ie, C, w, oe, q, ae, s, u, t.rightToLeft === !0, a), ce = O > 0 ? ts(e, t, n, z, G, B, U, ie, C, w, oe, 1, O, s, u, t.rightToLeft === !0, a) : {
4380
+ let q = F[0] ?? b, ae = F.at(-1) ?? Math.min(16384, b + _ - 1), oe = [...new Set([...A, ...I])], se = ts(e, t, n, z, G, B, U, K, C, w, oe, q, ae, s, u, t.rightToLeft === !0, a), ce = O > 0 ? ts(e, t, n, z, G, B, U, K, C, w, oe, 1, O, s, u, t.rightToLeft === !0, a) : {
4381
4381
  startCol: 1,
4382
4382
  endCol: 0,
4383
4383
  anchorKeys: /* @__PURE__ */ new Set()
@@ -4385,7 +4385,7 @@ function rs(e, t, n, r, i = {}, a) {
4385
4385
  worksheet: t,
4386
4386
  styles: n,
4387
4387
  cellMap: z,
4388
- mergeAnchorMap: ie,
4388
+ mergeAnchorMap: K,
4389
4389
  mergeSkipSet: V,
4390
4390
  cfContext: B,
4391
4391
  colWidths: pe,
@@ -4396,7 +4396,7 @@ function rs(e, t, n, r, i = {}, a) {
4396
4396
  frozenRowHeights: M,
4397
4397
  frozenW: N,
4398
4398
  frozenH: P,
4399
- startRow: y,
4399
+ startRow: v,
4400
4400
  startCol: b,
4401
4401
  cs: s,
4402
4402
  dpr: o,
@@ -4439,43 +4439,43 @@ function rs(e, t, n, r, i = {}, a) {
4439
4439
  firstViewportCol: k[0] ?? 1,
4440
4440
  selectionLastCol: O
4441
4441
  };
4442
- if (D > 0 && O > 0 && Ao(e, Ee, 1, 1, ue, M, J, A, 0, 0, ge, _e, ge, _e, N, P, a), D > 0 && Ao(e, Te, 1, se.startCol, pe, M, fe, A, me, 0, ve, _e, ve, _e, be, P, a), O > 0 && Ao(e, Ee, y, 1, ue, R, J, I, 0, S, ge, ye, ge, ye, N, xe, a), c || Ao(e, Te, y, se.startCol, pe, R, fe, I, me, S, ve, ye, ve, ye, be, xe, a), he.textRuns && i.onTextRun) {
4442
+ if (D > 0 && O > 0 && Ao(e, Ee, 1, 1, ue, M, J, A, 0, 0, ge, _e, ge, _e, N, P, a), D > 0 && Ao(e, Te, 1, se.startCol, pe, M, fe, A, me, 0, ve, _e, ve, _e, be, P, a), O > 0 && Ao(e, Ee, v, 1, ue, R, J, I, 0, S, ge, ye, ge, ye, N, xe, a), c || Ao(e, Te, v, se.startCol, pe, R, fe, I, me, S, ve, ye, ve, ye, be, xe, a), he.textRuns && i.onTextRun) {
4443
4443
  for (let e of he.textRuns.owned.values()) i.onTextRun(e);
4444
4444
  for (let [e, t] of he.textRuns.foreign) he.textRuns.owned.has(e) || i.onTextRun(t);
4445
4445
  }
4446
- as(e, t, C, w, i.loadedImages, s, y, b, x, S, ve, ye, be, xe, t.rightToLeft === !0, d, i.threeD, i.regionMap, i.chartEx, a), !c && t.slicers && t.slicers.length > 0 && Gs(e, t, C, w, s, y, b, x, S, ve, ye, be, xe, t.rightToLeft === !0, d), c || is(e, d, f, y, b, _, v, L, R, F, I, x, S, j, M, k, A, N, P, m, h, s, o, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0, i.chromeColors);
4446
+ as(e, t, C, w, i.loadedImages, s, v, b, x, S, ve, ye, be, xe, t.rightToLeft === !0, d, i.threeD, i.regionMap, i.chartEx, a), !c && t.slicers && t.slicers.length > 0 && Gs(e, t, C, w, s, v, b, x, S, ve, ye, be, xe, t.rightToLeft === !0, d), c || is(e, d, f, v, b, g, _, L, R, F, I, x, S, j, M, k, A, N, P, m, h, s, o, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0, i.chromeColors);
4447
4447
  let De = t.rightToLeft === !0;
4448
4448
  if (D > 0) {
4449
4449
  e.save(), e.strokeStyle = Ma, e.lineWidth = .5, e.beginPath();
4450
- let t = ye + g(ye, .5, o);
4450
+ let t = ye + y(ye, .5, o);
4451
4451
  e.moveTo(0, t), e.lineTo(d, t), e.stroke(), e.restore();
4452
4452
  }
4453
4453
  if (O > 0) {
4454
4454
  e.save(), e.strokeStyle = Ma, e.lineWidth = .5, e.beginPath();
4455
- let t = De ? d - ve : ve, n = t + g(t, .5, o);
4455
+ let t = De ? d - ve : ve, n = t + y(t, .5, o);
4456
4456
  e.moveTo(n, h), e.lineTo(n, f), e.stroke(), e.restore();
4457
4457
  }
4458
4458
  }
4459
- function is(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _, v, y, b, x, S, C, w, T, E, D) {
4460
- let O = D?.surface ?? "#f8f9fa", k = D?.mutedSurface ?? "#e8eaed", A = D?.selectedSurface ?? "#caddf6", j = D?.border ?? "#c8ccd0", M = D?.accent ?? "#5b9bd5", N = D?.text ?? "#444", P = (e) => !T || e < T.start || e > T.end ? O : T.strong ? A : k, ee = (e) => !T || e < T.start || e > T.end ? j : T.strong ? M : j, te = (e) => !w || e < w.start || e > w.end ? O : w.strong ? A : k, F = (e) => !w || e < w.start || e > w.end ? j : w.strong ? M : j, I = `${Math.max(1, Math.round(11 * S))}px ${ia}`, L = b + v, R = x + y, z = .5 / C, B = (e, n) => E ? Aa(e, n, t) : e, V = E ? t - b : 0;
4459
+ function is(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, b, x, S, C, w, T, E, D) {
4460
+ let O = D?.surface ?? "#f8f9fa", k = D?.mutedSurface ?? "#e8eaed", A = D?.selectedSurface ?? "#caddf6", j = D?.border ?? "#c8ccd0", M = D?.accent ?? "#5b9bd5", N = D?.text ?? "#444", P = (e) => !T || e < T.start || e > T.end ? O : T.strong ? A : k, ee = (e) => !T || e < T.start || e > T.end ? j : T.strong ? M : j, te = (e) => !w || e < w.start || e > w.end ? O : w.strong ? A : k, F = (e) => !w || e < w.start || e > w.end ? j : w.strong ? M : j, I = `${Math.max(1, Math.round(11 * S))}px ${ia}`, L = b + _, R = x + v, z = .5 / C, B = (e, n) => E ? Aa(e, n, t) : e, V = E ? t - b : 0;
4461
4461
  e.fillStyle = O, e.fillRect(V, 0, b, x), e.strokeStyle = j, e.lineWidth = .5, e.beginPath();
4462
- let ne = E ? V + g(V, .5, C) : V + b - z;
4462
+ let ne = E ? V + y(V, .5, C) : V + b - z;
4463
4463
  e.moveTo(ne, 0), e.lineTo(ne, x), e.moveTo(V, x - z), e.lineTo(V + b, x - z), e.stroke(), e.font = I, e.fillStyle = N;
4464
4464
  let re = (t, n, r) => {
4465
4465
  let i = B(n, r);
4466
4466
  e.fillStyle = P(t), e.fillRect(i, 0, r, x), e.strokeStyle = ee(t), e.lineWidth = .5, e.beginPath();
4467
- let a = i + g(i, .5, C);
4467
+ let a = i + y(i, .5, C);
4468
4468
  e.moveTo(a, 0), e.lineTo(a, x), e.moveTo(i, x - z), e.lineTo(i + r, x - z), e.stroke(), e.fillStyle = N, e.textAlign = "center", e.textBaseline = "middle", e.fillText(Co(t), i + r / 2, x / 2);
4469
4469
  }, H = (t, n, r) => {
4470
4470
  let i = V;
4471
4471
  e.fillStyle = te(t), e.fillRect(i, n, b, r), e.strokeStyle = F(t), e.lineWidth = .5, e.beginPath();
4472
- let a = n + g(n, .5, C), o = E ? i + g(i, .5, C) : i + b - z;
4472
+ let a = n + y(n, .5, C), o = E ? i + y(i, .5, C) : i + b - z;
4473
4473
  e.moveTo(o, n), e.lineTo(o, n + r), e.moveTo(i, a), e.lineTo(i + b, a), e.stroke(), e.fillStyle = N, e.textBaseline = "middle";
4474
4474
  let s = Math.max(2, Math.round(4 * S));
4475
4475
  E ? (e.textAlign = "left", e.fillText(String(t), i + s, n + r / 2)) : (e.textAlign = "right", e.fillText(String(t), i + b - s, n + r / 2));
4476
4476
  };
4477
4477
  if (p.length > 0) {
4478
- e.save(), e.beginPath(), e.rect(B(b, v), 0, v, x), e.clip();
4478
+ e.save(), e.beginPath(), e.rect(B(b, _), 0, _, x), e.clip();
4479
4479
  let t = b;
4480
4480
  for (let e = 0; e < p.length; e++) re(h[e], t, p[e]), t += p[e];
4481
4481
  e.restore();
@@ -4487,9 +4487,9 @@ function is(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, _, v, y, b, x, S, C,
4487
4487
  U + n > L && U < t && re(l[e], U, n), U += n;
4488
4488
  }
4489
4489
  if (e.restore(), m.length > 0) {
4490
- e.save(), e.beginPath(), e.rect(V, x, b, y), e.clip();
4490
+ e.save(), e.beginPath(), e.rect(V, x, b, v), e.clip();
4491
4491
  let t = x;
4492
- for (let e = 0; e < m.length; e++) H(_[e], t, m[e]), t += m[e];
4492
+ for (let e = 0; e < m.length; e++) H(g[e], t, m[e]), t += m[e];
4493
4493
  e.restore();
4494
4494
  }
4495
4495
  e.save(), e.beginPath(), e.rect(V, R, b, n - R), e.clip();
@@ -4597,7 +4597,7 @@ function ls(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.shapeGroups ??
4597
4597
  for (let a of g) {
4598
4598
  let { x: o, y: g, width: S, height: C } = Bi(t, a, n, r, i);
4599
4599
  if (S <= 0 || C <= 0) continue;
4600
- let w = ja(l + (o - y) - s, S, h, m), T = u + (g - b) - c, E = v ? [v] : a.shapes, D = E.some((e) => e.geom?.type === "image" && me(e.geom.blipEffects ?? []));
4600
+ let w = ja(l + (o - y) - s, S, h, m), T = u + (g - b) - c, E = v ? [v] : a.shapes, D = E.some((e) => e.geom?.type === "image" && ve(e.geom.blipEffects ?? []));
4601
4601
  if (!(!D && (w + S < x || w > x + d)) && !(!D && (T + C < u || T > u + f))) for (let t of E) {
4602
4602
  let n = w + t.x * S, r = T + t.y * C, o = t.w * S, s = t.h * C;
4603
4603
  o <= 0 || s <= 0 || fs(e, t, n, r, o, s, i, p, _, a);
@@ -4643,21 +4643,21 @@ function us(e, t, n, r, i, a) {
4643
4643
  }
4644
4644
  function ds(e, t, n, r, i, a) {
4645
4645
  if (t.geom.type === "custom") for (let o of t.geom.paths) o.fill !== "none" && us(e, o, n, r, i, a);
4646
- else (t.geom.type !== "preset" || !he(e, t.geom.name, n, r, i, a, t.geom.adj ?? [])) && e.rect(n, r, i, a);
4646
+ else (t.geom.type !== "preset" || !K(e, t.geom.name, n, r, i, a, t.geom.adj ?? [])) && e.rect(n, r, i, a);
4647
4647
  }
4648
4648
  function fs(e, t, n, r, i, a, o, s, c, l) {
4649
- if (x(t.strokeFill) && (e = F(e)), e.save(), t.rot !== 0 || t.flipH || t.flipV ? (e.translate(n + i / 2, r + a / 2), e.rotate(t.rot * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-i / 2, -a / 2)) : e.translate(n, r), t.geom.type === "custom") {
4649
+ if (C(t.strokeFill) && (e = te(e)), e.save(), t.rot !== 0 || t.flipH || t.flipV ? (e.translate(n + i / 2, r + a / 2), e.rotate(t.rot * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-i / 2, -a / 2)) : e.translate(n, r), t.geom.type === "custom") {
4650
4650
  let n = bs(e, t, i, a, o);
4651
4651
  for (let r of t.geom.paths) if (!(r.w <= 0 || r.h <= 0)) {
4652
4652
  if (e.beginPath(), us(e, r, 0, 0, i, a), r.fill !== "none" && xs(e, t, i, a, o, n)) {
4653
- let t = G(r.fill);
4653
+ let t = ie(r.fill);
4654
4654
  t && (e.fillStyle = t, e.fill());
4655
4655
  }
4656
4656
  r.stroke !== !1 && Cs(e, t, i, a, o);
4657
4657
  }
4658
4658
  } else if (t.geom.type === "preset") {
4659
4659
  let n = bs(e, t, i, a, o), r = t.strokeColor && t.strokeWidth > 0 ? () => Cs(e, t, i, a, o) : null;
4660
- le(e, t.geom.name, 0, 0, i, a, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, a), vs(e, t, i, a, o));
4660
+ U(e, t.geom.name, 0, 0, i, a, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, a), vs(e, t, i, a, o));
4661
4661
  } else if (t.geom.type === "image") {
4662
4662
  let n = t.geom, r = l ? ea(l, t) : void 0, o = Zi(n.imagePath, ta(n, r), r), c = s?.get(o), u = Gi(s, o, "tiff");
4663
4663
  if (c || u) {
@@ -4692,7 +4692,7 @@ async function gs(e, t) {
4692
4692
  if (n.length !== 0) {
4693
4693
  await t.loadMathJax();
4694
4694
  for (let e of n) if (!ps.has(e.nodes)) try {
4695
- let n = await t.mathMLToSvg(re(e.nodes, e.display)), r = await ie(n, "#000000");
4695
+ let n = await t.mathMLToSvg(ge(e.nodes, e.display)), r = await be(n, "#000000");
4696
4696
  ps.set(e.nodes, {
4697
4697
  raster: r,
4698
4698
  widthEm: n.widthEm,
@@ -4703,84 +4703,84 @@ async function gs(e, t) {
4703
4703
  } catch {}
4704
4704
  }
4705
4705
  }
4706
- function _s(t, n, r, i, a, o) {
4707
- if (r <= 0 || i <= 0 || n.paragraphs.length === 0) return;
4708
- let s = We(r, i, {
4709
- lIns: n.lIns,
4710
- rIns: n.rIns,
4711
- tIns: n.tIns,
4712
- bIns: n.bIns
4713
- }, a / e), c = s.left, l = s.width, u = s.height;
4714
- if (l <= 0 || u <= 0) return;
4715
- let d = (e, n = 1) => {
4716
- let r = (e.size > 0 ? e.size : ka) * D * a * n, i = Oa(e.fontFace, o, e.text, wa(t, e.fontFace, e.bold, e.italic), pa.get(t) === !0, void 0, Sa(t, e.fontFace));
4706
+ function _s(e, t, n, r, i, a) {
4707
+ if (n <= 0 || r <= 0 || t.paragraphs.length === 0) return;
4708
+ let l = We(n, r, {
4709
+ lIns: t.lIns,
4710
+ rIns: t.rIns,
4711
+ tIns: t.tIns,
4712
+ bIns: t.bIns
4713
+ }, i / o), u = l.left, d = l.width, f = l.height;
4714
+ if (d <= 0 || f <= 0) return;
4715
+ let p = (t, n = 1) => {
4716
+ let r = (t.size > 0 ? t.size : ka) * s * i * n, o = Oa(t.fontFace, a, t.text, wa(e, t.fontFace, t.bold, t.italic), pa.get(e) === !0, void 0, Sa(e, t.fontFace));
4717
4717
  return {
4718
- font: `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${r}px ${i}`,
4718
+ font: `${t.italic ? "italic " : ""}${t.bold ? "bold " : ""}${r}px ${o}`,
4719
4719
  px: r
4720
4720
  };
4721
4721
  };
4722
- if (n.vert === "wordArtVert" || n.vert === "wordArtVertRtl") {
4723
- let e = n.autoFit === "norm" ? n.fontScale ?? 1 : 1;
4724
- if (e === 0) return;
4725
- Nt(t, n, n.vert, s, D * a, (t, n) => {
4726
- let r = xe(n.codePointAt(0) ?? 0) ? t.fontFaceEa ?? t.fontFace : t.fontFace;
4722
+ if (t.vert === "wordArtVert" || t.vert === "wordArtVertRtl") {
4723
+ let n = t.autoFit === "norm" ? t.fontScale ?? 1 : 1;
4724
+ if (n === 0) return;
4725
+ Nt(e, t, t.vert, l, s * i, (e, t) => {
4726
+ let r = xe(t.codePointAt(0) ?? 0) ? e.fontFaceEa ?? e.fontFace : e.fontFace;
4727
4727
  return {
4728
- ...d({
4729
- ...t,
4730
- text: n,
4728
+ ...p({
4729
+ ...e,
4730
+ text: t,
4731
4731
  fontFace: r
4732
- }, e),
4732
+ }, n),
4733
4733
  face: r
4734
4734
  };
4735
- }, (n, r) => {
4736
- let i = ps.get(n.nodes);
4737
- if (!i) return;
4738
- let o = (n.fontSize ?? r) * D * a * e, s = i.widthEm * o, c = (i.ascentEm + i.descentEm) * o;
4735
+ }, (t, r) => {
4736
+ let a = ps.get(t.nodes);
4737
+ if (!a) return;
4738
+ let o = (t.fontSize ?? r) * s * i * n, c = a.widthEm * o, l = (a.ascentEm + a.descentEm) * o;
4739
4739
  return {
4740
- width: s,
4741
- height: c,
4742
- draw: (e, r) => {
4743
- s > 0 && c > 0 && t.drawImage(ae(i, n.color ?? "#000000"), e, r, s, c);
4740
+ width: c,
4741
+ height: l,
4742
+ draw: (n, r) => {
4743
+ c > 0 && l > 0 && e.drawImage(le(a, t.color ?? "#000000"), n, r, c, l);
4744
4744
  }
4745
4745
  };
4746
4746
  });
4747
4747
  return;
4748
4748
  }
4749
- let f = /* @__PURE__ */ new Map(), p = !n.paragraphs.some((e) => e.runs.some((e) => e.type === "math")), m = ua.get(t), h = gt(t);
4750
- for (let e of n.paragraphs) for (let t of e.runs) {
4751
- if (!p) break;
4749
+ let m = /* @__PURE__ */ new Map(), h = !t.paragraphs.some((e) => e.runs.some((e) => e.type === "math")), g = ua.get(e), _ = gt(e);
4750
+ for (let e of t.paragraphs) for (let t of e.runs) {
4751
+ if (!h) break;
4752
4752
  if (t.type !== "text") continue;
4753
- let e = t.fontFace ? xt(t, m?.[ft(t)], h) : void 0;
4754
- e ? f.set(t, e) : p = !1;
4755
- }
4756
- n.paragraphs.some((e) => e.runs.some((e) => e.type === "text")) || (p = !1);
4757
- let g = (e, n) => {
4758
- let r = t.font;
4759
- t.font = e;
4760
- let i = t.measureText("M").actualBoundingBoxAscent;
4761
- return t.font = r, i > 0 ? i : n * .85;
4762
- }, _ = n.wrap !== "none", v = [], y = [], b;
4763
- for (let r of n.paragraphs) {
4764
- let i = r.align || "l", o = (r.marL ?? 0) / e * a, s = (r.marR ?? 0) / e * a, c = Math.max(0, (r.indent ?? 0) / e * a), u = Math.max(0, l - o - s), m = [], h = 0;
4765
- for (let e of r.runs) {
4753
+ let e = t.fontFace ? xt(t, g ? c(g, ft(t)) : void 0, _) : void 0;
4754
+ e ? m.set(t, e) : h = !1;
4755
+ }
4756
+ t.paragraphs.some((e) => e.runs.some((e) => e.type === "text")) || (h = !1);
4757
+ let v = (t, n) => {
4758
+ let r = e.font;
4759
+ e.font = t;
4760
+ let i = e.measureText("M").actualBoundingBoxAscent;
4761
+ return e.font = r, i > 0 ? i : n * .85;
4762
+ }, y = t.wrap !== "none", b = [], x = [], S;
4763
+ for (let n of t.paragraphs) {
4764
+ let r = n.align || "l", a = (n.marL ?? 0) / o * i, c = (n.marR ?? 0) / o * i, l = Math.max(0, (n.indent ?? 0) / o * i), u = Math.max(0, d - a - c), f = [], g = 0;
4765
+ for (let e of n.runs) {
4766
4766
  if (e.type === "break") {
4767
- m.push({ type: "break" });
4767
+ f.push({ type: "break" });
4768
4768
  continue;
4769
4769
  }
4770
4770
  if (e.type === "math") {
4771
4771
  let t = ps.get(e.nodes);
4772
4772
  if (!t) continue;
4773
- let n = (e.fontSize ?? (h || ka)) * D * a, r = t.ascentEm * n, i = t.descentEm * n, o = {
4773
+ let n = (e.fontSize ?? (g || ka)) * s * i, r = t.ascentEm * n, a = t.descentEm * n, o = {
4774
4774
  kind: "math",
4775
4775
  font: "",
4776
4776
  color: e.color ?? "#000000",
4777
4777
  pxSize: n,
4778
4778
  render: t,
4779
4779
  ascent: r,
4780
- descent: i,
4780
+ descent: a,
4781
4781
  display: e.display === !0
4782
4782
  };
4783
- m.push({
4783
+ f.push({
4784
4784
  type: "object",
4785
4785
  width: t.widthEm * n,
4786
4786
  style: o,
@@ -4789,9 +4789,9 @@ function _s(t, n, r, i, a, o) {
4789
4789
  });
4790
4790
  continue;
4791
4791
  }
4792
- h = e.size > 0 ? e.size : ka;
4793
- let { font: t, px: n } = d(e);
4794
- m.push({
4792
+ g = e.size > 0 ? e.size : ka;
4793
+ let { font: t, px: n } = p(e);
4794
+ f.push({
4795
4795
  type: "text",
4796
4796
  text: e.text,
4797
4797
  style: {
@@ -4800,69 +4800,69 @@ function _s(t, n, r, i, a, o) {
4800
4800
  color: e.color ?? "#000000",
4801
4801
  pxSize: n,
4802
4802
  face: e.fontFace,
4803
- ratios: p ? f.get(e) : void 0
4803
+ ratios: h ? m.get(e) : void 0
4804
4804
  }
4805
4805
  });
4806
4806
  }
4807
- let x = Ge(m, {
4808
- maxWidth: _ ? u : Infinity,
4809
- firstLineIndent: c,
4810
- measureText(e, n) {
4811
- return t.font = n.font, t.measureText(e).width;
4807
+ let _ = Ge(f, {
4808
+ maxWidth: y ? u : Infinity,
4809
+ firstLineIndent: l,
4810
+ measureText(t, n) {
4811
+ return e.font = n.font, e.measureText(t).width;
4812
4812
  },
4813
4813
  sameStyle: (e, t) => e.kind === t.kind && e.font === t.font && e.color === t.color && e.pxSize === t.pxSize,
4814
- tabStops: r.tabStops?.map((t) => ({
4815
- pos: t.pos / e * a,
4816
- algn: t.algn
4814
+ tabStops: n.tabStops?.map((e) => ({
4815
+ pos: e.pos / o * i,
4816
+ algn: e.algn
4817
4817
  })),
4818
- defaultTabSize: (r.defTabSz ?? 914400) / e * a,
4819
- tabStartPen: (e) => o + (e === 0 ? c : 0)
4820
- }), S = [], C = !1;
4821
- for (let e of m) {
4818
+ defaultTabSize: (n.defTabSz ?? 914400) / o * i,
4819
+ tabStartPen: (e) => a + (e === 0 ? l : 0)
4820
+ }), C = [], w = !1;
4821
+ for (let e of f) {
4822
4822
  if (e.type === "break") {
4823
- C = !1;
4823
+ w = !1;
4824
4824
  continue;
4825
4825
  }
4826
4826
  if (e.type === "object") {
4827
- e.display ? (S.push(!C), C = !1) : C = !0;
4827
+ e.display ? (C.push(!w), w = !1) : w = !0;
4828
4828
  continue;
4829
4829
  }
4830
4830
  if (e.text === "") {
4831
- C = !0;
4831
+ w = !0;
4832
4832
  continue;
4833
4833
  }
4834
4834
  e.text.split("\n").forEach((e, t) => {
4835
- t > 0 && (C = !1), e.replace(/\r/gu, "") !== "" && (C = !0);
4835
+ t > 0 && (w = !1), e.replace(/\r/gu, "") !== "" && (w = !0);
4836
4836
  });
4837
4837
  }
4838
- let w = 0, T = /* @__PURE__ */ new Map();
4839
- m.forEach((e, t) => {
4840
- e.type === "text" && T.set(e.style, t);
4838
+ let T = 0, E = /* @__PURE__ */ new Map();
4839
+ f.forEach((e, t) => {
4840
+ e.type === "text" && E.set(e.style, t);
4841
4841
  });
4842
- let E, O = -1, k = (e) => {
4843
- let t = T.get(e) ?? -1;
4844
- t >= O && (E = e, O = t);
4842
+ let D, O = -1, k = (e) => {
4843
+ let t = E.get(e) ?? -1;
4844
+ t >= O && (D = e, O = t);
4845
4845
  }, A = () => {
4846
- let e = E?.pxSize ?? ka * 1.3333333333333333 * a, n = E?.face;
4847
- return E?.ratios ? {
4848
- height: e * (E.ratios.ascentRatio + E.ratios.descentRatio),
4849
- ascent: e * E.ratios.ascentRatio
4846
+ let t = D?.pxSize ?? ka * 1.3333333333333333 * i, n = D?.face;
4847
+ return D?.ratios ? {
4848
+ height: t * (D.ratios.ascentRatio + D.ratios.descentRatio),
4849
+ ascent: t * D.ratios.ascentRatio
4850
4850
  } : {
4851
- height: e * 1.2,
4852
- ascent: g(`${e}px ${Oa(n, void 0, "", wa(t, n), pa.get(t) === !0, void 0, Sa(t, n))}`, e)
4851
+ height: t * 1.2,
4852
+ ascent: v(`${t}px ${Oa(n, void 0, "", wa(e, n), pa.get(e) === !0, void 0, Sa(e, n))}`, t)
4853
4853
  };
4854
- }, j = n.autoFit === "norm" ? n.lnSpcReduction ?? 0 : 0, M = ut(r.spaceLine), N = (e) => Ie(e, M, D * a, j), P = (e, t) => {
4854
+ }, j = t.autoFit === "norm" ? t.lnSpcReduction ?? 0 : 0, M = ut(n.spaceLine), N = (e) => Ie(e, M, s * i, j), P = (e, t) => {
4855
4855
  let n = je({
4856
4856
  ascent: e,
4857
4857
  descent: t
4858
- }, M, D * a, j);
4858
+ }, M, s * i, j);
4859
4859
  return {
4860
4860
  height: n.ascent + n.descent,
4861
4861
  ascent: n.ascent
4862
4862
  };
4863
- }, ee = v.length;
4864
- for (let [e, t] of x.entries()) {
4865
- let n = [], r = 0, a = 0, s = 0, l = 0, d = !1, f = !1;
4863
+ }, ee = b.length;
4864
+ for (let [e, t] of _.entries()) {
4865
+ let n = [], i = 0, o = 0, s = 0, c = 0, d = !1, p = !1;
4866
4866
  for (let e of t.segments) {
4867
4867
  if (e.type === "tab") {
4868
4868
  n.push({
@@ -4874,15 +4874,15 @@ function _s(t, n, r, i, a, o) {
4874
4874
  if (e.type === "object") {
4875
4875
  let t = e.style;
4876
4876
  if (!t.render) continue;
4877
- let i = t.ascent ?? 0, o = t.descent ?? 0;
4877
+ let r = t.ascent ?? 0, a = t.descent ?? 0;
4878
4878
  n.push({
4879
4879
  kind: "math",
4880
4880
  render: t.render,
4881
4881
  color: t.color,
4882
4882
  w: e.width,
4883
- ascent: i,
4884
- descent: o
4885
- }), r = Math.max(r, i + o), a = Math.max(a, i), d = !0, t.display && (f = !0);
4883
+ ascent: r,
4884
+ descent: a
4885
+ }), i = Math.max(i, r + a), o = Math.max(o, r), d = !0, t.display && (p = !0);
4886
4886
  continue;
4887
4887
  }
4888
4888
  let t = e.style;
@@ -4892,95 +4892,95 @@ function _s(t, n, r, i, a, o) {
4892
4892
  font: t.font,
4893
4893
  color: t.color,
4894
4894
  w: e.width
4895
- }), r = Math.max(r, t.pxSize * 1.2), a = Math.max(a, g(t.font, t.pxSize)), t.ratios && (s = Math.max(s, t.pxSize * t.ratios.ascentRatio), l = Math.max(l, t.pxSize * t.ratios.descentRatio)), k(t);
4895
+ }), i = Math.max(i, t.pxSize * 1.2), o = Math.max(o, v(t.font, t.pxSize)), t.ratios && (s = Math.max(s, t.pxSize * t.ratios.ascentRatio), c = Math.max(c, t.pxSize * t.ratios.descentRatio)), k(t);
4896
4896
  }
4897
- if (f && S[w++]) {
4897
+ if (p && C[T++]) {
4898
4898
  let e = A();
4899
- v.push({
4899
+ b.push({
4900
4900
  segs: [],
4901
- align: i,
4901
+ align: r,
4902
4902
  height: N(e.height),
4903
4903
  ascent: e.ascent,
4904
4904
  hasMath: !1,
4905
- leftInset: o,
4905
+ leftInset: a,
4906
4906
  availW: u,
4907
4907
  gapBefore: 0
4908
- }), y.push(e.height);
4908
+ }), x.push(e.height);
4909
4909
  }
4910
4910
  for (let e of t.hiddenRuns ?? []) {
4911
- let t = m[e];
4912
- t.type === "text" && (r = Math.max(r, t.style.pxSize * 1.2), a = Math.max(a, g(t.style.font, t.style.pxSize)), t.style.ratios && (s = Math.max(s, t.style.pxSize * t.style.ratios.ascentRatio), l = Math.max(l, t.style.pxSize * t.style.ratios.descentRatio)), k(t.style));
4911
+ let t = f[e];
4912
+ t.type === "text" && (i = Math.max(i, t.style.pxSize * 1.2), o = Math.max(o, v(t.style.font, t.style.pxSize)), t.style.ratios && (s = Math.max(s, t.style.pxSize * t.style.ratios.ascentRatio), c = Math.max(c, t.style.pxSize * t.style.ratios.descentRatio)), k(t.style));
4913
4913
  }
4914
- let h;
4915
- if (p) {
4916
- if (s + l === 0) {
4914
+ let m;
4915
+ if (h) {
4916
+ if (s + c === 0) {
4917
4917
  let e = A();
4918
- s = e.ascent, l = e.height - e.ascent;
4918
+ s = e.ascent, c = e.height - e.ascent;
4919
4919
  }
4920
- r = s + l, {height: h, ascent: a} = P(s, l);
4921
- } else r === 0 && ({height: r, ascent: a} = A()), h = N(r);
4922
- let _ = f;
4923
- v.push({
4920
+ i = s + c, {height: m, ascent: o} = P(s, c);
4921
+ } else i === 0 && ({height: i, ascent: o} = A()), m = N(i);
4922
+ let g = p;
4923
+ b.push({
4924
4924
  segs: n,
4925
- align: i,
4926
- height: h,
4927
- ascent: a,
4925
+ align: r,
4926
+ height: m,
4927
+ ascent: o,
4928
4928
  hasMath: d,
4929
- leftInset: _ ? o : o + (e === 0 ? c : 0),
4930
- availW: _ ? u : u - (e === 0 ? c : 0),
4929
+ leftInset: g ? a : a + (e === 0 ? l : 0),
4930
+ availW: g ? u : u - (e === 0 ? l : 0),
4931
4931
  gapBefore: 0
4932
- }), y.push(r);
4932
+ }), x.push(i);
4933
4933
  }
4934
- v.length > ee && (b && ee > 0 && (v[ee].gapBefore = Fe(ut(b.spaceAfter), b.lastNaturalHeight, D * a) + Fe(ut(r.spaceBefore), y[ee], D * a)), b = {
4935
- spaceAfter: r.spaceAfter,
4936
- lastNaturalHeight: y[v.length - 1]
4934
+ b.length > ee && (S && ee > 0 && (b[ee].gapBefore = Fe(ut(S.spaceAfter), S.lastNaturalHeight, s * i) + Fe(ut(n.spaceBefore), x[ee], s * i)), S = {
4935
+ spaceAfter: n.spaceAfter,
4936
+ lastNaturalHeight: x[b.length - 1]
4937
4937
  });
4938
4938
  }
4939
- let x = (e) => Number(/(\d+(?:\.\d+)?)px/u.exec(e)?.[1] ?? 0), S = (e) => {
4940
- let n = t.font, r = t.textBaseline;
4941
- t.font = e.font, t.textBaseline = "alphabetic";
4942
- let i = t.measureText(e.text).actualBoundingBoxAscent;
4943
- t.textBaseline = "middle";
4944
- let a = t.measureText(e.text).actualBoundingBoxAscent;
4945
- t.font = n, t.textBaseline = r;
4939
+ let C = (e) => Number(/(\d+(?:\.\d+)?)px/u.exec(e)?.[1] ?? 0), w = (t) => {
4940
+ let n = e.font, r = e.textBaseline;
4941
+ e.font = t.font, e.textBaseline = "alphabetic";
4942
+ let i = e.measureText(t.text).actualBoundingBoxAscent;
4943
+ e.textBaseline = "middle";
4944
+ let a = e.measureText(t.text).actualBoundingBoxAscent;
4945
+ e.font = n, e.textBaseline = r;
4946
4946
  let o = i - a;
4947
4947
  return Number.isFinite(o) ? o : 0;
4948
- }, C = v.reduce((e, t) => e + t.gapBefore + t.height, 0), w = ze(n.anchor, s, C);
4949
- for (let e of v) {
4950
- w += e.gapBefore;
4951
- let n = e.segs.reduce((e, t) => e + t.w, 0), r = c + e.leftInset, i = Ve(e.align, r, e.availW, n), a = e.segs.map((e) => ({
4948
+ }, T = b.reduce((e, t) => e + t.gapBefore + t.height, 0), E = ze(t.anchor, l, T);
4949
+ for (let t of b) {
4950
+ E += t.gapBefore;
4951
+ let n = t.segs.reduce((e, t) => e + t.w, 0), r = u + t.leftInset, i = Ve(t.align, r, t.availW, n), a = t.segs.map((e) => ({
4952
4952
  type: "object",
4953
4953
  style: e,
4954
4954
  width: e.w
4955
4955
  }));
4956
- if (e.hasMath) {
4957
- t.textBaseline = "alphabetic";
4958
- let n = w + e.ascent;
4959
- nt(a, i, n, (e, r) => {
4960
- let i = e.style;
4961
- if (i.kind === "text") t.font = i.font, t.fillStyle = i.color, t.fillText(i.text, r, n);
4956
+ if (t.hasMath) {
4957
+ e.textBaseline = "alphabetic";
4958
+ let n = E + t.ascent;
4959
+ nt(a, i, n, (t, r) => {
4960
+ let i = t.style;
4961
+ if (i.kind === "text") e.font = i.font, e.fillStyle = i.color, e.fillText(i.text, r, n);
4962
4962
  else if (i.kind === "math") {
4963
- let e = ae(i.render, i.color);
4964
- t.drawImage(e, r, n - i.ascent, i.w, i.ascent + i.descent);
4963
+ let t = le(i.render, i.color);
4964
+ e.drawImage(t, r, n - i.ascent, i.w, i.ascent + i.descent);
4965
4965
  }
4966
4966
  });
4967
- } else if (p) {
4968
- t.textBaseline = "alphabetic";
4969
- let n = w + e.ascent;
4970
- nt(a, i, n, (e, r) => {
4971
- let i = e.style;
4972
- i.kind === "text" && (t.font = i.font, t.fillStyle = i.color, t.fillText(i.text, r, n));
4967
+ } else if (h) {
4968
+ e.textBaseline = "alphabetic";
4969
+ let n = E + t.ascent;
4970
+ nt(a, i, n, (t, r) => {
4971
+ let i = t.style;
4972
+ i.kind === "text" && (e.font = i.font, e.fillStyle = i.color, e.fillText(i.text, r, n));
4973
4973
  });
4974
4974
  } else {
4975
- let n = w + e.height / 2, r = e.segs.filter((e) => e.kind === "text"), o = r.reduce((e, t) => !e || x(t.font) > x(e.font) ? t : e, void 0), s = o && r.some((e) => e.font !== o.font) ? n + S(o) : void 0;
4976
- t.textBaseline = s === void 0 ? "middle" : "alphabetic";
4975
+ let n = E + t.height / 2, r = t.segs.filter((e) => e.kind === "text"), o = r.reduce((e, t) => !e || C(t.font) > C(e.font) ? t : e, void 0), s = o && r.some((e) => e.font !== o.font) ? n + w(o) : void 0;
4976
+ e.textBaseline = s === void 0 ? "middle" : "alphabetic";
4977
4977
  let c = s ?? n;
4978
- nt(a, i, c, (e, n) => {
4979
- let r = e.style;
4980
- r.kind === "text" && (t.font = r.font, t.fillStyle = r.color, t.fillText(r.text, n, c));
4978
+ nt(a, i, c, (t, n) => {
4979
+ let r = t.style;
4980
+ r.kind === "text" && (e.font = r.font, e.fillStyle = r.color, e.fillText(r.text, n, c));
4981
4981
  });
4982
4982
  }
4983
- w += e.height;
4983
+ E += t.height;
4984
4984
  }
4985
4985
  }
4986
4986
  function vs(e, t, n, r, i) {
@@ -5002,7 +5002,7 @@ function bs(e, t, n, r, i) {
5002
5002
  return ee(t.fill ?? (t.fillColor ? {
5003
5003
  fillType: "solid",
5004
5004
  color: t.fillColor
5005
- } : null), e, 0, 0, n, r, t.rot, D * i, ys(t, n, r), (e, n, r, i, a) => ds(e, t, n, r, i, a));
5005
+ } : null), e, 0, 0, n, r, t.rot, s * i, ys(t, n, r), (e, n, r, i, a) => ds(e, t, n, r, i, a));
5006
5006
  }
5007
5007
  function xs(e, t, n, r, i, a = bs(e, t, n, r, i)) {
5008
5008
  return a ? (e.fillStyle = a, e.fill(), !0) : !1;
@@ -5023,14 +5023,14 @@ function Ss(e) {
5023
5023
  ...e.strokeTailEnd ? { tailEnd: e.strokeTailEnd } : {}
5024
5024
  };
5025
5025
  }
5026
- function Cs(t, n, r, i, a) {
5027
- let o = Ss(n);
5028
- if (o) {
5029
- if (N(t, o, 1 / e), o.fill) {
5030
- let e = ee(o.fill, t, 0, 0, r, i, n.rot, D * a, ys(n, r, i), void 0, T(t));
5031
- e && (t.strokeStyle = e);
5026
+ function Cs(e, t, n, r, i) {
5027
+ let a = Ss(t);
5028
+ if (a) {
5029
+ if (P(e, a, 1 / o), a.fill) {
5030
+ let o = ee(a.fill, e, 0, 0, n, r, t.rot, s * i, ys(t, n, r), void 0, E(e));
5031
+ o && (e.strokeStyle = o);
5032
5032
  }
5033
- t.stroke();
5033
+ e.stroke();
5034
5034
  }
5035
5035
  }
5036
5036
  function ws(e, t, n, r, i, a, o) {
@@ -5126,7 +5126,7 @@ function Ds(e, t, n, r, i, a, o = 1) {
5126
5126
  ];
5127
5127
  for (let { edge: c, x1: l, y1: u, x2: d, y2: f, kind: p } of s) {
5128
5128
  if (!c || !c.style || c.style === "none") continue;
5129
- let s = c.color ? b(c.color) : "#000000";
5129
+ let s = c.color ? S(c.color) : "#000000";
5130
5130
  if (c.style === "double" && p === "d") {
5131
5131
  e.strokeStyle = s, e.lineWidth = 1, e.setLineDash([]);
5132
5132
  let t = d - l, n = f - u, r = Math.hypot(t, n), i = -n / r * 1, a = t / r * 1;
@@ -5149,8 +5149,8 @@ function Ds(e, t, n, r, i, a, o = 1) {
5149
5149
  e.lineWidth = m;
5150
5150
  let h = ks(c.style);
5151
5151
  e.setLineDash(h);
5152
- let _ = p === "v" ? g(l, m, o) : 0, v = p === "h" ? g(u, m, o) : 0;
5153
- e.moveTo(l + _, u + v), e.lineTo(d + _, f + v), e.stroke(), e.setLineDash([]);
5152
+ let g = p === "v" ? y(l, m, o) : 0, _ = p === "h" ? y(u, m, o) : 0;
5153
+ e.moveTo(l + g, u + _), e.lineTo(d + g, f + _), e.stroke(), e.setLineDash([]);
5154
5154
  }
5155
5155
  }
5156
5156
  function Os(e) {
@@ -5166,7 +5166,7 @@ function Os(e) {
5166
5166
  }
5167
5167
  }
5168
5168
  function ks(e) {
5169
- return r(e);
5169
+ return t(e);
5170
5170
  }
5171
5171
  function As(e) {
5172
5172
  switch (e) {
@@ -5190,37 +5190,37 @@ function js(e, t) {
5190
5190
  let n = As(e?.style), r = As(t?.style);
5191
5191
  return n === 0 && r === 0 ? null : n >= r ? e ?? null : t ?? null;
5192
5192
  }
5193
- function Ms(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = n.charts, v, y, b) {
5194
- if (f <= 0 || p <= 0) return;
5195
- let x = os(r, s), S = ss(i, o), C = ja(u, f, h, m);
5196
- for (let n of _) {
5197
- let o = n.fromCol + 1, s = n.fromRow + 1, _ = n.toCol + 1, w = n.toRow + 1, T = os(r, o) + n.fromColOff * a / e, E = ss(i, s) + n.fromRowOff * a / e, O = os(r, _) + n.toColOff * a / e, k = ss(i, w) + n.toRowOff * a / e, A = O - T, j = k - E;
5193
+ function Ms(e, t, n, r, i, a, c, l, u, d, f, p, m, h, g, _, v = t.charts, y, b, x) {
5194
+ if (p <= 0 || m <= 0) return;
5195
+ let S = os(n, c), C = ss(r, a), w = ja(d, p, g, h);
5196
+ for (let t of v) {
5197
+ let a = t.fromCol + 1, c = t.fromRow + 1, v = t.toCol + 1, T = t.toRow + 1, E = os(n, a) + t.fromColOff * i / o, D = ss(r, c) + t.fromRowOff * i / o, O = os(n, v) + t.toColOff * i / o, k = ss(r, T) + t.toRowOff * i / o, A = O - E, j = k - D;
5198
5198
  if (A <= 0 || j <= 0) continue;
5199
- let M = ja(u + (T - x) - c, A, h, m), N = d + (E - S) - l;
5200
- M + A < C || M > C + f || N + j < d || N > d + p || (t.save(), t.beginPath(), t.rect(C, d, f, p), t.clip(), t.save(), a !== 1 && t.scale(a, a), De(t, n.chart, a === 1 ? {
5199
+ let M = ja(d + (E - S) - l, A, g, h), N = f + (D - C) - u;
5200
+ M + A < w || M > w + p || N + j < f || N > f + m || (e.save(), e.beginPath(), e.rect(w, f, p, m), e.clip(), e.save(), i !== 1 && e.scale(i, i), De(e, t.chart, i === 1 ? {
5201
5201
  x: M,
5202
5202
  y: N,
5203
5203
  w: A,
5204
5204
  h: j
5205
5205
  } : {
5206
- x: M / a,
5207
- y: N / a,
5208
- w: A / a,
5209
- h: j / a
5210
- }, D, 0, v, y, g ? R(g) : void 0, b), t.restore(), t.restore());
5206
+ x: M / i,
5207
+ y: N / i,
5208
+ w: A / i,
5209
+ h: j / i
5210
+ }, s, 0, y, b, _ ? F(_) : void 0, x), e.restore(), e.restore());
5211
5211
  }
5212
5212
  }
5213
5213
  var Ns = "600 12px \"Meiryo UI\", \"Segoe UI\", sans-serif", Ps = "11px \"Meiryo UI\", \"Segoe UI\", sans-serif", Fs = "#FFFFFF", Is = "#BFBFBF", Ls = "#F2F2F2", Rs = "#404040", zs = "#FFFFFF", Bs = "#000000", Vs = "#A5A5A5", Hs = "#E7E6E6", Us = "#A6A6A6", Ws = "#C6C6C6";
5214
- function Gs(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
5214
+ function Gs(e, t, n, r, i, a, s, c, l, u, d, f, p, m, h) {
5215
5215
  if (f <= 0 || p <= 0) return;
5216
- let g = n.slicers;
5216
+ let g = t.slicers;
5217
5217
  if (!g) return;
5218
- let _ = os(r, s), v = ss(i, o), y = ja(u, f, h, m);
5219
- for (let n of g) {
5220
- let o = n.fromCol + 1, s = n.fromRow + 1, g = n.toCol + 1, b = n.toRow + 1, x = os(r, o) + n.fromColOff * a / e, S = ss(i, s) + n.fromRowOff * a / e, C = os(r, g) + n.toColOff * a / e, w = ss(i, b) + n.toRowOff * a / e, T = C - x, E = w - S;
5218
+ let _ = os(n, s), v = ss(r, a), y = ja(u, f, h, m);
5219
+ for (let t of g) {
5220
+ let a = t.fromCol + 1, s = t.fromRow + 1, g = t.toCol + 1, b = t.toRow + 1, x = os(n, a) + t.fromColOff * i / o, S = ss(r, s) + t.fromRowOff * i / o, C = os(n, g) + t.toColOff * i / o, w = ss(r, b) + t.toRowOff * i / o, T = C - x, E = w - S;
5221
5221
  if (T <= 0 || E <= 0) continue;
5222
5222
  let D = ja(u + (x - _) - c, T, h, m), O = d + (S - v) - l;
5223
- D + T < y || D > y + f || O + E < d || O > d + p || (t.save(), t.beginPath(), t.rect(y, d, f, p), t.clip(), Ks(t, n.caption, n.items, D, O, T, E, a, n.style), t.restore());
5223
+ D + T < y || D > y + f || O + E < d || O > d + p || (e.save(), e.beginPath(), e.rect(y, d, f, p), e.clip(), Ks(e, t.caption, t.items, D, O, T, E, i, t.style), e.restore());
5224
5224
  }
5225
5225
  }
5226
5226
  function Ks(e, t, n, r, i, a, o, s, c) {