@stll/folio-vue 0.6.1 → 0.8.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, O as n, P as r, _ as i, d as a, f as o, g as s, j as c, k as l, m as u, p as d, u as f, y as p } from "./WatermarkDialog-r4wmldt4.js";
2
2
  import { D as m, E as h, d as g, f as _, i as v, n as y, r as b, t as x, v as ee, w as S, y as te } from "./ListButtons-DXqMvba3.js";
3
3
  import { t as ne } from "./zIndex-BY0qa8Au.js";
4
- import { a as re, i as ie, o as C, r as ae, t as oe } from "./useZoom-BxDANpqb.js";
4
+ import { a as re, i as ie, o as C, r as ae, t as oe } from "./useZoom-zJvuJlUd.js";
5
5
  import { FindReplaceDialog as w, FootnotePropertiesDialog as T, HyperlinkDialog as se, ImagePositionDialog as ce, ImagePropertiesDialog as le, InsertImageDialog as E, InsertSymbolDialog as D, InsertTableDialog as ue, PageSetupDialog as de, PasteSpecialDialog as fe, SplitCellDialog as O, TablePropertiesDialog as k, WatermarkDialog as A } from "./dialogs.js";
6
6
  import { Fragment as j, Teleport as M, computed as N, createApp as pe, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createSlots as me, createStaticVNode as he, createTextVNode as ge, createVNode as R, defineComponent as z, h as B, inject as _e, mergeProps as ve, nextTick as ye, normalizeClass as V, normalizeStyle as H, onBeforeUnmount as be, onMounted as xe, openBlock as U, provide as Se, ref as W, renderList as G, renderSlot as Ce, shallowRef as we, toDisplayString as K, unref as q, vModelText as Te, watch as J, withCtx as Ee, withDirectives as De, withKeys as Oe, withModifiers as Y } from "vue";
7
7
  import { createStyleResolver as ke, extractSelectionState as Ae, getSelectedText as je, insertImageFromFile as Me, insertImageFromFile as Ne, insertPageBreakInView as Pe, insertPageBreakInView as Fe, insertTableInView as X, insertTableInView as Ie, insertTableOfContentsInView as Le, insertTableOfContentsInView as Re } from "@stll/folio-core/prosemirror";
@@ -10,63 +10,67 @@ import { inspectDocxCompatibility as Be } from "@stll/folio-core/docx/compatibil
10
10
  import { clearAllCaches as Ve, resetCanvasContext as He } from "@stll/folio-core/layout-bridge/engine/measuring";
11
11
  import { onFontsLoaded as Ue } from "@stll/folio-core/utils/fontLoader";
12
12
  import { twipsToPixels as We } from "@stll/folio-core/paged-layout/sectionGeometry";
13
- import { measureDirectiveGutter as Ge, projectRangesToRects as Ke } from "@stll/folio-core/paged-layout/rangeProjection";
14
- import { prefersReducedMotionBehavior as qe } from "@stll/folio-core/paged-layout/scrollNavigation";
15
- import { anonymizationDecorationsKey as Je, getAnonymizationMatches as Ye, getAnonymizationMatches as Xe, setAnonymizationTermsMeta as Ze, slugAnonymizationLabel as Qe } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
16
- import { NodeSelection as $e, Selection as et, TextSelection as Z } from "prosemirror-state";
17
- import { pixelsToEmu as tt } from "@stll/folio-core/utils/units";
18
- import { IMAGE_LAYOUT_OPTIONS as nt, captureInlinePositionEmu as rt, deriveLayoutChoice as it, findImageElement as at, isImageLayoutOptionEnabled as ot, toolbarValueToLayoutTarget as st } from "@stll/folio-core/layout-painter/imageLayout";
19
- import { isTrackChangesMode as ct, toggledTrackChangesMode as lt } from "@stll/folio-core/managers/EditorModeManager";
20
- import { clickToPositionDom as ut } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
21
- import { calculateResizedImageDimensions as dt, commitImageFloatMove as ft, commitImageInlineMove as pt, commitImageResize as mt, isFloatingImage as ht } from "@stll/folio-core/prosemirror/imageCommit";
22
- import { findBodyPmAnchor as gt, findBodyPmSpans as _t } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
23
- import { getTemplateDirectives as vt, getTemplateDirectives as yt, scanDirectives as bt } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
24
- import { closeHistory as xt } from "prosemirror-history";
25
- import { clearFormatting as St } from "@stll/folio-core/prosemirror/commands/formatting";
26
- import { getTableContext as Ct } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
27
- import { PENDING_COMMENT_ID as wt, createCommentIdAllocator as Tt, seedCommentAllocator as Et } from "@stll/folio-core/prosemirror/commentIdAllocator";
28
- import { createComment as Dt } from "@stll/folio-core/prosemirror/commentOps";
29
- import { findChangeRange as Ot } from "@stll/folio-core/prosemirror/queries";
30
- import { acceptAIEditRevision as kt, acceptChange as At, findAIEditRevisionRange as jt, rejectAIEditRevision as Mt, rejectChange as Nt } from "@stll/folio-core/prosemirror/commands/comments";
31
- import { makeRevisionInfo as Pt } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
32
- import { setTemplatePreviewValues as Ft } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
33
- import { clearTemplateSlashMenu as It, consumeTemplateSlashQuery as Lt, getTemplateSlashMenu as Rt, resetTemplateSlashQuery as Q, templateSlashMenuKey as zt } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
34
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as $, applyFolioAIEditOperations as Bt, applyFolioAIEditOperations as Vt, applyFolioDocumentOperations as Ht, assertSupportedFolioDocumentOperationVersion as Ut, createFolioAIEditSnapshot as Wt, createFolioAIEditSnapshot as Gt, diffWordSegments as Kt, getCommentAnchorsFromDoc as qt, getFolioDocumentOperationIssues as Jt, getTrackedChangesFromDoc as Yt, hashFolioAIBlockText as Xt, normalizeFolioAIBlockText as Zt } from "@stll/folio-core/ai-edits";
35
- import { findPageIndexContainingPmPos as Qt } from "@stll/folio-core/layout-engine";
36
- import { findParagraphFragmentsByParaId as $t, flashParagraphElements as en } from "@stll/folio-core/paged-layout/paragraphFlash";
37
- import { blockSdtAttrsToSdtProperties as tn, findBlockSdtMatch as nn, findBlockSdtMatches as rn, removeContentControlTr as an, setContentControlContentTr as on, setContentControlValueTr as sn } from "@stll/folio-core/prosemirror/commands/contentControls";
38
- import { setContentControlContentBlocksTr as cn } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
39
- import { clampRangeToDocSize as ln, resolveFolioAIBlockRange as un } from "@stll/folio-core/ai-edits/blockRange";
40
- import { getPageTextFromLayout as dn } from "@stll/folio-core/paged-layout/pageText";
41
- import { applyStyle as fn, removeTabStop as pn, setIndentFirstLine as mn, setIndentLeft as hn, setIndentRight as gn } from "@stll/folio-core/prosemirror/commands/paragraph";
42
- import { getCachedNumberingMap as _n } from "@stll/folio-core/docx";
43
- import { insertPageBreak as vn } from "@stll/folio-core/prosemirror/commands/pageBreak";
44
- import { insertSectionBreakContinuous as yn, insertSectionBreakNextPage as bn } from "@stll/folio-core/prosemirror/commands/sectionBreak";
45
- import { editHyperlinkAtCursor as xn, removeHyperlinkAtCursor as Sn } from "@stll/folio-core/prosemirror/commands/hyperlink";
46
- import { collectHeadings as Cn } from "@stll/folio-core/utils/headingCollector";
47
- import { TABLE_INSERT_HIDE_DELAY_MS as wn, detectTableInsertHover as Tn } from "@stll/folio-core/layout-bridge/tableInsertHover";
48
- import { createCellDragTracker as En, findCellPosFromPmPos as Dn } from "@stll/folio-core/prosemirror/cellDragSelection";
49
- import { getDocumentWatermark as On, setDocumentWatermark as kn } from "@stll/folio-core/watermark";
50
- import { createEmptyDocument as An } from "@stll/folio-core/utils/createDocument";
51
- import { createDocx as jn } from "@stll/folio-core/docx/rezip";
52
- import { deriveBlockId as Mn, getFolioParaIdFromBlockId as Nn, isFolioBlockId as Pn, isSequentialFolioBlockId as Fn } from "@stll/folio-core/types/block-id";
53
- import { DEFAULT_AI_SUGGESTION_PRESETS as In } from "@stll/folio-core/ai-suggestions/types";
54
- import { applySuggestions as Ln } from "@stll/folio-core/ai-suggestions/apply";
55
- import { isSuggestionStale as Rn, resolveSuggestionAnchor as zn } from "@stll/folio-core/ai-suggestions/conflict";
56
- import { buildPositionalText as Bn } from "@stll/folio-core/ai-suggestions/text-positions";
57
- import { setAISuggestionsMeta as Vn, setFocusedSuggestionMeta as Hn } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
58
- import { scrollFolioPositionIntoView as Un } from "@stll/folio-core/paged-layout/scrollToPmPosition";
59
- import { getFolioCaretViewportRect as Wn, getFolioSelectionViewportRect as Gn } from "@stll/folio-core/paged-layout/selectionViewportRect";
60
- import { createAICitationDecorationsPlugin as Kn, setAICitationsMeta as qn, setActiveCitationMeta as Jn } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
61
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as Yn, acceptAutocompleteSuggestion as Xn, acceptAutocompleteWord as Zn, appendAutocompleteToken as Qn, autocompleteSuggestionKey as $n, autocompleteSuggestionPlugin as er, clearAutocompleteSuggestion as tr, finishAutocompleteSuggestion as nr, getAutocompleteSuggestion as rr, shouldTriggerAutocomplete as ir, startAutocompleteSuggestion as ar } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
62
- import { fromMarkdown as or, toMarkdown as sr, toMarkdownResult as cr } from "@stll/folio-core/markdown";
13
+ import { createLatestRequestGate as Ge } from "@stll/folio-core/controller/latestRequestGate";
14
+ import { measureDirectiveGutter as Ke, projectRangesToRects as qe } from "@stll/folio-core/paged-layout/rangeProjection";
15
+ import { prefersReducedMotionBehavior as Je } from "@stll/folio-core/paged-layout/scrollNavigation";
16
+ import { anonymizationDecorationsKey as Ye, getAnonymizationMatches as Xe, getAnonymizationMatches as Ze, setAnonymizationTermsMeta as Qe, slugAnonymizationLabel as $e } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
17
+ import { NodeSelection as Z, Selection as et, TextSelection as tt } from "prosemirror-state";
18
+ import { pixelsToEmu as nt } from "@stll/folio-core/utils/units";
19
+ import { IMAGE_LAYOUT_OPTIONS as rt, captureInlinePositionEmu as it, deriveLayoutChoice as at, findImageElement as ot, isImageLayoutOptionEnabled as st, toolbarValueToLayoutTarget as ct } from "@stll/folio-core/layout-painter/imageLayout";
20
+ import { isTrackChangesMode as lt, toggledTrackChangesMode as ut } from "@stll/folio-core/managers/EditorModeManager";
21
+ import { clickToPositionDom as dt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
22
+ import { calculateResizedImageDimensions as ft, commitImageFloatMove as pt, commitImageInlineMove as mt, commitImageResize as ht, isFloatingImage as gt } from "@stll/folio-core/prosemirror/imageCommit";
23
+ import { findBodyPmAnchor as _t, findBodyPmSpans as vt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
24
+ import { getTemplateDirectives as yt, getTemplateDirectives as bt, scanDirectives as xt } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
25
+ import { closeHistory as St } from "prosemirror-history";
26
+ import { clearFormatting as Ct } from "@stll/folio-core/prosemirror/commands/formatting";
27
+ import { getTableContext as wt } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
28
+ import { PENDING_COMMENT_ID as Tt, createCommentIdAllocator as Et, seedCommentAllocator as Dt } from "@stll/folio-core/prosemirror/commentIdAllocator";
29
+ import { createComment as Ot } from "@stll/folio-core/prosemirror/commentOps";
30
+ import { findChangeRange as kt } from "@stll/folio-core/prosemirror/queries";
31
+ import { acceptAIEditRevision as At, acceptChange as jt, findAIEditRevisionRange as Mt, rejectAIEditRevision as Nt, rejectChange as Pt } from "@stll/folio-core/prosemirror/commands/comments";
32
+ import { makeRevisionInfo as Ft } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
33
+ import { findPageIndexContainingPmPos as It } from "@stll/folio-core/layout-engine";
34
+ import { setTemplatePreviewValues as Lt } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
35
+ import { clearTemplateSlashMenu as Rt, consumeTemplateSlashQuery as Q, getTemplateSlashMenu as zt, resetTemplateSlashQuery as $, templateSlashMenuKey as Bt } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
36
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Vt, applyFolioAIEditOperations as Ht, applyFolioAIEditOperations as Ut, applyFolioDocumentOperations as Wt, assertSupportedFolioDocumentOperationVersion as Gt, createFolioAIEditSnapshot as Kt, createFolioAIEditSnapshot as qt, diffWordSegments as Jt, getCommentAnchorsFromDoc as Yt, getFolioDocumentOperationIssues as Xt, getTrackedChangesFromDoc as Zt, hashFolioAIBlockText as Qt, normalizeFolioAIBlockText as $t } from "@stll/folio-core/ai-edits";
37
+ import { findParagraphFragmentsByParaId as en, flashParagraphElements as tn } from "@stll/folio-core/paged-layout/paragraphFlash";
38
+ import { blockSdtAttrsToSdtProperties as nn, findBlockSdtMatch as rn, findBlockSdtMatches as an, removeContentControlTr as on, setContentControlContentTr as sn, setContentControlValueTr as cn } from "@stll/folio-core/prosemirror/commands/contentControls";
39
+ import { setContentControlContentBlocksTr as ln } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
40
+ import { clampRangeToDocSize as un, resolveFolioAIBlockRange as dn } from "@stll/folio-core/ai-edits/blockRange";
41
+ import { getPageTextFromLayout as fn } from "@stll/folio-core/paged-layout/pageText";
42
+ import { applyStyle as pn, removeTabStop as mn, setIndentFirstLine as hn, setIndentLeft as gn, setIndentRight as _n } from "@stll/folio-core/prosemirror/commands/paragraph";
43
+ import { getCachedNumberingMap as vn } from "@stll/folio-core/docx";
44
+ import { insertPageBreak as yn } from "@stll/folio-core/prosemirror/commands/pageBreak";
45
+ import { insertSectionBreakContinuous as bn, insertSectionBreakNextPage as xn } from "@stll/folio-core/prosemirror/commands/sectionBreak";
46
+ import { editHyperlinkAtCursor as Sn, removeHyperlinkAtCursor as Cn } from "@stll/folio-core/prosemirror/commands/hyperlink";
47
+ import { collectHeadings as wn } from "@stll/folio-core/utils/headingCollector";
48
+ import { TABLE_INSERT_HIDE_DELAY_MS as Tn, detectTableInsertHover as En } from "@stll/folio-core/layout-bridge/tableInsertHover";
49
+ import { createCellDragTracker as Dn, findCellPosFromPmPos as On } from "@stll/folio-core/prosemirror/cellDragSelection";
50
+ import { getDocumentWatermark as kn, setDocumentWatermark as An } from "@stll/folio-core/watermark";
51
+ import { createEmptyDocument as jn } from "@stll/folio-core/utils/createDocument";
52
+ import { extractDocumentStyleSet as Mn, extractDocumentStyleSetFromDocx as Nn, inspectDocumentStyles as Pn, inspectDocumentStylesFromDocx as Fn } from "@stll/folio-core/style-sets/extract";
53
+ import { STELLA_STYLE_SET_NAME as In, createStellaStyleDocumentPreset as Ln, createStellaStyleSet as Rn } from "@stll/folio-core/style-sets/stellaStyle";
54
+ import { DOCUMENT_PRESET_VERSION as zn, DOCUMENT_STYLE_SET_VERSION as Bn } from "@stll/folio-core/style-sets/types";
55
+ import { createDocx as Vn } from "@stll/folio-core/docx/rezip";
56
+ import { deriveBlockId as Hn, getFolioParaIdFromBlockId as Un, isFolioBlockId as Wn, isSequentialFolioBlockId as Gn } from "@stll/folio-core/types/block-id";
57
+ import { DEFAULT_AI_SUGGESTION_PRESETS as Kn } from "@stll/folio-core/ai-suggestions/types";
58
+ import { applySuggestions as qn } from "@stll/folio-core/ai-suggestions/apply";
59
+ import { isSuggestionStale as Jn, resolveSuggestionAnchor as Yn } from "@stll/folio-core/ai-suggestions/conflict";
60
+ import { buildPositionalText as Xn } from "@stll/folio-core/ai-suggestions/text-positions";
61
+ import { setAISuggestionsMeta as Zn, setFocusedSuggestionMeta as Qn } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
62
+ import { scrollFolioPositionIntoView as $n } from "@stll/folio-core/paged-layout/scrollToPmPosition";
63
+ import { getFolioCaretViewportRect as er, getFolioSelectionViewportRect as tr } from "@stll/folio-core/paged-layout/selectionViewportRect";
64
+ import { createAICitationDecorationsPlugin as nr, setAICitationsMeta as rr, setActiveCitationMeta as ir } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
65
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as ar, acceptAutocompleteSuggestion as or, acceptAutocompleteWord as sr, appendAutocompleteToken as cr, autocompleteSuggestionKey as lr, autocompleteSuggestionPlugin as ur, clearAutocompleteSuggestion as dr, finishAutocompleteSuggestion as fr, getAutocompleteSuggestion as pr, shouldTriggerAutocomplete as mr, startAutocompleteSuggestion as hr } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
66
+ import { fromMarkdown as gr, toMarkdown as _r, toMarkdownResult as vr } from "@stll/folio-core/markdown";
63
67
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
64
- var lr = [
68
+ var yr = [
65
69
  "data-folio-anonymization-label",
66
70
  "data-folio-anonymization-canonical",
67
71
  "data-folio-anonymization-selected",
68
72
  "title"
69
- ], ur = /*#__PURE__*/ t(/* @__PURE__ */ z({
73
+ ], br = /*#__PURE__*/ t(/* @__PURE__ */ z({
70
74
  __name: "AnonymizationRectsOverlay",
71
75
  props: {
72
76
  getView: { type: Function },
@@ -81,31 +85,31 @@ var lr = [
81
85
  selectionSeq: {}
82
86
  },
83
87
  setup(e) {
84
- let t = e, n = W(null), r = W([]), i = 0, a = null;
88
+ let t = e, n = W(null), r = W([]), i = Ge(), a = null;
85
89
  function o() {
86
90
  a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
87
91
  a = null, s();
88
92
  });
89
93
  }
90
94
  async function s() {
91
- let e = ++i, n = t.getView(), a = t.getPagesContainer(), o = t.editorState;
95
+ let e = i.begin(), n = t.getView(), a = t.getPagesContainer(), o = t.editorState;
92
96
  if (!n || !a || !o) {
93
97
  r.value = [];
94
98
  return;
95
99
  }
96
- let s = Xe(o);
100
+ let s = Ze(o);
97
101
  if (s.length === 0) {
98
102
  r.value = [];
99
103
  return;
100
104
  }
101
- let c = await Ke(s, {
105
+ let c = await qe(s, {
102
106
  pagesContainer: a,
103
107
  zoom: t.zoom,
104
108
  layout: t.layout,
105
109
  blocks: t.blocks,
106
110
  measures: t.measures
107
111
  });
108
- if (e !== i) return;
112
+ if (!e()) return;
109
113
  let l = t.zoom;
110
114
  r.value = c.map(({ range: e, rects: t }) => ({
111
115
  label: e.label,
@@ -140,7 +144,7 @@ var lr = [
140
144
  index: a
141
145
  }, i.item(a)?.scrollIntoView({
142
146
  block: "center",
143
- behavior: qe()
147
+ behavior: Je()
144
148
  });
145
149
  }
146
150
  J(() => [t.selectedCanonical, t.selectionSeq], () => l(), { flush: "post" });
@@ -163,7 +167,7 @@ var lr = [
163
167
  return xe(() => {
164
168
  document.addEventListener("click", u), o();
165
169
  }), be(() => {
166
- document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
170
+ i.invalidate(), document.removeEventListener("click", u), a !== null && (cancelAnimationFrame(a), a = null);
167
171
  }), (t, i) => (U(), I("div", {
168
172
  ref_key: "rootRef",
169
173
  ref: n,
@@ -171,7 +175,7 @@ var lr = [
171
175
  "data-folio-anonymization-overlay": ""
172
176
  }, [(U(!0), I(j, null, G(r.value, (t) => (U(), I(j, { key: `${t.label}:${t.canonical}` }, [(U(!0), I(j, null, G(t.rects, (n, r) => (U(), I("span", {
173
177
  key: `${t.canonical}:${r}:${n.left}:${n.top}`,
174
- class: V(["folio-anonymization-term", `folio-anonymization-term--${q(Qe)(t.label)}`]),
178
+ class: V(["folio-anonymization-term", `folio-anonymization-term--${q($e)(t.label)}`]),
175
179
  "data-folio-anonymization-label": t.label,
176
180
  "data-folio-anonymization-canonical": t.canonical,
177
181
  "data-folio-anonymization-selected": t.canonical === e.selectedCanonical ? "true" : void 0,
@@ -183,12 +187,12 @@ var lr = [
183
187
  width: `${n.width}px`,
184
188
  height: `${n.height}px`
185
189
  })
186
- }, null, 14, lr))), 128))], 64))), 128))], 512));
190
+ }, null, 14, yr))), 128))], 64))), 128))], 512));
187
191
  }
188
- }), [["__scopeId", "data-v-c7db88e1"]]), dr = { class: "doc-outline__header" }, fr = { class: "doc-outline__body" }, pr = {
192
+ }), [["__scopeId", "data-v-df8fe7df"]]), xr = { class: "doc-outline__header" }, Sr = { class: "doc-outline__body" }, Cr = {
189
193
  key: 0,
190
194
  class: "doc-outline__empty"
191
- }, mr = /*#__PURE__*/ t(/* @__PURE__ */ z({
195
+ }, wr = /*#__PURE__*/ t(/* @__PURE__ */ z({
192
196
  __name: "DocumentOutline",
193
197
  props: {
194
198
  isOpen: { type: Boolean },
@@ -217,7 +221,7 @@ var lr = [
217
221
  role: "navigation",
218
222
  "aria-label": "Document outline",
219
223
  onMousedown: n[1] ||= Y(() => {}, ["stop"])
220
- }, [L("div", dr, [L("button", {
224
+ }, [L("div", xr, [L("button", {
221
225
  class: "doc-outline__back",
222
226
  title: "Close outline",
223
227
  "aria-label": "Close outline",
@@ -225,7 +229,7 @@ var lr = [
225
229
  }, [R(r, {
226
230
  name: "arrow_back",
227
231
  size: 20
228
- })]), n[2] ||= L("span", { class: "doc-outline__title" }, "Document Outline", -1)]), L("div", fr, [e.headings.length === 0 ? (U(), I("div", pr, "No headings found")) : (U(), P(q(i), {
232
+ })]), n[2] ||= L("span", { class: "doc-outline__title" }, "Document Outline", -1)]), L("div", Sr, [e.headings.length === 0 ? (U(), I("div", Cr, "No headings found")) : (U(), P(q(i), {
229
233
  key: 1,
230
234
  items: o.value,
231
235
  "get-scroll-container": e.getScrollContainer ?? (() => null),
@@ -233,7 +237,7 @@ var lr = [
233
237
  "aria-label": "Document outline"
234
238
  }, null, 8, ["items", "get-scroll-container"]))])], 36)) : F("", !0);
235
239
  }
236
- }), [["__scopeId", "data-v-0797b3b1"]]), hr = /* @__PURE__ */ z({
240
+ }), [["__scopeId", "data-v-0797b3b1"]]), Tr = /* @__PURE__ */ z({
237
241
  __name: "DocxEditorDialogs",
238
242
  props: {
239
243
  view: {},
@@ -300,10 +304,10 @@ var lr = [
300
304
  }, null, 8, ["is-open", "section-properties"])
301
305
  ], 64));
302
306
  }
303
- }), gr = {
307
+ }), Er = {
304
308
  key: 0,
305
309
  class: "docx-editor-vue__title-bar"
306
- }, _r = { class: "docx-editor-vue__title-bar-left" }, vr = { class: "docx-editor-vue__title-bar-center" }, yr = { class: "docx-editor-vue__title-bar-right" }, br = /* @__PURE__ */ z({
310
+ }, Dr = { class: "docx-editor-vue__title-bar-left" }, Or = { class: "docx-editor-vue__title-bar-center" }, kr = { class: "docx-editor-vue__title-bar-right" }, Ar = /* @__PURE__ */ z({
307
311
  __name: "DocxEditorMenuBar",
308
312
  props: {
309
313
  showMenuBar: {
@@ -335,9 +339,9 @@ var lr = [
335
339
  ],
336
340
  setup(e, { emit: t }) {
337
341
  let n = t;
338
- return (t, r) => e.showMenuBar ? (U(), I("div", gr, [
339
- L("div", _r, [Ce(t.$slots, "title-bar-left")]),
340
- L("div", vr, [R(h, {
342
+ return (t, r) => e.showMenuBar ? (U(), I("div", Er, [
343
+ L("div", Dr, [Ce(t.$slots, "title-bar-left")]),
344
+ L("div", Or, [R(h, {
341
345
  "model-value": e.documentName,
342
346
  editable: e.documentNameEditable,
343
347
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -352,40 +356,40 @@ var lr = [
352
356
  "show-help-menu",
353
357
  "show-table-insert"
354
358
  ])]),
355
- L("div", yr, [Ce(t.$slots, "title-bar-right")])
359
+ L("div", kr, [Ce(t.$slots, "title-bar-right")])
356
360
  ])) : F("", !0);
357
361
  }
358
- }), xr = Symbol("docx-portal-class");
359
- function Sr(e) {
360
- Se(xr, N(() => ({
362
+ }), jr = Symbol("docx-portal-class");
363
+ function Mr(e) {
364
+ Se(jr, N(() => ({
361
365
  "ep-root": !0,
362
366
  dark: !!q(e)
363
367
  })));
364
368
  }
365
- function Cr() {
366
- return _e(xr, N(() => ({ "ep-root": !0 })));
369
+ function Nr() {
370
+ return _e(jr, N(() => ({ "ep-root": !0 })));
367
371
  }
368
372
  //#endregion
369
373
  //#region src/components/ImageContextMenu.vue?vue&type=script&setup=true&lang.ts
370
- var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "image-ctx-menu__label" }, Dr = {
374
+ var Pr = ["aria-label"], Fr = { class: "image-ctx-menu__icon" }, Ir = { class: "image-ctx-menu__label" }, Lr = {
371
375
  key: 1,
372
376
  class: "image-ctx-menu__divider",
373
377
  role: "separator"
374
- }, Or = [
378
+ }, Rr = [
375
379
  "data-wrap-type",
376
380
  "data-current",
377
381
  "data-disabled",
378
382
  "disabled",
379
383
  "title",
380
384
  "onClick"
381
- ], kr = { class: "image-ctx-menu__icon" }, Ar = { class: "image-ctx-menu__label" }, jr = ["aria-label"], Mr = ["disabled", "onClick"], Nr = { class: "image-ctx-menu__label" }, Pr = {
385
+ ], zr = { class: "image-ctx-menu__icon" }, Br = { class: "image-ctx-menu__label" }, Vr = ["aria-label"], Hr = ["disabled", "onClick"], Ur = { class: "image-ctx-menu__label" }, Wr = {
382
386
  key: 0,
383
387
  class: "image-ctx-menu__shortcut"
384
- }, Fr = {
388
+ }, Gr = {
385
389
  key: 0,
386
390
  class: "image-ctx-menu__divider",
387
391
  role: "separator"
388
- }, Ir = 18, Lr = 260, Rr = 10, zr = /*#__PURE__*/ t(/* @__PURE__ */ z({
392
+ }, Kr = 18, qr = 260, Jr = 10, Yr = /*#__PURE__*/ t(/* @__PURE__ */ z({
389
393
  __name: "ImageContextMenu",
390
394
  props: {
391
395
  state: {},
@@ -406,7 +410,7 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
406
410
  function a() {
407
411
  i("open-properties"), i("close");
408
412
  }
409
- let { t: o } = c(), s = Cr(), l = nt, u = N(() => n.state ? it(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
413
+ let { t: o } = c(), s = Nr(), l = rt, u = N(() => n.state ? at(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
410
414
  inline: "wrap_text",
411
415
  squareLeft: "format_image_left",
412
416
  squareRight: "format_image_right",
@@ -418,17 +422,17 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
418
422
  }
419
423
  let p = N(() => {
420
424
  if (!n.state) return {};
421
- let e = nt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
422
- return typeof window < "u" && (t + Lr > window.innerWidth && (t = window.innerWidth - Lr - Rr), r + e > window.innerHeight && (r = window.innerHeight - e - Rr), t < Rr && (t = Rr), r < Rr && (r = Rr)), {
425
+ let e = rt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
426
+ return typeof window < "u" && (t + qr > window.innerWidth && (t = window.innerWidth - qr - Jr), r + e > window.innerHeight && (r = window.innerHeight - e - Jr), t < Jr && (t = Jr), r < Jr && (r = Jr)), {
423
427
  position: "fixed",
424
428
  left: `${t}px`,
425
429
  top: `${r}px`,
426
- minWidth: `${Lr}px`,
430
+ minWidth: `${qr}px`,
427
431
  zIndex: 400
428
432
  };
429
433
  });
430
434
  function m(e) {
431
- return n.state ? ot(e, n.state.currentWrapType) : !1;
435
+ return n.state ? st(e, n.state.currentWrapType) : !1;
432
436
  }
433
437
  function h(e) {
434
438
  m(e) && (i("select", e.choice), i("close"));
@@ -465,11 +469,11 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
465
469
  "data-action": "open-properties",
466
470
  onMousedown: n[1] ||= Y(() => {}, ["prevent"]),
467
471
  onClick: a
468
- }, [L("span", Tr, [R(r, {
472
+ }, [L("span", Fr, [R(r, {
469
473
  name: "settings",
470
- size: Ir
471
- })]), L("span", Er, K(q(o)("imageWrap.menu.imageProperties")), 1)], 32)) : F("", !0),
472
- e.canOpenProperties ? (U(), I("div", Dr)) : F("", !0),
474
+ size: Kr
475
+ })]), L("span", Ir, K(q(o)("imageWrap.menu.imageProperties")), 1)], 32)) : F("", !0),
476
+ e.canOpenProperties ? (U(), I("div", Lr)) : F("", !0),
473
477
  (U(!0), I(j, null, G(q(l), (e) => (U(), I("button", {
474
478
  key: e.choice,
475
479
  type: "button",
@@ -483,17 +487,17 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
483
487
  onMousedown: n[2] ||= Y(() => {}, ["prevent"]),
484
488
  onClick: (t) => h(e)
485
489
  }, [
486
- L("span", kr, [R(r, {
490
+ L("span", zr, [R(r, {
487
491
  name: f(e.iconHint),
488
- size: Ir
492
+ size: Kr
489
493
  }, null, 8, ["name"])]),
490
- L("span", Ar, K(q(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
494
+ L("span", Br, K(q(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
491
495
  e.choice === u.value ? (U(), I("span", {
492
496
  key: 0,
493
497
  class: "image-ctx-menu__current-dot",
494
498
  "aria-label": q(o)("imageWrap.menu.ariaLabel")
495
- }, "●", 8, jr)) : F("", !0)
496
- ], 42, Or))), 128)),
499
+ }, "●", 8, Vr)) : F("", !0)
500
+ ], 42, Rr))), 128)),
497
501
  e.textActions && e.textActions.length > 0 ? (U(), I(j, { key: 2 }, [n[5] ||= L("div", {
498
502
  class: "image-ctx-menu__divider",
499
503
  role: "separator"
@@ -504,16 +508,16 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
504
508
  disabled: e.disabled,
505
509
  onMousedown: n[3] ||= Y(() => {}, ["prevent"]),
506
510
  onClick: (t) => g(e)
507
- }, [L("span", Nr, K(e.label), 1), e.shortcut ? (U(), I("span", Pr, K(e.shortcut), 1)) : F("", !0)], 40, Mr), e.dividerAfter ? (U(), I("div", Fr)) : F("", !0)], 64))), 128))], 64)) : F("", !0)
508
- ], 46, wr)) : F("", !0)]));
511
+ }, [L("span", Ur, K(e.label), 1), e.shortcut ? (U(), I("span", Wr, K(e.shortcut), 1)) : F("", !0)], 40, Hr), e.dividerAfter ? (U(), I("div", Gr)) : F("", !0)], 64))), 128))], 64)) : F("", !0)
512
+ ], 46, Pr)) : F("", !0)]));
509
513
  }
510
- }), [["__scopeId", "data-v-fc8f35bc"]]), Br = ["disabled", "onMousedown"], Vr = {
514
+ }), [["__scopeId", "data-v-fc8f35bc"]]), Xr = ["disabled", "onMousedown"], Zr = {
511
515
  key: 0,
512
516
  class: "ctx-menu__icon"
513
- }, Hr = { class: "ctx-menu__label" }, Ur = {
517
+ }, Qr = { class: "ctx-menu__label" }, $r = {
514
518
  key: 1,
515
519
  class: "ctx-menu__shortcut"
516
- }, Wr = 220, Gr = 32, Kr = 10, qr = /*#__PURE__*/ t(/* @__PURE__ */ z({
520
+ }, ei = 220, ti = 32, ni = 10, ri = /*#__PURE__*/ t(/* @__PURE__ */ z({
517
521
  __name: "TextContextMenu",
518
522
  props: {
519
523
  isOpen: { type: Boolean },
@@ -530,7 +534,7 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
530
534
  setup(e, { emit: t }) {
531
535
  let n = e, r = ({ node: e }) => e;
532
536
  r.props = ["node"];
533
- let i = t, { t: a } = c(), o = Cr(), s = W(null), l = N(() => {
537
+ let i = t, { t: a } = c(), o = Nr(), s = W(null), l = N(() => {
534
538
  let e = [], t = n.customItems ?? [];
535
539
  for (let [n, r] of t.entries()) e.push({
536
540
  id: `custom-${r.id}`,
@@ -666,8 +670,8 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
666
670
  action: "deleteTable"
667
671
  }), e;
668
672
  }), u = N(() => {
669
- 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 * Gr + i * 9;
670
- return typeof window < "u" && (e + Wr + Kr > window.innerWidth && (e = window.innerWidth - Wr - Kr), t + a + Kr > window.innerHeight && (t = window.innerHeight - a - Kr)), {
673
+ 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 * ti + i * 9;
674
+ return typeof window < "u" && (e + ei + ni > window.innerWidth && (e = window.innerWidth - ei - ni), t + a + ni > window.innerHeight && (t = window.innerHeight - a - ni)), {
671
675
  position: "fixed",
672
676
  left: `${e}px`,
673
677
  top: `${t}px`,
@@ -705,12 +709,12 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
705
709
  disabled: e.disabled,
706
710
  onMousedown: Y((t) => d(e.action), ["prevent"])
707
711
  }, [
708
- e.icon ? (U(), I("span", Vr, [R(r, { node: e.icon }, null, 8, ["node"])])) : F("", !0),
709
- L("span", Hr, K(e.label), 1),
710
- e.shortcut ? (U(), I("span", Ur, K(e.shortcut), 1)) : F("", !0)
711
- ], 42, Br))), 128))], 38)) : F("", !0)]));
712
+ e.icon ? (U(), I("span", Zr, [R(r, { node: e.icon }, null, 8, ["node"])])) : F("", !0),
713
+ L("span", Qr, K(e.label), 1),
714
+ e.shortcut ? (U(), I("span", $r, K(e.shortcut), 1)) : F("", !0)
715
+ ], 42, Xr))), 128))], 38)) : F("", !0)]));
712
716
  }
713
- }), [["__scopeId", "data-v-c1416e84"]]), Jr = /* @__PURE__ */ z({
717
+ }), [["__scopeId", "data-v-c1416e84"]]), ii = /* @__PURE__ */ z({
714
718
  __name: "DocxEditorOverlays",
715
719
  props: {
716
720
  readOnly: { type: Boolean },
@@ -729,7 +733,7 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
729
733
  ],
730
734
  setup(e, { emit: t }) {
731
735
  let n = t;
732
- return (t, r) => (U(), I(j, null, [R(qr, {
736
+ return (t, r) => (U(), I(j, null, [R(ri, {
733
737
  "is-open": e.contextMenu.isOpen,
734
738
  position: e.contextMenu.position,
735
739
  "has-selection": e.contextMenu.hasSelection,
@@ -751,7 +755,7 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
751
755
  "can-merge-cells",
752
756
  "can-split-cell",
753
757
  "custom-items"
754
- ]), R(zr, {
758
+ ]), R(Yr, {
755
759
  state: e.imageContextMenu,
756
760
  "text-actions": e.imageContextMenuTextActions,
757
761
  "can-open-properties": e.canOpenImageProperties,
@@ -768,7 +772,7 @@ var wr = ["aria-label"], Tr = { class: "image-ctx-menu__icon" }, Er = { class: "
768
772
  });
769
773
  //#endregion
770
774
  //#region src/composables/imageOverlayRect.ts
771
- function Yr(e) {
775
+ function ai(e) {
772
776
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
773
777
  return {
774
778
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -779,13 +783,13 @@ function Yr(e) {
779
783
  }
780
784
  //#endregion
781
785
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
782
- var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
786
+ var oi = ["data-handle", "onMousedown"], si = ["title"], ci = {
783
787
  key: 0,
784
788
  class: "image-overlay__dim"
785
- }, $r = {
789
+ }, li = {
786
790
  key: 1,
787
791
  class: "image-overlay__dim image-overlay__dim--rotate"
788
- }, ei = 4, ti = 15, ni = 250, ri = 700, ii = /*#__PURE__*/ t(/* @__PURE__ */ z({
792
+ }, ui = 4, di = 15, fi = 250, pi = 700, mi = /*#__PURE__*/ t(/* @__PURE__ */ z({
789
793
  __name: "ImageSelectionOverlay",
790
794
  props: {
791
795
  imageInfo: {},
@@ -823,8 +827,8 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
823
827
  if (e.element.isConnected) return e.element;
824
828
  let t = re();
825
829
  if (!t) return null;
826
- let n = gt(t, e.pmPos);
827
- return n ? at(n) : null;
830
+ let n = _t(t, e.pmPos);
831
+ return n ? ot(n) : null;
828
832
  }
829
833
  function C() {
830
834
  let e = ie();
@@ -838,7 +842,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
838
842
  return;
839
843
  }
840
844
  let n = t.getBoundingClientRect(), i = e.getBoundingClientRect();
841
- p.value = Yr({
845
+ p.value = ai({
842
846
  imageRect: i,
843
847
  parentRect: n,
844
848
  scrollLeft: t.scrollLeft,
@@ -856,10 +860,10 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
856
860
  let o = a - r;
857
861
  C();
858
862
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
859
- n = c === t ? n + 1 : 0, t = c, !(o >= ni && n >= 2) && o < ri && (e = requestAnimationFrame(i));
863
+ n = c === t ? n + 1 : 0, t = c, !(o >= fi && n >= 2) && o < pi && (e = requestAnimationFrame(i));
860
864
  };
861
865
  e = requestAnimationFrame(i);
862
- let a = setTimeout(C, ni);
866
+ let a = setTimeout(C, fi);
863
867
  ae = () => {
864
868
  cancelAnimationFrame(e), clearTimeout(a);
865
869
  };
@@ -984,7 +988,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
984
988
  !r.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), o.value = !0, i("interact-start"), document.addEventListener("mousemove", E), document.addEventListener("mouseup", D));
985
989
  }
986
990
  function E(e) {
987
- let t = r.zoom, n = (e.clientX - h) / t, i = (e.clientY - g) / t, a = !e.shiftKey, o = dt(m, n, i, _, v, a);
991
+ let t = r.zoom, n = (e.clientX - h) / t, i = (e.clientY - g) / t, a = !e.shiftKey, o = ft(m, n, i, _, v, a);
988
992
  u.value = Math.round(o.width), d.value = Math.round(o.height);
989
993
  let s = y;
990
994
  if (s) {
@@ -1004,7 +1008,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1004
1008
  C();
1005
1009
  return;
1006
1010
  }
1007
- let n = mt(e, t.pmPos, u.value, d.value);
1011
+ let n = ht(e, t.pmPos, u.value, d.value);
1008
1012
  n !== null && _e(n), ye(() => C());
1009
1013
  }
1010
1014
  let ue = 0, de = 0, fe = 0, O = 0, k = null, A = null;
@@ -1027,7 +1031,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1027
1031
  }
1028
1032
  function he(e) {
1029
1033
  let t = P(e.clientX, e.clientY) - fe, n = O + t;
1030
- e.shiftKey || (n = Math.round(n / ti) * ti), f.value = (n % 360 + 360) % 360, A && (A.style.transform = pe(k, f.value) || "");
1034
+ e.shiftKey || (n = Math.round(n / di) * di), f.value = (n % 360 + 360) % 360, A && (A.style.transform = pe(k, f.value) || "");
1031
1035
  }
1032
1036
  function ge() {
1033
1037
  document.removeEventListener("mousemove", he), document.removeEventListener("mouseup", ge), l.value = !1, i("interact-end");
@@ -1048,7 +1052,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1048
1052
  if (!r.imageInfo || !p.value) return;
1049
1053
  let t = e.clientX, n = e.clientY, a = p.value, o = !1, c = (e) => {
1050
1054
  let c = e.clientX - t, l = e.clientY - n;
1051
- if (!(!o && Math.sqrt(c * c + l * l) < ei)) {
1055
+ if (!(!o && Math.sqrt(c * c + l * l) < ui)) {
1052
1056
  if (!o) {
1053
1057
  o = !0, s.value = !0, i("interact-start"), R = document.createElement("div"), R.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);";
1054
1058
  let e = r.zoom;
@@ -1070,7 +1074,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1070
1074
  let o = S(n, i.pmPos);
1071
1075
  if (!o) return;
1072
1076
  let s;
1073
- if (ht(o)) {
1077
+ if (gt(o)) {
1074
1078
  let o = (a.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1075
1079
  if (!o || o.length === 0) return;
1076
1080
  let c = null;
@@ -1086,21 +1090,21 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1086
1090
  c = e ? e.querySelector(".layout-page-content") : null;
1087
1091
  }
1088
1092
  if (!c) return;
1089
- let l = c.getBoundingClientRect(), u = r.zoom, d = tt((e - l.left) / u), f = tt((t - l.top) / u);
1090
- s = ft(n, i.pmPos, d, f);
1093
+ let l = c.getBoundingClientRect(), u = r.zoom, d = nt((e - l.left) / u), f = nt((t - l.top) / u);
1094
+ s = pt(n, i.pmPos, d, f);
1091
1095
  } else {
1092
1096
  let r = re();
1093
1097
  if (!r) return;
1094
- let a = ut(r, e, t, 1);
1098
+ let a = dt(r, e, t, 1);
1095
1099
  if (a == null || a < 0) return;
1096
- s = pt(n, i.pmPos, a);
1100
+ s = mt(n, i.pmPos, a);
1097
1101
  }
1098
1102
  s !== null && _e(s), ye(() => C());
1099
1103
  }
1100
1104
  function _e(e) {
1101
1105
  let t = r.view;
1102
1106
  if (t) try {
1103
- let n = $e.create(t.state.doc, e);
1107
+ let n = Z.create(t.state.doc, e);
1104
1108
  t.dispatch(t.state.tr.setSelection(n));
1105
1109
  } catch {}
1106
1110
  }
@@ -1127,19 +1131,19 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1127
1131
  style: H(e.style),
1128
1132
  "data-handle": e.pos,
1129
1133
  onMousedown: Y((t) => le(t, e.pos), ["prevent", "stop"])
1130
- }, null, 44, Xr))), 128)),
1134
+ }, null, 44, oi))), 128)),
1131
1135
  r[5] ||= L("div", { class: "image-overlay__rotate-line" }, null, -1),
1132
1136
  L("div", {
1133
1137
  class: "image-overlay__rotate-handle",
1134
1138
  style: H({ left: `${w.value / 2 - 7}px` }),
1135
1139
  title: q(n)("imageOverlay.rotate"),
1136
1140
  onMousedown: r[2] ||= Y((e) => me(e), ["prevent", "stop"])
1137
- }, null, 44, Zr),
1138
- o.value ? (U(), I("div", Qr, K(Math.round(u.value)) + " × " + K(Math.round(d.value)), 1)) : F("", !0),
1139
- l.value ? (U(), I("div", $r, K(Math.round(f.value)) + "° ", 1)) : F("", !0)
1141
+ }, null, 44, si),
1142
+ o.value ? (U(), I("div", ci, K(Math.round(u.value)) + " × " + K(Math.round(d.value)), 1)) : F("", !0),
1143
+ l.value ? (U(), I("div", li, K(Math.round(f.value)) + "° ", 1)) : F("", !0)
1140
1144
  ], 36)) : F("", !0);
1141
1145
  }
1142
- }), [["__scopeId", "data-v-4c3d1a1d"]]), ai = ["title", "aria-label"], oi = /* @__PURE__ */ z({
1146
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), hi = ["title", "aria-label"], gi = /* @__PURE__ */ z({
1143
1147
  __name: "OutlineToggleButton",
1144
1148
  props: {
1145
1149
  leftOffset: {},
@@ -1162,9 +1166,9 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1162
1166
  }, [R(r, {
1163
1167
  name: "format_list_bulleted",
1164
1168
  size: 20
1165
- })], 44, ai));
1169
+ })], 44, hi));
1166
1170
  }
1167
- }), si = /*#__PURE__*/ t(/* @__PURE__ */ z({
1171
+ }), _i = /*#__PURE__*/ t(/* @__PURE__ */ z({
1168
1172
  __name: "PageIndicator",
1169
1173
  props: {
1170
1174
  currentPage: {},
@@ -1183,7 +1187,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1183
1187
  total: e.totalPages
1184
1188
  })), 5));
1185
1189
  }
1186
- }), [["__scopeId", "data-v-f1904974"]]), ci = ["data-folio-block-id"], li = ["data-folio-block-id", "title"], ui = 2.5, di = 5, fi = 6, pi = 2, mi = 2, hi = /*#__PURE__*/ t(/* @__PURE__ */ z({
1190
+ }), [["__scopeId", "data-v-f1904974"]]), vi = ["data-folio-block-id"], yi = ["data-folio-block-id", "title"], bi = 2.5, xi = 5, Si = 6, Ci = 2, wi = 2, Ti = /*#__PURE__*/ t(/* @__PURE__ */ z({
1187
1191
  __name: "TemplateDirectivesOverlay",
1188
1192
  props: {
1189
1193
  getView: { type: Function },
@@ -1197,19 +1201,19 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1197
1201
  setup(e) {
1198
1202
  let t = e, n = /* @__PURE__ */ new Set(["if", "each"]), r = /* @__PURE__ */ new Set(["endif", "endeach"]), i = (e) => e === "each" ? "each" : "if";
1199
1203
  function a(e) {
1200
- let t = e - fi - ui - pi;
1201
- return t <= 0 ? 0 : Math.floor(t / di);
1204
+ let t = e - Si - bi - Ci;
1205
+ return t <= 0 ? 0 : Math.floor(t / xi);
1202
1206
  }
1203
1207
  function o(e, t, n) {
1204
1208
  let r = a(n), i = Math.min(Math.max(0, e), r);
1205
- return t - fi - ui - (r - i) * di;
1209
+ return t - Si - bi - (r - i) * xi;
1206
1210
  }
1207
1211
  function s(e, t) {
1208
- if (t.length === 0) return e.bottom - e.top >= mi ? [e] : [];
1212
+ if (t.length === 0) return e.bottom - e.top >= wi ? [e] : [];
1209
1213
  let n = [];
1210
1214
  for (let r of t) {
1211
1215
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1212
- i - t >= mi && n.push({
1216
+ i - t >= wi && n.push({
1213
1217
  top: t,
1214
1218
  bottom: i
1215
1219
  });
@@ -1274,31 +1278,31 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1274
1278
  }
1275
1279
  return i;
1276
1280
  }
1277
- let f = W([]), p = W([]), m = W(null), h = W(null), g = W(null), _ = 0, v = null;
1281
+ let f = W([]), p = W([]), m = W(null), h = W(null), g = W(null), _ = Ge(), v = null;
1278
1282
  function y() {
1279
1283
  v !== null && cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1280
1284
  v = null, b();
1281
1285
  });
1282
1286
  }
1283
1287
  async function b() {
1284
- let e = ++_, n = t.getView(), r = t.getPagesContainer(), i = t.editorState;
1288
+ let e = _.begin(), n = t.getView(), r = t.getPagesContainer(), i = t.editorState;
1285
1289
  if (!n || !r || !i) {
1286
1290
  f.value = [], p.value = [], m.value = null, h.value = null;
1287
1291
  return;
1288
1292
  }
1289
- let a = yt(i);
1293
+ let a = bt(i);
1290
1294
  if (a.length === 0) {
1291
1295
  f.value = [], p.value = [], m.value = null, h.value = null;
1292
1296
  return;
1293
1297
  }
1294
- let o = Ge(r, t.zoom), s = await Ke(a, {
1298
+ let o = Ke(r, t.zoom), s = await qe(a, {
1295
1299
  pagesContainer: r,
1296
1300
  zoom: t.zoom,
1297
1301
  layout: t.layout,
1298
1302
  blocks: t.blocks,
1299
1303
  measures: t.measures
1300
1304
  });
1301
- e === _ && (f.value = a, h.value = i.selection.head, m.value = o, p.value = s);
1305
+ e() && (f.value = a, h.value = i.selection.head, m.value = o, p.value = s);
1302
1306
  }
1303
1307
  J(() => [
1304
1308
  t.editorState,
@@ -1353,7 +1357,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1353
1357
  n !== t && g.value === t && (g.value = n);
1354
1358
  }
1355
1359
  return xe(() => y()), be(() => {
1356
- v !== null && (cancelAnimationFrame(v), v = null);
1360
+ _.invalidate(), v !== null && (cancelAnimationFrame(v), v = null);
1357
1361
  }), (t, n) => (U(), I("div", {
1358
1362
  class: "folio-template-directives-overlay",
1359
1363
  "data-folio-template-directives-overlay": "",
@@ -1371,10 +1375,10 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1371
1375
  position: "absolute",
1372
1376
  left: `${t.railX * e.zoom}px`,
1373
1377
  top: `${n.top * e.zoom}px`,
1374
- width: `${ui * e.zoom}px`,
1378
+ width: `${bi * e.zoom}px`,
1375
1379
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1376
1380
  })
1377
- }, null, 14, ci))), 128))], 64))), 128)), (U(!0), I(j, null, G(p.value, (t, n) => (U(), I(j, { key: `d:${n}` }, [(U(!0), I(j, null, G(t.rects, (r, i) => (U(), I("span", {
1381
+ }, null, 14, vi))), 128))], 64))), 128)), (U(!0), I(j, null, G(p.value, (t, n) => (U(), I(j, { key: `d:${n}` }, [(U(!0), I(j, null, G(t.rects, (r, i) => (U(), I("span", {
1378
1382
  key: `d:${n}:${i}`,
1379
1383
  class: V(oe(t.range)),
1380
1384
  "data-folio-block-id": C(t.range),
@@ -1386,9 +1390,9 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1386
1390
  width: `${(r.width + 2) * e.zoom}px`,
1387
1391
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1388
1392
  })
1389
- }, null, 14, li))), 128))], 64))), 128))], 32));
1393
+ }, null, 14, yi))), 128))], 64))), 128))], 32));
1390
1394
  }
1391
- }), [["__scopeId", "data-v-142d2ac6"]]), gi = ["href", "title"], _i = ["title"], vi = ["title"], yi = ["title"], bi = { class: "docx-hyperlink-popup__edit-row" }, xi = ["placeholder", "onKeydown"], Si = { class: "docx-hyperlink-popup__edit-row" }, Ci = ["onKeydown"], wi = ["disabled"], Ti = /*#__PURE__*/ t(/* @__PURE__ */ z({
1395
+ }), [["__scopeId", "data-v-c72dfa21"]]), Ei = ["href", "title"], Di = ["title"], Oi = ["title"], ki = ["title"], Ai = { class: "docx-hyperlink-popup__edit-row" }, ji = ["placeholder", "onKeydown"], Mi = { class: "docx-hyperlink-popup__edit-row" }, Ni = ["onKeydown"], Pi = ["disabled"], Fi = /*#__PURE__*/ t(/* @__PURE__ */ z({
1392
1396
  __name: "HyperlinkPopup",
1393
1397
  props: {
1394
1398
  data: {},
@@ -1437,28 +1441,28 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1437
1441
  class: V(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": a.value }]),
1438
1442
  style: H(u.value),
1439
1443
  onMousedown: r[6] ||= Y(() => {}, ["stop"])
1440
- }, [a.value ? (U(), I(j, { key: 1 }, [L("div", bi, [De(L("input", {
1444
+ }, [a.value ? (U(), I(j, { key: 1 }, [L("div", Ai, [De(L("input", {
1441
1445
  class: "docx-hyperlink-popup__input",
1442
1446
  placeholder: q(n)("displayText"),
1443
1447
  "onUpdate:modelValue": r[2] ||= (e) => o.value = e,
1444
1448
  onKeydown: [Oe(Y(h, ["prevent"]), ["enter"]), r[3] ||= Oe((e) => t.$emit("close"), ["esc"])]
1445
- }, null, 40, xi), [[Te, o.value]])]), L("div", Si, [De(L("input", {
1449
+ }, null, 40, ji), [[Te, o.value]])]), L("div", Mi, [De(L("input", {
1446
1450
  class: "docx-hyperlink-popup__input",
1447
1451
  placeholder: "https://...",
1448
1452
  "onUpdate:modelValue": r[4] ||= (e) => s.value = e,
1449
1453
  onKeydown: [Oe(Y(h, ["prevent"]), ["enter"]), r[5] ||= Oe((e) => t.$emit("close"), ["esc"])]
1450
- }, null, 40, Ci), [[Te, s.value]]), L("button", {
1454
+ }, null, 40, Ni), [[Te, s.value]]), L("button", {
1451
1455
  class: "docx-hyperlink-popup__apply",
1452
1456
  disabled: !s.value.trim(),
1453
1457
  onClick: Y(h, ["prevent"])
1454
- }, K(q(n)("common.apply")), 9, wi)])], 64)) : (U(), I(j, { key: 0 }, [
1458
+ }, K(q(n)("common.apply")), 9, Pi)])], 64)) : (U(), I(j, { key: 0 }, [
1455
1459
  r[10] ||= he("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-366df18c><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-366df18c><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-366df18c></circle><path d=\"M2 12h20\" data-v-366df18c></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-366df18c></path></svg></span>", 1),
1456
1460
  L("a", {
1457
1461
  class: "docx-hyperlink-popup__url",
1458
1462
  href: e.data.href,
1459
1463
  title: e.data.href,
1460
1464
  onClick: r[0] ||= Y((n) => t.$emit("navigate", e.data.href), ["prevent"])
1461
- }, K(e.data.href), 9, gi),
1465
+ }, K(e.data.href), 9, Ei),
1462
1466
  r[11] ||= L("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1463
1467
  L("button", {
1464
1468
  class: "docx-hyperlink-popup__btn",
@@ -1480,7 +1484,7 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1480
1484
  height: "13",
1481
1485
  rx: "2",
1482
1486
  ry: "2"
1483
- }), L("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, _i),
1487
+ }), L("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Di),
1484
1488
  e.readOnly ? F("", !0) : (U(), I("button", {
1485
1489
  key: 0,
1486
1490
  class: "docx-hyperlink-popup__btn",
@@ -1495,43 +1499,43 @@ var Xr = ["data-handle", "onMousedown"], Zr = ["title"], Qr = {
1495
1499
  "stroke-width": "2",
1496
1500
  "stroke-linecap": "round",
1497
1501
  "stroke-linejoin": "round"
1498
- }, [L("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), L("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, vi)),
1502
+ }, [L("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), L("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, Oi)),
1499
1503
  e.readOnly ? F("", !0) : (U(), I("button", {
1500
1504
  key: 1,
1501
1505
  class: "docx-hyperlink-popup__btn",
1502
1506
  title: q(n)("removeLink"),
1503
1507
  onClick: r[1] ||= Y((e) => t.$emit("remove"), ["prevent"])
1504
- }, [...r[9] ||= [he("<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-366df18c><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-366df18c></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-366df18c></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-366df18c></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-366df18c></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-366df18c></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-366df18c></line></svg>", 1)]], 8, yi))
1508
+ }, [...r[9] ||= [he("<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-366df18c><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-366df18c></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-366df18c></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-366df18c></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-366df18c></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-366df18c></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-366df18c></line></svg>", 1)]], 8, ki))
1505
1509
  ], 64))], 38)) : F("", !0);
1506
1510
  }
1507
1511
  }), [["__scopeId", "data-v-366df18c"]]);
1508
1512
  //#endregion
1509
1513
  //#region src/composables/commentMarks.ts
1510
- function Ei(e, t) {
1514
+ function Ii(e, t) {
1511
1515
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
1512
1516
  return n === r ? null : {
1513
1517
  from: n,
1514
1518
  to: r
1515
1519
  };
1516
1520
  }
1517
- function Di({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
1521
+ function Li({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
1518
1522
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
1519
- return i ? Ei(e, i) : null;
1523
+ return i ? Ii(e, i) : null;
1520
1524
  }
1521
- function Oi(e, t, n, r) {
1522
- let i = e.state.schema.marks.comment, a = Ei(e.state.doc.content.size, t);
1525
+ function Ri(e, t, n, r) {
1526
+ let i = e.state.schema.marks.comment, a = Ii(e.state.doc.content.size, t);
1523
1527
  if (!i || !a) return !1;
1524
1528
  let o = e.state.tr;
1525
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: wt }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(et.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
1529
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: Tt }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(et.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
1526
1530
  }
1527
- function ki(e, t) {
1528
- let n = e.state.schema.marks.comment, r = Ei(e.state.doc.content.size, t);
1529
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: wt })));
1531
+ function zi(e, t) {
1532
+ let n = e.state.schema.marks.comment, r = Ii(e.state.doc.content.size, t);
1533
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: Tt })));
1530
1534
  }
1531
1535
  //#endregion
1532
1536
  //#region src/composables/useCommentLifecycle.ts
1533
- var Ai = 408, ji = 12;
1534
- function Mi(e) {
1537
+ var Bi = 408, Vi = 12;
1538
+ function Hi(e) {
1535
1539
  let t = W(!1), n = W(null), r = W(null), i = W(null), a = W(null);
1536
1540
  function o(t) {
1537
1541
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -1564,7 +1568,7 @@ function Mi(e) {
1564
1568
  r.value = null;
1565
1569
  return;
1566
1570
  }
1567
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + ji : l.width / 2 + Ai;
1571
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Vi : l.width / 2 + Bi;
1568
1572
  r.value = {
1569
1573
  top: c.top - l.top,
1570
1574
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -1575,7 +1579,7 @@ function Mi(e) {
1575
1579
  function c() {
1576
1580
  let s = e.editorView.value;
1577
1581
  if (!s) return;
1578
- let c = r.value, l = s.state.selection, u = Di({
1582
+ let c = r.value, l = s.state.selection, u = Li({
1579
1583
  docSize: s.state.doc.content.size,
1580
1584
  capturedRange: c ? {
1581
1585
  from: c.from,
@@ -1594,7 +1598,7 @@ function Mi(e) {
1594
1598
  r.value = null;
1595
1599
  return;
1596
1600
  }
1597
- if (!Oi(s, u, wt, { selectEnd: !0 })) {
1601
+ if (!Ri(s, u, Tt, { selectEnd: !0 })) {
1598
1602
  r.value = null, i.value = null;
1599
1603
  return;
1600
1604
  }
@@ -1607,11 +1611,11 @@ function Mi(e) {
1607
1611
  let n = e.editorView.value, r = i.value;
1608
1612
  if (!n || !r) return !1;
1609
1613
  let a = e.createComment(t);
1610
- return Oi(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
1614
+ return Ri(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
1611
1615
  }
1612
1616
  function d() {
1613
1617
  let t = e.editorView.value;
1614
- t && i.value && ki(t, i.value), l();
1618
+ t && i.value && zi(t, i.value), l();
1615
1619
  }
1616
1620
  return {
1617
1621
  isAddingComment: t,
@@ -1625,8 +1629,8 @@ function Mi(e) {
1625
1629
  }
1626
1630
  //#endregion
1627
1631
  //#region src/composables/useCommentManagement.ts
1628
- function Ni(e) {
1629
- let t = Tt(), n = W([]), r = W(!1);
1632
+ function Ui(e) {
1633
+ let t = Et(), n = W([]), r = W(!1);
1630
1634
  function i() {
1631
1635
  r.value = !0;
1632
1636
  }
@@ -1641,12 +1645,12 @@ function Ni(e) {
1641
1645
  i(), c([...s.value, e]);
1642
1646
  }
1643
1647
  function u(n, r) {
1644
- return Et(t, s.value, e.editorView.value), Dt(t, n, e.author(), r);
1648
+ return Dt(t, s.value, e.editorView.value), Ot(t, n, e.author(), r);
1645
1649
  }
1646
1650
  function d() {
1647
1651
  if (a(), o.value) return;
1648
1652
  let n = e.getDocument()?.package.document.comments;
1649
- Et(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
1653
+ Dt(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
1650
1654
  }
1651
1655
  function f(e, t) {
1652
1656
  l(u(t, e));
@@ -1672,8 +1676,8 @@ function Ni(e) {
1672
1676
  function _(t, n) {
1673
1677
  let r = e.editorView.value;
1674
1678
  if (!r) return;
1675
- let i = Ot(r, t);
1676
- i && (n ? At : Nt)(i.from, i.to)(r.state, r.dispatch);
1679
+ let i = kt(r, t);
1680
+ i && (n ? jt : Pt)(i.from, i.to)(r.state, r.dispatch);
1677
1681
  }
1678
1682
  function v(e) {
1679
1683
  _(e, !0);
@@ -1683,11 +1687,11 @@ function Ni(e) {
1683
1687
  }
1684
1688
  function b(t, n) {
1685
1689
  let r = e.editorView.value;
1686
- r && At(t, n)(r.state, r.dispatch);
1690
+ r && jt(t, n)(r.state, r.dispatch);
1687
1691
  }
1688
1692
  function x(t, n) {
1689
1693
  let r = e.editorView.value;
1690
- r && Nt(t, n)(r.state, r.dispatch);
1694
+ r && Pt(t, n)(r.state, r.dispatch);
1691
1695
  }
1692
1696
  return {
1693
1697
  comments: s,
@@ -1710,8 +1714,8 @@ function Ni(e) {
1710
1714
  }
1711
1715
  //#endregion
1712
1716
  //#region src/utils/imageClipboard.ts
1713
- function Pi(e, t, n) {
1714
- let r = Pt(e.state), i = e.state.schema.marks.insertion;
1717
+ function Wi(e, t, n) {
1718
+ let r = Ft(e.state), i = e.state.schema.marks.insertion;
1715
1719
  if (!r || !i) return;
1716
1720
  let a = t.selection.from, o = a - n.nodeSize;
1717
1721
  o < 0 || t.addMark(o, a, i.create({
@@ -1720,7 +1724,7 @@ function Pi(e, t, n) {
1720
1724
  date: r.date
1721
1725
  }));
1722
1726
  }
1723
- function Fi(e, t) {
1727
+ function Gi(e, t) {
1724
1728
  let n = e.state.doc.nodeAt(t);
1725
1729
  if (!n || n.type.name !== "image") return;
1726
1730
  let r = n.attrs.src;
@@ -1734,7 +1738,7 @@ function Fi(e, t) {
1734
1738
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
1735
1739
  });
1736
1740
  }
1737
- function Ii(e) {
1741
+ function Ki(e) {
1738
1742
  return new Promise((t, n) => {
1739
1743
  let r = new FileReader();
1740
1744
  r.onload = () => {
@@ -1742,7 +1746,7 @@ function Ii(e) {
1742
1746
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
1743
1747
  });
1744
1748
  }
1745
- function Li(e) {
1749
+ function qi(e) {
1746
1750
  return new Promise((t) => {
1747
1751
  let n = new Image();
1748
1752
  n.onload = () => t({
@@ -1754,7 +1758,7 @@ function Li(e) {
1754
1758
  }), n.src = e;
1755
1759
  });
1756
1760
  }
1757
- function Ri(e, t, n, r) {
1761
+ function Ji(e, t, n, r) {
1758
1762
  let i = e.state.schema.nodes.image;
1759
1763
  if (!i) return;
1760
1764
  let a = i.create({
@@ -1765,23 +1769,23 @@ function Ri(e, t, n, r) {
1765
1769
  wrapType: "inline",
1766
1770
  displayMode: "inline"
1767
1771
  }), o = e.state.tr.replaceSelectionWith(a);
1768
- Pi(e, o, a), e.dispatch(o);
1772
+ Wi(e, o, a), e.dispatch(o);
1769
1773
  }
1770
- async function zi(e) {
1774
+ async function Yi(e) {
1771
1775
  try {
1772
1776
  let t = await navigator.clipboard.read();
1773
1777
  for (let n of t) {
1774
1778
  let t = n.types.find((e) => e.startsWith("image/"));
1775
1779
  if (t) {
1776
- let r = await Ii(await n.getType(t)), i = await Li(r), a = i.width, o = i.height;
1777
- a > 612 && (o = Math.round(612 / a * o), a = 612), Ri(e, r, a, o);
1780
+ let r = await Ki(await n.getType(t)), i = await qi(r), a = i.width, o = i.height;
1781
+ a > 612 && (o = Math.round(612 / a * o), a = 612), Ji(e, r, a, o);
1778
1782
  return;
1779
1783
  }
1780
1784
  if (n.types.includes("text/html")) {
1781
1785
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
1782
1786
  if (r) {
1783
1787
  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;
1784
- Ri(e, r, a || 200, o || 200);
1788
+ Ji(e, r, a || 200, o || 200);
1785
1789
  return;
1786
1790
  }
1787
1791
  }
@@ -1802,14 +1806,14 @@ async function zi(e) {
1802
1806
  }
1803
1807
  }
1804
1808
  }
1805
- function Bi(e, t) {
1809
+ function Xi(e, t) {
1806
1810
  let n = e.state.doc.nodeAt(t);
1807
1811
  if (!n || n.type.name !== "image") return;
1808
1812
  let r = document.createElement("input");
1809
1813
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
1810
1814
  let i = r.files?.[0];
1811
1815
  if (!i) return;
1812
- let a = await Ii(i), o = await Li(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);
1816
+ let a = await Ki(i), o = await qi(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);
1813
1817
  try {
1814
1818
  let r = e.state.tr.setNodeMarkup(t, void 0, {
1815
1819
  ...n.attrs,
@@ -1824,7 +1828,7 @@ function Bi(e, t) {
1824
1828
  }
1825
1829
  //#endregion
1826
1830
  //#region src/composables/useContextMenus.ts
1827
- var Vi = /* @__PURE__ */ new Set([
1831
+ var Zi = /* @__PURE__ */ new Set([
1828
1832
  "inline",
1829
1833
  "square",
1830
1834
  "tight",
@@ -1833,16 +1837,16 @@ var Vi = /* @__PURE__ */ new Set([
1833
1837
  "behind",
1834
1838
  "inFront"
1835
1839
  ]);
1836
- function Hi(e) {
1837
- return typeof e == "string" && Vi.has(e);
1840
+ function Qi(e) {
1841
+ return typeof e == "string" && Zi.has(e);
1838
1842
  }
1839
- function Ui(e) {
1840
- return Hi(e) ? e : "inline";
1843
+ function $i(e) {
1844
+ return Qi(e) ? e : "inline";
1841
1845
  }
1842
- function Wi(e) {
1846
+ function ea(e) {
1843
1847
  return e === "left" || e === "right" || e === "none" ? e : null;
1844
1848
  }
1845
- function Gi(e) {
1849
+ function ta(e) {
1846
1850
  let { t } = c(), n = W({
1847
1851
  isOpen: !1,
1848
1852
  position: {
@@ -1884,7 +1888,7 @@ function Gi(e) {
1884
1888
  t(e.state, (t) => e.dispatch(t), e);
1885
1889
  }
1886
1890
  function l(t, n, r, i, a) {
1887
- let o = i === "inline" ? rt(t, e.zoom.value) : void 0;
1891
+ let o = i === "inline" ? it(t, e.zoom.value) : void 0;
1888
1892
  return {
1889
1893
  open: !0,
1890
1894
  position: r,
@@ -1897,12 +1901,12 @@ function Gi(e) {
1897
1901
  function u(t) {
1898
1902
  let a = e.editorView.value;
1899
1903
  if (!a) return;
1900
- let o = at(t.target);
1904
+ let o = ot(t.target);
1901
1905
  if (o) {
1902
1906
  let i = Number(o.dataset.pmStart);
1903
1907
  if (!Number.isNaN(i)) {
1904
1908
  try {
1905
- let e = $e.create(a.state.doc, i);
1909
+ let e = Z.create(a.state.doc, i);
1906
1910
  a.dispatch(a.state.tr.setSelection(e));
1907
1911
  } catch {}
1908
1912
  e.selectedImage.value = {
@@ -1916,7 +1920,7 @@ function Gi(e) {
1916
1920
  r.value = l(o, i, {
1917
1921
  x: t.clientX,
1918
1922
  y: t.clientY
1919
- }, Ui(s.attrs.wrapType), Wi(s.attrs.cssFloat)), n.value.isOpen = !1;
1923
+ }, $i(s.attrs.wrapType), ea(s.attrs.cssFloat)), n.value.isOpen = !1;
1920
1924
  return;
1921
1925
  }
1922
1926
  }
@@ -1927,7 +1931,7 @@ function Gi(e) {
1927
1931
  e.setPmSelection(i);
1928
1932
  } catch {}
1929
1933
  }
1930
- let s = Ct(a.state), { empty: c, from: u, to: d } = a.state.selection;
1934
+ let s = wt(a.state), { empty: c, from: u, to: d } = a.state.selection;
1931
1935
  i.value = {
1932
1936
  from: u,
1933
1937
  to: d
@@ -1951,7 +1955,7 @@ function Gi(e) {
1951
1955
  !o || o.type.name !== "image" || (r.value = l(a.element, a.pmPos, {
1952
1956
  x: t.clientX,
1953
1957
  y: t.clientY
1954
- }, Ui(o.attrs.wrapType), Wi(o.attrs.cssFloat)), n.value.isOpen = !1);
1958
+ }, $i(o.attrs.wrapType), ea(o.attrs.cssFloat)), n.value.isOpen = !1);
1955
1959
  }
1956
1960
  function f(t) {
1957
1961
  let n = e.editorView.value, i = r.value;
@@ -1975,16 +1979,16 @@ function Gi(e) {
1975
1979
  case "cut":
1976
1980
  if (e.selectedImage.value) {
1977
1981
  let t = e.selectedImage.value.pmPos;
1978
- Fi(n, t);
1982
+ Gi(n, t);
1979
1983
  let r = n.state.doc.nodeAt(t);
1980
1984
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null);
1981
1985
  } else n.focus(), document.execCommand("cut");
1982
1986
  break;
1983
1987
  case "copy":
1984
- e.selectedImage.value ? Fi(n, e.selectedImage.value.pmPos) : (n.focus(), document.execCommand("copy"));
1988
+ e.selectedImage.value ? Gi(n, e.selectedImage.value.pmPos) : (n.focus(), document.execCommand("copy"));
1985
1989
  break;
1986
1990
  case "paste":
1987
- zi(n);
1991
+ Yi(n);
1988
1992
  break;
1989
1993
  case "pasteAsPlainText":
1990
1994
  navigator.clipboard.readText().then((e) => {
@@ -1997,7 +2001,7 @@ function Gi(e) {
1997
2001
  break;
1998
2002
  }
1999
2003
  case "selectAll": {
2000
- let e = Z.create(n.state.doc, 0, n.state.doc.content.size);
2004
+ let e = tt.create(n.state.doc, 0, n.state.doc.content.size);
2001
2005
  n.dispatch(n.state.tr.setSelection(e));
2002
2006
  break;
2003
2007
  }
@@ -2005,7 +2009,7 @@ function Gi(e) {
2005
2009
  e.selectedImage.value && (e.showImageProperties.value = !0);
2006
2010
  break;
2007
2011
  case "replaceImage":
2008
- e.selectedImage.value && Bi(n, e.selectedImage.value.pmPos);
2012
+ e.selectedImage.value && Xi(n, e.selectedImage.value.pmPos);
2009
2013
  break;
2010
2014
  case "deleteImage":
2011
2015
  if (e.selectedImage.value) {
@@ -2043,7 +2047,7 @@ function Gi(e) {
2043
2047
  }
2044
2048
  //#endregion
2045
2049
  //#region src/composables/useDocumentLifecycle.ts
2046
- function Ki(e) {
2050
+ function na(e) {
2047
2051
  async function t(t) {
2048
2052
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2049
2053
  }
@@ -2062,8 +2066,8 @@ function Ki(e) {
2062
2066
  }
2063
2067
  //#endregion
2064
2068
  //#region src/composables/useDocxEditorRefApi.ts
2065
- var qi = Date.now();
2066
- function Ji(e) {
2069
+ var ra = Date.now();
2070
+ function ia(e) {
2067
2071
  let t = [];
2068
2072
  function n() {
2069
2073
  e.onPrint?.(), window.print();
@@ -2077,11 +2081,11 @@ function Ji(e) {
2077
2081
  function i(t, n) {
2078
2082
  let r = e.pagesRef.value;
2079
2083
  if (!r) return !1;
2080
- let i = $t(r, t), a = i.at(0);
2084
+ let i = en(r, t), a = i.at(0);
2081
2085
  return a ? (a.scrollIntoView({
2082
2086
  block: "center",
2083
2087
  behavior: "smooth"
2084
- }), n?.highlight && en(i, n.highlight), !0) : !1;
2088
+ }), n?.highlight && tn(i, n.highlight), !0) : !1;
2085
2089
  }
2086
2090
  function a() {
2087
2091
  return e.zoom.value;
@@ -2112,7 +2116,7 @@ function Ji(e) {
2112
2116
  getPageNumberForPmPos: (t) => {
2113
2117
  let n = e.layout.value;
2114
2118
  if (!n) return null;
2115
- let r = Qt(n, t);
2119
+ let r = It(n, t);
2116
2120
  return r == null ? null : r + 1;
2117
2121
  }
2118
2122
  }, o;
@@ -2123,7 +2127,7 @@ function Ji(e) {
2123
2127
  function l() {
2124
2128
  let t = e.layout.value, n = e.editorView.value;
2125
2129
  if (!t || !n) return 0;
2126
- let r = Qt(t, n.state.selection.from);
2130
+ let r = It(t, n.state.selection.from);
2127
2131
  return r == null ? 0 : r + 1;
2128
2132
  }
2129
2133
  function u(t) {
@@ -2156,10 +2160,10 @@ function Ji(e) {
2156
2160
  ensureEditorView: () => e.editor.ensureView(),
2157
2161
  createAIEditSnapshot: () => {
2158
2162
  let t = e.editorView.value;
2159
- return t ? Gt(t.state.doc) : null;
2163
+ return t ? qt(t.state.doc) : null;
2160
2164
  },
2161
2165
  applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
2162
- Ut(r.version);
2166
+ Gt(r.version);
2163
2167
  let a = e.editorView.value;
2164
2168
  if (!a) {
2165
2169
  let e = "committed";
@@ -2169,11 +2173,11 @@ function Ji(e) {
2169
2173
  reason: "unsupportedBlock"
2170
2174
  }));
2171
2175
  return {
2172
- version: $,
2176
+ version: Vt,
2173
2177
  status: e,
2174
2178
  applied: [],
2175
2179
  skipped: t,
2176
- issues: Jt(r.operations, t),
2180
+ issues: Xt(r.operations, t),
2177
2181
  receipts: [],
2178
2182
  undoHandle: null
2179
2183
  };
@@ -2183,9 +2187,9 @@ function Ji(e) {
2183
2187
  let s = e.getComments(), c = {
2184
2188
  state: a.state,
2185
2189
  dispatch: (e) => {
2186
- a.dispatch(xt(e)), c.state = a.state;
2190
+ a.dispatch(St(e)), c.state = a.state;
2187
2191
  }
2188
- }, l = Ht({
2192
+ }, l = Wt({
2189
2193
  view: c,
2190
2194
  snapshot: n,
2191
2195
  batch: r,
@@ -2193,7 +2197,7 @@ function Ji(e) {
2193
2197
  createCommentId: e.createAIEditComment,
2194
2198
  createUndoHandle: () => ({
2195
2199
  type: "documentOperationUndo",
2196
- id: `vue-${String(qi++)}`
2200
+ id: `vue-${String(ra++)}`
2197
2201
  })
2198
2202
  });
2199
2203
  return l.undoHandle !== null && t.push({
@@ -2231,7 +2235,7 @@ function Ji(e) {
2231
2235
  },
2232
2236
  applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
2233
2237
  let a = e.editorView.value;
2234
- return a ? Vt({
2238
+ return a ? Ut({
2235
2239
  view: a,
2236
2240
  snapshot: t,
2237
2241
  operations: n,
@@ -2248,41 +2252,42 @@ function Ji(e) {
2248
2252
  },
2249
2253
  acceptAIEditOperation: (t) => {
2250
2254
  let n = e.editorView.value;
2251
- return n ? kt(t)(n.state, n.dispatch) : !1;
2255
+ return n ? At(t)(n.state, n.dispatch) : !1;
2252
2256
  },
2253
2257
  rejectAIEditOperation: (t) => {
2254
2258
  let n = e.editorView.value;
2255
- return n ? Mt(t)(n.state, n.dispatch) : !1;
2259
+ return n ? Nt(t)(n.state, n.dispatch) : !1;
2256
2260
  },
2257
2261
  undo: () => e.editor.undo(),
2258
2262
  redo: () => e.editor.redo(),
2259
2263
  scrollToAIEditOperation: (t) => {
2260
2264
  let n = e.editorView.value;
2261
2265
  if (!n) return !1;
2262
- let r = jt(n.state, t);
2266
+ let r = Mt(n.state, t);
2263
2267
  if (!r) return !1;
2264
- let { from: i, to: a } = ln(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2265
- return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2268
+ let { from: i, to: a } = un(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2269
+ return n.dispatch(n.state.tr.setSelection(tt.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2266
2270
  },
2267
2271
  scrollToBlock: (t, n) => {
2268
2272
  let r = e.editorView.value;
2269
2273
  if (!r) return !1;
2270
- let i = un({
2274
+ let i = dn({
2271
2275
  blockId: t,
2272
2276
  doc: r.state.doc,
2273
2277
  snapshot: n
2274
2278
  });
2275
2279
  if (i === null) return !1;
2276
2280
  let { from: a, to: o } = i, s = r.state.doc.resolve(a), c = r.state.doc.resolve(o);
2277
- return r.dispatch(r.state.tr.setSelection(Z.between(s, c))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(a)), !0;
2281
+ return r.dispatch(r.state.tr.setSelection(tt.between(s, c))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(a)), !0;
2278
2282
  },
2283
+ showInDocument: () => !1,
2279
2284
  getTrackedChanges: () => {
2280
2285
  let t = e.editorView.value;
2281
- return t ? Yt(t.state.doc) : [];
2286
+ return t ? Zt(t.state.doc) : [];
2282
2287
  },
2283
2288
  getCommentAnchors: () => {
2284
2289
  let t = e.editorView.value;
2285
- return t ? qt(t.state.doc) : [];
2290
+ return t ? Yt(t.state.doc) : [];
2286
2291
  },
2287
2292
  getSelectionText: () => {
2288
2293
  let t = e.editorView.value;
@@ -2290,12 +2295,13 @@ function Ji(e) {
2290
2295
  },
2291
2296
  getPageText: (t) => {
2292
2297
  let n = e.editorView.value;
2293
- return n ? dn(e.layout.value, n.state.doc, t) : null;
2298
+ return n ? fn(e.layout.value, n.state.doc, t) : null;
2294
2299
  },
2300
+ getTargetPage: () => null,
2295
2301
  getContentControls: (t = {}) => {
2296
2302
  let n = e.editorView.value;
2297
- return n ? rn(n.state.doc, t).map((e) => ({
2298
- properties: tn(e.node),
2303
+ return n ? an(n.state.doc, t).map((e) => ({
2304
+ properties: nn(e.node),
2299
2305
  path: e.path,
2300
2306
  pmPos: e.pos
2301
2307
  })) : [];
@@ -2303,60 +2309,60 @@ function Ji(e) {
2303
2309
  scrollToContentControl: (t) => {
2304
2310
  let n = e.editorView.value;
2305
2311
  if (!n) return !1;
2306
- let r = nn(n.state.doc, t);
2312
+ let r = rn(n.state.doc, t);
2307
2313
  if (!r) return !1;
2308
2314
  let i = r.pos + 1, a = n.state.doc.resolve(i);
2309
- return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2315
+ return n.dispatch(n.state.tr.setSelection(tt.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2310
2316
  },
2311
2317
  setContentControlContent: (t, n, r = {}) => {
2312
2318
  let i = e.editorView.value;
2313
2319
  if (!i) return !1;
2314
- let a = typeof n == "string" ? on(i.state, t, n, r) : cn(i.state, t, n, r);
2320
+ let a = typeof n == "string" ? sn(i.state, t, n, r) : ln(i.state, t, n, r);
2315
2321
  return a ? (i.dispatch(a), !0) : !1;
2316
2322
  },
2317
2323
  setContentControlValue: (t, n, r = {}) => {
2318
2324
  let i = e.editorView.value;
2319
2325
  if (!i) return !1;
2320
- let a = sn(i.state, t, n, r);
2326
+ let a = cn(i.state, t, n, r);
2321
2327
  return a ? (i.dispatch(a), !0) : !1;
2322
2328
  },
2323
2329
  removeContentControl: (t, n = {}) => {
2324
2330
  let r = e.editorView.value;
2325
2331
  if (!r) return !1;
2326
- let i = an(r.state, t, n);
2332
+ let i = on(r.state, t, n);
2327
2333
  return i ? (r.dispatch(i), !0) : !1;
2328
2334
  }
2329
2335
  } };
2330
2336
  }
2331
2337
  //#endregion
2332
2338
  //#region src/composables/useFormattingActions.ts
2333
- function Yi(e) {
2339
+ function aa(e) {
2334
2340
  let t = () => e.activeView?.value ?? e.editorView.value;
2335
2341
  function n() {
2336
2342
  let e = t();
2337
- e && (St(e.state, e.dispatch, e), e.focus());
2343
+ e && (Ct(e.state, e.dispatch, e), e.focus());
2338
2344
  }
2339
2345
  function r(n) {
2340
2346
  let r = t();
2341
2347
  if (!r) return;
2342
2348
  let i = e.getDocument(), a = i?.package?.styles;
2343
2349
  if (a) {
2344
- let e = ke(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? _n(i.package.numbering) : null };
2345
- e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), fn(n, t)(r.state, (e) => r.dispatch(e));
2346
- } else fn(n)(r.state, (e) => r.dispatch(e));
2350
+ let e = ke(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? vn(i.package.numbering) : null };
2351
+ e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), pn(n, t)(r.state, (e) => r.dispatch(e));
2352
+ } else pn(n)(r.state, (e) => r.dispatch(e));
2347
2353
  r.focus();
2348
2354
  }
2349
2355
  function i() {
2350
2356
  let t = e.editorView.value;
2351
- t && (vn(t.state, (e) => t.dispatch(e), t), t.focus());
2357
+ t && (yn(t.state, (e) => t.dispatch(e), t), t.focus());
2352
2358
  }
2353
2359
  function a() {
2354
2360
  let t = e.editorView.value;
2355
- t && (bn(t.state, (e) => t.dispatch(e), t), t.focus());
2361
+ t && (xn(t.state, (e) => t.dispatch(e), t), t.focus());
2356
2362
  }
2357
2363
  function o() {
2358
2364
  let t = e.editorView.value;
2359
- t && (yn(t.state, (e) => t.dispatch(e), t), t.focus());
2365
+ t && (bn(t.state, (e) => t.dispatch(e), t), t.focus());
2360
2366
  }
2361
2367
  function s(e) {
2362
2368
  let n = t();
@@ -2375,7 +2381,7 @@ function Yi(e) {
2375
2381
  }
2376
2382
  //#endregion
2377
2383
  //#region src/composables/useHyperlinkManagement.ts
2378
- function Xi(e) {
2384
+ function oa(e) {
2379
2385
  let t = W(null);
2380
2386
  function n(e, t) {
2381
2387
  t(e.state, (t) => e.dispatch(t), e);
@@ -2406,14 +2412,14 @@ function Xi(e) {
2406
2412
  }
2407
2413
  function o(n, r) {
2408
2414
  let i = e.editorView.value;
2409
- i && (xn(i, {
2415
+ i && (Sn(i, {
2410
2416
  displayText: n,
2411
2417
  href: r
2412
2418
  }), t.value = null, i.focus());
2413
2419
  }
2414
2420
  function s() {
2415
2421
  let n = e.editorView.value;
2416
- n && (Sn(n, { popupHref: t.value?.href }), t.value = null, n.focus());
2422
+ n && (Cn(n, { popupHref: t.value?.href }), t.value = null, n.focus());
2417
2423
  }
2418
2424
  return {
2419
2425
  hyperlinkPopupData: t,
@@ -2426,7 +2432,7 @@ function Xi(e) {
2426
2432
  }
2427
2433
  //#endregion
2428
2434
  //#region src/composables/useImageActions.ts
2429
- function Zi(e) {
2435
+ function sa(e) {
2430
2436
  let t = we(null), n = W(!1), r = N(() => {
2431
2437
  e.stateTick.value;
2432
2438
  let n = e.editorView.value, r = t.value;
@@ -2446,9 +2452,9 @@ function Zi(e) {
2446
2452
  function a(n) {
2447
2453
  let r = e.editorView.value, a = t.value;
2448
2454
  if (!r || !a) return;
2449
- let o = st(n);
2455
+ let o = ct(n);
2450
2456
  if (!o) return;
2451
- 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;
2457
+ let s = r.state.doc.nodeAt(a.pmPos)?.attrs.wrapType === "inline" && o !== "inline" ? { initialPositionEmu: it(a.element, e.zoom.value) } : void 0, c = e.getCommands().setImageWrapType;
2452
2458
  c && (i(r, c(a.pmPos, o, s)), r.focus());
2453
2459
  }
2454
2460
  function o(n) {
@@ -2476,7 +2482,7 @@ function Zi(e) {
2476
2482
  }
2477
2483
  //#endregion
2478
2484
  //#region src/composables/useKeyboardShortcuts.ts
2479
- function Qi(e) {
2485
+ function ca(e) {
2480
2486
  function t(t) {
2481
2487
  if (t.key === "F1") {
2482
2488
  t.preventDefault(), e.showKeyboardShortcuts.value = !0;
@@ -2495,10 +2501,10 @@ function Qi(e) {
2495
2501
  }
2496
2502
  //#endregion
2497
2503
  //#region src/composables/useOutlineSidebar.ts
2498
- function $i(e) {
2504
+ function la(e) {
2499
2505
  function t() {
2500
2506
  let t = e.editorView.value;
2501
- t && (e.outlineHeadings.value = Cn(t.state.doc));
2507
+ t && (e.outlineHeadings.value = wn(t.state.doc));
2502
2508
  }
2503
2509
  function n() {
2504
2510
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -2509,7 +2515,7 @@ function $i(e) {
2509
2515
  function i(t) {
2510
2516
  let n = e.editorView.value;
2511
2517
  if (!n) return;
2512
- let r = n.state.doc.resolve(Math.min(t + 1, n.state.doc.content.size)), i = Z.near(r);
2518
+ let r = n.state.doc.resolve(Math.min(t + 1, n.state.doc.content.size)), i = tt.near(r);
2513
2519
  n.dispatch(n.state.tr.setSelection(i)), e.scrollToVisiblePosition(t), n.focus();
2514
2520
  }
2515
2521
  function a() {
@@ -2529,7 +2535,7 @@ function $i(e) {
2529
2535
  }
2530
2536
  //#endregion
2531
2537
  //#region src/composables/usePageSetupControls.ts
2532
- function ea(e) {
2538
+ function ua(e) {
2533
2539
  function t(t) {
2534
2540
  let n = e.getDocument();
2535
2541
  if (!n?.package?.document) return;
@@ -2556,19 +2562,19 @@ function ea(e) {
2556
2562
  }
2557
2563
  function s(t) {
2558
2564
  let n = e.editorView.value;
2559
- n && hn(t)(n.state, n.dispatch);
2565
+ n && gn(t)(n.state, n.dispatch);
2560
2566
  }
2561
2567
  function c(t) {
2562
2568
  let n = e.editorView.value;
2563
- n && gn(t)(n.state, n.dispatch);
2569
+ n && _n(t)(n.state, n.dispatch);
2564
2570
  }
2565
2571
  function l(t) {
2566
2572
  let n = e.editorView.value;
2567
- n && (t < 0 ? mn(-t, !0)(n.state, n.dispatch) : mn(t, !1)(n.state, n.dispatch));
2573
+ n && (t < 0 ? hn(-t, !0)(n.state, n.dispatch) : hn(t, !1)(n.state, n.dispatch));
2568
2574
  }
2569
2575
  function u(t) {
2570
2576
  let n = e.editorView.value;
2571
- n && pn(t)(n.state, n.dispatch);
2577
+ n && mn(t)(n.state, n.dispatch);
2572
2578
  }
2573
2579
  return {
2574
2580
  handlePageSetupApply: t,
@@ -2584,45 +2590,45 @@ function ea(e) {
2584
2590
  }
2585
2591
  //#endregion
2586
2592
  //#region src/utils/textSelection.ts
2587
- var ta = /[\p{L}\p{N}\p{M}_''-]/u, na = /\s/;
2588
- function ra(e) {
2589
- return !e || e.length === 0 ? !1 : ta.test(e);
2593
+ var da = /[\p{L}\p{N}\p{M}_''-]/u, fa = /\s/;
2594
+ function pa(e) {
2595
+ return !e || e.length === 0 ? !1 : da.test(e);
2590
2596
  }
2591
- function ia(e) {
2592
- return !e || e.length === 0 ? !1 : na.test(e);
2597
+ function ma(e) {
2598
+ return !e || e.length === 0 ? !1 : fa.test(e);
2593
2599
  }
2594
- function aa(e, t) {
2600
+ function ha(e, t) {
2595
2601
  if (!e || e.length === 0) return [0, 0];
2596
2602
  t = Math.max(0, Math.min(t, e.length - 1));
2597
2603
  let n = e[t];
2598
- if (ia(n)) {
2604
+ if (ma(n)) {
2599
2605
  let n = t, r = t;
2600
- for (; n > 0 && ia(e[n - 1]);) n--;
2601
- for (; r < e.length && ia(e[r]);) r++;
2606
+ for (; n > 0 && ma(e[n - 1]);) n--;
2607
+ for (; r < e.length && ma(e[r]);) r++;
2602
2608
  return [n, r];
2603
2609
  }
2604
- if (ra(n)) {
2610
+ if (pa(n)) {
2605
2611
  let n = t, r = t;
2606
- for (; n > 0 && ra(e[n - 1]);) n--;
2607
- for (; r < e.length && ra(e[r]);) r++;
2612
+ for (; n > 0 && pa(e[n - 1]);) n--;
2613
+ for (; r < e.length && pa(e[r]);) r++;
2608
2614
  return [n, r];
2609
2615
  }
2610
2616
  return [t, t + 1];
2611
2617
  }
2612
2618
  //#endregion
2613
2619
  //#region src/utils/domQueries.ts
2614
- function oa(e, t, n) {
2615
- let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : _t(e);
2620
+ function ga(e, t, n) {
2621
+ let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : vt(e);
2616
2622
  for (let e of r) {
2617
2623
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
2618
2624
  if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
2619
2625
  }
2620
2626
  return null;
2621
2627
  }
2622
- function sa(e, t, n) {
2628
+ function _a(e, t, n) {
2623
2629
  if (!e || !t) return;
2624
- let r = gt(e, n);
2625
- if (!r) for (let t of _t(e)) {
2630
+ let r = _t(e, n);
2631
+ if (!r) for (let t of vt(e)) {
2626
2632
  let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
2627
2633
  if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
2628
2634
  r = t;
@@ -2636,21 +2642,21 @@ function sa(e, t, n) {
2636
2642
  behavior: "smooth"
2637
2643
  });
2638
2644
  }
2639
- function ca(e, t, n, r) {
2645
+ function va(e, t, n, r) {
2640
2646
  if (!e || !t) return null;
2641
- let i = ut(e, n, r, 1);
2647
+ let i = dt(e, n, r, 1);
2642
2648
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
2643
2649
  }
2644
- function la(e, t, n, r) {
2650
+ function ya(e, t, n, r) {
2645
2651
  if (!e) return;
2646
- let i = oa(e, t, r);
2652
+ let i = ga(e, t, r);
2647
2653
  if (!i) return;
2648
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = aa(a, t - o), l = o + s, u = o + c;
2654
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = ha(a, t - o), l = o + s, u = o + c;
2649
2655
  l < u && n(l, u);
2650
2656
  }
2651
- function ua(e, t, n, r) {
2657
+ function ba(e, t, n, r) {
2652
2658
  if (!e) return;
2653
- let i = oa(e, t, r);
2659
+ let i = ga(e, t, r);
2654
2660
  if (!i) return;
2655
2661
  let a = i.closest(".layout-paragraph");
2656
2662
  if (!a) return;
@@ -2659,13 +2665,13 @@ function ua(e, t, n, r) {
2659
2665
  }
2660
2666
  //#endregion
2661
2667
  //#region src/composables/usePagesPointer.ts
2662
- var da = 500;
2663
- function fa(e) {
2668
+ var xa = 500;
2669
+ function Sa(e) {
2664
2670
  let t = W(null), n = null;
2665
2671
  function r() {
2666
2672
  n !== null && (clearTimeout(n), n = null);
2667
2673
  }
2668
- let i = we(null), a = 0, o = null, s = 0, c = !1, l = null, u = En(), d = re({
2674
+ let i = we(null), a = 0, o = null, s = 0, c = !1, l = null, u = Dn(), d = re({
2669
2675
  pagesContainer: e.pagesRef,
2670
2676
  onScrollExtendSelection: (e, t) => {
2671
2677
  if (!c || l === null) return;
@@ -2678,7 +2684,7 @@ function fa(e) {
2678
2684
  visible: !1
2679
2685
  }), p = null;
2680
2686
  function m(t, n) {
2681
- return ca(e.pagesRef.value, e.editorView.value, t, n);
2687
+ return va(e.pagesRef.value, e.editorView.value, t, n);
2682
2688
  }
2683
2689
  function h() {
2684
2690
  let t = i.value;
@@ -2691,18 +2697,18 @@ function fa(e) {
2691
2697
  function g(e, t) {
2692
2698
  let n = h();
2693
2699
  if (n) try {
2694
- let r = n.state.doc.resolve(e), i = t === void 0 ? r : n.state.doc.resolve(t), a = Z.between(r, i);
2700
+ let r = n.state.doc.resolve(e), i = t === void 0 ? r : n.state.doc.resolve(t), a = tt.between(r, i);
2695
2701
  n.dispatch(n.state.tr.setSelection(a));
2696
2702
  } catch {}
2697
2703
  }
2698
2704
  function _(t) {
2699
- sa(e.pagesRef.value, e.pagesViewportRef.value, t);
2705
+ _a(e.pagesRef.value, e.pagesViewportRef.value, t);
2700
2706
  }
2701
2707
  function v(t) {
2702
- la(e.pagesRef.value, t, g, i.value?.position);
2708
+ ya(e.pagesRef.value, t, g, i.value?.position);
2703
2709
  }
2704
2710
  function y(t) {
2705
- ua(e.pagesRef.value, t, g, i.value?.position);
2711
+ ba(e.pagesRef.value, t, g, i.value?.position);
2706
2712
  }
2707
2713
  function b(t) {
2708
2714
  let n = e.editorView.value;
@@ -2731,7 +2737,7 @@ function fa(e) {
2731
2737
  if (!o) return;
2732
2738
  let s = e.pagesViewportRef.value;
2733
2739
  if (!s || !(a.target instanceof HTMLElement)) return;
2734
- let l = Tn({
2740
+ let l = En({
2735
2741
  mouseX: a.clientX,
2736
2742
  mouseY: a.clientY,
2737
2743
  pagesContainer: o,
@@ -2741,7 +2747,7 @@ function fa(e) {
2741
2747
  if (!l) {
2742
2748
  n === null && (n = setTimeout(() => {
2743
2749
  t.value = null, n = null;
2744
- }, wn));
2750
+ }, Tn));
2745
2751
  return;
2746
2752
  }
2747
2753
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -2756,7 +2762,7 @@ function fa(e) {
2756
2762
  n.preventDefault(), n.stopPropagation();
2757
2763
  let r = t.value, i = e.editorView.value;
2758
2764
  if (!r || !i) return;
2759
- let a = i.state.tr.setSelection(Z.create(i.state.doc, r.cellPmPos + 1));
2765
+ let a = i.state.tr.setSelection(tt.create(i.state.doc, r.cellPmPos + 1));
2760
2766
  i.dispatch(a);
2761
2767
  let o = e.getCommands(), s = r.type === "row" ? o.addRowBelow : o.addColumnRight;
2762
2768
  s && (s()(i.state, (e) => i.dispatch(e), i), t.value = null, i.focus());
@@ -2901,13 +2907,13 @@ function fa(e) {
2901
2907
  i.value && d && (d.closest(".layout-page-header") || d.closest(".layout-page-footer") || d.closest(".hf-editor") || (i.value = null, n.focus()));
2902
2908
  let f = h() ?? n;
2903
2909
  if (!e.readOnly.value && e.tableResize.tryStartResize(t, f)) return;
2904
- let p = at(r);
2910
+ let p = ot(r);
2905
2911
  if (p) {
2906
2912
  t.preventDefault(), t.stopPropagation();
2907
2913
  let n = Number(p.dataset.pmStart);
2908
2914
  if (!Number.isNaN(n)) {
2909
2915
  try {
2910
- f.dispatch(f.state.tr.setSelection($e.create(f.state.doc, n)));
2916
+ f.dispatch(f.state.tr.setSelection(Z.create(f.state.doc, n)));
2911
2917
  } catch {}
2912
2918
  e.selectedImage.value = {
2913
2919
  element: p,
@@ -2926,12 +2932,12 @@ function fa(e) {
2926
2932
  return;
2927
2933
  }
2928
2934
  let b = Date.now();
2929
- if (b - a < da && o === _ ? s++ : s = 1, a = b, o = _, s === 2) v(_);
2935
+ if (b - a < xa && o === _ ? s++ : s = 1, a = b, o = _, s === 2) v(_);
2930
2936
  else if (s >= 3) y(_), s = 0;
2931
2937
  else if (t.shiftKey) {
2932
2938
  let { from: e } = f.state.selection;
2933
2939
  g(e, _);
2934
- } else g(_), l = _, c = !0, u.begin(Dn(f, _));
2940
+ } else g(_), l = _, c = !0, u.begin(On(f, _));
2935
2941
  f.focus();
2936
2942
  }
2937
2943
  function ae(e) {
@@ -2999,17 +3005,17 @@ function fa(e) {
2999
3005
  }
3000
3006
  //#endregion
3001
3007
  //#region src/utils/hostFonts.ts
3002
- function pa(e) {
3008
+ function Ca(e) {
3003
3009
  return typeof e == "string" && e.trim().length > 0;
3004
3010
  }
3005
- function ma(e) {
3006
- return typeof e != "object" || !e ? !1 : pa(Reflect.get(e, "family")) && pa(Reflect.get(e, "src"));
3011
+ function wa(e) {
3012
+ return typeof e != "object" || !e ? !1 : Ca(Reflect.get(e, "family")) && Ca(Reflect.get(e, "src"));
3007
3013
  }
3008
- function ha(e) {
3014
+ function Ta(e) {
3009
3015
  if (!e) return [];
3010
3016
  let t = [];
3011
3017
  for (let n of e) {
3012
- if (!ma(n)) continue;
3018
+ if (!wa(n)) continue;
3013
3019
  let e = { display: "swap" };
3014
3020
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
3015
3021
  family: n.family.trim(),
@@ -3019,10 +3025,10 @@ function ha(e) {
3019
3025
  }
3020
3026
  return t;
3021
3027
  }
3022
- function ga() {
3028
+ function Ea() {
3023
3029
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
3024
3030
  }
3025
- async function _a(e, t, n, r) {
3031
+ async function Da(e, t, n, r) {
3026
3032
  let i;
3027
3033
  try {
3028
3034
  i = new FontFace(t, n, r), e.add(i);
@@ -3031,39 +3037,39 @@ async function _a(e, t, n, r) {
3031
3037
  }
3032
3038
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
3033
3039
  }
3034
- async function va(e) {
3035
- let t = ga();
3040
+ async function Oa(e) {
3041
+ let t = Ea();
3036
3042
  if (!t) return [];
3037
- let n = ha(e);
3043
+ let n = Ta(e);
3038
3044
  if (n.length === 0) return [];
3039
3045
  let r = [];
3040
3046
  return await Promise.all(n.map(async ({ family: e, source: n, descriptors: i }) => {
3041
- let a = await _a(t, e, n, i);
3047
+ let a = await Da(t, e, n, i);
3042
3048
  a && r.push(a);
3043
3049
  })), r;
3044
3050
  }
3045
- function ya(e) {
3046
- let t = ga();
3051
+ function ka(e) {
3052
+ let t = Ea();
3047
3053
  if (t) for (let n of e) t.delete(n);
3048
3054
  }
3049
3055
  //#endregion
3050
3056
  //#region src/components/DocxEditor.vue?vue&type=script&setup=true&lang.ts
3051
- var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3057
+ var Aa = { class: "docx-editor-vue__toolbar-shell" }, ja = {
3052
3058
  key: 0,
3053
3059
  class: "docx-editor-vue__error"
3054
- }, Sa = {
3060
+ }, Ma = {
3055
3061
  key: 1,
3056
3062
  class: "docx-editor-vue__loading"
3057
- }, Ca = {
3063
+ }, Na = {
3058
3064
  key: 2,
3059
3065
  class: "docx-editor-vue__placeholder"
3060
- }, wa = { class: "docx-editor-vue__editor-area" }, Ta = {
3066
+ }, Pa = { class: "docx-editor-vue__editor-area" }, Fa = {
3061
3067
  key: 0,
3062
3068
  class: "docx-editor-vue__ruler-h"
3063
- }, Ea = {
3069
+ }, Ia = {
3064
3070
  key: 1,
3065
3071
  class: "docx-editor-vue__ruler-v"
3066
- }, Da = {
3072
+ }, La = {
3067
3073
  class: "docx-editor-vue__editor-content-wrapper",
3068
3074
  style: {
3069
3075
  position: "relative",
@@ -3071,11 +3077,11 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3071
3077
  flexDirection: "column",
3072
3078
  minHeight: "100%"
3073
3079
  }
3074
- }, Oa = {
3080
+ }, Ra = {
3075
3081
  "data-testid": "selection-overlay",
3076
3082
  class: "docx-editor-vue__decoration-origin",
3077
3083
  "aria-hidden": "true"
3078
- }, ka = ["aria-label"], Aa = /*#__PURE__*/ t(/* @__PURE__ */ z({
3084
+ }, za = ["aria-label"], Ba = /*#__PURE__*/ t(/* @__PURE__ */ z({
3079
3085
  __name: "DocxEditor",
3080
3086
  props: {
3081
3087
  documentBuffer: { default: null },
@@ -3195,10 +3201,10 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3195
3201
  ],
3196
3202
  setup(t, { expose: n, emit: a }) {
3197
3203
  let o = t, s = a;
3198
- e(), i(o.components), Sr(W(!1));
3199
- let l = W(o.mode), u = N(() => o.readOnly || l.value === "viewing"), d = N(() => o.showReviewControls), f = N(() => ct(l.value)), p = W("all-markup");
3204
+ e(), i(o.components), Mr(W(!1));
3205
+ let l = W(o.mode), u = N(() => o.readOnly || l.value === "viewing"), d = N(() => o.showReviewControls), f = N(() => lt(l.value)), p = W("all-markup");
3200
3206
  function h() {
3201
- dn(lt(l.value));
3207
+ dn(ut(l.value));
3202
3208
  }
3203
3209
  function y(e) {
3204
3210
  p.value = e;
@@ -3213,13 +3219,13 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3213
3219
  function Me(e) {
3214
3220
  o.enableWheelZoom !== !1 && Oe(e);
3215
3221
  }
3216
- Qi({
3222
+ ca({
3217
3223
  showKeyboardShortcuts: de,
3218
3224
  showFindReplace: D,
3219
3225
  showHyperlink: ue,
3220
3226
  handleZoomKeyDown: ke
3221
3227
  });
3222
- let { editor: Pe, editorView: X, editorState: Le, isReady: Ge, isDirty: Ke, parseError: qe, layout: Je, blocks: Ye, measures: Xe, loadBuffer: Ze, loadDocument: Qe, save: $e, getDocument: et, getCommands: Z, focus: tt, reLayout: nt } = C({
3228
+ let { editor: Pe, editorView: X, editorState: Le, isReady: Ge, isDirty: Ke, parseError: qe, layout: Je, blocks: Ye, measures: Xe, loadBuffer: Ze, loadDocument: Qe, save: $e, getDocument: Z, getCommands: et, focus: tt, reLayout: nt } = C({
3223
3229
  hiddenContainer: w,
3224
3230
  pagesContainer: T,
3225
3231
  readOnly: u,
@@ -3259,25 +3265,25 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3259
3265
  J(() => o.fonts, (e, t, n) => {
3260
3266
  if (!e || e.length === 0) return;
3261
3267
  let r = !1, i = [];
3262
- va(e).then((e) => {
3268
+ Oa(e).then((e) => {
3263
3269
  if (r) {
3264
- ya(e);
3270
+ ka(e);
3265
3271
  return;
3266
3272
  }
3267
3273
  i = e, e.length !== 0 && it();
3268
3274
  }), n(() => {
3269
- r = !0, i.length !== 0 && (ya(i), it());
3275
+ r = !0, i.length !== 0 && (ka(i), it());
3270
3276
  });
3271
3277
  }, { immediate: !0 });
3272
- let { selectedImage: at, imageInteracting: ot, imageToolbarContext: st, handleToolbarImageWrap: ut, handleImageTransform: dt } = Zi({
3278
+ let { selectedImage: at, imageInteracting: ot, imageToolbarContext: st, handleToolbarImageWrap: ct, handleImageTransform: dt } = sa({
3273
3279
  editorView: X,
3274
3280
  zoom: B,
3275
3281
  stateTick: E,
3276
- getCommands: Z
3277
- }), { hyperlinkPopupData: ft, handleHyperlinkSubmit: pt, handleHyperlinkRemove: mt, handleHyperlinkPopupNavigate: ht, handleHyperlinkPopupEdit: gt, handleHyperlinkPopupRemove: _t } = Xi({
3282
+ getCommands: et
3283
+ }), { hyperlinkPopupData: ft, handleHyperlinkSubmit: pt, handleHyperlinkRemove: mt, handleHyperlinkPopupNavigate: ht, handleHyperlinkPopupEdit: gt, handleHyperlinkPopupRemove: _t } = oa({
3278
3284
  editorView: X,
3279
- getCommands: Z
3280
- }), vt = ie(), { tableInsertButton: yt, scrollPageInfo: bt, resolvePos: xt, setPmSelection: St, scrollVisiblePositionIntoView: Ct, handlePagesMouseDown: wt, handlePagesMouseMove: Tt, handlePagesClick: Et, handleTableInsertClick: Dt } = fa({
3285
+ getCommands: et
3286
+ }), vt = ie(), { tableInsertButton: yt, scrollPageInfo: bt, resolvePos: xt, setPmSelection: St, scrollVisiblePositionIntoView: Ct, handlePagesMouseDown: wt, handlePagesMouseMove: Tt, handlePagesClick: Et, handleTableInsertClick: Dt } = Sa({
3281
3287
  editorView: X,
3282
3288
  pagesRef: T,
3283
3289
  pagesViewportRef: se,
@@ -3291,12 +3297,12 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3291
3297
  tryStartResize: vt.tryStartResize,
3292
3298
  isResizing: N(() => vt.isResizing())
3293
3299
  },
3294
- getCommands: Z,
3295
- getDocument: et,
3300
+ getCommands: et,
3301
+ getDocument: Z,
3296
3302
  reLayout: nt,
3297
3303
  emit: () => {},
3298
3304
  clearOverlay: () => {}
3299
- }), Ot = $i({
3305
+ }), Ot = la({
3300
3306
  editorView: X,
3301
3307
  showOutline: A,
3302
3308
  showSidebar: M,
@@ -3304,27 +3310,27 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3304
3310
  activeSidebarItem: pe,
3305
3311
  extractCommentsAndChanges: () => {},
3306
3312
  scrollToVisiblePosition: Ct
3307
- }), { contextMenu: kt, imageContextMenu: At, imageContextMenuTextActions: jt, customTextMenuItems: Mt, handleContextMenu: Nt, handleSelectedImageContextMenu: Pt, handleImageWrapSelect: Ft, handleContextMenuAction: It } = Gi({
3313
+ }), { contextMenu: kt, imageContextMenu: At, imageContextMenuTextActions: jt, customTextMenuItems: Mt, handleContextMenu: Nt, handleSelectedImageContextMenu: Pt, handleImageWrapSelect: Ft, handleContextMenuAction: It } = ta({
3308
3314
  editorView: X,
3309
3315
  selectedImage: at,
3310
3316
  zoom: B,
3311
3317
  showImageProperties: O,
3312
- getCommands: Z,
3318
+ getCommands: et,
3313
3319
  clearOverlay: () => {},
3314
3320
  setPmSelection: St,
3315
3321
  resolvePos: xt,
3316
3322
  customContextMenuItems: () => u.value ? void 0 : o.customContextMenuItems,
3317
3323
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t)
3318
- }), Lt = ae(X, E), Rt = N(() => Lt.value.entries), Q = Ni({
3324
+ }), Lt = ae(X, E), Rt = N(() => Lt.value.entries), Q = Ui({
3319
3325
  editorView: X,
3320
- getDocument: et,
3326
+ getDocument: Z,
3321
3327
  author: () => o.author,
3322
3328
  commentsProp: () => o.comments,
3323
3329
  onCommentsChange: (e) => {
3324
3330
  o.onCommentsChange?.(e), s("comments-change", e);
3325
3331
  },
3326
3332
  reLayout: nt
3327
- }), zt = Q.comments, $ = Mi({
3333
+ }), zt = Q.comments, $ = Hi({
3328
3334
  editorView: X,
3329
3335
  pagesViewport: se,
3330
3336
  pagesContainer: T,
@@ -3342,13 +3348,13 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3342
3348
  }
3343
3349
  let Vt = N(() => {
3344
3350
  E.value;
3345
- let e = et()?.package.document;
3351
+ let e = Z()?.package.document;
3346
3352
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
3347
3353
  }), Ht = N(() => {
3348
3354
  E.value;
3349
3355
  let e = {};
3350
3356
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
3351
- let t = et()?.package.styles?.styles;
3357
+ let t = Z()?.package.styles?.styles;
3352
3358
  return t !== void 0 && (e.documentStyles = t), e;
3353
3359
  }), Ut = N(() => We(Vt.value?.pageWidth ?? 12240) * B.value), Wt = N(() => {
3354
3360
  let e = /* @__PURE__ */ new Set();
@@ -3358,9 +3364,9 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3358
3364
  transform: B.value === 1 ? void 0 : `scale(${B.value})`,
3359
3365
  transformOrigin: "top center",
3360
3366
  transition: "transform 0.2s ease"
3361
- })), { handleApplyStyle: Kt, handleInsertSymbol: qt, handleInsertSectionBreakNextPage: Jt, handleInsertSectionBreakContinuous: Yt } = Yi({
3367
+ })), { handleApplyStyle: Kt, handleInsertSymbol: qt, handleInsertSectionBreakNextPage: Jt, handleInsertSectionBreakContinuous: Yt } = aa({
3362
3368
  editorView: X,
3363
- getDocument: et
3369
+ getDocument: Z
3364
3370
  });
3365
3371
  function Xt() {
3366
3372
  if (o.onInsertImage) {
@@ -3399,9 +3405,9 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3399
3405
  let e = X.value;
3400
3406
  e && (Re(e), e.focus());
3401
3407
  }
3402
- let { handlePageSetupApply: en, handleLeftMarginChange: tn, handleRightMarginChange: nn, handleTopMarginChange: rn, handleBottomMarginChange: an, handleIndentLeftChange: on, handleIndentRightChange: sn, handleFirstLineIndentChange: cn, handleTabStopRemove: ln } = ea({
3408
+ let { handlePageSetupApply: en, handleLeftMarginChange: tn, handleRightMarginChange: nn, handleTopMarginChange: rn, handleBottomMarginChange: an, handleIndentLeftChange: on, handleIndentRightChange: sn, handleFirstLineIndentChange: cn, handleTabStopRemove: ln } = ua({
3403
3409
  editorView: X,
3404
- getDocument: et,
3410
+ getDocument: Z,
3405
3411
  readOnly: u,
3406
3412
  stateTick: E,
3407
3413
  reLayout: nt,
@@ -3466,7 +3472,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3466
3472
  Zt(e, t);
3467
3473
  }
3468
3474
  let mn = W(!1);
3469
- Ki({
3475
+ na({
3470
3476
  documentBuffer: () => o.documentBuffer ?? null,
3471
3477
  document: () => o.document ?? null,
3472
3478
  loadDocumentBuffer: Ze,
@@ -3496,7 +3502,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3496
3502
  return;
3497
3503
  }
3498
3504
  re.value = !0, Ot.recomputeHeadingsIfOpen(), Q.seedFromDocument();
3499
- let t = et();
3505
+ let t = Z();
3500
3506
  t && o.onCompatibilityChange?.(Be(t)), o.autoOpenReviewSidebar !== !1 && !mn.value && (zt.value.length > 0 || Rt.value.length > 0) && (mn.value = !0, M.value = !0), _n(), s("ready");
3501
3507
  }), xe(() => {
3502
3508
  let e = Pe.on("selectionChange", () => {
@@ -3510,7 +3516,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3510
3516
  e(), t(), n(), r(), i();
3511
3517
  });
3512
3518
  });
3513
- let { exposed: vn } = Ji({
3519
+ let { exposed: vn } = ia({
3514
3520
  editor: Pe,
3515
3521
  editorView: X,
3516
3522
  isDirty: Ke,
@@ -3529,7 +3535,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3529
3535
  getComments: () => Q.comments.value,
3530
3536
  setComments: Q.setComments,
3531
3537
  focus: tt,
3532
- getDocument: et,
3538
+ getDocument: Z,
3533
3539
  setZoom: G,
3534
3540
  save: $e,
3535
3541
  loadDocument: Qe,
@@ -3546,7 +3552,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3546
3552
  ]),
3547
3553
  style: H(t.style)
3548
3554
  }, [
3549
- L("div", ba, [R(br, {
3555
+ L("div", Aa, [R(Ar, {
3550
3556
  "show-table-insert": o.showTableInsert !== !1,
3551
3557
  onRename: n[0] ||= (e) => s("rename", e),
3552
3558
  onMenuAction: fn,
@@ -3558,7 +3564,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3558
3564
  }, 8, ["show-table-insert"]), t.showToolbar ? (U(), P(te, ve({
3559
3565
  key: 0,
3560
3566
  view: q(X),
3561
- "get-commands": q(Z),
3567
+ "get-commands": q(et),
3562
3568
  "state-tick": E.value,
3563
3569
  "zoom-percent": q(_e),
3564
3570
  "is-min-zoom": q(ye),
@@ -3589,12 +3595,12 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3589
3595
  onToggleTrackChanges: h,
3590
3596
  "onUpdate:displayMode": y,
3591
3597
  onImageProperties: n[6] ||= (e) => O.value = !0,
3592
- onImageWrapType: q(ut),
3598
+ onImageWrapType: q(ct),
3593
3599
  onImageTransform: q(dt)
3594
3600
  }), me({
3595
3601
  "table-context": Ee(() => [R(_, {
3596
3602
  view: q(X),
3597
- "get-commands": q(Z),
3603
+ "get-commands": q(et),
3598
3604
  "state-tick": E.value,
3599
3605
  theme: t.theme ?? null
3600
3606
  }, null, 8, [
@@ -3636,7 +3642,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3636
3642
  "onImageWrapType",
3637
3643
  "onImageTransform"
3638
3644
  ])) : F("", !0)]),
3639
- R(hr, {
3645
+ R(Tr, {
3640
3646
  "show-find-replace": D.value,
3641
3647
  "onUpdate:showFindReplace": n[7] ||= (e) => D.value = e,
3642
3648
  "show-hyperlink": ue.value,
@@ -3670,10 +3676,10 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3670
3676
  "onHyperlinkRemove",
3671
3677
  "onPageSetupApply"
3672
3678
  ]),
3673
- q(qe) ? (U(), I("div", xa, K(q(qe)), 1)) : rt.value ? (U(), I("div", Sa, [Ce(e.$slots, "loading-indicator", {}, () => [t.loadingIndicator ? (U(), P(S, {
3679
+ q(qe) ? (U(), I("div", ja, K(q(qe)), 1)) : rt.value ? (U(), I("div", Ma, [Ce(e.$slots, "loading-indicator", {}, () => [t.loadingIndicator ? (U(), P(S, {
3674
3680
  key: 0,
3675
3681
  node: t.loadingIndicator
3676
- }, null, 8, ["node"])) : (U(), I(j, { key: 1 }, [ge(K(q(x)("loadingDocument")), 1)], 64))], !0)])) : !q(Ge) && !ne.value ? (U(), I("div", Ca, [Ce(e.$slots, "placeholder", {}, () => [t.placeholder ? (U(), P(S, {
3682
+ }, null, 8, ["node"])) : (U(), I(j, { key: 1 }, [ge(K(q(x)("loadingDocument")), 1)], 64))], !0)])) : !q(Ge) && !ne.value ? (U(), I("div", Na, [Ce(e.$slots, "placeholder", {}, () => [t.placeholder ? (U(), P(S, {
3677
3683
  key: 0,
3678
3684
  node: t.placeholder
3679
3685
  }, null, 8, ["node"])) : (U(), I(j, { key: 1 }, [ge("No document loaded")], 64))], !0)])) : F("", !0),
@@ -3687,8 +3693,8 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3687
3693
  ref: ce,
3688
3694
  class: "docx-editor-vue__editor-scroll",
3689
3695
  onScroll: gn
3690
- }, [L("div", wa, [
3691
- le.value && !u.value ? (U(), I("div", Ta, [R(ee, {
3696
+ }, [L("div", Pa, [
3697
+ le.value && !u.value ? (U(), I("div", Fa, [R(ee, {
3692
3698
  "section-props": Vt.value,
3693
3699
  zoom: q(B),
3694
3700
  unit: t.rulerUnit ?? "inch",
@@ -3722,7 +3728,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3722
3728
  "onFirstLineIndentChange",
3723
3729
  "onTabStopRemove"
3724
3730
  ])])) : F("", !0),
3725
- le.value && !u.value ? (U(), I("div", Ea, [R(g, {
3731
+ le.value && !u.value ? (U(), I("div", Ia, [R(g, {
3726
3732
  "section-props": Vt.value,
3727
3733
  zoom: q(B),
3728
3734
  unit: t.rulerUnit ?? "inch",
@@ -3747,12 +3753,12 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3747
3753
  onClick: n[22] ||= (...e) => q(Et) && q(Et)(...e),
3748
3754
  onContextmenu: n[23] ||= Y((...e) => q(Nt) && q(Nt)(...e), ["prevent"])
3749
3755
  }, [
3750
- L("div", Da, [L("div", {
3756
+ L("div", La, [L("div", {
3751
3757
  ref_key: "pagesRef",
3752
3758
  ref: T,
3753
3759
  class: "docx-editor-vue__pages paged-editor__pages",
3754
3760
  style: H(Gt.value)
3755
- }, null, 4), L("div", Oa, [R(ur, {
3761
+ }, null, 4), L("div", Ra, [R(br, {
3756
3762
  "get-view": () => q(X),
3757
3763
  "get-pages-container": () => T.value,
3758
3764
  "editor-state": q(Le),
@@ -3774,7 +3780,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3774
3780
  "on-term-click",
3775
3781
  "selected-canonical",
3776
3782
  "selection-seq"
3777
- ]), o.showTemplateDirectives ? (U(), P(hi, {
3783
+ ]), o.showTemplateDirectives ? (U(), P(Ti, {
3778
3784
  key: 0,
3779
3785
  "get-view": () => q(X),
3780
3786
  "get-pages-container": () => T.value,
@@ -3792,7 +3798,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3792
3798
  "blocks",
3793
3799
  "measures"
3794
3800
  ])) : F("", !0)])]),
3795
- R(ii, {
3801
+ R(mi, {
3796
3802
  "image-info": q(at),
3797
3803
  zoom: q(B),
3798
3804
  view: q(X),
@@ -3806,7 +3812,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3806
3812
  "view",
3807
3813
  "onContextMenu"
3808
3814
  ]),
3809
- R(Ti, {
3815
+ R(Fi, {
3810
3816
  data: q(ft),
3811
3817
  "read-only": u.value,
3812
3818
  onNavigate: q(ht),
@@ -3831,7 +3837,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3831
3837
  }),
3832
3838
  "aria-label": q(yt).type === "row" ? "Insert row" : "Insert column",
3833
3839
  onMousedown: n[16] ||= (...e) => q(Dt) && q(Dt)(...e)
3834
- }, " + ", 44, ka)) : F("", !0),
3840
+ }, " + ", 44, za)) : F("", !0),
3835
3841
  R(m, {
3836
3842
  comments: q(zt),
3837
3843
  "pages-container": T.value,
@@ -3910,12 +3916,12 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3910
3916
  size: 18
3911
3917
  })], 36)) : F("", !0)
3912
3918
  ], 544),
3913
- A.value ? F("", !0) : (U(), P(oi, {
3919
+ A.value ? F("", !0) : (U(), P(gi, {
3914
3920
  key: 2,
3915
3921
  "left-offset": 12,
3916
3922
  onToggle: q(Ot).handleToggleOutline
3917
3923
  }, null, 8, ["onToggle"])),
3918
- q(bt).totalPages > 1 ? (U(), P(si, {
3924
+ q(bt).totalPages > 1 ? (U(), P(_i, {
3919
3925
  key: 3,
3920
3926
  "current-page": q(bt).currentPage,
3921
3927
  "total-pages": q(bt).totalPages,
@@ -3925,7 +3931,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3925
3931
  "total-pages",
3926
3932
  "visible"
3927
3933
  ])) : F("", !0),
3928
- R(mr, {
3934
+ R(wr, {
3929
3935
  "is-open": A.value,
3930
3936
  headings: z.value,
3931
3937
  "get-scroll-container": () => T.value,
@@ -3938,7 +3944,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3938
3944
  "onNavigate"
3939
3945
  ])
3940
3946
  ])], 544),
3941
- R(Jr, {
3947
+ R(ii, {
3942
3948
  "read-only": u.value,
3943
3949
  "context-menu": q(kt),
3944
3950
  "image-context-menu": q(At),
@@ -3965,7 +3971,7 @@ var ba = { class: "docx-editor-vue__toolbar-shell" }, xa = {
3965
3971
  }), [["__scopeId", "data-v-69ec23e0"]]);
3966
3972
  //#endregion
3967
3973
  //#region src/utils/listState.ts
3968
- function ja() {
3974
+ function Va() {
3969
3975
  return {
3970
3976
  type: "none",
3971
3977
  level: 0,
@@ -3974,30 +3980,30 @@ function ja() {
3974
3980
  }
3975
3981
  //#endregion
3976
3982
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
3977
- var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
3983
+ var Ha = ["aria-label"], Ua = ["aria-label"], Wa = [
3978
3984
  "disabled",
3979
3985
  "title",
3980
3986
  "aria-label"
3981
- ], Fa = [
3987
+ ], Ga = [
3982
3988
  "disabled",
3983
3989
  "title",
3984
3990
  "aria-label"
3985
- ], Ia = ["aria-label"], La = [
3991
+ ], Ka = ["aria-label"], qa = [
3986
3992
  "disabled",
3987
3993
  "title",
3988
3994
  "aria-label",
3989
3995
  "aria-pressed"
3990
- ], Ra = [
3996
+ ], Ja = [
3991
3997
  "disabled",
3992
3998
  "title",
3993
3999
  "aria-label",
3994
4000
  "aria-pressed"
3995
- ], za = [
4001
+ ], Ya = [
3996
4002
  "disabled",
3997
4003
  "title",
3998
4004
  "aria-label",
3999
4005
  "aria-pressed"
4000
- ], Ba = /*#__PURE__*/ t(/* @__PURE__ */ z({
4006
+ ], Xa = /*#__PURE__*/ t(/* @__PURE__ */ z({
4001
4007
  __name: "FormattingBar",
4002
4008
  props: {
4003
4009
  currentFormatting: {},
@@ -4039,7 +4045,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4039
4045
  "redo"
4040
4046
  ],
4041
4047
  setup(e, { emit: t }) {
4042
- let { ColorPicker: n } = p(), i = e, a = t, { t: o } = c(), s = N(() => i.currentFormatting ?? {}), l = N(() => i.documentStyles ? { styles: i.documentStyles } : {}), u = N(() => s.value.listState ?? ja()), d = N(() => {
4048
+ let { ColorPicker: n } = p(), i = e, a = t, { t: o } = c(), s = N(() => i.currentFormatting ?? {}), l = N(() => i.documentStyles ? { styles: i.documentStyles } : {}), u = N(() => s.value.listState ?? Va()), d = N(() => {
4043
4049
  let e = s.value.color;
4044
4050
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
4045
4051
  }), f = N(() => {
@@ -4072,7 +4078,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4072
4078
  }, [R(r, {
4073
4079
  name: "undo",
4074
4080
  size: 18
4075
- })], 40, Pa), L("button", {
4081
+ })], 40, Wa), L("button", {
4076
4082
  type: "button",
4077
4083
  class: "docx-formatting-bar__btn",
4078
4084
  disabled: e.disabled || !e.canRedo,
@@ -4082,7 +4088,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4082
4088
  }, [R(r, {
4083
4089
  name: "redo",
4084
4090
  size: 18
4085
- })], 40, Fa)], 8, Na),
4091
+ })], 40, Ga)], 8, Ua),
4086
4092
  i[13] ||= L("span", {
4087
4093
  class: "docx-formatting-bar__divider",
4088
4094
  role: "separator"
@@ -4113,7 +4119,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4113
4119
  }, [R(r, {
4114
4120
  name: "format_bold",
4115
4121
  size: 18
4116
- })], 42, La),
4122
+ })], 42, qa),
4117
4123
  L("button", {
4118
4124
  type: "button",
4119
4125
  class: V(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": s.value.italic }]),
@@ -4125,7 +4131,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4125
4131
  }, [R(r, {
4126
4132
  name: "format_italic",
4127
4133
  size: 18
4128
- })], 42, Ra),
4134
+ })], 42, Ja),
4129
4135
  L("button", {
4130
4136
  type: "button",
4131
4137
  class: V(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": s.value.underline }]),
@@ -4137,8 +4143,8 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4137
4143
  }, [R(r, {
4138
4144
  name: "format_underlined",
4139
4145
  size: 18
4140
- })], 42, za)
4141
- ], 8, Ia),
4146
+ })], 42, Ya)
4147
+ ], 8, Ka),
4142
4148
  e.showTextColorPicker ? (U(), I(j, { key: 1 }, [i[12] ||= L("span", {
4143
4149
  class: "docx-formatting-bar__divider",
4144
4150
  role: "separator"
@@ -4180,9 +4186,9 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4180
4186
  "disabled",
4181
4187
  "can-outdent"
4182
4188
  ])) : F("", !0)
4183
- ], 10, Ma));
4189
+ ], 10, Ha));
4184
4190
  }
4185
- }), [["__scopeId", "data-v-fc03de2e"]]), Va = [
4191
+ }), [["__scopeId", "data-v-fc03de2e"]]), Za = [
4186
4192
  {
4187
4193
  value: .5,
4188
4194
  label: "50%"
@@ -4207,7 +4213,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4207
4213
  value: 2,
4208
4214
  label: "200%"
4209
4215
  }
4210
- ], Ha = /*#__PURE__*/ t(/* @__PURE__ */ z({
4216
+ ], Qa = /*#__PURE__*/ t(/* @__PURE__ */ z({
4211
4217
  __name: "ZoomControl",
4212
4218
  props: {
4213
4219
  value: { default: 1 },
@@ -4224,7 +4230,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4224
4230
  },
4225
4231
  emits: ["change"],
4226
4232
  setup(e, { emit: t }) {
4227
- let { Select: n } = p(), r = e, i = t, a = N(() => r.levels ?? Va), o = N(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = N(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = N(() => o.value ? String(o.value.value) : String(r.value)), l = N(() => {
4233
+ let { Select: n } = p(), r = e, i = t, a = N(() => r.levels ?? Za), o = N(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = N(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = N(() => o.value ? String(o.value.value) : String(r.value)), l = N(() => {
4228
4234
  let e = a.value.map((e) => ({
4229
4235
  value: String(e.value),
4230
4236
  label: e.label
@@ -4252,7 +4258,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4252
4258
  "disabled"
4253
4259
  ]));
4254
4260
  }
4255
- }), [["__scopeId", "data-v-8079e07f"]]), Ua = (e, t, n = {}) => {
4261
+ }), [["__scopeId", "data-v-8079e07f"]]), $a = (e, t, n = {}) => {
4256
4262
  let { locale: r = "en", ...i } = n;
4257
4263
  return new Promise((n, a) => {
4258
4264
  let o = W(null), s = null, c = !1, u = {
@@ -4278,7 +4284,7 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4278
4284
  }
4279
4285
  };
4280
4286
  s = pe({ setup() {
4281
- return () => B(Aa, {
4287
+ return () => B(Ba, {
4282
4288
  ...i,
4283
4289
  documentBuffer: e,
4284
4290
  ref: o,
@@ -4293,4 +4299,4 @@ var Ma = ["aria-label"], Na = ["aria-label"], Pa = [
4293
4299
  });
4294
4300
  };
4295
4301
  //#endregion
4296
- export { In as DEFAULT_AI_SUGGESTION_PRESETS, Yn as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Aa as DocxEditor, w as FindReplaceDialog, s as FolioUIProvider, T as FootnotePropertiesDialog, Ba as FormattingBar, se as HyperlinkDialog, ce as ImagePositionDialog, le as ImagePropertiesDialog, E as InsertImageDialog, D as InsertSymbolDialog, ue as InsertTableDialog, de as PageSetupDialog, fe as PasteSpecialDialog, O as SplitCellDialog, k as TablePropertiesDialog, A as WatermarkDialog, Ha as ZoomControl, Xn as acceptAutocompleteSuggestion, Zn as acceptAutocompleteWord, Je as anonymizationDecorationsKey, Qn as appendAutocompleteToken, Bt as applyFolioAIEditOperations, Ln as applySuggestions, $n as autocompleteSuggestionKey, er as autocompleteSuggestionPlugin, Bn as buildPositionalText, tr as clearAutocompleteSuggestion, It as clearTemplateSlashMenu, Lt as consumeTemplateSlashQuery, Kn as createAICitationDecorationsPlugin, jn as createDocx, An as createEmptyDocument, Wt as createFolioAIEditSnapshot, n as defaultLocale, Mn as deriveBlockId, Kt as diffWordSegments, nr as finishAutocompleteSuggestion, or as fromMarkdown, Ye as getAnonymizationMatches, rr as getAutocompleteSuggestion, On as getDocumentWatermark, Wn as getFolioCaretViewportRect, Nn as getFolioParaIdFromBlockId, Gn as getFolioSelectionViewportRect, vt as getTemplateDirectives, Rt as getTemplateSlashMenu, Xt as hashFolioAIBlockText, l as i18nPlugin, Me as insertImageFromFile, Pe as insertPageBreakInView, X as insertTableInView, Le as insertTableOfContentsInView, Pn as isFolioBlockId, Fn as isSequentialFolioBlockId, Rn as isSuggestionStale, Zt as normalizeFolioAIBlockText, e as provideLocale, Ua as renderAsync, Q as resetTemplateSlashQuery, zn as resolveSuggestionAnchor, bt as scanDirectives, Un as scrollFolioPositionIntoView, qn as setAICitationsMeta, Vn as setAISuggestionsMeta, Jn as setActiveCitationMeta, Ze as setAnonymizationTermsMeta, kn as setDocumentWatermark, Hn as setFocusedSuggestionMeta, Ft as setTemplatePreviewValues, ir as shouldTriggerAutocomplete, ar as startAutocompleteSuggestion, zt as templateSlashMenuKey, sr as toMarkdown, cr as toMarkdownResult, c as useTranslation, oe as useWheelZoom };
4302
+ export { Kn as DEFAULT_AI_SUGGESTION_PRESETS, ar as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, zn as DOCUMENT_PRESET_VERSION, Bn as DOCUMENT_STYLE_SET_VERSION, Ba as DocxEditor, w as FindReplaceDialog, s as FolioUIProvider, T as FootnotePropertiesDialog, Xa as FormattingBar, se as HyperlinkDialog, ce as ImagePositionDialog, le as ImagePropertiesDialog, E as InsertImageDialog, D as InsertSymbolDialog, ue as InsertTableDialog, de as PageSetupDialog, fe as PasteSpecialDialog, In as STELLA_STYLE_SET_NAME, O as SplitCellDialog, k as TablePropertiesDialog, A as WatermarkDialog, Qa as ZoomControl, or as acceptAutocompleteSuggestion, sr as acceptAutocompleteWord, Ye as anonymizationDecorationsKey, cr as appendAutocompleteToken, Ht as applyFolioAIEditOperations, qn as applySuggestions, lr as autocompleteSuggestionKey, ur as autocompleteSuggestionPlugin, Xn as buildPositionalText, dr as clearAutocompleteSuggestion, Rt as clearTemplateSlashMenu, Q as consumeTemplateSlashQuery, nr as createAICitationDecorationsPlugin, Vn as createDocx, jn as createEmptyDocument, Kt as createFolioAIEditSnapshot, Ln as createStellaStyleDocumentPreset, Rn as createStellaStyleSet, n as defaultLocale, Hn as deriveBlockId, Jt as diffWordSegments, Mn as extractDocumentStyleSet, Nn as extractDocumentStyleSetFromDocx, fr as finishAutocompleteSuggestion, gr as fromMarkdown, Xe as getAnonymizationMatches, pr as getAutocompleteSuggestion, kn as getDocumentWatermark, er as getFolioCaretViewportRect, Un as getFolioParaIdFromBlockId, tr as getFolioSelectionViewportRect, yt as getTemplateDirectives, zt as getTemplateSlashMenu, Qt as hashFolioAIBlockText, l as i18nPlugin, Me as insertImageFromFile, Pe as insertPageBreakInView, X as insertTableInView, Le as insertTableOfContentsInView, Pn as inspectDocumentStyles, Fn as inspectDocumentStylesFromDocx, Wn as isFolioBlockId, Gn as isSequentialFolioBlockId, Jn as isSuggestionStale, $t as normalizeFolioAIBlockText, e as provideLocale, $a as renderAsync, $ as resetTemplateSlashQuery, Yn as resolveSuggestionAnchor, xt as scanDirectives, $n as scrollFolioPositionIntoView, rr as setAICitationsMeta, Zn as setAISuggestionsMeta, ir as setActiveCitationMeta, Qe as setAnonymizationTermsMeta, An as setDocumentWatermark, Qn as setFocusedSuggestionMeta, Lt as setTemplatePreviewValues, mr as shouldTriggerAutocomplete, hr as startAutocompleteSuggestion, Bt as templateSlashMenuKey, _r as toMarkdown, vr as toMarkdownResult, c as useTranslation, oe as useWheelZoom };