@forevka/wordcanvas 0.8.1 → 0.9.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-lib/assets/{worker-BFAbWoje.js → worker-VdvO3cMW.js} +1198 -1182
- package/dist-lib/builder.js +5 -5
- package/dist-lib/{editorApp-CQn18PAu.js → editorApp-BGyP48-P.js} +37 -36
- package/dist-lib/{recalcToc-Dzz8cQho.js → engine-Chvebzwr.js} +525 -548
- package/dist-lib/export.js +8 -7
- package/dist-lib/generate-toc.js +7 -6
- package/dist-lib/import.js +2 -2
- package/dist-lib/{lists-DpmgbDyt.js → lists-BVCy5dMa.js} +2 -2
- package/dist-lib/{parse-CIuWi88O.js → parse-PD2rg4oO.js} +28 -28
- package/dist-lib/{pipeline-DQil8qUX.js → pipeline-r7GVSMFb.js} +60 -60
- package/dist-lib/query.js +977 -0
- package/dist-lib/recalc-docx.js +22 -21
- package/dist-lib/recalcToc-CAeOzLr3.js +37 -0
- package/dist-lib/{stylesheet-BeM16Mvj.js → stylesheet-IH4Hyc8o.js} +3 -3
- package/dist-lib/{toc-C-JErW1U.js → toc-B-TzD-Mr.js} +102 -86
- package/dist-lib/{webmcp-B9Q6w0Vl.js → webmcp-CDpzmTtU.js} +2 -2
- package/dist-lib/{wordcanvas-Cla5Ys8Y.js → wordcanvas-CIqBAV2w.js} +3 -3
- package/dist-lib/wordcanvas.js +1 -1
- package/dist-node/{chunk-JVSPB6WM.js → chunk-A53KB3BE.js} +2 -2
- package/dist-node/{chunk-HMBQQDXD.js → chunk-TLGEFCLV.js} +64 -1
- package/dist-node/chunk-TLGEFCLV.js.map +7 -0
- package/dist-node/{chunk-KZHUXFDE.js → chunk-VNDCELYX.js} +5 -45
- package/dist-node/chunk-VNDCELYX.js.map +7 -0
- package/dist-node/{engine-46GL2RKU.js → engine-QKH45ZHY.js} +5 -4
- package/dist-node/export.js +3 -3
- package/dist-node/generate-toc.js +3 -3
- package/dist-node/import.js +2 -2
- package/dist-node/recalc-docx.js +2 -2
- package/package.json +6 -2
- package/types/builder.d.ts +47 -2
- package/types/model.d.ts +34 -0
- package/types/query.d.ts +416 -0
- package/dist-node/chunk-HMBQQDXD.js.map +0 -7
- package/dist-node/chunk-KZHUXFDE.js.map +0 -7
- /package/dist-node/{chunk-JVSPB6WM.js.map → chunk-A53KB3BE.js.map} +0 -0
- /package/dist-node/{engine-46GL2RKU.js.map → engine-QKH45ZHY.js.map} +0 -0
package/dist-lib/builder.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as k, B as I, b as E, g as N } from "./toc-
|
|
2
|
-
import { s as F, d as H } from "./stylesheet-
|
|
3
|
-
import { d as B, D as O, a as W, b as q, n as $, m as U } from "./lists-
|
|
4
|
-
import { l as j, p as K, D as z, b as _, B as T } from "./parse-
|
|
5
|
-
import { b as G, e as V, r as Z } from "./pipeline-
|
|
1
|
+
import { t as k, B as I, b as E, g as N } from "./toc-B-TzD-Mr.js";
|
|
2
|
+
import { s as F, d as H } from "./stylesheet-IH4Hyc8o.js";
|
|
3
|
+
import { d as B, D as O, a as W, b as q, n as $, m as U } from "./lists-BVCy5dMa.js";
|
|
4
|
+
import { l as j, p as K, D as z, b as _, B as T } from "./parse-PD2rg4oO.js";
|
|
5
|
+
import { b as G, e as V, r as Z } from "./pipeline-r7GVSMFb.js";
|
|
6
6
|
function M(a, t) {
|
|
7
7
|
return { root: j(a), display: t };
|
|
8
8
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { B as aM,
|
|
2
|
-
import { s as eI, a as cg,
|
|
3
|
-
import { m as KF,
|
|
4
|
-
import { D as WF, Z as XF, a as ZF, i as NI, m as KI, b as vF, r as qF, e as $F, f as _F } from "./wordcanvas-
|
|
5
|
-
import { D as Yw, b as yw, a as _B, n as aI, g as AM, r as eC, c as AD, m as BD, u as ID, d as gD, e as MD, f as QD, h as ED, O as cD, A as CD, G as eD, p as cQ, l as WC, T as wD, i as iD } from "./parse-
|
|
6
|
-
import { c as HM, e as FD
|
|
1
|
+
import { B as aM, l as BM, t as jB, q as aF, s as MB, j as MM, u as fI, e as OI, v as qM, c as hg, w as GF, o as yI, x as AI, y as Dw, z as QI, A as cI, C as rc, E as eE, F as TF, G as QC, H as ow, I as yE, J as EC, K as CI, h as zE, L as kc, M as dF, N as KC, O as Uw, P as HE, Q as tw, R as cC, r as bC, S as sw, T as nw, b as JF, D as oQ, a as Rw, U as rF, V as kF, W as SF, X as LF, Y as uF, p as pF, Z as PF, _ as VF, $ as mF } from "./toc-B-TzD-Mr.js";
|
|
2
|
+
import { s as eI, a as cg, b as CC, r as Eg, d as Qg, c as hw, p as Nw, w as fF, e as OF } from "./stylesheet-IH4Hyc8o.js";
|
|
3
|
+
import { m as KF, e as bF, d as Sc, a as bg, D as hM, b as $M, n as OM } from "./lists-BVCy5dMa.js";
|
|
4
|
+
import { D as WF, Z as XF, a as ZF, i as NI, m as KI, b as vF, r as qF, e as $F, f as _F } from "./wordcanvas-CIqBAV2w.js";
|
|
5
|
+
import { D as Yw, b as yw, a as _B, n as aI, g as AM, r as eC, c as AD, m as BD, u as ID, d as gD, e as MD, f as QD, h as ED, O as cD, A as CD, G as eD, p as cQ, l as WC, T as wD, i as iD } from "./parse-PD2rg4oO.js";
|
|
6
|
+
import { c as HM, e as FD } from "./engine-Chvebzwr.js";
|
|
7
7
|
import { c as _M } from "./metrics-DXaHu5bS.js";
|
|
8
|
-
import { w as zw, B as
|
|
9
|
-
import {
|
|
8
|
+
import { w as zw, B as DD, V as oD, v as UD, p as XC, b as tD, n as ZC, T as vC, c as sD, l as nD, d as RD, f as hD, r as qC, e as Lc, U as $C, s as _C, g as ND, o as YD, t as yD, j as zD, h as HD, i as lD, u as xD, k as jD, M as uc, m as aD, W as oc, X as Hw, Y as lw, L as GD, y as pc, N as TD, A as Pc, O as dD, H as Vc, Z as JD, _ as rD, $ as xw, a0 as Ae, q as kD } from "./paintStyle-OSXohdGT.js";
|
|
9
|
+
import { c as SD } from "./recalcToc-CAeOzLr3.js";
|
|
10
|
+
import { b as wC, e as LD, r as uD, a as jw, f as aw, m as mc, c as pD } from "./pipeline-r7GVSMFb.js";
|
|
10
11
|
import { z as PD, s as Be } from "./browser-BUrsjziD.js";
|
|
11
12
|
import { I as VD } from "./contentTypes-BwUSSoXc.js";
|
|
12
13
|
import { e as fB, a as dQ } from "./xmlWrite-DxSDwuaP.js";
|
|
@@ -3040,7 +3041,7 @@ function IC(A) {
|
|
|
3040
3041
|
return RA(C, I, "command");
|
|
3041
3042
|
};
|
|
3042
3043
|
}
|
|
3043
|
-
const
|
|
3044
|
+
const rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3044
3045
|
__proto__: null,
|
|
3045
3046
|
addBookmarkCmd: Ww,
|
|
3046
3047
|
adjustIndentCmd: _c,
|
|
@@ -3327,7 +3328,7 @@ function Oo(A) {
|
|
|
3327
3328
|
} };
|
|
3328
3329
|
}
|
|
3329
3330
|
function Ko(A, B, I, g) {
|
|
3330
|
-
const M = oD(
|
|
3331
|
+
const M = DD(oD(A)).clone;
|
|
3331
3332
|
return `${I ? "italic " : ""}${g ? "700" : "400"} ${B}px ${M}`;
|
|
3332
3333
|
}
|
|
3333
3334
|
function MF(A, B, I, g, M, Q) {
|
|
@@ -3348,11 +3349,11 @@ function oe(A, B, I, g, M, Q) {
|
|
|
3348
3349
|
A.fillStyle = Q.underlineColor, A.fillRect(B, I, g, c);
|
|
3349
3350
|
return;
|
|
3350
3351
|
}
|
|
3351
|
-
const C =
|
|
3352
|
+
const C = xD(E, M), i = I + C.thickness / 2;
|
|
3352
3353
|
if (A.save(), A.strokeStyle = Q.underlineColor, A.lineWidth = C.thickness, A.setLineDash(C.dash), A.beginPath(), C.wave)
|
|
3353
|
-
|
|
3354
|
+
jD(B, i, g, M).forEach((U, F) => F === 0 ? A.moveTo(U.x, U.y) : A.lineTo(U.x, U.y));
|
|
3354
3355
|
else if (A.moveTo(B, i), A.lineTo(B + g, i), C.double) {
|
|
3355
|
-
const w =
|
|
3356
|
+
const w = zD(C.thickness);
|
|
3356
3357
|
A.moveTo(B, i + w), A.lineTo(B + g, i + w);
|
|
3357
3358
|
}
|
|
3358
3359
|
A.stroke(), A.restore();
|
|
@@ -3360,7 +3361,7 @@ function oe(A, B, I, g, M, Q) {
|
|
|
3360
3361
|
const Wo = { comments: [], inserts: [], deletes: [], changeBars: [], pins: [] }, Xo = "rgb(64, 64, 64)", Zo = 0.5, tM = 15, hc = "10px Arial", Nc = 10, Yc = 5, yc = 11, vo = 5, Ue = 6;
|
|
3361
3362
|
function qo(A, B) {
|
|
3362
3363
|
if (!B.pageBorders) return;
|
|
3363
|
-
const I =
|
|
3364
|
+
const I = yD(B.pageBorders, B.widthPx, B.heightPx, B.marginPx);
|
|
3364
3365
|
for (const g of I)
|
|
3365
3366
|
A.strokeStyle = g.color, A.lineWidth = g.widthPx, A.setLineDash(g.dash), A.beginPath(), A.moveTo(g.x1, g.y1), A.lineTo(g.x2, g.y2), A.stroke();
|
|
3366
3367
|
A.setLineDash([]);
|
|
@@ -3442,7 +3443,7 @@ function EF(A, B = {}) {
|
|
|
3442
3443
|
}
|
|
3443
3444
|
function OA() {
|
|
3444
3445
|
if (C) {
|
|
3445
|
-
E &&
|
|
3446
|
+
E && YD(E);
|
|
3446
3447
|
for (const h of P) {
|
|
3447
3448
|
const N = x.get(h), v = C.pages[h];
|
|
3448
3449
|
N && v && f(N, v);
|
|
@@ -3565,7 +3566,7 @@ function EF(A, B = {}) {
|
|
|
3565
3566
|
for (const a of [N.footnoteRuleY, N.endnoteRuleY]) {
|
|
3566
3567
|
if (a === void 0) continue;
|
|
3567
3568
|
const wA = N.widthPx - N.marginPx.left - N.marginPx.right;
|
|
3568
|
-
Y.strokeStyle = I.footnoteRule, Y.lineWidth = 1, Y.beginPath(), Y.moveTo(N.marginPx.left, a + 0.5), Y.lineTo(N.marginPx.left + wA *
|
|
3569
|
+
Y.strokeStyle = I.footnoteRule, Y.lineWidth = 1, Y.beginPath(), Y.moveTo(N.marginPx.left, a + 0.5), Y.lineTo(N.marginPx.left + wA * UD, a + 0.5), Y.stroke();
|
|
3569
3570
|
}
|
|
3570
3571
|
if (N.lineNumbers) {
|
|
3571
3572
|
Y.textBaseline = "alphabetic";
|
|
@@ -3719,7 +3720,7 @@ function EF(A, B = {}) {
|
|
|
3719
3720
|
}
|
|
3720
3721
|
const lA = N.lines[0];
|
|
3721
3722
|
if (N.marker && lA) {
|
|
3722
|
-
const b = N.y + lA.y + lA.ascent, Y =
|
|
3723
|
+
const b = N.y + lA.y + lA.ascent, Y = tD(N.marker.text, N.marker.style.fontSizePx, N.marker.x, b);
|
|
3723
3724
|
Y ? bo(h, Y, N.marker.style.color) : (h.font = _M(N.marker.style), h.fillStyle = N.marker.style.color, h.wordSpacing = "0px", h.fillText(N.marker.text, N.marker.x, b));
|
|
3724
3725
|
}
|
|
3725
3726
|
if (N.toc) {
|
|
@@ -3728,16 +3729,16 @@ function EF(A, B = {}) {
|
|
|
3728
3729
|
const Y = N.y + b.y + b.ascent;
|
|
3729
3730
|
h.font = _M(N.toc.style), h.fillStyle = ZC(N.toc.style.color), h.wordSpacing = "0px", h.fillText(N.toc.numText, N.toc.numX, Y);
|
|
3730
3731
|
const a = b.fragments[b.fragments.length - 1], wA = N.x + (a ? a.x + a.width : 0) + vC, DA = N.toc.numX - vC;
|
|
3731
|
-
DA > wA && (h.save(), h.strokeStyle = I.tocLeader, h.lineWidth = 1, h.setLineDash(
|
|
3732
|
+
DA > wA && (h.save(), h.strokeStyle = I.tocLeader, h.lineWidth = 1, h.setLineDash(sD), h.beginPath(), h.moveTo(wA, Y), h.lineTo(DA, Y), h.stroke(), h.restore());
|
|
3732
3733
|
}
|
|
3733
3734
|
}
|
|
3734
3735
|
for (const b of N.lines) {
|
|
3735
3736
|
const Y = N.y + b.y + b.ascent;
|
|
3736
3737
|
if (b.leaders)
|
|
3737
3738
|
for (const a of b.leaders)
|
|
3738
|
-
h.save(), h.strokeStyle = ZC(a.color), h.lineWidth =
|
|
3739
|
+
h.save(), h.strokeStyle = ZC(a.color), h.lineWidth = nD(a.fontSizePx), h.setLineDash(RD(a.kind)), h.beginPath(), h.moveTo(N.x + a.x1, Y), h.lineTo(N.x + a.x2, Y), h.stroke(), h.restore();
|
|
3739
3740
|
for (const a of b.fragments) {
|
|
3740
|
-
const wA = a.style, DA = N.x + a.x, JA =
|
|
3741
|
+
const wA = a.style, DA = N.x + a.x, JA = hD(wA);
|
|
3741
3742
|
if (wA.highlightColor && (h.fillStyle = wA.highlightColor, h.fillRect(DA, N.y + b.y, a.width, b.height)), a.equation) {
|
|
3742
3743
|
h.direction = "ltr", h.textAlign = "left";
|
|
3743
3744
|
const rB = qC(wA, I.externalLink);
|
|
@@ -3756,7 +3757,7 @@ function EF(A, B = {}) {
|
|
|
3756
3757
|
const sB = Lc(wA.fontSizePx);
|
|
3757
3758
|
if (ZA.underline && oe(h, DA, Y + JA + $C, a.width, wA.fontSizePx, ZA), ZA.strike && (h.fillStyle = ZA.color, h.fillRect(DA, Y + JA + _C(wA.fontSizePx), a.width, sB)), wA.doubleStrikethrough) {
|
|
3758
3759
|
h.fillStyle = ZA.color;
|
|
3759
|
-
for (const rB of
|
|
3760
|
+
for (const rB of ND(wA.fontSizePx))
|
|
3760
3761
|
h.fillRect(DA, Y + JA + rB, a.width, sB);
|
|
3761
3762
|
}
|
|
3762
3763
|
}
|
|
@@ -3999,13 +4000,13 @@ function _o(A, B, I) {
|
|
|
3999
4000
|
}
|
|
4000
4001
|
function rg(A, B, I, g, M, Q, E, c) {
|
|
4001
4002
|
if (!B) return;
|
|
4002
|
-
const C =
|
|
4003
|
-
A.strokeStyle = B.color, A.lineWidth = C, A.setLineDash(
|
|
4003
|
+
const C = HD(B.widthPx);
|
|
4004
|
+
A.strokeStyle = B.color, A.lineWidth = C, A.setLineDash(lD(B.style, C));
|
|
4004
4005
|
const i = g === Q, w = Math.round(C) % 2 ? 0.5 : 0, U = i ? 0 : w, F = i ? w : 0, t = (s, R) => {
|
|
4005
4006
|
A.beginPath(), A.moveTo(I + U + s, g + F + R), A.lineTo(M + U + s, Q + F + R), A.stroke();
|
|
4006
4007
|
};
|
|
4007
4008
|
if (t(0, 0), B.style === "double") {
|
|
4008
|
-
const s =
|
|
4009
|
+
const s = aD(C);
|
|
4009
4010
|
t(E * s, c * s);
|
|
4010
4011
|
}
|
|
4011
4012
|
A.setLineDash([]);
|
|
@@ -8699,7 +8700,7 @@ function zM(A, B, I = {}) {
|
|
|
8699
8700
|
const y = F.bookmarks?.[e]?.start.blockId;
|
|
8700
8701
|
return y && MB(F, y) ? y : null;
|
|
8701
8702
|
}, xQ = () => {
|
|
8702
|
-
const e =
|
|
8703
|
+
const e = SD(F, t);
|
|
8703
8704
|
return e.length === 0 ? 0 : (S((D) => {
|
|
8704
8705
|
const y = [];
|
|
8705
8706
|
for (const H of e) {
|
|
@@ -9696,7 +9697,7 @@ const Zg = /* @__PURE__ */ new Map();
|
|
|
9696
9697
|
function As() {
|
|
9697
9698
|
return _g !== void 0 && (clearTimeout(_g), _g = void 0), Mg || (Mg = new Worker(new URL(
|
|
9698
9699
|
/* @vite-ignore */
|
|
9699
|
-
"" + new URL("assets/worker-
|
|
9700
|
+
"" + new URL("assets/worker-VdvO3cMW.js", import.meta.url).href,
|
|
9700
9701
|
import.meta.url
|
|
9701
9702
|
), { type: "module" }), Mg.onmessage = (A) => {
|
|
9702
9703
|
const B = A.data, I = Zg.get(B.id);
|
|
@@ -9805,7 +9806,7 @@ let bQ = null;
|
|
|
9805
9806
|
function Cs() {
|
|
9806
9807
|
return bQ || (typeof document > "u" || !("fonts" in document) ? Promise.resolve(!1) : (bQ = (async () => {
|
|
9807
9808
|
try {
|
|
9808
|
-
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${
|
|
9809
|
+
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${GD}`], import.meta.url), B = await (await fetch(A)).arrayBuffer(), I = Object.values(nQ).map(
|
|
9809
9810
|
(g) => new FontFace(pc, B, { weight: g.weight, style: g.style })
|
|
9810
9811
|
);
|
|
9811
9812
|
await Promise.all(I.map((g) => g.load()));
|
|
@@ -9820,7 +9821,7 @@ let WQ = null;
|
|
|
9820
9821
|
function es() {
|
|
9821
9822
|
return WQ || (typeof document > "u" || !("fonts" in document) ? Promise.resolve(!1) : (WQ = (async () => {
|
|
9822
9823
|
try {
|
|
9823
|
-
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${
|
|
9824
|
+
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${TD}`], import.meta.url), B = await (await fetch(A)).arrayBuffer(), I = Object.values(nQ).map(
|
|
9824
9825
|
(g) => new FontFace(Pc, B, { weight: g.weight, style: g.style })
|
|
9825
9826
|
);
|
|
9826
9827
|
await Promise.all(I.map((g) => g.load()));
|
|
@@ -9835,7 +9836,7 @@ let XQ = null;
|
|
|
9835
9836
|
function ws() {
|
|
9836
9837
|
return XQ || (typeof document > "u" || !("fonts" in document) ? Promise.resolve(!1) : (XQ = (async () => {
|
|
9837
9838
|
try {
|
|
9838
|
-
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${
|
|
9839
|
+
const A = new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/LICENSES.md": iC, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${dD}`], import.meta.url), B = await (await fetch(A)).arrayBuffer(), I = Object.values(nQ).map(
|
|
9839
9840
|
(g) => new FontFace(Vc, B, { weight: g.weight, style: g.style })
|
|
9840
9841
|
);
|
|
9841
9842
|
await Promise.all(I.map((g) => g.load()));
|
|
@@ -9848,8 +9849,8 @@ function ws() {
|
|
|
9848
9849
|
}
|
|
9849
9850
|
function is(A) {
|
|
9850
9851
|
return XM ? (A && XM.then(() => A(1, 1)), XM) : (XM = (async () => {
|
|
9851
|
-
const B =
|
|
9852
|
-
(c) =>
|
|
9852
|
+
const B = JD.flatMap(
|
|
9853
|
+
(c) => rD.map((C) => ({ fam: c, style: C, url: new URL((/* @__PURE__ */ Object.assign({ "./fonts/Arimo-Bold.ttf": _E, "./fonts/Arimo-BoldItalic.ttf": $E, "./fonts/Arimo-Italic.ttf": qE, "./fonts/Arimo-Regular.ttf": vE, "./fonts/Caladea-Bold.ttf": ZE, "./fonts/Caladea-BoldItalic.ttf": XE, "./fonts/Caladea-Italic.ttf": WE, "./fonts/Caladea-Regular.ttf": bE, "./fonts/Carlito-Bold.ttf": KE, "./fonts/Carlito-BoldItalic.ttf": OE, "./fonts/Carlito-Italic.ttf": fE, "./fonts/Carlito-Regular.ttf": mE, "./fonts/Cousine-Bold.ttf": VE, "./fonts/Cousine-BoldItalic.ttf": PE, "./fonts/Cousine-Italic.ttf": pE, "./fonts/Cousine-Regular.ttf": uE, "./fonts/Gelasio-Bold.ttf": LE, "./fonts/Gelasio-BoldItalic.ttf": SE, "./fonts/Gelasio-Italic.ttf": kE, "./fonts/Gelasio-Regular.ttf": rE, "./fonts/NotoSansArabic-Regular.ttf": JE, "./fonts/NotoSansHebrew-Regular.ttf": dE, "./fonts/NotoSansSC-Regular.ttf": TE, "./fonts/StixTwoMath-Regular.ttf": GE, "./fonts/TimesNewRoman-Bold.ttf": aE, "./fonts/TimesNewRoman-BoldItalic.ttf": jE, "./fonts/TimesNewRoman-Italic.ttf": xE, "./fonts/TimesNewRoman-Regular.ttf": lE }))[`./fonts/${c}-${C}.ttf`], import.meta.url) }))
|
|
9853
9854
|
), I = await Promise.all(B.map((c) => fetch(c.url))), g = I.reduce((c, C) => c + (Number(C.headers.get("content-length")) || 0), 0);
|
|
9854
9855
|
let M = 0;
|
|
9855
9856
|
const Q = await Promise.all(
|
|
@@ -11660,7 +11661,7 @@ async function Rn(A) {
|
|
|
11660
11661
|
...A.fonts ? { fonts: A.fonts } : {},
|
|
11661
11662
|
...A.cjk ? { cjk: A.cjk } : {},
|
|
11662
11663
|
...A.develop !== void 0 ? { develop: A.develop } : {}
|
|
11663
|
-
}), I =
|
|
11664
|
+
}), I = kD(), g = await Es(
|
|
11664
11665
|
(BA, GA) => A.onLoadProgress?.(_F(BA, GA)),
|
|
11665
11666
|
B.fonts
|
|
11666
11667
|
);
|
|
@@ -13340,7 +13341,7 @@ async function Rn(A) {
|
|
|
13340
13341
|
}
|
|
13341
13342
|
}, A.onLoadProgress?.({ phase: "ready", percent: 1, loaded: 0, total: 0 }), A.onReady?.(kI), A.onEvent?.({ type: "ready" }), A.agentTools) {
|
|
13342
13343
|
const BA = typeof A.agentTools == "object" ? A.agentTools : {};
|
|
13343
|
-
Promise.all([import("./index-ClPtDCyP.js"), import("./webmcp-
|
|
13344
|
+
Promise.all([import("./index-ClPtDCyP.js"), import("./webmcp-CDpzmTtU.js")]).then(([GA, L]) => {
|
|
13344
13345
|
GA.initializeWebModelContext(), zI = L.registerAgentTools(
|
|
13345
13346
|
n,
|
|
13346
13347
|
{ docId: () => t, setDocument: JA },
|
|
@@ -13349,11 +13350,11 @@ async function Rn(A) {
|
|
|
13349
13350
|
}).catch((GA) => console.error("[wordcanvas] failed to enable agent tools:", GA));
|
|
13350
13351
|
}
|
|
13351
13352
|
}
|
|
13352
|
-
const
|
|
13353
|
+
const kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13353
13354
|
__proto__: null,
|
|
13354
13355
|
mountEditorApp: Rn
|
|
13355
13356
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
13356
13357
|
export {
|
|
13357
|
-
|
|
13358
|
-
|
|
13358
|
+
rn as c,
|
|
13359
|
+
kn as e
|
|
13359
13360
|
};
|