@stll/folio-vue 0.22.3 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-Id6nLwrR.js";
2
2
  import { D as g, E as _, d as v, f as ee, i as y, n as b, r as te, t as ne, v as re, w as x, y as ie } from "./ListButtons-DjLPhg8p.js";
3
3
  import { t as ae } from "./zIndex-Ei9BbHSW.js";
4
- import { a as oe, c as se, i as ce, l as le, o as ue, r as de, s as fe, t as pe, u as me } from "./useZoom-D8Wi1XkB.js";
5
- import { FindReplaceDialog as he, FootnotePropertiesDialog as ge, HyperlinkDialog as _e, ImagePositionDialog as ve, ImagePropertiesDialog as ye, InsertImageDialog as S, InsertSymbolDialog as be, InsertTableDialog as C, PageSetupDialog as xe, PasteSpecialDialog as Se, SplitCellDialog as Ce, TablePropertiesDialog as we, WatermarkDialog as w } from "./dialogs.js";
6
- import { Fragment as T, Teleport as E, computed as D, createApp as Te, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as Ee, createStaticVNode as De, createTextVNode as Oe, createVNode as M, defineComponent as N, h as ke, inject as Ae, mergeProps as je, nextTick as Me, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as Ne, onScopeDispose as Pe, openBlock as L, provide as Fe, ref as R, renderList as z, renderSlot as Ie, shallowRef as Le, toDisplayString as B, toRaw as Re, toValue as ze, unref as V, vModelText as H, vShow as Be, watch as U, withCtx as Ve, withDirectives as He, withKeys as Ue, withModifiers as W } from "vue";
7
- import { CANONICAL_GAP as We, canonicalRefusalMessage as Ge, usesCanonicalSession as Ke } from "@stll/folio-core/types/canonicalCapabilities";
8
- import { NO_LIST_NUMBERING_MENU as G, NO_LIST_STATE as qe, createStyleResolver as Je, extractSelectionState as Ye, getDocumentBuiltInStyles as Xe, getDocumentStyleResolver as Ze, getSelectedText as Qe, insertImageFromFile as $e, insertImageFromFile as et, insertPageBreakInView as K, insertPageBreakInView as tt, insertTableInView as nt, insertTableInView as rt, insertTableOfContentsInView as it, insertTableOfContentsInView as at, listNumberingMenuState as ot, listStateLevel as st, schema as ct } from "@stll/folio-core/prosemirror";
9
- import { expectTableAttrs as lt } from "@stll/folio-core/prosemirror/attrs";
10
- import { getTableContext as ut } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
11
- import { extractSelectionContext as dt } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
12
- import { inspectDocxCompatibility as ft } from "@stll/folio-core/docx/compatibility";
13
- import { browserClock as pt } from "@stll/folio-core/controller/layoutScheduler";
14
- import { CanonicalSessionRefusalError as mt } from "@stll/folio-core/controller/hiddenEditorManager";
15
- import { cloneDocumentWithParagraphPropertySources as ht } from "@stll/folio-core/docx/document-clone";
16
- import { historyShortcutOwner as gt, isKeydownInShortcutScope as _t } from "@stll/folio-core/managers/editorShortcuts";
4
+ import { a as oe, c as se, i as ce, l as S, o as le, r as ue, s as de, t as fe, u as pe } from "./useZoom-BA92aWwm.js";
5
+ import { FindReplaceDialog as me, FootnotePropertiesDialog as he, HyperlinkDialog as ge, ImagePositionDialog as _e, ImagePropertiesDialog as ve, InsertImageDialog as C, InsertSymbolDialog as ye, InsertTableDialog as w, PageSetupDialog as be, PasteSpecialDialog as xe, SplitCellDialog as Se, TablePropertiesDialog as Ce, WatermarkDialog as T } from "./dialogs.js";
6
+ import { Fragment as E, Teleport as D, computed as O, createApp as we, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as Te, createStaticVNode as Ee, createTextVNode as De, createVNode as N, defineComponent as P, h as Oe, inject as ke, mergeProps as Ae, nextTick as je, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as L, onMounted as Me, onScopeDispose as Ne, openBlock as R, provide as Pe, ref as z, renderList as B, renderSlot as Fe, shallowRef as Ie, toDisplayString as V, toRaw as Le, toValue as Re, unref as H, vModelText as U, vShow as ze, watch as W, withCtx as Be, withDirectives as Ve, withKeys as He, withModifiers as G } from "vue";
7
+ import { CANONICAL_GAP as Ue, canonicalRefusalMessage as We, usesCanonicalSession as Ge } from "@stll/folio-core/types/canonicalCapabilities";
8
+ import { NO_LIST_NUMBERING_MENU as K, NO_LIST_STATE as Ke, createStyleResolver as qe, extractSelectionState as Je, getDocumentBuiltInStyles as Ye, getDocumentStyleResolver as Xe, getSelectedText as Ze, insertImageFromFile as Qe, insertImageFromFile as $e, insertPageBreakInView as q, insertPageBreakInView as et, insertTableInView as tt, insertTableInView as nt, insertTableOfContentsInView as rt, insertTableOfContentsInView as it, listNumberingMenuState as at, listStateLevel as ot, schema as st } from "@stll/folio-core/prosemirror";
9
+ import { expectTableAttrs as ct } from "@stll/folio-core/prosemirror/attrs";
10
+ import { getTableContext as lt } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
11
+ import { extractSelectionContext as ut } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
12
+ import { inspectDocxCompatibility as dt } from "@stll/folio-core/docx/compatibility";
13
+ import { browserClock as ft } from "@stll/folio-core/controller/layoutScheduler";
14
+ import { CanonicalSessionRefusalError as pt } from "@stll/folio-core/controller/hiddenEditorManager";
15
+ import { cloneDocumentWithParagraphPropertySources as mt } from "@stll/folio-core/docx/document-clone";
16
+ import { DEFAULT_KEYBOARD_SHORTCUT_SCOPE as ht, historyShortcutOwner as gt, isKeydownInShortcutScope as _t } from "@stll/folio-core/managers/editorShortcuts";
17
17
  import { resolveActiveEditorStory as vt } from "@stll/folio-core/controller/activeEditorStory";
18
18
  import { clearAllCaches as yt, resetCanvasContext as bt } from "@stll/folio-core/layout-bridge/engine/measuring";
19
19
  import { onFontsLoaded as xt } from "@stll/folio-core/utils/fontLoader";
@@ -22,52 +22,51 @@ import { getEditorScrollRoot as Ct, scrollEditorElementIntoView as wt, scrollEdi
22
22
  import { findBodyPmAnchor as Et, findBodyPmAnchors as Dt, findBodyPmSpans as Ot } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
23
23
  import { PANEL_METRICS as kt, computePanelLayout as At } from "@stll/folio-core/panel-layout";
24
24
  import { DEFAULT_OUTLINE_DEPTH as jt, filterHeadingsByDepth as Mt } from "@stll/folio-core/utils/outlineDepth";
25
- import { getDocumentWatermark as q, getDocumentWatermark as Nt, setDocumentWatermark as Pt, setDocumentWatermark as Ft } from "@stll/folio-core/watermark";
25
+ import { getDocumentWatermark as J, getDocumentWatermark as Nt, setDocumentWatermark as Pt, setDocumentWatermark as Ft } from "@stll/folio-core/watermark";
26
26
  import { createLatestRequestGate as It } from "@stll/folio-core/controller/latestRequestGate";
27
27
  import { measureDirectiveGutter as Lt, projectRangesToRects as Rt } from "@stll/folio-core/paged-layout/rangeProjection";
28
28
  import { anonymizationDecorationsKey as zt, getAnonymizationMatches as Bt, getAnonymizationMatches as Vt, setAnonymizationTermsMeta as Ht, slugAnonymizationLabel as Ut } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
29
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Wt, acceptAutocompleteSuggestion as Gt, acceptAutocompleteWord as Kt, appendAutocompleteToken as qt, autocompleteSuggestionKey as Jt, autocompleteSuggestionPlugin as J, clearAutocompleteSuggestion as Yt, finishAutocompleteSuggestion as Xt, getAutocompleteSuggestion as Zt, getAutocompleteSuggestion as Qt, shouldTriggerAutocomplete as $t, startAutocompleteSuggestion as en } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
30
- import { createRenderedDomContext as tn } from "@stll/folio-core/render-dom/RenderedDomContext";
31
- import { ContentControlWidgetController as nn } from "@stll/folio-core/controller/contentControlWidgetController";
32
- import { NodeSelection as Y, Selection as rn, TextSelection as X } from "prosemirror-state";
33
- import { pixelsToEmu as an } from "@stll/folio-core/utils/units";
34
- import { IMAGE_LAYOUT_OPTIONS as on, captureInlinePositionEmu as sn, deriveLayoutChoice as cn, findImageElement as ln, isImageLayoutOptionEnabled as un, toolbarValueToLayoutTarget as dn } from "@stll/folio-core/layout-painter/imageLayout";
35
- import { isTrackChangesMode as fn, toggledTrackChangesMode as pn } from "@stll/folio-core/managers/EditorModeManager";
36
- import { clickToPositionDom as mn, getCaretPositionFromDom as hn } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
37
- import { calculateResizedImageDimensions as gn, commitImageFloatMove as _n, commitImageInlineMove as vn, commitImageResize as yn, isFloatingImage as bn } from "@stll/folio-core/prosemirror/imageCommit";
38
- import { resetImeCaretAnchor as xn, syncImeCaretAnchor as Sn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
39
- import { PAINTER_PAINTED_EVENT as Cn } from "@stll/folio-core/layout-painter/renderPage";
40
- import { HeaderFooterSelectionOverlay as wn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
41
- import { getTemplateDirectives as Tn, getTemplateDirectives as En, scanDirectives as Dn } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
42
- import { closeHistory as On, redo as kn, undo as An } from "prosemirror-history";
43
- import { clearFormatting as jn } from "@stll/folio-core/prosemirror/commands/formatting";
44
- import { executeEditorCommand as Mn } from "@stll/folio-core/prosemirror/executeEditorCommand";
45
- import { anchorTargetAttrs as Nn, sanitizeExternalUrl as Pn, windowFeaturesFor as Fn } from "@stll/folio-core/utils/urlSecurity";
46
- import { PENDING_COMMENT_ID as In, createCommentIdAllocator as Ln, seedCommentAllocator as Rn } from "@stll/folio-core/prosemirror/commentIdAllocator";
47
- import { resolveCanonicalReviewRange as zn } from "@stll/folio-core/controller/canonicalReview";
48
- import { afterCanonicalCompositionSettles as Bn } from "@stll/folio-core/controller/canonicalInputTimer";
49
- import { createComment as Vn } from "@stll/folio-core/prosemirror/commentOps";
50
- import { acceptAIEditRevision as Hn, acceptChange as Un, acceptSuggestion as Wn, findAIEditRevisionRange as Gn, findSuggestionRange as Kn, getSuggestions as Z, rejectAIEditRevision as qn, rejectChange as Q, rejectSuggestion as Jn } from "@stll/folio-core/prosemirror/commands/comments";
51
- import { makeRevisionInfo as Yn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
52
- import { findPageIndexContainingPmPos as Xn } from "@stll/folio-core/layout-engine";
53
- import { proseDocToBlocks as Zn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
54
- import { setTemplatePreviewValues as Qn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
55
- import { clearTemplateSlashMenu as $n, consumeTemplateSlashQuery as er, getTemplateSlashMenu as tr, resetTemplateSlashQuery as nr, templateSlashMenuKey as rr } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
56
- import { createEmptyHeaderFooter as ir, pickActiveHeaderFooterRId as ar, removeHeaderFooter as or, resolveHeaderFooterContent as sr, saveHeaderFooterContent as $ } from "@stll/folio-core/utils/headerFooter";
57
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as cr, FolioPendingSuggestionRegistry as lr, applyFolioAIEditOperations as ur, applyFolioDocumentOperations as dr, assertSupportedFolioDocumentOperationVersion as fr, createFolioAIEditSnapshot as pr, createFolioAIEditSnapshot as mr, createFolioAIEditSnapshotWithStyleResolver as hr, createPendingSuggestionSourceSnapshot as gr, diffWordSegments as _r, getCommentAnchorsFromDoc as vr, getFolioDocumentOperationIssues as yr, getTrackedChangesFromDoc as br, hashFolioAIBlockText as xr, normalizeFolioAIBlockText as Sr } from "@stll/folio-core/ai-edits";
58
- import { getPageScrollTarget as Cr } from "@stll/folio-core/paged-layout/scrollNavigation";
59
- import { findParagraphFragmentsByParaId as wr, flashParagraphElements as Tr } from "@stll/folio-core/paged-layout/paragraphFlash";
60
- import { onPaintedLayoutChange as Er, readBlockRects as Dr } from "@stll/folio-core/paged-layout/blockGeometry";
61
- import { blockSdtAttrsToSdtProperties as Or, findBlockSdtMatch as kr, findBlockSdtMatches as Ar, removeContentControlTr as jr, setContentControlContentTr as Mr, setContentControlValueTr as Nr } from "@stll/folio-core/prosemirror/commands/contentControls";
62
- import { setContentControlContentBlocksTr as Pr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
63
- import { clampRangeToDocSize as Fr, resolveFolioAIBlockRange as Ir, resolveFolioAITextRange as Lr, resolvePassageRange as Rr } from "@stll/folio-core/ai-edits/blockRange";
64
- import { deriveBlockId as zr, getFolioParaIdFromBlockId as Br, getFolioParaIdFromBlockId as Vr, isFolioBlockId as Hr, isSequentialFolioBlockId as Ur } from "@stll/folio-core/types/block-id";
65
- import { getPageTextFromLayout as Wr } from "@stll/folio-core/paged-layout/pageText";
66
- import { applyStyle as Gr, removeTabStop as Kr, setIndentFirstLine as qr, setIndentLeft as Jr, setIndentRight as Yr } from "@stll/folio-core/prosemirror/commands/paragraph";
67
- import { getCachedNumberingMap as Xr } from "@stll/folio-core/docx";
68
- import { insertPageBreak as Zr } from "@stll/folio-core/prosemirror/commands/pageBreak";
69
- import { insertSectionBreakContinuous as Qr, insertSectionBreakNextPage as $r } from "@stll/folio-core/prosemirror/commands/sectionBreak";
70
- import { setEmbeddedFontFamilyMap as ei } from "@stll/folio-core/utils/fontResolver";
29
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Wt, acceptAutocompleteSuggestion as Gt, acceptAutocompleteWord as Kt, appendAutocompleteToken as qt, autocompleteSuggestionKey as Jt, autocompleteSuggestionPlugin as Yt, clearAutocompleteSuggestion as Xt, finishAutocompleteSuggestion as Zt, getAutocompleteSuggestion as Qt, getAutocompleteSuggestion as $t, shouldTriggerAutocomplete as en, startAutocompleteSuggestion as tn } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
30
+ import { createRenderedDomContext as nn } from "@stll/folio-core/render-dom/RenderedDomContext";
31
+ import { ContentControlWidgetController as rn } from "@stll/folio-core/controller/contentControlWidgetController";
32
+ import { NodeSelection as an, Selection as Y, TextSelection as X } from "prosemirror-state";
33
+ import { pixelsToEmu as on } from "@stll/folio-core/utils/units";
34
+ import { IMAGE_LAYOUT_OPTIONS as sn, captureInlinePositionEmu as cn, deriveLayoutChoice as ln, findImageElement as un, isImageLayoutOptionEnabled as dn, toolbarValueToLayoutTarget as fn } from "@stll/folio-core/layout-painter/imageLayout";
35
+ import { isTrackChangesMode as pn, toggledTrackChangesMode as mn } from "@stll/folio-core/managers/EditorModeManager";
36
+ import { clickToPositionDom as hn, getCaretPositionFromDom as gn } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
37
+ import { calculateResizedImageDimensions as _n, commitImageFloatMove as vn, commitImageInlineMove as yn, commitImageResize as bn, isFloatingImage as xn } from "@stll/folio-core/prosemirror/imageCommit";
38
+ import { resetImeCaretAnchor as Sn, syncImeCaretAnchor as Cn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
39
+ import { PAINTER_PAINTED_EVENT as wn } from "@stll/folio-core/layout-painter/renderPage";
40
+ import { HeaderFooterSelectionOverlay as Tn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
41
+ import { getTemplateDirectives as En, getTemplateDirectives as Dn, scanDirectives as On } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
42
+ import { closeHistory as kn, redo as An, undo as jn } from "prosemirror-history";
43
+ import { clearFormatting as Mn } from "@stll/folio-core/prosemirror/commands/formatting";
44
+ import { executeEditorCommand as Nn } from "@stll/folio-core/prosemirror/executeEditorCommand";
45
+ import { anchorTargetAttrs as Pn, sanitizeExternalUrl as Fn, windowFeaturesFor as In } from "@stll/folio-core/utils/urlSecurity";
46
+ import { PENDING_COMMENT_ID as Ln, createCommentIdAllocator as Rn, seedCommentAllocator as zn } from "@stll/folio-core/prosemirror/commentIdAllocator";
47
+ import { resolveCanonicalReviewRange as Bn } from "@stll/folio-core/controller/canonicalReview";
48
+ import { afterCanonicalCompositionSettles as Vn } from "@stll/folio-core/controller/canonicalInputTimer";
49
+ import { createComment as Hn } from "@stll/folio-core/prosemirror/commentOps";
50
+ import { acceptAIEditRevision as Un, acceptChange as Wn, acceptSuggestion as Gn, findAIEditRevisionRange as Kn, findSuggestionRange as qn, getSuggestions as Jn, rejectAIEditRevision as Z, rejectChange as Yn, rejectSuggestion as Q } from "@stll/folio-core/prosemirror/commands/comments";
51
+ import { makeRevisionInfo as Xn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
52
+ import { findPageIndexContainingPmPos as Zn } from "@stll/folio-core/layout-engine";
53
+ import { proseDocToBlocks as Qn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
54
+ import { setTemplatePreviewValues as $n } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
55
+ import { clearTemplateSlashMenu as er, consumeTemplateSlashQuery as tr, getTemplateSlashMenu as nr, resetTemplateSlashQuery as rr, templateSlashMenuKey as ir } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
56
+ import { createEmptyHeaderFooter as ar, pickActiveHeaderFooterRId as or, removeHeaderFooter as sr, resolveHeaderFooterContent as cr, saveHeaderFooterContent as lr } from "@stll/folio-core/utils/headerFooter";
57
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as $, FolioPendingSuggestionRegistry as ur, applyFolioAIEditOperations as dr, applyFolioDocumentOperations as fr, assertSupportedFolioDocumentOperationVersion as pr, createFolioAIEditSnapshot as mr, createFolioAIEditSnapshot as hr, createFolioAIEditSnapshotWithStyleResolver as gr, createPendingSuggestionSourceSnapshot as _r, diffWordSegments as vr, getCommentAnchorsFromDoc as yr, getFolioDocumentOperationIssues as br, getTrackedChangesFromDoc as xr, hashFolioAIBlockText as Sr, normalizeFolioAIBlockText as Cr } from "@stll/folio-core/ai-edits";
58
+ import { getPageScrollTarget as wr } from "@stll/folio-core/paged-layout/scrollNavigation";
59
+ import { findParagraphFragmentsByParaId as Tr, flashParagraphElements as Er } from "@stll/folio-core/paged-layout/paragraphFlash";
60
+ import { onPaintedLayoutChange as Dr, readBlockRects as Or } from "@stll/folio-core/paged-layout/blockGeometry";
61
+ import { blockSdtAttrsToSdtProperties as kr, findBlockSdtMatch as Ar, findBlockSdtMatches as jr, removeContentControlTr as Mr, setContentControlContentTr as Nr, setContentControlValueTr as Pr } from "@stll/folio-core/prosemirror/commands/contentControls";
62
+ import { setContentControlContentBlocksTr as Fr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
63
+ import { clampRangeToDocSize as Ir, resolveFolioAIBlockRange as Lr, resolveFolioAITextRange as Rr, resolvePassageRange as zr } from "@stll/folio-core/ai-edits/blockRange";
64
+ import { deriveBlockId as Br, getFolioParaIdFromBlockId as Vr, getFolioParaIdFromBlockId as Hr, isFolioBlockId as Ur, isSequentialFolioBlockId as Wr } from "@stll/folio-core/types/block-id";
65
+ import { getPageTextFromLayout as Gr } from "@stll/folio-core/paged-layout/pageText";
66
+ import { applyStyle as Kr, removeTabStop as qr, setIndentFirstLine as Jr, setIndentLeft as Yr, setIndentRight as Xr } from "@stll/folio-core/prosemirror/commands/paragraph";
67
+ import { getCachedNumberingMap as Zr } from "@stll/folio-core/docx";
68
+ import { insertPageBreak as Qr } from "@stll/folio-core/prosemirror/commands/pageBreak";
69
+ import { insertSectionBreakContinuous as $r, insertSectionBreakNextPage as ei } from "@stll/folio-core/prosemirror/commands/sectionBreak";
71
70
  import { buildEmbeddedFontFamilyMap as ti, extractEmbeddedFonts as ni } from "@stll/folio-core/fonts/embeddedFonts";
72
71
  import { editHyperlinkAtCursor as ri, removeHyperlinkAtCursor as ii } from "@stll/folio-core/prosemirror/commands/hyperlink";
73
72
  import { collectHeadings as ai } from "@stll/folio-core/utils/headingCollector";
@@ -94,11 +93,11 @@ import { getFolioCaretViewportRect as Ri, getFolioSelectionViewportRect as zi }
94
93
  import { createAICitationDecorationsPlugin as Bi, setAICitationsMeta as Vi, setActiveCitationMeta as Hi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
95
94
  import { fromMarkdown as Ui, toMarkdown as Wi, toMarkdownResult as Gi } from "@stll/folio-core/markdown";
96
95
  //#region src/composables/useTransientNotice.ts
97
- var Ki = 3e3, qi = (e = pt) => {
98
- let t = R(null), n = null, r = () => {
96
+ var Ki = 3e3, qi = (e = ft) => {
97
+ let t = z(null), n = null, r = () => {
99
98
  n !== null && e.clearTimer(n), n = null, t.value = null;
100
99
  };
101
- return Pe(r), {
100
+ return Ne(r), {
102
101
  message: t,
103
102
  show: (i) => {
104
103
  r(), t.value = i, n = e.setTimer(r, Ki);
@@ -109,7 +108,7 @@ var Ki = 3e3, qi = (e = pt) => {
109
108
  "data-folio-anonymization-canonical",
110
109
  "data-folio-anonymization-selected",
111
110
  "title"
112
- ], Yi = /*#__PURE__*/ t(/* @__PURE__ */ N({
111
+ ], Yi = /*#__PURE__*/ t(/* @__PURE__ */ P({
113
112
  __name: "AnonymizationRectsOverlay",
114
113
  props: {
115
114
  getView: { type: Function },
@@ -124,7 +123,7 @@ var Ki = 3e3, qi = (e = pt) => {
124
123
  selectionSeq: {}
125
124
  },
126
125
  setup(e) {
127
- let t = e, n = R(null), r = R([]), i = It(), a = null;
126
+ let t = e, n = z(null), r = z([]), i = It(), a = null;
128
127
  function o() {
129
128
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
130
129
  a = null, s();
@@ -161,7 +160,7 @@ var Ki = 3e3, qi = (e = pt) => {
161
160
  }))
162
161
  }));
163
162
  }
164
- U(() => [
163
+ W(() => [
165
164
  t.editorState,
166
165
  t.zoom,
167
166
  t.layout,
@@ -183,7 +182,7 @@ var Ki = 3e3, qi = (e = pt) => {
183
182
  index: a
184
183
  }, wt(i.item(a));
185
184
  }
186
- U(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
185
+ W(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
187
186
  function u(e) {
188
187
  if (e.button !== 0 || !t.onTermClick) return;
189
188
  let r = n.value;
@@ -200,23 +199,23 @@ var Ki = 3e3, qi = (e = pt) => {
200
199
  }
201
200
  }
202
201
  }
203
- return Ne(() => {
202
+ return Me(() => {
204
203
  document.addEventListener("click", u), o();
205
- }), I(() => {
204
+ }), L(() => {
206
205
  i.invalidate(), document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
207
- }), (t, i) => (L(), A("div", {
206
+ }), (t, i) => (R(), j("div", {
208
207
  ref_key: "rootRef",
209
208
  ref: n,
210
209
  class: "folio-anonymization-overlay",
211
210
  "data-folio-anonymization-overlay": ""
212
- }, [(L(!0), A(T, null, z(r.value, (t) => (L(), A(T, { key: `${t.label}:${t.canonical}` }, [(L(!0), A(T, null, z(t.rects, (n, r) => (L(), A("span", {
211
+ }, [(R(!0), j(E, null, B(r.value, (t) => (R(), j(E, { key: `${t.label}:${t.canonical}` }, [(R(!0), j(E, null, B(t.rects, (n, r) => (R(), j("span", {
213
212
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
214
- class: P(["folio-anonymization-term", `folio-anonymization-term--${V(Ut)(t.label)}`]),
213
+ class: F(["folio-anonymization-term", `folio-anonymization-term--${H(Ut)(t.label)}`]),
215
214
  "data-folio-anonymization-label": t.label,
216
215
  "data-folio-anonymization-canonical": t.canonical,
217
216
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
218
217
  title: `Anonymized: ${t.canonical}`,
219
- style: F({
218
+ style: I({
220
219
  position: "absolute",
221
220
  left: `${n.left}px`,
222
221
  top: `${n.top}px`,
@@ -228,7 +227,7 @@ var Ki = 3e3, qi = (e = pt) => {
228
227
  }), [["__scopeId", "data-v-94cc11a3"]]), Xi = {
229
228
  class: "folio-passage-highlight-overlay",
230
229
  "data-folio-passage-highlight-overlay": ""
231
- }, Zi = /*#__PURE__*/ t(/* @__PURE__ */ N({
230
+ }, Zi = /*#__PURE__*/ t(/* @__PURE__ */ P({
232
231
  __name: "PassageHighlightOverlay",
233
232
  props: {
234
233
  range: {},
@@ -239,7 +238,7 @@ var Ki = 3e3, qi = (e = pt) => {
239
238
  measures: {}
240
239
  },
241
240
  setup(e) {
242
- let t = e, n = R([]), r = It(), i = null;
241
+ let t = e, n = z([]), r = It(), i = null;
243
242
  function a() {
244
243
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
245
244
  i = null, o();
@@ -267,18 +266,18 @@ var Ki = 3e3, qi = (e = pt) => {
267
266
  height: e.height * s
268
267
  }));
269
268
  }
270
- return U(() => [
269
+ return W(() => [
271
270
  t.range,
272
271
  t.zoom,
273
272
  t.layout,
274
273
  t.blocks,
275
274
  t.measures
276
- ], () => a(), { immediate: !0 }), I(() => {
275
+ ], () => a(), { immediate: !0 }), L(() => {
277
276
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
278
- }), (e, t) => (L(), A("div", Xi, [(L(!0), A(T, null, z(n.value, (e, t) => (L(), A("span", {
277
+ }), (e, t) => (R(), j("div", Xi, [(R(!0), j(E, null, B(n.value, (e, t) => (R(), j("span", {
279
278
  key: `${t}:${e.left}:${e.top}`,
280
279
  class: "folio-passage-highlight",
281
- style: F({
280
+ style: I({
282
281
  position: "absolute",
283
282
  left: `${e.left}px`,
284
283
  top: `${e.top}px`,
@@ -291,7 +290,7 @@ var Ki = 3e3, qi = (e = pt) => {
291
290
  key: 0,
292
291
  class: "folio-autocomplete-overlay",
293
292
  "data-folio-autocomplete-overlay": ""
294
- }, $i = /*#__PURE__*/ t(/* @__PURE__ */ N({
293
+ }, $i = /*#__PURE__*/ t(/* @__PURE__ */ P({
295
294
  __name: "AutocompleteCaretOverlay",
296
295
  props: {
297
296
  caret: {},
@@ -299,20 +298,20 @@ var Ki = 3e3, qi = (e = pt) => {
299
298
  isStreaming: { type: Boolean }
300
299
  },
301
300
  setup(e) {
302
- return (t, n) => e.caret && e.text.length > 0 ? (L(), A("div", Qi, [j("span", {
301
+ return (t, n) => e.caret && e.text.length > 0 ? (R(), j("div", Qi, [M("span", {
303
302
  class: "folio-autocomplete-ghost",
304
- style: F({
303
+ style: I({
305
304
  left: `${e.caret.x}px`,
306
305
  top: `${e.caret.y}px`,
307
306
  lineHeight: `${e.caret.lineHeight}px`,
308
307
  maxWidth: e.caret.maxWidth === void 0 ? void 0 : `${e.caret.maxWidth}px`
309
308
  })
310
- }, [Oe(B(e.text), 1), j("span", {
311
- class: P(["folio-autocomplete-caret", { "folio-autocomplete-caret--streaming": e.isStreaming }]),
309
+ }, [De(V(e.text), 1), M("span", {
310
+ class: F(["folio-autocomplete-caret", { "folio-autocomplete-caret--streaming": e.isStreaming }]),
312
311
  "aria-hidden": "true"
313
- }, "stella", 2)], 4)])) : k("", !0);
312
+ }, "stella", 2)], 4)])) : A("", !0);
314
313
  }
315
- }), [["__scopeId", "data-v-00299904"]]), ea = 48, ta = /* @__PURE__ */ N({
314
+ }), [["__scopeId", "data-v-00299904"]]), ea = 48, ta = /* @__PURE__ */ P({
316
315
  __name: "AutocompleteSuggestionOverlay",
317
316
  props: {
318
317
  getPagesContainer: { type: Function },
@@ -321,7 +320,7 @@ var Ki = 3e3, qi = (e = pt) => {
321
320
  syncCoordinator: {}
322
321
  },
323
322
  setup(e) {
324
- let t = e, n = R(null), r = R(0), i = null, a = null, o = ({ pagesContainer: e, x: t, y: n, zoom: r }) => {
323
+ let t = e, n = z(null), r = z(0), i = null, a = null, o = ({ pagesContainer: e, x: t, y: n, zoom: r }) => {
325
324
  let i = r > 0 ? r : 1, a = e.getBoundingClientRect();
326
325
  for (let r of e.querySelectorAll(".layout-page")) {
327
326
  let e = r.getBoundingClientRect(), o = (e.top - a.top) / i, s = (e.bottom - a.top) / i;
@@ -337,12 +336,12 @@ var Ki = 3e3, qi = (e = pt) => {
337
336
  n.value = null;
338
337
  return;
339
338
  }
340
- let i = Qt(r);
339
+ let i = $t(r);
341
340
  if (i.status === "idle" || i.text.length === 0) {
342
341
  n.value = null;
343
342
  return;
344
343
  }
345
- let a = tn(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
344
+ let a = nn(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
346
345
  if (!s) {
347
346
  n.value = null;
348
347
  return;
@@ -368,17 +367,17 @@ var Ki = 3e3, qi = (e = pt) => {
368
367
  i = null, s();
369
368
  });
370
369
  };
371
- return Ne(() => {
370
+ return Me(() => {
372
371
  a = t.syncCoordinator.onRender(() => {
373
372
  r.value += 1;
374
373
  }), c();
375
- }), I(() => {
374
+ }), L(() => {
376
375
  i !== null && (cancelAnimationFrame(i), i = null), a?.();
377
- }), U(() => [
376
+ }), W(() => [
378
377
  t.editorState,
379
378
  t.zoom,
380
379
  r.value
381
- ], () => c()), (e, t) => (L(), O($i, {
380
+ ], () => c()), (e, t) => (R(), k($i, {
382
381
  caret: n.value?.caret ?? null,
383
382
  text: n.value?.text ?? "",
384
383
  "is-streaming": n.value?.isStreaming ?? !1
@@ -390,13 +389,13 @@ var Ki = 3e3, qi = (e = pt) => {
390
389
  }
391
390
  }), na = Symbol("docx-portal-class");
392
391
  function ra(e) {
393
- Fe(na, D(() => ({
392
+ Pe(na, O(() => ({
394
393
  "ep-root": !0,
395
- dark: !!V(e)
394
+ dark: !!H(e)
396
395
  })));
397
396
  }
398
397
  function ia() {
399
- return Ae(na, D(() => ({ "ep-root": !0 })));
398
+ return ke(na, O(() => ({ "ep-root": !0 })));
400
399
  }
401
400
  //#endregion
402
401
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
@@ -407,53 +406,53 @@ var aa = ["aria-label"], oa = {
407
406
  }, sa = {
408
407
  key: 0,
409
408
  class: "content-control-picker__empty"
410
- }, ca = /*#__PURE__*/ t(/* @__PURE__ */ N({
409
+ }, ca = /*#__PURE__*/ t(/* @__PURE__ */ P({
411
410
  __name: "ContentControlWidgetsOverlay",
412
411
  props: {
413
412
  eventRoot: {},
414
413
  view: {}
415
414
  },
416
415
  setup(e) {
417
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = ia(), s = new nn(), c = Le(s.getSnapshot()), l = s.subscribe(() => {
416
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = ia(), s = new rn(), c = Ie(s.getSnapshot()), l = s.subscribe(() => {
418
417
  c.value = s.getSnapshot();
419
418
  });
420
- U([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), I(() => {
419
+ W([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), L(() => {
421
420
  l(), s.destroy();
422
421
  });
423
- let u = D(() => c.value.status === "closed" ? {} : {
422
+ let u = O(() => c.value.status === "closed" ? {} : {
424
423
  insetInlineStart: `${c.value.position.x}px`,
425
424
  top: `${c.value.position.y}px`
426
425
  }), d = (e) => {
427
426
  e && s.pickDate(e);
428
427
  };
429
- return (e, t) => (L(), O(E, { to: "body" }, [c.value.status === "closed" ? k("", !0) : (L(), A("div", {
428
+ return (e, t) => (R(), k(D, { to: "body" }, [c.value.status === "closed" ? A("", !0) : (R(), j("div", {
430
429
  key: 0,
431
- class: P(["content-control-picker", V(o)]),
432
- style: F(u.value),
430
+ class: F(["content-control-picker", H(o)]),
431
+ style: I(u.value),
433
432
  role: "dialog",
434
- "aria-label": c.value.status === "dropdown" ? V(n)("contentControlDropdownAriaLabel") : V(n)("contentControlDateAriaLabel"),
435
- onMousedown: t[1] ||= W(() => {}, ["stop"]),
436
- onPointerdown: t[2] ||= W(() => {}, ["stop"])
437
- }, [c.value.status === "dropdown" ? (L(), A("div", oa, [c.value.items.length === 0 ? (L(), A("div", sa, B(V(n)("contentControlDropdownNoOptions")), 1)) : (L(!0), A(T, { key: 1 }, z(c.value.items, (e) => (L(), O(V(i), {
433
+ "aria-label": c.value.status === "dropdown" ? H(n)("contentControlDropdownAriaLabel") : H(n)("contentControlDateAriaLabel"),
434
+ onMousedown: t[1] ||= G(() => {}, ["stop"]),
435
+ onPointerdown: t[2] ||= G(() => {}, ["stop"])
436
+ }, [c.value.status === "dropdown" ? (R(), j("div", oa, [c.value.items.length === 0 ? (R(), j("div", sa, V(H(n)("contentControlDropdownNoOptions")), 1)) : (R(!0), j(E, { key: 1 }, B(c.value.items, (e) => (R(), k(H(i), {
438
437
  key: `${e.value}::${e.displayText}`,
439
438
  "class-name": "content-control-picker__item",
440
439
  type: "button",
441
440
  role: "menuitem",
442
441
  variant: "ghost",
443
442
  size: "sm",
444
- onMousedown: t[0] ||= W(() => {}, ["prevent"]),
445
- onClick: (t) => V(s).pickDropdown(e.value)
443
+ onMousedown: t[0] ||= G(() => {}, ["prevent"]),
444
+ onClick: (t) => H(s).pickDropdown(e.value)
446
445
  }, {
447
- default: Ve(() => [Oe(B(e.displayText), 1)]),
446
+ default: Be(() => [De(V(e.displayText), 1)]),
448
447
  _: 2
449
- }, 1032, ["onClick"]))), 128))])) : c.value.status === "date" ? (L(), O(V(a), {
448
+ }, 1032, ["onClick"]))), 128))])) : c.value.status === "date" ? (R(), k(H(a), {
450
449
  key: 1,
451
450
  value: c.value.currentValue,
452
451
  "default-open": !0,
453
452
  onChange: d
454
- }, null, 8, ["value"])) : k("", !0)], 46, aa))]));
453
+ }, null, 8, ["value"])) : A("", !0)], 46, aa))]));
455
454
  }
456
- }), [["__scopeId", "data-v-f88b41c9"]]), la = /* @__PURE__ */ N({
455
+ }), [["__scopeId", "data-v-f88b41c9"]]), la = /* @__PURE__ */ P({
457
456
  __name: "DecorationLayer",
458
457
  props: {
459
458
  getView: { type: Function },
@@ -463,7 +462,7 @@ var aa = ["aria-label"], oa = {
463
462
  syncCoordinator: {}
464
463
  },
465
464
  setup(e) {
466
- let t = e, n = R(null), r = R(0), i = null, a = null;
465
+ let t = e, n = z(null), r = z(0), i = null, a = null;
467
466
  function o() {
468
467
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
469
468
  i = null;
@@ -471,13 +470,13 @@ var aa = ["aria-label"], oa = {
471
470
  !e || !r || !a || t.syncCoordinator.isSafeToRender() && s(e, r, a, t.zoom);
472
471
  });
473
472
  }
474
- Ne(() => {
473
+ Me(() => {
475
474
  a = t.syncCoordinator.onRender(() => {
476
475
  r.value++;
477
476
  }), o();
478
- }), I(() => {
477
+ }), L(() => {
479
478
  i !== null && (cancelAnimationFrame(i), i = null), a?.();
480
- }), U(() => [
479
+ }), W(() => [
481
480
  t.zoom,
482
481
  t.transactionVersion,
483
482
  r.value
@@ -488,7 +487,7 @@ var aa = ["aria-label"], oa = {
488
487
  n.firstChild && n.replaceChildren();
489
488
  return;
490
489
  }
491
- let a = tn(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
490
+ let a = nn(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
492
491
  for (let { decoration: t, from: n, to: r } of i) {
493
492
  if (n === r) {
494
493
  let r = u(t, e);
@@ -558,7 +557,7 @@ var aa = ["aria-label"], oa = {
558
557
  for (let [e, t] of Object.entries(n)) typeof t == "string" && (r[e] = t);
559
558
  return r;
560
559
  }
561
- return (e, t) => (L(), A("div", {
560
+ return (e, t) => (R(), j("div", {
562
561
  ref_key: "overlayRef",
563
562
  ref: n,
564
563
  class: "paged-editor__decoration-overlay",
@@ -566,14 +565,14 @@ var aa = ["aria-label"], oa = {
566
565
  }, null, 512));
567
566
  }
568
567
  }), ua = ({ surface: e, available: t, navRef: n, onClose: r }) => {
569
- U(D(() => ze(e) === "drawer" && ze(t)), async (e, t, i) => {
568
+ W(O(() => Re(e) === "drawer" && Re(t)), async (e, t, i) => {
570
569
  if (!e || typeof document > "u") return;
571
570
  let a = document.activeElement instanceof HTMLElement ? document.activeElement : null, o = !0, s = (e) => {
572
571
  e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), r());
573
572
  };
574
573
  if (i(() => {
575
574
  o = !1, document.removeEventListener("keydown", s), a?.isConnected && a.focus({ preventScroll: !0 });
576
- }), await Me(), !o) return;
575
+ }), await je(), !o) return;
577
576
  let c = n.value;
578
577
  (c?.querySelector("[aria-current=\"true\"]") ?? c?.querySelector("ol button:not([tabindex=\"-1\"])") ?? c?.querySelector("button") ?? c)?.focus({ preventScroll: !0 }), document.addEventListener("keydown", s);
579
578
  }, {
@@ -591,7 +590,7 @@ var aa = ["aria-label"], oa = {
591
590
  ], pa = {
592
591
  key: 1,
593
592
  class: "folio-outline-header"
594
- }, ma = { class: "folio-outline-heading-row" }, ha = { class: "folio-outline-title" }, ga = ["aria-label", "title"], _a = { class: "folio-outline-depth-control" }, va = ["aria-label", "value"], ya = { value: 2 }, ba = { value: 3 }, xa = { value: "all" }, Sa = /*#__PURE__*/ t(/* @__PURE__ */ N({
593
+ }, ma = { class: "folio-outline-heading-row" }, ha = { class: "folio-outline-title" }, ga = ["aria-label", "title"], _a = { class: "folio-outline-depth-control" }, va = ["aria-label", "value"], ya = { value: 2 }, ba = { value: 3 }, xa = { value: "all" }, Sa = /*#__PURE__*/ t(/* @__PURE__ */ P({
595
594
  __name: "DocumentOutline",
596
595
  props: {
597
596
  headings: {},
@@ -617,14 +616,14 @@ var aa = ["aria-label"], oa = {
617
616
  column: kt.outlineColumnWidth,
618
617
  rail: kt.outlineRailWidth,
619
618
  drawer: kt.drawerWidth
620
- }, a = e, o = t, { t: s } = r(), { OutlineRail: c } = h(), l = R(null);
619
+ }, a = e, o = t, { t: s } = r(), { OutlineRail: c } = h(), l = z(null);
621
620
  ua({
622
621
  surface: () => a.surface,
623
622
  available: () => a.available,
624
623
  navRef: l,
625
624
  onClose: () => o("close")
626
625
  });
627
- let u = D(() => s("editor.showDocumentOutline")), d = (e) => {
626
+ let u = O(() => s("editor.showDocumentOutline")), d = (e) => {
628
627
  if (!(e.currentTarget instanceof HTMLSelectElement)) return;
629
628
  let t = e.currentTarget.value;
630
629
  if (t === "all") {
@@ -632,29 +631,29 @@ var aa = ["aria-label"], oa = {
632
631
  return;
633
632
  }
634
633
  o("outlineDepthChange", t === "3" ? 3 : 2);
635
- }, f = D(() => n[a.surface]), p = D(() => a.headings.map((e) => ({
634
+ }, f = O(() => n[a.surface]), p = O(() => a.headings.map((e) => ({
636
635
  id: String(e.pmPos),
637
636
  label: e.text,
638
637
  level: e.level,
639
638
  ...typeof e.pageNumber == "number" ? { meta: String(e.pageNumber) } : {}
640
- }))), m = D(() => {
639
+ }))), m = O(() => {
641
640
  let e = /* @__PURE__ */ new Map();
642
641
  if (a.docSize > 0) for (let t of a.headings) e.set(String(t.pmPos), Math.min(99, Math.max(1, t.pmPos / a.docSize * 100)));
643
642
  return e;
644
643
  }), g = (e) => m.value.get(e) ?? null, _ = (e) => {
645
644
  o("navigate", Number(e)), a.surface === "drawer" && o("close");
646
645
  };
647
- return (t, n) => e.available ? (L(), A("nav", {
646
+ return (t, n) => e.available ? (R(), j("nav", {
648
647
  key: 0,
649
648
  ref_key: "navRef",
650
649
  ref: l,
651
650
  "aria-label": u.value,
652
- class: P(["folio-outline", "folio-outline--" + e.surface]),
651
+ class: F(["folio-outline", "folio-outline--" + e.surface]),
653
652
  "data-folio-outline-surface": e.surface,
654
653
  "data-testid": "folio-outline",
655
- style: F({ width: f.value + "px" }),
654
+ style: I({ width: f.value + "px" }),
656
655
  tabindex: e.surface === "drawer" ? -1 : void 0
657
- }, [e.surface === "rail" ? (L(), A("button", {
656
+ }, [e.surface === "rail" ? (R(), j("button", {
658
657
  key: 0,
659
658
  type: "button",
660
659
  class: "folio-outline-icon-button",
@@ -663,30 +662,30 @@ var aa = ["aria-label"], oa = {
663
662
  "aria-expanded": e.expanded,
664
663
  title: u.value,
665
664
  onClick: n[0] ||= (e) => o("expand")
666
- }, [M(i, {
665
+ }, [N(i, {
667
666
  name: "view_column",
668
667
  size: 16,
669
668
  "aria-hidden": "true"
670
- })], 8, fa)) : (L(), A("div", pa, [j("div", ma, [j("span", ha, B(V(s)("editor.outlineTitle")), 1), e.surface === "drawer" ? (L(), A("button", {
669
+ })], 8, fa)) : (R(), j("div", pa, [M("div", ma, [M("span", ha, V(H(s)("editor.outlineTitle")), 1), e.surface === "drawer" ? (R(), j("button", {
671
670
  key: 0,
672
671
  type: "button",
673
672
  class: "folio-outline-icon-button",
674
- "aria-label": V(s)("common.closeDialog"),
675
- title: V(s)("common.closeDialog"),
673
+ "aria-label": H(s)("common.closeDialog"),
674
+ title: H(s)("common.closeDialog"),
676
675
  onClick: n[1] ||= (e) => o("close")
677
- }, [M(i, {
676
+ }, [N(i, {
678
677
  name: "close",
679
678
  size: 16,
680
679
  "aria-hidden": "true"
681
- })], 8, ga)) : k("", !0)]), j("label", _a, [j("span", null, B(V(s)("editor.outlineDepthLabel")), 1), j("select", {
682
- "aria-label": V(s)("editor.outlineDepthLabel"),
680
+ })], 8, ga)) : A("", !0)]), M("label", _a, [M("span", null, V(H(s)("editor.outlineDepthLabel")), 1), M("select", {
681
+ "aria-label": H(s)("editor.outlineDepthLabel"),
683
682
  value: e.outlineDepth,
684
683
  onChange: d
685
684
  }, [
686
- j("option", ya, B(V(s)("editor.outlineDepthTwo")), 1),
687
- j("option", ba, B(V(s)("editor.outlineDepthThree")), 1),
688
- j("option", xa, B(V(s)("editor.outlineDepthAll")), 1)
689
- ], 40, va)])])), M(V(c), {
685
+ M("option", ya, V(H(s)("editor.outlineDepthTwo")), 1),
686
+ M("option", ba, V(H(s)("editor.outlineDepthThree")), 1),
687
+ M("option", xa, V(H(s)("editor.outlineDepthAll")), 1)
688
+ ], 40, va)])])), N(H(c), {
690
689
  items: p.value,
691
690
  "get-scroll-container": e.getScrollContainer,
692
691
  "resolve-pct": g,
@@ -703,58 +702,58 @@ var aa = ["aria-label"], oa = {
703
702
  "presentation",
704
703
  "panel-width",
705
704
  "aria-label"
706
- ])], 14, da)) : k("", !0);
705
+ ])], 14, da)) : A("", !0);
707
706
  }
708
- }), [["__scopeId", "data-v-6e4b3f17"]]), Ca = { class: "dialog__header" }, wa = { class: "dialog__body" }, Ta = { class: "field" }, Ea = { class: "field__label" }, Da = { class: "dialog__footer" }, Oa = 0, ka = 32767, Aa = 1, ja = /*#__PURE__*/ t(/* @__PURE__ */ N({
707
+ }), [["__scopeId", "data-v-6e4b3f17"]]), Ca = { class: "dialog__header" }, wa = { class: "dialog__body" }, Ta = { class: "field" }, Ea = { class: "field__label" }, Da = { class: "dialog__footer" }, Oa = 0, ka = 32767, Aa = 1, ja = /*#__PURE__*/ t(/* @__PURE__ */ P({
709
708
  __name: "SetNumberingValueDialog",
710
709
  props: { isOpen: { type: Boolean } },
711
710
  emits: ["close", "apply"],
712
711
  setup(e, { emit: t }) {
713
- let { Dialog: n } = h(), { t: i } = r(), a = e, o = t, s = R(Aa);
714
- U(() => a.isOpen, (e) => {
712
+ let { Dialog: n } = h(), { t: i } = r(), a = e, o = t, s = z(Aa);
713
+ W(() => a.isOpen, (e) => {
715
714
  e && (s.value = Aa);
716
715
  });
717
716
  function c() {
718
717
  let e = Number.isFinite(s.value) ? Math.trunc(s.value) : Oa;
719
718
  o("apply", Math.min(ka, Math.max(Oa, e))), o("close");
720
719
  }
721
- return (t, r) => (L(), O(V(n), {
720
+ return (t, r) => (R(), k(H(n), {
722
721
  open: e.isOpen,
723
- "aria-label": V(i)("dialogs.setNumberingValue.title"),
722
+ "aria-label": H(i)("dialogs.setNumberingValue.title"),
724
723
  style: {
725
724
  minWidth: "320px",
726
725
  maxWidth: "420px",
727
726
  width: "100%"
728
727
  },
729
728
  onClose: r[2] ||= (e) => t.$emit("close"),
730
- onKeydown: Ue(c, ["enter"])
729
+ onKeydown: He(c, ["enter"])
731
730
  }, {
732
- default: Ve(() => [
733
- j("div", Ca, B(V(i)("dialogs.setNumberingValue.title")), 1),
734
- j("div", wa, [j("label", Ta, [j("span", Ea, B(V(i)("dialogs.setNumberingValue.valueLabel")), 1), He(j("input", {
731
+ default: Be(() => [
732
+ M("div", Ca, V(H(i)("dialogs.setNumberingValue.title")), 1),
733
+ M("div", wa, [M("label", Ta, [M("span", Ea, V(H(i)("dialogs.setNumberingValue.valueLabel")), 1), Ve(M("input", {
735
734
  "onUpdate:modelValue": r[0] ||= (e) => s.value = e,
736
735
  class: "field__input",
737
736
  max: ka,
738
737
  min: Oa,
739
738
  type: "number"
740
739
  }, null, 512), [[
741
- H,
740
+ U,
742
741
  s.value,
743
742
  void 0,
744
743
  { number: !0 }
745
744
  ]])])]),
746
- j("div", Da, [j("button", {
745
+ M("div", Da, [M("button", {
747
746
  class: "dialog__btn",
748
747
  onClick: r[1] ||= (e) => t.$emit("close")
749
- }, B(V(i)("common.cancel")), 1), j("button", {
748
+ }, V(H(i)("common.cancel")), 1), M("button", {
750
749
  class: "dialog__btn dialog__btn--primary",
751
750
  onClick: c
752
- }, B(V(i)("common.apply")), 1)])
751
+ }, V(H(i)("common.apply")), 1)])
753
752
  ]),
754
753
  _: 1
755
754
  }, 8, ["open", "aria-label"]));
756
755
  }
757
- }), [["__scopeId", "data-v-b1446f71"]]), Ma = /* @__PURE__ */ N({
756
+ }), [["__scopeId", "data-v-b1446f71"]]), Ma = /* @__PURE__ */ P({
758
757
  __name: "DocxEditorDialogs",
759
758
  props: {
760
759
  view: {},
@@ -792,8 +791,8 @@ var aa = ["aria-label"], oa = {
792
791
  ],
793
792
  setup(e, { emit: t }) {
794
793
  let n = t;
795
- return (t, r) => (L(), A(T, null, [
796
- M(f, {
794
+ return (t, r) => (R(), j(E, null, [
795
+ N(f, {
797
796
  "is-open": e.showFindReplace,
798
797
  view: e.view,
799
798
  "scroll-visible-position-into-view": e.scrollVisiblePositionIntoView,
@@ -803,7 +802,7 @@ var aa = ["aria-label"], oa = {
803
802
  "view",
804
803
  "scroll-visible-position-into-view"
805
804
  ]),
806
- M(p, {
805
+ N(p, {
807
806
  "is-open": e.showHyperlink,
808
807
  view: e.view,
809
808
  bookmarks: e.bookmarks,
@@ -815,12 +814,12 @@ var aa = ["aria-label"], oa = {
815
814
  "view",
816
815
  "bookmarks"
817
816
  ]),
818
- M(s, {
817
+ N(s, {
819
818
  "is-open": e.showInsertSymbol,
820
819
  onClose: r[4] ||= (e) => n("update:showInsertSymbol", !1),
821
820
  onInsert: r[5] ||= (e) => n("insert-symbol", e)
822
821
  }, null, 8, ["is-open"]),
823
- M(c, {
822
+ N(c, {
824
823
  "is-open": e.showImageProperties,
825
824
  view: e.view,
826
825
  "pm-pos": e.selectedImagePmPos,
@@ -830,24 +829,24 @@ var aa = ["aria-label"], oa = {
830
829
  "view",
831
830
  "pm-pos"
832
831
  ]),
833
- M(m, {
832
+ N(m, {
834
833
  "is-open": e.showPageSetup,
835
834
  "section-properties": e.sectionProperties,
836
835
  onClose: r[7] ||= (e) => n("update:showPageSetup", !1),
837
836
  onApply: r[8] ||= (e) => n("page-setup-apply", e)
838
837
  }, null, 8, ["is-open", "section-properties"]),
839
- M(d, {
838
+ N(d, {
840
839
  "is-open": e.showTableProperties,
841
840
  "current-props": e.tableProperties,
842
841
  onClose: r[9] ||= (e) => n("update:showTableProperties", !1),
843
842
  onApply: r[10] ||= (e) => n("table-properties-apply", e)
844
843
  }, null, 8, ["is-open", "current-props"]),
845
- M(ja, {
844
+ N(ja, {
846
845
  "is-open": e.showNumberingValue,
847
846
  onClose: r[11] ||= (e) => n("update:showNumberingValue", !1),
848
847
  onApply: r[12] ||= (e) => n("numbering-value-apply", e)
849
848
  }, null, 8, ["is-open"]),
850
- M(o, {
849
+ N(o, {
851
850
  "is-open": e.showWatermark,
852
851
  "current-watermark": e.currentWatermark,
853
852
  onClose: r[13] ||= (e) => n("update:showWatermark", !1),
@@ -858,7 +857,7 @@ var aa = ["aria-label"], oa = {
858
857
  }), Na = {
859
858
  key: 0,
860
859
  class: "docx-editor-vue__title-bar"
861
- }, Pa = { class: "docx-editor-vue__title-bar-left" }, Fa = { class: "docx-editor-vue__title-bar-center" }, Ia = { class: "docx-editor-vue__title-bar-right" }, La = /* @__PURE__ */ N({
860
+ }, Pa = { class: "docx-editor-vue__title-bar-left" }, Fa = { class: "docx-editor-vue__title-bar-center" }, Ia = { class: "docx-editor-vue__title-bar-right" }, La = /* @__PURE__ */ P({
862
861
  __name: "DocxEditorMenuBar",
863
862
  props: {
864
863
  showMenuBar: {
@@ -890,13 +889,13 @@ var aa = ["aria-label"], oa = {
890
889
  ],
891
890
  setup(e, { emit: t }) {
892
891
  let n = t;
893
- return (t, r) => e.showMenuBar ? (L(), A("div", Na, [
894
- j("div", Pa, [Ie(t.$slots, "title-bar-left")]),
895
- j("div", Fa, [M(_, {
892
+ return (t, r) => e.showMenuBar ? (R(), j("div", Na, [
893
+ M("div", Pa, [Fe(t.$slots, "title-bar-left")]),
894
+ M("div", Fa, [N(_, {
896
895
  "model-value": e.documentName,
897
896
  editable: e.documentNameEditable,
898
897
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
899
- }, null, 8, ["model-value", "editable"]), M(x, {
898
+ }, null, 8, ["model-value", "editable"]), N(x, {
900
899
  "show-file-open": e.showFileOpen,
901
900
  "show-help-menu": e.showHelpMenu,
902
901
  "show-table-insert": e.showTableInsert,
@@ -907,8 +906,8 @@ var aa = ["aria-label"], oa = {
907
906
  "show-help-menu",
908
907
  "show-table-insert"
909
908
  ])]),
910
- j("div", Ia, [Ie(t.$slots, "title-bar-right")])
911
- ])) : k("", !0);
909
+ M("div", Ia, [Fe(t.$slots, "title-bar-right")])
910
+ ])) : A("", !0);
912
911
  }
913
912
  }), Ra = ["aria-label"], za = { class: "image-ctx-menu__icon" }, Ba = { class: "image-ctx-menu__label" }, Va = {
914
913
  key: 1,
@@ -928,7 +927,7 @@ var aa = ["aria-label"], oa = {
928
927
  key: 0,
929
928
  class: "image-ctx-menu__divider",
930
929
  role: "separator"
931
- }, Xa = 18, Za = 260, Qa = 10, $a = /*#__PURE__*/ t(/* @__PURE__ */ N({
930
+ }, Xa = 18, Za = 260, Qa = 10, $a = /*#__PURE__*/ t(/* @__PURE__ */ P({
932
931
  __name: "ImageContextMenu",
933
932
  props: {
934
933
  state: {},
@@ -949,7 +948,7 @@ var aa = ["aria-label"], oa = {
949
948
  function o() {
950
949
  a("open-properties"), a("close");
951
950
  }
952
- let { t: s } = r(), c = ia(), l = on, u = D(() => n.state ? cn(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
951
+ let { t: s } = r(), c = ia(), l = sn, u = O(() => n.state ? ln(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
953
952
  inline: "wrap_text",
954
953
  squareLeft: "format_image_left",
955
954
  squareRight: "format_image_right",
@@ -959,9 +958,9 @@ var aa = ["aria-label"], oa = {
959
958
  function f(e) {
960
959
  return d[e];
961
960
  }
962
- let p = D(() => {
961
+ let p = O(() => {
963
962
  if (!n.state) return {};
964
- let e = on.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
963
+ let e = sn.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
965
964
  return typeof window < "u" && (t + Za > window.innerWidth && (t = window.innerWidth - Za - Qa), r + e > window.innerHeight && (r = window.innerHeight - e - Qa), t < Qa && (t = Qa), r < Qa && (r = Qa)), {
966
965
  position: "fixed",
967
966
  left: `${t}px`,
@@ -971,7 +970,7 @@ var aa = ["aria-label"], oa = {
971
970
  };
972
971
  });
973
972
  function m(e) {
974
- return n.state ? un(e, n.state.currentWrapType) : !1;
973
+ return n.state ? dn(e, n.state.currentWrapType) : !1;
975
974
  }
976
975
  function h(e) {
977
976
  m(e) && (a("select", e.choice), a("close"));
@@ -985,70 +984,70 @@ var aa = ["aria-label"], oa = {
985
984
  function v(e) {
986
985
  e.key === "Escape" && (e.preventDefault(), a("close"));
987
986
  }
988
- return (t, n) => (L(), O(E, { to: "body" }, [e.state && e.state.open ? (L(), A("div", {
987
+ return (t, n) => (R(), k(D, { to: "body" }, [e.state && e.state.open ? (R(), j("div", {
989
988
  key: 0,
990
989
  class: "image-ctx-menu-backdrop",
991
990
  onMousedown: _,
992
- onContextmenu: n[0] ||= W((e) => t.$emit("close"), ["prevent"])
993
- }, null, 32)) : k("", !0), e.state && e.state.open ? (L(), A("div", {
991
+ onContextmenu: n[0] ||= G((e) => t.$emit("close"), ["prevent"])
992
+ }, null, 32)) : A("", !0), e.state && e.state.open ? (R(), j("div", {
994
993
  key: 1,
995
- class: P(["image-ctx-menu", V(c)]),
994
+ class: F(["image-ctx-menu", H(c)]),
996
995
  role: "menu",
997
- "aria-label": V(s)("imageWrap.menu.ariaLabel"),
996
+ "aria-label": H(s)("imageWrap.menu.ariaLabel"),
998
997
  "data-testid": "image-context-menu",
999
- style: F(p.value),
1000
- onContextmenu: n[4] ||= W(() => {}, ["prevent"]),
998
+ style: I(p.value),
999
+ onContextmenu: n[4] ||= G(() => {}, ["prevent"]),
1001
1000
  onKeydown: v
1002
1001
  }, [
1003
- e.canOpenProperties ? (L(), A("button", {
1002
+ e.canOpenProperties ? (R(), j("button", {
1004
1003
  key: 0,
1005
1004
  type: "button",
1006
1005
  role: "menuitem",
1007
1006
  class: "image-ctx-menu__item",
1008
1007
  "data-action": "open-properties",
1009
- onMousedown: n[1] ||= W(() => {}, ["prevent"]),
1008
+ onMousedown: n[1] ||= G(() => {}, ["prevent"]),
1010
1009
  onClick: o
1011
- }, [j("span", za, [M(i, {
1010
+ }, [M("span", za, [N(i, {
1012
1011
  name: "settings",
1013
1012
  size: Xa
1014
- })]), j("span", Ba, B(V(s)("imageWrap.menu.imageProperties")), 1)], 32)) : k("", !0),
1015
- e.canOpenProperties ? (L(), A("div", Va)) : k("", !0),
1016
- (L(!0), A(T, null, z(V(l), (e) => (L(), A("button", {
1013
+ })]), M("span", Ba, V(H(s)("imageWrap.menu.imageProperties")), 1)], 32)) : A("", !0),
1014
+ e.canOpenProperties ? (R(), j("div", Va)) : A("", !0),
1015
+ (R(!0), j(E, null, B(H(l), (e) => (R(), j("button", {
1017
1016
  key: e.choice,
1018
1017
  type: "button",
1019
1018
  role: "menuitem",
1020
- class: P(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
1019
+ class: F(["image-ctx-menu__item", { "image-ctx-menu__item--current": e.choice === u.value }]),
1021
1020
  "data-wrap-type": e.choice,
1022
1021
  "data-current": e.choice === u.value ? "true" : "false",
1023
1022
  "data-disabled": m(e) ? "false" : "true",
1024
1023
  disabled: !m(e),
1025
- title: V(s)(`imageWrap.menuDesc.${e.i18nDescKey}`),
1026
- onMousedown: n[2] ||= W(() => {}, ["prevent"]),
1024
+ title: H(s)(`imageWrap.menuDesc.${e.i18nDescKey}`),
1025
+ onMousedown: n[2] ||= G(() => {}, ["prevent"]),
1027
1026
  onClick: (t) => h(e)
1028
1027
  }, [
1029
- j("span", Ua, [M(i, {
1028
+ M("span", Ua, [N(i, {
1030
1029
  name: f(e.iconHint),
1031
1030
  size: Xa
1032
1031
  }, null, 8, ["name"])]),
1033
- j("span", Wa, B(V(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1034
- e.choice === u.value ? (L(), A("span", {
1032
+ M("span", Wa, V(H(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1033
+ e.choice === u.value ? (R(), j("span", {
1035
1034
  key: 0,
1036
1035
  class: "image-ctx-menu__current-dot",
1037
- "aria-label": V(s)("imageWrap.menu.ariaLabel")
1038
- }, "●", 8, Ga)) : k("", !0)
1036
+ "aria-label": H(s)("imageWrap.menu.ariaLabel")
1037
+ }, "●", 8, Ga)) : A("", !0)
1039
1038
  ], 42, Ha))), 128)),
1040
- e.textActions && e.textActions.length > 0 ? (L(), A(T, { key: 2 }, [n[5] ||= j("div", {
1039
+ e.textActions && e.textActions.length > 0 ? (R(), j(E, { key: 2 }, [n[5] ||= M("div", {
1041
1040
  class: "image-ctx-menu__divider",
1042
1041
  role: "separator"
1043
- }, null, -1), (L(!0), A(T, null, z(e.textActions, (e, t) => (L(), A(T, { key: `${e.action}-${t}` }, [j("button", {
1042
+ }, null, -1), (R(!0), j(E, null, B(e.textActions, (e, t) => (R(), j(E, { key: `${e.action}-${t}` }, [M("button", {
1044
1043
  type: "button",
1045
1044
  role: "menuitem",
1046
1045
  class: "image-ctx-menu__item image-ctx-menu__item--text",
1047
1046
  disabled: e.disabled,
1048
- onMousedown: n[3] ||= W(() => {}, ["prevent"]),
1047
+ onMousedown: n[3] ||= G(() => {}, ["prevent"]),
1049
1048
  onClick: (t) => g(e)
1050
- }, [j("span", qa, B(e.label), 1), e.shortcut ? (L(), A("span", Ja, B(e.shortcut), 1)) : k("", !0)], 40, Ka), e.dividerAfter ? (L(), A("div", Ya)) : k("", !0)], 64))), 128))], 64)) : k("", !0)
1051
- ], 46, Ra)) : k("", !0)]));
1049
+ }, [M("span", qa, V(e.label), 1), e.shortcut ? (R(), j("span", Ja, V(e.shortcut), 1)) : A("", !0)], 40, Ka), e.dividerAfter ? (R(), j("div", Ya)) : A("", !0)], 64))), 128))], 64)) : A("", !0)
1050
+ ], 46, Ra)) : A("", !0)]));
1052
1051
  }
1053
1052
  }), [["__scopeId", "data-v-fc8f35bc"]]), eo = ["disabled", "onMousedown"], to = {
1054
1053
  key: 0,
@@ -1056,7 +1055,7 @@ var aa = ["aria-label"], oa = {
1056
1055
  }, no = { class: "ctx-menu__label" }, ro = {
1057
1056
  key: 1,
1058
1057
  class: "ctx-menu__shortcut"
1059
- }, io = 220, ao = 32, oo = 10, so = /*#__PURE__*/ t(/* @__PURE__ */ N({
1058
+ }, io = 220, ao = 32, oo = 10, so = /*#__PURE__*/ t(/* @__PURE__ */ P({
1060
1059
  __name: "TextContextMenu",
1061
1060
  props: {
1062
1061
  isOpen: { type: Boolean },
@@ -1074,7 +1073,7 @@ var aa = ["aria-label"], oa = {
1074
1073
  setup(e, { emit: t }) {
1075
1074
  let n = e, i = ({ node: e }) => e;
1076
1075
  i.props = ["node"];
1077
- let a = t, { t: o } = r(), s = ia(), c = R(null), l = D(() => {
1076
+ let a = t, { t: o } = r(), s = ia(), c = z(null), l = O(() => {
1078
1077
  let e = [], t = n.customItems ?? [];
1079
1078
  for (let [n, r] of t.entries()) e.push({
1080
1079
  id: `custom-${r.id}`,
@@ -1227,7 +1226,7 @@ var aa = ["aria-label"], oa = {
1227
1226
  label: o("contextMenu.setNumberingValue"),
1228
1227
  action: "setNumberingValue"
1229
1228
  }), e;
1230
- }), u = D(() => {
1229
+ }), u = O(() => {
1231
1230
  let e = n.position.x, t = n.position.y, r = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = r * ao + i * 9;
1232
1231
  return typeof window < "u" && (e + io + oo > window.innerWidth && (e = window.innerWidth - io - oo), t + a + oo > window.innerHeight && (t = window.innerHeight - a - oo)), {
1233
1232
  position: "fixed",
@@ -1242,37 +1241,37 @@ var aa = ["aria-label"], oa = {
1242
1241
  function f(e) {
1243
1242
  e.key === "Escape" && a("close");
1244
1243
  }
1245
- return U(() => n.isOpen, (e) => {
1246
- e && Me(() => c.value?.focus());
1247
- }), (t, n) => (L(), O(E, { to: "body" }, [e.isOpen ? (L(), A("div", {
1244
+ return W(() => n.isOpen, (e) => {
1245
+ e && je(() => c.value?.focus());
1246
+ }), (t, n) => (R(), k(D, { to: "body" }, [e.isOpen ? (R(), j("div", {
1248
1247
  key: 0,
1249
1248
  class: "ctx-menu-backdrop",
1250
1249
  onMousedown: n[0] ||= (e) => t.$emit("close"),
1251
- onContextmenu: n[1] ||= W((e) => t.$emit("close"), ["prevent"])
1252
- }, null, 32)) : k("", !0), e.isOpen ? (L(), A("div", {
1250
+ onContextmenu: n[1] ||= G((e) => t.$emit("close"), ["prevent"])
1251
+ }, null, 32)) : A("", !0), e.isOpen ? (R(), j("div", {
1253
1252
  key: 1,
1254
1253
  ref_key: "menuRef",
1255
1254
  ref: c,
1256
- class: P(["ctx-menu", V(s)]),
1257
- style: F(u.value),
1258
- onContextmenu: n[2] ||= W(() => {}, ["prevent"]),
1255
+ class: F(["ctx-menu", H(s)]),
1256
+ style: I(u.value),
1257
+ onContextmenu: n[2] ||= G(() => {}, ["prevent"]),
1259
1258
  onKeydown: f
1260
- }, [(L(!0), A(T, null, z(l.value, (e, t) => (L(), A("button", {
1259
+ }, [(R(!0), j(E, null, B(l.value, (e, t) => (R(), j("button", {
1261
1260
  key: e.id || t,
1262
- class: P(["ctx-menu__item", {
1261
+ class: F(["ctx-menu__item", {
1263
1262
  "ctx-menu__item--disabled": e.disabled,
1264
1263
  "ctx-menu__item--divider": e.divider,
1265
1264
  "ctx-menu__item--emphasis": e.emphasis
1266
1265
  }]),
1267
1266
  disabled: e.disabled,
1268
- onMousedown: W((t) => d(e.action), ["prevent"])
1267
+ onMousedown: G((t) => d(e.action), ["prevent"])
1269
1268
  }, [
1270
- e.icon ? (L(), A("span", to, [M(i, { node: e.icon }, null, 8, ["node"])])) : k("", !0),
1271
- j("span", no, B(e.label), 1),
1272
- e.shortcut ? (L(), A("span", ro, B(e.shortcut), 1)) : k("", !0)
1273
- ], 42, eo))), 128))], 38)) : k("", !0)]));
1269
+ e.icon ? (R(), j("span", to, [N(i, { node: e.icon }, null, 8, ["node"])])) : A("", !0),
1270
+ M("span", no, V(e.label), 1),
1271
+ e.shortcut ? (R(), j("span", ro, V(e.shortcut), 1)) : A("", !0)
1272
+ ], 42, eo))), 128))], 38)) : A("", !0)]));
1274
1273
  }
1275
- }), [["__scopeId", "data-v-7af86709"]]), co = /* @__PURE__ */ N({
1274
+ }), [["__scopeId", "data-v-7af86709"]]), co = /* @__PURE__ */ P({
1276
1275
  __name: "DocxEditorOverlays",
1277
1276
  props: {
1278
1277
  readOnly: { type: Boolean },
@@ -1291,7 +1290,7 @@ var aa = ["aria-label"], oa = {
1291
1290
  ],
1292
1291
  setup(e, { emit: t }) {
1293
1292
  let n = t;
1294
- return (t, r) => (L(), A(T, null, [M(so, {
1293
+ return (t, r) => (R(), j(E, null, [N(so, {
1295
1294
  "is-open": e.contextMenu.isOpen,
1296
1295
  position: e.contextMenu.position,
1297
1296
  "has-selection": e.contextMenu.hasSelection,
@@ -1315,7 +1314,7 @@ var aa = ["aria-label"], oa = {
1315
1314
  "can-split-cell",
1316
1315
  "list-numbering",
1317
1316
  "custom-items"
1318
- ]), M($a, {
1317
+ ]), N($a, {
1319
1318
  state: e.imageContextMenu,
1320
1319
  "text-actions": e.imageContextMenuTextActions,
1321
1320
  "can-open-properties": e.canOpenImageProperties,
@@ -1349,7 +1348,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1349
1348
  }, mo = {
1350
1349
  key: 1,
1351
1350
  class: "image-overlay__dim image-overlay__dim--rotate"
1352
- }, ho = 4, go = 15, _o = 250, vo = 700, yo = /*#__PURE__*/ t(/* @__PURE__ */ N({
1351
+ }, ho = 4, go = 15, _o = 250, vo = 700, yo = /*#__PURE__*/ t(/* @__PURE__ */ P({
1353
1352
  __name: "ImageSelectionOverlay",
1354
1353
  props: {
1355
1354
  imageInfo: {},
@@ -1363,7 +1362,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1363
1362
  "context-menu"
1364
1363
  ],
1365
1364
  setup(e, { emit: t }) {
1366
- let { t: n } = r(), i = e, a = t, o = R(null), s = R(!1), c = R(!1), l = R(!1), u = R(0), d = R(0), f = R(0), p = R(null), m = "se", h = 0, g = 0, _ = 0, v = 0, ee = null, y = null, b = null, te = null;
1365
+ let { t: n } = r(), i = e, a = t, o = z(null), s = z(!1), c = z(!1), l = z(!1), u = z(0), d = z(0), f = z(0), p = z(null), m = "se", h = 0, g = 0, _ = 0, v = 0, ee = null, y = null, b = null, te = null;
1367
1366
  function ne(e, t) {
1368
1367
  if (!e) return null;
1369
1368
  try {
@@ -1388,7 +1387,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1388
1387
  let t = x();
1389
1388
  if (!t) return null;
1390
1389
  let n = Et(t, e.pmPos);
1391
- return n ? ln(n) : null;
1390
+ return n ? un(n) : null;
1392
1391
  }
1393
1392
  function oe() {
1394
1393
  let e = ie();
@@ -1428,22 +1427,22 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1428
1427
  cancelAnimationFrame(e), clearTimeout(a);
1429
1428
  };
1430
1429
  }
1431
- U(() => i.imageInfo, (e, t, n) => {
1430
+ W(() => i.imageInfo, (e, t, n) => {
1432
1431
  if (!i.imageInfo) {
1433
1432
  p.value = null;
1434
1433
  return;
1435
1434
  }
1436
1435
  ce(), n(() => se?.());
1437
- }, { immediate: !0 }), U(() => i.zoom, () => {
1436
+ }, { immediate: !0 }), W(() => i.zoom, () => {
1438
1437
  i.imageInfo && ce();
1439
- }), U(() => i.imageInfo, (e, t, n) => {
1438
+ }), W(() => i.imageInfo, (e, t, n) => {
1440
1439
  if (!i.imageInfo) return;
1441
1440
  let r = () => {
1442
1441
  y && cancelAnimationFrame(y), y = requestAnimationFrame(oe);
1443
1442
  }, a = o.value?.closest(".docx-editor-vue__pages-viewport");
1444
1443
  a?.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r, { passive: !0 });
1445
1444
  let s = null, c = !1;
1446
- Me(() => {
1445
+ je(() => {
1447
1446
  if (c || !i.imageInfo) return;
1448
1447
  let e = x();
1449
1448
  e && (s = new MutationObserver(() => ce()), s.observe(e, {
@@ -1454,7 +1453,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1454
1453
  c = !0, a?.removeEventListener("scroll", r), window.removeEventListener("resize", r), s?.disconnect(), y && cancelAnimationFrame(y);
1455
1454
  });
1456
1455
  }, { immediate: !0 });
1457
- let le = D(() => s.value ? u.value : p.value?.width || 0), ue = D(() => s.value ? d.value : p.value?.height || 0), de = D(() => {
1456
+ let S = O(() => s.value ? u.value : p.value?.width || 0), le = O(() => s.value ? d.value : p.value?.height || 0), ue = O(() => {
1458
1457
  let e = p.value;
1459
1458
  if (!e) return {
1460
1459
  position: "absolute",
@@ -1475,8 +1474,8 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1475
1474
  zIndex: ae.imageOverlay,
1476
1475
  pointerEvents: "auto"
1477
1476
  };
1478
- }), fe = D(() => {
1479
- let e = le.value, t = ue.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1477
+ }), de = O(() => {
1478
+ let e = S.value, t = le.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1480
1479
  return [
1481
1480
  {
1482
1481
  pos: "nw",
@@ -1544,11 +1543,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1544
1543
  }
1545
1544
  ];
1546
1545
  });
1547
- function pe(e, t) {
1548
- !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, ee = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", me), document.addEventListener("mouseup", he));
1546
+ function fe(e, t) {
1547
+ !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, ee = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", pe), document.addEventListener("mouseup", me));
1549
1548
  }
1550
- function me(e) {
1551
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = gn(m, n, r, _, v, a);
1549
+ function pe(e) {
1550
+ let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = _n(m, n, r, _, v, a);
1552
1551
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1553
1552
  let s = ee;
1554
1553
  if (s) {
@@ -1561,80 +1560,80 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1561
1560
  };
1562
1561
  }
1563
1562
  }
1564
- function he() {
1565
- document.removeEventListener("mousemove", me), document.removeEventListener("mouseup", he), s.value = !1, ee = null, a("interact-end");
1563
+ function me() {
1564
+ document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", me), s.value = !1, ee = null, a("interact-end");
1566
1565
  let e = i.view, t = i.imageInfo;
1567
1566
  if (!e || !t) {
1568
1567
  oe();
1569
1568
  return;
1570
1569
  }
1571
- let n = yn(e, t.pmPos, u.value, d.value);
1572
- n !== null && Ee(n), Me(() => oe());
1570
+ let n = bn(e, t.pmPos, u.value, d.value);
1571
+ n !== null && Te(n), je(() => oe());
1573
1572
  }
1574
- let ge = 0, _e = 0, ve = 0, ye = 0, S = null, be = null;
1575
- function C(e) {
1573
+ let he = 0, ge = 0, _e = 0, ve = 0, C = null, ye = null;
1574
+ function w(e) {
1576
1575
  if (!e) return 0;
1577
1576
  let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
1578
1577
  return t ? parseFloat(t) : 0;
1579
1578
  }
1580
- function xe(e, t) {
1579
+ function be(e, t) {
1581
1580
  let n = /scaleX\(-1\)/.test(e || ""), r = /scaleY\(-1\)/.test(e || ""), i = [], a = (t % 360 + 360) % 360;
1582
1581
  return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
1583
1582
  }
1584
- function Se(e, t) {
1585
- return Math.atan2(e - ge, -(t - _e)) * 180 / Math.PI;
1583
+ function xe(e, t) {
1584
+ return Math.atan2(e - he, -(t - ge)) * 180 / Math.PI;
1586
1585
  }
1587
- function Ce(e) {
1586
+ function Se(e) {
1588
1587
  if (!i.imageInfo) return;
1589
1588
  let t = i.imageInfo.element.getBoundingClientRect();
1590
- ge = t.left + t.width / 2, _e = t.top + t.height / 2, S = re(ne(i.view, i.imageInfo.pmPos)), ye = C(S), be = i.imageInfo.element.querySelector("img"), ve = Se(e.clientX, e.clientY), f.value = ye, l.value = !0, a("interact-start"), document.addEventListener("mousemove", we), document.addEventListener("mouseup", w);
1589
+ he = t.left + t.width / 2, ge = t.top + t.height / 2, C = re(ne(i.view, i.imageInfo.pmPos)), ve = w(C), ye = i.imageInfo.element.querySelector("img"), _e = xe(e.clientX, e.clientY), f.value = ve, l.value = !0, a("interact-start"), document.addEventListener("mousemove", Ce), document.addEventListener("mouseup", T);
1591
1590
  }
1592
- function we(e) {
1593
- let t = Se(e.clientX, e.clientY) - ve, n = ye + t;
1594
- e.shiftKey || (n = Math.round(n / go) * go), f.value = (n % 360 + 360) % 360, be && (be.style.transform = xe(S, f.value) || "");
1591
+ function Ce(e) {
1592
+ let t = xe(e.clientX, e.clientY) - _e, n = ve + t;
1593
+ e.shiftKey || (n = Math.round(n / go) * go), f.value = (n % 360 + 360) % 360, ye && (ye.style.transform = be(C, f.value) || "");
1595
1594
  }
1596
- function w() {
1597
- document.removeEventListener("mousemove", we), document.removeEventListener("mouseup", w), l.value = !1, a("interact-end");
1595
+ function T() {
1596
+ document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", T), l.value = !1, a("interact-end");
1598
1597
  let e = i.view, t = i.imageInfo;
1599
1598
  try {
1600
1599
  let n = e && t ? ne(e, t.pmPos) : null;
1601
1600
  e && t && n && (e.dispatch(e.state.tr.setNodeMarkup(t.pmPos, void 0, {
1602
1601
  ...n.attrs,
1603
- transform: xe(re(n), f.value)
1604
- })), Ee(t.pmPos));
1602
+ transform: be(re(n), f.value)
1603
+ })), Te(t.pmPos));
1605
1604
  } catch {} finally {
1606
- be && (be.style.transform = ""), be = null, S = null;
1605
+ ye && (ye.style.transform = ""), ye = null, C = null;
1607
1606
  }
1608
- Me(() => oe());
1607
+ je(() => oe());
1609
1608
  }
1610
- let E = null;
1611
- function Te(e) {
1609
+ let D = null;
1610
+ function we(e) {
1612
1611
  if (!i.imageInfo || !p.value) return;
1613
1612
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1614
1613
  let s = e.clientX - t, l = e.clientY - n;
1615
1614
  if (!(!o && Math.sqrt(s * s + l * l) < ho)) {
1616
1615
  if (!o) {
1617
- o = !0, c.value = !0, a("interact-start"), E = document.createElement("div"), E.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
1616
+ o = !0, c.value = !0, a("interact-start"), D = document.createElement("div"), D.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
1618
1617
  let e = i.zoom;
1619
- E.style.width = `${r.width * e}px`, E.style.height = `${r.height * e}px`, document.body.appendChild(E);
1618
+ D.style.width = `${r.width * e}px`, D.style.height = `${r.height * e}px`, document.body.appendChild(D);
1620
1619
  }
1621
- if (E) {
1620
+ if (D) {
1622
1621
  let t = i.zoom;
1623
- E.style.left = `${e.clientX - r.width * t / 2}px`, E.style.top = `${e.clientY - r.height * t / 2}px`;
1622
+ D.style.left = `${e.clientX - r.width * t / 2}px`, D.style.top = `${e.clientY - r.height * t / 2}px`;
1624
1623
  }
1625
1624
  }
1626
1625
  }, l = (e) => {
1627
- document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), b = null, te = null, E &&= (E.remove(), null), c.value = !1, o && (a("interact-end"), O(e.clientX, e.clientY));
1626
+ document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", l), b = null, te = null, D &&= (D.remove(), null), c.value = !1, o && (a("interact-end"), k(e.clientX, e.clientY));
1628
1627
  };
1629
1628
  b = s, te = l, document.addEventListener("mousemove", s), document.addEventListener("mouseup", l);
1630
1629
  }
1631
- function O(e, t) {
1630
+ function k(e, t) {
1632
1631
  let n = i.view, r = i.imageInfo;
1633
1632
  if (!n || !r) return;
1634
1633
  let a = ne(n, r.pmPos);
1635
1634
  if (!a) return;
1636
1635
  let s;
1637
- if (bn(a)) {
1636
+ if (xn(a)) {
1638
1637
  let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1639
1638
  if (!a || a.length === 0) return;
1640
1639
  let c = null;
@@ -1650,60 +1649,60 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1650
1649
  c = e ? e.querySelector(".layout-page-content") : null;
1651
1650
  }
1652
1651
  if (!c) return;
1653
- let l = c.getBoundingClientRect(), u = i.zoom, d = an((e - l.left) / u), f = an((t - l.top) / u);
1654
- s = _n(n, r.pmPos, d, f);
1652
+ let l = c.getBoundingClientRect(), u = i.zoom, d = on((e - l.left) / u), f = on((t - l.top) / u);
1653
+ s = vn(n, r.pmPos, d, f);
1655
1654
  } else {
1656
1655
  let i = x();
1657
1656
  if (!i) return;
1658
- let a = mn(i, e, t, 1);
1657
+ let a = hn(i, e, t, 1);
1659
1658
  if (a == null || a < 0) return;
1660
- s = vn(n, r.pmPos, a);
1659
+ s = yn(n, r.pmPos, a);
1661
1660
  }
1662
- s !== null && Ee(s), Me(() => oe());
1661
+ s !== null && Te(s), je(() => oe());
1663
1662
  }
1664
- function Ee(e) {
1663
+ function Te(e) {
1665
1664
  let t = i.view;
1666
1665
  if (t) try {
1667
- let n = Y.create(t.state.doc, e);
1666
+ let n = an.create(t.state.doc, e);
1668
1667
  t.dispatch(t.state.tr.setSelection(n));
1669
1668
  } catch {}
1670
1669
  }
1671
- return I(() => {
1672
- document.removeEventListener("mousemove", me), document.removeEventListener("mouseup", he), document.removeEventListener("mousemove", we), document.removeEventListener("mouseup", w), b && document.removeEventListener("mousemove", b), te && document.removeEventListener("mouseup", te), E &&= (E.remove(), null), y && cancelAnimationFrame(y), se?.();
1673
- }), (t, r) => e.imageInfo ? (L(), A("div", {
1670
+ return L(() => {
1671
+ document.removeEventListener("mousemove", pe), document.removeEventListener("mouseup", me), document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", T), b && document.removeEventListener("mousemove", b), te && document.removeEventListener("mouseup", te), D &&= (D.remove(), null), y && cancelAnimationFrame(y), se?.();
1672
+ }), (t, r) => e.imageInfo ? (R(), j("div", {
1674
1673
  key: 0,
1675
1674
  ref_key: "overlayRootRef",
1676
1675
  ref: o,
1677
1676
  class: "image-overlay",
1678
- style: F(de.value),
1679
- onMousedown: r[3] ||= W(() => {}, ["stop"])
1677
+ style: I(ue.value),
1678
+ onMousedown: r[3] ||= G(() => {}, ["stop"])
1680
1679
  }, [
1681
- r[4] ||= j("div", { class: "image-overlay__border" }, null, -1),
1682
- j("div", {
1680
+ r[4] ||= M("div", { class: "image-overlay__border" }, null, -1),
1681
+ M("div", {
1683
1682
  class: "image-overlay__body",
1684
- style: F({ cursor: c.value ? "grabbing" : "grab" }),
1685
- onMousedown: r[0] ||= W((e) => Te(e), ["prevent", "stop"]),
1686
- onContextmenu: r[1] ||= W((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1683
+ style: I({ cursor: c.value ? "grabbing" : "grab" }),
1684
+ onMousedown: r[0] ||= G((e) => we(e), ["prevent", "stop"]),
1685
+ onContextmenu: r[1] ||= G((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1687
1686
  }, null, 36),
1688
- (L(!0), A(T, null, z(fe.value, (e) => (L(), A("div", {
1687
+ (R(!0), j(E, null, B(de.value, (e) => (R(), j("div", {
1689
1688
  key: e.pos,
1690
1689
  class: "image-overlay__handle",
1691
- style: F(e.style),
1690
+ style: I(e.style),
1692
1691
  "data-handle": e.pos,
1693
- onMousedown: W((t) => pe(t, e.pos), ["prevent", "stop"])
1692
+ onMousedown: G((t) => fe(t, e.pos), ["prevent", "stop"])
1694
1693
  }, null, 44, uo))), 128)),
1695
- r[5] ||= j("div", { class: "image-overlay__rotate-line" }, null, -1),
1696
- j("div", {
1694
+ r[5] ||= M("div", { class: "image-overlay__rotate-line" }, null, -1),
1695
+ M("div", {
1697
1696
  class: "image-overlay__rotate-handle",
1698
- style: F({ left: `${le.value / 2 - 7}px` }),
1699
- title: V(n)("imageOverlay.rotate"),
1700
- onMousedown: r[2] ||= W((e) => Ce(e), ["prevent", "stop"])
1697
+ style: I({ left: `${S.value / 2 - 7}px` }),
1698
+ title: H(n)("imageOverlay.rotate"),
1699
+ onMousedown: r[2] ||= G((e) => Se(e), ["prevent", "stop"])
1701
1700
  }, null, 44, fo),
1702
- s.value ? (L(), A("div", po, B(Math.round(u.value)) + " × " + B(Math.round(d.value)), 1)) : k("", !0),
1703
- l.value ? (L(), A("div", mo, B(Math.round(f.value)) + "° ", 1)) : k("", !0)
1704
- ], 36)) : k("", !0);
1701
+ s.value ? (R(), j("div", po, V(Math.round(u.value)) + " × " + V(Math.round(d.value)), 1)) : A("", !0),
1702
+ l.value ? (R(), j("div", mo, V(Math.round(f.value)) + "° ", 1)) : A("", !0)
1703
+ ], 36)) : A("", !0);
1705
1704
  }
1706
- }), [["__scopeId", "data-v-4c3d1a1d"]]), bo = /* @__PURE__ */ N({
1705
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), bo = /* @__PURE__ */ P({
1707
1706
  __name: "HeaderFooterSelectionOverlay",
1708
1707
  props: {
1709
1708
  pagesContainer: {},
@@ -1713,11 +1712,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1713
1712
  zoom: {}
1714
1713
  },
1715
1714
  setup(e) {
1716
- let t = e, n = new wn(), r = () => {
1715
+ let t = e, n = new Tn(), r = () => {
1717
1716
  if (!t.pagesContainer) return;
1718
1717
  n.sync(t.pagesContainer, t.selection, t.zoom);
1719
1718
  let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
1720
- Sn({
1719
+ Cn({
1721
1720
  hiddenHost: t.hiddenContainer,
1722
1721
  editorView: t.editorView,
1723
1722
  visibleCaret: e ? {
@@ -1726,11 +1725,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1726
1725
  } : null
1727
1726
  });
1728
1727
  };
1729
- U(() => t.pagesContainer, (e, t, i) => {
1730
- e && (e.addEventListener(Cn, r), r(), i(() => {
1731
- e.removeEventListener(Cn, r), n.clear(e);
1728
+ W(() => t.pagesContainer, (e, t, i) => {
1729
+ e && (e.addEventListener(wn, r), r(), i(() => {
1730
+ e.removeEventListener(wn, r), n.clear(e);
1732
1731
  }));
1733
- }, { immediate: !0 }), U(() => [
1732
+ }, { immediate: !0 }), W(() => [
1734
1733
  t.selection?.rId,
1735
1734
  t.selection?.kind,
1736
1735
  t.selection?.from,
@@ -1739,7 +1738,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1739
1738
  t.hiddenContainer,
1740
1739
  t.editorView,
1741
1740
  t.zoom
1742
- ], r), U(() => t.hiddenContainer, (e, t, n) => {
1741
+ ], r), W(() => t.hiddenContainer, (e, t, n) => {
1743
1742
  e && (e.addEventListener("focusin", r), e.addEventListener("compositionend", r), n(() => {
1744
1743
  e.removeEventListener("focusin", r), e.removeEventListener("compositionend", r);
1745
1744
  }));
@@ -1749,11 +1748,11 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1749
1748
  i = null, r();
1750
1749
  });
1751
1750
  }, o = typeof window > "u" ? null : window;
1752
- return o?.addEventListener("scroll", a, !0), Pe(() => {
1753
- i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), xn(t.hiddenContainer);
1751
+ return o?.addEventListener("scroll", a, !0), Ne(() => {
1752
+ i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Sn(t.hiddenContainer);
1754
1753
  }), (e, t) => null;
1755
1754
  }
1756
- }), xo = { class: "hf-editor-label" }, So = /*#__PURE__*/ t(/* @__PURE__ */ N({
1755
+ }), xo = { class: "hf-editor-label" }, So = /*#__PURE__*/ t(/* @__PURE__ */ P({
1757
1756
  __name: "InlineHeaderFooterEditor",
1758
1757
  props: {
1759
1758
  edit: {},
@@ -1761,7 +1760,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1761
1760
  },
1762
1761
  emits: ["close", "remove"],
1763
1762
  setup(e, { emit: t }) {
1764
- let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = R(!1), c = D(() => n.edit.position === "header" ? o("headerFooter.header") : o("headerFooter.footer")), l = D(() => ({
1763
+ let n = e, i = t, { Button: a } = h(), { t: o } = r(), s = z(!1), c = O(() => n.edit.position === "header" ? o("headerFooter.header") : o("headerFooter.footer")), l = O(() => ({
1765
1764
  position: "absolute",
1766
1765
  top: `${n.edit.targetRect?.top ?? 0}px`,
1767
1766
  left: `${n.edit.targetRect?.left ?? 0}px`,
@@ -1771,7 +1770,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1771
1770
  zIndex: 10
1772
1771
  })), u = (e) => {
1773
1772
  s.value = !1;
1774
- let t = n.getView(), r = ct.nodes.field;
1773
+ let t = n.getView(), r = st.nodes.field;
1775
1774
  if (!t || !r) return;
1776
1775
  let { $from: i, from: a } = t.state.selection, o = t.state.storedMarks ?? i.marks(), c = r.create({
1777
1776
  fieldType: e,
@@ -1783,70 +1782,70 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1783
1782
  }, d = (e) => {
1784
1783
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), i("close"));
1785
1784
  }, f = null;
1786
- return Ne(() => {
1785
+ return Me(() => {
1787
1786
  document.addEventListener("keydown", d, !0);
1788
1787
  let e = 0, t = () => {
1789
1788
  let r = n.getView();
1790
1789
  r && !r.hasFocus() && r.focus(), e++, e < 30 && (f = requestAnimationFrame(t));
1791
1790
  };
1792
1791
  f = requestAnimationFrame(t);
1793
- }), I(() => {
1792
+ }), L(() => {
1794
1793
  document.removeEventListener("keydown", d, !0), f !== null && cancelAnimationFrame(f);
1795
- }), (t, n) => (L(), A("div", {
1794
+ }), (t, n) => (R(), j("div", {
1796
1795
  class: "hf-inline-editor",
1797
- style: F(l.value),
1796
+ style: I(l.value),
1798
1797
  role: "presentation"
1799
- }, [j("div", { class: P(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [j("span", xo, B(c.value), 1), j("div", {
1798
+ }, [M("div", { class: F(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [M("span", xo, V(c.value), 1), M("div", {
1800
1799
  class: "hf-options",
1801
- onMousedown: n[5] ||= W(() => {}, ["stop"])
1802
- }, [M(V(a), {
1800
+ onMousedown: n[5] ||= G(() => {}, ["stop"])
1801
+ }, [N(H(a), {
1803
1802
  variant: "ghost",
1804
1803
  size: "xs",
1805
1804
  "class-name": "hf-options-button",
1806
- onClick: n[0] ||= W((e) => s.value = !s.value, ["stop"])
1805
+ onClick: n[0] ||= G((e) => s.value = !s.value, ["stop"])
1807
1806
  }, {
1808
- default: Ve(() => [Oe(B(V(o)("headerFooter.options")) + " ▾ ", 1)]),
1807
+ default: Be(() => [De(V(H(o)("headerFooter.options")) + " ▾ ", 1)]),
1809
1808
  _: 1
1810
- }), s.value ? (L(), A("div", {
1809
+ }), s.value ? (R(), j("div", {
1811
1810
  key: 0,
1812
- class: P(["hf-options-dropdown", { "hf-options-dropdown--up": e.edit.position === "footer" }])
1811
+ class: F(["hf-options-dropdown", { "hf-options-dropdown--up": e.edit.position === "footer" }])
1813
1812
  }, [
1814
- M(V(a), {
1813
+ N(H(a), {
1815
1814
  variant: "ghost",
1816
1815
  size: "xs",
1817
1816
  onClick: n[1] ||= (e) => u("PAGE")
1818
1817
  }, {
1819
- default: Ve(() => [Oe(B(V(o)("headerFooter.insertPageNumber")), 1)]),
1818
+ default: Be(() => [De(V(H(o)("headerFooter.insertPageNumber")), 1)]),
1820
1819
  _: 1
1821
1820
  }),
1822
- M(V(a), {
1821
+ N(H(a), {
1823
1822
  variant: "ghost",
1824
1823
  size: "xs",
1825
1824
  onClick: n[2] ||= (e) => u("NUMPAGES")
1826
1825
  }, {
1827
- default: Ve(() => [Oe(B(V(o)("headerFooter.insertPageCount")), 1)]),
1826
+ default: Be(() => [De(V(H(o)("headerFooter.insertPageCount")), 1)]),
1828
1827
  _: 1
1829
1828
  }),
1830
- n[6] ||= j("div", { class: "hf-options-divider" }, null, -1),
1831
- M(V(a), {
1829
+ n[6] ||= M("div", { class: "hf-options-divider" }, null, -1),
1830
+ N(H(a), {
1832
1831
  variant: "ghost",
1833
1832
  size: "xs",
1834
1833
  onClick: n[3] ||= (e) => i("remove")
1835
1834
  }, {
1836
- default: Ve(() => [Oe(B(e.edit.position === "header" ? V(o)("headerFooter.removeHeader") : V(o)("headerFooter.removeFooter")), 1)]),
1835
+ default: Be(() => [De(V(e.edit.position === "header" ? H(o)("headerFooter.removeHeader") : H(o)("headerFooter.removeFooter")), 1)]),
1837
1836
  _: 1
1838
1837
  }),
1839
- M(V(a), {
1838
+ N(H(a), {
1840
1839
  variant: "ghost",
1841
1840
  size: "xs",
1842
1841
  onClick: n[4] ||= (e) => i("close")
1843
1842
  }, {
1844
- default: Ve(() => [Oe(B(e.edit.position === "header" ? V(o)("headerFooter.closeHeaderEditing") : V(o)("headerFooter.closeFooterEditing")), 1)]),
1843
+ default: Be(() => [De(V(e.edit.position === "header" ? H(o)("headerFooter.closeHeaderEditing") : H(o)("headerFooter.closeFooterEditing")), 1)]),
1845
1844
  _: 1
1846
1845
  })
1847
- ], 2)) : k("", !0)], 32)], 2)], 4));
1846
+ ], 2)) : A("", !0)], 32)], 2)], 4));
1848
1847
  }
1849
- }), [["__scopeId", "data-v-a0bd3730"]]), Co = /*#__PURE__*/ t(/* @__PURE__ */ N({
1848
+ }), [["__scopeId", "data-v-a0bd3730"]]), Co = /*#__PURE__*/ t(/* @__PURE__ */ P({
1850
1849
  __name: "PageIndicator",
1851
1850
  props: {
1852
1851
  currentPage: {},
@@ -1855,17 +1854,17 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1855
1854
  },
1856
1855
  setup(e) {
1857
1856
  let { t } = r();
1858
- return (n, r) => (L(), A("div", {
1857
+ return (n, r) => (R(), j("div", {
1859
1858
  class: "docx-editor-vue__page-indicator",
1860
- style: F({ opacity: +!!e.visible }),
1859
+ style: I({ opacity: +!!e.visible }),
1861
1860
  "aria-live": "polite",
1862
1861
  role: "status"
1863
- }, B(V(t)("viewer.pageIndicator", {
1862
+ }, V(H(t)("viewer.pageIndicator", {
1864
1863
  current: e.currentPage,
1865
1864
  total: e.totalPages
1866
1865
  })), 5));
1867
1866
  }
1868
- }), [["__scopeId", "data-v-f1904974"]]), wo = ["data-folio-block-id"], To = ["data-folio-block-id", "title"], Eo = 2.5, Do = 5, Oo = 6, ko = 2, Ao = 2, jo = /*#__PURE__*/ t(/* @__PURE__ */ N({
1867
+ }), [["__scopeId", "data-v-f1904974"]]), wo = ["data-folio-block-id"], To = ["data-folio-block-id", "title"], Eo = 2.5, Do = 5, Oo = 6, ko = 2, Ao = 2, jo = /*#__PURE__*/ t(/* @__PURE__ */ P({
1869
1868
  __name: "TemplateDirectivesOverlay",
1870
1869
  props: {
1871
1870
  getView: { type: Function },
@@ -1956,7 +1955,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1956
1955
  }
1957
1956
  return i;
1958
1957
  }
1959
- let f = R([]), p = R([]), m = R(null), h = R(null), g = R(null), _ = It(), v = null;
1958
+ let f = z([]), p = z([]), m = z(null), h = z(null), g = z(null), _ = It(), v = null;
1960
1959
  function ee() {
1961
1960
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1962
1961
  v = null, y();
@@ -1968,7 +1967,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1968
1967
  f.value = [], p.value = [], m.value = null, h.value = null;
1969
1968
  return;
1970
1969
  }
1971
- let a = En(i);
1970
+ let a = Dn(i);
1972
1971
  if (a.length === 0) {
1973
1972
  f.value = [], p.value = [], m.value = null, h.value = null;
1974
1973
  return;
@@ -1982,22 +1981,22 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
1982
1981
  });
1983
1982
  e() && (f.value = a, h.value = i.selection.head, m.value = o, p.value = s);
1984
1983
  }
1985
- U(() => [
1984
+ W(() => [
1986
1985
  t.editorState,
1987
1986
  t.zoom,
1988
1987
  t.layout,
1989
1988
  t.blocks,
1990
1989
  t.measures
1991
1990
  ], () => ee());
1992
- let b = D(() => c(f.value)), te = D(() => m.value ? d(b.value, p.value, m.value) : []), ne = D(() => {
1991
+ let b = O(() => c(f.value)), te = O(() => m.value ? d(b.value, p.value, m.value) : []), ne = O(() => {
1993
1992
  let e = /* @__PURE__ */ new Map();
1994
1993
  for (let t of b.value) e.set(t.openerFrom, t.blockId), e.set(t.closerFrom, t.blockId);
1995
1994
  return e;
1996
- }), re = D(() => {
1995
+ }), re = O(() => {
1997
1996
  let e = /* @__PURE__ */ new Map();
1998
1997
  for (let t of b.value) e.set(t.closerFrom, l(t.kind, t.openerExpr));
1999
1998
  return e;
2000
- }), x = D(() => u(b.value, h.value));
1999
+ }), x = O(() => u(b.value, h.value));
2001
2000
  function ie(e) {
2002
2001
  return e === g.value || e === x.value;
2003
2002
  }
@@ -2019,49 +2018,49 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2019
2018
  { "folio-template-directive--active": n }
2020
2019
  ];
2021
2020
  }
2022
- function le(e) {
2021
+ function S(e) {
2023
2022
  if (!(e instanceof HTMLElement)) return null;
2024
2023
  let t = e.dataset.folioBlockId;
2025
2024
  return t === void 0 ? null : Number(t);
2026
2025
  }
2027
- function ue(e) {
2028
- let t = le(e.target);
2026
+ function le(e) {
2027
+ let t = S(e.target);
2029
2028
  t !== null && (g.value = t);
2030
2029
  }
2031
- function de(e) {
2032
- let t = le(e.target);
2030
+ function ue(e) {
2031
+ let t = S(e.target);
2033
2032
  if (t === null) return;
2034
- let n = le(e.relatedTarget);
2033
+ let n = S(e.relatedTarget);
2035
2034
  n !== t && g.value === t && (g.value = n);
2036
2035
  }
2037
- return Ne(() => ee()), I(() => {
2036
+ return Me(() => ee()), L(() => {
2038
2037
  _.invalidate(), v !== null && (cancelAnimationFrame(v), v = null);
2039
- }), (t, n) => (L(), A("div", {
2038
+ }), (t, n) => (R(), j("div", {
2040
2039
  class: "folio-template-directives-overlay",
2041
2040
  "data-folio-template-directives-overlay": "",
2042
- onPointerover: ue,
2043
- onPointerout: de
2044
- }, [(L(!0), A(T, null, z(te.value, (t) => (L(), A(T, { key: `rail:${t.blockId}` }, [(L(!0), A(T, null, z(t.segments, (n, r) => (L(), A("div", {
2041
+ onPointerover: le,
2042
+ onPointerout: ue
2043
+ }, [(R(!0), j(E, null, B(te.value, (t) => (R(), j(E, { key: `rail:${t.blockId}` }, [(R(!0), j(E, null, B(t.segments, (n, r) => (R(), j("div", {
2045
2044
  key: `rail:${t.blockId}:${r}`,
2046
- class: P([
2045
+ class: F([
2047
2046
  "folio-template-band-rail",
2048
2047
  `folio-template-band-rail--${t.kind}`,
2049
2048
  { "folio-template-band-rail--active": ie(t.blockId) }
2050
2049
  ]),
2051
2050
  "data-folio-block-id": t.blockId,
2052
- style: F({
2051
+ style: I({
2053
2052
  position: "absolute",
2054
2053
  left: `${t.railX * e.zoom}px`,
2055
2054
  top: `${n.top * e.zoom}px`,
2056
2055
  width: `${Eo * e.zoom}px`,
2057
2056
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
2058
2057
  })
2059
- }, null, 14, wo))), 128))], 64))), 128)), (L(!0), A(T, null, z(p.value, (t, n) => (L(), A(T, { key: `d:${n}` }, [(L(!0), A(T, null, z(t.rects, (r, i) => (L(), A("span", {
2058
+ }, null, 14, wo))), 128))], 64))), 128)), (R(!0), j(E, null, B(p.value, (t, n) => (R(), j(E, { key: `d:${n}` }, [(R(!0), j(E, null, B(t.rects, (r, i) => (R(), j("span", {
2060
2059
  key: `d:${n}:${i}`,
2061
- class: P(ce(t.range)),
2060
+ class: F(ce(t.range)),
2062
2061
  "data-folio-block-id": oe(t.range),
2063
2062
  title: se(t.range),
2064
- style: F({
2063
+ style: I({
2065
2064
  position: "absolute",
2066
2065
  left: `${(r.x - 1) * e.zoom}px`,
2067
2066
  top: `${(r.y + 1) * e.zoom}px`,
@@ -2075,7 +2074,7 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2075
2074
  "rel",
2076
2075
  "target",
2077
2076
  "title"
2078
- ], No = ["title"], Po = ["title"], Fo = ["title"], Io = { class: "docx-hyperlink-popup__edit-row" }, Lo = ["placeholder", "onKeydown"], Ro = { class: "docx-hyperlink-popup__edit-row" }, zo = ["onKeydown"], Bo = ["disabled"], Vo = /*#__PURE__*/ t(/* @__PURE__ */ N({
2077
+ ], No = ["title"], Po = ["title"], Fo = ["title"], Io = { class: "docx-hyperlink-popup__edit-row" }, Lo = ["placeholder", "onKeydown"], Ro = { class: "docx-hyperlink-popup__edit-row" }, zo = ["onKeydown"], Bo = ["disabled"], Vo = /*#__PURE__*/ t(/* @__PURE__ */ P({
2079
2078
  __name: "HyperlinkPopup",
2080
2079
  props: {
2081
2080
  data: {},
@@ -2089,25 +2088,25 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2089
2088
  "close"
2090
2089
  ],
2091
2090
  setup(e, { emit: t }) {
2092
- let { t: n } = r(), i = Nn(void 0), a = e, o = t, s = R(!1), c = R(""), l = R(""), u = R(null), d = D(() => ({
2091
+ let { t: n } = r(), i = Pn(void 0), a = e, o = t, s = z(!1), c = z(""), l = z(""), u = z(null), d = O(() => ({
2093
2092
  left: (a.data?.position.left ?? 0) + "px",
2094
2093
  top: (a.data?.position.top ?? 0) + "px"
2095
2094
  }));
2096
- U(() => a.data?.href, () => {
2095
+ W(() => a.data?.href, () => {
2097
2096
  s.value = !1;
2098
2097
  });
2099
2098
  let f = null, p = null;
2100
2099
  function m() {
2101
2100
  p &&= (clearTimeout(p), null), f &&= (document.removeEventListener("mousedown", f), null);
2102
2101
  }
2103
- U(() => a.data, (e) => {
2102
+ W(() => a.data, (e) => {
2104
2103
  m(), e && (f = (e) => {
2105
2104
  let t = u.value, n = e.target;
2106
2105
  t && n instanceof Node && !t.contains(n) && o("close");
2107
2106
  }, p = setTimeout(() => {
2108
2107
  f && document.addEventListener("mousedown", f);
2109
2108
  }, 0));
2110
- }, { immediate: !0 }), I(m);
2109
+ }, { immediate: !0 }), L(m);
2111
2110
  function h() {
2112
2111
  a.data && (c.value = a.data.displayText, l.value = a.data.href, s.value = !0);
2113
2112
  }
@@ -2117,43 +2116,43 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2117
2116
  function _() {
2118
2117
  a.data && (o("copy", a.data.href), typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(a.data.href).catch(() => {}));
2119
2118
  }
2120
- return (t, r) => e.data ? (L(), A("div", {
2119
+ return (t, r) => e.data ? (R(), j("div", {
2121
2120
  key: 0,
2122
2121
  ref_key: "popupRef",
2123
2122
  ref: u,
2124
- class: P(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
2125
- style: F(d.value),
2126
- onMousedown: r[6] ||= W(() => {}, ["stop"])
2127
- }, [s.value ? (L(), A(T, { key: 1 }, [j("div", Io, [He(j("input", {
2123
+ class: F(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
2124
+ style: I(d.value),
2125
+ onMousedown: r[6] ||= G(() => {}, ["stop"])
2126
+ }, [s.value ? (R(), j(E, { key: 1 }, [M("div", Io, [Ve(M("input", {
2128
2127
  class: "docx-hyperlink-popup__input",
2129
- placeholder: V(n)("displayText"),
2128
+ placeholder: H(n)("displayText"),
2130
2129
  "onUpdate:modelValue": r[2] ||= (e) => c.value = e,
2131
- onKeydown: [Ue(W(g, ["prevent"]), ["enter"]), r[3] ||= Ue((e) => t.$emit("close"), ["esc"])]
2132
- }, null, 40, Lo), [[H, c.value]])]), j("div", Ro, [He(j("input", {
2130
+ onKeydown: [He(G(g, ["prevent"]), ["enter"]), r[3] ||= He((e) => t.$emit("close"), ["esc"])]
2131
+ }, null, 40, Lo), [[U, c.value]])]), M("div", Ro, [Ve(M("input", {
2133
2132
  class: "docx-hyperlink-popup__input",
2134
2133
  placeholder: "https://...",
2135
2134
  "onUpdate:modelValue": r[4] ||= (e) => l.value = e,
2136
- onKeydown: [Ue(W(g, ["prevent"]), ["enter"]), r[5] ||= Ue((e) => t.$emit("close"), ["esc"])]
2137
- }, null, 40, zo), [[H, l.value]]), j("button", {
2135
+ onKeydown: [He(G(g, ["prevent"]), ["enter"]), r[5] ||= He((e) => t.$emit("close"), ["esc"])]
2136
+ }, null, 40, zo), [[U, l.value]]), M("button", {
2138
2137
  class: "docx-hyperlink-popup__apply",
2139
2138
  disabled: !l.value.trim(),
2140
- onClick: W(g, ["prevent"])
2141
- }, B(V(n)("common.apply")), 9, Bo)])], 64)) : (L(), A(T, { key: 0 }, [
2142
- r[10] ||= De("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-370ef571><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-370ef571><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-370ef571></circle><path d=\"M2 12h20\" data-v-370ef571></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-370ef571></path></svg></span>", 1),
2143
- j("a", {
2139
+ onClick: G(g, ["prevent"])
2140
+ }, V(H(n)("common.apply")), 9, Bo)])], 64)) : (R(), j(E, { key: 0 }, [
2141
+ r[10] ||= Ee("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-370ef571><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-370ef571><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-370ef571></circle><path d=\"M2 12h20\" data-v-370ef571></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-370ef571></path></svg></span>", 1),
2142
+ M("a", {
2144
2143
  class: "docx-hyperlink-popup__url",
2145
2144
  href: e.data.href,
2146
- rel: V(i).rel,
2147
- target: V(i).target,
2145
+ rel: H(i).rel,
2146
+ target: H(i).target,
2148
2147
  title: e.data.href,
2149
- onClick: r[0] ||= W((n) => t.$emit("navigate", e.data.href), ["prevent"])
2150
- }, B(e.data.href), 9, Mo),
2151
- r[11] ||= j("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
2152
- j("button", {
2148
+ onClick: r[0] ||= G((n) => t.$emit("navigate", e.data.href), ["prevent"])
2149
+ }, V(e.data.href), 9, Mo),
2150
+ r[11] ||= M("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
2151
+ M("button", {
2153
2152
  class: "docx-hyperlink-popup__btn",
2154
- title: V(n)("copyLink"),
2155
- onClick: W(_, ["prevent"])
2156
- }, [...r[7] ||= [j("svg", {
2153
+ title: H(n)("copyLink"),
2154
+ onClick: G(_, ["prevent"])
2155
+ }, [...r[7] ||= [M("svg", {
2157
2156
  width: "18",
2158
2157
  height: "18",
2159
2158
  viewBox: "0 0 24 24",
@@ -2162,20 +2161,20 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2162
2161
  "stroke-width": "2",
2163
2162
  "stroke-linecap": "round",
2164
2163
  "stroke-linejoin": "round"
2165
- }, [j("rect", {
2164
+ }, [M("rect", {
2166
2165
  x: "9",
2167
2166
  y: "9",
2168
2167
  width: "13",
2169
2168
  height: "13",
2170
2169
  rx: "2",
2171
2170
  ry: "2"
2172
- }), j("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, No),
2173
- e.readOnly ? k("", !0) : (L(), A("button", {
2171
+ }), M("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, No),
2172
+ e.readOnly ? A("", !0) : (R(), j("button", {
2174
2173
  key: 0,
2175
2174
  class: "docx-hyperlink-popup__btn",
2176
- title: V(n)("editLink"),
2177
- onClick: W(h, ["prevent"])
2178
- }, [...r[8] ||= [j("svg", {
2175
+ title: H(n)("editLink"),
2176
+ onClick: G(h, ["prevent"])
2177
+ }, [...r[8] ||= [M("svg", {
2179
2178
  width: "18",
2180
2179
  height: "18",
2181
2180
  viewBox: "0 0 24 24",
@@ -2184,14 +2183,14 @@ var uo = ["data-handle", "onMousedown"], fo = ["title"], po = {
2184
2183
  "stroke-width": "2",
2185
2184
  "stroke-linecap": "round",
2186
2185
  "stroke-linejoin": "round"
2187
- }, [j("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), j("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, Po)),
2188
- e.readOnly ? k("", !0) : (L(), A("button", {
2186
+ }, [M("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), M("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, Po)),
2187
+ e.readOnly ? A("", !0) : (R(), j("button", {
2189
2188
  key: 1,
2190
2189
  class: "docx-hyperlink-popup__btn",
2191
- title: V(n)("removeLink"),
2192
- onClick: r[1] ||= W((e) => t.$emit("remove"), ["prevent"])
2193
- }, [...r[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-370ef571><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-370ef571></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-370ef571></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-370ef571></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-370ef571></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-370ef571></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-370ef571></line></svg>", 1)]], 8, Fo))
2194
- ], 64))], 38)) : k("", !0);
2190
+ title: H(n)("removeLink"),
2191
+ onClick: r[1] ||= G((e) => t.$emit("remove"), ["prevent"])
2192
+ }, [...r[9] ||= [Ee("<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-370ef571><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-370ef571></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-370ef571></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-370ef571></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-370ef571></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-370ef571></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-370ef571></line></svg>", 1)]], 8, Fo))
2193
+ ], 64))], 38)) : A("", !0);
2195
2194
  }
2196
2195
  }), [["__scopeId", "data-v-370ef571"]]);
2197
2196
  //#endregion
@@ -2211,17 +2210,17 @@ function Wo(e, t, n, r) {
2211
2210
  let i = e.state.schema.marks.comment, a = Ho(e.state.doc.content.size, t);
2212
2211
  if (!i || !a) return !1;
2213
2212
  let o = e.state.tr;
2214
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: In }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(rn.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2213
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: Ln }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Y.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2215
2214
  }
2216
2215
  function Go(e, t) {
2217
2216
  let n = e.state.schema.marks.comment, r = Ho(e.state.doc.content.size, t);
2218
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: In })));
2217
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: Ln })));
2219
2218
  }
2220
2219
  //#endregion
2221
2220
  //#region src/composables/useCommentLifecycle.ts
2222
2221
  var Ko = 408, qo = 12;
2223
2222
  function Jo(e) {
2224
- let t = R(!1), n = R(null), r = R(null), i = R(null), a = R(null);
2223
+ let t = z(!1), n = z(null), r = z(null), i = z(null), a = z(null);
2225
2224
  function o(t) {
2226
2225
  let n = e.editorView.value, r = e.pagesContainer.value;
2227
2226
  if (!n || !r) return null;
@@ -2283,7 +2282,7 @@ function Jo(e) {
2283
2282
  r.value = null;
2284
2283
  return;
2285
2284
  }
2286
- if (e.sessionKind() === "prosemirror" && !Wo(s, u, In, { selectEnd: !0 })) {
2285
+ if (e.sessionKind() === "prosemirror" && !Wo(s, u, Ln, { selectEnd: !0 })) {
2287
2286
  r.value = null, i.value = null;
2288
2287
  return;
2289
2288
  }
@@ -2317,15 +2316,15 @@ function Jo(e) {
2317
2316
  //#endregion
2318
2317
  //#region src/composables/useCommentManagement.ts
2319
2318
  function Yo(e) {
2320
- let t = Ln(), n = R([]), r = R(!1);
2319
+ let t = Rn(), n = z([]), r = z(!1);
2321
2320
  function i() {
2322
2321
  r.value = !0;
2323
2322
  }
2324
2323
  function a() {
2325
2324
  r.value = !1;
2326
2325
  }
2327
- let o = D(() => e.commentsProp() !== void 0), s = D(() => (e.canonicalTick?.value, e.editor?.getCanonicalComments() ?? null)), c = D(() => s.value ?? (o.value ? e.commentsProp() ?? [] : n.value)), l = R(null);
2328
- U(s, (t) => {
2326
+ let o = O(() => e.commentsProp() !== void 0), s = O(() => (e.canonicalTick?.value, e.editor?.getCanonicalComments() ?? null)), c = O(() => s.value ?? (o.value ? e.commentsProp() ?? [] : n.value)), l = z(null);
2327
+ W(s, (t) => {
2329
2328
  if (t === null) {
2330
2329
  l.value = null;
2331
2330
  return;
@@ -2333,8 +2332,8 @@ function Yo(e) {
2333
2332
  let n = JSON.stringify(t);
2334
2333
  l.value !== null && l.value !== n && e.onCommentsChange(t), l.value = n;
2335
2334
  }, { flush: "sync" });
2336
- let u, d = R(0);
2337
- U([
2335
+ let u, d = z(0);
2336
+ W([
2338
2337
  () => s.value !== null,
2339
2338
  () => {
2340
2339
  let t = e.commentsProp();
@@ -2354,7 +2353,7 @@ function Yo(e) {
2354
2353
  }
2355
2354
  let o = e.commentsProp() ?? [], c = e.editor?.applyCanonicalComment({
2356
2355
  type: "replace",
2357
- comments: Re(o)
2356
+ comments: Le(o)
2358
2357
  });
2359
2358
  if (c?.status === "applied") {
2360
2359
  u = n;
@@ -2362,12 +2361,12 @@ function Yo(e) {
2362
2361
  }
2363
2362
  if (c?.status !== "refused" || c.retry !== "afterComposition") return;
2364
2363
  let l = e.editor?.getView();
2365
- l && i(Bn(l, () => d.value += 1));
2364
+ l && i(Vn(l, () => d.value += 1));
2366
2365
  }, { flush: "post" });
2367
2366
  function f(t) {
2368
2367
  return e.editor?.applyCanonicalComment({
2369
2368
  type: "replace",
2370
- comments: Re(t)
2369
+ comments: Le(t)
2371
2370
  }) == null ? (o.value || (n.value = t), e.onCommentsChange(t), !1) : !0;
2372
2371
  }
2373
2372
  function p(e) {
@@ -2377,12 +2376,12 @@ function Yo(e) {
2377
2376
  p([e]);
2378
2377
  }
2379
2378
  function h(n, r, i) {
2380
- return Rn(t, c.value, e.editorView.value), Vn(t, n, i ?? e.author(), r);
2379
+ return zn(t, c.value, e.editorView.value), Hn(t, n, i ?? e.author(), r);
2381
2380
  }
2382
2381
  function g() {
2383
2382
  if (a(), s.value !== null || o.value) return;
2384
2383
  let n = e.getDocument()?.package.document.comments;
2385
- Rn(t, n, e.editorView.value), f(n && n.length > 0 ? n : []);
2384
+ zn(t, n, e.editorView.value), f(n && n.length > 0 ? n : []);
2386
2385
  }
2387
2386
  function _(t, n) {
2388
2387
  e.editor?.applyCanonicalComment({
@@ -2440,7 +2439,7 @@ function Yo(e) {
2440
2439
  e.editor.resolveCanonicalRevisions([t], n ? "accept" : "reject");
2441
2440
  return;
2442
2441
  }
2443
- (n ? Hn : qn)(t)(r.state, r.dispatch);
2442
+ (n ? Un : Z)(t)(r.state, r.dispatch);
2444
2443
  }
2445
2444
  }
2446
2445
  function ne(e) {
@@ -2451,25 +2450,25 @@ function Yo(e) {
2451
2450
  }
2452
2451
  function x(t, n) {
2453
2452
  let r = e.editorView.value;
2454
- r && zn({
2453
+ r && Bn({
2455
2454
  editor: e.editor,
2456
2455
  from: t,
2457
2456
  to: n,
2458
2457
  resolution: "accept"
2459
- }) === null && Un(t, n)(r.state, r.dispatch);
2458
+ }) === null && Wn(t, n)(r.state, r.dispatch);
2460
2459
  }
2461
2460
  function ie(t, n) {
2462
2461
  let r = e.editorView.value;
2463
- r && zn({
2462
+ r && Bn({
2464
2463
  editor: e.editor,
2465
2464
  from: t,
2466
2465
  to: n,
2467
2466
  resolution: "reject"
2468
- }) === null && Q(t, n)(r.state, r.dispatch);
2467
+ }) === null && Yn(t, n)(r.state, r.dispatch);
2469
2468
  }
2470
2469
  return {
2471
2470
  comments: c,
2472
- commentsDirty: D(() => r.value),
2471
+ commentsDirty: O(() => r.value),
2473
2472
  clearCommentsDirty: a,
2474
2473
  createComment: h,
2475
2474
  pushComment: m,
@@ -2490,7 +2489,7 @@ function Yo(e) {
2490
2489
  //#endregion
2491
2490
  //#region src/utils/imageClipboard.ts
2492
2491
  function Xo(e, t, n) {
2493
- let r = Yn(e.state), i = e.state.schema.marks.insertion;
2492
+ let r = Xn(e.state), i = e.state.schema.marks.insertion;
2494
2493
  if (!r || !i) return;
2495
2494
  let a = t.selection.from, o = a - n.nodeSize;
2496
2495
  o < 0 || t.addMark(o, a, i.create({
@@ -2622,7 +2621,7 @@ function os(e) {
2622
2621
  return e === "left" || e === "right" || e === "none" ? e : null;
2623
2622
  }
2624
2623
  function ss(e) {
2625
- let { t } = r(), n = R({
2624
+ let { t } = r(), n = z({
2626
2625
  isOpen: !1,
2627
2626
  position: {
2628
2627
  x: 0,
@@ -2633,11 +2632,11 @@ function ss(e) {
2633
2632
  onImage: !1,
2634
2633
  canMergeCells: !1,
2635
2634
  canSplitCell: !1,
2636
- listNumbering: G
2637
- }), i = R(null), a = R({
2635
+ listNumbering: K
2636
+ }), i = z(null), a = z({
2638
2637
  from: 0,
2639
2638
  to: 0
2640
- }), o = D(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), s = D(() => [
2639
+ }), o = O(() => (e.customContextMenuItems?.() ?? []).filter((e) => !e.requiresSelection || n.value.hasSelection)), s = O(() => [
2641
2640
  {
2642
2641
  action: "cut",
2643
2642
  label: t("contextMenu.cut"),
@@ -2664,7 +2663,7 @@ function ss(e) {
2664
2663
  t(e.state, (t) => e.dispatch(t), e);
2665
2664
  }
2666
2665
  function l(t, n, r, i, a) {
2667
- let o = i === "inline" ? sn(t, e.zoom.value) : void 0;
2666
+ let o = i === "inline" ? cn(t, e.zoom.value) : void 0;
2668
2667
  return {
2669
2668
  open: !0,
2670
2669
  position: r,
@@ -2677,12 +2676,12 @@ function ss(e) {
2677
2676
  function u(t) {
2678
2677
  let r = e.editorView.value;
2679
2678
  if (!r) return;
2680
- let o = ln(t.target);
2679
+ let o = un(t.target);
2681
2680
  if (o) {
2682
2681
  let a = Number(o.dataset.pmStart);
2683
2682
  if (!Number.isNaN(a)) {
2684
2683
  try {
2685
- let e = Y.create(r.state.doc, a);
2684
+ let e = an.create(r.state.doc, a);
2686
2685
  r.dispatch(r.state.tr.setSelection(e));
2687
2686
  } catch {}
2688
2687
  e.selectedImage.value = {
@@ -2707,7 +2706,7 @@ function ss(e) {
2707
2706
  e.setPmSelection(a);
2708
2707
  } catch {}
2709
2708
  }
2710
- let s = ut(r.state), { empty: c, from: u, to: d } = r.state.selection;
2709
+ let s = lt(r.state), { empty: c, from: u, to: d } = r.state.selection;
2711
2710
  a.value = {
2712
2711
  from: u,
2713
2712
  to: d
@@ -2722,7 +2721,7 @@ function ss(e) {
2722
2721
  onImage: !!o,
2723
2722
  canMergeCells: !!s.hasMultiCellSelection,
2724
2723
  canSplitCell: !!s.canSplitCell,
2725
- listNumbering: ot(r.state)
2724
+ listNumbering: at(r.state)
2726
2725
  };
2727
2726
  }
2728
2727
  function d(t) {
@@ -2836,12 +2835,12 @@ function cs(e) {
2836
2835
  function n(t) {
2837
2836
  e.sidebarAutoOpenedRef.value = !1, e.loadDocument(t);
2838
2837
  }
2839
- U(e.documentBuffer, (e) => {
2838
+ W(e.documentBuffer, (e) => {
2840
2839
  e && t(e);
2841
- }), U(e.document, (e) => {
2840
+ }), W(e.document, (e) => {
2842
2841
  e && n(e);
2843
- }), Ne(async () => {
2844
- await Me();
2842
+ }), Me(async () => {
2843
+ await je();
2845
2844
  let r = e.documentBuffer(), i = e.document();
2846
2845
  r ? await t(r) : i && n(i);
2847
2846
  });
@@ -2861,7 +2860,7 @@ var ls = Date.now(), us = ({ createComment: e, publishComments: t, apply: n }) =
2861
2860
  return e.clearCommentsDirty(), e.onSave?.(r), r;
2862
2861
  };
2863
2862
  function fs(e) {
2864
- let t = [], n = new lr();
2863
+ let t = [], n = new ur();
2865
2864
  function r() {
2866
2865
  e.onPrint?.(), window.print();
2867
2866
  }
@@ -2875,8 +2874,8 @@ function fs(e) {
2875
2874
  function a(t, n) {
2876
2875
  let r = e.pagesRef.value;
2877
2876
  if (!r) return !1;
2878
- let i = wr(r, t), a = i.at(0);
2879
- return a ? (wt(a), n?.highlight && Tr(i, n.highlight), !0) : !1;
2877
+ let i = Tr(r, t), a = i.at(0);
2878
+ return a ? (wt(a), n?.highlight && Er(i, n.highlight), !0) : !1;
2880
2879
  }
2881
2880
  function o() {
2882
2881
  return e.zoom.value;
@@ -2884,7 +2883,7 @@ function fs(e) {
2884
2883
  let s = null;
2885
2884
  function c() {
2886
2885
  let t = e.getActiveView();
2887
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
2886
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
2888
2887
  let n = e.getActiveCanonicalStory?.() ?? "main";
2889
2888
  return t && n !== "main" ? e.editor.applyCanonicalStoryHistory({
2890
2889
  view: t,
@@ -2892,11 +2891,11 @@ function fs(e) {
2892
2891
  direction: "undo"
2893
2892
  }) : e.editor.undo();
2894
2893
  }
2895
- return t === e.editorView.value ? e.editor.undo() : t ? An(t.state, t.dispatch) : !1;
2894
+ return t === e.editorView.value ? e.editor.undo() : t ? jn(t.state, t.dispatch) : !1;
2896
2895
  }
2897
2896
  function l() {
2898
2897
  let t = e.getActiveView();
2899
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
2898
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
2900
2899
  let n = e.getActiveCanonicalStory?.() ?? "main";
2901
2900
  return t && n !== "main" ? e.editor.applyCanonicalStoryHistory({
2902
2901
  view: t,
@@ -2904,17 +2903,17 @@ function fs(e) {
2904
2903
  direction: "redo"
2905
2904
  }) : e.editor.redo();
2906
2905
  }
2907
- return t === e.editorView.value ? e.editor.redo() : t ? kn(t.state, t.dispatch) : !1;
2906
+ return t === e.editorView.value ? e.editor.redo() : t ? An(t.state, t.dispatch) : !1;
2908
2907
  }
2909
2908
  function u() {
2910
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) return e.editor.canUndo();
2909
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) return e.editor.canUndo();
2911
2910
  let t = e.getActiveView();
2912
- return t === e.editorView.value ? e.editor.canUndo() : t ? An(t.state) : !1;
2911
+ return t === e.editorView.value ? e.editor.canUndo() : t ? jn(t.state) : !1;
2913
2912
  }
2914
2913
  function d() {
2915
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) return e.editor.canRedo();
2914
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) return e.editor.canRedo();
2916
2915
  let t = e.getActiveView();
2917
- return t === e.editorView.value ? e.editor.canRedo() : t ? kn(t.state) : !1;
2916
+ return t === e.editorView.value ? e.editor.canRedo() : t ? An(t.state) : !1;
2918
2917
  }
2919
2918
  function f() {
2920
2919
  let t = e.getActiveView();
@@ -2922,9 +2921,9 @@ function fs(e) {
2922
2921
  }
2923
2922
  function p(t) {
2924
2923
  let n = e.editorView.value, r = e.pagesRef.value, i = e.scrollRootRef.value;
2925
- return !n || !r || !i ? /* @__PURE__ */ new Map() : Dr({
2924
+ return !n || !r || !i ? /* @__PURE__ */ new Map() : Or({
2926
2925
  blockIds: t,
2927
- snapshot: mr(n.state.doc),
2926
+ snapshot: hr(n.state.doc),
2928
2927
  pagesContainer: r,
2929
2928
  scrollRoot: i
2930
2929
  });
@@ -2934,7 +2933,7 @@ function fs(e) {
2934
2933
  }
2935
2934
  function h(t) {
2936
2935
  let n = e.pagesRef.value;
2937
- return n ? Er(n, t) : () => {};
2936
+ return n ? Dr(n, t) : () => {};
2938
2937
  }
2939
2938
  function g() {
2940
2939
  return s ??= {
@@ -2964,7 +2963,7 @@ function fs(e) {
2964
2963
  getPageNumberForPmPos: (t) => {
2965
2964
  let n = e.layout.value;
2966
2965
  if (!n) return null;
2967
- let r = Xn(n, t);
2966
+ let r = Zn(n, t);
2968
2967
  return r == null ? null : r + 1;
2969
2968
  },
2970
2969
  getBlockRect: m,
@@ -2979,11 +2978,11 @@ function fs(e) {
2979
2978
  function v() {
2980
2979
  let t = e.layout.value, n = e.editorView.value;
2981
2980
  if (!t || !n) return 0;
2982
- let r = Xn(t, n.state.selection.from);
2981
+ let r = Zn(t, n.state.selection.from);
2983
2982
  return r == null ? 0 : r + 1;
2984
2983
  }
2985
2984
  function ee(t) {
2986
- let n = Cr(e.layout.value, t);
2985
+ let n = wr(e.layout.value, t);
2987
2986
  if (!n) return;
2988
2987
  if (n.type === "position") {
2989
2988
  e.scrollVisiblePositionIntoView(n.pmPos);
@@ -2992,50 +2991,52 @@ function fs(e) {
2992
2991
  let r = e.pagesRef.value?.querySelector(`[data-page-number="${n.pageIndex + 1}"]`);
2993
2992
  wt(r ?? null);
2994
2993
  }
2995
- let y = ({ snapshot: t, operations: r, mode: i = "tracked-changes", author: a = e.author() }) => {
2996
- let o = e.editorView.value;
2997
- if (!o) return {
2994
+ let y = ({ undefinedReferences: t, snapshot: r, operations: i, mode: a = "tracked-changes", author: o = e.author() }) => {
2995
+ let s = e.editorView.value;
2996
+ if (!s) return {
2998
2997
  applied: [],
2999
- skipped: r.map((e) => ({
2998
+ skipped: i.map((e) => ({
3000
2999
  id: e.id,
3001
3000
  reason: "unsupportedBlock"
3002
3001
  }))
3003
3002
  };
3004
- let s = e.editor.applyCanonicalDocumentOperations({
3005
- snapshot: t,
3003
+ let c = e.editor.applyCanonicalDocumentOperations({
3004
+ undefinedReferences: t,
3005
+ snapshot: r,
3006
3006
  batch: {
3007
- version: cr,
3008
- operations: r,
3009
- mode: i
3007
+ version: $,
3008
+ operations: i,
3009
+ mode: a
3010
3010
  },
3011
- author: a
3011
+ author: o
3012
3012
  });
3013
- if (s) return s;
3014
- let c = new Set(Z(o.state).map((e) => e.suggestionId)), { applied: l, skipped: u } = us({
3015
- createComment: (t) => e.createAIEditComment(t, a),
3013
+ if (c) return c;
3014
+ let l = new Set(Jn(s.state).map((e) => e.suggestionId)), { applied: u, skipped: d } = us({
3015
+ createComment: (t) => e.createAIEditComment(t, o),
3016
3016
  publishComments: e.publishAIEditComments,
3017
- apply: (e) => dr({
3018
- view: o,
3019
- snapshot: t,
3017
+ apply: (e) => fr({
3018
+ undefinedReferences: t,
3019
+ view: s,
3020
+ snapshot: r,
3020
3021
  batch: {
3021
- version: cr,
3022
- operations: r,
3023
- mode: i
3022
+ version: $,
3023
+ operations: i,
3024
+ mode: a
3024
3025
  },
3025
- author: a,
3026
+ author: o,
3026
3027
  createCommentId: e
3027
3028
  })
3028
3029
  });
3029
- return i === "suggested" && n.recordApplied({
3030
- snapshot: t,
3030
+ return a === "suggested" && n.recordApplied({
3031
+ snapshot: r,
3031
3032
  story: { type: "main" },
3032
- operations: r,
3033
- applied: l,
3034
- author: a,
3035
- activeSuggestionIds: c
3033
+ operations: i,
3034
+ applied: u,
3035
+ author: o,
3036
+ activeSuggestionIds: l
3036
3037
  }), {
3037
- applied: l,
3038
- skipped: u
3038
+ applied: u,
3039
+ skipped: d
3039
3040
  };
3040
3041
  };
3041
3042
  return { exposed: {
@@ -3062,49 +3063,51 @@ function fs(e) {
3062
3063
  ensureEditorView: () => e.editor.ensureView(),
3063
3064
  createAIEditSnapshot: () => {
3064
3065
  let t = e.editorView.value;
3065
- return t ? hr(t.state.doc, Ze(t.state)) : null;
3066
+ return t ? gr(t.state.doc, Xe(t.state)) : null;
3066
3067
  },
3067
- applyDocumentOperations: ({ snapshot: r, batch: i, author: a = e.author() }) => {
3068
- fr(i.version);
3069
- let o = e.editorView.value;
3070
- if (!o) {
3068
+ applyDocumentOperations: ({ undefinedReferences: r, snapshot: i, batch: a, author: o = e.author() }) => {
3069
+ pr(a.version);
3070
+ let s = e.editorView.value;
3071
+ if (!s) {
3071
3072
  let e = "committed";
3072
- i.dryRun === !0 ? e = "previewed" : i.atomic === !0 && (e = "rejected");
3073
- let t = i.operations.map((e) => ({
3073
+ a.dryRun === !0 ? e = "previewed" : a.atomic === !0 && (e = "rejected");
3074
+ let t = a.operations.map((e) => ({
3074
3075
  id: e.id,
3075
3076
  reason: "unsupportedBlock"
3076
3077
  }));
3077
3078
  return {
3078
- version: cr,
3079
+ version: $,
3079
3080
  status: e,
3080
3081
  applied: [],
3081
3082
  skipped: t,
3082
- issues: yr(i.operations, t),
3083
+ issues: br(a.operations, t),
3083
3084
  receipts: [],
3084
3085
  undoHandle: null
3085
3086
  };
3086
3087
  }
3087
- let s = e.editor.applyCanonicalDocumentOperations({
3088
- snapshot: r,
3089
- batch: i,
3090
- author: a
3088
+ let c = e.editor.applyCanonicalDocumentOperations({
3089
+ undefinedReferences: r,
3090
+ snapshot: i,
3091
+ batch: a,
3092
+ author: o
3091
3093
  });
3092
- if (s) return s;
3093
- let c = t.at(-1);
3094
- c && (!o.state.doc.eq(c.afterState.doc) || e.getComments() !== c.commentsAfter) && (t.length = 0);
3095
- let l = e.getComments(), u = {
3096
- state: o.state,
3094
+ if (c) return c;
3095
+ let l = t.at(-1);
3096
+ l && (!s.state.doc.eq(l.afterState.doc) || e.getComments() !== l.commentsAfter) && (t.length = 0);
3097
+ let u = e.getComments(), d = {
3098
+ state: s.state,
3097
3099
  dispatch: (e) => {
3098
- o.dispatch(On(e)), u.state = o.state;
3100
+ s.dispatch(kn(e)), d.state = s.state;
3099
3101
  }
3100
- }, d = new Set(Z(o.state).map((e) => e.suggestionId)), f = us({
3101
- createComment: (t) => e.createAIEditComment(t, a),
3102
+ }, f = new Set(Jn(s.state).map((e) => e.suggestionId)), p = us({
3103
+ createComment: (t) => e.createAIEditComment(t, o),
3102
3104
  publishComments: e.publishAIEditComments,
3103
- apply: (e) => dr({
3104
- view: u,
3105
- snapshot: r,
3106
- batch: i,
3107
- author: a,
3105
+ apply: (e) => fr({
3106
+ undefinedReferences: r,
3107
+ view: d,
3108
+ snapshot: i,
3109
+ batch: a,
3110
+ author: o,
3108
3111
  createCommentId: e,
3109
3112
  createUndoHandle: () => ({
3110
3113
  type: "documentOperationUndo",
@@ -3112,19 +3115,19 @@ function fs(e) {
3112
3115
  })
3113
3116
  })
3114
3117
  });
3115
- return i.mode === "suggested" && f.status === "committed" && n.recordApplied({
3116
- snapshot: r,
3118
+ return a.mode === "suggested" && p.status === "committed" && n.recordApplied({
3119
+ snapshot: i,
3117
3120
  story: { type: "main" },
3118
- operations: i.operations,
3119
- applied: f.applied,
3120
- author: a,
3121
- activeSuggestionIds: d
3122
- }), f.undoHandle !== null && t.push({
3123
- undoHandle: f.undoHandle,
3124
- afterState: o.state,
3125
- commentsBefore: l,
3121
+ operations: a.operations,
3122
+ applied: p.applied,
3123
+ author: o,
3124
+ activeSuggestionIds: f
3125
+ }), p.undoHandle !== null && t.push({
3126
+ undoHandle: p.undoHandle,
3127
+ afterState: s.state,
3128
+ commentsBefore: u,
3126
3129
  commentsAfter: e.getComments()
3127
- }), f;
3130
+ }), p;
3128
3131
  },
3129
3132
  undoDocumentOperations: (n) => {
3130
3133
  let r = e.editor.undoCanonicalDocumentOperations(n);
@@ -3157,26 +3160,26 @@ function fs(e) {
3157
3160
  applyAIEditOperations: y,
3158
3161
  acceptAIEditOperation: (t) => {
3159
3162
  let n = e.editorView.value;
3160
- return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "accept") : Hn(t)(n.state, n.dispatch) : !1;
3163
+ return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "accept") : Un(t)(n.state, n.dispatch) : !1;
3161
3164
  },
3162
3165
  rejectAIEditOperation: (t) => {
3163
3166
  let n = e.editorView.value;
3164
- return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "reject") : qn(t)(n.state, n.dispatch) : !1;
3167
+ return n ? e.editor.getCanonicalDocument() ? e.editor.resolveCanonicalRevisions(typeof t == "number" ? [t] : t, "reject") : Z(t)(n.state, n.dispatch) : !1;
3165
3168
  },
3166
3169
  undo: c,
3167
3170
  redo: l,
3168
3171
  scrollToAIEditOperation: (t) => {
3169
3172
  let n = e.editorView.value;
3170
3173
  if (!n) return !1;
3171
- let r = Gn(n.state, t);
3174
+ let r = Kn(n.state, t);
3172
3175
  if (!r) return !1;
3173
- let { from: i, to: a } = Fr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3176
+ let { from: i, to: a } = Ir(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3174
3177
  return n.dispatch(n.state.tr.setSelection(X.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
3175
3178
  },
3176
3179
  scrollToBlock: (t, n) => {
3177
3180
  let r = e.editorView.value;
3178
3181
  if (!r) return !1;
3179
- let i = Ir({
3182
+ let i = Lr({
3180
3183
  blockId: t,
3181
3184
  doc: r.state.doc,
3182
3185
  snapshot: n
@@ -3188,7 +3191,7 @@ function fs(e) {
3188
3191
  highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
3189
3192
  let i = e.editorView.value;
3190
3193
  if (!i) return "none";
3191
- let o = Rr({
3194
+ let o = zr({
3192
3195
  blockId: t,
3193
3196
  text: n,
3194
3197
  doc: i.state.doc,
@@ -3196,13 +3199,13 @@ function fs(e) {
3196
3199
  });
3197
3200
  if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
3198
3201
  e.setPassageHighlight(null);
3199
- let s = Ir({
3202
+ let s = Lr({
3200
3203
  blockId: t,
3201
3204
  doc: i.state.doc,
3202
3205
  snapshot: r
3203
3206
  });
3204
3207
  if (s === null) return "none";
3205
- let c = Vr(t);
3208
+ let c = Hr(t);
3206
3209
  if (c !== null && a(c, { highlight: {} })) return "block";
3207
3210
  let { from: l, to: u } = s, d = i.state.doc.resolve(l), f = i.state.doc.resolve(u);
3208
3211
  return i.dispatch(i.state.tr.setSelection(X.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
@@ -3213,11 +3216,11 @@ function fs(e) {
3213
3216
  showInDocument: (t, n) => {
3214
3217
  let r = e.editorView.value;
3215
3218
  if (!r) return !1;
3216
- let i = t.type === "textRange" ? Lr({
3219
+ let i = t.type === "textRange" ? Rr({
3217
3220
  range: t,
3218
3221
  doc: r.state.doc,
3219
3222
  snapshot: n
3220
- }) : Ir({
3223
+ }) : Lr({
3221
3224
  blockId: t.blockId,
3222
3225
  doc: r.state.doc,
3223
3226
  snapshot: n
@@ -3228,26 +3231,27 @@ function fs(e) {
3228
3231
  },
3229
3232
  getSuggestions: () => {
3230
3233
  let t = e.editorView.value;
3231
- return t ? Z(t.state) : [];
3234
+ return t ? Jn(t.state) : [];
3232
3235
  },
3233
3236
  exportPendingSuggestions: () => {
3234
- let t = e.editorView.value, r = new Set(t ? Z(t.state).map((e) => e.suggestionId) : []);
3237
+ let t = e.editorView.value, r = new Set(t ? Jn(t.state).map((e) => e.suggestionId) : []);
3235
3238
  return n.exportPendingSuggestions({
3236
3239
  activeSuggestionIds: r,
3237
- snapshotForStory: (e, n) => e.type === "main" && t ? gr(t.state, n) : null
3240
+ snapshotForStory: (e, n) => e.type === "main" && t ? _r(t.state, n) : null
3238
3241
  });
3239
3242
  },
3240
3243
  loadPendingSuggestions: (t) => n.loadPendingSuggestions({
3241
3244
  records: t,
3242
3245
  snapshotForStory: (t) => {
3243
3246
  let n = e.editorView.value;
3244
- return t.type === "main" && n ? mr(n.state.doc) : null;
3247
+ return t.type === "main" && n ? hr(n.state.doc) : null;
3245
3248
  },
3246
3249
  sourceSnapshotForStory: (t, n) => {
3247
3250
  let r = e.editorView.value;
3248
- return t.type === "main" && r ? gr(r.state, n) : null;
3251
+ return t.type === "main" && r ? _r(r.state, n) : null;
3249
3252
  },
3250
3253
  apply: (e, t) => y({
3254
+ undefinedReferences: "refuse",
3251
3255
  snapshot: t,
3252
3256
  operations: [e.operation],
3253
3257
  mode: "suggested",
@@ -3255,7 +3259,7 @@ function fs(e) {
3255
3259
  }),
3256
3260
  activeSuggestionIds: () => {
3257
3261
  let t = e.editorView.value;
3258
- return new Set(t ? Z(t.state).map((e) => e.suggestionId) : []);
3262
+ return new Set(t ? Jn(t.state).map((e) => e.suggestionId) : []);
3259
3263
  }
3260
3264
  }),
3261
3265
  acceptSuggestion: (t, n) => {
@@ -3264,7 +3268,7 @@ function fs(e) {
3264
3268
  accepted: !1,
3265
3269
  appliedAs: null
3266
3270
  };
3267
- let i = Z(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Wn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
3271
+ let i = Jn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Gn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
3268
3272
  return {
3269
3273
  accepted: a,
3270
3274
  appliedAs: a ? i : null
@@ -3272,46 +3276,46 @@ function fs(e) {
3272
3276
  },
3273
3277
  rejectSuggestion: (t) => {
3274
3278
  let n = e.editorView.value;
3275
- return n ? Jn(t)(n.state, n.dispatch) : !1;
3279
+ return n ? Q(t)(n.state, n.dispatch) : !1;
3276
3280
  },
3277
3281
  scrollToSuggestion: (t) => {
3278
3282
  let n = e.editorView.value;
3279
3283
  if (!n) return !1;
3280
- let r = Kn(n.state, t);
3284
+ let r = qn(n.state, t);
3281
3285
  if (!r) return !1;
3282
- let { from: i, to: a } = Fr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3286
+ let { from: i, to: a } = Ir(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
3283
3287
  return n.dispatch(n.state.tr.setSelection(X.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
3284
3288
  },
3285
3289
  getTrackedChanges: () => {
3286
3290
  let t = e.editorView.value;
3287
- return t ? br(t.state.doc) : [];
3291
+ return t ? xr(t.state.doc) : [];
3288
3292
  },
3289
3293
  getCommentAnchors: () => {
3290
3294
  let t = e.editorView.value;
3291
- return t ? vr(t.state.doc) : [];
3295
+ return t ? yr(t.state.doc) : [];
3292
3296
  },
3293
3297
  getSelectionText: () => {
3294
3298
  let t = e.editorView.value;
3295
- return t ? Qe(t.state) : "";
3299
+ return t ? Ze(t.state) : "";
3296
3300
  },
3297
3301
  getPageText: (t) => {
3298
3302
  let n = e.editorView.value;
3299
- return n ? Wr(e.layout.value, n.state.doc, t) : null;
3303
+ return n ? Gr(e.layout.value, n.state.doc, t) : null;
3300
3304
  },
3301
3305
  getTargetPage: (t, n) => {
3302
3306
  let r = e.editorView.value, i = e.layout.value;
3303
3307
  if (!r || !i) return null;
3304
- let a = t.type === "textRange" ? Lr({
3308
+ let a = t.type === "textRange" ? Rr({
3305
3309
  range: t,
3306
3310
  doc: r.state.doc,
3307
3311
  snapshot: n
3308
- }) : Ir({
3312
+ }) : Lr({
3309
3313
  blockId: t.blockId,
3310
3314
  doc: r.state.doc,
3311
3315
  snapshot: n
3312
3316
  });
3313
3317
  if (a === null) return null;
3314
- let o = Xn(i, a.from);
3318
+ let o = Zn(i, a.from);
3315
3319
  return o == null ? null : o + 1;
3316
3320
  },
3317
3321
  getBlockRect: m,
@@ -3320,8 +3324,8 @@ function fs(e) {
3320
3324
  onLayoutChange: h,
3321
3325
  getContentControls: (t = {}) => {
3322
3326
  let n = e.editorView.value;
3323
- return n ? Ar(n.state.doc, t).map((e) => ({
3324
- properties: Or(e.node),
3327
+ return n ? jr(n.state.doc, t).map((e) => ({
3328
+ properties: kr(e.node),
3325
3329
  path: e.path,
3326
3330
  pmPos: e.pos
3327
3331
  })) : [];
@@ -3329,7 +3333,7 @@ function fs(e) {
3329
3333
  scrollToContentControl: (t) => {
3330
3334
  let n = e.editorView.value;
3331
3335
  if (!n) return !1;
3332
- let r = kr(n.state.doc, t);
3336
+ let r = Ar(n.state.doc, t);
3333
3337
  if (!r) return !1;
3334
3338
  let i = r.pos + 1, a = n.state.doc.resolve(i);
3335
3339
  return n.dispatch(n.state.tr.setSelection(X.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
@@ -3337,19 +3341,19 @@ function fs(e) {
3337
3341
  setContentControlContent: (t, n, r = {}) => {
3338
3342
  let i = e.editorView.value;
3339
3343
  if (!i) return !1;
3340
- let a = typeof n == "string" ? Mr(i.state, t, n, r) : Pr(i.state, t, n, r);
3344
+ let a = typeof n == "string" ? Nr(i.state, t, n, r) : Fr(i.state, t, n, r);
3341
3345
  return a ? (i.dispatch(a), !0) : !1;
3342
3346
  },
3343
3347
  setContentControlValue: (t, n, r = {}) => {
3344
3348
  let i = e.editorView.value;
3345
3349
  if (!i) return !1;
3346
- let a = Nr(i.state, t, n, r);
3350
+ let a = Pr(i.state, t, n, r);
3347
3351
  return a ? (i.dispatch(a), !0) : !1;
3348
3352
  },
3349
3353
  removeContentControl: (t, n = {}) => {
3350
3354
  let r = e.editorView.value;
3351
3355
  if (!r) return !1;
3352
- let i = jr(r.state, t, n);
3356
+ let i = Mr(r.state, t, n);
3353
3357
  return i ? (r.dispatch(i), !0) : !1;
3354
3358
  }
3355
3359
  } };
@@ -3360,31 +3364,31 @@ function ps(e) {
3360
3364
  let t = () => e.activeView?.value ?? e.editorView.value;
3361
3365
  function n() {
3362
3366
  let e = t();
3363
- e && (Mn(e, jn), e.focus());
3367
+ e && (Nn(e, Mn), e.focus());
3364
3368
  }
3365
3369
  function r(n) {
3366
3370
  let r = t();
3367
3371
  if (!r) return;
3368
3372
  let i = e.getDocument(), a = i?.package?.styles;
3369
3373
  if (a) {
3370
- let e = Je(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Xr(i.package.numbering) : null };
3374
+ let e = qe(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Zr(i.package.numbering) : null };
3371
3375
  t.paragraphFormatting && (o.paragraphFormatting = t.paragraphFormatting), t.runFormatting && (o.runFormatting = t.runFormatting);
3372
3376
  let s = e.getStyle(n)?.name;
3373
- s && (o.styleName = s), Mn(r, Gr(n, o));
3374
- } else Mn(r, Gr(n));
3377
+ s && (o.styleName = s), Nn(r, Kr(n, o));
3378
+ } else Nn(r, Kr(n));
3375
3379
  r.focus();
3376
3380
  }
3377
3381
  function i() {
3378
3382
  let t = e.editorView.value;
3379
- t && (Mn(t, Zr), t.focus());
3383
+ t && (Nn(t, Qr), t.focus());
3380
3384
  }
3381
3385
  function a() {
3382
3386
  let t = e.editorView.value;
3383
- t && (Mn(t, $r), t.focus());
3387
+ t && (Nn(t, ei), t.focus());
3384
3388
  }
3385
3389
  function o() {
3386
3390
  let t = e.editorView.value;
3387
- t && (Mn(t, Qr), t.focus());
3391
+ t && (Nn(t, $r), t.focus());
3388
3392
  }
3389
3393
  function s(e) {
3390
3394
  let n = t();
@@ -3478,7 +3482,7 @@ var Cs = {
3478
3482
  remove: gs
3479
3483
  };
3480
3484
  function ws(e, t = Cs) {
3481
- U(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3485
+ W(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3482
3486
  if (!n) return;
3483
3487
  let a = !1, o = [];
3484
3488
  t.loadEmbedded(n).then(({ faces: n, familyMap: r }) => {
@@ -3486,11 +3490,11 @@ function ws(e, t = Cs) {
3486
3490
  t.remove(n);
3487
3491
  return;
3488
3492
  }
3489
- o = n, !(n.length === 0 && r.size === 0) && (ei(r.size > 0 ? r : null), e.remeasure());
3493
+ o = n, !(n.length === 0 && r.size === 0) && (e.setEmbeddedFontFamilies(new Map(r)), e.remeasure());
3490
3494
  }), i(() => {
3491
- a = !0, t.remove(o), ei(null);
3495
+ a = !0, t.remove(o), e.setEmbeddedFontFamilies(null);
3492
3496
  });
3493
- }, { immediate: !0 }), U(e.fonts, (n, r, i) => {
3497
+ }, { immediate: !0 }), W(e.fonts, (n, r, i) => {
3494
3498
  if (!n || n.length === 0) return;
3495
3499
  let a = !1, o = [];
3496
3500
  t.loadHost(n).then((n) => {
@@ -3507,7 +3511,7 @@ function ws(e, t = Cs) {
3507
3511
  //#endregion
3508
3512
  //#region src/composables/useHyperlinkManagement.ts
3509
3513
  function Ts(e) {
3510
- let t = R(null);
3514
+ let t = z(null);
3511
3515
  function n(e, t) {
3512
3516
  t(e.state, (t) => e.dispatch(t), e);
3513
3517
  }
@@ -3533,10 +3537,10 @@ function Ts(e) {
3533
3537
  r && n(t, r()), t.focus();
3534
3538
  }
3535
3539
  function a(e) {
3536
- let n = Pn(e);
3540
+ let n = Fn(e);
3537
3541
  if (!n) return;
3538
- let r = Nn(void 0);
3539
- window.open(n, r.target, Fn(r)), t.value = null;
3542
+ let r = Pn(void 0);
3543
+ window.open(n, r.target, In(r)), t.value = null;
3540
3544
  }
3541
3545
  function o(n, r) {
3542
3546
  let i = e.editorView.value;
@@ -3561,7 +3565,7 @@ function Ts(e) {
3561
3565
  //#endregion
3562
3566
  //#region src/composables/useImageActions.ts
3563
3567
  function Es(e) {
3564
- let t = Le(null), n = R(!1), r = D(() => {
3568
+ let t = Ie(null), n = z(!1), r = O(() => {
3565
3569
  e.stateTick.value;
3566
3570
  let n = e.editorView.value, r = t.value;
3567
3571
  if (!n || !r) return null;
@@ -3580,9 +3584,9 @@ function Es(e) {
3580
3584
  function a(n) {
3581
3585
  let r = e.editorView.value, a = t.value;
3582
3586
  if (!r || !a) return;
3583
- let o = dn(n);
3587
+ let o = fn(n);
3584
3588
  if (!o) return;
3585
- let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: sn(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3589
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: cn(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3586
3590
  c && (i(r, c(a.pmPos, o, s)), r.focus());
3587
3591
  }
3588
3592
  function o(n) {
@@ -3624,14 +3628,14 @@ function Ds(e) {
3624
3628
  e.disableFindReplaceShortcuts?.() && (t.key === "f" || t.key === "h") || (t.key === "f" || t.key === "h" ? (t.preventDefault(), e.showFindReplace.value = !0) : t.key === "k" && (t.preventDefault(), e.showHyperlink.value = !0));
3625
3629
  }
3626
3630
  }
3627
- return Ne(() => window.addEventListener("keydown", t)), I(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
3631
+ return Me(() => window.addEventListener("keydown", t)), L(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
3628
3632
  }
3629
3633
  //#endregion
3630
3634
  //#region src/composables/useOutlineSidebar.ts
3631
3635
  function Os(e) {
3632
3636
  function t() {
3633
3637
  let t = e.editorView.value;
3634
- t && (e.outlineHeadings.value = ai(t.state.doc, Xe(t.state)));
3638
+ t && (e.outlineHeadings.value = ai(t.state.doc, Ye(t.state)));
3635
3639
  }
3636
3640
  function n() {
3637
3641
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3692,19 +3696,19 @@ function ks(e) {
3692
3696
  }
3693
3697
  function s(t) {
3694
3698
  let n = e.editorView.value;
3695
- n && Jr(t)(n.state, n.dispatch);
3699
+ n && Yr(t)(n.state, n.dispatch);
3696
3700
  }
3697
3701
  function c(t) {
3698
3702
  let n = e.editorView.value;
3699
- n && Yr(t)(n.state, n.dispatch);
3703
+ n && Xr(t)(n.state, n.dispatch);
3700
3704
  }
3701
3705
  function l(t) {
3702
3706
  let n = e.editorView.value;
3703
- n && (t < 0 ? qr(-t, !0)(n.state, n.dispatch) : qr(t, !1)(n.state, n.dispatch));
3707
+ n && (t < 0 ? Jr(-t, !0)(n.state, n.dispatch) : Jr(t, !1)(n.state, n.dispatch));
3704
3708
  }
3705
3709
  function u(t) {
3706
3710
  let n = e.editorView.value;
3707
- n && Kr(t)(n.state, n.dispatch);
3711
+ n && qr(t)(n.state, n.dispatch);
3708
3712
  }
3709
3713
  return {
3710
3714
  handlePageSetupApply: t,
@@ -3760,7 +3764,7 @@ function Is(e, t) {
3760
3764
  }
3761
3765
  function Ls(e, t, n, r) {
3762
3766
  if (!e || !t) return null;
3763
- let i = mn(e, n, r, 1);
3767
+ let i = hn(e, n, r, 1);
3764
3768
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3765
3769
  }
3766
3770
  function Rs(e, t, n, r) {
@@ -3800,28 +3804,28 @@ var Bs = ({ clientX: e, clientY: t, viewport: n }) => ({
3800
3804
  e.value = null;
3801
3805
  return;
3802
3806
  }
3803
- let d = $({
3807
+ let d = lr({
3804
3808
  document: c,
3805
3809
  position: s.position,
3806
3810
  isFirstPage: s.isFirstPage,
3807
3811
  activeRId: s.rId,
3808
- blocks: Zn(l.state.doc, u.content)
3812
+ blocks: Qn(l.state.doc, u.content)
3809
3813
  });
3810
3814
  e.value = null, d && (a(d), o(), i(), r(d));
3811
3815
  };
3812
3816
  function Us(e) {
3813
- let t = R(null), n = null;
3817
+ let t = z(null), n = null;
3814
3818
  function r() {
3815
3819
  n !== null && (clearTimeout(n), n = null);
3816
3820
  }
3817
- let i = Le(null), a = 0, o = null, s = 0, c = !1, l = null, u = ui(), d = oe({
3821
+ let i = Ie(null), a = 0, o = null, s = 0, c = !1, l = null, u = ui(), d = oe({
3818
3822
  pagesContainer: e.pagesRef,
3819
3823
  onScrollExtendSelection: (e, t) => {
3820
3824
  if (!c || l === null) return;
3821
3825
  let n = m(e, t);
3822
3826
  n !== null && n !== l && _(l, n);
3823
3827
  }
3824
- }), f = R({
3828
+ }), f = z({
3825
3829
  currentPage: 1,
3826
3830
  totalPages: 1,
3827
3831
  visible: !1
@@ -3967,10 +3971,10 @@ function Us(e) {
3967
3971
  if (!s || !e.showHeaderFooterEditing.value) return;
3968
3972
  let c = a ? "header" : "footer", l = e.getDocument();
3969
3973
  if (!l?.package) return;
3970
- let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = sr(l.package), p = f.hasTitlePg && d === 1, m = ar(f, c, p);
3974
+ let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = cr(l.package), p = f.hasTitlePg && d === 1, m = or(f, c, p);
3971
3975
  if (!m) {
3972
3976
  let t;
3973
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
3977
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
3974
3978
  let n = e.layout.value?.pages.at(d - 1)?.sectionIndex, r = mi({
3975
3979
  document: l,
3976
3980
  position: c,
@@ -3979,9 +3983,9 @@ function Us(e) {
3979
3983
  });
3980
3984
  if (!e.applyCanonicalOperations?.([r])) return;
3981
3985
  t = e.getDocument(), m = r.story.rId;
3982
- } else t = ir(l, c, p), t && e.setDocument(t);
3986
+ } else t = ar(l, c, p), t && e.setDocument(t);
3983
3987
  if (!t) return;
3984
- e.syncHfPMs(), e.reLayout(), Ke(e.getExperimentalSession?.(), We.authorityRouting) || e.onDocumentChange(t), f = sr(t.package), m ??= ar(f, c, p);
3988
+ e.syncHfPMs(), e.reLayout(), Ge(e.getExperimentalSession?.(), Ue.authorityRouting) || e.onDocumentChange(t), f = cr(t.package), m ??= or(f, c, p);
3985
3989
  }
3986
3990
  if (!m) return;
3987
3991
  let h = m, g = e.pagesViewportRef.value;
@@ -4013,7 +4017,7 @@ function Us(e) {
4013
4017
  });
4014
4018
  }
4015
4019
  function ie() {
4016
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
4020
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
4017
4021
  i.value = null, e.syncHfPMs();
4018
4022
  return;
4019
4023
  }
@@ -4033,7 +4037,7 @@ function Us(e) {
4033
4037
  i.value = null;
4034
4038
  return;
4035
4039
  }
4036
- if (Ke(e.getExperimentalSession?.(), We.authorityRouting)) {
4040
+ if (Ge(e.getExperimentalSession?.(), Ue.authorityRouting)) {
4037
4041
  let r = hi({
4038
4042
  document: t,
4039
4043
  position: n.position,
@@ -4043,7 +4047,7 @@ function Us(e) {
4043
4047
  i.value = null, e.syncHfPMs(), e.reLayout();
4044
4048
  return;
4045
4049
  }
4046
- let r = or({
4050
+ let r = sr({
4047
4051
  document: t,
4048
4052
  position: n.position,
4049
4053
  activeRId: n.rId
@@ -4082,13 +4086,13 @@ function Us(e) {
4082
4086
  }
4083
4087
  let f = h() ?? n;
4084
4088
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
4085
- let p = ln(r);
4089
+ let p = un(r);
4086
4090
  if (p) {
4087
4091
  t.preventDefault(), t.stopPropagation();
4088
4092
  let n = Number(p.dataset.pmStart);
4089
4093
  if (!Number.isNaN(n)) {
4090
4094
  try {
4091
- f.dispatch(f.state.tr.setSelection(Y.create(f.state.doc, n)));
4095
+ f.dispatch(f.state.tr.setSelection(an.create(f.state.doc, n)));
4092
4096
  } catch {}
4093
4097
  e.selectedImage.value = {
4094
4098
  element: p,
@@ -4128,10 +4132,10 @@ function Us(e) {
4128
4132
  }
4129
4133
  d.updateMousePosition(e.clientX, e.clientY);
4130
4134
  }
4131
- function le() {
4135
+ function S() {
4132
4136
  c = !1, u.end(), d.stopAutoScroll();
4133
4137
  }
4134
- function ue() {
4138
+ function le() {
4135
4139
  let t = e.scrollRootRef.value, n = e.layout.value;
4136
4140
  if (!t || !n || n.pages.length === 0) return;
4137
4141
  let r = t.scrollTop, i = n.pages.length, a = r + t.clientHeight / 2, o = 24, s = 1;
@@ -4156,10 +4160,10 @@ function Us(e) {
4156
4160
  };
4157
4161
  }, 600);
4158
4162
  }
4159
- return Ne(() => {
4160
- window.addEventListener("mousemove", ce), window.addEventListener("mouseup", le), e.scrollRootRef.value?.addEventListener("scroll", ue, { passive: !0 });
4161
- }), I(() => {
4162
- r(), window.removeEventListener("mousemove", ce), window.removeEventListener("mouseup", le), e.scrollRootRef.value?.removeEventListener("scroll", ue), p && clearTimeout(p);
4163
+ return Me(() => {
4164
+ window.addEventListener("mousemove", ce), window.addEventListener("mouseup", S), e.scrollRootRef.value?.addEventListener("scroll", le, { passive: !0 });
4165
+ }), L(() => {
4166
+ r(), window.removeEventListener("mousemove", ce), window.removeEventListener("mouseup", S), e.scrollRootRef.value?.removeEventListener("scroll", le), p && clearTimeout(p);
4163
4167
  }), {
4164
4168
  tableInsertButton: t,
4165
4169
  hfEdit: i,
@@ -4197,11 +4201,11 @@ var Ws = (e) => {
4197
4201
  });
4198
4202
  });
4199
4203
  }, a = e.syncCoordinator.onRender(i);
4200
- U([
4204
+ W([
4201
4205
  e.pagesRef,
4202
4206
  e.remoteSelections,
4203
4207
  e.zoom
4204
- ], i, { flush: "post" }), Pe(() => {
4208
+ ], i, { flush: "post" }), Ne(() => {
4205
4209
  a(), r();
4206
4210
  });
4207
4211
  }, Gs = (e) => {
@@ -4220,8 +4224,8 @@ var Ws = (e) => {
4220
4224
  markupView: e.markupView.value,
4221
4225
  zoom: e.zoom.value,
4222
4226
  zIndex: ae.selectionOverlay
4223
- }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? hn(r, yi(vi(i.state, e.markupView.value), o.head), s) : null;
4224
- if (Sn({
4227
+ }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? gn(r, yi(vi(i.state, e.markupView.value), o.head), s) : null;
4228
+ if (Cn({
4225
4229
  hiddenHost: e.hiddenContainer.value,
4226
4230
  editorView: i,
4227
4231
  visibleCaret: c ? {
@@ -4241,18 +4245,18 @@ var Ws = (e) => {
4241
4245
  e.imageInteracting?.value || (e.selectedImage.value = null);
4242
4246
  });
4243
4247
  }, a = e.syncCoordinator.onRender(i);
4244
- U([
4248
+ W([
4245
4249
  e.zoom,
4246
4250
  e.editorView,
4247
4251
  e.pagesRef
4248
- ], i, { flush: "post" }), U(e.hiddenContainer, (e, t, n) => {
4252
+ ], i, { flush: "post" }), W(e.hiddenContainer, (e, t, n) => {
4249
4253
  e && (e.addEventListener("focusin", i), e.addEventListener("compositionend", i), n(() => {
4250
4254
  e.removeEventListener("focusin", i), e.removeEventListener("compositionend", i);
4251
4255
  }));
4252
4256
  }, { immediate: !0 });
4253
4257
  let o = typeof window > "u" ? null : window;
4254
- return o?.addEventListener("scroll", i, !0), Pe(() => {
4255
- a(), r(), o?.removeEventListener("scroll", i, !0), xn(e.hiddenContainer.value);
4258
+ return o?.addEventListener("scroll", i, !0), Ne(() => {
4259
+ a(), r(), o?.removeEventListener("scroll", i, !0), Sn(e.hiddenContainer.value);
4256
4260
  }), {
4257
4261
  clearOverlay: r,
4258
4262
  updateSelectionOverlay: i
@@ -4289,7 +4293,7 @@ var Ws = (e) => {
4289
4293
  "data-testid": "selection-overlay",
4290
4294
  class: "docx-editor-vue__decoration-origin",
4291
4295
  "aria-hidden": "true"
4292
- }, tc = ["aria-label"], nc = { class: "docx-editor-vue__note-editor-header" }, rc = ["aria-label"], ic = ["aria-label"], ac = /*#__PURE__*/ t(/* @__PURE__ */ N({
4296
+ }, tc = ["aria-label"], nc = { class: "docx-editor-vue__note-editor-header" }, rc = ["aria-label"], ic = ["aria-label"], ac = /*#__PURE__*/ t(/* @__PURE__ */ P({
4293
4297
  __name: "DocxEditor",
4294
4298
  props: {
4295
4299
  documentBuffer: { default: null },
@@ -4422,57 +4426,57 @@ var Ws = (e) => {
4422
4426
  setup(e, { expose: t, emit: n }) {
4423
4427
  let o = e, s = o.plugins ?? [], c = n;
4424
4428
  a(o.components);
4425
- let l = me();
4429
+ let l = pe();
4426
4430
  ra(l);
4427
- let u = D(() => Ke(o.experimentalSession, We.authorityRouting));
4431
+ let u = O(() => Ge(o.experimentalSession, Ue.authorityRouting));
4428
4432
  function d(e) {
4429
4433
  if (!u.value) {
4430
4434
  o.onChange?.(e), c("change", e), c("update:document", e);
4431
4435
  return;
4432
4436
  }
4433
- o.onChange?.(ht(e)), c("change", ht(e)), c("update:document", ht(e));
4437
+ o.onChange?.(mt(e)), c("change", mt(e)), c("update:document", mt(e));
4434
4438
  }
4435
4439
  let { message: f, show: p } = qi();
4436
4440
  function m(e) {
4437
- mt.is(e) && p(e.message), o.onError?.(e), c("error", e);
4441
+ pt.is(e) && p(e.message), o.onError?.(e), c("error", e);
4438
4442
  }
4439
4443
  function h(e, t) {
4440
- return Ke(o.experimentalSession, We.authorityRouting) ? (m(new mt({
4444
+ return Ge(o.experimentalSession, Ue.authorityRouting) ? (m(new pt({
4441
4445
  gap: e,
4442
- message: Ge(e, t)
4446
+ message: We(e, t)
4443
4447
  })), !0) : !1;
4444
4448
  }
4445
- let _ = R(o.mode), b = D(() => o.readOnly || _.value === "viewing"), te = D(() => o.showReviewControls), ne = D(() => fn(_.value)), x = R("all-markup");
4449
+ let _ = z(o.mode), b = O(() => o.readOnly || _.value === "viewing"), te = O(() => o.showReviewControls), ne = O(() => pn(_.value)), x = z("all-markup");
4446
4450
  function ae() {
4447
- Br(pn(_.value));
4451
+ Hr(mn(_.value));
4448
4452
  }
4449
4453
  function oe(e) {
4450
4454
  x.value = e;
4451
4455
  }
4452
- let se = D(() => x.value === "all-markup" ? "" : `folio-root--${x.value}`), { t: le } = r(), fe = ({ node: e }) => e;
4453
- fe.props = ["node"];
4454
- let he = D(() => o.documentBuffer != null || o.document != null), ge = R(!1);
4455
- U(he, (e) => {
4456
- e || (ge.value = !1);
4456
+ let se = O(() => x.value === "all-markup" ? "" : `folio-root--${x.value}`), { t: S } = r(), de = ({ node: e }) => e;
4457
+ de.props = ["node"];
4458
+ let me = O(() => o.documentBuffer != null || o.document != null), he = z(!1);
4459
+ W(me, (e) => {
4460
+ e || (he.value = !1);
4457
4461
  });
4458
- let _e = R(null), ve = R(null), ye = R(null), S = R(null), be = R(null), C = R(null), xe = R(null), Se = R(Infinity), Ce = R(null), we = D(() => o.showRuler ?? !1), w = R(0), E = R(!1), Te = R(!1), De = R(!1), N = R(!1), ke = R(!1), Ae = R(!1), Me = R(!1), Pe = R(!1), Fe = R(o.showOutline), z = R(jt), Re = D(() => o.outlineDepth ?? z.value), ze = (e) => {
4459
- o.outlineDepth === void 0 && (z.value = e), o.onOutlineDepthChange?.(e);
4460
- }, H = R(!1), G = R("none"), qe = R(null), Je = R(null), Xe = R(null), Ze = Le([]), Qe = Le([]), $e = D(() => Mt(Qe.value, Re.value)), { zoom: K, zoomPercent: nt, isMinZoom: it, isMaxZoom: ot, setZoom: st, zoomIn: ct, zoomOut: pt, handleWheel: _t, handleKeyDown: Ct, ZOOM_PRESETS: wt } = pe(o.initialZoom);
4462
+ let ge = z(null), _e = z(null), ve = z(null), C = z(null), ye = z(null), w = z(null), be = z(null), xe = z(Infinity), Se = z(null), Ce = O(() => o.showRuler ?? !1), T = z(0), D = z(!1), we = z(!1), Ee = z(!1), P = z(!1), Oe = z(!1), ke = z(!1), je = z(!1), Ne = z(!1), Pe = z(o.showOutline), B = z(jt), Le = O(() => o.outlineDepth ?? B.value), Re = (e) => {
4463
+ o.outlineDepth === void 0 && (B.value = e), o.onOutlineDepthChange?.(e);
4464
+ }, U = z(!1), K = z("none"), Ke = z(null), qe = z(null), Ye = z(null), Xe = Ie([]), Ze = Ie([]), Qe = O(() => Mt(Ze.value, Le.value)), { zoom: q, zoomPercent: tt, isMinZoom: rt, isMaxZoom: at, setZoom: ot, zoomIn: st, zoomOut: ft, handleWheel: _t, handleKeyDown: Ct, ZOOM_PRESETS: wt } = fe(o.initialZoom);
4461
4465
  function Et(e) {
4462
4466
  o.enableWheelZoom !== !1 && _t(e);
4463
4467
  }
4464
4468
  Ds({
4465
- showFindReplace: E,
4466
- showHyperlink: Te,
4469
+ showFindReplace: D,
4470
+ showHyperlink: we,
4467
4471
  handleZoomKeyDown: Ct,
4468
- scope: () => o.keyboardShortcuts ?? "document",
4469
- roots: [_e]
4472
+ scope: () => o.keyboardShortcuts ?? ht,
4473
+ roots: [ge]
4470
4474
  });
4471
- let { editor: Ot, editorView: q, editorState: Pt, remoteSelections: It, headerFooterSelection: Lt, activeNoteStory: Rt, isReady: zt, isDirty: Bt, parseError: Vt, layout: Ht, blocks: Ut, measures: Wt, syncCoordinator: Gt, loadBuffer: Kt, loadDocument: qt, save: Jt, getDocument: J, setDocument: Yt, getHeaderFooterView: Xt, syncHeaderFooterViews: Zt, openNoteStory: Qt, closeNoteStory: $t, getActiveNoteView: en, getCommands: tn, reLayout: nn } = ue({
4472
- hiddenContainer: ve,
4473
- hiddenHeaderFooterContainer: ye,
4474
- noteEditorContainer: Xe,
4475
- pagesContainer: S,
4475
+ let { editor: Ot, editorView: J, editorState: Pt, remoteSelections: It, headerFooterSelection: Lt, activeNoteStory: Rt, isReady: zt, isDirty: Bt, parseError: Vt, layout: Ht, blocks: Ut, measures: Wt, syncCoordinator: Gt, loadBuffer: Kt, loadDocument: qt, save: Jt, getDocument: Yt, setDocument: Xt, getHeaderFooterView: Zt, syncHeaderFooterViews: Qt, openNoteStory: $t, closeNoteStory: en, getActiveNoteView: tn, getCommands: nn, reLayout: rn, setEmbeddedFontFamilies: an } = le({
4476
+ hiddenContainer: _e,
4477
+ hiddenHeaderFooterContainer: ve,
4478
+ noteEditorContainer: Ye,
4479
+ pagesContainer: C,
4476
4480
  readOnly: b,
4477
4481
  experimentalSession: () => o.experimentalSession,
4478
4482
  editorMode: _,
@@ -4492,7 +4496,7 @@ var Ws = (e) => {
4492
4496
  onChange: d,
4493
4497
  onError: m,
4494
4498
  onSelectionUpdate: (e) => {
4495
- if (o.onSelectionChange?.(Ye(e)), o.onSelectionTextChange) {
4499
+ if (o.onSelectionChange?.(Je(e)), o.onSelectionTextChange) {
4496
4500
  let { from: t, to: n } = e.selection, r = t === n ? "" : e.doc.textBetween(t, n, " ", " ");
4497
4501
  o.onSelectionTextChange({
4498
4502
  from: t,
@@ -4509,129 +4513,130 @@ var Ws = (e) => {
4509
4513
  featureFlags: () => o.featureFlags,
4510
4514
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
4511
4515
  });
4512
- U(Pt, (e, t) => {
4513
- Ce.value !== null && e && t && !e.doc.eq(t.doc) && (Ce.value = null);
4516
+ W(Pt, (e, t) => {
4517
+ Se.value !== null && e && t && !e.doc.eq(t.doc) && (Se.value = null);
4514
4518
  });
4515
- let Y = D(() => vt({
4516
- bodyView: q.value,
4517
- headerFooterView: Je.value ? Xt(Je.value) : null,
4518
- noteView: en()
4519
- }).view), rn = D(() => {
4519
+ let Y = O(() => vt({
4520
+ bodyView: J.value,
4521
+ headerFooterView: qe.value ? Zt(qe.value) : null,
4522
+ noteView: tn()
4523
+ }).view), X = O(() => {
4520
4524
  let e = Rt.value;
4521
- return e ? le(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4522
- }), X = D(() => !zt.value && he.value && !(o.preserveDocumentWhileLoading === !0 && ge.value));
4523
- function an() {
4524
- q.value && (bt(), yt(), nn());
4525
+ return e ? S(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4526
+ }), on = O(() => !zt.value && me.value && !(o.preserveDocumentWhileLoading === !0 && he.value));
4527
+ function sn() {
4528
+ J.value && (bt(), yt(), rn());
4525
4529
  }
4526
4530
  ws({
4527
4531
  isReady: zt,
4528
- getDocument: J,
4532
+ getDocument: Yt,
4529
4533
  fonts: () => o.fonts,
4530
- remeasure: an
4534
+ remeasure: sn,
4535
+ setEmbeddedFontFamilies: an
4531
4536
  });
4532
- let { selectedImage: on, imageInteracting: sn, imageToolbarContext: cn, handleToolbarImageWrap: ln, handleImageTransform: un } = Es({
4537
+ let { selectedImage: cn, imageInteracting: ln, imageToolbarContext: un, handleToolbarImageWrap: dn, handleImageTransform: fn } = Es({
4533
4538
  editorView: Y,
4534
- zoom: K,
4535
- stateTick: w,
4536
- getCommands: tn
4537
- }), dn = Gs({
4538
- editorView: q,
4539
- hiddenContainer: ve,
4540
- pagesRef: S,
4541
- zoom: K,
4539
+ zoom: q,
4540
+ stateTick: T,
4541
+ getCommands: nn
4542
+ }), hn = Gs({
4543
+ editorView: J,
4544
+ hiddenContainer: _e,
4545
+ pagesRef: C,
4546
+ zoom: q,
4542
4547
  markupView: x,
4543
- selectedImage: on,
4548
+ selectedImage: cn,
4544
4549
  syncCoordinator: Gt,
4545
- imageInteracting: sn
4550
+ imageInteracting: ln
4546
4551
  });
4547
4552
  Ws({
4548
- pagesRef: S,
4553
+ pagesRef: C,
4549
4554
  remoteSelections: It,
4550
4555
  syncCoordinator: Gt,
4551
- zoom: K
4556
+ zoom: q
4552
4557
  });
4553
- let { hyperlinkPopupData: mn, handleHyperlinkSubmit: hn, handleHyperlinkRemove: gn, handleHyperlinkPopupNavigate: _n, handleHyperlinkPopupEdit: vn, handleHyperlinkPopupRemove: yn } = Ts({
4558
+ let { hyperlinkPopupData: gn, handleHyperlinkSubmit: _n, handleHyperlinkRemove: vn, handleHyperlinkPopupNavigate: yn, handleHyperlinkPopupEdit: bn, handleHyperlinkPopupRemove: xn } = Ts({
4554
4559
  editorView: Y,
4555
- getCommands: tn
4556
- }), bn = ce(), { tableInsertButton: xn, hfEdit: Sn, scrollPageInfo: Cn, resolvePos: wn, setPmSelection: Tn, scrollVisiblePositionIntoView: En, handlePagesMouseDown: Dn, handlePagesMouseMove: On, handlePagesClick: kn, handlePagesDoubleClick: An, handleTableInsertClick: jn, handleHfSave: Mn, handleHfRemove: Nn } = Us({
4557
- editorView: q,
4558
- pagesRef: S,
4559
- pagesViewportRef: be,
4560
- scrollRootRef: C,
4561
- selectedImage: on,
4562
- imageInteracting: sn,
4563
- hyperlinkPopupData: mn,
4560
+ getCommands: nn
4561
+ }), Sn = ce(), { tableInsertButton: Cn, hfEdit: wn, scrollPageInfo: Tn, resolvePos: En, setPmSelection: Dn, scrollVisiblePositionIntoView: On, handlePagesMouseDown: kn, handlePagesMouseMove: An, handlePagesClick: jn, handlePagesDoubleClick: Mn, handleTableInsertClick: Nn, handleHfSave: Pn, handleHfRemove: Fn } = Us({
4562
+ editorView: J,
4563
+ pagesRef: C,
4564
+ pagesViewportRef: ye,
4565
+ scrollRootRef: w,
4566
+ selectedImage: cn,
4567
+ imageInteracting: ln,
4568
+ hyperlinkPopupData: gn,
4564
4569
  readOnly: b,
4565
- showHeaderFooterEditing: D(() => o.showHeaderFooterEditing),
4570
+ showHeaderFooterEditing: O(() => o.showHeaderFooterEditing),
4566
4571
  getExperimentalSession: () => o.experimentalSession,
4567
4572
  applyCanonicalOperations: (e) => Ot.applyCanonicalOperations(e),
4568
- zoom: K,
4573
+ zoom: q,
4569
4574
  layout: Ht,
4570
4575
  tableResize: {
4571
- tryStartResize: bn.tryStartResize,
4572
- isResizing: D(() => bn.isResizing())
4576
+ tryStartResize: Sn.tryStartResize,
4577
+ isResizing: O(() => Sn.isResizing())
4573
4578
  },
4574
- getCommands: tn,
4575
- getDocument: J,
4576
- getHfPmView: Xt,
4577
- syncHfPMs: Zt,
4578
- setDocument: Yt,
4579
+ getCommands: nn,
4580
+ getDocument: Yt,
4581
+ getHfPmView: Zt,
4582
+ syncHfPMs: Qt,
4583
+ setDocument: Xt,
4579
4584
  openNoteStory: (e) => {
4580
- Qt(e), dn.clearOverlay();
4585
+ $t(e), hn.clearOverlay();
4581
4586
  },
4582
- closeNoteStory: $t,
4583
- getActiveNoteView: en,
4584
- reLayout: nn,
4587
+ closeNoteStory: en,
4588
+ getActiveNoteView: tn,
4589
+ reLayout: rn,
4585
4590
  onDocumentChange: d,
4586
- clearOverlay: dn.clearOverlay
4587
- }), Pn = () => Sn.value?.rId ? Xt(Sn.value.rId) : null, Fn = D(() => {
4588
- let e = Sn.value, t = Lt.value;
4591
+ clearOverlay: hn.clearOverlay
4592
+ }), In = () => wn.value?.rId ? Zt(wn.value.rId) : null, Ln = O(() => {
4593
+ let e = wn.value, t = Lt.value;
4589
4594
  return !e?.rId || !t || t.rId !== e.rId ? null : {
4590
4595
  ...t,
4591
4596
  pageNumber: e.pageNumber
4592
4597
  };
4593
4598
  });
4594
- U(Sn, (e) => {
4595
- Je.value = e?.rId ?? null, e && dn.clearOverlay();
4599
+ W(wn, (e) => {
4600
+ qe.value = e?.rId ?? null, e && hn.clearOverlay();
4596
4601
  }, { immediate: !0 });
4597
- let In = Os({
4598
- editorView: q,
4599
- showOutline: Fe,
4600
- showSidebar: H,
4601
- outlineHeadings: Qe,
4602
- activeSidebarItem: qe,
4602
+ let Rn = Os({
4603
+ editorView: J,
4604
+ showOutline: Pe,
4605
+ showSidebar: U,
4606
+ outlineHeadings: Ze,
4607
+ activeSidebarItem: Ke,
4603
4608
  extractCommentsAndChanges: () => {},
4604
- scrollToVisiblePosition: En
4605
- }), { contextMenu: Ln, imageContextMenu: Rn, imageContextMenuTextActions: zn, customTextMenuItems: Bn, handleContextMenu: Vn, handleSelectedImageContextMenu: Hn, handleImageWrapSelect: Un, handleContextMenuAction: Wn } = ss({
4609
+ scrollToVisiblePosition: On
4610
+ }), { contextMenu: zn, imageContextMenu: Bn, imageContextMenuTextActions: Vn, customTextMenuItems: Hn, handleContextMenu: Un, handleSelectedImageContextMenu: Wn, handleImageWrapSelect: Gn, handleContextMenuAction: Kn } = ss({
4606
4611
  editorView: Y,
4607
- selectedImage: on,
4608
- zoom: K,
4609
- showImageProperties: N,
4610
- showNumberingValue: ke,
4611
- getCommands: tn,
4612
- clearOverlay: dn.clearOverlay,
4613
- setPmSelection: Tn,
4614
- resolvePos: wn,
4612
+ selectedImage: cn,
4613
+ zoom: q,
4614
+ showImageProperties: P,
4615
+ showNumberingValue: Oe,
4616
+ getCommands: nn,
4617
+ clearOverlay: hn.clearOverlay,
4618
+ setPmSelection: Dn,
4619
+ resolvePos: En,
4615
4620
  customContextMenuItems: () => b.value ? void 0 : o.customContextMenuItems,
4616
4621
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
4617
4622
  onCopy: () => o.onCopy?.(),
4618
4623
  onCut: () => o.onCut?.(),
4619
4624
  onPaste: () => o.onPaste?.()
4620
- }), Gn = de(q, w), Kn = D(() => Gn.value.entries), Z = Yo({
4625
+ }), qn = ue(J, T), Jn = O(() => qn.value.entries), Z = Yo({
4621
4626
  editor: Ot,
4622
- editorView: q,
4623
- getDocument: J,
4627
+ editorView: J,
4628
+ getDocument: Yt,
4624
4629
  author: () => o.author,
4625
4630
  commentsProp: () => o.comments,
4626
- canonicalTick: w,
4631
+ canonicalTick: T,
4627
4632
  onCommentsChange: (e) => {
4628
4633
  o.onCommentsChange?.(e), c("comments-change", e);
4629
4634
  },
4630
- reLayout: nn
4631
- }), qn = Z.comments, Q = Jo({
4632
- editorView: q,
4633
- pagesViewport: be,
4634
- pagesContainer: S,
4635
+ reLayout: rn
4636
+ }), Yn = Z.comments, Q = Jo({
4637
+ editorView: J,
4638
+ pagesViewport: ye,
4639
+ pagesContainer: C,
4635
4640
  readOnly: b,
4636
4641
  createComment: Z.createComment,
4637
4642
  pushComment: Z.pushComment,
@@ -4649,131 +4654,131 @@ var Ws = (e) => {
4649
4654
  });
4650
4655
  return n === null ? null : n.status === "applied" ? n.commentId ?? !1 : !1;
4651
4656
  },
4652
- reLayout: nn,
4653
- showSidebar: H,
4657
+ reLayout: rn,
4658
+ showSidebar: U,
4654
4659
  setActiveSidebarItem: (e) => {
4655
- qe.value = e;
4660
+ Ke.value = e;
4656
4661
  }
4657
4662
  });
4658
- function Jn() {
4663
+ function Xn() {
4659
4664
  Q.startAddComment();
4660
4665
  }
4661
- function Yn(e) {
4666
+ function Zn(e) {
4662
4667
  return Q.handleAddComment(e);
4663
4668
  }
4664
- function Xn(e, t) {
4669
+ function Qn(e, t) {
4665
4670
  Z.handleReply(e, t);
4666
4671
  }
4667
- function Zn(e) {
4672
+ function $n(e) {
4668
4673
  Z.handleResolve(e);
4669
4674
  }
4670
- function Qn(e) {
4675
+ function er(e) {
4671
4676
  Z.handleUnresolve(e);
4672
4677
  }
4673
- function $n(e) {
4678
+ function tr(e) {
4674
4679
  Z.handleDelete(e);
4675
4680
  }
4676
- function er(e, t) {
4681
+ function nr(e, t) {
4677
4682
  Z.handleTrackedChangeReply(e, t);
4678
4683
  }
4679
- function tr(e) {
4680
- navigator.clipboard?.writeText(e), mn.value = null;
4684
+ function rr(e) {
4685
+ navigator.clipboard?.writeText(e), gn.value = null;
4681
4686
  }
4682
- let nr = D(() => {
4683
- w.value;
4684
- let e = J()?.package.document;
4687
+ let ir = O(() => {
4688
+ T.value;
4689
+ let e = Yt()?.package.document;
4685
4690
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
4686
- }), rr = D(() => {
4687
- w.value;
4688
- let e = J();
4691
+ }), ar = O(() => {
4692
+ T.value;
4693
+ let e = Yt();
4689
4694
  return e ? Nt(e) : void 0;
4690
- }), ir = D(() => {
4691
- w.value;
4695
+ }), or = O(() => {
4696
+ T.value;
4692
4697
  let e = Y.value;
4693
4698
  if (!e) return {};
4694
- let t = ut(e.state).table;
4695
- return t ? lt(t) : {};
4696
- }), ar = D(() => {
4697
- w.value;
4699
+ let t = lt(e.state).table;
4700
+ return t ? ct(t) : {};
4701
+ }), sr = O(() => {
4702
+ T.value;
4698
4703
  let e = {};
4699
4704
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4700
- let t = J()?.package.styles?.styles;
4705
+ let t = Yt()?.package.styles?.styles;
4701
4706
  return t !== void 0 && (e.documentStyles = t), e;
4702
- }), or = D(() => St(nr.value?.pageWidth ?? 12240) * K.value), sr = D(() => {
4707
+ }), cr = O(() => St(ir.value?.pageWidth ?? 12240) * q.value), lr = O(() => {
4703
4708
  let e = Ht.value?.pages;
4704
- if (!e || e.length === 0) return or.value;
4709
+ if (!e || e.length === 0) return cr.value;
4705
4710
  let t = 0;
4706
4711
  for (let n of e) t = Math.max(t, n.size.w);
4707
- return t * K.value;
4708
- }), $ = D(() => At({
4709
- availableWidth: Se.value,
4710
- pageWidth: sr.value,
4711
- outline: Fe.value && Qe.value.length > 1 ? "available" : "absent",
4712
- comments: H.value ? "open" : "closed"
4713
- })), cr = D(() => $.value.comments === "column" ? "column" : $.value.comments === "drawer" && G.value === "comments" ? "drawer" : null), lr = D(() => qn.value.filter((e) => !e.done && e.parentId == null).length), ur = D(() => ({ minWidth: sr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px" })), dr = D(() => ({
4712
+ return t * q.value;
4713
+ }), $ = O(() => At({
4714
+ availableWidth: xe.value,
4715
+ pageWidth: lr.value,
4716
+ outline: Pe.value && Ze.value.length > 1 ? "available" : "absent",
4717
+ comments: U.value ? "open" : "closed"
4718
+ })), ur = O(() => $.value.comments === "column" ? "column" : $.value.comments === "drawer" && K.value === "comments" ? "drawer" : null), dr = O(() => Yn.value.filter((e) => !e.done && e.parentId == null).length), fr = O(() => ({ minWidth: lr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px" })), pr = O(() => ({
4714
4719
  paddingLeft: kt.pageMargin + "px",
4715
4720
  paddingRight: kt.pageMargin + $.value.commentsGutter + "px"
4716
- })), fr = D(() => ({
4721
+ })), mr = O(() => ({
4717
4722
  paddingLeft: kt.pageMargin + "px",
4718
4723
  paddingRight: kt.pageMargin + $.value.commentsGutter + "px",
4719
- minWidth: sr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px"
4720
- })), pr = R(null), mr = 0;
4721
- function hr() {
4722
- let e = C.value;
4723
- if (!e || Date.now() < mr) return;
4724
+ minWidth: lr.value + 2 * kt.pageMargin + $.value.commentsGutter + "px"
4725
+ })), hr = z(null), gr = 0;
4726
+ function _r() {
4727
+ let e = w.value;
4728
+ if (!e || Date.now() < gr) return;
4724
4729
  let t = Dt(e), n = e.getBoundingClientRect().top, r = e.scrollTop + e.clientHeight / 2, i = t.map((t) => ({
4725
4730
  pm: Number(t.dataset.pmStart),
4726
4731
  top: t.getBoundingClientRect().top - n + e.scrollTop
4727
4732
  })).filter(({ pm: e }) => Number.isFinite(e)).sort((e, t) => e.pm - t.pm), a = null;
4728
- for (let e of $e.value) {
4733
+ for (let e of Qe.value) {
4729
4734
  let t = i.find(({ pm: t }) => t >= e.pmPos);
4730
4735
  t && t.top <= r && (a = String(e.pmPos));
4731
4736
  }
4732
- pr.value = a;
4737
+ hr.value = a;
4733
4738
  }
4734
- function gr() {
4735
- Q.isAddingComment.value && Q.handleCancelAddComment(), H.value = !1, qe.value = null, G.value = "none";
4739
+ function vr() {
4740
+ Q.isAddingComment.value && Q.handleCancelAddComment(), U.value = !1, Ke.value = null, K.value = "none";
4736
4741
  }
4737
- function _r() {
4738
- if (cr.value === "drawer") {
4739
- gr();
4742
+ function yr() {
4743
+ if (ur.value === "drawer") {
4744
+ vr();
4740
4745
  return;
4741
4746
  }
4742
- if (cr.value === "column") {
4743
- H.value = !1, qe.value = null;
4747
+ if (ur.value === "column") {
4748
+ U.value = !1, Ke.value = null;
4744
4749
  return;
4745
4750
  }
4746
- H.value = !0, At({
4747
- availableWidth: Se.value,
4748
- pageWidth: sr.value,
4749
- outline: Fe.value && Qe.value.length > 1 ? "available" : "absent",
4751
+ U.value = !0, At({
4752
+ availableWidth: xe.value,
4753
+ pageWidth: lr.value,
4754
+ outline: Pe.value && Ze.value.length > 1 ? "available" : "absent",
4750
4755
  comments: "open"
4751
- }).comments === "drawer" && (G.value = "comments");
4756
+ }).comments === "drawer" && (K.value = "comments");
4752
4757
  }
4753
- function vr() {
4754
- G.value = G.value === "outline" ? "none" : "outline";
4758
+ function br() {
4759
+ K.value = K.value === "outline" ? "none" : "outline";
4755
4760
  }
4756
- function yr(e) {
4757
- pr.value = String(e), mr = Date.now() + 900, In.handleOutlineNavigate(e);
4761
+ function xr(e) {
4762
+ hr.value = String(e), gr = Date.now() + 900, Rn.handleOutlineNavigate(e);
4758
4763
  }
4759
- U($, (e) => {
4760
- G.value === "outline" && e.outline !== "rail" && e.outline !== "drawer" && (G.value = "none"), G.value === "comments" && e.comments !== "drawer" && (G.value = "none");
4761
- }), U([() => Q.isAddingComment.value, $], ([e, t]) => {
4762
- e && t.comments === "drawer" && (G.value = "comments");
4764
+ W($, (e) => {
4765
+ K.value === "outline" && e.outline !== "rail" && e.outline !== "drawer" && (K.value = "none"), K.value === "comments" && e.comments !== "drawer" && (K.value = "none");
4766
+ }), W([() => Q.isAddingComment.value, $], ([e, t]) => {
4767
+ e && t.comments === "drawer" && (K.value = "comments");
4763
4768
  });
4764
- let br = D(() => {
4769
+ let Sr = O(() => {
4765
4770
  let e = /* @__PURE__ */ new Set();
4766
- for (let t of qn.value) t.done && e.add(t.id);
4771
+ for (let t of Yn.value) t.done && e.add(t.id);
4767
4772
  return e;
4768
- }), xr = D(() => ({
4769
- transform: K.value === 1 ? void 0 : `scale(${K.value})`,
4773
+ }), Cr = O(() => ({
4774
+ transform: q.value === 1 ? void 0 : `scale(${q.value})`,
4770
4775
  transformOrigin: "top center",
4771
4776
  transition: "transform 0.2s ease"
4772
- })), { handleApplyStyle: Sr, handleInsertSymbol: Cr, handleInsertSectionBreakNextPage: wr, handleInsertSectionBreakContinuous: Tr } = ps({
4777
+ })), { handleApplyStyle: wr, handleInsertSymbol: Tr, handleInsertSectionBreakNextPage: Er, handleInsertSectionBreakContinuous: Dr } = ps({
4773
4778
  editorView: Y,
4774
- getDocument: J
4779
+ getDocument: Yt
4775
4780
  });
4776
- function Er() {
4781
+ function Or() {
4777
4782
  if (o.onInsertImage) {
4778
4783
  o.onInsertImage();
4779
4784
  return;
@@ -4783,47 +4788,47 @@ var Ws = (e) => {
4783
4788
  let t = document.createElement("input");
4784
4789
  t.type = "file", t.accept = "image/*", t.style.display = "none", t.addEventListener("change", () => {
4785
4790
  let n = t.files?.[0];
4786
- n && et(e, n, () => e.focus()), t.remove();
4791
+ n && $e(e, n, () => e.focus()), t.remove();
4787
4792
  }), document.body.appendChild(t), t.click();
4788
4793
  }
4789
- function Dr(e, t) {
4794
+ function kr(e, t) {
4790
4795
  if (o.onInsertTable) {
4791
4796
  o.onInsertTable(e, t);
4792
4797
  return;
4793
4798
  }
4794
4799
  let n = Y.value;
4795
- n && (rt(n, e, t), n.focus());
4800
+ n && (nt(n, e, t), n.focus());
4796
4801
  }
4797
- function Or() {
4802
+ function Ar() {
4798
4803
  if (o.onInsertPageBreak) {
4799
4804
  o.onInsertPageBreak();
4800
4805
  return;
4801
4806
  }
4802
- let e = q.value;
4803
- e && (tt(e), e.focus());
4807
+ let e = J.value;
4808
+ e && (et(e), e.focus());
4804
4809
  }
4805
- function kr() {
4810
+ function jr() {
4806
4811
  if (o.onInsertTOC) {
4807
4812
  o.onInsertTOC();
4808
4813
  return;
4809
4814
  }
4810
- let e = q.value;
4811
- e && (at(e, { title: le("toolbar.tableOfContents") }), e.focus());
4815
+ let e = J.value;
4816
+ e && (it(e, { title: S("toolbar.tableOfContents") }), e.focus());
4812
4817
  }
4813
- let { handlePageSetupApply: Ar, handleLeftMarginChange: jr, handleRightMarginChange: Mr, handleTopMarginChange: Nr, handleBottomMarginChange: Pr, handleIndentLeftChange: Fr, handleIndentRightChange: Ir, handleFirstLineIndentChange: Lr, handleTabStopRemove: Rr } = ks({
4814
- editorView: q,
4815
- getDocument: J,
4818
+ let { handlePageSetupApply: Mr, handleLeftMarginChange: Nr, handleRightMarginChange: Pr, handleTopMarginChange: Fr, handleBottomMarginChange: Ir, handleIndentLeftChange: Lr, handleIndentRightChange: Rr, handleFirstLineIndentChange: zr, handleTabStopRemove: Br } = ks({
4819
+ editorView: J,
4820
+ getDocument: Yt,
4816
4821
  readOnly: b,
4817
- stateTick: w,
4818
- reLayout: nn,
4822
+ stateTick: T,
4823
+ reLayout: rn,
4819
4824
  onChange: d,
4820
4825
  applySectionProperties: (e) => {
4821
4826
  let t = Ot.applyCanonicalSectionProperties(e);
4822
4827
  return t === null ? "unhandled" : t.status;
4823
4828
  }
4824
- }), zr = D(() => {
4825
- w.value;
4826
- let e = Y.value, t = e ? dt(e.state).paragraphFormatting : {};
4829
+ }), Vr = O(() => {
4830
+ T.value;
4831
+ let e = Y.value, t = e ? ut(e.state).paragraphFormatting : {};
4827
4832
  return {
4828
4833
  indentLeft: t.indentLeft ?? 0,
4829
4834
  indentRight: t.indentRight ?? 0,
@@ -4832,156 +4837,156 @@ var Ws = (e) => {
4832
4837
  tabs: t.tabs ?? null
4833
4838
  };
4834
4839
  });
4835
- function Br(e) {
4840
+ function Hr(e) {
4836
4841
  _.value !== e && (_.value = e, o.onModeChange?.(e), c("mode-change", e));
4837
4842
  }
4838
- function Vr(e) {
4843
+ function Ur(e) {
4839
4844
  switch (e) {
4840
4845
  case "find":
4841
4846
  case "findReplace":
4842
- E.value = !0;
4847
+ D.value = !0;
4843
4848
  break;
4844
4849
  case "insertSymbol":
4845
- De.value = !0;
4850
+ Ee.value = !0;
4846
4851
  break;
4847
4852
  case "insertHyperlink":
4848
- Te.value = !0;
4853
+ we.value = !0;
4849
4854
  break;
4850
4855
  case "pageSetup":
4851
- Ae.value = !0;
4856
+ ke.value = !0;
4852
4857
  break;
4853
4858
  case "watermark":
4854
- b.value || (Pe.value = !0);
4859
+ b.value || (Ne.value = !0);
4855
4860
  break;
4856
4861
  case "toggleOutline":
4857
- In.handleToggleOutline();
4862
+ Rn.handleToggleOutline();
4858
4863
  break;
4859
4864
  case "toggleSidebar":
4860
- H.value = !H.value;
4865
+ U.value = !U.value;
4861
4866
  break;
4862
4867
  case "insertImage":
4863
- Er();
4868
+ Or();
4864
4869
  break;
4865
4870
  case "insertPageBreak":
4866
- Or();
4871
+ Ar();
4867
4872
  break;
4868
4873
  case "insertSectionBreakNextPage":
4869
- wr();
4874
+ Er();
4870
4875
  break;
4871
4876
  case "insertSectionBreakContinuous":
4872
- Tr();
4877
+ Dr();
4873
4878
  break;
4874
4879
  case "insertTOC":
4875
- kr();
4880
+ jr();
4876
4881
  break;
4877
4882
  default: break;
4878
4883
  }
4879
4884
  c("menu-action", e);
4880
4885
  }
4881
- function Hr(e) {
4882
- if (h(We.watermark, "Watermark changes are unavailable in this session.") || b.value) return;
4883
- let t = J();
4886
+ function Wr(e) {
4887
+ if (h(Ue.watermark, "Watermark changes are unavailable in this session.") || b.value) return;
4888
+ let t = Yt();
4884
4889
  if (!t) return;
4885
4890
  let n = Ft(t, e);
4886
- Yt(n), Bt.value = !0, w.value++, nn(), d(n);
4891
+ Xt(n), Bt.value = !0, T.value++, rn(), d(n);
4887
4892
  }
4888
- function Ur(e, t) {
4889
- Dr(e, t);
4893
+ function Gr(e, t) {
4894
+ kr(e, t);
4890
4895
  }
4891
- function Wr(e) {
4892
- let t = Y.value, n = tn().setNumberingValue;
4896
+ function Kr(e) {
4897
+ let t = Y.value, n = nn().setNumberingValue;
4893
4898
  b.value || !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4894
4899
  }
4895
- function Gr(e) {
4896
- let t = Y.value, n = tn().setTableProperties;
4900
+ function qr(e) {
4901
+ let t = Y.value, n = nn().setTableProperties;
4897
4902
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4898
4903
  }
4899
- let Kr = R(!1);
4904
+ let Jr = z(!1);
4900
4905
  cs({
4901
4906
  documentBuffer: () => o.documentBuffer ?? null,
4902
4907
  document: () => o.document ?? null,
4903
4908
  loadDocumentBuffer: Kt,
4904
4909
  loadDocument: qt,
4905
- sidebarAutoOpenedRef: Kr
4906
- }), U(() => o.mode, (e) => {
4910
+ sidebarAutoOpenedRef: Jr
4911
+ }), W(() => o.mode, (e) => {
4907
4912
  e && e !== _.value && (_.value = e);
4908
- }), U(() => o.showOutline, (e) => {
4909
- Fe.value = !!e, In.recomputeHeadingsIfOpen();
4913
+ }), W(() => o.showOutline, (e) => {
4914
+ Pe.value = !!e, Rn.recomputeHeadingsIfOpen();
4910
4915
  });
4911
- let qr = R(!1);
4912
- function Jr(e) {
4916
+ let Yr = z(!1);
4917
+ function Xr(e) {
4913
4918
  let t = e.currentTarget;
4914
- t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop), hr();
4919
+ t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop), _r();
4915
4920
  }
4916
- function Yr() {
4917
- if (o.initialScrollTop === void 0 || qr.value) return;
4918
- qr.value = !0;
4921
+ function Zr() {
4922
+ if (o.initialScrollTop === void 0 || Yr.value) return;
4923
+ Yr.value = !0;
4919
4924
  let e = o.initialScrollTop;
4920
4925
  requestAnimationFrame(() => {
4921
- C.value && Tt(C.value, {
4926
+ w.value && Tt(w.value, {
4922
4927
  top: e,
4923
4928
  behavior: "instant"
4924
4929
  });
4925
4930
  });
4926
4931
  }
4927
- U(zt, (e) => {
4928
- e || (qr.value = !1, Tt(C.value, {
4932
+ W(zt, (e) => {
4933
+ e || (Yr.value = !1, Tt(w.value, {
4929
4934
  top: 0,
4930
4935
  left: 0,
4931
4936
  behavior: "instant"
4932
4937
  }));
4933
- }, { flush: "sync" }), U(zt, (e) => {
4938
+ }, { flush: "sync" }), W(zt, (e) => {
4934
4939
  if (!e) return;
4935
- ge.value = !0, In.recomputeHeadingsIfOpen(), Z.seedFromDocument();
4936
- let t = J();
4937
- t && o.onCompatibilityChange?.(ft(t)), Yr(), c("ready");
4938
- }), U([zt, lr], ([e, t]) => {
4939
- !e || t === 0 || o.autoOpenReviewSidebar === !1 || Kr.value || (Kr.value = !0, H.value = !0);
4940
- }), Ne(() => {
4940
+ he.value = !0, Rn.recomputeHeadingsIfOpen(), Z.seedFromDocument();
4941
+ let t = Yt();
4942
+ t && o.onCompatibilityChange?.(dt(t)), Zr(), c("ready");
4943
+ }), W([zt, dr], ([e, t]) => {
4944
+ !e || t === 0 || o.autoOpenReviewSidebar === !1 || Jr.value || (Jr.value = !0, U.value = !0);
4945
+ }), Me(() => {
4941
4946
  let e = () => {
4942
- let e = xe.value, t = C.value;
4947
+ let e = be.value, t = w.value;
4943
4948
  if (!e) return;
4944
4949
  let n = t ? t.offsetWidth - t.clientWidth : 0;
4945
- Se.value = Math.max(0, e.clientWidth - n);
4950
+ xe.value = Math.max(0, e.clientWidth - n);
4946
4951
  }, t = new ResizeObserver(e);
4947
- xe.value && t.observe(xe.value), C.value && t.observe(C.value), e();
4952
+ be.value && t.observe(be.value), w.value && t.observe(w.value), e();
4948
4953
  let n = Ot.on("selectionChange", () => {
4949
- w.value++, Q.updateFloatingButton();
4954
+ T.value++, Q.updateFloatingButton();
4950
4955
  }), r = Ot.on("docChange", () => {
4951
- w.value++, In.recomputeHeadingsIfOpen();
4956
+ T.value++, Rn.recomputeHeadingsIfOpen();
4952
4957
  }), i = Ot.on("layoutComplete", () => {
4953
- w.value++, requestAnimationFrame(hr);
4954
- }), a = bn.install(), s = xt(() => o.onFontsLoaded?.());
4955
- I(() => {
4958
+ T.value++, requestAnimationFrame(_r);
4959
+ }), a = Sn.install(), s = xt(() => o.onFontsLoaded?.());
4960
+ L(() => {
4956
4961
  t.disconnect(), n(), r(), i(), a(), s();
4957
4962
  });
4958
4963
  });
4959
- let { exposed: Xr } = fs({
4964
+ let { exposed: Qr } = fs({
4960
4965
  editor: Ot,
4961
- editorView: q,
4966
+ editorView: J,
4962
4967
  isDirty: Bt,
4963
4968
  commentsDirty: Z.commentsDirty,
4964
4969
  clearCommentsDirty: Z.clearCommentsDirty,
4965
4970
  saveDocument: Jt,
4966
4971
  layout: Ht,
4967
- pagesRef: S,
4968
- scrollRootRef: C,
4969
- zoom: K,
4970
- scrollVisiblePositionIntoView: En,
4972
+ pagesRef: C,
4973
+ scrollRootRef: w,
4974
+ zoom: q,
4975
+ scrollVisiblePositionIntoView: On,
4971
4976
  setPassageHighlight: (e) => {
4972
- Ce.value = e;
4977
+ Se.value = e;
4973
4978
  },
4974
4979
  author: () => o.author,
4975
4980
  createAIEditComment: (e, t) => Z.createComment(e, void 0, t),
4976
4981
  publishAIEditComments: (e) => {
4977
4982
  Z.appendComments(e);
4978
4983
  },
4979
- getComments: () => Ke(o.experimentalSession, We.authorityRouting) ? Z.comments.value.map((e) => structuredClone(e)) : Z.comments.value,
4984
+ getComments: () => Ge(o.experimentalSession, Ue.authorityRouting) ? Z.comments.value.map((e) => structuredClone(e)) : Z.comments.value,
4980
4985
  setComments: (e) => {
4981
4986
  Z.setComments(e);
4982
4987
  },
4983
4988
  focus: () => Y.value?.focus(),
4984
- getDocument: J,
4989
+ getDocument: Yt,
4985
4990
  getActiveView: () => Y.value,
4986
4991
  getExperimentalSession: () => o.experimentalSession,
4987
4992
  getActiveCanonicalStory: () => {
@@ -4990,107 +4995,107 @@ var Ws = (e) => {
4990
4995
  kind: e.kind,
4991
4996
  id: e.noteId
4992
4997
  };
4993
- let t = Sn.value;
4998
+ let t = wn.value;
4994
4999
  return t?.rId ? {
4995
5000
  kind: t.position,
4996
5001
  rId: t.rId
4997
5002
  } : "main";
4998
5003
  },
4999
- closeNoteStory: $t,
5000
- getHeaderFooterView: Xt,
5001
- setZoom: st,
5004
+ closeNoteStory: en,
5005
+ getHeaderFooterView: Zt,
5006
+ setZoom: ot,
5002
5007
  openFindReplace: () => {
5003
- E.value = !0;
5008
+ D.value = !0;
5004
5009
  },
5005
5010
  onPrint: o.onPrint,
5006
5011
  onSave: o.onSave
5007
- }), Zr = D(() => {
5008
- w.value;
5009
- let e = Xr.getEditorRef();
5012
+ }), $r = O(() => {
5013
+ T.value;
5014
+ let e = Qr.getEditorRef();
5010
5015
  return {
5011
5016
  canUndo: e?.canUndo() ?? !1,
5012
5017
  canRedo: e?.canRedo() ?? !1
5013
5018
  };
5014
5019
  });
5015
- function Qr() {
5016
- Xr.undo(), Y.value?.focus();
5020
+ function ei() {
5021
+ Qr.undo(), Y.value?.focus();
5017
5022
  }
5018
- function $r() {
5019
- Xr.redo(), Y.value?.focus();
5023
+ function ti() {
5024
+ Qr.redo(), Y.value?.focus();
5020
5025
  }
5021
- return t(Xr), (t, n) => (L(), A("div", {
5026
+ return t(Qr), (t, n) => (R(), j("div", {
5022
5027
  ref_key: "rootRef",
5023
- ref: _e,
5024
- class: P([
5028
+ ref: ge,
5029
+ class: F([
5025
5030
  "docx-editor-vue ep-root paged-editor",
5026
5031
  e.className,
5027
5032
  se.value,
5028
5033
  {
5029
- dark: V(l),
5034
+ dark: H(l),
5030
5035
  "paged-editor--readonly": b.value
5031
5036
  }
5032
5037
  ]),
5033
- style: F(e.style)
5038
+ style: I(e.style)
5034
5039
  }, [
5035
- j("div", Ks, [M(La, {
5040
+ M("div", Ks, [N(La, {
5036
5041
  "show-table-insert": o.showTableInsert !== !1,
5037
5042
  onRename: n[0] ||= (e) => c("rename", e),
5038
- onMenuAction: Vr,
5039
- onInsertTable: Ur
5043
+ onMenuAction: Ur,
5044
+ onInsertTable: Gr
5040
5045
  }, {
5041
- "title-bar-left": Ve(() => [Ie(t.$slots, "title-bar-left", {}, void 0, !0)]),
5042
- "title-bar-right": Ve(() => [Ie(t.$slots, "title-bar-right", {}, void 0, !0)]),
5046
+ "title-bar-left": Be(() => [Fe(t.$slots, "title-bar-left", {}, void 0, !0)]),
5047
+ "title-bar-right": Be(() => [Fe(t.$slots, "title-bar-right", {}, void 0, !0)]),
5043
5048
  _: 3
5044
- }, 8, ["show-table-insert"]), e.showToolbar ? (L(), O(ie, je({
5049
+ }, 8, ["show-table-insert"]), e.showToolbar ? (R(), k(ie, Ae({
5045
5050
  key: 0,
5046
5051
  view: Y.value,
5047
- "get-commands": V(tn),
5048
- "state-tick": w.value,
5049
- "can-undo": Zr.value.canUndo,
5050
- "can-redo": Zr.value.canRedo,
5051
- "on-undo": Qr,
5052
- "on-redo": $r,
5053
- "zoom-percent": V(nt),
5054
- "is-min-zoom": V(it),
5055
- "is-max-zoom": V(ot),
5056
- "zoom-presets": V(wt),
5052
+ "get-commands": H(nn),
5053
+ "state-tick": T.value,
5054
+ "can-undo": $r.value.canUndo,
5055
+ "can-redo": $r.value.canRedo,
5056
+ "on-undo": ei,
5057
+ "on-redo": ti,
5058
+ "zoom-percent": H(tt),
5059
+ "is-min-zoom": H(rt),
5060
+ "is-max-zoom": H(at),
5061
+ "zoom-presets": H(wt),
5057
5062
  "show-zoom-control": e.showZoomControl,
5058
5063
  "editor-mode": _.value,
5059
5064
  "show-review-controls": te.value,
5060
5065
  "track-changes-on": ne.value,
5061
5066
  "display-mode": x.value,
5062
5067
  "read-only": b.value,
5063
- "comments-sidebar-open": cr.value !== null,
5068
+ "comments-sidebar-open": ur.value !== null,
5064
5069
  "outline-drawer": $.value.outline === "drawer",
5065
- "outline-drawer-open": G.value === "outline",
5066
- "comment-count": lr.value,
5067
- "image-context": V(cn),
5070
+ "outline-drawer-open": K.value === "outline",
5071
+ "comment-count": dr.value,
5072
+ "image-context": H(un),
5068
5073
  theme: e.theme ?? null
5069
- }, ar.value, {
5070
- onFindReplace: n[2] ||= (e) => E.value = !0,
5071
- onInsertLink: n[3] ||= (e) => Te.value = !0,
5072
- onInsertSymbol: n[4] ||= (e) => De.value = !0,
5073
- onInsertPageBreak: Or,
5074
- onPageSetup: n[5] ||= (e) => Ae.value = !0,
5075
- onToggleOutline: vr,
5076
- onApplyStyle: V(Sr),
5077
- onZoomIn: V(ct),
5078
- onZoomOut: V(pt),
5079
- onZoomSet: V(st),
5080
- onToggleSidebar: _r,
5081
- onModeChange: Br,
5074
+ }, sr.value, {
5075
+ onFindReplace: n[2] ||= (e) => D.value = !0,
5076
+ onInsertLink: n[3] ||= (e) => we.value = !0,
5077
+ onInsertSymbol: n[4] ||= (e) => Ee.value = !0,
5078
+ onInsertPageBreak: Ar,
5079
+ onPageSetup: n[5] ||= (e) => ke.value = !0,
5080
+ onToggleOutline: br,
5081
+ onApplyStyle: H(wr),
5082
+ onZoomIn: H(st),
5083
+ onZoomOut: H(ft),
5084
+ onZoomSet: H(ot),
5085
+ onToggleSidebar: yr,
5086
+ onModeChange: Hr,
5082
5087
  onToggleTrackChanges: ae,
5083
5088
  "onUpdate:displayMode": oe,
5084
- onImageProperties: n[6] ||= (e) => N.value = !0,
5085
- onImageWrapType: V(ln),
5086
- onImageTransform: V(un)
5087
- }), Ee({
5088
- "table-context": Ve(() => [M(ee, {
5089
+ onImageProperties: n[6] ||= (e) => P.value = !0,
5090
+ onImageWrapType: H(dn),
5091
+ onImageTransform: H(fn)
5092
+ }), Te({
5093
+ "table-context": Be(() => [N(ee, {
5089
5094
  view: Y.value,
5090
- "get-commands": V(tn),
5091
- "state-tick": w.value,
5095
+ "get-commands": H(nn),
5096
+ "state-tick": T.value,
5092
5097
  theme: e.theme ?? null,
5093
- onOpenTableProperties: n[1] ||= (e) => Me.value = !0
5098
+ onOpenTableProperties: n[1] ||= (e) => je.value = !0
5094
5099
  }, null, 8, [
5095
5100
  "view",
5096
5101
  "get-commands",
@@ -5100,43 +5105,43 @@ var Ws = (e) => {
5100
5105
  _: 2
5101
5106
  }, [t.$slots["toolbar-extra"] || e.toolbarExtra ? {
5102
5107
  name: "toolbar-extra",
5103
- fn: Ve(() => [Ie(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (L(), O(fe, {
5108
+ fn: Be(() => [Fe(t.$slots, "toolbar-extra", {}, () => [e.toolbarExtra ? (R(), k(de, {
5104
5109
  key: 0,
5105
5110
  node: e.toolbarExtra
5106
- }, null, 8, ["node"])) : k("", !0)], !0)]),
5111
+ }, null, 8, ["node"])) : A("", !0)], !0)]),
5107
5112
  key: "0"
5108
- } : 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("."))) : k("", !0)]),
5109
- M(Ma, {
5110
- "show-find-replace": E.value,
5111
- "onUpdate:showFindReplace": n[7] ||= (e) => E.value = e,
5112
- "show-hyperlink": Te.value,
5113
- "onUpdate:showHyperlink": n[8] ||= (e) => Te.value = e,
5114
- "show-insert-symbol": De.value,
5115
- "onUpdate:showInsertSymbol": n[9] ||= (e) => De.value = e,
5116
- "show-image-properties": N.value,
5117
- "onUpdate:showImageProperties": n[10] ||= (e) => N.value = e,
5118
- "show-page-setup": Ae.value,
5119
- "onUpdate:showPageSetup": n[11] ||= (e) => Ae.value = e,
5120
- "show-table-properties": Me.value,
5121
- "onUpdate:showTableProperties": n[12] ||= (e) => Me.value = e,
5122
- "show-watermark": Pe.value,
5123
- "onUpdate:showWatermark": n[13] ||= (e) => Pe.value = e,
5124
- "show-numbering-value": ke.value,
5125
- "onUpdate:showNumberingValue": n[14] ||= (e) => ke.value = e,
5113
+ } : 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("."))) : A("", !0)]),
5114
+ N(Ma, {
5115
+ "show-find-replace": D.value,
5116
+ "onUpdate:showFindReplace": n[7] ||= (e) => D.value = e,
5117
+ "show-hyperlink": we.value,
5118
+ "onUpdate:showHyperlink": n[8] ||= (e) => we.value = e,
5119
+ "show-insert-symbol": Ee.value,
5120
+ "onUpdate:showInsertSymbol": n[9] ||= (e) => Ee.value = e,
5121
+ "show-image-properties": P.value,
5122
+ "onUpdate:showImageProperties": n[10] ||= (e) => P.value = e,
5123
+ "show-page-setup": ke.value,
5124
+ "onUpdate:showPageSetup": n[11] ||= (e) => ke.value = e,
5125
+ "show-table-properties": je.value,
5126
+ "onUpdate:showTableProperties": n[12] ||= (e) => je.value = e,
5127
+ "show-watermark": Ne.value,
5128
+ "onUpdate:showWatermark": n[13] ||= (e) => Ne.value = e,
5129
+ "show-numbering-value": Oe.value,
5130
+ "onUpdate:showNumberingValue": n[14] ||= (e) => Oe.value = e,
5126
5131
  view: Y.value,
5127
- "scroll-visible-position-into-view": V(En),
5128
- bookmarks: Ze.value,
5129
- "current-watermark": rr.value,
5130
- "selected-image-pm-pos": V(on)?.pmPos ?? null,
5131
- "section-properties": nr.value,
5132
- "table-properties": ir.value,
5133
- onInsertSymbol: V(Cr),
5134
- onHyperlinkSubmit: V(hn),
5135
- onHyperlinkRemove: V(gn),
5136
- onPageSetupApply: V(Ar),
5137
- onTablePropertiesApply: Gr,
5138
- onWatermarkApply: Hr,
5139
- onNumberingValueApply: Wr
5132
+ "scroll-visible-position-into-view": H(On),
5133
+ bookmarks: Xe.value,
5134
+ "current-watermark": ar.value,
5135
+ "selected-image-pm-pos": H(cn)?.pmPos ?? null,
5136
+ "section-properties": ir.value,
5137
+ "table-properties": or.value,
5138
+ onInsertSymbol: H(Tr),
5139
+ onHyperlinkSubmit: H(_n),
5140
+ onHyperlinkRemove: H(vn),
5141
+ onPageSetupApply: H(Mr),
5142
+ onTablePropertiesApply: qr,
5143
+ onWatermarkApply: Wr,
5144
+ onNumberingValueApply: Kr
5140
5145
  }, null, 8, [
5141
5146
  "show-find-replace",
5142
5147
  "show-hyperlink",
@@ -5158,45 +5163,45 @@ var Ws = (e) => {
5158
5163
  "onHyperlinkRemove",
5159
5164
  "onPageSetupApply"
5160
5165
  ]),
5161
- V(Vt) ? (L(), A("div", qs, B(V(Vt)), 1)) : X.value ? (L(), A("div", Js, [Ie(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (L(), O(fe, {
5166
+ H(Vt) ? (R(), j("div", qs, V(H(Vt)), 1)) : on.value ? (R(), j("div", Js, [Fe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (R(), k(de, {
5162
5167
  key: 0,
5163
5168
  node: e.loadingIndicator
5164
- }, null, 8, ["node"])) : (L(), A(T, { key: 1 }, [Oe(B(V(le)("loadingDocument")), 1)], 64))], !0)])) : !V(zt) && !he.value ? (L(), A("div", Ys, [Ie(t.$slots, "placeholder", {}, () => [e.placeholder ? (L(), O(fe, {
5169
+ }, null, 8, ["node"])) : (R(), j(E, { key: 1 }, [De(V(H(S)("loadingDocument")), 1)], 64))], !0)])) : !H(zt) && !me.value ? (R(), j("div", Ys, [Fe(t.$slots, "placeholder", {}, () => [e.placeholder ? (R(), k(de, {
5165
5170
  key: 0,
5166
5171
  node: e.placeholder
5167
- }, null, 8, ["node"])) : (L(), A(T, { key: 1 }, [Oe("No document loaded")], 64))], !0)])) : k("", !0),
5168
- V(f) ? (L(), A("div", Xs, B(V(f)), 1)) : k("", !0),
5169
- j("div", {
5172
+ }, null, 8, ["node"])) : (R(), j(E, { key: 1 }, [De("No document loaded")], 64))], !0)])) : A("", !0),
5173
+ H(f) ? (R(), j("div", Xs, V(H(f)), 1)) : A("", !0),
5174
+ M("div", {
5170
5175
  ref_key: "hiddenPmRef",
5171
- ref: ve,
5176
+ ref: _e,
5172
5177
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-pm"
5173
5178
  }, null, 512),
5174
- j("div", {
5179
+ M("div", {
5175
5180
  ref_key: "hiddenHfPmRef",
5176
- ref: ye,
5181
+ ref: ve,
5177
5182
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-hf-pm"
5178
5183
  }, null, 512),
5179
- j("div", {
5184
+ M("div", {
5180
5185
  ref_key: "panelsRowRef",
5181
- ref: xe,
5186
+ ref: be,
5182
5187
  class: "docx-editor-vue__panels-row",
5183
5188
  "data-folio-panel-tier": $.value.tier,
5184
5189
  "data-folio-outline": $.value.outline,
5185
5190
  "data-folio-comments": $.value.comments
5186
5191
  }, [
5187
- $.value.outline === "column" || $.value.outline === "rail" ? (L(), O(Sa, {
5192
+ $.value.outline === "column" || $.value.outline === "rail" ? (R(), k(Sa, {
5188
5193
  key: 0,
5189
- headings: $e.value,
5190
- available: Qe.value.length > 1,
5191
- "outline-depth": Re.value,
5192
- onOutlineDepthChange: ze,
5193
- "get-scroll-container": () => C.value,
5194
- "doc-size": V(q)?.state.doc.content.size ?? 0,
5195
- "active-id": pr.value,
5194
+ headings: Qe.value,
5195
+ available: Ze.value.length > 1,
5196
+ "outline-depth": Le.value,
5197
+ onOutlineDepthChange: Re,
5198
+ "get-scroll-container": () => w.value,
5199
+ "doc-size": H(J)?.state.doc.content.size ?? 0,
5200
+ "active-id": hr.value,
5196
5201
  surface: $.value.outline,
5197
- expanded: G.value === "outline",
5198
- onExpand: vr,
5199
- onNavigate: yr
5202
+ expanded: K.value === "outline",
5203
+ onExpand: br,
5204
+ onNavigate: xr
5200
5205
  }, null, 8, [
5201
5206
  "headings",
5202
5207
  "available",
@@ -5206,39 +5211,39 @@ var Ws = (e) => {
5206
5211
  "active-id",
5207
5212
  "surface",
5208
5213
  "expanded"
5209
- ])) : k("", !0),
5210
- j("div", {
5214
+ ])) : A("", !0),
5215
+ M("div", {
5211
5216
  ref_key: "editorScrollRef",
5212
- ref: C,
5217
+ ref: w,
5213
5218
  class: "docx-editor-vue__editor-scroll",
5214
5219
  "data-folio-scroll": "",
5215
- onScroll: Jr
5216
- }, [j("div", {
5220
+ onScroll: Xr
5221
+ }, [M("div", {
5217
5222
  class: "docx-editor-vue__editor-area",
5218
- style: F(ur.value)
5223
+ style: I(fr.value)
5219
5224
  }, [
5220
- we.value && !b.value ? (L(), A("div", {
5225
+ Ce.value && !b.value ? (R(), j("div", {
5221
5226
  key: 0,
5222
5227
  class: "docx-editor-vue__ruler-h",
5223
5228
  "data-testid": "folio-horizontal-ruler",
5224
- style: F(fr.value)
5225
- }, [M(re, {
5226
- "section-props": nr.value,
5227
- zoom: V(K),
5229
+ style: I(mr.value)
5230
+ }, [N(re, {
5231
+ "section-props": ir.value,
5232
+ zoom: H(q),
5228
5233
  unit: e.rulerUnit ?? "inch",
5229
5234
  editable: !b.value,
5230
- "indent-left": zr.value.indentLeft,
5231
- "indent-right": zr.value.indentRight,
5232
- "first-line-indent": zr.value.firstLineIndent,
5233
- "hanging-indent": zr.value.hangingIndent,
5235
+ "indent-left": Vr.value.indentLeft,
5236
+ "indent-right": Vr.value.indentRight,
5237
+ "first-line-indent": Vr.value.firstLineIndent,
5238
+ "hanging-indent": Vr.value.hangingIndent,
5234
5239
  "show-first-line-indent": !0,
5235
- "tab-stops": zr.value.tabs,
5236
- onLeftMarginChange: V(jr),
5237
- onRightMarginChange: V(Mr),
5238
- onIndentLeftChange: V(Fr),
5239
- onIndentRightChange: V(Ir),
5240
- onFirstLineIndentChange: V(Lr),
5241
- onTabStopRemove: V(Rr)
5240
+ "tab-stops": Vr.value.tabs,
5241
+ onLeftMarginChange: H(Nr),
5242
+ onRightMarginChange: H(Pr),
5243
+ onIndentLeftChange: H(Lr),
5244
+ onIndentRightChange: H(Rr),
5245
+ onFirstLineIndentChange: H(zr),
5246
+ onTabStopRemove: H(Br)
5242
5247
  }, null, 8, [
5243
5248
  "section-props",
5244
5249
  "zoom",
@@ -5255,14 +5260,14 @@ var Ws = (e) => {
5255
5260
  "onIndentRightChange",
5256
5261
  "onFirstLineIndentChange",
5257
5262
  "onTabStopRemove"
5258
- ])], 4)) : k("", !0),
5259
- we.value && !b.value ? (L(), A("div", Qs, [M(v, {
5260
- "section-props": nr.value,
5261
- zoom: V(K),
5263
+ ])], 4)) : A("", !0),
5264
+ Ce.value && !b.value ? (R(), j("div", Qs, [N(v, {
5265
+ "section-props": ir.value,
5266
+ zoom: H(q),
5262
5267
  unit: e.rulerUnit ?? "inch",
5263
5268
  editable: !b.value,
5264
- onTopMarginChange: V(Nr),
5265
- onBottomMarginChange: V(Pr)
5269
+ onTopMarginChange: H(Fr),
5270
+ onBottomMarginChange: H(Ir)
5266
5271
  }, null, 8, [
5267
5272
  "section-props",
5268
5273
  "zoom",
@@ -5270,32 +5275,32 @@ var Ws = (e) => {
5270
5275
  "editable",
5271
5276
  "onTopMarginChange",
5272
5277
  "onBottomMarginChange"
5273
- ])])) : k("", !0),
5274
- j("div", {
5278
+ ])])) : A("", !0),
5279
+ M("div", {
5275
5280
  ref_key: "pagesViewportRef",
5276
- ref: be,
5281
+ ref: ye,
5277
5282
  class: "docx-editor-vue__pages-viewport",
5278
- style: F(dr.value),
5283
+ style: I(pr.value),
5279
5284
  onWheel: Et,
5280
- onMousedown: n[23] ||= (...e) => V(Dn) && V(Dn)(...e),
5281
- onMousemove: n[24] ||= (...e) => V(On) && V(On)(...e),
5282
- onClick: n[25] ||= (...e) => V(kn) && V(kn)(...e),
5283
- onDblclick: n[26] ||= (...e) => V(An) && V(An)(...e),
5284
- onContextmenu: n[27] ||= W((...e) => V(Vn) && V(Vn)(...e), ["prevent"])
5285
+ onMousedown: n[23] ||= (...e) => H(kn) && H(kn)(...e),
5286
+ onMousemove: n[24] ||= (...e) => H(An) && H(An)(...e),
5287
+ onClick: n[25] ||= (...e) => H(jn) && H(jn)(...e),
5288
+ onDblclick: n[26] ||= (...e) => H(Mn) && H(Mn)(...e),
5289
+ onContextmenu: n[27] ||= G((...e) => H(Un) && H(Un)(...e), ["prevent"])
5285
5290
  }, [
5286
- j("div", $s, [
5287
- j("div", {
5291
+ M("div", $s, [
5292
+ M("div", {
5288
5293
  ref_key: "pagesRef",
5289
- ref: S,
5290
- class: P(["docx-editor-vue__pages paged-editor__pages", V(Sn) ? `paged-editor--hf-editing paged-editor--editing-${V(Sn).position}` : ""]),
5291
- style: F(xr.value)
5294
+ ref: C,
5295
+ class: F(["docx-editor-vue__pages paged-editor__pages", H(wn) ? `paged-editor--hf-editing paged-editor--editing-${H(wn).position}` : ""]),
5296
+ style: I(Cr.value)
5292
5297
  }, null, 6),
5293
- M(bo, {
5294
- "editor-view": Pn(),
5295
- "hidden-container": ye.value,
5296
- "pages-container": S.value,
5297
- selection: Fn.value,
5298
- zoom: V(K)
5298
+ N(bo, {
5299
+ "editor-view": In(),
5300
+ "hidden-container": ve.value,
5301
+ "pages-container": C.value,
5302
+ selection: Ln.value,
5303
+ zoom: H(q)
5299
5304
  }, null, 8, [
5300
5305
  "editor-view",
5301
5306
  "hidden-container",
@@ -5303,15 +5308,15 @@ var Ws = (e) => {
5303
5308
  "selection",
5304
5309
  "zoom"
5305
5310
  ]),
5306
- j("div", ec, [
5307
- M(Yi, {
5308
- "get-view": () => V(q),
5309
- "get-pages-container": () => S.value,
5310
- "editor-state": V(Pt),
5311
- zoom: V(K),
5312
- layout: V(Ht),
5313
- blocks: V(Ut),
5314
- measures: V(Wt),
5311
+ M("div", ec, [
5312
+ N(Yi, {
5313
+ "get-view": () => H(J),
5314
+ "get-pages-container": () => C.value,
5315
+ "editor-state": H(Pt),
5316
+ zoom: H(q),
5317
+ layout: H(Ht),
5318
+ blocks: H(Ut),
5319
+ measures: H(Wt),
5315
5320
  "on-term-click": o.onAnonymizationTermClick,
5316
5321
  "selected-canonical": o.selectedAnonymizationCanonical,
5317
5322
  "selection-seq": o.anonymizationSelectionSeq
@@ -5327,13 +5332,13 @@ var Ws = (e) => {
5327
5332
  "selected-canonical",
5328
5333
  "selection-seq"
5329
5334
  ]),
5330
- M(Zi, {
5331
- range: Ce.value,
5332
- "get-pages-container": () => S.value,
5333
- zoom: V(K),
5334
- layout: V(Ht),
5335
- blocks: V(Ut),
5336
- measures: V(Wt)
5335
+ N(Zi, {
5336
+ range: Se.value,
5337
+ "get-pages-container": () => C.value,
5338
+ zoom: H(q),
5339
+ layout: H(Ht),
5340
+ blocks: H(Ut),
5341
+ measures: H(Wt)
5337
5342
  }, null, 8, [
5338
5343
  "range",
5339
5344
  "get-pages-container",
@@ -5342,15 +5347,15 @@ var Ws = (e) => {
5342
5347
  "blocks",
5343
5348
  "measures"
5344
5349
  ]),
5345
- o.showTemplateDirectives ? (L(), O(jo, {
5350
+ o.showTemplateDirectives ? (R(), k(jo, {
5346
5351
  key: 0,
5347
- "get-view": () => V(q),
5348
- "get-pages-container": () => S.value,
5349
- "editor-state": V(Pt),
5350
- zoom: V(K),
5351
- layout: V(Ht),
5352
- blocks: V(Ut),
5353
- measures: V(Wt)
5352
+ "get-view": () => H(J),
5353
+ "get-pages-container": () => C.value,
5354
+ "editor-state": H(Pt),
5355
+ zoom: H(q),
5356
+ layout: H(Ht),
5357
+ blocks: H(Ut),
5358
+ measures: H(Wt)
5354
5359
  }, null, 8, [
5355
5360
  "get-view",
5356
5361
  "get-pages-container",
@@ -5359,24 +5364,24 @@ var Ws = (e) => {
5359
5364
  "layout",
5360
5365
  "blocks",
5361
5366
  "measures"
5362
- ])) : k("", !0),
5363
- M(ta, {
5364
- "get-pages-container": () => S.value,
5365
- "editor-state": V(Pt),
5366
- zoom: V(K),
5367
- "sync-coordinator": V(Gt)
5367
+ ])) : A("", !0),
5368
+ N(ta, {
5369
+ "get-pages-container": () => C.value,
5370
+ "editor-state": H(Pt),
5371
+ zoom: H(q),
5372
+ "sync-coordinator": H(Gt)
5368
5373
  }, null, 8, [
5369
5374
  "get-pages-container",
5370
5375
  "editor-state",
5371
5376
  "zoom",
5372
5377
  "sync-coordinator"
5373
5378
  ]),
5374
- M(la, {
5375
- "get-view": () => V(q),
5376
- "get-pages-container": () => S.value,
5377
- zoom: V(K),
5378
- "transaction-version": w.value,
5379
- "sync-coordinator": V(Gt)
5379
+ N(la, {
5380
+ "get-view": () => H(J),
5381
+ "get-pages-container": () => C.value,
5382
+ zoom: H(q),
5383
+ "transaction-version": T.value,
5384
+ "sync-coordinator": H(Gt)
5380
5385
  }, null, 8, [
5381
5386
  "get-view",
5382
5387
  "get-pages-container",
@@ -5386,52 +5391,52 @@ var Ws = (e) => {
5386
5391
  ])
5387
5392
  ])
5388
5393
  ]),
5389
- V(Sn) ? (L(), O(So, {
5394
+ H(wn) ? (R(), k(So, {
5390
5395
  key: 0,
5391
- edit: V(Sn),
5392
- "get-view": Pn,
5393
- onClose: V(Mn),
5394
- onRemove: V(Nn)
5396
+ edit: H(wn),
5397
+ "get-view": In,
5398
+ onClose: H(Pn),
5399
+ onRemove: H(Fn)
5395
5400
  }, null, 8, [
5396
5401
  "edit",
5397
5402
  "onClose",
5398
5403
  "onRemove"
5399
- ])) : k("", !0),
5400
- He(j("aside", {
5404
+ ])) : A("", !0),
5405
+ Ve(M("aside", {
5401
5406
  class: "docx-editor-vue__note-editor",
5402
- "aria-label": rn.value,
5403
- onKeydown: n[16] ||= Ue(W((...e) => V($t) && V($t)(...e), ["stop", "prevent"]), ["esc"])
5404
- }, [j("header", nc, [j("span", null, B(rn.value), 1), j("button", {
5407
+ "aria-label": X.value,
5408
+ onKeydown: n[16] ||= He(G((...e) => H(en) && H(en)(...e), ["stop", "prevent"]), ["esc"])
5409
+ }, [M("header", nc, [M("span", null, V(X.value), 1), M("button", {
5405
5410
  type: "button",
5406
- "aria-label": V(le)("common.closeDialog"),
5407
- onClick: n[15] ||= (...e) => V($t) && V($t)(...e)
5408
- }, " × ", 8, rc)]), j("div", {
5411
+ "aria-label": H(S)("common.closeDialog"),
5412
+ onClick: n[15] ||= (...e) => H(en) && H(en)(...e)
5413
+ }, " × ", 8, rc)]), M("div", {
5409
5414
  ref_key: "notePmRef",
5410
- ref: Xe,
5415
+ ref: Ye,
5411
5416
  class: "docx-editor-vue__note-editor-host"
5412
- }, null, 512)], 40, tc), [[Be, V(Rt)]]),
5413
- M(yo, {
5414
- "image-info": V(on),
5415
- zoom: V(K),
5417
+ }, null, 512)], 40, tc), [[ze, H(Rt)]]),
5418
+ N(yo, {
5419
+ "image-info": H(cn),
5420
+ zoom: H(q),
5416
5421
  view: Y.value,
5417
- onDeselect: n[17] ||= (e) => on.value = null,
5418
- onInteractStart: n[18] ||= (e) => sn.value = !0,
5419
- onInteractEnd: n[19] ||= (e) => sn.value = !1,
5420
- onContextMenu: V(Hn)
5422
+ onDeselect: n[17] ||= (e) => cn.value = null,
5423
+ onInteractStart: n[18] ||= (e) => ln.value = !0,
5424
+ onInteractEnd: n[19] ||= (e) => ln.value = !1,
5425
+ onContextMenu: H(Wn)
5421
5426
  }, null, 8, [
5422
5427
  "image-info",
5423
5428
  "zoom",
5424
5429
  "view",
5425
5430
  "onContextMenu"
5426
5431
  ]),
5427
- M(Vo, {
5428
- data: V(mn),
5432
+ N(Vo, {
5433
+ data: H(gn),
5429
5434
  "read-only": b.value,
5430
- onNavigate: V(_n),
5431
- onCopy: tr,
5432
- onEdit: V(vn),
5433
- onRemove: V(yn),
5434
- onClose: n[20] ||= (e) => mn.value = null
5435
+ onNavigate: H(yn),
5436
+ onCopy: rr,
5437
+ onEdit: H(bn),
5438
+ onRemove: H(xn),
5439
+ onClose: n[20] ||= (e) => gn.value = null
5435
5440
  }, null, 8, [
5436
5441
  "data",
5437
5442
  "read-only",
@@ -5439,24 +5444,24 @@ var Ws = (e) => {
5439
5444
  "onEdit",
5440
5445
  "onRemove"
5441
5446
  ]),
5442
- V(xn) ? (L(), A("button", {
5447
+ H(Cn) ? (R(), j("button", {
5443
5448
  key: 1,
5444
5449
  type: "button",
5445
5450
  class: "docx-editor-vue__table-insert-btn",
5446
- style: F({
5447
- left: V(xn).x + "px",
5448
- top: V(xn).y + "px"
5451
+ style: I({
5452
+ left: H(Cn).x + "px",
5453
+ top: H(Cn).y + "px"
5449
5454
  }),
5450
- "aria-label": V(xn).type === "row" ? "Insert row" : "Insert column",
5451
- onMousedown: n[21] ||= (...e) => V(jn) && V(jn)(...e)
5452
- }, " + ", 44, ic)) : k("", !0),
5453
- M(g, {
5454
- comments: V(qn),
5455
- "pages-container": S.value,
5456
- zoom: V(K),
5457
- "page-width-px": or.value,
5458
- "sidebar-open": H.value,
5459
- "resolved-comment-ids": br.value,
5455
+ "aria-label": H(Cn).type === "row" ? "Insert row" : "Insert column",
5456
+ onMousedown: n[21] ||= (...e) => H(Nn) && H(Nn)(...e)
5457
+ }, " + ", 44, ic)) : A("", !0),
5458
+ N(g, {
5459
+ comments: H(Yn),
5460
+ "pages-container": C.value,
5461
+ zoom: H(q),
5462
+ "page-width-px": cr.value,
5463
+ "sidebar-open": U.value,
5464
+ "resolved-comment-ids": Sr.value,
5460
5465
  onMarkerClick: () => {}
5461
5466
  }, null, 8, [
5462
5467
  "comments",
@@ -5466,32 +5471,32 @@ var Ws = (e) => {
5466
5471
  "sidebar-open",
5467
5472
  "resolved-comment-ids"
5468
5473
  ]),
5469
- M(y, {
5470
- "is-open": cr.value !== null,
5471
- surface: cr.value ?? "column",
5472
- comments: V(qn),
5473
- "tracked-changes": Kn.value,
5474
+ N(y, {
5475
+ "is-open": ur.value !== null,
5476
+ surface: ur.value ?? "column",
5477
+ comments: H(Yn),
5478
+ "tracked-changes": Jn.value,
5474
5479
  "show-resolved": !0,
5475
- "is-adding-comment": V(Q).isAddingComment.value,
5476
- "add-comment-y-position": V(Q).addCommentYPosition.value,
5477
- "pages-container": S.value,
5478
- "page-width-px": or.value,
5479
- zoom: V(K),
5480
- "active-item-id": qe.value,
5481
- onClose: gr,
5482
- onDismiss: gr,
5483
- "onUpdate:activeItemId": n[22] ||= (e) => qe.value = e,
5484
- onAddComment: Yn,
5485
- onCancelAddComment: V(Q).handleCancelAddComment,
5486
- onCommentReply: Xn,
5487
- onCommentResolve: Zn,
5488
- onCommentUnresolve: Qn,
5489
- onCommentDelete: $n,
5490
- onAcceptChange: V(Z).handleAcceptChange,
5491
- onRejectChange: V(Z).handleRejectChange,
5492
- onAcceptChangeById: V(Z).handleAcceptChangeById,
5493
- onRejectChangeById: V(Z).handleRejectChangeById,
5494
- onTrackedChangeReply: er
5480
+ "is-adding-comment": H(Q).isAddingComment.value,
5481
+ "add-comment-y-position": H(Q).addCommentYPosition.value,
5482
+ "pages-container": C.value,
5483
+ "page-width-px": cr.value,
5484
+ zoom: H(q),
5485
+ "active-item-id": Ke.value,
5486
+ onClose: vr,
5487
+ onDismiss: vr,
5488
+ "onUpdate:activeItemId": n[22] ||= (e) => Ke.value = e,
5489
+ onAddComment: Zn,
5490
+ onCancelAddComment: H(Q).handleCancelAddComment,
5491
+ onCommentReply: Qn,
5492
+ onCommentResolve: $n,
5493
+ onCommentUnresolve: er,
5494
+ onCommentDelete: tr,
5495
+ onAcceptChange: H(Z).handleAcceptChange,
5496
+ onRejectChange: H(Z).handleRejectChange,
5497
+ onAcceptChangeById: H(Z).handleAcceptChangeById,
5498
+ onRejectChangeById: H(Z).handleRejectChangeById,
5499
+ onTrackedChangeReply: nr
5495
5500
  }, null, 8, [
5496
5501
  "is-open",
5497
5502
  "surface",
@@ -5509,49 +5514,49 @@ var Ws = (e) => {
5509
5514
  "onAcceptChangeById",
5510
5515
  "onRejectChangeById"
5511
5516
  ]),
5512
- V(Q).floatingCommentButton.value && !b.value ? (L(), A("button", {
5517
+ H(Q).floatingCommentButton.value && !b.value ? (R(), j("button", {
5513
5518
  key: 2,
5514
5519
  type: "button",
5515
5520
  class: "docx-editor-vue__add-comment-btn",
5516
- style: F({
5517
- top: V(Q).floatingCommentButton.value.top + "px",
5518
- left: V(Q).floatingCommentButton.value.left + "px"
5521
+ style: I({
5522
+ top: H(Q).floatingCommentButton.value.top + "px",
5523
+ left: H(Q).floatingCommentButton.value.left + "px"
5519
5524
  }),
5520
5525
  "aria-label": "Add comment",
5521
5526
  title: "Add comment",
5522
- onMousedown: W(Jn, ["prevent", "stop"])
5523
- }, [M(i, {
5527
+ onMousedown: G(Xn, ["prevent", "stop"])
5528
+ }, [N(i, {
5524
5529
  name: "add_comment",
5525
5530
  size: 18
5526
- })], 36)) : k("", !0)
5531
+ })], 36)) : A("", !0)
5527
5532
  ], 36),
5528
- V(Cn).totalPages > 1 ? (L(), O(Co, {
5533
+ H(Tn).totalPages > 1 ? (R(), k(Co, {
5529
5534
  key: 2,
5530
- "current-page": V(Cn).currentPage,
5531
- "total-pages": V(Cn).totalPages,
5532
- visible: V(Cn).visible
5535
+ "current-page": H(Tn).currentPage,
5536
+ "total-pages": H(Tn).totalPages,
5537
+ visible: H(Tn).visible
5533
5538
  }, null, 8, [
5534
5539
  "current-page",
5535
5540
  "total-pages",
5536
5541
  "visible"
5537
- ])) : k("", !0)
5542
+ ])) : A("", !0)
5538
5543
  ], 4)], 544),
5539
- G.value === "outline" ? (L(), A(T, { key: 1 }, [j("div", {
5544
+ K.value === "outline" ? (R(), j(E, { key: 1 }, [M("div", {
5540
5545
  class: "docx-editor-vue__panel-scrim",
5541
5546
  "data-testid": "folio-panel-scrim",
5542
5547
  "aria-hidden": "true",
5543
- onMousedown: n[28] ||= W((e) => G.value = "none", ["prevent"])
5544
- }, null, 32), M(Sa, {
5545
- headings: $e.value,
5546
- available: Qe.value.length > 1,
5547
- "outline-depth": Re.value,
5548
- onOutlineDepthChange: ze,
5549
- "get-scroll-container": () => C.value,
5550
- "doc-size": V(q)?.state.doc.content.size ?? 0,
5551
- "active-id": pr.value,
5548
+ onMousedown: n[28] ||= G((e) => K.value = "none", ["prevent"])
5549
+ }, null, 32), N(Sa, {
5550
+ headings: Qe.value,
5551
+ available: Ze.value.length > 1,
5552
+ "outline-depth": Le.value,
5553
+ onOutlineDepthChange: Re,
5554
+ "get-scroll-container": () => w.value,
5555
+ "doc-size": H(J)?.state.doc.content.size ?? 0,
5556
+ "active-id": hr.value,
5552
5557
  surface: "drawer",
5553
- onClose: n[29] ||= (e) => G.value = "none",
5554
- onNavigate: yr
5558
+ onClose: n[29] ||= (e) => K.value = "none",
5559
+ onNavigate: xr
5555
5560
  }, null, 8, [
5556
5561
  "headings",
5557
5562
  "available",
@@ -5559,27 +5564,27 @@ var Ws = (e) => {
5559
5564
  "get-scroll-container",
5560
5565
  "doc-size",
5561
5566
  "active-id"
5562
- ])], 64)) : k("", !0),
5563
- cr.value === "drawer" ? (L(), A("div", {
5567
+ ])], 64)) : A("", !0),
5568
+ ur.value === "drawer" ? (R(), j("div", {
5564
5569
  key: 2,
5565
5570
  class: "docx-editor-vue__panel-scrim",
5566
5571
  "data-testid": "folio-panel-scrim",
5567
5572
  "aria-hidden": "true",
5568
- onMousedown: W(gr, ["prevent"])
5569
- }, null, 32)) : k("", !0)
5573
+ onMousedown: G(vr, ["prevent"])
5574
+ }, null, 32)) : A("", !0)
5570
5575
  ], 8, Zs),
5571
- M(co, {
5576
+ N(co, {
5572
5577
  "read-only": b.value,
5573
- "context-menu": V(Ln),
5574
- "image-context-menu": V(Rn),
5575
- "image-context-menu-text-actions": V(zn),
5576
- "custom-text-menu-items": V(Bn),
5577
- "can-open-image-properties": V(on) !== null,
5578
- onContextMenuAction: V(Wn),
5579
- onCloseContextMenu: n[30] ||= (e) => V(Ln).isOpen = !1,
5580
- onImageWrapSelect: V(Un),
5581
- onCloseImageContextMenu: n[31] ||= (e) => Rn.value = null,
5582
- onOpenImageProperties: n[32] ||= (e) => N.value = !0
5578
+ "context-menu": H(zn),
5579
+ "image-context-menu": H(Bn),
5580
+ "image-context-menu-text-actions": H(Vn),
5581
+ "custom-text-menu-items": H(Hn),
5582
+ "can-open-image-properties": H(cn) !== null,
5583
+ onContextMenuAction: H(Kn),
5584
+ onCloseContextMenu: n[30] ||= (e) => H(zn).isOpen = !1,
5585
+ onImageWrapSelect: H(Gn),
5586
+ onCloseImageContextMenu: n[31] ||= (e) => Bn.value = null,
5587
+ onOpenImageProperties: n[32] ||= (e) => P.value = !0
5583
5588
  }, null, 8, [
5584
5589
  "read-only",
5585
5590
  "context-menu",
@@ -5590,17 +5595,17 @@ var Ws = (e) => {
5590
5595
  "onContextMenuAction",
5591
5596
  "onImageWrapSelect"
5592
5597
  ]),
5593
- M(ca, {
5594
- "event-root": b.value ? null : S.value,
5595
- view: V(q)
5598
+ N(ca, {
5599
+ "event-root": b.value ? null : C.value,
5600
+ view: H(J)
5596
5601
  }, null, 8, ["event-root", "view"])
5597
5602
  ], 6));
5598
5603
  }
5599
- }), [["__scopeId", "data-v-e3bb8c9a"]]);
5604
+ }), [["__scopeId", "data-v-1f7b50f6"]]);
5600
5605
  //#endregion
5601
5606
  //#region src/utils/listState.ts
5602
5607
  function oc() {
5603
- return qe;
5608
+ return Ke;
5604
5609
  }
5605
5610
  //#endregion
5606
5611
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
@@ -5627,7 +5632,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5627
5632
  "title",
5628
5633
  "aria-label",
5629
5634
  "aria-pressed"
5630
- ], hc = /*#__PURE__*/ t(/* @__PURE__ */ N({
5635
+ ], hc = /*#__PURE__*/ t(/* @__PURE__ */ P({
5631
5636
  __name: "FormattingBar",
5632
5637
  props: {
5633
5638
  currentFormatting: {},
@@ -5669,107 +5674,107 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5669
5674
  "redo"
5670
5675
  ],
5671
5676
  setup(e, { emit: t }) {
5672
- let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = D(() => a.currentFormatting ?? {}), l = D(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = D(() => c.value.listState ?? oc()), d = D(() => {
5677
+ let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = O(() => a.currentFormatting ?? {}), l = O(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = O(() => c.value.listState ?? oc()), d = O(() => {
5673
5678
  let e = c.value.color;
5674
5679
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5675
- }), f = D(() => st(u.value) > 0 || (c.value.indentLeft ?? 0) > 0);
5680
+ }), f = O(() => ot(u.value) > 0 || (c.value.indentLeft ?? 0) > 0);
5676
5681
  function p(e) {
5677
5682
  o("format", {
5678
5683
  type: "textColor",
5679
5684
  value: e
5680
5685
  });
5681
5686
  }
5682
- return (t, r) => (L(), A("div", {
5683
- class: P(["docx-formatting-bar", e.className]),
5687
+ return (t, r) => (R(), j("div", {
5688
+ class: F(["docx-formatting-bar", e.className]),
5684
5689
  role: "toolbar",
5685
- "aria-label": V(s)("formattingToolbar"),
5690
+ "aria-label": H(s)("formattingToolbar"),
5686
5691
  "data-folio-toolbar": "true"
5687
5692
  }, [
5688
- j("span", {
5693
+ M("span", {
5689
5694
  class: "docx-formatting-bar__group",
5690
5695
  role: "group",
5691
- "aria-label": V(s)("historyGroup")
5692
- }, [j("button", {
5696
+ "aria-label": H(s)("historyGroup")
5697
+ }, [M("button", {
5693
5698
  type: "button",
5694
5699
  class: "docx-formatting-bar__btn",
5695
5700
  disabled: e.disabled || !e.canUndo,
5696
- title: V(s)("undoShortcut"),
5697
- "aria-label": V(s)("undo"),
5698
- onMousedown: r[0] ||= W((e) => o("undo"), ["prevent"])
5699
- }, [M(i, {
5701
+ title: H(s)("undoShortcut"),
5702
+ "aria-label": H(s)("undo"),
5703
+ onMousedown: r[0] ||= G((e) => o("undo"), ["prevent"])
5704
+ }, [N(i, {
5700
5705
  name: "undo",
5701
5706
  size: 18
5702
- })], 40, lc), j("button", {
5707
+ })], 40, lc), M("button", {
5703
5708
  type: "button",
5704
5709
  class: "docx-formatting-bar__btn",
5705
5710
  disabled: e.disabled || !e.canRedo,
5706
- title: V(s)("redoShortcut"),
5707
- "aria-label": V(s)("redo"),
5708
- onMousedown: r[1] ||= W((e) => o("redo"), ["prevent"])
5709
- }, [M(i, {
5711
+ title: H(s)("redoShortcut"),
5712
+ "aria-label": H(s)("redo"),
5713
+ onMousedown: r[1] ||= G((e) => o("redo"), ["prevent"])
5714
+ }, [N(i, {
5710
5715
  name: "redo",
5711
5716
  size: 18
5712
5717
  })], 40, uc)], 8, cc),
5713
- r[13] ||= j("span", {
5718
+ r[13] ||= M("span", {
5714
5719
  class: "docx-formatting-bar__divider",
5715
5720
  role: "separator"
5716
5721
  }, null, -1),
5717
- e.showStylePicker ? (L(), A(T, { key: 0 }, [M(te, je({ value: c.value.styleId ?? "Normal" }, l.value, {
5722
+ e.showStylePicker ? (R(), j(E, { key: 0 }, [N(te, Ae({ value: c.value.styleId ?? "Normal" }, l.value, {
5718
5723
  disabled: e.disabled,
5719
5724
  onChange: r[2] ||= (e) => o("format", {
5720
5725
  type: "applyStyle",
5721
5726
  value: e
5722
5727
  })
5723
- }), null, 16, ["value", "disabled"]), r[11] ||= j("span", {
5728
+ }), null, 16, ["value", "disabled"]), r[11] ||= M("span", {
5724
5729
  class: "docx-formatting-bar__divider",
5725
5730
  role: "separator"
5726
- }, null, -1)], 64)) : k("", !0),
5727
- j("span", {
5731
+ }, null, -1)], 64)) : A("", !0),
5732
+ M("span", {
5728
5733
  class: "docx-formatting-bar__group",
5729
5734
  role: "group",
5730
- "aria-label": V(s)("textFormattingGroup")
5735
+ "aria-label": H(s)("textFormattingGroup")
5731
5736
  }, [
5732
- j("button", {
5737
+ M("button", {
5733
5738
  type: "button",
5734
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
5739
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.bold }]),
5735
5740
  disabled: e.disabled,
5736
- title: V(s)("boldShortcut"),
5737
- "aria-label": V(s)("bold"),
5741
+ title: H(s)("boldShortcut"),
5742
+ "aria-label": H(s)("bold"),
5738
5743
  "aria-pressed": !!c.value.bold,
5739
- onMousedown: r[3] ||= W((e) => o("format", "bold"), ["prevent"])
5740
- }, [M(i, {
5744
+ onMousedown: r[3] ||= G((e) => o("format", "bold"), ["prevent"])
5745
+ }, [N(i, {
5741
5746
  name: "format_bold",
5742
5747
  size: 18
5743
5748
  })], 42, fc),
5744
- j("button", {
5749
+ M("button", {
5745
5750
  type: "button",
5746
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
5751
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
5747
5752
  disabled: e.disabled,
5748
- title: V(s)("italicShortcut"),
5749
- "aria-label": V(s)("italic"),
5753
+ title: H(s)("italicShortcut"),
5754
+ "aria-label": H(s)("italic"),
5750
5755
  "aria-pressed": !!c.value.italic,
5751
- onMousedown: r[4] ||= W((e) => o("format", "italic"), ["prevent"])
5752
- }, [M(i, {
5756
+ onMousedown: r[4] ||= G((e) => o("format", "italic"), ["prevent"])
5757
+ }, [N(i, {
5753
5758
  name: "format_italic",
5754
5759
  size: 18
5755
5760
  })], 42, pc),
5756
- j("button", {
5761
+ M("button", {
5757
5762
  type: "button",
5758
- class: P(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
5763
+ class: F(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
5759
5764
  disabled: e.disabled,
5760
- title: V(s)("underlineShortcut"),
5761
- "aria-label": V(s)("underline"),
5765
+ title: H(s)("underlineShortcut"),
5766
+ "aria-label": H(s)("underline"),
5762
5767
  "aria-pressed": !!c.value.underline,
5763
- onMousedown: r[5] ||= W((e) => o("format", "underline"), ["prevent"])
5764
- }, [M(i, {
5768
+ onMousedown: r[5] ||= G((e) => o("format", "underline"), ["prevent"])
5769
+ }, [N(i, {
5765
5770
  name: "format_underlined",
5766
5771
  size: 18
5767
5772
  })], 42, mc)
5768
5773
  ], 8, dc),
5769
- e.showTextColorPicker ? (L(), A(T, { key: 1 }, [r[12] ||= j("span", {
5774
+ e.showTextColorPicker ? (R(), j(E, { key: 1 }, [r[12] ||= M("span", {
5770
5775
  class: "docx-formatting-bar__divider",
5771
5776
  role: "separator"
5772
- }, null, -1), M(V(n), {
5777
+ }, null, -1), N(H(n), {
5773
5778
  mode: "text",
5774
5779
  value: d.value,
5775
5780
  theme: e.theme ?? null,
@@ -5779,12 +5784,12 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5779
5784
  "value",
5780
5785
  "theme",
5781
5786
  "disabled"
5782
- ])], 64)) : k("", !0),
5783
- r[14] ||= j("span", {
5787
+ ])], 64)) : A("", !0),
5788
+ r[14] ||= M("span", {
5784
5789
  class: "docx-formatting-bar__divider",
5785
5790
  role: "separator"
5786
5791
  }, null, -1),
5787
- e.showAlignmentButtons ? (L(), O(b, {
5792
+ e.showAlignmentButtons ? (R(), k(b, {
5788
5793
  key: 2,
5789
5794
  value: c.value.alignment ?? "left",
5790
5795
  disabled: e.disabled,
@@ -5792,8 +5797,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5792
5797
  type: "alignment",
5793
5798
  value: e
5794
5799
  })
5795
- }, null, 8, ["value", "disabled"])) : k("", !0),
5796
- e.showListButtons ? (L(), O(ne, {
5800
+ }, null, 8, ["value", "disabled"])) : A("", !0),
5801
+ e.showListButtons ? (R(), k(ne, {
5797
5802
  key: 3,
5798
5803
  "list-state": u.value,
5799
5804
  disabled: e.disabled,
@@ -5806,7 +5811,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5806
5811
  "list-state",
5807
5812
  "disabled",
5808
5813
  "can-outdent"
5809
- ])) : k("", !0)
5814
+ ])) : A("", !0)
5810
5815
  ], 10, sc));
5811
5816
  }
5812
5817
  }), [["__scopeId", "data-v-d8fef805"]]), gc = [
@@ -5834,7 +5839,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5834
5839
  value: 2,
5835
5840
  label: "200%"
5836
5841
  }
5837
- ], _c = /*#__PURE__*/ t(/* @__PURE__ */ N({
5842
+ ], _c = /*#__PURE__*/ t(/* @__PURE__ */ P({
5838
5843
  __name: "ZoomControl",
5839
5844
  props: {
5840
5845
  value: { default: 1 },
@@ -5851,7 +5856,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5851
5856
  },
5852
5857
  emits: ["change"],
5853
5858
  setup(e, { emit: t }) {
5854
- let { Select: n } = h(), r = e, i = t, a = D(() => r.levels ?? gc), o = D(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = D(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = D(() => o.value ? String(o.value.value) : String(r.value)), l = D(() => {
5859
+ let { Select: n } = h(), r = e, i = t, a = O(() => r.levels ?? gc), o = O(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = O(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = O(() => o.value ? String(o.value.value) : String(r.value)), l = O(() => {
5855
5860
  let e = a.value.map((e) => ({
5856
5861
  value: String(e.value),
5857
5862
  label: e.label
@@ -5865,8 +5870,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5865
5870
  let t = Number.parseFloat(e);
5866
5871
  Number.isNaN(t) || i("change", t);
5867
5872
  }
5868
- return (t, r) => (L(), O(V(n), {
5869
- class: P(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
5873
+ return (t, r) => (R(), k(H(n), {
5874
+ class: F(["docx-zoom-control", [{ "docx-zoom-control--compact": e.compact }, e.className]]),
5870
5875
  value: c.value,
5871
5876
  items: l.value,
5872
5877
  disabled: e.disabled,
@@ -5882,7 +5887,7 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5882
5887
  }), [["__scopeId", "data-v-8079e07f"]]), vc = (e, t, n = {}) => {
5883
5888
  let { colorMode: r = se, locale: i = "en", ...a } = n;
5884
5889
  return new Promise((n, o) => {
5885
- let s = R(null), c = null, l = !1, d = {
5890
+ let s = z(null), c = null, l = !1, d = {
5886
5891
  save: async () => {
5887
5892
  let e = await (s.value?.save() ?? Promise.resolve(null));
5888
5893
  return e ? new Blob([e], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }) : null;
@@ -5904,8 +5909,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5904
5909
  l || (l = !0, o(/* @__PURE__ */ Error("Editor was destroyed before mounting completed."))), c?.unmount(), c = null;
5905
5910
  }
5906
5911
  };
5907
- c = Te({ setup() {
5908
- return () => ke(ac, {
5912
+ c = we({ setup() {
5913
+ return () => Oe(ac, {
5909
5914
  ...a,
5910
5915
  documentBuffer: e,
5911
5916
  ref: s,
@@ -5916,8 +5921,8 @@ var sc = ["aria-label"], cc = ["aria-label"], lc = [
5916
5921
  a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
5917
5922
  }
5918
5923
  });
5919
- } }), c.use(u, i), c.use(fe, r), c.mount(t);
5924
+ } }), c.use(u, i), c.use(de, r), c.mount(t);
5920
5925
  });
5921
5926
  };
5922
5927
  //#endregion
5923
- export { $i as AutocompleteCaretOverlay, ji as DEFAULT_AI_SUGGESTION_PRESETS, Wt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Oi as DOCUMENT_PRESET_VERSION, ki as DOCUMENT_STYLE_SET_VERSION, ac as DocxEditor, he as FindReplaceDialog, l as FolioUIProvider, ge as FootnotePropertiesDialog, hc as FormattingBar, _e as HyperlinkDialog, ve as ImagePositionDialog, ye as ImagePropertiesDialog, S as InsertImageDialog, be as InsertSymbolDialog, C as InsertTableDialog, xe as PageSetupDialog, Se as PasteSpecialDialog, Ti as STELLA_STYLE_SET_NAME, Ce as SplitCellDialog, we as TablePropertiesDialog, w as WatermarkDialog, _c as ZoomControl, Gt as acceptAutocompleteSuggestion, Kt as acceptAutocompleteWord, zt as anonymizationDecorationsKey, qt as appendAutocompleteToken, ur as applyFolioAIEditOperations, Mi as applySuggestions, Jt as autocompleteSuggestionKey, J as autocompleteSuggestionPlugin, Fi as buildPositionalText, Yt as clearAutocompleteSuggestion, $n as clearTemplateSlashMenu, fe as colorModePlugin, er as consumeTemplateSlashQuery, Bi as createAICitationDecorationsPlugin, Ai as createDocx, bi as createEmptyDocument, pr as createFolioAIEditSnapshot, Ei as createStellaStyleDocumentPreset, Di as createStellaStyleSet, se as defaultColorMode, e as defaultLocale, zr as deriveBlockId, _r as diffWordSegments, xi as extractDocumentStyleSet, Si as extractDocumentStyleSetFromDocx, Xt as finishAutocompleteSuggestion, Ui as fromMarkdown, Bt as getAnonymizationMatches, Zt as getAutocompleteSuggestion, q as getDocumentWatermark, Ri as getFolioCaretViewportRect, Br as getFolioParaIdFromBlockId, zi as getFolioSelectionViewportRect, Tn as getTemplateDirectives, tr as getTemplateSlashMenu, xr as hashFolioAIBlockText, u as i18nPlugin, $e as insertImageFromFile, K as insertPageBreakInView, nt as insertTableInView, it as insertTableOfContentsInView, Ci as inspectDocumentStyles, wi as inspectDocumentStylesFromDocx, Hr as isFolioBlockId, Ur as isSequentialFolioBlockId, Ni as isSuggestionStale, Sr as normalizeFolioAIBlockText, le as provideColorMode, n as provideLocale, vc as renderAsync, nr as resetTemplateSlashQuery, Pi as resolveSuggestionAnchor, Dn as scanDirectives, fi as scrollFolioPositionIntoView, Vi as setAICitationsMeta, Ii as setAISuggestionsMeta, Hi as setActiveCitationMeta, Ht as setAnonymizationTermsMeta, Pt as setDocumentWatermark, Li as setFocusedSuggestionMeta, Qn as setTemplatePreviewValues, $t as shouldTriggerAutocomplete, en as startAutocompleteSuggestion, rr as templateSlashMenuKey, Wi as toMarkdown, Gi as toMarkdownResult, me as useColorMode, r as useTranslation, pe as useWheelZoom };
5928
+ export { $i as AutocompleteCaretOverlay, ji as DEFAULT_AI_SUGGESTION_PRESETS, Wt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Oi as DOCUMENT_PRESET_VERSION, ki as DOCUMENT_STYLE_SET_VERSION, ac as DocxEditor, me as FindReplaceDialog, l as FolioUIProvider, he as FootnotePropertiesDialog, hc as FormattingBar, ge as HyperlinkDialog, _e as ImagePositionDialog, ve as ImagePropertiesDialog, C as InsertImageDialog, ye as InsertSymbolDialog, w as InsertTableDialog, be as PageSetupDialog, xe as PasteSpecialDialog, Ti as STELLA_STYLE_SET_NAME, Se as SplitCellDialog, Ce as TablePropertiesDialog, T as WatermarkDialog, _c as ZoomControl, Gt as acceptAutocompleteSuggestion, Kt as acceptAutocompleteWord, zt as anonymizationDecorationsKey, qt as appendAutocompleteToken, dr as applyFolioAIEditOperations, Mi as applySuggestions, Jt as autocompleteSuggestionKey, Yt as autocompleteSuggestionPlugin, Fi as buildPositionalText, Xt as clearAutocompleteSuggestion, er as clearTemplateSlashMenu, de as colorModePlugin, tr as consumeTemplateSlashQuery, Bi as createAICitationDecorationsPlugin, Ai as createDocx, bi as createEmptyDocument, mr as createFolioAIEditSnapshot, Ei as createStellaStyleDocumentPreset, Di as createStellaStyleSet, se as defaultColorMode, e as defaultLocale, Br as deriveBlockId, vr as diffWordSegments, xi as extractDocumentStyleSet, Si as extractDocumentStyleSetFromDocx, Zt as finishAutocompleteSuggestion, Ui as fromMarkdown, Bt as getAnonymizationMatches, Qt as getAutocompleteSuggestion, J as getDocumentWatermark, Ri as getFolioCaretViewportRect, Vr as getFolioParaIdFromBlockId, zi as getFolioSelectionViewportRect, En as getTemplateDirectives, nr as getTemplateSlashMenu, Sr as hashFolioAIBlockText, u as i18nPlugin, Qe as insertImageFromFile, q as insertPageBreakInView, tt as insertTableInView, rt as insertTableOfContentsInView, Ci as inspectDocumentStyles, wi as inspectDocumentStylesFromDocx, Ur as isFolioBlockId, Wr as isSequentialFolioBlockId, Ni as isSuggestionStale, Cr as normalizeFolioAIBlockText, S as provideColorMode, n as provideLocale, vc as renderAsync, rr as resetTemplateSlashQuery, Pi as resolveSuggestionAnchor, On as scanDirectives, fi as scrollFolioPositionIntoView, Vi as setAICitationsMeta, Ii as setAISuggestionsMeta, Hi as setActiveCitationMeta, Ht as setAnonymizationTermsMeta, Pt as setDocumentWatermark, Li as setFocusedSuggestionMeta, $n as setTemplatePreviewValues, en as shouldTriggerAutocomplete, tn as startAutocompleteSuggestion, ir as templateSlashMenuKey, Wi as toMarkdown, Gi as toMarkdownResult, pe as useColorMode, r as useTranslation, fe as useWheelZoom };