@stll/folio-vue 0.36.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FindReplaceDialog-DEWjhuOw.js → FindReplaceDialog-BzbnMjiN.js} +1 -1
- package/dist/{FindReplaceDialog-CfcTl2Ra.cjs → FindReplaceDialog-CCb4Yi5f.cjs} +1 -1
- package/dist/{HorizontalRuler-Cuk0l4Us.cjs → HorizontalRuler-CoPJ4Lmf.cjs} +1 -1
- package/dist/{HorizontalRuler-TM9dg--R.js → HorizontalRuler-Ya0NQqx3.js} +1 -1
- package/dist/{HyperlinkDialog-BEse_y7R.js → HyperlinkDialog-BguOrehQ.js} +1 -1
- package/dist/{HyperlinkDialog-Cs1y6aol.cjs → HyperlinkDialog-CDSxSFvj.cjs} +1 -1
- package/dist/{ImagePropertiesDialog-mrJ8S3sl.js → ImagePropertiesDialog-1ILEgbl3.js} +1 -1
- package/dist/{ImagePropertiesDialog-CTbX2GrE.cjs → ImagePropertiesDialog-D_LmgAfL.cjs} +1 -1
- package/dist/{ImageSelectionOverlay-Dr0lg9WZ.cjs → ImageSelectionOverlay-B4Wv2QHk.cjs} +1 -1
- package/dist/{ImageSelectionOverlay-DULrvfOJ.js → ImageSelectionOverlay-BNwMBeYP.js} +1 -1
- package/dist/{InsertSymbolDialog-BjB-Q9EO.js → InsertSymbolDialog-B7-kknus.js} +1 -1
- package/dist/{InsertSymbolDialog-BsjgPYM-.cjs → InsertSymbolDialog-jfgojslX.cjs} +1 -1
- package/dist/{PageSetupDialog-DNNSezj3.js → PageSetupDialog-BC7bN_yo.js} +1 -1
- package/dist/{PageSetupDialog-CZ5fE9rz.cjs → PageSetupDialog-DAtIl9D_.cjs} +1 -1
- package/dist/{SetNumberingValueDialog-CwLHfO7f.js → SetNumberingValueDialog-DUJzE0l3.js} +1 -1
- package/dist/{SetNumberingValueDialog-ClCYr37D.cjs → SetNumberingValueDialog-XHMLKpRf.cjs} +1 -1
- package/dist/{SplitCellDialog-Bfuo5WCO.cjs → SplitCellDialog-EJ_09cM4.cjs} +1 -1
- package/dist/{SplitCellDialog-HIg4ZEqt.js → SplitCellDialog-dc5KoFhn.js} +1 -1
- package/dist/{StylePicker-F3cLPvRE.js → StylePicker-BBvLDSJP.js} +1 -1
- package/dist/{StylePicker-BnGGlXOX.cjs → StylePicker-DJidbDMg.cjs} +1 -1
- package/dist/{TablePropertiesDialog-ClJSuB0F.cjs → TablePropertiesDialog-BqDEDExN.cjs} +1 -1
- package/dist/{TablePropertiesDialog-CRX9Xgdr.js → TablePropertiesDialog-CxwsN5hC.js} +1 -1
- package/dist/{VerticalRuler-D973NTMv.js → VerticalRuler-BavScWGg.js} +1 -1
- package/dist/{VerticalRuler-DVi2P_TO.cjs → VerticalRuler-BcdGrbbo.cjs} +1 -1
- package/dist/{WatermarkDialog-BYyBTlDK.cjs → WatermarkDialog-CWUNUrfl.cjs} +1 -1
- package/dist/{WatermarkDialog-BoAdQ-qK.js → WatermarkDialog-H9jTrFRd.js} +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-ctJdVP-s.js → folio-ui-D5Gq10SE.js} +267 -271
- package/dist/{folio-ui-u7h3WXUO.cjs → folio-ui-DyqCUkAf.cjs} +1 -1
- package/dist/folio-vue.css +1 -1
- package/dist/i18n/index.d.ts +1 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +317 -320
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +12 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, c as t, d as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./useZoom-DknlzjRk.js";
|
|
2
|
-
import { S as u, a as d, b as f, g as p, m, n as h, r as g, v as _, x as v, y } from "./folio-ui-
|
|
2
|
+
import { S as u, a as d, b as f, g as p, m, n as h, r as g, v as _, x as v, y } from "./folio-ui-D5Gq10SE.js";
|
|
3
3
|
import { t as ee } from "./zIndex-FOGfTBdc.js";
|
|
4
|
-
import { S as te, T as ne, _ as re, d as ie, i as ae, n as oe, r as b, t as se, w as ce } from "./StylePicker-
|
|
4
|
+
import { S as te, T as ne, _ as re, d as ie, i as ae, n as oe, r as b, t as se, w as ce } from "./StylePicker-BBvLDSJP.js";
|
|
5
5
|
import { Fragment as x, Teleport as le, computed as S, createApp as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createSlots as ue, createStaticVNode as de, createTextVNode as fe, createVNode as O, defineAsyncComponent as k, defineComponent as A, h as pe, inject as me, mergeProps as he, nextTick as ge, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as _e, onMounted as ve, onScopeDispose as ye, openBlock as N, provide as be, ref as P, renderList as F, renderSlot as xe, shallowRef as Se, toDisplayString as I, toRaw as Ce, toValue as we, unref as L, vModelText as Te, vShow as Ee, watch as R, withCtx as De, withDirectives as Oe, withKeys as ke, withModifiers as z } from "vue";
|
|
6
6
|
import { resolveActiveEditorStory as Ae } from "@stll/folio-core/controller/activeEditorStory";
|
|
7
7
|
import { watermarkOperations as je } from "@stll/folio-core/controller/canonicalWatermark";
|
|
@@ -102,9 +102,10 @@ import { getFolioCaretViewportRect as ei, getFolioSelectionViewportRect as ti }
|
|
|
102
102
|
import { createAICitationDecorationsPlugin as ni, setAICitationsMeta as ri, setActiveCitationMeta as ii } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
103
103
|
import { configureTiffDecoding as ai } from "@stll/folio-core/tiff-decoding";
|
|
104
104
|
import { HYPHENATION_DICTIONARY_IDS as oi, HyphenationDictionaryError as si, configureHyphenationAssets as ci, preloadHyphenationDictionaries as li } from "@stll/folio-core/hyphenation";
|
|
105
|
-
import {
|
|
105
|
+
import { FolioMessageCatalogError as ui, configureFolioMessageAssets as di, loadFolioMessages as fi, preloadFolioMessages as pi } from "@stll/folio-core/i18n/messages";
|
|
106
|
+
import { fromMarkdown as mi, toMarkdown as hi, toMarkdownResult as gi } from "@stll/folio-core/markdown";
|
|
106
107
|
// src/composables/documentChrome.ts
|
|
107
|
-
var
|
|
108
|
+
var _i = (e) => {
|
|
108
109
|
if (!e) return {
|
|
109
110
|
sectionProperties: null,
|
|
110
111
|
watermark: void 0,
|
|
@@ -118,20 +119,20 @@ var pi = (e) => {
|
|
|
118
119
|
};
|
|
119
120
|
};
|
|
120
121
|
// src/composables/commentMarks.ts
|
|
121
|
-
function
|
|
122
|
+
function vi(e, t) {
|
|
122
123
|
let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
|
|
123
124
|
return n === r ? null : {
|
|
124
125
|
from: n,
|
|
125
126
|
to: r
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
+
function yi({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
|
|
129
130
|
let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
|
|
130
|
-
return i ?
|
|
131
|
+
return i ? vi(e, i) : null;
|
|
131
132
|
}
|
|
132
133
|
// src/composables/useCommentLifecycle.ts
|
|
133
|
-
var
|
|
134
|
-
function
|
|
134
|
+
var bi = 408, xi = 12;
|
|
135
|
+
function Si(e) {
|
|
135
136
|
let t = P(!1), n = P(null), r = P(null), i = P(null), a = P(null);
|
|
136
137
|
function o(t) {
|
|
137
138
|
let n = e.editorView.value, r = e.pagesContainer.value;
|
|
@@ -164,7 +165,7 @@ function vi(e) {
|
|
|
164
165
|
r.value = null;
|
|
165
166
|
return;
|
|
166
167
|
}
|
|
167
|
-
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left +
|
|
168
|
+
let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + xi : l.width / 2 + bi;
|
|
168
169
|
r.value = {
|
|
169
170
|
top: c.top - l.top,
|
|
170
171
|
left: Math.max(16, Math.min(d, l.width - 16)),
|
|
@@ -175,7 +176,7 @@ function vi(e) {
|
|
|
175
176
|
function c() {
|
|
176
177
|
let s = e.editorView.value;
|
|
177
178
|
if (!s) return;
|
|
178
|
-
let c = r.value, l = s.state.selection, u =
|
|
179
|
+
let c = r.value, l = s.state.selection, u = yi({
|
|
179
180
|
docSize: s.state.doc.content.size,
|
|
180
181
|
capturedRange: c ? {
|
|
181
182
|
from: c.from,
|
|
@@ -212,7 +213,7 @@ function vi(e) {
|
|
|
212
213
|
};
|
|
213
214
|
}
|
|
214
215
|
// src/composables/useCommentManagement.ts
|
|
215
|
-
function
|
|
216
|
+
function Ci(e) {
|
|
216
217
|
let t = Nt(), n = P([]), r = P(!1);
|
|
217
218
|
function i() {
|
|
218
219
|
r.value = !0;
|
|
@@ -403,7 +404,7 @@ function yi(e) {
|
|
|
403
404
|
};
|
|
404
405
|
}
|
|
405
406
|
// src/utils/imageClipboard.ts
|
|
406
|
-
function
|
|
407
|
+
function wi(e, t) {
|
|
407
408
|
let n = e.state.doc.nodeAt(t);
|
|
408
409
|
if (!n || n.type.name !== "image") return;
|
|
409
410
|
let r = n.attrs.src;
|
|
@@ -417,7 +418,7 @@ function bi(e, t) {
|
|
|
417
418
|
e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
418
419
|
});
|
|
419
420
|
}
|
|
420
|
-
function
|
|
421
|
+
function Ti(e) {
|
|
421
422
|
return new Promise((t, n) => {
|
|
422
423
|
let r = new FileReader();
|
|
423
424
|
r.onload = () => {
|
|
@@ -425,7 +426,7 @@ function xi(e) {
|
|
|
425
426
|
}, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
|
|
426
427
|
});
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
+
function Ei(e) {
|
|
429
430
|
return new Promise((t) => {
|
|
430
431
|
let n = new Image();
|
|
431
432
|
n.onload = () => t({
|
|
@@ -437,7 +438,7 @@ function Si(e) {
|
|
|
437
438
|
}), n.src = e;
|
|
438
439
|
});
|
|
439
440
|
}
|
|
440
|
-
function
|
|
441
|
+
function Di(e, t, n, r) {
|
|
441
442
|
let i = e.state.schema.nodes.image;
|
|
442
443
|
if (!i) return;
|
|
443
444
|
let a = i.create({
|
|
@@ -450,21 +451,21 @@ function Ci(e, t, n, r) {
|
|
|
450
451
|
}), o = e.state.tr.replaceSelectionWith(a);
|
|
451
452
|
e.dispatch(o);
|
|
452
453
|
}
|
|
453
|
-
async function
|
|
454
|
+
async function Oi(e) {
|
|
454
455
|
try {
|
|
455
456
|
let t = await navigator.clipboard.read();
|
|
456
457
|
for (let n of t) {
|
|
457
458
|
let t = n.types.find((e) => e.startsWith("image/"));
|
|
458
459
|
if (t) {
|
|
459
|
-
let r = await
|
|
460
|
-
a > 612 && (o = Math.round(612 / a * o), a = 612),
|
|
460
|
+
let r = await Ti(await n.getType(t)), i = await Ei(r), a = i.width, o = i.height;
|
|
461
|
+
a > 612 && (o = Math.round(612 / a * o), a = 612), Di(e, r, a, o);
|
|
461
462
|
return;
|
|
462
463
|
}
|
|
463
464
|
if (n.types.includes("text/html")) {
|
|
464
465
|
let t = await n.getType("text/html"), r = await Xt(t), i = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(r)?.groups?.src;
|
|
465
466
|
if (i) {
|
|
466
467
|
let t = /data-width="(?<w>\d+)"/u.exec(r)?.groups?.w, n = /data-height="(?<h>\d+)"/u.exec(r)?.groups?.h, a = t ? Number(t) : 200, o = n ? Number(n) : 200;
|
|
467
|
-
|
|
468
|
+
Di(e, i, a || 200, o || 200);
|
|
468
469
|
return;
|
|
469
470
|
}
|
|
470
471
|
}
|
|
@@ -485,14 +486,14 @@ async function wi(e) {
|
|
|
485
486
|
}
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
+
function ki(e, t) {
|
|
489
490
|
let n = e.state.doc.nodeAt(t);
|
|
490
491
|
if (!n || n.type.name !== "image") return;
|
|
491
492
|
let r = document.createElement("input");
|
|
492
493
|
r.type = "file", r.accept = "image/*", r.onchange = async () => {
|
|
493
494
|
let i = r.files?.[0];
|
|
494
495
|
if (!i) return;
|
|
495
|
-
let a = await
|
|
496
|
+
let a = await Ti(i), o = await Ei(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
|
|
496
497
|
try {
|
|
497
498
|
let r = e.state.tr.setNodeMarkup(t, void 0, {
|
|
498
499
|
...n.attrs,
|
|
@@ -506,7 +507,7 @@ function Ti(e, t) {
|
|
|
506
507
|
}, r.click();
|
|
507
508
|
}
|
|
508
509
|
// src/composables/useContextMenus.ts
|
|
509
|
-
var
|
|
510
|
+
var Ai = /* @__PURE__ */ new Set([
|
|
510
511
|
"inline",
|
|
511
512
|
"square",
|
|
512
513
|
"tight",
|
|
@@ -515,16 +516,16 @@ var Ei = /* @__PURE__ */ new Set([
|
|
|
515
516
|
"behind",
|
|
516
517
|
"inFront"
|
|
517
518
|
]);
|
|
518
|
-
function
|
|
519
|
-
return typeof e == "string" &&
|
|
519
|
+
function ji(e) {
|
|
520
|
+
return typeof e == "string" && Ai.has(e);
|
|
520
521
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
522
|
+
function Mi(e) {
|
|
523
|
+
return ji(e) ? e : "inline";
|
|
523
524
|
}
|
|
524
|
-
function
|
|
525
|
+
function Ni(e) {
|
|
525
526
|
return e === "left" || e === "right" || e === "none" ? e : null;
|
|
526
527
|
}
|
|
527
|
-
function
|
|
528
|
+
function Pi(e) {
|
|
528
529
|
let { t } = u(), n = P({
|
|
529
530
|
isOpen: !1,
|
|
530
531
|
position: {
|
|
@@ -599,7 +600,7 @@ function Ai(e) {
|
|
|
599
600
|
r.value = c(o, i, {
|
|
600
601
|
x: t.clientX,
|
|
601
602
|
y: t.clientY
|
|
602
|
-
},
|
|
603
|
+
}, Mi(s.attrs.wrapType), Ni(s.attrs.cssFloat)), n.value.isOpen = !1;
|
|
603
604
|
return;
|
|
604
605
|
}
|
|
605
606
|
}
|
|
@@ -635,7 +636,7 @@ function Ai(e) {
|
|
|
635
636
|
o && o.type.name === "image" && (r.value = c(a.element, a.pmPos, {
|
|
636
637
|
x: t.clientX,
|
|
637
638
|
y: t.clientY
|
|
638
|
-
},
|
|
639
|
+
}, Mi(o.attrs.wrapType), Ni(o.attrs.cssFloat)), n.value.isOpen = !1);
|
|
639
640
|
}
|
|
640
641
|
function f(t) {
|
|
641
642
|
let n = e.editorView.value, i = r.value;
|
|
@@ -658,7 +659,7 @@ function Ai(e) {
|
|
|
658
659
|
case "cut":
|
|
659
660
|
if (e.selectedImage.value) {
|
|
660
661
|
let t = e.selectedImage.value.pmPos;
|
|
661
|
-
|
|
662
|
+
wi(n, t);
|
|
662
663
|
let r = n.state.doc.nodeAt(t);
|
|
663
664
|
r && U(n, Jt({
|
|
664
665
|
from: t,
|
|
@@ -668,10 +669,10 @@ function Ai(e) {
|
|
|
668
669
|
} else n.focus(), document.execCommand("cut");
|
|
669
670
|
break;
|
|
670
671
|
case "copy":
|
|
671
|
-
e.selectedImage.value ? (
|
|
672
|
+
e.selectedImage.value ? (wi(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
|
|
672
673
|
break;
|
|
673
674
|
case "paste":
|
|
674
|
-
|
|
675
|
+
Oi(n).then(() => e.onPaste?.()).catch(() => void 0);
|
|
675
676
|
break;
|
|
676
677
|
case "pasteAsPlainText":
|
|
677
678
|
navigator.clipboard.readText().then((t) => {
|
|
@@ -696,7 +697,7 @@ function Ai(e) {
|
|
|
696
697
|
e.selectedImage.value && (e.showImageProperties.value = !0);
|
|
697
698
|
break;
|
|
698
699
|
case "replaceImage":
|
|
699
|
-
e.selectedImage.value &&
|
|
700
|
+
e.selectedImage.value && ki(n, e.selectedImage.value.pmPos);
|
|
700
701
|
break;
|
|
701
702
|
case "deleteImage":
|
|
702
703
|
if (e.selectedImage.value) {
|
|
@@ -741,7 +742,7 @@ function Ai(e) {
|
|
|
741
742
|
};
|
|
742
743
|
}
|
|
743
744
|
// src/composables/useDocumentLifecycle.ts
|
|
744
|
-
function
|
|
745
|
+
function Fi(e) {
|
|
745
746
|
async function t(t) {
|
|
746
747
|
e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
|
|
747
748
|
}
|
|
@@ -759,19 +760,19 @@ function ji(e) {
|
|
|
759
760
|
});
|
|
760
761
|
}
|
|
761
762
|
// src/composables/useDocxEditorRefApi.ts
|
|
762
|
-
var
|
|
763
|
+
var Ii = async (e, t) => {
|
|
763
764
|
let n = await e.saveDocument(t);
|
|
764
765
|
if (!n) return null;
|
|
765
766
|
let r = await n.arrayBuffer();
|
|
766
767
|
return e.clearCommentsDirty(), e.onSave?.(r), r;
|
|
767
768
|
};
|
|
768
|
-
function
|
|
769
|
+
function Li(e) {
|
|
769
770
|
let t = new hn();
|
|
770
771
|
function n() {
|
|
771
772
|
e.onPrint?.(), window.print();
|
|
772
773
|
}
|
|
773
774
|
function r(t) {
|
|
774
|
-
return
|
|
775
|
+
return Ii({
|
|
775
776
|
clearCommentsDirty: e.clearCommentsDirty,
|
|
776
777
|
onSave: e.onSave,
|
|
777
778
|
saveDocument: e.saveDocument
|
|
@@ -1191,10 +1192,10 @@ function Ni(e) {
|
|
|
1191
1192
|
} };
|
|
1192
1193
|
}
|
|
1193
1194
|
// src/utils/fontFaces.ts
|
|
1194
|
-
function
|
|
1195
|
+
function Ri() {
|
|
1195
1196
|
return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
|
|
1196
1197
|
}
|
|
1197
|
-
async function
|
|
1198
|
+
async function zi(e, t, n, r) {
|
|
1198
1199
|
let i;
|
|
1199
1200
|
try {
|
|
1200
1201
|
i = new FontFace(t, n, r), e.add(i);
|
|
@@ -1203,26 +1204,26 @@ async function Fi(e, t, n, r) {
|
|
|
1203
1204
|
}
|
|
1204
1205
|
return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
|
|
1205
1206
|
}
|
|
1206
|
-
function
|
|
1207
|
-
let t =
|
|
1207
|
+
function Bi(e) {
|
|
1208
|
+
let t = Ri();
|
|
1208
1209
|
if (t) for (let n of e) t.delete(n);
|
|
1209
1210
|
}
|
|
1210
1211
|
// src/utils/embeddedFonts.ts
|
|
1211
|
-
var
|
|
1212
|
+
var Vi = {
|
|
1212
1213
|
faces: [],
|
|
1213
1214
|
familyMap: /* @__PURE__ */ new Map()
|
|
1214
1215
|
};
|
|
1215
|
-
async function
|
|
1216
|
-
let t =
|
|
1217
|
-
if (!t) return
|
|
1216
|
+
async function Hi(e) {
|
|
1217
|
+
let t = Ri();
|
|
1218
|
+
if (!t) return Vi;
|
|
1218
1219
|
let n;
|
|
1219
1220
|
try {
|
|
1220
1221
|
n = await rr(e);
|
|
1221
1222
|
} catch {
|
|
1222
|
-
return
|
|
1223
|
+
return Vi;
|
|
1223
1224
|
}
|
|
1224
1225
|
return {
|
|
1225
|
-
faces: (await Promise.all(n.map((e) =>
|
|
1226
|
+
faces: (await Promise.all(n.map((e) => zi(t, e.family, e.bytes, {
|
|
1226
1227
|
weight: String(e.weight),
|
|
1227
1228
|
style: e.style
|
|
1228
1229
|
})))).filter((e) => e !== null),
|
|
@@ -1230,17 +1231,17 @@ async function Ri(e) {
|
|
|
1230
1231
|
};
|
|
1231
1232
|
}
|
|
1232
1233
|
// src/utils/hostFonts.ts
|
|
1233
|
-
function
|
|
1234
|
+
function Ui(e) {
|
|
1234
1235
|
return typeof e == "string" && e.trim().length > 0;
|
|
1235
1236
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return typeof e != "object" || !e ? !1 :
|
|
1237
|
+
function Wi(e) {
|
|
1238
|
+
return typeof e != "object" || !e ? !1 : Ui(Reflect.get(e, "family")) && Ui(Reflect.get(e, "src"));
|
|
1238
1239
|
}
|
|
1239
|
-
function
|
|
1240
|
+
function Gi(e) {
|
|
1240
1241
|
if (!e) return [];
|
|
1241
1242
|
let t = [];
|
|
1242
1243
|
for (let n of e) {
|
|
1243
|
-
if (!
|
|
1244
|
+
if (!Wi(n)) continue;
|
|
1244
1245
|
let e = { display: "swap" };
|
|
1245
1246
|
(typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
|
|
1246
1247
|
family: n.family.trim(),
|
|
@@ -1250,19 +1251,19 @@ function Vi(e) {
|
|
|
1250
1251
|
}
|
|
1251
1252
|
return t;
|
|
1252
1253
|
}
|
|
1253
|
-
async function
|
|
1254
|
-
let t =
|
|
1254
|
+
async function Ki(e) {
|
|
1255
|
+
let t = Ri();
|
|
1255
1256
|
if (!t) return [];
|
|
1256
|
-
let n =
|
|
1257
|
-
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) =>
|
|
1257
|
+
let n = Gi(e);
|
|
1258
|
+
return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => zi(t, e, n, r)))).filter((e) => e !== null);
|
|
1258
1259
|
}
|
|
1259
1260
|
// src/composables/useFontLifecycle.ts
|
|
1260
|
-
var
|
|
1261
|
-
loadEmbedded:
|
|
1262
|
-
loadHost:
|
|
1263
|
-
remove:
|
|
1261
|
+
var qi = {
|
|
1262
|
+
loadEmbedded: Hi,
|
|
1263
|
+
loadHost: Ki,
|
|
1264
|
+
remove: Bi
|
|
1264
1265
|
};
|
|
1265
|
-
function
|
|
1266
|
+
function Ji(e, t = qi) {
|
|
1266
1267
|
R(() => e.isReady.value ? e.sourceBuffer() : null, (n, r, i) => {
|
|
1267
1268
|
if (!n) return;
|
|
1268
1269
|
let a = !1, o = [], s = !1;
|
|
@@ -1285,7 +1286,7 @@ function Wi(e, t = Ui) {
|
|
|
1285
1286
|
}, { immediate: !0 });
|
|
1286
1287
|
}
|
|
1287
1288
|
// src/composables/useFormattingActions.ts
|
|
1288
|
-
function
|
|
1289
|
+
function Yi(e) {
|
|
1289
1290
|
let t = () => e.activeView?.value ?? e.editorView.value;
|
|
1290
1291
|
function n() {
|
|
1291
1292
|
let e = t();
|
|
@@ -1331,7 +1332,7 @@ function Gi(e) {
|
|
|
1331
1332
|
};
|
|
1332
1333
|
}
|
|
1333
1334
|
// src/composables/useHyperlinkManagement.ts
|
|
1334
|
-
function
|
|
1335
|
+
function Xi(e) {
|
|
1335
1336
|
let t = P(null);
|
|
1336
1337
|
function n(t) {
|
|
1337
1338
|
let n = e.editorView.value;
|
|
@@ -1381,7 +1382,7 @@ function Ki(e) {
|
|
|
1381
1382
|
};
|
|
1382
1383
|
}
|
|
1383
1384
|
// src/composables/useImageActions.ts
|
|
1384
|
-
function
|
|
1385
|
+
function Zi(e) {
|
|
1385
1386
|
let t = Se(null), n = P(!1), r = S(() => {
|
|
1386
1387
|
e.stateTick.value;
|
|
1387
1388
|
let n = e.editorView.value, r = t.value;
|
|
@@ -1427,7 +1428,7 @@ function qi(e) {
|
|
|
1427
1428
|
};
|
|
1428
1429
|
}
|
|
1429
1430
|
// src/composables/useKeyboardShortcuts.ts
|
|
1430
|
-
function
|
|
1431
|
+
function Qi(e) {
|
|
1431
1432
|
function t(t) {
|
|
1432
1433
|
if (Ke(t, {
|
|
1433
1434
|
scope: e.scope(),
|
|
@@ -1442,7 +1443,7 @@ function Ji(e) {
|
|
|
1442
1443
|
return ve(() => window.addEventListener("keydown", t)), _e(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
|
|
1443
1444
|
}
|
|
1444
1445
|
// src/composables/useOutlineSidebar.ts
|
|
1445
|
-
function
|
|
1446
|
+
function $i(e) {
|
|
1446
1447
|
function t() {
|
|
1447
1448
|
let t = e.editorView.value;
|
|
1448
1449
|
t && (e.outlineHeadings.value = hr(t.state.doc, it(t.state)));
|
|
@@ -1475,7 +1476,7 @@ function Yi(e) {
|
|
|
1475
1476
|
};
|
|
1476
1477
|
}
|
|
1477
1478
|
// src/composables/usePageSetupControls.ts
|
|
1478
|
-
function
|
|
1479
|
+
function ea(e) {
|
|
1479
1480
|
function t(t) {
|
|
1480
1481
|
if (e.readOnly.value) return;
|
|
1481
1482
|
let n = e.applySectionProperties?.(t);
|
|
@@ -1544,33 +1545,33 @@ function Xi(e) {
|
|
|
1544
1545
|
};
|
|
1545
1546
|
}
|
|
1546
1547
|
// src/utils/textSelection.ts
|
|
1547
|
-
var
|
|
1548
|
-
function
|
|
1549
|
-
return !e || e.length === 0 ? !1 :
|
|
1548
|
+
var ta = /[\p{L}\p{N}\p{M}_''-]/u, na = /\s/;
|
|
1549
|
+
function ra(e) {
|
|
1550
|
+
return !e || e.length === 0 ? !1 : ta.test(e);
|
|
1550
1551
|
}
|
|
1551
|
-
function
|
|
1552
|
-
return !e || e.length === 0 ? !1 :
|
|
1552
|
+
function ia(e) {
|
|
1553
|
+
return !e || e.length === 0 ? !1 : na.test(e);
|
|
1553
1554
|
}
|
|
1554
|
-
function
|
|
1555
|
+
function aa(e, t) {
|
|
1555
1556
|
if (!e || e.length === 0) return [0, 0];
|
|
1556
1557
|
t = Math.max(0, Math.min(t, e.length - 1));
|
|
1557
1558
|
let n = e[t];
|
|
1558
|
-
if (
|
|
1559
|
+
if (ia(n)) {
|
|
1559
1560
|
let n = t, r = t;
|
|
1560
|
-
for (; n > 0 &&
|
|
1561
|
-
for (; r < e.length &&
|
|
1561
|
+
for (; n > 0 && ia(e[n - 1]);) n--;
|
|
1562
|
+
for (; r < e.length && ia(e[r]);) r++;
|
|
1562
1563
|
return [n, r];
|
|
1563
1564
|
}
|
|
1564
|
-
if (
|
|
1565
|
+
if (ra(n)) {
|
|
1565
1566
|
let n = t, r = t;
|
|
1566
|
-
for (; n > 0 &&
|
|
1567
|
-
for (; r < e.length &&
|
|
1567
|
+
for (; n > 0 && ra(e[n - 1]);) n--;
|
|
1568
|
+
for (; r < e.length && ra(e[r]);) r++;
|
|
1568
1569
|
return [n, r];
|
|
1569
1570
|
}
|
|
1570
1571
|
return [t, t + 1];
|
|
1571
1572
|
}
|
|
1572
1573
|
// src/utils/domQueries.ts
|
|
1573
|
-
function
|
|
1574
|
+
function oa(e, t, n) {
|
|
1574
1575
|
let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span${Tt}`)) : Fe(e);
|
|
1575
1576
|
for (let e of r) {
|
|
1576
1577
|
let n = Dt(e) ?? NaN, r = Et(e) ?? NaN;
|
|
@@ -1578,24 +1579,24 @@ function na(e, t, n) {
|
|
|
1578
1579
|
}
|
|
1579
1580
|
return null;
|
|
1580
1581
|
}
|
|
1581
|
-
function
|
|
1582
|
+
function sa(e, t) {
|
|
1582
1583
|
e && Er(e, t);
|
|
1583
1584
|
}
|
|
1584
|
-
function
|
|
1585
|
+
function ca(e, t, n, r) {
|
|
1585
1586
|
if (!e || !t) return null;
|
|
1586
1587
|
let i = Cr(e, n, r, 1);
|
|
1587
1588
|
return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
|
|
1588
1589
|
}
|
|
1589
|
-
function
|
|
1590
|
+
function la(e, t, n, r) {
|
|
1590
1591
|
if (!e) return;
|
|
1591
|
-
let i =
|
|
1592
|
+
let i = oa(e, t, r);
|
|
1592
1593
|
if (!i) return;
|
|
1593
|
-
let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] =
|
|
1594
|
+
let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] = aa(a, t - o), l = o + s, u = o + c;
|
|
1594
1595
|
l < u && n(l, u);
|
|
1595
1596
|
}
|
|
1596
|
-
function
|
|
1597
|
+
function ua(e, t, n, r) {
|
|
1597
1598
|
if (!e) return;
|
|
1598
|
-
let i =
|
|
1599
|
+
let i = oa(e, t, r);
|
|
1599
1600
|
if (!i) return;
|
|
1600
1601
|
let a = i.closest(".layout-paragraph");
|
|
1601
1602
|
if (!a) return;
|
|
@@ -1603,11 +1604,11 @@ function oa(e, t, n, r) {
|
|
|
1603
1604
|
!Number.isNaN(o) && !Number.isNaN(s) && o < s && n(o, s);
|
|
1604
1605
|
}
|
|
1605
1606
|
// src/utils/listItems.ts
|
|
1606
|
-
var
|
|
1607
|
+
var da = (e, t) => t > 0 ? e[t - 1] : void 0, fa = ({ clientX: e, clientY: t, viewport: n }) => ({
|
|
1607
1608
|
left: e - n.left,
|
|
1608
1609
|
top: t - n.top
|
|
1609
|
-
}),
|
|
1610
|
-
function
|
|
1610
|
+
}), pa = 500;
|
|
1611
|
+
function ma(t) {
|
|
1611
1612
|
let n = P(null), r = null;
|
|
1612
1613
|
function i() {
|
|
1613
1614
|
r !== null && (clearTimeout(r), r = null);
|
|
@@ -1625,7 +1626,7 @@ function ua(t) {
|
|
|
1625
1626
|
visible: !1
|
|
1626
1627
|
}), m = null;
|
|
1627
1628
|
function h(e, n) {
|
|
1628
|
-
return
|
|
1629
|
+
return ca(t.pagesRef.value, t.editorView.value, e, n);
|
|
1629
1630
|
}
|
|
1630
1631
|
function g() {
|
|
1631
1632
|
let e = a.value;
|
|
@@ -1651,13 +1652,13 @@ function ua(t) {
|
|
|
1651
1652
|
} catch {}
|
|
1652
1653
|
}
|
|
1653
1654
|
function y(e) {
|
|
1654
|
-
|
|
1655
|
+
sa(t.pagesRef.value, e);
|
|
1655
1656
|
}
|
|
1656
1657
|
function ee(e) {
|
|
1657
|
-
|
|
1658
|
+
la(t.pagesRef.value, e, v, a.value?.position);
|
|
1658
1659
|
}
|
|
1659
1660
|
function te(e) {
|
|
1660
|
-
|
|
1661
|
+
ua(t.pagesRef.value, e, v, a.value?.position);
|
|
1661
1662
|
}
|
|
1662
1663
|
function ne(e) {
|
|
1663
1664
|
let n = t.editorView.value;
|
|
@@ -1699,7 +1700,7 @@ function ua(t) {
|
|
|
1699
1700
|
}, yr));
|
|
1700
1701
|
return;
|
|
1701
1702
|
}
|
|
1702
|
-
let u =
|
|
1703
|
+
let u = fa({
|
|
1703
1704
|
clientX: c.clientX,
|
|
1704
1705
|
clientY: c.clientY,
|
|
1705
1706
|
viewport: s.getBoundingClientRect()
|
|
@@ -1736,7 +1737,7 @@ function ua(t) {
|
|
|
1736
1737
|
if (a && a.state.selection.from !== a.state.selection.to) return;
|
|
1737
1738
|
let o = t.pagesViewportRef.value;
|
|
1738
1739
|
if (!o) return;
|
|
1739
|
-
let s = r.getBoundingClientRect(), c =
|
|
1740
|
+
let s = r.getBoundingClientRect(), c = fa({
|
|
1740
1741
|
clientX: s.left,
|
|
1741
1742
|
clientY: s.bottom,
|
|
1742
1743
|
viewport: o.getBoundingClientRect()
|
|
@@ -1767,7 +1768,7 @@ function ua(t) {
|
|
|
1767
1768
|
if (!l?.package) return;
|
|
1768
1769
|
let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = pn(l.package), p = f.hasTitlePg && d === 1, m = fn(f, c, p);
|
|
1769
1770
|
if (!m) {
|
|
1770
|
-
let e = t.layout.value?.pages, n = e === void 0 ? void 0 :
|
|
1771
|
+
let e = t.layout.value?.pages, n = e === void 0 ? void 0 : da(e, d)?.sectionIndex, r = gr({
|
|
1771
1772
|
document: l,
|
|
1772
1773
|
position: c,
|
|
1773
1774
|
referenceType: p ? "first" : "default",
|
|
@@ -1788,7 +1789,7 @@ function ua(t) {
|
|
|
1788
1789
|
position: c,
|
|
1789
1790
|
rId: h,
|
|
1790
1791
|
targetRect: {
|
|
1791
|
-
...
|
|
1792
|
+
...fa({
|
|
1792
1793
|
clientX: _.left,
|
|
1793
1794
|
clientY: _.top,
|
|
1794
1795
|
viewport: v
|
|
@@ -1846,7 +1847,7 @@ function ua(t) {
|
|
|
1846
1847
|
...e,
|
|
1847
1848
|
pageNumber: t,
|
|
1848
1849
|
targetRect: {
|
|
1849
|
-
...
|
|
1850
|
+
...fa({
|
|
1850
1851
|
clientX: i.left,
|
|
1851
1852
|
clientY: i.top,
|
|
1852
1853
|
viewport: s
|
|
@@ -1885,7 +1886,7 @@ function ua(t) {
|
|
|
1885
1886
|
return;
|
|
1886
1887
|
}
|
|
1887
1888
|
let h = Date.now();
|
|
1888
|
-
if (h - o <
|
|
1889
|
+
if (h - o < pa && s === m ? c++ : c = 1, o = h, s = m, c === 2) ee(m);
|
|
1889
1890
|
else if (c >= 3) te(m), c = 0;
|
|
1890
1891
|
else if (e.shiftKey) {
|
|
1891
1892
|
let { from: e } = f.state.selection;
|
|
@@ -1957,18 +1958,18 @@ function ua(t) {
|
|
|
1957
1958
|
};
|
|
1958
1959
|
}
|
|
1959
1960
|
// src/composables/usePortalClass.ts
|
|
1960
|
-
var
|
|
1961
|
-
function
|
|
1962
|
-
be(
|
|
1961
|
+
var ha = Symbol("docx-portal-class");
|
|
1962
|
+
function ga(e) {
|
|
1963
|
+
be(ha, S(() => ({
|
|
1963
1964
|
"ep-root": !0,
|
|
1964
1965
|
dark: !!L(e)
|
|
1965
1966
|
})));
|
|
1966
1967
|
}
|
|
1967
|
-
function
|
|
1968
|
-
return me(
|
|
1968
|
+
function _a() {
|
|
1969
|
+
return me(ha, S(() => ({ "ep-root": !0 })));
|
|
1969
1970
|
}
|
|
1970
1971
|
// src/composables/useRemoteSelectionSync.ts
|
|
1971
|
-
var
|
|
1972
|
+
var va = (e) => {
|
|
1972
1973
|
let t = new Dr(), n = null, r = () => {
|
|
1973
1974
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
1974
1975
|
let r = e.pagesRef.value;
|
|
@@ -1992,7 +1993,7 @@ var ma = (e) => {
|
|
|
1992
1993
|
], i, { flush: "post" }), ye(() => {
|
|
1993
1994
|
a(), r();
|
|
1994
1995
|
});
|
|
1995
|
-
},
|
|
1996
|
+
}, ya = (e) => {
|
|
1996
1997
|
let t = new Or(), n = null, r = () => {
|
|
1997
1998
|
n !== null && (cancelAnimationFrame(n), n = null);
|
|
1998
1999
|
let r = e.pagesRef.value;
|
|
@@ -2043,25 +2044,25 @@ var ma = (e) => {
|
|
|
2043
2044
|
clearOverlay: r,
|
|
2044
2045
|
updateSelectionOverlay: i
|
|
2045
2046
|
};
|
|
2046
|
-
},
|
|
2047
|
+
}, ba = 3e3, xa = (e = en) => {
|
|
2047
2048
|
let t = P(null), n = null, r = () => {
|
|
2048
2049
|
n !== null && e.clearTimer(n), n = null, t.value = null;
|
|
2049
2050
|
};
|
|
2050
2051
|
return ye(r), {
|
|
2051
2052
|
message: t,
|
|
2052
2053
|
show: (i) => {
|
|
2053
|
-
r(), t.value = i, n = e.setTimer(r,
|
|
2054
|
+
r(), t.value = i, n = e.setTimer(r, ba);
|
|
2054
2055
|
}
|
|
2055
2056
|
};
|
|
2056
|
-
},
|
|
2057
|
+
}, Sa = () => pe("div", {
|
|
2057
2058
|
class: "docx-editor-vue__loading",
|
|
2058
2059
|
"aria-busy": "true"
|
|
2059
|
-
}, [pe("progress", { "aria-hidden": "true" })]),
|
|
2060
|
+
}, [pe("progress", { "aria-hidden": "true" })]), Ca = [
|
|
2060
2061
|
"data-folio-anonymization-label",
|
|
2061
2062
|
"data-folio-anonymization-canonical",
|
|
2062
2063
|
"data-folio-anonymization-selected",
|
|
2063
2064
|
"title"
|
|
2064
|
-
],
|
|
2065
|
+
], wa = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2065
2066
|
__name: "AnonymizationRectsOverlay",
|
|
2066
2067
|
props: {
|
|
2067
2068
|
getHighlights: { type: Function },
|
|
@@ -2176,13 +2177,13 @@ var ma = (e) => {
|
|
|
2176
2177
|
width: `${n.width}px`,
|
|
2177
2178
|
height: `${n.height}px`
|
|
2178
2179
|
})
|
|
2179
|
-
}, null, 14,
|
|
2180
|
+
}, null, 14, Ca))), 128))], 64))), 128))], 512));
|
|
2180
2181
|
}
|
|
2181
|
-
}), [["__scopeId", "data-v-1260b607"]]),
|
|
2182
|
+
}), [["__scopeId", "data-v-1260b607"]]), Ta = {
|
|
2182
2183
|
key: 0,
|
|
2183
2184
|
class: "folio-autocomplete-overlay",
|
|
2184
2185
|
"data-folio-autocomplete-overlay": ""
|
|
2185
|
-
},
|
|
2186
|
+
}, Ea = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2186
2187
|
__name: "AutocompleteCaretOverlay",
|
|
2187
2188
|
props: {
|
|
2188
2189
|
caret: {},
|
|
@@ -2190,7 +2191,7 @@ var ma = (e) => {
|
|
|
2190
2191
|
isStreaming: { type: Boolean }
|
|
2191
2192
|
},
|
|
2192
2193
|
setup(e) {
|
|
2193
|
-
return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div",
|
|
2194
|
+
return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div", Ta, [D("span", {
|
|
2194
2195
|
class: "folio-autocomplete-ghost",
|
|
2195
2196
|
style: M({
|
|
2196
2197
|
left: `${e.caret.x}px`,
|
|
@@ -2203,7 +2204,7 @@ var ma = (e) => {
|
|
|
2203
2204
|
"aria-hidden": "true"
|
|
2204
2205
|
}, "stella", 2)], 4)])) : T("", !0);
|
|
2205
2206
|
}
|
|
2206
|
-
}), [["__scopeId", "data-v-39deaa80"]]),
|
|
2207
|
+
}), [["__scopeId", "data-v-39deaa80"]]), Da = 48, Oa = /* @__PURE__ */ A({
|
|
2207
2208
|
__name: "AutocompleteSuggestionOverlay",
|
|
2208
2209
|
props: {
|
|
2209
2210
|
getPagesContainer: { type: Function },
|
|
@@ -2222,7 +2223,7 @@ var ma = (e) => {
|
|
|
2222
2223
|
let c = r.querySelector(".layout-page-content");
|
|
2223
2224
|
if (!c) return;
|
|
2224
2225
|
let l = (c.getBoundingClientRect().right - a.left) / i;
|
|
2225
|
-
return Math.max(
|
|
2226
|
+
return Math.max(Da, l - t);
|
|
2226
2227
|
}
|
|
2227
2228
|
}, s = () => {
|
|
2228
2229
|
let e = t.getPagesContainer();
|
|
@@ -2272,7 +2273,7 @@ var ma = (e) => {
|
|
|
2272
2273
|
t.editorState,
|
|
2273
2274
|
t.zoom,
|
|
2274
2275
|
r.value
|
|
2275
|
-
], () => c()), (e, t) => (N(), w(
|
|
2276
|
+
], () => c()), (e, t) => (N(), w(Ea, {
|
|
2276
2277
|
caret: n.value?.caret ?? null,
|
|
2277
2278
|
text: n.value?.text ?? "",
|
|
2278
2279
|
"is-streaming": n.value?.isStreaming ?? !1
|
|
@@ -2282,14 +2283,14 @@ var ma = (e) => {
|
|
|
2282
2283
|
"is-streaming"
|
|
2283
2284
|
]));
|
|
2284
2285
|
}
|
|
2285
|
-
}),
|
|
2286
|
+
}), ka = ["aria-label"], Aa = {
|
|
2286
2287
|
key: 0,
|
|
2287
2288
|
class: "content-control-picker__items",
|
|
2288
2289
|
role: "menu"
|
|
2289
|
-
},
|
|
2290
|
+
}, ja = {
|
|
2290
2291
|
key: 0,
|
|
2291
2292
|
class: "content-control-picker__empty"
|
|
2292
|
-
},
|
|
2293
|
+
}, Ma = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2293
2294
|
__name: "ContentControlWidgetsOverlay",
|
|
2294
2295
|
props: {
|
|
2295
2296
|
eventRoot: {},
|
|
@@ -2297,7 +2298,7 @@ var ma = (e) => {
|
|
|
2297
2298
|
},
|
|
2298
2299
|
emits: ["refused"],
|
|
2299
2300
|
setup(e, { emit: t }) {
|
|
2300
|
-
let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o =
|
|
2301
|
+
let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o = _a(), s = t, c = new Nr({ onRefused: (e) => s("refused", r($(e))) }), l = Se(c.getSnapshot()), f = c.subscribe(() => {
|
|
2301
2302
|
l.value = c.getSnapshot();
|
|
2302
2303
|
});
|
|
2303
2304
|
R([() => n.view, () => n.eventRoot], ([e, t]) => c.bind(e, t), { immediate: !0 }), _e(() => {
|
|
@@ -2317,7 +2318,7 @@ var ma = (e) => {
|
|
|
2317
2318
|
"aria-label": l.value.status === "dropdown" ? L(r)("contentControlDropdownAriaLabel") : L(r)("contentControlDateAriaLabel"),
|
|
2318
2319
|
onMousedown: t[1] ||= z(() => {}, ["stop"]),
|
|
2319
2320
|
onPointerdown: t[2] ||= z(() => {}, ["stop"])
|
|
2320
|
-
}, [l.value.status === "dropdown" ? (N(), E("div",
|
|
2321
|
+
}, [l.value.status === "dropdown" ? (N(), E("div", Aa, [l.value.items.length === 0 ? (N(), E("div", ja, I(L(r)("contentControlDropdownNoOptions")), 1)) : (N(!0), E(x, { key: 1 }, F(l.value.items, (e) => (N(), w(L(i), {
|
|
2321
2322
|
key: `${e.value}::${e.displayText}`,
|
|
2322
2323
|
"class-name": "content-control-picker__item",
|
|
2323
2324
|
type: "button",
|
|
@@ -2334,9 +2335,9 @@ var ma = (e) => {
|
|
|
2334
2335
|
value: l.value.currentValue,
|
|
2335
2336
|
"default-open": !0,
|
|
2336
2337
|
onChange: m
|
|
2337
|
-
}, null, 8, ["value"])) : T("", !0)], 46,
|
|
2338
|
+
}, null, 8, ["value"])) : T("", !0)], 46, ka))]));
|
|
2338
2339
|
}
|
|
2339
|
-
}), [["__scopeId", "data-v-5367d712"]]),
|
|
2340
|
+
}), [["__scopeId", "data-v-5367d712"]]), Na = /* @__PURE__ */ A({
|
|
2340
2341
|
__name: "DecorationLayer",
|
|
2341
2342
|
props: {
|
|
2342
2343
|
getView: { type: Function },
|
|
@@ -2448,7 +2449,7 @@ var ma = (e) => {
|
|
|
2448
2449
|
"aria-hidden": "true"
|
|
2449
2450
|
}, null, 512));
|
|
2450
2451
|
}
|
|
2451
|
-
}),
|
|
2452
|
+
}), Pa = ({ surface: e, available: t, navRef: n, onClose: r }) => {
|
|
2452
2453
|
let i = S(() => we(e) === "expanded" && we(t));
|
|
2453
2454
|
R(i, async (e, t, i) => {
|
|
2454
2455
|
if (!e || typeof document > "u") return;
|
|
@@ -2464,18 +2465,18 @@ var ma = (e) => {
|
|
|
2464
2465
|
immediate: !0,
|
|
2465
2466
|
flush: "post"
|
|
2466
2467
|
});
|
|
2467
|
-
},
|
|
2468
|
+
}, Fa = [
|
|
2468
2469
|
"aria-label",
|
|
2469
2470
|
"data-folio-outline-surface",
|
|
2470
2471
|
"tabindex"
|
|
2471
|
-
],
|
|
2472
|
+
], Ia = [
|
|
2472
2473
|
"aria-label",
|
|
2473
2474
|
"aria-expanded",
|
|
2474
2475
|
"title"
|
|
2475
|
-
],
|
|
2476
|
+
], La = {
|
|
2476
2477
|
key: 1,
|
|
2477
2478
|
class: "folio-outline-header"
|
|
2478
|
-
},
|
|
2479
|
+
}, Ra = { class: "folio-outline-heading-row" }, za = { class: "folio-outline-title" }, Ba = ["aria-label", "title"], Va = { class: "folio-outline-depth-control" }, Ha = ["aria-label", "value"], Ua = { value: 2 }, Wa = { value: 3 }, Ga = { value: "all" }, Ka = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2479
2480
|
__name: "DocumentOutline",
|
|
2480
2481
|
props: {
|
|
2481
2482
|
headings: {},
|
|
@@ -2503,7 +2504,7 @@ var ma = (e) => {
|
|
|
2503
2504
|
rail: Ze.outlineRailWidth,
|
|
2504
2505
|
expanded: Ze.outlineColumnWidth
|
|
2505
2506
|
}, r = e, i = t, { t: a } = u(), { OutlineRail: o } = d(), s = P(null);
|
|
2506
|
-
|
|
2507
|
+
Pa({
|
|
2507
2508
|
surface: () => r.surface,
|
|
2508
2509
|
available: () => r.available,
|
|
2509
2510
|
navRef: s,
|
|
@@ -2553,7 +2554,7 @@ var ma = (e) => {
|
|
|
2553
2554
|
name: "view_column",
|
|
2554
2555
|
size: 16,
|
|
2555
2556
|
"aria-hidden": "true"
|
|
2556
|
-
})], 8,
|
|
2557
|
+
})], 8, Ia)) : (N(), E("div", La, [D("div", Ra, [D("span", za, I(L(a)("editor.outlineTitle")), 1), e.surface === "expanded" ? (N(), E("button", {
|
|
2557
2558
|
key: 0,
|
|
2558
2559
|
type: "button",
|
|
2559
2560
|
class: "folio-outline-icon-button",
|
|
@@ -2565,15 +2566,15 @@ var ma = (e) => {
|
|
|
2565
2566
|
name: "close",
|
|
2566
2567
|
size: 16,
|
|
2567
2568
|
"aria-hidden": "true"
|
|
2568
|
-
})], 8,
|
|
2569
|
+
})], 8, Ba)) : T("", !0)]), D("label", Va, [D("span", null, I(L(a)("editor.outlineDepthLabel")), 1), D("select", {
|
|
2569
2570
|
"aria-label": L(a)("editor.outlineDepthLabel"),
|
|
2570
2571
|
value: e.outlineDepth,
|
|
2571
2572
|
onChange: l
|
|
2572
2573
|
}, [
|
|
2573
|
-
D("option",
|
|
2574
|
-
D("option",
|
|
2575
|
-
D("option",
|
|
2576
|
-
], 40,
|
|
2574
|
+
D("option", Ua, I(L(a)("editor.outlineDepthTwo")), 1),
|
|
2575
|
+
D("option", Wa, I(L(a)("editor.outlineDepthThree")), 1),
|
|
2576
|
+
D("option", Ga, I(L(a)("editor.outlineDepthAll")), 1)
|
|
2577
|
+
], 40, Ha)])])), O(L(o), {
|
|
2577
2578
|
items: h.value,
|
|
2578
2579
|
"get-scroll-container": e.getScrollContainer,
|
|
2579
2580
|
"resolve-pct": _,
|
|
@@ -2590,9 +2591,9 @@ var ma = (e) => {
|
|
|
2590
2591
|
"presentation",
|
|
2591
2592
|
"panel-width",
|
|
2592
2593
|
"aria-label"
|
|
2593
|
-
])], 14,
|
|
2594
|
+
])], 14, Fa)) : T("", !0);
|
|
2594
2595
|
}
|
|
2595
|
-
}), [["__scopeId", "data-v-23e73f91"]]),
|
|
2596
|
+
}), [["__scopeId", "data-v-23e73f91"]]), qa = /* @__PURE__ */ A({
|
|
2596
2597
|
__name: "DocxEditorDialogs",
|
|
2597
2598
|
props: {
|
|
2598
2599
|
search: {},
|
|
@@ -2629,7 +2630,7 @@ var ma = (e) => {
|
|
|
2629
2630
|
"watermark-apply"
|
|
2630
2631
|
],
|
|
2631
2632
|
setup(e, { emit: t }) {
|
|
2632
|
-
let n = k(() => import("./FindReplaceDialog-
|
|
2633
|
+
let n = k(() => import("./FindReplaceDialog-BzbnMjiN.js").then((e) => e.n)), r = k(() => import("./HyperlinkDialog-BguOrehQ.js").then((e) => e.n)), i = k(() => import("./ImagePropertiesDialog-1ILEgbl3.js").then((e) => e.n)), a = k(() => import("./InsertSymbolDialog-B7-kknus.js").then((e) => e.n)), o = k(() => import("./PageSetupDialog-BC7bN_yo.js").then((e) => e.n)), s = k(() => import("./SetNumberingValueDialog-DUJzE0l3.js")), c = k(() => import("./TablePropertiesDialog-CxwsN5hC.js").then((e) => e.n)), l = k(() => import("./WatermarkDialog-H9jTrFRd.js").then((e) => e.n)), u = t;
|
|
2633
2634
|
return (t, d) => (N(), E(x, null, [
|
|
2634
2635
|
e.showFindReplace ? (N(), w(L(n), {
|
|
2635
2636
|
key: 0,
|
|
@@ -2696,10 +2697,10 @@ var ma = (e) => {
|
|
|
2696
2697
|
}, null, 8, ["is-open", "current-watermark"])) : T("", !0)
|
|
2697
2698
|
], 64));
|
|
2698
2699
|
}
|
|
2699
|
-
}),
|
|
2700
|
+
}), Ja = {
|
|
2700
2701
|
key: 0,
|
|
2701
2702
|
class: "docx-editor-vue__title-bar"
|
|
2702
|
-
},
|
|
2703
|
+
}, Ya = { class: "docx-editor-vue__title-bar-left" }, Xa = { class: "docx-editor-vue__title-bar-center" }, Za = { class: "docx-editor-vue__title-bar-right" }, Qa = /* @__PURE__ */ A({
|
|
2703
2704
|
__name: "DocxEditorMenuBar",
|
|
2704
2705
|
props: {
|
|
2705
2706
|
showMenuBar: {
|
|
@@ -2731,9 +2732,9 @@ var ma = (e) => {
|
|
|
2731
2732
|
],
|
|
2732
2733
|
setup(e, { emit: t }) {
|
|
2733
2734
|
let n = t;
|
|
2734
|
-
return (t, r) => e.showMenuBar ? (N(), E("div",
|
|
2735
|
-
D("div",
|
|
2736
|
-
D("div",
|
|
2735
|
+
return (t, r) => e.showMenuBar ? (N(), E("div", Ja, [
|
|
2736
|
+
D("div", Ya, [xe(t.$slots, "title-bar-left")]),
|
|
2737
|
+
D("div", Xa, [O(ce, {
|
|
2737
2738
|
"model-value": e.documentName,
|
|
2738
2739
|
editable: e.documentNameEditable,
|
|
2739
2740
|
"onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
|
|
@@ -2748,28 +2749,28 @@ var ma = (e) => {
|
|
|
2748
2749
|
"show-help-menu",
|
|
2749
2750
|
"show-table-insert"
|
|
2750
2751
|
])]),
|
|
2751
|
-
D("div",
|
|
2752
|
+
D("div", Za, [xe(t.$slots, "title-bar-right")])
|
|
2752
2753
|
])) : T("", !0);
|
|
2753
2754
|
}
|
|
2754
|
-
}),
|
|
2755
|
+
}), $a = ["aria-label"], eo = { class: "image-ctx-menu__icon" }, to = { class: "image-ctx-menu__label" }, no = {
|
|
2755
2756
|
key: 1,
|
|
2756
2757
|
class: "image-ctx-menu__divider",
|
|
2757
2758
|
role: "separator"
|
|
2758
|
-
},
|
|
2759
|
+
}, ro = [
|
|
2759
2760
|
"data-wrap-type",
|
|
2760
2761
|
"data-current",
|
|
2761
2762
|
"data-disabled",
|
|
2762
2763
|
"disabled",
|
|
2763
2764
|
"title",
|
|
2764
2765
|
"onClick"
|
|
2765
|
-
],
|
|
2766
|
+
], io = { class: "image-ctx-menu__icon" }, ao = { class: "image-ctx-menu__label" }, oo = ["aria-label"], so = ["disabled", "onClick"], co = { class: "image-ctx-menu__label" }, lo = {
|
|
2766
2767
|
key: 0,
|
|
2767
2768
|
class: "image-ctx-menu__shortcut"
|
|
2768
|
-
},
|
|
2769
|
+
}, uo = {
|
|
2769
2770
|
key: 0,
|
|
2770
2771
|
class: "image-ctx-menu__divider",
|
|
2771
2772
|
role: "separator"
|
|
2772
|
-
},
|
|
2773
|
+
}, fo = 18, po = 260, mo = 10, ho = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2773
2774
|
__name: "ImageContextMenu",
|
|
2774
2775
|
props: {
|
|
2775
2776
|
state: {},
|
|
@@ -2790,7 +2791,7 @@ var ma = (e) => {
|
|
|
2790
2791
|
function i() {
|
|
2791
2792
|
r("open-properties"), r("close");
|
|
2792
2793
|
}
|
|
2793
|
-
let { t: a } = u(), o =
|
|
2794
|
+
let { t: a } = u(), o = _a(), s = Bt, c = S(() => n.state ? Ht(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), l = {
|
|
2794
2795
|
inline: "wrap_text",
|
|
2795
2796
|
squareLeft: "format_image_left",
|
|
2796
2797
|
squareRight: "format_image_right",
|
|
@@ -2803,11 +2804,11 @@ var ma = (e) => {
|
|
|
2803
2804
|
let f = S(() => {
|
|
2804
2805
|
if (!n.state) return {};
|
|
2805
2806
|
let e = Bt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
|
|
2806
|
-
return typeof window < "u" && (t +
|
|
2807
|
+
return typeof window < "u" && (t + po > window.innerWidth && (t = window.innerWidth - po - mo), r + e > window.innerHeight && (r = window.innerHeight - e - mo), t < mo && (t = mo), r < mo && (r = mo)), {
|
|
2807
2808
|
position: "fixed",
|
|
2808
2809
|
left: `${t}px`,
|
|
2809
2810
|
top: `${r}px`,
|
|
2810
|
-
minWidth: `${
|
|
2811
|
+
minWidth: `${po}px`,
|
|
2811
2812
|
zIndex: 400
|
|
2812
2813
|
};
|
|
2813
2814
|
});
|
|
@@ -2849,11 +2850,11 @@ var ma = (e) => {
|
|
|
2849
2850
|
"data-action": "open-properties",
|
|
2850
2851
|
onMousedown: n[1] ||= z(() => {}, ["prevent"]),
|
|
2851
2852
|
onClick: i
|
|
2852
|
-
}, [D("span",
|
|
2853
|
+
}, [D("span", eo, [O(m, {
|
|
2853
2854
|
name: "settings",
|
|
2854
|
-
size:
|
|
2855
|
-
})]), D("span",
|
|
2856
|
-
e.canOpenProperties ? (N(), E("div",
|
|
2855
|
+
size: fo
|
|
2856
|
+
})]), D("span", to, I(L(a)("imageWrap.menu.imageProperties")), 1)], 32)) : T("", !0),
|
|
2857
|
+
e.canOpenProperties ? (N(), E("div", no)) : T("", !0),
|
|
2857
2858
|
(N(!0), E(x, null, F(L(s), (e) => (N(), E("button", {
|
|
2858
2859
|
key: e.choice,
|
|
2859
2860
|
type: "button",
|
|
@@ -2867,17 +2868,17 @@ var ma = (e) => {
|
|
|
2867
2868
|
onMousedown: n[2] ||= z(() => {}, ["prevent"]),
|
|
2868
2869
|
onClick: (t) => h(e)
|
|
2869
2870
|
}, [
|
|
2870
|
-
D("span",
|
|
2871
|
+
D("span", io, [O(m, {
|
|
2871
2872
|
name: d(e.iconHint),
|
|
2872
|
-
size:
|
|
2873
|
+
size: fo
|
|
2873
2874
|
}, null, 8, ["name"])]),
|
|
2874
|
-
D("span",
|
|
2875
|
+
D("span", ao, I(L(a)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
|
|
2875
2876
|
e.choice === c.value ? (N(), E("span", {
|
|
2876
2877
|
key: 0,
|
|
2877
2878
|
class: "image-ctx-menu__current-dot",
|
|
2878
2879
|
"aria-label": L(a)("imageWrap.menu.ariaLabel")
|
|
2879
|
-
}, "●", 8,
|
|
2880
|
-
], 42,
|
|
2880
|
+
}, "●", 8, oo)) : T("", !0)
|
|
2881
|
+
], 42, ro))), 128)),
|
|
2881
2882
|
e.textActions && e.textActions.length > 0 ? (N(), E(x, { key: 2 }, [n[5] ||= D("div", {
|
|
2882
2883
|
class: "image-ctx-menu__divider",
|
|
2883
2884
|
role: "separator"
|
|
@@ -2888,16 +2889,16 @@ var ma = (e) => {
|
|
|
2888
2889
|
disabled: e.disabled,
|
|
2889
2890
|
onMousedown: n[3] ||= z(() => {}, ["prevent"]),
|
|
2890
2891
|
onClick: (t) => g(e)
|
|
2891
|
-
}, [D("span",
|
|
2892
|
-
], 46,
|
|
2892
|
+
}, [D("span", co, I(e.label), 1), e.shortcut ? (N(), E("span", lo, I(e.shortcut), 1)) : T("", !0)], 40, so), e.dividerAfter ? (N(), E("div", uo)) : T("", !0)], 64))), 128))], 64)) : T("", !0)
|
|
2893
|
+
], 46, $a)) : T("", !0)]));
|
|
2893
2894
|
}
|
|
2894
|
-
}), [["__scopeId", "data-v-96099b5d"]]),
|
|
2895
|
+
}), [["__scopeId", "data-v-96099b5d"]]), go = ["disabled", "onMousedown"], _o = {
|
|
2895
2896
|
key: 0,
|
|
2896
2897
|
class: "ctx-menu__icon"
|
|
2897
|
-
},
|
|
2898
|
+
}, vo = { class: "ctx-menu__label" }, yo = {
|
|
2898
2899
|
key: 1,
|
|
2899
2900
|
class: "ctx-menu__shortcut"
|
|
2900
|
-
},
|
|
2901
|
+
}, bo = 220, xo = 32, So = 10, Co = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
2901
2902
|
__name: "TextContextMenu",
|
|
2902
2903
|
props: {
|
|
2903
2904
|
isOpen: { type: Boolean },
|
|
@@ -2915,7 +2916,7 @@ var ma = (e) => {
|
|
|
2915
2916
|
setup(e, { emit: t }) {
|
|
2916
2917
|
let n = e, r = ({ node: e }) => e;
|
|
2917
2918
|
r.props = ["node"];
|
|
2918
|
-
let i = t, { t: a } = u(), o =
|
|
2919
|
+
let i = t, { t: a } = u(), o = _a(), s = P(null), c = S(() => {
|
|
2919
2920
|
let e = [], t = n.customItems ?? [];
|
|
2920
2921
|
for (let [n, r] of t.entries()) e.push({
|
|
2921
2922
|
id: `custom-${r.id}`,
|
|
@@ -3069,8 +3070,8 @@ var ma = (e) => {
|
|
|
3069
3070
|
action: "setNumberingValue"
|
|
3070
3071
|
}), e;
|
|
3071
3072
|
}), l = S(() => {
|
|
3072
|
-
let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r *
|
|
3073
|
-
return typeof window < "u" && (e +
|
|
3073
|
+
let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r * xo + i * 9;
|
|
3074
|
+
return typeof window < "u" && (e + bo + So > window.innerWidth && (e = window.innerWidth - bo - So), t + a + So > window.innerHeight && (t = window.innerHeight - a - So)), {
|
|
3074
3075
|
position: "fixed",
|
|
3075
3076
|
left: `${e}px`,
|
|
3076
3077
|
top: `${t}px`,
|
|
@@ -3108,12 +3109,12 @@ var ma = (e) => {
|
|
|
3108
3109
|
disabled: e.disabled,
|
|
3109
3110
|
onMousedown: z((t) => d(e.action), ["prevent"])
|
|
3110
3111
|
}, [
|
|
3111
|
-
e.icon ? (N(), E("span",
|
|
3112
|
-
D("span",
|
|
3113
|
-
e.shortcut ? (N(), E("span",
|
|
3114
|
-
], 42,
|
|
3112
|
+
e.icon ? (N(), E("span", _o, [O(r, { node: e.icon }, null, 8, ["node"])])) : T("", !0),
|
|
3113
|
+
D("span", vo, I(e.label), 1),
|
|
3114
|
+
e.shortcut ? (N(), E("span", yo, I(e.shortcut), 1)) : T("", !0)
|
|
3115
|
+
], 42, go))), 128))], 38)) : T("", !0)]));
|
|
3115
3116
|
}
|
|
3116
|
-
}), [["__scopeId", "data-v-7eae304c"]]),
|
|
3117
|
+
}), [["__scopeId", "data-v-7eae304c"]]), wo = /* @__PURE__ */ A({
|
|
3117
3118
|
__name: "DocxEditorOverlays",
|
|
3118
3119
|
props: {
|
|
3119
3120
|
readOnly: { type: Boolean },
|
|
@@ -3132,7 +3133,7 @@ var ma = (e) => {
|
|
|
3132
3133
|
],
|
|
3133
3134
|
setup(e, { emit: t }) {
|
|
3134
3135
|
let n = t;
|
|
3135
|
-
return (t, r) => (N(), E(x, null, [O(
|
|
3136
|
+
return (t, r) => (N(), E(x, null, [O(Co, {
|
|
3136
3137
|
"is-open": e.contextMenu.isOpen,
|
|
3137
3138
|
position: e.contextMenu.position,
|
|
3138
3139
|
"has-selection": e.contextMenu.hasSelection,
|
|
@@ -3156,7 +3157,7 @@ var ma = (e) => {
|
|
|
3156
3157
|
"can-split-cell",
|
|
3157
3158
|
"list-numbering",
|
|
3158
3159
|
"custom-items"
|
|
3159
|
-
]), O(
|
|
3160
|
+
]), O(ho, {
|
|
3160
3161
|
state: e.imageContextMenu,
|
|
3161
3162
|
"text-actions": e.imageContextMenuTextActions,
|
|
3162
3163
|
"can-open-properties": e.canOpenImageProperties,
|
|
@@ -3170,7 +3171,7 @@ var ma = (e) => {
|
|
|
3170
3171
|
"can-open-properties"
|
|
3171
3172
|
])], 64));
|
|
3172
3173
|
}
|
|
3173
|
-
}),
|
|
3174
|
+
}), To = /* @__PURE__ */ A({
|
|
3174
3175
|
__name: "HeaderFooterSelectionOverlay",
|
|
3175
3176
|
props: {
|
|
3176
3177
|
pagesContainer: {},
|
|
@@ -3220,7 +3221,7 @@ var ma = (e) => {
|
|
|
3220
3221
|
i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Le(t.hiddenContainer);
|
|
3221
3222
|
}), (e, t) => null;
|
|
3222
3223
|
}
|
|
3223
|
-
}),
|
|
3224
|
+
}), Eo = { class: "hf-editor-label" }, Do = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3224
3225
|
__name: "InlineHeaderFooterEditor",
|
|
3225
3226
|
props: {
|
|
3226
3227
|
edit: {},
|
|
@@ -3263,7 +3264,7 @@ var ma = (e) => {
|
|
|
3263
3264
|
class: "hf-inline-editor",
|
|
3264
3265
|
style: M(c.value),
|
|
3265
3266
|
role: "presentation"
|
|
3266
|
-
}, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span",
|
|
3267
|
+
}, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span", Eo, I(s.value), 1), D("div", {
|
|
3267
3268
|
class: "hf-options",
|
|
3268
3269
|
onMousedown: n[5] ||= z(() => {}, ["stop"])
|
|
3269
3270
|
}, [O(L(i), {
|
|
@@ -3313,7 +3314,7 @@ var ma = (e) => {
|
|
|
3313
3314
|
})
|
|
3314
3315
|
], 2)) : T("", !0)], 32)], 2)], 4));
|
|
3315
3316
|
}
|
|
3316
|
-
}), [["__scopeId", "data-v-74134c4e"]]),
|
|
3317
|
+
}), [["__scopeId", "data-v-74134c4e"]]), Oo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3317
3318
|
__name: "PageIndicator",
|
|
3318
3319
|
props: {
|
|
3319
3320
|
currentPage: {},
|
|
@@ -3332,10 +3333,10 @@ var ma = (e) => {
|
|
|
3332
3333
|
total: e.totalPages
|
|
3333
3334
|
})), 5));
|
|
3334
3335
|
}
|
|
3335
|
-
}), [["__scopeId", "data-v-d6c69c2c"]]),
|
|
3336
|
+
}), [["__scopeId", "data-v-d6c69c2c"]]), ko = {
|
|
3336
3337
|
class: "folio-passage-highlight-overlay",
|
|
3337
3338
|
"data-folio-passage-highlight-overlay": ""
|
|
3338
|
-
},
|
|
3339
|
+
}, Ao = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3339
3340
|
__name: "PassageHighlightOverlay",
|
|
3340
3341
|
props: {
|
|
3341
3342
|
range: {},
|
|
@@ -3382,7 +3383,7 @@ var ma = (e) => {
|
|
|
3382
3383
|
t.measures
|
|
3383
3384
|
], () => a(), { immediate: !0 }), _e(() => {
|
|
3384
3385
|
r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
|
|
3385
|
-
}), (e, t) => (N(), E("div",
|
|
3386
|
+
}), (e, t) => (N(), E("div", ko, [(N(!0), E(x, null, F(n.value, (e, t) => (N(), E("span", {
|
|
3386
3387
|
key: `${t}:${e.left}:${e.top}`,
|
|
3387
3388
|
class: "folio-passage-highlight",
|
|
3388
3389
|
style: M({
|
|
@@ -3394,7 +3395,7 @@ var ma = (e) => {
|
|
|
3394
3395
|
})
|
|
3395
3396
|
}, null, 4))), 128))]));
|
|
3396
3397
|
}
|
|
3397
|
-
}), [["__scopeId", "data-v-cb52fdae"]]),
|
|
3398
|
+
}), [["__scopeId", "data-v-cb52fdae"]]), jo = ["data-folio-block-id"], Mo = ["data-folio-block-id", "title"], No = 2.5, Po = 5, Fo = 6, Io = 2, Lo = 2, Ro = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3398
3399
|
__name: "TemplateDirectivesOverlay",
|
|
3399
3400
|
props: {
|
|
3400
3401
|
getView: { type: Function },
|
|
@@ -3408,19 +3409,19 @@ var ma = (e) => {
|
|
|
3408
3409
|
setup(e) {
|
|
3409
3410
|
let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
|
|
3410
3411
|
function a(e) {
|
|
3411
|
-
let t = e -
|
|
3412
|
-
return t <= 0 ? 0 : Math.floor(t /
|
|
3412
|
+
let t = e - Fo - No - Io;
|
|
3413
|
+
return t <= 0 ? 0 : Math.floor(t / Po);
|
|
3413
3414
|
}
|
|
3414
3415
|
function o(e, t, n) {
|
|
3415
3416
|
let r = a(n), i = Math.min(Math.max(0, e), r);
|
|
3416
|
-
return t -
|
|
3417
|
+
return t - Fo - No - (r - i) * Po;
|
|
3417
3418
|
}
|
|
3418
3419
|
function s(e, t) {
|
|
3419
|
-
if (t.length === 0) return e.bottom - e.top >=
|
|
3420
|
+
if (t.length === 0) return e.bottom - e.top >= Lo ? [e] : [];
|
|
3420
3421
|
let n = [];
|
|
3421
3422
|
for (let r of t) {
|
|
3422
3423
|
let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
|
|
3423
|
-
i - t >=
|
|
3424
|
+
i - t >= Lo && n.push({
|
|
3424
3425
|
top: t,
|
|
3425
3426
|
bottom: i
|
|
3426
3427
|
});
|
|
@@ -3582,10 +3583,10 @@ var ma = (e) => {
|
|
|
3582
3583
|
position: "absolute",
|
|
3583
3584
|
left: `${t.railX * e.zoom}px`,
|
|
3584
3585
|
top: `${n.top * e.zoom}px`,
|
|
3585
|
-
width: `${
|
|
3586
|
+
width: `${No * e.zoom}px`,
|
|
3586
3587
|
height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
|
|
3587
3588
|
})
|
|
3588
|
-
}, null, 14,
|
|
3589
|
+
}, null, 14, jo))), 128))], 64))), 128)), (N(!0), E(x, null, F(p.value, (t, n) => (N(), E(x, { key: `d:${n}` }, [(N(!0), E(x, null, F(t.rects, (r, i) => (N(), E("span", {
|
|
3589
3590
|
key: `d:${n}:${i}`,
|
|
3590
3591
|
class: j(le(t.range)),
|
|
3591
3592
|
"data-folio-block-id": se(t.range),
|
|
@@ -3597,14 +3598,14 @@ var ma = (e) => {
|
|
|
3597
3598
|
width: `${(r.width + 2) * e.zoom}px`,
|
|
3598
3599
|
height: `${Math.max(0, r.height - 2) * e.zoom}px`
|
|
3599
3600
|
})
|
|
3600
|
-
}, null, 14,
|
|
3601
|
+
}, null, 14, Mo))), 128))], 64))), 128))], 32));
|
|
3601
3602
|
}
|
|
3602
|
-
}), [["__scopeId", "data-v-62b2d0a0"]]),
|
|
3603
|
+
}), [["__scopeId", "data-v-62b2d0a0"]]), zo = [
|
|
3603
3604
|
"href",
|
|
3604
3605
|
"rel",
|
|
3605
3606
|
"target",
|
|
3606
3607
|
"title"
|
|
3607
|
-
],
|
|
3608
|
+
], Bo = ["title"], Vo = ["title"], Ho = ["title"], Uo = { class: "docx-hyperlink-popup__edit-row" }, Wo = ["placeholder", "onKeydown"], Go = { class: "docx-hyperlink-popup__edit-row" }, Ko = ["onKeydown"], qo = ["disabled"], Jo = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3608
3609
|
__name: "HyperlinkPopup",
|
|
3609
3610
|
props: {
|
|
3610
3611
|
data: {},
|
|
@@ -3653,21 +3654,21 @@ var ma = (e) => {
|
|
|
3653
3654
|
class: j(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
|
|
3654
3655
|
style: M(d.value),
|
|
3655
3656
|
onMousedown: i[6] ||= z(() => {}, ["stop"])
|
|
3656
|
-
}, [o.value ? (N(), E(x, { key: 1 }, [D("div",
|
|
3657
|
+
}, [o.value ? (N(), E(x, { key: 1 }, [D("div", Uo, [Oe(D("input", {
|
|
3657
3658
|
class: "docx-hyperlink-popup__input",
|
|
3658
3659
|
placeholder: L(n)("displayText"),
|
|
3659
3660
|
"onUpdate:modelValue": i[2] ||= (e) => s.value = e,
|
|
3660
3661
|
onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[3] ||= ke((e) => t.$emit("close"), ["esc"])]
|
|
3661
|
-
}, null, 40,
|
|
3662
|
+
}, null, 40, Wo), [[Te, s.value]])]), D("div", Go, [Oe(D("input", {
|
|
3662
3663
|
class: "docx-hyperlink-popup__input",
|
|
3663
3664
|
placeholder: "https://...",
|
|
3664
3665
|
"onUpdate:modelValue": i[4] ||= (e) => c.value = e,
|
|
3665
3666
|
onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[5] ||= ke((e) => t.$emit("close"), ["esc"])]
|
|
3666
|
-
}, null, 40,
|
|
3667
|
+
}, null, 40, Ko), [[Te, c.value]]), D("button", {
|
|
3667
3668
|
class: "docx-hyperlink-popup__apply",
|
|
3668
3669
|
disabled: !c.value.trim(),
|
|
3669
3670
|
onClick: z(g, ["prevent"])
|
|
3670
|
-
}, I(L(n)("common.apply")), 9,
|
|
3671
|
+
}, I(L(n)("common.apply")), 9, qo)])], 64)) : (N(), E(x, { key: 0 }, [
|
|
3671
3672
|
i[10] ||= de("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-a7918e6a><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-a7918e6a></circle><path d=\"M2 12h20\" data-v-a7918e6a></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-a7918e6a></path></svg></span>", 1),
|
|
3672
3673
|
D("a", {
|
|
3673
3674
|
class: "docx-hyperlink-popup__url",
|
|
@@ -3676,7 +3677,7 @@ var ma = (e) => {
|
|
|
3676
3677
|
target: L(r).target,
|
|
3677
3678
|
title: e.data.href,
|
|
3678
3679
|
onClick: i[0] ||= z((n) => t.$emit("navigate", e.data.href), ["prevent"])
|
|
3679
|
-
}, I(e.data.href), 9,
|
|
3680
|
+
}, I(e.data.href), 9, zo),
|
|
3680
3681
|
i[11] ||= D("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
|
|
3681
3682
|
D("button", {
|
|
3682
3683
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -3698,7 +3699,7 @@ var ma = (e) => {
|
|
|
3698
3699
|
height: "13",
|
|
3699
3700
|
rx: "2",
|
|
3700
3701
|
ry: "2"
|
|
3701
|
-
}), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8,
|
|
3702
|
+
}), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Bo),
|
|
3702
3703
|
e.readOnly ? T("", !0) : (N(), E("button", {
|
|
3703
3704
|
key: 0,
|
|
3704
3705
|
class: "docx-hyperlink-popup__btn",
|
|
@@ -3713,40 +3714,36 @@ var ma = (e) => {
|
|
|
3713
3714
|
"stroke-width": "2",
|
|
3714
3715
|
"stroke-linecap": "round",
|
|
3715
3716
|
"stroke-linejoin": "round"
|
|
3716
|
-
}, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8,
|
|
3717
|
+
}, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, Vo)),
|
|
3717
3718
|
e.readOnly ? T("", !0) : (N(), E("button", {
|
|
3718
3719
|
key: 1,
|
|
3719
3720
|
class: "docx-hyperlink-popup__btn",
|
|
3720
3721
|
title: L(n)("removeLink"),
|
|
3721
3722
|
onClick: i[1] ||= z((e) => t.$emit("remove"), ["prevent"])
|
|
3722
|
-
}, [...i[9] ||= [de("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-a7918e6a></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8,
|
|
3723
|
+
}, [...i[9] ||= [de("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-a7918e6a></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8, Ho))
|
|
3723
3724
|
], 64))], 38)) : T("", !0);
|
|
3724
3725
|
}
|
|
3725
|
-
}), [["__scopeId", "data-v-a7918e6a"]]),
|
|
3726
|
-
key:
|
|
3727
|
-
class: "docx-editor-vue__locale-loading docx-editor-vue__error",
|
|
3728
|
-
role: "alert"
|
|
3729
|
-
}, qo = { class: "docx-editor-vue__toolbar-shell" }, Jo = {
|
|
3730
|
-
key: 2,
|
|
3726
|
+
}), [["__scopeId", "data-v-a7918e6a"]]), Yo = ["data-folio-locale-pending", "aria-busy"], Xo = { class: "docx-editor-vue__toolbar-shell" }, Zo = {
|
|
3727
|
+
key: 1,
|
|
3731
3728
|
class: "docx-editor-vue__error"
|
|
3732
|
-
},
|
|
3733
|
-
key:
|
|
3729
|
+
}, Qo = {
|
|
3730
|
+
key: 2,
|
|
3734
3731
|
class: "docx-editor-vue__loading"
|
|
3735
|
-
},
|
|
3736
|
-
key:
|
|
3732
|
+
}, $o = {
|
|
3733
|
+
key: 3,
|
|
3737
3734
|
class: "docx-editor-vue__placeholder"
|
|
3738
|
-
},
|
|
3739
|
-
key:
|
|
3735
|
+
}, es = {
|
|
3736
|
+
key: 4,
|
|
3740
3737
|
class: "docx-editor-vue__notice",
|
|
3741
3738
|
role: "status"
|
|
3742
|
-
},
|
|
3739
|
+
}, ts = [
|
|
3743
3740
|
"data-folio-panel-tier",
|
|
3744
3741
|
"data-folio-outline",
|
|
3745
3742
|
"data-folio-comments"
|
|
3746
|
-
],
|
|
3743
|
+
], ns = {
|
|
3747
3744
|
key: 1,
|
|
3748
3745
|
class: "docx-editor-vue__ruler-v"
|
|
3749
|
-
},
|
|
3746
|
+
}, rs = {
|
|
3750
3747
|
class: "docx-editor-vue__editor-content-wrapper",
|
|
3751
3748
|
style: {
|
|
3752
3749
|
position: "relative",
|
|
@@ -3754,11 +3751,11 @@ var ma = (e) => {
|
|
|
3754
3751
|
flexDirection: "column",
|
|
3755
3752
|
minHeight: "100%"
|
|
3756
3753
|
}
|
|
3757
|
-
},
|
|
3754
|
+
}, is = {
|
|
3758
3755
|
"data-testid": "selection-overlay",
|
|
3759
3756
|
class: "docx-editor-vue__decoration-origin",
|
|
3760
3757
|
"aria-hidden": "true"
|
|
3761
|
-
},
|
|
3758
|
+
}, as = ["aria-label"], os = { class: "docx-editor-vue__note-editor-header" }, ss = ["aria-label"], cs = ["aria-label"], ls = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
3762
3759
|
__name: "DocxEditor",
|
|
3763
3760
|
props: {
|
|
3764
3761
|
documentBuffer: { default: null },
|
|
@@ -3902,20 +3899,20 @@ var ma = (e) => {
|
|
|
3902
3899
|
],
|
|
3903
3900
|
setup(e, { expose: t, emit: i }) {
|
|
3904
3901
|
let l = k({
|
|
3905
|
-
loader: () => import("./HorizontalRuler-
|
|
3902
|
+
loader: () => import("./HorizontalRuler-Ya0NQqx3.js").then((e) => e.n),
|
|
3906
3903
|
delay: 0,
|
|
3907
3904
|
loadingComponent: { render: () => pe("div", {
|
|
3908
3905
|
"aria-hidden": "true",
|
|
3909
3906
|
style: { height: `${Ot}px` }
|
|
3910
3907
|
}) }
|
|
3911
|
-
}), u = k(() => import("./VerticalRuler-
|
|
3908
|
+
}), u = k(() => import("./VerticalRuler-BavScWGg.js").then((e) => e.n)), d = k(() => import("./ImageSelectionOverlay-BNwMBeYP.js")), f = e, p = f.plugins ?? [], h = i;
|
|
3912
3909
|
g(f.components);
|
|
3913
3910
|
let _ = n();
|
|
3914
|
-
|
|
3911
|
+
ga(_);
|
|
3915
3912
|
function y(e) {
|
|
3916
3913
|
f.onChange?.(e), h("change", e), h("update:document", e);
|
|
3917
3914
|
}
|
|
3918
|
-
let { message: ee, show: te } =
|
|
3915
|
+
let { message: ee, show: te } = xa();
|
|
3919
3916
|
function oe(e) {
|
|
3920
3917
|
Me.is(e) && te(bt(e.ground, F)), f.onError?.(e), h("error", e);
|
|
3921
3918
|
}
|
|
@@ -3946,7 +3943,7 @@ var ma = (e) => {
|
|
|
3946
3943
|
function qt(e) {
|
|
3947
3944
|
f.enableWheelZoom !== !1 && Wt(e);
|
|
3948
3945
|
}
|
|
3949
|
-
|
|
3946
|
+
Qi({
|
|
3950
3947
|
showFindReplace: ct,
|
|
3951
3948
|
showHyperlink: ut,
|
|
3952
3949
|
handleZoomKeyDown: Gt,
|
|
@@ -4019,14 +4016,14 @@ var ma = (e) => {
|
|
|
4019
4016
|
function On() {
|
|
4020
4017
|
Y.value && (Be(), ze(), Sn());
|
|
4021
4018
|
}
|
|
4022
|
-
|
|
4019
|
+
Ji({
|
|
4023
4020
|
isReady: $t,
|
|
4024
4021
|
sourceBuffer: () => an.value,
|
|
4025
4022
|
fonts: () => f.fonts,
|
|
4026
4023
|
remeasure: On,
|
|
4027
4024
|
setEmbeddedFontFamilies: Cn
|
|
4028
4025
|
});
|
|
4029
|
-
let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } =
|
|
4026
|
+
let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } = Zi({
|
|
4030
4027
|
editorView: X,
|
|
4031
4028
|
zoom: K,
|
|
4032
4029
|
stateTick: H,
|
|
@@ -4035,7 +4032,7 @@ var ma = (e) => {
|
|
|
4035
4032
|
R(kn, (e) => {
|
|
4036
4033
|
e && (Pn.value = !0);
|
|
4037
4034
|
}, { flush: "sync" });
|
|
4038
|
-
let Fn =
|
|
4035
|
+
let Fn = ya({
|
|
4039
4036
|
editorView: Y,
|
|
4040
4037
|
hiddenContainer: Ke,
|
|
4041
4038
|
pagesRef: B,
|
|
@@ -4045,18 +4042,18 @@ var ma = (e) => {
|
|
|
4045
4042
|
syncCoordinator: ln,
|
|
4046
4043
|
imageInteracting: An
|
|
4047
4044
|
});
|
|
4048
|
-
|
|
4045
|
+
va({
|
|
4049
4046
|
pagesRef: B,
|
|
4050
4047
|
remoteSelections: Xt,
|
|
4051
4048
|
syncCoordinator: ln,
|
|
4052
4049
|
zoom: K
|
|
4053
4050
|
});
|
|
4054
|
-
let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } =
|
|
4051
|
+
let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } = Xi({
|
|
4055
4052
|
editorView: X,
|
|
4056
4053
|
getCommands: xn
|
|
4057
4054
|
}), Hn = r({ runCommand: (e, t) => {
|
|
4058
4055
|
e === Y.value ? J.executeCommand(t) : U(e, t);
|
|
4059
|
-
} }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } =
|
|
4056
|
+
} }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } = ma({
|
|
4060
4057
|
editorView: Y,
|
|
4061
4058
|
pagesRef: B,
|
|
4062
4059
|
pagesViewportRef: tt,
|
|
@@ -4102,7 +4099,7 @@ var ma = (e) => {
|
|
|
4102
4099
|
R(Wn, (e) => {
|
|
4103
4100
|
Pt.value = e?.rId ?? null, e && Fn.clearOverlay();
|
|
4104
4101
|
}, { immediate: !0 });
|
|
4105
|
-
let ar =
|
|
4102
|
+
let ar = $i({
|
|
4106
4103
|
editorView: Y,
|
|
4107
4104
|
showOutline: kt,
|
|
4108
4105
|
showSidebar: W,
|
|
@@ -4110,7 +4107,7 @@ var ma = (e) => {
|
|
|
4110
4107
|
activeSidebarItem: Nt,
|
|
4111
4108
|
extractCommentsAndChanges: () => {},
|
|
4112
4109
|
scrollToVisiblePosition: Jn
|
|
4113
|
-
}), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } =
|
|
4110
|
+
}), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } = Pi({
|
|
4114
4111
|
editorView: X,
|
|
4115
4112
|
selectedImage: kn,
|
|
4116
4113
|
zoom: K,
|
|
@@ -4125,7 +4122,7 @@ var ma = (e) => {
|
|
|
4125
4122
|
onCopy: () => f.onCopy?.(),
|
|
4126
4123
|
onCut: () => f.onCut?.(),
|
|
4127
4124
|
onPaste: () => f.onPaste?.()
|
|
4128
|
-
}), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z =
|
|
4125
|
+
}), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z = Ci({
|
|
4129
4126
|
editor: J,
|
|
4130
4127
|
editorView: Y,
|
|
4131
4128
|
getDocument: pn,
|
|
@@ -4139,7 +4136,7 @@ var ma = (e) => {
|
|
|
4139
4136
|
reLayout: Sn,
|
|
4140
4137
|
readOnly: () => A.value,
|
|
4141
4138
|
onReadOnlyEditAttempt: me
|
|
4142
|
-
}), gr = Z.comments, Q =
|
|
4139
|
+
}), gr = Z.comments, Q = Si({
|
|
4143
4140
|
editorView: Y,
|
|
4144
4141
|
pagesViewport: tt,
|
|
4145
4142
|
pagesContainer: B,
|
|
@@ -4187,7 +4184,7 @@ var ma = (e) => {
|
|
|
4187
4184
|
function wr(e) {
|
|
4188
4185
|
navigator.clipboard?.writeText(e), In.value = null;
|
|
4189
4186
|
}
|
|
4190
|
-
let Tr = S(() =>
|
|
4187
|
+
let Tr = S(() => _i(rn.value)), Er = S(() => Tr.value.sectionProperties), Dr = S(() => Tr.value.watermark), Or = S(() => Tr.value.styles), kr = S(() => {
|
|
4191
4188
|
H.value;
|
|
4192
4189
|
let e = X.value;
|
|
4193
4190
|
if (!e) return {};
|
|
@@ -4260,7 +4257,7 @@ var ma = (e) => {
|
|
|
4260
4257
|
transform: K.value === 1 ? void 0 : `scale(${K.value})`,
|
|
4261
4258
|
transformOrigin: "top center",
|
|
4262
4259
|
transition: "transform 0.2s ease"
|
|
4263
|
-
})), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } =
|
|
4260
|
+
})), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } = Yi({
|
|
4264
4261
|
editorView: X,
|
|
4265
4262
|
getDocument: Tn
|
|
4266
4263
|
});
|
|
@@ -4301,7 +4298,7 @@ var ma = (e) => {
|
|
|
4301
4298
|
let e = Y.value;
|
|
4302
4299
|
e && (pt(e, { title: F("toolbar.tableOfContents") }), e.focus());
|
|
4303
4300
|
}
|
|
4304
|
-
let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange: ci, handleFirstLineIndentChange: li, handleTabStopRemove: ui } =
|
|
4301
|
+
let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange: ci, handleFirstLineIndentChange: li, handleTabStopRemove: ui } = ea({
|
|
4305
4302
|
editorView: X,
|
|
4306
4303
|
getDocument: pn,
|
|
4307
4304
|
readOnly: A,
|
|
@@ -4326,7 +4323,7 @@ var ma = (e) => {
|
|
|
4326
4323
|
function fi(e) {
|
|
4327
4324
|
b.value !== e && (b.value = e, f.onModeChange?.(e), h("mode-change", e));
|
|
4328
4325
|
}
|
|
4329
|
-
function
|
|
4326
|
+
function pi(e) {
|
|
4330
4327
|
switch (e) {
|
|
4331
4328
|
case "find":
|
|
4332
4329
|
case "findReplace":
|
|
@@ -4366,42 +4363,42 @@ var ma = (e) => {
|
|
|
4366
4363
|
}
|
|
4367
4364
|
h("menu-action", e);
|
|
4368
4365
|
}
|
|
4369
|
-
function
|
|
4366
|
+
function mi(e) {
|
|
4370
4367
|
if (A.value) return;
|
|
4371
4368
|
let t = pn();
|
|
4372
4369
|
t && J.applyCanonicalOperations(je(t, e)) && (_n(), Sn());
|
|
4373
4370
|
}
|
|
4374
|
-
function
|
|
4371
|
+
function hi(e, t) {
|
|
4375
4372
|
$r(e, t);
|
|
4376
4373
|
}
|
|
4377
|
-
function
|
|
4374
|
+
function gi(e) {
|
|
4378
4375
|
let t = X.value, n = xn().setNumberingValue;
|
|
4379
4376
|
!A.value && t && n && (U(t, n(e)), t.focus());
|
|
4380
4377
|
}
|
|
4381
|
-
function
|
|
4378
|
+
function vi(e) {
|
|
4382
4379
|
let t = X.value, n = xn().setTableProperties;
|
|
4383
4380
|
t && n && (U(t, n(e)), t.focus());
|
|
4384
4381
|
}
|
|
4385
|
-
let
|
|
4386
|
-
|
|
4382
|
+
let yi = P(!1);
|
|
4383
|
+
Fi({
|
|
4387
4384
|
documentBuffer: () => f.documentBuffer ?? null,
|
|
4388
4385
|
document: () => f.document ?? null,
|
|
4389
4386
|
loadDocumentBuffer: un,
|
|
4390
4387
|
loadDocument: dn,
|
|
4391
|
-
sidebarAutoOpenedRef:
|
|
4388
|
+
sidebarAutoOpenedRef: yi
|
|
4392
4389
|
}), R(() => f.mode, (e) => {
|
|
4393
4390
|
e && e !== b.value && (b.value = e);
|
|
4394
4391
|
}), R(() => f.showOutline, (e) => {
|
|
4395
4392
|
kt.value = !!e, ar.recomputeHeadingsIfOpen();
|
|
4396
4393
|
});
|
|
4397
|
-
let
|
|
4398
|
-
function
|
|
4394
|
+
let bi = P(!1);
|
|
4395
|
+
function xi(e) {
|
|
4399
4396
|
let t = e.currentTarget;
|
|
4400
4397
|
t instanceof HTMLElement && f.onScrollTopChange?.(t.scrollTop), Vr();
|
|
4401
4398
|
}
|
|
4402
4399
|
function wi() {
|
|
4403
|
-
if (f.initialScrollTop === void 0 ||
|
|
4404
|
-
|
|
4400
|
+
if (f.initialScrollTop === void 0 || bi.value) return;
|
|
4401
|
+
bi.value = !0;
|
|
4405
4402
|
let e = f.initialScrollTop;
|
|
4406
4403
|
requestAnimationFrame(() => {
|
|
4407
4404
|
V.value && Ye(V.value, {
|
|
@@ -4411,7 +4408,7 @@ var ma = (e) => {
|
|
|
4411
4408
|
});
|
|
4412
4409
|
}
|
|
4413
4410
|
R($t, (e) => {
|
|
4414
|
-
e || (
|
|
4411
|
+
e || (bi.value = !1, Ye(V.value, {
|
|
4415
4412
|
top: 0,
|
|
4416
4413
|
left: 0,
|
|
4417
4414
|
behavior: "instant"
|
|
@@ -4422,7 +4419,7 @@ var ma = (e) => {
|
|
|
4422
4419
|
let t = Tn();
|
|
4423
4420
|
t && f.onCompatibilityChange?.(Ne(t)), wi(), h("ready");
|
|
4424
4421
|
}), R([$t, Fr], ([e, t]) => {
|
|
4425
|
-
e && t !== 0 && f.autoOpenReviewSidebar !== !1 && !
|
|
4422
|
+
e && t !== 0 && f.autoOpenReviewSidebar !== !1 && !yi.value && (yi.value = !0, W.value = !0);
|
|
4426
4423
|
}), ve(() => {
|
|
4427
4424
|
let e = () => {
|
|
4428
4425
|
let e = nt.value, t = V.value;
|
|
@@ -4478,7 +4475,7 @@ var ma = (e) => {
|
|
|
4478
4475
|
}), R($t, (e) => {
|
|
4479
4476
|
e || Ti.clear();
|
|
4480
4477
|
});
|
|
4481
|
-
let { exposed: Ei } =
|
|
4478
|
+
let { exposed: Ei } = Li({
|
|
4482
4479
|
getReadOnlyReason: () => de.value,
|
|
4483
4480
|
markupView: C,
|
|
4484
4481
|
editor: J,
|
|
@@ -4559,15 +4556,15 @@ var ma = (e) => {
|
|
|
4559
4556
|
"data-folio-locale-pending": !we.value || void 0,
|
|
4560
4557
|
"aria-busy": L(Ce).type === "loading" || void 0
|
|
4561
4558
|
}, [
|
|
4562
|
-
|
|
4563
|
-
key:
|
|
4559
|
+
we.value ? T("", !0) : (N(), w(L(Sa), {
|
|
4560
|
+
key: 0,
|
|
4564
4561
|
class: "docx-editor-vue__locale-loading"
|
|
4565
4562
|
})),
|
|
4566
|
-
D("div",
|
|
4563
|
+
D("div", Xo, [O(Qa, {
|
|
4567
4564
|
"show-table-insert": f.showTableInsert !== !1,
|
|
4568
4565
|
onRename: n[0] ||= (e) => h("rename", e),
|
|
4569
|
-
onMenuAction:
|
|
4570
|
-
onInsertTable:
|
|
4566
|
+
onMenuAction: pi,
|
|
4567
|
+
onInsertTable: hi
|
|
4571
4568
|
}, {
|
|
4572
4569
|
"title-bar-left": De(() => [xe(t.$slots, "title-bar-left", {}, void 0, !0)]),
|
|
4573
4570
|
"title-bar-right": De(() => [xe(t.$slots, "title-bar-right", {}, void 0, !0)]),
|
|
@@ -4637,7 +4634,7 @@ var ma = (e) => {
|
|
|
4637
4634
|
}, null, 8, ["node"])) : T("", !0)], !0)]),
|
|
4638
4635
|
key: "0"
|
|
4639
4636
|
} : void 0]), 1040, /* @__PURE__ */ "view.get-commands.state-tick.can-undo.can-redo.zoom-percent.is-min-zoom.is-max-zoom.zoom-presets.show-zoom-control.editor-mode.show-review-controls.track-changes-on.display-mode.read-only.comments-sidebar-open.outline-drawer.outline-drawer-open.comment-count.image-context.theme.onApplyStyle.onZoomIn.onZoomOut.onZoomSet.onImageWrapType.onImageTransform".split("."))) : T("", !0)]),
|
|
4640
|
-
O(
|
|
4637
|
+
O(qa, {
|
|
4641
4638
|
search: L(Ti),
|
|
4642
4639
|
"show-find-replace": ct.value,
|
|
4643
4640
|
"onUpdate:showFindReplace": n[7] ||= (e) => ct.value = e,
|
|
@@ -4665,9 +4662,9 @@ var ma = (e) => {
|
|
|
4665
4662
|
onHyperlinkSubmit: L(Ln),
|
|
4666
4663
|
onHyperlinkRemove: L(Rn),
|
|
4667
4664
|
onPageSetupApply: L(ni),
|
|
4668
|
-
onTablePropertiesApply:
|
|
4669
|
-
onWatermarkApply:
|
|
4670
|
-
onNumberingValueApply:
|
|
4665
|
+
onTablePropertiesApply: vi,
|
|
4666
|
+
onWatermarkApply: mi,
|
|
4667
|
+
onNumberingValueApply: gi
|
|
4671
4668
|
}, null, 8, [
|
|
4672
4669
|
"search",
|
|
4673
4670
|
"show-find-replace",
|
|
@@ -4689,14 +4686,14 @@ var ma = (e) => {
|
|
|
4689
4686
|
"onHyperlinkRemove",
|
|
4690
4687
|
"onPageSetupApply"
|
|
4691
4688
|
]),
|
|
4692
|
-
L(tn) ? (N(), E("div",
|
|
4689
|
+
L(tn) ? (N(), E("div", Zo, I(L(tn)), 1)) : we.value && Dn.value ? (N(), E("div", Qo, [xe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (N(), w(Te, {
|
|
4693
4690
|
key: 0,
|
|
4694
4691
|
node: e.loadingIndicator
|
|
4695
|
-
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div",
|
|
4692
|
+
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div", $o, [xe(t.$slots, "placeholder", {}, () => [e.placeholder ? (N(), w(Te, {
|
|
4696
4693
|
key: 0,
|
|
4697
4694
|
node: e.placeholder
|
|
4698
4695
|
}, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe("No document loaded")], 64))], !0)])) : T("", !0),
|
|
4699
|
-
L(ee) ? (N(), E("div",
|
|
4696
|
+
L(ee) ? (N(), E("div", es, I(L(ee)), 1)) : T("", !0),
|
|
4700
4697
|
D("div", { class: j(["docx-editor-vue__hidden-pm-wrapper", L(Ie)]) }, [D("div", {
|
|
4701
4698
|
ref_key: "hiddenPmRef",
|
|
4702
4699
|
ref: Ke,
|
|
@@ -4716,7 +4713,7 @@ var ma = (e) => {
|
|
|
4716
4713
|
"data-folio-outline": $.value.outline,
|
|
4717
4714
|
"data-folio-comments": $.value.comments
|
|
4718
4715
|
}, [
|
|
4719
|
-
$.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(
|
|
4716
|
+
$.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(Ka, {
|
|
4720
4717
|
key: 0,
|
|
4721
4718
|
headings: Rt.value,
|
|
4722
4719
|
available: Lt.value.length > 1,
|
|
@@ -4747,7 +4744,7 @@ var ma = (e) => {
|
|
|
4747
4744
|
ref: V,
|
|
4748
4745
|
class: "docx-editor-vue__editor-scroll",
|
|
4749
4746
|
"data-folio-scroll": "",
|
|
4750
|
-
onScroll:
|
|
4747
|
+
onScroll: xi
|
|
4751
4748
|
}, [D("div", {
|
|
4752
4749
|
class: "docx-editor-vue__editor-area",
|
|
4753
4750
|
style: M(Ir.value)
|
|
@@ -4791,7 +4788,7 @@ var ma = (e) => {
|
|
|
4791
4788
|
"onFirstLineIndentChange",
|
|
4792
4789
|
"onTabStopRemove"
|
|
4793
4790
|
])], 4)) : T("", !0),
|
|
4794
|
-
ot.value && !A.value ? (N(), E("div",
|
|
4791
|
+
ot.value && !A.value ? (N(), E("div", ns, [O(L(u), {
|
|
4795
4792
|
"section-props": Er.value,
|
|
4796
4793
|
zoom: L(K),
|
|
4797
4794
|
unit: e.rulerUnit ?? "inch",
|
|
@@ -4819,14 +4816,14 @@ var ma = (e) => {
|
|
|
4819
4816
|
onDblclick: n[27] ||= (...e) => L(Qn) && L(Qn)(...e),
|
|
4820
4817
|
onContextmenu: n[28] ||= z((...e) => L(ur) && L(ur)(...e), ["prevent"])
|
|
4821
4818
|
}, [
|
|
4822
|
-
D("div",
|
|
4819
|
+
D("div", rs, [
|
|
4823
4820
|
D("div", {
|
|
4824
4821
|
ref_key: "pagesRef",
|
|
4825
4822
|
ref: B,
|
|
4826
4823
|
class: j(["docx-editor-vue__pages paged-editor__pages", L(Wn) ? `paged-editor--hf-editing paged-editor--editing-${L(Wn).position}` : ""]),
|
|
4827
4824
|
style: M(qr.value)
|
|
4828
4825
|
}, null, 6),
|
|
4829
|
-
O(
|
|
4826
|
+
O(To, {
|
|
4830
4827
|
"editor-view": rr(),
|
|
4831
4828
|
"hidden-container": Je.value,
|
|
4832
4829
|
"pages-container": B.value,
|
|
@@ -4839,8 +4836,8 @@ var ma = (e) => {
|
|
|
4839
4836
|
"selection",
|
|
4840
4837
|
"zoom"
|
|
4841
4838
|
]),
|
|
4842
|
-
D("div",
|
|
4843
|
-
O(
|
|
4839
|
+
D("div", is, [
|
|
4840
|
+
O(wa, {
|
|
4844
4841
|
"get-highlights": wn,
|
|
4845
4842
|
"get-pages-container": () => B.value,
|
|
4846
4843
|
"editor-state": L(Yt),
|
|
@@ -4866,7 +4863,7 @@ var ma = (e) => {
|
|
|
4866
4863
|
"selected-canonical",
|
|
4867
4864
|
"selection-seq"
|
|
4868
4865
|
]),
|
|
4869
|
-
O(
|
|
4866
|
+
O(Ao, {
|
|
4870
4867
|
range: at.value,
|
|
4871
4868
|
"get-pages-container": () => B.value,
|
|
4872
4869
|
zoom: L(K),
|
|
@@ -4881,7 +4878,7 @@ var ma = (e) => {
|
|
|
4881
4878
|
"blocks",
|
|
4882
4879
|
"measures"
|
|
4883
4880
|
]),
|
|
4884
|
-
f.showTemplateDirectives ? (N(), w(
|
|
4881
|
+
f.showTemplateDirectives ? (N(), w(Ro, {
|
|
4885
4882
|
key: 0,
|
|
4886
4883
|
"get-view": () => L(Y),
|
|
4887
4884
|
"get-pages-container": () => B.value,
|
|
@@ -4899,7 +4896,7 @@ var ma = (e) => {
|
|
|
4899
4896
|
"blocks",
|
|
4900
4897
|
"measures"
|
|
4901
4898
|
])) : T("", !0),
|
|
4902
|
-
O(
|
|
4899
|
+
O(Oa, {
|
|
4903
4900
|
"get-pages-container": () => B.value,
|
|
4904
4901
|
"editor-state": L(Yt),
|
|
4905
4902
|
zoom: L(K),
|
|
@@ -4914,7 +4911,7 @@ var ma = (e) => {
|
|
|
4914
4911
|
"suggestion",
|
|
4915
4912
|
"editor-position-at"
|
|
4916
4913
|
]),
|
|
4917
|
-
O(
|
|
4914
|
+
O(Na, {
|
|
4918
4915
|
"get-view": () => L(Y),
|
|
4919
4916
|
"get-pages-container": () => B.value,
|
|
4920
4917
|
zoom: L(K),
|
|
@@ -4929,7 +4926,7 @@ var ma = (e) => {
|
|
|
4929
4926
|
])
|
|
4930
4927
|
])
|
|
4931
4928
|
]),
|
|
4932
|
-
L(Wn) ? (N(), w(
|
|
4929
|
+
L(Wn) ? (N(), w(Do, {
|
|
4933
4930
|
key: 0,
|
|
4934
4931
|
edit: L(Wn),
|
|
4935
4932
|
"get-view": rr,
|
|
@@ -4944,15 +4941,15 @@ var ma = (e) => {
|
|
|
4944
4941
|
class: "docx-editor-vue__note-editor",
|
|
4945
4942
|
"aria-label": En.value,
|
|
4946
4943
|
onKeydown: n[17] ||= ke(z((...e) => L(yn) && L(yn)(...e), ["stop", "prevent"]), ["esc"])
|
|
4947
|
-
}, [D("header",
|
|
4944
|
+
}, [D("header", os, [D("span", null, I(En.value), 1), D("button", {
|
|
4948
4945
|
type: "button",
|
|
4949
4946
|
"aria-label": L(F)("common.closeDialog"),
|
|
4950
4947
|
onClick: n[16] ||= (...e) => L(yn) && L(yn)(...e)
|
|
4951
|
-
}, " × ", 8,
|
|
4948
|
+
}, " × ", 8, ss)]), D("div", {
|
|
4952
4949
|
ref_key: "notePmRef",
|
|
4953
4950
|
ref: Ft,
|
|
4954
4951
|
class: "docx-editor-vue__note-editor-host"
|
|
4955
|
-
}, null, 512)], 40,
|
|
4952
|
+
}, null, 512)], 40, as), [[Ee, L(Qt)]]),
|
|
4956
4953
|
Pn.value ? (N(), w(L(d), {
|
|
4957
4954
|
key: 1,
|
|
4958
4955
|
"image-info": L(kn),
|
|
@@ -4968,7 +4965,7 @@ var ma = (e) => {
|
|
|
4968
4965
|
"view",
|
|
4969
4966
|
"onContextMenu"
|
|
4970
4967
|
])) : T("", !0),
|
|
4971
|
-
O(
|
|
4968
|
+
O(Jo, {
|
|
4972
4969
|
data: L(In),
|
|
4973
4970
|
"read-only": A.value,
|
|
4974
4971
|
onNavigate: L(zn),
|
|
@@ -4993,7 +4990,7 @@ var ma = (e) => {
|
|
|
4993
4990
|
}),
|
|
4994
4991
|
"aria-label": L(Un).type === "row" ? "Insert row" : "Insert column",
|
|
4995
4992
|
onMousedown: n[22] ||= (...e) => L($n) && L($n)(...e)
|
|
4996
|
-
}, " + ", 44,
|
|
4993
|
+
}, " + ", 44, cs)) : T("", !0),
|
|
4997
4994
|
O(ne, {
|
|
4998
4995
|
comments: L(gr),
|
|
4999
4996
|
"pages-container": B.value,
|
|
@@ -5071,7 +5068,7 @@ var ma = (e) => {
|
|
|
5071
5068
|
size: 18
|
|
5072
5069
|
})], 36)) : T("", !0)
|
|
5073
5070
|
], 36),
|
|
5074
|
-
L(Gn).totalPages > 1 ? (N(), w(
|
|
5071
|
+
L(Gn).totalPages > 1 ? (N(), w(Oo, {
|
|
5075
5072
|
key: 2,
|
|
5076
5073
|
"current-page": L(Gn).currentPage,
|
|
5077
5074
|
"total-pages": L(Gn).totalPages,
|
|
@@ -5089,8 +5086,8 @@ var ma = (e) => {
|
|
|
5089
5086
|
"aria-hidden": "true",
|
|
5090
5087
|
onMousedown: z(Hr, ["prevent"])
|
|
5091
5088
|
}, null, 32)) : T("", !0)
|
|
5092
|
-
], 8,
|
|
5093
|
-
O(
|
|
5089
|
+
], 8, ts),
|
|
5090
|
+
O(wo, {
|
|
5094
5091
|
"read-only": A.value,
|
|
5095
5092
|
"context-menu": L(or),
|
|
5096
5093
|
"image-context-menu": L(sr),
|
|
@@ -5112,7 +5109,7 @@ var ma = (e) => {
|
|
|
5112
5109
|
"onContextMenuAction",
|
|
5113
5110
|
"onImageWrapSelect"
|
|
5114
5111
|
]),
|
|
5115
|
-
O(
|
|
5112
|
+
O(Ma, {
|
|
5116
5113
|
"event-root": A.value ? null : B.value,
|
|
5117
5114
|
view: L(Y),
|
|
5118
5115
|
onRefused: L(te)
|
|
@@ -5121,38 +5118,38 @@ var ma = (e) => {
|
|
|
5121
5118
|
"view",
|
|
5122
5119
|
"onRefused"
|
|
5123
5120
|
])
|
|
5124
|
-
], 14,
|
|
5121
|
+
], 14, Yo));
|
|
5125
5122
|
}
|
|
5126
|
-
}), [["__scopeId", "data-v-
|
|
5123
|
+
}), [["__scopeId", "data-v-785d26b8"]]);
|
|
5127
5124
|
// src/utils/listState.ts
|
|
5128
|
-
function
|
|
5125
|
+
function us() {
|
|
5129
5126
|
return V;
|
|
5130
5127
|
}
|
|
5131
5128
|
// src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
|
|
5132
|
-
var
|
|
5129
|
+
var ds = ["aria-label"], fs = ["aria-label"], ps = [
|
|
5133
5130
|
"disabled",
|
|
5134
5131
|
"title",
|
|
5135
5132
|
"aria-label"
|
|
5136
|
-
],
|
|
5133
|
+
], ms = [
|
|
5137
5134
|
"disabled",
|
|
5138
5135
|
"title",
|
|
5139
5136
|
"aria-label"
|
|
5140
|
-
],
|
|
5137
|
+
], hs = ["aria-label"], gs = [
|
|
5141
5138
|
"disabled",
|
|
5142
5139
|
"title",
|
|
5143
5140
|
"aria-label",
|
|
5144
5141
|
"aria-pressed"
|
|
5145
|
-
],
|
|
5142
|
+
], _s = [
|
|
5146
5143
|
"disabled",
|
|
5147
5144
|
"title",
|
|
5148
5145
|
"aria-label",
|
|
5149
5146
|
"aria-pressed"
|
|
5150
|
-
],
|
|
5147
|
+
], vs = [
|
|
5151
5148
|
"disabled",
|
|
5152
5149
|
"title",
|
|
5153
5150
|
"aria-label",
|
|
5154
5151
|
"aria-pressed"
|
|
5155
|
-
],
|
|
5152
|
+
], ys = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
5156
5153
|
__name: "FormattingBar",
|
|
5157
5154
|
props: {
|
|
5158
5155
|
currentFormatting: {},
|
|
@@ -5194,7 +5191,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5194
5191
|
"redo"
|
|
5195
5192
|
],
|
|
5196
5193
|
setup(e, { emit: t }) {
|
|
5197
|
-
let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ??
|
|
5194
|
+
let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ?? us()), l = S(() => {
|
|
5198
5195
|
let e = o.value.color;
|
|
5199
5196
|
return e ? e.replace(/^#/, "").toUpperCase() : void 0;
|
|
5200
5197
|
}), f = S(() => ht(c.value) > 0 || (o.value.indentLeft ?? 0) > 0);
|
|
@@ -5224,7 +5221,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5224
5221
|
}, [O(m, {
|
|
5225
5222
|
name: "undo",
|
|
5226
5223
|
size: 18
|
|
5227
|
-
})], 40,
|
|
5224
|
+
})], 40, ps), D("button", {
|
|
5228
5225
|
type: "button",
|
|
5229
5226
|
class: "docx-formatting-bar__btn",
|
|
5230
5227
|
disabled: e.disabled || !e.canRedo,
|
|
@@ -5234,7 +5231,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5234
5231
|
}, [O(m, {
|
|
5235
5232
|
name: "redo",
|
|
5236
5233
|
size: 18
|
|
5237
|
-
})], 40,
|
|
5234
|
+
})], 40, ms)], 8, fs),
|
|
5238
5235
|
r[13] ||= D("span", {
|
|
5239
5236
|
class: "docx-formatting-bar__divider",
|
|
5240
5237
|
role: "separator"
|
|
@@ -5265,7 +5262,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5265
5262
|
}, [O(m, {
|
|
5266
5263
|
name: "format_bold",
|
|
5267
5264
|
size: 18
|
|
5268
|
-
})], 42,
|
|
5265
|
+
})], 42, gs),
|
|
5269
5266
|
D("button", {
|
|
5270
5267
|
type: "button",
|
|
5271
5268
|
class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.italic }]),
|
|
@@ -5277,7 +5274,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5277
5274
|
}, [O(m, {
|
|
5278
5275
|
name: "format_italic",
|
|
5279
5276
|
size: 18
|
|
5280
|
-
})], 42,
|
|
5277
|
+
})], 42, _s),
|
|
5281
5278
|
D("button", {
|
|
5282
5279
|
type: "button",
|
|
5283
5280
|
class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.underline }]),
|
|
@@ -5289,8 +5286,8 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5289
5286
|
}, [O(m, {
|
|
5290
5287
|
name: "format_underlined",
|
|
5291
5288
|
size: 18
|
|
5292
|
-
})], 42,
|
|
5293
|
-
], 8,
|
|
5289
|
+
})], 42, vs)
|
|
5290
|
+
], 8, hs),
|
|
5294
5291
|
e.showTextColorPicker ? (N(), E(x, { key: 1 }, [r[12] ||= D("span", {
|
|
5295
5292
|
class: "docx-formatting-bar__divider",
|
|
5296
5293
|
role: "separator"
|
|
@@ -5332,9 +5329,9 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5332
5329
|
"disabled",
|
|
5333
5330
|
"can-outdent"
|
|
5334
5331
|
])) : T("", !0)
|
|
5335
|
-
], 10,
|
|
5332
|
+
], 10, ds));
|
|
5336
5333
|
}
|
|
5337
|
-
}), [["__scopeId", "data-v-ad0aef02"]]),
|
|
5334
|
+
}), [["__scopeId", "data-v-ad0aef02"]]), bs = [
|
|
5338
5335
|
{
|
|
5339
5336
|
value: .5,
|
|
5340
5337
|
label: "50%"
|
|
@@ -5359,7 +5356,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5359
5356
|
value: 2,
|
|
5360
5357
|
label: "200%"
|
|
5361
5358
|
}
|
|
5362
|
-
],
|
|
5359
|
+
], xs = /*#__PURE__*/ p(/* @__PURE__ */ A({
|
|
5363
5360
|
__name: "ZoomControl",
|
|
5364
5361
|
props: {
|
|
5365
5362
|
value: { default: 1 },
|
|
@@ -5376,7 +5373,7 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5376
5373
|
},
|
|
5377
5374
|
emits: ["change"],
|
|
5378
5375
|
setup(e, { emit: t }) {
|
|
5379
|
-
let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ??
|
|
5376
|
+
let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ?? bs), o = S(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = S(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = S(() => o.value ? String(o.value.value) : String(r.value)), l = S(() => {
|
|
5380
5377
|
let e = a.value.map((e) => ({
|
|
5381
5378
|
value: String(e.value),
|
|
5382
5379
|
label: e.label
|
|
@@ -5404,10 +5401,10 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5404
5401
|
"disabled"
|
|
5405
5402
|
]));
|
|
5406
5403
|
}
|
|
5407
|
-
}), [["__scopeId", "data-v-8169335f"]]),
|
|
5404
|
+
}), [["__scopeId", "data-v-8169335f"]]), Ss = (e, n, r = {}) => {
|
|
5408
5405
|
let { colorMode: a = i, locale: o = "en", ...s } = r;
|
|
5409
5406
|
return new Promise((r, i) => {
|
|
5410
|
-
let c = P(null), l = null, u = !1, d = P(J(o) !== void 0), f = {
|
|
5407
|
+
let c = P(null), l = null, u = !1, d = P(J(o) !== void 0), f = P(o), p = {
|
|
5411
5408
|
save: async () => {
|
|
5412
5409
|
let e = await (c.value?.save() ?? Promise.resolve(null));
|
|
5413
5410
|
return e ? new Blob([e], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }) : null;
|
|
@@ -5428,27 +5425,27 @@ var cs = ["aria-label"], ls = ["aria-label"], us = [
|
|
|
5428
5425
|
destroy: () => {
|
|
5429
5426
|
u || (u = !0, i(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), l?.unmount(), l = null;
|
|
5430
5427
|
}
|
|
5431
|
-
},
|
|
5428
|
+
}, m = (e) => {
|
|
5432
5429
|
s.onError?.(e), u || (u = !0, l?.unmount(), l = null, i(e));
|
|
5433
5430
|
};
|
|
5434
5431
|
l = C({ setup() {
|
|
5435
|
-
return () => d.value ? pe(
|
|
5432
|
+
return () => d.value ? pe(ls, {
|
|
5436
5433
|
...s,
|
|
5437
5434
|
documentBuffer: e,
|
|
5438
5435
|
ref: c,
|
|
5439
5436
|
onReady: () => {
|
|
5440
|
-
u || (u = !0, r(
|
|
5437
|
+
u || (u = !0, r(p));
|
|
5441
5438
|
},
|
|
5442
|
-
onError:
|
|
5443
|
-
}) : pe(
|
|
5439
|
+
onError: m
|
|
5440
|
+
}) : pe(Sa, {
|
|
5444
5441
|
class: s.className,
|
|
5445
5442
|
style: s.style
|
|
5446
5443
|
});
|
|
5447
|
-
} }), l.use(y,
|
|
5444
|
+
} }), l.use(y, f), l.use(t, a), l.mount(n), d.value || Y(o).then(() => {
|
|
5448
5445
|
d.value = !0;
|
|
5449
5446
|
}, (e) => {
|
|
5450
|
-
|
|
5447
|
+
s.onError?.(e instanceof Error ? e : Error(String(e))), f.value = "en", d.value = !0;
|
|
5451
5448
|
});
|
|
5452
5449
|
});
|
|
5453
5450
|
};
|
|
5454
|
-
export {
|
|
5451
|
+
export { Ea as AutocompleteCaretOverlay, qr as DEFAULT_AI_SUGGESTION_PRESETS, Wr as DOCUMENT_PRESET_VERSION, Gr as DOCUMENT_STYLE_SET_VERSION, ls as DocxEditor, ui as FolioMessageCatalogError, h as FolioUIProvider, ys as FormattingBar, oi as HYPHENATION_DICTIONARY_IDS, si as HyphenationDictionaryError, Vr as STELLA_STYLE_SET_NAME, xs as ZoomControl, Jr as applySuggestions, Zr as buildPositionalText, sn as clearTemplateSlashMenu, t as colorModePlugin, di as configureFolioMessageAssets, ci as configureHyphenationAssets, ai as configureTiffDecoding, cn as consumeTemplateSlashQuery, ni as createAICitationDecorationsPlugin, Kr as createDocx, Ir as createEmptyDocument, _n as createFolioAIEditSnapshot, Hr as createStellaStyleDocumentPreset, Ur as createStellaStyleSet, i as defaultColorMode, _ as defaultLocale, Xn as deriveBlockId, xn as diffWordSegments, Lr as extractDocumentStyleSet, Rr as extractDocumentStyleSetFromDocx, mi as fromMarkdown, kt as getDocumentWatermark, ei as getFolioCaretViewportRect, Zn as getFolioParaIdFromBlockId, ti as getFolioSelectionViewportRect, nn as getTemplateDirectives, ln as getTemplateSlashMenu, Tn as hashFolioAIBlockText, y as i18nPlugin, H as insertImageFromFile, ct as insertPageBreakInView, ut as insertTableInView, ft as insertTableOfContentsInView, zr as inspectDocumentStyles, Br as inspectDocumentStylesFromDocx, $n as isFolioBlockId, er as isSequentialFolioBlockId, Yr as isSuggestionStale, fi as loadFolioMessages, X as normalizeFolioAIBlockText, pi as preloadFolioMessages, li as preloadHyphenationDictionaries, l as provideColorMode, f as provideLocale, Ss as renderAsync, un as resetTemplateSlashQuery, Xr as resolveSuggestionAnchor, an as scanDirectives, Tr as scrollFolioPositionIntoView, ri as setAICitationsMeta, Qr as setAISuggestionsMeta, ii as setActiveCitationMeta, jt as setDocumentWatermark, $r as setFocusedSuggestionMeta, on as setTemplatePreviewValues, dn as templateSlashMenuKey, hi as toMarkdown, gi as toMarkdownResult, n as useColorMode, u as useTranslation, c as useWheelZoom };
|