@silurus/ooxml 0.87.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/render-worker-1uPAxMZr.js +31 -0
- package/dist/assets/render-worker-BlvJybji.js +10 -0
- package/dist/assets/render-worker-CzmiJfFL.js +11 -0
- package/dist/{canvas-viewer-mechanics-Cpk0YFvM.js → canvas-viewer-mechanics-DbLz0rYW.js} +2 -2
- package/dist/chart-ex.mjs +581 -616
- package/dist/{comment-ui-runtime-BfE7MJZn.js → comment-ui-runtime-CWGqn5Vr.js} +1 -1
- package/dist/{document-pull-client-yKxI8aDH.js → document-pull-client-B9PTM-pL.js} +3824 -3795
- package/dist/{docx-BkSRiy07.js → docx-BF9WXrYH.js} +428 -320
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CBUQJsIM.js → dom-interaction-boundary-Cnm8DSBN.js} +2 -2
- package/dist/{hyperlink-ArrU3ArU.js → hyperlink-Cxzhet30.js} +93 -94
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-Dtudnqhs.js → line-distribute-D1WNHKz_.js} +2 -2
- package/dist/node.mjs +8 -8
- package/dist/plot-area-frame-DLTYKHNP.js +4354 -0
- package/dist/{pptx-62MmVbYB.js → pptx-DkyYBYoL.js} +13 -11
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +4 -4
- package/dist/{render-8Zo7dnds.js → render-D3iqVKCo.js} +1 -1
- package/dist/{render-worker-host-BfbnEChF.js → render-worker-host-B5wQfB7U.js} +1 -1
- package/dist/{render-worker-host-DNL9dWRh.js → render-worker-host-D4123J27.js} +1 -1
- package/dist/{render-worker-host-IkHrYOci.js → render-worker-host-Di3LxLc0.js} +1 -1
- package/dist/renderer-B4GZb5We.js +6492 -0
- package/dist/{resource-measurement-CJsgolre.js → resource-measurement-SHQCbkh2.js} +3 -3
- package/dist/{session-CrU8f8DI.js → session-BGq81gRQ.js} +2 -2
- package/dist/{slide-pull-client-B9KA8bU6.js → slide-pull-client-DiPnm240.js} +46 -46
- package/dist/{three-d-YYghQndN.js → three-d-DJBl8g8M.js} +251 -435
- package/dist/three-d.mjs +998 -906
- package/dist/tiff.mjs +1 -1
- package/dist/types/chart-ex.d.ts +142 -4
- package/dist/types/docx.d.ts +148 -10
- package/dist/types/index.d.ts +122 -16
- package/dist/types/node.d.ts +113 -7
- package/dist/types/pptx.d.ts +116 -10
- package/dist/types/region-map.d.ts +142 -4
- package/dist/types/three-d.d.ts +142 -4
- package/dist/types/xlsx.d.ts +148 -10
- package/dist/{worksheet-pull-client-eIcQ-xlD.js → worksheet-pull-client-BM8ywvbu.js} +2 -2
- package/dist/{xlsx-CRcSzZNq.js → xlsx-C9NVjgaV.js} +122 -120
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-CeK_iqK3.js +0 -10
- package/dist/assets/render-worker-DusrDhPk.js +0 -11
- package/dist/assets/render-worker-n2ZG0lrQ.js +0 -31
- package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
- package/dist/renderer-XFSCOT6m.js +0 -5857
- /package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-9P63Bsk5.js} +0 -0
- /package/dist/{units-EJdC96r6.js → units-BzZ0gAxs.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { at as e, dt as t, mt as n, pt as r, vt as i } from "./hyperlink-
|
|
2
|
-
import {
|
|
3
|
-
import { i as o } from "./pixel-budget-
|
|
1
|
+
import { at as e, dt as t, mt as n, pt as r, vt as i } from "./hyperlink-Cxzhet30.js";
|
|
2
|
+
import { wt as a } from "./plot-area-frame-DLTYKHNP.js";
|
|
3
|
+
import { i as o } from "./pixel-budget-9P63Bsk5.js";
|
|
4
4
|
import { r as s } from "./raster-target-ojDdQizC.js";
|
|
5
5
|
//#region packages/core/src/image/duotone-bitmap-by-path.ts
|
|
6
6
|
function c(e, t) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
-
import { F as t, G as n, H as r, J as i, K as a, L as o, N as s, P as c, Qt as l, U as u, V as d, W as f, X as p, Y as m, Z as h, un as g, z as _ } from "./hyperlink-
|
|
3
|
-
import { a as v, l as y } from "./slide-pull-client-
|
|
2
|
+
import { F as t, G as n, H as r, J as i, K as a, L as o, N as s, P as c, Qt as l, U as u, V as d, W as f, X as p, Y as m, Z as h, un as g, z as _ } from "./hyperlink-Cxzhet30.js";
|
|
3
|
+
import { a as v, l as y } from "./slide-pull-client-DiPnm240.js";
|
|
4
4
|
import { t as b } from "./transfer-p6iCC2R7.js";
|
|
5
5
|
//#region packages/pptx/src/slide-cursor-operation.ts
|
|
6
6
|
function x(e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as e, A as t, At as n, Bt as r, C as i, Ct as a, D as o, Dt as s, E as c, Ft as l, Gt as u, Ht as d, It as f, Kt as p, Lt as m, M as h, Mt as g, Nt as _, Pt as v, Q as y, Qt as b, Rt as x, S, St as C, Tt as w, Ut as T, Vt as E, Wt as D, Zt as O, _ as k, a as A, b as j, bt as M, c as N, ct as P, d as F, et as I, f as L, gt as R, h as z, ht as B, it as V, j as H, jt as U, k as W, kt as G, l as ee, m as K, n as q, nt as J, o as te, p as ne, pt as re, q as ie, rt as ae, st as oe, t as se, tt as ce, u as le, un as ue, ut as de, wt as fe, x as pe, xt as me, yt as he, zt as ge } from "./hyperlink-
|
|
2
|
-
import { a as _e, c as ve, d as ye, f as be, i as xe, l as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe } from "./line-distribute-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { $ as e, A as t, At as n, Bt as r, C as i, Ct as a, D as o, Dt as s, E as c, Ft as l, Gt as u, Ht as d, It as f, Kt as p, Lt as m, M as h, Mt as g, Nt as _, Pt as v, Q as y, Qt as b, Rt as x, S, St as C, Tt as w, Ut as T, Vt as E, Wt as D, Zt as O, _ as k, a as A, b as j, bt as M, c as N, ct as P, d as F, et as I, f as L, gt as R, h as z, ht as B, it as V, j as H, jt as U, k as W, kt as G, l as ee, m as K, n as q, nt as J, o as te, p as ne, pt as re, q as ie, rt as ae, st as oe, t as se, tt as ce, u as le, un as ue, ut as de, wt as fe, x as pe, xt as me, yt as he, zt as ge } from "./hyperlink-Cxzhet30.js";
|
|
2
|
+
import { a as _e, c as ve, d as ye, f as be, i as xe, l as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe } from "./line-distribute-D1WNHKz_.js";
|
|
3
|
+
import { Ct as ke, Et as Ae, Pt as je, Tt as Me, a as Ne, at as Pe, bt as Fe, c as Ie, gt as Le, ht as Re, it as ze, l as Be, lt as Ve, n as He, ot as Ue, pt as We, rt as Ge } from "./plot-area-frame-DLTYKHNP.js";
|
|
4
|
+
import { r as Y } from "./units-BzZ0gAxs.js";
|
|
5
|
+
import { l as Ke } from "./pixel-budget-9P63Bsk5.js";
|
|
6
|
+
import { j as qe } from "./renderer-B4GZb5We.js";
|
|
7
|
+
import { D as Je, E as Ye, O as Xe } from "./three-d-DJBl8g8M.js";
|
|
8
8
|
import { s as Ze } from "./raster-target-ojDdQizC.js";
|
|
9
|
-
import { a as Qe, i as $e, n as et, t as tt } from "./resource-measurement-
|
|
9
|
+
import { a as Qe, i as $e, n as et, t as tt } from "./resource-measurement-SHQCbkh2.js";
|
|
10
10
|
var nt = {
|
|
11
11
|
textarchdown: {
|
|
12
12
|
adj: [["adj", "val 0"]],
|
|
@@ -3100,7 +3100,7 @@ function en(e, t, n, r, i, a, o, s = 1) {
|
|
|
3100
3100
|
e.beginPath(), e.moveTo(t, i + y(i, l, s)), e.lineTo(t + r, i + y(i, l, s)), e.moveTo(t, a + y(a, l, s)), e.lineTo(t + r, a + y(a, l, s)), e.stroke();
|
|
3101
3101
|
return;
|
|
3102
3102
|
}
|
|
3103
|
-
e.setLineDash(
|
|
3103
|
+
e.setLineDash(Fe(o ?? "sng", l)), e.beginPath(), e.moveTo(t, u + d), e.lineTo(t + r, u + d), e.stroke(), e.setLineDash([]);
|
|
3104
3104
|
}
|
|
3105
3105
|
//#endregion
|
|
3106
3106
|
//#region packages/core/src/text/highlight-box.ts
|
|
@@ -3459,7 +3459,7 @@ function X(e, t) {
|
|
|
3459
3459
|
return e * t;
|
|
3460
3460
|
}
|
|
3461
3461
|
function In(e, t, n, r) {
|
|
3462
|
-
let i =
|
|
3462
|
+
let i = Ae(Math.abs(e * n), Math.abs(t * n), r);
|
|
3463
3463
|
return i ? {
|
|
3464
3464
|
targetWidthPx: i.width,
|
|
3465
3465
|
targetHeightPx: i.height
|
|
@@ -3525,8 +3525,8 @@ async function Bn(e, t, n, r, i, a, o, s, c, l) {
|
|
|
3525
3525
|
targetWidthPx: X(t.width, r) * i,
|
|
3526
3526
|
targetHeightPx: X(t.height, r) * i
|
|
3527
3527
|
};
|
|
3528
|
-
for (let n of
|
|
3529
|
-
let t = n.fill, r =
|
|
3528
|
+
for (let n of Ie(t.chart)) {
|
|
3529
|
+
let t = n.fill, r = Ne(n, e);
|
|
3530
3530
|
!(t.mimeType === "image/svg+xml" || V({
|
|
3531
3531
|
svgImagePath: t.svgImagePath,
|
|
3532
3532
|
srcRect: n.hasSourceCrop ? !0 : null
|
|
@@ -3550,15 +3550,15 @@ async function Bn(e, t, n, r, i, a, o, s, c, l) {
|
|
|
3550
3550
|
return d.push(...(await Promise.all(f)).filter((e) => e !== null)), me(d, u);
|
|
3551
3551
|
}
|
|
3552
3552
|
function Vn(e) {
|
|
3553
|
-
return e.background?.fillType === "image" ? !0 : e.elements.some((e) => e.type === "picture" ? !0 : e.type === "media" ? !!e.posterPath : e.type === "chart" ?
|
|
3553
|
+
return e.background?.fillType === "image" ? !0 : e.elements.some((e) => e.type === "picture" ? !0 : e.type === "media" ? !!e.posterPath : e.type === "chart" ? Ie(e.chart).length > 0 : e.type === "shape" && !!e.textBody?.paragraphs.some((e) => un(e.bullet).type === "blip"));
|
|
3554
3554
|
}
|
|
3555
|
-
var Q =
|
|
3555
|
+
var Q = Re;
|
|
3556
3556
|
function Hn(e, t, n, r, i, a, o) {
|
|
3557
3557
|
let { top: s, height: c } = tn(n, i);
|
|
3558
3558
|
e.fillStyle = a, e.fillRect(t, s, r, c), e.fillStyle = o;
|
|
3559
3559
|
}
|
|
3560
3560
|
function Un(e, t, n, r, i, a, o = 0) {
|
|
3561
|
-
return
|
|
3561
|
+
return Le(e, t, n, r, i, a, o);
|
|
3562
3562
|
}
|
|
3563
3563
|
var Wn = /* @__PURE__ */ new WeakMap();
|
|
3564
3564
|
function Gn(e, t) {
|
|
@@ -3651,12 +3651,12 @@ function rr(e) {
|
|
|
3651
3651
|
return /\b(thin|hairline)\b/.test(t) ? 100 : /\b(extra[- ]?light|ultra[- ]?light)\b/.test(t) ? 200 : /\blight\b/.test(t) ? 300 : /\b(black|heavy)\b/.test(t) ? 900 : /\b(extra[- ]?bold|ultra[- ]?bold)\b/.test(t) ? 800 : /\b(semi[- ]?bold|demi[- ]?bold)\b/.test(t) ? 600 : /\bbold\b/.test(t) ? 700 : /\bmedium\b/.test(t) ? 600 : null;
|
|
3652
3652
|
}
|
|
3653
3653
|
function ir(e, t, n, r, i, a, o, s) {
|
|
3654
|
-
let c = Math.max(0, r.blur * i), l = Math.ceil(c * 3) + 2, u = Math.max(0, Math.floor(n.x - l)), d = Math.max(0, Math.floor(n.y - l)), f = Math.min(o, Math.ceil(n.x + n.w + l)), p = Math.min(s, Math.ceil(n.y + n.h + l)), m = Math.max(1, f - u), h = Math.max(1, p - d), g =
|
|
3654
|
+
let c = Math.max(0, r.blur * i), l = Math.ceil(c * 3) + 2, u = Math.max(0, Math.floor(n.x - l)), d = Math.max(0, Math.floor(n.y - l)), f = Math.min(o, Math.ceil(n.x + n.w + l)), p = Math.min(s, Math.ceil(n.y + n.h + l)), m = Math.max(1, f - u), h = Math.max(1, p - d), g = je(m, h), _ = g?.getContext("2d");
|
|
3655
3655
|
if (!g || !_) return;
|
|
3656
3656
|
_.save(), _.setTransform(a.a, a.b, a.c, a.d, a.e - u, a.f - d), t(_), _.restore();
|
|
3657
3657
|
let v = n.y - d, y = v + n.h, b = g, x = _;
|
|
3658
3658
|
if (c > 0) {
|
|
3659
|
-
let e =
|
|
3659
|
+
let e = je(m, h), t = e?.getContext("2d");
|
|
3660
3660
|
e && t && (b = e, x = t);
|
|
3661
3661
|
}
|
|
3662
3662
|
b !== g && pn(x, g, {
|
|
@@ -4115,7 +4115,7 @@ async function Sr(e, t, n, r, i, o, s, c, l, u) {
|
|
|
4115
4115
|
svgDecoder: l
|
|
4116
4116
|
});
|
|
4117
4117
|
if (o() || !x) return;
|
|
4118
|
-
e.save(), e.beginPath(), e.rect(0, 0, n, r), e.clip(), t.alpha != null && (e.globalAlpha = t.alpha), t.tile ? Er(e, x, t.tile, n, r, i, t.srcRect, b?.dimensions ?? void 0) :
|
|
4118
|
+
e.save(), e.beginPath(), e.rect(0, 0, n, r), e.clip(), t.alpha != null && (e.globalAlpha = t.alpha), t.tile ? Er(e, x, t.tile, n, r, i, t.srcRect, b?.dimensions ?? void 0) : ke(e, x, t.srcRect, h, g, _, v), e.restore();
|
|
4119
4119
|
} catch (t) {
|
|
4120
4120
|
if (C(t, "tiff")) {
|
|
4121
4121
|
a(e, "tiff", {
|
|
@@ -4126,7 +4126,7 @@ async function Sr(e, t, n, r, i, o, s, c, l, u) {
|
|
|
4126
4126
|
});
|
|
4127
4127
|
return;
|
|
4128
4128
|
}
|
|
4129
|
-
if (
|
|
4129
|
+
if (Ke(t) || Ze(t)) throw t;
|
|
4130
4130
|
}
|
|
4131
4131
|
return;
|
|
4132
4132
|
}
|
|
@@ -4151,12 +4151,12 @@ function Tr(e, t, n) {
|
|
|
4151
4151
|
function Er(e, t, n, r, i, a, o, s) {
|
|
4152
4152
|
let c = Tr(s?.width ?? t.width, s?.height ?? t.height, o), l = c.width * Cr * (n.sx ?? 1) * a, u = c.height * Cr * (n.sy ?? 1) * a;
|
|
4153
4153
|
if (!(l > 0) || !(u > 0)) return;
|
|
4154
|
-
let d = n.flip === "x" || n.flip === "xy", f = n.flip === "y" || n.flip === "xy", p =
|
|
4154
|
+
let d = n.flip === "x" || n.flip === "xy", f = n.flip === "y" || n.flip === "xy", p = je(l * (d ? 2 : 1), u * (f ? 2 : 1));
|
|
4155
4155
|
if (!p) return;
|
|
4156
4156
|
let m = p.getContext("2d");
|
|
4157
4157
|
if (!m) return;
|
|
4158
4158
|
let h = (e, n, r, i) => {
|
|
4159
|
-
m.save(), m.translate(e + (r ? l : 0), n + (i ? u : 0)), m.scale(r ? -1 : 1, i ? -1 : 1),
|
|
4159
|
+
m.save(), m.translate(e + (r ? l : 0), n + (i ? u : 0)), m.scale(r ? -1 : 1, i ? -1 : 1), ke(m, t, o, 0, 0, l, u), m.restore();
|
|
4160
4160
|
};
|
|
4161
4161
|
h(0, 0, !1, !1), d && h(l, 0, !0, !1), f && h(0, u, !1, !0), d && f && h(l, u, !0, !0);
|
|
4162
4162
|
let g = e.createPattern(p, "repeat");
|
|
@@ -4220,7 +4220,7 @@ function Pr(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m) {
|
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
4222
|
if (!(I > P && L > F)) return;
|
|
4223
|
-
let R = Math.floor(P - 2), z = Math.floor(F - 2), B =
|
|
4223
|
+
let R = Math.floor(P - 2), z = Math.floor(F - 2), B = je(Math.ceil(I + 2) - R, Math.ceil(L + 2) - z), V = B ? B.getContext("2d") : null;
|
|
4224
4224
|
if (!B || !V) {
|
|
4225
4225
|
A(e, m);
|
|
4226
4226
|
return;
|
|
@@ -4415,7 +4415,7 @@ function qr(e, t, n, r, i, a) {
|
|
|
4415
4415
|
return Kr(e, t + o * r, n + s * i);
|
|
4416
4416
|
}
|
|
4417
4417
|
function Jr(e, t, n, r, i, a, o, s) {
|
|
4418
|
-
let c = Tt(e, i, a).corners, l = (o > 0 ?
|
|
4418
|
+
let c = Tt(e, i, a).corners, l = (o > 0 ? Je(c, o / i, o / a) ?? c : c).map((e) => Kr(t, n + e.x, r + e.y)), u = l.map(([e]) => e), d = l.map(([, e]) => e), f = Math.min(...u), p = Math.min(...d), m = Math.max(...u), h = Math.max(...d), [g, _] = Gr[s ?? "b"], v = Xe(c, g, _);
|
|
4419
4419
|
return {
|
|
4420
4420
|
bbox: {
|
|
4421
4421
|
x: f,
|
|
@@ -4428,10 +4428,10 @@ function Jr(e, t, n, r, i, a, o, s) {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
function Yr(e, t, n, r) {
|
|
4430
4430
|
let i = Math.floor(n.x) - 1, a = Math.floor(n.y) - 1, o = Math.max(1, Math.ceil(n.x + n.w) - i + 1), s = Math.max(1, Math.ceil(n.y + n.h) - a + 1);
|
|
4431
|
-
if (r && (i + o <= 0 || a + s <= 0 || i >= r.w || a >= r.h) ||
|
|
4431
|
+
if (r && (i + o <= 0 || a + s <= 0 || i >= r.w || a >= r.h) || Ve(o, s).clamped) return e;
|
|
4432
4432
|
let c = null;
|
|
4433
4433
|
try {
|
|
4434
|
-
c =
|
|
4434
|
+
c = je(o, s);
|
|
4435
4435
|
} catch {
|
|
4436
4436
|
return e;
|
|
4437
4437
|
}
|
|
@@ -4465,7 +4465,7 @@ function Xr(e, t, n, r, i, a, o, s, c, l = !0, u = r) {
|
|
|
4465
4465
|
}, v = (e) => {
|
|
4466
4466
|
h(e), u(e);
|
|
4467
4467
|
}, y = !1;
|
|
4468
|
-
t.shadow && p ? (e.save(), e.setTransform(m), y = !
|
|
4468
|
+
t.shadow && p ? (e.save(), e.setTransform(m), y = !ze(e, g, i, t.shadow, s, d, f, Math.atan2(c.b, c.a) * 180 / Math.PI, a), e.restore()) : t.shadow && (y = !0), t.reflection && p && (e.save(), e.setTransform(m), Pe(e, g, i, t.reflection, s, d, f), e.restore()), y ? Dr(e, t.shadow ?? null, o) : t.glow && Or(e, t.glow, o), t.softEdge && p ? (e.save(), e.setTransform(m), Ue(e, g, i, t.softEdge, s, d, f, _), e.restore()) : n(e), (y || t.glow) && kr(e), t.innerShadow && l && p && (e.save(), e.setTransform(m), Ge(e, v, i, t.innerShadow, s, d, f), e.restore());
|
|
4469
4469
|
}
|
|
4470
4470
|
function Zr(e, t, n) {
|
|
4471
4471
|
if (t === n || !Number.isFinite(e)) return e;
|
|
@@ -5136,10 +5136,10 @@ function si(e, t, n, r, i, a, o, s = {}) {
|
|
|
5136
5136
|
if (i <= 0 || a <= 0) return !1;
|
|
5137
5137
|
let c = e.getTransform(), l = Math.abs(c.a * c.d - c.b * c.c), u = l > 0 ? Math.sqrt(l) : 1, d = Math.max(0, Math.ceil((s.edgePadCss ?? 0) * u)), f = Tt(t, i, a), p = f.corners;
|
|
5138
5138
|
if (d > 0) {
|
|
5139
|
-
let e = d / u, t =
|
|
5139
|
+
let e = d / u, t = Je(f.corners, e / i, e / a);
|
|
5140
5140
|
t ? p = t : d = 0;
|
|
5141
5141
|
}
|
|
5142
|
-
let m = d / u, h = Math.max(1, Math.ceil(i * u) + 2 * d), g = Math.max(1, Math.ceil(a * u) + 2 * d), _ =
|
|
5142
|
+
let m = d / u, h = Math.max(1, Math.ceil(i * u) + 2 * d), g = Math.max(1, Math.ceil(a * u) + 2 * d), _ = je(h, g);
|
|
5143
5143
|
if (!_) return !1;
|
|
5144
5144
|
let v = _.getContext("2d");
|
|
5145
5145
|
if (!v) return !1;
|
|
@@ -5155,14 +5155,14 @@ function si(e, t, n, r, i, a, o, s = {}) {
|
|
|
5155
5155
|
$t(v, s.extrusion, x(e));
|
|
5156
5156
|
}
|
|
5157
5157
|
if (s.bevels && s.bevels.length > 0) for (let e of s.bevels) Qt(v, e, x(Math.ceil(e.widthPx) + 2));
|
|
5158
|
-
return s.paintEdges && (v.save(), v.scale(u, u), v.translate(m, m), s.paintEdges(v, 0, 0, i, a), v.restore()),
|
|
5158
|
+
return s.paintEdges && (v.save(), v.scale(u, u), v.translate(m, m), s.paintEdges(v, 0, 0, i, a), v.restore()), Ye(_, e, h, g, p.map((e) => ({
|
|
5159
5159
|
x: n + e.x,
|
|
5160
5160
|
y: r + e.y
|
|
5161
5161
|
}))), !0;
|
|
5162
5162
|
}
|
|
5163
5163
|
function ci(e, t, n, r, i, a, o, s, c = 0) {
|
|
5164
5164
|
if (r <= 0 || i <= 0 || a.length === 0) return !1;
|
|
5165
|
-
let l = e.getTransform(), u = Math.abs(l.a * l.d - l.b * l.c), d = u > 0 ? Math.sqrt(u) : 1, f = Math.max(0, Math.ceil(c * d)), p = f / d, m = Math.max(1, Math.ceil(r * d) + 2 * f), h = Math.max(1, Math.ceil(i * d) + 2 * f), g =
|
|
5165
|
+
let l = e.getTransform(), u = Math.abs(l.a * l.d - l.b * l.c), d = u > 0 ? Math.sqrt(u) : 1, f = Math.max(0, Math.ceil(c * d)), p = f / d, m = Math.max(1, Math.ceil(r * d) + 2 * f), h = Math.max(1, Math.ceil(i * d) + 2 * f), g = je(m, h);
|
|
5166
5166
|
if (!g) return !1;
|
|
5167
5167
|
let _ = g.getContext("2d");
|
|
5168
5168
|
if (!_) return !1;
|
|
@@ -5214,7 +5214,7 @@ function fi(e, t, n) {
|
|
|
5214
5214
|
}
|
|
5215
5215
|
async function pi(e, t, r, i, a, o, c = 1, l, u) {
|
|
5216
5216
|
if (a) try {
|
|
5217
|
-
let d = t.mimeType === "image/svg+xml", f =
|
|
5217
|
+
let d = t.mimeType === "image/svg+xml", f = Me(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
|
|
5218
5218
|
if (!f) return;
|
|
5219
5219
|
let { widthPt: p, heightPt: m } = f, h = In(X(t.width, r), X(t.height, r), c, t.srcRect), g = V(t) || d, _ = g ? h : u && !t.duotone ? Ln(u, Z(Rn(t), g ? void 0 : t.duotone)) : void 0, v = _ && "maxRetainedPixels" in _ ? _.maxRetainedPixels : void 0, y = {
|
|
5220
5220
|
..._ ? {
|
|
@@ -5266,7 +5266,7 @@ async function pi(e, t, r, i, a, o, c = 1, l, u) {
|
|
|
5266
5266
|
e.rect(n - c, i - c, a + 2 * c, o + 2 * c), T(e, n, i, a, o), e.clip("evenodd"), e.beginPath(), E(e, n, i, a, o), e.strokeStyle = Q(s.contourClr), e.lineWidth = t * 2, e.setLineDash([]), e.stroke(), e.restore();
|
|
5267
5267
|
}
|
|
5268
5268
|
}, A = t.scene3d && Et(t.scene3d.camera) ? t.scene3d : null, j = (e, n, r, i, a) => {
|
|
5269
|
-
e.save(), D(e, n, r, i, a),
|
|
5269
|
+
e.save(), D(e, n, r, i, a), ke(e, b, t.srcRect, n, r, i, a), e.restore();
|
|
5270
5270
|
}, M = (e, t, n, r, i) => {
|
|
5271
5271
|
j(e, t, n, r, i), O(e, t, n, r, i), k(e, t, n, r, i);
|
|
5272
5272
|
}, N = (e, t, n, r, i) => {
|
|
@@ -5306,7 +5306,7 @@ async function pi(e, t, r, i, a, o, c = 1, l, u) {
|
|
|
5306
5306
|
i() || fi(e, t, r);
|
|
5307
5307
|
return;
|
|
5308
5308
|
}
|
|
5309
|
-
if (
|
|
5309
|
+
if (Ke(n) || Ze(n)) throw n;
|
|
5310
5310
|
}
|
|
5311
5311
|
}
|
|
5312
5312
|
async function mi(e, t, n, r, i, o, s, c, l = 1, u, d) {
|
|
@@ -5315,7 +5315,7 @@ async function mi(e, t, n, r, i, o, s, c, l = 1, u, d) {
|
|
|
5315
5315
|
g = await di(t, i, s, c, t.posterMimeType === "image/svg+xml" ? In(m, h, l) : d ? Ln(d, Z(t.posterPath)) : void 0, u);
|
|
5316
5316
|
} catch (e) {
|
|
5317
5317
|
if (C(e, "tiff")) _ = !0;
|
|
5318
|
-
else if (
|
|
5318
|
+
else if (Ke(e) || Ze(e)) throw e;
|
|
5319
5319
|
}
|
|
5320
5320
|
r() || (e.save(), _i(e, t, n), g ? e.drawImage(g, f, p, m, h) : (e.fillStyle = t.mediaKind === "video" ? "#111" : "#f0f0f0", e.fillRect(f, p, m, h), _ && a(e, "tiff", {
|
|
5321
5321
|
x: f,
|
|
@@ -5382,7 +5382,7 @@ function hi(e, t, n, r, i, a, o) {
|
|
|
5382
5382
|
e.restore();
|
|
5383
5383
|
}
|
|
5384
5384
|
function gi(e, t, n, r, i = 0) {
|
|
5385
|
-
if (
|
|
5385
|
+
if (We(e, t, n), t?.fill && r) {
|
|
5386
5386
|
let n = Un(t.fill, e, r.x, r.y, r.w, r.h, i);
|
|
5387
5387
|
n && (e.strokeStyle = n);
|
|
5388
5388
|
}
|
|
@@ -5598,7 +5598,7 @@ async function wi(e, t, n, r, i = {}, a) {
|
|
|
5598
5598
|
return o && Vn(t) ? he(o, i.imageResources, l) : l();
|
|
5599
5599
|
}
|
|
5600
5600
|
async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
5601
|
-
let l = a.width ?? ((I(t) ? t.offsetWidth : 0) || 960), u = l / r, d = Math.round(l), f = Math.round(i * u), p = a.dpr ?? e(), m =
|
|
5601
|
+
let l = a.width ?? ((I(t) ? t.offsetWidth : 0) || 960), u = l / r, d = Math.round(l), f = Math.round(i * u), p = a.dpr ?? e(), m = Ve(d * p, f * p), h = m.clamped ? p * m.scale : p, g = await Bn(n, d, f, u, h, a.imageResources, a.fetchImage, a.fetchMedia, s, a.tiff);
|
|
5602
5602
|
t.width = m.width, t.height = m.height, I(t) && (t.style.width = `${d}px`, t.style.display || (t.style.display = "block"));
|
|
5603
5603
|
let _ = t.getContext("2d");
|
|
5604
5604
|
if (!_) throw Error("Could not get 2D context");
|
|
@@ -5628,7 +5628,7 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5628
5628
|
if (V(t)) de(t.svgImagePath, a.fetchImage, l).catch(() => void 0);
|
|
5629
5629
|
else if (n) de(t.imagePath, a.fetchImage, l).catch(() => void 0);
|
|
5630
5630
|
else {
|
|
5631
|
-
let e =
|
|
5631
|
+
let e = Me(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
|
|
5632
5632
|
if (!e) continue;
|
|
5633
5633
|
Qe(t.imagePath, t.mimeType, t.duotone, a.fetchImage, {
|
|
5634
5634
|
widthPt: e.widthPt,
|
|
@@ -5653,8 +5653,8 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5653
5653
|
targetWidthPx: X(e.width, u) * h,
|
|
5654
5654
|
targetHeightPx: X(e.height, u) * h
|
|
5655
5655
|
}, n = [], r = !0;
|
|
5656
|
-
for (let i of
|
|
5657
|
-
let e =
|
|
5656
|
+
for (let i of Ie(e.chart)) {
|
|
5657
|
+
let e = Ne(i, t);
|
|
5658
5658
|
if (!e) {
|
|
5659
5659
|
r = !1;
|
|
5660
5660
|
break;
|
|
@@ -5671,8 +5671,8 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5671
5671
|
});
|
|
5672
5672
|
}
|
|
5673
5673
|
let o = /* @__PURE__ */ new Map();
|
|
5674
|
-
for (let e of
|
|
5675
|
-
let { fill: t } = e, n =
|
|
5674
|
+
for (let e of Be(i.map(({ element: e }) => e.chart), (e, t) => Ne(e, i[t].frame) != null)) {
|
|
5675
|
+
let { fill: t } = e, n = He(t);
|
|
5676
5676
|
o.has(n) || o.set(n, {
|
|
5677
5677
|
fill: t,
|
|
5678
5678
|
widthPt: 0,
|
|
@@ -5682,7 +5682,7 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5682
5682
|
});
|
|
5683
5683
|
}
|
|
5684
5684
|
for (let { usages: e } of i) for (let { usage: t, size: n } of e) {
|
|
5685
|
-
let { fill: e } = t, r =
|
|
5685
|
+
let { fill: e } = t, r = He(e), i = o.get(r);
|
|
5686
5686
|
if (!i) continue;
|
|
5687
5687
|
let a = i.preserveNaturalSize || t.preserveNaturalSize, s = i.hasSourceCrop || t.hasSourceCrop, c = a || e.duotone ? void 0 : Ln(g, Z(e.imagePath, e.duotone)), l = !e.duotone && (e.mimeType === "image/svg+xml" || V({
|
|
5688
5688
|
svgImagePath: e.svgImagePath,
|
|
@@ -5728,7 +5728,7 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5728
5728
|
y.set(t, null);
|
|
5729
5729
|
return;
|
|
5730
5730
|
}
|
|
5731
|
-
if (
|
|
5731
|
+
if (Ke(e) || Ze(e)) throw e;
|
|
5732
5732
|
y.set(t, null);
|
|
5733
5733
|
}
|
|
5734
5734
|
}), i = [...o].map(async ([t, n]) => {
|
|
@@ -5766,7 +5766,7 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5766
5766
|
S.set(t, null);
|
|
5767
5767
|
return;
|
|
5768
5768
|
}
|
|
5769
|
-
if (
|
|
5769
|
+
if (Ke(e) || Ze(e)) throw e;
|
|
5770
5770
|
S.set(t, null);
|
|
5771
5771
|
}
|
|
5772
5772
|
});
|
|
@@ -5789,12 +5789,12 @@ async function Ti(t, n, r, i, a = {}, o, s, c = () => !1) {
|
|
|
5789
5789
|
else if (r.type === "media") await mi(_, r, u, c, a.fetchMedia, a.skipMediaControls, a.fetchImage, a.tiff, h, a.svgDecoder, g);
|
|
5790
5790
|
else if (r.type === "chart") {
|
|
5791
5791
|
let e = Y * u;
|
|
5792
|
-
_.save(), _i(_, r, u),
|
|
5792
|
+
_.save(), _i(_, r, u), qe(_, r.chart, {
|
|
5793
5793
|
x: X(r.x, u),
|
|
5794
5794
|
y: X(r.y, u),
|
|
5795
5795
|
w: X(r.width, u),
|
|
5796
5796
|
h: X(r.height, u)
|
|
5797
|
-
}, e, r.rotation, a.threeD, a.regionMap, (e) => S.get(
|
|
5797
|
+
}, e, r.rotation, a.threeD, a.regionMap, (e) => S.get(He(e)), a.chartEx), _.restore();
|
|
5798
5798
|
}
|
|
5799
5799
|
}
|
|
5800
5800
|
return c() || a.dim && yi(_, a.dim, d, f), t;
|