@stll/folio-vue 0.19.0 → 0.20.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,7 +1,7 @@
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-Cp5O_btz.js";
2
2
  import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-BXF-tbt2.js";
3
3
  import { t as ae } from "./zIndex-Ei9BbHSW.js";
4
- import { a as S, c as oe, i as se, l as C, o as ce, r as le, s as ue, t as de, u as fe } from "./useZoom-0VagXQvX.js";
4
+ import { a as S, c as oe, i as se, l as C, o as ce, r as le, s as ue, t as de, u as fe } from "./useZoom-C8y44V_P.js";
5
5
  import { FindReplaceDialog as w, FootnotePropertiesDialog as pe, HyperlinkDialog as me, ImagePositionDialog as he, ImagePropertiesDialog as ge, InsertImageDialog as T, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as Se } from "./dialogs.js";
6
6
  import { Fragment as D, Teleport as O, computed as k, createApp as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as Ce, createStaticVNode as we, createTextVNode as Te, createVNode as F, defineComponent as I, h as Ee, inject as De, mergeProps as Oe, nextTick as ke, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as z, onMounted as Ae, onScopeDispose as B, openBlock as V, provide as je, ref as H, renderList as U, renderSlot as Me, shallowRef as Ne, toDisplayString as W, unref as G, vModelText as Pe, vShow as Fe, watch as K, withCtx as Ie, withDirectives as Le, withKeys as Re, withModifiers as q } from "vue";
7
7
  import { NO_LIST_STATE as ze, createStyleResolver as Be, extractSelectionState as Ve, getDocumentBuiltInStyles as He, getDocumentStyleResolver as Ue, getSelectedText as We, insertImageFromFile as Ge, insertImageFromFile as Ke, insertPageBreakInView as qe, insertPageBreakInView as Je, insertTableInView as Ye, insertTableInView as Xe, insertTableOfContentsInView as J, insertTableOfContentsInView as Ze, listStateLevel as Qe, schema as $e } from "@stll/folio-core/prosemirror";
@@ -9,85 +9,85 @@ import { expectTableAttrs as et } from "@stll/folio-core/prosemirror/attrs";
9
9
  import { getTableContext as tt } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
10
  import { extractSelectionContext as nt } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
11
11
  import { inspectDocxCompatibility as rt } from "@stll/folio-core/docx/compatibility";
12
- import { resolveActiveEditorStory as it } from "@stll/folio-core/controller/activeEditorStory";
13
- import { clearAllCaches as at, resetCanvasContext as ot } from "@stll/folio-core/layout-bridge/engine/measuring";
14
- import { onFontsLoaded as st } from "@stll/folio-core/utils/fontLoader";
15
- import { twipsToPixels as ct } from "@stll/folio-core/paged-layout/sectionGeometry";
16
- import { getDocumentWatermark as lt, getDocumentWatermark as ut, setDocumentWatermark as dt, setDocumentWatermark as ft } from "@stll/folio-core/watermark";
17
- import { createLatestRequestGate as pt } from "@stll/folio-core/controller/latestRequestGate";
18
- import { measureDirectiveGutter as mt, projectRangesToRects as ht } from "@stll/folio-core/paged-layout/rangeProjection";
19
- import { prefersReducedMotionBehavior as gt } from "@stll/folio-core/paged-layout/scrollNavigation";
20
- import { anonymizationDecorationsKey as _t, getAnonymizationMatches as vt, getAnonymizationMatches as yt, setAnonymizationTermsMeta as bt, slugAnonymizationLabel as xt } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
21
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as St, acceptAutocompleteSuggestion as Y, acceptAutocompleteWord as Ct, appendAutocompleteToken as wt, autocompleteSuggestionKey as Tt, autocompleteSuggestionPlugin as Et, clearAutocompleteSuggestion as Dt, finishAutocompleteSuggestion as Ot, getAutocompleteSuggestion as kt, getAutocompleteSuggestion as At, shouldTriggerAutocomplete as X, startAutocompleteSuggestion as jt } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
22
- import { createRenderedDomContext as Mt } from "@stll/folio-core/render-dom/RenderedDomContext";
23
- import { ContentControlWidgetController as Nt } from "@stll/folio-core/controller/contentControlWidgetController";
24
- import { NodeSelection as Pt, Selection as Ft, TextSelection as Z } from "prosemirror-state";
25
- import { pixelsToEmu as It } from "@stll/folio-core/utils/units";
26
- import { IMAGE_LAYOUT_OPTIONS as Lt, captureInlinePositionEmu as Rt, deriveLayoutChoice as zt, findImageElement as Bt, isImageLayoutOptionEnabled as Vt, toolbarValueToLayoutTarget as Ht } from "@stll/folio-core/layout-painter/imageLayout";
27
- import { isTrackChangesMode as Ut, toggledTrackChangesMode as Wt } from "@stll/folio-core/managers/EditorModeManager";
28
- import { clickToPositionDom as Gt, getCaretPositionFromDom as Kt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
29
- import { calculateResizedImageDimensions as qt, commitImageFloatMove as Jt, commitImageInlineMove as Yt, commitImageResize as Xt, isFloatingImage as Zt } from "@stll/folio-core/prosemirror/imageCommit";
30
- import { findBodyPmAnchor as Qt, findBodyPmSpans as $t } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
31
- import { resetImeCaretAnchor as en, syncImeCaretAnchor as tn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
32
- import { PAINTER_PAINTED_EVENT as nn } from "@stll/folio-core/layout-painter/renderPage";
33
- import { HeaderFooterSelectionOverlay as rn } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
34
- import { getTemplateDirectives as an, getTemplateDirectives as on, scanDirectives as sn } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
35
- import { closeHistory as cn, redo as ln, undo as un } from "prosemirror-history";
36
- import { clearFormatting as dn } from "@stll/folio-core/prosemirror/commands/formatting";
37
- import { anchorTargetAttrs as fn, sanitizeExternalUrl as pn, windowFeaturesFor as mn } from "@stll/folio-core/utils/urlSecurity";
38
- import { PENDING_COMMENT_ID as hn, createCommentIdAllocator as gn, seedCommentAllocator as _n } from "@stll/folio-core/prosemirror/commentIdAllocator";
39
- import { createComment as vn } from "@stll/folio-core/prosemirror/commentOps";
40
- import { acceptAIEditRevision as yn, acceptChange as bn, acceptSuggestion as Q, findAIEditRevisionRange as xn, findSuggestionRange as $, getSuggestions as Sn, rejectAIEditRevision as Cn, rejectChange as wn, rejectSuggestion as Tn } from "@stll/folio-core/prosemirror/commands/comments";
41
- import { makeRevisionInfo as En } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
42
- import { findPageIndexContainingPmPos as Dn } from "@stll/folio-core/layout-engine";
43
- import { proseDocToBlocks as On } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
44
- import { setTemplatePreviewValues as kn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
45
- import { clearTemplateSlashMenu as An, consumeTemplateSlashQuery as jn, getTemplateSlashMenu as Mn, resetTemplateSlashQuery as Nn, templateSlashMenuKey as Pn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
46
- import { createEmptyHeaderFooter as Fn, pickActiveHeaderFooterRId as In, removeHeaderFooter as Ln, resolveHeaderFooterContent as Rn, saveHeaderFooterContent as zn } from "@stll/folio-core/utils/headerFooter";
47
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Bn, applyFolioAIEditOperations as Vn, applyFolioAIEditOperations as Hn, applyFolioDocumentOperations as Un, assertSupportedFolioDocumentOperationVersion as Wn, createFolioAIEditSnapshot as Gn, createFolioAIEditSnapshot as Kn, createFolioAIEditSnapshotWithStyleResolver as qn, diffWordSegments as Jn, getCommentAnchorsFromDoc as Yn, getFolioDocumentOperationIssues as Xn, getTrackedChangesFromDoc as Zn, hashFolioAIBlockText as Qn, normalizeFolioAIBlockText as $n } from "@stll/folio-core/ai-edits";
48
- import { findParagraphFragmentsByParaId as er, flashParagraphElements as tr } from "@stll/folio-core/paged-layout/paragraphFlash";
49
- import { onPaintedLayoutChange as nr, readBlockRects as rr } from "@stll/folio-core/paged-layout/blockGeometry";
50
- import { blockSdtAttrsToSdtProperties as ir, findBlockSdtMatch as ar, findBlockSdtMatches as or, removeContentControlTr as sr, setContentControlContentTr as cr, setContentControlValueTr as lr } from "@stll/folio-core/prosemirror/commands/contentControls";
51
- import { setContentControlContentBlocksTr as ur } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
52
- import { clampRangeToDocSize as dr, resolveFolioAIBlockRange as fr, resolveFolioAITextRange as pr, resolvePassageRange as mr } from "@stll/folio-core/ai-edits/blockRange";
53
- import { deriveBlockId as hr, getFolioParaIdFromBlockId as gr, getFolioParaIdFromBlockId as _r, isFolioBlockId as vr, isSequentialFolioBlockId as yr } from "@stll/folio-core/types/block-id";
54
- import { getPageTextFromLayout as br } from "@stll/folio-core/paged-layout/pageText";
55
- import { applyStyle as xr, removeTabStop as Sr, setIndentFirstLine as Cr, setIndentLeft as wr, setIndentRight as Tr } from "@stll/folio-core/prosemirror/commands/paragraph";
56
- import { getCachedNumberingMap as Er } from "@stll/folio-core/docx";
57
- import { insertPageBreak as Dr } from "@stll/folio-core/prosemirror/commands/pageBreak";
58
- import { insertSectionBreakContinuous as Or, insertSectionBreakNextPage as kr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
59
- import { setEmbeddedFontFamilyMap as Ar } from "@stll/folio-core/utils/fontResolver";
60
- import { buildEmbeddedFontFamilyMap as jr, extractEmbeddedFonts as Mr } from "@stll/folio-core/fonts/embeddedFonts";
61
- import { editHyperlinkAtCursor as Nr, removeHyperlinkAtCursor as Pr } from "@stll/folio-core/prosemirror/commands/hyperlink";
62
- import { isKeydownInShortcutScope as Fr } from "@stll/folio-core/managers/editorShortcuts";
63
- import { collectHeadings as Ir } from "@stll/folio-core/utils/headingCollector";
64
- import { clickToPositionInHfSlot as Lr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
65
- import { findNoteStoryForTarget as Rr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
66
- import { TABLE_INSERT_HIDE_DELAY_MS as zr, detectTableInsertHover as Br } from "@stll/folio-core/layout-bridge/tableInsertHover";
67
- import { createCellDragTracker as Vr, findCellPosFromPmPos as Hr } from "@stll/folio-core/prosemirror/cellDragSelection";
68
- import { RemoteSelectionOverlay as Ur } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
69
- import { BodySelectionOverlay as Wr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
70
- import { createEmptyDocument as Gr } from "@stll/folio-core/utils/createDocument";
71
- import { extractDocumentStyleSet as Kr, extractDocumentStyleSetFromDocx as qr, inspectDocumentStyles as Jr, inspectDocumentStylesFromDocx as Yr } from "@stll/folio-core/style-sets/extract";
72
- import { STELLA_STYLE_SET_NAME as Xr, createStellaStyleDocumentPreset as Zr, createStellaStyleSet as Qr } from "@stll/folio-core/style-sets/stellaStyle";
73
- import { DOCUMENT_PRESET_VERSION as $r, DOCUMENT_STYLE_SET_VERSION as ei } from "@stll/folio-core/style-sets/types";
74
- import { createDocx as ti } from "@stll/folio-core/docx/rezip";
75
- import { DEFAULT_AI_SUGGESTION_PRESETS as ni } from "@stll/folio-core/ai-suggestions/types";
76
- import { applySuggestions as ri } from "@stll/folio-core/ai-suggestions/apply";
77
- import { isSuggestionStale as ii, resolveSuggestionAnchor as ai } from "@stll/folio-core/ai-suggestions/conflict";
78
- import { buildPositionalText as oi } from "@stll/folio-core/ai-suggestions/text-positions";
79
- import { setAISuggestionsMeta as si, setFocusedSuggestionMeta as ci } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
80
- import { scrollFolioPositionIntoView as li } from "@stll/folio-core/paged-layout/scrollToPmPosition";
81
- import { getFolioCaretViewportRect as ui, getFolioSelectionViewportRect as di } from "@stll/folio-core/paged-layout/selectionViewportRect";
82
- import { createAICitationDecorationsPlugin as fi, setAICitationsMeta as pi, setActiveCitationMeta as mi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
83
- import { fromMarkdown as hi, toMarkdown as gi, toMarkdownResult as _i } from "@stll/folio-core/markdown";
12
+ import { historyShortcutOwner as it, isKeydownInShortcutScope as at } from "@stll/folio-core/managers/editorShortcuts";
13
+ import { resolveActiveEditorStory as ot } from "@stll/folio-core/controller/activeEditorStory";
14
+ import { clearAllCaches as st, resetCanvasContext as ct } from "@stll/folio-core/layout-bridge/engine/measuring";
15
+ import { onFontsLoaded as lt } from "@stll/folio-core/utils/fontLoader";
16
+ import { twipsToPixels as ut } from "@stll/folio-core/paged-layout/sectionGeometry";
17
+ import { getDocumentWatermark as dt, getDocumentWatermark as ft, setDocumentWatermark as pt, setDocumentWatermark as mt } from "@stll/folio-core/watermark";
18
+ import { createLatestRequestGate as ht } from "@stll/folio-core/controller/latestRequestGate";
19
+ import { measureDirectiveGutter as gt, projectRangesToRects as _t } from "@stll/folio-core/paged-layout/rangeProjection";
20
+ import { prefersReducedMotionBehavior as vt } from "@stll/folio-core/paged-layout/scrollNavigation";
21
+ import { anonymizationDecorationsKey as yt, getAnonymizationMatches as bt, getAnonymizationMatches as xt, setAnonymizationTermsMeta as St, slugAnonymizationLabel as Ct } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
22
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Y, acceptAutocompleteSuggestion as wt, acceptAutocompleteWord as Tt, appendAutocompleteToken as Et, autocompleteSuggestionKey as Dt, autocompleteSuggestionPlugin as Ot, clearAutocompleteSuggestion as kt, finishAutocompleteSuggestion as At, getAutocompleteSuggestion as jt, getAutocompleteSuggestion as X, shouldTriggerAutocomplete as Mt, startAutocompleteSuggestion as Nt } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
23
+ import { createRenderedDomContext as Pt } from "@stll/folio-core/render-dom/RenderedDomContext";
24
+ import { ContentControlWidgetController as Ft } from "@stll/folio-core/controller/contentControlWidgetController";
25
+ import { NodeSelection as It, Selection as Lt, TextSelection as Z } from "prosemirror-state";
26
+ import { pixelsToEmu as Rt } from "@stll/folio-core/utils/units";
27
+ import { IMAGE_LAYOUT_OPTIONS as zt, captureInlinePositionEmu as Bt, deriveLayoutChoice as Vt, findImageElement as Ht, isImageLayoutOptionEnabled as Ut, toolbarValueToLayoutTarget as Wt } from "@stll/folio-core/layout-painter/imageLayout";
28
+ import { isTrackChangesMode as Gt, toggledTrackChangesMode as Kt } from "@stll/folio-core/managers/EditorModeManager";
29
+ import { clickToPositionDom as qt, getCaretPositionFromDom as Jt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
30
+ import { calculateResizedImageDimensions as Yt, commitImageFloatMove as Xt, commitImageInlineMove as Zt, commitImageResize as Qt, isFloatingImage as $t } from "@stll/folio-core/prosemirror/imageCommit";
31
+ import { findBodyPmAnchor as en, findBodyPmSpans as tn } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
32
+ import { resetImeCaretAnchor as nn, syncImeCaretAnchor as rn } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
33
+ import { PAINTER_PAINTED_EVENT as an } from "@stll/folio-core/layout-painter/renderPage";
34
+ import { HeaderFooterSelectionOverlay as on } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
35
+ import { getTemplateDirectives as sn, getTemplateDirectives as cn, scanDirectives as ln } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
36
+ import { closeHistory as un, redo as dn, undo as fn } from "prosemirror-history";
37
+ import { clearFormatting as pn } from "@stll/folio-core/prosemirror/commands/formatting";
38
+ import { anchorTargetAttrs as mn, sanitizeExternalUrl as hn, windowFeaturesFor as gn } from "@stll/folio-core/utils/urlSecurity";
39
+ import { PENDING_COMMENT_ID as _n, createCommentIdAllocator as vn, seedCommentAllocator as yn } from "@stll/folio-core/prosemirror/commentIdAllocator";
40
+ import { createComment as bn } from "@stll/folio-core/prosemirror/commentOps";
41
+ import { acceptAIEditRevision as xn, acceptChange as Q, acceptSuggestion as Sn, findAIEditRevisionRange as $, findSuggestionRange as Cn, getSuggestions as wn, rejectAIEditRevision as Tn, rejectChange as En, rejectSuggestion as Dn } from "@stll/folio-core/prosemirror/commands/comments";
42
+ import { makeRevisionInfo as On } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
43
+ import { findPageIndexContainingPmPos as kn } from "@stll/folio-core/layout-engine";
44
+ import { proseDocToBlocks as An } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
45
+ import { setTemplatePreviewValues as jn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
46
+ import { clearTemplateSlashMenu as Mn, consumeTemplateSlashQuery as Nn, getTemplateSlashMenu as Pn, resetTemplateSlashQuery as Fn, templateSlashMenuKey as In } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
47
+ import { createEmptyHeaderFooter as Ln, pickActiveHeaderFooterRId as Rn, removeHeaderFooter as zn, resolveHeaderFooterContent as Bn, saveHeaderFooterContent as Vn } from "@stll/folio-core/utils/headerFooter";
48
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Hn, applyFolioAIEditOperations as Un, applyFolioAIEditOperations as Wn, applyFolioDocumentOperations as Gn, assertSupportedFolioDocumentOperationVersion as Kn, createFolioAIEditSnapshot as qn, createFolioAIEditSnapshot as Jn, createFolioAIEditSnapshotWithStyleResolver as Yn, diffWordSegments as Xn, getCommentAnchorsFromDoc as Zn, getFolioDocumentOperationIssues as Qn, getTrackedChangesFromDoc as $n, hashFolioAIBlockText as er, normalizeFolioAIBlockText as tr } from "@stll/folio-core/ai-edits";
49
+ import { findParagraphFragmentsByParaId as nr, flashParagraphElements as rr } from "@stll/folio-core/paged-layout/paragraphFlash";
50
+ import { onPaintedLayoutChange as ir, readBlockRects as ar } from "@stll/folio-core/paged-layout/blockGeometry";
51
+ import { blockSdtAttrsToSdtProperties as or, findBlockSdtMatch as sr, findBlockSdtMatches as cr, removeContentControlTr as lr, setContentControlContentTr as ur, setContentControlValueTr as dr } from "@stll/folio-core/prosemirror/commands/contentControls";
52
+ import { setContentControlContentBlocksTr as fr } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
53
+ import { clampRangeToDocSize as pr, resolveFolioAIBlockRange as mr, resolveFolioAITextRange as hr, resolvePassageRange as gr } from "@stll/folio-core/ai-edits/blockRange";
54
+ import { deriveBlockId as _r, getFolioParaIdFromBlockId as vr, getFolioParaIdFromBlockId as yr, isFolioBlockId as br, isSequentialFolioBlockId as xr } from "@stll/folio-core/types/block-id";
55
+ import { getPageTextFromLayout as Sr } from "@stll/folio-core/paged-layout/pageText";
56
+ import { applyStyle as Cr, removeTabStop as wr, setIndentFirstLine as Tr, setIndentLeft as Er, setIndentRight as Dr } from "@stll/folio-core/prosemirror/commands/paragraph";
57
+ import { getCachedNumberingMap as Or } from "@stll/folio-core/docx";
58
+ import { insertPageBreak as kr } from "@stll/folio-core/prosemirror/commands/pageBreak";
59
+ import { insertSectionBreakContinuous as Ar, insertSectionBreakNextPage as jr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
60
+ import { setEmbeddedFontFamilyMap as Mr } from "@stll/folio-core/utils/fontResolver";
61
+ import { buildEmbeddedFontFamilyMap as Nr, extractEmbeddedFonts as Pr } from "@stll/folio-core/fonts/embeddedFonts";
62
+ import { editHyperlinkAtCursor as Fr, removeHyperlinkAtCursor as Ir } from "@stll/folio-core/prosemirror/commands/hyperlink";
63
+ import { collectHeadings as Lr } from "@stll/folio-core/utils/headingCollector";
64
+ import { clickToPositionInHfSlot as Rr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
65
+ import { findNoteStoryForTarget as zr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
66
+ import { TABLE_INSERT_HIDE_DELAY_MS as Br, detectTableInsertHover as Vr } from "@stll/folio-core/layout-bridge/tableInsertHover";
67
+ import { createCellDragTracker as Hr, findCellPosFromPmPos as Ur } from "@stll/folio-core/prosemirror/cellDragSelection";
68
+ import { RemoteSelectionOverlay as Wr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
69
+ import { BodySelectionOverlay as Gr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
70
+ import { createEmptyDocument as Kr } from "@stll/folio-core/utils/createDocument";
71
+ import { extractDocumentStyleSet as qr, extractDocumentStyleSetFromDocx as Jr, inspectDocumentStyles as Yr, inspectDocumentStylesFromDocx as Xr } from "@stll/folio-core/style-sets/extract";
72
+ import { STELLA_STYLE_SET_NAME as Zr, createStellaStyleDocumentPreset as Qr, createStellaStyleSet as $r } from "@stll/folio-core/style-sets/stellaStyle";
73
+ import { DOCUMENT_PRESET_VERSION as ei, DOCUMENT_STYLE_SET_VERSION as ti } from "@stll/folio-core/style-sets/types";
74
+ import { createDocx as ni } from "@stll/folio-core/docx/rezip";
75
+ import { DEFAULT_AI_SUGGESTION_PRESETS as ri } from "@stll/folio-core/ai-suggestions/types";
76
+ import { applySuggestions as ii } from "@stll/folio-core/ai-suggestions/apply";
77
+ import { isSuggestionStale as ai, resolveSuggestionAnchor as oi } from "@stll/folio-core/ai-suggestions/conflict";
78
+ import { buildPositionalText as si } from "@stll/folio-core/ai-suggestions/text-positions";
79
+ import { setAISuggestionsMeta as ci, setFocusedSuggestionMeta as li } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
80
+ import { scrollFolioPositionIntoView as ui } from "@stll/folio-core/paged-layout/scrollToPmPosition";
81
+ import { getFolioCaretViewportRect as di, getFolioSelectionViewportRect as fi } from "@stll/folio-core/paged-layout/selectionViewportRect";
82
+ import { createAICitationDecorationsPlugin as pi, setAICitationsMeta as mi, setActiveCitationMeta as hi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
83
+ import { fromMarkdown as gi, toMarkdown as _i, toMarkdownResult as vi } from "@stll/folio-core/markdown";
84
84
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
85
- var vi = [
85
+ var yi = [
86
86
  "data-folio-anonymization-label",
87
87
  "data-folio-anonymization-canonical",
88
88
  "data-folio-anonymization-selected",
89
89
  "title"
90
- ], yi = /*#__PURE__*/ t(/* @__PURE__ */ I({
90
+ ], bi = /*#__PURE__*/ t(/* @__PURE__ */ I({
91
91
  __name: "AnonymizationRectsOverlay",
92
92
  props: {
93
93
  getView: { type: Function },
@@ -102,7 +102,7 @@ var vi = [
102
102
  selectionSeq: {}
103
103
  },
104
104
  setup(e) {
105
- let t = e, n = H(null), r = H([]), i = pt(), a = null;
105
+ let t = e, n = H(null), r = H([]), i = ht(), a = null;
106
106
  function o() {
107
107
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
108
108
  a = null, s();
@@ -114,12 +114,12 @@ var vi = [
114
114
  r.value = [];
115
115
  return;
116
116
  }
117
- let s = yt(o);
117
+ let s = xt(o);
118
118
  if (s.length === 0) {
119
119
  r.value = [];
120
120
  return;
121
121
  }
122
- let c = await ht(s, {
122
+ let c = await _t(s, {
123
123
  pagesContainer: a,
124
124
  zoom: t.zoom,
125
125
  layout: t.layout,
@@ -161,7 +161,7 @@ var vi = [
161
161
  index: a
162
162
  }, i.item(a)?.scrollIntoView({
163
163
  block: "center",
164
- behavior: gt()
164
+ behavior: vt()
165
165
  });
166
166
  }
167
167
  K(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
@@ -192,7 +192,7 @@ var vi = [
192
192
  "data-folio-anonymization-overlay": ""
193
193
  }, [(V(!0), N(D, null, U(r.value, (t) => (V(), N(D, { key: `${t.label}:${t.canonical}` }, [(V(!0), N(D, null, U(t.rects, (n, r) => (V(), N("span", {
194
194
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
195
- class: L(["folio-anonymization-term", `folio-anonymization-term--${G(xt)(t.label)}`]),
195
+ class: L(["folio-anonymization-term", `folio-anonymization-term--${G(Ct)(t.label)}`]),
196
196
  "data-folio-anonymization-label": t.label,
197
197
  "data-folio-anonymization-canonical": t.canonical,
198
198
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
@@ -204,12 +204,12 @@ var vi = [
204
204
  width: `${n.width}px`,
205
205
  height: `${n.height}px`
206
206
  })
207
- }, null, 14, vi))), 128))], 64))), 128))], 512));
207
+ }, null, 14, yi))), 128))], 64))), 128))], 512));
208
208
  }
209
- }), [["__scopeId", "data-v-df8fe7df"]]), bi = {
209
+ }), [["__scopeId", "data-v-df8fe7df"]]), xi = {
210
210
  class: "folio-passage-highlight-overlay",
211
211
  "data-folio-passage-highlight-overlay": ""
212
- }, xi = /*#__PURE__*/ t(/* @__PURE__ */ I({
212
+ }, Si = /*#__PURE__*/ t(/* @__PURE__ */ I({
213
213
  __name: "PassageHighlightOverlay",
214
214
  props: {
215
215
  range: {},
@@ -220,7 +220,7 @@ var vi = [
220
220
  measures: {}
221
221
  },
222
222
  setup(e) {
223
- let t = e, n = H([]), r = pt(), i = null;
223
+ let t = e, n = H([]), r = ht(), i = null;
224
224
  function a() {
225
225
  i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
226
226
  i = null, o();
@@ -232,7 +232,7 @@ var vi = [
232
232
  n.value = [];
233
233
  return;
234
234
  }
235
- let o = await ht([i], {
235
+ let o = await _t([i], {
236
236
  pagesContainer: a,
237
237
  zoom: t.zoom,
238
238
  layout: t.layout,
@@ -256,7 +256,7 @@ var vi = [
256
256
  t.measures
257
257
  ], () => a(), { immediate: !0 }), z(() => {
258
258
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
259
- }), (e, t) => (V(), N("div", bi, [(V(!0), N(D, null, U(n.value, (e, t) => (V(), N("span", {
259
+ }), (e, t) => (V(), N("div", xi, [(V(!0), N(D, null, U(n.value, (e, t) => (V(), N("span", {
260
260
  key: `${t}:${e.left}:${e.top}`,
261
261
  class: "folio-passage-highlight",
262
262
  style: R({
@@ -268,11 +268,11 @@ var vi = [
268
268
  })
269
269
  }, null, 4))), 128))]));
270
270
  }
271
- }), [["__scopeId", "data-v-bde9f41b"]]), Si = {
271
+ }), [["__scopeId", "data-v-bde9f41b"]]), Ci = {
272
272
  key: 0,
273
273
  class: "folio-autocomplete-overlay",
274
274
  "data-folio-autocomplete-overlay": ""
275
- }, Ci = /*#__PURE__*/ t(/* @__PURE__ */ I({
275
+ }, wi = /*#__PURE__*/ t(/* @__PURE__ */ I({
276
276
  __name: "AutocompleteCaretOverlay",
277
277
  props: {
278
278
  caret: {},
@@ -280,7 +280,7 @@ var vi = [
280
280
  isStreaming: { type: Boolean }
281
281
  },
282
282
  setup(e) {
283
- return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", Si, [P("span", {
283
+ return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", Ci, [P("span", {
284
284
  class: "folio-autocomplete-ghost",
285
285
  style: R({
286
286
  left: `${e.caret.x}px`,
@@ -293,7 +293,7 @@ var vi = [
293
293
  "aria-hidden": "true"
294
294
  }, "stella", 2)], 4)])) : M("", !0);
295
295
  }
296
- }), [["__scopeId", "data-v-00299904"]]), wi = 48, Ti = /* @__PURE__ */ I({
296
+ }), [["__scopeId", "data-v-00299904"]]), Ti = 48, Ei = /* @__PURE__ */ I({
297
297
  __name: "AutocompleteSuggestionOverlay",
298
298
  props: {
299
299
  getPagesContainer: { type: Function },
@@ -310,7 +310,7 @@ var vi = [
310
310
  let c = r.querySelector(".layout-page-content");
311
311
  if (!c) return;
312
312
  let l = (c.getBoundingClientRect().right - a.left) / i;
313
- return Math.max(wi, l - t);
313
+ return Math.max(Ti, l - t);
314
314
  }
315
315
  }, s = () => {
316
316
  let e = t.getPagesContainer(), r = t.editorState;
@@ -318,12 +318,12 @@ var vi = [
318
318
  n.value = null;
319
319
  return;
320
320
  }
321
- let i = At(r);
321
+ let i = X(r);
322
322
  if (i.status === "idle" || i.text.length === 0) {
323
323
  n.value = null;
324
324
  return;
325
325
  }
326
- let a = Mt(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
326
+ let a = Pt(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
327
327
  if (!s) {
328
328
  n.value = null;
329
329
  return;
@@ -359,7 +359,7 @@ var vi = [
359
359
  t.editorState,
360
360
  t.zoom,
361
361
  r.value
362
- ], () => c()), (e, t) => (V(), j(Ci, {
362
+ ], () => c()), (e, t) => (V(), j(wi, {
363
363
  caret: n.value?.caret ?? null,
364
364
  text: n.value?.text ?? "",
365
365
  "is-streaming": n.value?.isStreaming ?? !1
@@ -369,33 +369,33 @@ var vi = [
369
369
  "is-streaming"
370
370
  ]));
371
371
  }
372
- }), Ei = Symbol("docx-portal-class");
373
- function Di(e) {
374
- je(Ei, k(() => ({
372
+ }), Di = Symbol("docx-portal-class");
373
+ function Oi(e) {
374
+ je(Di, k(() => ({
375
375
  "ep-root": !0,
376
376
  dark: !!G(e)
377
377
  })));
378
378
  }
379
- function Oi() {
380
- return De(Ei, k(() => ({ "ep-root": !0 })));
379
+ function ki() {
380
+ return De(Di, k(() => ({ "ep-root": !0 })));
381
381
  }
382
382
  //#endregion
383
383
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
384
- var ki = ["aria-label"], Ai = {
384
+ var Ai = ["aria-label"], ji = {
385
385
  key: 0,
386
386
  class: "content-control-picker__items",
387
387
  role: "menu"
388
- }, ji = {
388
+ }, Mi = {
389
389
  key: 0,
390
390
  class: "content-control-picker__empty"
391
- }, Mi = /*#__PURE__*/ t(/* @__PURE__ */ I({
391
+ }, Ni = /*#__PURE__*/ t(/* @__PURE__ */ I({
392
392
  __name: "ContentControlWidgetsOverlay",
393
393
  props: {
394
394
  eventRoot: {},
395
395
  view: {}
396
396
  },
397
397
  setup(e) {
398
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = Oi(), s = new Nt(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
398
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = ki(), s = new Ft(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
399
399
  c.value = s.getSnapshot();
400
400
  });
401
401
  K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), z(() => {
@@ -415,7 +415,7 @@ var ki = ["aria-label"], Ai = {
415
415
  "aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
416
416
  onMousedown: t[1] ||= q(() => {}, ["stop"]),
417
417
  onPointerdown: t[2] ||= q(() => {}, ["stop"])
418
- }, [c.value.status === "dropdown" ? (V(), N("div", Ai, [c.value.items.length === 0 ? (V(), N("div", ji, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
418
+ }, [c.value.status === "dropdown" ? (V(), N("div", ji, [c.value.items.length === 0 ? (V(), N("div", Mi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(D, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
419
419
  key: `${e.value}::${e.displayText}`,
420
420
  "class-name": "content-control-picker__item",
421
421
  type: "button",
@@ -432,9 +432,9 @@ var ki = ["aria-label"], Ai = {
432
432
  value: c.value.currentValue,
433
433
  "default-open": !0,
434
434
  onChange: d
435
- }, null, 8, ["value"])) : M("", !0)], 46, ki))]));
435
+ }, null, 8, ["value"])) : M("", !0)], 46, Ai))]));
436
436
  }
437
- }), [["__scopeId", "data-v-f88b41c9"]]), Ni = /* @__PURE__ */ I({
437
+ }), [["__scopeId", "data-v-f88b41c9"]]), Pi = /* @__PURE__ */ I({
438
438
  __name: "DecorationLayer",
439
439
  props: {
440
440
  getView: { type: Function },
@@ -469,7 +469,7 @@ var ki = ["aria-label"], Ai = {
469
469
  n.firstChild && n.replaceChildren();
470
470
  return;
471
471
  }
472
- let a = Mt(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
472
+ let a = Pt(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
473
473
  for (let { decoration: t, from: n, to: r } of i) {
474
474
  if (n === r) {
475
475
  let r = u(t, e);
@@ -546,10 +546,10 @@ var ki = ["aria-label"], Ai = {
546
546
  "aria-hidden": "true"
547
547
  }, null, 512));
548
548
  }
549
- }), Pi = { class: "doc-outline__header" }, Fi = { class: "doc-outline__body" }, Ii = {
549
+ }), Fi = { class: "doc-outline__header" }, Ii = { class: "doc-outline__body" }, Li = {
550
550
  key: 0,
551
551
  class: "doc-outline__empty"
552
- }, Li = /*#__PURE__*/ t(/* @__PURE__ */ I({
552
+ }, Ri = /*#__PURE__*/ t(/* @__PURE__ */ I({
553
553
  __name: "DocumentOutline",
554
554
  props: {
555
555
  isOpen: { type: Boolean },
@@ -578,7 +578,7 @@ var ki = ["aria-label"], Ai = {
578
578
  role: "navigation",
579
579
  "aria-label": "Document outline",
580
580
  onMousedown: n[1] ||= q(() => {}, ["stop"])
581
- }, [P("div", Pi, [P("button", {
581
+ }, [P("div", Fi, [P("button", {
582
582
  class: "doc-outline__back",
583
583
  title: "Close outline",
584
584
  "aria-label": "Close outline",
@@ -586,7 +586,7 @@ var ki = ["aria-label"], Ai = {
586
586
  }, [F(i, {
587
587
  name: "arrow_back",
588
588
  size: 20
589
- })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Fi, [e.headings.length === 0 ? (V(), N("div", Ii, "No headings found")) : (V(), j(G(r), {
589
+ })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Ii, [e.headings.length === 0 ? (V(), N("div", Li, "No headings found")) : (V(), j(G(r), {
590
590
  key: 1,
591
591
  items: o.value,
592
592
  "get-scroll-container": e.getScrollContainer ?? (() => null),
@@ -594,7 +594,7 @@ var ki = ["aria-label"], Ai = {
594
594
  "aria-label": "Document outline"
595
595
  }, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
596
596
  }
597
- }), [["__scopeId", "data-v-0797b3b1"]]), Ri = /* @__PURE__ */ I({
597
+ }), [["__scopeId", "data-v-0797b3b1"]]), zi = /* @__PURE__ */ I({
598
598
  __name: "DocxEditorDialogs",
599
599
  props: {
600
600
  view: {},
@@ -687,10 +687,10 @@ var ki = ["aria-label"], Ai = {
687
687
  }, null, 8, ["is-open", "current-watermark"])
688
688
  ], 64));
689
689
  }
690
- }), zi = {
690
+ }), Bi = {
691
691
  key: 0,
692
692
  class: "docx-editor-vue__title-bar"
693
- }, Bi = { class: "docx-editor-vue__title-bar-left" }, Vi = { class: "docx-editor-vue__title-bar-center" }, Hi = { class: "docx-editor-vue__title-bar-right" }, Ui = /* @__PURE__ */ I({
693
+ }, Vi = { class: "docx-editor-vue__title-bar-left" }, Hi = { class: "docx-editor-vue__title-bar-center" }, Ui = { class: "docx-editor-vue__title-bar-right" }, Wi = /* @__PURE__ */ I({
694
694
  __name: "DocxEditorMenuBar",
695
695
  props: {
696
696
  showMenuBar: {
@@ -722,9 +722,9 @@ var ki = ["aria-label"], Ai = {
722
722
  ],
723
723
  setup(e, { emit: t }) {
724
724
  let n = t;
725
- return (t, r) => e.showMenuBar ? (V(), N("div", zi, [
726
- P("div", Bi, [Me(t.$slots, "title-bar-left")]),
727
- P("div", Vi, [F(_, {
725
+ return (t, r) => e.showMenuBar ? (V(), N("div", Bi, [
726
+ P("div", Vi, [Me(t.$slots, "title-bar-left")]),
727
+ P("div", Hi, [F(_, {
728
728
  "model-value": e.documentName,
729
729
  editable: e.documentNameEditable,
730
730
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -739,28 +739,28 @@ var ki = ["aria-label"], Ai = {
739
739
  "show-help-menu",
740
740
  "show-table-insert"
741
741
  ])]),
742
- P("div", Hi, [Me(t.$slots, "title-bar-right")])
742
+ P("div", Ui, [Me(t.$slots, "title-bar-right")])
743
743
  ])) : M("", !0);
744
744
  }
745
- }), Wi = ["aria-label"], Gi = { class: "image-ctx-menu__icon" }, Ki = { class: "image-ctx-menu__label" }, qi = {
745
+ }), Gi = ["aria-label"], Ki = { class: "image-ctx-menu__icon" }, qi = { class: "image-ctx-menu__label" }, Ji = {
746
746
  key: 1,
747
747
  class: "image-ctx-menu__divider",
748
748
  role: "separator"
749
- }, Ji = [
749
+ }, Yi = [
750
750
  "data-wrap-type",
751
751
  "data-current",
752
752
  "data-disabled",
753
753
  "disabled",
754
754
  "title",
755
755
  "onClick"
756
- ], Yi = { class: "image-ctx-menu__icon" }, Xi = { class: "image-ctx-menu__label" }, Zi = ["aria-label"], Qi = ["disabled", "onClick"], $i = { class: "image-ctx-menu__label" }, ea = {
756
+ ], Xi = { class: "image-ctx-menu__icon" }, Zi = { class: "image-ctx-menu__label" }, Qi = ["aria-label"], $i = ["disabled", "onClick"], ea = { class: "image-ctx-menu__label" }, ta = {
757
757
  key: 0,
758
758
  class: "image-ctx-menu__shortcut"
759
- }, ta = {
759
+ }, na = {
760
760
  key: 0,
761
761
  class: "image-ctx-menu__divider",
762
762
  role: "separator"
763
- }, na = 18, ra = 260, ia = 10, aa = /*#__PURE__*/ t(/* @__PURE__ */ I({
763
+ }, ra = 18, ia = 260, aa = 10, oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
764
764
  __name: "ImageContextMenu",
765
765
  props: {
766
766
  state: {},
@@ -781,7 +781,7 @@ var ki = ["aria-label"], Ai = {
781
781
  function o() {
782
782
  a("open-properties"), a("close");
783
783
  }
784
- let { t: s } = r(), c = Oi(), l = Lt, u = k(() => n.state ? zt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
784
+ let { t: s } = r(), c = ki(), l = zt, u = k(() => n.state ? Vt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
785
785
  inline: "wrap_text",
786
786
  squareLeft: "format_image_left",
787
787
  squareRight: "format_image_right",
@@ -793,17 +793,17 @@ var ki = ["aria-label"], Ai = {
793
793
  }
794
794
  let p = k(() => {
795
795
  if (!n.state) return {};
796
- let e = Lt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
797
- return typeof window < "u" && (t + ra > window.innerWidth && (t = window.innerWidth - ra - ia), r + e > window.innerHeight && (r = window.innerHeight - e - ia), t < ia && (t = ia), r < ia && (r = ia)), {
796
+ let e = zt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
797
+ return typeof window < "u" && (t + ia > window.innerWidth && (t = window.innerWidth - ia - aa), r + e > window.innerHeight && (r = window.innerHeight - e - aa), t < aa && (t = aa), r < aa && (r = aa)), {
798
798
  position: "fixed",
799
799
  left: `${t}px`,
800
800
  top: `${r}px`,
801
- minWidth: `${ra}px`,
801
+ minWidth: `${ia}px`,
802
802
  zIndex: 400
803
803
  };
804
804
  });
805
805
  function m(e) {
806
- return n.state ? Vt(e, n.state.currentWrapType) : !1;
806
+ return n.state ? Ut(e, n.state.currentWrapType) : !1;
807
807
  }
808
808
  function h(e) {
809
809
  m(e) && (a("select", e.choice), a("close"));
@@ -840,11 +840,11 @@ var ki = ["aria-label"], Ai = {
840
840
  "data-action": "open-properties",
841
841
  onMousedown: n[1] ||= q(() => {}, ["prevent"]),
842
842
  onClick: o
843
- }, [P("span", Gi, [F(i, {
843
+ }, [P("span", Ki, [F(i, {
844
844
  name: "settings",
845
- size: na
846
- })]), P("span", Ki, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
847
- e.canOpenProperties ? (V(), N("div", qi)) : M("", !0),
845
+ size: ra
846
+ })]), P("span", qi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
847
+ e.canOpenProperties ? (V(), N("div", Ji)) : M("", !0),
848
848
  (V(!0), N(D, null, U(G(l), (e) => (V(), N("button", {
849
849
  key: e.choice,
850
850
  type: "button",
@@ -858,17 +858,17 @@ var ki = ["aria-label"], Ai = {
858
858
  onMousedown: n[2] ||= q(() => {}, ["prevent"]),
859
859
  onClick: (t) => h(e)
860
860
  }, [
861
- P("span", Yi, [F(i, {
861
+ P("span", Xi, [F(i, {
862
862
  name: f(e.iconHint),
863
- size: na
863
+ size: ra
864
864
  }, null, 8, ["name"])]),
865
- P("span", Xi, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
865
+ P("span", Zi, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
866
866
  e.choice === u.value ? (V(), N("span", {
867
867
  key: 0,
868
868
  class: "image-ctx-menu__current-dot",
869
869
  "aria-label": G(s)("imageWrap.menu.ariaLabel")
870
- }, "●", 8, Zi)) : M("", !0)
871
- ], 42, Ji))), 128)),
870
+ }, "●", 8, Qi)) : M("", !0)
871
+ ], 42, Yi))), 128)),
872
872
  e.textActions && e.textActions.length > 0 ? (V(), N(D, { key: 2 }, [n[5] ||= P("div", {
873
873
  class: "image-ctx-menu__divider",
874
874
  role: "separator"
@@ -879,16 +879,16 @@ var ki = ["aria-label"], Ai = {
879
879
  disabled: e.disabled,
880
880
  onMousedown: n[3] ||= q(() => {}, ["prevent"]),
881
881
  onClick: (t) => g(e)
882
- }, [P("span", $i, W(e.label), 1), e.shortcut ? (V(), N("span", ea, W(e.shortcut), 1)) : M("", !0)], 40, Qi), e.dividerAfter ? (V(), N("div", ta)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
883
- ], 46, Wi)) : M("", !0)]));
882
+ }, [P("span", ea, W(e.label), 1), e.shortcut ? (V(), N("span", ta, W(e.shortcut), 1)) : M("", !0)], 40, $i), e.dividerAfter ? (V(), N("div", na)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
883
+ ], 46, Gi)) : M("", !0)]));
884
884
  }
885
- }), [["__scopeId", "data-v-fc8f35bc"]]), oa = ["disabled", "onMousedown"], sa = {
885
+ }), [["__scopeId", "data-v-fc8f35bc"]]), sa = ["disabled", "onMousedown"], ca = {
886
886
  key: 0,
887
887
  class: "ctx-menu__icon"
888
- }, ca = { class: "ctx-menu__label" }, la = {
888
+ }, la = { class: "ctx-menu__label" }, ua = {
889
889
  key: 1,
890
890
  class: "ctx-menu__shortcut"
891
- }, ua = 220, da = 32, fa = 10, pa = /*#__PURE__*/ t(/* @__PURE__ */ I({
891
+ }, da = 220, fa = 32, pa = 10, ma = /*#__PURE__*/ t(/* @__PURE__ */ I({
892
892
  __name: "TextContextMenu",
893
893
  props: {
894
894
  isOpen: { type: Boolean },
@@ -905,7 +905,7 @@ var ki = ["aria-label"], Ai = {
905
905
  setup(e, { emit: t }) {
906
906
  let n = e, i = ({ node: e }) => e;
907
907
  i.props = ["node"];
908
- let a = t, { t: o } = r(), s = Oi(), c = H(null), l = k(() => {
908
+ let a = t, { t: o } = r(), s = ki(), c = H(null), l = k(() => {
909
909
  let e = [], t = n.customItems ?? [];
910
910
  for (let [n, r] of t.entries()) e.push({
911
911
  id: `custom-${r.id}`,
@@ -1041,8 +1041,8 @@ var ki = ["aria-label"], Ai = {
1041
1041
  action: "deleteTable"
1042
1042
  }), e;
1043
1043
  }), u = k(() => {
1044
- 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 * da + i * 9;
1045
- return typeof window < "u" && (e + ua + fa > window.innerWidth && (e = window.innerWidth - ua - fa), t + a + fa > window.innerHeight && (t = window.innerHeight - a - fa)), {
1044
+ 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 * fa + i * 9;
1045
+ return typeof window < "u" && (e + da + pa > window.innerWidth && (e = window.innerWidth - da - pa), t + a + pa > window.innerHeight && (t = window.innerHeight - a - pa)), {
1046
1046
  position: "fixed",
1047
1047
  left: `${e}px`,
1048
1048
  top: `${t}px`,
@@ -1080,12 +1080,12 @@ var ki = ["aria-label"], Ai = {
1080
1080
  disabled: e.disabled,
1081
1081
  onMousedown: q((t) => d(e.action), ["prevent"])
1082
1082
  }, [
1083
- e.icon ? (V(), N("span", sa, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1084
- P("span", ca, W(e.label), 1),
1085
- e.shortcut ? (V(), N("span", la, W(e.shortcut), 1)) : M("", !0)
1086
- ], 42, oa))), 128))], 38)) : M("", !0)]));
1083
+ e.icon ? (V(), N("span", ca, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1084
+ P("span", la, W(e.label), 1),
1085
+ e.shortcut ? (V(), N("span", ua, W(e.shortcut), 1)) : M("", !0)
1086
+ ], 42, sa))), 128))], 38)) : M("", !0)]));
1087
1087
  }
1088
- }), [["__scopeId", "data-v-c1416e84"]]), ma = /* @__PURE__ */ I({
1088
+ }), [["__scopeId", "data-v-c1416e84"]]), ha = /* @__PURE__ */ I({
1089
1089
  __name: "DocxEditorOverlays",
1090
1090
  props: {
1091
1091
  readOnly: { type: Boolean },
@@ -1104,7 +1104,7 @@ var ki = ["aria-label"], Ai = {
1104
1104
  ],
1105
1105
  setup(e, { emit: t }) {
1106
1106
  let n = t;
1107
- return (t, r) => (V(), N(D, null, [F(pa, {
1107
+ return (t, r) => (V(), N(D, null, [F(ma, {
1108
1108
  "is-open": e.contextMenu.isOpen,
1109
1109
  position: e.contextMenu.position,
1110
1110
  "has-selection": e.contextMenu.hasSelection,
@@ -1126,7 +1126,7 @@ var ki = ["aria-label"], Ai = {
1126
1126
  "can-merge-cells",
1127
1127
  "can-split-cell",
1128
1128
  "custom-items"
1129
- ]), F(aa, {
1129
+ ]), F(oa, {
1130
1130
  state: e.imageContextMenu,
1131
1131
  "text-actions": e.imageContextMenuTextActions,
1132
1132
  "can-open-properties": e.canOpenImageProperties,
@@ -1143,7 +1143,7 @@ var ki = ["aria-label"], Ai = {
1143
1143
  });
1144
1144
  //#endregion
1145
1145
  //#region src/composables/imageOverlayRect.ts
1146
- function ha(e) {
1146
+ function ga(e) {
1147
1147
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
1148
1148
  return {
1149
1149
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -1154,13 +1154,13 @@ function ha(e) {
1154
1154
  }
1155
1155
  //#endregion
1156
1156
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
1157
- var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1157
+ var _a = ["data-handle", "onMousedown"], va = ["title"], ya = {
1158
1158
  key: 0,
1159
1159
  class: "image-overlay__dim"
1160
- }, ya = {
1160
+ }, ba = {
1161
1161
  key: 1,
1162
1162
  class: "image-overlay__dim image-overlay__dim--rotate"
1163
- }, ba = 4, xa = 15, Sa = 250, Ca = 700, wa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1163
+ }, xa = 4, Sa = 15, Ca = 250, wa = 700, Ta = /*#__PURE__*/ t(/* @__PURE__ */ I({
1164
1164
  __name: "ImageSelectionOverlay",
1165
1165
  props: {
1166
1166
  imageInfo: {},
@@ -1198,8 +1198,8 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1198
1198
  if (e.element.isConnected) return e.element;
1199
1199
  let t = re();
1200
1200
  if (!t) return null;
1201
- let n = Qt(t, e.pmPos);
1202
- return n ? Bt(n) : null;
1201
+ let n = en(t, e.pmPos);
1202
+ return n ? Ht(n) : null;
1203
1203
  }
1204
1204
  function S() {
1205
1205
  let e = ie();
@@ -1213,7 +1213,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1213
1213
  return;
1214
1214
  }
1215
1215
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
1216
- p.value = ha({
1216
+ p.value = ga({
1217
1217
  imageRect: r,
1218
1218
  parentRect: n,
1219
1219
  scrollLeft: t.scrollLeft,
@@ -1231,10 +1231,10 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1231
1231
  let o = a - r;
1232
1232
  S();
1233
1233
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
1234
- n = c === t ? n + 1 : 0, t = c, !(o >= Sa && n >= 2) && o < Ca && (e = requestAnimationFrame(i));
1234
+ n = c === t ? n + 1 : 0, t = c, !(o >= Ca && n >= 2) && o < wa && (e = requestAnimationFrame(i));
1235
1235
  };
1236
1236
  e = requestAnimationFrame(i);
1237
- let a = setTimeout(S, Sa);
1237
+ let a = setTimeout(S, Ca);
1238
1238
  oe = () => {
1239
1239
  cancelAnimationFrame(e), clearTimeout(a);
1240
1240
  };
@@ -1359,7 +1359,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1359
1359
  !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", fe), document.addEventListener("mouseup", w));
1360
1360
  }
1361
1361
  function fe(e) {
1362
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = qt(m, n, r, _, v, a);
1362
+ let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Yt(m, n, r, _, v, a);
1363
1363
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1364
1364
  let s = y;
1365
1365
  if (s) {
@@ -1379,7 +1379,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1379
1379
  S();
1380
1380
  return;
1381
1381
  }
1382
- let n = Xt(e, t.pmPos, u.value, d.value);
1382
+ let n = Qt(e, t.pmPos, u.value, d.value);
1383
1383
  n !== null && Ce(n), ke(() => S());
1384
1384
  }
1385
1385
  let pe = 0, me = 0, he = 0, ge = 0, T = null, E = null;
@@ -1402,7 +1402,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1402
1402
  }
1403
1403
  function xe(e) {
1404
1404
  let t = ye(e.clientX, e.clientY) - he, n = ge + t;
1405
- e.shiftKey || (n = Math.round(n / xa) * xa), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
1405
+ e.shiftKey || (n = Math.round(n / Sa) * Sa), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
1406
1406
  }
1407
1407
  function Se() {
1408
1408
  document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Se), l.value = !1, a("interact-end");
@@ -1423,7 +1423,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1423
1423
  if (!i.imageInfo || !p.value) return;
1424
1424
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1425
1425
  let s = e.clientX - t, l = e.clientY - n;
1426
- if (!(!o && Math.sqrt(s * s + l * l) < ba)) {
1426
+ if (!(!o && Math.sqrt(s * s + l * l) < xa)) {
1427
1427
  if (!o) {
1428
1428
  o = !0, c.value = !0, a("interact-start"), O = document.createElement("div"), O.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);";
1429
1429
  let e = i.zoom;
@@ -1445,7 +1445,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1445
1445
  let a = te(n, r.pmPos);
1446
1446
  if (!a) return;
1447
1447
  let s;
1448
- if (Zt(a)) {
1448
+ if ($t(a)) {
1449
1449
  let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1450
1450
  if (!a || a.length === 0) return;
1451
1451
  let c = null;
@@ -1461,21 +1461,21 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1461
1461
  c = e ? e.querySelector(".layout-page-content") : null;
1462
1462
  }
1463
1463
  if (!c) return;
1464
- let l = c.getBoundingClientRect(), u = i.zoom, d = It((e - l.left) / u), f = It((t - l.top) / u);
1465
- s = Jt(n, r.pmPos, d, f);
1464
+ let l = c.getBoundingClientRect(), u = i.zoom, d = Rt((e - l.left) / u), f = Rt((t - l.top) / u);
1465
+ s = Xt(n, r.pmPos, d, f);
1466
1466
  } else {
1467
1467
  let i = re();
1468
1468
  if (!i) return;
1469
- let a = Gt(i, e, t, 1);
1469
+ let a = qt(i, e, t, 1);
1470
1470
  if (a == null || a < 0) return;
1471
- s = Yt(n, r.pmPos, a);
1471
+ s = Zt(n, r.pmPos, a);
1472
1472
  }
1473
1473
  s !== null && Ce(s), ke(() => S());
1474
1474
  }
1475
1475
  function Ce(e) {
1476
1476
  let t = i.view;
1477
1477
  if (t) try {
1478
- let n = Pt.create(t.state.doc, e);
1478
+ let n = It.create(t.state.doc, e);
1479
1479
  t.dispatch(t.state.tr.setSelection(n));
1480
1480
  } catch {}
1481
1481
  }
@@ -1502,19 +1502,19 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1502
1502
  style: R(e.style),
1503
1503
  "data-handle": e.pos,
1504
1504
  onMousedown: q((t) => de(t, e.pos), ["prevent", "stop"])
1505
- }, null, 44, ga))), 128)),
1505
+ }, null, 44, _a))), 128)),
1506
1506
  r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
1507
1507
  P("div", {
1508
1508
  class: "image-overlay__rotate-handle",
1509
1509
  style: R({ left: `${C.value / 2 - 7}px` }),
1510
1510
  title: G(n)("imageOverlay.rotate"),
1511
1511
  onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
1512
- }, null, 44, _a),
1513
- s.value ? (V(), N("div", va, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1514
- l.value ? (V(), N("div", ya, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1512
+ }, null, 44, va),
1513
+ s.value ? (V(), N("div", ya, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1514
+ l.value ? (V(), N("div", ba, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1515
1515
  ], 36)) : M("", !0);
1516
1516
  }
1517
- }), [["__scopeId", "data-v-4c3d1a1d"]]), Ta = /* @__PURE__ */ I({
1517
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), Ea = /* @__PURE__ */ I({
1518
1518
  __name: "HeaderFooterSelectionOverlay",
1519
1519
  props: {
1520
1520
  pagesContainer: {},
@@ -1524,11 +1524,11 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1524
1524
  zoom: {}
1525
1525
  },
1526
1526
  setup(e) {
1527
- let t = e, n = new rn(), r = () => {
1527
+ let t = e, n = new on(), r = () => {
1528
1528
  if (!t.pagesContainer) return;
1529
1529
  n.sync(t.pagesContainer, t.selection, t.zoom);
1530
1530
  let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
1531
- tn({
1531
+ rn({
1532
1532
  hiddenHost: t.hiddenContainer,
1533
1533
  editorView: t.editorView,
1534
1534
  visibleCaret: e ? {
@@ -1538,8 +1538,8 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1538
1538
  });
1539
1539
  };
1540
1540
  K(() => t.pagesContainer, (e, t, i) => {
1541
- e && (e.addEventListener(nn, r), r(), i(() => {
1542
- e.removeEventListener(nn, r), n.clear(e);
1541
+ e && (e.addEventListener(an, r), r(), i(() => {
1542
+ e.removeEventListener(an, r), n.clear(e);
1543
1543
  }));
1544
1544
  }, { immediate: !0 }), K(() => [
1545
1545
  t.selection?.rId,
@@ -1561,10 +1561,10 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1561
1561
  });
1562
1562
  }, o = typeof window > "u" ? null : window;
1563
1563
  return o?.addEventListener("scroll", a, !0), B(() => {
1564
- i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), en(t.hiddenContainer);
1564
+ i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), nn(t.hiddenContainer);
1565
1565
  }), (e, t) => null;
1566
1566
  }
1567
- }), Ea = { class: "hf-editor-label" }, Da = /*#__PURE__*/ t(/* @__PURE__ */ I({
1567
+ }), Da = { class: "hf-editor-label" }, Oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1568
1568
  __name: "InlineHeaderFooterEditor",
1569
1569
  props: {
1570
1570
  edit: {},
@@ -1607,7 +1607,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1607
1607
  class: "hf-inline-editor",
1608
1608
  style: R(l.value),
1609
1609
  role: "presentation"
1610
- }, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", Ea, W(c.value), 1), P("div", {
1610
+ }, [P("div", { class: L(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", Da, W(c.value), 1), P("div", {
1611
1611
  class: "hf-options",
1612
1612
  onMousedown: n[5] ||= q(() => {}, ["stop"])
1613
1613
  }, [F(G(a), {
@@ -1657,7 +1657,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1657
1657
  })
1658
1658
  ], 2)) : M("", !0)], 32)], 2)], 4));
1659
1659
  }
1660
- }), [["__scopeId", "data-v-a0bd3730"]]), Oa = ["title", "aria-label"], ka = /* @__PURE__ */ I({
1660
+ }), [["__scopeId", "data-v-a0bd3730"]]), ka = ["title", "aria-label"], Aa = /* @__PURE__ */ I({
1661
1661
  __name: "OutlineToggleButton",
1662
1662
  props: {
1663
1663
  leftOffset: {},
@@ -1680,9 +1680,9 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1680
1680
  }, [F(i, {
1681
1681
  name: "format_list_bulleted",
1682
1682
  size: 20
1683
- })], 44, Oa));
1683
+ })], 44, ka));
1684
1684
  }
1685
- }), Aa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1685
+ }), ja = /*#__PURE__*/ t(/* @__PURE__ */ I({
1686
1686
  __name: "PageIndicator",
1687
1687
  props: {
1688
1688
  currentPage: {},
@@ -1701,7 +1701,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1701
1701
  total: e.totalPages
1702
1702
  })), 5));
1703
1703
  }
1704
- }), [["__scopeId", "data-v-f1904974"]]), ja = ["data-folio-block-id"], Ma = ["data-folio-block-id", "title"], Na = 2.5, Pa = 5, Fa = 6, Ia = 2, La = 2, Ra = /*#__PURE__*/ t(/* @__PURE__ */ I({
1704
+ }), [["__scopeId", "data-v-f1904974"]]), Ma = ["data-folio-block-id"], Na = ["data-folio-block-id", "title"], Pa = 2.5, Fa = 5, Ia = 6, La = 2, Ra = 2, za = /*#__PURE__*/ t(/* @__PURE__ */ I({
1705
1705
  __name: "TemplateDirectivesOverlay",
1706
1706
  props: {
1707
1707
  getView: { type: Function },
@@ -1715,19 +1715,19 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1715
1715
  setup(e) {
1716
1716
  let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
1717
1717
  function a(e) {
1718
- let t = e - Fa - Na - Ia;
1719
- return t <= 0 ? 0 : Math.floor(t / Pa);
1718
+ let t = e - Ia - Pa - La;
1719
+ return t <= 0 ? 0 : Math.floor(t / Fa);
1720
1720
  }
1721
1721
  function o(e, t, n) {
1722
1722
  let r = a(n), i = Math.min(Math.max(0, e), r);
1723
- return t - Fa - Na - (r - i) * Pa;
1723
+ return t - Ia - Pa - (r - i) * Fa;
1724
1724
  }
1725
1725
  function s(e, t) {
1726
- if (t.length === 0) return e.bottom - e.top >= La ? [e] : [];
1726
+ if (t.length === 0) return e.bottom - e.top >= Ra ? [e] : [];
1727
1727
  let n = [];
1728
1728
  for (let r of t) {
1729
1729
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1730
- i - t >= La && n.push({
1730
+ i - t >= Ra && n.push({
1731
1731
  top: t,
1732
1732
  bottom: i
1733
1733
  });
@@ -1792,7 +1792,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1792
1792
  }
1793
1793
  return i;
1794
1794
  }
1795
- let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ = pt(), v = null;
1795
+ let f = H([]), p = H([]), m = H(null), h = H(null), g = H(null), _ = ht(), v = null;
1796
1796
  function y() {
1797
1797
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1798
1798
  v = null, b();
@@ -1804,12 +1804,12 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1804
1804
  f.value = [], p.value = [], m.value = null, h.value = null;
1805
1805
  return;
1806
1806
  }
1807
- let a = on(i);
1807
+ let a = cn(i);
1808
1808
  if (a.length === 0) {
1809
1809
  f.value = [], p.value = [], m.value = null, h.value = null;
1810
1810
  return;
1811
1811
  }
1812
- let o = mt(r, t.zoom), s = await ht(a, {
1812
+ let o = gt(r, t.zoom), s = await _t(a, {
1813
1813
  pagesContainer: r,
1814
1814
  zoom: t.zoom,
1815
1815
  layout: t.layout,
@@ -1889,10 +1889,10 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1889
1889
  position: "absolute",
1890
1890
  left: `${t.railX * e.zoom}px`,
1891
1891
  top: `${n.top * e.zoom}px`,
1892
- width: `${Na * e.zoom}px`,
1892
+ width: `${Pa * e.zoom}px`,
1893
1893
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1894
1894
  })
1895
- }, null, 14, ja))), 128))], 64))), 128)), (V(!0), N(D, null, U(p.value, (t, n) => (V(), N(D, { key: `d:${n}` }, [(V(!0), N(D, null, U(t.rects, (r, i) => (V(), N("span", {
1895
+ }, null, 14, Ma))), 128))], 64))), 128)), (V(!0), N(D, null, U(p.value, (t, n) => (V(), N(D, { key: `d:${n}` }, [(V(!0), N(D, null, U(t.rects, (r, i) => (V(), N("span", {
1896
1896
  key: `d:${n}:${i}`,
1897
1897
  class: L(se(t.range)),
1898
1898
  "data-folio-block-id": S(t.range),
@@ -1904,14 +1904,14 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1904
1904
  width: `${(r.width + 2) * e.zoom}px`,
1905
1905
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1906
1906
  })
1907
- }, null, 14, Ma))), 128))], 64))), 128))], 32));
1907
+ }, null, 14, Na))), 128))], 64))), 128))], 32));
1908
1908
  }
1909
- }), [["__scopeId", "data-v-101928bf"]]), za = [
1909
+ }), [["__scopeId", "data-v-101928bf"]]), Ba = [
1910
1910
  "href",
1911
1911
  "rel",
1912
1912
  "target",
1913
1913
  "title"
1914
- ], Ba = ["title"], Va = ["title"], Ha = ["title"], Ua = { class: "docx-hyperlink-popup__edit-row" }, Wa = ["placeholder", "onKeydown"], Ga = { class: "docx-hyperlink-popup__edit-row" }, Ka = ["onKeydown"], qa = ["disabled"], Ja = /*#__PURE__*/ t(/* @__PURE__ */ I({
1914
+ ], Va = ["title"], Ha = ["title"], Ua = ["title"], Wa = { class: "docx-hyperlink-popup__edit-row" }, Ga = ["placeholder", "onKeydown"], Ka = { class: "docx-hyperlink-popup__edit-row" }, qa = ["onKeydown"], Ja = ["disabled"], Ya = /*#__PURE__*/ t(/* @__PURE__ */ I({
1915
1915
  __name: "HyperlinkPopup",
1916
1916
  props: {
1917
1917
  data: {},
@@ -1925,7 +1925,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1925
1925
  "close"
1926
1926
  ],
1927
1927
  setup(e, { emit: t }) {
1928
- let { t: n } = r(), i = fn(void 0), a = e, o = t, s = H(!1), c = H(""), l = H(""), u = H(null), d = k(() => ({
1928
+ let { t: n } = r(), i = mn(void 0), a = e, o = t, s = H(!1), c = H(""), l = H(""), u = H(null), d = k(() => ({
1929
1929
  left: (a.data?.position.left ?? 0) + "px",
1930
1930
  top: (a.data?.position.top ?? 0) + "px"
1931
1931
  }));
@@ -1960,21 +1960,21 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1960
1960
  class: L(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": s.value }]),
1961
1961
  style: R(d.value),
1962
1962
  onMousedown: r[6] ||= q(() => {}, ["stop"])
1963
- }, [s.value ? (V(), N(D, { key: 1 }, [P("div", Ua, [Le(P("input", {
1963
+ }, [s.value ? (V(), N(D, { key: 1 }, [P("div", Wa, [Le(P("input", {
1964
1964
  class: "docx-hyperlink-popup__input",
1965
1965
  placeholder: G(n)("displayText"),
1966
1966
  "onUpdate:modelValue": r[2] ||= (e) => c.value = e,
1967
1967
  onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
1968
- }, null, 40, Wa), [[Pe, c.value]])]), P("div", Ga, [Le(P("input", {
1968
+ }, null, 40, Ga), [[Pe, c.value]])]), P("div", Ka, [Le(P("input", {
1969
1969
  class: "docx-hyperlink-popup__input",
1970
1970
  placeholder: "https://...",
1971
1971
  "onUpdate:modelValue": r[4] ||= (e) => l.value = e,
1972
1972
  onKeydown: [Re(q(g, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
1973
- }, null, 40, Ka), [[Pe, l.value]]), P("button", {
1973
+ }, null, 40, qa), [[Pe, l.value]]), P("button", {
1974
1974
  class: "docx-hyperlink-popup__apply",
1975
1975
  disabled: !l.value.trim(),
1976
1976
  onClick: q(g, ["prevent"])
1977
- }, W(G(n)("common.apply")), 9, qa)])], 64)) : (V(), N(D, { key: 0 }, [
1977
+ }, W(G(n)("common.apply")), 9, Ja)])], 64)) : (V(), N(D, { key: 0 }, [
1978
1978
  r[10] ||= we("<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),
1979
1979
  P("a", {
1980
1980
  class: "docx-hyperlink-popup__url",
@@ -1983,7 +1983,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
1983
1983
  target: G(i).target,
1984
1984
  title: e.data.href,
1985
1985
  onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
1986
- }, W(e.data.href), 9, za),
1986
+ }, W(e.data.href), 9, Ba),
1987
1987
  r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1988
1988
  P("button", {
1989
1989
  class: "docx-hyperlink-popup__btn",
@@ -2005,7 +2005,7 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
2005
2005
  height: "13",
2006
2006
  rx: "2",
2007
2007
  ry: "2"
2008
- }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Ba),
2008
+ }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Va),
2009
2009
  e.readOnly ? M("", !0) : (V(), N("button", {
2010
2010
  key: 0,
2011
2011
  class: "docx-hyperlink-popup__btn",
@@ -2020,43 +2020,43 @@ var ga = ["data-handle", "onMousedown"], _a = ["title"], va = {
2020
2020
  "stroke-width": "2",
2021
2021
  "stroke-linecap": "round",
2022
2022
  "stroke-linejoin": "round"
2023
- }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, Va)),
2023
+ }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, Ha)),
2024
2024
  e.readOnly ? M("", !0) : (V(), N("button", {
2025
2025
  key: 1,
2026
2026
  class: "docx-hyperlink-popup__btn",
2027
2027
  title: G(n)("removeLink"),
2028
2028
  onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
2029
- }, [...r[9] ||= [we("<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, Ha))
2029
+ }, [...r[9] ||= [we("<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, Ua))
2030
2030
  ], 64))], 38)) : M("", !0);
2031
2031
  }
2032
2032
  }), [["__scopeId", "data-v-370ef571"]]);
2033
2033
  //#endregion
2034
2034
  //#region src/composables/commentMarks.ts
2035
- function Ya(e, t) {
2035
+ function Xa(e, t) {
2036
2036
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
2037
2037
  return n === r ? null : {
2038
2038
  from: n,
2039
2039
  to: r
2040
2040
  };
2041
2041
  }
2042
- function Xa({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2042
+ function Za({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2043
2043
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
2044
- return i ? Ya(e, i) : null;
2044
+ return i ? Xa(e, i) : null;
2045
2045
  }
2046
- function Za(e, t, n, r) {
2047
- let i = e.state.schema.marks.comment, a = Ya(e.state.doc.content.size, t);
2046
+ function Qa(e, t, n, r) {
2047
+ let i = e.state.schema.marks.comment, a = Xa(e.state.doc.content.size, t);
2048
2048
  if (!i || !a) return !1;
2049
2049
  let o = e.state.tr;
2050
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: hn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Ft.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2050
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: _n }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(Lt.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2051
2051
  }
2052
- function Qa(e, t) {
2053
- let n = e.state.schema.marks.comment, r = Ya(e.state.doc.content.size, t);
2054
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: hn })));
2052
+ function $a(e, t) {
2053
+ let n = e.state.schema.marks.comment, r = Xa(e.state.doc.content.size, t);
2054
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: _n })));
2055
2055
  }
2056
2056
  //#endregion
2057
2057
  //#region src/composables/useCommentLifecycle.ts
2058
- var $a = 408, eo = 12;
2059
- function to(e) {
2058
+ var eo = 408, to = 12;
2059
+ function no(e) {
2060
2060
  let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
2061
2061
  function o(t) {
2062
2062
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -2089,7 +2089,7 @@ function to(e) {
2089
2089
  r.value = null;
2090
2090
  return;
2091
2091
  }
2092
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + eo : l.width / 2 + $a;
2092
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + to : l.width / 2 + eo;
2093
2093
  r.value = {
2094
2094
  top: c.top - l.top,
2095
2095
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -2100,7 +2100,7 @@ function to(e) {
2100
2100
  function c() {
2101
2101
  let s = e.editorView.value;
2102
2102
  if (!s) return;
2103
- let c = r.value, l = s.state.selection, u = Xa({
2103
+ let c = r.value, l = s.state.selection, u = Za({
2104
2104
  docSize: s.state.doc.content.size,
2105
2105
  capturedRange: c ? {
2106
2106
  from: c.from,
@@ -2119,7 +2119,7 @@ function to(e) {
2119
2119
  r.value = null;
2120
2120
  return;
2121
2121
  }
2122
- if (!Za(s, u, hn, { selectEnd: !0 })) {
2122
+ if (!Qa(s, u, _n, { selectEnd: !0 })) {
2123
2123
  r.value = null, i.value = null;
2124
2124
  return;
2125
2125
  }
@@ -2132,11 +2132,11 @@ function to(e) {
2132
2132
  let n = e.editorView.value, r = i.value;
2133
2133
  if (!n || !r) return !1;
2134
2134
  let a = e.createComment(t);
2135
- return Za(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2135
+ return Qa(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2136
2136
  }
2137
2137
  function d() {
2138
2138
  let t = e.editorView.value;
2139
- t && i.value && Qa(t, i.value), l();
2139
+ t && i.value && $a(t, i.value), l();
2140
2140
  }
2141
2141
  return {
2142
2142
  isAddingComment: t,
@@ -2150,8 +2150,8 @@ function to(e) {
2150
2150
  }
2151
2151
  //#endregion
2152
2152
  //#region src/composables/useCommentManagement.ts
2153
- function no(e) {
2154
- let t = gn(), n = H([]), r = H(!1);
2153
+ function ro(e) {
2154
+ let t = vn(), n = H([]), r = H(!1);
2155
2155
  function i() {
2156
2156
  r.value = !0;
2157
2157
  }
@@ -2166,12 +2166,12 @@ function no(e) {
2166
2166
  i(), c([...s.value, e]);
2167
2167
  }
2168
2168
  function u(n, r, i) {
2169
- return _n(t, s.value, e.editorView.value), vn(t, n, i ?? e.author(), r);
2169
+ return yn(t, s.value, e.editorView.value), bn(t, n, i ?? e.author(), r);
2170
2170
  }
2171
2171
  function d() {
2172
2172
  if (a(), o.value) return;
2173
2173
  let n = e.getDocument()?.package.document.comments;
2174
- _n(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2174
+ yn(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2175
2175
  }
2176
2176
  function f(e, t) {
2177
2177
  l(u(t, e));
@@ -2196,7 +2196,7 @@ function no(e) {
2196
2196
  }
2197
2197
  function _(t, n) {
2198
2198
  let r = e.editorView.value;
2199
- r && (n ? yn : Cn)(t)(r.state, r.dispatch);
2199
+ r && (n ? xn : Tn)(t)(r.state, r.dispatch);
2200
2200
  }
2201
2201
  function v(e) {
2202
2202
  _(e, !0);
@@ -2206,11 +2206,11 @@ function no(e) {
2206
2206
  }
2207
2207
  function b(t, n) {
2208
2208
  let r = e.editorView.value;
2209
- r && bn(t, n)(r.state, r.dispatch);
2209
+ r && Q(t, n)(r.state, r.dispatch);
2210
2210
  }
2211
2211
  function x(t, n) {
2212
2212
  let r = e.editorView.value;
2213
- r && wn(t, n)(r.state, r.dispatch);
2213
+ r && En(t, n)(r.state, r.dispatch);
2214
2214
  }
2215
2215
  return {
2216
2216
  comments: s,
@@ -2233,8 +2233,8 @@ function no(e) {
2233
2233
  }
2234
2234
  //#endregion
2235
2235
  //#region src/utils/imageClipboard.ts
2236
- function ro(e, t, n) {
2237
- let r = En(e.state), i = e.state.schema.marks.insertion;
2236
+ function io(e, t, n) {
2237
+ let r = On(e.state), i = e.state.schema.marks.insertion;
2238
2238
  if (!r || !i) return;
2239
2239
  let a = t.selection.from, o = a - n.nodeSize;
2240
2240
  o < 0 || t.addMark(o, a, i.create({
@@ -2243,7 +2243,7 @@ function ro(e, t, n) {
2243
2243
  date: r.date
2244
2244
  }));
2245
2245
  }
2246
- function io(e, t) {
2246
+ function ao(e, t) {
2247
2247
  let n = e.state.doc.nodeAt(t);
2248
2248
  if (!n || n.type.name !== "image") return;
2249
2249
  let r = n.attrs.src;
@@ -2257,7 +2257,7 @@ function io(e, t) {
2257
2257
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
2258
2258
  });
2259
2259
  }
2260
- function ao(e) {
2260
+ function oo(e) {
2261
2261
  return new Promise((t, n) => {
2262
2262
  let r = new FileReader();
2263
2263
  r.onload = () => {
@@ -2265,7 +2265,7 @@ function ao(e) {
2265
2265
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
2266
2266
  });
2267
2267
  }
2268
- function oo(e) {
2268
+ function so(e) {
2269
2269
  return new Promise((t) => {
2270
2270
  let n = new Image();
2271
2271
  n.onload = () => t({
@@ -2277,7 +2277,7 @@ function oo(e) {
2277
2277
  }), n.src = e;
2278
2278
  });
2279
2279
  }
2280
- function so(e, t, n, r) {
2280
+ function co(e, t, n, r) {
2281
2281
  let i = e.state.schema.nodes.image;
2282
2282
  if (!i) return;
2283
2283
  let a = i.create({
@@ -2288,23 +2288,23 @@ function so(e, t, n, r) {
2288
2288
  wrapType: "inline",
2289
2289
  displayMode: "inline"
2290
2290
  }), o = e.state.tr.replaceSelectionWith(a);
2291
- ro(e, o, a), e.dispatch(o);
2291
+ io(e, o, a), e.dispatch(o);
2292
2292
  }
2293
- async function co(e) {
2293
+ async function lo(e) {
2294
2294
  try {
2295
2295
  let t = await navigator.clipboard.read();
2296
2296
  for (let n of t) {
2297
2297
  let t = n.types.find((e) => e.startsWith("image/"));
2298
2298
  if (t) {
2299
- let r = await ao(await n.getType(t)), i = await oo(r), a = i.width, o = i.height;
2300
- a > 612 && (o = Math.round(612 / a * o), a = 612), so(e, r, a, o);
2299
+ let r = await oo(await n.getType(t)), i = await so(r), a = i.width, o = i.height;
2300
+ a > 612 && (o = Math.round(612 / a * o), a = 612), co(e, r, a, o);
2301
2301
  return;
2302
2302
  }
2303
2303
  if (n.types.includes("text/html")) {
2304
2304
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
2305
2305
  if (r) {
2306
2306
  let n = /data-width="(?<w>\d+)"/u.exec(t)?.groups?.w, i = /data-height="(?<h>\d+)"/u.exec(t)?.groups?.h, a = n ? Number(n) : 200, o = i ? Number(i) : 200;
2307
- so(e, r, a || 200, o || 200);
2307
+ co(e, r, a || 200, o || 200);
2308
2308
  return;
2309
2309
  }
2310
2310
  }
@@ -2325,14 +2325,14 @@ async function co(e) {
2325
2325
  }
2326
2326
  }
2327
2327
  }
2328
- function lo(e, t) {
2328
+ function uo(e, t) {
2329
2329
  let n = e.state.doc.nodeAt(t);
2330
2330
  if (!n || n.type.name !== "image") return;
2331
2331
  let r = document.createElement("input");
2332
2332
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
2333
2333
  let i = r.files?.[0];
2334
2334
  if (!i) return;
2335
- let a = await ao(i), o = await oo(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
2335
+ let a = await oo(i), o = await so(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
2336
2336
  try {
2337
2337
  let r = e.state.tr.setNodeMarkup(t, void 0, {
2338
2338
  ...n.attrs,
@@ -2347,7 +2347,7 @@ function lo(e, t) {
2347
2347
  }
2348
2348
  //#endregion
2349
2349
  //#region src/composables/useContextMenus.ts
2350
- var uo = /* @__PURE__ */ new Set([
2350
+ var fo = /* @__PURE__ */ new Set([
2351
2351
  "inline",
2352
2352
  "square",
2353
2353
  "tight",
@@ -2356,16 +2356,16 @@ var uo = /* @__PURE__ */ new Set([
2356
2356
  "behind",
2357
2357
  "inFront"
2358
2358
  ]);
2359
- function fo(e) {
2360
- return typeof e == "string" && uo.has(e);
2361
- }
2362
2359
  function po(e) {
2363
- return fo(e) ? e : "inline";
2360
+ return typeof e == "string" && fo.has(e);
2364
2361
  }
2365
2362
  function mo(e) {
2366
- return e === "left" || e === "right" || e === "none" ? e : null;
2363
+ return po(e) ? e : "inline";
2367
2364
  }
2368
2365
  function ho(e) {
2366
+ return e === "left" || e === "right" || e === "none" ? e : null;
2367
+ }
2368
+ function go(e) {
2369
2369
  let { t } = r(), n = H({
2370
2370
  isOpen: !1,
2371
2371
  position: {
@@ -2407,7 +2407,7 @@ function ho(e) {
2407
2407
  t(e.state, (t) => e.dispatch(t), e);
2408
2408
  }
2409
2409
  function l(t, n, r, i, a) {
2410
- let o = i === "inline" ? Rt(t, e.zoom.value) : void 0;
2410
+ let o = i === "inline" ? Bt(t, e.zoom.value) : void 0;
2411
2411
  return {
2412
2412
  open: !0,
2413
2413
  position: r,
@@ -2420,12 +2420,12 @@ function ho(e) {
2420
2420
  function u(t) {
2421
2421
  let r = e.editorView.value;
2422
2422
  if (!r) return;
2423
- let o = Bt(t.target);
2423
+ let o = Ht(t.target);
2424
2424
  if (o) {
2425
2425
  let a = Number(o.dataset.pmStart);
2426
2426
  if (!Number.isNaN(a)) {
2427
2427
  try {
2428
- let e = Pt.create(r.state.doc, a);
2428
+ let e = It.create(r.state.doc, a);
2429
2429
  r.dispatch(r.state.tr.setSelection(e));
2430
2430
  } catch {}
2431
2431
  e.selectedImage.value = {
@@ -2439,7 +2439,7 @@ function ho(e) {
2439
2439
  i.value = l(o, a, {
2440
2440
  x: t.clientX,
2441
2441
  y: t.clientY
2442
- }, po(s.attrs.wrapType), mo(s.attrs.cssFloat)), n.value.isOpen = !1;
2442
+ }, mo(s.attrs.wrapType), ho(s.attrs.cssFloat)), n.value.isOpen = !1;
2443
2443
  return;
2444
2444
  }
2445
2445
  }
@@ -2474,7 +2474,7 @@ function ho(e) {
2474
2474
  !o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
2475
2475
  x: t.clientX,
2476
2476
  y: t.clientY
2477
- }, po(o.attrs.wrapType), mo(o.attrs.cssFloat)), n.value.isOpen = !1);
2477
+ }, mo(o.attrs.wrapType), ho(o.attrs.cssFloat)), n.value.isOpen = !1);
2478
2478
  }
2479
2479
  function f(t) {
2480
2480
  let n = e.editorView.value, r = i.value;
@@ -2498,16 +2498,16 @@ function ho(e) {
2498
2498
  case "cut":
2499
2499
  if (e.selectedImage.value) {
2500
2500
  let t = e.selectedImage.value.pmPos;
2501
- io(n, t);
2501
+ ao(n, t);
2502
2502
  let r = n.state.doc.nodeAt(t);
2503
2503
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
2504
2504
  } else n.focus(), document.execCommand("cut");
2505
2505
  break;
2506
2506
  case "copy":
2507
- e.selectedImage.value ? (io(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2507
+ e.selectedImage.value ? (ao(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2508
2508
  break;
2509
2509
  case "paste":
2510
- co(n).then(() => e.onPaste?.()).catch(() => void 0);
2510
+ lo(n).then(() => e.onPaste?.()).catch(() => void 0);
2511
2511
  break;
2512
2512
  case "pasteAsPlainText":
2513
2513
  navigator.clipboard.readText().then((t) => {
@@ -2528,7 +2528,7 @@ function ho(e) {
2528
2528
  e.selectedImage.value && (e.showImageProperties.value = !0);
2529
2529
  break;
2530
2530
  case "replaceImage":
2531
- e.selectedImage.value && lo(n, e.selectedImage.value.pmPos);
2531
+ e.selectedImage.value && uo(n, e.selectedImage.value.pmPos);
2532
2532
  break;
2533
2533
  case "deleteImage":
2534
2534
  if (e.selectedImage.value) {
@@ -2566,7 +2566,7 @@ function ho(e) {
2566
2566
  }
2567
2567
  //#endregion
2568
2568
  //#region src/composables/useDocumentLifecycle.ts
2569
- function go(e) {
2569
+ function _o(e) {
2570
2570
  async function t(t) {
2571
2571
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2572
2572
  }
@@ -2585,19 +2585,19 @@ function go(e) {
2585
2585
  }
2586
2586
  //#endregion
2587
2587
  //#region src/composables/useDocxEditorRefApi.ts
2588
- var _o = Date.now(), vo = async (e, t) => {
2588
+ var vo = Date.now(), yo = async (e, t) => {
2589
2589
  let n = await e.saveDocument(t);
2590
2590
  if (!n) return null;
2591
2591
  let r = await n.arrayBuffer();
2592
2592
  return e.clearCommentsDirty(), e.onSave?.(r), r;
2593
2593
  };
2594
- function yo(e) {
2594
+ function bo(e) {
2595
2595
  let t = [];
2596
2596
  function n() {
2597
2597
  e.onPrint?.(), window.print();
2598
2598
  }
2599
2599
  function r(t) {
2600
- return vo({
2600
+ return yo({
2601
2601
  clearCommentsDirty: e.clearCommentsDirty,
2602
2602
  onSave: e.onSave,
2603
2603
  saveDocument: e.saveDocument
@@ -2606,11 +2606,11 @@ function yo(e) {
2606
2606
  function i(t, n) {
2607
2607
  let r = e.pagesRef.value;
2608
2608
  if (!r) return !1;
2609
- let i = er(r, t), a = i.at(0);
2609
+ let i = nr(r, t), a = i.at(0);
2610
2610
  return a ? (a.scrollIntoView({
2611
2611
  block: "center",
2612
2612
  behavior: "smooth"
2613
- }), n?.highlight && tr(i, n.highlight), !0) : !1;
2613
+ }), n?.highlight && rr(i, n.highlight), !0) : !1;
2614
2614
  }
2615
2615
  function a() {
2616
2616
  return e.zoom.value;
@@ -2618,19 +2618,19 @@ function yo(e) {
2618
2618
  let o = null;
2619
2619
  function s() {
2620
2620
  let t = e.getActiveView();
2621
- return t ? un(t.state, t.dispatch) : !1;
2621
+ return t ? fn(t.state, t.dispatch) : !1;
2622
2622
  }
2623
2623
  function c() {
2624
2624
  let t = e.getActiveView();
2625
- return t ? ln(t.state, t.dispatch) : !1;
2625
+ return t ? dn(t.state, t.dispatch) : !1;
2626
2626
  }
2627
2627
  function l() {
2628
2628
  let t = e.getActiveView();
2629
- return t ? un(t.state) : !1;
2629
+ return t ? fn(t.state) : !1;
2630
2630
  }
2631
2631
  function u() {
2632
2632
  let t = e.getActiveView();
2633
- return t ? ln(t.state) : !1;
2633
+ return t ? dn(t.state) : !1;
2634
2634
  }
2635
2635
  function d() {
2636
2636
  let t = e.getActiveView();
@@ -2638,9 +2638,9 @@ function yo(e) {
2638
2638
  }
2639
2639
  function f(t) {
2640
2640
  let n = e.editorView.value, r = e.pagesRef.value, i = e.scrollRootRef.value;
2641
- return !n || !r || !i ? /* @__PURE__ */ new Map() : rr({
2641
+ return !n || !r || !i ? /* @__PURE__ */ new Map() : ar({
2642
2642
  blockIds: t,
2643
- snapshot: Kn(n.state.doc),
2643
+ snapshot: Jn(n.state.doc),
2644
2644
  pagesContainer: r,
2645
2645
  scrollRoot: i
2646
2646
  });
@@ -2650,7 +2650,7 @@ function yo(e) {
2650
2650
  }
2651
2651
  function m(t) {
2652
2652
  let n = e.pagesRef.value;
2653
- return n ? nr(n, t) : () => {};
2653
+ return n ? ir(n, t) : () => {};
2654
2654
  }
2655
2655
  function h() {
2656
2656
  return o ??= {
@@ -2680,7 +2680,7 @@ function yo(e) {
2680
2680
  getPageNumberForPmPos: (t) => {
2681
2681
  let n = e.layout.value;
2682
2682
  if (!n) return null;
2683
- let r = Dn(n, t);
2683
+ let r = kn(n, t);
2684
2684
  return r == null ? null : r + 1;
2685
2685
  },
2686
2686
  getBlockRect: p,
@@ -2695,7 +2695,7 @@ function yo(e) {
2695
2695
  function _() {
2696
2696
  let t = e.layout.value, n = e.editorView.value;
2697
2697
  if (!t || !n) return 0;
2698
- let r = Dn(t, n.state.selection.from);
2698
+ let r = kn(t, n.state.selection.from);
2699
2699
  return r == null ? 0 : r + 1;
2700
2700
  }
2701
2701
  function v(t) {
@@ -2730,10 +2730,10 @@ function yo(e) {
2730
2730
  ensureEditorView: () => e.editor.ensureView(),
2731
2731
  createAIEditSnapshot: () => {
2732
2732
  let t = e.editorView.value;
2733
- return t ? qn(t.state.doc, Ue(t.state)) : null;
2733
+ return t ? Yn(t.state.doc, Ue(t.state)) : null;
2734
2734
  },
2735
2735
  applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
2736
- Wn(r.version);
2736
+ Kn(r.version);
2737
2737
  let a = e.editorView.value;
2738
2738
  if (!a) {
2739
2739
  let e = "committed";
@@ -2743,11 +2743,11 @@ function yo(e) {
2743
2743
  reason: "unsupportedBlock"
2744
2744
  }));
2745
2745
  return {
2746
- version: Bn,
2746
+ version: Hn,
2747
2747
  status: e,
2748
2748
  applied: [],
2749
2749
  skipped: t,
2750
- issues: Xn(r.operations, t),
2750
+ issues: Qn(r.operations, t),
2751
2751
  receipts: [],
2752
2752
  undoHandle: null
2753
2753
  };
@@ -2757,9 +2757,9 @@ function yo(e) {
2757
2757
  let s = e.getComments(), c = {
2758
2758
  state: a.state,
2759
2759
  dispatch: (e) => {
2760
- a.dispatch(cn(e)), c.state = a.state;
2760
+ a.dispatch(un(e)), c.state = a.state;
2761
2761
  }
2762
- }, l = Un({
2762
+ }, l = Gn({
2763
2763
  view: c,
2764
2764
  snapshot: n,
2765
2765
  batch: r,
@@ -2767,7 +2767,7 @@ function yo(e) {
2767
2767
  createCommentId: (t) => e.createAIEditComment(t, i),
2768
2768
  createUndoHandle: () => ({
2769
2769
  type: "documentOperationUndo",
2770
- id: `vue-${String(_o++)}`
2770
+ id: `vue-${String(vo++)}`
2771
2771
  })
2772
2772
  });
2773
2773
  return l.undoHandle !== null && t.push({
@@ -2805,7 +2805,7 @@ function yo(e) {
2805
2805
  },
2806
2806
  applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
2807
2807
  let a = e.editorView.value;
2808
- return a ? Hn({
2808
+ return a ? Wn({
2809
2809
  view: a,
2810
2810
  snapshot: t,
2811
2811
  operations: n,
@@ -2822,26 +2822,26 @@ function yo(e) {
2822
2822
  },
2823
2823
  acceptAIEditOperation: (t) => {
2824
2824
  let n = e.editorView.value;
2825
- return n ? yn(t)(n.state, n.dispatch) : !1;
2825
+ return n ? xn(t)(n.state, n.dispatch) : !1;
2826
2826
  },
2827
2827
  rejectAIEditOperation: (t) => {
2828
2828
  let n = e.editorView.value;
2829
- return n ? Cn(t)(n.state, n.dispatch) : !1;
2829
+ return n ? Tn(t)(n.state, n.dispatch) : !1;
2830
2830
  },
2831
2831
  undo: s,
2832
2832
  redo: c,
2833
2833
  scrollToAIEditOperation: (t) => {
2834
2834
  let n = e.editorView.value;
2835
2835
  if (!n) return !1;
2836
- let r = xn(n.state, t);
2836
+ let r = $(n.state, t);
2837
2837
  if (!r) return !1;
2838
- let { from: i, to: a } = dr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2838
+ let { from: i, to: a } = pr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2839
2839
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2840
2840
  },
2841
2841
  scrollToBlock: (t, n) => {
2842
2842
  let r = e.editorView.value;
2843
2843
  if (!r) return !1;
2844
- let i = fr({
2844
+ let i = mr({
2845
2845
  blockId: t,
2846
2846
  doc: r.state.doc,
2847
2847
  snapshot: n
@@ -2853,7 +2853,7 @@ function yo(e) {
2853
2853
  highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
2854
2854
  let a = e.editorView.value;
2855
2855
  if (!a) return "none";
2856
- let o = mr({
2856
+ let o = gr({
2857
2857
  blockId: t,
2858
2858
  text: n,
2859
2859
  doc: a.state.doc,
@@ -2861,13 +2861,13 @@ function yo(e) {
2861
2861
  });
2862
2862
  if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
2863
2863
  e.setPassageHighlight(null);
2864
- let s = fr({
2864
+ let s = mr({
2865
2865
  blockId: t,
2866
2866
  doc: a.state.doc,
2867
2867
  snapshot: r
2868
2868
  });
2869
2869
  if (s === null) return "none";
2870
- let c = _r(t);
2870
+ let c = yr(t);
2871
2871
  if (c !== null && i(c, { highlight: {} })) return "block";
2872
2872
  let { from: l, to: u } = s, d = a.state.doc.resolve(l), f = a.state.doc.resolve(u);
2873
2873
  return a.dispatch(a.state.tr.setSelection(Z.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
@@ -2878,11 +2878,11 @@ function yo(e) {
2878
2878
  showInDocument: (t, n) => {
2879
2879
  let r = e.editorView.value;
2880
2880
  if (!r) return !1;
2881
- let i = t.type === "textRange" ? pr({
2881
+ let i = t.type === "textRange" ? hr({
2882
2882
  range: t,
2883
2883
  doc: r.state.doc,
2884
2884
  snapshot: n
2885
- }) : fr({
2885
+ }) : mr({
2886
2886
  blockId: t.blockId,
2887
2887
  doc: r.state.doc,
2888
2888
  snapshot: n
@@ -2893,7 +2893,7 @@ function yo(e) {
2893
2893
  },
2894
2894
  getSuggestions: () => {
2895
2895
  let t = e.editorView.value;
2896
- return t ? Sn(t.state) : [];
2896
+ return t ? wn(t.state) : [];
2897
2897
  },
2898
2898
  acceptSuggestion: (t, n) => {
2899
2899
  let r = e.editorView.value;
@@ -2901,7 +2901,7 @@ function yo(e) {
2901
2901
  accepted: !1,
2902
2902
  appliedAs: null
2903
2903
  };
2904
- let i = Sn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Q(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2904
+ let i = wn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = Sn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2905
2905
  return {
2906
2906
  accepted: a,
2907
2907
  appliedAs: a ? i : null
@@ -2909,23 +2909,23 @@ function yo(e) {
2909
2909
  },
2910
2910
  rejectSuggestion: (t) => {
2911
2911
  let n = e.editorView.value;
2912
- return n ? Tn(t)(n.state, n.dispatch) : !1;
2912
+ return n ? Dn(t)(n.state, n.dispatch) : !1;
2913
2913
  },
2914
2914
  scrollToSuggestion: (t) => {
2915
2915
  let n = e.editorView.value;
2916
2916
  if (!n) return !1;
2917
- let r = $(n.state, t);
2917
+ let r = Cn(n.state, t);
2918
2918
  if (!r) return !1;
2919
- let { from: i, to: a } = dr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2919
+ let { from: i, to: a } = pr(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2920
2920
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2921
2921
  },
2922
2922
  getTrackedChanges: () => {
2923
2923
  let t = e.editorView.value;
2924
- return t ? Zn(t.state.doc) : [];
2924
+ return t ? $n(t.state.doc) : [];
2925
2925
  },
2926
2926
  getCommentAnchors: () => {
2927
2927
  let t = e.editorView.value;
2928
- return t ? Yn(t.state.doc) : [];
2928
+ return t ? Zn(t.state.doc) : [];
2929
2929
  },
2930
2930
  getSelectionText: () => {
2931
2931
  let t = e.editorView.value;
@@ -2933,22 +2933,22 @@ function yo(e) {
2933
2933
  },
2934
2934
  getPageText: (t) => {
2935
2935
  let n = e.editorView.value;
2936
- return n ? br(e.layout.value, n.state.doc, t) : null;
2936
+ return n ? Sr(e.layout.value, n.state.doc, t) : null;
2937
2937
  },
2938
2938
  getTargetPage: (t, n) => {
2939
2939
  let r = e.editorView.value, i = e.layout.value;
2940
2940
  if (!r || !i) return null;
2941
- let a = t.type === "textRange" ? pr({
2941
+ let a = t.type === "textRange" ? hr({
2942
2942
  range: t,
2943
2943
  doc: r.state.doc,
2944
2944
  snapshot: n
2945
- }) : fr({
2945
+ }) : mr({
2946
2946
  blockId: t.blockId,
2947
2947
  doc: r.state.doc,
2948
2948
  snapshot: n
2949
2949
  });
2950
2950
  if (a === null) return null;
2951
- let o = Dn(i, a.from);
2951
+ let o = kn(i, a.from);
2952
2952
  return o == null ? null : o + 1;
2953
2953
  },
2954
2954
  getBlockRect: p,
@@ -2957,8 +2957,8 @@ function yo(e) {
2957
2957
  onLayoutChange: m,
2958
2958
  getContentControls: (t = {}) => {
2959
2959
  let n = e.editorView.value;
2960
- return n ? or(n.state.doc, t).map((e) => ({
2961
- properties: ir(e.node),
2960
+ return n ? cr(n.state.doc, t).map((e) => ({
2961
+ properties: or(e.node),
2962
2962
  path: e.path,
2963
2963
  pmPos: e.pos
2964
2964
  })) : [];
@@ -2966,7 +2966,7 @@ function yo(e) {
2966
2966
  scrollToContentControl: (t) => {
2967
2967
  let n = e.editorView.value;
2968
2968
  if (!n) return !1;
2969
- let r = ar(n.state.doc, t);
2969
+ let r = sr(n.state.doc, t);
2970
2970
  if (!r) return !1;
2971
2971
  let i = r.pos + 1, a = n.state.doc.resolve(i);
2972
2972
  return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
@@ -2974,54 +2974,54 @@ function yo(e) {
2974
2974
  setContentControlContent: (t, n, r = {}) => {
2975
2975
  let i = e.editorView.value;
2976
2976
  if (!i) return !1;
2977
- let a = typeof n == "string" ? cr(i.state, t, n, r) : ur(i.state, t, n, r);
2977
+ let a = typeof n == "string" ? ur(i.state, t, n, r) : fr(i.state, t, n, r);
2978
2978
  return a ? (i.dispatch(a), !0) : !1;
2979
2979
  },
2980
2980
  setContentControlValue: (t, n, r = {}) => {
2981
2981
  let i = e.editorView.value;
2982
2982
  if (!i) return !1;
2983
- let a = lr(i.state, t, n, r);
2983
+ let a = dr(i.state, t, n, r);
2984
2984
  return a ? (i.dispatch(a), !0) : !1;
2985
2985
  },
2986
2986
  removeContentControl: (t, n = {}) => {
2987
2987
  let r = e.editorView.value;
2988
2988
  if (!r) return !1;
2989
- let i = sr(r.state, t, n);
2989
+ let i = lr(r.state, t, n);
2990
2990
  return i ? (r.dispatch(i), !0) : !1;
2991
2991
  }
2992
2992
  } };
2993
2993
  }
2994
2994
  //#endregion
2995
2995
  //#region src/composables/useFormattingActions.ts
2996
- function bo(e) {
2996
+ function xo(e) {
2997
2997
  let t = () => e.activeView?.value ?? e.editorView.value;
2998
2998
  function n() {
2999
2999
  let e = t();
3000
- e && (dn(e.state, e.dispatch, e), e.focus());
3000
+ e && (pn(e.state, e.dispatch, e), e.focus());
3001
3001
  }
3002
3002
  function r(n) {
3003
3003
  let r = t();
3004
3004
  if (!r) return;
3005
3005
  let i = e.getDocument(), a = i?.package?.styles;
3006
3006
  if (a) {
3007
- let e = Be(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Er(i.package.numbering) : null };
3007
+ let e = Be(a), t = e.resolveParagraphStyle(n), o = { numbering: i?.package?.numbering ? Or(i.package.numbering) : null };
3008
3008
  t.paragraphFormatting && (o.paragraphFormatting = t.paragraphFormatting), t.runFormatting && (o.runFormatting = t.runFormatting);
3009
3009
  let s = e.getStyle(n)?.name;
3010
- s && (o.styleName = s), xr(n, o)(r.state, (e) => r.dispatch(e));
3011
- } else xr(n)(r.state, (e) => r.dispatch(e));
3010
+ s && (o.styleName = s), Cr(n, o)(r.state, (e) => r.dispatch(e));
3011
+ } else Cr(n)(r.state, (e) => r.dispatch(e));
3012
3012
  r.focus();
3013
3013
  }
3014
3014
  function i() {
3015
3015
  let t = e.editorView.value;
3016
- t && (Dr(t.state, (e) => t.dispatch(e), t), t.focus());
3016
+ t && (kr(t.state, (e) => t.dispatch(e), t), t.focus());
3017
3017
  }
3018
3018
  function a() {
3019
3019
  let t = e.editorView.value;
3020
- t && (kr(t.state, (e) => t.dispatch(e), t), t.focus());
3020
+ t && (jr(t.state, (e) => t.dispatch(e), t), t.focus());
3021
3021
  }
3022
3022
  function o() {
3023
3023
  let t = e.editorView.value;
3024
- t && (Or(t.state, (e) => t.dispatch(e), t), t.focus());
3024
+ t && (Ar(t.state, (e) => t.dispatch(e), t), t.focus());
3025
3025
  }
3026
3026
  function s(e) {
3027
3027
  let n = t();
@@ -3040,10 +3040,10 @@ function bo(e) {
3040
3040
  }
3041
3041
  //#endregion
3042
3042
  //#region src/utils/fontFaces.ts
3043
- function xo() {
3043
+ function So() {
3044
3044
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
3045
3045
  }
3046
- async function So(e, t, n, r) {
3046
+ async function Co(e, t, n, r) {
3047
3047
  let i;
3048
3048
  try {
3049
3049
  i = new FontFace(t, n, r), e.add(i);
@@ -3052,46 +3052,46 @@ async function So(e, t, n, r) {
3052
3052
  }
3053
3053
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
3054
3054
  }
3055
- function Co(e) {
3056
- let t = xo();
3055
+ function wo(e) {
3056
+ let t = So();
3057
3057
  if (t) for (let n of e) t.delete(n);
3058
3058
  }
3059
3059
  //#endregion
3060
3060
  //#region src/utils/embeddedFonts.ts
3061
- var wo = {
3061
+ var To = {
3062
3062
  faces: [],
3063
3063
  familyMap: /* @__PURE__ */ new Map()
3064
3064
  };
3065
- async function To(e) {
3066
- let t = xo();
3067
- if (!t) return wo;
3065
+ async function Eo(e) {
3066
+ let t = So();
3067
+ if (!t) return To;
3068
3068
  let n;
3069
3069
  try {
3070
- n = await Mr(e);
3070
+ n = await Pr(e);
3071
3071
  } catch {
3072
- return wo;
3072
+ return To;
3073
3073
  }
3074
3074
  return {
3075
- faces: (await Promise.all(n.map((e) => So(t, e.family, e.bytes, {
3075
+ faces: (await Promise.all(n.map((e) => Co(t, e.family, e.bytes, {
3076
3076
  weight: String(e.weight),
3077
3077
  style: e.style
3078
3078
  })))).filter((e) => e !== null),
3079
- familyMap: jr(n)
3079
+ familyMap: Nr(n)
3080
3080
  };
3081
3081
  }
3082
3082
  //#endregion
3083
3083
  //#region src/utils/hostFonts.ts
3084
- function Eo(e) {
3085
- return typeof e == "string" && e.trim().length > 0;
3086
- }
3087
3084
  function Do(e) {
3088
- return typeof e != "object" || !e ? !1 : Eo(Reflect.get(e, "family")) && Eo(Reflect.get(e, "src"));
3085
+ return typeof e == "string" && e.trim().length > 0;
3089
3086
  }
3090
3087
  function Oo(e) {
3088
+ return typeof e != "object" || !e ? !1 : Do(Reflect.get(e, "family")) && Do(Reflect.get(e, "src"));
3089
+ }
3090
+ function ko(e) {
3091
3091
  if (!e) return [];
3092
3092
  let t = [];
3093
3093
  for (let n of e) {
3094
- if (!Do(n)) continue;
3094
+ if (!Oo(n)) continue;
3095
3095
  let e = { display: "swap" };
3096
3096
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
3097
3097
  family: n.family.trim(),
@@ -3101,20 +3101,20 @@ function Oo(e) {
3101
3101
  }
3102
3102
  return t;
3103
3103
  }
3104
- async function ko(e) {
3105
- let t = xo();
3104
+ async function Ao(e) {
3105
+ let t = So();
3106
3106
  if (!t) return [];
3107
- let n = Oo(e);
3108
- return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => So(t, e, n, r)))).filter((e) => e !== null);
3107
+ let n = ko(e);
3108
+ return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => Co(t, e, n, r)))).filter((e) => e !== null);
3109
3109
  }
3110
3110
  //#endregion
3111
3111
  //#region src/composables/useFontLifecycle.ts
3112
- var Ao = {
3113
- loadEmbedded: To,
3114
- loadHost: ko,
3115
- remove: Co
3112
+ var jo = {
3113
+ loadEmbedded: Eo,
3114
+ loadHost: Ao,
3115
+ remove: wo
3116
3116
  };
3117
- function jo(e, t = Ao) {
3117
+ function Mo(e, t = jo) {
3118
3118
  K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3119
3119
  if (!n) return;
3120
3120
  let a = !1, o = [];
@@ -3123,9 +3123,9 @@ function jo(e, t = Ao) {
3123
3123
  t.remove(n);
3124
3124
  return;
3125
3125
  }
3126
- o = n, !(n.length === 0 && r.size === 0) && (Ar(r.size > 0 ? r : null), e.remeasure());
3126
+ o = n, !(n.length === 0 && r.size === 0) && (Mr(r.size > 0 ? r : null), e.remeasure());
3127
3127
  }), i(() => {
3128
- a = !0, t.remove(o), Ar(null);
3128
+ a = !0, t.remove(o), Mr(null);
3129
3129
  });
3130
3130
  }, { immediate: !0 }), K(e.fonts, (n, r, i) => {
3131
3131
  if (!n || n.length === 0) return;
@@ -3143,7 +3143,7 @@ function jo(e, t = Ao) {
3143
3143
  }
3144
3144
  //#endregion
3145
3145
  //#region src/composables/useHyperlinkManagement.ts
3146
- function Mo(e) {
3146
+ function No(e) {
3147
3147
  let t = H(null);
3148
3148
  function n(e, t) {
3149
3149
  t(e.state, (t) => e.dispatch(t), e);
@@ -3170,21 +3170,21 @@ function Mo(e) {
3170
3170
  r && n(t, r()), t.focus();
3171
3171
  }
3172
3172
  function a(e) {
3173
- let n = pn(e);
3173
+ let n = hn(e);
3174
3174
  if (!n) return;
3175
- let r = fn(void 0);
3176
- window.open(n, r.target, mn(r)), t.value = null;
3175
+ let r = mn(void 0);
3176
+ window.open(n, r.target, gn(r)), t.value = null;
3177
3177
  }
3178
3178
  function o(n, r) {
3179
3179
  let i = e.editorView.value;
3180
- i && (Nr(i, {
3180
+ i && (Fr(i, {
3181
3181
  displayText: n,
3182
3182
  href: r
3183
3183
  }), t.value = null, i.focus());
3184
3184
  }
3185
3185
  function s() {
3186
3186
  let n = e.editorView.value;
3187
- n && (Pr(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3187
+ n && (Ir(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3188
3188
  }
3189
3189
  return {
3190
3190
  hyperlinkPopupData: t,
@@ -3197,7 +3197,7 @@ function Mo(e) {
3197
3197
  }
3198
3198
  //#endregion
3199
3199
  //#region src/composables/useImageActions.ts
3200
- function No(e) {
3200
+ function Po(e) {
3201
3201
  let t = Ne(null), n = H(!1), r = k(() => {
3202
3202
  e.stateTick.value;
3203
3203
  let n = e.editorView.value, r = t.value;
@@ -3217,9 +3217,9 @@ function No(e) {
3217
3217
  function a(n) {
3218
3218
  let r = e.editorView.value, a = t.value;
3219
3219
  if (!r || !a) return;
3220
- let o = Ht(n);
3220
+ let o = Wt(n);
3221
3221
  if (!o) return;
3222
- let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: Rt(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3222
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: Bt(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
3223
3223
  c && (i(r, c(a.pmPos, o, s)), r.focus());
3224
3224
  }
3225
3225
  function o(n) {
@@ -3247,9 +3247,9 @@ function No(e) {
3247
3247
  }
3248
3248
  //#endregion
3249
3249
  //#region src/composables/useKeyboardShortcuts.ts
3250
- function Po(e) {
3250
+ function Fo(e) {
3251
3251
  function t(t) {
3252
- if (Fr(t, {
3252
+ if (at(t, {
3253
3253
  scope: e.scope(),
3254
3254
  roots: e.roots.map((e) => e.value)
3255
3255
  }) && (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey)) {
@@ -3265,10 +3265,10 @@ function Po(e) {
3265
3265
  }
3266
3266
  //#endregion
3267
3267
  //#region src/composables/useOutlineSidebar.ts
3268
- function Fo(e) {
3268
+ function Io(e) {
3269
3269
  function t() {
3270
3270
  let t = e.editorView.value;
3271
- t && (e.outlineHeadings.value = Ir(t.state.doc, He(t.state)));
3271
+ t && (e.outlineHeadings.value = Lr(t.state.doc, He(t.state)));
3272
3272
  }
3273
3273
  function n() {
3274
3274
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3299,7 +3299,7 @@ function Fo(e) {
3299
3299
  }
3300
3300
  //#endregion
3301
3301
  //#region src/composables/usePageSetupControls.ts
3302
- function Io(e) {
3302
+ function Lo(e) {
3303
3303
  function t(t) {
3304
3304
  if (e.readOnly.value) return;
3305
3305
  let n = e.getDocument();
@@ -3327,19 +3327,19 @@ function Io(e) {
3327
3327
  }
3328
3328
  function s(t) {
3329
3329
  let n = e.editorView.value;
3330
- n && wr(t)(n.state, n.dispatch);
3330
+ n && Er(t)(n.state, n.dispatch);
3331
3331
  }
3332
3332
  function c(t) {
3333
3333
  let n = e.editorView.value;
3334
- n && Tr(t)(n.state, n.dispatch);
3334
+ n && Dr(t)(n.state, n.dispatch);
3335
3335
  }
3336
3336
  function l(t) {
3337
3337
  let n = e.editorView.value;
3338
- n && (t < 0 ? Cr(-t, !0)(n.state, n.dispatch) : Cr(t, !1)(n.state, n.dispatch));
3338
+ n && (t < 0 ? Tr(-t, !0)(n.state, n.dispatch) : Tr(t, !1)(n.state, n.dispatch));
3339
3339
  }
3340
3340
  function u(t) {
3341
3341
  let n = e.editorView.value;
3342
- n && Sr(t)(n.state, n.dispatch);
3342
+ n && wr(t)(n.state, n.dispatch);
3343
3343
  }
3344
3344
  return {
3345
3345
  handlePageSetupApply: t,
@@ -3355,45 +3355,45 @@ function Io(e) {
3355
3355
  }
3356
3356
  //#endregion
3357
3357
  //#region src/utils/textSelection.ts
3358
- var Lo = /[\p{L}\p{N}\p{M}_''-]/u, Ro = /\s/;
3359
- function zo(e) {
3360
- return !e || e.length === 0 ? !1 : Lo.test(e);
3361
- }
3358
+ var Ro = /[\p{L}\p{N}\p{M}_''-]/u, zo = /\s/;
3362
3359
  function Bo(e) {
3363
3360
  return !e || e.length === 0 ? !1 : Ro.test(e);
3364
3361
  }
3365
- function Vo(e, t) {
3362
+ function Vo(e) {
3363
+ return !e || e.length === 0 ? !1 : zo.test(e);
3364
+ }
3365
+ function Ho(e, t) {
3366
3366
  if (!e || e.length === 0) return [0, 0];
3367
3367
  t = Math.max(0, Math.min(t, e.length - 1));
3368
3368
  let n = e[t];
3369
- if (Bo(n)) {
3369
+ if (Vo(n)) {
3370
3370
  let n = t, r = t;
3371
- for (; n > 0 && Bo(e[n - 1]);) n--;
3372
- for (; r < e.length && Bo(e[r]);) r++;
3371
+ for (; n > 0 && Vo(e[n - 1]);) n--;
3372
+ for (; r < e.length && Vo(e[r]);) r++;
3373
3373
  return [n, r];
3374
3374
  }
3375
- if (zo(n)) {
3375
+ if (Bo(n)) {
3376
3376
  let n = t, r = t;
3377
- for (; n > 0 && zo(e[n - 1]);) n--;
3378
- for (; r < e.length && zo(e[r]);) r++;
3377
+ for (; n > 0 && Bo(e[n - 1]);) n--;
3378
+ for (; r < e.length && Bo(e[r]);) r++;
3379
3379
  return [n, r];
3380
3380
  }
3381
3381
  return [t, t + 1];
3382
3382
  }
3383
3383
  //#endregion
3384
3384
  //#region src/utils/domQueries.ts
3385
- function Ho(e, t, n) {
3386
- let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : $t(e);
3385
+ function Uo(e, t, n) {
3386
+ let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : tn(e);
3387
3387
  for (let e of r) {
3388
3388
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
3389
3389
  if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
3390
3390
  }
3391
3391
  return null;
3392
3392
  }
3393
- function Uo(e, t, n) {
3393
+ function Wo(e, t, n) {
3394
3394
  if (!e || !t) return;
3395
- let r = Qt(e, n);
3396
- if (!r) for (let t of $t(e)) {
3395
+ let r = en(e, n);
3396
+ if (!r) for (let t of tn(e)) {
3397
3397
  let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
3398
3398
  if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
3399
3399
  r = t;
@@ -3407,21 +3407,21 @@ function Uo(e, t, n) {
3407
3407
  behavior: "smooth"
3408
3408
  });
3409
3409
  }
3410
- function Wo(e, t, n, r) {
3410
+ function Go(e, t, n, r) {
3411
3411
  if (!e || !t) return null;
3412
- let i = Gt(e, n, r, 1);
3412
+ let i = qt(e, n, r, 1);
3413
3413
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3414
3414
  }
3415
- function Go(e, t, n, r) {
3415
+ function Ko(e, t, n, r) {
3416
3416
  if (!e) return;
3417
- let i = Ho(e, t, r);
3417
+ let i = Uo(e, t, r);
3418
3418
  if (!i) return;
3419
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Vo(a, t - o), l = o + s, u = o + c;
3419
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Ho(a, t - o), l = o + s, u = o + c;
3420
3420
  l < u && n(l, u);
3421
3421
  }
3422
- function Ko(e, t, n, r) {
3422
+ function qo(e, t, n, r) {
3423
3423
  if (!e) return;
3424
- let i = Ho(e, t, r);
3424
+ let i = Uo(e, t, r);
3425
3425
  if (!i) return;
3426
3426
  let a = i.closest(".layout-paragraph");
3427
3427
  if (!a) return;
@@ -3430,7 +3430,7 @@ function Ko(e, t, n, r) {
3430
3430
  }
3431
3431
  //#endregion
3432
3432
  //#region src/composables/usePagesPointer.ts
3433
- var qo = 500, Jo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentChange: r, reLayout: i, setDocument: a, syncHfPMs: o }) => {
3433
+ var Jo = 500, Yo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentChange: r, reLayout: i, setDocument: a, syncHfPMs: o }) => {
3434
3434
  let s = e.value, c = t();
3435
3435
  if (!c?.package || !s?.rId) {
3436
3436
  e.value = null;
@@ -3446,21 +3446,21 @@ var qo = 500, Jo = ({ editState: e, getDocument: t, getHfPmView: n, onDocumentCh
3446
3446
  e.value = null;
3447
3447
  return;
3448
3448
  }
3449
- let d = zn({
3449
+ let d = Vn({
3450
3450
  document: c,
3451
3451
  position: s.position,
3452
3452
  isFirstPage: s.isFirstPage,
3453
3453
  activeRId: s.rId,
3454
- blocks: On(l.state.doc, u.content)
3454
+ blocks: An(l.state.doc, u.content)
3455
3455
  });
3456
3456
  e.value = null, d && (a(d), o(), i(), r(d));
3457
3457
  };
3458
- function Yo(e) {
3458
+ function Xo(e) {
3459
3459
  let t = H(null), n = null;
3460
3460
  function r() {
3461
3461
  n !== null && (clearTimeout(n), n = null);
3462
3462
  }
3463
- let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Vr(), d = S({
3463
+ let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Hr(), d = S({
3464
3464
  pagesContainer: e.pagesRef,
3465
3465
  onScrollExtendSelection: (e, t) => {
3466
3466
  if (!c || l === null) return;
@@ -3473,7 +3473,7 @@ function Yo(e) {
3473
3473
  visible: !1
3474
3474
  }), p = null;
3475
3475
  function m(t, n) {
3476
- return Wo(e.pagesRef.value, e.editorView.value, t, n);
3476
+ return Go(e.pagesRef.value, e.editorView.value, t, n);
3477
3477
  }
3478
3478
  function h() {
3479
3479
  let t = i.value;
@@ -3486,7 +3486,7 @@ function Yo(e) {
3486
3486
  function g(t, n) {
3487
3487
  let r = i.value, a = e.pagesRef.value, o = h();
3488
3488
  if (r?.rId && a && o !== e.editorView.value) {
3489
- let e = Lr(a, r.position, r.rId, t, n);
3489
+ let e = Rr(a, r.position, r.rId, t, n);
3490
3490
  return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
3491
3491
  }
3492
3492
  return m(t, n);
@@ -3499,13 +3499,13 @@ function Yo(e) {
3499
3499
  } catch {}
3500
3500
  }
3501
3501
  function v(t) {
3502
- Uo(e.pagesRef.value, e.pagesViewportRef.value, t);
3502
+ Wo(e.pagesRef.value, e.pagesViewportRef.value, t);
3503
3503
  }
3504
3504
  function y(t) {
3505
- Go(e.pagesRef.value, t, _, i.value?.position);
3505
+ Ko(e.pagesRef.value, t, _, i.value?.position);
3506
3506
  }
3507
3507
  function b(t) {
3508
- Ko(e.pagesRef.value, t, _, i.value?.position);
3508
+ qo(e.pagesRef.value, t, _, i.value?.position);
3509
3509
  }
3510
3510
  function x(t) {
3511
3511
  let n = e.editorView.value;
@@ -3534,7 +3534,7 @@ function Yo(e) {
3534
3534
  if (!o) return;
3535
3535
  let s = e.pagesViewportRef.value;
3536
3536
  if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
3537
- let l = Br({
3537
+ let l = Vr({
3538
3538
  mouseX: a.clientX,
3539
3539
  mouseY: a.clientY,
3540
3540
  pagesContainer: o,
@@ -3544,7 +3544,7 @@ function Yo(e) {
3544
3544
  if (!l) {
3545
3545
  n === null && (n = setTimeout(() => {
3546
3546
  t.value = null, n = null;
3547
- }, zr));
3547
+ }, Br));
3548
3548
  return;
3549
3549
  }
3550
3550
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -3595,7 +3595,7 @@ function Yo(e) {
3595
3595
  if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
3596
3596
  let n = t.target;
3597
3597
  if (n.closest(".docx-editor-vue__note-editor")) return;
3598
- let r = Rr(n);
3598
+ let r = zr(n);
3599
3599
  if (r) {
3600
3600
  t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
3601
3601
  return;
@@ -3605,11 +3605,11 @@ function Yo(e) {
3605
3605
  if (!s) return;
3606
3606
  let c = a ? "header" : "footer", l = e.getDocument();
3607
3607
  if (!l?.package) return;
3608
- let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = Rn(l.package), p = f.hasTitlePg && d === 1, m = In(f, c, p);
3608
+ let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = Bn(l.package), p = f.hasTitlePg && d === 1, m = Rn(f, c, p);
3609
3609
  if (!m) {
3610
- let t = Fn(l, c, p);
3610
+ let t = Ln(l, c, p);
3611
3611
  if (!t) return;
3612
- e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = Rn(t.package), m = In(f, c, p);
3612
+ e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = Bn(t.package), m = Rn(f, c, p);
3613
3613
  }
3614
3614
  if (!m) return;
3615
3615
  let h = m, g = e.pagesViewportRef.value;
@@ -3629,7 +3629,7 @@ function Yo(e) {
3629
3629
  }, requestAnimationFrame(() => {
3630
3630
  let n = e.getHfPmView(h);
3631
3631
  if (!n) return;
3632
- let r = Lr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3632
+ let r = Rr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3633
3633
  if (r !== null) {
3634
3634
  let e = Math.max(0, Math.min(r, n.state.doc.content.size));
3635
3635
  n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
@@ -3638,7 +3638,7 @@ function Yo(e) {
3638
3638
  });
3639
3639
  }
3640
3640
  function ie() {
3641
- Jo({
3641
+ Yo({
3642
3642
  editState: i,
3643
3643
  getDocument: e.getDocument,
3644
3644
  getHfPmView: e.getHfPmView,
@@ -3654,7 +3654,7 @@ function Yo(e) {
3654
3654
  i.value = null;
3655
3655
  return;
3656
3656
  }
3657
- let r = Ln({
3657
+ let r = zn({
3658
3658
  document: t,
3659
3659
  position: n.position,
3660
3660
  activeRId: n.rId
@@ -3690,13 +3690,13 @@ function Yo(e) {
3690
3690
  }
3691
3691
  let f = h() ?? n;
3692
3692
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
3693
- let p = Bt(r);
3693
+ let p = Ht(r);
3694
3694
  if (p) {
3695
3695
  t.preventDefault(), t.stopPropagation();
3696
3696
  let n = Number(p.dataset.pmStart);
3697
3697
  if (!Number.isNaN(n)) {
3698
3698
  try {
3699
- f.dispatch(f.state.tr.setSelection(Pt.create(f.state.doc, n)));
3699
+ f.dispatch(f.state.tr.setSelection(It.create(f.state.doc, n)));
3700
3700
  } catch {}
3701
3701
  e.selectedImage.value = {
3702
3702
  element: p,
@@ -3715,12 +3715,12 @@ function Yo(e) {
3715
3715
  return;
3716
3716
  }
3717
3717
  let v = Date.now();
3718
- if (v - a < qo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3718
+ if (v - a < Jo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3719
3719
  else if (s >= 3) b(m), s = 0;
3720
3720
  else if (t.shiftKey) {
3721
3721
  let { from: e } = f.state.selection;
3722
3722
  _(e, m);
3723
- } else _(m), l = m, c = !0, u.begin(Hr(f, m));
3723
+ } else _(m), l = m, c = !0, u.begin(Ur(f, m));
3724
3724
  f.focus();
3725
3725
  }
3726
3726
  function se(e) {
@@ -3788,8 +3788,8 @@ function Yo(e) {
3788
3788
  }
3789
3789
  //#endregion
3790
3790
  //#region src/composables/useRemoteSelectionSync.ts
3791
- var Xo = (e) => {
3792
- let t = new Ur(), n = null, r = () => {
3791
+ var Zo = (e) => {
3792
+ let t = new Wr(), n = null, r = () => {
3793
3793
  n !== null && (cancelAnimationFrame(n), n = null);
3794
3794
  let r = e.pagesRef.value;
3795
3795
  r && t.clear(r);
@@ -3812,8 +3812,8 @@ var Xo = (e) => {
3812
3812
  ], i, { flush: "post" }), B(() => {
3813
3813
  a(), r();
3814
3814
  });
3815
- }, Zo = (e) => {
3816
- let t = new Wr(), n = null, r = () => {
3815
+ }, Qo = (e) => {
3816
+ let t = new Gr(), n = null, r = () => {
3817
3817
  n !== null && (cancelAnimationFrame(n), n = null);
3818
3818
  let r = e.pagesRef.value;
3819
3819
  r && t.clear(r);
@@ -3827,8 +3827,8 @@ var Xo = (e) => {
3827
3827
  state: i.state,
3828
3828
  zoom: e.zoom.value,
3829
3829
  zIndex: ae.selectionOverlay
3830
- }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Kt(r, o.head, s) : null;
3831
- if (tn({
3830
+ }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Jt(r, o.head, s) : null;
3831
+ if (rn({
3832
3832
  hiddenHost: e.hiddenContainer.value,
3833
3833
  editorView: i,
3834
3834
  visibleCaret: c ? {
@@ -3859,27 +3859,27 @@ var Xo = (e) => {
3859
3859
  }, { immediate: !0 });
3860
3860
  let o = typeof window > "u" ? null : window;
3861
3861
  return o?.addEventListener("scroll", i, !0), B(() => {
3862
- a(), r(), o?.removeEventListener("scroll", i, !0), en(e.hiddenContainer.value);
3862
+ a(), r(), o?.removeEventListener("scroll", i, !0), nn(e.hiddenContainer.value);
3863
3863
  }), {
3864
3864
  clearOverlay: r,
3865
3865
  updateSelectionOverlay: i
3866
3866
  };
3867
- }, Qo = { class: "docx-editor-vue__toolbar-shell" }, $o = {
3867
+ }, $o = { class: "docx-editor-vue__toolbar-shell" }, es = {
3868
3868
  key: 0,
3869
3869
  class: "docx-editor-vue__error"
3870
- }, es = {
3870
+ }, ts = {
3871
3871
  key: 1,
3872
3872
  class: "docx-editor-vue__loading"
3873
- }, ts = {
3873
+ }, ns = {
3874
3874
  key: 2,
3875
3875
  class: "docx-editor-vue__placeholder"
3876
- }, ns = { class: "docx-editor-vue__editor-area" }, rs = {
3876
+ }, rs = { class: "docx-editor-vue__editor-area" }, is = {
3877
3877
  key: 0,
3878
3878
  class: "docx-editor-vue__ruler-h"
3879
- }, is = {
3879
+ }, as = {
3880
3880
  key: 1,
3881
3881
  class: "docx-editor-vue__ruler-v"
3882
- }, as = {
3882
+ }, os = {
3883
3883
  class: "docx-editor-vue__editor-content-wrapper",
3884
3884
  style: {
3885
3885
  position: "relative",
@@ -3887,11 +3887,11 @@ var Xo = (e) => {
3887
3887
  flexDirection: "column",
3888
3888
  minHeight: "100%"
3889
3889
  }
3890
- }, os = {
3890
+ }, ss = {
3891
3891
  "data-testid": "selection-overlay",
3892
3892
  class: "docx-editor-vue__decoration-origin",
3893
3893
  "aria-hidden": "true"
3894
- }, ss = ["aria-label"], cs = { class: "docx-editor-vue__note-editor-header" }, ls = ["aria-label"], us = ["aria-label"], ds = /*#__PURE__*/ t(/* @__PURE__ */ I({
3894
+ }, cs = ["aria-label"], ls = { class: "docx-editor-vue__note-editor-header" }, us = ["aria-label"], ds = ["aria-label"], fs = /*#__PURE__*/ t(/* @__PURE__ */ I({
3895
3895
  __name: "DocxEditor",
3896
3896
  props: {
3897
3897
  documentBuffer: { default: null },
@@ -3932,6 +3932,7 @@ var Xo = (e) => {
3932
3932
  initialZoom: { default: 1 },
3933
3933
  enableWheelZoom: { type: Boolean },
3934
3934
  keyboardShortcuts: {},
3935
+ hostShortcuts: {},
3935
3936
  readOnly: {
3936
3937
  type: Boolean,
3937
3938
  default: !1
@@ -4018,13 +4019,13 @@ var Xo = (e) => {
4018
4019
  let o = e, s = o.plugins ?? [], c = n;
4019
4020
  a(o.components);
4020
4021
  let l = fe();
4021
- Di(l);
4022
+ Oi(l);
4022
4023
  function u(e) {
4023
4024
  o.onChange?.(e), c("change", e), c("update:document", e);
4024
4025
  }
4025
- let d = H(o.mode), f = k(() => o.readOnly || d.value === "viewing"), p = k(() => o.showReviewControls), m = k(() => Ut(d.value)), h = H("all-markup");
4026
+ let d = H(o.mode), f = k(() => o.readOnly || d.value === "viewing"), p = k(() => o.showReviewControls), m = k(() => Gt(d.value)), h = H("all-markup");
4026
4027
  function _() {
4027
- Jn(Wt(d.value));
4028
+ Yn(Kt(d.value));
4028
4029
  }
4029
4030
  function x(e) {
4030
4031
  h.value = e;
@@ -4039,14 +4040,14 @@ var Xo = (e) => {
4039
4040
  function qe(e) {
4040
4041
  o.enableWheelZoom !== !1 && Ue(e);
4041
4042
  }
4042
- Po({
4043
+ Fo({
4043
4044
  showFindReplace: E,
4044
4045
  showHyperlink: _e,
4045
4046
  handleZoomKeyDown: We,
4046
4047
  scope: () => o.keyboardShortcuts ?? "document",
4047
4048
  roots: [oe]
4048
4049
  });
4049
- let { editor: Ye, editorView: J, editorState: Qe, remoteSelections: $e, headerFooterSelection: lt, activeNoteStory: dt, isReady: pt, isDirty: mt, parseError: ht, layout: gt, blocks: _t, measures: vt, syncCoordinator: yt, loadBuffer: bt, loadDocument: xt, save: St, getDocument: Y, setDocument: Ct, getHeaderFooterView: wt, syncHeaderFooterViews: Tt, openNoteStory: Et, closeNoteStory: Dt, getActiveNoteView: Ot, getCommands: kt, reLayout: At } = ce({
4050
+ let { editor: Ye, editorView: J, editorState: Qe, remoteSelections: $e, headerFooterSelection: at, activeNoteStory: dt, isReady: pt, isDirty: ht, parseError: gt, layout: _t, blocks: vt, measures: yt, syncCoordinator: bt, loadBuffer: xt, loadDocument: St, save: Ct, getDocument: Y, setDocument: wt, getHeaderFooterView: Tt, syncHeaderFooterViews: Et, openNoteStory: Dt, closeNoteStory: Ot, getActiveNoteView: kt, getCommands: At, reLayout: jt } = ce({
4050
4051
  hiddenContainer: C,
4051
4052
  hiddenHeaderFooterContainer: ue,
4052
4053
  noteEditorContainer: Ee,
@@ -4059,6 +4060,7 @@ var Xo = (e) => {
4059
4060
  showMarginGuides: () => o.showMarginGuides,
4060
4061
  marginGuideColor: () => o.marginGuideColor,
4061
4062
  externalPlugins: s,
4063
+ historyShortcuts: it(o.hostShortcuts ?? []),
4062
4064
  collaboration: () => o.collaboration,
4063
4065
  onAnonymizationMatchesChange: (e) => o.onAnonymizationMatchesChange?.(e),
4064
4066
  showTemplateDirectives: () => o.showTemplateDirectives,
@@ -4089,107 +4091,107 @@ var Xo = (e) => {
4089
4091
  K(Qe, (e, t) => {
4090
4092
  he.value !== null && e && t && !e.doc.eq(t.doc) && (he.value = null);
4091
4093
  });
4092
- let X = k(() => it({
4094
+ let X = k(() => ot({
4093
4095
  bodyView: J.value,
4094
- headerFooterView: I.value ? wt(I.value) : null,
4095
- noteView: Ot()
4096
- }).view), jt = k(() => {
4096
+ headerFooterView: I.value ? Tt(I.value) : null,
4097
+ noteView: kt()
4098
+ }).view), Mt = k(() => {
4097
4099
  let e = dt.value;
4098
4100
  return e ? te(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4099
- }), Mt = k(() => !pt.value && ae.value && !(o.preserveDocumentWhileLoading === !0 && S.value));
4100
- function Nt() {
4101
- J.value && (ot(), at(), At());
4101
+ }), Nt = k(() => !pt.value && ae.value && !(o.preserveDocumentWhileLoading === !0 && S.value));
4102
+ function Pt() {
4103
+ J.value && (ct(), st(), jt());
4102
4104
  }
4103
- jo({
4105
+ Mo({
4104
4106
  isReady: pt,
4105
4107
  getDocument: Y,
4106
4108
  fonts: () => o.fonts,
4107
- remeasure: Nt
4109
+ remeasure: Pt
4108
4110
  });
4109
- let { selectedImage: Pt, imageInteracting: Ft, imageToolbarContext: Z, handleToolbarImageWrap: It, handleImageTransform: Lt } = No({
4111
+ let { selectedImage: Ft, imageInteracting: It, imageToolbarContext: Lt, handleToolbarImageWrap: Z, handleImageTransform: Rt } = Po({
4110
4112
  editorView: X,
4111
4113
  zoom: B,
4112
4114
  stateTick: T,
4113
- getCommands: kt
4114
- }), Rt = Zo({
4115
+ getCommands: At
4116
+ }), zt = Qo({
4115
4117
  editorView: J,
4116
4118
  hiddenContainer: C,
4117
4119
  pagesRef: w,
4118
4120
  zoom: B,
4119
- selectedImage: Pt,
4120
- syncCoordinator: yt,
4121
- imageInteracting: Ft
4121
+ selectedImage: Ft,
4122
+ syncCoordinator: bt,
4123
+ imageInteracting: It
4122
4124
  });
4123
- Xo({
4125
+ Zo({
4124
4126
  pagesRef: w,
4125
4127
  remoteSelections: $e,
4126
- syncCoordinator: yt,
4128
+ syncCoordinator: bt,
4127
4129
  zoom: B
4128
4130
  });
4129
- let { hyperlinkPopupData: zt, handleHyperlinkSubmit: Bt, handleHyperlinkRemove: Vt, handleHyperlinkPopupNavigate: Ht, handleHyperlinkPopupEdit: Gt, handleHyperlinkPopupRemove: Kt } = Mo({
4131
+ let { hyperlinkPopupData: Bt, handleHyperlinkSubmit: Vt, handleHyperlinkRemove: Ht, handleHyperlinkPopupNavigate: Ut, handleHyperlinkPopupEdit: Wt, handleHyperlinkPopupRemove: qt } = No({
4130
4132
  editorView: X,
4131
- getCommands: kt
4132
- }), qt = se(), { tableInsertButton: Jt, hfEdit: Yt, scrollPageInfo: Xt, resolvePos: Zt, setPmSelection: Qt, scrollVisiblePositionIntoView: $t, handlePagesMouseDown: en, handlePagesMouseMove: tn, handlePagesClick: nn, handlePagesDoubleClick: rn, handleTableInsertClick: an, handleHfSave: on, handleHfRemove: sn } = Yo({
4133
+ getCommands: At
4134
+ }), Jt = se(), { tableInsertButton: Yt, hfEdit: Xt, scrollPageInfo: Zt, resolvePos: Qt, setPmSelection: $t, scrollVisiblePositionIntoView: en, handlePagesMouseDown: tn, handlePagesMouseMove: nn, handlePagesClick: rn, handlePagesDoubleClick: an, handleTableInsertClick: on, handleHfSave: sn, handleHfRemove: cn } = Xo({
4133
4135
  editorView: J,
4134
4136
  pagesRef: w,
4135
4137
  pagesViewportRef: pe,
4136
- selectedImage: Pt,
4137
- imageInteracting: Ft,
4138
- hyperlinkPopupData: zt,
4138
+ selectedImage: Ft,
4139
+ imageInteracting: It,
4140
+ hyperlinkPopupData: Bt,
4139
4141
  readOnly: f,
4140
4142
  showHeaderFooterEditing: k(() => o.showHeaderFooterEditing),
4141
4143
  zoom: B,
4142
- layout: gt,
4144
+ layout: _t,
4143
4145
  tableResize: {
4144
- tryStartResize: qt.tryStartResize,
4145
- isResizing: k(() => qt.isResizing())
4146
+ tryStartResize: Jt.tryStartResize,
4147
+ isResizing: k(() => Jt.isResizing())
4146
4148
  },
4147
- getCommands: kt,
4149
+ getCommands: At,
4148
4150
  getDocument: Y,
4149
- getHfPmView: wt,
4150
- syncHfPMs: Tt,
4151
- setDocument: Ct,
4151
+ getHfPmView: Tt,
4152
+ syncHfPMs: Et,
4153
+ setDocument: wt,
4152
4154
  openNoteStory: (e) => {
4153
- Et(e), Rt.clearOverlay();
4155
+ Dt(e), zt.clearOverlay();
4154
4156
  },
4155
- closeNoteStory: Dt,
4156
- getActiveNoteView: Ot,
4157
- reLayout: At,
4157
+ closeNoteStory: Ot,
4158
+ getActiveNoteView: kt,
4159
+ reLayout: jt,
4158
4160
  onDocumentChange: u,
4159
- clearOverlay: Rt.clearOverlay
4160
- }), cn = () => Yt.value?.rId ? wt(Yt.value.rId) : null, ln = k(() => {
4161
- let e = Yt.value, t = lt.value;
4161
+ clearOverlay: zt.clearOverlay
4162
+ }), ln = () => Xt.value?.rId ? Tt(Xt.value.rId) : null, un = k(() => {
4163
+ let e = Xt.value, t = at.value;
4162
4164
  return !e?.rId || !t || t.rId !== e.rId ? null : {
4163
4165
  ...t,
4164
4166
  pageNumber: e.pageNumber
4165
4167
  };
4166
4168
  });
4167
- K(Yt, (e) => {
4168
- I.value = e?.rId ?? null, e && Rt.clearOverlay();
4169
+ K(Xt, (e) => {
4170
+ I.value = e?.rId ?? null, e && zt.clearOverlay();
4169
4171
  }, { immediate: !0 });
4170
- let un = Fo({
4172
+ let dn = Io({
4171
4173
  editorView: J,
4172
4174
  showOutline: O,
4173
4175
  showSidebar: A,
4174
4176
  outlineHeadings: ke,
4175
4177
  activeSidebarItem: we,
4176
4178
  extractCommentsAndChanges: () => {},
4177
- scrollToVisiblePosition: $t
4178
- }), { contextMenu: dn, imageContextMenu: fn, imageContextMenuTextActions: pn, customTextMenuItems: mn, handleContextMenu: hn, handleSelectedImageContextMenu: gn, handleImageWrapSelect: _n, handleContextMenuAction: vn } = ho({
4179
+ scrollToVisiblePosition: en
4180
+ }), { contextMenu: fn, imageContextMenu: pn, imageContextMenuTextActions: mn, customTextMenuItems: hn, handleContextMenu: gn, handleSelectedImageContextMenu: _n, handleImageWrapSelect: vn, handleContextMenuAction: yn } = go({
4179
4181
  editorView: X,
4180
- selectedImage: Pt,
4182
+ selectedImage: Ft,
4181
4183
  zoom: B,
4182
4184
  showImageProperties: ye,
4183
- getCommands: kt,
4184
- clearOverlay: Rt.clearOverlay,
4185
- setPmSelection: Qt,
4186
- resolvePos: Zt,
4185
+ getCommands: At,
4186
+ clearOverlay: zt.clearOverlay,
4187
+ setPmSelection: $t,
4188
+ resolvePos: Qt,
4187
4189
  customContextMenuItems: () => f.value ? void 0 : o.customContextMenuItems,
4188
4190
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
4189
4191
  onCopy: () => o.onCopy?.(),
4190
4192
  onCut: () => o.onCut?.(),
4191
4193
  onPaste: () => o.onPaste?.()
4192
- }), yn = le(J, T), bn = k(() => yn.value.entries), Q = no({
4194
+ }), bn = le(J, T), xn = k(() => bn.value.entries), Q = ro({
4193
4195
  editorView: J,
4194
4196
  getDocument: Y,
4195
4197
  author: () => o.author,
@@ -4197,56 +4199,56 @@ var Xo = (e) => {
4197
4199
  onCommentsChange: (e) => {
4198
4200
  o.onCommentsChange?.(e), c("comments-change", e);
4199
4201
  },
4200
- reLayout: At
4201
- }), xn = Q.comments, $ = to({
4202
+ reLayout: jt
4203
+ }), Sn = Q.comments, $ = no({
4202
4204
  editorView: J,
4203
4205
  pagesViewport: pe,
4204
4206
  pagesContainer: w,
4205
4207
  readOnly: f,
4206
4208
  createComment: Q.createComment,
4207
4209
  pushComment: Q.pushComment,
4208
- reLayout: At,
4210
+ reLayout: jt,
4209
4211
  showSidebar: A,
4210
4212
  setActiveSidebarItem: (e) => {
4211
4213
  we.value = e;
4212
4214
  }
4213
4215
  });
4214
- function Sn(e) {
4215
- navigator.clipboard?.writeText(e), zt.value = null;
4216
+ function Cn(e) {
4217
+ navigator.clipboard?.writeText(e), Bt.value = null;
4216
4218
  }
4217
- let Cn = k(() => {
4219
+ let wn = k(() => {
4218
4220
  T.value;
4219
4221
  let e = Y()?.package.document;
4220
4222
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
4221
- }), wn = k(() => {
4223
+ }), Tn = k(() => {
4222
4224
  T.value;
4223
4225
  let e = Y();
4224
- return e ? ut(e) : void 0;
4225
- }), Tn = k(() => {
4226
+ return e ? ft(e) : void 0;
4227
+ }), En = k(() => {
4226
4228
  T.value;
4227
4229
  let e = X.value;
4228
4230
  if (!e) return {};
4229
4231
  let t = tt(e.state).table;
4230
4232
  return t ? et(t) : {};
4231
- }), En = k(() => {
4233
+ }), Dn = k(() => {
4232
4234
  T.value;
4233
4235
  let e = {};
4234
4236
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4235
4237
  let t = Y()?.package.styles?.styles;
4236
4238
  return t !== void 0 && (e.documentStyles = t), e;
4237
- }), Dn = k(() => ct(Cn.value?.pageWidth ?? 12240) * B.value), On = k(() => {
4239
+ }), On = k(() => ut(wn.value?.pageWidth ?? 12240) * B.value), kn = k(() => {
4238
4240
  let e = /* @__PURE__ */ new Set();
4239
- for (let t of xn.value) t.done && e.add(t.id);
4241
+ for (let t of Sn.value) t.done && e.add(t.id);
4240
4242
  return e;
4241
- }), kn = k(() => ({
4243
+ }), An = k(() => ({
4242
4244
  transform: B.value === 1 ? void 0 : `scale(${B.value})`,
4243
4245
  transformOrigin: "top center",
4244
4246
  transition: "transform 0.2s ease"
4245
- })), { handleApplyStyle: An, handleInsertSymbol: jn, handleInsertSectionBreakNextPage: Mn, handleInsertSectionBreakContinuous: Nn } = bo({
4247
+ })), { handleApplyStyle: jn, handleInsertSymbol: Mn, handleInsertSectionBreakNextPage: Nn, handleInsertSectionBreakContinuous: Pn } = xo({
4246
4248
  editorView: X,
4247
4249
  getDocument: Y
4248
4250
  });
4249
- function Pn() {
4251
+ function Fn() {
4250
4252
  if (o.onInsertImage) {
4251
4253
  o.onInsertImage();
4252
4254
  return;
@@ -4259,7 +4261,7 @@ var Xo = (e) => {
4259
4261
  n && Ke(e, n, () => e.focus()), t.remove();
4260
4262
  }), document.body.appendChild(t), t.click();
4261
4263
  }
4262
- function Fn(e, t) {
4264
+ function In(e, t) {
4263
4265
  if (o.onInsertTable) {
4264
4266
  o.onInsertTable(e, t);
4265
4267
  return;
@@ -4267,7 +4269,7 @@ var Xo = (e) => {
4267
4269
  let n = X.value;
4268
4270
  n && (Xe(n, e, t), n.focus());
4269
4271
  }
4270
- function In() {
4272
+ function Ln() {
4271
4273
  if (o.onInsertPageBreak) {
4272
4274
  o.onInsertPageBreak();
4273
4275
  return;
@@ -4275,7 +4277,7 @@ var Xo = (e) => {
4275
4277
  let e = J.value;
4276
4278
  e && (Je(e), e.focus());
4277
4279
  }
4278
- function Ln() {
4280
+ function Rn() {
4279
4281
  if (o.onInsertTOC) {
4280
4282
  o.onInsertTOC();
4281
4283
  return;
@@ -4283,14 +4285,14 @@ var Xo = (e) => {
4283
4285
  let e = J.value;
4284
4286
  e && (Ze(e, { title: te("toolbar.tableOfContents") }), e.focus());
4285
4287
  }
4286
- let { handlePageSetupApply: Rn, handleLeftMarginChange: zn, handleRightMarginChange: Bn, handleTopMarginChange: Vn, handleBottomMarginChange: Hn, handleIndentLeftChange: Un, handleIndentRightChange: Wn, handleFirstLineIndentChange: Gn, handleTabStopRemove: Kn } = Io({
4288
+ let { handlePageSetupApply: zn, handleLeftMarginChange: Bn, handleRightMarginChange: Vn, handleTopMarginChange: Hn, handleBottomMarginChange: Un, handleIndentLeftChange: Wn, handleIndentRightChange: Gn, handleFirstLineIndentChange: Kn, handleTabStopRemove: qn } = Lo({
4287
4289
  editorView: J,
4288
4290
  getDocument: Y,
4289
4291
  readOnly: f,
4290
4292
  stateTick: T,
4291
- reLayout: At,
4293
+ reLayout: jt,
4292
4294
  onChange: u
4293
- }), qn = k(() => {
4295
+ }), Jn = k(() => {
4294
4296
  T.value;
4295
4297
  let e = X.value, t = e ? nt(e.state).paragraphFormatting : {};
4296
4298
  return {
@@ -4301,10 +4303,10 @@ var Xo = (e) => {
4301
4303
  tabs: t.tabs ?? null
4302
4304
  };
4303
4305
  });
4304
- function Jn(e) {
4306
+ function Yn(e) {
4305
4307
  d.value !== e && (d.value = e, o.onModeChange?.(e), c("mode-change", e));
4306
4308
  }
4307
- function Yn(e) {
4309
+ function Xn(e) {
4308
4310
  switch (e) {
4309
4311
  case "find":
4310
4312
  case "findReplace":
@@ -4323,64 +4325,64 @@ var Xo = (e) => {
4323
4325
  f.value || (Se.value = !0);
4324
4326
  break;
4325
4327
  case "toggleOutline":
4326
- un.handleToggleOutline();
4328
+ dn.handleToggleOutline();
4327
4329
  break;
4328
4330
  case "toggleSidebar":
4329
4331
  A.value = !A.value;
4330
4332
  break;
4331
4333
  case "insertImage":
4332
- Pn();
4334
+ Fn();
4333
4335
  break;
4334
4336
  case "insertPageBreak":
4335
- In();
4337
+ Ln();
4336
4338
  break;
4337
4339
  case "insertSectionBreakNextPage":
4338
- Mn();
4340
+ Nn();
4339
4341
  break;
4340
4342
  case "insertSectionBreakContinuous":
4341
- Nn();
4343
+ Pn();
4342
4344
  break;
4343
4345
  case "insertTOC":
4344
- Ln();
4346
+ Rn();
4345
4347
  break;
4346
4348
  default: break;
4347
4349
  }
4348
4350
  c("menu-action", e);
4349
4351
  }
4350
- function Xn(e) {
4352
+ function Zn(e) {
4351
4353
  if (f.value) return;
4352
4354
  let t = Y();
4353
4355
  if (!t) return;
4354
- let n = ft(t, e);
4355
- Ct(n), mt.value = !0, T.value++, At(), u(n);
4356
+ let n = mt(t, e);
4357
+ wt(n), ht.value = !0, T.value++, jt(), u(n);
4356
4358
  }
4357
- function Zn(e, t) {
4358
- Fn(e, t);
4359
+ function Qn(e, t) {
4360
+ In(e, t);
4359
4361
  }
4360
- function Qn(e) {
4361
- let t = X.value, n = kt().setTableProperties;
4362
+ function $n(e) {
4363
+ let t = X.value, n = At().setTableProperties;
4362
4364
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4363
4365
  }
4364
- let $n = H(!1);
4365
- go({
4366
+ let er = H(!1);
4367
+ _o({
4366
4368
  documentBuffer: () => o.documentBuffer ?? null,
4367
4369
  document: () => o.document ?? null,
4368
- loadDocumentBuffer: bt,
4369
- loadDocument: xt,
4370
- sidebarAutoOpenedRef: $n
4370
+ loadDocumentBuffer: xt,
4371
+ loadDocument: St,
4372
+ sidebarAutoOpenedRef: er
4371
4373
  }), K(() => o.mode, (e) => {
4372
4374
  e && e !== d.value && (d.value = e);
4373
4375
  }), K(() => o.showOutline, (e) => {
4374
- O.value = !!e, un.recomputeHeadingsIfOpen();
4376
+ O.value = !!e, dn.recomputeHeadingsIfOpen();
4375
4377
  });
4376
- let er = H(!1);
4377
- function tr(e) {
4378
+ let tr = H(!1);
4379
+ function nr(e) {
4378
4380
  let t = e.currentTarget;
4379
4381
  t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop);
4380
4382
  }
4381
- function nr() {
4382
- if (o.initialScrollTop === void 0 || er.value) return;
4383
- er.value = !0;
4383
+ function rr() {
4384
+ if (o.initialScrollTop === void 0 || tr.value) return;
4385
+ tr.value = !0;
4384
4386
  let e = o.initialScrollTop;
4385
4387
  requestAnimationFrame(() => {
4386
4388
  me.value && (me.value.scrollTop = e);
@@ -4388,37 +4390,37 @@ var Xo = (e) => {
4388
4390
  }
4389
4391
  K(pt, (e) => {
4390
4392
  if (!e) {
4391
- er.value = !1;
4393
+ tr.value = !1;
4392
4394
  return;
4393
4395
  }
4394
- me.value && (me.value.scrollTop = 0, me.value.scrollLeft = 0), S.value = !0, un.recomputeHeadingsIfOpen(), Q.seedFromDocument();
4396
+ me.value && (me.value.scrollTop = 0, me.value.scrollLeft = 0), S.value = !0, dn.recomputeHeadingsIfOpen(), Q.seedFromDocument();
4395
4397
  let t = Y();
4396
- t && o.onCompatibilityChange?.(rt(t)), o.autoOpenReviewSidebar !== !1 && !$n.value && (xn.value.length > 0 || bn.value.length > 0) && ($n.value = !0, A.value = !0), nr(), c("ready");
4398
+ t && o.onCompatibilityChange?.(rt(t)), o.autoOpenReviewSidebar !== !1 && !er.value && (Sn.value.length > 0 || xn.value.length > 0) && (er.value = !0, A.value = !0), rr(), c("ready");
4397
4399
  }), Ae(() => {
4398
4400
  let e = Ye.on("selectionChange", () => {
4399
4401
  T.value++, $.updateFloatingButton();
4400
4402
  }), t = Ye.on("docChange", () => {
4401
- T.value++, un.recomputeHeadingsIfOpen();
4403
+ T.value++, dn.recomputeHeadingsIfOpen();
4402
4404
  }), n = Ye.on("layoutComplete", () => {
4403
4405
  T.value++;
4404
- }), r = qt.install(), i = st(() => o.onFontsLoaded?.());
4406
+ }), r = Jt.install(), i = lt(() => o.onFontsLoaded?.());
4405
4407
  z(() => {
4406
4408
  e(), t(), n(), r(), i();
4407
4409
  });
4408
4410
  });
4409
- let { exposed: rr } = yo({
4411
+ let { exposed: ir } = bo({
4410
4412
  editor: Ye,
4411
4413
  editorView: J,
4412
- isDirty: mt,
4414
+ isDirty: ht,
4413
4415
  commentsDirty: Q.commentsDirty,
4414
4416
  clearCommentsDirty: Q.clearCommentsDirty,
4415
- saveDocument: St,
4416
- layout: gt,
4417
+ saveDocument: Ct,
4418
+ layout: _t,
4417
4419
  pagesRef: w,
4418
4420
  pagesViewportRef: pe,
4419
4421
  scrollRootRef: me,
4420
4422
  zoom: B,
4421
- scrollVisiblePositionIntoView: $t,
4423
+ scrollVisiblePositionIntoView: en,
4422
4424
  setPassageHighlight: (e) => {
4423
4425
  he.value = e;
4424
4426
  },
@@ -4432,8 +4434,8 @@ var Xo = (e) => {
4432
4434
  focus: () => X.value?.focus(),
4433
4435
  getDocument: Y,
4434
4436
  getActiveView: () => X.value,
4435
- closeNoteStory: Dt,
4436
- getHeaderFooterView: wt,
4437
+ closeNoteStory: Ot,
4438
+ getHeaderFooterView: Tt,
4437
4439
  setZoom: ze,
4438
4440
  openFindReplace: () => {
4439
4441
  E.value = !0;
@@ -4441,7 +4443,7 @@ var Xo = (e) => {
4441
4443
  onPrint: o.onPrint,
4442
4444
  onSave: o.onSave
4443
4445
  });
4444
- return t(rr), (t, n) => (V(), N("div", {
4446
+ return t(ir), (t, n) => (V(), N("div", {
4445
4447
  ref_key: "rootRef",
4446
4448
  ref: oe,
4447
4449
  class: L([
@@ -4455,11 +4457,11 @@ var Xo = (e) => {
4455
4457
  ]),
4456
4458
  style: R(e.style)
4457
4459
  }, [
4458
- P("div", Qo, [F(Ui, {
4460
+ P("div", $o, [F(Wi, {
4459
4461
  "show-table-insert": o.showTableInsert !== !1,
4460
4462
  onRename: n[0] ||= (e) => c("rename", e),
4461
- onMenuAction: Yn,
4462
- onInsertTable: Zn
4463
+ onMenuAction: Xn,
4464
+ onInsertTable: Qn
4463
4465
  }, {
4464
4466
  "title-bar-left": Ie(() => [Me(t.$slots, "title-bar-left", {}, void 0, !0)]),
4465
4467
  "title-bar-right": Ie(() => [Me(t.$slots, "title-bar-right", {}, void 0, !0)]),
@@ -4467,7 +4469,7 @@ var Xo = (e) => {
4467
4469
  }, 8, ["show-table-insert"]), e.showToolbar ? (V(), j(ie, Oe({
4468
4470
  key: 0,
4469
4471
  view: X.value,
4470
- "get-commands": G(kt),
4472
+ "get-commands": G(At),
4471
4473
  "state-tick": T.value,
4472
4474
  "zoom-percent": G(je),
4473
4475
  "is-min-zoom": G(U),
@@ -4480,30 +4482,30 @@ var Xo = (e) => {
4480
4482
  "display-mode": h.value,
4481
4483
  "read-only": f.value,
4482
4484
  "comments-sidebar-open": A.value,
4483
- "image-context": G(Z),
4485
+ "image-context": G(Lt),
4484
4486
  theme: e.theme ?? null
4485
- }, En.value, {
4487
+ }, Dn.value, {
4486
4488
  onFindReplace: n[2] ||= (e) => E.value = !0,
4487
4489
  onInsertLink: n[3] ||= (e) => _e.value = !0,
4488
4490
  onInsertSymbol: n[4] ||= (e) => ve.value = !0,
4489
- onInsertPageBreak: In,
4491
+ onInsertPageBreak: Ln,
4490
4492
  onPageSetup: n[5] ||= (e) => be.value = !0,
4491
- onToggleOutline: G(un).handleToggleOutline,
4492
- onApplyStyle: G(An),
4493
+ onToggleOutline: G(dn).handleToggleOutline,
4494
+ onApplyStyle: G(jn),
4493
4495
  onZoomIn: G(Be),
4494
4496
  onZoomOut: G(He),
4495
4497
  onZoomSet: G(ze),
4496
4498
  onToggleSidebar: n[6] ||= (e) => A.value = !A.value,
4497
- onModeChange: Jn,
4499
+ onModeChange: Yn,
4498
4500
  onToggleTrackChanges: _,
4499
4501
  "onUpdate:displayMode": x,
4500
4502
  onImageProperties: n[7] ||= (e) => ye.value = !0,
4501
- onImageWrapType: G(It),
4502
- onImageTransform: G(Lt)
4503
+ onImageWrapType: G(Z),
4504
+ onImageTransform: G(Rt)
4503
4505
  }), Ce({
4504
4506
  "table-context": Ie(() => [F(y, {
4505
4507
  view: X.value,
4506
- "get-commands": G(kt),
4508
+ "get-commands": G(At),
4507
4509
  "state-tick": T.value,
4508
4510
  theme: e.theme ?? null,
4509
4511
  onOpenTableProperties: n[1] ||= (e) => xe.value = !0
@@ -4546,7 +4548,7 @@ var Xo = (e) => {
4546
4548
  "onImageWrapType",
4547
4549
  "onImageTransform"
4548
4550
  ])) : M("", !0)]),
4549
- F(Ri, {
4551
+ F(zi, {
4550
4552
  "show-find-replace": E.value,
4551
4553
  "onUpdate:showFindReplace": n[8] ||= (e) => E.value = e,
4552
4554
  "show-hyperlink": _e.value,
@@ -4562,18 +4564,18 @@ var Xo = (e) => {
4562
4564
  "show-watermark": Se.value,
4563
4565
  "onUpdate:showWatermark": n[14] ||= (e) => Se.value = e,
4564
4566
  view: X.value,
4565
- "scroll-visible-position-into-view": G($t),
4567
+ "scroll-visible-position-into-view": G(en),
4566
4568
  bookmarks: De.value,
4567
- "current-watermark": wn.value,
4568
- "selected-image-pm-pos": G(Pt)?.pmPos ?? null,
4569
- "section-properties": Cn.value,
4570
- "table-properties": Tn.value,
4571
- onInsertSymbol: G(jn),
4572
- onHyperlinkSubmit: G(Bt),
4573
- onHyperlinkRemove: G(Vt),
4574
- onPageSetupApply: G(Rn),
4575
- onTablePropertiesApply: Qn,
4576
- onWatermarkApply: Xn
4569
+ "current-watermark": Tn.value,
4570
+ "selected-image-pm-pos": G(Ft)?.pmPos ?? null,
4571
+ "section-properties": wn.value,
4572
+ "table-properties": En.value,
4573
+ onInsertSymbol: G(Mn),
4574
+ onHyperlinkSubmit: G(Vt),
4575
+ onHyperlinkRemove: G(Ht),
4576
+ onPageSetupApply: G(zn),
4577
+ onTablePropertiesApply: $n,
4578
+ onWatermarkApply: Zn
4577
4579
  }, null, 8, [
4578
4580
  "show-find-replace",
4579
4581
  "show-hyperlink",
@@ -4594,10 +4596,10 @@ var Xo = (e) => {
4594
4596
  "onHyperlinkRemove",
4595
4597
  "onPageSetupApply"
4596
4598
  ]),
4597
- G(ht) ? (V(), N("div", $o, W(G(ht)), 1)) : Mt.value ? (V(), N("div", es, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
4599
+ G(gt) ? (V(), N("div", es, W(G(gt)), 1)) : Nt.value ? (V(), N("div", ts, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(re, {
4598
4600
  key: 0,
4599
4601
  node: e.loadingIndicator
4600
- }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", ts, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
4602
+ }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te(W(G(te)("loadingDocument")), 1)], 64))], !0)])) : !G(pt) && !ae.value ? (V(), N("div", ns, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(re, {
4601
4603
  key: 0,
4602
4604
  node: e.placeholder
4603
4605
  }, null, 8, ["node"])) : (V(), N(D, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
@@ -4615,25 +4617,25 @@ var Xo = (e) => {
4615
4617
  ref_key: "editorScrollRef",
4616
4618
  ref: me,
4617
4619
  class: "docx-editor-vue__editor-scroll",
4618
- onScroll: tr
4619
- }, [P("div", ns, [
4620
- ge.value && !f.value ? (V(), N("div", rs, [F(ne, {
4621
- "section-props": Cn.value,
4620
+ onScroll: nr
4621
+ }, [P("div", rs, [
4622
+ ge.value && !f.value ? (V(), N("div", is, [F(ne, {
4623
+ "section-props": wn.value,
4622
4624
  zoom: G(B),
4623
4625
  unit: e.rulerUnit ?? "inch",
4624
4626
  editable: !f.value,
4625
- "indent-left": qn.value.indentLeft,
4626
- "indent-right": qn.value.indentRight,
4627
- "first-line-indent": qn.value.firstLineIndent,
4628
- "hanging-indent": qn.value.hangingIndent,
4627
+ "indent-left": Jn.value.indentLeft,
4628
+ "indent-right": Jn.value.indentRight,
4629
+ "first-line-indent": Jn.value.firstLineIndent,
4630
+ "hanging-indent": Jn.value.hangingIndent,
4629
4631
  "show-first-line-indent": !0,
4630
- "tab-stops": qn.value.tabs,
4631
- onLeftMarginChange: G(zn),
4632
- onRightMarginChange: G(Bn),
4633
- onIndentLeftChange: G(Un),
4634
- onIndentRightChange: G(Wn),
4635
- onFirstLineIndentChange: G(Gn),
4636
- onTabStopRemove: G(Kn)
4632
+ "tab-stops": Jn.value.tabs,
4633
+ onLeftMarginChange: G(Bn),
4634
+ onRightMarginChange: G(Vn),
4635
+ onIndentLeftChange: G(Wn),
4636
+ onIndentRightChange: G(Gn),
4637
+ onFirstLineIndentChange: G(Kn),
4638
+ onTabStopRemove: G(qn)
4637
4639
  }, null, 8, [
4638
4640
  "section-props",
4639
4641
  "zoom",
@@ -4651,13 +4653,13 @@ var Xo = (e) => {
4651
4653
  "onFirstLineIndentChange",
4652
4654
  "onTabStopRemove"
4653
4655
  ])])) : M("", !0),
4654
- ge.value && !f.value ? (V(), N("div", is, [F(v, {
4655
- "section-props": Cn.value,
4656
+ ge.value && !f.value ? (V(), N("div", as, [F(v, {
4657
+ "section-props": wn.value,
4656
4658
  zoom: G(B),
4657
4659
  unit: e.rulerUnit ?? "inch",
4658
4660
  editable: !f.value,
4659
- onTopMarginChange: G(Vn),
4660
- onBottomMarginChange: G(Hn)
4661
+ onTopMarginChange: G(Hn),
4662
+ onBottomMarginChange: G(Un)
4661
4663
  }, null, 8, [
4662
4664
  "section-props",
4663
4665
  "zoom",
@@ -4671,24 +4673,24 @@ var Xo = (e) => {
4671
4673
  ref: pe,
4672
4674
  class: "docx-editor-vue__pages-viewport",
4673
4675
  onWheel: qe,
4674
- onMousedown: n[25] ||= (...e) => G(en) && G(en)(...e),
4675
- onMousemove: n[26] ||= (...e) => G(tn) && G(tn)(...e),
4676
- onClick: n[27] ||= (...e) => G(nn) && G(nn)(...e),
4677
- onDblclick: n[28] ||= (...e) => G(rn) && G(rn)(...e),
4678
- onContextmenu: n[29] ||= q((...e) => G(hn) && G(hn)(...e), ["prevent"])
4676
+ onMousedown: n[25] ||= (...e) => G(tn) && G(tn)(...e),
4677
+ onMousemove: n[26] ||= (...e) => G(nn) && G(nn)(...e),
4678
+ onClick: n[27] ||= (...e) => G(rn) && G(rn)(...e),
4679
+ onDblclick: n[28] ||= (...e) => G(an) && G(an)(...e),
4680
+ onContextmenu: n[29] ||= q((...e) => G(gn) && G(gn)(...e), ["prevent"])
4679
4681
  }, [
4680
- P("div", as, [
4682
+ P("div", os, [
4681
4683
  P("div", {
4682
4684
  ref_key: "pagesRef",
4683
4685
  ref: w,
4684
- class: L(["docx-editor-vue__pages paged-editor__pages", G(Yt) ? `paged-editor--hf-editing paged-editor--editing-${G(Yt).position}` : ""]),
4685
- style: R(kn.value)
4686
+ class: L(["docx-editor-vue__pages paged-editor__pages", G(Xt) ? `paged-editor--hf-editing paged-editor--editing-${G(Xt).position}` : ""]),
4687
+ style: R(An.value)
4686
4688
  }, null, 6),
4687
- F(Ta, {
4688
- "editor-view": cn(),
4689
+ F(Ea, {
4690
+ "editor-view": ln(),
4689
4691
  "hidden-container": ue.value,
4690
4692
  "pages-container": w.value,
4691
- selection: ln.value,
4693
+ selection: un.value,
4692
4694
  zoom: G(B)
4693
4695
  }, null, 8, [
4694
4696
  "editor-view",
@@ -4697,15 +4699,15 @@ var Xo = (e) => {
4697
4699
  "selection",
4698
4700
  "zoom"
4699
4701
  ]),
4700
- P("div", os, [
4701
- F(yi, {
4702
+ P("div", ss, [
4703
+ F(bi, {
4702
4704
  "get-view": () => G(J),
4703
4705
  "get-pages-container": () => w.value,
4704
4706
  "editor-state": G(Qe),
4705
4707
  zoom: G(B),
4706
- layout: G(gt),
4707
- blocks: G(_t),
4708
- measures: G(vt),
4708
+ layout: G(_t),
4709
+ blocks: G(vt),
4710
+ measures: G(yt),
4709
4711
  "on-term-click": o.onAnonymizationTermClick,
4710
4712
  "selected-canonical": o.selectedAnonymizationCanonical,
4711
4713
  "selection-seq": o.anonymizationSelectionSeq
@@ -4721,13 +4723,13 @@ var Xo = (e) => {
4721
4723
  "selected-canonical",
4722
4724
  "selection-seq"
4723
4725
  ]),
4724
- F(xi, {
4726
+ F(Si, {
4725
4727
  range: he.value,
4726
4728
  "get-pages-container": () => w.value,
4727
4729
  zoom: G(B),
4728
- layout: G(gt),
4729
- blocks: G(_t),
4730
- measures: G(vt)
4730
+ layout: G(_t),
4731
+ blocks: G(vt),
4732
+ measures: G(yt)
4731
4733
  }, null, 8, [
4732
4734
  "range",
4733
4735
  "get-pages-container",
@@ -4736,15 +4738,15 @@ var Xo = (e) => {
4736
4738
  "blocks",
4737
4739
  "measures"
4738
4740
  ]),
4739
- o.showTemplateDirectives ? (V(), j(Ra, {
4741
+ o.showTemplateDirectives ? (V(), j(za, {
4740
4742
  key: 0,
4741
4743
  "get-view": () => G(J),
4742
4744
  "get-pages-container": () => w.value,
4743
4745
  "editor-state": G(Qe),
4744
4746
  zoom: G(B),
4745
- layout: G(gt),
4746
- blocks: G(_t),
4747
- measures: G(vt)
4747
+ layout: G(_t),
4748
+ blocks: G(vt),
4749
+ measures: G(yt)
4748
4750
  }, null, 8, [
4749
4751
  "get-view",
4750
4752
  "get-pages-container",
@@ -4754,23 +4756,23 @@ var Xo = (e) => {
4754
4756
  "blocks",
4755
4757
  "measures"
4756
4758
  ])) : M("", !0),
4757
- F(Ti, {
4759
+ F(Ei, {
4758
4760
  "get-pages-container": () => w.value,
4759
4761
  "editor-state": G(Qe),
4760
4762
  zoom: G(B),
4761
- "sync-coordinator": G(yt)
4763
+ "sync-coordinator": G(bt)
4762
4764
  }, null, 8, [
4763
4765
  "get-pages-container",
4764
4766
  "editor-state",
4765
4767
  "zoom",
4766
4768
  "sync-coordinator"
4767
4769
  ]),
4768
- F(Ni, {
4770
+ F(Pi, {
4769
4771
  "get-view": () => G(J),
4770
4772
  "get-pages-container": () => w.value,
4771
4773
  zoom: G(B),
4772
4774
  "transaction-version": T.value,
4773
- "sync-coordinator": G(yt)
4775
+ "sync-coordinator": G(bt)
4774
4776
  }, null, 8, [
4775
4777
  "get-view",
4776
4778
  "get-pages-container",
@@ -4780,12 +4782,12 @@ var Xo = (e) => {
4780
4782
  ])
4781
4783
  ])
4782
4784
  ]),
4783
- G(Yt) ? (V(), j(Da, {
4785
+ G(Xt) ? (V(), j(Oa, {
4784
4786
  key: 0,
4785
- edit: G(Yt),
4786
- "get-view": cn,
4787
- onClose: G(on),
4788
- onRemove: G(sn)
4787
+ edit: G(Xt),
4788
+ "get-view": ln,
4789
+ onClose: G(sn),
4790
+ onRemove: G(cn)
4789
4791
  }, null, 8, [
4790
4792
  "edit",
4791
4793
  "onClose",
@@ -4793,39 +4795,39 @@ var Xo = (e) => {
4793
4795
  ])) : M("", !0),
4794
4796
  Le(P("aside", {
4795
4797
  class: "docx-editor-vue__note-editor",
4796
- "aria-label": jt.value,
4797
- onKeydown: n[16] ||= Re(q((...e) => G(Dt) && G(Dt)(...e), ["stop", "prevent"]), ["esc"])
4798
- }, [P("header", cs, [P("span", null, W(jt.value), 1), P("button", {
4798
+ "aria-label": Mt.value,
4799
+ onKeydown: n[16] ||= Re(q((...e) => G(Ot) && G(Ot)(...e), ["stop", "prevent"]), ["esc"])
4800
+ }, [P("header", ls, [P("span", null, W(Mt.value), 1), P("button", {
4799
4801
  type: "button",
4800
4802
  "aria-label": G(te)("common.closeDialog"),
4801
- onClick: n[15] ||= (...e) => G(Dt) && G(Dt)(...e)
4802
- }, " × ", 8, ls)]), P("div", {
4803
+ onClick: n[15] ||= (...e) => G(Ot) && G(Ot)(...e)
4804
+ }, " × ", 8, us)]), P("div", {
4803
4805
  ref_key: "notePmRef",
4804
4806
  ref: Ee,
4805
4807
  class: "docx-editor-vue__note-editor-host"
4806
- }, null, 512)], 40, ss), [[Fe, G(dt)]]),
4807
- F(wa, {
4808
- "image-info": G(Pt),
4808
+ }, null, 512)], 40, cs), [[Fe, G(dt)]]),
4809
+ F(Ta, {
4810
+ "image-info": G(Ft),
4809
4811
  zoom: G(B),
4810
4812
  view: X.value,
4811
- onDeselect: n[17] ||= (e) => Pt.value = null,
4812
- onInteractStart: n[18] ||= (e) => Ft.value = !0,
4813
- onInteractEnd: n[19] ||= (e) => Ft.value = !1,
4814
- onContextMenu: G(gn)
4813
+ onDeselect: n[17] ||= (e) => Ft.value = null,
4814
+ onInteractStart: n[18] ||= (e) => It.value = !0,
4815
+ onInteractEnd: n[19] ||= (e) => It.value = !1,
4816
+ onContextMenu: G(_n)
4815
4817
  }, null, 8, [
4816
4818
  "image-info",
4817
4819
  "zoom",
4818
4820
  "view",
4819
4821
  "onContextMenu"
4820
4822
  ]),
4821
- F(Ja, {
4822
- data: G(zt),
4823
+ F(Ya, {
4824
+ data: G(Bt),
4823
4825
  "read-only": f.value,
4824
- onNavigate: G(Ht),
4825
- onCopy: Sn,
4826
- onEdit: G(Gt),
4827
- onRemove: G(Kt),
4828
- onClose: n[20] ||= (e) => zt.value = null
4826
+ onNavigate: G(Ut),
4827
+ onCopy: Cn,
4828
+ onEdit: G(Wt),
4829
+ onRemove: G(qt),
4830
+ onClose: n[20] ||= (e) => Bt.value = null
4829
4831
  }, null, 8, [
4830
4832
  "data",
4831
4833
  "read-only",
@@ -4833,24 +4835,24 @@ var Xo = (e) => {
4833
4835
  "onEdit",
4834
4836
  "onRemove"
4835
4837
  ]),
4836
- G(Jt) ? (V(), N("button", {
4838
+ G(Yt) ? (V(), N("button", {
4837
4839
  key: 1,
4838
4840
  type: "button",
4839
4841
  class: "docx-editor-vue__table-insert-btn",
4840
4842
  style: R({
4841
- left: G(Jt).x + "px",
4842
- top: G(Jt).y + "px"
4843
+ left: G(Yt).x + "px",
4844
+ top: G(Yt).y + "px"
4843
4845
  }),
4844
- "aria-label": G(Jt).type === "row" ? "Insert row" : "Insert column",
4845
- onMousedown: n[21] ||= (...e) => G(an) && G(an)(...e)
4846
- }, " + ", 44, us)) : M("", !0),
4846
+ "aria-label": G(Yt).type === "row" ? "Insert row" : "Insert column",
4847
+ onMousedown: n[21] ||= (...e) => G(on) && G(on)(...e)
4848
+ }, " + ", 44, ds)) : M("", !0),
4847
4849
  F(g, {
4848
- comments: G(xn),
4850
+ comments: G(Sn),
4849
4851
  "pages-container": w.value,
4850
4852
  zoom: G(B),
4851
- "page-width-px": Dn.value,
4853
+ "page-width-px": On.value,
4852
4854
  "sidebar-open": A.value,
4853
- "resolved-comment-ids": On.value,
4855
+ "resolved-comment-ids": kn.value,
4854
4856
  onMarkerClick: () => {}
4855
4857
  }, null, 8, [
4856
4858
  "comments",
@@ -4862,13 +4864,13 @@ var Xo = (e) => {
4862
4864
  ]),
4863
4865
  F(b, {
4864
4866
  "is-open": A.value,
4865
- comments: G(xn),
4866
- "tracked-changes": bn.value,
4867
+ comments: G(Sn),
4868
+ "tracked-changes": xn.value,
4867
4869
  "show-resolved": !0,
4868
4870
  "is-adding-comment": G($).isAddingComment.value,
4869
4871
  "add-comment-y-position": G($).addCommentYPosition.value,
4870
4872
  "pages-container": w.value,
4871
- "page-width-px": Dn.value,
4873
+ "page-width-px": On.value,
4872
4874
  zoom: G(B),
4873
4875
  "active-item-id": we.value,
4874
4876
  onClose: n[22] ||= (e) => A.value = !1,
@@ -4922,27 +4924,27 @@ var Xo = (e) => {
4922
4924
  size: 18
4923
4925
  })], 36)) : M("", !0)
4924
4926
  ], 544),
4925
- O.value ? M("", !0) : (V(), j(ka, {
4927
+ O.value ? M("", !0) : (V(), j(Aa, {
4926
4928
  key: 2,
4927
4929
  "left-offset": 12,
4928
- onToggle: G(un).handleToggleOutline
4930
+ onToggle: G(dn).handleToggleOutline
4929
4931
  }, null, 8, ["onToggle"])),
4930
- G(Xt).totalPages > 1 ? (V(), j(Aa, {
4932
+ G(Zt).totalPages > 1 ? (V(), j(ja, {
4931
4933
  key: 3,
4932
- "current-page": G(Xt).currentPage,
4933
- "total-pages": G(Xt).totalPages,
4934
- visible: G(Xt).visible
4934
+ "current-page": G(Zt).currentPage,
4935
+ "total-pages": G(Zt).totalPages,
4936
+ visible: G(Zt).visible
4935
4937
  }, null, 8, [
4936
4938
  "current-page",
4937
4939
  "total-pages",
4938
4940
  "visible"
4939
4941
  ])) : M("", !0),
4940
- F(Li, {
4942
+ F(Ri, {
4941
4943
  "is-open": O.value,
4942
4944
  headings: ke.value,
4943
4945
  "get-scroll-container": () => w.value,
4944
4946
  onClose: n[30] ||= (e) => O.value = !1,
4945
- onNavigate: G(un).handleOutlineNavigate
4947
+ onNavigate: G(dn).handleOutlineNavigate
4946
4948
  }, null, 8, [
4947
4949
  "is-open",
4948
4950
  "headings",
@@ -4950,17 +4952,17 @@ var Xo = (e) => {
4950
4952
  "onNavigate"
4951
4953
  ])
4952
4954
  ])], 544),
4953
- F(ma, {
4955
+ F(ha, {
4954
4956
  "read-only": f.value,
4955
- "context-menu": G(dn),
4956
- "image-context-menu": G(fn),
4957
- "image-context-menu-text-actions": G(pn),
4958
- "custom-text-menu-items": G(mn),
4959
- "can-open-image-properties": G(Pt) !== null,
4960
- onContextMenuAction: G(vn),
4961
- onCloseContextMenu: n[31] ||= (e) => G(dn).isOpen = !1,
4962
- onImageWrapSelect: G(_n),
4963
- onCloseImageContextMenu: n[32] ||= (e) => fn.value = null,
4957
+ "context-menu": G(fn),
4958
+ "image-context-menu": G(pn),
4959
+ "image-context-menu-text-actions": G(mn),
4960
+ "custom-text-menu-items": G(hn),
4961
+ "can-open-image-properties": G(Ft) !== null,
4962
+ onContextMenuAction: G(yn),
4963
+ onCloseContextMenu: n[31] ||= (e) => G(fn).isOpen = !1,
4964
+ onImageWrapSelect: G(vn),
4965
+ onCloseImageContextMenu: n[32] ||= (e) => pn.value = null,
4964
4966
  onOpenImageProperties: n[33] ||= (e) => ye.value = !0
4965
4967
  }, null, 8, [
4966
4968
  "read-only",
@@ -4972,44 +4974,44 @@ var Xo = (e) => {
4972
4974
  "onContextMenuAction",
4973
4975
  "onImageWrapSelect"
4974
4976
  ]),
4975
- F(Mi, {
4977
+ F(Ni, {
4976
4978
  "event-root": f.value ? null : w.value,
4977
4979
  view: G(J)
4978
4980
  }, null, 8, ["event-root", "view"])
4979
4981
  ], 6));
4980
4982
  }
4981
- }), [["__scopeId", "data-v-35e765f7"]]);
4983
+ }), [["__scopeId", "data-v-70e8f007"]]);
4982
4984
  //#endregion
4983
4985
  //#region src/utils/listState.ts
4984
- function fs() {
4986
+ function ps() {
4985
4987
  return ze;
4986
4988
  }
4987
4989
  //#endregion
4988
4990
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
4989
- var ps = ["aria-label"], ms = ["aria-label"], hs = [
4991
+ var ms = ["aria-label"], hs = ["aria-label"], gs = [
4990
4992
  "disabled",
4991
4993
  "title",
4992
4994
  "aria-label"
4993
- ], gs = [
4995
+ ], _s = [
4994
4996
  "disabled",
4995
4997
  "title",
4996
4998
  "aria-label"
4997
- ], _s = ["aria-label"], vs = [
4999
+ ], vs = ["aria-label"], ys = [
4998
5000
  "disabled",
4999
5001
  "title",
5000
5002
  "aria-label",
5001
5003
  "aria-pressed"
5002
- ], ys = [
5004
+ ], bs = [
5003
5005
  "disabled",
5004
5006
  "title",
5005
5007
  "aria-label",
5006
5008
  "aria-pressed"
5007
- ], bs = [
5009
+ ], xs = [
5008
5010
  "disabled",
5009
5011
  "title",
5010
5012
  "aria-label",
5011
5013
  "aria-pressed"
5012
- ], xs = /*#__PURE__*/ t(/* @__PURE__ */ I({
5014
+ ], Ss = /*#__PURE__*/ t(/* @__PURE__ */ I({
5013
5015
  __name: "FormattingBar",
5014
5016
  props: {
5015
5017
  currentFormatting: {},
@@ -5051,7 +5053,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5051
5053
  "redo"
5052
5054
  ],
5053
5055
  setup(e, { emit: t }) {
5054
- let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = k(() => a.currentFormatting ?? {}), l = k(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = k(() => c.value.listState ?? fs()), d = k(() => {
5056
+ let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = k(() => a.currentFormatting ?? {}), l = k(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = k(() => c.value.listState ?? ps()), d = k(() => {
5055
5057
  let e = c.value.color;
5056
5058
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5057
5059
  }), f = k(() => Qe(u.value) > 0 || (c.value.indentLeft ?? 0) > 0);
@@ -5081,7 +5083,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5081
5083
  }, [F(i, {
5082
5084
  name: "undo",
5083
5085
  size: 18
5084
- })], 40, hs), P("button", {
5086
+ })], 40, gs), P("button", {
5085
5087
  type: "button",
5086
5088
  class: "docx-formatting-bar__btn",
5087
5089
  disabled: e.disabled || !e.canRedo,
@@ -5091,7 +5093,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5091
5093
  }, [F(i, {
5092
5094
  name: "redo",
5093
5095
  size: 18
5094
- })], 40, gs)], 8, ms),
5096
+ })], 40, _s)], 8, hs),
5095
5097
  r[13] ||= P("span", {
5096
5098
  class: "docx-formatting-bar__divider",
5097
5099
  role: "separator"
@@ -5122,7 +5124,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5122
5124
  }, [F(i, {
5123
5125
  name: "format_bold",
5124
5126
  size: 18
5125
- })], 42, vs),
5127
+ })], 42, ys),
5126
5128
  P("button", {
5127
5129
  type: "button",
5128
5130
  class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
@@ -5134,7 +5136,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5134
5136
  }, [F(i, {
5135
5137
  name: "format_italic",
5136
5138
  size: 18
5137
- })], 42, ys),
5139
+ })], 42, bs),
5138
5140
  P("button", {
5139
5141
  type: "button",
5140
5142
  class: L(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
@@ -5146,8 +5148,8 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5146
5148
  }, [F(i, {
5147
5149
  name: "format_underlined",
5148
5150
  size: 18
5149
- })], 42, bs)
5150
- ], 8, _s),
5151
+ })], 42, xs)
5152
+ ], 8, vs),
5151
5153
  e.showTextColorPicker ? (V(), N(D, { key: 1 }, [r[12] ||= P("span", {
5152
5154
  class: "docx-formatting-bar__divider",
5153
5155
  role: "separator"
@@ -5189,9 +5191,9 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5189
5191
  "disabled",
5190
5192
  "can-outdent"
5191
5193
  ])) : M("", !0)
5192
- ], 10, ps));
5194
+ ], 10, ms));
5193
5195
  }
5194
- }), [["__scopeId", "data-v-d8fef805"]]), Ss = [
5196
+ }), [["__scopeId", "data-v-d8fef805"]]), Cs = [
5195
5197
  {
5196
5198
  value: .5,
5197
5199
  label: "50%"
@@ -5216,7 +5218,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5216
5218
  value: 2,
5217
5219
  label: "200%"
5218
5220
  }
5219
- ], Cs = /*#__PURE__*/ t(/* @__PURE__ */ I({
5221
+ ], ws = /*#__PURE__*/ t(/* @__PURE__ */ I({
5220
5222
  __name: "ZoomControl",
5221
5223
  props: {
5222
5224
  value: { default: 1 },
@@ -5233,7 +5235,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5233
5235
  },
5234
5236
  emits: ["change"],
5235
5237
  setup(e, { emit: t }) {
5236
- let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? Ss), o = k(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = k(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = k(() => o.value ? String(o.value.value) : String(r.value)), l = k(() => {
5238
+ let { Select: n } = h(), r = e, i = t, a = k(() => r.levels ?? Cs), o = k(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = k(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = k(() => o.value ? String(o.value.value) : String(r.value)), l = k(() => {
5237
5239
  let e = a.value.map((e) => ({
5238
5240
  value: String(e.value),
5239
5241
  label: e.label
@@ -5261,7 +5263,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5261
5263
  "disabled"
5262
5264
  ]));
5263
5265
  }
5264
- }), [["__scopeId", "data-v-8079e07f"]]), ws = (e, t, n = {}) => {
5266
+ }), [["__scopeId", "data-v-8079e07f"]]), Ts = (e, t, n = {}) => {
5265
5267
  let { colorMode: r = oe, locale: i = "en", ...a } = n;
5266
5268
  return new Promise((n, o) => {
5267
5269
  let s = H(null), c = null, l = !1, d = {
@@ -5287,7 +5289,7 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5287
5289
  }
5288
5290
  };
5289
5291
  c = A({ setup() {
5290
- return () => Ee(ds, {
5292
+ return () => Ee(fs, {
5291
5293
  ...a,
5292
5294
  documentBuffer: e,
5293
5295
  ref: s,
@@ -5302,4 +5304,4 @@ var ps = ["aria-label"], ms = ["aria-label"], hs = [
5302
5304
  });
5303
5305
  };
5304
5306
  //#endregion
5305
- export { Ci as AutocompleteCaretOverlay, ni as DEFAULT_AI_SUGGESTION_PRESETS, St as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, $r as DOCUMENT_PRESET_VERSION, ei as DOCUMENT_STYLE_SET_VERSION, ds as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, xs as FormattingBar, me as HyperlinkDialog, he as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Xr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, Cs as ZoomControl, Y as acceptAutocompleteSuggestion, Ct as acceptAutocompleteWord, _t as anonymizationDecorationsKey, wt as appendAutocompleteToken, Vn as applyFolioAIEditOperations, ri as applySuggestions, Tt as autocompleteSuggestionKey, Et as autocompleteSuggestionPlugin, oi as buildPositionalText, Dt as clearAutocompleteSuggestion, An as clearTemplateSlashMenu, ue as colorModePlugin, jn as consumeTemplateSlashQuery, fi as createAICitationDecorationsPlugin, ti as createDocx, Gr as createEmptyDocument, Gn as createFolioAIEditSnapshot, Zr as createStellaStyleDocumentPreset, Qr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, hr as deriveBlockId, Jn as diffWordSegments, Kr as extractDocumentStyleSet, qr as extractDocumentStyleSetFromDocx, Ot as finishAutocompleteSuggestion, hi as fromMarkdown, vt as getAnonymizationMatches, kt as getAutocompleteSuggestion, lt as getDocumentWatermark, ui as getFolioCaretViewportRect, gr as getFolioParaIdFromBlockId, di as getFolioSelectionViewportRect, an as getTemplateDirectives, Mn as getTemplateSlashMenu, Qn as hashFolioAIBlockText, u as i18nPlugin, Ge as insertImageFromFile, qe as insertPageBreakInView, Ye as insertTableInView, J as insertTableOfContentsInView, Jr as inspectDocumentStyles, Yr as inspectDocumentStylesFromDocx, vr as isFolioBlockId, yr as isSequentialFolioBlockId, ii as isSuggestionStale, $n as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, ws as renderAsync, Nn as resetTemplateSlashQuery, ai as resolveSuggestionAnchor, sn as scanDirectives, li as scrollFolioPositionIntoView, pi as setAICitationsMeta, si as setAISuggestionsMeta, mi as setActiveCitationMeta, bt as setAnonymizationTermsMeta, dt as setDocumentWatermark, ci as setFocusedSuggestionMeta, kn as setTemplatePreviewValues, X as shouldTriggerAutocomplete, jt as startAutocompleteSuggestion, Pn as templateSlashMenuKey, gi as toMarkdown, _i as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };
5307
+ export { wi as AutocompleteCaretOverlay, ri as DEFAULT_AI_SUGGESTION_PRESETS, Y as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, ei as DOCUMENT_PRESET_VERSION, ti as DOCUMENT_STYLE_SET_VERSION, fs as DocxEditor, w as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, Ss as FormattingBar, me as HyperlinkDialog, he as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Zr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, Se as WatermarkDialog, ws as ZoomControl, wt as acceptAutocompleteSuggestion, Tt as acceptAutocompleteWord, yt as anonymizationDecorationsKey, Et as appendAutocompleteToken, Un as applyFolioAIEditOperations, ii as applySuggestions, Dt as autocompleteSuggestionKey, Ot as autocompleteSuggestionPlugin, si as buildPositionalText, kt as clearAutocompleteSuggestion, Mn as clearTemplateSlashMenu, ue as colorModePlugin, Nn as consumeTemplateSlashQuery, pi as createAICitationDecorationsPlugin, ni as createDocx, Kr as createEmptyDocument, qn as createFolioAIEditSnapshot, Qr as createStellaStyleDocumentPreset, $r as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, _r as deriveBlockId, Xn as diffWordSegments, qr as extractDocumentStyleSet, Jr as extractDocumentStyleSetFromDocx, At as finishAutocompleteSuggestion, gi as fromMarkdown, bt as getAnonymizationMatches, jt as getAutocompleteSuggestion, dt as getDocumentWatermark, di as getFolioCaretViewportRect, vr as getFolioParaIdFromBlockId, fi as getFolioSelectionViewportRect, sn as getTemplateDirectives, Pn as getTemplateSlashMenu, er as hashFolioAIBlockText, u as i18nPlugin, Ge as insertImageFromFile, qe as insertPageBreakInView, Ye as insertTableInView, J as insertTableOfContentsInView, Yr as inspectDocumentStyles, Xr as inspectDocumentStylesFromDocx, br as isFolioBlockId, xr as isSequentialFolioBlockId, ai as isSuggestionStale, tr as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, Ts as renderAsync, Fn as resetTemplateSlashQuery, oi as resolveSuggestionAnchor, ln as scanDirectives, ui as scrollFolioPositionIntoView, mi as setAICitationsMeta, ci as setAISuggestionsMeta, hi as setActiveCitationMeta, St as setAnonymizationTermsMeta, pt as setDocumentWatermark, li as setFocusedSuggestionMeta, jn as setTemplatePreviewValues, Mt as shouldTriggerAutocomplete, Nt as startAutocompleteSuggestion, In as templateSlashMenuKey, _i as toMarkdown, vi as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };