@univerjs/docs-ui 0.10.7-nightly.202509090319 → 0.10.7-nightly.202509130640

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,22 +1,22 @@
1
1
  var Mc = Object.defineProperty;
2
2
  var _c = (n, e, t) => e in n ? Mc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var O = (n, e, t) => _c(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { IUniverInstanceService as L, Inject as j, Disposable as me, toDisposable as _n, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as ft, ObjectRelativeFromH as Ro, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as ye, UpdateDocsAttributeType as on, Tools as ue, generateRandomId as ge, TableRowHeightRule as Dc, TableSizeType as Yi, TableTextWrapType as Pc, TableAlignmentType as wc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as In, PositionedObjectLayoutType as bo, BlockType as Nc, LRUMap as Lc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Us, DrawingTypeEnum as Nr, skipParseTagNames as Qc, CustomRangeType as Lr, DataStreamTreeNodeType as an, createIdentifier as Ki, ILogService as Qr, SliceBodyType as ir, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as yo, DOC_RANGE_TYPE as He, normalizeBody as Uc, getBodySlice as qi, FOCUSING_DOC as Dn, EDITOR_ACTIVATED as to, DashStyleType as Fc, RxDisposable as Ct, ThemeService as Ur, IUndoRedoService as xo, PRESET_LIST_TYPE as Hc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as fn, Rectangle as kc, DocumentFlavor as we, LocaleService as Ke, isInternalEditorID as Rt, IContextService as Fr, Injector as Pn, FOCUSING_EDITOR_STANDALONE as Fs, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Xi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ot, DEFAULT_STYLES as Hr, NAMED_STYLE_MAP as zc, DisposableCollection as Sn, fromEventSubject as Mt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as kr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as no, debounce as Vr, SpacingRule as Xt, IConfigService as Wr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
4
+ import { IUniverInstanceService as L, Inject as j, Disposable as me, toDisposable as _n, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as ft, ObjectRelativeFromH as Ro, CommandType as D, sequenceExecuteAsync as Nr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as ye, UpdateDocsAttributeType as on, Tools as ue, generateRandomId as ge, TableRowHeightRule as Dc, TableSizeType as Yi, TableTextWrapType as wc, TableAlignmentType as Pc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as In, PositionedObjectLayoutType as bo, BlockType as Nc, LRUMap as Lc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Us, DrawingTypeEnum as Lr, skipParseTagNames as Qc, CustomRangeType as Qr, DataStreamTreeNodeType as an, createIdentifier as Ki, ILogService as Ur, SliceBodyType as ar, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as yo, DOC_RANGE_TYPE as He, normalizeBody as Uc, getBodySlice as qi, FOCUSING_DOC as Dn, EDITOR_ACTIVATED as to, DashStyleType as Fc, RxDisposable as Rt, ThemeService as Fr, IUndoRedoService as xo, PRESET_LIST_TYPE as Hc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as fn, Rectangle as kc, DocumentFlavor as Pe, LocaleService as Ke, isInternalEditorID as bt, IContextService as Hr, Injector as wn, FOCUSING_EDITOR_STANDALONE as Fs, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Xi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as cr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ot, DEFAULT_STYLES as Oo, NAMED_STYLE_MAP as zc, DisposableCollection as Sn, fromEventSubject as _t, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as kr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as no, debounce as Vr, SpacingRule as Xt, IConfigService as Wr, QuickListTypeMap as zo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
5
5
  import { DocSelectionManagerService as Y, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Le, DocStateEmitService as tl, DocInterceptorService as nl } from "@univerjs/docs";
6
- import { IRenderManagerService as fe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as js, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as vn, getColor as pn, RegularPolygon as ta, Rect as qn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as _t, getSystemHighlightColor as Al, Vector2 as Cn, PageLayoutType as Rn, Shape as ul, Path as zs, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as rn, Viewport as hl, ScrollBar as lr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
7
- import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as yl, PasteCommand as xl, ILayoutService as Oo, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as sn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_LIST as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_FAMILY_ITEM_COMPONENT as Bl, FONT_SIZE_LIST as Ml, FONT_SIZE_COMPONENT as _l, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as Dl, HEADING_ITEM_COMPONENT as Pl, ICanvasPopupService as wl, IMenuManagerService as Aa, ToolbarItem as Nl, MenuManagerPosition as Ll, useObservable as tt, RectPopup as Ql, DesktopMenu as Ul, ContextMenuPosition as oo, MetaKeys as te, Slider as Fl, useConfigValue as ua, useEvent as En, ContextMenuGroup as cn, RibbonInsertGroup as Hl, RibbonStartGroup as Ks, IUIPartsService as kl, IShortcutService as To, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as Vl, IContextMenuService as Wl } from "@univerjs/ui";
6
+ import { IRenderManagerService as pe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as lr, getTableIdAndSliceIndex as js, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as vn, getColor as pn, RegularPolygon as ta, Rect as qn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as Dt, getSystemHighlightColor as Al, Vector2 as Cn, PageLayoutType as Rn, Shape as ul, Path as zs, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as rn, Viewport as hl, ScrollBar as dr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
7
+ import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as yl, PasteCommand as xl, ILayoutService as To, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as sn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_LIST as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_FAMILY_ITEM_COMPONENT as Bl, FONT_SIZE_LIST as Ml, FONT_SIZE_COMPONENT as _l, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as Dl, HEADING_ITEM_COMPONENT as wl, ICanvasPopupService as Pl, IMenuManagerService as Aa, ToolbarItem as Nl, MenuManagerPosition as Ll, useObservable as tt, RectPopup as Ql, DesktopMenu as Ul, ContextMenuPosition as oo, MetaKeys as te, Slider as Fl, useConfigValue as ua, useEvent as En, ContextMenuGroup as cn, RibbonInsertGroup as Hl, RibbonStartGroup as Ks, IUIPartsService as kl, IShortcutService as Bo, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as Vl, IContextMenuService as Wl } from "@univerjs/ui";
8
8
  import { ImageSourceType as jr } from "@univerjs/drawing";
9
- import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as ro, takeUntil as pt, fromEvent as ze, Observable as pe, map as wn, combineLatest as Nn, distinctUntilChanged as Wt, throttleTime as bn, switchMap as jl, take as zl, first as Gl, of as Yl, animationFrameScheduler as Kl } from "rxjs";
10
- import { filter as dr, bufferTime as ql, map as Xl } from "rxjs/operators";
9
+ import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as ro, takeUntil as pt, fromEvent as ze, Observable as fe, map as Pn, combineLatest as Nn, distinctUntilChanged as Wt, throttleTime as bn, switchMap as jl, take as zl, first as Gl, of as Yl, animationFrameScheduler as Kl } from "rxjs";
10
+ import { filter as Ar, bufferTime as ql, map as Xl } from "rxjs/operators";
11
11
  import { jsxs as re, jsx as Q, Fragment as Zl } from "react/jsx-runtime";
12
12
  import { forwardRef as Te, useRef as ke, createElement as Be, useState as Ee, useEffect as Ce, useMemo as _e, useCallback as ga, useImperativeHandle as Jl, useLayoutEffect as fa } from "react";
13
- import { Checkbox as Zs, InputNumber as it, Button as $l, clsx as Ge, borderClassName as Ln, Select as pa, scrollbarClassName as ed, Tooltip as td } from "@univerjs/design";
13
+ import { Checkbox as Zs, InputNumber as at, Button as $l, clsx as Ge, borderClassName as Ln, Select as pa, scrollbarClassName as ed, Tooltip as td } from "@univerjs/design";
14
14
  var nd = Object.getOwnPropertyDescriptor, od = (n, e, t, o) => {
15
15
  for (var r = o > 1 ? void 0 : o ? nd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
16
16
  (i = n[s]) && (r = i(r) || r);
17
17
  return r;
18
18
  }, Js = (n, e) => (t, o) => e(t, o, n);
19
- let Dt = class extends me {
19
+ let wt = class extends me {
20
20
  constructor(e, t) {
21
21
  super();
22
22
  O(this, "_matches", /* @__PURE__ */ new Map());
@@ -53,10 +53,10 @@ let Dt = class extends me {
53
53
  return [];
54
54
  }
55
55
  };
56
- Dt = od([
56
+ wt = od([
57
57
  Js(0, L),
58
58
  Js(1, j(Y))
59
- ], Dt);
59
+ ], wt);
60
60
  const rd = {
61
61
  undo: !0,
62
62
  redo: !0,
@@ -100,7 +100,7 @@ const rd = {
100
100
  toolbar: !0
101
101
  }, id = "DOC_UI_PLUGIN";
102
102
  var et = /* @__PURE__ */ ((n) => (n.MAIN = "__Document_Render_Main__", n.BACKGROUND = "__Document_Render_Background__", n))(et || {}), je = /* @__PURE__ */ ((n) => (n.VIEW_MAIN = "viewMain", n.VIEW_TOP = "viewTop", n.VIEW_LEFT = "viewLeft", n.VIEW_LEFT_TOP = "viewLeftTop", n))(je || {});
103
- const ad = 0, zo = 2, cd = 4, $s = 10, Yf = "normalTextSelectionPluginName";
103
+ const ad = 0, Go = 2, cd = 4, $s = 10, Yf = "normalTextSelectionPluginName";
104
104
  function mt(n) {
105
105
  const { mainComponent: e, scene: t, engine: o, components: r } = n, s = e, i = r.get(et.BACKGROUND);
106
106
  return {
@@ -187,7 +187,7 @@ function Xf(n, e) {
187
187
  function Zf(n, e) {
188
188
  return e.some((t) => n.startIndex > t.startIndex && n.startIndex < t.endIndex);
189
189
  }
190
- function Bo(n, e, t, o, r) {
190
+ function Mo(n, e, t, o, r) {
191
191
  const { textRuns: s = [], dataStream: i } = n, a = r && i.startsWith("="), c = {
192
192
  st: 0,
193
193
  ed: 0,
@@ -254,29 +254,29 @@ const Ad = "doc.command.tab", Jt = {
254
254
  id: Ad,
255
255
  type: D.COMMAND,
256
256
  async handler(n, e) {
257
- const o = n.get(Dt).onAutoFormat(Jt.id, e);
258
- return (await wr(o, n.get(T))).result;
257
+ const o = n.get(wt).onAutoFormat(Jt.id, e);
258
+ return (await Nr(o, n.get(T))).result;
259
259
  }
260
- }, ud = "doc.command.after-space", Mo = {
260
+ }, ud = "doc.command.after-space", _o = {
261
261
  id: ud,
262
262
  type: D.COMMAND,
263
263
  async handler(n) {
264
- const t = n.get(Dt).onAutoFormat(Mo.id);
265
- return (await wr(t, n.get(T))).result;
264
+ const t = n.get(wt).onAutoFormat(_o.id);
265
+ return (await Nr(t, n.get(T))).result;
266
266
  }
267
267
  }, yn = {
268
268
  id: "doc.command.enter",
269
269
  type: D.COMMAND,
270
270
  async handler(n) {
271
- const t = n.get(Dt).onAutoFormat(yn.id);
272
- return (await wr(t, n.get(T))).result;
271
+ const t = n.get(wt).onAutoFormat(yn.id);
272
+ return (await Nr(t, n.get(T))).result;
273
273
  }
274
274
  };
275
275
  var hd = Object.getOwnPropertyDescriptor, gd = (n, e, t, o) => {
276
276
  for (var r = o > 1 ? void 0 : o ? hd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
277
277
  (i = n[s]) && (r = i(r) || r);
278
278
  return r;
279
- }, Go = (n, e) => (t, o) => e(t, o, n);
279
+ }, Yo = (n, e) => (t, o) => e(t, o, n);
280
280
  const fd = 11, pd = 9, Vn = {
281
281
  /**
282
282
  * fontFamily
@@ -287,7 +287,7 @@ const fd = 11, pd = 9, Vn = {
287
287
  */
288
288
  fs: fd
289
289
  };
290
- let at = class extends me {
290
+ let ct = class extends me {
291
291
  constructor(e, t, o) {
292
292
  super();
293
293
  O(this, "_cacheStyle", null);
@@ -333,14 +333,14 @@ let at = class extends me {
333
333
  this._cacheStyle = null;
334
334
  }
335
335
  };
336
- at = gd([
337
- Go(0, j(Y)),
338
- Go(1, L),
339
- Go(2, fe)
340
- ], at);
336
+ ct = gd([
337
+ Yo(0, j(Y)),
338
+ Yo(1, L),
339
+ Yo(2, pe)
340
+ ], ct);
341
341
  function qe(n, e) {
342
342
  var o;
343
- return (o = n.get(fe).getRenderById(e)) == null ? void 0 : o.with(de);
343
+ return (o = n.get(pe).getRenderById(e)) == null ? void 0 : o.with(de);
344
344
  }
345
345
  function Ae(n, e = "") {
346
346
  if (!e)
@@ -374,7 +374,7 @@ const Yr = {
374
374
  // eslint-disable-next-line max-lines-per-function, complexity
375
375
  handler: (n, e) => {
376
376
  var N, ee, $, U, H;
377
- const t = n.get(Y), o = n.get(L), r = n.get(T), s = n.get(at), i = (N = e == null ? void 0 : e.textRange) != null ? N : t.getActiveTextRange(), a = t.getRectRanges();
377
+ const t = n.get(Y), o = n.get(L), r = n.get(T), s = n.get(ct), i = (N = e == null ? void 0 : e.textRange) != null ? N : t.getActiveTextRange(), a = t.getRectRanges();
378
378
  if (i == null)
379
379
  return !1;
380
380
  if (a && a.length) {
@@ -390,7 +390,7 @@ const Yr = {
390
390
  const h = l.getUnitId(), { startOffset: u, endOffset: g } = i, p = ((ee = A.paragraphs) != null ? ee : []).find((k) => k.startIndex >= u);
391
391
  if (!p)
392
392
  return !1;
393
- const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R = Bo(A, g, S, v), E = {
393
+ const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R = Mo(A, g, S, v), E = {
394
394
  dataStream: V.PARAGRAPH,
395
395
  paragraphs: ma(
396
396
  V.PARAGRAPH,
@@ -425,7 +425,7 @@ const Yr = {
425
425
  textRanges: B,
426
426
  debounce: !0
427
427
  }
428
- }, M = new Ie(), P = W.getInstance();
428
+ }, M = new Ie(), w = W.getInstance();
429
429
  if (y)
430
430
  u > 0 && M.push({
431
431
  t: G.RETAIN,
@@ -472,10 +472,10 @@ const Yr = {
472
472
  collapsed: y
473
473
  }];
474
474
  const F = Ae(l, d);
475
- return x.params.actions = P.editOp(M.serialize(), F), !!r.syncExecuteCommand(x.id, x.params);
475
+ return x.params.actions = w.editOp(M.serialize(), F), !!r.syncExecuteCommand(x.id, x.params);
476
476
  }
477
477
  };
478
- var _o = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(_o || {}), Kr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Kr || {});
478
+ var Do = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(Do || {}), Kr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Kr || {});
479
479
  function md(n, e) {
480
480
  let t = V.TABLE_START;
481
481
  const o = [], r = [];
@@ -545,11 +545,11 @@ function Ea(n, e, t) {
545
545
  tableRows: s,
546
546
  tableColumns: i,
547
547
  tableId: a,
548
- align: wc.START,
548
+ align: Pc.START,
549
549
  indent: {
550
550
  v: 0
551
551
  },
552
- textWrap: Pc.NONE,
552
+ textWrap: wc.NONE,
553
553
  position: {
554
554
  positionH: {
555
555
  relativeFrom: Ro.PAGE,
@@ -881,7 +881,7 @@ function bd(n, e) {
881
881
  rowCount: c.children.length
882
882
  };
883
883
  }
884
- var Ar = /* @__PURE__ */ ((n) => (n[n.NEXT = 0] = "NEXT", n[n.PREV = 1] = "PREV", n))(Ar || {});
884
+ var ur = /* @__PURE__ */ ((n) => (n[n.NEXT = 0] = "NEXT", n[n.PREV = 1] = "PREV", n))(ur || {});
885
885
  function ei(n, e, t) {
886
886
  const { startOffset: o } = e;
887
887
  let r = null;
@@ -951,7 +951,7 @@ const Od = In, va = {
951
951
  type: D.COMMAND,
952
952
  // eslint-disable-next-line max-lines-per-function, complexity
953
953
  handler: async (n, e) => {
954
- var C, B, x, M, P, F;
954
+ var C, B, x, M, w, F;
955
955
  const { segmentId: t, textRanges: o, doc: r } = e, s = n.get(T), i = n.get(Y), a = n.get(L), c = i.getTextRanges(), d = i.getRectRanges(), { body: l, tableSource: A, drawings: h } = r;
956
956
  if (!Array.isArray(c) || c.length === 0 || l == null)
957
957
  return !1;
@@ -971,29 +971,29 @@ const Od = In, va = {
971
971
  const I = new Ie(), S = W.getInstance(), v = [], R = !!((C = l.tables) != null && C.length), E = !!((B = l.customBlocks) != null && B.length);
972
972
  if (R && t || R && xd(c) || c.length && (d != null && d.length))
973
973
  return !1;
974
- for (let w = 0; w < c.length; w++) {
975
- const N = c[w], { startOffset: ee, endOffset: $, collapsed: U } = N, H = ee - m.cursor, k = ue.deepClone(l);
974
+ for (let P = 0; P < c.length; P++) {
975
+ const N = c[P], { startOffset: ee, endOffset: $, collapsed: U } = N, H = ee - m.cursor, k = ue.deepClone(l);
976
976
  if (R)
977
977
  for (const ae of k.tables) {
978
978
  const { tableId: oe } = ae, he = ge(6);
979
979
  ae.tableId = he;
980
- const Pe = ue.deepClone(A[oe]);
981
- Pe.tableId = he;
982
- const Je = S.insertOp(["tableSource", he], Pe);
980
+ const we = ue.deepClone(A[oe]);
981
+ we.tableId = he;
982
+ const Je = S.insertOp(["tableSource", he], we);
983
983
  v.push(Je);
984
984
  }
985
985
  if (E && h) {
986
986
  const ae = (M = (x = u.getSnapshot().drawingsOrder) == null ? void 0 : x.length) != null ? M : 0;
987
987
  for (const oe of k.customBlocks) {
988
- const { blockId: he } = oe, Pe = ge(6);
989
- oe.blockId = Pe;
988
+ const { blockId: he } = oe, we = ge(6);
989
+ oe.blockId = we;
990
990
  const Je = ue.deepClone(h[he]);
991
- Je.drawingId = Pe;
992
- const ut = S.insertOp(["drawings", Pe], Je), $e = S.insertOp(["drawingsOrder", ae], Pe);
991
+ Je.drawingId = we;
992
+ const ut = S.insertOp(["drawings", we], Je), $e = S.insertOp(["drawingsOrder", ae], we);
993
993
  v.push(ut), v.push($e);
994
994
  }
995
995
  }
996
- const ne = zr((P = g.customRanges) != null ? P : [], $, Od.includes(f)), ie = Gr((F = g.customDecorations) != null ? F : [], $);
996
+ const ne = zr((w = g.customRanges) != null ? w : [], $, Od.includes(f)), ie = Gr((F = g.customDecorations) != null ? F : [], $);
997
997
  if (ne && (k.customRanges = [{
998
998
  ...ne,
999
999
  startIndex: 0,
@@ -1018,7 +1018,7 @@ const Od = In, va = {
1018
1018
  m.reset(), m.moveCursor($);
1019
1019
  }
1020
1020
  const b = Ae(u, t);
1021
- return v.push(S.editOp(I.serialize(), b)), p.params.actions = v.reduce((w, N) => W.compose(w, N), null), !!s.syncExecuteCommand(p.id, p.params);
1021
+ return v.push(S.editOp(I.serialize(), b)), p.params.actions = v.reduce((P, N) => W.compose(P, N), null), !!s.syncExecuteCommand(p.id, p.params);
1022
1022
  }
1023
1023
  };
1024
1024
  function Td(n, e) {
@@ -1305,7 +1305,7 @@ const Jr = {
1305
1305
  const v = Ae(i, h);
1306
1306
  S.push(I.editOp(m.serialize(), v));
1307
1307
  const R = ((x = i.getDrawings()) != null ? x : {})[l], b = i.getDrawingsOrder().indexOf(l), y = I.removeOp(["drawings", l], R), C = I.removeOp(["drawingsOrder", b], l);
1308
- return S.push(y), S.push(C), p.params.actions = S.reduce((M, P) => W.compose(M, P), null), !!r.syncExecuteCommand(p.id, p.params);
1308
+ return S.push(y), S.push(C), p.params.actions = S.reduce((M, w) => W.compose(M, w), null), !!r.syncExecuteCommand(p.id, p.params);
1309
1309
  }
1310
1310
  }, $r = {
1311
1311
  id: "doc.command.merge-two-paragraph",
@@ -1454,12 +1454,12 @@ function es(n, e) {
1454
1454
  }
1455
1455
  return t;
1456
1456
  }
1457
- const Do = {
1457
+ const wo = {
1458
1458
  id: "doc.command.delete-left",
1459
1459
  type: D.COMMAND,
1460
1460
  // eslint-disable-next-line max-lines-per-function, complexity
1461
1461
  handler: async (n) => {
1462
- var C, B, x, M, P, F;
1462
+ var C, B, x, M, w, F;
1463
1463
  const e = n.get(Y), t = n.get(L), o = n.get(T);
1464
1464
  let r = !0;
1465
1465
  const s = t.getCurrentUniverDocInstance();
@@ -1469,10 +1469,10 @@ const Do = {
1469
1469
  if (A == null)
1470
1470
  return !1;
1471
1471
  if (d != null && d.length) {
1472
- const w = es(l, d), N = d[0].segmentId, ee = [
1472
+ const P = es(l, d), N = d[0].segmentId, ee = [
1473
1473
  {
1474
- startOffset: w,
1475
- endOffset: w
1474
+ startOffset: P,
1475
+ endOffset: P
1476
1476
  }
1477
1477
  ];
1478
1478
  return o.executeCommand($t.id, {
@@ -1489,19 +1489,19 @@ const Do = {
1489
1489
  let E = m;
1490
1490
  const b = A.findNodeByCharIndex(m - 1, h, g);
1491
1491
  if (sl(S) && b !== S && (v === !0 || R === !0) && I) {
1492
- const w = il(S, f);
1493
- if (w == null)
1492
+ const P = il(S, f);
1493
+ if (P == null)
1494
1494
  return !1;
1495
- const N = w == null ? void 0 : w.startIndex, ee = { startIndex: 0 }, $ = w.paragraphStyle;
1495
+ const N = P == null ? void 0 : P.startIndex, ee = { startIndex: 0 }, $ = P.paragraphStyle;
1496
1496
  if (v === !0) {
1497
- const H = w.paragraphStyle;
1497
+ const H = P.paragraphStyle;
1498
1498
  if (H) {
1499
1499
  ee.paragraphStyle = H;
1500
1500
  const { hanging: k } = H;
1501
1501
  k && (ee.paragraphStyle.indentStart = k, ee.paragraphStyle.hanging = void 0);
1502
1502
  }
1503
1503
  } else if (R === !0) {
1504
- const H = w.bullet;
1504
+ const H = P.bullet;
1505
1505
  H && (ee.bullet = H), $ != null && (ee.paragraphStyle = { ...$ }, delete ee.paragraphStyle.hanging, delete ee.paragraphStyle.indentStart);
1506
1506
  }
1507
1507
  const U = [
@@ -1529,17 +1529,17 @@ const Do = {
1529
1529
  if (b == null)
1530
1530
  return !0;
1531
1531
  if (b.content === "\r") {
1532
- const w = (C = f.paragraphs) == null ? void 0 : C.find((N) => N.startIndex === m - 1);
1533
- (B = w == null ? void 0 : w.paragraphStyle) != null && B.borderBottom ? r = await o.executeCommand(ba.id) : r = await o.executeCommand($r.id, {
1532
+ const P = (C = f.paragraphs) == null ? void 0 : C.find((N) => N.startIndex === m - 1);
1533
+ (B = P == null ? void 0 : P.paragraphStyle) != null && B.borderBottom ? r = await o.executeCommand(ba.id) : r = await o.executeCommand($r.id, {
1534
1534
  direction: Ne.LEFT,
1535
1535
  range: p
1536
1536
  });
1537
1537
  } else if (b.streamType === "\b") {
1538
- const w = (M = s.getSnapshot().drawings) == null ? void 0 : M[(x = b.drawingId) != null ? x : ""];
1539
- if (w == null)
1538
+ const P = (M = s.getSnapshot().drawings) == null ? void 0 : M[(x = b.drawingId) != null ? x : ""];
1539
+ if (P == null)
1540
1540
  return !0;
1541
- const N = (F = (P = s.getBody()) == null ? void 0 : P.customBlocks) == null ? void 0 : F.find(($) => $.blockId === b.drawingId);
1542
- if (w.layoutType === bo.INLINE || (N == null ? void 0 : N.blockType) === Nc.CUSTOM) {
1541
+ const N = (F = (w = s.getBody()) == null ? void 0 : w.customBlocks) == null ? void 0 : F.find(($) => $.blockId === b.drawingId);
1542
+ if (P.layoutType === bo.INLINE || (N == null ? void 0 : N.blockType) === Nc.CUSTOM) {
1543
1543
  const $ = s.getUnitId();
1544
1544
  r = await o.executeCommand(Jr.id, {
1545
1545
  direction: Ne.LEFT,
@@ -1581,10 +1581,10 @@ const Do = {
1581
1581
  len: b.count
1582
1582
  });
1583
1583
  } else {
1584
- const w = xa(p, [p]);
1584
+ const P = xa(p, [p]);
1585
1585
  r = await o.executeCommand($t.id, {
1586
1586
  segmentId: h,
1587
- textRanges: w,
1587
+ textRanges: P,
1588
1588
  selections: [p]
1589
1589
  });
1590
1590
  }
@@ -1740,9 +1740,9 @@ const ts = {
1740
1740
  };
1741
1741
  return t.syncExecuteCommand(X.id, c);
1742
1742
  }
1743
- }, Pd = 10, wd = 6;
1743
+ }, wd = 10, Pd = 6;
1744
1744
  function Nd() {
1745
- return ge(wd);
1745
+ return ge(Pd);
1746
1746
  }
1747
1747
  function Ld(n) {
1748
1748
  const e = n.match(/data-copy-id="([^\s]+)"/);
@@ -1750,7 +1750,7 @@ function Ld(n) {
1750
1750
  }
1751
1751
  class Qd {
1752
1752
  constructor() {
1753
- O(this, "_cache", new Lc(Pd));
1753
+ O(this, "_cache", new Lc(wd));
1754
1754
  }
1755
1755
  set(e, t) {
1756
1756
  this._cache.set(e, t);
@@ -1762,7 +1762,7 @@ class Qd {
1762
1762
  this._cache.clear();
1763
1763
  }
1764
1764
  }
1765
- const Yo = new Qd();
1765
+ const Ko = new Qd();
1766
1766
  function ns(n) {
1767
1767
  const e = n.style, t = {}, o = n.tagName.toLowerCase();
1768
1768
  switch (o) {
@@ -1920,7 +1920,7 @@ const ni = 660, Co = class Co {
1920
1920
  }
1921
1921
  },
1922
1922
  layoutType: bo.INLINE,
1923
- drawingType: Nr.DRAWING_IMAGE,
1923
+ drawingType: Lr.DRAWING_IMAGE,
1924
1924
  unitId: o.id || "",
1925
1925
  subUnitId: o.id || ""
1926
1926
  };
@@ -2007,7 +2007,7 @@ ${V.TABLE_CELL_END}`;
2007
2007
  startIndex: o,
2008
2008
  endIndex: r.dataStream.length - 1,
2009
2009
  rangeId: (a = s.dataset.rangeid) != null ? a : ge(),
2010
- rangeType: Lr.HYPERLINK,
2010
+ rangeType: Qr.HYPERLINK,
2011
2011
  properties: { url: s.href }
2012
2012
  }));
2013
2013
  }
@@ -2147,7 +2147,7 @@ function oi(n, e) {
2147
2147
  const p = [];
2148
2148
  return a === z.TRUE && (f = `<i>${f}</i>`), g === Ve.SUPERSCRIPT ? f = `<sup>${f}</sup>` : g === Ve.SUBSCRIPT && (f = `<sub>${f}</sub>`), (d == null ? void 0 : d.s) === z.TRUE && (f = `<u>${f}</u>`), (l == null ? void 0 : l.s) === z.TRUE && (f = `<s>${f}</s>`), c === z.TRUE && (f = `<strong>${f}</strong>`), s && p.push(`font-family: ${s}`), u && p.push(`color: ${u.rgb}`), i && p.push(`font-size: ${i}pt`), A && p.push("text-decoration: overline"), h && p.push(`background: ${h.rgb}`), p.length ? `<span style="${p.join("; ")};">${f}</span>` : f;
2149
2149
  }
2150
- function Ko(n, e, t) {
2150
+ function qo(n, e, t) {
2151
2151
  const { dataStream: o, textRuns: r = [] } = n;
2152
2152
  if (e === t)
2153
2153
  return "";
@@ -2172,21 +2172,21 @@ function Wd(n, e, t) {
2172
2172
  const A = (u, g) => {
2173
2173
  let f = "", p = 0, m = u, I = a.findIndex((S) => u <= S.startIndex && g >= S.startIndex);
2174
2174
  if (I === -1)
2175
- return f = Ko(o, u, g), { sliceHtml: f, customBlockLength: p };
2175
+ return f = qo(o, u, g), { sliceHtml: f, customBlockLength: p };
2176
2176
  for (; I !== -1; ) {
2177
2177
  const S = a[I];
2178
- a.splice(I, 1), f += Ko(o, m, S.startIndex);
2178
+ a.splice(I, 1), f += qo(o, m, S.startIndex);
2179
2179
  const v = r[S.blockId];
2180
2180
  if (v)
2181
2181
  switch (v.drawingType) {
2182
- case Nr.DRAWING_IMAGE: {
2182
+ case Lr.DRAWING_IMAGE: {
2183
2183
  f += Vd(v), p++;
2184
2184
  break;
2185
2185
  }
2186
2186
  }
2187
2187
  m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2188
2188
  }
2189
- return f = f + Ko(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2189
+ return f = f + qo(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2190
2190
  };
2191
2191
  c.forEach((u) => {
2192
2192
  var v, R;
@@ -2194,7 +2194,7 @@ function Wd(n, e, t) {
2194
2194
  l += I.sliceHtml;
2195
2195
  const S = A(g, f + 1);
2196
2196
  switch (p) {
2197
- case Lr.HYPERLINK: {
2197
+ case Qr.HYPERLINK: {
2198
2198
  l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>`;
2199
2199
  break;
2200
2200
  }
@@ -2300,7 +2300,7 @@ function ri(n, e, t) {
2300
2300
  }), o;
2301
2301
  }
2302
2302
  const Lt = Ki("doc.clipboard-service");
2303
- let ur = class extends me {
2303
+ let hr = class extends me {
2304
2304
  constructor(e, t, o, r, s) {
2305
2305
  super();
2306
2306
  O(this, "_clipboardHooks", []);
@@ -2308,7 +2308,7 @@ let ur = class extends me {
2308
2308
  O(this, "_umdToHtml", new zd());
2309
2309
  this._univerInstanceService = e, this._logService = t, this._commandService = o, this._clipboardInterfaceService = r, this._docSelectionManagerService = s;
2310
2310
  }
2311
- async copy(e = ir.copy, t) {
2311
+ async copy(e = ar.copy, t) {
2312
2312
  var a, c;
2313
2313
  const { newSnapshotList: o = [], needCache: r = !1, snapshot: s, ranges: i } = (a = this._getDocumentBodyInRanges(e, t)) != null ? a : {};
2314
2314
  if (o.length === 0 || s == null)
@@ -2351,7 +2351,7 @@ let ur = class extends me {
2351
2351
  } = (A = t[0]) != null ? A : {};
2352
2352
  if (r == null && this._logService.error("[DocClipboardController] segmentId is not existed"), t.length === 0 && o.length === 0)
2353
2353
  return !1;
2354
- this.copy(ir.cut, e);
2354
+ this.copy(ar.cut, e);
2355
2355
  try {
2356
2356
  let h = 0;
2357
2357
  if (o.length > 0)
@@ -2447,7 +2447,7 @@ let ur = class extends me {
2447
2447
  }
2448
2448
  }
2449
2449
  }
2450
- Yo.set(o, A);
2450
+ Ko.set(o, A);
2451
2451
  }
2452
2452
  return this._clipboardInterfaceService.write(r, s);
2453
2453
  }
@@ -2524,7 +2524,7 @@ let ur = class extends me {
2524
2524
  }
2525
2525
  const r = Ld(e);
2526
2526
  if (r) {
2527
- const i = Yo.get(r);
2527
+ const i = Ko.get(r);
2528
2528
  if (i)
2529
2529
  return i;
2530
2530
  }
@@ -2533,7 +2533,7 @@ let ur = class extends me {
2533
2533
  o = (i == null ? void 0 : i.getUnitId()) || "";
2534
2534
  }
2535
2535
  const s = this._htmlToUDM.convert(e, { unitId: o });
2536
- return r && Yo.set(r, s), s;
2536
+ return r && Ko.set(r, s), s;
2537
2537
  }
2538
2538
  async _createImagePasteHtml(e) {
2539
2539
  var a, c;
@@ -2579,7 +2579,7 @@ let ur = class extends me {
2579
2579
  source: A.source,
2580
2580
  description: "",
2581
2581
  layoutType: bo.INLINE,
2582
- drawingType: Nr.DRAWING_IMAGE,
2582
+ drawingType: Lr.DRAWING_IMAGE,
2583
2583
  transform: {
2584
2584
  width: h,
2585
2585
  height: u,
@@ -2595,13 +2595,13 @@ let ur = class extends me {
2595
2595
  })), this._umdToHtml.convert([t]);
2596
2596
  }
2597
2597
  };
2598
- ur = Yd([
2598
+ hr = Yd([
2599
2599
  ln(0, L),
2600
- ln(1, Qr),
2600
+ ln(1, Ur),
2601
2601
  ln(2, T),
2602
2602
  ln(3, sa),
2603
2603
  ln(4, j(Y))
2604
- ], ur);
2604
+ ], hr);
2605
2605
  function Po(n) {
2606
2606
  return n.getContextValue(Dn) || n.getContextValue(to);
2607
2607
  }
@@ -2619,7 +2619,7 @@ const os = 999, so = {
2619
2619
  handler: async (n) => {
2620
2620
  const e = n.get(Lt), t = Un(n);
2621
2621
  return t ? e.copy(
2622
- ir.copy,
2622
+ ar.copy,
2623
2623
  [{
2624
2624
  startOffset: t.paragraphStart,
2625
2625
  endOffset: t.paragraphEnd + 1,
@@ -2660,7 +2660,7 @@ const os = 999, so = {
2660
2660
  const e = n.get(Lt), o = await n.get(sa).read();
2661
2661
  return o.length === 0 ? !1 : e.paste(o);
2662
2662
  }
2663
- }, wo = {
2663
+ }, No = {
2664
2664
  id: "doc.command.horizontal-line",
2665
2665
  type: D.COMMAND,
2666
2666
  handler: (n, e) => n.get(T).syncExecuteCommand(Yr.id, {
@@ -2679,7 +2679,7 @@ const os = 999, so = {
2679
2679
  type: D.COMMAND,
2680
2680
  handler: (n) => {
2681
2681
  const e = n.get(T), t = Un(n);
2682
- return t ? e.syncExecuteCommand(wo.id, {
2682
+ return t ? e.syncExecuteCommand(No.id, {
2683
2683
  insertRange: {
2684
2684
  startOffset: t.startIndex + 1,
2685
2685
  endOffset: t.startIndex + 1
@@ -2727,7 +2727,7 @@ const os = 999, so = {
2727
2727
  }, !1), !0;
2728
2728
  }
2729
2729
  };
2730
- class No extends Ct {
2730
+ class Lo extends Rt {
2731
2731
  constructor(t) {
2732
2732
  super();
2733
2733
  O(this, "_previousActiveRange", null);
@@ -2782,7 +2782,7 @@ const Ba = {
2782
2782
  // eslint-disable-next-line max-lines-per-function
2783
2783
  handler: async (n, e) => {
2784
2784
  var N, ee, $;
2785
- const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(fe), d = n.get(L), l = n.get(at), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(No), h = d.getUnit(t, _.UNIVER_DOC);
2785
+ const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), d = n.get(L), l = n.get(ct), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(Lo), h = d.getUnit(t, _.UNIVER_DOC);
2786
2786
  if (h == null || A == null)
2787
2787
  return !1;
2788
2788
  const u = A.getActiveRange();
@@ -2806,13 +2806,13 @@ const Ba = {
2806
2806
  actions: [],
2807
2807
  textRanges: R
2808
2808
  }
2809
- }, b = l.getDefaultStyle(), y = l.getStyleCache(), C = zr((ee = p.customRanges) != null ? ee : [], I + r, In.includes(t)), B = Bo(
2809
+ }, b = l.getDefaultStyle(), y = l.getStyleCache(), C = zr((ee = p.customRanges) != null ? ee : [], I + r, In.includes(t)), B = Mo(
2810
2810
  p,
2811
2811
  i ? S : I + r,
2812
2812
  b,
2813
2813
  y,
2814
2814
  In.includes(t)
2815
- ), x = Gr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), P = W.getInstance();
2815
+ ), x = Gr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), w = W.getInstance();
2816
2816
  if (!u.collapsed && i) {
2817
2817
  const U = ce.selection.delete([u], p, 0, null, !1);
2818
2818
  M.push(...U), E.params.textRanges = [{
@@ -2851,13 +2851,13 @@ const Ba = {
2851
2851
  len: o.length
2852
2852
  });
2853
2853
  const F = Ae(h, f);
2854
- E.params.actions = P.editOp(M.serialize(), F), E.params.noHistory = !s, E.params.isCompositionEnd = s;
2855
- const w = a.syncExecuteCommand(E.id, E.params);
2856
- return A.pushUndoRedoMutationParams(w, E.params), !!w;
2854
+ E.params.actions = w.editOp(M.serialize(), F), E.params.noHistory = !s, E.params.isCompositionEnd = s;
2855
+ const P = a.syncExecuteCommand(E.id, E.params);
2856
+ return A.pushUndoRedoMutationParams(P, E.params), !!P;
2857
2857
  }
2858
2858
  };
2859
2859
  function Xe(n, e, t) {
2860
- return t.executeCommand(yt.id, {
2860
+ return t.executeCommand(xt.id, {
2861
2861
  preCommandId: n,
2862
2862
  ...e != null ? e : {}
2863
2863
  });
@@ -2906,7 +2906,7 @@ const si = "doc.command.set-inline-format-bold", Qt = {
2906
2906
  t
2907
2907
  );
2908
2908
  }
2909
- }, li = "doc.command.set-inline-format-subscript", bt = {
2909
+ }, li = "doc.command.set-inline-format-subscript", yt = {
2910
2910
  id: li,
2911
2911
  type: D.COMMAND,
2912
2912
  handler: async (n, e) => {
@@ -2928,7 +2928,7 @@ const si = "doc.command.set-inline-format-bold", Qt = {
2928
2928
  t
2929
2929
  );
2930
2930
  }
2931
- }, Ai = "doc.command.set-inline-format-fontsize", ct = {
2931
+ }, Ai = "doc.command.set-inline-format-fontsize", lt = {
2932
2932
  id: Ai,
2933
2933
  type: D.COMMAND,
2934
2934
  handler: async (n, e) => {
@@ -2961,7 +2961,7 @@ const si = "doc.command.set-inline-format-bold", Qt = {
2961
2961
  t
2962
2962
  );
2963
2963
  }
2964
- }, gi = "doc.command.set-inline-format-text-background-color", Pt = {
2964
+ }, gi = "doc.command.set-inline-format-text-background-color", It = {
2965
2965
  id: gi,
2966
2966
  type: D.COMMAND,
2967
2967
  handler: async (n, e) => {
@@ -2983,25 +2983,25 @@ const si = "doc.command.set-inline-format-bold", Qt = {
2983
2983
  t
2984
2984
  );
2985
2985
  }
2986
- }, hr = {
2986
+ }, gr = {
2987
2987
  [Qt.id]: "bl",
2988
2988
  [Ut.id]: "it",
2989
2989
  [Ft.id]: "ul",
2990
2990
  [Ht.id]: "st",
2991
- [ct.id]: "fs",
2991
+ [lt.id]: "fs",
2992
2992
  [tn.id]: "ff",
2993
2993
  [Et.id]: "cl",
2994
- [Pt.id]: "bg",
2994
+ [It.id]: "bg",
2995
2995
  [Fn.id]: "bg",
2996
- [bt.id]: "va",
2996
+ [yt.id]: "va",
2997
2997
  [kt.id]: "va"
2998
- }, yt = {
2998
+ }, xt = {
2999
2999
  id: "doc.command.set-inline-format",
3000
3000
  type: D.COMMAND,
3001
3001
  // eslint-disable-next-line max-lines-per-function, complexity
3002
3002
  handler: async (n, e) => {
3003
3003
  var R;
3004
- const { value: t, preCommandId: o } = e, r = n.get(T), s = n.get(Y), i = n.get(L), a = n.get(at), c = s.getDocRanges(), d = (R = c.find((E) => E.isActive)) != null ? R : c[0];
3004
+ const { value: t, preCommandId: o } = e, r = n.get(T), s = n.get(Y), i = n.get(L), a = n.get(ct), c = s.getDocRanges(), d = (R = c.find((E) => E.isActive)) != null ? R : c[0];
3005
3005
  if (c.length === 0)
3006
3006
  return !1;
3007
3007
  const { segmentId: l } = c[0], A = i.getCurrentUnitForType(_.UNIVER_DOC);
@@ -3021,7 +3021,7 @@ const si = "doc.command.set-inline-format-bold", Qt = {
3021
3021
  // fallthrough
3022
3022
  case Ht.id:
3023
3023
  // fallthrough
3024
- case bt.id:
3024
+ case yt.id:
3025
3025
  // fallthrough
3026
3026
  case kt.id: {
3027
3027
  const E = a.getDefaultStyle(), b = _a(
@@ -3035,13 +3035,13 @@ const si = "doc.command.set-inline-format-bold", Qt = {
3035
3035
  );
3036
3036
  break;
3037
3037
  }
3038
- case ct.id:
3038
+ case lt.id:
3039
3039
  case tn.id: {
3040
3040
  g = t;
3041
3041
  break;
3042
3042
  }
3043
3043
  case Et.id:
3044
- case Pt.id: {
3044
+ case It.id: {
3045
3045
  g = {
3046
3046
  rgb: t
3047
3047
  };
@@ -3070,12 +3070,12 @@ const si = "doc.command.set-inline-format-bold", Qt = {
3070
3070
  if (b == null || y == null)
3071
3071
  continue;
3072
3072
  if (C === He.RECT && (b = b - 1), b === y) {
3073
- const M = a.getStyleCache(), P = hr[o];
3073
+ const M = a.getStyleCache(), w = gr[o];
3074
3074
  a.setStyleCache(
3075
3075
  {
3076
- [P]: (M == null ? void 0 : M[P]) !== void 0 ? Ma(
3076
+ [w]: (M == null ? void 0 : M[w]) !== void 0 ? Ma(
3077
3077
  M,
3078
- P,
3078
+ w,
3079
3079
  o
3080
3080
  ) : g
3081
3081
  }
@@ -3089,7 +3089,7 @@ const si = "doc.command.set-inline-format-bold", Qt = {
3089
3089
  st: 0,
3090
3090
  ed: y - b,
3091
3091
  ts: {
3092
- [hr[o]]: g
3092
+ [gr[o]]: g
3093
3093
  }
3094
3094
  }
3095
3095
  ]
@@ -3120,7 +3120,7 @@ function Ma(n, e, t) {
3120
3120
  s: z.TRUE
3121
3121
  };
3122
3122
  if (/va/.test(e))
3123
- return t === bt.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
3123
+ return t === yt.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
3124
3124
  }
3125
3125
  function _a(n, e, t) {
3126
3126
  var l, A, h, u, g, f, p, m, I, S, v, R, E, b;
@@ -3180,7 +3180,7 @@ function _a(n, e, t) {
3180
3180
  return a;
3181
3181
  }
3182
3182
  function qd(n, e) {
3183
- const t = hr[e];
3183
+ const t = gr[e];
3184
3184
  return Ma(n, t, e);
3185
3185
  }
3186
3186
  const Da = {
@@ -3217,40 +3217,40 @@ const Da = {
3217
3217
  }
3218
3218
  };
3219
3219
  i && (M.params.options = i);
3220
- const P = [], F = W.getInstance();
3220
+ const w = [], F = W.getInstance();
3221
3221
  if (!ue.diffValue(x, S)) {
3222
3222
  const N = F.replaceOp(["documentStyle"], x, S);
3223
- N != null && P.push(N);
3223
+ N != null && w.push(N);
3224
3224
  }
3225
3225
  if (!ue.diffValue(h, v)) {
3226
3226
  const N = F.replaceOp(["body"], v, h);
3227
- N != null && P.push(N);
3227
+ N != null && w.push(N);
3228
3228
  }
3229
3229
  if (!ue.diffValue(u, R)) {
3230
3230
  const N = F.replaceOp(["tableSource"], R, u);
3231
- N != null && P.push(N);
3231
+ N != null && w.push(N);
3232
3232
  }
3233
3233
  if (!ue.diffValue(g, E)) {
3234
3234
  const N = F.replaceOp(["footers"], E, g);
3235
- N != null && P.push(N);
3235
+ N != null && w.push(N);
3236
3236
  }
3237
3237
  if (!ue.diffValue(f, b)) {
3238
3238
  const N = F.replaceOp(["headers"], b, f);
3239
- N != null && P.push(N);
3239
+ N != null && w.push(N);
3240
3240
  }
3241
3241
  if (!ue.diffValue(p, y)) {
3242
3242
  const N = F.replaceOp(["lists"], y, p);
3243
- N != null && P.push(N);
3243
+ N != null && w.push(N);
3244
3244
  }
3245
3245
  if (!ue.diffValue(m, C)) {
3246
3246
  const N = F.replaceOp(["drawings"], C, m);
3247
- N != null && P.push(N);
3247
+ N != null && w.push(N);
3248
3248
  }
3249
3249
  if (!ue.diffValue(I, B)) {
3250
3250
  const N = F.replaceOp(["drawingsOrder"], B, I);
3251
- N != null && P.push(N);
3251
+ N != null && w.push(N);
3252
3252
  }
3253
- return M.params.actions = P.reduce((N, ee) => W.compose(N, ee), null), !!c.syncExecuteCommand(M.id, M.params);
3253
+ return M.params.actions = w.reduce((N, ee) => W.compose(N, ee), null), !!c.syncExecuteCommand(M.id, M.params);
3254
3254
  }
3255
3255
  }, Xd = {
3256
3256
  id: "doc.command-replace-content",
@@ -3259,7 +3259,7 @@ const Da = {
3259
3259
  const { unitId: t, body: o, textRanges: r, segmentId: s = "", options: i } = e, a = n.get(L), c = n.get(T), d = n.get(Y), l = a.getUnit(t, _.UNIVER_DOC), A = l == null ? void 0 : l.getSelfOrHeaderFooterModel(s).getSnapshot().body;
3260
3260
  if (l == null || A == null)
3261
3261
  return !1;
3262
- const h = Pa(t, s, l, A, o);
3262
+ const h = wa(t, s, l, A, o);
3263
3263
  return h.params.textRanges = r, i && (h.params.options = i), h.params.actions == null && r ? (d.replaceDocRanges(r, {
3264
3264
  unitId: t,
3265
3265
  subUnitId: t
@@ -3272,7 +3272,7 @@ const Da = {
3272
3272
  const { unitId: t, body: o, segmentId: r = "", textRanges: s } = e, i = n.get(L), a = n.get(T), c = n.get(xo), d = i.getUniverDocInstance(t), l = d == null ? void 0 : d.getSnapshot().body;
3273
3273
  if (d == null || l == null)
3274
3274
  return !1;
3275
- const A = Pa(t, r, d, l, o);
3275
+ const A = wa(t, r, d, l, o);
3276
3276
  return A.params.noNeedSetTextRange = !0, A.params.noHistory = !0, A.params.textRanges = s, a.syncExecuteCommand(
3277
3277
  A.id,
3278
3278
  A.params
@@ -3292,7 +3292,7 @@ function Jd(n, e, t, o) {
3292
3292
  const a = Ae(e, n);
3293
3293
  return s.editOp(r.serialize(), a);
3294
3294
  }
3295
- function Pa(n, e, t, o, r) {
3295
+ function wa(n, e, t, o, r) {
3296
3296
  const s = {
3297
3297
  id: X.id,
3298
3298
  params: {
@@ -3303,7 +3303,7 @@ function Pa(n, e, t, o, r) {
3303
3303
  }, i = Jd(e, t, o, r);
3304
3304
  return s.params.actions = i, s;
3305
3305
  }
3306
- const wa = {
3306
+ const Pa = {
3307
3307
  id: "doc.command.replace-selection",
3308
3308
  type: D.COMMAND,
3309
3309
  handler(n, e) {
@@ -3331,7 +3331,7 @@ const wa = {
3331
3331
  id: "doc.command.replace-text-runs",
3332
3332
  type: D.COMMAND,
3333
3333
  handler: (n, e) => {
3334
- const { unitId: t, body: o, textRanges: r, segmentId: s = "", options: i } = e, a = n.get(L), c = n.get(T), d = n.get(Ur), l = a.getUnit(t, _.UNIVER_DOC), A = l == null ? void 0 : l.getSelfOrHeaderFooterModel(s).getSnapshot().body;
3334
+ const { unitId: t, body: o, textRanges: r, segmentId: s = "", options: i } = e, a = n.get(L), c = n.get(T), d = n.get(Fr), l = a.getUnit(t, _.UNIVER_DOC), A = l == null ? void 0 : l.getSelfOrHeaderFooterModel(s).getSnapshot().body;
3335
3335
  if (l == null || A == null)
3336
3336
  return !1;
3337
3337
  const h = ce.selection.replaceTextRuns({
@@ -3371,13 +3371,13 @@ const wa = {
3371
3371
  startIndex: 0,
3372
3372
  endIndex: a.length - 1,
3373
3373
  rangeId: r,
3374
- rangeType: Lr.CUSTOM,
3374
+ rangeType: Qr.CUSTOM,
3375
3375
  properties: i,
3376
3376
  wholeEntity: c
3377
3377
  }]
3378
3378
  }
3379
3379
  };
3380
- return t.syncExecuteCommand(wa.id, d);
3380
+ return t.syncExecuteCommand(Pa.id, d);
3381
3381
  }
3382
3382
  }, Hn = {
3383
3383
  id: "doc.command.list-operation",
@@ -3408,7 +3408,7 @@ const wa = {
3408
3408
  }), m = W.getInstance(), I = Ae(i, c);
3409
3409
  return g.params.actions = m.editOp(p.serialize(), I), !!r.syncExecuteCommand(g.id, g.params);
3410
3410
  }
3411
- }, Lo = {
3411
+ }, Qo = {
3412
3412
  id: "doc.command.change-list-type",
3413
3413
  type: D.COMMAND,
3414
3414
  handler: (n, e) => {
@@ -3440,7 +3440,7 @@ const wa = {
3440
3440
  }
3441
3441
  };
3442
3442
  var Xn = /* @__PURE__ */ ((n) => (n[n.increase = 1] = "increase", n[n.decrease = -1] = "decrease", n))(Xn || {});
3443
- const gr = {
3443
+ const fr = {
3444
3444
  id: "doc.command.change-list-nesting-level",
3445
3445
  type: D.COMMAND,
3446
3446
  handler: (n, e) => {
@@ -3474,7 +3474,7 @@ const gr = {
3474
3474
  type: D.COMMAND,
3475
3475
  handler: (n, e) => {
3476
3476
  const t = n.get(T);
3477
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3477
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3478
3478
  listType: e.value,
3479
3479
  docRange: e.docRange
3480
3480
  }) : t.syncExecuteCommand(Hn.id, {
@@ -3487,7 +3487,7 @@ const gr = {
3487
3487
  type: D.COMMAND,
3488
3488
  handler: (n, e) => {
3489
3489
  const t = n.get(T);
3490
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3490
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3491
3491
  listType: e.value,
3492
3492
  docRange: e.docRange
3493
3493
  }) : t.syncExecuteCommand(Hn.id, {
@@ -3529,7 +3529,7 @@ const gr = {
3529
3529
  type: D.COMMAND,
3530
3530
  handler: (n, e) => {
3531
3531
  const t = n.get(T);
3532
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3532
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3533
3533
  listType: e.value
3534
3534
  }) : t.syncExecuteCommand(Hn.id, {
3535
3535
  listType: ye.ORDER_LIST
@@ -3540,7 +3540,7 @@ const gr = {
3540
3540
  type: D.COMMAND,
3541
3541
  // eslint-disable-next-line max-lines-per-function
3542
3542
  handler(n, e) {
3543
- var x, M, P;
3543
+ var x, M, w;
3544
3544
  if (!e)
3545
3545
  return !1;
3546
3546
  const t = n.get(Y), o = n.get(L), r = n.get(T), s = o.getCurrentUnitForType(_.UNIVER_DOC), i = t.getActiveTextRange();
@@ -3589,7 +3589,7 @@ const gr = {
3589
3589
  indentFirstLine: void 0
3590
3590
  },
3591
3591
  bullet: {
3592
- ...(P = l.bullet) != null ? P : {
3592
+ ...(w = l.bullet) != null ? w : {
3593
3593
  nestingLevel: 0,
3594
3594
  textStyle: {
3595
3595
  fs: 20
@@ -3667,7 +3667,7 @@ const ds = {
3667
3667
  id: "doc.command.insert-check-list-bellow",
3668
3668
  type: D.COMMAND,
3669
3669
  handler: (n) => ls(n, ye.CHECK_LIST)
3670
- }, lt = {
3670
+ }, dt = {
3671
3671
  id: "doc.command.align-action",
3672
3672
  type: D.COMMAND,
3673
3673
  // eslint-disable-next-line max-lines-per-function
@@ -3724,28 +3724,28 @@ const ds = {
3724
3724
  const S = Ae(i, c);
3725
3725
  return f.params.actions = I.editOp(m.serialize(), S), !!r.syncExecuteCommand(f.id, f.params);
3726
3726
  }
3727
- }, Qo = {
3727
+ }, Uo = {
3728
3728
  id: "doc.command.align-left",
3729
3729
  type: D.COMMAND,
3730
- handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3730
+ handler: (n) => n.get(T).syncExecuteCommand(dt.id, {
3731
3731
  alignType: Ue.LEFT
3732
3732
  })
3733
- }, Uo = {
3733
+ }, Fo = {
3734
3734
  id: "doc.command.align-center",
3735
3735
  type: D.COMMAND,
3736
- handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3736
+ handler: (n) => n.get(T).syncExecuteCommand(dt.id, {
3737
3737
  alignType: Ue.CENTER
3738
3738
  })
3739
- }, Fo = {
3739
+ }, Ho = {
3740
3740
  id: "doc.command.align-right",
3741
3741
  type: D.COMMAND,
3742
- handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3742
+ handler: (n) => n.get(T).syncExecuteCommand(dt.id, {
3743
3743
  alignType: Ue.RIGHT
3744
3744
  })
3745
- }, Ho = {
3745
+ }, ko = {
3746
3746
  id: "doc.command.align-justify",
3747
3747
  type: D.COMMAND,
3748
- handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3748
+ handler: (n) => n.get(T).syncExecuteCommand(dt.id, {
3749
3749
  alignType: Ue.JUSTIFIED
3750
3750
  })
3751
3751
  }, tA = (n, e) => {
@@ -3858,7 +3858,7 @@ const ds = {
3858
3858
  const S = Ae(i, c);
3859
3859
  return I.params.actions = p.editOp(f.serialize(), S), !!s.syncExecuteCommand(I.id, I.params);
3860
3860
  }
3861
- }, qo = {
3861
+ }, Xo = {
3862
3862
  "#": K.HEADING_1,
3863
3863
  "##": K.HEADING_2,
3864
3864
  "###": K.HEADING_3,
@@ -3925,7 +3925,7 @@ const qt = {
3925
3925
  function Es(n, e) {
3926
3926
  return n.page > e.page ? !1 : n.page < e.page ? !0 : n.section > e.section ? !1 : n.section < e.section ? !0 : n.column > e.column ? !1 : n.column < e.column ? !0 : n.line > e.line ? !1 : n.line < e.line ? !0 : n.divide > e.divide ? !1 : n.divide < e.divide ? !0 : n.glyph > e.glyph ? !1 : (n.glyph < e.glyph, !0);
3927
3927
  }
3928
- function fr(n, e) {
3928
+ function pr(n, e) {
3929
3929
  return Es(n, e) ? {
3930
3930
  start: n,
3931
3931
  end: e
@@ -3956,7 +3956,7 @@ function nA(n, e, t, o) {
3956
3956
  endOffset: s
3957
3957
  };
3958
3958
  }
3959
- function pr(n) {
3959
+ function mr(n) {
3960
3960
  const { startX: e, startY: t, endX: o, endY: r } = n, s = [];
3961
3961
  return s.push({
3962
3962
  x: e,
@@ -3975,7 +3975,7 @@ function pr(n) {
3975
3975
  y: t
3976
3976
  }), s;
3977
3977
  }
3978
- class It {
3978
+ class St {
3979
3979
  constructor(e, t) {
3980
3980
  O(this, "_liquid", new $i());
3981
3981
  O(this, "_currentStartState", {
@@ -4013,41 +4013,41 @@ class It {
4013
4013
  Invalid positions in NodePositionConvertToCursor,
4014
4014
  they are not in the same segment page when in header or footer.`
4015
4015
  );
4016
- const { start: a, end: c } = fr(e, t);
4016
+ const { start: a, end: c } = pr(e, t);
4017
4017
  return this._selectionIterator(a, c, (d, l, A, h, u, g) => {
4018
4018
  const { lineHeight: f, asc: p, paddingTop: m, marginTop: I, marginBottom: S } = g, { glyphGroup: v, st: R } = u;
4019
4019
  if (v.length === 0)
4020
4020
  return;
4021
4021
  const { x: E, y: b } = this._liquid;
4022
4022
  let y, C;
4023
- const B = v[d], x = v[l], M = v[d - 1], P = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, w = (x == null ? void 0 : x.left) || 0, N = (x == null ? void 0 : x.width) || 0, ee = (B == null ? void 0 : B.glyphType) === ea.LIST, { startOffset: $, endOffset: U } = nA(v, d, l, R), H = a.glyph === d && A ? a.isBack : !0, k = c.glyph === l && h ? c.isBack : !1, ne = a === c, ie = H && M != null ? M : B;
4023
+ const B = v[d], x = v[l], M = v[d - 1], w = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, P = (x == null ? void 0 : x.left) || 0, N = (x == null ? void 0 : x.width) || 0, ee = (B == null ? void 0 : B.glyphType) === ea.LIST, { startOffset: $, endOffset: U } = nA(v, d, l, R), H = a.glyph === d && A ? a.isBack : !0, k = c.glyph === l && h ? c.isBack : !1, ne = a === c, ie = H && M != null ? M : B;
4024
4024
  if (d === 0 && l === v.length - 1)
4025
4025
  y = {
4026
- startX: E + P + (ee ? F : 0),
4026
+ startX: E + w + (ee ? F : 0),
4027
4027
  startY: b,
4028
- endX: E + w + (k ? 0 : N),
4028
+ endX: E + P + (k ? 0 : N),
4029
4029
  endY: b + f - I - S
4030
4030
  }, C = {
4031
- startX: E + P + (ee ? F : 0),
4031
+ startX: E + w + (ee ? F : 0),
4032
4032
  startY: b + m + p - ie.bBox.ba,
4033
- endX: E + w + (k ? 0 : N),
4033
+ endX: E + P + (k ? 0 : N),
4034
4034
  endY: b + m + p + ie.bBox.bd
4035
4035
  };
4036
4036
  else {
4037
4037
  const ae = H && !ee;
4038
4038
  y = {
4039
- startX: E + P + (ae ? 0 : F),
4039
+ startX: E + w + (ae ? 0 : F),
4040
4040
  startY: b,
4041
- endX: E + w + (k ? 0 : N),
4041
+ endX: E + P + (k ? 0 : N),
4042
4042
  endY: b + f - I - S
4043
4043
  }, C = {
4044
- startX: E + P + (ae ? 0 : F),
4044
+ startX: E + w + (ae ? 0 : F),
4045
4045
  startY: b + m + p - ie.bBox.ba,
4046
- endX: E + w + (k ? 0 : N),
4046
+ endX: E + P + (k ? 0 : N),
4047
4047
  endY: b + m + p + ie.bBox.bd
4048
4048
  };
4049
4049
  }
4050
- o.push(pr(y)), r.push(pr(C)), s.push({
4050
+ o.push(mr(y)), r.push(mr(C)), s.push({
4051
4051
  startOffset: H ? $ : $ + B.count,
4052
4052
  endOffset: k ? U : U + x.count,
4053
4053
  collapsed: ne
@@ -4136,11 +4136,11 @@ class It {
4136
4136
  for (let E = I; E <= S; E++) {
4137
4137
  const b = c[E], { headerId: y, footerId: C, pageWidth: B } = b;
4138
4138
  let x = b;
4139
- if (s === Oe.HEADER ? x = (v = d.get(y)) == null ? void 0 : v.get(B) : s === Oe.FOOTER ? x = (R = l.get(C)) == null ? void 0 : R.get(B) : s === Oe.CELL && (x = cr(a, i)), x == null) {
4139
+ if (s === Oe.HEADER ? x = (v = d.get(y)) == null ? void 0 : v.get(B) : s === Oe.FOOTER ? x = (R = l.get(C)) == null ? void 0 : R.get(B) : s === Oe.CELL && (x = lr(a, i)), x == null) {
4140
4140
  this._liquid.translatePage(b, f, p, m);
4141
4141
  continue;
4142
4142
  }
4143
- const M = x.sections, { start_next: P, end_next: F } = this._getSelectionRuler(
4143
+ const M = x.sections, { start_next: w, end_next: F } = this._getSelectionRuler(
4144
4144
  qt.page,
4145
4145
  e,
4146
4146
  t,
@@ -4156,13 +4156,13 @@ class It {
4156
4156
  });
4157
4157
  break;
4158
4158
  case Oe.FOOTER: {
4159
- const w = b.pageHeight - x.height - x.marginBottom;
4160
- this._liquid.translate(b.marginLeft, w);
4159
+ const P = b.pageHeight - x.height - x.marginBottom;
4160
+ this._liquid.translate(b.marginLeft, P);
4161
4161
  break;
4162
4162
  }
4163
4163
  case Oe.CELL: {
4164
4164
  this._liquid.translatePagePadding(b);
4165
- const w = x.parent, N = w.parent, { left: ee } = x, { top: $, left: U } = N, { top: H } = w;
4165
+ const P = x.parent, N = P.parent, { left: ee } = x, { top: $, left: U } = N, { top: H } = P;
4166
4166
  this._liquid.translate(U + ee, $ + H), this._liquid.translatePagePadding(x);
4167
4167
  break;
4168
4168
  }
@@ -4170,13 +4170,13 @@ class It {
4170
4170
  this._liquid.translatePagePadding(b);
4171
4171
  break;
4172
4172
  }
4173
- for (let w = P; w <= F; w++) {
4174
- const N = M[w], ee = N.columns, { start_next: $, end_next: U } = this._getSelectionRuler(
4173
+ for (let P = w; P <= F; P++) {
4174
+ const N = M[P], ee = N.columns, { start_next: $, end_next: U } = this._getSelectionRuler(
4175
4175
  qt.section,
4176
4176
  e,
4177
4177
  t,
4178
4178
  ee.length - 1,
4179
- w
4179
+ P
4180
4180
  );
4181
4181
  this._liquid.translateSection(N);
4182
4182
  for (let H = $; H <= U; H++) {
@@ -4189,18 +4189,18 @@ class It {
4189
4189
  );
4190
4190
  this._liquid.translateColumn(k);
4191
4191
  for (let oe = ie; oe <= ae; oe++) {
4192
- const he = ne[oe], { divides: Pe } = he, { start_next: Je, end_next: ut } = this._getSelectionRuler(
4192
+ const he = ne[oe], { divides: we } = he, { start_next: Je, end_next: ut } = this._getSelectionRuler(
4193
4193
  qt.line,
4194
4194
  e,
4195
4195
  t,
4196
- Pe.length - 1,
4196
+ we.length - 1,
4197
4197
  oe
4198
4198
  );
4199
4199
  this._liquid.translateSave(), this._liquid.translateLine(he, !0, !1);
4200
4200
  for (let $e = Je; $e <= ut; $e++) {
4201
- const Wo = Pe[$e];
4202
- this._liquid.translateSave(), this._liquid.translateDivide(Wo);
4203
- const { glyphGroup: Oc } = Wo, { start_next: Tc, end_next: Bc } = this._getSelectionRuler(
4201
+ const jo = we[$e];
4202
+ this._liquid.translateSave(), this._liquid.translateDivide(jo);
4203
+ const { glyphGroup: Oc } = jo, { start_next: Tc, end_next: Bc } = this._getSelectionRuler(
4204
4204
  qt.divide,
4205
4205
  e,
4206
4206
  t,
@@ -4208,7 +4208,7 @@ class It {
4208
4208
  $e
4209
4209
  );
4210
4210
  let Ls = !1, Qs = !1;
4211
- E === I && w === P && H === $ && oe === ie && $e === Je && (Ls = !0), E === S && w === F && H === U && oe === ae && $e === ut && (Qs = !0), o && o(Tc, Bc, Ls, Qs, Wo, he, k, N, x), this._liquid.translateRestore();
4211
+ E === I && P === w && H === $ && oe === ie && $e === Je && (Ls = !0), E === S && P === F && H === U && oe === ae && $e === ut && (Qs = !0), o && o(Tc, Bc, Ls, Qs, jo, he, k, N, x), this._liquid.translateRestore();
4212
4212
  }
4213
4213
  this._liquid.translateRestore();
4214
4214
  }
@@ -4243,7 +4243,7 @@ function ka(n, e, t) {
4243
4243
  const d = a.parent, l = c.parent, A = d.cells.indexOf(a), h = l.cells.indexOf(c);
4244
4244
  return A === h && d.index === l.index;
4245
4245
  }
4246
- function Xo(n, e) {
4246
+ function Zo(n, e) {
4247
4247
  if (Ha(n, e))
4248
4248
  return Es(n, e);
4249
4249
  const { path: t } = n, { path: o } = e, r = t[t.length - 5], s = o[o.length - 5];
@@ -4308,13 +4308,13 @@ class Va {
4308
4308
  const M = rA(x.cells, u, f);
4309
4309
  if (M == null)
4310
4310
  continue;
4311
- const [P, F] = M, w = {
4312
- startX: y + P.left + B,
4311
+ const [w, F] = M, P = {
4312
+ startX: y + w.left + B,
4313
4313
  startY: C + x.top,
4314
4314
  endX: y + F.left + F.pageWidth + B,
4315
4315
  endY: C + x.top + x.height
4316
4316
  };
4317
- o.push(pr(w));
4317
+ o.push(mr(P));
4318
4318
  }
4319
4319
  this._liquid.translateRestore(), this._liquid.restorePagePadding(R), this._liquid.translatePage(R, p, m, I);
4320
4320
  }
@@ -4362,7 +4362,7 @@ class Va {
4362
4362
  const r = this._docSkeleton.getSkeletonData();
4363
4363
  if (r == null)
4364
4364
  return;
4365
- const { pages: s } = r, { path: i } = e, { path: a } = t, c = cr(r, i), d = cr(r, a);
4365
+ const { pages: s } = r, { path: i } = e, { path: a } = t, c = lr(r, i), d = lr(r, a);
4366
4366
  if (c == null || d == null)
4367
4367
  return;
4368
4368
  const l = c.segmentId, A = c.parent.index, h = c.parent.cells.indexOf(c), u = (d == null ? void 0 : d.parent).index, g = (d == null ? void 0 : d.parent).cells.indexOf(d), f = Math.min(A, u), p = Math.max(A, u), m = Math.min(h, g), I = Math.max(h, g);
@@ -4376,7 +4376,7 @@ class Va {
4376
4376
  };
4377
4377
  }
4378
4378
  }
4379
- const sA = "__TestSelectionRange__", iA = "__TestSelectionAnchor__", mi = 6, Zo = 500, aA = 500, mr = 3;
4379
+ const sA = "__TestSelectionRange__", iA = "__TestSelectionAnchor__", mi = 6, Jo = 500, aA = 500, Er = 3;
4380
4380
  function $n(n) {
4381
4381
  const e = n[0], t = e[0], o = e[2], { x: r, y: s } = t, { x: i, y: a } = o;
4382
4382
  return {
@@ -4415,11 +4415,11 @@ class Zt {
4415
4415
  _anchorBlink() {
4416
4416
  setTimeout(() => {
4417
4417
  this._anchorShape && this._anchorShape.visible && this.deactivateStatic();
4418
- }, Zo), this._anchorBlinkTimer = setInterval(() => {
4418
+ }, Jo), this._anchorBlinkTimer = setInterval(() => {
4419
4419
  this._anchorShape && this._anchorShape.visible && (this.activeStatic(), setTimeout(() => {
4420
4420
  this.deactivateStatic();
4421
- }, Zo));
4422
- }, aA + Zo);
4421
+ }, Jo));
4422
+ }, aA + Jo);
4423
4423
  }
4424
4424
  // The start position of the range
4425
4425
  get startOffset() {
@@ -4448,7 +4448,7 @@ class Zt {
4448
4448
  return null;
4449
4449
  if (this.focusNodePosition == null)
4450
4450
  return this.anchorNodePosition;
4451
- const { start: e } = fr(this.anchorNodePosition, this.focusNodePosition);
4451
+ const { start: e } = pr(this.anchorNodePosition, this.focusNodePosition);
4452
4452
  return e;
4453
4453
  }
4454
4454
  get endNodePosition() {
@@ -4456,7 +4456,7 @@ class Zt {
4456
4456
  return this.focusNodePosition;
4457
4457
  if (this.focusNodePosition == null)
4458
4458
  return null;
4459
- const { end: e } = fr(this.anchorNodePosition, this.focusNodePosition);
4459
+ const { end: e } = pr(this.anchorNodePosition, this.focusNodePosition);
4460
4460
  return e;
4461
4461
  }
4462
4462
  get direction() {
@@ -4473,7 +4473,7 @@ class Zt {
4473
4473
  const e = this.anchorNodePosition, t = this.focusNodePosition;
4474
4474
  if (this._isEmpty())
4475
4475
  return;
4476
- const o = this._document.getOffsetConfig(), { docsLeft: r, docsTop: s } = o, i = new It(o, this._docSkeleton);
4476
+ const o = this._document.getOffsetConfig(), { docsLeft: r, docsTop: s } = o, i = new St(o, this._docSkeleton);
4477
4477
  if (this._isCollapsed()) {
4478
4478
  const { contentBoxPointGroup: l, cursorList: A } = i.getRangePointData(e, e);
4479
4479
  if (this._setCursorList(A), l.length === 0)
@@ -4533,7 +4533,7 @@ class Zt {
4533
4533
  const { _document: e, _docSkeleton: t } = this, o = this.anchorNodePosition, r = this.focusNodePosition;
4534
4534
  if ((A = this._anchorShape) == null || A.hide(), (h = this._rangeShape) == null || h.hide(), this._isEmpty())
4535
4535
  return;
4536
- const s = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new It(s, t);
4536
+ const s = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new St(s, t);
4537
4537
  if (this._isCollapsed()) {
4538
4538
  const { contentBoxPointGroup: u, cursorList: g } = c.getRangePointData(o, o);
4539
4539
  if (this._setCursorList(g), u.length > 0) {
@@ -4576,7 +4576,7 @@ class Zt {
4576
4576
  evented: !1,
4577
4577
  debounceParentDirty: !1
4578
4578
  });
4579
- this._rangeShape = s, this._scene.addObject(s, mr);
4579
+ this._rangeShape = s, this._scene.addObject(s, Er);
4580
4580
  }
4581
4581
  _createOrUpdateAnchor(e, t, o, r) {
4582
4582
  var f, p, m;
@@ -4599,14 +4599,14 @@ class Zt {
4599
4599
  stroke: ((m = this.style) == null ? void 0 : m.strokeActive) || pn(fn.black, 1),
4600
4600
  evented: !1
4601
4601
  });
4602
- u && g.skew(-l, 0), this._anchorShape = g, this._scene.addObject(g, mr), this.activeStatic();
4602
+ u && g.skew(-l, 0), this._anchorShape = g, this._scene.addObject(g, Er), this.activeStatic();
4603
4603
  }
4604
4604
  _setCursorList(e) {
4605
4605
  e.length !== 0 && (this._cursorList = e);
4606
4606
  }
4607
4607
  }
4608
4608
  const cA = "__DocTableRectRange__", lA = 6;
4609
- function Jo(n, e, t, o, r, s = vn, i = "", a = -1) {
4609
+ function $o(n, e, t, o, r, s = vn, i = "", a = -1) {
4610
4610
  const c = e.getOffsetConfig(), l = new Va(c, t).getNodePositionGroup(o, r);
4611
4611
  return (l != null ? l : []).map((A) => new Wa(
4612
4612
  n,
@@ -4691,15 +4691,15 @@ class Wa {
4691
4691
  }
4692
4692
  get startNodePosition() {
4693
4693
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4694
- return Xo(e, t) ? e : t;
4694
+ return Zo(e, t) ? e : t;
4695
4695
  }
4696
4696
  get endNodePosition() {
4697
4697
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4698
- return Xo(e, t) ? t : e;
4698
+ return Zo(e, t) ? t : e;
4699
4699
  }
4700
4700
  get direction() {
4701
4701
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4702
- return Xo(e, t) ? De.FORWARD : De.BACKWARD;
4702
+ return Zo(e, t) ? De.FORWARD : De.BACKWARD;
4703
4703
  }
4704
4704
  isActive() {
4705
4705
  return this._current === !0;
@@ -4754,7 +4754,7 @@ class Wa {
4754
4754
  evented: !1,
4755
4755
  debounceParentDirty: !1
4756
4756
  });
4757
- this._rangeShape = s, this._scene.addObject(s, mr);
4757
+ this._rangeShape = s, this._scene.addObject(s, Er);
4758
4758
  }
4759
4759
  }
4760
4760
  function Ei(n, e, t, o, r, s, i, a, c = !0, d = !0) {
@@ -4770,7 +4770,7 @@ function dA(n, e, t, o, r, s, i, a) {
4770
4770
  function AA(n, e, t, o, r, s, i, a) {
4771
4771
  const c = r.findNodePositionByCharIndex(n, !0, i, a), d = r.findNodePositionByCharIndex(e, !0, i, a);
4772
4772
  if (!(c == null || d == null))
4773
- return Er(
4773
+ return Ir(
4774
4774
  c,
4775
4775
  d,
4776
4776
  t,
@@ -4781,7 +4781,7 @@ function AA(n, e, t, o, r, s, i, a) {
4781
4781
  a
4782
4782
  );
4783
4783
  }
4784
- function Er(n, e, t, o, r, s, i, a) {
4784
+ function Ir(n, e, t, o, r, s, i, a) {
4785
4785
  const c = [], d = [], l = [t, o, r, n, e, s, i, a];
4786
4786
  if (ka(r, n, e)) {
4787
4787
  if (Ha(n, e))
@@ -4790,7 +4790,7 @@ function Er(n, e, t, o, r, s, i, a) {
4790
4790
  rectRanges: d
4791
4791
  };
4792
4792
  {
4793
- const S = Jo(
4793
+ const S = $o(
4794
4794
  ...l
4795
4795
  );
4796
4796
  return d.push(...S), {
@@ -4800,7 +4800,7 @@ function Er(n, e, t, o, r, s, i, a) {
4800
4800
  }
4801
4801
  }
4802
4802
  if (oA(n, e)) {
4803
- const S = Jo(
4803
+ const S = $o(
4804
4804
  ...l
4805
4805
  );
4806
4806
  return d.push(...S), {
@@ -4818,23 +4818,23 @@ function Er(n, e, t, o, r, s, i, a) {
4818
4818
  const { startIndex: R, endIndex: E, children: b } = v, y = S.children.indexOf(v), C = S.children[y + 1], B = b[0];
4819
4819
  let x = !1;
4820
4820
  if (B) {
4821
- const { startIndex: M, endIndex: P, children: F } = B;
4822
- let w = null, N = null;
4821
+ const { startIndex: M, endIndex: w, children: F } = B;
4822
+ let P = null, N = null;
4823
4823
  const ee = F.find((U) => U.startIndex <= f && U.endIndex >= f), $ = F.find((U) => U.startIndex <= p && U.endIndex >= p);
4824
- if (f > M && f < P)
4825
- w = r.findNodePositionByCharIndex(ee.startIndex + 2, !0, i, a), N = r.findNodePositionByCharIndex(P - 4, !0, i, a), m = P + 1;
4826
- else if (p > M && p < P)
4827
- w = r.findNodePositionByCharIndex(M + 3, !0, i, a), N = r.findNodePositionByCharIndex($.endIndex - 3, !0, i, a), I = M - 1, x = !0;
4828
- else if (M > f && P < p) {
4829
- if (w = r.findNodePositionByCharIndex(M + 3, !0, i, a), N = r.findNodePositionByCharIndex(P - 4, !0, i, a), m <= M - 1) {
4824
+ if (f > M && f < w)
4825
+ P = r.findNodePositionByCharIndex(ee.startIndex + 2, !0, i, a), N = r.findNodePositionByCharIndex(w - 4, !0, i, a), m = w + 1;
4826
+ else if (p > M && p < w)
4827
+ P = r.findNodePositionByCharIndex(M + 3, !0, i, a), N = r.findNodePositionByCharIndex($.endIndex - 3, !0, i, a), I = M - 1, x = !0;
4828
+ else if (M > f && w < p) {
4829
+ if (P = r.findNodePositionByCharIndex(M + 3, !0, i, a), N = r.findNodePositionByCharIndex(w - 4, !0, i, a), m <= M - 1) {
4830
4830
  const U = r.findNodePositionByCharIndex(m, !0, i, a), H = r.findNodePositionByCharIndex(M - 1, !1, i, a), k = g === De.FORWARD ? U : H, ne = g === De.FORWARD ? H : U;
4831
4831
  c.push(new Zt(t, o, r, k, ne, s, i, a));
4832
4832
  }
4833
- m = P + 1;
4833
+ m = w + 1;
4834
4834
  }
4835
- if (w && N) {
4836
- const U = g === De.FORWARD ? w : N, H = g === De.FORWARD ? N : w;
4837
- d.push(...Jo(
4835
+ if (P && N) {
4836
+ const U = g === De.FORWARD ? P : N, H = g === De.FORWARD ? N : P;
4837
+ d.push(...$o(
4838
4838
  t,
4839
4839
  o,
4840
4840
  r,
@@ -4847,10 +4847,10 @@ function Er(n, e, t, o, r, s, i, a) {
4847
4847
  }
4848
4848
  }
4849
4849
  if (I === E + 1 && !x && C && C.children.length && (I = E, x = !0), I >= R && I <= E || x) {
4850
- const M = r.findNodePositionByCharIndex(m, !0, i, a), P = r.findNodePositionByCharIndex(I, !x, i, a), F = g === De.FORWARD ? M : P, w = g === De.FORWARD ? P : M;
4851
- if (d.length && ue.diffValue(F, w))
4850
+ const M = r.findNodePositionByCharIndex(m, !0, i, a), w = r.findNodePositionByCharIndex(I, !x, i, a), F = g === De.FORWARD ? M : w, P = g === De.FORWARD ? w : M;
4851
+ if (d.length && ue.diffValue(F, P))
4852
4852
  continue;
4853
- c.push(new Zt(t, o, r, F, w, s, i, a));
4853
+ c.push(new Zt(t, o, r, F, P, s, i, a));
4854
4854
  }
4855
4855
  }
4856
4856
  return {
@@ -4889,7 +4889,7 @@ function Ii(n) {
4889
4889
  nodeIndex: s
4890
4890
  };
4891
4891
  }
4892
- function Ir(n) {
4892
+ function Sr(n) {
4893
4893
  const { startOffset: e, endOffset: t, collapsed: o, rangeType: r, startNodePosition: s, endNodePosition: i, direction: a, segmentId: c, segmentPage: d } = n;
4894
4894
  return {
4895
4895
  startOffset: e,
@@ -4905,7 +4905,7 @@ function Ir(n) {
4905
4905
  };
4906
4906
  }
4907
4907
  function hA(n) {
4908
- const e = Ir(n), {
4908
+ const e = Sr(n), {
4909
4909
  startRow: t,
4910
4910
  startColumn: o,
4911
4911
  endRow: r,
@@ -4932,7 +4932,7 @@ var gA = Object.getOwnPropertyDescriptor, fA = (n, e, t, o) => {
4932
4932
  (i = n[s]) && (r = i(r) || r);
4933
4933
  return r;
4934
4934
  }, Wn = (n, e) => (t, o) => e(t, o, n);
4935
- let Re = class extends Ct {
4935
+ let Re = class extends Rt {
4936
4936
  constructor(e, t, o, r, s) {
4937
4937
  super();
4938
4938
  O(this, "_onInputBefore$", new be());
@@ -5229,7 +5229,7 @@ let Re = class extends Ct {
5229
5229
  let u = s, g = i;
5230
5230
  this._onPointerEvent = !0, this._scenePointerMoveSubs.push(t.onPointerMove$.subscribeEvent((m) => {
5231
5231
  const { offsetX: I, offsetY: S } = m;
5232
- t.setCursor(_t.TEXT), !(Math.sqrt((I - u) ** 2 + (S - g) ** 2) < 3) && (this._moving(I, S), h.scrolling(I, S, () => {
5232
+ t.setCursor(Dt.TEXT), !(Math.sqrt((I - u) ** 2 + (S - g) ** 2) < 3) && (this._moving(I, S), h.scrolling(I, S, () => {
5233
5233
  this._moving(I, S);
5234
5234
  }), u = I, g = S);
5235
5235
  })), this._scenePointerUpSubs.push(t.onPointerUp$.subscribeEvent(() => {
@@ -5280,7 +5280,7 @@ let Re = class extends Ct {
5280
5280
  this._setRangeStyle(s);
5281
5281
  }
5282
5282
  _getAllTextRanges() {
5283
- return this._rangeList.map(Ir);
5283
+ return this._rangeList.map(Sr);
5284
5284
  }
5285
5285
  _getAllRectRanges() {
5286
5286
  return this._rectRangeList.map(hA);
@@ -5296,7 +5296,7 @@ let Re = class extends Ct {
5296
5296
  if (e == null)
5297
5297
  return null;
5298
5298
  const { startOffset: t, endOffset: o } = e;
5299
- return t == null || o == null ? null : Ir(e);
5299
+ return t == null || o == null ? null : Sr(e);
5300
5300
  }
5301
5301
  _getActiveRangeInstance() {
5302
5302
  return this._rangeList.find((e) => e.isActive());
@@ -5432,7 +5432,7 @@ let Re = class extends Ct {
5432
5432
  const { scene: o, mainComponent: r } = this._context, s = this._docSkeletonManagerService.getSkeleton(), { _anchorNodePosition: i, _focusNodePosition: a, _selectionStyle: c, _currentSegmentId: d, _currentSegmentPage: l } = this;
5433
5433
  if (i == null || a == null || r == null)
5434
5434
  return;
5435
- const A = Er(
5435
+ const A = Ir(
5436
5436
  i,
5437
5437
  a,
5438
5438
  o,
@@ -5479,7 +5479,7 @@ let Re = class extends Ct {
5479
5479
  const { _anchorNodePosition: d, _selectionStyle: l } = this, { scene: A, mainComponent: h } = this._context, u = this._docSkeletonManagerService.getSkeleton();
5480
5480
  if (d == null || h == null)
5481
5481
  return;
5482
- const g = Er(
5482
+ const g = Ir(
5483
5483
  d,
5484
5484
  i,
5485
5485
  A,
@@ -5627,18 +5627,18 @@ let Re = class extends Ct {
5627
5627
  }
5628
5628
  };
5629
5629
  Re = fA([
5630
- Wn(1, Oo),
5631
- Wn(2, Qr),
5630
+ Wn(1, To),
5631
+ Wn(2, Ur),
5632
5632
  Wn(3, L),
5633
5633
  Wn(4, j(de))
5634
5634
  ], Re);
5635
- const ko = {
5635
+ const Vo = {
5636
5636
  id: "doc.command.switch-mode",
5637
5637
  type: D.COMMAND,
5638
5638
  // eslint-disable-next-line max-lines-per-function, complexity
5639
5639
  handler: (n) => {
5640
5640
  var I, S, v, R, E;
5641
- const e = n.get(T), t = n.get(fe), o = n.get(Y), s = n.get(L).getCurrentUniverDocInstance();
5641
+ const e = n.get(T), t = n.get(pe), o = n.get(Y), s = n.get(L).getCurrentUniverDocInstance();
5642
5642
  if (s == null)
5643
5643
  return !1;
5644
5644
  const i = s.getUnitId(), a = (I = t.getRenderById(i)) == null ? void 0 : I.with(de).getSkeleton(), c = (S = t.getRenderById(i)) == null ? void 0 : S.with(Re);
@@ -5649,28 +5649,28 @@ const ko = {
5649
5649
  params: {
5650
5650
  unitId: i,
5651
5651
  actions: [],
5652
- textRanges: A === we.TRADITIONAL && d ? [] : h
5652
+ textRanges: A === Pe.TRADITIONAL && d ? [] : h
5653
5653
  }
5654
5654
  }, g = W.getInstance(), f = [];
5655
5655
  let p;
5656
- if (A === void 0 ? p = g.insertOp(["documentStyle", "documentFlavor"], we.MODERN) : A === we.MODERN ? p = g.replaceOp(["documentStyle", "documentFlavor"], A, we.TRADITIONAL) : p = g.replaceOp(["documentStyle", "documentFlavor"], A, we.MODERN), p)
5656
+ if (A === void 0 ? p = g.insertOp(["documentStyle", "documentFlavor"], Pe.MODERN) : A === Pe.MODERN ? p = g.replaceOp(["documentStyle", "documentFlavor"], A, Pe.TRADITIONAL) : p = g.replaceOp(["documentStyle", "documentFlavor"], A, Pe.MODERN), p)
5657
5657
  f.push(p);
5658
5658
  else
5659
5659
  return !1;
5660
- if (A !== we.MODERN) {
5660
+ if (A !== Pe.MODERN) {
5661
5661
  const b = s.getSnapshot(), { drawings: y = {}, body: C } = b, B = (v = C == null ? void 0 : C.customBlocks) != null ? v : [];
5662
5662
  for (const x in y) {
5663
- const M = y[x], P = B.find((he) => he.blockId === x);
5664
- if (P == null)
5663
+ const M = y[x], w = B.find((he) => he.blockId === x);
5664
+ if (w == null)
5665
5665
  continue;
5666
- const F = M.docTransform.positionV, { relativeFrom: w, posOffset: N } = F;
5667
- if (w === ft.PARAGRAPH)
5666
+ const F = M.docTransform.positionV, { relativeFrom: P, posOffset: N } = F;
5667
+ if (P === ft.PARAGRAPH)
5668
5668
  continue;
5669
- const { startIndex: ee } = P, $ = a.findNodeByCharIndex(ee, d, l), U = (R = $ == null ? void 0 : $.parent) == null ? void 0 : R.parent, H = U == null ? void 0 : U.parent, k = H == null ? void 0 : H.lines.find((he) => he.paragraphIndex === (U == null ? void 0 : U.paragraphIndex) && he.paragraphStart), ne = (E = H == null ? void 0 : H.parent) == null ? void 0 : E.parent;
5669
+ const { startIndex: ee } = w, $ = a.findNodeByCharIndex(ee, d, l), U = (R = $ == null ? void 0 : $.parent) == null ? void 0 : R.parent, H = U == null ? void 0 : U.parent, k = H == null ? void 0 : H.lines.find((he) => he.paragraphIndex === (U == null ? void 0 : U.paragraphIndex) && he.paragraphStart), ne = (E = H == null ? void 0 : H.parent) == null ? void 0 : E.parent;
5670
5670
  if ($ == null || U == null || k == null || H == null || ne == null)
5671
5671
  continue;
5672
5672
  let ie = 0;
5673
- w === ft.LINE ? ie -= U.top : w === ft.PAGE && (ie += ne.marginTop), ie += k.top;
5673
+ P === ft.LINE ? ie -= U.top : P === ft.PAGE && (ie += ne.marginTop), ie += k.top;
5674
5674
  const ae = {
5675
5675
  ...F,
5676
5676
  relativeFrom: ft.PARAGRAPH,
@@ -5686,8 +5686,8 @@ const ko = {
5686
5686
  type: D.COMMAND,
5687
5687
  // eslint-disable-next-line max-lines-per-function
5688
5688
  handler: async (n, e) => {
5689
- var ae, oe, he, Pe, Je;
5690
- const { rowCount: t, colCount: o } = e, r = n.get(Y), s = n.get(L), i = n.get(T), a = n.get(at), c = r.getActiveTextRange();
5689
+ var ae, oe, he, we, Je;
5690
+ const { rowCount: t, colCount: o } = e, r = n.get(Y), s = n.get(L), i = n.get(T), a = n.get(ct), c = r.getActiveTextRange();
5691
5691
  if (c == null)
5692
5692
  return !1;
5693
5693
  const { segmentId: d, segmentPage: l } = c, A = s.getCurrentUniverDocInstance(), h = A == null ? void 0 : A.getSelfOrHeaderFooterModel(d).getBody();
@@ -5722,35 +5722,35 @@ const ko = {
5722
5722
  },
5723
5723
  len: 1
5724
5724
  });
5725
- const B = a.getDefaultStyle(), x = a.getStyleCache(), M = Bo(
5725
+ const B = a.getDefaultStyle(), x = a.getStyleCache(), M = Mo(
5726
5726
  h,
5727
5727
  p,
5728
5728
  B,
5729
5729
  x
5730
- ), { dataStream: P, paragraphs: F, sectionBreaks: w } = md(t, o), N = (Je = (Pe = (he = (oe = S.parent) == null ? void 0 : oe.parent) == null ? void 0 : he.parent) == null ? void 0 : Pe.parent) == null ? void 0 : Je.parent;
5730
+ ), { dataStream: w, paragraphs: F, sectionBreaks: P } = md(t, o), N = (Je = (we = (he = (oe = S.parent) == null ? void 0 : oe.parent) == null ? void 0 : he.parent) == null ? void 0 : we.parent) == null ? void 0 : Je.parent;
5731
5731
  if (N == null)
5732
5732
  return !1;
5733
5733
  const { pageWidth: ee, marginLeft: $, marginRight: U } = N, H = Ea(t, o, ee - $ - U);
5734
5734
  v.push({
5735
5735
  t: G.INSERT,
5736
5736
  body: {
5737
- dataStream: P,
5737
+ dataStream: w,
5738
5738
  paragraphs: F,
5739
- sectionBreaks: w,
5739
+ sectionBreaks: P,
5740
5740
  textRuns: [{
5741
5741
  ...M,
5742
5742
  st: 0,
5743
- ed: P.length
5743
+ ed: w.length
5744
5744
  }],
5745
5745
  tables: [
5746
5746
  {
5747
5747
  startIndex: 0,
5748
- endIndex: P.length,
5748
+ endIndex: w.length,
5749
5749
  tableId: H.tableId
5750
5750
  }
5751
5751
  ]
5752
5752
  },
5753
- len: P.length
5753
+ len: w.length
5754
5754
  });
5755
5755
  const k = Ae(A, d);
5756
5756
  E.push(R.editOp(v.serialize(), k));
@@ -5837,21 +5837,21 @@ const ko = {
5837
5837
  }
5838
5838
  };
5839
5839
  for (const x of p) {
5840
- const { retain: M, delete: P } = x;
5840
+ const { retain: M, delete: w } = x;
5841
5841
  M > 0 && u.push({
5842
5842
  t: G.RETAIN,
5843
5843
  len: M
5844
5844
  }), u.push({
5845
5845
  t: G.DELETE,
5846
- len: P
5846
+ len: w
5847
5847
  });
5848
5848
  }
5849
5849
  const C = Ae(c, a);
5850
5850
  E.push(g.editOp(u.serialize(), C)), m.reverse();
5851
5851
  for (let x = 0; x < v; x++)
5852
5852
  for (const M of m) {
5853
- const P = g.removeOp(["tableSource", I, "tableRows", x, "tableCells", M]);
5854
- E.push(P);
5853
+ const w = g.removeOp(["tableSource", I, "tableRows", x, "tableCells", M]);
5854
+ E.push(w);
5855
5855
  }
5856
5856
  for (const x of m) {
5857
5857
  const M = g.removeOp(["tableSource", I, "tableColumns", x]);
@@ -5903,11 +5903,11 @@ const ko = {
5903
5903
  }, Cs = "doc.command.table-insert-row", Rs = "doc.command.table-insert-column", mA = "doc.command.table-insert-row-above", EA = "doc.command.table-insert-row-bellow", IA = "doc.command.table-insert-column-left", SA = "doc.command.table-insert-column-right", bs = {
5904
5904
  id: mA,
5905
5905
  type: D.COMMAND,
5906
- handler: async (n) => n.get(T).executeCommand(Cs, { position: _o.ABOVE })
5906
+ handler: async (n) => n.get(T).executeCommand(Cs, { position: Do.ABOVE })
5907
5907
  }, ys = {
5908
5908
  id: EA,
5909
5909
  type: D.COMMAND,
5910
- handler: async (n) => n.get(T).executeCommand(Cs, { position: _o.BELLOW })
5910
+ handler: async (n) => n.get(T).executeCommand(Cs, { position: Do.BELLOW })
5911
5911
  }, xs = {
5912
5912
  id: IA,
5913
5913
  type: D.COMMAND,
@@ -5957,8 +5957,8 @@ const ko = {
5957
5957
  });
5958
5958
  const x = Ae(l, d);
5959
5959
  E.push(p.editOp(f.serialize(), x));
5960
- const M = Xr(S), P = p.insertOp(["tableSource", v, "tableRows", R], M);
5961
- return E.push(P), C.params.actions = E.reduce((w, N) => W.compose(w, N), null), !!s.syncExecuteCommand(C.id, C.params);
5960
+ const M = Xr(S), w = p.insertOp(["tableSource", v, "tableRows", R], M);
5961
+ return E.push(w), C.params.actions = E.reduce((P, N) => W.compose(P, N), null), !!s.syncExecuteCommand(C.id, C.params);
5962
5962
  }
5963
5963
  }, vA = {
5964
5964
  id: Rs,
@@ -6005,10 +6005,10 @@ const ko = {
6005
6005
  const B = Ae(l, d);
6006
6006
  E.push(p.editOp(f.serialize(), B));
6007
6007
  for (let oe = 0; oe < R; oe++) {
6008
- const he = qr(), Pe = p.insertOp(["tableSource", v, "tableRows", oe, "tableCells", S], he);
6009
- E.push(Pe);
6008
+ const he = qr(), we = p.insertOp(["tableSource", v, "tableRows", oe, "tableCells", S], he);
6009
+ E.push(we);
6010
6010
  }
6011
- const x = l.getSnapshot(), M = x.documentStyle, { marginLeft: P = 0, marginRight: F = 0 } = M, w = ((ie = (ne = M.pageSize) == null ? void 0 : ne.width) != null ? ie : 800) - P - F, N = (ae = x == null ? void 0 : x.tableSource) == null ? void 0 : ae[v].tableColumns, { newColWidth: ee, widths: $ } = Cd(w, N, S);
6011
+ const x = l.getSnapshot(), M = x.documentStyle, { marginLeft: w = 0, marginRight: F = 0 } = M, P = ((ie = (ne = M.pageSize) == null ? void 0 : ne.width) != null ? ie : 800) - w - F, N = (ae = x == null ? void 0 : x.tableSource) == null ? void 0 : ae[v].tableColumns, { newColWidth: ee, widths: $ } = Cd(P, N, S);
6012
6012
  for (let oe = 0; oe < $.length; oe++) {
6013
6013
  const he = p.replaceOp(["tableSource", v, "tableColumns", oe, "size", "width", "v"], N[oe].size.width.v, $[oe]);
6014
6014
  E.push(he);
@@ -6028,7 +6028,7 @@ const ko = {
6028
6028
  if (h == null || c == null)
6029
6029
  return !1;
6030
6030
  let u = null;
6031
- if (t ? u = ei(h, c, Ar.PREV) : u = ei(h, c, Ar.NEXT), u) {
6031
+ if (t ? u = ei(h, c, ur.PREV) : u = ei(h, c, ur.NEXT), u) {
6032
6032
  const { startOffset: f, endOffset: p } = u, m = [{
6033
6033
  startOffset: f,
6034
6034
  endOffset: p
@@ -6036,10 +6036,10 @@ const ko = {
6036
6036
  return o.replaceDocRanges(m), !0;
6037
6037
  }
6038
6038
  return t === !1 ? await s.executeCommand(za.id, {
6039
- position: _o.BELLOW
6039
+ position: Do.BELLOW
6040
6040
  }) : !0;
6041
6041
  }
6042
- }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", $o = "doc.component.create-table-confirm", Ts = {
6042
+ }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", er = "doc.component.create-table-confirm", Ts = {
6043
6043
  id: "doc.operation.create-table",
6044
6044
  type: D.COMMAND,
6045
6045
  handler: async (n) => {
@@ -6050,7 +6050,7 @@ const ko = {
6050
6050
  r.rowCount = i, r.colCount = a;
6051
6051
  };
6052
6052
  return await t.open({
6053
- id: $o,
6053
+ id: er,
6054
6054
  children: {
6055
6055
  label: {
6056
6056
  name: Ya,
@@ -6063,18 +6063,18 @@ const ko = {
6063
6063
  width: "auto",
6064
6064
  title: { title: e.t("toolbar.table.insert") },
6065
6065
  onConfirm: () => {
6066
- o.executeCommand(ja.id, r), t.close($o);
6066
+ o.executeCommand(ja.id, r), t.close(er);
6067
6067
  },
6068
6068
  onClose: () => {
6069
- t.close($o);
6069
+ t.close(er);
6070
6070
  }
6071
6071
  }), !0;
6072
6072
  }
6073
- }, St = {
6073
+ }, vt = {
6074
6074
  id: "doc.operation.move-cursor",
6075
6075
  type: D.OPERATION,
6076
6076
  handler: (n, e) => !!e
6077
- }, vt = {
6077
+ }, Ct = {
6078
6078
  id: "doc.operation.move-selection",
6079
6079
  type: D.OPERATION,
6080
6080
  handler: (n, e) => !!e
@@ -6181,19 +6181,19 @@ var DA = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none
6181
6181
  }));
6182
6182
  });
6183
6183
  tc.displayName = "H1Icon";
6184
- var PA = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.5999 2.66689C2.5999 2.33552 2.33127 2.06689 1.9999 2.06689C1.66853 2.06689 1.3999 2.33552 1.3999 2.66689V13.3336C1.3999 13.6649 1.66853 13.9336 1.9999 13.9336C2.33127 13.9336 2.5999 13.6649 2.5999 13.3336V8.5999H7.3999V13.3336C7.3999 13.6649 7.66853 13.9336 7.9999 13.9336C8.33127 13.9336 8.5999 13.6649 8.5999 13.3336V2.66689C8.5999 2.33552 8.33127 2.06689 7.9999 2.06689C7.66853 2.06689 7.3999 2.33552 7.3999 2.66689V7.3999H2.5999V2.66689Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.2667 8.33356C11.2667 7.67245 11.8201 7.26689 12.3333 7.26689C12.8465 7.26689 13.4 7.67244 13.4 8.33356C13.4 8.62807 13.2712 8.94814 12.9954 9.32391C12.7183 9.70153 12.3394 10.0744 11.9174 10.4803L11.8355 10.559C11.4524 10.9268 11.0365 11.3263 10.7149 11.7373C10.3718 12.1759 10.0667 12.7122 10.0667 13.3336C10.0667 13.6649 10.3353 13.9336 10.6667 13.9336H14C14.3314 13.9336 14.6 13.6649 14.6 13.3336C14.6 13.0022 14.3314 12.7336 14 12.7336H11.4782C11.5286 12.6531 11.5889 12.5676 11.6601 12.4767C11.9269 12.1355 12.2843 11.792 12.6877 11.4043L12.7492 11.3452C13.1606 10.9496 13.615 10.5079 13.9629 10.0338C14.3122 9.55787 14.6 8.98906 14.6 8.33356C14.6 6.88362 13.3757 6.06689 12.3333 6.06689C11.291 6.06689 10.0667 6.88361 10.0667 8.33356C10.0667 8.66493 10.3353 8.93356 10.6667 8.93356C10.998 8.93356 11.2667 8.66493 11.2667 8.33356Z" } }] }, nc = Te(function(n, e) {
6184
+ var wA = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.5999 2.66689C2.5999 2.33552 2.33127 2.06689 1.9999 2.06689C1.66853 2.06689 1.3999 2.33552 1.3999 2.66689V13.3336C1.3999 13.6649 1.66853 13.9336 1.9999 13.9336C2.33127 13.9336 2.5999 13.6649 2.5999 13.3336V8.5999H7.3999V13.3336C7.3999 13.6649 7.66853 13.9336 7.9999 13.9336C8.33127 13.9336 8.5999 13.6649 8.5999 13.3336V2.66689C8.5999 2.33552 8.33127 2.06689 7.9999 2.06689C7.66853 2.06689 7.3999 2.33552 7.3999 2.66689V7.3999H2.5999V2.66689Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.2667 8.33356C11.2667 7.67245 11.8201 7.26689 12.3333 7.26689C12.8465 7.26689 13.4 7.67244 13.4 8.33356C13.4 8.62807 13.2712 8.94814 12.9954 9.32391C12.7183 9.70153 12.3394 10.0744 11.9174 10.4803L11.8355 10.559C11.4524 10.9268 11.0365 11.3263 10.7149 11.7373C10.3718 12.1759 10.0667 12.7122 10.0667 13.3336C10.0667 13.6649 10.3353 13.9336 10.6667 13.9336H14C14.3314 13.9336 14.6 13.6649 14.6 13.3336C14.6 13.0022 14.3314 12.7336 14 12.7336H11.4782C11.5286 12.6531 11.5889 12.5676 11.6601 12.4767C11.9269 12.1355 12.2843 11.792 12.6877 11.4043L12.7492 11.3452C13.1606 10.9496 13.615 10.5079 13.9629 10.0338C14.3122 9.55787 14.6 8.98906 14.6 8.33356C14.6 6.88362 13.3757 6.06689 12.3333 6.06689C11.291 6.06689 10.0667 6.88361 10.0667 8.33356C10.0667 8.66493 10.3353 8.93356 10.6667 8.93356C10.998 8.93356 11.2667 8.66493 11.2667 8.33356Z" } }] }, nc = Te(function(n, e) {
6185
6185
  return Be(Me, Object.assign({}, n, {
6186
6186
  id: "h2-icon",
6187
6187
  ref: e,
6188
- icon: PA
6188
+ icon: wA
6189
6189
  }));
6190
6190
  });
6191
6191
  nc.displayName = "H2Icon";
6192
- var wA = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.5999 2.66689C2.5999 2.33552 2.33127 2.06689 1.9999 2.06689C1.66853 2.06689 1.3999 2.33552 1.3999 2.66689V13.3336C1.3999 13.6649 1.66853 13.9336 1.9999 13.9336C2.33127 13.9336 2.5999 13.6649 2.5999 13.3336V8.5999H7.3999V13.3336C7.3999 13.6649 7.66853 13.9336 7.9999 13.9336C8.33127 13.9336 8.5999 13.6649 8.5999 13.3336V2.66689C8.5999 2.33552 8.33127 2.06689 7.9999 2.06689C7.66853 2.06689 7.3999 2.33552 7.3999 2.66689V7.3999H2.5999V2.66689Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M10.6667 6.06689C10.3353 6.06689 10.0667 6.33552 10.0667 6.66689C10.0667 6.99827 10.3353 7.26689 10.6667 7.26689H12.7732L11.193 9.29853C11.0524 9.47942 11.027 9.72465 11.1277 9.93051C11.2283 10.1364 11.4375 10.2669 11.6667 10.2669C12.2418 10.2669 12.6786 10.4115 12.9585 10.6354C13.2204 10.845 13.4 11.166 13.4 11.6669C13.4 12.1622 13.2254 12.3937 13.0567 12.5202C12.8588 12.6686 12.5829 12.7336 12.3333 12.7336C11.7271 12.7336 11.3432 12.4858 11.1106 12.23C10.8877 11.9848 10.5082 11.9667 10.2631 12.1896C10.0179 12.4125 9.99979 12.792 10.2227 13.0372C10.6568 13.5147 11.3522 13.9336 12.3333 13.9336C12.7504 13.9336 13.3078 13.8319 13.7767 13.4802C14.2746 13.1068 14.6 12.5049 14.6 11.6669C14.6 10.8345 14.2796 10.1555 13.7081 9.69837C13.4342 9.47923 13.117 9.32231 12.7746 9.21971L14.4736 7.03526C14.6143 6.85437 14.6397 6.60914 14.539 6.40328C14.4383 6.19743 14.2291 6.06689 14 6.06689H10.6667Z" } }] }, oc = Te(function(n, e) {
6192
+ var PA = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.5999 2.66689C2.5999 2.33552 2.33127 2.06689 1.9999 2.06689C1.66853 2.06689 1.3999 2.33552 1.3999 2.66689V13.3336C1.3999 13.6649 1.66853 13.9336 1.9999 13.9336C2.33127 13.9336 2.5999 13.6649 2.5999 13.3336V8.5999H7.3999V13.3336C7.3999 13.6649 7.66853 13.9336 7.9999 13.9336C8.33127 13.9336 8.5999 13.6649 8.5999 13.3336V2.66689C8.5999 2.33552 8.33127 2.06689 7.9999 2.06689C7.66853 2.06689 7.3999 2.33552 7.3999 2.66689V7.3999H2.5999V2.66689Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M10.6667 6.06689C10.3353 6.06689 10.0667 6.33552 10.0667 6.66689C10.0667 6.99827 10.3353 7.26689 10.6667 7.26689H12.7732L11.193 9.29853C11.0524 9.47942 11.027 9.72465 11.1277 9.93051C11.2283 10.1364 11.4375 10.2669 11.6667 10.2669C12.2418 10.2669 12.6786 10.4115 12.9585 10.6354C13.2204 10.845 13.4 11.166 13.4 11.6669C13.4 12.1622 13.2254 12.3937 13.0567 12.5202C12.8588 12.6686 12.5829 12.7336 12.3333 12.7336C11.7271 12.7336 11.3432 12.4858 11.1106 12.23C10.8877 11.9848 10.5082 11.9667 10.2631 12.1896C10.0179 12.4125 9.99979 12.792 10.2227 13.0372C10.6568 13.5147 11.3522 13.9336 12.3333 13.9336C12.7504 13.9336 13.3078 13.8319 13.7767 13.4802C14.2746 13.1068 14.6 12.5049 14.6 11.6669C14.6 10.8345 14.2796 10.1555 13.7081 9.69837C13.4342 9.47923 13.117 9.32231 12.7746 9.21971L14.4736 7.03526C14.6143 6.85437 14.6397 6.60914 14.539 6.40328C14.4383 6.19743 14.2291 6.06689 14 6.06689H10.6667Z" } }] }, oc = Te(function(n, e) {
6193
6193
  return Be(Me, Object.assign({}, n, {
6194
6194
  id: "h3-icon",
6195
6195
  ref: e,
6196
- icon: wA
6196
+ icon: PA
6197
6197
  }));
6198
6198
  });
6199
6199
  oc.displayName = "H3Icon";
@@ -6332,7 +6332,7 @@ class WA extends me {
6332
6332
  ), this.disposeWithMe(
6333
6333
  ha(
6334
6334
  t.onInput$,
6335
- t.onKeydown$.pipe(dr((o) => {
6335
+ t.onKeydown$.pipe(Ar((o) => {
6336
6336
  const r = o.event;
6337
6337
  return r.ctrlKey || r.metaKey ? [q.X, q.V].includes(r.keyCode) : [q.BACKSPACE].includes(r.keyCode);
6338
6338
  })),
@@ -6488,10 +6488,10 @@ class WA extends me {
6488
6488
  }
6489
6489
  getSkeleton() {
6490
6490
  var o;
6491
- return (o = this._injector.get(fe).getRenderById(this._getEditorId())) == null ? void 0 : o.with(de).getSkeleton();
6491
+ return (o = this._injector.get(pe).getRenderById(this._getEditorId())) == null ? void 0 : o.with(de).getSkeleton();
6492
6492
  }
6493
6493
  isSheetEditor() {
6494
- return Rt(this._getEditorId());
6494
+ return bt(this._getEditorId());
6495
6495
  }
6496
6496
  /**
6497
6497
  * @deprecated use getDocumentData.
@@ -6539,7 +6539,7 @@ var jA = Object.getOwnPropertyDescriptor, zA = (n, e, t, o) => {
6539
6539
  for (var r = o > 1 ? void 0 : o ? jA(e, t) : e, s = n.length - 1, i; s >= 0; s--)
6540
6540
  (i = n[s]) && (r = i(r) || r);
6541
6541
  return r;
6542
- }, Ot = (n, e) => (t, o) => e(t, o, n);
6542
+ }, Tt = (n, e) => (t, o) => e(t, o, n);
6543
6543
  const GA = [
6544
6544
  "editor",
6545
6545
  "render-canvas"
@@ -6547,7 +6547,7 @@ const GA = [
6547
6547
  // 'univer-range-selector-editor',
6548
6548
  // 'univer-text-editor-container-placeholder',
6549
6549
  ];
6550
- let Sr = class extends me {
6550
+ let vr = class extends me {
6551
6551
  constructor(e, t, o, r, s, i, a) {
6552
6552
  super();
6553
6553
  O(this, "_editors", /* @__PURE__ */ new Map());
@@ -6603,7 +6603,7 @@ let Sr = class extends me {
6603
6603
  return;
6604
6604
  this._univerInstanceService.setCurrentUnitForType(e);
6605
6605
  const o = t.getValue().length;
6606
- this._contextService.setContextValue(to, !0), Rt(e) || this._contextService.setContextValue(Fs, !0), t.focus(), this._setFocusId(e), this._focus$.next({
6606
+ this._contextService.setContextValue(to, !0), bt(e) || this._contextService.setContextValue(Fs, !0), t.focus(), this._setFocusId(e), this._focus$.next({
6607
6607
  startOffset: o,
6608
6608
  endOffset: o
6609
6609
  });
@@ -6673,16 +6673,16 @@ let Sr = class extends me {
6673
6673
  };
6674
6674
  }
6675
6675
  };
6676
- Sr = zA([
6677
- Ot(0, L),
6678
- Ot(1, fe),
6679
- Ot(2, j(Y)),
6680
- Ot(3, Fr),
6681
- Ot(4, T),
6682
- Ot(5, xo),
6683
- Ot(6, j(Pn))
6684
- ], Sr);
6685
- const Ye = Ki("univer.editor.service"), vr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
6676
+ vr = zA([
6677
+ Tt(0, L),
6678
+ Tt(1, pe),
6679
+ Tt(2, j(Y)),
6680
+ Tt(3, Hr),
6681
+ Tt(4, T),
6682
+ Tt(5, xo),
6683
+ Tt(6, j(wn))
6684
+ ], vr);
6685
+ const Ye = Ki("univer.editor.service"), Cr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
6686
6686
  function YA(n, e, t) {
6687
6687
  const {
6688
6688
  useFirstPageHeaderFooter: o,
@@ -6697,7 +6697,7 @@ function YA(n, e, t) {
6697
6697
  return e === ve.HEADER ? o === z.TRUE ? t === 0 ? a : r === z.TRUE && t % 2 === 1 ? d : s : r === z.TRUE && t % 2 === 1 ? d : s : o === z.TRUE ? t === 0 ? c : r === z.TRUE && t % 2 === 1 ? l : i : r === z.TRUE && t % 2 === 1 ? l : i;
6698
6698
  }
6699
6699
  const KA = (n) => {
6700
- const e = J(Ke), t = J(L), o = J(fe), r = J(T), s = J(Oo), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
6700
+ const e = J(Ke), t = J(L), o = J(pe), r = J(T), s = J(To), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
6701
6701
  var b;
6702
6702
  d((y) => ({
6703
6703
  ...y,
@@ -6794,7 +6794,7 @@ const KA = (n) => {
6794
6794
  /* @__PURE__ */ re("div", { children: [
6795
6795
  /* @__PURE__ */ Q("span", { children: e.t("headerFooter.headerTopMargin") }),
6796
6796
  /* @__PURE__ */ Q(
6797
- it,
6797
+ at,
6798
6798
  {
6799
6799
  className: "univer-mt-1.5 univer-w-4/5",
6800
6800
  min: 0,
@@ -6810,7 +6810,7 @@ const KA = (n) => {
6810
6810
  /* @__PURE__ */ re("div", { children: [
6811
6811
  /* @__PURE__ */ Q("span", { children: e.t("headerFooter.footerBottomMargin") }),
6812
6812
  /* @__PURE__ */ Q(
6813
- it,
6813
+ at,
6814
6814
  {
6815
6815
  className: "univer-mt-1.5 univer-w-4/5",
6816
6816
  min: 0,
@@ -6828,7 +6828,7 @@ const KA = (n) => {
6828
6828
  ] });
6829
6829
  }, qA = () => {
6830
6830
  var d;
6831
- const n = J(Ke), e = J(fe), r = J(L).getCurrentUniverDocInstance().getUnitId(), i = ((d = e.getRenderById(r)) == null ? void 0 : d.with(de)).getViewModel(), [a, c] = Ee(!0);
6831
+ const n = J(Ke), e = J(pe), r = J(L).getCurrentUniverDocInstance().getUnitId(), i = ((d = e.getRenderById(r)) == null ? void 0 : d.with(de)).getViewModel(), [a, c] = Ee(!0);
6832
6832
  return Ce(() => {
6833
6833
  const l = i.getEditArea();
6834
6834
  c(l !== ve.BODY);
@@ -6839,7 +6839,7 @@ const KA = (n) => {
6839
6839
  A.unsubscribe();
6840
6840
  };
6841
6841
  }, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(KA, { unitId: r }) : /* @__PURE__ */ Q("div", { className: "univer-text-gray-400", children: n.t("headerFooter.disableText") }) });
6842
- }, Si = 18, vi = 200, er = 6, XA = 4;
6842
+ }, Si = 18, vi = 200, tr = 6, XA = 4;
6843
6843
  function ZA(n, e) {
6844
6844
  let { radius: t, width: o, height: r } = e;
6845
6845
  t = t != null ? t : 0, o = o != null ? o : 30, r = r != null ? r : 30;
@@ -6857,7 +6857,7 @@ class co extends ul {
6857
6857
  const { text: r, color: s } = o;
6858
6858
  t.save(), t.font = "13px Source Han Sans CN";
6859
6859
  const i = t.measureText(r).width, a = Math.min(
6860
- i + 2 * er,
6860
+ i + 2 * tr,
6861
6861
  vi
6862
6862
  );
6863
6863
  ZA(t, {
@@ -6866,7 +6866,7 @@ class co extends ul {
6866
6866
  radius: 4,
6867
6867
  fill: s
6868
6868
  }), t.fillStyle = "rgba(58, 96, 247, 1)";
6869
- const c = er, d = Si - XA, l = vi - 2 * er;
6869
+ const c = tr, d = Si - XA, l = vi - 2 * tr;
6870
6870
  if (i > l) {
6871
6871
  let A = "", h = 0;
6872
6872
  for (const u of r) {
@@ -6943,7 +6943,7 @@ function eu(n, e, t) {
6943
6943
  throw new Error(`Invalid editArea: ${e}`);
6944
6944
  }
6945
6945
  }
6946
- let Cr = class extends me {
6946
+ let Rr = class extends me {
6947
6947
  constructor(e, t, o, r, s, i, a, c, d) {
6948
6948
  super();
6949
6949
  O(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
@@ -6958,7 +6958,7 @@ let Cr = class extends me {
6958
6958
  this._commandService.onCommandExecuted((e) => {
6959
6959
  if (X.id === e.id) {
6960
6960
  const t = this._context.unit, r = this._docSkeletonManagerService.getViewModel().getEditArea(), s = t.getSnapshot().documentStyle.documentFlavor;
6961
- r !== ve.BODY && s === we.MODERN && this._commandService.executeCommand(_s.id, {
6961
+ r !== ve.BODY && s === Pe.MODERN && this._commandService.executeCommand(_s.id, {
6962
6962
  unitId: this._context.unitId
6963
6963
  });
6964
6964
  }
@@ -6966,7 +6966,7 @@ let Cr = class extends me {
6966
6966
  );
6967
6967
  }
6968
6968
  _initCustomComponents() {
6969
- this._componentManager.get(vr) || this.disposeWithMe(this._componentManager.register(vr, qA));
6969
+ this._componentManager.get(Cr) || this.disposeWithMe(this._componentManager.register(Cr, qA));
6970
6970
  }
6971
6971
  _init() {
6972
6972
  const { unitId: e } = this._context, t = mt(this._context);
@@ -7089,19 +7089,19 @@ let Cr = class extends me {
7089
7089
  return t ? t.isReadOnly() : !1;
7090
7090
  }
7091
7091
  _isTraditionalMode() {
7092
- return this._context.unit.getSnapshot().documentStyle.documentFlavor === we.TRADITIONAL;
7092
+ return this._context.unit.getSnapshot().documentStyle.documentFlavor === Pe.TRADITIONAL;
7093
7093
  }
7094
7094
  };
7095
- Cr = $A([
7095
+ Rr = $A([
7096
7096
  ht(1, T),
7097
7097
  ht(2, Ye),
7098
7098
  ht(3, L),
7099
- ht(4, fe),
7099
+ ht(4, pe),
7100
7100
  ht(5, j(de)),
7101
7101
  ht(6, j(Re)),
7102
7102
  ht(7, j(Ke)),
7103
7103
  ht(8, j(sn))
7104
- ], Cr);
7104
+ ], Rr);
7105
7105
  const Bs = {
7106
7106
  id: "sidebar.operation.doc-header-footer-panel",
7107
7107
  type: D.OPERATION,
@@ -7111,7 +7111,7 @@ const Bs = {
7111
7111
  case "open":
7112
7112
  t.open({
7113
7113
  header: { title: o.t("headerFooter.panel") },
7114
- children: { label: vr },
7114
+ children: { label: Cr },
7115
7115
  onClose: () => {
7116
7116
  },
7117
7117
  width: 400
@@ -7155,7 +7155,7 @@ function bi() {
7155
7155
  ]
7156
7156
  };
7157
7157
  }
7158
- function tr(n, e, t, o) {
7158
+ function nr(n, e, t, o) {
7159
7159
  const r = W.getInstance(), s = 6, i = n != null ? n : ge(s), a = e === Qe.DEFAULT_HEADER || e === Qe.FIRST_PAGE_HEADER || e === Qe.EVEN_PAGE_HEADER, c = r.insertOp([a ? "headers" : "footers", i], {
7160
7160
  [a ? "headerId" : "footerId"]: i,
7161
7161
  body: bi()
@@ -7205,7 +7205,7 @@ const eo = "doc.command.core-header-footer", uc = {
7205
7205
  // eslint-disable-next-line max-lines-per-function
7206
7206
  handler: async (n, e) => {
7207
7207
  var v;
7208
- const t = n.get(T), o = n.get(L), r = n.get(fe), { unitId: s, segmentId: i, createType: a, headerFooterProps: c } = e, d = (v = r.getRenderById(s)) == null ? void 0 : v.with(de), l = o.getUniverDocInstance(s), A = d == null ? void 0 : d.getViewModel();
7208
+ const t = n.get(T), o = n.get(L), r = n.get(pe), { unitId: s, segmentId: i, createType: a, headerFooterProps: c } = e, d = (v = r.getRenderById(s)) == null ? void 0 : v.with(de), l = o.getUniverDocInstance(s), A = d == null ? void 0 : d.getViewModel();
7209
7209
  if (l == null || A == null)
7210
7210
  return !1;
7211
7211
  const h = A.getEditArea(), { documentStyle: u } = l.getSnapshot(), g = (c == null ? void 0 : c.marginFooter) != null || (c == null ? void 0 : c.marginHeader) != null, f = [{
@@ -7223,17 +7223,17 @@ const eo = "doc.command.core-header-footer", uc = {
7223
7223
  };
7224
7224
  g && (p.params.noNeedSetTextRange = !0);
7225
7225
  const m = W.getInstance(), I = [];
7226
- return a != null && tr(i, a, u, I), c != null && Object.keys(c).forEach((R) => {
7226
+ return a != null && nr(i, a, u, I), c != null && Object.keys(c).forEach((R) => {
7227
7227
  const E = c[R], b = u[R];
7228
7228
  if (E === b)
7229
7229
  return;
7230
7230
  let y;
7231
7231
  if (b === void 0 ? y = m.insertOp(["documentStyle", R], E) : y = m.replaceOp(["documentStyle", R], b, E), I.push(y), R === "useFirstPageHeaderFooter" && E === z.TRUE && !u.firstPageHeaderId) {
7232
7232
  const C = h === ve.HEADER ? Qe.FIRST_PAGE_HEADER : Qe.FIRST_PAGE_FOOTER;
7233
- tr(i, C, u, I);
7233
+ nr(i, C, u, I);
7234
7234
  } else if (R === "evenAndOddHeaders" && E === z.TRUE && !u.evenPageHeaderId) {
7235
7235
  const C = h === ve.HEADER ? Qe.EVEN_PAGE_HEADER : Qe.EVEN_PAGE_FOOTER;
7236
- tr(i, C, u, I);
7236
+ nr(i, C, u, I);
7237
7237
  }
7238
7238
  }), I.length === 0 ? !1 : (p.params.actions = I.reduce((R, E) => W.compose(R, E), null), !!t.syncExecuteCommand(p.id, p.params));
7239
7239
  }
@@ -7246,7 +7246,7 @@ const eo = "doc.command.core-header-footer", uc = {
7246
7246
  type: D.COMMAND,
7247
7247
  handler: async (n, e) => {
7248
7248
  var g;
7249
- const t = n.get(T), o = n.get(fe), r = n.get(Y), s = n.get(L), { unitId: i } = e, a = o.getRenderById(i);
7249
+ const t = n.get(T), o = n.get(pe), r = n.get(Y), s = n.get(L), { unitId: i } = e, a = o.getRenderById(i);
7250
7250
  if (a == null)
7251
7251
  return !1;
7252
7252
  const { scene: c } = a, d = c.getTransformerByCreate(), l = a.with(de), A = a.with(Re), h = l == null ? void 0 : l.getSkeleton(), u = l == null ? void 0 : l.getViewModel();
@@ -7348,8 +7348,8 @@ const eo = "doc.command.core-header-footer", uc = {
7348
7348
  options: ou
7349
7349
  }
7350
7350
  ), fc = `${hc}_ORDER_LIST_TYPE_COMPONENT`, pc = `${hc}_BULLET_LIST_TYPE_COMPONENT`, su = (n) => {
7351
- const t = Object.keys(ar).find((o) => {
7352
- const { width: r, height: s } = ar[o];
7351
+ const t = Object.keys(cr).find((o) => {
7352
+ const { width: r, height: s } = cr[o];
7353
7353
  return n.width === r && n.height === s;
7354
7354
  });
7355
7355
  return t != null ? t : "A4";
@@ -7416,7 +7416,7 @@ function iu(n) {
7416
7416
  /* @__PURE__ */ re("div", { className: "univer-flex univer-flex-1 univer-flex-col univer-gap-2", children: [
7417
7417
  /* @__PURE__ */ Q("label", { className: "univer-text-sm univer-font-medium univer-text-gray-500", children: s.t("page-settings.top") }),
7418
7418
  /* @__PURE__ */ Q(
7419
- it,
7419
+ at,
7420
7420
  {
7421
7421
  value: i.margins.top,
7422
7422
  onChange: (l) => d("top", l)
@@ -7426,7 +7426,7 @@ function iu(n) {
7426
7426
  /* @__PURE__ */ re("div", { className: "univer-flex univer-flex-1 univer-flex-col univer-gap-2", children: [
7427
7427
  /* @__PURE__ */ Q("label", { className: "univer-text-sm univer-font-medium univer-text-gray-500", children: s.t("page-settings.bottom") }),
7428
7428
  /* @__PURE__ */ Q(
7429
- it,
7429
+ at,
7430
7430
  {
7431
7431
  value: i.margins.bottom,
7432
7432
  onChange: (l) => d("bottom", l)
@@ -7438,7 +7438,7 @@ function iu(n) {
7438
7438
  /* @__PURE__ */ re("div", { className: "univer-flex univer-flex-1 univer-flex-col univer-gap-2", children: [
7439
7439
  /* @__PURE__ */ Q("label", { className: "univer-text-sm univer-font-medium univer-text-gray-500", children: s.t("page-settings.left") }),
7440
7440
  /* @__PURE__ */ Q(
7441
- it,
7441
+ at,
7442
7442
  {
7443
7443
  value: i.margins.left,
7444
7444
  onChange: (l) => d("left", l)
@@ -7448,7 +7448,7 @@ function iu(n) {
7448
7448
  /* @__PURE__ */ re("div", { className: "univer-flex univer-flex-1 univer-flex-col univer-gap-2", children: [
7449
7449
  /* @__PURE__ */ Q("label", { className: "univer-text-sm univer-font-medium univer-text-gray-500", children: s.t("page-settings.right") }),
7450
7450
  /* @__PURE__ */ Q(
7451
- it,
7451
+ at,
7452
7452
  {
7453
7453
  value: i.margins.right,
7454
7454
  onChange: (l) => d("right", l)
@@ -7460,7 +7460,7 @@ function iu(n) {
7460
7460
  ] })
7461
7461
  ] });
7462
7462
  }
7463
- const Rr = "docs.component.page-setting", mc = {
7463
+ const br = "docs.component.page-setting", mc = {
7464
7464
  id: "docs.command.page-setup",
7465
7465
  type: D.COMMAND,
7466
7466
  // eslint-disable-next-line complexity, max-lines-per-function
@@ -7533,12 +7533,12 @@ const Rr = "docs.component.page-setting", mc = {
7533
7533
  type: D.OPERATION,
7534
7534
  handler: (n) => {
7535
7535
  const e = n.get(ca), t = n.get(T), o = n.get(Ke), r = e.open({
7536
- id: Rr,
7536
+ id: br,
7537
7537
  title: {
7538
7538
  label: o.t("page-settings.document-setting")
7539
7539
  },
7540
7540
  children: {
7541
- label: Rr
7541
+ label: br
7542
7542
  },
7543
7543
  width: 528,
7544
7544
  onClose: () => {
@@ -7546,7 +7546,7 @@ const Rr = "docs.component.page-setting", mc = {
7546
7546
  },
7547
7547
  onConfirm: (s) => {
7548
7548
  if (r.dispose(), !s) return;
7549
- const i = ar[s.paperSize];
7549
+ const i = cr[s.paperSize];
7550
7550
  t.executeCommand(mc.id, {
7551
7551
  pageOrient: s.orientation,
7552
7552
  marginTop: s.margins.top,
@@ -7563,8 +7563,8 @@ const Rr = "docs.component.page-setting", mc = {
7563
7563
  }
7564
7564
  };
7565
7565
  function au(n) {
7566
- const e = n.get(L), t = n.get(fe);
7567
- return new pe((o) => {
7566
+ const e = n.get(L), t = n.get(pe);
7567
+ return new fe((o) => {
7568
7568
  const r = e.focused$.subscribe((s) => {
7569
7569
  if (s == null || e.getUnitType(s) !== _.UNIVER_DOC)
7570
7570
  return o.next(!0);
@@ -7580,7 +7580,7 @@ function au(n) {
7580
7580
  }
7581
7581
  function cu(n) {
7582
7582
  const e = n.get(L), t = n.get(T);
7583
- return new pe((o) => {
7583
+ return new fe((o) => {
7584
7584
  const r = t.onCommandExecuted((c) => {
7585
7585
  if (c.id === X.id) {
7586
7586
  const { unitId: d } = c.params, l = e.getUnit(d);
@@ -7589,25 +7589,25 @@ function cu(n) {
7589
7589
  return;
7590
7590
  }
7591
7591
  const { documentStyle: A } = l.getSnapshot();
7592
- o.next((A == null ? void 0 : A.documentFlavor) !== we.TRADITIONAL);
7592
+ o.next((A == null ? void 0 : A.documentFlavor) !== Pe.TRADITIONAL);
7593
7593
  }
7594
7594
  }), s = e.focused$.subscribe((c) => {
7595
7595
  if (c == null)
7596
7596
  return o.next(!0);
7597
7597
  const d = e.getUniverDocInstance(c), l = d == null ? void 0 : d.getSnapshot().documentStyle.documentFlavor;
7598
- o.next(l !== we.TRADITIONAL);
7598
+ o.next(l !== Pe.TRADITIONAL);
7599
7599
  }), i = e.getCurrentUniverDocInstance();
7600
7600
  if (i == null)
7601
7601
  return o.next(!0);
7602
7602
  const a = i == null ? void 0 : i.getSnapshot().documentStyle.documentFlavor;
7603
- return o.next(a !== we.TRADITIONAL), () => {
7603
+ return o.next(a !== Pe.TRADITIONAL), () => {
7604
7604
  r.dispose(), s.unsubscribe();
7605
7605
  };
7606
7606
  });
7607
7607
  }
7608
7608
  function lu(n) {
7609
7609
  const e = n.get(Y), t = n.get(L);
7610
- return new pe((o) => {
7610
+ return new fe((o) => {
7611
7611
  const r = e.textSelection$.subscribe((s) => {
7612
7612
  if (s == null) {
7613
7613
  o.next(!0);
@@ -7651,7 +7651,7 @@ function lu(n) {
7651
7651
  }
7652
7652
  function xe(n) {
7653
7653
  const e = n.get(Y);
7654
- return new pe((t) => {
7654
+ return new fe((t) => {
7655
7655
  const o = e.textSelection$.subscribe((r) => {
7656
7656
  if (r == null) {
7657
7657
  t.next(!0);
@@ -7675,10 +7675,10 @@ function du(n) {
7675
7675
  icon: "BoldIcon",
7676
7676
  title: "Set bold",
7677
7677
  tooltip: "toolbar.bold",
7678
- activated$: new pe((t) => {
7678
+ activated$: new fe((t) => {
7679
7679
  const o = () => {
7680
7680
  var a;
7681
- const s = dt(n);
7681
+ const s = rt(n);
7682
7682
  if (s == null) {
7683
7683
  t.next(!1);
7684
7684
  return;
@@ -7687,7 +7687,7 @@ function du(n) {
7687
7687
  t.next(i === z.TRUE);
7688
7688
  }, r = e.onCommandExecuted((s) => {
7689
7689
  const i = s.id;
7690
- (i === Le.id || i === yt.id) && o();
7690
+ (i === Le.id || i === xt.id) && o();
7691
7691
  });
7692
7692
  return o(), r.dispose;
7693
7693
  }),
@@ -7703,10 +7703,10 @@ function Au(n) {
7703
7703
  icon: "ItalicIcon",
7704
7704
  title: "Set italic",
7705
7705
  tooltip: "toolbar.italic",
7706
- activated$: new pe((t) => {
7706
+ activated$: new fe((t) => {
7707
7707
  const o = () => {
7708
7708
  var a;
7709
- const s = dt(n);
7709
+ const s = rt(n);
7710
7710
  if (s == null) {
7711
7711
  t.next(!1);
7712
7712
  return;
@@ -7715,7 +7715,7 @@ function Au(n) {
7715
7715
  t.next(i === z.TRUE);
7716
7716
  }, r = e.onCommandExecuted((s) => {
7717
7717
  const i = s.id;
7718
- (i === Le.id || i === yt.id) && o();
7718
+ (i === Le.id || i === xt.id) && o();
7719
7719
  });
7720
7720
  return o(), r.dispose;
7721
7721
  }),
@@ -7731,10 +7731,10 @@ function uu(n) {
7731
7731
  icon: "UnderlineIcon",
7732
7732
  title: "Set underline",
7733
7733
  tooltip: "toolbar.underline",
7734
- activated$: new pe((t) => {
7734
+ activated$: new fe((t) => {
7735
7735
  const o = () => {
7736
7736
  var a;
7737
- const s = dt(n);
7737
+ const s = rt(n);
7738
7738
  if (s == null) {
7739
7739
  t.next(!1);
7740
7740
  return;
@@ -7743,7 +7743,7 @@ function uu(n) {
7743
7743
  t.next((i == null ? void 0 : i.s) === z.TRUE);
7744
7744
  }, r = e.onCommandExecuted((s) => {
7745
7745
  const i = s.id;
7746
- (i === Le.id || i === yt.id) && o();
7746
+ (i === Le.id || i === xt.id) && o();
7747
7747
  });
7748
7748
  return o(), r.dispose;
7749
7749
  }),
@@ -7759,10 +7759,10 @@ function hu(n) {
7759
7759
  icon: "StrikethroughIcon",
7760
7760
  title: "Set strike through",
7761
7761
  tooltip: "toolbar.strikethrough",
7762
- activated$: new pe((t) => {
7762
+ activated$: new fe((t) => {
7763
7763
  const o = () => {
7764
7764
  var a;
7765
- const s = dt(n);
7765
+ const s = rt(n);
7766
7766
  if (s == null) {
7767
7767
  t.next(!1);
7768
7768
  return;
@@ -7771,7 +7771,7 @@ function hu(n) {
7771
7771
  t.next((i == null ? void 0 : i.s) === z.TRUE);
7772
7772
  }, r = e.onCommandExecuted((s) => {
7773
7773
  const i = s.id;
7774
- (i === Le.id || i === yt.id) && o();
7774
+ (i === Le.id || i === xt.id) && o();
7775
7775
  });
7776
7776
  return o(), r.dispose;
7777
7777
  }),
@@ -7782,14 +7782,14 @@ function hu(n) {
7782
7782
  function gu(n) {
7783
7783
  const e = n.get(T);
7784
7784
  return {
7785
- id: bt.id,
7785
+ id: yt.id,
7786
7786
  type: Z.BUTTON,
7787
7787
  icon: "SubscriptIcon",
7788
7788
  tooltip: "toolbar.subscript",
7789
- activated$: new pe((t) => {
7789
+ activated$: new fe((t) => {
7790
7790
  const o = () => {
7791
7791
  var a;
7792
- const s = dt(n);
7792
+ const s = rt(n);
7793
7793
  if (s == null) {
7794
7794
  t.next(!1);
7795
7795
  return;
@@ -7798,7 +7798,7 @@ function gu(n) {
7798
7798
  t.next(i === Ve.SUBSCRIPT);
7799
7799
  }, r = e.onCommandExecuted((s) => {
7800
7800
  const i = s.id;
7801
- (i === Le.id || i === yt.id) && o();
7801
+ (i === Le.id || i === xt.id) && o();
7802
7802
  });
7803
7803
  return o(), r.dispose;
7804
7804
  }),
@@ -7813,10 +7813,10 @@ function fu(n) {
7813
7813
  type: Z.BUTTON,
7814
7814
  icon: "SuperscriptIcon",
7815
7815
  tooltip: "toolbar.superscript",
7816
- activated$: new pe((t) => {
7816
+ activated$: new fe((t) => {
7817
7817
  const o = () => {
7818
7818
  var a;
7819
- const s = dt(n);
7819
+ const s = rt(n);
7820
7820
  if (s == null) {
7821
7821
  t.next(!1);
7822
7822
  return;
@@ -7825,7 +7825,7 @@ function fu(n) {
7825
7825
  t.next(i === Ve.SUPERSCRIPT);
7826
7826
  }, r = e.onCommandExecuted((s) => {
7827
7827
  const i = s.id;
7828
- (i === Le.id || i === yt.id) && o();
7828
+ (i === Le.id || i === xt.id) && o();
7829
7829
  });
7830
7830
  return o(), r.dispose;
7831
7831
  }),
@@ -7847,10 +7847,10 @@ function pu(n) {
7847
7847
  value: t.value
7848
7848
  })),
7849
7849
  // disabled$: getCurrentSheetDisabled$(accessor),
7850
- value$: new pe((t) => {
7851
- const o = Hr.ff, r = () => {
7850
+ value$: new fe((t) => {
7851
+ const o = Oo.ff, r = () => {
7852
7852
  var c;
7853
- const i = dt(n);
7853
+ const i = rt(n);
7854
7854
  if (i == null) {
7855
7855
  t.next(o);
7856
7856
  return;
@@ -7870,7 +7870,7 @@ function pu(n) {
7870
7870
  function mu(n) {
7871
7871
  const e = n.get(T);
7872
7872
  return {
7873
- id: ct.id,
7873
+ id: lt.id,
7874
7874
  type: Z.SELECTOR,
7875
7875
  tooltip: "toolbar.fontSize",
7876
7876
  label: {
@@ -7883,10 +7883,10 @@ function mu(n) {
7883
7883
  },
7884
7884
  selections: Ml,
7885
7885
  // disabled$,
7886
- value$: new pe((t) => {
7887
- const o = Hr.fs, r = () => {
7886
+ value$: new fe((t) => {
7887
+ const o = Oo.fs, r = () => {
7888
7888
  var c;
7889
- const i = dt(n);
7889
+ const i = rt(n);
7890
7890
  if (i == null) {
7891
7891
  t.next(o);
7892
7892
  return;
@@ -7895,7 +7895,7 @@ function mu(n) {
7895
7895
  t.next(a != null ? a : o);
7896
7896
  }, s = e.onCommandExecuted((i) => {
7897
7897
  const a = i.id;
7898
- (a === Le.id || a === ct.id) && r();
7898
+ (a === Le.id || a === lt.id) && r();
7899
7899
  });
7900
7900
  return r(), s.dispose;
7901
7901
  }),
@@ -7917,7 +7917,7 @@ function Eu(n) {
7917
7917
  },
7918
7918
  selections: Ys.map((t) => ({
7919
7919
  label: {
7920
- name: Pl,
7920
+ name: wl,
7921
7921
  props: {
7922
7922
  value: t.value,
7923
7923
  text: t.label
@@ -7925,7 +7925,7 @@ function Eu(n) {
7925
7925
  },
7926
7926
  value: t.value
7927
7927
  })),
7928
- value$: new pe((t) => {
7928
+ value$: new fe((t) => {
7929
7929
  const o = K.NORMAL_TEXT, r = () => {
7930
7930
  var c, d;
7931
7931
  const i = Vt(n);
@@ -7937,7 +7937,7 @@ function Eu(n) {
7937
7937
  t.next(a);
7938
7938
  }, s = e.onCommandExecuted((i) => {
7939
7939
  const a = i.id;
7940
- (a === Le.id || a === ct.id) && r();
7940
+ (a === Le.id || a === lt.id) && r();
7941
7941
  });
7942
7942
  return r(), s.dispose;
7943
7943
  }),
@@ -7946,7 +7946,7 @@ function Eu(n) {
7946
7946
  };
7947
7947
  }
7948
7948
  function Iu(n) {
7949
- const e = n.get(T), t = n.get(Ur);
7949
+ const e = n.get(T), t = n.get(Fr);
7950
7950
  return {
7951
7951
  id: Et.id,
7952
7952
  icon: "FontColorDoubleIcon",
@@ -7959,10 +7959,10 @@ function Iu(n) {
7959
7959
  hoverable: !1,
7960
7960
  selectable: !1
7961
7961
  },
7962
- value$: new pe((o) => {
7963
- const r = Hr.cl.rgb, s = () => {
7962
+ value$: new fe((o) => {
7963
+ const r = Oo.cl.rgb, s = () => {
7964
7964
  var d, l;
7965
- const a = dt(n);
7965
+ const a = rt(n);
7966
7966
  if (!a) {
7967
7967
  o.next(r);
7968
7968
  return;
@@ -7976,7 +7976,7 @@ function Iu(n) {
7976
7976
  })
7977
7977
  }
7978
7978
  ],
7979
- value$: new pe((o) => {
7979
+ value$: new fe((o) => {
7980
7980
  const r = t.getColorFromTheme("gray.900"), s = e.onCommandExecuted((i) => {
7981
7981
  if (i.id === Et.id) {
7982
7982
  const a = i.params.value;
@@ -8022,16 +8022,16 @@ function Ru(n) {
8022
8022
  function bu(n) {
8023
8023
  const e = n.get(T);
8024
8024
  return {
8025
- id: Qo.id,
8025
+ id: Uo.id,
8026
8026
  type: Z.BUTTON,
8027
8027
  icon: "LeftJustifyingIcon",
8028
8028
  tooltip: "toolbar.alignLeft",
8029
8029
  disabled$: xe(n),
8030
- activated$: new pe((t) => {
8030
+ activated$: new fe((t) => {
8031
8031
  const o = e.onCommandExecuted((r) => {
8032
8032
  var i;
8033
8033
  const s = r.id;
8034
- if (s === Le.id || s === lt.id) {
8034
+ if (s === Le.id || s === dt.id) {
8035
8035
  const a = Vt(n);
8036
8036
  if (a == null)
8037
8037
  return;
@@ -8047,15 +8047,15 @@ function bu(n) {
8047
8047
  function yu(n) {
8048
8048
  const e = n.get(T);
8049
8049
  return {
8050
- id: Uo.id,
8050
+ id: Fo.id,
8051
8051
  type: Z.BUTTON,
8052
8052
  icon: "HorizontallyIcon",
8053
8053
  tooltip: "toolbar.alignCenter",
8054
- activated$: new pe((t) => {
8054
+ activated$: new fe((t) => {
8055
8055
  const o = e.onCommandExecuted((r) => {
8056
8056
  var i;
8057
8057
  const s = r.id;
8058
- if (s === Le.id || s === lt.id) {
8058
+ if (s === Le.id || s === dt.id) {
8059
8059
  const a = Vt(n);
8060
8060
  if (a == null)
8061
8061
  return;
@@ -8072,15 +8072,15 @@ function yu(n) {
8072
8072
  function xu(n) {
8073
8073
  const e = n.get(T);
8074
8074
  return {
8075
- id: Fo.id,
8075
+ id: Ho.id,
8076
8076
  type: Z.BUTTON,
8077
8077
  icon: "RightJustifyingIcon",
8078
8078
  tooltip: "toolbar.alignRight",
8079
- activated$: new pe((t) => {
8079
+ activated$: new fe((t) => {
8080
8080
  const o = e.onCommandExecuted((r) => {
8081
8081
  var i;
8082
8082
  const s = r.id;
8083
- if (s === Le.id || s === lt.id) {
8083
+ if (s === Le.id || s === dt.id) {
8084
8084
  const a = Vt(n);
8085
8085
  if (a == null)
8086
8086
  return;
@@ -8097,15 +8097,15 @@ function xu(n) {
8097
8097
  function Ou(n) {
8098
8098
  const e = n.get(T);
8099
8099
  return {
8100
- id: Ho.id,
8100
+ id: ko.id,
8101
8101
  type: Z.BUTTON,
8102
8102
  icon: "AlignTextBothIcon",
8103
8103
  tooltip: "toolbar.alignJustify",
8104
- activated$: new pe((t) => {
8104
+ activated$: new fe((t) => {
8105
8105
  const o = e.onCommandExecuted((r) => {
8106
8106
  var i;
8107
8107
  const s = r.id;
8108
- if (s === Le.id || s === lt.id) {
8108
+ if (s === Le.id || s === dt.id) {
8109
8109
  const a = Vt(n);
8110
8110
  if (a == null)
8111
8111
  return;
@@ -8121,7 +8121,7 @@ function Ou(n) {
8121
8121
  }
8122
8122
  function Tu(n) {
8123
8123
  return {
8124
- id: wo.id,
8124
+ id: No.id,
8125
8125
  type: Z.BUTTON,
8126
8126
  icon: "ReduceIcon",
8127
8127
  tooltip: "toolbar.horizontalLine",
@@ -8129,7 +8129,7 @@ function Tu(n) {
8129
8129
  hidden$: se(n, _.UNIVER_DOC, void 0, ot)
8130
8130
  };
8131
8131
  }
8132
- const Bn = (n) => new pe((e) => {
8132
+ const Bn = (n) => new fe((e) => {
8133
8133
  const t = n.get(L), o = n.get(Y);
8134
8134
  let r;
8135
8135
  const s = t.focused$.subscribe((i) => {
@@ -8176,7 +8176,7 @@ function yi(n) {
8176
8176
  tooltip: "toolbar.order",
8177
8177
  hidden$: se(n, _.UNIVER_DOC),
8178
8178
  disabled$: xe(n),
8179
- activated$: Bn(n).pipe(wn((e) => !!(e && e.indexOf("ORDER_LIST") === 0)))
8179
+ activated$: Bn(n).pipe(Pn((e) => !!(e && e.indexOf("ORDER_LIST") === 0)))
8180
8180
  };
8181
8181
  }
8182
8182
  function xi(n) {
@@ -8198,7 +8198,7 @@ function xi(n) {
8198
8198
  tooltip: "toolbar.unorder",
8199
8199
  disabled$: xe(n),
8200
8200
  hidden$: se(n, _.UNIVER_DOC),
8201
- activated$: Bn(n).pipe(wn((e) => !!(e && e.indexOf("BULLET_LIST") === 0)))
8201
+ activated$: Bn(n).pipe(Pn((e) => !!(e && e.indexOf("BULLET_LIST") === 0)))
8202
8202
  };
8203
8203
  }
8204
8204
  function Oi(n) {
@@ -8209,27 +8209,27 @@ function Oi(n) {
8209
8209
  tooltip: "toolbar.checklist",
8210
8210
  disabled$: xe(n),
8211
8211
  hidden$: se(n, _.UNIVER_DOC),
8212
- activated$: Bn(n).pipe(wn((e) => !!(e && e.indexOf("CHECK_LIST") === 0)))
8212
+ activated$: Bn(n).pipe(Pn((e) => !!(e && e.indexOf("CHECK_LIST") === 0)))
8213
8213
  };
8214
8214
  }
8215
8215
  function Bu(n) {
8216
8216
  const e = n.get(T), t = n.get(L);
8217
8217
  return {
8218
- id: ko.id,
8218
+ id: Vo.id,
8219
8219
  type: Z.BUTTON,
8220
8220
  icon: "KeyboardIcon",
8221
8221
  tooltip: "toolbar.documentFlavor",
8222
8222
  hidden$: se(n, _.UNIVER_DOC, void 0, ot),
8223
- activated$: new pe((o) => {
8223
+ activated$: new fe((o) => {
8224
8224
  var i;
8225
8225
  const r = e.onCommandExecuted((a) => {
8226
8226
  var c;
8227
8227
  if (a.id === X.id) {
8228
8228
  const d = t.getCurrentUnitForType(_.UNIVER_DOC);
8229
- o.next(((c = d == null ? void 0 : d.getSnapshot()) == null ? void 0 : c.documentStyle.documentFlavor) === we.MODERN);
8229
+ o.next(((c = d == null ? void 0 : d.getSnapshot()) == null ? void 0 : c.documentStyle.documentFlavor) === Pe.MODERN);
8230
8230
  }
8231
8231
  }), s = t.getCurrentUnitForType(_.UNIVER_DOC);
8232
- return o.next(((i = s == null ? void 0 : s.getSnapshot()) == null ? void 0 : i.documentStyle.documentFlavor) === we.MODERN), () => r.dispose();
8232
+ return o.next(((i = s == null ? void 0 : s.getSnapshot()) == null ? void 0 : i.documentStyle.documentFlavor) === Pe.MODERN), () => r.dispose();
8233
8233
  })
8234
8234
  };
8235
8235
  }
@@ -8242,9 +8242,9 @@ function Mu(n) {
8242
8242
  };
8243
8243
  }
8244
8244
  function _u(n) {
8245
- const e = n.get(T), t = n.get(Ur);
8245
+ const e = n.get(T), t = n.get(Fr);
8246
8246
  return {
8247
- id: Pt.id,
8247
+ id: It.id,
8248
8248
  tooltip: "toolbar.fillColor.main",
8249
8249
  type: Z.BUTTON_SELECTOR,
8250
8250
  icon: "PaintBucketDoubleIcon",
@@ -8254,12 +8254,27 @@ function _u(n) {
8254
8254
  name: da,
8255
8255
  hoverable: !1,
8256
8256
  selectable: !1
8257
- }
8257
+ },
8258
+ value$: new fe((o) => {
8259
+ const r = Oo.bg.rgb, s = () => {
8260
+ var d, l;
8261
+ const a = rt(n);
8262
+ if (!a) {
8263
+ o.next(r);
8264
+ return;
8265
+ }
8266
+ const c = (l = (d = a.ts) == null ? void 0 : d.bg) == null ? void 0 : l.rgb;
8267
+ o.next(c != null ? c : r);
8268
+ }, i = e.onCommandExecuted((a) => {
8269
+ a.id === It.id && s();
8270
+ });
8271
+ return s(), i.dispose;
8272
+ })
8258
8273
  }
8259
8274
  ],
8260
- value$: new pe((o) => {
8275
+ value$: new fe((o) => {
8261
8276
  const r = t.getColorFromTheme("primary.600"), s = e.onCommandExecuted((i) => {
8262
- if (i.id === Pt.id) {
8277
+ if (i.id === It.id) {
8263
8278
  const a = i.params.value;
8264
8279
  o.next(a != null ? a : r);
8265
8280
  }
@@ -8270,9 +8285,9 @@ function _u(n) {
8270
8285
  hidden$: se(n, _.UNIVER_DOC)
8271
8286
  };
8272
8287
  }
8273
- function dt(n) {
8288
+ function rt(n) {
8274
8289
  var g, f, p, m;
8275
- const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? zc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
8290
+ const e = n.get(L), t = n.get(Y), o = n.get(ct), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? zc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
8276
8291
  if (r == null || i == null)
8277
8292
  return {
8278
8293
  ts: {
@@ -8326,7 +8341,7 @@ function Du(n) {
8326
8341
  hidden$: se(n, _.UNIVER_DOC)
8327
8342
  };
8328
8343
  }
8329
- const Pu = {
8344
+ const wu = {
8330
8345
  [K.HEADING_1]: hs,
8331
8346
  [K.HEADING_2]: gs,
8332
8347
  [K.HEADING_3]: fs,
@@ -8346,16 +8361,16 @@ const Pu = {
8346
8361
  [K.TITLE]: { key: "TextTypeIcon", component: mn },
8347
8362
  [K.SUBTITLE]: { key: "TextTypeIcon", component: mn },
8348
8363
  [K.NAMED_STYLE_TYPE_UNSPECIFIED]: { key: "TextTypeIcon", component: mn }
8349
- }, xt = (n) => (e) => {
8364
+ }, Ot = (n) => (e) => {
8350
8365
  const t = e.get(T), o = e.get(sn), r = Ic[n];
8351
8366
  return o.get(r.key) || o.register(r.key, r.component), {
8352
- id: Pu[n].id,
8367
+ id: wu[n].id,
8353
8368
  type: Z.BUTTON,
8354
8369
  icon: r.key,
8355
8370
  tooltip: "toolbar.heading.tooltip",
8356
8371
  disabled$: xe(e),
8357
8372
  hidden$: se(e, _.UNIVER_DOC),
8358
- activated$: new pe((s) => {
8373
+ activated$: new fe((s) => {
8359
8374
  const i = K.NORMAL_TEXT, a = () => {
8360
8375
  var A, h;
8361
8376
  const d = Vt(e);
@@ -8367,14 +8382,14 @@ const Pu = {
8367
8382
  s.next(l === n);
8368
8383
  }, c = t.onCommandExecuted((d) => {
8369
8384
  const l = d.id;
8370
- (l === Le.id || l === ct.id) && a();
8385
+ (l === Le.id || l === lt.id) && a();
8371
8386
  });
8372
8387
  return a(), c.dispose;
8373
8388
  })
8374
8389
  };
8375
- }, wu = xt(K.HEADING_1), Nu = xt(K.HEADING_2), Lu = xt(K.HEADING_3), Qu = xt(K.HEADING_4), Uu = xt(K.HEADING_5), Fu = xt(K.NORMAL_TEXT);
8376
- xt(K.TITLE);
8377
- xt(K.SUBTITLE);
8390
+ }, Pu = Ot(K.HEADING_1), Nu = Ot(K.HEADING_2), Lu = Ot(K.HEADING_3), Qu = Ot(K.HEADING_4), Uu = Ot(K.HEADING_5), Fu = Ot(K.NORMAL_TEXT);
8391
+ Ot(K.TITLE);
8392
+ Ot(K.SUBTITLE);
8378
8393
  const Hu = (n) => ({
8379
8394
  id: rs.id,
8380
8395
  type: Z.BUTTON,
@@ -8459,11 +8474,11 @@ function Mi(n, e, t) {
8459
8474
  y: d
8460
8475
  };
8461
8476
  }
8462
- const nr = (n, e) => {
8477
+ const or = (n, e) => {
8463
8478
  const { scene: t, mainComponent: o, engine: r } = e, s = e.with(de).getSkeleton(), i = s.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = n.collapsed ? n.startOffset : n.endOffset - 1, c = s.findNodePositionByCharIndex(a, !0, n.segmentId, n.segmentPage), d = o;
8464
8479
  if (!c || !i)
8465
8480
  return;
8466
- const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new It(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8481
+ const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new St(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8467
8482
  return Is(b).map((B) => vc(B, t)).map((B) => ({
8468
8483
  left: (B.left + A * v) * S + m,
8469
8484
  right: (B.right + A * v) * S + m,
@@ -8514,16 +8529,16 @@ let Mn = class extends me {
8514
8529
  }
8515
8530
  _createRangePositionObserver(n, e) {
8516
8531
  var i;
8517
- const t = (i = nr(n, e)) != null ? i : [], o = new Fe(t), r = new Sn();
8532
+ const t = (i = or(n, e)) != null ? i : [], o = new Fe(t), r = new Sn();
8518
8533
  r.add(this._commandService.onCommandExecuted((a) => {
8519
8534
  if ((a.id === nt.id || a.id === X.id) && a.params.unitId === e.unitId) {
8520
- const d = nr(n, e);
8535
+ const d = or(n, e);
8521
8536
  d && o.next(d);
8522
8537
  }
8523
8538
  }));
8524
8539
  const s = e.scene.getViewport(je.VIEW_MAIN);
8525
8540
  return s && r.add(s.onScrollAfter$.subscribeEvent(() => {
8526
- const a = nr(n, e);
8541
+ const a = or(n, e);
8527
8542
  a && o.next(a);
8528
8543
  })), {
8529
8544
  positions: t,
@@ -8591,7 +8606,7 @@ let Mn = class extends me {
8591
8606
  const { direction: r = "top", multipleDirection: s } = e, i = this._renderManagerService.getRenderById(t);
8592
8607
  if (!i)
8593
8608
  throw new Error(`Current render not found, unitId: ${t}`);
8594
- const { positions: a, positions$: c, disposable: d } = this._createRangePositionObserver(n, i), l = c.pipe(wn((h) => r.includes("top") ? h[0] : h[h.length - 1])), A = this._globalPopupManagerService.addPopup({
8609
+ const { positions: a, positions$: c, disposable: d } = this._createRangePositionObserver(n, i), l = c.pipe(Pn((h) => r.includes("top") ? h[0] : h[h.length - 1])), A = this._globalPopupManagerService.addPopup({
8595
8610
  ...e,
8596
8611
  unitId: t,
8597
8612
  subUnitId: "default",
@@ -8612,8 +8627,8 @@ let Mn = class extends me {
8612
8627
  // #endregion
8613
8628
  };
8614
8629
  Mn = qu([
8615
- jn(0, j(wl)),
8616
- jn(1, fe),
8630
+ jn(0, j(Pl)),
8631
+ jn(1, pe),
8617
8632
  jn(2, L),
8618
8633
  jn(3, T)
8619
8634
  ], Mn);
@@ -8633,7 +8648,7 @@ const $u = (n, e, t, o) => {
8633
8648
  const a = t.findNodePositionByCharIndex(i, !0, n.segmentId, o);
8634
8649
  if (!a || !r)
8635
8650
  return;
8636
- const c = e.getOffsetConfig(), d = new It(c, t), { borderBoxPointGroup: l } = d.getRangePointData(r, a);
8651
+ const c = e.getOffsetConfig(), d = new St(c, t), { borderBoxPointGroup: l } = d.getRangePointData(r, a);
8637
8652
  return Is(l).map((m) => ({
8638
8653
  top: m.top + c.docsTop - Ti,
8639
8654
  bottom: m.bottom + c.docsTop + Ti,
@@ -8680,7 +8695,7 @@ const $u = (n, e, t, o) => {
8680
8695
  const r = t.findPositionByGlyph(n, o);
8681
8696
  if (!r)
8682
8697
  return;
8683
- const s = e.getOffsetConfig(), i = { ...r, isBack: !0 }, a = new It(s, t), { borderBoxPointGroup: c } = a.getRangePointData(i, i), l = Is(c)[0];
8698
+ const s = e.getOffsetConfig(), i = { ...r, isBack: !0 }, a = new St(s, t), { borderBoxPointGroup: c } = a.getRangePointData(i, i), l = Is(c)[0];
8684
8699
  return {
8685
8700
  top: l.top + s.docsTop,
8686
8701
  bottom: l.bottom + s.docsTop,
@@ -8688,11 +8703,11 @@ const $u = (n, e, t, o) => {
8688
8703
  right: l.left + s.docsLeft + n.width
8689
8704
  };
8690
8705
  };
8691
- function Tt(n, e, t) {
8706
+ function Bt(n, e, t) {
8692
8707
  const { left: o, right: r, top: s, bottom: i } = t;
8693
8708
  return n >= o && n <= r && e >= s && e <= i;
8694
8709
  }
8695
- let wt = class extends me {
8710
+ let Pt = class extends me {
8696
8711
  constructor(e, t) {
8697
8712
  super();
8698
8713
  O(this, "_hoverCustomRanges$", new Fe([]));
@@ -8756,16 +8771,16 @@ let wt = class extends me {
8756
8771
  this._hoverCustomRanges$.complete(), this._clickCustomRanges$.complete(), super.dispose();
8757
8772
  }
8758
8773
  _initPointer() {
8759
- let e = _t.TEXT;
8774
+ let e = Dt.TEXT;
8760
8775
  this.disposeWithMe(this.hoverCustomRanges$.subscribe((t) => {
8761
- t.length ? (e = this._context.scene.getCursor(), this._context.scene.setCursor(_t.POINTER)) : this._context.scene.setCursor(e);
8776
+ t.length ? (e = this._context.scene.getCursor(), this._context.scene.setCursor(Dt.POINTER)) : this._context.scene.setCursor(e);
8762
8777
  }));
8763
8778
  }
8764
8779
  _initResetDirty() {
8765
8780
  this.disposeWithMe(this._skeleton.dirty$.subscribe(() => {
8766
8781
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
8767
8782
  })), this.disposeWithMe(
8768
- Mt(this._context.engine.onTransformChange$).pipe(
8783
+ _t(this._context.engine.onTransformChange$).pipe(
8769
8784
  ro((e) => e.type === oa.resize)
8770
8785
  ).subscribe(() => {
8771
8786
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
@@ -8773,7 +8788,7 @@ let wt = class extends me {
8773
8788
  );
8774
8789
  }
8775
8790
  _initEvents() {
8776
- this.disposeWithMe(Mt(this._context.scene.onPointerMove$).pipe(bn(30)).subscribe((o) => {
8791
+ this.disposeWithMe(_t(this._context.scene.onPointerMove$).pipe(bn(30)).subscribe((o) => {
8777
8792
  if (o.buttons > 0) {
8778
8793
  this._hoverBullet$.next(null), this._hoverCustomRanges$.next([]), this._hoverParagraph$.next(null), this._hoverParagraphLeft$.next(null), this._hoverTableCell$.next(null), this._hoverTable$.next(null);
8779
8794
  return;
@@ -8791,9 +8806,9 @@ let wt = class extends me {
8791
8806
  })), this.disposeWithMe(this._context.scene.onPointerEnter$.subscribeEvent(() => {
8792
8807
  this._hoverBullet$.next(null), this._hoverCustomRanges$.next([]);
8793
8808
  }));
8794
- const e = Mt(this._context.mainComponent.onPointerDown$), t = Mt(this._context.scene.onPointerUp$);
8809
+ const e = _t(this._context.mainComponent.onPointerDown$), t = _t(this._context.scene.onPointerUp$);
8795
8810
  this.disposeWithMe(e.pipe(
8796
- jl((o) => t.pipe(zl(1), wn((r) => ({ down: o, up: r })))),
8811
+ jl((o) => t.pipe(zl(1), Pn((r) => ({ down: o, up: r })))),
8797
8812
  ro(({ down: o, up: r }) => o.target === r.target && r.timeStamp - o.timeStamp < 300)
8798
8813
  ).subscribe(({ down: o }) => {
8799
8814
  if (o.button === 2)
@@ -8836,7 +8851,7 @@ let wt = class extends me {
8836
8851
  _calcActiveRanges(e) {
8837
8852
  this._buildCustomRangeBounds();
8838
8853
  const { x: t, y: o } = e;
8839
- return this._customRangeBounds.filter((s) => s.rects.some((i) => Tt(t, o, i))).map(
8854
+ return this._customRangeBounds.filter((s) => s.rects.some((i) => Bt(t, o, i))).map(
8840
8855
  (s) => ({
8841
8856
  segmentId: s.segmentId,
8842
8857
  range: s.customRange,
@@ -8896,7 +8911,7 @@ let wt = class extends me {
8896
8911
  _calcActiveBullet(e) {
8897
8912
  this._buildBulletBounds();
8898
8913
  const { x: t, y: o } = e;
8899
- return this._bulletBounds.find((s) => Tt(t, o, s.rect));
8914
+ return this._bulletBounds.find((s) => Bt(t, o, s.rect));
8900
8915
  }
8901
8916
  // eslint-disable-next-line max-lines-per-function
8902
8917
  _buildParagraphBoundsBySegment(e) {
@@ -8940,18 +8955,18 @@ let wt = class extends me {
8940
8955
  }), p.rows.forEach((E, b) => {
8941
8956
  E.cells.forEach((y, C) => {
8942
8957
  const B = ((u.pageHeight === 1 / 0 ? 0 : u.pageHeight) + r.pageMarginTop) * h + p.top + r.docsTop + u.marginTop + E.top + y.marginTop, x = p.left + r.docsLeft + u.marginLeft + y.left + y.marginLeft, M = _i(y.sections, B, x, y.pageWidth - y.marginLeft - y.marginRight);
8943
- let P = this._tableParagraphBounds.get(R);
8944
- P || (P = [], this._tableParagraphBounds.set(R, P)), P.push(
8945
- ...M.map((w) => ({
8946
- rect: w.rect,
8947
- paragraphStart: w.paragraphStart,
8948
- paragraphEnd: w.paragraphEnd,
8949
- startIndex: w.startIndex,
8958
+ let w = this._tableParagraphBounds.get(R);
8959
+ w || (w = [], this._tableParagraphBounds.set(R, w)), w.push(
8960
+ ...M.map((P) => ({
8961
+ rect: P.rect,
8962
+ paragraphStart: P.paragraphStart,
8963
+ paragraphEnd: P.paragraphEnd,
8964
+ startIndex: P.startIndex,
8950
8965
  pageIndex: h,
8951
8966
  segmentId: e,
8952
8967
  rowIndex: b,
8953
8968
  colIndex: C,
8954
- firstLine: w.fisrtLine,
8969
+ firstLine: P.fisrtLine,
8955
8970
  tableId: R
8956
8971
  }))
8957
8972
  );
@@ -9004,12 +9019,12 @@ let wt = class extends me {
9004
9019
  _calcActiveParagraph(e) {
9005
9020
  var i, a;
9006
9021
  this._buildParagraphBounds();
9007
- const { x: t, y: o } = e, r = Array.from(this._tableBounds.values()).find((c) => Tt(t, o, c.rect));
9022
+ const { x: t, y: o } = e, r = Array.from(this._tableBounds.values()).find((c) => Bt(t, o, c.rect));
9008
9023
  if (this._hoverTable$.next(r), r) {
9009
- const c = (i = this._tableCellBounds.get(r.tableId)) == null ? void 0 : i.find((A) => Tt(t, o, A.rect));
9024
+ const c = (i = this._tableCellBounds.get(r.tableId)) == null ? void 0 : i.find((A) => Bt(t, o, A.rect));
9010
9025
  if (this._hoverTableCell$.next(c), !c)
9011
9026
  return null;
9012
- const d = (a = this._tableParagraphBounds.get(c.tableId)) == null ? void 0 : a.filter((A) => A.colIndex === c.colIndex && A.rowIndex === c.rowIndex), l = d == null ? void 0 : d.find((A) => Tt(t, o, A.rect));
9027
+ const d = (a = this._tableParagraphBounds.get(c.tableId)) == null ? void 0 : a.filter((A) => A.colIndex === c.colIndex && A.rowIndex === c.rowIndex), l = d == null ? void 0 : d.find((A) => Bt(t, o, A.rect));
9013
9028
  return l && {
9014
9029
  ...l,
9015
9030
  rects: [l.rect]
@@ -9018,7 +9033,7 @@ let wt = class extends me {
9018
9033
  let s;
9019
9034
  for (const c of this._paragraphBounds) {
9020
9035
  const d = c[1];
9021
- if (d.rects.some((l) => Tt(t, o, l))) {
9036
+ if (d.rects.some((l) => Bt(t, o, l))) {
9022
9037
  s = d;
9023
9038
  break;
9024
9039
  }
@@ -9028,7 +9043,7 @@ let wt = class extends me {
9028
9043
  _calcActiveParagraphLeft(e) {
9029
9044
  this._buildParagraphBounds();
9030
9045
  const { x: t, y: o } = e;
9031
- return this._paragraphLeftBounds.find((s) => Tt(t, o, s.rect));
9046
+ return this._paragraphLeftBounds.find((s) => Bt(t, o, s.rect));
9032
9047
  }
9033
9048
  get paragraphBounds() {
9034
9049
  return this._buildParagraphBounds(), this._paragraphBounds;
@@ -9039,19 +9054,19 @@ let wt = class extends me {
9039
9054
  return t || Array.from(this._tableParagraphBounds.values()).flat().find((r) => r.startIndex === e);
9040
9055
  }
9041
9056
  };
9042
- wt = Zu([
9057
+ Pt = Zu([
9043
9058
  Ju(1, j(de))
9044
- ], wt);
9059
+ ], Pt);
9045
9060
  const th = [
9046
- ct.id,
9061
+ lt.id,
9047
9062
  Qt.id,
9048
9063
  Ut.id,
9049
9064
  Ft.id,
9050
9065
  Ht.id,
9051
- bt.id,
9066
+ yt.id,
9052
9067
  kt.id,
9053
9068
  Et.id,
9054
- Pt.id
9069
+ It.id
9055
9070
  ];
9056
9071
  function nh(n) {
9057
9072
  const { avaliableMenus: e = th } = n, t = J(Aa), [o, r] = Ee([]);
@@ -9097,7 +9112,7 @@ let lo = class extends me {
9097
9112
  constructor(e, t, o, r, s, i) {
9098
9113
  super();
9099
9114
  O(this, "_floatMenu", null);
9100
- this._context = e, this._docSelectionManagerService = t, this._docCanvasPopManagerService = o, this._componentManager = r, this._univerInstanceService = s, this._docSelectionRenderService = i, !Rt(this._context.unitId) && (this._registerFloatMenu(), this._initSelectionChange(), this.disposeWithMe(() => {
9115
+ this._context = e, this._docSelectionManagerService = t, this._docCanvasPopManagerService = o, this._componentManager = r, this._univerInstanceService = s, this._docSelectionRenderService = i, !bt(this._context.unitId) && (this._registerFloatMenu(), this._initSelectionChange(), this.disposeWithMe(() => {
9101
9116
  this._hideFloatMenu();
9102
9117
  }));
9103
9118
  }
@@ -9170,7 +9185,7 @@ let Ao = class extends me {
9170
9185
  constructor(e, t, o, r, s, i) {
9171
9186
  super();
9172
9187
  O(this, "_paragrahMenu", null);
9173
- this._context = e, this._docSelectionManagerService = t, this._docEventManagerService = o, this._docPopupManagerService = r, this._docSkeletonManagerService = s, this._floatMenuService = i, !Rt(this._context.unitId) && this._init();
9188
+ this._context = e, this._docSelectionManagerService = t, this._docEventManagerService = o, this._docPopupManagerService = r, this._docSkeletonManagerService = s, this._floatMenuService = i, !bt(this._context.unitId) && this._init();
9174
9189
  }
9175
9190
  get activeParagraph() {
9176
9191
  var e;
@@ -9248,14 +9263,14 @@ let Ao = class extends me {
9248
9263
  };
9249
9264
  Ao = ch([
9250
9265
  An(1, j(Y)),
9251
- An(2, j(wt)),
9266
+ An(2, j(Pt)),
9252
9267
  An(3, j(Mn)),
9253
9268
  An(4, j(de)),
9254
9269
  An(5, j(lo))
9255
9270
  ], Ao);
9256
9271
  const lh = ({ popup: n }) => {
9257
9272
  var E, b;
9258
- const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(Oo), i = ke(null), a = ke(!1), c = J(fe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(Ao), u = l == null ? void 0 : l.with(wt), g = tt(u == null ? void 0 : u.hoverParagraph$), f = tt(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = _e(() => {
9273
+ const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(To), i = ke(null), a = ke(!1), c = J(pe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(Ao), u = l == null ? void 0 : l.with(Pt), g = tt(u == null ? void 0 : u.hoverParagraph$), f = tt(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = _e(() => {
9259
9274
  var y, C;
9260
9275
  return (C = (y = A == null ? void 0 : A.getBody()) == null ? void 0 : y.paragraphs) == null ? void 0 : C.find((B) => B.startIndex === p);
9261
9276
  }, [A, g]), I = (b = m == null ? void 0 : m.paragraphStyle) == null ? void 0 : b.namedStyleType, S = Ic[I != null ? I : K.NORMAL_TEXT], v = _e(() => new Fe({
@@ -9277,14 +9292,14 @@ const lh = ({ popup: n }) => {
9277
9292
  "univer-bg-white dark:!univer-bg-gray-700": !e
9278
9293
  }),
9279
9294
  onMouseEnter: (y) => {
9280
- var B, x, M, P, F, w;
9295
+ var B, x, M, w, F, P;
9281
9296
  (B = n.onPointerEnter) == null || B.call(n, y), a.current = !0;
9282
9297
  const C = (x = i.current) == null ? void 0 : x.getBoundingClientRect();
9283
9298
  v.next({
9284
9299
  left: ((M = C == null ? void 0 : C.left) != null ? M : 0) - 4,
9285
- right: (P = C == null ? void 0 : C.right) != null ? P : 0,
9300
+ right: (w = C == null ? void 0 : C.right) != null ? w : 0,
9286
9301
  top: (F = C == null ? void 0 : C.top) != null ? F : 0,
9287
- bottom: (w = C == null ? void 0 : C.bottom) != null ? w : 0
9302
+ bottom: (P = C == null ? void 0 : C.bottom) != null ? P : 0
9288
9303
  });
9289
9304
  },
9290
9305
  onMouseLeave: () => {
@@ -9380,7 +9395,7 @@ const Ah = {
9380
9395
  binding: q.X | te.SHIFT | te.CTRL_COMMAND,
9381
9396
  preconditions: Se
9382
9397
  }, mh = {
9383
- id: bt.id,
9398
+ id: yt.id,
9384
9399
  binding: q.COMMA | te.CTRL_COMMAND,
9385
9400
  preconditions: Se
9386
9401
  }, Eh = {
@@ -9388,19 +9403,19 @@ const Ah = {
9388
9403
  binding: q.PERIOD | te.CTRL_COMMAND,
9389
9404
  preconditions: Se
9390
9405
  }, Ih = {
9391
- id: Qo.id,
9406
+ id: Uo.id,
9392
9407
  binding: q.L | te.CTRL_COMMAND | te.SHIFT,
9393
9408
  preconditions: Se
9394
9409
  }, Sh = {
9395
- id: Fo.id,
9410
+ id: Ho.id,
9396
9411
  binding: q.R | te.CTRL_COMMAND | te.SHIFT,
9397
9412
  preconditions: Se
9398
9413
  }, vh = {
9399
- id: Uo.id,
9414
+ id: Fo.id,
9400
9415
  binding: q.E | te.CTRL_COMMAND | te.SHIFT,
9401
9416
  preconditions: Se
9402
9417
  }, Ch = {
9403
- id: Ho.id,
9418
+ id: ko.id,
9404
9419
  binding: q.J | te.CTRL_COMMAND | te.SHIFT,
9405
9420
  preconditions: Se
9406
9421
  }, Rh = {
@@ -9411,7 +9426,7 @@ const Ah = {
9411
9426
  id: On.id,
9412
9427
  binding: q.Digit8 | te.CTRL_COMMAND | te.SHIFT,
9413
9428
  preconditions: Se
9414
- }, Vo = "docs-ui.config", Pi = {
9429
+ }, Wo = "docs-ui.config", wi = {
9415
9430
  layout: {
9416
9431
  docContainerConfig: sd,
9417
9432
  toolbarConfig: rd
@@ -9454,7 +9469,7 @@ function Th(n) {
9454
9469
  }
9455
9470
  function Bh() {
9456
9471
  var r, s, i;
9457
- const n = J(L), e = ua(Vo), t = tt(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []), o = (i = (s = (r = e == null ? void 0 : e.layout) == null ? void 0 : r.docContainerConfig) == null ? void 0 : s.footer) != null ? i : !0;
9472
+ const n = J(L), e = ua(Wo), t = tt(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []), o = (i = (s = (r = e == null ? void 0 : e.layout) == null ? void 0 : r.docContainerConfig) == null ? void 0 : s.footer) != null ? i : !0;
9458
9473
  return t ? null : o && /* @__PURE__ */ re(
9459
9474
  "div",
9460
9475
  {
@@ -9466,7 +9481,7 @@ function Bh() {
9466
9481
  }
9467
9482
  );
9468
9483
  }
9469
- const Mh = "univer-overflow-hidden univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer-leading-[24px] univer-ellipsis univer-cursor-pointer", _h = "univer-text-base univer-font-semibold", Dh = "univer-text-sm univer-font-semibold", Ph = "univer-text-sm", wh = Te((n, e) => {
9484
+ const Mh = "univer-overflow-hidden univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer-leading-[24px] univer-ellipsis univer-cursor-pointer", _h = "univer-text-base univer-font-semibold", Dh = "univer-text-sm univer-font-semibold", wh = "univer-text-sm", Ph = Te((n, e) => {
9470
9485
  const { menus: t, onClick: o, className: r, style: s, mode: i, maxHeight: a, activeId: c, open: d, onOpenChange: l, maxWidth: A, wrapperClass: h, wrapperStyle: u, iconClass: g, iconStyle: f } = n, p = i === "side-bar", m = ke(null), I = ke(t);
9471
9486
  I.current = t;
9472
9487
  const S = _e(() => ({
@@ -9529,7 +9544,7 @@ const Mh = "univer-overflow-hidden univer-font-[500] univer-truncate univer-h-[2
9529
9544
  {
9530
9545
  [_h]: v.isTitle,
9531
9546
  [Dh]: v.level === 1,
9532
- [Ph]: v.level > 1,
9547
+ [wh]: v.level > 1,
9533
9548
  "univer-text-gray-500 dark:!univer-text-gray-400": v.id !== c,
9534
9549
  "univer-text-gray-800 dark:!univer-text-gray-200": v.id === c
9535
9550
  }
@@ -9585,21 +9600,21 @@ function Lh(n, e, t, o) {
9585
9600
  return A.paragraphStyle.headingId;
9586
9601
  }
9587
9602
  }
9588
- const wi = "__title";
9603
+ const Pi = "__title";
9589
9604
  function Qh() {
9590
9605
  var e, t, o;
9591
- const n = ua(Vo);
9606
+ const n = ua(Wo);
9592
9607
  return (o = (t = (e = n == null ? void 0 : n.layout) == null ? void 0 : e.docContainerConfig) == null ? void 0 : t.sideMenu) == null || o ? /* @__PURE__ */ Q(Uh, {}) : null;
9593
9608
  }
9594
9609
  function Uh() {
9595
- var B, x, M, P, F, w, N, ee, $;
9596
- const n = J(T), e = J(L), t = tt(_e(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), [])), o = J(fe), r = (x = (B = t == null ? void 0 : t.getBody()) == null ? void 0 : B.dataStream) != null ? x : "", [s, i] = Ee(0), [a, c] = Ee(void 0), d = (M = t == null ? void 0 : t.getUnitId()) != null ? M : "", l = o.getRenderById(d), A = t == null ? void 0 : t.getTitle(), h = l == null ? void 0 : l.with(wt), u = h == null ? void 0 : h.paragraphBounds, g = (F = (P = l == null ? void 0 : l.mainComponent) == null ? void 0 : P.left) != null ? F : 0, f = (w = l == null ? void 0 : l.engine.height) != null ? w : 0, p = (N = l == null ? void 0 : l.scene.scaleY) != null ? N : 1, m = ($ = (ee = t == null ? void 0 : t.getBody()) == null ? void 0 : ee.paragraphs) != null ? $ : [], I = _e(() => {
9610
+ var B, x, M, w, F, P, N, ee, $;
9611
+ const n = J(T), e = J(L), t = tt(_e(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), [])), o = J(pe), r = (x = (B = t == null ? void 0 : t.getBody()) == null ? void 0 : B.dataStream) != null ? x : "", [s, i] = Ee(0), [a, c] = Ee(void 0), d = (M = t == null ? void 0 : t.getUnitId()) != null ? M : "", l = o.getRenderById(d), A = t == null ? void 0 : t.getTitle(), h = l == null ? void 0 : l.with(Pt), u = h == null ? void 0 : h.paragraphBounds, g = (F = (w = l == null ? void 0 : l.mainComponent) == null ? void 0 : w.left) != null ? F : 0, f = (P = l == null ? void 0 : l.engine.height) != null ? P : 0, p = (N = l == null ? void 0 : l.scene.scaleY) != null ? N : 1, m = ($ = (ee = t == null ? void 0 : t.getBody()) == null ? void 0 : ee.paragraphs) != null ? $ : [], I = _e(() => {
9597
9612
  const U = /* @__PURE__ */ new Map();
9598
9613
  return m.forEach((H) => {
9599
9614
  U.set(H.startIndex, H);
9600
9615
  }), U;
9601
9616
  }, [m]);
9602
- tt(_e(() => l != null && l.engine.onTransformChange$ ? Mt(l == null ? void 0 : l.engine.onTransformChange$).pipe(bn(33)) : Yl(null), [l == null ? void 0 : l.engine.onTransformChange$]));
9617
+ tt(_e(() => l != null && l.engine.onTransformChange$ ? _t(l == null ? void 0 : l.engine.onTransformChange$).pipe(bn(33)) : Yl(null), [l == null ? void 0 : l.engine.onTransformChange$]));
9603
9618
  const S = g < 180 ? "float" : "side-bar", v = m == null ? void 0 : m.filter(
9604
9619
  (U) => {
9605
9620
  var H;
@@ -9621,7 +9636,7 @@ function Uh() {
9621
9636
  ne && c(ne);
9622
9637
  }), E = v != null && v.find((U) => U.isTitle) ? v : [
9623
9638
  ...A ? [{
9624
- id: wi,
9639
+ id: Pi,
9625
9640
  text: A,
9626
9641
  level: 1,
9627
9642
  isTitle: !0
@@ -9639,7 +9654,7 @@ function Uh() {
9639
9654
  const U = l == null ? void 0 : l.scene.getViewport(je.VIEW_MAIN);
9640
9655
  if (!U)
9641
9656
  return;
9642
- const H = Mt(U.onScrollAfter$).pipe(bn(33)).subscribe(R);
9657
+ const H = _t(U.onScrollAfter$).pipe(bn(33)).subscribe(R);
9643
9658
  return () => {
9644
9659
  H.unsubscribe();
9645
9660
  };
@@ -9648,7 +9663,7 @@ function Uh() {
9648
9663
  const H = l == null ? void 0 : l.scene.getViewport(je.VIEW_MAIN);
9649
9664
  if (!H)
9650
9665
  return;
9651
- if (U.id === wi) {
9666
+ if (U.id === Pi) {
9652
9667
  H.scrollToViewportPos({ viewportScrollY: 0 });
9653
9668
  return;
9654
9669
  }
@@ -9661,12 +9676,12 @@ function Uh() {
9661
9676
  const ne = u == null ? void 0 : u.get(k.startIndex);
9662
9677
  ne && (H.scrollToViewportPos({ viewportScrollY: ne.rect.top }), c(U.id));
9663
9678
  });
9664
- return !t || Rt(d) || !(E != null && E.length) ? null : /* @__PURE__ */ Q(
9679
+ return !t || bt(d) || !(E != null && E.length) ? null : /* @__PURE__ */ Q(
9665
9680
  "div",
9666
9681
  {
9667
9682
  className: "univer-absolute univer-bottom-0 univer-left-0 univer-top-0 univer-z-[100] univer-w-[0px]",
9668
9683
  children: /* @__PURE__ */ Q(
9669
- wh,
9684
+ Ph,
9670
9685
  {
9671
9686
  menus: E,
9672
9687
  open: b,
@@ -9682,7 +9697,7 @@ function Uh() {
9682
9697
  }
9683
9698
  );
9684
9699
  }
9685
- const rt = {
9700
+ const st = {
9686
9701
  id: "doc-paragraph-setting.command",
9687
9702
  type: D.COMMAND,
9688
9703
  handler: async (n, e) => {
@@ -9747,7 +9762,7 @@ const rt = {
9747
9762
  const i = n[0];
9748
9763
  return i ? String((c = (a = i.paragraphStyle) == null ? void 0 : a.horizontalAlign) != null ? c : e) : e;
9749
9764
  });
9750
- return [o, (i) => (r(i), t.executeCommand(rt.id, {
9765
+ return [o, (i) => (r(i), t.executeCommand(st.id, {
9751
9766
  paragraph: { horizontalAlign: Number(i) }
9752
9767
  }))];
9753
9768
  }, Vh = (n) => {
@@ -9756,7 +9771,7 @@ const rt = {
9756
9771
  const s = n[0];
9757
9772
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentStart, 0) : 0;
9758
9773
  });
9759
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9774
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9760
9775
  paragraph: { indentStart: { v: s } }
9761
9776
  }))];
9762
9777
  }, Wh = (n) => {
@@ -9765,7 +9780,7 @@ const rt = {
9765
9780
  const s = n[0];
9766
9781
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentEnd, 0) : 0;
9767
9782
  });
9768
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9783
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9769
9784
  paragraph: { indentEnd: { v: s } }
9770
9785
  }))];
9771
9786
  }, jh = (n) => {
@@ -9774,7 +9789,7 @@ const rt = {
9774
9789
  const s = n[0];
9775
9790
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentFirstLine, 0) : 0;
9776
9791
  });
9777
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9792
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9778
9793
  paragraph: { indentFirstLine: { v: s } }
9779
9794
  }))];
9780
9795
  }, zh = (n) => {
@@ -9783,7 +9798,7 @@ const rt = {
9783
9798
  const s = n[0];
9784
9799
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.hanging, 0) : 0;
9785
9800
  });
9786
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9801
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9787
9802
  paragraph: { hanging: { v: s } }
9788
9803
  }))];
9789
9804
  }, Gh = (n) => {
@@ -9792,7 +9807,7 @@ const rt = {
9792
9807
  const s = n[0];
9793
9808
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.spaceAbove, 0) : 0;
9794
9809
  });
9795
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9810
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9796
9811
  paragraph: { spaceAbove: { v: s } }
9797
9812
  }))];
9798
9813
  }, Yh = (n) => {
@@ -9801,11 +9816,11 @@ const rt = {
9801
9816
  const s = n[0];
9802
9817
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.spaceBelow, 0) : 0;
9803
9818
  });
9804
- return [t, (s) => (o(s), e.executeCommand(rt.id, {
9819
+ return [t, (s) => (o(s), e.executeCommand(st.id, {
9805
9820
  paragraph: { spaceBelow: { v: s } }
9806
9821
  }))];
9807
9822
  }, Kh = (n) => {
9808
- const e = J(T), t = J(fe), o = J(L), r = _e(() => {
9823
+ const e = J(T), t = J(pe), o = J(L), r = _e(() => {
9809
9824
  var g;
9810
9825
  const u = o.getCurrentUnitForType(_.UNIVER_DOC);
9811
9826
  if (u)
@@ -9833,13 +9848,13 @@ const rt = {
9833
9848
  };
9834
9849
  return Ce(() => {
9835
9850
  const u = s.pipe(
9836
- dr((g) => !!Object.keys(g).length),
9851
+ Ar((g) => !!Object.keys(g).length),
9837
9852
  ql(16),
9838
- dr((g) => !!g.length),
9853
+ Ar((g) => !!g.length),
9839
9854
  Xl((g) => g.reduce((f, p) => (Object.keys(p).forEach((m) => {
9840
9855
  f[m] = p[m];
9841
9856
  }), f), {}))
9842
- ).subscribe((g) => e.executeCommand(rt.id, {
9857
+ ).subscribe((g) => e.executeCommand(st.id, {
9843
9858
  paragraph: { ...g }
9844
9859
  }));
9845
9860
  return () => u.unsubscribe();
@@ -9847,10 +9862,10 @@ const rt = {
9847
9862
  lineSpacing: [i, A],
9848
9863
  spacingRule: [d, h]
9849
9864
  };
9850
- }, Bt = (n) => {
9865
+ }, Mt = (n) => {
9851
9866
  const { value: e, onChange: t, className: o = "", min: r = 0, max: s = 100, step: i = 1 } = n, a = ke(null);
9852
9867
  return /* @__PURE__ */ Q(
9853
- it,
9868
+ at,
9854
9869
  {
9855
9870
  step: i,
9856
9871
  ref: a,
@@ -9901,28 +9916,28 @@ function qh() {
9901
9916
  n.t("doc.paragraphSetting.left"),
9902
9917
  "(px)"
9903
9918
  ] }),
9904
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: s, onChange: (E) => i(E != null ? E : 0) })
9919
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: s, onChange: (E) => i(E != null ? E : 0) })
9905
9920
  ] }),
9906
9921
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9907
9922
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9908
9923
  n.t("doc.paragraphSetting.right"),
9909
9924
  "(px)"
9910
9925
  ] }),
9911
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: a, onChange: (E) => c(E != null ? E : 0) })
9926
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: a, onChange: (E) => c(E != null ? E : 0) })
9912
9927
  ] }),
9913
9928
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9914
9929
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9915
9930
  n.t("doc.paragraphSetting.firstLine"),
9916
9931
  "(px)"
9917
9932
  ] }),
9918
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: d, onChange: (E) => l(E != null ? E : 0) })
9933
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: d, onChange: (E) => l(E != null ? E : 0) })
9919
9934
  ] }),
9920
9935
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9921
9936
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9922
9937
  n.t("doc.paragraphSetting.hanging"),
9923
9938
  "(px)"
9924
9939
  ] }),
9925
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: A, onChange: (E) => h(E != null ? E : 0) })
9940
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: A, onChange: (E) => h(E != null ? E : 0) })
9926
9941
  ] })
9927
9942
  ] }),
9928
9943
  /* @__PURE__ */ Q("div", { className: "univer-t-4 univer-text-sm univer-font-medium", children: n.t("doc.paragraphSetting.spacing") }),
@@ -9932,14 +9947,14 @@ function qh() {
9932
9947
  n.t("doc.paragraphSetting.before"),
9933
9948
  "(px)"
9934
9949
  ] }),
9935
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: u, onChange: (E) => g(E != null ? E : 0) })
9950
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: u, onChange: (E) => g(E != null ? E : 0) })
9936
9951
  ] }),
9937
9952
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9938
9953
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9939
9954
  n.t("doc.paragraphSetting.after"),
9940
9955
  "(px)"
9941
9956
  ] }),
9942
- /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: f, onChange: (E) => p(E != null ? E : 0) })
9957
+ /* @__PURE__ */ Q(Mt, { className: "univer-mt-4", value: f, onChange: (E) => p(E != null ? E : 0) })
9943
9958
  ] }),
9944
9959
  /* @__PURE__ */ re("div", { className: "item-center univer-flex univer-justify-between", children: [
9945
9960
  /* @__PURE__ */ Q("div", { className: "univer-mt-3 univer-text-xs", children: n.t("doc.paragraphSetting.lineSpace") }),
@@ -9960,7 +9975,7 @@ function qh() {
9960
9975
  }
9961
9976
  ),
9962
9977
  /* @__PURE__ */ Q(
9963
- Bt,
9978
+ Mt,
9964
9979
  {
9965
9980
  ...R,
9966
9981
  value: m,
@@ -9983,7 +9998,7 @@ function Zh() {
9983
9998
  const d = c.params.ranges;
9984
9999
  Xh(d, i.current) || r(ge(4)), i.current = d;
9985
10000
  }
9986
- X.id === c.id && c.params.trigger !== rt.id && s();
10001
+ X.id === c.id && c.params.trigger !== st.id && s();
9987
10002
  });
9988
10003
  return () => a.dispose();
9989
10004
  }, [s]), Ce(() => {
@@ -9994,7 +10009,7 @@ var Jh = Object.getOwnPropertyDescriptor, $h = (n, e, t, o) => {
9994
10009
  for (var r = o > 1 ? void 0 : o ? Jh(e, t) : e, s = n.length - 1, i; s >= 0; s--)
9995
10010
  (i = n[s]) && (r = i(r) || r);
9996
10011
  return r;
9997
- }, or = (n, e) => (t, o) => e(t, o, n);
10012
+ }, rr = (n, e) => (t, o) => e(t, o, n);
9998
10013
  const Ni = "doc_ui_paragraph-setting-panel";
9999
10014
  let nn = class extends me {
10000
10015
  constructor(e, t, o) {
@@ -10021,17 +10036,17 @@ let nn = class extends me {
10021
10036
  }
10022
10037
  };
10023
10038
  nn = $h([
10024
- or(0, T),
10025
- or(1, j(sn)),
10026
- or(2, j(la))
10039
+ rr(0, T),
10040
+ rr(1, j(sn)),
10041
+ rr(2, j(la))
10027
10042
  ], nn);
10028
- const Ps = {
10043
+ const ws = {
10029
10044
  id: "sidebar.operation.doc-paragraph-setting-panel",
10030
10045
  type: D.OPERATION,
10031
10046
  handler: (n) => (n.get(nn).openPanel(), !0)
10032
- }, ws = (n) => {
10047
+ }, Ps = (n) => {
10033
10048
  const e = n.get(Y);
10034
- return new pe((t) => {
10049
+ return new fe((t) => {
10035
10050
  const o = e.textSelection$.subscribe(() => {
10036
10051
  e.getDocRanges().some((i) => i.collapsed === !1 || i.rangeType === He.RECT) ? t.next(!1) : t.next(!0);
10037
10052
  });
@@ -10065,7 +10080,7 @@ function Li(n, e, t) {
10065
10080
  }
10066
10081
  const At = (n) => {
10067
10082
  const e = n.get(Y), t = n.get(L);
10068
- return new pe((o) => {
10083
+ return new fe((o) => {
10069
10084
  const r = e.textSelection$.subscribe(() => {
10070
10085
  Li(o, e, t);
10071
10086
  });
@@ -10077,10 +10092,10 @@ const At = (n) => {
10077
10092
  type: Z.BUTTON,
10078
10093
  icon: "CopyDoubleIcon",
10079
10094
  title: "rightClick.copy",
10080
- disabled$: ws(n),
10095
+ disabled$: Ps(n),
10081
10096
  hidden$: se(n, _.UNIVER_DOC)
10082
10097
  }), ng = (n) => ({
10083
- id: Ps.id,
10098
+ id: ws.id,
10084
10099
  type: Z.BUTTON,
10085
10100
  icon: "MenuIcon",
10086
10101
  title: "doc.menu.paragraphSetting",
@@ -10090,7 +10105,7 @@ const At = (n) => {
10090
10105
  type: Z.BUTTON,
10091
10106
  icon: "CopyDoubleIcon",
10092
10107
  title: "rightClick.cut",
10093
- disabled$: ws(n),
10108
+ disabled$: Ps(n),
10094
10109
  hidden$: se(n, _.UNIVER_DOC)
10095
10110
  }), rg = (n) => ({
10096
10111
  id: as.id,
@@ -10099,11 +10114,11 @@ const At = (n) => {
10099
10114
  title: "rightClick.paste",
10100
10115
  hidden$: se(n, _.UNIVER_DOC)
10101
10116
  }), sg = (n) => ({
10102
- id: Do.id,
10117
+ id: wo.id,
10103
10118
  type: Z.BUTTON,
10104
10119
  icon: "PasteSpecialDoubleIcon",
10105
10120
  title: "rightClick.delete",
10106
- disabled$: ws(n),
10121
+ disabled$: Ps(n),
10107
10122
  hidden$: se(n, _.UNIVER_DOC)
10108
10123
  }), Cc = "doc.menu.table-insert";
10109
10124
  function ig(n) {
@@ -10213,7 +10228,7 @@ const fg = {
10213
10228
  order: 3,
10214
10229
  menuItemFactory: hu
10215
10230
  },
10216
- [bt.id]: {
10231
+ [yt.id]: {
10217
10232
  order: 4,
10218
10233
  menuItemFactory: gu
10219
10234
  },
@@ -10225,7 +10240,7 @@ const fg = {
10225
10240
  order: 5.5,
10226
10241
  menuItemFactory: Eu
10227
10242
  },
10228
- [ct.id]: {
10243
+ [lt.id]: {
10229
10244
  order: 6,
10230
10245
  menuItemFactory: mu
10231
10246
  },
@@ -10237,7 +10252,7 @@ const fg = {
10237
10252
  order: 8,
10238
10253
  menuItemFactory: Iu
10239
10254
  },
10240
- [Pt.id]: {
10255
+ [It.id]: {
10241
10256
  order: 9,
10242
10257
  menuItemFactory: _u,
10243
10258
  [Fn.id]: {
@@ -10247,23 +10262,23 @@ const fg = {
10247
10262
  }
10248
10263
  },
10249
10264
  [Ks.LAYOUT]: {
10250
- [Qo.id]: {
10265
+ [Uo.id]: {
10251
10266
  order: 2,
10252
10267
  menuItemFactory: bu
10253
10268
  },
10254
- [Uo.id]: {
10269
+ [Fo.id]: {
10255
10270
  order: 3,
10256
10271
  menuItemFactory: yu
10257
10272
  },
10258
- [Fo.id]: {
10273
+ [Ho.id]: {
10259
10274
  order: 4,
10260
10275
  menuItemFactory: xu
10261
10276
  },
10262
- [Ho.id]: {
10277
+ [ko.id]: {
10263
10278
  order: 5,
10264
10279
  menuItemFactory: Ou
10265
10280
  },
10266
- [wo.id]: {
10281
+ [No.id]: {
10267
10282
  order: 6,
10268
10283
  menuItemFactory: Tu
10269
10284
  },
@@ -10283,7 +10298,7 @@ const fg = {
10283
10298
  order: 10,
10284
10299
  menuItemFactory: Su
10285
10300
  },
10286
- [ko.id]: {
10301
+ [Vo.id]: {
10287
10302
  order: 11,
10288
10303
  menuItemFactory: Bu
10289
10304
  },
@@ -10316,13 +10331,13 @@ const fg = {
10316
10331
  order: 2,
10317
10332
  menuItemFactory: rg
10318
10333
  },
10319
- [Do.id]: {
10334
+ [wo.id]: {
10320
10335
  order: 3,
10321
10336
  menuItemFactory: sg
10322
10337
  }
10323
10338
  },
10324
10339
  [cn.LAYOUT]: {
10325
- [Ps.id]: {
10340
+ [ws.id]: {
10326
10341
  order: 0,
10327
10342
  menuItemFactory: ng
10328
10343
  },
@@ -10368,7 +10383,7 @@ const fg = {
10368
10383
  [cn.QUICK]: {
10369
10384
  [hs.id]: {
10370
10385
  order: 0,
10371
- menuItemFactory: wu
10386
+ menuItemFactory: Pu
10372
10387
  },
10373
10388
  [gs.id]: {
10374
10389
  order: 1,
@@ -10445,7 +10460,7 @@ var pg = Object.getOwnPropertyDescriptor, mg = (n, e, t, o) => {
10445
10460
  for (var r = o > 1 ? void 0 : o ? pg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10446
10461
  (i = n[s]) && (r = i(r) || r);
10447
10462
  return r;
10448
- }, st = (n, e) => (t, o) => e(t, o, n);
10463
+ }, it = (n, e) => (t, o) => e(t, o, n);
10449
10464
  let uo = class extends me {
10450
10465
  constructor(n, e, t, o, r, s, i, a, c) {
10451
10466
  super(), this._injector = n, this._componentManager = e, this._commandService = t, this._layoutService = o, this._menuManagerService = r, this._uiPartsService = s, this._univerInstanceService = i, this._shortcutService = a, this._configService = c, this._init();
@@ -10458,7 +10473,7 @@ let uo = class extends me {
10458
10473
  ["doc.paragraph.menu", lh],
10459
10474
  ["CutIcon", Za],
10460
10475
  ["DeleteIcon", Ja],
10461
- [Rr, iu],
10476
+ [br, iu],
10462
10477
  ["DocumentSettingIcon", $a]
10463
10478
  ].forEach(([n, e]) => {
10464
10479
  this.disposeWithMe(
@@ -10504,29 +10519,29 @@ let uo = class extends me {
10504
10519
  _initFocusHandler() {
10505
10520
  this.disposeWithMe(
10506
10521
  this._layoutService.registerFocusHandler(_.UNIVER_DOC, (n) => {
10507
- this._injector.get(fe).getRenderById(n).with(Re).focus();
10522
+ this._injector.get(pe).getRenderById(n).with(Re).focus();
10508
10523
  })
10509
10524
  );
10510
10525
  }
10511
10526
  };
10512
10527
  uo = mg([
10513
- st(0, j(Pn)),
10514
- st(1, j(sn)),
10515
- st(2, T),
10516
- st(3, Oo),
10517
- st(4, Aa),
10518
- st(5, kl),
10519
- st(6, L),
10520
- st(7, To),
10521
- st(8, Wr)
10528
+ it(0, j(wn)),
10529
+ it(1, j(sn)),
10530
+ it(2, T),
10531
+ it(3, To),
10532
+ it(4, Aa),
10533
+ it(5, kl),
10534
+ it(6, L),
10535
+ it(7, Bo),
10536
+ it(8, Wr)
10522
10537
  ], uo);
10523
10538
  var Eg = Object.getOwnPropertyDescriptor, Ig = (n, e, t, o) => {
10524
10539
  for (var r = o > 1 ? void 0 : o ? Eg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10525
10540
  (i = n[s]) && (r = i(r) || r);
10526
10541
  return r;
10527
- }, rr = (n, e) => (t, o) => e(t, o, n);
10542
+ }, sr = (n, e) => (t, o) => e(t, o, n);
10528
10543
  const Qi = 1.5;
10529
- let ho = class extends Ct {
10544
+ let ho = class extends Rt {
10530
10545
  constructor(n, e, t, o) {
10531
10546
  super(), this._context = n, this._textSelectionManagerService = e, this._editorService = t, this._docSkeletonManagerService = o, this._init();
10532
10547
  }
@@ -10550,7 +10565,7 @@ let ho = class extends Ct {
10550
10565
  const { unitId: e, scene: t, mainComponent: o } = this._context, r = this._docSkeletonManagerService.getSkeleton();
10551
10566
  if (o == null || r == null)
10552
10567
  return;
10553
- const s = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new It(s, r), { contentBoxPointGroup: d } = c.getRangePointData(n, n), { left: l, top: A, height: h } = $n(d), u = l + i, g = A + a, f = t.getViewport(je.VIEW_MAIN), p = this._editorService.getEditor(e);
10568
+ const s = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new St(s, r), { contentBoxPointGroup: d } = c.getRangePointData(n, n), { left: l, top: A, height: h } = $n(d), u = l + i, g = A + a, f = t.getViewport(je.VIEW_MAIN), p = this._editorService.getEditor(e);
10554
10569
  if (f == null)
10555
10570
  return;
10556
10571
  const {
@@ -10575,16 +10590,16 @@ let ho = class extends Ct {
10575
10590
  }
10576
10591
  };
10577
10592
  ho = Ig([
10578
- rr(1, j(Y)),
10579
- rr(2, Ye),
10580
- rr(3, j(de))
10593
+ sr(1, j(Y)),
10594
+ sr(2, Ye),
10595
+ sr(3, j(de))
10581
10596
  ], ho);
10582
10597
  var Sg = Object.getOwnPropertyDescriptor, vg = (n, e, t, o) => {
10583
10598
  for (var r = o > 1 ? void 0 : o ? Sg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10584
10599
  (i = n[s]) && (r = i(r) || r);
10585
10600
  return r;
10586
10601
  }, zt = (n, e) => (t, o) => e(t, o, n);
10587
- let br = class extends Ct {
10602
+ let yr = class extends Rt {
10588
10603
  constructor(n, e, t, o, r, s, i) {
10589
10604
  super(), this._context = n, this._commandService = e, this._docSelectionRenderService = t, this._docSkeletonManagerService = o, this._editorService = r, this._renderManagerService = s, this._univerInstanceService = i, this._addNewRender(), this._initRenderRefresh(), this._initCommandListener();
10590
10605
  }
@@ -10620,8 +10635,8 @@ let br = class extends Ct {
10620
10635
  d *= a.deltaY > 0 ? -1 : 1, n.scaleX < 1 && (d /= 2), n.scaleX + d > 4 ? n.scale(4, 4) : n.scaleX + d < 0.1 ? n.scale(0.1, 0.1) : a.preventDefault();
10621
10636
  } else
10622
10637
  t.onMouseWheel(a, s);
10623
- }), new lr(t), n.addLayer(
10624
- new Gs(n, [], zo),
10638
+ }), new dr(t), n.addLayer(
10639
+ new Gs(n, [], Go),
10625
10640
  new Gs(n, [], cd)
10626
10641
  ), this._addComponent();
10627
10642
  const o = () => n.render();
@@ -10636,7 +10651,7 @@ let br = class extends Ct {
10636
10651
  }, i = new gl(et.MAIN, void 0, s);
10637
10652
  i.zIndex = $s;
10638
10653
  const a = new fl(et.BACKGROUND, void 0, s);
10639
- a.zIndex = $s, this._context.mainComponent = i, t.set(et.MAIN, i), t.set(et.BACKGROUND, a), n.addObjects([i], zo), n.addObjects([a], ad), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(zo);
10654
+ a.zIndex = $s, this._context.mainComponent = i, t.set(et.MAIN, i), t.set(et.BACKGROUND, a), n.addObjects([i], Go), n.addObjects([a], ad), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(Go);
10640
10655
  }
10641
10656
  _initRenderRefresh() {
10642
10657
  this._docSkeletonManagerService.currentSkeletonBefore$.pipe(pt(this.dispose$)).subscribe((n) => {
@@ -10675,7 +10690,7 @@ let br = class extends Ct {
10675
10690
  for (let g = 0, f = a.length; g < f; g++) {
10676
10691
  const p = a[g];
10677
10692
  let { pageWidth: m, pageHeight: I } = p;
10678
- if (A === we.MODERN) {
10693
+ if (A === Pe.MODERN) {
10679
10694
  const S = Cg(p);
10680
10695
  m = S.pageWidth, I = S.pageHeight;
10681
10696
  }
@@ -10686,14 +10701,14 @@ let br = class extends Ct {
10686
10701
  (!this._editorService.isEditor(o) || h != null && h.params.scrollBar) && t.resize(c, d);
10687
10702
  }
10688
10703
  };
10689
- br = vg([
10704
+ yr = vg([
10690
10705
  zt(1, T),
10691
10706
  zt(2, j(Re)),
10692
10707
  zt(3, j(de)),
10693
10708
  zt(4, Ye),
10694
- zt(5, fe),
10709
+ zt(5, pe),
10695
10710
  zt(6, L)
10696
- ], br);
10711
+ ], yr);
10697
10712
  function Cg(n) {
10698
10713
  let { pageWidth: e, pageHeight: t } = n;
10699
10714
  const { marginLeft: o, marginRight: r, marginTop: s, marginBottom: i, skeDrawings: a, skeTables: c } = n;
@@ -10708,8 +10723,8 @@ var Rg = Object.getOwnPropertyDescriptor, bg = (n, e, t, o) => {
10708
10723
  for (var r = o > 1 ? void 0 : o ? Rg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10709
10724
  (i = n[s]) && (r = i(r) || r);
10710
10725
  return r;
10711
- }, sr = (n, e) => (t, o) => e(t, o, n);
10712
- let yr = class {
10726
+ }, ir = (n, e) => (t, o) => e(t, o, n);
10727
+ let xr = class {
10713
10728
  constructor(n, e, t) {
10714
10729
  O(this, "_docContainer");
10715
10730
  // 获取SheetContainer组件
@@ -10732,7 +10747,7 @@ let yr = class {
10732
10747
  getUIConfig() {
10733
10748
  return {
10734
10749
  injector: this._injector,
10735
- config: this._configService.getConfig(Vo),
10750
+ config: this._configService.getConfig(Wo),
10736
10751
  changeLocale: this.changeLocale,
10737
10752
  getComponent: this.getComponent
10738
10753
  };
@@ -10748,25 +10763,25 @@ let yr = class {
10748
10763
  return this._docContainer;
10749
10764
  }
10750
10765
  };
10751
- yr = bg([
10752
- sr(0, j(Ke)),
10753
- sr(1, j(Pn)),
10754
- sr(2, Wr)
10755
- ], yr);
10766
+ xr = bg([
10767
+ ir(0, j(Ke)),
10768
+ ir(1, j(wn)),
10769
+ ir(2, Wr)
10770
+ ], xr);
10756
10771
  var yg = Object.getOwnPropertyDescriptor, xg = (n, e, t, o) => {
10757
10772
  for (var r = o > 1 ? void 0 : o ? yg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10758
10773
  (i = n[s]) && (r = i(r) || r);
10759
10774
  return r;
10760
10775
  }, Og = (n, e) => (t, o) => e(t, o, n);
10761
- let go = class extends Ct {
10776
+ let go = class extends Rt {
10762
10777
  constructor(e) {
10763
10778
  super();
10764
10779
  O(this, "_docContainerController");
10765
- this._injector = e, this._docContainerController = this._injector.createInstance(yr);
10780
+ this._injector = e, this._docContainerController = this._injector.createInstance(xr);
10766
10781
  }
10767
10782
  };
10768
10783
  go = xg([
10769
- Og(0, j(Pn))
10784
+ Og(0, j(wn))
10770
10785
  ], go);
10771
10786
  var Tg = Object.getOwnPropertyDescriptor, Bg = (n, e, t, o) => {
10772
10787
  for (var r = o > 1 ? void 0 : o ? Tg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
@@ -10798,7 +10813,7 @@ let fo = class extends me {
10798
10813
  getMutations(n) {
10799
10814
  const e = n.commandParams;
10800
10815
  return [{
10801
- id: gr.id,
10816
+ id: fr.id,
10802
10817
  params: {
10803
10818
  type: e != null && e.shift ? Xn.decrease : Xn.increase
10804
10819
  }
@@ -10829,20 +10844,20 @@ let fo = class extends me {
10829
10844
  _initSpaceAutoFormat() {
10830
10845
  this.disposeWithMe(
10831
10846
  this._docAutoFormatService.registerAutoFormat({
10832
- id: Mo.id,
10847
+ id: _o.id,
10833
10848
  match: (n) => {
10834
10849
  var s;
10835
10850
  const { selection: e, paragraphs: t, unit: o } = n;
10836
10851
  if (!e.collapsed || t.length !== 1 || !e.collapsed)
10837
10852
  return !1;
10838
10853
  const r = (s = o.getBody()) == null ? void 0 : s.dataStream.slice(t[0].paragraphStart, e.startOffset - 1);
10839
- return !!(r && (Object.keys(jo).includes(r) || Object.keys(qo).includes(r)));
10854
+ return !!(r && (Object.keys(zo).includes(r) || Object.keys(Xo).includes(r)));
10840
10855
  },
10841
10856
  getMutations(n) {
10842
10857
  var s;
10843
10858
  const { paragraphs: e, unit: t, selection: o } = n, r = (s = t.getBody()) == null ? void 0 : s.dataStream.slice(e[0].paragraphStart, o.startOffset - 1);
10844
- if (r && Object.keys(jo).includes(r)) {
10845
- const i = jo[r];
10859
+ if (r && Object.keys(zo).includes(r)) {
10860
+ const i = zo[r];
10846
10861
  return [{
10847
10862
  id: La.id,
10848
10863
  params: {
@@ -10851,8 +10866,8 @@ let fo = class extends me {
10851
10866
  }
10852
10867
  }];
10853
10868
  }
10854
- if (r && Object.keys(qo).includes(r)) {
10855
- const i = qo[r];
10869
+ if (r && Object.keys(Xo).includes(r)) {
10870
+ const i = Xo[r];
10856
10871
  return [{
10857
10872
  id: Qa.id,
10858
10873
  params: {
@@ -10876,7 +10891,7 @@ let fo = class extends me {
10876
10891
  getMutations: (n) => {
10877
10892
  const e = n.paragraphs[0].bullet;
10878
10893
  return e ? e.nestingLevel > 0 ? [{
10879
- id: gr.id,
10894
+ id: fr.id,
10880
10895
  params: {
10881
10896
  type: Xn.decrease
10882
10897
  }
@@ -10906,8 +10921,8 @@ let fo = class extends me {
10906
10921
  }
10907
10922
  };
10908
10923
  fo = Bg([
10909
- Ui(0, j(Dt)),
10910
- Ui(1, fe)
10924
+ Ui(0, j(wt)),
10925
+ Ui(1, pe)
10911
10926
  ], fo);
10912
10927
  function Mg(n) {
10913
10928
  return n.rows[0].cells[0].sections[0].columns[0].lines[0];
@@ -10997,7 +11012,7 @@ function xc(n) {
10997
11012
  return bc(a) ? xc(a) : a;
10998
11013
  }
10999
11014
  }
11000
- function Pg(n, e) {
11015
+ function wg(n, e) {
11001
11016
  const { st: t } = n, { skeTables: o } = e;
11002
11017
  let r = null;
11003
11018
  for (const s of o.values())
@@ -11007,7 +11022,7 @@ function Pg(n, e) {
11007
11022
  }
11008
11023
  return r;
11009
11024
  }
11010
- function wg(n) {
11025
+ function Pg(n) {
11011
11026
  return n.sections[0].columns[0].lines[0];
11012
11027
  }
11013
11028
  function Ng(n) {
@@ -11030,16 +11045,16 @@ let po = class extends me {
11030
11045
  super.dispose(), (e = this._onInputSubscription) == null || e.unsubscribe();
11031
11046
  }
11032
11047
  _commandExecutedListener() {
11033
- const e = [St.id, vt.id];
11048
+ const e = [vt.id, Ct.id];
11034
11049
  this.disposeWithMe(
11035
11050
  this._commandService.onCommandExecuted((t) => {
11036
11051
  if (!e.includes(t.id))
11037
11052
  return;
11038
11053
  const o = t.params;
11039
11054
  switch (t.id) {
11040
- case St.id:
11041
- return this._handleMoveCursor(o.direction);
11042
11055
  case vt.id:
11056
+ return this._handleMoveCursor(o.direction);
11057
+ case Ct.id:
11043
11058
  return this._handleShiftMoveSelection(o.direction);
11044
11059
  default:
11045
11060
  throw new Error("Unknown command");
@@ -11107,7 +11122,7 @@ let po = class extends me {
11107
11122
  ], !1);
11108
11123
  return;
11109
11124
  }
11110
- const B = new It(b, s).getRangePointData(
11125
+ const B = new St(b, s).getRangePointData(
11111
11126
  C,
11112
11127
  C
11113
11128
  ).cursorList[0];
@@ -11186,7 +11201,7 @@ let po = class extends me {
11186
11201
  ], !1);
11187
11202
  return;
11188
11203
  }
11189
- const B = new It(y, s).getRangePointData(
11204
+ const B = new St(y, s).getRangePointData(
11190
11205
  C,
11191
11206
  C
11192
11207
  ).cursorList[0];
@@ -11257,7 +11272,7 @@ let po = class extends me {
11257
11272
  }
11258
11273
  } else {
11259
11274
  l = i.lines[d - 1];
11260
- const x = Pg(s, c);
11275
+ const x = wg(s, c);
11261
11276
  if (x) {
11262
11277
  const M = _g(x);
11263
11278
  M && (l = M);
@@ -11282,8 +11297,8 @@ let po = class extends me {
11282
11297
  if (t === !0)
11283
11298
  l = (S = (I = c.sections[h - 1]) == null ? void 0 : I.columns[0]) == null ? void 0 : S.lines[0];
11284
11299
  else {
11285
- const x = (R = (v = c.sections) == null ? void 0 : v[h - 1]) == null ? void 0 : R.columns, M = x == null ? void 0 : x[x.length - 1], P = M == null ? void 0 : M.lines;
11286
- l = P == null ? void 0 : P[P.length - 1];
11300
+ const x = (R = (v = c.sections) == null ? void 0 : v[h - 1]) == null ? void 0 : R.columns, M = x == null ? void 0 : x[x.length - 1], w = M == null ? void 0 : M.lines;
11301
+ l = w == null ? void 0 : w[w.length - 1];
11287
11302
  }
11288
11303
  if (l != null)
11289
11304
  return l;
@@ -11300,7 +11315,7 @@ let po = class extends me {
11300
11315
  const x = (C = u.pages[g - 1]) == null ? void 0 : C.sections;
11301
11316
  if (x == null)
11302
11317
  return;
11303
- const M = (B = x[x.length - 1]) == null ? void 0 : B.columns, P = M[M.length - 1], F = P == null ? void 0 : P.lines;
11318
+ const M = (B = x[x.length - 1]) == null ? void 0 : B.columns, w = M[M.length - 1], F = w == null ? void 0 : w.lines;
11304
11319
  l = F[F.length - 1];
11305
11320
  }
11306
11321
  if (l != null)
@@ -11322,7 +11337,7 @@ let po = class extends me {
11322
11337
  };
11323
11338
  po = Qg([
11324
11339
  zn(0, L),
11325
- zn(1, fe),
11340
+ zn(1, pe),
11326
11341
  zn(2, j(Y)),
11327
11342
  zn(3, T)
11328
11343
  ], po);
@@ -11332,7 +11347,7 @@ function Hi(n, e) {
11332
11347
  if (e === !0) {
11333
11348
  const s = yc(n);
11334
11349
  if (s)
11335
- t = wg(s);
11350
+ t = Pg(s);
11336
11351
  else {
11337
11352
  const i = (o = n.parent) == null ? void 0 : o.parent, { lineAfterTable: a } = Fi(i);
11338
11353
  a && (t = a);
@@ -11362,7 +11377,7 @@ const Ug = ({
11362
11377
  /* @__PURE__ */ re("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
11363
11378
  /* @__PURE__ */ Q("span", { children: t.t("toolbar.table.rowCount") }),
11364
11379
  /* @__PURE__ */ Q(
11365
- it,
11380
+ at,
11366
11381
  {
11367
11382
  className: "univer-w-28",
11368
11383
  min: 1,
@@ -11378,7 +11393,7 @@ const Ug = ({
11378
11393
  /* @__PURE__ */ re("div", { className: "univer-flex univer-items-center univer-gap-2", children: [
11379
11394
  /* @__PURE__ */ Q("span", { children: t.t("toolbar.table.colCount") }),
11380
11395
  /* @__PURE__ */ Q(
11381
- it,
11396
+ at,
11382
11397
  {
11383
11398
  className: "univer-w-28",
11384
11399
  min: 1,
@@ -11426,7 +11441,7 @@ var kg = Object.getOwnPropertyDescriptor, Vg = (n, e, t, o) => {
11426
11441
  (i = n[s]) && (r = i(r) || r);
11427
11442
  return r;
11428
11443
  }, Gn = (n, e) => (t, o) => e(t, o, n);
11429
- let xr = class extends me {
11444
+ let Or = class extends me {
11430
11445
  constructor(n, e, t, o, r) {
11431
11446
  super(), this._context = n, this._docSkeletonManagerService = e, this._commandService = t, this._docEventManagerService = o, this._textSelectionManagerService = r, this._initPointerDownObserver(), this._initHoverCursor();
11432
11447
  }
@@ -11443,7 +11458,7 @@ let xr = class extends me {
11443
11458
  _initHoverCursor() {
11444
11459
  this.disposeWithMe(
11445
11460
  this._docEventManagerService.hoverBullet$.subscribe((n) => {
11446
- n ? this._context.mainComponent.setCursor(_t.POINTER) : this._context.mainComponent.setCursor(_t.TEXT);
11461
+ n ? this._context.mainComponent.setCursor(Dt.POINTER) : this._context.mainComponent.setCursor(Dt.TEXT);
11447
11462
  })
11448
11463
  );
11449
11464
  }
@@ -11453,18 +11468,18 @@ let xr = class extends me {
11453
11468
  return r.clone().invert().applyPoint(s);
11454
11469
  }
11455
11470
  };
11456
- xr = Vg([
11471
+ Or = Vg([
11457
11472
  Gn(1, j(de)),
11458
11473
  Gn(2, T),
11459
- Gn(3, j(wt)),
11474
+ Gn(3, j(Pt)),
11460
11475
  Gn(4, j(Y))
11461
- ], xr);
11476
+ ], Or);
11462
11477
  var Wg = Object.getOwnPropertyDescriptor, jg = (n, e, t, o) => {
11463
11478
  for (var r = o > 1 ? void 0 : o ? Wg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11464
11479
  (i = n[s]) && (r = i(r) || r);
11465
11480
  return r;
11466
11481
  }, un = (n, e) => (t, o) => e(t, o, n);
11467
- let Eo = class extends Ct {
11482
+ let Eo = class extends Rt {
11468
11483
  constructor(n, e, t, o, r, s) {
11469
11484
  super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = r, this._editorService = s, this._init();
11470
11485
  }
@@ -11489,7 +11504,7 @@ Eo = jg([
11489
11504
  un(1, T),
11490
11505
  un(2, Lt),
11491
11506
  un(3, j(Re)),
11492
- un(4, Fr),
11507
+ un(4, Hr),
11493
11508
  un(5, Ye)
11494
11509
  ], Eo);
11495
11510
  var zg = Object.getOwnPropertyDescriptor, Gg = (n, e, t, o) => {
@@ -11503,7 +11518,7 @@ const Yg = [
11503
11518
  yo,
11504
11519
  ot
11505
11520
  ];
11506
- let Or = class extends me {
11521
+ let Tr = class extends me {
11507
11522
  constructor(n, e, t) {
11508
11523
  super(), this._context = n, this._contextMenuService = e, this._commandService = t, Yg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
11509
11524
  }
@@ -11522,10 +11537,10 @@ let Or = class extends me {
11522
11537
  );
11523
11538
  }
11524
11539
  };
11525
- Or = Gg([
11540
+ Tr = Gg([
11526
11541
  Vi(1, Wl),
11527
11542
  Vi(2, T)
11528
- ], Or);
11543
+ ], Tr);
11529
11544
  var Kg = Object.getOwnPropertyDescriptor, qg = (n, e, t, o) => {
11530
11545
  for (var r = o > 1 ? void 0 : o ? Kg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11531
11546
  (i = n[s]) && (r = i(r) || r);
@@ -11629,14 +11644,14 @@ Io = qg([
11629
11644
  Gt(3, T),
11630
11645
  Gt(4, j(Re)),
11631
11646
  Gt(5, j(de)),
11632
- Gt(6, fe)
11647
+ Gt(6, pe)
11633
11648
  ], Io);
11634
11649
  var Xg = Object.getOwnPropertyDescriptor, Zg = (n, e, t, o) => {
11635
11650
  for (var r = o > 1 ? void 0 : o ? Xg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11636
11651
  (i = n[s]) && (r = i(r) || r);
11637
11652
  return r;
11638
11653
  }, Yn = (n, e) => (t, o) => e(t, o, n);
11639
- let Tr = class extends me {
11654
+ let Br = class extends me {
11640
11655
  constructor(e, t, o, r, s) {
11641
11656
  super();
11642
11657
  O(this, "_previousIMEContent", "");
@@ -11691,18 +11706,18 @@ let Tr = class extends me {
11691
11706
  this._previousIMEContent = "", this._isCompositionStart = !0, this._docImeInputManagerService.clearUndoRedoMutationParamsCache(), this._docImeInputManagerService.setActiveRange(null);
11692
11707
  }
11693
11708
  };
11694
- Tr = Zg([
11709
+ Br = Zg([
11695
11710
  Yn(1, j(Re)),
11696
- Yn(2, j(No)),
11711
+ Yn(2, j(Lo)),
11697
11712
  Yn(3, j(de)),
11698
11713
  Yn(4, T)
11699
- ], Tr);
11714
+ ], Br);
11700
11715
  var Jg = Object.getOwnPropertyDescriptor, $g = (n, e, t, o) => {
11701
11716
  for (var r = o > 1 ? void 0 : o ? Jg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11702
11717
  (i = n[s]) && (r = i(r) || r);
11703
11718
  return r;
11704
11719
  }, Kn = (n, e) => (t, o) => e(t, o, n);
11705
- let Br = class extends me {
11720
+ let Mr = class extends me {
11706
11721
  constructor(e, t, o, r, s) {
11707
11722
  super();
11708
11723
  O(this, "_onInputSubscription");
@@ -11723,7 +11738,7 @@ let Br = class extends me {
11723
11738
  const { unitId: t } = this._context, { event: o, content: r = "", activeRange: s } = e, i = o, a = this._docSkeletonManagerService.getSkeleton();
11724
11739
  if (i.data == null || a == null || s == null)
11725
11740
  return;
11726
- const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = zr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, In.includes(t)), g = Bo(l, s.endOffset, A, h, In.includes(t)), f = Gr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
11741
+ const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = zr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, In.includes(t)), g = Mo(l, s.endOffset, A, h, In.includes(t)), f = Gr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
11727
11742
  await this._commandService.executeCommand(Ca.id, {
11728
11743
  unitId: t,
11729
11744
  body: {
@@ -11748,16 +11763,16 @@ let Br = class extends me {
11748
11763
  },
11749
11764
  range: s,
11750
11765
  segmentId: c
11751
- }), r === " " && await this._commandService.executeCommand(Mo.id);
11766
+ }), r === " " && await this._commandService.executeCommand(_o.id);
11752
11767
  });
11753
11768
  }
11754
11769
  };
11755
- Br = $g([
11770
+ Mr = $g([
11756
11771
  Kn(1, j(Re)),
11757
11772
  Kn(2, j(de)),
11758
11773
  Kn(3, T),
11759
- Kn(4, j(at))
11760
- ], Br);
11774
+ Kn(4, j(ct))
11775
+ ], Mr);
11761
11776
  class Ns extends me {
11762
11777
  constructor(e) {
11763
11778
  super(), this._context = e;
@@ -11781,16 +11796,16 @@ var ef = Object.getOwnPropertyDescriptor, tf = (n, e, t, o) => {
11781
11796
  (i = n[s]) && (r = i(r) || r);
11782
11797
  return r;
11783
11798
  }, Wi = (n, e) => (t, o) => e(t, o, n);
11784
- let Mr = class extends me {
11799
+ let _r = class extends me {
11785
11800
  constructor(n, e, t) {
11786
11801
  super(), this._context = n, this._docPageLayoutService = e, this._textSelectionManagerService = t;
11787
11802
  const o = this._context.unitId;
11788
- if (Rt(o) && o !== ot) return this;
11803
+ if (bt(o) && o !== ot) return this;
11789
11804
  this._initResize();
11790
11805
  }
11791
11806
  _initResize() {
11792
11807
  this.disposeWithMe(
11793
- Mt(this._context.engine.onTransformChange$).pipe(
11808
+ _t(this._context.engine.onTransformChange$).pipe(
11794
11809
  ro((n) => n.type === oa.resize),
11795
11810
  bn(0, Kl)
11796
11811
  ).subscribe(() => {
@@ -11799,16 +11814,16 @@ let Mr = class extends me {
11799
11814
  );
11800
11815
  }
11801
11816
  };
11802
- Mr = tf([
11817
+ _r = tf([
11803
11818
  Wi(1, j(Ns)),
11804
11819
  Wi(2, j(Y))
11805
- ], Mr);
11820
+ ], _r);
11806
11821
  var nf = Object.getOwnPropertyDescriptor, of = (n, e, t, o) => {
11807
11822
  for (var r = o > 1 ? void 0 : o ? nf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11808
11823
  (i = n[s]) && (r = i(r) || r);
11809
11824
  return r;
11810
11825
  }, Yt = (n, e) => (t, o) => e(t, o, n);
11811
- let _r = class extends me {
11826
+ let Dr = class extends me {
11812
11827
  constructor(e, t, o, r, s, i, a) {
11813
11828
  super();
11814
11829
  O(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
@@ -11845,9 +11860,9 @@ let _r = class extends me {
11845
11860
  _initialMain(e) {
11846
11861
  const t = mt(this._context), { document: o, scene: r } = t;
11847
11862
  this.disposeWithMe(o.onPointerEnter$.subscribeEvent(() => {
11848
- this._isEditorReadOnly(e) || (o.cursor = _t.TEXT);
11863
+ this._isEditorReadOnly(e) || (o.cursor = Dt.TEXT);
11849
11864
  })), this.disposeWithMe(o.onPointerLeave$.subscribeEvent(() => {
11850
- o.cursor = _t.DEFAULT, r.resetCursor();
11865
+ o.cursor = Dt.DEFAULT, r.resetCursor();
11851
11866
  })), this.disposeWithMe(o.onPointerDown$.subscribeEvent((s, i) => {
11852
11867
  if (this._isEditorReadOnly(e))
11853
11868
  return;
@@ -11913,7 +11928,7 @@ let _r = class extends me {
11913
11928
  this.disposeWithMe(this._docSkeletonManagerService.currentSkeleton$.subscribe((e) => {
11914
11929
  if (!e) return;
11915
11930
  const { unitId: t } = this._context;
11916
- if (!Rt(t)) {
11931
+ if (!bt(t)) {
11917
11932
  this._docSelectionRenderService.focus();
11918
11933
  const s = this._context.unit.getSnapshot(), i = Ac(s);
11919
11934
  this._docSelectionManagerService.replaceDocRanges([
@@ -11929,26 +11944,26 @@ let _r = class extends me {
11929
11944
  }));
11930
11945
  }
11931
11946
  };
11932
- _r = of([
11947
+ Dr = of([
11933
11948
  Yt(1, T),
11934
11949
  Yt(2, Ye),
11935
11950
  Yt(3, L),
11936
11951
  Yt(4, j(Re)),
11937
11952
  Yt(5, j(de)),
11938
11953
  Yt(6, j(Y))
11939
- ], _r);
11954
+ ], Dr);
11940
11955
  var rf = Object.getOwnPropertyDescriptor, sf = (n, e, t, o) => {
11941
11956
  for (var r = o > 1 ? void 0 : o ? rf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11942
11957
  (i = n[s]) && (r = i(r) || r);
11943
11958
  return r;
11944
11959
  }, gt = (n, e) => (t, o) => e(t, o, n);
11945
- let Dr = class extends me {
11960
+ let wr = class extends me {
11946
11961
  constructor(e, t, o, r, s, i, a, c, d) {
11947
11962
  super();
11948
11963
  O(this, "_isSheetEditor", !1);
11949
11964
  this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId === yo;
11950
11965
  const l = this._univerInstanceService.getCurrentUnitOfType(_.UNIVER_SHEET), A = l && this._renderManagerService.getRenderById(l.getUnitId());
11951
- setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), Rt(this._context.unitId) || this._initZoomEventListener();
11966
+ setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), bt(this._context.unitId) || this._initZoomEventListener();
11952
11967
  }
11953
11968
  _initRenderRefresher() {
11954
11969
  this._docSkeletonManagerService.currentSkeleton$.subscribe((e) => {
@@ -11962,7 +11977,7 @@ let Dr = class extends me {
11962
11977
  if (!s)
11963
11978
  return;
11964
11979
  const { documentFlavor: i } = s.getSnapshot().documentStyle;
11965
- if (i === we.MODERN)
11980
+ if (i === Pe.MODERN)
11966
11981
  return;
11967
11982
  const a = Math.abs(r.deltaX);
11968
11983
  let c = a < 40 ? 0.2 : a < 80 ? 0.4 : 0.2;
@@ -11996,7 +12011,7 @@ let Dr = class extends me {
11996
12011
  }
11997
12012
  })), this.disposeWithMe(
11998
12013
  this._commandService.beforeCommandExecuted((t) => {
11999
- t.id === ko.id && this._commandService.executeCommand(Zn.id, {
12014
+ t.id === Vo.id && this._commandService.executeCommand(Zn.id, {
12000
12015
  zoomRatio: 1,
12001
12016
  unitId: this._context.unitId
12002
12017
  });
@@ -12028,16 +12043,16 @@ let Dr = class extends me {
12028
12043
  );
12029
12044
  }
12030
12045
  };
12031
- Dr = sf([
12032
- gt(1, Fr),
12046
+ wr = sf([
12047
+ gt(1, Hr),
12033
12048
  gt(2, j(de)),
12034
12049
  gt(3, L),
12035
12050
  gt(4, T),
12036
12051
  gt(5, j(Y)),
12037
12052
  gt(6, Ye),
12038
12053
  gt(7, j(Ns)),
12039
- gt(8, fe)
12040
- ], Dr);
12054
+ gt(8, pe)
12055
+ ], wr);
12041
12056
  const af = Ji("PRINTING_COMPONENT_COLLECT"), cf = Ji("PRINTING_DOM_COLLECT");
12042
12057
  class lf extends me {
12043
12058
  constructor() {
@@ -12068,7 +12083,7 @@ var df = Object.getOwnPropertyDescriptor, Af = (n, e, t, o) => {
12068
12083
  return r;
12069
12084
  }, hn = (n, e) => (t, o) => e(t, o, n);
12070
12085
  const ji = 300;
12071
- let So = class extends Ct {
12086
+ let So = class extends Rt {
12072
12087
  constructor(e, t, o, r, s) {
12073
12088
  super();
12074
12089
  O(this, "_docStateChange$", new Fe(null));
@@ -12112,7 +12127,7 @@ let So = class extends Ct {
12112
12127
  var a;
12113
12128
  if (e == null)
12114
12129
  return;
12115
- const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(No);
12130
+ const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(Lo);
12116
12131
  if (i != null) {
12117
12132
  if (t) {
12118
12133
  const c = i.fetchComposedUndoRedoMutationParams();
@@ -12192,7 +12207,7 @@ So = Af([
12192
12207
  hn(1, T),
12193
12208
  hn(2, L),
12194
12209
  hn(3, j(tl)),
12195
- hn(4, fe)
12210
+ hn(4, pe)
12196
12211
  ], So);
12197
12212
  var uf = Object.getOwnPropertyDescriptor, hf = (n, e, t, o) => {
12198
12213
  for (var r = o > 1 ? void 0 : o ? uf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
@@ -12200,7 +12215,7 @@ var uf = Object.getOwnPropertyDescriptor, hf = (n, e, t, o) => {
12200
12215
  return r;
12201
12216
  }, zi = (n, e) => (t, o) => e(t, o, n);
12202
12217
  const Gi = "univer-doc-main-canvas";
12203
- let vo = class extends Ct {
12218
+ let vo = class extends Rt {
12204
12219
  constructor(n, e) {
12205
12220
  super(), this._instanceSrv = n, this._renderManagerService = e, this._init();
12206
12221
  }
@@ -12224,14 +12239,14 @@ let vo = class extends Ct {
12224
12239
  };
12225
12240
  vo = hf([
12226
12241
  zi(0, L),
12227
- zi(1, fe)
12242
+ zi(1, pe)
12228
12243
  ], vo);
12229
12244
  const gf = {
12230
12245
  id: yn.id,
12231
12246
  preconditions: dh,
12232
12247
  binding: q.ENTER
12233
12248
  }, ff = {
12234
- id: Do.id,
12249
+ id: wo.id,
12235
12250
  preconditions: Se,
12236
12251
  binding: q.BACKSPACE
12237
12252
  }, pf = {
@@ -12239,56 +12254,56 @@ const gf = {
12239
12254
  preconditions: Se,
12240
12255
  binding: q.DELETE
12241
12256
  }, mf = {
12242
- id: St.id,
12257
+ id: vt.id,
12243
12258
  binding: q.ARROW_UP,
12244
12259
  preconditions: Se,
12245
12260
  staticParameters: {
12246
12261
  direction: le.UP
12247
12262
  }
12248
12263
  }, Ef = {
12249
- id: St.id,
12264
+ id: vt.id,
12250
12265
  binding: q.ARROW_DOWN,
12251
12266
  preconditions: Se,
12252
12267
  staticParameters: {
12253
12268
  direction: le.DOWN
12254
12269
  }
12255
12270
  }, If = {
12256
- id: St.id,
12271
+ id: vt.id,
12257
12272
  binding: q.ARROW_LEFT,
12258
12273
  preconditions: Se,
12259
12274
  staticParameters: {
12260
12275
  direction: le.LEFT
12261
12276
  }
12262
12277
  }, Sf = {
12263
- id: St.id,
12278
+ id: vt.id,
12264
12279
  binding: q.ARROW_RIGHT,
12265
12280
  preconditions: Se,
12266
12281
  staticParameters: {
12267
12282
  direction: le.RIGHT
12268
12283
  }
12269
12284
  }, vf = {
12270
- id: vt.id,
12285
+ id: Ct.id,
12271
12286
  binding: q.ARROW_UP | te.SHIFT,
12272
12287
  preconditions: Se,
12273
12288
  staticParameters: {
12274
12289
  direction: le.UP
12275
12290
  }
12276
12291
  }, Cf = {
12277
- id: vt.id,
12292
+ id: Ct.id,
12278
12293
  binding: q.ARROW_DOWN | te.SHIFT,
12279
12294
  preconditions: Se,
12280
12295
  staticParameters: {
12281
12296
  direction: le.DOWN
12282
12297
  }
12283
12298
  }, Rf = {
12284
- id: vt.id,
12299
+ id: Ct.id,
12285
12300
  binding: q.ARROW_LEFT | te.SHIFT,
12286
12301
  preconditions: Se,
12287
12302
  staticParameters: {
12288
12303
  direction: le.LEFT
12289
12304
  }
12290
12305
  }, bf = {
12291
- id: vt.id,
12306
+ id: Ct.id,
12292
12307
  binding: q.ARROW_RIGHT | te.SHIFT,
12293
12308
  preconditions: Se,
12294
12309
  staticParameters: {
@@ -12306,14 +12321,14 @@ var xf = Object.defineProperty, Of = Object.getOwnPropertyDescriptor, Tf = (n, e
12306
12321
  }, gn = (n, e) => (t, o) => e(t, o, n), Mf = (n, e, t) => Tf(n, e + "", t);
12307
12322
  let Pr = class extends Zc {
12308
12323
  // static override type = UniverInstanceType.UNIVER_DOC;
12309
- constructor(n = Pi, e, t, o, r, s) {
12324
+ constructor(n = wi, e, t, o, r, s) {
12310
12325
  super(), this._config = n, this._injector = e, this._renderManagerSrv = t, this._commandService = o, this._logService = r, this._configService = s;
12311
12326
  const { menu: i, ...a } = Jc(
12312
12327
  {},
12313
- Pi,
12328
+ wi,
12314
12329
  this._config
12315
12330
  );
12316
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Vo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
12331
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Wo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
12317
12332
  }
12318
12333
  onReady() {
12319
12334
  this._initRenderBasics(), this._markDocAsFocused(), Vs(this._injector, [
@@ -12335,20 +12350,20 @@ let Pr = class extends Zc {
12335
12350
  // eslint-disable-next-line max-lines-per-function
12336
12351
  _initCommand() {
12337
12352
  [
12338
- Do,
12353
+ wo,
12339
12354
  ya,
12340
12355
  Qt,
12341
12356
  Ut,
12342
12357
  Ft,
12343
12358
  Ht,
12344
- bt,
12359
+ yt,
12345
12360
  kt,
12346
- ct,
12361
+ lt,
12347
12362
  tn,
12348
12363
  Et,
12349
12364
  Fn,
12350
- Pt,
12351
- yt,
12365
+ It,
12366
+ xt,
12352
12367
  Yr,
12353
12368
  Ca,
12354
12369
  xn,
@@ -12360,12 +12375,12 @@ let Pr = class extends Zc {
12360
12375
  Tn,
12361
12376
  On,
12362
12377
  Hn,
12363
- Qo,
12364
12378
  Uo,
12365
12379
  Fo,
12366
- lt,
12367
12380
  Ho,
12368
- wo,
12381
+ dt,
12382
+ ko,
12383
+ No,
12369
12384
  ja,
12370
12385
  za,
12371
12386
  bs,
@@ -12379,16 +12394,16 @@ let Pr = class extends Zc {
12379
12394
  _s,
12380
12395
  Ga,
12381
12396
  Jt,
12382
- Mo,
12397
+ _o,
12383
12398
  yn,
12384
- gr,
12385
- Lo,
12399
+ fr,
12400
+ Qo,
12386
12401
  io,
12387
12402
  Na,
12388
12403
  La,
12389
12404
  Ba,
12390
- ko,
12391
- rt,
12405
+ Vo,
12406
+ st,
12392
12407
  va,
12393
12408
  $t,
12394
12409
  Xd,
@@ -12396,11 +12411,11 @@ let Pr = class extends Zc {
12396
12411
  Zd,
12397
12412
  Zn,
12398
12413
  Ta,
12399
- Ps,
12400
- St,
12414
+ ws,
12401
12415
  vt,
12416
+ Ct,
12402
12417
  $d,
12403
- wa,
12418
+ Pa,
12404
12419
  eA,
12405
12420
  Ze,
12406
12421
  Qa,
@@ -12441,7 +12456,7 @@ let Pr = class extends Zc {
12441
12456
  gf,
12442
12457
  uh
12443
12458
  ].forEach((n) => {
12444
- this._injector.get(To).registerShortcut(n);
12459
+ this._injector.get(Bo).registerShortcut(n);
12445
12460
  });
12446
12461
  }
12447
12462
  _initDependencies(n) {
@@ -12455,13 +12470,13 @@ let Pr = class extends Zc {
12455
12470
  [po],
12456
12471
  [go],
12457
12472
  [nn],
12458
- [Ye, { useClass: Sr }],
12459
- [Lt, { useClass: ur }],
12473
+ [Ye, { useClass: vr }],
12474
+ [Lt, { useClass: hr }],
12460
12475
  [Mn],
12461
12476
  [vo],
12462
12477
  [So],
12463
- [Dt],
12464
- [at]
12478
+ [wt],
12479
+ [ct]
12465
12480
  ], this._config.override).forEach((t) => n.add(t));
12466
12481
  }
12467
12482
  _markDocAsFocused() {
@@ -12484,27 +12499,27 @@ let Pr = class extends Zc {
12484
12499
  [Re],
12485
12500
  [nl],
12486
12501
  [Ns],
12487
- [No],
12488
- [br],
12489
- [Dr]
12502
+ [Lo],
12503
+ [yr],
12504
+ [wr]
12490
12505
  ].forEach((n) => {
12491
12506
  this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, n);
12492
12507
  });
12493
12508
  }
12494
12509
  _initRenderModules() {
12495
12510
  [
12496
- [wt],
12511
+ [Pt],
12497
12512
  [lo],
12498
12513
  [Ao],
12499
12514
  [ho],
12515
+ [Dr],
12516
+ [Rr],
12500
12517
  [_r],
12501
- [Cr],
12502
- [Mr],
12518
+ [Tr],
12503
12519
  [Or],
12504
- [xr],
12505
12520
  [Eo],
12521
+ [Mr],
12506
12522
  [Br],
12507
- [Tr],
12508
12523
  [Io]
12509
12524
  ].forEach((n) => {
12510
12525
  this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, n);
@@ -12514,14 +12529,14 @@ let Pr = class extends Zc {
12514
12529
  Mf(Pr, "pluginName", id);
12515
12530
  Pr = Bf([
12516
12531
  Xc(Il),
12517
- gn(1, j(Pn)),
12518
- gn(2, fe),
12532
+ gn(1, j(wn)),
12533
+ gn(2, pe),
12519
12534
  gn(3, T),
12520
- gn(4, Qr),
12535
+ gn(4, Ur),
12521
12536
  gn(5, Wr)
12522
12537
  ], Pr);
12523
12538
  function _f(n, e, t) {
12524
- const o = J(T), r = J(To), s = _e(() => ge(4), []);
12539
+ const o = J(T), r = J(Bo), s = _e(() => ge(4), []);
12525
12540
  Ce(() => {
12526
12541
  if (!t || !n || !e)
12527
12542
  return;
@@ -12569,12 +12584,12 @@ const Df = (n, e = !0, t, o) => {
12569
12584
  c.transformByState({
12570
12585
  width: p,
12571
12586
  height: m
12572
- }), d == null || d.resize(p, m), e ? A > u ? (f == null ? l && new lr(l, {
12587
+ }), d == null || d.resize(p, m), e ? A > u ? (f == null ? l && new dr(l, {
12573
12588
  barSize: 8,
12574
12589
  enableVertical: !1,
12575
12590
  enableHorizontal: !0,
12576
12591
  minThumbSizeV: 8
12577
- }) : l == null || l.resetCanvasSizeAndUpdateScroll(), o && (l == null || l.scrollToBarPos({ x: 1 / 0, y: 0 }))) : (f = null, l == null || l.scrollToBarPos({ x: 0, y: 0 }), (S = l == null ? void 0 : l.getScrollBar()) == null || S.dispose()) : h > g ? (f == null ? l && (f = new lr(l, {
12592
+ }) : l == null || l.resetCanvasSizeAndUpdateScroll(), o && (l == null || l.scrollToBarPos({ x: 1 / 0, y: 0 }))) : (f = null, l == null || l.scrollToBarPos({ x: 0, y: 0 }), (S = l == null ? void 0 : l.getScrollBar()) == null || S.dispose()) : h > g ? (f == null ? l && (f = new dr(l, {
12578
12593
  enableHorizontal: !1,
12579
12594
  enableVertical: !0,
12580
12595
  barSize: 8,
@@ -12601,7 +12616,7 @@ const Df = (n, e = !0, t, o) => {
12601
12616
  }
12602
12617
  }, [n, t, s]), { resize: r, checkScrollBar: s };
12603
12618
  };
12604
- function Pf(n) {
12619
+ function wf(n) {
12605
12620
  const { editorId: e, initialValue: t, container: o, autoFocus: r, isSingle: s } = n, i = _e(() => r != null ? r : !1, []), [a, c] = Ee(), d = J(Ye);
12606
12621
  return fa(() => {
12607
12622
  var l, A;
@@ -12647,8 +12662,8 @@ function Pf(n) {
12647
12662
  }
12648
12663
  }, []), a;
12649
12664
  }
12650
- const wf = (n, e, t, o) => {
12651
- const r = J(T), s = J(To), i = ke(e);
12665
+ const Pf = (n, e, t, o) => {
12666
+ const r = J(T), s = J(Bo), i = ke(e);
12652
12667
  i.current = e;
12653
12668
  const a = ke(o);
12654
12669
  a.current = o, Ce(() => {
@@ -12660,9 +12675,9 @@ const wf = (n, e, t, o) => {
12660
12675
  return;
12661
12676
  }
12662
12677
  let f = le.LEFT;
12663
- u === q.ARROW_DOWN ? f = le.DOWN : u === q.ARROW_UP ? f = le.UP : u === q.ARROW_RIGHT && (f = le.RIGHT), g === te.SHIFT ? r.executeCommand(vt.id, {
12678
+ u === q.ARROW_DOWN ? f = le.DOWN : u === q.ARROW_UP ? f = le.UP : u === q.ARROW_RIGHT && (f = le.RIGHT), g === te.SHIFT ? r.executeCommand(Ct.id, {
12664
12679
  direction: f
12665
- }) : r.executeCommand(St.id, {
12680
+ }) : r.executeCommand(vt.id, {
12666
12681
  direction: f
12667
12682
  });
12668
12683
  };
@@ -12743,13 +12758,13 @@ const ep = (n) => {
12743
12758
  icon: f,
12744
12759
  editorRef: p,
12745
12760
  placeholder: m
12746
- } = n, I = J(Ye), S = En(o), v = En(s), [R, E] = Ee(u), b = ke(null), y = _e(() => l != null ? l : el(`RICH_TEXT_EDITOR-${ge(4)}`), [l]), C = Pf({
12761
+ } = n, I = J(Ye), S = En(o), v = En(s), [R, E] = Ee(u), b = ke(null), y = _e(() => l != null ? l : el(`RICH_TEXT_EDITOR-${ge(4)}`), [l]), C = wf({
12747
12762
  editorId: y,
12748
12763
  initialValue: r,
12749
12764
  container: b,
12750
12765
  autoFocus: t,
12751
12766
  isSingle: d
12752
- }), x = J(fe).getRenderById(y), M = x == null ? void 0 : x.with(Re), P = tt(M == null ? void 0 : M.textSelectionInner$), F = !!((H = M == null ? void 0 : M.isFocusing) != null && H && (P != null && P.textRanges.some((k) => k.collapsed))), w = ke(null), [N, ee] = Ee(() => {
12767
+ }), x = J(pe).getRenderById(y), M = x == null ? void 0 : x.with(Re), w = tt(M == null ? void 0 : M.textSelectionInner$), F = !!((H = M == null ? void 0 : M.isFocusing) != null && H && (w != null && w.textRanges.some((k) => k.collapsed))), P = ke(null), [N, ee] = Ee(() => {
12753
12768
  var k, ne;
12754
12769
  return !ce.transform.getPlainText((ne = (k = C == null ? void 0 : C.getDocumentData().body) == null ? void 0 : k.dataStream) != null ? ne : "");
12755
12770
  }), { checkScrollBar: $ } = Df(C, d, !0, !0);
@@ -12782,21 +12797,21 @@ const ep = (n) => {
12782
12797
  }, [F, S]), Ce(() => {
12783
12798
  const k = (ie) => {
12784
12799
  var oe, he;
12785
- I.getFocusId() !== y || ((he = (oe = ie.target) == null ? void 0 : oe.dataset) == null ? void 0 : he.editorid) === y || w.current && !w.current.contains(ie.target) && (v == null || v());
12800
+ I.getFocusId() !== y || ((he = (oe = ie.target) == null ? void 0 : oe.dataset) == null ? void 0 : he.editorid) === y || P.current && !P.current.contains(ie.target) && (v == null || v());
12786
12801
  }, ne = setTimeout(() => {
12787
12802
  document.addEventListener("click", k);
12788
12803
  }, 100);
12789
12804
  return () => {
12790
12805
  document.removeEventListener("click", k), clearTimeout(ne);
12791
12806
  };
12792
- }, [C, y, I, v]), wf(F && a, !1, C), _f(F, i, C), Nf(C, U), /* @__PURE__ */ Q("div", { className: e, style: c, children: /* @__PURE__ */ re(
12807
+ }, [C, y, I, v]), Pf(F && a, !1, C), _f(F, i, C), Nf(C, U), /* @__PURE__ */ Q("div", { className: e, style: c, children: /* @__PURE__ */ re(
12793
12808
  "div",
12794
12809
  {
12795
12810
  className: Ge("univer-relative univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-md univer-pb-0.5 univer-pl-1.5 univer-pr-2 univer-pt-1.5", Ln, {
12796
12811
  "univer-border-primary-500": F
12797
12812
  }),
12798
12813
  style: { height: R },
12799
- ref: w,
12814
+ ref: P,
12800
12815
  children: [
12801
12816
  /* @__PURE__ */ Q(
12802
12817
  "div",
@@ -12819,17 +12834,17 @@ const ep = (n) => {
12819
12834
  ) });
12820
12835
  };
12821
12836
  export {
12822
- Mo as AfterSpaceCommand,
12823
- Uo as AlignCenterCommand,
12824
- Ho as AlignJustifyCommand,
12825
- Qo as AlignLeftCommand,
12826
- lt as AlignOperationCommand,
12827
- Fo as AlignRightCommand,
12837
+ _o as AfterSpaceCommand,
12838
+ Fo as AlignCenterCommand,
12839
+ ko as AlignJustifyCommand,
12840
+ Uo as AlignLeftCommand,
12841
+ dt as AlignOperationCommand,
12842
+ Ho as AlignRightCommand,
12828
12843
  Yr as BreakLineCommand,
12829
12844
  On as BulletListCommand,
12830
- gr as ChangeListNestingLevelCommand,
12845
+ fr as ChangeListNestingLevelCommand,
12831
12846
  Xn as ChangeListNestingLevelType,
12832
- Lo as ChangeListTypeCommand,
12847
+ Qo as ChangeListTypeCommand,
12833
12848
  io as CheckListCommand,
12834
12849
  Zd as CoverContentCommand,
12835
12850
  ja as CreateDocTableCommand,
@@ -12837,7 +12852,7 @@ export {
12837
12852
  ad as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
12838
12853
  $s as DOCS_COMPONENT_DEFAULT_Z_INDEX,
12839
12854
  cd as DOCS_COMPONENT_HEADER_LAYER_INDEX,
12840
- zo as DOCS_COMPONENT_MAIN_LAYER_INDEX,
12855
+ Go as DOCS_COMPONENT_MAIN_LAYER_INDEX,
12841
12856
  et as DOCS_VIEW_KEY,
12842
12857
  id as DOC_UI_PLUGIN_NAME,
12843
12858
  Ti as DOC_VERTICAL_PADDING,
@@ -12845,19 +12860,19 @@ export {
12845
12860
  rd as DefaultToolbarConfig,
12846
12861
  xn as DeleteCommand,
12847
12862
  Jr as DeleteCustomBlockCommand,
12848
- Do as DeleteLeftCommand,
12863
+ wo as DeleteLeftCommand,
12849
12864
  ya as DeleteRightCommand,
12850
- Dt as DocAutoFormatService,
12865
+ wt as DocAutoFormatService,
12851
12866
  ho as DocBackScrollRenderController,
12852
12867
  Mn as DocCanvasPopManagerService,
12853
12868
  so as DocCopyCommand,
12854
12869
  Ts as DocCreateTableOperation,
12855
12870
  ss as DocCutCommand,
12856
- wt as DocEventManagerService,
12857
- No as DocIMEInputManagerService,
12871
+ Pt as DocEventManagerService,
12872
+ Lo as DocIMEInputManagerService,
12858
12873
  as as DocPasteCommand,
12859
12874
  lf as DocPrintInterceptorService,
12860
- br as DocRenderController,
12875
+ yr as DocRenderController,
12861
12876
  Ta as DocSelectAllCommand,
12862
12877
  Re as DocSelectionRenderService,
12863
12878
  So as DocStateChangeManagerService,
@@ -12876,9 +12891,9 @@ export {
12876
12891
  fg as DocsUIMenuSchema,
12877
12892
  WA as Editor,
12878
12893
  Dd as EditorInsertTextCommandId,
12879
- Sr as EditorService,
12894
+ vr as EditorService,
12880
12895
  yn as EnterCommand,
12881
- wo as HorizontalLineCommand,
12896
+ No as HorizontalLineCommand,
12882
12897
  Lt as IDocClipboardService,
12883
12898
  Ye as IEditorService,
12884
12899
  Ba as IMEInputCommand,
@@ -12887,10 +12902,10 @@ export {
12887
12902
  eA as InsertCustomRangeCommand,
12888
12903
  Hn as ListOperationCommand,
12889
12904
  $r as MergeTwoParagraphCommand,
12890
- St as MoveCursorOperation,
12891
- vt as MoveSelectionOperation,
12905
+ vt as MoveCursorOperation,
12906
+ Ct as MoveSelectionOperation,
12892
12907
  Yf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
12893
- It as NodePositionConvertToCursor,
12908
+ St as NodePositionConvertToCursor,
12894
12909
  Va as NodePositionConvertToRectRange,
12895
12910
  Tn as OrderListCommand,
12896
12911
  Fd as PastePluginLark,
@@ -12899,7 +12914,7 @@ export {
12899
12914
  La as QuickListCommand,
12900
12915
  Wa as RectRange,
12901
12916
  Xd as ReplaceContentCommand,
12902
- wa as ReplaceSelectionCommand,
12917
+ Pa as ReplaceSelectionCommand,
12903
12918
  Da as ReplaceSnapshotCommand,
12904
12919
  $d as ReplaceTextRunsCommand,
12905
12920
  Fn as ResetInlineFormatTextBackgroundColorCommand,
@@ -12907,19 +12922,19 @@ export {
12907
12922
  Zn as SetDocZoomRatioCommand,
12908
12923
  nt as SetDocZoomRatioOperation,
12909
12924
  Qt as SetInlineFormatBoldCommand,
12910
- yt as SetInlineFormatCommand,
12925
+ xt as SetInlineFormatCommand,
12911
12926
  tn as SetInlineFormatFontFamilyCommand,
12912
- ct as SetInlineFormatFontSizeCommand,
12927
+ lt as SetInlineFormatFontSizeCommand,
12913
12928
  Ut as SetInlineFormatItalicCommand,
12914
12929
  Ht as SetInlineFormatStrikethroughCommand,
12915
- bt as SetInlineFormatSubscriptCommand,
12930
+ yt as SetInlineFormatSubscriptCommand,
12916
12931
  kt as SetInlineFormatSuperscriptCommand,
12917
- Pt as SetInlineFormatTextBackgroundColorCommand,
12932
+ It as SetInlineFormatTextBackgroundColorCommand,
12918
12933
  Et as SetInlineFormatTextColorCommand,
12919
12934
  Ft as SetInlineFormatUnderlineCommand,
12920
12935
  Ze as SetParagraphNamedStyleCommand,
12921
- ko as SwitchDocModeCommand,
12922
- mr as TEXT_RANGE_LAYER_INDEX,
12936
+ Vo as SwitchDocModeCommand,
12937
+ Er as TEXT_RANGE_LAYER_INDEX,
12923
12938
  Jt as TabCommand,
12924
12939
  Zt as TextRange,
12925
12940
  Na as ToggleCheckListCommand,
@@ -12928,9 +12943,9 @@ export {
12928
12943
  je as VIEWPORT_KEY,
12929
12944
  qf as addCustomDecorationBySelectionFactory,
12930
12945
  dd as addCustomDecorationFactory,
12931
- nr as calcDocRangePositions,
12946
+ or as calcDocRangePositions,
12932
12947
  jd as convertBodyToHtml,
12933
- Jo as convertPositionsToRectRanges,
12948
+ $o as convertPositionsToRectRanges,
12934
12949
  Xf as deleteCustomDecorationFactory,
12935
12950
  Jf as docDrawingPositionToTransform,
12936
12951
  Ea as genTableSource,