@univerjs/docs-ui 0.6.1-nightly.202502261607 → 0.6.2

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/lib/es/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var Da = Object.defineProperty;
2
2
  var Pa = (n, e, t) => e in n ? Da(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var O = (n, e, t) => Pa(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { IUniverInstanceService as N, Inject as j, Disposable as ge, toDisposable as Zn, UniverInstanceType as _, BuildTextUtils as Ce, JSONX as k, ObjectRelativeFromV as rt, ObjectRelativeFromH as $n, ICommandService as T, generateRandomId as mt, DisposableCollection as Nn, CommandType as w, debounce as gi, IUndoRedoService as eo, Tools as X, TextX as Ie, TextXActionType as z, DOC_RANGE_TYPE as Ye, RANGE_DIRECTION as Oe, COLORS as tn, BooleanNumber as U, Rectangle as wa, ILogService as ps, RxDisposable as dt, DataStreamTreeTokenType as Q, isInternalEditorID as to, IContextService as ms, createIdentifier as Es, EDITOR_ACTIVATED as Qn, FOCUSING_EDITOR_STANDALONE as lr, HorizontalAlign as De, VerticalAlign as Na, DEFAULT_EMPTY_DOCUMENT_VALUE as fi, Direction as ie, getPlainText as Vo, createInternalEditorID as Qa, LocaleService as $e, DocumentFlavor as Be, PresetListType as ye, sequenceExecuteAsync as Ss, FOCUSING_DOC as fn, FOCUSING_UNIVER_EDITOR as Is, FOCUSING_COMMON_DRAWINGS as pi, MemoryCursor as It, getBodySlice as mi, BaselineOffset as Ne, PRESET_LIST_TYPE as Ua, GridType as La, sortRulesFactory as Fa, UpdateDocsAttributeType as no, TableRowHeightRule as Ha, TableSizeType as Ei, TableTextWrapType as ka, TableAlignmentType as Va, SHEET_EDITOR_UNITS as rn, PositionedObjectLayoutType as oo, LRUMap as Wa, ColorKit as dr, DrawingTypeEnum as vs, skipParseTagNames as za, CustomRangeType as Si, DataStreamTreeNodeType as Kt, SliceBodyType as ur, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Cs, normalizeBody as ja, SpacingRule as Bt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as et, ThemeService as Ii, DEFAULT_STYLES as vi, Injector as so, IConfigService as Rs, QuickListTypeMap as xo, fromEventSubject as nn, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ga, checkForSubstrings as Ya, UndoCommandId as hr, RedoCommandId as gr, DependentOn as qa, Plugin as Ka, merge as Xa, touchDependencies as fr, mergeOverrideWithDependencies as Ja } from "@univerjs/core";
5
- import { DocSelectionManagerService as G, RichTextEditingMutation as J, DocSkeletonManagerService as ce, SetTextSelectionsOperation as we, DocStateEmitService as Za, DocInterceptorService as $a } from "@univerjs/docs";
6
- import { DeviceInputEventType as Ci, ScrollBar as Wo, IRenderManagerService as pe, Liquid as Ri, GlyphType as bi, DocumentSkeletonPageType as ve, getPageFromPath as zo, getTableIdAndSliceIndex as pr, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as an, getColor as on, RegularPolygon as xi, Rect as Mn, getOffsetRectForDom as ec, ScrollTimer as tc, CURSOR_TYPE as Et, getSystemHighlightColor as nc, Vector2 as cn, PageLayoutType as An, DocumentEditArea as fe, Shape as oc, Path as mr, getCharSpaceApply as sc, getNumberUnitValue as Ge, hasListGlyph as rc, isIndentByGlyph as ic, isFirstGlyph as ac, getParagraphByGlyph as cc, pixelToPt as Ac, ptToPixel as Er, parseDataStreamToTree as lc, Viewport as dc, Layer as Sr, Documents as uc, DocBackground as hc, getLastLine as gc, lineIterator as fc, getLastColumn as pc, pxToNum as Oi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as yi, UniverRenderEnginePlugin as mc } from "@univerjs/engine-render";
7
- import { useDependency as ee, IShortcutService as ro, ILayoutService as bs, KeyCode as W, MetaKeys as K, useEvent as Oo, useObservable as sn, ComponentManager as io, ISidebarService as Ti, Slider as Ec, IClipboardInterfaceService as Bi, FILE_PNG_CLIPBOARD_MIME_TYPE as Sc, FILE__WEBP_CLIPBOARD_MIME_TYPE as Ic, FILE__JPEG_CLIPBOARD_MIME_TYPE as vc, FILE__BMP_CLIPBOARD_MIME_TYPE as Cc, HTML_CLIPBOARD_MIME_TYPE as Mi, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as _i, CopyCommand as Rc, CutCommand as bc, PasteCommand as xc, IConfirmService as Oc, getMenuHiddenObservable as te, MenuItemType as $, FONT_FAMILY_LIST as yc, FONT_SIZE_LIST as Tc, ContextMenuPosition as Di, ContextMenuGroup as Ir, RibbonStartGroup as vr, IMenuManagerService as Bc, IUIPartsService as Mc, FontFamily as _c, FontFamilyItem as Dc, FontSize as Pc, BuiltInUIPart as wc, connectInjector as Nc, ICanvasPopupService as Qc, imageMimeTypeSet as Uc, IContextMenuService as Lc } from "@univerjs/ui";
8
- import Cr, { useMemo as Fe, useEffect as be, useCallback as Pi, useState as Re, useLayoutEffect as wi, useRef as _t, forwardRef as Ht, createElement as kt } from "react";
4
+ import { IUniverInstanceService as N, Inject as j, Disposable as ge, toDisposable as Zn, UniverInstanceType as _, BuildTextUtils as ve, JSONX as k, ObjectRelativeFromV as rt, ObjectRelativeFromH as $n, ICommandService as T, generateRandomId as mt, DisposableCollection as rn, CommandType as w, debounce as gi, IUndoRedoService as eo, Tools as X, TextX as Ie, TextXActionType as z, DOC_RANGE_TYPE as Ye, RANGE_DIRECTION as Oe, COLORS as nn, BooleanNumber as U, Rectangle as wa, ILogService as ps, RxDisposable as dt, DataStreamTreeTokenType as Q, isInternalEditorID as to, IContextService as ms, createIdentifier as Es, EDITOR_ACTIVATED as Qn, FOCUSING_EDITOR_STANDALONE as lr, HorizontalAlign as De, VerticalAlign as Na, DEFAULT_EMPTY_DOCUMENT_VALUE as fi, Direction as ie, getPlainText as Vo, createInternalEditorID as Qa, LocaleService as $e, DocumentFlavor as Be, PresetListType as ye, sequenceExecuteAsync as Ss, FOCUSING_DOC as pn, FOCUSING_UNIVER_EDITOR as Is, FOCUSING_COMMON_DRAWINGS as pi, MemoryCursor as It, getBodySlice as mi, BaselineOffset as Ne, PRESET_LIST_TYPE as Ua, GridType as La, sortRulesFactory as Fa, UpdateDocsAttributeType as no, TableRowHeightRule as Ha, TableSizeType as Ei, TableTextWrapType as ka, TableAlignmentType as Va, SHEET_EDITOR_UNITS as an, PositionedObjectLayoutType as oo, LRUMap as Wa, ColorKit as dr, DrawingTypeEnum as Cs, skipParseTagNames as za, CustomRangeType as Si, DataStreamTreeNodeType as Xt, SliceBodyType as ur, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as vs, normalizeBody as ja, SpacingRule as Bt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as et, ThemeService as Ii, DEFAULT_STYLES as Ci, Injector as so, IConfigService as Rs, QuickListTypeMap as xo, fromEventSubject as on, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ga, checkForSubstrings as Ya, UndoCommandId as hr, RedoCommandId as gr, DependentOn as qa, Plugin as Ka, merge as Xa, touchDependencies as fr, mergeOverrideWithDependencies as Ja } from "@univerjs/core";
5
+ import { DocSelectionManagerService as G, RichTextEditingMutation as J, DocSkeletonManagerService as Ae, SetTextSelectionsOperation as we, DocStateEmitService as Za, DocInterceptorService as $a } from "@univerjs/docs";
6
+ import { DeviceInputEventType as vi, ScrollBar as Wo, IRenderManagerService as fe, Liquid as Ri, GlyphType as bi, DocumentSkeletonPageType as Ce, getPageFromPath as zo, getTableIdAndSliceIndex as pr, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as cn, getColor as sn, RegularPolygon as xi, Rect as _n, getOffsetRectForDom as ec, ScrollTimer as tc, CURSOR_TYPE as Et, getSystemHighlightColor as nc, Vector2 as An, PageLayoutType as ln, DocumentEditArea as me, Shape as oc, Path as mr, getCharSpaceApply as sc, getNumberUnitValue as Ge, hasListGlyph as rc, isIndentByGlyph as ic, isFirstGlyph as ac, getParagraphByGlyph as cc, pixelToPt as Ac, ptToPixel as Er, parseDataStreamToTree as lc, Viewport as dc, Layer as Sr, Documents as uc, DocBackground as hc, getLastLine as gc, lineIterator as fc, getLastColumn as pc, pxToNum as Oi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as yi, UniverRenderEnginePlugin as mc } from "@univerjs/engine-render";
7
+ import { useDependency as $, IShortcutService as ro, ILayoutService as bs, KeyCode as W, MetaKeys as K, useEvent as Oo, useObservable as Mt, ComponentManager as io, ISidebarService as Ti, Slider as Ec, IClipboardInterfaceService as Bi, FILE_PNG_CLIPBOARD_MIME_TYPE as Sc, FILE__WEBP_CLIPBOARD_MIME_TYPE as Ic, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cc, FILE__BMP_CLIPBOARD_MIME_TYPE as vc, HTML_CLIPBOARD_MIME_TYPE as Mi, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as _i, CopyCommand as Rc, CutCommand as bc, PasteCommand as xc, IConfirmService as Oc, getMenuHiddenObservable as te, MenuItemType as ee, FONT_FAMILY_LIST as yc, FONT_SIZE_LIST as Tc, ContextMenuPosition as Di, ContextMenuGroup as Ir, RibbonStartGroup as Cr, IMenuManagerService as Bc, IUIPartsService as Mc, FontFamily as _c, FontFamilyItem as Dc, FontSize as Pc, BuiltInUIPart as wc, connectInjector as Nc, ICanvasPopupService as Qc, imageMimeTypeSet as Uc, IContextMenuService as Lc } from "@univerjs/ui";
8
+ import vr, { useMemo as Fe, useEffect as be, useCallback as Pi, useState as Re, useLayoutEffect as wi, useRef as Dt, forwardRef as kt, createElement as Vt } from "react";
9
9
  import { jsx as V, jsxs as de } from "react/jsx-runtime";
10
- import { clsx as ln, Checkbox as Rr, InputNumber as dn, Button as Fc, Tooltip as Hc, Select as kc, ColorPicker as Vc } from "@univerjs/design";
11
- import { Subject as Ee, BehaviorSubject as Le, merge as Ni, filter as Un, takeUntil as it, fromEvent as Ue, combineLatest as ao, Observable as me, map as pn, distinctUntilChanged as br, throttleTime as Qi, switchMap as Wc, take as zc, animationFrameScheduler as jc } from "rxjs";
10
+ import { clsx as dn, Checkbox as Rr, InputNumber as un, Button as Fc, Tooltip as Hc, Select as kc, ColorPicker as Vc } from "@univerjs/design";
11
+ import { Subject as Ee, BehaviorSubject as Le, merge as Ni, filter as Un, takeUntil as it, fromEvent as Ue, combineLatest as ao, Observable as pe, map as mn, distinctUntilChanged as br, throttleTime as Qi, switchMap as Wc, take as zc, animationFrameScheduler as jc } from "rxjs";
12
12
  import { filter as jo, bufferTime as Gc, map as Yc } from "rxjs/operators";
13
13
  import { ImageSourceType as xs } from "@univerjs/drawing";
14
14
  var qc = Object.getOwnPropertyDescriptor, Kc = (n, e, t, o) => {
@@ -62,7 +62,7 @@ let St = class extends ge {
62
62
  selection: i,
63
63
  isBody: !i.segmentId,
64
64
  paragraphs: Xc(i, (l = (A = g.getBody()) == null ? void 0 : A.paragraphs) != null ? l : []),
65
- customRanges: Ce.customRange.getCustomRangesInterestsWithSelection(i, (h = (d = g.getBody()) == null ? void 0 : d.customRanges) != null ? h : []),
65
+ customRanges: ve.customRange.getCustomRangesInterestsWithSelection(i, (h = (d = g.getBody()) == null ? void 0 : d.customRanges) != null ? h : []),
66
66
  commandId: e,
67
67
  commandParams: t
68
68
  }, p = o.find((m) => m.match(f));
@@ -165,10 +165,10 @@ function oA(n) {
165
165
  // noHistory: true,
166
166
  segmentId: r
167
167
  }
168
- }, a = k.getInstance(), c = Ce.customDecoration.add({ ranges: t, id: o, type: s });
168
+ }, a = k.getInstance(), c = ve.customDecoration.add({ ranges: t, id: o, type: s });
169
169
  return i.params.actions = a.editOp(c.serialize()), i;
170
170
  }
171
- function vg(n, e) {
171
+ function Cg(n, e) {
172
172
  const { segmentId: t, id: o, type: s, unitId: r } = e, i = n.get(G), a = n.get(N), c = r ? a.getUnit(r, _.UNIVER_DOC) : a.getCurrentUnitForType(_.UNIVER_DOC);
173
173
  if (!c)
174
174
  return !1;
@@ -183,7 +183,7 @@ function vg(n, e) {
183
183
  }
184
184
  );
185
185
  }
186
- function Cg(n, e) {
186
+ function vg(n, e) {
187
187
  const { unitId: t, id: o, segmentId: s } = e, i = n.get(N).getUnit(t);
188
188
  if (!i)
189
189
  return !1;
@@ -196,7 +196,7 @@ function Cg(n, e) {
196
196
  // noHistory: true,
197
197
  segmentId: s
198
198
  }
199
- }, c = Ce.customDecoration.delete({ id: o, segmentId: s, documentDataModel: i });
199
+ }, c = ve.customDecoration.delete({ id: o, segmentId: s, documentDataModel: i });
200
200
  if (!c)
201
201
  return !1;
202
202
  const A = k.getInstance();
@@ -269,11 +269,11 @@ function xg(n, e = 0, t = 0) {
269
269
  };
270
270
  }
271
271
  function sA(n, e, t) {
272
- const o = ee(T), s = ee(ro), r = Fe(() => mt(4), []);
272
+ const o = $(T), s = $(ro), r = Fe(() => mt(4), []);
273
273
  be(() => {
274
274
  if (!t || !n || !e)
275
275
  return;
276
- const a = `sheet.operation.editor-${t.getEditorId()}-keyboard-${r}`, c = new Nn();
276
+ const a = `sheet.operation.editor-${t.getEditorId()}-keyboard-${r}`, c = new rn();
277
277
  return c.add(o.registerCommand({
278
278
  id: a,
279
279
  type: w.OPERATION,
@@ -287,7 +287,7 @@ function sA(n, e, t) {
287
287
  preconditions: () => !0,
288
288
  priority: 901,
289
289
  staticParameters: {
290
- eventType: Ci.Keyboard,
290
+ eventType: vi.Keyboard,
291
291
  keyCode: A.keyCode,
292
292
  metaKey: A.metaKey
293
293
  }
@@ -301,7 +301,7 @@ function sA(n, e, t) {
301
301
  const rA = (n, e = !0, t, o) => {
302
302
  const s = Pi(() => {
303
303
  if (n) {
304
- const { scene: i, mainComponent: a } = n.render, c = n.render.with(ce), { width: A, height: l } = n.getBoundingClientRect();
304
+ const { scene: i, mainComponent: a } = n.render, c = n.render.with(Ae), { width: A, height: l } = n.getBoundingClientRect();
305
305
  c.getViewModel().getDataModel().updateDocumentDataPageSize(e ? 1 / 0 : A, 1 / 0), i.transformByState({
306
306
  width: A,
307
307
  height: l
@@ -311,7 +311,7 @@ const rA = (n, e = !0, t, o) => {
311
311
  var E, I;
312
312
  if (!t || !n || !t)
313
313
  return;
314
- const a = n.render.with(ce).getSkeleton(), { scene: c, mainComponent: A } = n.render, l = c.getViewport(Je.VIEW_MAIN), { actualWidth: d, actualHeight: h } = a.getActualSize(), { width: u, height: g } = n.getBoundingClientRect();
314
+ const a = n.render.with(Ae).getSkeleton(), { scene: c, mainComponent: A } = n.render, l = c.getViewport(Je.VIEW_MAIN), { actualWidth: d, actualHeight: h } = a.getActualSize(), { width: u, height: g } = n.getBoundingClientRect();
315
315
  let f = l == null ? void 0 : l.getScrollBar();
316
316
  const p = Math.max(d, u), m = Math.max(h, g);
317
317
  c.transformByState({
@@ -351,7 +351,7 @@ const rA = (n, e = !0, t, o) => {
351
351
  };
352
352
  function ke(n, e) {
353
353
  var o;
354
- return (o = n.get(pe).getRenderById(e)) == null ? void 0 : o.with(ce);
354
+ return (o = n.get(fe).getRenderById(e)) == null ? void 0 : o.with(Ae);
355
355
  }
356
356
  function ue(n, e = "") {
357
357
  if (!e)
@@ -493,7 +493,7 @@ const AA = {
493
493
  const { unitId: t, body: o, textRanges: s, segmentId: r = "", options: i } = e, a = n.get(N), c = n.get(T), A = a.getUnit(t, _.UNIVER_DOC), l = A == null ? void 0 : A.getSelfOrHeaderFooterModel(r).getSnapshot().body;
494
494
  if (A == null || l == null)
495
495
  return !1;
496
- const d = Ce.selection.replaceTextRuns({
496
+ const d = ve.selection.replaceTextRuns({
497
497
  doc: A,
498
498
  body: o,
499
499
  selection: {
@@ -516,7 +516,7 @@ const AA = {
516
516
  return h.params.actions = u.editOp(d.serialize(), g), h.params.textRanges = s, i && (h.params.options = i), !!c.syncExecuteCommand(h.id, h.params);
517
517
  }
518
518
  };
519
- var _n = /* @__PURE__ */ ((n) => (n[n.page = 0] = "page", n[n.section = 1] = "section", n[n.column = 2] = "column", n[n.line = 3] = "line", n[n.divide = 4] = "divide", n[n.glyph = 5] = "glyph", n))(_n || {});
519
+ var Dn = /* @__PURE__ */ ((n) => (n[n.page = 0] = "page", n[n.section = 1] = "section", n[n.column = 2] = "column", n[n.line = 3] = "line", n[n.divide = 4] = "divide", n[n.glyph = 5] = "glyph", n))(Dn || {});
520
520
  const yt = {
521
521
  page: 0,
522
522
  section: 1,
@@ -623,7 +623,7 @@ class ct {
623
623
  return;
624
624
  const { x: S, y: v } = this._liquid;
625
625
  let b, y;
626
- const D = C[A], x = C[l], M = C[A - 1], B = (D == null ? void 0 : D.left) || 0, L = (D == null ? void 0 : D.width) || 0, F = (x == null ? void 0 : x.left) || 0, P = (x == null ? void 0 : x.width) || 0, oe = (D == null ? void 0 : D.glyphType) === bi.LIST, { startOffset: re, endOffset: Y } = lA(C, A, l, R), H = a.glyph === A && d ? a.isBack : !0, q = c.glyph === l && h ? c.isBack : !1, se = a === c, Ae = H && M != null ? M : D;
626
+ const D = C[A], x = C[l], M = C[A - 1], B = (D == null ? void 0 : D.left) || 0, L = (D == null ? void 0 : D.width) || 0, F = (x == null ? void 0 : x.left) || 0, P = (x == null ? void 0 : x.width) || 0, oe = (D == null ? void 0 : D.glyphType) === bi.LIST, { startOffset: re, endOffset: Y } = lA(C, A, l, R), H = a.glyph === A && d ? a.isBack : !0, q = c.glyph === l && h ? c.isBack : !1, se = a === c, ce = H && M != null ? M : D;
627
627
  if (A === 0 && l === C.length - 1)
628
628
  b = {
629
629
  startX: S + B + (oe ? L : 0),
@@ -632,9 +632,9 @@ class ct {
632
632
  endY: v + f - E - I
633
633
  }, y = {
634
634
  startX: S + B + (oe ? L : 0),
635
- startY: v + m + p - Ae.bBox.ba,
635
+ startY: v + m + p - ce.bBox.ba,
636
636
  endX: S + F + (q ? 0 : P),
637
- endY: v + m + p + Ae.bBox.bd
637
+ endY: v + m + p + ce.bBox.bd
638
638
  };
639
639
  else {
640
640
  const ne = H && !oe;
@@ -645,9 +645,9 @@ class ct {
645
645
  endY: v + f - E - I
646
646
  }, y = {
647
647
  startX: S + B + (ne ? 0 : L),
648
- startY: v + m + p - Ae.bBox.ba,
648
+ startY: v + m + p - ce.bBox.ba,
649
649
  endX: S + F + (q ? 0 : P),
650
- endY: v + m + p + Ae.bBox.bd
650
+ endY: v + m + p + ce.bBox.bd
651
651
  };
652
652
  }
653
653
  o.push(Yo(b)), s.push(Yo(y)), r.push({
@@ -663,7 +663,7 @@ class ct {
663
663
  }
664
664
  _isValidPosition(e, t) {
665
665
  const { segmentPage: o, pageType: s } = e, { segmentPage: r, pageType: i } = t;
666
- return s !== i ? !1 : s === ve.HEADER || s === ve.FOOTER ? o === r : !0;
666
+ return s !== i ? !1 : s === Ce.HEADER || s === Ce.FOOTER ? o === r : !0;
667
667
  }
668
668
  _resetCurrentNodePositionState() {
669
669
  this._currentStartState = {
@@ -690,7 +690,7 @@ class ct {
690
690
  _checkPreviousNodePositionState(e, t = !0) {
691
691
  let o = e, s;
692
692
  for (; o >= 0; ) {
693
- const r = _n[o];
693
+ const r = Dn[o];
694
694
  let i;
695
695
  if (t ? i = this._currentStartState[r] : i = this._currentEndState[r], i === void 0)
696
696
  return;
@@ -702,7 +702,7 @@ class ct {
702
702
  }
703
703
  _getSelectionRuler(e, t, o, s, r) {
704
704
  let i = 0, a = s;
705
- const c = _n[e], A = _n[e + 1];
705
+ const c = Dn[e], A = Dn[e + 1];
706
706
  if (A === null || c === null)
707
707
  return {
708
708
  start_next: i,
@@ -730,16 +730,16 @@ class ct {
730
730
  const { pages: c, skeHeaders: A, skeFooters: l } = a, { page: d, segmentPage: h } = e, { page: u, segmentPage: g } = t;
731
731
  if (this._resetCurrentNodePositionState(), this._documentOffsetConfig == null)
732
732
  return [];
733
- const { pageLayoutType: f, pageMarginLeft: p, pageMarginTop: m } = this._documentOffsetConfig, E = r === ve.BODY || r === ve.CELL ? d : h;
733
+ const { pageLayoutType: f, pageMarginLeft: p, pageMarginTop: m } = this._documentOffsetConfig, E = r === Ce.BODY || r === Ce.CELL ? d : h;
734
734
  for (let S = 0; S < E; S++) {
735
735
  const v = c[S];
736
736
  this._liquid.translatePage(v, f, p, m);
737
737
  }
738
- const I = r === ve.BODY || r === ve.CELL ? u : g;
738
+ const I = r === Ce.BODY || r === Ce.CELL ? u : g;
739
739
  for (let S = E; S <= I; S++) {
740
740
  const v = c[S], { headerId: b, footerId: y, pageWidth: D } = v;
741
741
  let x = v;
742
- if (r === ve.HEADER ? x = (C = A.get(b)) == null ? void 0 : C.get(D) : r === ve.FOOTER ? x = (R = l.get(y)) == null ? void 0 : R.get(D) : r === ve.CELL && (x = zo(a, i)), x == null) {
742
+ if (r === Ce.HEADER ? x = (C = A.get(b)) == null ? void 0 : C.get(D) : r === Ce.FOOTER ? x = (R = l.get(y)) == null ? void 0 : R.get(D) : r === Ce.CELL && (x = zo(a, i)), x == null) {
743
743
  this._liquid.translatePage(v, f, p, m);
744
744
  continue;
745
745
  }
@@ -748,22 +748,22 @@ class ct {
748
748
  e,
749
749
  t,
750
750
  M.length - 1,
751
- r === ve.BODY || r === ve.CELL ? S : 0
751
+ r === Ce.BODY || r === Ce.CELL ? S : 0
752
752
  );
753
753
  switch (this._liquid.translateSave(), r) {
754
- case ve.HEADER:
754
+ case Ce.HEADER:
755
755
  this._liquid.translatePagePadding({
756
756
  ...x,
757
757
  marginLeft: v.marginLeft
758
758
  // Because header or footer margin Left is 0.
759
759
  });
760
760
  break;
761
- case ve.FOOTER: {
761
+ case Ce.FOOTER: {
762
762
  const F = v.pageHeight - x.height - x.marginBottom;
763
763
  this._liquid.translate(v.marginLeft, F);
764
764
  break;
765
765
  }
766
- case ve.CELL: {
766
+ case Ce.CELL: {
767
767
  this._liquid.translatePagePadding(v);
768
768
  const F = x.parent, P = F.parent, { left: oe } = x, { top: re, left: Y } = P, { top: H } = F;
769
769
  this._liquid.translate(Y + oe, re + H), this._liquid.translatePagePadding(x);
@@ -783,7 +783,7 @@ class ct {
783
783
  );
784
784
  this._liquid.translateSection(P);
785
785
  for (let H = re; H <= Y; H++) {
786
- const q = oe[H], se = q.lines, { start_next: Ae, end_next: ne } = this._getSelectionRuler(
786
+ const q = oe[H], se = q.lines, { start_next: ce, end_next: ne } = this._getSelectionRuler(
787
787
  yt.column,
788
788
  e,
789
789
  t,
@@ -791,7 +791,7 @@ class ct {
791
791
  H
792
792
  );
793
793
  this._liquid.translateColumn(q);
794
- for (let Z = Ae; Z <= ne; Z++) {
794
+ for (let Z = ce; Z <= ne; Z++) {
795
795
  const le = se[Z], { divides: Te } = le, { start_next: We, end_next: ot } = this._getSelectionRuler(
796
796
  yt.line,
797
797
  e,
@@ -811,7 +811,7 @@ class ct {
811
811
  ze
812
812
  );
813
813
  let cr = !1, Ar = !1;
814
- S === E && F === B && H === re && Z === Ae && ze === We && (cr = !0), S === I && F === L && H === Y && Z === ne && ze === ot && (Ar = !0), o && o(Ma, _a, cr, Ar, bo, le, q, P, x), this._liquid.translateRestore();
814
+ S === E && F === B && H === re && Z === ce && ze === We && (cr = !0), S === I && F === L && H === Y && Z === ne && ze === ot && (Ar = !0), o && o(Ma, _a, cr, Ar, bo, le, q, P, x), this._liquid.translateRestore();
815
815
  }
816
816
  this._liquid.translateRestore();
817
817
  }
@@ -857,14 +857,14 @@ function To(n, e) {
857
857
  const i = t[t.length - 3], a = o[o.length - 3], c = t[t.length - 1], A = o[o.length - 1];
858
858
  return i < a ? !0 : i > a ? !1 : c <= A;
859
859
  }
860
- function Ct(n) {
860
+ function vt(n) {
861
861
  return n.sections[0].columns[0].lines.length === 0;
862
862
  }
863
863
  function uA(n, e, t) {
864
864
  let o = e, s = t, r = n[o], i = n[s];
865
- for (; o < s && (Ct(r) || Ct(i)); )
866
- Ct(r) ? (o++, r = n[o]) : Ct(i) && (s--, i = n[s]);
867
- if (!Ct(r) && !Ct(i))
865
+ for (; o < s && (vt(r) || vt(i)); )
866
+ vt(r) ? (o++, r = n[o]) : vt(i) && (s--, i = n[s]);
867
+ if (!vt(r) && !vt(i))
868
868
  return [r, i];
869
869
  }
870
870
  class ki {
@@ -888,7 +888,7 @@ class ki {
888
888
  endColumnIndex: f
889
889
  } = l;
890
890
  this._liquid.reset();
891
- const { pageLayoutType: p, pageMarginLeft: m, pageMarginTop: E } = this._documentOffsetConfig, I = A === ve.BODY || A === ve.CELL ? c : a;
891
+ const { pageLayoutType: p, pageMarginLeft: m, pageMarginTop: E } = this._documentOffsetConfig, I = A === Ce.BODY || A === Ce.CELL ? c : a;
892
892
  for (let C = 0; C < I; C++) {
893
893
  const R = i[C];
894
894
  this._liquid.translatePage(R, p, m, E);
@@ -980,7 +980,7 @@ class ki {
980
980
  }
981
981
  }
982
982
  const hA = "__TestSelectionRange__", gA = "__TestSelectionAnchor__", Tr = 6, Bo = 500, fA = 500, qo = 3;
983
- function Dn(n) {
983
+ function Pn(n) {
984
984
  const e = n[0], t = e[0], o = e[2], { x: s, y: r } = t, { x: i, y: a } = o;
985
985
  return {
986
986
  left: s,
@@ -1002,8 +1002,8 @@ function Bs(n) {
1002
1002
  };
1003
1003
  });
1004
1004
  }
1005
- class Mt {
1006
- constructor(e, t, o, s, r, i = an, a = "", c = -1) {
1005
+ class _t {
1006
+ constructor(e, t, o, s, r, i = cn, a = "", c = -1) {
1007
1007
  O(this, "rangeType", Ye.TEXT);
1008
1008
  // Identifies whether the range is the current one, most of which is the last range.
1009
1009
  O(this, "_current", !1);
@@ -1081,7 +1081,7 @@ class Mt {
1081
1081
  const { contentBoxPointGroup: l, cursorList: d } = i.getRangePointData(e, e);
1082
1082
  if (this._setCursorList(d), l.length === 0)
1083
1083
  return;
1084
- const h = Dn(l);
1084
+ const h = Pn(l);
1085
1085
  return {
1086
1086
  ...h,
1087
1087
  left: h.left + s,
@@ -1091,7 +1091,7 @@ class Mt {
1091
1091
  const { borderBoxPointGroup: a, cursorList: c } = i.getRangePointData(e, t);
1092
1092
  if (this._setCursorList(c), a.length === 0)
1093
1093
  return;
1094
- const A = Dn(a);
1094
+ const A = Pn(a);
1095
1095
  return {
1096
1096
  ...A,
1097
1097
  left: A.left + s,
@@ -1104,13 +1104,13 @@ class Mt {
1104
1104
  activeStatic() {
1105
1105
  var e, t;
1106
1106
  (t = this._anchorShape) == null || t.setProps({
1107
- stroke: ((e = this.style) == null ? void 0 : e.strokeActive) || on(tn.black, 1)
1107
+ stroke: ((e = this.style) == null ? void 0 : e.strokeActive) || sn(nn.black, 1)
1108
1108
  });
1109
1109
  }
1110
1110
  deactivateStatic() {
1111
1111
  var e, t;
1112
1112
  (t = this._anchorShape) == null || t.setProps({
1113
- stroke: ((e = this.style) == null ? void 0 : e.stroke) || on(tn.black, 0)
1113
+ stroke: ((e = this.style) == null ? void 0 : e.stroke) || sn(nn.black, 0)
1114
1114
  });
1115
1115
  }
1116
1116
  isActive() {
@@ -1173,7 +1173,7 @@ class Mt {
1173
1173
  }
1174
1174
  const s = 0.3, r = new xi(hA + X.generateRandomId(Tr), {
1175
1175
  pointsGroup: e,
1176
- fill: ((i = this.style) == null ? void 0 : i.fill) || on(tn.black, s),
1176
+ fill: ((i = this.style) == null ? void 0 : i.fill) || sn(nn.black, s),
1177
1177
  left: t,
1178
1178
  top: o,
1179
1179
  evented: !1,
@@ -1183,7 +1183,7 @@ class Mt {
1183
1183
  }
1184
1184
  _createOrUpdateAnchor(e, t, o, s) {
1185
1185
  var f, p, m;
1186
- const r = Dn(e), { left: i } = r;
1186
+ const r = Pn(e), { left: i } = r;
1187
1187
  let { top: a, height: c } = r;
1188
1188
  const A = 14;
1189
1189
  c < A && (a -= A - c, c = A);
@@ -1194,12 +1194,12 @@ class Mt {
1194
1194
  this._anchorShape.transformByState({ left: d, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-12, 0) : this._anchorShape.skew(0, 0);
1195
1195
  return;
1196
1196
  }
1197
- const g = new Mn(gA + X.generateRandomId(Tr), {
1197
+ const g = new _n(gA + X.generateRandomId(Tr), {
1198
1198
  left: d,
1199
1199
  top: h,
1200
1200
  height: c,
1201
1201
  strokeWidth: ((p = this.style) == null ? void 0 : p.strokeWidth) || 1.5,
1202
- stroke: ((m = this.style) == null ? void 0 : m.strokeActive) || on(tn.black, 1),
1202
+ stroke: ((m = this.style) == null ? void 0 : m.strokeActive) || sn(nn.black, 1),
1203
1203
  evented: !1
1204
1204
  });
1205
1205
  u && g.skew(-12, 0), this._anchorShape = g, this._scene.addObject(g, qo), this.activeStatic();
@@ -1209,7 +1209,7 @@ class Mt {
1209
1209
  }
1210
1210
  }
1211
1211
  const pA = "__DocTableRectRange__", mA = 6;
1212
- function Mo(n, e, t, o, s, r = an, i = "", a = -1) {
1212
+ function Mo(n, e, t, o, s, r = cn, i = "", a = -1) {
1213
1213
  const c = e.getOffsetConfig(), l = new ki(c, t).getNodePositionGroup(o, s);
1214
1214
  return (l != null ? l : []).map((d) => new Vi(
1215
1215
  n,
@@ -1223,7 +1223,7 @@ function Mo(n, e, t, o, s, r = an, i = "", a = -1) {
1223
1223
  ));
1224
1224
  }
1225
1225
  class Vi {
1226
- constructor(e, t, o, s, r, i = an, a = "", c = -1) {
1226
+ constructor(e, t, o, s, r, i = cn, a = "", c = -1) {
1227
1227
  O(this, "rangeType", Ye.RECT);
1228
1228
  // The rendered rect range
1229
1229
  O(this, "_rangeShape");
@@ -1351,7 +1351,7 @@ class Vi {
1351
1351
  }
1352
1352
  const s = 0.3, r = new xi(pA + X.generateRandomId(mA), {
1353
1353
  pointsGroup: e,
1354
- fill: ((i = this.style) == null ? void 0 : i.fill) || on(tn.black, s),
1354
+ fill: ((i = this.style) == null ? void 0 : i.fill) || sn(nn.black, s),
1355
1355
  left: t,
1356
1356
  top: o,
1357
1357
  evented: !1,
@@ -1363,7 +1363,7 @@ class Vi {
1363
1363
  function Br(n, e, t, o, s, r, i, a, c = !0, A = !0) {
1364
1364
  const l = s.findNodePositionByCharIndex(n, c, i, a), d = s.findNodePositionByCharIndex(e, A, i, a);
1365
1365
  if (!(l == null || d == null))
1366
- return new Mt(t, o, s, l, d, r, i, a);
1366
+ return new _t(t, o, s, l, d, r, i, a);
1367
1367
  }
1368
1368
  function EA(n, e, t, o, s, r, i, a) {
1369
1369
  const c = s.findNodePositionByCharIndex(n, !0, i, a), A = s.findNodePositionByCharIndex(e, !0, i, a);
@@ -1388,7 +1388,7 @@ function Ko(n, e, t, o, s, r, i, a) {
1388
1388
  const c = [], A = [], l = [t, o, s, n, e, r, i, a];
1389
1389
  if (Hi(s, n, e)) {
1390
1390
  if (Fi(n, e))
1391
- return c.push(new Mt(...l)), {
1391
+ return c.push(new _t(...l)), {
1392
1392
  textRanges: c,
1393
1393
  rectRanges: A
1394
1394
  };
@@ -1431,7 +1431,7 @@ function Ko(n, e, t, o, s, r, i, a) {
1431
1431
  else if (M > f && B < p) {
1432
1432
  if (F = s.findNodePositionByCharIndex(M + 3, !0, i, a), P = s.findNodePositionByCharIndex(B - 4, !0, i, a), m <= M - 1) {
1433
1433
  const Y = s.findNodePositionByCharIndex(m, !0, i, a), H = s.findNodePositionByCharIndex(M - 1, !1, i, a), q = g === Oe.FORWARD ? Y : H, se = g === Oe.FORWARD ? H : Y;
1434
- c.push(new Mt(t, o, s, q, se, r, i, a));
1434
+ c.push(new _t(t, o, s, q, se, r, i, a));
1435
1435
  }
1436
1436
  m = B + 1;
1437
1437
  }
@@ -1453,7 +1453,7 @@ function Ko(n, e, t, o, s, r, i, a) {
1453
1453
  const M = s.findNodePositionByCharIndex(m, !0, i, a), B = s.findNodePositionByCharIndex(E, !x, i, a), L = g === Oe.FORWARD ? M : B, F = g === Oe.FORWARD ? B : M;
1454
1454
  if (A.length && X.diffValue(L, F))
1455
1455
  continue;
1456
- c.push(new Mt(t, o, s, L, F, r, i, a));
1456
+ c.push(new _t(t, o, s, L, F, r, i, a));
1457
1457
  }
1458
1458
  }
1459
1459
  return {
@@ -1507,7 +1507,7 @@ function Xo(n) {
1507
1507
  isActive: n.isActive()
1508
1508
  };
1509
1509
  }
1510
- function vA(n) {
1510
+ function CA(n) {
1511
1511
  const e = Xo(n), {
1512
1512
  startRow: t,
1513
1513
  startColumn: o,
@@ -1530,11 +1530,11 @@ function vA(n) {
1530
1530
  spanEntireTable: A
1531
1531
  };
1532
1532
  }
1533
- var CA = Object.getOwnPropertyDescriptor, RA = (n, e, t, o) => {
1534
- for (var s = o > 1 ? void 0 : o ? CA(e, t) : e, r = n.length - 1, i; r >= 0; r--)
1533
+ var vA = Object.getOwnPropertyDescriptor, RA = (n, e, t, o) => {
1534
+ for (var s = o > 1 ? void 0 : o ? vA(e, t) : e, r = n.length - 1, i; r >= 0; r--)
1535
1535
  (i = n[r]) && (s = i(s) || s);
1536
1536
  return s;
1537
- }, Rn = (n, e) => (t, o) => e(t, o, n);
1537
+ }, bn = (n, e) => (t, o) => e(t, o, n);
1538
1538
  let Se = class extends dt {
1539
1539
  constructor(e, t, o, s, r) {
1540
1540
  super();
@@ -1582,7 +1582,7 @@ let Se = class extends dt {
1582
1582
  O(this, "_focusNodePosition", null);
1583
1583
  O(this, "_currentSegmentId", "");
1584
1584
  O(this, "_currentSegmentPage", -1);
1585
- O(this, "_selectionStyle", an);
1585
+ O(this, "_selectionStyle", cn);
1586
1586
  O(this, "_onPointerEvent", !1);
1587
1587
  O(this, "_viewPortObserverMap", /* @__PURE__ */ new Map());
1588
1588
  O(this, "_isIMEInputApply", !1);
@@ -1626,7 +1626,7 @@ let Se = class extends dt {
1626
1626
  setReserveRangesStatus(e) {
1627
1627
  this._reserveRanges = e;
1628
1628
  }
1629
- _setRangeStyle(e = an) {
1629
+ _setRangeStyle(e = cn) {
1630
1630
  this._selectionStyle = e;
1631
1631
  }
1632
1632
  // eslint-disable-next-line max-lines-per-function
@@ -1843,7 +1843,7 @@ let Se = class extends dt {
1843
1843
  this._disposeScrollTimers();
1844
1844
  return;
1845
1845
  }
1846
- const E = new Mt(t, o, s, this._anchorNodePosition, void 0, this._selectionStyle, this._currentSegmentId, this._currentSegmentPage);
1846
+ const E = new _t(t, o, s, this._anchorNodePosition, void 0, this._selectionStyle, this._currentSegmentId, this._currentSegmentPage);
1847
1847
  this._addTextRange(E);
1848
1848
  } else if (this._anchorNodePosition && this._focusNodePosition) {
1849
1849
  for (const E of this._rangeListCache)
@@ -1886,7 +1886,7 @@ let Se = class extends dt {
1886
1886
  return this._rangeList.map(Xo);
1887
1887
  }
1888
1888
  _getAllRectRanges() {
1889
- return this._rectRangeList.map(vA);
1889
+ return this._rectRangeList.map(CA);
1890
1890
  }
1891
1891
  getAllTextRanges() {
1892
1892
  return this._getAllTextRanges();
@@ -2020,7 +2020,7 @@ let Se = class extends dt {
2020
2020
  }
2021
2021
  _createTextRangeByAnchorPosition(e) {
2022
2022
  this._removeAllRanges();
2023
- const { scene: t, mainComponent: o } = this._context, s = this._docSkeletonManagerService.getSkeleton(), r = new Mt(t, o, s, e, void 0, this._selectionStyle, this._currentSegmentId, this._currentSegmentPage);
2023
+ const { scene: t, mainComponent: o } = this._context, s = this._docSkeletonManagerService.getSkeleton(), r = new _t(t, o, s, e, void 0, this._selectionStyle, this._currentSegmentId, this._currentSegmentPage);
2024
2024
  this._addTextRange(r);
2025
2025
  }
2026
2026
  _updateActiveRangePosition(e) {
@@ -2064,7 +2064,7 @@ let Se = class extends dt {
2064
2064
  this.focus();
2065
2065
  return;
2066
2066
  }
2067
- const { left: s, top: r } = o, i = this.activeViewPort.getAbsoluteVector(cn.FromArray([s, r])), { x: a, y: c } = i;
2067
+ const { left: s, top: r } = o, i = this.activeViewPort.getAbsoluteVector(An.FromArray([s, r])), { x: a, y: c } = i;
2068
2068
  let { left: A, top: l } = this._getCanvasOffset();
2069
2069
  A += a, l += c, this.activate(A, l, e);
2070
2070
  }
@@ -2204,7 +2204,7 @@ let Se = class extends dt {
2204
2204
  const o = this._context.mainComponent, { documentTransform: s } = o.getOffsetConfig();
2205
2205
  if (this.activeViewPort == null || s == null)
2206
2206
  return;
2207
- const r = this.activeViewPort.transformVector2SceneCoord(cn.FromArray([e, t]));
2207
+ const r = this.activeViewPort.transformVector2SceneCoord(An.FromArray([e, t]));
2208
2208
  if (r)
2209
2209
  return s.clone().invert().applyPoint(r);
2210
2210
  }
@@ -2213,7 +2213,7 @@ let Se = class extends dt {
2213
2213
  if (s == null)
2214
2214
  return;
2215
2215
  const r = this._context.mainComponent, i = this._docSkeletonManagerService.getSkeleton(), {
2216
- pageLayoutType: a = An.VERTICAL,
2216
+ pageLayoutType: a = ln.VERTICAL,
2217
2217
  pageMarginLeft: c,
2218
2218
  pageMarginTop: A
2219
2219
  } = r.getOffsetConfig();
@@ -2230,10 +2230,10 @@ let Se = class extends dt {
2230
2230
  }
2231
2231
  };
2232
2232
  Se = RA([
2233
- Rn(1, bs),
2234
- Rn(2, ps),
2235
- Rn(3, N),
2236
- Rn(4, j(ce))
2233
+ bn(1, bs),
2234
+ bn(2, ps),
2235
+ bn(3, N),
2236
+ bn(4, j(Ae))
2237
2237
  ], Se);
2238
2238
  class bA extends ge {
2239
2239
  constructor(t, o, s, r, i) {
@@ -2622,7 +2622,7 @@ let Jo = class extends ge {
2622
2622
  };
2623
2623
  Jo = OA([
2624
2624
  Rt(0, N),
2625
- Rt(1, pe),
2625
+ Rt(1, fe),
2626
2626
  Rt(2, j(G)),
2627
2627
  Rt(3, ms),
2628
2628
  Rt(4, T),
@@ -2630,7 +2630,7 @@ Jo = OA([
2630
2630
  ], Jo);
2631
2631
  const He = Es("univer.editor.service");
2632
2632
  function TA(n) {
2633
- const { editorId: e, initialValue: t, container: o, autoFocus: s, isSingle: r } = n, i = Fe(() => s != null ? s : !1, []), [a, c] = Re(), A = ee(He);
2633
+ const { editorId: e, initialValue: t, container: o, autoFocus: s, isSingle: r } = n, i = Fe(() => s != null ? s : !1, []), [a, c] = Re(), A = $(He);
2634
2634
  return wi(() => {
2635
2635
  var l, d;
2636
2636
  if (o.current) {
@@ -2684,13 +2684,13 @@ const At = {
2684
2684
  type: w.OPERATION,
2685
2685
  handler: (n, e) => !!e
2686
2686
  }, BA = (n, e, t, o) => {
2687
- const s = ee(T), r = ee(ro), i = _t(e);
2687
+ const s = $(T), r = $(ro), i = Dt(e);
2688
2688
  i.current = e;
2689
- const a = _t(o);
2689
+ const a = Dt(o);
2690
2690
  a.current = o, be(() => {
2691
2691
  if (!t || !n)
2692
2692
  return;
2693
- const A = `sheet.formula-embedding-editor.${t.getEditorId()}`, l = new Nn(), d = (u, g) => {
2693
+ const A = `sheet.formula-embedding-editor.${t.getEditorId()}`, l = new rn(), d = (u, g) => {
2694
2694
  if (a.current) {
2695
2695
  a.current(u, g);
2696
2696
  return;
@@ -2732,7 +2732,7 @@ const At = {
2732
2732
  preconditions: () => !0,
2733
2733
  priority: 900,
2734
2734
  staticParameters: {
2735
- eventType: Ci.Keyboard,
2735
+ eventType: vi.Keyboard,
2736
2736
  keyCode: u
2737
2737
  }
2738
2738
  })).forEach((u) => {
@@ -2743,7 +2743,7 @@ const At = {
2743
2743
  }, [s, t, n, r]);
2744
2744
  };
2745
2745
  function MA(n, e) {
2746
- const t = ee(T);
2746
+ const t = $(T);
2747
2747
  be(() => {
2748
2748
  if (!n) return;
2749
2749
  const o = t.onCommandExecuted((s) => {
@@ -2759,7 +2759,7 @@ function MA(n, e) {
2759
2759
  };
2760
2760
  }, [n, e, t]);
2761
2761
  }
2762
- const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap", PA = "univer-rich-text-editor-text", wA = "univer-rich-text-editor-placeholder", Xt = {
2762
+ const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap", PA = "univer-rich-text-editor-text", wA = "univer-rich-text-editor-placeholder", Jt = {
2763
2763
  richTextEditorActive: _A,
2764
2764
  richTextEditorWrap: DA,
2765
2765
  richTextEditorText: PA,
@@ -2783,15 +2783,15 @@ const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap"
2783
2783
  maxHeight: g = 32,
2784
2784
  icon: f,
2785
2785
  editorRef: p
2786
- } = n, m = ee(He), E = Oo(o), I = Oo(r), [C, R] = Re(u), S = Cr.useRef(null), v = Fe(() => l != null ? l : Qa(`RICH_TEXT_EDITOR-${mt(4)}`), [l]), b = TA({
2786
+ } = n, m = $(He), E = Oo(o), I = Oo(r), [C, R] = Re(u), S = vr.useRef(null), v = Fe(() => l != null ? l : Qa(`RICH_TEXT_EDITOR-${mt(4)}`), [l]), b = TA({
2787
2787
  editorId: v,
2788
2788
  initialValue: s,
2789
2789
  container: S,
2790
2790
  autoFocus: t,
2791
2791
  isSingle: A
2792
- }), D = ee(pe).getRenderById(v), x = D == null ? void 0 : D.with(Se), M = sn(x == null ? void 0 : x.textSelectionInner$), B = !!((Y = x == null ? void 0 : x.isFocusing) != null && Y && (M != null && M.textRanges.some((H) => H.collapsed))), L = Cr.useRef(null), [F, P] = Re(() => {
2792
+ }), D = $(fe).getRenderById(v), x = D == null ? void 0 : D.with(Se), M = Mt(x == null ? void 0 : x.textSelectionInner$), B = !!((Y = x == null ? void 0 : x.isFocusing) != null && Y && (M != null && M.textRanges.some((H) => H.collapsed))), L = vr.useRef(null), [F, P] = Re(() => {
2793
2793
  var H, q;
2794
- return !Ce.transform.getPlainText((q = (H = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : H.dataStream) != null ? q : "");
2794
+ return !ve.transform.getPlainText((q = (H = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : H.dataStream) != null ? q : "");
2795
2795
  }), { checkScrollBar: oe } = rA(b, A, !0, !0);
2796
2796
  wi(() => {
2797
2797
  if (!(!p || !b)) {
@@ -2803,19 +2803,19 @@ const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap"
2803
2803
  }
2804
2804
  }, [b]);
2805
2805
  const re = Oo((H) => {
2806
- var Ae, ne;
2807
- const q = D == null ? void 0 : D.with(ce), se = q == null ? void 0 : q.getSkeleton().getActualSize();
2808
- se && (d == null || d(se.actualHeight), R(Math.max(u, Math.min(se.actualHeight + 10, g)))), h == null || h(H, Vo((ne = (Ae = H.body) == null ? void 0 : Ae.dataStream) != null ? ne : "")), oe();
2806
+ var ce, ne;
2807
+ const q = D == null ? void 0 : D.with(Ae), se = q == null ? void 0 : q.getSkeleton().getActualSize();
2808
+ se && (d == null || d(se.actualHeight), R(Math.max(u, Math.min(se.actualHeight + 10, g)))), h == null || h(H, Vo((ne = (ce = H.body) == null ? void 0 : ce.dataStream) != null ? ne : "")), oe();
2809
2809
  });
2810
2810
  return be(() => {
2811
2811
  var q, se;
2812
- P(!Ce.transform.getPlainText((se = (q = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : q.dataStream) != null ? se : ""));
2812
+ P(!ve.transform.getPlainText((se = (q = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : q.dataStream) != null ? se : ""));
2813
2813
  const H = b == null ? void 0 : b.selectionChange$.subscribe(() => {
2814
- var Ae, ne;
2815
- P(!Ce.transform.getPlainText((ne = (Ae = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : Ae.dataStream) != null ? ne : ""));
2814
+ var ce, ne;
2815
+ P(!ve.transform.getPlainText((ne = (ce = b == null ? void 0 : b.getDocumentData().body) == null ? void 0 : ce.dataStream) != null ? ne : ""));
2816
2816
  });
2817
2817
  return () => H == null ? void 0 : H.unsubscribe();
2818
- }, [b]), sn(b == null ? void 0 : b.blur$), sn(b == null ? void 0 : b.focus$), be(() => {
2818
+ }, [b]), Mt(b == null ? void 0 : b.blur$), Mt(b == null ? void 0 : b.focus$), be(() => {
2819
2819
  var q, se;
2820
2820
  const H = b == null ? void 0 : b.getDocumentData();
2821
2821
  E == null || E(B, Vo((se = (q = H == null ? void 0 : H.body) == null ? void 0 : q.dataStream) != null ? se : ""));
@@ -2829,11 +2829,11 @@ const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap"
2829
2829
  return () => {
2830
2830
  document.removeEventListener("click", H), clearTimeout(q);
2831
2831
  };
2832
- }, [b, v, m, I]), BA(B && a, !1, b), sA(B, i, b), MA(b, re), /* @__PURE__ */ V("div", { className: ln(Xt.richTextEditor, e), style: c, children: /* @__PURE__ */ de(
2832
+ }, [b, v, m, I]), BA(B && a, !1, b), sA(B, i, b), MA(b, re), /* @__PURE__ */ V("div", { className: dn(Jt.richTextEditor, e), style: c, children: /* @__PURE__ */ de(
2833
2833
  "div",
2834
2834
  {
2835
- className: ln(Xt.richTextEditorWrap, {
2836
- [Xt.richTextEditorActive]: B
2835
+ className: dn(Jt.richTextEditorWrap, {
2836
+ [Jt.richTextEditorActive]: B
2837
2837
  }),
2838
2838
  style: { height: C },
2839
2839
  ref: L,
@@ -2841,13 +2841,13 @@ const _A = "univer-rich-text-editor-active", DA = "univer-rich-text-editor-wrap"
2841
2841
  /* @__PURE__ */ V(
2842
2842
  "div",
2843
2843
  {
2844
- className: Xt.richTextEditorText,
2844
+ className: Jt.richTextEditorText,
2845
2845
  ref: S,
2846
2846
  onMouseUp: () => b == null ? void 0 : b.focus()
2847
2847
  }
2848
2848
  ),
2849
2849
  f,
2850
- F ? /* @__PURE__ */ V("div", { className: Xt.richTextEditorPlaceholder, children: n.placeholder }) : null
2850
+ F ? /* @__PURE__ */ V("div", { className: Jt.richTextEditorPlaceholder, children: n.placeholder }) : null
2851
2851
  ]
2852
2852
  }
2853
2853
  ) });
@@ -2867,12 +2867,12 @@ var Qe = function() {
2867
2867
  for (var s = 0, o = Object.getOwnPropertySymbols(n); s < o.length; s++)
2868
2868
  e.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, o[s]) && (t[o[s]] = n[o[s]]);
2869
2869
  return t;
2870
- }, Vt = Ht(function(n, e) {
2871
- var t = n.icon, o = n.id, s = n.className, r = n.extend, i = NA(n, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(o, " ").concat(s || "").trim(), c = _t("_".concat(LA()));
2870
+ }, Wt = kt(function(n, e) {
2871
+ var t = n.icon, o = n.id, s = n.className, r = n.extend, i = NA(n, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(o, " ").concat(s || "").trim(), c = Dt("_".concat(LA()));
2872
2872
  return Wi(t, "".concat(o), { defIds: t.defIds, idSuffix: c.current }, Qe({ ref: e, className: a }, i), r);
2873
2873
  });
2874
2874
  function Wi(n, e, t, o, s) {
2875
- return kt(n.tag, Qe(Qe({ key: e }, QA(n, t, s)), o), (UA(n, t).children || []).map(function(r, i) {
2875
+ return Vt(n.tag, Qe(Qe({ key: e }, QA(n, t, s)), o), (UA(n, t).children || []).map(function(r, i) {
2876
2876
  return Wi(r, "".concat(e, "-").concat(n.tag, "-").concat(i), t, void 0, s);
2877
2877
  }));
2878
2878
  }
@@ -2897,41 +2897,41 @@ function UA(n, e) {
2897
2897
  function LA() {
2898
2898
  return Math.random().toString(36).substring(2, 8);
2899
2899
  }
2900
- Vt.displayName = "UniverIcon";
2901
- var FA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM1.9999 5.56641C1.66853 5.56641 1.3999 5.83504 1.3999 6.16641 1.3999 6.49778 1.66853 6.76641 1.9999 6.76641H13.9999C14.3313 6.76641 14.5999 6.49778 14.5999 6.16641 14.5999 5.83504 14.3313 5.56641 13.9999 5.56641H1.9999zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM1.9999 12.9004C1.66853 12.9004 1.3999 13.169 1.3999 13.5004 1.3999 13.8318 1.66853 14.1004 1.9999 14.1004H13.9999C14.3313 14.1004 14.5999 13.8318 14.5999 13.5004 14.5999 13.169 14.3313 12.9004 13.9999 12.9004H1.9999z" } }] }, zi = Ht(function(n, e) {
2902
- return kt(Vt, Object.assign({}, n, {
2900
+ Wt.displayName = "UniverIcon";
2901
+ var FA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM1.9999 5.56641C1.66853 5.56641 1.3999 5.83504 1.3999 6.16641 1.3999 6.49778 1.66853 6.76641 1.9999 6.76641H13.9999C14.3313 6.76641 14.5999 6.49778 14.5999 6.16641 14.5999 5.83504 14.3313 5.56641 13.9999 5.56641H1.9999zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM1.9999 12.9004C1.66853 12.9004 1.3999 13.169 1.3999 13.5004 1.3999 13.8318 1.66853 14.1004 1.9999 14.1004H13.9999C14.3313 14.1004 14.5999 13.8318 14.5999 13.5004 14.5999 13.169 14.3313 12.9004 13.9999 12.9004H1.9999z" } }] }, zi = kt(function(n, e) {
2902
+ return Vt(Wt, Object.assign({}, n, {
2903
2903
  id: "align-text-both-single",
2904
2904
  ref: e,
2905
2905
  icon: FA
2906
2906
  }));
2907
2907
  });
2908
2908
  zi.displayName = "AlignTextBothSingle";
2909
- var HA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM3.33315 5.56641C3.00178 5.56641 2.73315 5.83504 2.73315 6.16641 2.73315 6.49778 3.00178 6.76641 3.33315 6.76641H12.6665C12.9979 6.76641 13.2665 6.49778 13.2665 6.16641 13.2665 5.83504 12.9979 5.56641 12.6665 5.56641H3.33315zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM3.33315 12.9004C3.00178 12.9004 2.73315 13.169 2.73315 13.5004 2.73315 13.8318 3.00178 14.1004 3.33315 14.1004H12.6665C12.9979 14.1004 13.2665 13.8318 13.2665 13.5004 13.2665 13.169 12.9979 12.9004 12.6665 12.9004H3.33315z" } }] }, ji = Ht(function(n, e) {
2910
- return kt(Vt, Object.assign({}, n, {
2909
+ var HA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM3.33315 5.56641C3.00178 5.56641 2.73315 5.83504 2.73315 6.16641 2.73315 6.49778 3.00178 6.76641 3.33315 6.76641H12.6665C12.9979 6.76641 13.2665 6.49778 13.2665 6.16641 13.2665 5.83504 12.9979 5.56641 12.6665 5.56641H3.33315zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM3.33315 12.9004C3.00178 12.9004 2.73315 13.169 2.73315 13.5004 2.73315 13.8318 3.00178 14.1004 3.33315 14.1004H12.6665C12.9979 14.1004 13.2665 13.8318 13.2665 13.5004 13.2665 13.169 12.9979 12.9004 12.6665 12.9004H3.33315z" } }] }, ji = kt(function(n, e) {
2910
+ return Vt(Wt, Object.assign({}, n, {
2911
2911
  id: "horizontally-single",
2912
2912
  ref: e,
2913
2913
  icon: HA
2914
2914
  }));
2915
2915
  });
2916
2916
  ji.displayName = "HorizontallySingle";
2917
- var kA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM1.9999 5.56641C1.66853 5.56641 1.3999 5.83504 1.3999 6.16641 1.3999 6.49778 1.66853 6.76641 1.9999 6.76641H11.3332C11.6646 6.76641 11.9332 6.49778 11.9332 6.16641 11.9332 5.83504 11.6646 5.56641 11.3332 5.56641H1.9999zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM1.9999 12.9004C1.66853 12.9004 1.3999 13.169 1.3999 13.5004 1.3999 13.8318 1.66853 14.1004 1.9999 14.1004H11.3332C11.6646 14.1004 11.9332 13.8318 11.9332 13.5004 11.9332 13.169 11.6646 12.9004 11.3332 12.9004H1.9999z" } }] }, Gi = Ht(function(n, e) {
2918
- return kt(Vt, Object.assign({}, n, {
2917
+ var kA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM1.9999 5.56641C1.66853 5.56641 1.3999 5.83504 1.3999 6.16641 1.3999 6.49778 1.66853 6.76641 1.9999 6.76641H11.3332C11.6646 6.76641 11.9332 6.49778 11.9332 6.16641 11.9332 5.83504 11.6646 5.56641 11.3332 5.56641H1.9999zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM1.9999 12.9004C1.66853 12.9004 1.3999 13.169 1.3999 13.5004 1.3999 13.8318 1.66853 14.1004 1.9999 14.1004H11.3332C11.6646 14.1004 11.9332 13.8318 11.9332 13.5004 11.9332 13.169 11.6646 12.9004 11.3332 12.9004H1.9999z" } }] }, Gi = kt(function(n, e) {
2918
+ return Vt(Wt, Object.assign({}, n, {
2919
2919
  id: "left-justifying-single",
2920
2920
  ref: e,
2921
2921
  icon: kA
2922
2922
  }));
2923
2923
  });
2924
2924
  Gi.displayName = "LeftJustifyingSingle";
2925
- var VA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM4.66665 5.56641C4.33528 5.56641 4.06665 5.83504 4.06665 6.16641 4.06665 6.49778 4.33528 6.76641 4.66665 6.76641H14C14.3314 6.76641 14.6 6.49778 14.6 6.16641 14.6 5.83504 14.3314 5.56641 14 5.56641H4.66665zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM4.66665 12.9004C4.33528 12.9004 4.06665 13.169 4.06665 13.5004 4.06665 13.8318 4.33528 14.1004 4.66665 14.1004H14C14.3314 14.1004 14.6 13.8318 14.6 13.5004 14.6 13.169 14.3314 12.9004 14 12.9004H4.66665z" } }] }, Yi = Ht(function(n, e) {
2926
- return kt(Vt, Object.assign({}, n, {
2925
+ var VA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM4.66665 5.56641C4.33528 5.56641 4.06665 5.83504 4.06665 6.16641 4.06665 6.49778 4.33528 6.76641 4.66665 6.76641H14C14.3314 6.76641 14.6 6.49778 14.6 6.16641 14.6 5.83504 14.3314 5.56641 14 5.56641H4.66665zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM4.66665 12.9004C4.33528 12.9004 4.06665 13.169 4.06665 13.5004 4.06665 13.8318 4.33528 14.1004 4.66665 14.1004H14C14.3314 14.1004 14.6 13.8318 14.6 13.5004 14.6 13.169 14.3314 12.9004 14 12.9004H4.66665z" } }] }, Yi = kt(function(n, e) {
2926
+ return Vt(Wt, Object.assign({}, n, {
2927
2927
  id: "right-justifying-single",
2928
2928
  ref: e,
2929
2929
  icon: VA
2930
2930
  }));
2931
2931
  });
2932
2932
  Yi.displayName = "RightJustifyingSingle";
2933
- var WA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.96372 2.59116C5.19803 2.35684 5.19803 1.97695 4.96372 1.74263 4.7294 1.50832 4.3495 1.50832 4.11519 1.74263L2.53945 3.31837 1.96372 2.74263C1.7294 2.50832 1.3495 2.50832 1.11519 2.74263.880874 2.97695.880874 3.35684 1.11519 3.59116L2.11519 4.59116C2.3495 4.82547 2.7294 4.82547 2.96372 4.59116L4.96372 2.59116zM14.4605 2.56689H6.8981C6.56672 2.56689 6.2981 2.83552 6.2981 3.16689 6.2981 3.49827 6.56672 3.76689 6.8981 3.76689H14.4605C14.7918 3.76689 15.0605 3.49827 15.0605 3.16689 15.0605 2.83552 14.7918 2.56689 14.4605 2.56689zM6.8981 7.2334C6.56672 7.2334 6.2981 7.50203 6.2981 7.8334 6.2981 8.16477 6.56672 8.4334 6.8981 8.4334H14.4605C14.7918 8.4334 15.0605 8.16477 15.0605 7.8334 15.0605 7.50203 14.7918 7.2334 14.4605 7.2334H6.8981zM6.2981 12.4999C6.2981 12.1685 6.56672 11.8999 6.8981 11.8999H14.4605C14.7918 11.8999 15.0605 12.1685 15.0605 12.4999 15.0605 12.8313 14.7918 13.0999 14.4605 13.0999H6.8981C6.56672 13.0999 6.2981 12.8313 6.2981 12.4999z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.87279 5.8999C1.80504 5.8999.939453 6.76549.939453 7.83324.939453 8.90099 1.80504 9.76657 2.87279 9.76657 3.94054 9.76657 4.80612 8.90099 4.80612 7.83324 4.80612 6.76549 3.94054 5.8999 2.87279 5.8999zM2.13945 7.83324C2.13945 7.42823 2.46778 7.0999 2.87279 7.0999 3.2778 7.0999 3.60612 7.42823 3.60612 7.83324 3.60612 8.23824 3.2778 8.56657 2.87279 8.56657 2.46778 8.56657 2.13945 8.23824 2.13945 7.83324zM.939453 12.5002C.939453 11.4325 1.80504 10.5669 2.87279 10.5669 3.94054 10.5669 4.80612 11.4325 4.80612 12.5002 4.80612 13.568 3.94054 14.4336 2.87279 14.4336 1.80504 14.4336.939453 13.568.939453 12.5002zM2.87279 11.7669C2.46778 11.7669 2.13945 12.0952 2.13945 12.5002 2.13945 12.9052 2.46778 13.2336 2.87279 13.2336 3.2778 13.2336 3.60612 12.9052 3.60612 12.5002 3.60612 12.0952 3.2778 11.7669 2.87279 11.7669z", fillRule: "evenodd", clipRule: "evenodd" } }] }, qi = Ht(function(n, e) {
2934
- return kt(Vt, Object.assign({}, n, {
2933
+ var WA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.96372 2.59116C5.19803 2.35684 5.19803 1.97695 4.96372 1.74263 4.7294 1.50832 4.3495 1.50832 4.11519 1.74263L2.53945 3.31837 1.96372 2.74263C1.7294 2.50832 1.3495 2.50832 1.11519 2.74263.880874 2.97695.880874 3.35684 1.11519 3.59116L2.11519 4.59116C2.3495 4.82547 2.7294 4.82547 2.96372 4.59116L4.96372 2.59116zM14.4605 2.56689H6.8981C6.56672 2.56689 6.2981 2.83552 6.2981 3.16689 6.2981 3.49827 6.56672 3.76689 6.8981 3.76689H14.4605C14.7918 3.76689 15.0605 3.49827 15.0605 3.16689 15.0605 2.83552 14.7918 2.56689 14.4605 2.56689zM6.8981 7.2334C6.56672 7.2334 6.2981 7.50203 6.2981 7.8334 6.2981 8.16477 6.56672 8.4334 6.8981 8.4334H14.4605C14.7918 8.4334 15.0605 8.16477 15.0605 7.8334 15.0605 7.50203 14.7918 7.2334 14.4605 7.2334H6.8981zM6.2981 12.4999C6.2981 12.1685 6.56672 11.8999 6.8981 11.8999H14.4605C14.7918 11.8999 15.0605 12.1685 15.0605 12.4999 15.0605 12.8313 14.7918 13.0999 14.4605 13.0999H6.8981C6.56672 13.0999 6.2981 12.8313 6.2981 12.4999z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.87279 5.8999C1.80504 5.8999.939453 6.76549.939453 7.83324.939453 8.90099 1.80504 9.76657 2.87279 9.76657 3.94054 9.76657 4.80612 8.90099 4.80612 7.83324 4.80612 6.76549 3.94054 5.8999 2.87279 5.8999zM2.13945 7.83324C2.13945 7.42823 2.46778 7.0999 2.87279 7.0999 3.2778 7.0999 3.60612 7.42823 3.60612 7.83324 3.60612 8.23824 3.2778 8.56657 2.87279 8.56657 2.46778 8.56657 2.13945 8.23824 2.13945 7.83324zM.939453 12.5002C.939453 11.4325 1.80504 10.5669 2.87279 10.5669 3.94054 10.5669 4.80612 11.4325 4.80612 12.5002 4.80612 13.568 3.94054 14.4336 2.87279 14.4336 1.80504 14.4336.939453 13.568.939453 12.5002zM2.87279 11.7669C2.46778 11.7669 2.13945 12.0952 2.13945 12.5002 2.13945 12.9052 2.46778 13.2336 2.87279 13.2336 3.2778 13.2336 3.60612 12.9052 3.60612 12.5002 3.60612 12.0952 3.2778 11.7669 2.87279 11.7669z", fillRule: "evenodd", clipRule: "evenodd" } }] }, qi = kt(function(n, e) {
2934
+ return Vt(Wt, Object.assign({}, n, {
2935
2935
  id: "todo-list",
2936
2936
  ref: e,
2937
2937
  icon: WA
@@ -2970,25 +2970,25 @@ const Zo = "COMPONENT_DOC_HEADER_FOOTER_PANEL", zA = "univer-panel", jA = "unive
2970
2970
  };
2971
2971
  function KA(n, e, t) {
2972
2972
  const { useFirstPageHeaderFooter: o, evenAndOddHeaders: s, defaultHeaderId: r, defaultFooterId: i, firstPageHeaderId: a, firstPageFooterId: c, evenPageHeaderId: A, evenPageFooterId: l } = n;
2973
- return e === fe.HEADER ? o === U.TRUE ? t === 0 ? a : s === U.TRUE && t % 2 === 1 ? A : r : s === U.TRUE && t % 2 === 1 ? A : r : o === U.TRUE ? t === 0 ? c : s === U.TRUE && t % 2 === 1 ? l : i : s === U.TRUE && t % 2 === 1 ? l : i;
2973
+ return e === me.HEADER ? o === U.TRUE ? t === 0 ? a : s === U.TRUE && t % 2 === 1 ? A : r : s === U.TRUE && t % 2 === 1 ? A : r : o === U.TRUE ? t === 0 ? c : s === U.TRUE && t % 2 === 1 ? l : i : s === U.TRUE && t % 2 === 1 ? l : i;
2974
2974
  }
2975
2975
  const XA = (n) => {
2976
- const e = ee($e), t = ee(N), o = ee(pe), s = ee(T), r = ee(bs), { unitId: i } = n, a = o.getRenderById(i).with(Se), [c, A] = Re({}), l = (u, g) => {
2976
+ const e = $($e), t = $(N), o = $(fe), s = $(T), r = $(bs), { unitId: i } = n, a = o.getRenderById(i).with(Se), [c, A] = Re({}), l = (u, g) => {
2977
2977
  var v;
2978
2978
  A((b) => ({
2979
2979
  ...b,
2980
2980
  [g]: u ? U.TRUE : U.FALSE
2981
2981
  }));
2982
- const f = t.getUniverDocInstance(i), p = f == null ? void 0 : f.getSnapshot().documentStyle, m = (v = o.getRenderById(i)) == null ? void 0 : v.with(ce), E = m == null ? void 0 : m.getViewModel();
2982
+ const f = t.getUniverDocInstance(i), p = f == null ? void 0 : f.getSnapshot().documentStyle, m = (v = o.getRenderById(i)) == null ? void 0 : v.with(Ae), E = m == null ? void 0 : m.getViewModel();
2983
2983
  if (p == null || E == null)
2984
2984
  return;
2985
2985
  const I = E.getEditArea();
2986
2986
  let C = !1;
2987
2987
  const R = a.getSegmentPage();
2988
2988
  let S = !1;
2989
- if (g === "useFirstPageHeaderFooter" && u === !0 && ((I === fe.HEADER && !p.firstPageHeaderId || I === fe.FOOTER && !p.firstPageFooterId) && (C = !0), C && R === 0 && (S = !0)), g === "evenAndOddHeaders" && u === !0 && ((I === fe.HEADER && !p.evenPageHeaderId || I === fe.FOOTER && !p.evenPageFooterId) && (C = !0), C && R % 2 === 1 && (S = !0)), C) {
2989
+ if (g === "useFirstPageHeaderFooter" && u === !0 && ((I === me.HEADER && !p.firstPageHeaderId || I === me.FOOTER && !p.firstPageFooterId) && (C = !0), C && R === 0 && (S = !0)), g === "evenAndOddHeaders" && u === !0 && ((I === me.HEADER && !p.evenPageHeaderId || I === me.FOOTER && !p.evenPageFooterId) && (C = !0), C && R % 2 === 1 && (S = !0)), C) {
2990
2990
  const y = X.generateRandomId(6);
2991
- S && a.setSegment(y), s.executeCommand(Pn, {
2991
+ S && a.setSegment(y), s.executeCommand(wn, {
2992
2992
  unitId: i,
2993
2993
  segmentId: y,
2994
2994
  headerFooterProps: {
@@ -3004,7 +3004,7 @@ const XA = (n) => {
3004
3004
  I,
3005
3005
  b
3006
3006
  );
3007
- D && D !== y && a.setSegment(D), s.executeCommand(Pn, {
3007
+ D && D !== y && a.setSegment(D), s.executeCommand(wn, {
3008
3008
  unitId: i,
3009
3009
  headerFooterProps: {
3010
3010
  [g]: u ? U.TRUE : U.FALSE
@@ -3016,7 +3016,7 @@ const XA = (n) => {
3016
3016
  A((f) => ({
3017
3017
  ...f,
3018
3018
  [g]: u
3019
- })), await s.executeCommand(Pn, {
3019
+ })), await s.executeCommand(wn, {
3020
3020
  unitId: i,
3021
3021
  headerFooterProps: {
3022
3022
  [g]: u
@@ -3066,11 +3066,11 @@ const XA = (n) => {
3066
3066
  }
3067
3067
  ) })
3068
3068
  ] }),
3069
- /* @__PURE__ */ de("div", { className: ln(Pe.optionsSection, Pe.optionsMarginSetting), children: [
3069
+ /* @__PURE__ */ de("div", { className: dn(Pe.optionsSection, Pe.optionsMarginSetting), children: [
3070
3070
  /* @__PURE__ */ de("div", { className: Pe.optionsMarginItem, children: [
3071
3071
  /* @__PURE__ */ V("span", { children: e.t("headerFooter.headerTopMargin") }),
3072
3072
  /* @__PURE__ */ V(
3073
- dn,
3073
+ un,
3074
3074
  {
3075
3075
  min: 0,
3076
3076
  max: 200,
@@ -3086,7 +3086,7 @@ const XA = (n) => {
3086
3086
  /* @__PURE__ */ de("div", { className: Pe.optionsMarginItem, children: [
3087
3087
  /* @__PURE__ */ V("span", { children: e.t("headerFooter.footerBottomMargin") }),
3088
3088
  /* @__PURE__ */ V(
3089
- dn,
3089
+ un,
3090
3090
  {
3091
3091
  min: 0,
3092
3092
  max: 200,
@@ -3104,12 +3104,12 @@ const XA = (n) => {
3104
3104
  ] });
3105
3105
  }, JA = () => {
3106
3106
  var A;
3107
- const n = ee($e), e = ee(pe), s = ee(N).getCurrentUniverDocInstance().getUnitId(), i = ((A = e.getRenderById(s)) == null ? void 0 : A.with(ce)).getViewModel(), [a, c] = Re(!0);
3107
+ const n = $($e), e = $(fe), s = $(N).getCurrentUniverDocInstance().getUnitId(), i = ((A = e.getRenderById(s)) == null ? void 0 : A.with(Ae)).getViewModel(), [a, c] = Re(!0);
3108
3108
  return be(() => {
3109
3109
  const l = i.getEditArea();
3110
- c(l !== fe.BODY);
3110
+ c(l !== me.BODY);
3111
3111
  const d = i.editAreaChange$.subscribe((h) => {
3112
- h != null && c(h !== fe.BODY);
3112
+ h != null && c(h !== me.BODY);
3113
3113
  });
3114
3114
  return () => {
3115
3115
  d.unsubscribe();
@@ -3182,12 +3182,12 @@ function nl(n, e, t) {
3182
3182
  useFirstPageHeaderFooter: d
3183
3183
  } = o;
3184
3184
  switch (e) {
3185
- case fe.BODY:
3185
+ case me.BODY:
3186
3186
  return {
3187
3187
  createType: null,
3188
3188
  headerFooterId: null
3189
3189
  };
3190
- case fe.HEADER:
3190
+ case me.HEADER:
3191
3191
  return d === U.TRUE && !c ? {
3192
3192
  createType: 0,
3193
3193
  headerFooterId: null
@@ -3201,7 +3201,7 @@ function nl(n, e, t) {
3201
3201
  createType: 2,
3202
3202
  headerFooterId: null
3203
3203
  };
3204
- case fe.FOOTER:
3204
+ case me.FOOTER:
3205
3205
  return d === U.TRUE && !A ? {
3206
3206
  createType: 1,
3207
3207
  headerFooterId: null
@@ -3234,7 +3234,7 @@ let $o = class extends ge {
3234
3234
  this._commandService.onCommandExecuted((e) => {
3235
3235
  if (J.id === e.id) {
3236
3236
  const t = this._context.unit, s = this._docSkeletonManagerService.getViewModel().getEditArea(), r = t.getSnapshot().documentStyle.documentFlavor;
3237
- s !== fe.BODY && r === Be.MODERN && this._commandService.executeCommand(Ds.id, {
3237
+ s !== me.BODY && r === Be.MODERN && this._commandService.executeCommand(Ds.id, {
3238
3238
  unitId: this._context.unitId
3239
3239
  });
3240
3240
  }
@@ -3254,7 +3254,7 @@ let $o = class extends ge {
3254
3254
  if (this._isEditorReadOnly(e) || !this._isTraditionalMode())
3255
3255
  return;
3256
3256
  const { offsetX: r, offsetY: i } = s, {
3257
- pageLayoutType: a = An.VERTICAL,
3257
+ pageLayoutType: a = ln.VERTICAL,
3258
3258
  pageMarginLeft: c,
3259
3259
  pageMarginTop: A
3260
3260
  } = o.getOffsetConfig(), l = this._getTransformCoordForDocumentOffset(r, i);
@@ -3270,7 +3270,7 @@ let $o = class extends ge {
3270
3270
  return;
3271
3271
  d.setEditArea(g);
3272
3272
  const { createType: p, headerFooterId: m } = nl(d, g, f);
3273
- if (g === fe.BODY)
3273
+ if (g === me.BODY)
3274
3274
  this._docSelectionRenderService.setSegment(""), this._docSelectionRenderService.setSegmentPage(-1), this._docSelectionRenderService.setCursorManually(r, i);
3275
3275
  else if (p != null) {
3276
3276
  const I = X.generateRandomId(6);
@@ -3286,75 +3286,75 @@ let $o = class extends ge {
3286
3286
  const o = at(this._context), { document: s, scene: r } = o, { documentTransform: i } = s.getOffsetConfig(), a = r.getViewports()[0];
3287
3287
  if (a == null)
3288
3288
  return;
3289
- const c = a.transformVector2SceneCoord(cn.FromArray([e, t]));
3289
+ const c = a.transformVector2SceneCoord(An.FromArray([e, t]));
3290
3290
  return i.clone().invert().applyPoint(c);
3291
3291
  }
3292
3292
  // eslint-disable-next-line max-lines-per-function
3293
3293
  _drawHeaderFooterLabel() {
3294
3294
  const e = this._localeService;
3295
- this._renderManagerService.currentRender$.subscribe((t) => {
3295
+ this._instanceSrv.getCurrentTypeOfUnit$(_.UNIVER_DOC).subscribe((t) => {
3296
3296
  if (t == null)
3297
3297
  return;
3298
- const o = this._renderManagerService.getRenderById(t);
3299
- if (this._editorService.isEditor(t) || this._instanceSrv.getUniverDocInstance(t) == null || o == null)
3298
+ const o = t.getUnitId(), s = this._renderManagerService.getRenderById(o);
3299
+ if (this._editorService.isEditor(o) || this._instanceSrv.getUniverDocInstance(o) == null || s == null)
3300
3300
  return;
3301
- const { mainComponent: s } = o, r = s;
3301
+ const { mainComponent: r } = s, i = r;
3302
3302
  this.disposeWithMe(
3303
3303
  Zn(
3304
3304
  // eslint-disable-next-line max-lines-per-function
3305
- r.pageRender$.subscribe((i) => {
3306
- if (this._editorService.isEditor(t) || !this._isTraditionalMode())
3305
+ i.pageRender$.subscribe((a) => {
3306
+ if (this._editorService.isEditor(o) || !this._isTraditionalMode())
3307
3307
  return;
3308
- const A = this._docSkeletonManagerService.getViewModel().getEditArea() === fe.BODY, { page: l, pageLeft: d, pageTop: h, ctx: u } = i, { pageWidth: g, pageHeight: f, marginTop: p, marginBottom: m } = l;
3309
- if (u.save(), u.translate(d - 0.5, h - 0.5), A ? (Mn.drawWith(u, {
3308
+ const l = this._docSkeletonManagerService.getViewModel().getEditArea() === me.BODY, { page: d, pageLeft: h, pageTop: u, ctx: g } = a, { pageWidth: f, pageHeight: p, marginTop: m, marginBottom: E } = d;
3309
+ if (g.save(), g.translate(h - 0.5, u - 0.5), l ? (_n.drawWith(g, {
3310
3310
  left: 0,
3311
3311
  top: 0,
3312
- width: g,
3313
- height: p,
3312
+ width: f,
3313
+ height: m,
3314
3314
  fill: "rgba(255, 255, 255, 0.5)"
3315
- }), u.save(), u.translate(0, f - m), Mn.drawWith(u, {
3315
+ }), g.save(), g.translate(0, p - E), _n.drawWith(g, {
3316
3316
  left: 0,
3317
3317
  top: 0,
3318
- width: g,
3319
- height: m,
3318
+ width: f,
3319
+ height: E,
3320
3320
  fill: "rgba(255, 255, 255, 0.5)"
3321
- }), u.restore()) : (u.save(), u.translate(0, p), Mn.drawWith(u, {
3321
+ }), g.restore()) : (g.save(), g.translate(0, m), _n.drawWith(g, {
3322
3322
  left: 0,
3323
- top: p,
3324
- width: g,
3325
- height: f - p - m,
3323
+ top: m,
3324
+ width: f,
3325
+ height: p - m - E,
3326
3326
  fill: "rgba(255, 255, 255, 0.5)"
3327
- }), u.restore()), !A) {
3328
- const E = {
3327
+ }), g.restore()), !l) {
3328
+ const I = {
3329
3329
  dataArray: [{
3330
3330
  command: "M",
3331
- points: [0, p]
3331
+ points: [0, m]
3332
3332
  }, {
3333
3333
  command: "L",
3334
- points: [g, p]
3334
+ points: [f, m]
3335
3335
  }],
3336
3336
  strokeWidth: 1,
3337
3337
  stroke: Pr
3338
- }, I = {
3338
+ }, C = {
3339
3339
  dataArray: [{
3340
3340
  command: "M",
3341
- points: [0, f - m]
3341
+ points: [0, p - E]
3342
3342
  }, {
3343
3343
  command: "L",
3344
- points: [g, f - m]
3344
+ points: [f, p - E]
3345
3345
  }],
3346
3346
  strokeWidth: 1,
3347
3347
  stroke: Pr
3348
3348
  };
3349
- mr.drawWith(u, E), mr.drawWith(u, I), u.translate(0, p + 1), Ln.drawWith(u, {
3349
+ mr.drawWith(g, I), mr.drawWith(g, C), g.translate(0, m + 1), Ln.drawWith(g, {
3350
3350
  text: e.t("headerFooter.header"),
3351
3351
  color: wr
3352
- }), u.translate(0, f - p - m), Ln.drawWith(u, {
3352
+ }), g.translate(0, p - m - E), Ln.drawWith(g, {
3353
3353
  text: e.t("headerFooter.footer"),
3354
3354
  color: wr
3355
3355
  });
3356
3356
  }
3357
- u.restore();
3357
+ g.restore();
3358
3358
  })
3359
3359
  )
3360
3360
  );
@@ -3372,8 +3372,8 @@ $o = tl([
3372
3372
  st(1, T),
3373
3373
  st(2, He),
3374
3374
  st(3, N),
3375
- st(4, pe),
3376
- st(5, j(ce)),
3375
+ st(4, fe),
3376
+ st(5, j(Ae)),
3377
3377
  st(6, j(Se)),
3378
3378
  st(7, j($e)),
3379
3379
  st(8, j(io))
@@ -3475,13 +3475,13 @@ function Do(n, e, t, o) {
3475
3475
  }
3476
3476
  return o;
3477
3477
  }
3478
- const Pn = "doc.command.core-header-footer", Xi = {
3479
- id: Pn,
3478
+ const wn = "doc.command.core-header-footer", Xi = {
3479
+ id: wn,
3480
3480
  type: w.COMMAND,
3481
3481
  // eslint-disable-next-line max-lines-per-function
3482
3482
  handler: async (n, e) => {
3483
3483
  var C;
3484
- const t = n.get(T), o = n.get(N), s = n.get(pe), { unitId: r, segmentId: i, createType: a, headerFooterProps: c } = e, A = (C = s.getRenderById(r)) == null ? void 0 : C.with(ce), l = o.getUniverDocInstance(r), d = A == null ? void 0 : A.getViewModel();
3484
+ const t = n.get(T), o = n.get(N), s = n.get(fe), { unitId: r, segmentId: i, createType: a, headerFooterProps: c } = e, A = (C = s.getRenderById(r)) == null ? void 0 : C.with(Ae), l = o.getUniverDocInstance(r), d = A == null ? void 0 : A.getViewModel();
3485
3485
  if (l == null || d == null)
3486
3486
  return !1;
3487
3487
  const h = d.getEditArea(), { documentStyle: u } = l.getSnapshot(), g = (c == null ? void 0 : c.marginFooter) != null || (c == null ? void 0 : c.marginHeader) != null, f = [{
@@ -3505,10 +3505,10 @@ const Pn = "doc.command.core-header-footer", Xi = {
3505
3505
  return;
3506
3506
  let b;
3507
3507
  if (v === void 0 ? b = m.insertOp(["documentStyle", R], S) : b = m.replaceOp(["documentStyle", R], v, S), E.push(b), R === "useFirstPageHeaderFooter" && S === U.TRUE && !u.firstPageHeaderId) {
3508
- const y = h === fe.HEADER ? _e.FIRST_PAGE_HEADER : _e.FIRST_PAGE_FOOTER;
3508
+ const y = h === me.HEADER ? _e.FIRST_PAGE_HEADER : _e.FIRST_PAGE_FOOTER;
3509
3509
  Do(i, y, u, E);
3510
3510
  } else if (R === "evenAndOddHeaders" && S === U.TRUE && !u.evenPageHeaderId) {
3511
- const y = h === fe.HEADER ? _e.EVEN_PAGE_HEADER : _e.EVEN_PAGE_FOOTER;
3511
+ const y = h === me.HEADER ? _e.EVEN_PAGE_HEADER : _e.EVEN_PAGE_FOOTER;
3512
3512
  Do(i, y, u, E);
3513
3513
  }
3514
3514
  }), E.length === 0 ? !1 : (p.params.actions = E.reduce((R, S) => k.compose(R, S), null), !!t.syncExecuteCommand(p.id, p.params));
@@ -3522,11 +3522,11 @@ const Pn = "doc.command.core-header-footer", Xi = {
3522
3522
  type: w.COMMAND,
3523
3523
  handler: async (n, e) => {
3524
3524
  var g;
3525
- const t = n.get(T), o = n.get(pe), s = n.get(G), r = n.get(N), { unitId: i } = e, a = o.getRenderById(i);
3525
+ const t = n.get(T), o = n.get(fe), s = n.get(G), r = n.get(N), { unitId: i } = e, a = o.getRenderById(i);
3526
3526
  if (a == null)
3527
3527
  return !1;
3528
- const { scene: c } = a, A = c.getTransformerByCreate(), l = a.with(ce), d = a.with(Se), h = l == null ? void 0 : l.getSkeleton(), u = l == null ? void 0 : l.getViewModel();
3529
- return u == null || h == null ? !1 : (s.replaceDocRanges([]), A.clearSelectedObjects(), d.setSegment(""), d.setSegmentPage(-1), u.setEditArea(fe.BODY), h.calculate(), (g = a.mainComponent) == null || g.makeDirty(!0), queueMicrotask(() => {
3528
+ const { scene: c } = a, A = c.getTransformerByCreate(), l = a.with(Ae), d = a.with(Se), h = l == null ? void 0 : l.getSkeleton(), u = l == null ? void 0 : l.getViewModel();
3529
+ return u == null || h == null ? !1 : (s.replaceDocRanges([]), A.clearSelectedObjects(), d.setSegment(""), d.setSegmentPage(-1), u.setEditArea(me.BODY), h.calculate(), (g = a.mainComponent) == null || g.makeDirty(!0), queueMicrotask(() => {
3530
3530
  const f = r.getUnit(i), p = f == null ? void 0 : f.getSnapshot();
3531
3531
  if (p == null)
3532
3532
  return;
@@ -3539,13 +3539,13 @@ const Pn = "doc.command.core-header-footer", Xi = {
3539
3539
  ]);
3540
3540
  }), t.executeCommand(Ms.id, { value: "close" }), !0);
3541
3541
  }
3542
- }, Wt = "UI_PLUGIN_DOCS", Ps = `${Wt}_COLOR_PICKER_COMPONENT`, Ji = `${Wt}_FONT_FAMILY_COMPONENT`, Zi = `${Wt}_FONT_FAMILY_ITEM_COMPONENT`, $i = `${Wt}_FONT_SIZE_COMPONENT`, ol = "univer-doc-list-type-picker", sl = "univer-doc-list-type-picker-item", rl = "univer-doc-list-type-picker-item-active", Po = {
3542
+ }, zt = "UI_PLUGIN_DOCS", Ps = `${zt}_COLOR_PICKER_COMPONENT`, Ji = `${zt}_FONT_FAMILY_COMPONENT`, Zi = `${zt}_FONT_FAMILY_ITEM_COMPONENT`, $i = `${zt}_FONT_SIZE_COMPONENT`, ol = "univer-doc-list-type-picker", sl = "univer-doc-list-type-picker-item", rl = "univer-doc-list-type-picker-item-active", Po = {
3543
3543
  docListTypePicker: ol,
3544
3544
  docListTypePickerItem: sl,
3545
3545
  docListTypePickerItemActive: rl
3546
3546
  }, ea = (n) => {
3547
3547
  const { value: e, onChange: t, options: o } = n;
3548
- return /* @__PURE__ */ V("div", { className: ln(Po.docListTypePicker, "univer-theme"), children: o.map((s) => /* @__PURE__ */ V(
3548
+ return /* @__PURE__ */ V("div", { className: dn(Po.docListTypePicker, "univer-theme"), children: o.map((s) => /* @__PURE__ */ V(
3549
3549
  "img",
3550
3550
  {
3551
3551
  className: Po.docListTypePickerItem + (e === s.value ? `
@@ -3620,11 +3620,11 @@ const Pn = "doc.command.core-header-footer", Xi = {
3620
3620
  ...n,
3621
3621
  options: cl
3622
3622
  }
3623
- ), ta = `${Wt}_ORDER_LIST_TYPE_COMPONENT`, na = `${Wt}_BULLET_LIST_TYPE_COMPONENT`, ll = "doc.command.tab", Dt = {
3623
+ ), ta = `${zt}_ORDER_LIST_TYPE_COMPONENT`, na = `${zt}_BULLET_LIST_TYPE_COMPONENT`, ll = "doc.command.tab", Pt = {
3624
3624
  id: ll,
3625
3625
  type: w.COMMAND,
3626
3626
  async handler(n, e) {
3627
- const o = n.get(St).onAutoFormat(Dt.id, e);
3627
+ const o = n.get(St).onAutoFormat(Pt.id, e);
3628
3628
  return (await Ss(o, n.get(T))).result;
3629
3629
  }
3630
3630
  }, dl = "doc.command.after-space", Ao = {
@@ -3634,26 +3634,26 @@ const Pn = "doc.command.core-header-footer", Xi = {
3634
3634
  const t = n.get(St).onAutoFormat(Ao.id);
3635
3635
  return (await Ss(t, n.get(T))).result;
3636
3636
  }
3637
- }, un = {
3637
+ }, hn = {
3638
3638
  id: "doc.command.enter",
3639
3639
  type: w.COMMAND,
3640
3640
  async handler(n) {
3641
- const t = n.get(St).onAutoFormat(un.id);
3641
+ const t = n.get(St).onAutoFormat(hn.id);
3642
3642
  return (await Ss(t, n.get(T))).result;
3643
3643
  }
3644
3644
  };
3645
3645
  function he(n) {
3646
- return n.getContextValue(fn) && n.getContextValue(Is) && !n.getContextValue(pi);
3646
+ return n.getContextValue(pn) && n.getContextValue(Is) && !n.getContextValue(pi);
3647
3647
  }
3648
3648
  function ul(n) {
3649
- return n.getContextValue(fn) && n.getContextValue(Is) && !n.getContextValue(pi);
3649
+ return n.getContextValue(pn) && n.getContextValue(Is) && !n.getContextValue(pi);
3650
3650
  }
3651
3651
  const hl = {
3652
- id: Dt.id,
3652
+ id: Pt.id,
3653
3653
  binding: W.TAB,
3654
3654
  preconditions: he
3655
3655
  }, gl = {
3656
- id: Dt.id,
3656
+ id: Pt.id,
3657
3657
  binding: W.TAB | K.SHIFT,
3658
3658
  preconditions: he,
3659
3659
  staticParameters: {
@@ -3665,7 +3665,7 @@ var fl = Object.getOwnPropertyDescriptor, pl = (n, e, t, o) => {
3665
3665
  (i = n[r]) && (s = i(s) || s);
3666
3666
  return s;
3667
3667
  }, wo = (n, e) => (t, o) => e(t, o, n);
3668
- const ml = 11, El = 9, bn = {
3668
+ const ml = 11, El = 9, xn = {
3669
3669
  /**
3670
3670
  * fontFamily
3671
3671
  */
@@ -3699,15 +3699,15 @@ let Ze = class extends ge {
3699
3699
  const e = this._univerInstanceService.getCurrentUnitForType(_.UNIVER_DOC);
3700
3700
  if (e == null)
3701
3701
  return {
3702
- ...bn
3702
+ ...xn
3703
3703
  };
3704
- const t = e == null ? void 0 : e.getUnitId(), o = (i = this._renderManagerService.getRenderById(t)) == null ? void 0 : i.with(ce), s = o == null ? void 0 : o.getViewModel();
3704
+ const t = e == null ? void 0 : e.getUnitId(), o = (i = this._renderManagerService.getRenderById(t)) == null ? void 0 : i.with(Ae), s = o == null ? void 0 : o.getViewModel();
3705
3705
  return s == null ? {
3706
- ...bn
3707
- } : s.getEditArea() === fe.BODY ? {
3708
- ...bn
3706
+ ...xn
3707
+ } : s.getEditArea() === me.BODY ? {
3708
+ ...xn
3709
3709
  } : {
3710
- ...bn,
3710
+ ...xn,
3711
3711
  fs: El
3712
3712
  };
3713
3713
  }
@@ -3724,7 +3724,7 @@ let Ze = class extends ge {
3724
3724
  Ze = pl([
3725
3725
  wo(0, j(G)),
3726
3726
  wo(1, N),
3727
- wo(2, pe)
3727
+ wo(2, fe)
3728
3728
  ], Ze);
3729
3729
  function Ve(n, e, t) {
3730
3730
  return t.executeCommand(ut.id, {
@@ -3732,7 +3732,7 @@ function Ve(n, e, t) {
3732
3732
  ...e != null ? e : {}
3733
3733
  });
3734
3734
  }
3735
- const Qr = "doc.command.set-inline-format-bold", zt = {
3735
+ const Qr = "doc.command.set-inline-format-bold", jt = {
3736
3736
  id: Qr,
3737
3737
  type: w.COMMAND,
3738
3738
  handler: async (n, e) => {
@@ -3743,7 +3743,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3743
3743
  t
3744
3744
  );
3745
3745
  }
3746
- }, Ur = "doc.command.set-inline-format-italic", jt = {
3746
+ }, Ur = "doc.command.set-inline-format-italic", Gt = {
3747
3747
  id: Ur,
3748
3748
  type: w.COMMAND,
3749
3749
  handler: async (n, e) => {
@@ -3754,7 +3754,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3754
3754
  t
3755
3755
  );
3756
3756
  }
3757
- }, Lr = "doc.command.set-inline-format-underline", Gt = {
3757
+ }, Lr = "doc.command.set-inline-format-underline", Yt = {
3758
3758
  id: Lr,
3759
3759
  type: w.COMMAND,
3760
3760
  handler: async (n, e) => {
@@ -3765,7 +3765,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3765
3765
  t
3766
3766
  );
3767
3767
  }
3768
- }, Fr = "doc.command.set-inline-format-strikethrough", Yt = {
3768
+ }, Fr = "doc.command.set-inline-format-strikethrough", qt = {
3769
3769
  id: Fr,
3770
3770
  type: w.COMMAND,
3771
3771
  handler: async (n, e) => {
@@ -3776,7 +3776,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3776
3776
  t
3777
3777
  );
3778
3778
  }
3779
- }, Hr = "doc.command.set-inline-format-subscript", vt = {
3779
+ }, Hr = "doc.command.set-inline-format-subscript", Ct = {
3780
3780
  id: Hr,
3781
3781
  type: w.COMMAND,
3782
3782
  handler: async (n, e) => {
@@ -3787,7 +3787,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3787
3787
  t
3788
3788
  );
3789
3789
  }
3790
- }, kr = "doc.command.set-inline-format-superscript", qt = {
3790
+ }, kr = "doc.command.set-inline-format-superscript", Kt = {
3791
3791
  id: kr,
3792
3792
  type: w.COMMAND,
3793
3793
  handler: async (n, e) => {
@@ -3798,7 +3798,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3798
3798
  t
3799
3799
  );
3800
3800
  }
3801
- }, Vr = "doc.command.set-inline-format-fontsize", Pt = {
3801
+ }, Vr = "doc.command.set-inline-format-fontsize", wt = {
3802
3802
  id: Vr,
3803
3803
  type: w.COMMAND,
3804
3804
  handler: async (n, e) => {
@@ -3809,7 +3809,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3809
3809
  t
3810
3810
  );
3811
3811
  }
3812
- }, Wr = "doc.command.set-inline-format-font-family", wt = {
3812
+ }, Wr = "doc.command.set-inline-format-font-family", Nt = {
3813
3813
  id: Wr,
3814
3814
  type: w.COMMAND,
3815
3815
  handler: async (n, e) => {
@@ -3820,7 +3820,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3820
3820
  t
3821
3821
  );
3822
3822
  }
3823
- }, zr = "doc.command.set-inline-format-text-color", Nt = {
3823
+ }, zr = "doc.command.set-inline-format-text-color", Qt = {
3824
3824
  id: zr,
3825
3825
  type: w.COMMAND,
3826
3826
  handler: async (n, e) => {
@@ -3831,7 +3831,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3831
3831
  t
3832
3832
  );
3833
3833
  }
3834
- }, jr = "doc.command.set-inline-format-text-background-color", Qt = {
3834
+ }, jr = "doc.command.set-inline-format-text-background-color", Ut = {
3835
3835
  id: jr,
3836
3836
  type: w.COMMAND,
3837
3837
  handler: async (n, e) => {
@@ -3842,7 +3842,7 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3842
3842
  t
3843
3843
  );
3844
3844
  }
3845
- }, Gr = "doc.command.reset-inline-format-text-background-color", mn = {
3845
+ }, Gr = "doc.command.reset-inline-format-text-background-color", En = {
3846
3846
  id: Gr,
3847
3847
  type: w.COMMAND,
3848
3848
  handler: async (n, e) => {
@@ -3854,17 +3854,17 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3854
3854
  );
3855
3855
  }
3856
3856
  }, es = {
3857
- [zt.id]: "bl",
3858
- [jt.id]: "it",
3859
- [Gt.id]: "ul",
3860
- [Yt.id]: "st",
3861
- [Pt.id]: "fs",
3862
- [wt.id]: "ff",
3863
- [Nt.id]: "cl",
3864
- [Qt.id]: "bg",
3865
- [mn.id]: "bg",
3866
- [vt.id]: "va",
3867
- [qt.id]: "va"
3857
+ [jt.id]: "bl",
3858
+ [Gt.id]: "it",
3859
+ [Yt.id]: "ul",
3860
+ [qt.id]: "st",
3861
+ [wt.id]: "fs",
3862
+ [Nt.id]: "ff",
3863
+ [Qt.id]: "cl",
3864
+ [Ut.id]: "bg",
3865
+ [En.id]: "bg",
3866
+ [Ct.id]: "va",
3867
+ [Kt.id]: "va"
3868
3868
  }, ut = {
3869
3869
  id: "doc.command.set-inline-format",
3870
3870
  type: w.COMMAND,
@@ -3883,17 +3883,17 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3883
3883
  const u = d.getUnitId();
3884
3884
  let g;
3885
3885
  switch (o) {
3886
- case zt.id:
3887
- // fallthrough
3888
3886
  case jt.id:
3889
3887
  // fallthrough
3890
3888
  case Gt.id:
3891
3889
  // fallthrough
3892
3890
  case Yt.id:
3893
3891
  // fallthrough
3894
- case vt.id:
3892
+ case qt.id:
3893
+ // fallthrough
3894
+ case Ct.id:
3895
3895
  // fallthrough
3896
- case qt.id: {
3896
+ case Kt.id: {
3897
3897
  const S = a.getDefaultStyle(), v = sa(
3898
3898
  h,
3899
3899
  A,
@@ -3905,19 +3905,19 @@ const Qr = "doc.command.set-inline-format-bold", zt = {
3905
3905
  );
3906
3906
  break;
3907
3907
  }
3908
- case Pt.id:
3909
- case wt.id: {
3908
+ case wt.id:
3909
+ case Nt.id: {
3910
3910
  g = t;
3911
3911
  break;
3912
3912
  }
3913
- case Nt.id:
3914
- case Qt.id: {
3913
+ case Qt.id:
3914
+ case Ut.id: {
3915
3915
  g = {
3916
3916
  rgb: t
3917
3917
  };
3918
3918
  break;
3919
3919
  }
3920
- case mn.id: {
3920
+ case En.id: {
3921
3921
  g = {
3922
3922
  rgb: null
3923
3923
  };
@@ -3990,7 +3990,7 @@ function oa(n, e, t) {
3990
3990
  s: U.TRUE
3991
3991
  };
3992
3992
  if (/va/.test(e))
3993
- return t === vt.id ? (n == null ? void 0 : n[e]) === Ne.SUBSCRIPT ? Ne.NORMAL : Ne.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ne.SUPERSCRIPT ? Ne.NORMAL : Ne.SUPERSCRIPT;
3993
+ return t === Ct.id ? (n == null ? void 0 : n[e]) === Ne.SUBSCRIPT ? Ne.NORMAL : Ne.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ne.SUPERSCRIPT ? Ne.NORMAL : Ne.SUPERSCRIPT;
3994
3994
  }
3995
3995
  function sa(n, e, t) {
3996
3996
  var A, l, d, h, u, g, f, p, m, E, I, C, R, S;
@@ -4053,7 +4053,7 @@ function Il(n, e) {
4053
4053
  const t = es[e];
4054
4054
  return oa(n, t, e);
4055
4055
  }
4056
- const En = {
4056
+ const Sn = {
4057
4057
  id: "doc.command.list-operation",
4058
4058
  type: w.COMMAND,
4059
4059
  handler: (n, e) => {
@@ -4064,7 +4064,7 @@ const En = {
4064
4064
  const c = a[0].segmentId, A = (I = i.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : I.paragraphs;
4065
4065
  if (A == null)
4066
4066
  return !1;
4067
- const l = Sn(a, A), d = i.getUnitId(), h = {
4067
+ const l = In(a, A), d = i.getUnitId(), h = {
4068
4068
  id: J.id,
4069
4069
  params: {
4070
4070
  unitId: d,
@@ -4074,7 +4074,7 @@ const En = {
4074
4074
  }
4075
4075
  };
4076
4076
  new It().reset();
4077
- const g = Ce.paragraph.bullet.switch({
4077
+ const g = ve.paragraph.bullet.switch({
4078
4078
  paragraphs: l,
4079
4079
  listType: r,
4080
4080
  document: i,
@@ -4093,7 +4093,7 @@ const En = {
4093
4093
  const { segmentId: c } = a[0], A = (E = t.getDocRanges()) != null ? E : [], l = (I = i.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : I.paragraphs;
4094
4094
  if (l == null)
4095
4095
  return !1;
4096
- const d = Sn(A, l), h = i.getUnitId(), u = Ce.paragraph.bullet.set({
4096
+ const d = In(A, l), h = i.getUnitId(), u = ve.paragraph.bullet.set({
4097
4097
  paragraphs: d,
4098
4098
  listType: r,
4099
4099
  segmentId: c,
@@ -4113,7 +4113,7 @@ const En = {
4113
4113
  return f.params.actions = g.editOp(u.serialize(), p), !!s.syncExecuteCommand(f.id, f.params);
4114
4114
  }
4115
4115
  };
4116
- var wn = /* @__PURE__ */ ((n) => (n[n.increase = 1] = "increase", n[n.decrease = -1] = "decrease", n))(wn || {});
4116
+ var Nn = /* @__PURE__ */ ((n) => (n[n.increase = 1] = "increase", n[n.decrease = -1] = "decrease", n))(Nn || {});
4117
4117
  const ts = {
4118
4118
  id: "doc.command.change-list-nesting-level",
4119
4119
  type: w.COMMAND,
@@ -4127,7 +4127,7 @@ const ts = {
4127
4127
  const { segmentId: c } = a, A = (E = o.getDocRanges()) != null ? E : [], l = (I = i.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : I.paragraphs;
4128
4128
  if (l == null)
4129
4129
  return !1;
4130
- const d = Qs(a, l), h = i.getUnitId(), u = k.getInstance(), g = Ce.paragraph.bullet.changeNestLevel({
4130
+ const d = Qs(a, l), h = i.getUnitId(), u = k.getInstance(), g = ve.paragraph.bullet.changeNestLevel({
4131
4131
  paragraphs: d,
4132
4132
  type: t,
4133
4133
  segmentId: c,
@@ -4150,7 +4150,7 @@ const ts = {
4150
4150
  const t = n.get(T);
4151
4151
  return e != null && e.value ? t.syncExecuteCommand(lo.id, {
4152
4152
  listType: e.value
4153
- }) : t.syncExecuteCommand(En.id, {
4153
+ }) : t.syncExecuteCommand(Sn.id, {
4154
4154
  listType: ye.BULLET_LIST
4155
4155
  });
4156
4156
  }
@@ -4161,7 +4161,7 @@ const ts = {
4161
4161
  const t = n.get(T);
4162
4162
  return e != null && e.value ? t.syncExecuteCommand(lo.id, {
4163
4163
  listType: e.value
4164
- }) : t.syncExecuteCommand(En.id, {
4164
+ }) : t.syncExecuteCommand(Sn.id, {
4165
4165
  listType: ye.CHECK_LIST
4166
4166
  });
4167
4167
  }
@@ -4184,7 +4184,7 @@ const ts = {
4184
4184
  segmentId: r,
4185
4185
  isEditing: !1
4186
4186
  }
4187
- }, d = Ce.paragraph.bullet.toggleChecklist({
4187
+ }, d = ve.paragraph.bullet.toggleChecklist({
4188
4188
  document: a,
4189
4189
  paragraphIndex: s,
4190
4190
  segmentId: r
@@ -4201,7 +4201,7 @@ const ts = {
4201
4201
  const t = n.get(T);
4202
4202
  return e != null && e.value ? t.syncExecuteCommand(lo.id, {
4203
4203
  listType: e.value
4204
- }) : t.syncExecuteCommand(En.id, {
4204
+ }) : t.syncExecuteCommand(Sn.id, {
4205
4205
  listType: ye.ORDER_LIST
4206
4206
  });
4207
4207
  }
@@ -4210,15 +4210,15 @@ const ts = {
4210
4210
  type: w.COMMAND,
4211
4211
  // eslint-disable-next-line max-lines-per-function
4212
4212
  handler(n, e) {
4213
- var q, se, Ae, ne, Z;
4213
+ var q, se, ce, ne, Z;
4214
4214
  if (!e)
4215
4215
  return !1;
4216
4216
  const t = n.get(G), o = n.get(N), s = n.get(T), r = o.getCurrentUnitForType(_.UNIVER_DOC), i = t.getActiveTextRange();
4217
4217
  if (r == null || i == null)
4218
4218
  return !1;
4219
- const { segmentId: a } = i, { listType: c, paragraph: A } = e, { paragraphStart: l, paragraphEnd: d } = A, h = new Ie(), u = k.getInstance(), { defaultTabStop: g = 36 } = r.getSnapshot().documentStyle, f = (se = (q = r.getSelfOrHeaderFooterModel(a).getBody()) == null ? void 0 : q.sectionBreaks) != null ? se : [], { startIndex: p, paragraphStyle: m = {} } = A, { indentFirstLine: E, snapToGrid: I, indentStart: C } = m, R = Ua[c].nestingLevel[0].paragraphProperties || {}, { hanging: S, indentStart: v } = R, b = R.textStyle, { charSpace: y, gridType: D } = vl(p, f) || { charSpace: 0, gridType: La.LINES }, x = sc(y, g, D, I);
4219
+ const { segmentId: a } = i, { listType: c, paragraph: A } = e, { paragraphStart: l, paragraphEnd: d } = A, h = new Ie(), u = k.getInstance(), { defaultTabStop: g = 36 } = r.getSnapshot().documentStyle, f = (se = (q = r.getSelfOrHeaderFooterModel(a).getBody()) == null ? void 0 : q.sectionBreaks) != null ? se : [], { startIndex: p, paragraphStyle: m = {} } = A, { indentFirstLine: E, snapToGrid: I, indentStart: C } = m, R = Ua[c].nestingLevel[0].paragraphProperties || {}, { hanging: S, indentStart: v } = R, b = R.textStyle, { charSpace: y, gridType: D } = Cl(p, f) || { charSpace: 0, gridType: La.LINES }, x = sc(y, g, D, I);
4220
4220
  let B = X.generateRandomId(6);
4221
- const L = (ne = (Ae = r.getBody()) == null ? void 0 : Ae.paragraphs) != null ? ne : [], F = L.findIndex((le) => le.startIndex === A.startIndex), P = L[F - 1], oe = L[F + 1];
4221
+ const L = (ne = (ce = r.getBody()) == null ? void 0 : ce.paragraphs) != null ? ne : [], F = L.findIndex((le) => le.startIndex === A.startIndex), P = L[F - 1], oe = L[F + 1];
4222
4222
  P && P.bullet && P.bullet.listType.indexOf(c) === 0 ? B = P.bullet.listId : oe && oe.bullet && oe.bullet.listType.indexOf(c) === 0 && (B = oe.bullet.listId);
4223
4223
  const re = {
4224
4224
  id: J.id,
@@ -4284,7 +4284,7 @@ function Qs(n, e) {
4284
4284
  }
4285
4285
  return s;
4286
4286
  }
4287
- function Sn(n, e) {
4287
+ function In(n, e) {
4288
4288
  const t = [];
4289
4289
  for (const o of n) {
4290
4290
  const s = Qs(o, e);
@@ -4292,7 +4292,7 @@ function Sn(n, e) {
4292
4292
  }
4293
4293
  return t;
4294
4294
  }
4295
- function vl(n, e) {
4295
+ function Cl(n, e) {
4296
4296
  const t = e.sort(Fa("startIndex"));
4297
4297
  for (let o = 0; o < t.length; o++) {
4298
4298
  const s = e[o];
@@ -4315,7 +4315,7 @@ const tt = {
4315
4315
  const c = a[0].segmentId, A = (I = i.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : I.paragraphs;
4316
4316
  if (A == null)
4317
4317
  return !1;
4318
- const l = Sn(a, A), d = i.getUnitId(), h = l.every((C) => {
4318
+ const l = In(a, A), d = i.getUnitId(), h = l.every((C) => {
4319
4319
  var R;
4320
4320
  return ((R = C.paragraphStyle) == null ? void 0 : R.horizontalAlign) === r;
4321
4321
  }), u = {
@@ -4381,28 +4381,28 @@ const tt = {
4381
4381
  handler: (n) => n.get(T).syncExecuteCommand(tt.id, {
4382
4382
  alignType: De.JUSTIFIED
4383
4383
  })
4384
- }, Cl = {
4385
- id: zt.id,
4384
+ }, vl = {
4385
+ id: jt.id,
4386
4386
  binding: W.B | K.CTRL_COMMAND,
4387
4387
  preconditions: he
4388
4388
  }, Rl = {
4389
- id: jt.id,
4389
+ id: Gt.id,
4390
4390
  binding: W.I | K.CTRL_COMMAND,
4391
4391
  preconditions: he
4392
4392
  }, bl = {
4393
- id: Gt.id,
4393
+ id: Yt.id,
4394
4394
  binding: W.U | K.CTRL_COMMAND,
4395
4395
  preconditions: he
4396
4396
  }, xl = {
4397
- id: Yt.id,
4397
+ id: qt.id,
4398
4398
  binding: W.X | K.SHIFT | K.CTRL_COMMAND,
4399
4399
  preconditions: he
4400
4400
  }, Ol = {
4401
- id: vt.id,
4401
+ id: Ct.id,
4402
4402
  binding: W.COMMA | K.CTRL_COMMAND,
4403
4403
  preconditions: he
4404
4404
  }, yl = {
4405
- id: qt.id,
4405
+ id: Kt.id,
4406
4406
  binding: W.PERIOD | K.CTRL_COMMAND,
4407
4407
  preconditions: he
4408
4408
  }, Tl = {
@@ -4451,7 +4451,7 @@ const tt = {
4451
4451
  }
4452
4452
  }, Ul = [50, 80, 100, 130, 150, 170, 200, 400], Ll = [10, 400];
4453
4453
  function Fl() {
4454
- const n = ee(T), e = ee(N), t = Fe(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), []), o = sn(t), s = Pi(() => {
4454
+ const n = $(T), e = $(N), t = Fe(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), []), o = Mt(t), s = Pi(() => {
4455
4455
  var A, l;
4456
4456
  if (!o) return 100;
4457
4457
  const c = ((l = (A = o.getSettings()) == null ? void 0 : A.zoomRatio) != null ? l : 1) * 100;
@@ -4487,10 +4487,13 @@ function Hl(n) {
4487
4487
  }
4488
4488
  const kl = "univer-doc-footer-container", Vl = {
4489
4489
  docFooterContainer: kl
4490
- }, Wl = () => /* @__PURE__ */ de("div", { className: Vl.docFooterContainer, children: [
4491
- /* @__PURE__ */ V("div", {}),
4492
- /* @__PURE__ */ V(Hl, {})
4493
- ] }), Us = "docs-ui.config", Yr = {
4490
+ }, Wl = () => {
4491
+ const n = $(N);
4492
+ return Mt(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []) ? null : /* @__PURE__ */ de("div", { className: Vl.docFooterContainer, children: [
4493
+ /* @__PURE__ */ V("div", {}),
4494
+ /* @__PURE__ */ V(Hl, {})
4495
+ ] });
4496
+ }, Us = "docs-ui.config", Yr = {
4494
4497
  layout: {
4495
4498
  docContainerConfig: Zc,
4496
4499
  toolbarConfig: Jc
@@ -4609,7 +4612,7 @@ function ia(n, e, t) {
4609
4612
  }
4610
4613
  };
4611
4614
  }
4612
- function In(n, e) {
4615
+ function Cn(n, e) {
4613
4616
  if (!n && !e)
4614
4617
  return null;
4615
4618
  if (e && e.length > 0) {
@@ -4967,7 +4970,7 @@ function $l(n) {
4967
4970
  return t ? (t == null ? void 0 : t.path.indexOf("cells")) > -1 : !1;
4968
4971
  });
4969
4972
  }
4970
- const ed = rn, Aa = {
4973
+ const ed = an, Aa = {
4971
4974
  id: "doc.command.inner-paste",
4972
4975
  type: w.COMMAND,
4973
4976
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -5014,12 +5017,12 @@ const ed = rn, Aa = {
5014
5017
  C.push(ot), C.push(ze);
5015
5018
  }
5016
5019
  }
5017
- const se = Os((B = g.customRanges) != null ? B : [], re, ed.includes(f)), Ae = ys((L = g.customDecorations) != null ? L : [], re);
5020
+ const se = Os((B = g.customRanges) != null ? B : [], re, ed.includes(f)), ce = ys((L = g.customDecorations) != null ? L : [], re);
5018
5021
  if (se && (q.customRanges = [{
5019
5022
  ...se,
5020
5023
  startIndex: 0,
5021
5024
  endIndex: l.dataStream.length - 1
5022
- }]), Ae.length && (q.customDecorations = Ae.map((ne) => ({
5025
+ }]), ce.length && (q.customDecorations = ce.map((ne) => ({
5023
5026
  ...ne,
5024
5027
  startIndex: 0,
5025
5028
  endIndex: l.dataStream.length - 1
@@ -5033,7 +5036,7 @@ const ed = rn, Aa = {
5033
5036
  len: l.dataStream.length
5034
5037
  });
5035
5038
  else {
5036
- const ne = Ce.selection.delete([P], l, m.cursor, q, c.length === 1);
5039
+ const ne = ve.selection.delete([P], l, m.cursor, q, c.length === 1);
5037
5040
  E.push(...ne);
5038
5041
  }
5039
5042
  m.reset(), m.moveCursor(re);
@@ -5062,7 +5065,7 @@ function nd(n, e, t) {
5062
5065
  C ? s.push({
5063
5066
  t: z.RETAIN,
5064
5067
  len: R
5065
- }) : s.push(...Ce.selection.delete([m], o, c.cursor, null, !1)), c.reset(), c.moveCursor(I);
5068
+ }) : s.push(...ve.selection.delete([m], o, c.cursor, null, !1)), c.reset(), c.moveCursor(I);
5066
5069
  }
5067
5070
  const A = ue(e, t);
5068
5071
  i.push(r.editOp(s.serialize(), A));
@@ -5148,7 +5151,7 @@ function sd(n, e, t, o, s) {
5148
5151
  }
5149
5152
  return r;
5150
5153
  }
5151
- const Ut = {
5154
+ const Lt = {
5152
5155
  id: "doc.command.inner-cut",
5153
5156
  type: w.COMMAND,
5154
5157
  handler: async (n, e) => {
@@ -5214,7 +5217,7 @@ const rd = "doc.command.insert-text", Vs = {
5214
5217
  len: r.dataStream.length
5215
5218
  });
5216
5219
  else {
5217
- const v = Ce.selection.delete([o], h, 0, r);
5220
+ const v = ve.selection.delete([o], h, 0, r);
5218
5221
  E.push(...v);
5219
5222
  }
5220
5223
  m.params.textRanges = [{
@@ -5225,7 +5228,7 @@ const rd = "doc.command.insert-text", Vs = {
5225
5228
  const C = ue(l, s);
5226
5229
  return m.params.actions = I.editOp(E.serialize(), C), !!t.syncExecuteCommand(m.id, m.params);
5227
5230
  }
5228
- }, hn = {
5231
+ }, gn = {
5229
5232
  id: "doc.command.delete-text",
5230
5233
  type: w.COMMAND,
5231
5234
  handler: async (n, e) => {
@@ -5430,7 +5433,7 @@ const So = {
5430
5433
  endOffset: x
5431
5434
  }
5432
5435
  ];
5433
- return o.executeCommand(Ut.id, {
5436
+ return o.executeCommand(Lt.id, {
5434
5437
  segmentId: M,
5435
5438
  textRanges: B
5436
5439
  });
@@ -5512,7 +5515,7 @@ const So = {
5512
5515
  style: u
5513
5516
  }
5514
5517
  ];
5515
- s = await o.executeCommand(hn.id, {
5518
+ s = await o.executeCommand(gn.id, {
5516
5519
  unitId: r.getUnitId(),
5517
5520
  range: {
5518
5521
  ...c,
@@ -5526,7 +5529,7 @@ const So = {
5526
5529
  });
5527
5530
  }
5528
5531
  } else
5529
- S -= v.count, s = await o.executeCommand(hn.id, {
5532
+ S -= v.count, s = await o.executeCommand(gn.id, {
5530
5533
  unitId: r.getUnitId(),
5531
5534
  range: p,
5532
5535
  segmentId: h,
@@ -5535,7 +5538,7 @@ const So = {
5535
5538
  });
5536
5539
  } else {
5537
5540
  const x = ua(p, [p]);
5538
- s = await o.executeCommand(Ut.id, {
5541
+ s = await o.executeCommand(Lt.id, {
5539
5542
  segmentId: h,
5540
5543
  textRanges: x,
5541
5544
  selections: [p]
@@ -5560,7 +5563,7 @@ const So = {
5560
5563
  endOffset: R
5561
5564
  }
5562
5565
  ];
5563
- return r.executeCommand(Ut.id, {
5566
+ return r.executeCommand(Lt.id, {
5564
5567
  segmentId: S,
5565
5568
  textRanges: v
5566
5569
  });
@@ -5605,7 +5608,7 @@ const So = {
5605
5608
  style: d
5606
5609
  }
5607
5610
  ];
5608
- E = await r.executeCommand(hn.id, {
5611
+ E = await r.executeCommand(gn.id, {
5609
5612
  unitId: o.getUnitId(),
5610
5613
  range: {
5611
5614
  ...i,
@@ -5626,7 +5629,7 @@ const So = {
5626
5629
  style: d
5627
5630
  }
5628
5631
  ];
5629
- E = await r.executeCommand(hn.id, {
5632
+ E = await r.executeCommand(gn.id, {
5630
5633
  unitId: o.getUnitId(),
5631
5634
  range: g,
5632
5635
  segmentId: l,
@@ -5637,7 +5640,7 @@ const So = {
5637
5640
  }
5638
5641
  } else {
5639
5642
  const R = ua(g, [g]);
5640
- E = await r.executeCommand(Ut.id, {
5643
+ E = await r.executeCommand(Lt.id, {
5641
5644
  segmentId: l,
5642
5645
  textRanges: R,
5643
5646
  selections: [g]
@@ -5840,7 +5843,7 @@ const Xr = 660, Jn = class Jn {
5840
5843
  }
5841
5844
  },
5842
5845
  layoutType: oo.INLINE,
5843
- drawingType: vs.DRAWING_IMAGE,
5846
+ drawingType: Cs.DRAWING_IMAGE,
5844
5847
  unitId: o.id || "",
5845
5848
  subUnitId: o.id || ""
5846
5849
  };
@@ -5933,7 +5936,7 @@ ${Q.TABLE_CELL_END}`;
5933
5936
  }
5934
5937
  };
5935
5938
  O(Jn, "_pluginList", []);
5936
- let Lt = Jn;
5939
+ let Ft = Jn;
5937
5940
  const ud = {
5938
5941
  name: "univer-doc-paste-plugin-lark",
5939
5942
  checkPasteType(n) {
@@ -6099,7 +6102,7 @@ function pd(n, e, t) {
6099
6102
  const C = s[I.blockId];
6100
6103
  if (C)
6101
6104
  switch (C.drawingType) {
6102
- case vs.DRAWING_IMAGE: {
6105
+ case Cs.DRAWING_IMAGE: {
6103
6106
  f += fd(C), p++;
6104
6107
  break;
6105
6108
  }
@@ -6146,12 +6149,12 @@ function md(n) {
6146
6149
  function Tt(n, e, t) {
6147
6150
  var o, s;
6148
6151
  switch (n.nodeType) {
6149
- case Kt.SECTION_BREAK: {
6152
+ case Xt.SECTION_BREAK: {
6150
6153
  for (const r of n.children)
6151
6154
  Tt(r, e, t);
6152
6155
  break;
6153
6156
  }
6154
- case Kt.PARAGRAPH: {
6157
+ case Xt.PARAGRAPH: {
6155
6158
  const { children: r, startIndex: i, endIndex: a } = n, c = (s = (o = e.body) == null ? void 0 : o.paragraphs.find((g) => g.startIndex === a)) != null ? s : {}, { paragraphStyle: A = {} } = c, { spaceAbove: l, spaceBelow: d, lineSpacing: h } = A, u = [];
6156
6159
  if (l != null && (typeof l == "number" ? u.push(`margin-top: ${l}px`) : u.push(`margin-top: ${l.v}px`)), d != null && (typeof d == "number" ? u.push(`margin-bottom: ${d}px`) : u.push(`margin-bottom: ${d.v}px`)), h != null && u.push(`line-height: ${h}`), t.html += `<p class="UniverNormal" ${u.length ? `style="${u.join("; ")};"` : ""}>`, r.length)
6157
6160
  for (const g of r)
@@ -6159,7 +6162,7 @@ function Tt(n, e, t) {
6159
6162
  t.html += `${pd(e, i, a)}</p>`;
6160
6163
  break;
6161
6164
  }
6162
- case Kt.TABLE: {
6165
+ case Xt.TABLE: {
6163
6166
  const { children: r } = n;
6164
6167
  t.html += '<table class="UniverTable" style="width: 100%; border-collapse: collapse;"><tbody>';
6165
6168
  for (const i of r)
@@ -6167,7 +6170,7 @@ function Tt(n, e, t) {
6167
6170
  t.html += "</tbody></table>";
6168
6171
  break;
6169
6172
  }
6170
- case Kt.TABLE_ROW: {
6173
+ case Xt.TABLE_ROW: {
6171
6174
  const { children: r } = n;
6172
6175
  t.html += '<tr class="UniverTableRow">';
6173
6176
  for (const i of r)
@@ -6175,7 +6178,7 @@ function Tt(n, e, t) {
6175
6178
  t.html += "</tr>";
6176
6179
  break;
6177
6180
  }
6178
- case Kt.TABLE_CELL: {
6181
+ case Xt.TABLE_CELL: {
6179
6182
  const { children: r } = n;
6180
6183
  t.html += '<td class="UniverTableCell">';
6181
6184
  for (const i of r)
@@ -6201,10 +6204,10 @@ var Sd = Object.getOwnPropertyDescriptor, Id = (n, e, t, o) => {
6201
6204
  for (var s = o > 1 ? void 0 : o ? Sd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
6202
6205
  (i = n[r]) && (s = i(s) || s);
6203
6206
  return s;
6204
- }, Jt = (n, e) => (t, o) => e(t, o, n);
6205
- Lt.use(gd);
6206
- Lt.use(ud);
6207
- Lt.use(hd);
6207
+ }, Zt = (n, e) => (t, o) => e(t, o, n);
6208
+ Ft.use(gd);
6209
+ Ft.use(ud);
6210
+ Ft.use(hd);
6208
6211
  function Zr(n, e, t) {
6209
6212
  var r, i, a;
6210
6213
  const o = mi(n, e, t + 2), s = Q.TABLE_START + Q.TABLE_ROW_START + Q.TABLE_CELL_START + o.dataStream + Q.TABLE_CELL_END + Q.TABLE_ROW_END + Q.TABLE_END;
@@ -6224,7 +6227,7 @@ let os = class extends ge {
6224
6227
  constructor(e, t, o, s, r) {
6225
6228
  super();
6226
6229
  O(this, "_clipboardHooks", []);
6227
- O(this, "_htmlToUDM", new Lt());
6230
+ O(this, "_htmlToUDM", new Ft());
6228
6231
  O(this, "_umdToHtml", new Ed());
6229
6232
  this._univerInstanceService = e, this._logService = t, this._commandService = o, this._clipboardInterfaceService = s, this._docSelectionManagerService = r;
6230
6233
  }
@@ -6253,9 +6256,9 @@ let os = class extends ge {
6253
6256
  const r = this._univerInstanceService.getCurrentUnitForType(_.UNIVER_DOC), i = (r == null ? void 0 : r.getUnitId()) || "";
6254
6257
  !t && !o && s.length && (t = await this._createImagePasteHtml(s));
6255
6258
  const a = this._genDocDataFromHtmlAndText(t, o, i);
6256
- if (i === Cs)
6259
+ if (i === vs)
6257
6260
  if (o) {
6258
- const c = Ce.transform.fromPlainText(o);
6261
+ const c = ve.transform.fromPlainText(o);
6259
6262
  return this._paste({ body: c });
6260
6263
  } else
6261
6264
  a.body.textRuns = [];
@@ -6289,7 +6292,7 @@ let os = class extends ge {
6289
6292
  style: o
6290
6293
  }
6291
6294
  ];
6292
- return this._commandService.executeCommand(Ut.id, { segmentId: e, textRanges: l });
6295
+ return this._commandService.executeCommand(Lt.id, { segmentId: e, textRanges: l });
6293
6296
  } catch {
6294
6297
  return this._logService.error("[DocClipboardController] cut content failed"), !1;
6295
6298
  }
@@ -6304,7 +6307,7 @@ let os = class extends ge {
6304
6307
  return !1;
6305
6308
  this._clipboardHooks.forEach((h) => {
6306
6309
  h.onBeforePaste && (o = h.onBeforePaste(o));
6307
- }), o.customRanges = (d = o.customRanges) == null ? void 0 : d.map(Ce.customRange.copyCustomRange);
6310
+ }), o.customRanges = (d = o.customRanges) == null ? void 0 : d.map(ve.customRange.copyCustomRange);
6308
6311
  const r = this._docSelectionManagerService.getActiveTextRange(), { segmentId: i, endOffset: a, style: c } = r || {}, A = this._docSelectionManagerService.getTextRanges();
6309
6312
  if (i == null && this._logService.error("[DocClipboardController] segmentId does not exist!"), a == null || A == null)
6310
6313
  return !1;
@@ -6412,8 +6415,8 @@ let os = class extends ge {
6412
6415
  t = await r.getType(i).then((a) => a && a.text());
6413
6416
  break;
6414
6417
  }
6415
- case Cc:
6416
6418
  case vc:
6419
+ case Cc:
6417
6420
  case Ic:
6418
6421
  case Sc: {
6419
6422
  const a = await r.getType(i), c = new File([a], `pasted_image.${i.split("/")[1]}`, { type: i });
@@ -6429,7 +6432,7 @@ let os = class extends ge {
6429
6432
  _genDocDataFromHtmlAndText(e, t, o) {
6430
6433
  if (!e) {
6431
6434
  if (t)
6432
- return { body: Ce.transform.fromPlainText(t) };
6435
+ return { body: ve.transform.fromPlainText(t) };
6433
6436
  throw new Error("[DocClipboardService] html and text cannot be both empty!");
6434
6437
  }
6435
6438
  const s = Ad(e);
@@ -6489,7 +6492,7 @@ let os = class extends ge {
6489
6492
  source: d.source,
6490
6493
  description: "",
6491
6494
  layoutType: oo.INLINE,
6492
- drawingType: vs.DRAWING_IMAGE,
6495
+ drawingType: Cs.DRAWING_IMAGE,
6493
6496
  transform: {
6494
6497
  width: h,
6495
6498
  height: u,
@@ -6506,14 +6509,14 @@ let os = class extends ge {
6506
6509
  }
6507
6510
  };
6508
6511
  os = Id([
6509
- Jt(0, N),
6510
- Jt(1, ps),
6511
- Jt(2, T),
6512
- Jt(3, Bi),
6513
- Jt(4, j(G))
6512
+ Zt(0, N),
6513
+ Zt(1, ps),
6514
+ Zt(2, T),
6515
+ Zt(3, Bi),
6516
+ Zt(4, j(G))
6514
6517
  ], os);
6515
6518
  function Io(n) {
6516
- return n.getContextValue(fn) || n.getContextValue(Qn);
6519
+ return n.getContextValue(pn) || n.getContextValue(Qn);
6517
6520
  }
6518
6521
  const Ys = 999, Fn = {
6519
6522
  id: Rc.id,
@@ -6542,16 +6545,16 @@ const Ys = 999, Fn = {
6542
6545
  const e = n.get(vn), o = await n.get(Bi).read();
6543
6546
  return o.length === 0 ? !1 : e.paste(o);
6544
6547
  }
6545
- }, vo = {
6548
+ }, Co = {
6546
6549
  id: "doc.command.switch-mode",
6547
6550
  type: w.COMMAND,
6548
6551
  // eslint-disable-next-line max-lines-per-function, complexity
6549
6552
  handler: async (n) => {
6550
6553
  var E, I, C, R, S;
6551
- const e = n.get(T), t = n.get(pe), o = n.get(G), r = n.get(N).getCurrentUniverDocInstance();
6554
+ const e = n.get(T), t = n.get(fe), o = n.get(G), r = n.get(N).getCurrentUniverDocInstance();
6552
6555
  if (r == null)
6553
6556
  return !1;
6554
- const i = r.getUnitId(), a = (E = t.getRenderById(i)) == null ? void 0 : E.with(ce).getSkeleton(), c = (I = t.getRenderById(i)) == null ? void 0 : I.with(Se);
6557
+ const i = r.getUnitId(), a = (E = t.getRenderById(i)) == null ? void 0 : E.with(Ae).getSkeleton(), c = (I = t.getRenderById(i)) == null ? void 0 : I.with(Se);
6555
6558
  if (a == null || c == null)
6556
6559
  return !1;
6557
6560
  const A = c == null ? void 0 : c.getSegment(), l = c == null ? void 0 : c.getSegmentPage(), d = r.getSnapshot().documentStyle.documentFlavor, h = o.getDocRanges(), u = {
@@ -6579,12 +6582,12 @@ const Ys = 999, Fn = {
6579
6582
  const { startIndex: oe } = B, re = a.findNodeByCharIndex(oe, A, l), Y = (R = re == null ? void 0 : re.parent) == null ? void 0 : R.parent, H = Y == null ? void 0 : Y.parent, q = H == null ? void 0 : H.lines.find((le) => le.paragraphIndex === (Y == null ? void 0 : Y.paragraphIndex) && le.paragraphStart), se = (S = H == null ? void 0 : H.parent) == null ? void 0 : S.parent;
6580
6583
  if (re == null || Y == null || q == null || H == null || se == null)
6581
6584
  continue;
6582
- let Ae = 0;
6583
- F === rt.LINE ? Ae -= Y.top : F === rt.PAGE && (Ae += se.marginTop), Ae += q.top;
6585
+ let ce = 0;
6586
+ F === rt.LINE ? ce -= Y.top : F === rt.PAGE && (ce += se.marginTop), ce += q.top;
6584
6587
  const ne = {
6585
6588
  ...L,
6586
6589
  relativeFrom: rt.PARAGRAPH,
6587
- posOffset: (P != null ? P : 0) - Ae
6590
+ posOffset: (P != null ? P : 0) - ce
6588
6591
  }, Z = g.replaceOp(["drawings", x, "docTransform", "positionV"], L, ne);
6589
6592
  Z && f.push(Z);
6590
6593
  }
@@ -6596,7 +6599,7 @@ const Ys = 999, Fn = {
6596
6599
  type: w.COMMAND,
6597
6600
  // eslint-disable-next-line max-lines-per-function
6598
6601
  handler: async (n) => {
6599
- const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = In(r, s);
6602
+ const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = Cn(r, s);
6600
6603
  if (i == null)
6601
6604
  return !1;
6602
6605
  const { segmentId: a } = i, c = t.getCurrentUniverDocInstance(), A = c == null ? void 0 : c.getSelfOrHeaderFooterModel(a).getBody();
@@ -6610,7 +6613,7 @@ const Ys = 999, Fn = {
6610
6613
  return !1;
6611
6614
  const { offset: p, rowIndexes: m, len: E, tableId: I, cursor: C, selectWholeTable: R } = f;
6612
6615
  if (R)
6613
- return o.executeCommand(Cn.id);
6616
+ return o.executeCommand(Rn.id);
6614
6617
  const S = [], v = [{
6615
6618
  startOffset: C,
6616
6619
  endOffset: C,
@@ -6643,7 +6646,7 @@ const Ys = 999, Fn = {
6643
6646
  type: w.COMMAND,
6644
6647
  // eslint-disable-next-line max-lines-per-function
6645
6648
  handler: async (n) => {
6646
- const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = In(r, s);
6649
+ const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = Cn(r, s);
6647
6650
  if (i == null)
6648
6651
  return !1;
6649
6652
  const { segmentId: a } = i, c = t.getCurrentUniverDocInstance(), A = c == null ? void 0 : c.getSelfOrHeaderFooterModel(a).getBody();
@@ -6657,7 +6660,7 @@ const Ys = 999, Fn = {
6657
6660
  return !1;
6658
6661
  const { offsets: p, columnIndexes: m, tableId: E, cursor: I, rowCount: C, selectWholeTable: R } = f;
6659
6662
  if (R)
6660
- return o.executeCommand(Cn.id);
6663
+ return o.executeCommand(Rn.id);
6661
6664
  const S = [], v = [{
6662
6665
  startOffset: I,
6663
6666
  endOffset: I,
@@ -6693,12 +6696,12 @@ const Ys = 999, Fn = {
6693
6696
  }
6694
6697
  return b.params.actions = S.reduce((x, M) => k.compose(x, M), null), !!o.syncExecuteCommand(b.id, b.params);
6695
6698
  }
6696
- }, Cn = {
6699
+ }, Rn = {
6697
6700
  id: "doc.table.delete-table",
6698
6701
  type: w.COMMAND,
6699
6702
  // eslint-disable-next-line max-lines-per-function
6700
6703
  handler: async (n) => {
6701
- const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = In(r, s);
6704
+ const e = n.get(G), t = n.get(N), o = n.get(T), s = e.getRectRanges(), r = e.getActiveTextRange(), i = Cn(r, s);
6702
6705
  if (i == null)
6703
6706
  return !1;
6704
6707
  const { segmentId: a } = i, c = t.getCurrentUniverDocInstance(), A = c == null ? void 0 : c.getSelfOrHeaderFooterModel(a).getBody();
@@ -6734,12 +6737,12 @@ const Ys = 999, Fn = {
6734
6737
  const b = g.removeOp(["tableSource", E]);
6735
6738
  return C.push(b), S.params.actions = C.reduce((D, x) => k.compose(D, x), null), !!o.syncExecuteCommand(S.id, S.params);
6736
6739
  }
6737
- }, Zs = "doc.command.table-insert-row", $s = "doc.command.table-insert-column", vd = "doc.command.table-insert-row-above", Cd = "doc.command.table-insert-row-bellow", Rd = "doc.command.table-insert-column-left", bd = "doc.command.table-insert-column-right", er = {
6738
- id: vd,
6740
+ }, Zs = "doc.command.table-insert-row", $s = "doc.command.table-insert-column", Cd = "doc.command.table-insert-row-above", vd = "doc.command.table-insert-row-bellow", Rd = "doc.command.table-insert-column-left", bd = "doc.command.table-insert-column-right", er = {
6741
+ id: Cd,
6739
6742
  type: w.COMMAND,
6740
6743
  handler: async (n) => n.get(T).executeCommand(Zs, { position: Eo.ABOVE })
6741
6744
  }, tr = {
6742
- id: Cd,
6745
+ id: vd,
6743
6746
  type: w.COMMAND,
6744
6747
  handler: async (n) => n.get(T).executeCommand(Zs, { position: Eo.BELLOW })
6745
6748
  }, nr = {
@@ -6755,7 +6758,7 @@ const Ys = 999, Fn = {
6755
6758
  type: w.COMMAND,
6756
6759
  // eslint-disable-next-line max-lines-per-function
6757
6760
  handler: async (n, e) => {
6758
- const { position: t } = e, o = n.get(G), s = n.get(N), r = n.get(T), i = o.getRectRanges(), a = o.getActiveTextRange(), c = In(a, i);
6761
+ const { position: t } = e, o = n.get(G), s = n.get(N), r = n.get(T), i = o.getRectRanges(), a = o.getActiveTextRange(), c = Cn(a, i);
6759
6762
  if (c == null)
6760
6763
  return !1;
6761
6764
  const { segmentId: A } = c, l = s.getCurrentUnitForType(_.UNIVER_DOC), d = l == null ? void 0 : l.getSelfOrHeaderFooterModel(A).getBody();
@@ -6799,8 +6802,8 @@ const Ys = 999, Fn = {
6799
6802
  type: w.COMMAND,
6800
6803
  // eslint-disable-next-line max-lines-per-function
6801
6804
  handler: async (n, e) => {
6802
- var se, Ae, ne;
6803
- const { position: t } = e, o = n.get(G), s = n.get(N), r = n.get(T), i = o.getRectRanges(), a = o.getActiveTextRange(), c = In(a, i);
6805
+ var se, ce, ne;
6806
+ const { position: t } = e, o = n.get(G), s = n.get(N), r = n.get(T), i = o.getRectRanges(), a = o.getActiveTextRange(), c = Cn(a, i);
6804
6807
  if (c == null)
6805
6808
  return !1;
6806
6809
  const { segmentId: A } = c, l = s.getCurrentUniverDocInstance(), d = l == null ? void 0 : l.getSelfOrHeaderFooterModel(A).getBody();
@@ -6842,7 +6845,7 @@ const Ys = 999, Fn = {
6842
6845
  const le = Fs(), Te = p.insertOp(["tableSource", C, "tableRows", Z, "tableCells", I], le);
6843
6846
  S.push(Te);
6844
6847
  }
6845
- const x = l.getSnapshot(), M = x.documentStyle, { marginLeft: B = 0, marginRight: L = 0 } = M, F = ((Ae = (se = M.pageSize) == null ? void 0 : se.width) != null ? Ae : 800) - B - L, P = (ne = x == null ? void 0 : x.tableSource) == null ? void 0 : ne[C].tableColumns, { newColWidth: oe, widths: re } = Kl(F, P, I);
6848
+ const x = l.getSnapshot(), M = x.documentStyle, { marginLeft: B = 0, marginRight: L = 0 } = M, F = ((ce = (se = M.pageSize) == null ? void 0 : se.width) != null ? ce : 800) - B - L, P = (ne = x == null ? void 0 : x.tableSource) == null ? void 0 : ne[C].tableColumns, { newColWidth: oe, widths: re } = Kl(F, P, I);
6846
6849
  for (let Z = 0; Z < re.length; Z++) {
6847
6850
  const le = p.replaceOp(["tableSource", C, "tableColumns", Z, "size", "width", "v"], P[Z].size.width.v, re[Z]);
6848
6851
  S.push(le);
@@ -7032,7 +7035,7 @@ const ma = {
7032
7035
  const t = n.get(G), o = n.get(N), s = n.get(T), r = o.getCurrentUnitForType(_.UNIVER_DOC), i = t.getDocRanges();
7033
7036
  if (!r || i.length === 0 || !e)
7034
7037
  return !1;
7035
- const a = i[0].segmentId, c = r.getUnitId(), A = (E = (m = r.getSelfOrHeaderFooterModel(a).getBody()) == null ? void 0 : m.paragraphs) != null ? E : [], l = (I = Sn(i, A)) != null ? I : [], d = {
7038
+ const a = i[0].segmentId, c = r.getUnitId(), A = (E = (m = r.getSelfOrHeaderFooterModel(a).getBody()) == null ? void 0 : m.paragraphs) != null ? E : [], l = (I = In(i, A)) != null ? I : [], d = {
7036
7039
  id: J.id,
7037
7040
  params: {
7038
7041
  unitId: c,
@@ -7072,19 +7075,19 @@ const ma = {
7072
7075
  return d.params.actions = g.editOp(u.serialize(), f), !!s.syncExecuteCommand(d.id, d.params);
7073
7076
  }
7074
7077
  }, yd = () => {
7075
- const n = ee(G), e = ee(Ft), t = Fe(() => n.getDocRanges(), []);
7078
+ const n = $(G), e = $(Ht), t = Fe(() => n.getDocRanges(), []);
7076
7079
  return be(() => {
7077
7080
  t.length || e.closePanel();
7078
7081
  }, [t]), t;
7079
7082
  }, Td = () => {
7080
7083
  var i, a, c;
7081
- const e = ee(N).getCurrentUnitForType(_.UNIVER_DOC), t = yd();
7084
+ const e = $(N).getCurrentUnitForType(_.UNIVER_DOC), t = yd();
7082
7085
  if (!e || t.length === 0)
7083
7086
  return [];
7084
7087
  const o = t[0].segmentId, s = (a = (i = e.getSelfOrHeaderFooterModel(o).getBody()) == null ? void 0 : i.paragraphs) != null ? a : [];
7085
- return (c = Sn(t, s)) != null ? c : [];
7088
+ return (c = In(t, s)) != null ? c : [];
7086
7089
  }, Bd = (n, e) => {
7087
- const t = ee(T), [o, s] = Re(() => {
7090
+ const t = $(T), [o, s] = Re(() => {
7088
7091
  var a, c;
7089
7092
  const i = n[0];
7090
7093
  return i ? String((c = (a = i.paragraphStyle) == null ? void 0 : a.horizontalAlign) != null ? c : e) : e;
@@ -7093,7 +7096,7 @@ const ma = {
7093
7096
  paragraph: { horizontalAlign: Number(i) }
7094
7097
  }))];
7095
7098
  }, Md = (n) => {
7096
- const e = ee(T), [t, o] = Re(() => {
7099
+ const e = $(T), [t, o] = Re(() => {
7097
7100
  var i;
7098
7101
  const r = n[0];
7099
7102
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.indentStart, 0) : 0;
@@ -7102,7 +7105,7 @@ const ma = {
7102
7105
  paragraph: { indentStart: { v: r } }
7103
7106
  }))];
7104
7107
  }, _d = (n) => {
7105
- const e = ee(T), [t, o] = Re(() => {
7108
+ const e = $(T), [t, o] = Re(() => {
7106
7109
  var i;
7107
7110
  const r = n[0];
7108
7111
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.indentEnd, 0) : 0;
@@ -7111,7 +7114,7 @@ const ma = {
7111
7114
  paragraph: { indentEnd: { v: r } }
7112
7115
  }))];
7113
7116
  }, Dd = (n) => {
7114
- const e = ee(T), [t, o] = Re(() => {
7117
+ const e = $(T), [t, o] = Re(() => {
7115
7118
  var i;
7116
7119
  const r = n[0];
7117
7120
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.indentFirstLine, 0) : 0;
@@ -7120,7 +7123,7 @@ const ma = {
7120
7123
  paragraph: { indentFirstLine: { v: r } }
7121
7124
  }))];
7122
7125
  }, Pd = (n) => {
7123
- const e = ee(T), [t, o] = Re(() => {
7126
+ const e = $(T), [t, o] = Re(() => {
7124
7127
  var i;
7125
7128
  const r = n[0];
7126
7129
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.hanging, 0) : 0;
@@ -7129,7 +7132,7 @@ const ma = {
7129
7132
  paragraph: { hanging: { v: r } }
7130
7133
  }))];
7131
7134
  }, wd = (n) => {
7132
- const e = ee(T), [t, o] = Re(() => {
7135
+ const e = $(T), [t, o] = Re(() => {
7133
7136
  var i;
7134
7137
  const r = n[0];
7135
7138
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.spaceAbove, 0) : 0;
@@ -7138,7 +7141,7 @@ const ma = {
7138
7141
  paragraph: { spaceAbove: { v: r } }
7139
7142
  }))];
7140
7143
  }, Nd = (n) => {
7141
- const e = ee(T), [t, o] = Re(() => {
7144
+ const e = $(T), [t, o] = Re(() => {
7142
7145
  var i;
7143
7146
  const r = n[0];
7144
7147
  return r ? Ge((i = r.paragraphStyle) == null ? void 0 : i.spaceBelow, 0) : 0;
@@ -7147,16 +7150,16 @@ const ma = {
7147
7150
  paragraph: { spaceBelow: { v: r } }
7148
7151
  }))];
7149
7152
  }, Qd = (n) => {
7150
- const e = ee(T), t = ee(pe), o = ee(N), s = Fe(() => {
7153
+ const e = $(T), t = $(fe), o = $(N), s = Fe(() => {
7151
7154
  var g;
7152
7155
  const u = o.getCurrentUnitForType(_.UNIVER_DOC);
7153
7156
  if (u)
7154
- return (g = t.getRenderById(u == null ? void 0 : u.getUnitId())) == null ? void 0 : g.with(ce).getSkeleton();
7157
+ return (g = t.getRenderById(u == null ? void 0 : u.getUnitId())) == null ? void 0 : g.with(Ae).getSkeleton();
7155
7158
  }, []), r = Fe(() => new Le({}), []), [i, a] = Re(() => {
7156
7159
  var g, f;
7157
7160
  const u = n[0];
7158
7161
  return u && (f = (g = u.paragraphStyle) == null ? void 0 : g.lineSpacing) != null ? f : 1;
7159
- }), c = _t(i), [A, l] = Re(() => {
7162
+ }), c = Dt(i), [A, l] = Re(() => {
7160
7163
  var g, f;
7161
7164
  const u = n[0];
7162
7165
  return u ? (f = (g = u.paragraphStyle) == null ? void 0 : g.spacingRule) != null ? f : Bt.AUTO : Bt.AUTO;
@@ -7199,9 +7202,9 @@ const ma = {
7199
7202
  paragraphSettingFlexCol: Wd,
7200
7203
  paragraphSettingSpaceLine: zd
7201
7204
  }, gt = (n) => {
7202
- const { value: e, onChange: t, className: o = "", min: s = 0, max: r = 100, step: i = 1 } = n, a = _t(null);
7205
+ const { value: e, onChange: t, className: o = "", min: s = 0, max: r = 100, step: i = 1 } = n, a = Dt(null);
7203
7206
  return /* @__PURE__ */ V(
7204
- dn,
7207
+ un,
7205
7208
  {
7206
7209
  step: i,
7207
7210
  ref: a,
@@ -7221,7 +7224,7 @@ const ma = {
7221
7224
  );
7222
7225
  };
7223
7226
  function jd() {
7224
- const n = ee($e), e = Fe(
7227
+ const n = $($e), e = Fe(
7225
7228
  () => [
7226
7229
  { label: n.t("toolbar.alignLeft"), value: String(De.LEFT), icon: /* @__PURE__ */ V(Gi, {}) },
7227
7230
  { label: n.t("toolbar.alignCenter"), value: String(De.CENTER), icon: /* @__PURE__ */ V(ji, {}) },
@@ -7242,7 +7245,7 @@ function jd() {
7242
7245
  children: e.map((S) => /* @__PURE__ */ V(Hc, { title: S.label, placement: "bottom", children: /* @__PURE__ */ V(
7243
7246
  "span",
7244
7247
  {
7245
- className: ln(
7248
+ className: dn(
7246
7249
  ae.paragraphSettingIconListItem,
7247
7250
  { [ae.paragraphSettingIconListActive]: o === S.value }
7248
7251
  ),
@@ -7338,7 +7341,7 @@ function jd() {
7338
7341
  }
7339
7342
  const Gd = (n, e) => e.length === n.length && n.some((t) => e.some((o) => o.startOffset === t.startOffset && o.endOffset === t.endOffset));
7340
7343
  function Yd() {
7341
- const n = ee(T), e = ee($e), t = sn(e.currentLocale$), [o, s] = Re(""), r = Fe(() => gi(() => s(mt(4)), 300), []), i = _t([]);
7344
+ const n = $(T), e = $($e), t = Mt(e.currentLocale$), [o, s] = Re(""), r = Fe(() => gi(() => s(mt(4)), 300), []), i = Dt([]);
7342
7345
  return be(() => {
7343
7346
  const a = n.onCommandExecuted((c) => {
7344
7347
  if (we.id === c.id) {
@@ -7358,7 +7361,7 @@ var qd = Object.getOwnPropertyDescriptor, Kd = (n, e, t, o) => {
7358
7361
  return s;
7359
7362
  }, Lo = (n, e) => (t, o) => e(t, o, n);
7360
7363
  const $r = "doc_ui_paragraph-setting-panel";
7361
- let Ft = class extends ge {
7364
+ let Ht = class extends ge {
7362
7365
  constructor(e, t, o) {
7363
7366
  super();
7364
7367
  O(this, "_id");
@@ -7382,18 +7385,18 @@ let Ft = class extends ge {
7382
7385
  this._sidebarService.close(this._id);
7383
7386
  }
7384
7387
  };
7385
- Ft = Kd([
7388
+ Ht = Kd([
7386
7389
  Lo(0, T),
7387
7390
  Lo(1, j(io)),
7388
7391
  Lo(2, j(Ti))
7389
- ], Ft);
7392
+ ], Ht);
7390
7393
  const rr = {
7391
7394
  id: "sidebar.operation.doc-paragraph-setting-panel",
7392
7395
  type: w.OPERATION,
7393
- handler: (n) => (n.get(Ft).openPanel(), !0)
7396
+ handler: (n) => (n.get(Ht).openPanel(), !0)
7394
7397
  }, ir = (n) => {
7395
7398
  const e = n.get(G);
7396
- return new me((t) => {
7399
+ return new pe((t) => {
7397
7400
  const o = e.textSelection$.subscribe(() => {
7398
7401
  e.getDocRanges().some((i) => i.collapsed === !1 || i.rangeType === Ye.RECT) ? t.next(!1) : t.next(!0);
7399
7402
  });
@@ -7427,7 +7430,7 @@ function ei(n, e, t) {
7427
7430
  }
7428
7431
  const nt = (n) => {
7429
7432
  const e = n.get(G), t = n.get(N);
7430
- return new me((o) => {
7433
+ return new pe((o) => {
7431
7434
  const s = e.textSelection$.subscribe(() => {
7432
7435
  ei(o, e, t);
7433
7436
  });
@@ -7436,33 +7439,33 @@ const nt = (n) => {
7436
7439
  }, Jd = (n) => ({
7437
7440
  id: Fn.name,
7438
7441
  commandId: Fn.id,
7439
- type: $.BUTTON,
7442
+ type: ee.BUTTON,
7440
7443
  icon: "Copy",
7441
7444
  title: "rightClick.copy",
7442
7445
  disabled$: ir(n),
7443
7446
  hidden$: te(n, _.UNIVER_DOC)
7444
7447
  }), Zd = (n) => ({
7445
7448
  id: rr.id,
7446
- type: $.BUTTON,
7449
+ type: ee.BUTTON,
7447
7450
  icon: "MenuSingle24",
7448
7451
  title: "doc.menu.paragraphSetting",
7449
7452
  hidden$: te(n, _.UNIVER_DOC)
7450
7453
  }), $d = (n) => ({
7451
7454
  id: qs.id,
7452
- type: $.BUTTON,
7455
+ type: ee.BUTTON,
7453
7456
  icon: "Copy",
7454
7457
  title: "rightClick.cut",
7455
7458
  disabled$: ir(n),
7456
7459
  hidden$: te(n, _.UNIVER_DOC)
7457
7460
  }), eu = (n) => ({
7458
7461
  id: Ks.id,
7459
- type: $.BUTTON,
7462
+ type: ee.BUTTON,
7460
7463
  icon: "PasteSpecial",
7461
7464
  title: "rightClick.paste",
7462
7465
  hidden$: te(n, _.UNIVER_DOC)
7463
7466
  }), tu = (n) => ({
7464
7467
  id: So.id,
7465
- type: $.BUTTON,
7468
+ type: ee.BUTTON,
7466
7469
  icon: "PasteSpecial",
7467
7470
  title: "rightClick.delete",
7468
7471
  disabled$: ir(n),
@@ -7471,7 +7474,7 @@ const nt = (n) => {
7471
7474
  function nu(n) {
7472
7475
  return {
7473
7476
  id: Sa,
7474
- type: $.SUBITEMS,
7477
+ type: ee.SUBITEMS,
7475
7478
  title: "table.insert",
7476
7479
  icon: "Insert",
7477
7480
  hidden$: ao(te(n, _.UNIVER_DOC), nt(n), (e, t) => e || t)
@@ -7480,7 +7483,7 @@ function nu(n) {
7480
7483
  function ou(n) {
7481
7484
  return {
7482
7485
  id: er.id,
7483
- type: $.BUTTON,
7486
+ type: ee.BUTTON,
7484
7487
  title: "table.insertRowAbove",
7485
7488
  icon: "InsertRowAbove",
7486
7489
  disabled$: nt(n),
@@ -7490,7 +7493,7 @@ function ou(n) {
7490
7493
  function su(n) {
7491
7494
  return {
7492
7495
  id: tr.id,
7493
- type: $.BUTTON,
7496
+ type: ee.BUTTON,
7494
7497
  title: "table.insertRowBelow",
7495
7498
  icon: "InsertRowBelow",
7496
7499
  disabled$: nt(n),
@@ -7500,7 +7503,7 @@ function su(n) {
7500
7503
  function ru(n) {
7501
7504
  return {
7502
7505
  id: nr.id,
7503
- type: $.BUTTON,
7506
+ type: ee.BUTTON,
7504
7507
  title: "table.insertColumnLeft",
7505
7508
  icon: "LeftInsertColumn",
7506
7509
  disabled$: nt(n),
@@ -7510,7 +7513,7 @@ function ru(n) {
7510
7513
  function iu(n) {
7511
7514
  return {
7512
7515
  id: or.id,
7513
- type: $.BUTTON,
7516
+ type: ee.BUTTON,
7514
7517
  title: "table.insertColumnRight",
7515
7518
  icon: "RightInsertColumn",
7516
7519
  disabled$: nt(n),
@@ -7521,7 +7524,7 @@ const Ia = "doc.menu.table-delete";
7521
7524
  function au(n) {
7522
7525
  return {
7523
7526
  id: Ia,
7524
- type: $.SUBITEMS,
7527
+ type: ee.SUBITEMS,
7525
7528
  title: "table.delete",
7526
7529
  icon: "Reduce",
7527
7530
  hidden$: ao(te(n, _.UNIVER_DOC), nt(n), (e, t) => e || t)
@@ -7530,7 +7533,7 @@ function au(n) {
7530
7533
  function cu(n) {
7531
7534
  return {
7532
7535
  id: Xs.id,
7533
- type: $.BUTTON,
7536
+ type: ee.BUTTON,
7534
7537
  title: "table.deleteRows",
7535
7538
  icon: "DeleteRow",
7536
7539
  disabled$: nt(n),
@@ -7540,7 +7543,7 @@ function cu(n) {
7540
7543
  function Au(n) {
7541
7544
  return {
7542
7545
  id: Js.id,
7543
- type: $.BUTTON,
7546
+ type: ee.BUTTON,
7544
7547
  title: "table.deleteColumns",
7545
7548
  icon: "DeleteColumn",
7546
7549
  disabled$: nt(n),
@@ -7549,8 +7552,8 @@ function Au(n) {
7549
7552
  }
7550
7553
  function lu(n) {
7551
7554
  return {
7552
- id: Cn.id,
7553
- type: $.BUTTON,
7555
+ id: Rn.id,
7556
+ type: ee.BUTTON,
7554
7557
  title: "table.deleteTable",
7555
7558
  icon: "GridSingle",
7556
7559
  disabled$: nt(n),
@@ -7558,27 +7561,24 @@ function lu(n) {
7558
7561
  };
7559
7562
  }
7560
7563
  function du(n) {
7561
- const e = n.get(N), t = n.get(pe);
7562
- return new me((o) => {
7563
- const s = e.focused$.subscribe((a) => {
7564
- if (a == null || e.getUnitType(a) !== _.UNIVER_DOC)
7564
+ const e = n.get(N), t = n.get(fe);
7565
+ return new pe((o) => {
7566
+ const s = e.focused$.subscribe((r) => {
7567
+ if (r == null || e.getUnitType(r) !== _.UNIVER_DOC)
7565
7568
  return o.next(!0);
7566
- const A = t.getRenderById(a);
7567
- if (A == null)
7569
+ const a = t.getRenderById(r);
7570
+ if (a == null)
7568
7571
  return o.next(!0);
7569
- A.with(ce).getViewModel().editAreaChange$.subscribe((d) => {
7570
- o.next(d === fe.HEADER || d === fe.FOOTER);
7572
+ a.with(Ae).getViewModel().editAreaChange$.subscribe((A) => {
7573
+ o.next(A === me.HEADER || A === me.FOOTER);
7571
7574
  });
7572
- }), r = t.getCurrentTypeOfRenderer(_.UNIVER_DOC);
7573
- if (r == null)
7574
- return o.next(!0);
7575
- const i = r.with(ce).getViewModel();
7576
- return o.next(i.getEditArea() !== fe.BODY), () => s.unsubscribe();
7575
+ });
7576
+ return () => s.unsubscribe();
7577
7577
  });
7578
7578
  }
7579
7579
  function uu(n) {
7580
7580
  const e = n.get(N), t = n.get(T);
7581
- return new me((o) => {
7581
+ return new pe((o) => {
7582
7582
  const s = t.onCommandExecuted((c) => {
7583
7583
  if (c.id === J.id) {
7584
7584
  const { unitId: A } = c.params, l = e.getUnit(A);
@@ -7605,7 +7605,7 @@ function uu(n) {
7605
7605
  }
7606
7606
  function hu(n) {
7607
7607
  const e = n.get(G), t = n.get(N);
7608
- return new me((o) => {
7608
+ return new pe((o) => {
7609
7609
  const s = e.textSelection$.subscribe((r) => {
7610
7610
  if (r == null) {
7611
7611
  o.next(!0);
@@ -7649,7 +7649,7 @@ function hu(n) {
7649
7649
  }
7650
7650
  function xe(n) {
7651
7651
  const e = n.get(G);
7652
- return new me((t) => {
7652
+ return new pe((t) => {
7653
7653
  const o = e.textSelection$.subscribe((s) => {
7654
7654
  if (s == null) {
7655
7655
  t.next(!0);
@@ -7668,12 +7668,12 @@ function xe(n) {
7668
7668
  function gu(n) {
7669
7669
  const e = n.get(T);
7670
7670
  return {
7671
- id: zt.id,
7672
- type: $.BUTTON,
7671
+ id: jt.id,
7672
+ type: ee.BUTTON,
7673
7673
  icon: "BoldSingle",
7674
7674
  title: "Set bold",
7675
7675
  tooltip: "toolbar.bold",
7676
- activated$: new me((t) => {
7676
+ activated$: new pe((t) => {
7677
7677
  const o = e.onCommandExecuted((s) => {
7678
7678
  var i;
7679
7679
  const r = s.id;
@@ -7696,12 +7696,12 @@ function gu(n) {
7696
7696
  function fu(n) {
7697
7697
  const e = n.get(T);
7698
7698
  return {
7699
- id: jt.id,
7700
- type: $.BUTTON,
7699
+ id: Gt.id,
7700
+ type: ee.BUTTON,
7701
7701
  icon: "ItalicSingle",
7702
7702
  title: "Set italic",
7703
7703
  tooltip: "toolbar.italic",
7704
- activated$: new me((t) => {
7704
+ activated$: new pe((t) => {
7705
7705
  const o = e.onCommandExecuted((s) => {
7706
7706
  var i;
7707
7707
  const r = s.id;
@@ -7724,12 +7724,12 @@ function fu(n) {
7724
7724
  function pu(n) {
7725
7725
  const e = n.get(T);
7726
7726
  return {
7727
- id: Gt.id,
7728
- type: $.BUTTON,
7727
+ id: Yt.id,
7728
+ type: ee.BUTTON,
7729
7729
  icon: "UnderlineSingle",
7730
7730
  title: "Set underline",
7731
7731
  tooltip: "toolbar.underline",
7732
- activated$: new me((t) => {
7732
+ activated$: new pe((t) => {
7733
7733
  const o = e.onCommandExecuted((s) => {
7734
7734
  var i;
7735
7735
  const r = s.id;
@@ -7752,12 +7752,12 @@ function pu(n) {
7752
7752
  function mu(n) {
7753
7753
  const e = n.get(T);
7754
7754
  return {
7755
- id: Yt.id,
7756
- type: $.BUTTON,
7755
+ id: qt.id,
7756
+ type: ee.BUTTON,
7757
7757
  icon: "StrikethroughSingle",
7758
7758
  title: "Set strike through",
7759
7759
  tooltip: "toolbar.strikethrough",
7760
- activated$: new me((t) => {
7760
+ activated$: new pe((t) => {
7761
7761
  const o = e.onCommandExecuted((s) => {
7762
7762
  var i;
7763
7763
  const r = s.id;
@@ -7780,11 +7780,11 @@ function mu(n) {
7780
7780
  function Eu(n) {
7781
7781
  const e = n.get(T);
7782
7782
  return {
7783
- id: vt.id,
7784
- type: $.BUTTON,
7783
+ id: Ct.id,
7784
+ type: ee.BUTTON,
7785
7785
  icon: "SubscriptSingle",
7786
7786
  tooltip: "toolbar.subscript",
7787
- activated$: new me((t) => {
7787
+ activated$: new pe((t) => {
7788
7788
  const o = e.onCommandExecuted((s) => {
7789
7789
  var i;
7790
7790
  const r = s.id;
@@ -7807,11 +7807,11 @@ function Eu(n) {
7807
7807
  function Su(n) {
7808
7808
  const e = n.get(T);
7809
7809
  return {
7810
- id: qt.id,
7811
- type: $.BUTTON,
7810
+ id: Kt.id,
7811
+ type: ee.BUTTON,
7812
7812
  icon: "SuperscriptSingle",
7813
7813
  tooltip: "toolbar.superscript",
7814
- activated$: new me((t) => {
7814
+ activated$: new pe((t) => {
7815
7815
  const o = e.onCommandExecuted((s) => {
7816
7816
  var i;
7817
7817
  const r = s.id;
@@ -7834,9 +7834,9 @@ function Su(n) {
7834
7834
  function Iu(n) {
7835
7835
  const e = n.get(T);
7836
7836
  return {
7837
- id: wt.id,
7837
+ id: Nt.id,
7838
7838
  tooltip: "toolbar.font",
7839
- type: $.SELECTOR,
7839
+ type: ee.SELECTOR,
7840
7840
  label: Ji,
7841
7841
  selections: yc.map((t) => ({
7842
7842
  label: {
@@ -7845,11 +7845,11 @@ function Iu(n) {
7845
7845
  value: t.value
7846
7846
  })),
7847
7847
  // disabled$: getCurrentSheetDisabled$(accessor),
7848
- value$: new me((t) => {
7849
- const o = vi.ff, s = e.onCommandExecuted((r) => {
7848
+ value$: new pe((t) => {
7849
+ const o = Ci.ff, s = e.onCommandExecuted((r) => {
7850
7850
  var a;
7851
7851
  const i = r.id;
7852
- if (i === we.id || i === wt.id) {
7852
+ if (i === we.id || i === Nt.id) {
7853
7853
  const c = ht(n);
7854
7854
  if (c == null) {
7855
7855
  t.next(o);
@@ -7865,11 +7865,11 @@ function Iu(n) {
7865
7865
  hidden$: te(n, _.UNIVER_DOC)
7866
7866
  };
7867
7867
  }
7868
- function vu(n) {
7868
+ function Cu(n) {
7869
7869
  const e = n.get(T);
7870
7870
  return {
7871
- id: Pt.id,
7872
- type: $.SELECTOR,
7871
+ id: wt.id,
7872
+ type: ee.SELECTOR,
7873
7873
  tooltip: "toolbar.fontSize",
7874
7874
  label: {
7875
7875
  name: $i,
@@ -7881,11 +7881,11 @@ function vu(n) {
7881
7881
  },
7882
7882
  selections: Tc,
7883
7883
  // disabled$,
7884
- value$: new me((t) => {
7885
- const o = vi.fs, s = e.onCommandExecuted((r) => {
7884
+ value$: new pe((t) => {
7885
+ const o = Ci.fs, s = e.onCommandExecuted((r) => {
7886
7886
  var a;
7887
7887
  const i = r.id;
7888
- if (i === we.id || i === Pt.id) {
7888
+ if (i === we.id || i === wt.id) {
7889
7889
  const c = ht(n);
7890
7890
  if (c == null) {
7891
7891
  t.next(o);
@@ -7901,13 +7901,13 @@ function vu(n) {
7901
7901
  hidden$: te(n, _.UNIVER_DOC)
7902
7902
  };
7903
7903
  }
7904
- function Cu(n) {
7904
+ function vu(n) {
7905
7905
  const e = n.get(T), t = n.get(Ii);
7906
7906
  return {
7907
- id: Nt.id,
7907
+ id: Qt.id,
7908
7908
  icon: "FontColor",
7909
7909
  tooltip: "toolbar.textColor.main",
7910
- type: $.BUTTON_SELECTOR,
7910
+ type: ee.BUTTON_SELECTOR,
7911
7911
  selections: [
7912
7912
  {
7913
7913
  label: {
@@ -7917,9 +7917,9 @@ function Cu(n) {
7917
7917
  }
7918
7918
  }
7919
7919
  ],
7920
- value$: new me((o) => {
7920
+ value$: new pe((o) => {
7921
7921
  const s = t.getCurrentTheme().textColor, r = e.onCommandExecuted((i) => {
7922
- if (i.id === Nt.id) {
7922
+ if (i.id === Qt.id) {
7923
7923
  const a = i.params.value;
7924
7924
  o.next(a != null ? a : s);
7925
7925
  }
@@ -7934,17 +7934,17 @@ function Cu(n) {
7934
7934
  function Ru(n) {
7935
7935
  return {
7936
7936
  id: _s.id,
7937
- type: $.BUTTON,
7937
+ type: ee.BUTTON,
7938
7938
  icon: "HeaderFooterSingle",
7939
7939
  tooltip: "toolbar.headerFooter",
7940
7940
  hidden$: ao(te(n, _.UNIVER_DOC, void 0, et), uu(n), (e, t) => e || t)
7941
7941
  };
7942
7942
  }
7943
- const bu = "GridSingle", va = "doc.menu.table";
7943
+ const bu = "GridSingle", Ca = "doc.menu.table";
7944
7944
  function xu(n) {
7945
7945
  return {
7946
- id: va,
7947
- type: $.SUBITEMS,
7946
+ id: Ca,
7947
+ type: ee.SUBITEMS,
7948
7948
  icon: bu,
7949
7949
  tooltip: "toolbar.table.main",
7950
7950
  disabled$: hu(n),
@@ -7956,7 +7956,7 @@ function Ou(n) {
7956
7956
  return {
7957
7957
  id: sr.id,
7958
7958
  title: "toolbar.table.insert",
7959
- type: $.BUTTON,
7959
+ type: ee.BUTTON,
7960
7960
  hidden$: te(n, _.UNIVER_DOC)
7961
7961
  };
7962
7962
  }
@@ -7964,16 +7964,16 @@ function yu(n) {
7964
7964
  const e = n.get(T);
7965
7965
  return {
7966
7966
  id: go.id,
7967
- type: $.BUTTON,
7967
+ type: ee.BUTTON,
7968
7968
  icon: "LeftJustifyingSingle",
7969
7969
  tooltip: "toolbar.alignLeft",
7970
7970
  disabled$: xe(n),
7971
- activated$: new me((t) => {
7971
+ activated$: new pe((t) => {
7972
7972
  const o = e.onCommandExecuted((s) => {
7973
7973
  var i;
7974
7974
  const r = s.id;
7975
7975
  if (r === we.id || r === tt.id) {
7976
- const a = Co(n);
7976
+ const a = vo(n);
7977
7977
  if (a == null)
7978
7978
  return;
7979
7979
  const c = (i = a.paragraphStyle) == null ? void 0 : i.horizontalAlign;
@@ -7989,15 +7989,15 @@ function Tu(n) {
7989
7989
  const e = n.get(T);
7990
7990
  return {
7991
7991
  id: fo.id,
7992
- type: $.BUTTON,
7992
+ type: ee.BUTTON,
7993
7993
  icon: "HorizontallySingle",
7994
7994
  tooltip: "toolbar.alignCenter",
7995
- activated$: new me((t) => {
7995
+ activated$: new pe((t) => {
7996
7996
  const o = e.onCommandExecuted((s) => {
7997
7997
  var i;
7998
7998
  const r = s.id;
7999
7999
  if (r === we.id || r === tt.id) {
8000
- const a = Co(n);
8000
+ const a = vo(n);
8001
8001
  if (a == null)
8002
8002
  return;
8003
8003
  const c = (i = a.paragraphStyle) == null ? void 0 : i.horizontalAlign;
@@ -8014,15 +8014,15 @@ function Bu(n) {
8014
8014
  const e = n.get(T);
8015
8015
  return {
8016
8016
  id: po.id,
8017
- type: $.BUTTON,
8017
+ type: ee.BUTTON,
8018
8018
  icon: "RightJustifyingSingle",
8019
8019
  tooltip: "toolbar.alignRight",
8020
- activated$: new me((t) => {
8020
+ activated$: new pe((t) => {
8021
8021
  const o = e.onCommandExecuted((s) => {
8022
8022
  var i;
8023
8023
  const r = s.id;
8024
8024
  if (r === we.id || r === tt.id) {
8025
- const a = Co(n);
8025
+ const a = vo(n);
8026
8026
  if (a == null)
8027
8027
  return;
8028
8028
  const c = (i = a.paragraphStyle) == null ? void 0 : i.horizontalAlign;
@@ -8039,15 +8039,15 @@ function Mu(n) {
8039
8039
  const e = n.get(T);
8040
8040
  return {
8041
8041
  id: mo.id,
8042
- type: $.BUTTON,
8042
+ type: ee.BUTTON,
8043
8043
  icon: "AlignTextBothSingle",
8044
8044
  tooltip: "toolbar.alignJustify",
8045
- activated$: new me((t) => {
8045
+ activated$: new pe((t) => {
8046
8046
  const o = e.onCommandExecuted((s) => {
8047
8047
  var i;
8048
8048
  const r = s.id;
8049
8049
  if (r === we.id || r === tt.id) {
8050
- const a = Co(n);
8050
+ const a = vo(n);
8051
8051
  if (a == null)
8052
8052
  return;
8053
8053
  const c = (i = a.paragraphStyle) == null ? void 0 : i.horizontalAlign;
@@ -8060,7 +8060,7 @@ function Mu(n) {
8060
8060
  hidden$: te(n, _.UNIVER_DOC, void 0, et)
8061
8061
  };
8062
8062
  }
8063
- const gn = (n) => new me((e) => {
8063
+ const fn = (n) => new pe((e) => {
8064
8064
  const t = n.get(N), o = n.get(G);
8065
8065
  let s;
8066
8066
  const r = t.focused$.subscribe((i) => {
@@ -8091,7 +8091,7 @@ const gn = (n) => new me((e) => {
8091
8091
  function _u(n) {
8092
8092
  return {
8093
8093
  id: ho.id,
8094
- type: $.BUTTON_SELECTOR,
8094
+ type: ee.BUTTON_SELECTOR,
8095
8095
  slot: !0,
8096
8096
  selections: [
8097
8097
  {
@@ -8100,20 +8100,20 @@ function _u(n) {
8100
8100
  hoverable: !1,
8101
8101
  selectable: !1
8102
8102
  },
8103
- value$: gn(n)
8103
+ value$: fn(n)
8104
8104
  }
8105
8105
  ],
8106
8106
  icon: "OrderSingle",
8107
8107
  tooltip: "toolbar.order",
8108
8108
  hidden$: te(n, _.UNIVER_DOC),
8109
8109
  disabled$: xe(n),
8110
- activated$: gn(n).pipe(pn((e) => e && e.indexOf("ORDER_LIST") === 0))
8110
+ activated$: fn(n).pipe(mn((e) => e && e.indexOf("ORDER_LIST") === 0))
8111
8111
  };
8112
8112
  }
8113
8113
  function Du(n) {
8114
8114
  return {
8115
8115
  id: uo.id,
8116
- type: $.BUTTON_SELECTOR,
8116
+ type: ee.BUTTON_SELECTOR,
8117
8117
  slot: !0,
8118
8118
  selections: [
8119
8119
  {
@@ -8122,36 +8122,36 @@ function Du(n) {
8122
8122
  hoverable: !1,
8123
8123
  selectable: !1
8124
8124
  },
8125
- value$: gn(n)
8125
+ value$: fn(n)
8126
8126
  }
8127
8127
  ],
8128
8128
  icon: "UnorderSingle",
8129
8129
  tooltip: "toolbar.unorder",
8130
8130
  disabled$: xe(n),
8131
8131
  hidden$: te(n, _.UNIVER_DOC),
8132
- activated$: gn(n).pipe(pn((e) => e && e.indexOf("BULLET_LIST") === 0))
8132
+ activated$: fn(n).pipe(mn((e) => e && e.indexOf("BULLET_LIST") === 0))
8133
8133
  };
8134
8134
  }
8135
8135
  function Pu(n) {
8136
8136
  return {
8137
8137
  id: ws.id,
8138
- type: $.BUTTON,
8138
+ type: ee.BUTTON,
8139
8139
  icon: "TodoList",
8140
8140
  tooltip: "toolbar.checklist",
8141
8141
  disabled$: xe(n),
8142
8142
  hidden$: te(n, _.UNIVER_DOC),
8143
- activated$: gn(n).pipe(pn((e) => e && e.indexOf("CHECK_LIST") === 0))
8143
+ activated$: fn(n).pipe(mn((e) => e && e.indexOf("CHECK_LIST") === 0))
8144
8144
  };
8145
8145
  }
8146
8146
  function wu(n) {
8147
8147
  const e = n.get(T), t = n.get(N);
8148
8148
  return {
8149
- id: vo.id,
8150
- type: $.BUTTON,
8149
+ id: Co.id,
8150
+ type: ee.BUTTON,
8151
8151
  icon: "KeyboardSingle",
8152
8152
  tooltip: "toolbar.documentFlavor",
8153
8153
  hidden$: te(n, _.UNIVER_DOC, void 0, et),
8154
- activated$: new me((o) => {
8154
+ activated$: new pe((o) => {
8155
8155
  var i;
8156
8156
  const s = e.onCommandExecuted((a) => {
8157
8157
  var c;
@@ -8166,8 +8166,8 @@ function wu(n) {
8166
8166
  }
8167
8167
  function Nu(n) {
8168
8168
  return {
8169
- id: mn.id,
8170
- type: $.BUTTON,
8169
+ id: En.id,
8170
+ type: ee.BUTTON,
8171
8171
  title: "toolbar.resetColor",
8172
8172
  icon: "NoColor"
8173
8173
  };
@@ -8175,9 +8175,9 @@ function Nu(n) {
8175
8175
  function Qu(n) {
8176
8176
  const e = n.get(T), t = n.get(Ii);
8177
8177
  return {
8178
- id: Qt.id,
8178
+ id: Ut.id,
8179
8179
  tooltip: "toolbar.fillColor.main",
8180
- type: $.BUTTON_SELECTOR,
8180
+ type: ee.BUTTON_SELECTOR,
8181
8181
  icon: "PaintBucket",
8182
8182
  selections: [
8183
8183
  {
@@ -8188,9 +8188,9 @@ function Qu(n) {
8188
8188
  }
8189
8189
  }
8190
8190
  ],
8191
- value$: new me((o) => {
8191
+ value$: new pe((o) => {
8192
8192
  const s = t.getCurrentTheme().primaryColor, r = e.onCommandExecuted((i) => {
8193
- if (i.id === Qt.id) {
8193
+ if (i.id === Ut.id) {
8194
8194
  const a = i.params.value;
8195
8195
  o.next(a != null ? a : s);
8196
8196
  }
@@ -8224,7 +8224,7 @@ function ht(n) {
8224
8224
  }
8225
8225
  };
8226
8226
  }
8227
- function Co(n) {
8227
+ function vo(n) {
8228
8228
  var l, d;
8229
8229
  const e = n.get(N), t = n.get(G), o = e.getCurrentUniverDocInstance(), s = t.getDocRanges(), r = (l = s.find((h) => h.isActive)) != null ? l : s[0];
8230
8230
  if (o == null || r == null)
@@ -8242,54 +8242,54 @@ function Co(n) {
8242
8242
  return null;
8243
8243
  }
8244
8244
  const Uu = {
8245
- [vr.FORMAT]: {
8246
- [zt.id]: {
8245
+ [Cr.FORMAT]: {
8246
+ [jt.id]: {
8247
8247
  order: 0,
8248
8248
  menuItemFactory: gu
8249
8249
  },
8250
- [jt.id]: {
8250
+ [Gt.id]: {
8251
8251
  order: 1,
8252
8252
  menuItemFactory: fu
8253
8253
  },
8254
- [Gt.id]: {
8254
+ [Yt.id]: {
8255
8255
  order: 2,
8256
8256
  menuItemFactory: pu
8257
8257
  },
8258
- [Yt.id]: {
8258
+ [qt.id]: {
8259
8259
  order: 3,
8260
8260
  menuItemFactory: mu
8261
8261
  },
8262
- [vt.id]: {
8262
+ [Ct.id]: {
8263
8263
  order: 4,
8264
8264
  menuItemFactory: Eu
8265
8265
  },
8266
- [qt.id]: {
8266
+ [Kt.id]: {
8267
8267
  order: 5,
8268
8268
  menuItemFactory: Su
8269
8269
  },
8270
- [Pt.id]: {
8270
+ [wt.id]: {
8271
8271
  order: 6,
8272
- menuItemFactory: vu
8272
+ menuItemFactory: Cu
8273
8273
  },
8274
- [wt.id]: {
8274
+ [Nt.id]: {
8275
8275
  order: 7,
8276
8276
  menuItemFactory: Iu
8277
8277
  },
8278
- [Nt.id]: {
8278
+ [Qt.id]: {
8279
8279
  order: 8,
8280
- menuItemFactory: Cu
8280
+ menuItemFactory: vu
8281
8281
  },
8282
- [Qt.id]: {
8282
+ [Ut.id]: {
8283
8283
  order: 9,
8284
8284
  menuItemFactory: Qu,
8285
- [mn.id]: {
8285
+ [En.id]: {
8286
8286
  order: 0,
8287
8287
  menuItemFactory: Nu
8288
8288
  }
8289
8289
  }
8290
8290
  },
8291
- [vr.LAYOUT]: {
8292
- [va]: {
8291
+ [Cr.LAYOUT]: {
8292
+ [Ca]: {
8293
8293
  order: 1,
8294
8294
  menuItemFactory: xu,
8295
8295
  [sr.id]: {
@@ -8329,7 +8329,7 @@ const Uu = {
8329
8329
  order: 9,
8330
8330
  menuItemFactory: Ru
8331
8331
  },
8332
- [vo.id]: {
8332
+ [Co.id]: {
8333
8333
  order: 10,
8334
8334
  menuItemFactory: wu
8335
8335
  }
@@ -8389,7 +8389,7 @@ const Uu = {
8389
8389
  order: 2,
8390
8390
  menuItemFactory: Au
8391
8391
  },
8392
- [Cn.id]: {
8392
+ [Rn.id]: {
8393
8393
  order: 3,
8394
8394
  menuItemFactory: lu
8395
8395
  }
@@ -8410,18 +8410,17 @@ let Hn = class extends ge {
8410
8410
  const n = this._componentManager;
8411
8411
  this.disposeWithMe(n.register(Ps, Vc)), this.disposeWithMe(n.register(Ji, _c)), this.disposeWithMe(n.register(Zi, Dc)), this.disposeWithMe(n.register($i, Pc)), this.disposeWithMe(n.register(na, Al)), this.disposeWithMe(n.register(ta, al)), this.disposeWithMe(n.register("TodoList", qi));
8412
8412
  }
8413
- // TODO: @zhangwei, why add workbook to docs-ui?
8414
8413
  _initUiParts() {
8415
- var t, o;
8416
- const n = this._univerInstanceService.getCurrentUnitForType(_.UNIVER_SHEET), e = this._configService.getConfig(Us);
8417
- (o = (t = e == null ? void 0 : e.layout) == null ? void 0 : t.docContainerConfig) != null && o.footer && !n && this.disposeWithMe(this._uiPartsService.registerComponent(wc.FOOTER, () => Nc(Wl, this._injector)));
8414
+ var e, t;
8415
+ const n = this._configService.getConfig(Us);
8416
+ (t = (e = n == null ? void 0 : n.layout) == null ? void 0 : e.docContainerConfig) != null && t.footer && this.disposeWithMe(this._uiPartsService.registerComponent(wc.FOOTER, () => Nc(Wl, this._injector)));
8418
8417
  }
8419
8418
  _initMenus() {
8420
8419
  this._menuManagerService.mergeMenu(Uu);
8421
8420
  }
8422
8421
  _initShortCut() {
8423
8422
  [
8424
- Cl,
8423
+ vl,
8425
8424
  Rl,
8426
8425
  bl,
8427
8426
  xl,
@@ -8451,7 +8450,7 @@ let Hn = class extends ge {
8451
8450
  _initFocusHandler() {
8452
8451
  this.disposeWithMe(
8453
8452
  this._layoutService.registerFocusHandler(_.UNIVER_DOC, (n) => {
8454
- this._injector.get(pe).getRenderById(n).with(Se).focus();
8453
+ this._injector.get(fe).getRenderById(n).with(Se).focus();
8455
8454
  })
8456
8455
  );
8457
8456
  }
@@ -8482,7 +8481,7 @@ let kn = class extends dt {
8482
8481
  if (n == null)
8483
8482
  return;
8484
8483
  const { isEditing: e, unitId: t } = n;
8485
- t !== this._context.unitId || !e || this._context.unitId !== Cs && this._scrollToSelection();
8484
+ t !== this._context.unitId || !e || this._context.unitId !== vs && this._scrollToSelection();
8486
8485
  });
8487
8486
  }
8488
8487
  scrollToRange(n) {
@@ -8497,7 +8496,7 @@ let kn = class extends dt {
8497
8496
  const { unitId: e, scene: t, mainComponent: o } = this._context, s = this._docSkeletonManagerService.getSkeleton();
8498
8497
  if (o == null || s == null)
8499
8498
  return;
8500
- const r = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new ct(r, s), { contentBoxPointGroup: A } = c.getRangePointData(n, n), { left: l, top: d, height: h } = Dn(A), u = l + i, g = d + a, f = t.getViewport(Je.VIEW_MAIN), p = this._editorService.getEditor(e);
8499
+ const r = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new ct(r, s), { contentBoxPointGroup: A } = c.getRangePointData(n, n), { left: l, top: d, height: h } = Pn(A), u = l + i, g = d + a, f = t.getViewport(Je.VIEW_MAIN), p = this._editorService.getEditor(e);
8501
8500
  if (f == null)
8502
8501
  return;
8503
8502
  const {
@@ -8524,7 +8523,7 @@ let kn = class extends dt {
8524
8523
  kn = ku([
8525
8524
  Fo(1, j(G)),
8526
8525
  Fo(2, He),
8527
- Fo(3, j(ce))
8526
+ Fo(3, j(Ae))
8528
8527
  ], kn);
8529
8528
  var Vu = Object.getOwnPropertyDescriptor, Wu = (n, e, t, o) => {
8530
8529
  for (var s = o > 1 ? void 0 : o ? Vu(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -8537,7 +8536,7 @@ let ss = class extends dt {
8537
8536
  }
8538
8537
  reRender(n) {
8539
8538
  var r, i;
8540
- const e = (r = this._renderManagerService.getRenderById(n)) == null ? void 0 : r.with(ce), t = e == null ? void 0 : e.getSkeleton();
8539
+ const e = (r = this._renderManagerService.getRenderById(n)) == null ? void 0 : r.with(Ae), t = e == null ? void 0 : e.getSkeleton();
8541
8540
  if (!t || !!t.getViewModel().getDataModel().getSnapshot().disabled)
8542
8541
  return;
8543
8542
  t.calculate();
@@ -8626,7 +8625,7 @@ let ss = class extends dt {
8626
8625
  const I = zu(p);
8627
8626
  m = I.pageWidth, E = I.pageHeight;
8628
8627
  }
8629
- r.pageLayoutType === An.VERTICAL ? (A += E, A += r.pageMarginTop, g === f - 1 && (A += r.pageMarginTop), c = Math.max(c, m)) : r.pageLayoutType === An.HORIZONTAL && (c += m, g !== f - 1 && (c += r.pageMarginLeft), A = Math.max(A, E));
8628
+ r.pageLayoutType === ln.VERTICAL ? (A += E, A += r.pageMarginTop, g === f - 1 && (A += r.pageMarginTop), c = Math.max(c, m)) : r.pageLayoutType === ln.HORIZONTAL && (c += m, g !== f - 1 && (c += r.pageMarginLeft), A = Math.max(A, E));
8630
8629
  }
8631
8630
  r.resize(c, A), i.resize(c, A);
8632
8631
  const h = this._editorService.getEditor(o);
@@ -8636,9 +8635,9 @@ let ss = class extends dt {
8636
8635
  ss = Wu([
8637
8636
  bt(1, T),
8638
8637
  bt(2, j(Se)),
8639
- bt(3, j(ce)),
8638
+ bt(3, j(Ae)),
8640
8639
  bt(4, He),
8641
- bt(5, pe),
8640
+ bt(5, fe),
8642
8641
  bt(6, N)
8643
8642
  ], ss);
8644
8643
  function zu(n) {
@@ -8651,7 +8650,7 @@ function zu(n) {
8651
8650
  e = Math.max(e, A.left + A.width + o + s), t = Math.max(t, A.top + A.height + r + i);
8652
8651
  return { pageWidth: e, pageHeight: t };
8653
8652
  }
8654
- const Ca = {
8653
+ const va = {
8655
8654
  id: "doc.command.select-all",
8656
8655
  type: w.COMMAND,
8657
8656
  handler: async (n) => {
@@ -8743,7 +8742,7 @@ const Ra = {
8743
8742
  // eslint-disable-next-line max-lines-per-function
8744
8743
  handler: async (n, e) => {
8745
8744
  var P, oe, re;
8746
- const { unitId: t, newText: o, oldTextLen: s, isCompositionEnd: r, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), A = n.get(N), l = n.get(Ze), d = (P = c.getRenderById(t)) == null ? void 0 : P.with(Ro), h = A.getUnit(t, _.UNIVER_DOC);
8745
+ const { unitId: t, newText: o, oldTextLen: s, isCompositionEnd: r, isCompositionStart: i } = e, a = n.get(T), c = n.get(fe), A = n.get(N), l = n.get(Ze), d = (P = c.getRenderById(t)) == null ? void 0 : P.with(Ro), h = A.getUnit(t, _.UNIVER_DOC);
8747
8746
  if (h == null || d == null)
8748
8747
  return !1;
8749
8748
  const u = d.getActiveRange();
@@ -8767,15 +8766,15 @@ const Ra = {
8767
8766
  actions: [],
8768
8767
  textRanges: R
8769
8768
  }
8770
- }, v = l.getDefaultStyle(), b = l.getStyleCache(), y = Os((oe = p.customRanges) != null ? oe : [], E + s, rn.includes(t)), D = co(
8769
+ }, v = l.getDefaultStyle(), b = l.getStyleCache(), y = Os((oe = p.customRanges) != null ? oe : [], E + s, an.includes(t)), D = co(
8771
8770
  p,
8772
8771
  i ? I : E + s,
8773
8772
  v,
8774
8773
  b,
8775
- rn.includes(t)
8774
+ an.includes(t)
8776
8775
  ), x = ys((re = p.customDecorations) != null ? re : [], E + s), M = new Ie(), B = k.getInstance();
8777
8776
  if (!u.collapsed && i) {
8778
- const Y = Ce.selection.delete([u], p, 0, null, !1);
8777
+ const Y = ve.selection.delete([u], p, 0, null, !1);
8779
8778
  M.push(...Y), S.params.textRanges = [{
8780
8779
  startOffset: E + C,
8781
8780
  endOffset: E + C,
@@ -8936,7 +8935,7 @@ let Wn = class extends ge {
8936
8935
  _initListTabAutoFormat() {
8937
8936
  this.disposeWithMe(
8938
8937
  this._docAutoFormatService.registerAutoFormat({
8939
- id: Dt.id,
8938
+ id: Pt.id,
8940
8939
  match: (n) => {
8941
8940
  var s;
8942
8941
  const { selection: e, paragraphs: t, unit: o } = n;
@@ -8956,7 +8955,7 @@ let Wn = class extends ge {
8956
8955
  return [{
8957
8956
  id: ts.id,
8958
8957
  params: {
8959
- type: e != null && e.shift ? wn.decrease : wn.increase
8958
+ type: e != null && e.shift ? Nn.decrease : Nn.increase
8960
8959
  }
8961
8960
  }];
8962
8961
  },
@@ -8964,9 +8963,9 @@ let Wn = class extends ge {
8964
8963
  })
8965
8964
  ), this.disposeWithMe(
8966
8965
  this._docAutoFormatService.registerAutoFormat({
8967
- id: Dt.id,
8966
+ id: Pt.id,
8968
8967
  match: (n) => {
8969
- const { selection: e, unit: t } = n, { startNodePosition: o, endNodePosition: s } = e, r = this._renderManagerService.getRenderById(t.getUnitId()), i = r == null ? void 0 : r.with(ce).getSkeleton();
8968
+ const { selection: e, unit: t } = n, { startNodePosition: o, endNodePosition: s } = e, r = this._renderManagerService.getRenderById(t.getUnitId()), i = r == null ? void 0 : r.with(Ae).getSkeleton();
8970
8969
  return i == null ? !1 : !!(o && s && Hi(i, o, s) || o && !s && o.path.indexOf("cells") > -1);
8971
8970
  },
8972
8971
  getMutations(n) {
@@ -9015,7 +9014,7 @@ let Wn = class extends ge {
9015
9014
  _initExitListAutoFormat() {
9016
9015
  this.disposeWithMe(
9017
9016
  this._docAutoFormatService.registerAutoFormat({
9018
- id: un.id,
9017
+ id: hn.id,
9019
9018
  match: (n) => {
9020
9019
  const { paragraphs: e } = n;
9021
9020
  return !!(e.length === 1 && e[0].bullet && e[0].paragraphStart === e[0].paragraphEnd);
@@ -9025,10 +9024,10 @@ let Wn = class extends ge {
9025
9024
  return e ? e.nestingLevel > 0 ? [{
9026
9025
  id: ts.id,
9027
9026
  params: {
9028
- type: wn.decrease
9027
+ type: Nn.decrease
9029
9028
  }
9030
9029
  }] : [{
9031
- id: En.id,
9030
+ id: Sn.id,
9032
9031
  params: {
9033
9032
  listType: n.paragraphs[0].bullet.listType
9034
9033
  }
@@ -9040,7 +9039,7 @@ let Wn = class extends ge {
9040
9039
  _initDefaultEnterFormat() {
9041
9040
  this.disposeWithMe(
9042
9041
  this._docAutoFormatService.registerAutoFormat({
9043
- id: un.id,
9042
+ id: hn.id,
9044
9043
  match: () => !0,
9045
9044
  getMutations() {
9046
9045
  return [{
@@ -9054,7 +9053,7 @@ let Wn = class extends ge {
9054
9053
  };
9055
9054
  Wn = Ju([
9056
9055
  ni(0, j(St)),
9057
- ni(1, pe)
9056
+ ni(1, fe)
9058
9057
  ], Wn);
9059
9058
  function Zu(n) {
9060
9059
  return n.rows[0].cells[0].sections[0].columns[0].lines[0];
@@ -9081,7 +9080,7 @@ function oi(n) {
9081
9080
  lineBeforeTable: t,
9082
9081
  lineAfterTable: o
9083
9082
  };
9084
- const { st: s, ed: r } = n, i = e.type === ve.CELL ? [e] : e.parent.pages;
9083
+ const { st: s, ed: r } = n, i = e.type === Ce.CELL ? [e] : e.parent.pages;
9085
9084
  return fc(i, (a) => {
9086
9085
  a.st === r + 1 ? o = a : a.ed === s - 1 && (t = a);
9087
9086
  }), {
@@ -9165,7 +9164,7 @@ var sh = Object.getOwnPropertyDescriptor, rh = (n, e, t, o) => {
9165
9164
  for (var s = o > 1 ? void 0 : o ? sh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
9166
9165
  (i = n[r]) && (s = i(s) || s);
9167
9166
  return s;
9168
- }, xn = (n, e) => (t, o) => e(t, o, n);
9167
+ }, On = (n, e) => (t, o) => e(t, o, n);
9169
9168
  let zn = class extends ge {
9170
9169
  constructor(e, t, o, s) {
9171
9170
  super();
@@ -9200,7 +9199,7 @@ let zn = class extends ge {
9200
9199
  const t = this._textSelectionManagerService.getActiveTextRange(), o = this._textSelectionManagerService.getTextRanges(), s = this._univerInstanceService.getCurrentUniverDocInstance();
9201
9200
  if (s == null)
9202
9201
  return;
9203
- const r = (I = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : I.with(ce).getSkeleton(), i = this._getDocObject();
9202
+ const r = (I = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : I.with(Ae).getSkeleton(), i = this._getDocObject();
9204
9203
  if (t == null || r == null || i == null)
9205
9204
  return;
9206
9205
  const {
@@ -9273,7 +9272,7 @@ let zn = class extends ge {
9273
9272
  const t = this._textSelectionManagerService.getActiveTextRange(), o = this._textSelectionManagerService.getTextRanges(), s = this._univerInstanceService.getCurrentUniverDocInstance();
9274
9273
  if (s == null)
9275
9274
  return !1;
9276
- const r = (E = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : E.with(ce).getSkeleton(), i = this._getDocObject();
9275
+ const r = (E = this._renderManagerService.getRenderById(s.getUnitId())) == null ? void 0 : E.with(Ae).getSkeleton(), i = this._getDocObject();
9277
9276
  if (t == null || r == null || i == null || o == null)
9278
9277
  return;
9279
9278
  const { startOffset: a, endOffset: c, style: A, collapsed: l, segmentId: d, startNodePosition: h, endNodePosition: u, segmentPage: g } = t, f = s.getSelfOrHeaderFooterModel(d).getBody();
@@ -9390,7 +9389,7 @@ let zn = class extends ge {
9390
9389
  if (A === -1)
9391
9390
  return;
9392
9391
  let l;
9393
- if (c.type === ve.CELL && o) {
9392
+ if (c.type === Ce.CELL && o) {
9394
9393
  const x = si(c, t);
9395
9394
  if (x)
9396
9395
  return x;
@@ -9434,7 +9433,7 @@ let zn = class extends ge {
9434
9433
  }
9435
9434
  if (l != null)
9436
9435
  return l;
9437
- if (c.type === ve.CELL)
9436
+ if (c.type === Ce.CELL)
9438
9437
  return si(c, t);
9439
9438
  const u = c.parent;
9440
9439
  if (u == null)
@@ -9468,10 +9467,10 @@ let zn = class extends ge {
9468
9467
  }
9469
9468
  };
9470
9469
  zn = rh([
9471
- xn(0, N),
9472
- xn(1, pe),
9473
- xn(2, j(G)),
9474
- xn(3, T)
9470
+ On(0, N),
9471
+ On(1, fe),
9472
+ On(2, j(G)),
9473
+ On(3, T)
9475
9474
  ], zn);
9476
9475
  function si(n, e) {
9477
9476
  var o, s;
@@ -9504,7 +9503,7 @@ const ih = "univer-create", ah = "univer-create-item", ch = "univer-create-label
9504
9503
  handleRowColChange: n,
9505
9504
  tableCreateParams: e
9506
9505
  }) => {
9507
- const t = ee($e), [o, s] = Re(3), [r, i] = Re(5);
9506
+ const t = $($e), [o, s] = Re(3), [r, i] = Re(5);
9508
9507
  function a(c, A) {
9509
9508
  s(c), i(A), n(c, A);
9510
9509
  }
@@ -9514,7 +9513,7 @@ const ih = "univer-create", ah = "univer-create-item", ch = "univer-create-label
9514
9513
  /* @__PURE__ */ de("div", { className: ft.createItem, children: [
9515
9514
  /* @__PURE__ */ V("span", { className: ft.createLabel, children: t.t("toolbar.table.rowCount") }),
9516
9515
  /* @__PURE__ */ V(
9517
- dn,
9516
+ un,
9518
9517
  {
9519
9518
  min: 1,
9520
9519
  max: 20,
@@ -9530,7 +9529,7 @@ const ih = "univer-create", ah = "univer-create-item", ch = "univer-create-label
9530
9529
  /* @__PURE__ */ de("div", { className: ft.createItem, children: [
9531
9530
  /* @__PURE__ */ V("span", { className: ft.createLabel, children: t.t("toolbar.table.colCount") }),
9532
9531
  /* @__PURE__ */ V(
9533
- dn,
9532
+ un,
9534
9533
  {
9535
9534
  min: 1,
9536
9535
  max: 20,
@@ -9578,7 +9577,7 @@ var hh = Object.getOwnPropertyDescriptor, gh = (n, e, t, o) => {
9578
9577
  for (var s = o > 1 ? void 0 : o ? hh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
9579
9578
  (i = n[r]) && (s = i(s) || s);
9580
9579
  return s;
9581
- }, On = (n, e) => (t, o) => e(t, o, n);
9580
+ }, yn = (n, e) => (t, o) => e(t, o, n);
9582
9581
  function Ta(n, e) {
9583
9582
  const t = ai(n.left, n.top, e), o = ai(n.right, n.bottom, e);
9584
9583
  return {
@@ -9615,7 +9614,7 @@ function ci(n, e, t) {
9615
9614
  };
9616
9615
  }
9617
9616
  const ko = (n, e) => {
9618
- const { scene: t, mainComponent: o, engine: s } = e, r = e.with(ce).getSkeleton(), i = r.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = r.findNodePositionByCharIndex(n.endOffset, !0, n.segmentId, n.segmentPage), c = o;
9617
+ const { scene: t, mainComponent: o, engine: s } = e, r = e.with(Ae).getSkeleton(), i = r.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = r.findNodePositionByCharIndex(n.endOffset, !0, n.segmentId, n.segmentPage), c = o;
9619
9618
  if (!a || !i)
9620
9619
  return;
9621
9620
  const A = c.getOffsetConfig(), { docsLeft: l, docsTop: d } = A, h = s.getCanvasElement(), u = h.getBoundingClientRect(), g = Oi(h.style.width), { top: f, left: p, width: m } = u, E = m / g, { scaleX: I, scaleY: C } = t.getAncestorScale(), R = new ct(A, r), { borderBoxPointGroup: S } = R.getRangePointData(i, a);
@@ -9644,7 +9643,7 @@ let as = class extends ge {
9644
9643
  top: m.top * R + E,
9645
9644
  bottom: m.bottom * R + E
9646
9645
  };
9647
- }, o = t(), s = new Le(o), r = new Nn();
9646
+ }, o = t(), s = new Le(o), r = new rn();
9648
9647
  r.add(this._commandService.onCommandExecuted((a) => {
9649
9648
  if (a.id === qe.id || a.id === J.id) {
9650
9649
  const c = t();
@@ -9662,7 +9661,7 @@ let as = class extends ge {
9662
9661
  }
9663
9662
  _createRangePositionObserver(n, e) {
9664
9663
  var i;
9665
- const t = (i = ko(n, e)) != null ? i : [], o = new Le(t), s = new Nn();
9664
+ const t = (i = ko(n, e)) != null ? i : [], o = new Le(t), s = new rn();
9666
9665
  s.add(this._commandService.onCommandExecuted((a) => {
9667
9666
  if ((a.id === qe.id || a.id === J.id) && a.params.unitId === e.unitId) {
9668
9667
  const A = ko(n, e);
@@ -9719,7 +9718,7 @@ let as = class extends ge {
9719
9718
  const { direction: s = "top", multipleDirection: r } = e, i = this._renderManagerService.getRenderById(t);
9720
9719
  if (!i)
9721
9720
  throw new Error(`Current render not found, unitId: ${t}`);
9722
- const { positions: a, positions$: c, disposable: A } = this._createRangePositionObserver(n, i), l = c.pipe(pn((h) => s.includes("top") ? h[0] : h[h.length - 1])), d = this._globalPopupManagerService.addPopup({
9721
+ const { positions: a, positions$: c, disposable: A } = this._createRangePositionObserver(n, i), l = c.pipe(mn((h) => s.includes("top") ? h[0] : h[h.length - 1])), d = this._globalPopupManagerService.addPopup({
9723
9722
  ...e,
9724
9723
  unitId: t,
9725
9724
  subUnitId: "default",
@@ -9740,10 +9739,10 @@ let as = class extends ge {
9740
9739
  // #endregion
9741
9740
  };
9742
9741
  as = gh([
9743
- On(0, j(Qc)),
9744
- On(1, pe),
9745
- On(2, N),
9746
- On(3, T)
9742
+ yn(0, j(Qc)),
9743
+ yn(1, fe),
9744
+ yn(2, N),
9745
+ yn(3, T)
9747
9746
  ], as);
9748
9747
  var fh = Object.getOwnPropertyDescriptor, ph = (n, e, t, o) => {
9749
9748
  for (var s = o > 1 ? void 0 : o ? fh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -9824,7 +9823,7 @@ let Gn = class extends ge {
9824
9823
  this.disposeWithMe(this._skeleton.dirty$.subscribe(() => {
9825
9824
  this._customRangeDirty = !0, this._bulletDirty = !0;
9826
9825
  })), this.disposeWithMe(
9827
- nn(this._context.engine.onTransformChange$).pipe(
9826
+ on(this._context.engine.onTransformChange$).pipe(
9828
9827
  Un((e) => e.type === yi.resize)
9829
9828
  ).subscribe(() => {
9830
9829
  this._customRangeDirty = !0, this._bulletDirty = !0;
@@ -9832,7 +9831,7 @@ let Gn = class extends ge {
9832
9831
  );
9833
9832
  }
9834
9833
  _initEvents() {
9835
- this.disposeWithMe(nn(this._context.scene.onPointerMove$).pipe(Qi(30)).subscribe((o) => {
9834
+ this.disposeWithMe(on(this._context.scene.onPointerMove$).pipe(Qi(30)).subscribe((o) => {
9836
9835
  this._hoverCustomRanges$.next(
9837
9836
  this._calcActiveRanges(o)
9838
9837
  ), this._hoverBullet$.next(
@@ -9841,9 +9840,9 @@ let Gn = class extends ge {
9841
9840
  })), this.disposeWithMe(this._context.scene.onPointerEnter$.subscribeEvent(() => {
9842
9841
  this._hoverBullet$.next(null), this._hoverCustomRanges$.next([]);
9843
9842
  }));
9844
- const e = nn(this._context.mainComponent.onPointerDown$), t = nn(this._context.scene.onPointerUp$);
9843
+ const e = on(this._context.mainComponent.onPointerDown$), t = on(this._context.scene.onPointerUp$);
9845
9844
  this.disposeWithMe(e.pipe(
9846
- Wc((o) => t.pipe(zc(1), pn((s) => ({ down: o, up: s })))),
9845
+ Wc((o) => t.pipe(zc(1), mn((s) => ({ down: o, up: s })))),
9847
9846
  Un(({ down: o, up: s }) => o.target === s.target && s.timeStamp - o.timeStamp < 300)
9848
9847
  // filter(({ down, up }) => down.offsetX === up.offsetX && down.offsetY === up.offsetY)
9849
9848
  ).subscribe(({ down: o }) => {
@@ -9957,13 +9956,13 @@ let Gn = class extends ge {
9957
9956
  }
9958
9957
  };
9959
9958
  Gn = ph([
9960
- mh(1, j(ce))
9959
+ mh(1, j(Ae))
9961
9960
  ], Gn);
9962
- var Ih = Object.getOwnPropertyDescriptor, vh = (n, e, t, o) => {
9961
+ var Ih = Object.getOwnPropertyDescriptor, Ch = (n, e, t, o) => {
9963
9962
  for (var s = o > 1 ? void 0 : o ? Ih(e, t) : e, r = n.length - 1, i; r >= 0; r--)
9964
9963
  (i = n[r]) && (s = i(s) || s);
9965
9964
  return s;
9966
- }, yn = (n, e) => (t, o) => e(t, o, n);
9965
+ }, Tn = (n, e) => (t, o) => e(t, o, n);
9967
9966
  let cs = class extends ge {
9968
9967
  constructor(n, e, t, o, s) {
9969
9968
  super(), this._context = n, this._docSkeletonManagerService = e, this._commandService = t, this._docEventManagerService = o, this._textSelectionManagerService = s, this._initPointerDownObserver(), this._initHoverCursor();
@@ -9986,22 +9985,22 @@ let cs = class extends ge {
9986
9985
  );
9987
9986
  }
9988
9987
  _getTransformCoordForDocumentOffset(n, e, t, o) {
9989
- const { documentTransform: s } = n.getOffsetConfig(), r = e.transformVector2SceneCoord(cn.FromArray([t, o]));
9988
+ const { documentTransform: s } = n.getOffsetConfig(), r = e.transformVector2SceneCoord(An.FromArray([t, o]));
9990
9989
  if (r)
9991
9990
  return s.clone().invert().applyPoint(r);
9992
9991
  }
9993
9992
  };
9994
- cs = vh([
9995
- yn(1, j(ce)),
9996
- yn(2, T),
9997
- yn(3, j(Gn)),
9998
- yn(4, j(G))
9993
+ cs = Ch([
9994
+ Tn(1, j(Ae)),
9995
+ Tn(2, T),
9996
+ Tn(3, j(Gn)),
9997
+ Tn(4, j(G))
9999
9998
  ], cs);
10000
- var Ch = Object.getOwnPropertyDescriptor, Rh = (n, e, t, o) => {
10001
- for (var s = o > 1 ? void 0 : o ? Ch(e, t) : e, r = n.length - 1, i; r >= 0; r--)
9999
+ var vh = Object.getOwnPropertyDescriptor, Rh = (n, e, t, o) => {
10000
+ for (var s = o > 1 ? void 0 : o ? vh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10002
10001
  (i = n[r]) && (s = i(s) || s);
10003
10002
  return s;
10004
- }, Zt = (n, e) => (t, o) => e(t, o, n);
10003
+ }, $t = (n, e) => (t, o) => e(t, o, n);
10005
10004
  let Yn = class extends dt {
10006
10005
  constructor(n, e, t, o, s, r) {
10007
10006
  super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = s, this._editorService = r, this._init();
@@ -10024,11 +10023,11 @@ let Yn = class extends dt {
10024
10023
  }
10025
10024
  };
10026
10025
  Yn = Rh([
10027
- Zt(1, T),
10028
- Zt(2, vn),
10029
- Zt(3, j(Se)),
10030
- Zt(4, ms),
10031
- Zt(5, He)
10026
+ $t(1, T),
10027
+ $t(2, vn),
10028
+ $t(3, j(Se)),
10029
+ $t(4, ms),
10030
+ $t(5, He)
10032
10031
  ], Yn);
10033
10032
  var bh = Object.getOwnPropertyDescriptor, xh = (n, e, t, o) => {
10034
10033
  for (var s = o > 1 ? void 0 : o ? bh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -10038,7 +10037,7 @@ var bh = Object.getOwnPropertyDescriptor, xh = (n, e, t, o) => {
10038
10037
  const Oh = [
10039
10038
  fi,
10040
10039
  Ga,
10041
- Cs,
10040
+ vs,
10042
10041
  et
10043
10042
  ];
10044
10043
  let As = class extends ge {
@@ -10127,12 +10126,21 @@ let qn = class extends ge {
10127
10126
  const r = o.target.classList[0] || "";
10128
10127
  Ya(r, e) && o.stopPropagation();
10129
10128
  })
10130
- ), this._univerInstanceService.getAllUnitsForType(_.UNIVER_SHEET).forEach((o) => {
10131
- const s = o.getUnitId(), r = this._renderManagerService.getRenderById(s), i = r == null ? void 0 : r.engine.getCanvas().getCanvasEle();
10132
- i != null && Ue(i, "mousedown").subscribe((a) => {
10133
- a.stopPropagation();
10134
- });
10135
- });
10129
+ );
10130
+ const t = new rn();
10131
+ this.disposeWithMe(
10132
+ this._univerInstanceService.getCurrentTypeOfUnit$(_.UNIVER_SHEET).subscribe((o) => {
10133
+ if (t.dispose(), !o)
10134
+ return;
10135
+ const s = o.getUnitId(), r = this._renderManagerService.getRenderById(s), i = r == null ? void 0 : r.engine.getCanvas().getCanvasEle();
10136
+ if (i == null)
10137
+ return;
10138
+ const a = Ue(i, "mousedown").subscribe((c) => {
10139
+ c.stopPropagation();
10140
+ });
10141
+ t.add(a);
10142
+ })
10143
+ ), this.disposeWithMe(() => t.dispose());
10136
10144
  }
10137
10145
  /**
10138
10146
  * Listen to document edits to refresh the size of the formula editor.
@@ -10157,14 +10165,14 @@ qn = Th([
10157
10165
  xt(2, He),
10158
10166
  xt(3, T),
10159
10167
  xt(4, j(Se)),
10160
- xt(5, j(ce)),
10161
- xt(6, pe)
10168
+ xt(5, j(Ae)),
10169
+ xt(6, fe)
10162
10170
  ], qn);
10163
10171
  var Bh = Object.getOwnPropertyDescriptor, Mh = (n, e, t, o) => {
10164
10172
  for (var s = o > 1 ? void 0 : o ? Bh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10165
10173
  (i = n[r]) && (s = i(s) || s);
10166
10174
  return s;
10167
- }, Tn = (n, e) => (t, o) => e(t, o, n);
10175
+ }, Bn = (n, e) => (t, o) => e(t, o, n);
10168
10176
  let ls = class extends ge {
10169
10177
  constructor(e, t, o, s, r) {
10170
10178
  super();
@@ -10221,16 +10229,16 @@ let ls = class extends ge {
10221
10229
  }
10222
10230
  };
10223
10231
  ls = Mh([
10224
- Tn(1, j(Se)),
10225
- Tn(2, j(Ro)),
10226
- Tn(3, j(ce)),
10227
- Tn(4, T)
10232
+ Bn(1, j(Se)),
10233
+ Bn(2, j(Ro)),
10234
+ Bn(3, j(Ae)),
10235
+ Bn(4, T)
10228
10236
  ], ls);
10229
10237
  var _h = Object.getOwnPropertyDescriptor, Dh = (n, e, t, o) => {
10230
10238
  for (var s = o > 1 ? void 0 : o ? _h(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10231
10239
  (i = n[r]) && (s = i(s) || s);
10232
10240
  return s;
10233
- }, Bn = (n, e) => (t, o) => e(t, o, n);
10241
+ }, Mn = (n, e) => (t, o) => e(t, o, n);
10234
10242
  let ds = class extends ge {
10235
10243
  constructor(e, t, o, s, r) {
10236
10244
  super();
@@ -10252,7 +10260,7 @@ let ds = class extends ge {
10252
10260
  const { unitId: t } = this._context, { event: o, content: s = "", activeRange: r } = e, i = o, a = this._docSkeletonManagerService.getSkeleton();
10253
10261
  if (i.data == null || a == null || r == null)
10254
10262
  return;
10255
- const { segmentId: c } = r, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), d = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = Os((p = l == null ? void 0 : l.customRanges) != null ? p : [], r.endOffset, rn.includes(t)), g = co(l, r.endOffset, d, h, rn.includes(t)), f = ys((m = l == null ? void 0 : l.customDecorations) != null ? m : [], r.endOffset);
10263
+ const { segmentId: c } = r, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), d = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = Os((p = l == null ? void 0 : l.customRanges) != null ? p : [], r.endOffset, an.includes(t)), g = co(l, r.endOffset, d, h, an.includes(t)), f = ys((m = l == null ? void 0 : l.customDecorations) != null ? m : [], r.endOffset);
10256
10264
  await this._commandService.executeCommand(Vs.id, {
10257
10265
  unitId: t,
10258
10266
  body: {
@@ -10282,10 +10290,10 @@ let ds = class extends ge {
10282
10290
  }
10283
10291
  };
10284
10292
  ds = Dh([
10285
- Bn(1, j(Se)),
10286
- Bn(2, j(ce)),
10287
- Bn(3, T),
10288
- Bn(4, j(Ze))
10293
+ Mn(1, j(Se)),
10294
+ Mn(2, j(Ae)),
10295
+ Mn(3, T),
10296
+ Mn(4, j(Ze))
10289
10297
  ], ds);
10290
10298
  class ar extends ge {
10291
10299
  constructor(e) {
@@ -10319,7 +10327,7 @@ let us = class extends ge {
10319
10327
  }
10320
10328
  _initResize() {
10321
10329
  this.disposeWithMe(
10322
- nn(this._context.engine.onTransformChange$).pipe(
10330
+ on(this._context.engine.onTransformChange$).pipe(
10323
10331
  Un((n) => n.type === yi.resize),
10324
10332
  Qi(0, jc)
10325
10333
  ).subscribe(() => {
@@ -10385,7 +10393,7 @@ let hs = class extends ge {
10385
10393
  const c = this._docSkeletonManagerService.getSkeleton(), { offsetX: A, offsetY: l } = r, d = this._getTransformCoordForDocumentOffset(A, l);
10386
10394
  if (d != null) {
10387
10395
  const {
10388
- pageLayoutType: h = An.VERTICAL,
10396
+ pageLayoutType: h = ln.VERTICAL,
10389
10397
  pageMarginLeft: u,
10390
10398
  pageMarginTop: g
10391
10399
  } = o.getOffsetConfig(), { editArea: f } = c.findEditAreaByCoord(
@@ -10394,7 +10402,7 @@ let hs = class extends ge {
10394
10402
  u,
10395
10403
  g
10396
10404
  ), p = this._docSkeletonManagerService.getViewModel(), m = p.getEditArea();
10397
- m !== fe.BODY && f !== fe.BODY && f !== m && p.setEditArea(f);
10405
+ m !== me.BODY && f !== me.BODY && f !== m && p.setEditArea(f);
10398
10406
  }
10399
10407
  if (this._docSelectionRenderService.__onPointDown(r), this._editorService.getEditor(e)) {
10400
10408
  this._setEditorFocus(e);
@@ -10414,7 +10422,7 @@ let hs = class extends ge {
10414
10422
  const o = at(this._context), { document: s, scene: r } = o, { documentTransform: i } = s.getOffsetConfig(), a = r.getViewports()[0];
10415
10423
  if (a == null)
10416
10424
  return;
10417
- const c = a.transformVector2SceneCoord(cn.FromArray([e, t]));
10425
+ const c = a.transformVector2SceneCoord(An.FromArray([e, t]));
10418
10426
  return i.clone().invert().applyPoint(c);
10419
10427
  }
10420
10428
  _isEditorReadOnly(e) {
@@ -10463,7 +10471,7 @@ hs = Qh([
10463
10471
  Ot(2, He),
10464
10472
  Ot(3, N),
10465
10473
  Ot(4, j(Se)),
10466
- Ot(5, j(ce)),
10474
+ Ot(5, j(Ae)),
10467
10475
  Ot(6, j(G))
10468
10476
  ], hs);
10469
10477
  var Uh = Object.getOwnPropertyDescriptor, Lh = (n, e, t, o) => {
@@ -10481,7 +10489,7 @@ let gs = class extends ge {
10481
10489
  return;
10482
10490
  const { unitId: e, scene: t } = this._context;
10483
10491
  this._editorService.isEditor(e) || this.disposeWithMe(t.onMouseWheel$.subscribeEvent((o) => {
10484
- if (!o.ctrlKey || !this._contextService.getContextValue(fn))
10492
+ if (!o.ctrlKey || !this._contextService.getContextValue(pn))
10485
10493
  return;
10486
10494
  const s = this._univerInstanceService.getCurrentUniverDocInstance();
10487
10495
  if (!s)
@@ -10520,7 +10528,7 @@ let gs = class extends ge {
10520
10528
  }
10521
10529
  })), this.disposeWithMe(
10522
10530
  this._commandService.beforeCommandExecuted((e) => {
10523
- e.id === vo.id && this._commandService.executeCommand(rs.id, {
10531
+ e.id === Co.id && this._commandService.executeCommand(rs.id, {
10524
10532
  zoomRatio: 1,
10525
10533
  unitId: this._context.unitId
10526
10534
  });
@@ -10535,7 +10543,7 @@ let gs = class extends ge {
10535
10543
  };
10536
10544
  gs = Lh([
10537
10545
  pt(1, ms),
10538
- pt(2, j(ce)),
10546
+ pt(2, j(Ae)),
10539
10547
  pt(3, N),
10540
10548
  pt(4, T),
10541
10549
  pt(5, j(G)),
@@ -10546,7 +10554,7 @@ var Fh = Object.getOwnPropertyDescriptor, Hh = (n, e, t, o) => {
10546
10554
  for (var s = o > 1 ? void 0 : o ? Fh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10547
10555
  (i = n[r]) && (s = i(s) || s);
10548
10556
  return s;
10549
- }, $t = (n, e) => (t, o) => e(t, o, n);
10557
+ }, en = (n, e) => (t, o) => e(t, o, n);
10550
10558
  const di = 300;
10551
10559
  let Kn = class extends dt {
10552
10560
  constructor(e, t, o, s, r) {
@@ -10668,11 +10676,11 @@ let Kn = class extends dt {
10668
10676
  }
10669
10677
  };
10670
10678
  Kn = Hh([
10671
- $t(0, j(eo)),
10672
- $t(1, T),
10673
- $t(2, N),
10674
- $t(3, j(Za)),
10675
- $t(4, pe)
10679
+ en(0, j(eo)),
10680
+ en(1, T),
10681
+ en(2, N),
10682
+ en(3, j(Za)),
10683
+ en(4, fe)
10676
10684
  ], Kn);
10677
10685
  var kh = Object.getOwnPropertyDescriptor, Vh = (n, e, t, o) => {
10678
10686
  for (var s = o > 1 ? void 0 : o ? kh(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -10692,7 +10700,7 @@ let Xn = class extends dt {
10692
10700
  const e = n.getUnitId(), t = (o = this._instanceSrv.getCurrentUnitForType(_.UNIVER_DOC)) == null ? void 0 : o.getUnitId();
10693
10701
  this._renderManagerService.created$.subscribe((s) => {
10694
10702
  s.unitId === t && (s.engine.getCanvas().setId(hi), s.engine.getCanvas().getContext().setId(hi));
10695
- }), this._renderManagerService.has(e) || (this._createRenderWithId(e), this._renderManagerService.setCurrent(e));
10703
+ }), this._renderManagerService.has(e) || this._createRenderWithId(e);
10696
10704
  }
10697
10705
  _createRenderWithId(n) {
10698
10706
  this._renderManagerService.createRender(n);
@@ -10704,7 +10712,7 @@ let Xn = class extends dt {
10704
10712
  };
10705
10713
  Xn = Vh([
10706
10714
  ui(0, N),
10707
- ui(1, pe)
10715
+ ui(1, fe)
10708
10716
  ], Xn);
10709
10717
  class Wh extends ge {
10710
10718
  constructor() {
@@ -10739,7 +10747,7 @@ class Wh extends ge {
10739
10747
  const zh = Es(
10740
10748
  "univer.range-selector.service"
10741
10749
  ), jh = {
10742
- id: un.id,
10750
+ id: hn.id,
10743
10751
  preconditions: ul,
10744
10752
  binding: W.ENTER
10745
10753
  }, Gh = {
@@ -10807,15 +10815,15 @@ const zh = Es(
10807
10815
  direction: ie.RIGHT
10808
10816
  }
10809
10817
  }, ng = {
10810
- id: Ca.id,
10818
+ id: va.id,
10811
10819
  binding: W.A | K.CTRL_COMMAND,
10812
- preconditions: (n) => n.getContextValue(Is) && (n.getContextValue(fn) || n.getContextValue(Qn))
10820
+ preconditions: (n) => n.getContextValue(Is) && (n.getContextValue(pn) || n.getContextValue(Qn))
10813
10821
  };
10814
10822
  var og = Object.defineProperty, sg = Object.getOwnPropertyDescriptor, rg = (n, e, t) => e in n ? og(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ig = (n, e, t, o) => {
10815
10823
  for (var s = o > 1 ? void 0 : o ? sg(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10816
10824
  (i = n[r]) && (s = i(s) || s);
10817
10825
  return s;
10818
- }, en = (n, e) => (t, o) => e(t, o, n), ag = (n, e, t) => rg(n, e + "", t);
10826
+ }, tn = (n, e) => (t, o) => e(t, o, n), ag = (n, e, t) => rg(n, e + "", t);
10819
10827
  let fs = class extends Ka {
10820
10828
  // static override type = UniverInstanceType.UNIVER_DOC;
10821
10829
  constructor(n = Yr, e, t, o, s, r) {
@@ -10837,7 +10845,7 @@ let fs = class extends Ka {
10837
10845
  this._initUI(), this._initRenderModules(), fr(this._injector, [
10838
10846
  [Wn],
10839
10847
  [zn],
10840
- [Ft],
10848
+ [Ht],
10841
10849
  [jn],
10842
10850
  // FIXME: LifecycleStages.Rendered must be used, otherwise the menu cannot be added to the DOM, but the sheet ui
10843
10851
  // plugin can be added in LifecycleStages.Ready
@@ -10848,28 +10856,28 @@ let fs = class extends Ka {
10848
10856
  [
10849
10857
  So,
10850
10858
  da,
10851
- zt,
10852
10859
  jt,
10853
10860
  Gt,
10854
10861
  Yt,
10855
- vt,
10856
10862
  qt,
10857
- Pt,
10863
+ Ct,
10864
+ Kt,
10858
10865
  wt,
10859
10866
  Nt,
10860
- mn,
10861
10867
  Qt,
10868
+ En,
10869
+ Ut,
10862
10870
  ut,
10863
10871
  ma,
10864
10872
  Vs,
10865
- hn,
10873
+ gn,
10866
10874
  Ws,
10867
10875
  la,
10868
10876
  zs,
10869
10877
  qe,
10870
10878
  ho,
10871
10879
  uo,
10872
- En,
10880
+ Sn,
10873
10881
  go,
10874
10882
  fo,
10875
10883
  po,
@@ -10884,27 +10892,27 @@ let fs = class extends Ka {
10884
10892
  or,
10885
10893
  Xs,
10886
10894
  Js,
10887
- Cn,
10895
+ Rn,
10888
10896
  Ds,
10889
10897
  ba,
10890
- Dt,
10898
+ Pt,
10891
10899
  Ao,
10892
- un,
10900
+ hn,
10893
10901
  ts,
10894
10902
  lo,
10895
10903
  ws,
10896
10904
  Ns,
10897
10905
  ra,
10898
10906
  Ra,
10899
- vo,
10907
+ Co,
10900
10908
  Ke,
10901
10909
  Aa,
10902
- Ut,
10910
+ Lt,
10903
10911
  iA,
10904
10912
  Ui,
10905
10913
  aA,
10906
10914
  rs,
10907
- Ca,
10915
+ va,
10908
10916
  rr,
10909
10917
  At,
10910
10918
  lt,
@@ -10941,7 +10949,7 @@ let fs = class extends Ka {
10941
10949
  [jn],
10942
10950
  [zn],
10943
10951
  [Vn],
10944
- [Ft],
10952
+ [Ht],
10945
10953
  [He, { useClass: Jo }],
10946
10954
  [zh, { useClass: Wh }],
10947
10955
  [vn, { useClass: os }],
@@ -10968,7 +10976,7 @@ let fs = class extends Ka {
10968
10976
  }
10969
10977
  _initRenderBasics() {
10970
10978
  [
10971
- [ce],
10979
+ [Ae],
10972
10980
  [Se],
10973
10981
  [$a],
10974
10982
  [ar],
@@ -11000,11 +11008,11 @@ let fs = class extends Ka {
11000
11008
  ag(fs, "pluginName", $c);
11001
11009
  fs = ig([
11002
11010
  qa(mc),
11003
- en(1, j(so)),
11004
- en(2, pe),
11005
- en(3, T),
11006
- en(4, ps),
11007
- en(5, Rs)
11011
+ tn(1, j(so)),
11012
+ tn(2, fe),
11013
+ tn(3, T),
11014
+ tn(4, ps),
11015
+ tn(5, Rs)
11008
11016
  ], fs);
11009
11017
  export {
11010
11018
  Ao as AfterSpaceCommand,
@@ -11016,12 +11024,12 @@ export {
11016
11024
  ma as BreakLineCommand,
11017
11025
  uo as BulletListCommand,
11018
11026
  ts as ChangeListNestingLevelCommand,
11019
- wn as ChangeListNestingLevelType,
11027
+ Nn as ChangeListNestingLevelType,
11020
11028
  lo as ChangeListTypeCommand,
11021
11029
  ws as CheckListCommand,
11022
11030
  aA as CoverContentCommand,
11023
11031
  Ea as CreateDocTableCommand,
11024
- Ut as CutContentCommand,
11032
+ Lt as CutContentCommand,
11025
11033
  eA as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
11026
11034
  Or as DOCS_COMPONENT_DEFAULT_Z_INDEX,
11027
11035
  tA as DOCS_COMPONENT_HEADER_LAYER_INDEX,
@@ -11031,7 +11039,7 @@ export {
11031
11039
  ii as DOC_VERTICAL_PADDING,
11032
11040
  Zc as DefaultDocContainerConfig,
11033
11041
  Jc as DefaultToolbarConfig,
11034
- hn as DeleteCommand,
11042
+ gn as DeleteCommand,
11035
11043
  Ws as DeleteCustomBlockCommand,
11036
11044
  So as DeleteLeftCommand,
11037
11045
  da as DeleteRightCommand,
@@ -11045,12 +11053,12 @@ export {
11045
11053
  Ro as DocIMEInputManagerService,
11046
11054
  Ks as DocPasteCommand,
11047
11055
  ss as DocRenderController,
11048
- Ca as DocSelectAllCommand,
11056
+ va as DocSelectAllCommand,
11049
11057
  Se as DocSelectionRenderService,
11050
11058
  Kn as DocStateChangeManagerService,
11051
11059
  Js as DocTableDeleteColumnsCommand,
11052
11060
  Xs as DocTableDeleteRowsCommand,
11053
- Cn as DocTableDeleteTableCommand,
11061
+ Rn as DocTableDeleteTableCommand,
11054
11062
  xd as DocTableInsertColumnCommand,
11055
11063
  nr as DocTableInsertColumnLeftCommand,
11056
11064
  or as DocTableInsertColumnRightCommand,
@@ -11064,14 +11072,14 @@ export {
11064
11072
  bA as Editor,
11065
11073
  rd as EditorInsertTextCommandId,
11066
11074
  Jo as EditorService,
11067
- un as EnterCommand,
11075
+ hn as EnterCommand,
11068
11076
  vn as IDocClipboardService,
11069
11077
  He as IEditorService,
11070
11078
  Ra as IMEInputCommand,
11071
11079
  zh as IRangeSelectorService,
11072
11080
  Aa as InnerPasteCommand,
11073
11081
  Vs as InsertCommand,
11074
- En as ListOperationCommand,
11082
+ Sn as ListOperationCommand,
11075
11083
  zs as MergeTwoParagraphCommand,
11076
11084
  At as MoveCursorOperation,
11077
11085
  lt as MoveSelectionOperation,
@@ -11088,37 +11096,37 @@ export {
11088
11096
  iA as ReplaceContentCommand,
11089
11097
  Ui as ReplaceSnapshotCommand,
11090
11098
  AA as ReplaceTextRunsCommand,
11091
- mn as ResetInlineFormatTextBackgroundColorCommand,
11099
+ En as ResetInlineFormatTextBackgroundColorCommand,
11092
11100
  Og as RichTextEditor,
11093
11101
  rs as SetDocZoomRatioCommand,
11094
11102
  qe as SetDocZoomRatioOperation,
11095
- zt as SetInlineFormatBoldCommand,
11103
+ jt as SetInlineFormatBoldCommand,
11096
11104
  ut as SetInlineFormatCommand,
11097
- wt as SetInlineFormatFontFamilyCommand,
11098
- Pt as SetInlineFormatFontSizeCommand,
11099
- jt as SetInlineFormatItalicCommand,
11100
- Yt as SetInlineFormatStrikethroughCommand,
11101
- vt as SetInlineFormatSubscriptCommand,
11102
- qt as SetInlineFormatSuperscriptCommand,
11103
- Qt as SetInlineFormatTextBackgroundColorCommand,
11104
- Nt as SetInlineFormatTextColorCommand,
11105
- Gt as SetInlineFormatUnderlineCommand,
11105
+ Nt as SetInlineFormatFontFamilyCommand,
11106
+ wt as SetInlineFormatFontSizeCommand,
11107
+ Gt as SetInlineFormatItalicCommand,
11108
+ qt as SetInlineFormatStrikethroughCommand,
11109
+ Ct as SetInlineFormatSubscriptCommand,
11110
+ Kt as SetInlineFormatSuperscriptCommand,
11111
+ Ut as SetInlineFormatTextBackgroundColorCommand,
11112
+ Qt as SetInlineFormatTextColorCommand,
11113
+ Yt as SetInlineFormatUnderlineCommand,
11106
11114
  qo as TEXT_RANGE_LAYER_INDEX,
11107
- Dt as TabCommand,
11108
- Mt as TextRange,
11115
+ Pt as TabCommand,
11116
+ _t as TextRange,
11109
11117
  Ns as ToggleCheckListCommand,
11110
11118
  fs as UniverDocsUIPlugin,
11111
11119
  la as UpdateCommand,
11112
11120
  Je as VIEWPORT_KEY,
11113
- vg as addCustomDecorationBySelectionFactory,
11121
+ Cg as addCustomDecorationBySelectionFactory,
11114
11122
  oA as addCustomDecorationFactory,
11115
11123
  ko as calcDocRangePositions,
11116
11124
  Mo as convertPositionsToRectRanges,
11117
- Cg as deleteCustomDecorationFactory,
11125
+ vg as deleteCustomDecorationFactory,
11118
11126
  bg as docDrawingPositionToTransform,
11119
11127
  ia as genTableSource,
11120
11128
  pa as generateParagraphs,
11121
- Dn as getAnchorBounding,
11129
+ Pn as getAnchorBounding,
11122
11130
  IA as getCanvasOffsetByEngine,
11123
11131
  ke as getCommandSkeleton,
11124
11132
  js as getCursorWhenDelete,
@@ -11131,7 +11139,7 @@ export {
11131
11139
  Bs as getLineBounding,
11132
11140
  yr as getOneTextSelectionRange,
11133
11141
  Qs as getParagraphsInRange,
11134
- Sn as getParagraphsInRanges,
11142
+ In as getParagraphsInRanges,
11135
11143
  ue as getRichTextEditPath,
11136
11144
  ks as getTableColumn,
11137
11145
  Rg as hasParagraphInTable,