@univerjs/sheets-drawing-ui 0.5.1 → 0.5.2-nightly.202412281605

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,20 +1,20 @@
1
- var Nn = Object.defineProperty;
2
- var jn = (i, e, n) => e in i ? Nn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
- var F = (i, e, n) => jn(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as Y, ICommandService as G, IUndoRedoService as me, sequenceExecute as Lt, LocaleService as Je, IUniverInstanceService as fe, useDependency as le, Inject as N, Injector as Ie, IContextService as Gt, RxDisposable as Wn, UniverInstanceType as L, connectInjector as xn, toDisposable as $n, FOCUSING_COMMON_DRAWINGS as ve, DrawingTypeEnum as V, Disposable as Z, ArrangeTypeEnum as De, createDocumentModelWithStyle as Bn, ObjectRelativeFromH as Ln, ObjectRelativeFromV as Gn, BooleanNumber as Fn, PositionedObjectLayoutType as Vn, WrapTextType as kn, BuildTextUtils as Hn, Range as Yn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as be, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ye, InterceptorEffectEnum as Xn, ObjectMatrix as zn, Tools as _e, UserManagerService as Kn, IPermissionService as Jn, Rectangle as qn, Direction as re, FOCUSING_FX_BAR_EDITOR as Zn, EDITOR_ACTIVATED as Qn, FOCUSING_PANEL_EDITOR as er, LifecycleService as tr, LifecycleStages as nr, DisposableCollection as rr, fromEventSubject as ir, generateRandomId as sr, DependentOn as or, Plugin as ar, registerDependencies as cr, touchDependencies as nt, IConfigService as dr } from "@univerjs/core";
5
- import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as bt, DRAWING_IMAGE_COUNT_LIMIT as yt, ImageUploadStatusType as ue, DRAWING_IMAGE_ALLOW_SIZE as Ot, getImageSize as Tt, DRAWING_IMAGE_WIDTH_LIMIT as Et, DRAWING_IMAGE_HEIGHT_LIMIT as Pt, getDrawingShapeKeyByDrawingSearch as rt, UniverDrawingPlugin as lr } from "@univerjs/drawing";
6
- import { ImageCropperObject as ur, COMPONENT_IMAGE_POPUP_MENU as hr, OpenImageCropOperation as gr, ImageResetSizeOperation as mr, DrawingRenderService as Vt, DrawingCommonPanel as fr, UniverDrawingUIPlugin as pr } from "@univerjs/drawing-ui";
7
- import { IRenderManagerService as X, precisionTo as ie, getGroupState as wr, transformObjectOutOfGroup as _r, RENDER_CLASS_TYPE as he, Rect as Ut, ObjectType as vr, DRAWING_OBJECT_LAYER_INDEX as Sr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
8
- import { ISheetDrawingService as z, SetDrawingApplyMutation as T, DrawingApplyType as E, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Ir } from "@univerjs/sheets-drawing";
9
- import { SheetCanvasPopManagerService as Cr, attachRangeWithCoord as $e, ISheetSelectionRenderService as Ce, SheetSkeletonManagerService as Q, IEditorBridgeService as Rr, IAutoFillService as Mr, HoverManagerService as Dr, COPY_TYPE as At, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as br, ISheetClipboardService as yr, SheetPrintInterceptorService as Or, getCurrentRangeDisable$ as Tr, SetZoomRatioOperation as Er } from "@univerjs/sheets-ui";
10
- import { ISidebarService as Pr, IUIPartsService as Ur, BuiltInUIPart as Ar, ILocalFileService as Nr, IMessageService as jr, MenuItemType as _t, getMenuHiddenObservable as Ht, RibbonStartGroup as Wr, KeyCode as ge, ComponentManager as xr, IMenuManagerService as $r, IShortcutService as Br, CanvasFloatDomService as Lr } from "@univerjs/ui";
11
- import { takeUntil as Nt, combineLatest as Te, map as Be, filter as se, distinctUntilChanged as Ee, Subject as it, take as Gr, BehaviorSubject as Fr, switchMap as jt } from "rxjs";
12
- import { SheetInterceptorService as qe, getSheetCommandTarget as H, SheetsSelectionsService as Yt, SetRangeValuesCommand as Vr, SetWorksheetRowHeightMutation as Xt, SetWorksheetColWidthMutation as zt, SetWorksheetRowIsAutoHeightMutation as kr, SetWorksheetRowAutoHeightMutation as Hr, AddWorksheetMergeMutation as Yr, RemoveWorksheetMergeMutation as Xr, AFTER_CELL_EDIT as zr, INTERCEPTOR_POINT as Kr, InterceptCellContentPriority as Jr, WorkbookViewPermission as Wt, WorksheetViewPermission as st, WorkbookEditablePermission as ut, WorksheetEditPermission as xe, InsertRowCommand as Kt, InsertColCommand as Jt, RemoveRowCommand as qt, RemoveColCommand as Zt, DeleteRangeMoveLeftCommand as Qt, DeleteRangeMoveUpCommand as en, InsertRangeMoveDownCommand as tn, InsertRangeMoveRightCommand as nn, DeltaRowHeightCommand as ht, SetRowHeightCommand as gt, DeltaColumnWidthCommand as rn, SetColWidthCommand as sn, SetRowHiddenCommand as on, SetSpecificRowsVisibleCommand as an, SetSpecificColsVisibleCommand as cn, SetColHiddenCommand as dn, MoveColsCommand as ln, MoveRowsCommand as un, MoveRangeCommand as hn, SetRowVisibleMutation as qr, SetRowHiddenMutation as Zr, SetColVisibleMutation as Qr, SetColHiddenMutation as ei, SetWorksheetActiveOperation as ti, RangeProtectionPermissionEditPoint as ni, SetFrozenMutation as ri } from "@univerjs/sheets";
13
- import gn, { useEffect as vt, forwardRef as mn, useRef as ii, createElement as fn, useState as mt } from "react";
14
- import { DocDrawingController as si } from "@univerjs/docs-drawing";
15
- import { docDrawingPositionToTransform as oi, ReplaceSnapshotCommand as ai } from "@univerjs/docs-ui";
16
- import { MessageType as oe, RadioGroup as ci, Radio as ot } from "@univerjs/design";
17
- const di = "sheets-drawing-ui.config", li = {}, W = {
1
+ var jn = Object.defineProperty;
2
+ var Wn = (i, e, n) => e in i ? jn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
+ var V = (i, e, n) => Wn(i, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CommandType as Y, ICommandService as F, IUndoRedoService as me, sequenceExecute as Lt, LocaleService as Ke, IUniverInstanceService as fe, useDependency as de, Inject as U, Injector as Se, IContextService as Gt, RxDisposable as xn, UniverInstanceType as G, connectInjector as $n, toDisposable as Bn, FOCUSING_COMMON_DRAWINGS as he, DrawingTypeEnum as k, Disposable as Z, ArrangeTypeEnum as Me, createDocumentModelWithStyle as Ln, ObjectRelativeFromH as Gn, ObjectRelativeFromV as Fn, BooleanNumber as Vn, PositionedObjectLayoutType as kn, WrapTextType as Hn, BuildTextUtils as Yn, Range as Xn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, DOCS_ZEN_EDITOR_UNIT_ID_KEY as be, InterceptorEffectEnum as zn, ObjectMatrix as Kn, Tools as _e, UserManagerService as Jn, IPermissionService as qn, Rectangle as Zn, Direction as re, FOCUSING_FX_BAR_EDITOR as Qn, EDITOR_ACTIVATED as er, FOCUSING_PANEL_EDITOR as tr, LifecycleService as nr, LifecycleStages as rr, DisposableCollection as ir, fromEventSubject as sr, generateRandomId as or, DependentOn as ar, Plugin as cr, merge as dr, registerDependencies as lr, touchDependencies as tt, IConfigService as ur } from "@univerjs/core";
5
+ import { DocDrawingController as hr, UniverDocsDrawingPlugin as gr } from "@univerjs/docs-drawing";
6
+ import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as mr } from "@univerjs/drawing";
7
+ import { ImageCropperObject as fr, COMPONENT_IMAGE_POPUP_MENU as pr, OpenImageCropOperation as wr, ImageResetSizeOperation as _r, DrawingRenderService as Vt, DrawingCommonPanel as vr, UniverDrawingUIPlugin as Sr } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as X, precisionTo as ye, getGroupState as Ir, transformObjectOutOfGroup as Cr, RENDER_CLASS_TYPE as ue, Rect as Pt, ObjectType as Rr, DRAWING_OBJECT_LAYER_INDEX as Mr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
9
+ import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Dr } from "@univerjs/sheets-drawing";
10
+ import { SheetCanvasPopManagerService as br, convertPositionSheetOverGridToAbsolute as yr, ISheetSelectionRenderService as Ie, SheetSkeletonManagerService as Q, attachRangeWithCoord as Ht, IEditorBridgeService as Or, IAutoFillService as Tr, HoverManagerService as Er, COPY_TYPE as Ut, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Pr, ISheetClipboardService as Ur, SheetPrintInterceptorService as Ar, getCurrentRangeDisable$ as Nr, SetZoomRatioOperation as jr } from "@univerjs/sheets-ui";
11
+ import { ISidebarService as Wr, IUIPartsService as xr, BuiltInUIPart as $r, ILocalFileService as Br, IMessageService as Lr, MenuItemType as wt, getMenuHiddenObservable as Yt, RibbonStartGroup as Gr, KeyCode as ge, ComponentManager as Fr, IMenuManagerService as Vr, IShortcutService as kr, CanvasFloatDomService as Hr } from "@univerjs/ui";
12
+ import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as Yr, BehaviorSubject as Xr, switchMap as Nt } from "rxjs";
13
+ import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Xt, SetRangeValuesCommand as zr, SetWorksheetRowHeightMutation as zt, SetWorksheetColWidthMutation as Kt, SetWorksheetRowIsAutoHeightMutation as Kr, SetWorksheetRowAutoHeightMutation as Jr, AddWorksheetMergeMutation as qr, RemoveWorksheetMergeMutation as Zr, AFTER_CELL_EDIT as Qr, INTERCEPTOR_POINT as ei, InterceptCellContentPriority as ti, WorkbookViewPermission as jt, WorksheetViewPermission as it, WorkbookEditablePermission as lt, WorksheetEditPermission as xe, InsertRowCommand as Jt, InsertColCommand as qt, RemoveRowCommand as Zt, RemoveColCommand as Qt, DeleteRangeMoveLeftCommand as en, DeleteRangeMoveUpCommand as tn, InsertRangeMoveDownCommand as nn, InsertRangeMoveRightCommand as rn, DeltaRowHeightCommand as ut, SetRowHeightCommand as ht, DeltaColumnWidthCommand as sn, SetColWidthCommand as on, SetRowHiddenCommand as an, SetSpecificRowsVisibleCommand as cn, SetSpecificColsVisibleCommand as dn, SetColHiddenCommand as ln, MoveColsCommand as un, MoveRowsCommand as hn, MoveRangeCommand as gn, SetRowVisibleMutation as ni, SetRowHiddenMutation as ri, SetColVisibleMutation as ii, SetColHiddenMutation as si, SetWorksheetActiveOperation as oi, RangeProtectionPermissionEditPoint as ai, SetFrozenMutation as ci } from "@univerjs/sheets";
14
+ import mn, { useEffect as _t, forwardRef as fn, useRef as di, createElement as pn, useState as gt } from "react";
15
+ import { docDrawingPositionToTransform as li, ReplaceSnapshotCommand as ui } from "@univerjs/docs-ui";
16
+ import { MessageType as se, RadioGroup as hi, Radio as st } from "@univerjs/design";
17
+ const gi = "sheets-drawing-ui.config", Wt = {}, W = {
18
18
  id: "sheet.operation.clear-drawing-transformer",
19
19
  type: Y.MUTATION,
20
20
  handler: (i, e) => {
@@ -24,19 +24,19 @@ const di = "sheets-drawing-ui.config", li = {}, W = {
24
24
  (s = (r = n.getRenderById(t)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
25
25
  }), !0;
26
26
  }
27
- }, Ze = {
27
+ }, qe = {
28
28
  id: "sheet.command.remove-sheet-image",
29
29
  type: Y.COMMAND,
30
30
  handler: (i, e) => {
31
31
  var I, S, R;
32
- const n = i.get(G), t = i.get(me), r = i.get(qe), s = i.get(z);
32
+ const n = i.get(F), t = i.get(me), r = i.get(Je), s = i.get(z);
33
33
  if (!e) return !1;
34
34
  const { drawings: o } = e, d = [];
35
35
  o.forEach((_) => {
36
36
  const { unitId: C } = _;
37
37
  d.push(C);
38
38
  });
39
- const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: Ze.id, params: e }), f = { id: T.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: E.REMOVE } }, p = { id: T.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: E.INSERT } };
39
+ const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: qe.id, params: e }), f = { id: O.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: T.REMOVE } }, p = { id: O.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: T.INSERT } };
40
40
  return Lt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
41
41
  unitID: g,
42
42
  undoMutations: [
@@ -53,17 +53,17 @@ const di = "sheets-drawing-ui.config", li = {}, W = {
53
53
  ]
54
54
  }), !0) : !1;
55
55
  }
56
- }, pn = "COMPONENT_SHEET_DRAWING_PANEL", wn = {
56
+ }, wn = "COMPONENT_SHEET_DRAWING_PANEL", _n = {
57
57
  id: "sidebar.operation.sheet-image",
58
58
  type: Y.COMMAND,
59
59
  handler: async (i, e) => {
60
- const n = i.get(Pr), t = i.get(Je), r = i.get(fe), s = i.get(q);
60
+ const n = i.get(Wr), t = i.get(Ke), r = i.get(fe), s = i.get(q);
61
61
  if (!H(r)) return !1;
62
62
  switch (e.value) {
63
63
  case "open":
64
64
  n.open({
65
65
  header: { title: t.t("sheetImage.panel.title") },
66
- children: { label: pn },
66
+ children: { label: wn },
67
67
  onClose: () => {
68
68
  s.focusDrawing(null);
69
69
  },
@@ -77,15 +77,15 @@ const di = "sheets-drawing-ui.config", li = {}, W = {
77
77
  }
78
78
  return !0;
79
79
  }
80
- }, _n = {
80
+ }, vn = {
81
81
  id: "sheet.operation.edit-sheet-image",
82
82
  type: Y.OPERATION,
83
83
  handler: (i, e) => {
84
- const n = i.get(q), t = i.get(G);
85
- return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(wn.id, { value: "open" }), !0);
84
+ const n = i.get(q), t = i.get(F);
85
+ return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(_n.id, { value: "open" }), !0);
86
86
  }
87
87
  };
88
- var at = { exports: {} }, pe = {};
88
+ var ot = { exports: {} }, pe = {};
89
89
  /**
90
90
  * @license React
91
91
  * react-jsx-runtime.production.min.js
@@ -96,10 +96,10 @@ var at = { exports: {} }, pe = {};
96
96
  * LICENSE file in the root directory of this source tree.
97
97
  */
98
98
  var xt;
99
- function ui() {
99
+ function mi() {
100
100
  if (xt) return pe;
101
101
  xt = 1;
102
- var i = gn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
102
+ var i = mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
103
103
  function o(d, l, g) {
104
104
  var c, a = {}, h = null, u = null;
105
105
  g !== void 0 && (h = "" + g), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (u = l.ref);
@@ -110,19 +110,19 @@ function ui() {
110
110
  return pe.Fragment = n, pe.jsx = o, pe.jsxs = o, pe;
111
111
  }
112
112
  var $t;
113
- function hi() {
114
- return $t || ($t = 1, at.exports = ui()), at.exports;
113
+ function fi() {
114
+ return $t || ($t = 1, ot.exports = mi()), ot.exports;
115
115
  }
116
- var $ = hi();
117
- const gi = "univer-upload-loading", mi = "univer-upload-loading-body", fi = "univer-upload-loading-body-animation", pi = "univer-UniverCircleAnimation", wi = "univer-upload-loading-body-text", Pe = {
118
- uploadLoading: gi,
119
- uploadLoadingBody: mi,
120
- uploadLoadingBodyAnimation: fi,
121
- univerCircleAnimation: pi,
122
- uploadLoadingBodyText: wi
123
- }, _i = () => {
124
- const i = le(Ft), e = le(Je), [n, t] = gn.useState(0);
125
- return vt(() => {
116
+ var $ = fi();
117
+ const pi = "univer-upload-loading", wi = "univer-upload-loading-body", _i = "univer-upload-loading-body-animation", vi = "univer-UniverCircleAnimation", Si = "univer-upload-loading-body-text", Pe = {
118
+ uploadLoading: pi,
119
+ uploadLoadingBody: wi,
120
+ uploadLoadingBodyAnimation: _i,
121
+ univerCircleAnimation: vi,
122
+ uploadLoadingBodyText: Si
123
+ }, Ii = () => {
124
+ const i = de(Ft), e = de(Ke), [n, t] = mn.useState(0);
125
+ return _t(() => {
126
126
  const r = i.change$.subscribe((s) => {
127
127
  t(s);
128
128
  });
@@ -134,19 +134,19 @@ const gi = "univer-upload-loading", mi = "univer-upload-loading-body", fi = "uni
134
134
  /* @__PURE__ */ $.jsx("div", { className: Pe.uploadLoadingBodyText, children: `${e.t("uploadLoading.loading")}: ${n}` })
135
135
  ] }) });
136
136
  };
137
- var vi = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ii = (i, e, n, t) => {
138
- for (var r = t > 1 ? void 0 : t ? Si(e, n) : e, s = i.length - 1, o; s >= 0; s--)
137
+ var Ci = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (i, e, n, t) => {
138
+ for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
139
139
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
140
- return t && r && vi(e, n, r), r;
141
- }, ae = (i, e) => (n, t) => e(n, t, i);
142
- let Le = class extends Wn {
140
+ return t && r && Ci(e, n, r), r;
141
+ }, oe = (i, e) => (n, t) => e(n, t, i);
142
+ let Be = class extends xn {
143
143
  constructor(e, n, t, r, s, o, d) {
144
144
  super();
145
- F(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
145
+ V(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
146
146
  this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = d, this._init();
147
147
  }
148
148
  _init() {
149
- this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(L.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(Ar.CONTENT, () => xn(_i, this._injector));
149
+ this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(G.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent($r.CONTENT, () => $n(Ii, this._injector));
150
150
  }
151
151
  _dispose(e) {
152
152
  const n = e.getUnitId();
@@ -161,7 +161,7 @@ let Le = class extends Wn {
161
161
  _hasCropObject(e) {
162
162
  const n = e.getAllObjectsByOrder();
163
163
  for (const t of n)
164
- if (t instanceof ur)
164
+ if (t instanceof fr)
165
165
  return !0;
166
166
  return !1;
167
167
  }
@@ -175,9 +175,9 @@ let Le = class extends Wn {
175
175
  return;
176
176
  let r;
177
177
  this.disposeWithMe(
178
- $n(
178
+ Bn(
179
179
  t.createControl$.subscribe(() => {
180
- if (this._contextService.setContextValue(ve, !0), this._hasCropObject(n))
180
+ if (this._contextService.setContextValue(he, !0), this._hasCropObject(n))
181
181
  return;
182
182
  const o = t.getSelectedObjectMap();
183
183
  if (o.size > 1) {
@@ -196,7 +196,7 @@ let Le = class extends Wn {
196
196
  r == null || r.dispose();
197
197
  const f = this._canvasPopManagerService.getFeatureMenu(c, a, h, u);
198
198
  r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
199
- componentKey: hr,
199
+ componentKey: pr,
200
200
  direction: "horizontal",
201
201
  offset: [2, 0],
202
202
  extraProps: {
@@ -211,7 +211,11 @@ let Le = class extends Wn {
211
211
  )
212
212
  ), this.disposeWithMe(
213
213
  t.clearControl$.subscribe(() => {
214
- r == null || r.dispose(), this._contextService.setContextValue(ve, !1), this._drawingManagerService.focusDrawing(null);
214
+ r == null || r.dispose(), this._contextService.setContextValue(he, !1), this._drawingManagerService.focusDrawing(null);
215
+ })
216
+ ), this.disposeWithMe(
217
+ this._contextService.contextChanged$.subscribe((o) => {
218
+ o[he] === !1 && (r == null || r.dispose());
215
219
  })
216
220
  ), this.disposeWithMe(
217
221
  t.changing$.subscribe(() => {
@@ -224,74 +228,65 @@ let Le = class extends Wn {
224
228
  {
225
229
  label: "image-popup.edit",
226
230
  index: 0,
227
- commandId: _n.id,
231
+ commandId: vn.id,
228
232
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
229
- disable: r === V.DRAWING_DOM
233
+ disable: r === k.DRAWING_DOM
230
234
  },
231
235
  {
232
236
  label: "image-popup.delete",
233
237
  index: 1,
234
- commandId: Ze.id,
238
+ commandId: qe.id,
235
239
  commandParams: { unitId: e, drawings: [{ unitId: e, subUnitId: n, drawingId: t }] },
236
240
  disable: !1
237
241
  },
238
242
  {
239
243
  label: "image-popup.crop",
240
244
  index: 2,
241
- commandId: gr.id,
245
+ commandId: wr.id,
242
246
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
243
- disable: r === V.DRAWING_DOM
247
+ disable: r === k.DRAWING_DOM
244
248
  },
245
249
  {
246
250
  label: "image-popup.reset",
247
251
  index: 3,
248
- commandId: mr.id,
252
+ commandId: _r.id,
249
253
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
250
- disable: r === V.DRAWING_DOM
254
+ disable: r === k.DRAWING_DOM
251
255
  }
252
256
  ];
253
257
  }
254
258
  };
255
- Le = Ii([
256
- ae(0, N(Ie)),
257
- ae(1, q),
258
- ae(2, N(Cr)),
259
- ae(3, X),
260
- ae(4, fe),
261
- ae(5, Gt),
262
- ae(6, N(Ur))
263
- ], Le);
259
+ Be = Mi([
260
+ oe(0, U(Se)),
261
+ oe(1, q),
262
+ oe(2, U(br)),
263
+ oe(3, X),
264
+ oe(4, fe),
265
+ oe(5, Gt),
266
+ oe(6, U(xr))
267
+ ], Be);
264
268
  function B(i, e, n) {
265
- const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, { column: c, columnOffset: a, row: h, rowOffset: u } = t, { column: m, columnOffset: f, row: p, rowOffset: v } = r, I = n.getCurrentSkeleton(), S = $e(I, {
266
- startColumn: c,
267
- endColumn: c,
268
- startRow: h,
269
- endRow: h
270
- });
271
- if (S == null)
272
- return;
273
- const R = $e(I, {
274
- startColumn: m,
275
- endColumn: m,
276
- startRow: p,
277
- endRow: p
278
- });
279
- if (R == null)
269
+ const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, c = n.getCurrent();
270
+ if (c == null)
280
271
  return;
281
- const { startX: _, startY: C } = S, { startX: w, startY: O } = R;
282
- let b = ie(_ + a, 1), A = ie(C + u, 1), P = ie(w + f - b, 1), D = ie(O + v - A, 1);
283
- S.startX === R.endX && (P = 0), S.startY === R.endY && (D = 0);
284
- const M = I.rowHeaderWidth + I.columnTotalWidth, U = I.columnHeaderHeight + I.rowTotalHeight;
285
- return b + P > M && (b = M - P), A + D > U && (A = U - D), {
272
+ const a = yr(
273
+ c.unitId,
274
+ c.sheetId,
275
+ { from: t, to: r },
276
+ n
277
+ );
278
+ let { left: h, top: u, width: m, height: f } = a;
279
+ const p = n.getCurrentSkeleton(), v = p.rowHeaderWidth + p.columnTotalWidth, I = p.columnHeaderHeight + p.rowTotalHeight;
280
+ return h + m > v && (h = v - m), u + f > I && (u = I - f), {
286
281
  flipY: s,
287
282
  flipX: o,
288
283
  angle: d,
289
284
  skewX: l,
290
285
  skewY: g,
291
- left: b,
292
- top: A,
293
- width: P,
294
- height: D
286
+ left: h,
287
+ top: u,
288
+ width: m,
289
+ height: f
295
290
  };
296
291
  }
297
292
  function j(i, e) {
@@ -300,17 +295,17 @@ function j(i, e) {
300
295
  return;
301
296
  const h = {
302
297
  column: a.actualColumn,
303
- columnOffset: ie(n - a.startX, 1),
298
+ columnOffset: ye(n - a.startX, 1),
304
299
  row: a.actualRow,
305
- rowOffset: ie(t - a.startY, 1)
300
+ rowOffset: ye(t - a.startY, 1)
306
301
  }, u = e.getCellWithCoordByOffset(n + r, t + s);
307
302
  if (u == null)
308
303
  return;
309
304
  const m = {
310
305
  column: u.actualColumn,
311
- columnOffset: ie(n + r - u.startX, 1),
306
+ columnOffset: ye(n + r - u.startX, 1),
312
307
  row: u.actualRow,
313
- rowOffset: ie(t + s - u.startY, 1)
308
+ rowOffset: ye(t + s - u.startY, 1)
314
309
  };
315
310
  return {
316
311
  flipY: o,
@@ -322,12 +317,12 @@ function j(i, e) {
322
317
  to: m
323
318
  };
324
319
  }
325
- var Ci = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (i, e, n, t) => {
326
- for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
320
+ var Di = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, yi = (i, e, n, t) => {
321
+ for (var r = t > 1 ? void 0 : t ? bi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
327
322
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
328
- return t && r && Ci(e, n, r), r;
323
+ return t && r && Di(e, n, r), r;
329
324
  }, Ue = (i, e) => (n, t) => e(n, t, i);
330
- let ft = class extends Z {
325
+ let mt = class extends Z {
331
326
  constructor(i, e, n, t, r) {
332
327
  super(), this._context = i, this._sheetDrawingService = e, this._drawingManagerService = n, this._sheetSelectionRenderService = t, this._sheetSkeletonManagerService = r, this._init();
333
328
  }
@@ -347,16 +342,16 @@ let ft = class extends Z {
347
342
  this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
348
343
  }
349
344
  };
350
- ft = Mi([
345
+ mt = yi([
351
346
  Ue(1, z),
352
347
  Ue(2, q),
353
- Ue(3, N(Ce)),
354
- Ue(4, N(Q))
355
- ], ft);
356
- function Di(i) {
348
+ Ue(3, U(Ie)),
349
+ Ue(4, U(Q))
350
+ ], mt);
351
+ function Oi(i) {
357
352
  const e = [];
358
353
  return i.forEach((n) => {
359
- const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = wr(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
354
+ const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = Ir(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
360
355
  const h = a.transform || { left: 0, top: 0 }, { unitId: u, subUnitId: m, drawingId: f } = a;
361
356
  return {
362
357
  unitId: u,
@@ -373,7 +368,7 @@ function Di(i) {
373
368
  unitId: s,
374
369
  subUnitId: o,
375
370
  drawingId: d,
376
- drawingType: V.DRAWING_GROUP,
371
+ drawingType: k.DRAWING_GROUP,
377
372
  transform: l
378
373
  };
379
374
  e.push({
@@ -382,14 +377,14 @@ function Di(i) {
382
377
  });
383
378
  }), e;
384
379
  }
385
- function bi(i) {
380
+ function Ti(i) {
386
381
  const e = [];
387
382
  return i.forEach((n) => {
388
383
  const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d, transform: l = { width: 0, height: 0 } } = t;
389
384
  if (l == null)
390
385
  return;
391
386
  const g = r.map((a) => {
392
- const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = _r(h || {}, l, l.width || 0, l.height || 0);
387
+ const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Cr(h || {}, l, l.width || 0, l.height || 0);
393
388
  return {
394
389
  unitId: u,
395
390
  subUnitId: m,
@@ -401,7 +396,7 @@ function bi(i) {
401
396
  unitId: s,
402
397
  subUnitId: o,
403
398
  drawingId: d,
404
- drawingType: V.DRAWING_GROUP,
399
+ drawingType: k.DRAWING_GROUP,
405
400
  transform: {
406
401
  left: 0,
407
402
  top: 0
@@ -413,11 +408,11 @@ function bi(i) {
413
408
  });
414
409
  }), e;
415
410
  }
416
- const vn = {
411
+ const Sn = {
417
412
  id: "sheet.command.group-sheet-image",
418
413
  type: Y.COMMAND,
419
414
  handler: (i, e) => {
420
- const n = i.get(G), t = i.get(me), r = i.get(z);
415
+ const n = i.get(F), t = i.get(me), r = i.get(z);
421
416
  if (!e) return !1;
422
417
  const s = [];
423
418
  e.forEach(({ parent: u, children: m }) => {
@@ -426,26 +421,26 @@ const vn = {
426
421
  });
427
422
  });
428
423
  const o = r.getGroupDrawingOp(e), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
429
- return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: E.GROUP }) ? (t.pushUndoRedo({
424
+ return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP }) ? (t.pushUndoRedo({
430
425
  unitID: d,
431
426
  undoMutations: [
432
- { id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: bi(a), type: E.UNGROUP } },
427
+ { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Ti(a), type: T.UNGROUP } },
433
428
  { id: W.id, params: s }
434
429
  ],
435
430
  redoMutations: [
436
- { id: T.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: E.GROUP } },
431
+ { id: O.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP } },
437
432
  { id: W.id, params: s }
438
433
  ]
439
434
  }), !0) : !1;
440
435
  }
441
- }, Qe = {
436
+ }, Ze = {
442
437
  id: "sheet.command.insert-sheet-image",
443
438
  type: Y.COMMAND,
444
439
  handler: (i, e) => {
445
440
  var I, S, R;
446
- const n = i.get(G), t = i.get(me), r = i.get(z), s = i.get(qe);
441
+ const n = i.get(F), t = i.get(me), r = i.get(z), s = i.get(Je);
447
442
  if (!e) return !1;
448
- const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: Qe.id, params: e }), f = { id: T.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: E.INSERT } }, p = { id: T.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: E.REMOVE } };
443
+ const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: Ze.id, params: e }), f = { id: O.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: O.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
449
444
  return Lt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
450
445
  unitID: g,
451
446
  undoMutations: [
@@ -462,51 +457,51 @@ const vn = {
462
457
  ]
463
458
  }), !0) : !1;
464
459
  }
465
- }, Sn = {
460
+ }, In = {
466
461
  id: "sheet.command.set-drawing-arrange",
467
462
  type: Y.COMMAND,
468
463
  handler: (i, e) => {
469
- const n = i.get(G), t = i.get(me);
464
+ const n = i.get(F), t = i.get(me);
470
465
  if (!e) return !1;
471
466
  const r = i.get(z), { unitId: s, subUnitId: o, drawingIds: d, arrangeType: l } = e, g = { unitId: s, subUnitId: o, drawingIds: d };
472
467
  let c;
473
- if (l === De.forward ? c = r.getForwardDrawingsOp(g) : l === De.backward ? c = r.getBackwardDrawingOp(g) : l === De.front ? c = r.getFrontDrawingsOp(g) : l === De.back && (c = r.getBackDrawingsOp(g)), c == null)
468
+ if (l === Me.forward ? c = r.getForwardDrawingsOp(g) : l === Me.backward ? c = r.getBackwardDrawingOp(g) : l === Me.front ? c = r.getFrontDrawingsOp(g) : l === Me.back && (c = r.getBackDrawingsOp(g)), c == null)
474
469
  return !1;
475
470
  const { objects: a, redo: h, undo: u } = c;
476
- return n.syncExecuteCommand(T.id, { op: h, unitId: s, subUnitId: o, objects: a, type: E.ARRANGE }) ? (t.pushUndoRedo({
471
+ return n.syncExecuteCommand(O.id, { op: h, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE }) ? (t.pushUndoRedo({
477
472
  unitID: s,
478
473
  undoMutations: [
479
- { id: T.id, params: { op: u, unitId: s, subUnitId: o, objects: a, type: E.ARRANGE } }
474
+ { id: O.id, params: { op: u, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE } }
480
475
  ],
481
476
  redoMutations: [
482
- { id: T.id, params: { op: h, unitId: s, subUnitId: o, objects: a, type: E.ARRANGE } }
477
+ { id: O.id, params: { op: h, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE } }
483
478
  ]
484
479
  }), !0) : !1;
485
480
  }
486
- }, et = {
481
+ }, Qe = {
487
482
  id: "sheet.command.set-sheet-image",
488
483
  type: Y.COMMAND,
489
484
  handler: (i, e) => {
490
- const n = i.get(G), t = i.get(me), r = i.get(z);
485
+ const n = i.get(F), t = i.get(me), r = i.get(z);
491
486
  if (!e) return !1;
492
487
  const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
493
- return n.syncExecuteCommand(T.id, { unitId: d, subUnitId: l, op: c, objects: a, type: E.UPDATE }) ? (t.pushUndoRedo({
488
+ return n.syncExecuteCommand(O.id, { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE }) ? (t.pushUndoRedo({
494
489
  unitID: d,
495
490
  undoMutations: [
496
- { id: T.id, params: { unitId: d, subUnitId: l, op: g, objects: a, type: E.UPDATE } },
491
+ { id: O.id, params: { unitId: d, subUnitId: l, op: g, objects: a, type: T.UPDATE } },
497
492
  { id: W.id, params: [d] }
498
493
  ],
499
494
  redoMutations: [
500
- { id: T.id, params: { unitId: d, subUnitId: l, op: c, objects: a, type: E.UPDATE } },
495
+ { id: O.id, params: { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE } },
501
496
  { id: W.id, params: [d] }
502
497
  ]
503
498
  }), !0) : !1;
504
499
  }
505
- }, In = {
500
+ }, Cn = {
506
501
  id: "sheet.command.ungroup-sheet-image",
507
502
  type: Y.COMMAND,
508
503
  handler: (i, e) => {
509
- const n = i.get(G), t = i.get(me), r = i.get(z);
504
+ const n = i.get(F), t = i.get(me), r = i.get(z);
510
505
  if (!e) return !1;
511
506
  const s = [];
512
507
  e.forEach(({ parent: u, children: m }) => {
@@ -515,31 +510,31 @@ const vn = {
515
510
  });
516
511
  });
517
512
  const o = r.getUngroupDrawingOp(e), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
518
- return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: E.UNGROUP }) ? (t.pushUndoRedo({
513
+ return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP }) ? (t.pushUndoRedo({
519
514
  unitID: d,
520
515
  undoMutations: [
521
- { id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: Di(a), type: E.GROUP } },
516
+ { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Oi(a), type: T.GROUP } },
522
517
  { id: W.id, params: s }
523
518
  ],
524
519
  redoMutations: [
525
- { id: T.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: E.UNGROUP } },
520
+ { id: O.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP } },
526
521
  { id: W.id, params: s }
527
522
  ]
528
523
  }), !0) : !1;
529
524
  }
530
525
  };
531
- var yi = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, Ti = (i, e, n, t) => {
532
- for (var r = t > 1 ? void 0 : t ? Oi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
526
+ var Ei = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ui = (i, e, n, t) => {
527
+ for (var r = t > 1 ? void 0 : t ? Pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
533
528
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
534
- return t && r && yi(e, n, r), r;
529
+ return t && r && Ei(e, n, r), r;
535
530
  }, K = (i, e) => (n, t) => e(n, t, i);
536
- function Ei(i, e, n) {
531
+ function Ai(i, e, n) {
537
532
  const t = n * Math.PI / 180, r = Math.abs(i * Math.cos(t)) + Math.abs(e * Math.sin(t)), s = Math.abs(i * Math.sin(t)) + Math.abs(e * Math.cos(t));
538
533
  return { rotatedWidth: r, rotatedHeight: s };
539
534
  }
540
- function Cn(i, e, n, t, r) {
535
+ function Rn(i, e, n, t, r) {
541
536
  var I;
542
- const { rotatedHeight: s, rotatedWidth: o } = Ei(n, t, r), l = i.get(X).getRenderById(e.unitId);
537
+ const { rotatedHeight: s, rotatedWidth: o } = Ai(n, t, r), l = i.get(X).getRenderById(e.unitId);
543
538
  if (!l)
544
539
  return !1;
545
540
  const c = (I = l.with(Q).getWorksheetSkeleton(e.subUnitId)) == null ? void 0 : I.skeleton;
@@ -551,26 +546,26 @@ function Cn(i, e, n, t, r) {
551
546
  height: t * v
552
547
  };
553
548
  }
554
- let Se = class extends Z {
549
+ let ve = class extends Z {
555
550
  constructor(e, n, t, r, s, o, d, l, g, c, a, h, u) {
556
551
  super();
557
- F(this, "_workbookSelections");
552
+ V(this, "_workbookSelections");
558
553
  this._context = e, this._skeletonManagerService = n, this._commandService = t, this._selectionRenderService = r, this._imageIoService = s, this._fileOpenerService = o, this._sheetDrawingService = d, this._drawingManagerService = l, this._contextService = g, this._messageService = c, this._localeService = a, this._injector = u, this._workbookSelections = h.getWorkbookSelections(this._context.unitId), this._updateImageListener(), this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener();
559
554
  }
560
555
  async insertFloatImage() {
561
556
  const e = await this._fileOpenerService.openFile({
562
557
  multiple: !0,
563
- accept: bt.map((t) => `.${t.replace("image/", "")}`).join(",")
558
+ accept: Dt.map((t) => `.${t.replace("image/", "")}`).join(",")
564
559
  }), n = e.length;
565
- return n > yt ? (this._messageService.show({
566
- type: oe.Error,
567
- content: this._localeService.t("update-status.exceedMaxCount", String(yt))
560
+ return n > bt ? (this._messageService.show({
561
+ type: se.Error,
562
+ content: this._localeService.t("update-status.exceedMaxCount", String(bt))
568
563
  }), !1) : n === 0 ? !1 : (e.forEach(async (t) => await this._insertFloatImage(t)), !0);
569
564
  }
570
565
  async insertCellImage() {
571
566
  const n = (await this._fileOpenerService.openFile({
572
567
  multiple: !1,
573
- accept: bt.map((t) => `.${t.replace("image/", "")}`).join(",")
568
+ accept: Dt.map((t) => `.${t.replace("image/", "")}`).join(",")
574
569
  }))[0];
575
570
  return n ? (await this._insertCellImage(n), !0) : !1;
576
571
  }
@@ -580,24 +575,24 @@ let Se = class extends Z {
580
575
  n = await this._imageIoService.saveImage(e);
581
576
  } catch (I) {
582
577
  const S = I.message;
583
- S === ue.ERROR_EXCEED_SIZE ? this._messageService.show({
584
- type: oe.Error,
585
- content: this._localeService.t("update-status.exceedMaxSize", String(Ot / (1024 * 1024)))
586
- }) : S === ue.ERROR_IMAGE_TYPE ? this._messageService.show({
587
- type: oe.Error,
578
+ S === le.ERROR_EXCEED_SIZE ? this._messageService.show({
579
+ type: se.Error,
580
+ content: this._localeService.t("update-status.exceedMaxSize", String(yt / (1024 * 1024)))
581
+ }) : S === le.ERROR_IMAGE_TYPE ? this._messageService.show({
582
+ type: se.Error,
588
583
  content: this._localeService.t("update-status.invalidImageType")
589
- }) : S === ue.ERROR_IMAGE && this._messageService.show({
590
- type: oe.Error,
584
+ }) : S === le.ERROR_IMAGE && this._messageService.show({
585
+ type: se.Error,
591
586
  content: this._localeService.t("update-status.invalidImage")
592
587
  });
593
588
  }
594
589
  if (n == null)
595
590
  return;
596
- const t = this._getUnitInfo(), { unitId: r, subUnitId: s } = t, { imageId: o, imageSourceType: d, source: l, base64Cache: g } = n, { width: c, height: a, image: h } = await Tt(g || ""), { width: u, height: m } = this._context.scene;
591
+ const t = this._getUnitInfo(), { unitId: r, subUnitId: s } = t, { imageId: o, imageSourceType: d, source: l, base64Cache: g } = n, { width: c, height: a, image: h } = await Ot(g || ""), { width: u, height: m } = this._context.scene;
597
592
  this._imageIoService.addImageSourceCache(l, d, h);
598
593
  let f = 1;
599
- if (c > Et || a > Pt) {
600
- const I = Et / c, S = Pt / a;
594
+ if (c > Tt || a > Et) {
595
+ const I = Tt / c, S = Et / a;
601
596
  f = Math.max(I, S);
602
597
  }
603
598
  const p = this._getImagePosition(c * f, a * f, u, m);
@@ -607,13 +602,13 @@ let Se = class extends Z {
607
602
  unitId: r,
608
603
  subUnitId: s,
609
604
  drawingId: o,
610
- drawingType: V.DRAWING_IMAGE,
605
+ drawingType: k.DRAWING_IMAGE,
611
606
  imageSourceType: d,
612
607
  source: l,
613
608
  transform: B(p, this._selectionRenderService, this._skeletonManagerService),
614
609
  sheetTransform: p
615
610
  };
616
- this._commandService.executeCommand(Qe.id, {
611
+ this._commandService.executeCommand(Ze.id, {
617
612
  unitId: r,
618
613
  drawings: [v]
619
614
  });
@@ -625,25 +620,25 @@ let Se = class extends Z {
625
620
  n = await this._imageIoService.saveImage(e);
626
621
  } catch (p) {
627
622
  const v = p.message;
628
- v === ue.ERROR_EXCEED_SIZE ? this._messageService.show({
629
- type: oe.Error,
630
- content: this._localeService.t("update-status.exceedMaxSize", String(Ot / (1024 * 1024)))
631
- }) : v === ue.ERROR_IMAGE_TYPE ? this._messageService.show({
632
- type: oe.Error,
623
+ v === le.ERROR_EXCEED_SIZE ? this._messageService.show({
624
+ type: se.Error,
625
+ content: this._localeService.t("update-status.exceedMaxSize", String(yt / (1024 * 1024)))
626
+ }) : v === le.ERROR_IMAGE_TYPE ? this._messageService.show({
627
+ type: se.Error,
633
628
  content: this._localeService.t("update-status.invalidImageType")
634
- }) : v === ue.ERROR_IMAGE && this._messageService.show({
635
- type: oe.Error,
629
+ }) : v === le.ERROR_IMAGE && this._messageService.show({
630
+ type: se.Error,
636
631
  content: this._localeService.t("update-status.invalidImage")
637
632
  });
638
633
  }
639
634
  if (n == null)
640
635
  return;
641
- const { imageId: t, imageSourceType: r, source: s, base64Cache: o } = n, { width: d, height: l, image: g } = await Tt(o || "");
636
+ const { imageId: t, imageSourceType: r, source: s, base64Cache: o } = n, { width: d, height: l, image: g } = await Ot(o || "");
642
637
  this._imageIoService.addImageSourceCache(s, r, g);
643
638
  const c = this._workbookSelections.getCurrentLastSelection();
644
639
  if (!c)
645
640
  return !1;
646
- const a = Bn("", {}), h = Cn(
641
+ const a = Ln("", {}), h = Rn(
647
642
  this._injector,
648
643
  {
649
644
  unitId: this._context.unitId,
@@ -663,11 +658,11 @@ let Se = class extends Z {
663
658
  height: h.height
664
659
  },
665
660
  positionH: {
666
- relativeFrom: Ln.PAGE,
661
+ relativeFrom: Gn.PAGE,
667
662
  posOffset: 0
668
663
  },
669
664
  positionV: {
670
- relativeFrom: Gn.PARAGRAPH,
665
+ relativeFrom: Fn.PARAGRAPH,
671
666
  posOffset: 0
672
667
  },
673
668
  angle: 0
@@ -675,22 +670,22 @@ let Se = class extends Z {
675
670
  unitId: a.getUnitId(),
676
671
  subUnitId: a.getUnitId(),
677
672
  drawingId: t,
678
- drawingType: V.DRAWING_IMAGE,
673
+ drawingType: k.DRAWING_IMAGE,
679
674
  imageSourceType: r,
680
675
  source: s,
681
- transform: oi(u),
676
+ transform: li(u),
682
677
  docTransform: u,
683
- behindDoc: Fn.FALSE,
678
+ behindDoc: Vn.FALSE,
684
679
  title: "",
685
680
  description: "",
686
- layoutType: Vn.INLINE,
681
+ layoutType: kn.INLINE,
687
682
  // Insert inline drawing by default.
688
- wrapText: kn.BOTH_SIDES,
683
+ wrapText: Hn.BOTH_SIDES,
689
684
  distB: 0,
690
685
  distL: 0,
691
686
  distR: 0,
692
687
  distT: 0
693
- }, f = Hn.drawing.add({
688
+ }, f = Yn.drawing.add({
694
689
  documentDataModel: a,
695
690
  drawings: [m],
696
691
  selection: {
@@ -699,7 +694,7 @@ let Se = class extends Z {
699
694
  endOffset: 0
700
695
  }
701
696
  });
702
- return f ? (a.apply(f), this._commandService.syncExecuteCommand(Vr.id, {
697
+ return f ? (a.apply(f), this._commandService.syncExecuteCommand(zr.id, {
703
698
  value: {
704
699
  [c.primary.actualRow]: {
705
700
  [c.primary.actualColumn]: {
@@ -726,7 +721,7 @@ let Se = class extends Z {
726
721
  endColumn: 0
727
722
  };
728
723
  s && s.length > 0 && (o = s[s.length - 1].range);
729
- const d = $e(this._skeletonManagerService.getCurrent().skeleton, o);
724
+ const d = Ht(this._skeletonManagerService.getCurrent().skeleton, o);
730
725
  if (d == null)
731
726
  return;
732
727
  let { startColumn: l, startRow: g, startX: c, startY: a } = d, h = !1;
@@ -758,7 +753,7 @@ let Se = class extends Z {
758
753
  _updateOrderListener() {
759
754
  this.disposeWithMe(this._drawingManagerService.featurePluginOrderUpdate$.subscribe((e) => {
760
755
  const { unitId: n, subUnitId: t, drawingIds: r, arrangeType: s } = e;
761
- this._commandService.executeCommand(Sn.id, {
756
+ this._commandService.executeCommand(In.id, {
762
757
  unitId: n,
763
758
  subUnitId: t,
764
759
  drawingIds: r,
@@ -785,7 +780,7 @@ let Se = class extends Z {
785
780
  sheetTransform: { ...c }
786
781
  };
787
782
  n.push(a);
788
- }), n.length > 0 && this._commandService.executeCommand(et.id, {
783
+ }), n.length > 0 && this._commandService.executeCommand(Qe.id, {
789
784
  unitId: e[0].unitId,
790
785
  drawings: n
791
786
  }));
@@ -793,44 +788,44 @@ let Se = class extends Z {
793
788
  }
794
789
  _groupDrawingListener() {
795
790
  this.disposeWithMe(this._drawingManagerService.featurePluginGroupUpdate$.subscribe((e) => {
796
- this._commandService.executeCommand(vn.id, e);
791
+ this._commandService.executeCommand(Sn.id, e);
797
792
  const { unitId: n, subUnitId: t, drawingId: r } = e[0].parent;
798
793
  this._drawingManagerService.focusDrawing([{ unitId: n, subUnitId: t, drawingId: r }]);
799
794
  })), this.disposeWithMe(this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((e) => {
800
- this._commandService.executeCommand(In.id, e);
795
+ this._commandService.executeCommand(Cn.id, e);
801
796
  }));
802
797
  }
803
798
  _focusDrawingListener() {
804
799
  this.disposeWithMe(
805
800
  this._drawingManagerService.focus$.subscribe((e) => {
806
- e == null || e.length === 0 ? (this._contextService.setContextValue(ve, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(ve, !0), this._sheetDrawingService.focusDrawing(e));
801
+ e == null || e.length === 0 ? (this._contextService.setContextValue(he, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(he, !0), this._sheetDrawingService.focusDrawing(e));
807
802
  })
808
803
  );
809
804
  }
810
805
  };
811
- Se = Ti([
812
- K(1, N(Q)),
813
- K(2, G),
814
- K(3, Ce),
806
+ ve = Ui([
807
+ K(1, U(Q)),
808
+ K(2, F),
809
+ K(3, Ie),
815
810
  K(4, Ft),
816
- K(5, Nr),
811
+ K(5, Br),
817
812
  K(6, z),
818
813
  K(7, q),
819
814
  K(8, Gt),
820
- K(9, jr),
821
- K(10, N(Je)),
822
- K(11, N(Yt)),
823
- K(12, N(Ie))
824
- ], Se);
825
- var Pi = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, Ai = (i, e, n, t) => {
826
- for (var r = t > 1 ? void 0 : t ? Ui(e, n) : e, s = i.length - 1, o; s >= 0; s--)
815
+ K(9, Lr),
816
+ K(10, U(Ke)),
817
+ K(11, U(Xt)),
818
+ K(12, U(Se))
819
+ ], ve);
820
+ var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Wi = (i, e, n, t) => {
821
+ for (var r = t > 1 ? void 0 : t ? ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
827
822
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
828
- return t && r && Pi(e, n, r), r;
829
- }, ce = (i, e) => (n, t) => e(n, t, i);
830
- function pt(i, e, n) {
823
+ return t && r && Ni(e, n, r), r;
824
+ }, ae = (i, e) => (n, t) => e(n, t, i);
825
+ function ft(i, e, n) {
831
826
  var t, r, s, o;
832
827
  if (((r = (t = n == null ? void 0 : n.p) == null ? void 0 : t.body) == null ? void 0 : r.dataStream.length) === 3 && ((o = (s = n.p) == null ? void 0 : s.drawingsOrder) == null ? void 0 : o.length) === 1) {
833
- const d = n.p.drawings[n.p.drawingsOrder[0]], l = Cn(
828
+ const d = n.p.drawings[n.p.drawingsOrder[0]], l = Rn(
834
829
  i,
835
830
  {
836
831
  unitId: e.unitId,
@@ -847,23 +842,23 @@ function pt(i, e, n) {
847
842
  }
848
843
  return !1;
849
844
  }
850
- let Ge = class extends Z {
845
+ let Le = class extends Z {
851
846
  constructor(i, e, n, t, r, s, o) {
852
847
  super(), this._commandService = i, this._sheetInterceptorService = e, this._univerInstanceService = n, this._injector = t, this._drawingManagerService = r, this._docDrawingController = s, this._editorBridgeService = o, this._initHandleResize(), this._handleInitEditor(), this._handleWriteCell(), this._initCellContentInterceptor();
853
848
  }
854
849
  _initHandleResize() {
855
850
  this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
856
851
  let e, n = [];
857
- if (i.id === Xt.id) {
852
+ if (i.id === zt.id) {
858
853
  const t = i.params;
859
854
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
860
- } else if (i.id === zt.id) {
855
+ } else if (i.id === Kt.id) {
861
856
  const t = i.params;
862
857
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
863
- } else if (i.id === kr.id) {
858
+ } else if (i.id === Kr.id) {
864
859
  const t = i.params;
865
860
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
866
- } else if (i.id === Hr.id) {
861
+ } else if (i.id === Jr.id) {
867
862
  const t = i.params;
868
863
  e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId }), n = t.rowsAutoHeightInfo.map((r) => ({
869
864
  startRow: r.row,
@@ -871,41 +866,41 @@ let Ge = class extends Z {
871
866
  startColumn: 0,
872
867
  endColumn: 9999
873
868
  }));
874
- } else if (i.id === Yr.id) {
869
+ } else if (i.id === qr.id) {
875
870
  const t = i.params;
876
871
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
877
- } else if (i.id === Xr.id) {
872
+ } else if (i.id === Zr.id) {
878
873
  const t = i.params;
879
874
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
880
875
  }
881
876
  e && n.length && n.forEach((t) => {
882
- const r = Yn.transformRange(t, e.worksheet);
877
+ const r = Xn.transformRange(t, e.worksheet);
883
878
  for (let s = r.startRow; s <= r.endRow; s++)
884
879
  for (let o = r.startColumn; o <= r.endColumn; o++)
885
- pt(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: s, col: o }, e.worksheet.getCellRaw(s, o));
880
+ ft(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: s, col: o }, e.worksheet.getCellRaw(s, o));
886
881
  });
887
882
  }));
888
883
  }
889
884
  _handleInitEditor() {
890
885
  this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
891
- i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be)) : this._drawingManagerService.removeDrawingDataForUnit(be);
886
+ i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(De), this._docDrawingController.loadDrawingDataForUnit(De), this._drawingManagerService.initializeNotification(De)) : this._drawingManagerService.removeDrawingDataForUnit(De);
892
887
  })), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
893
- i.id === ai.id && i.params.unitId === ye && (this._drawingManagerService.removeDrawingDataForUnit(ye), this._docDrawingController.loadDrawingDataForUnit(ye), this._drawingManagerService.initializeNotification(ye));
888
+ i.id === ui.id && i.params.unitId === be && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be));
894
889
  }));
895
890
  }
896
891
  _handleWriteCell() {
897
- this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(zr, {
892
+ this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(Qr, {
898
893
  priority: 9999,
899
- handler: (i, e, n) => (pt(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: e.row, col: e.col }, i), n(i))
894
+ handler: (i, e, n) => (ft(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: e.row, col: e.col }, i), n(i))
900
895
  }));
901
896
  }
902
897
  _initCellContentInterceptor() {
903
898
  this.disposeWithMe(
904
899
  this._sheetInterceptorService.intercept(
905
- Kr.CELL_CONTENT,
900
+ ei.CELL_CONTENT,
906
901
  {
907
- effect: Xn.Style,
908
- priority: Jr.CELL_IMAGE,
902
+ effect: zn.Style,
903
+ priority: ti.CELL_IMAGE,
909
904
  handler: (i, e, n) => {
910
905
  var t;
911
906
  return i != null && i.p && ((t = i.p.drawingsOrder) != null && t.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }), n(i);
@@ -915,21 +910,21 @@ let Ge = class extends Z {
915
910
  );
916
911
  }
917
912
  };
918
- Ge = Ai([
919
- ce(0, G),
920
- ce(1, N(qe)),
921
- ce(2, fe),
922
- ce(3, N(Ie)),
923
- ce(4, q),
924
- ce(5, N(si)),
925
- ce(6, N(Rr))
926
- ], Ge);
927
- var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Wi = (i, e, n, t) => {
928
- for (var r = t > 1 ? void 0 : t ? ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
913
+ Le = Wi([
914
+ ae(0, F),
915
+ ae(1, U(Je)),
916
+ ae(2, fe),
917
+ ae(3, U(Se)),
918
+ ae(4, q),
919
+ ae(5, U(hr)),
920
+ ae(6, U(Or))
921
+ ], Le);
922
+ var xi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Bi = (i, e, n, t) => {
923
+ for (var r = t > 1 ? void 0 : t ? $i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
929
924
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
930
- return t && r && Ni(e, n, r), r;
925
+ return t && r && xi(e, n, r), r;
931
926
  }, Bt = (i, e) => (n, t) => e(n, t, i);
932
- let Fe = class extends Z {
927
+ let Ge = class extends Z {
933
928
  constructor(i, e) {
934
929
  super(), this._autoFillService = i, this._injector = e, this._initAutoFillHooks();
935
930
  }
@@ -938,27 +933,27 @@ let Fe = class extends Z {
938
933
  this._autoFillService.addHook({
939
934
  id: "sheet-cell-image-autofill",
940
935
  onBeforeSubmit: (i, e, n, t) => {
941
- new zn(t).forValue((r, s, o) => {
942
- pt(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
936
+ new Kn(t).forValue((r, s, o) => {
937
+ ft(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
943
938
  });
944
939
  }
945
940
  })
946
941
  );
947
942
  }
948
943
  };
949
- Fe = Wi([
950
- Bt(0, N(Mr)),
951
- Bt(1, N(Ie))
952
- ], Fe);
953
- var xi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Bi = (i, e, n, t) => {
954
- for (var r = t > 1 ? void 0 : t ? $i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
944
+ Ge = Bi([
945
+ Bt(0, U(Tr)),
946
+ Bt(1, U(Se))
947
+ ], Ge);
948
+ var Li = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
949
+ for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
955
950
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
956
- return t && r && xi(e, n, r), r;
951
+ return t && r && Li(e, n, r), r;
957
952
  }, Ae = (i, e) => (n, t) => e(n, t, i);
958
- let Ve = class extends Z {
953
+ let Fe = class extends Z {
959
954
  constructor(e, n, t, r) {
960
955
  super();
961
- F(this, "_isSetCursor", !1);
956
+ V(this, "_isSetCursor", !1);
962
957
  this._hoverManagerService = e, this._renderManagerService = n, this._selectionsService = t, this._drawingRenderService = r;
963
958
  }
964
959
  _initHover() {
@@ -966,21 +961,21 @@ let Ve = class extends Z {
966
961
  _initImageClick() {
967
962
  }
968
963
  };
969
- Ve = Bi([
970
- Ae(0, N(Dr)),
971
- Ae(1, N(X)),
972
- Ae(2, N(Yt)),
973
- Ae(3, N(Vt))
974
- ], Ve);
975
- var Li = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
976
- for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
964
+ Fe = Fi([
965
+ Ae(0, U(Er)),
966
+ Ae(1, U(X)),
967
+ Ae(2, U(Xt)),
968
+ Ae(3, U(Vt))
969
+ ], Fe);
970
+ var Vi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Hi = (i, e, n, t) => {
971
+ for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
977
972
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
978
- return t && r && Li(e, n, r), r;
979
- }, ct = (i, e) => (n, t) => e(n, t, i);
980
- let ke = class extends Z {
973
+ return t && r && Vi(e, n, r), r;
974
+ }, at = (i, e) => (n, t) => e(n, t, i);
975
+ let Ve = class extends Z {
981
976
  constructor(e, n, t) {
982
977
  super();
983
- F(this, "_copyInfo");
978
+ V(this, "_copyInfo");
984
979
  this._sheetClipboardService = e, this._renderManagerService = n, this._sheetDrawingService = t, this._initCopyPaste();
985
980
  }
986
981
  _initCopyPaste() {
@@ -988,7 +983,7 @@ let ke = class extends Z {
988
983
  id: "SHEET_IMAGE_UI_PLUGIN",
989
984
  onBeforeCopy: (e, n, t) => this._collect(e, n, t),
990
985
  onPasteCells: (e, n, t, r) => {
991
- const { copyType: s = At.COPY, pasteType: o } = r, { range: d } = e || {}, { range: l, unitId: g, subUnitId: c } = n;
986
+ const { copyType: s = Ut.COPY, pasteType: o } = r, { range: d } = e || {}, { range: l, unitId: g, subUnitId: c } = n;
992
987
  return this._generateMutations(l, { copyType: s, pasteType: o, copyRange: d, unitId: g, subUnitId: c });
993
988
  },
994
989
  onPastePlainText: (e, n) => ({ undos: [], redos: [] })
@@ -1036,7 +1031,7 @@ let ke = class extends Z {
1036
1031
  const { copyRange: t } = n;
1037
1032
  if (!t)
1038
1033
  return { redos: [], undos: [] };
1039
- const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = br([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
1034
+ const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = Pr([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
1040
1035
  if (!m)
1041
1036
  return { redos: [], undos: [] };
1042
1037
  const f = m.attachRangeWithCoord({
@@ -1052,20 +1047,20 @@ let ke = class extends Z {
1052
1047
  });
1053
1048
  if (!f || !p)
1054
1049
  return { redos: [], undos: [] };
1055
- const v = [], I = [], S = p.startX - f.startX, R = p.startY - f.startY, _ = h - c, C = u - a, w = n.copyType === At.CUT, { _sheetDrawingService: O } = this;
1056
- return r.forEach((A) => {
1057
- const { transform: P, sheetTransform: D } = A;
1058
- if (!P)
1050
+ const v = [], I = [], S = p.startX - f.startX, R = p.startY - f.startY, _ = h - c, C = u - a, w = n.copyType === Ut.CUT, { _sheetDrawingService: E } = this;
1051
+ return r.forEach((N) => {
1052
+ const { transform: A, sheetTransform: D } = N;
1053
+ if (!A)
1059
1054
  return;
1060
1055
  const M = {
1061
- ...A,
1056
+ ...N,
1062
1057
  unitId: s,
1063
1058
  subUnitId: o,
1064
- drawingId: w ? A.drawingId : _e.generateRandomId(),
1059
+ drawingId: w ? N.drawingId : _e.generateRandomId(),
1065
1060
  transform: {
1066
- ...P,
1067
- left: P.left + S,
1068
- top: P.top + R
1061
+ ...A,
1062
+ left: A.left + S,
1063
+ top: A.top + R
1069
1064
  },
1070
1065
  sheetTransform: {
1071
1066
  to: { ...D.to, row: D.to.row + _, column: D.to.column + C },
@@ -1073,29 +1068,29 @@ let ke = class extends Z {
1073
1068
  }
1074
1069
  };
1075
1070
  if (w) {
1076
- const { undo: U, redo: x, objects: ee } = O.getBatchUpdateOp([M]);
1071
+ const { undo: P, redo: x, objects: ee } = E.getBatchUpdateOp([M]);
1077
1072
  v.push({
1078
- id: T.id,
1073
+ id: O.id,
1079
1074
  params: {
1080
1075
  unitId: s,
1081
1076
  subUnitId: o,
1082
- type: E.UPDATE,
1077
+ type: T.UPDATE,
1083
1078
  op: x,
1084
1079
  objects: ee
1085
1080
  }
1086
1081
  }), I.push({
1087
- id: T.id,
1082
+ id: O.id,
1088
1083
  params: {
1089
1084
  unitId: s,
1090
1085
  subUnitId: o,
1091
- type: E.UPDATE,
1092
- op: U,
1086
+ type: T.UPDATE,
1087
+ op: P,
1093
1088
  objects: ee
1094
1089
  }
1095
1090
  });
1096
1091
  } else {
1097
- const { undo: U, redo: x, objects: ee } = O.getBatchAddOp([M]);
1098
- v.push({ id: T.id, params: { op: x, unitId: s, subUnitId: o, objects: ee, type: E.INSERT } }), I.push({ id: T.id, params: { op: U, unitId: s, subUnitId: o, objects: ee, type: E.REMOVE } });
1092
+ const { undo: P, redo: x, objects: ee } = E.getBatchAddOp([M]);
1093
+ v.push({ id: O.id, params: { op: x, unitId: s, subUnitId: o, objects: ee, type: T.INSERT } }), I.push({ id: O.id, params: { op: P, unitId: s, subUnitId: o, objects: ee, type: T.REMOVE } });
1099
1094
  }
1100
1095
  }), {
1101
1096
  redos: v,
@@ -1103,22 +1098,22 @@ let ke = class extends Z {
1103
1098
  };
1104
1099
  }
1105
1100
  };
1106
- ke = Fi([
1107
- ct(0, yr),
1108
- ct(1, X),
1109
- ct(2, z)
1110
- ], ke);
1111
- var Vi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Hi = (i, e, n, t) => {
1112
- for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1101
+ Ve = Hi([
1102
+ at(0, Ur),
1103
+ at(1, X),
1104
+ at(2, z)
1105
+ ], Ve);
1106
+ var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, zi = (i, e, n, t) => {
1107
+ for (var r = t > 1 ? void 0 : t ? Xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1113
1108
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1114
- return t && r && Vi(e, n, r), r;
1109
+ return t && r && Yi(e, n, r), r;
1115
1110
  }, we = (i, e) => (n, t) => e(n, t, i);
1116
- let He = class extends Z {
1111
+ let ke = class extends Z {
1117
1112
  constructor(i, e, n, t, r) {
1118
1113
  super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
1119
1114
  }
1120
1115
  _initDrawingVisible() {
1121
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET);
1116
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET);
1122
1117
  this.disposeWithMe(
1123
1118
  Te([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1124
1119
  if (!e) {
@@ -1131,7 +1126,7 @@ let He = class extends Z {
1131
1126
  return;
1132
1127
  }
1133
1128
  const r = e.getUnitId(), s = t.getSheetId();
1134
- if (this._permissionService.composePermission([new Wt(r).id, new st(r, s).id]).every((d) => d.value))
1129
+ if (this._permissionService.composePermission([new jt(r).id, new it(r, s).id]).every((d) => d.value))
1135
1130
  this._drawingManagerService.setDrawingVisible(!0);
1136
1131
  else {
1137
1132
  this._drawingManagerService.setDrawingVisible(!1);
@@ -1139,7 +1134,7 @@ let He = class extends Z {
1139
1134
  if (h == null)
1140
1135
  return;
1141
1136
  h.getAllObjectsByOrder().forEach((m) => {
1142
- m.classType === he.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.removeObject(m);
1137
+ m.classType === ue.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.removeObject(m);
1143
1138
  });
1144
1139
  }
1145
1140
  });
@@ -1147,7 +1142,7 @@ let He = class extends Z {
1147
1142
  );
1148
1143
  }
1149
1144
  _initDrawingEditable() {
1150
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET);
1145
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET);
1151
1146
  this.disposeWithMe(
1152
1147
  Te([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1153
1148
  if (!e) {
@@ -1160,7 +1155,7 @@ let He = class extends Z {
1160
1155
  return;
1161
1156
  }
1162
1157
  const r = e.getUnitId(), s = t.getSheetId();
1163
- if (this._permissionService.composePermission([new ut(r).id, new xe(r, s).id]).every((d) => d.value))
1158
+ if (this._permissionService.composePermission([new lt(r).id, new xe(r, s).id]).every((d) => d.value))
1164
1159
  this._drawingManagerService.setDrawingEditable(!0);
1165
1160
  else {
1166
1161
  this._drawingManagerService.setDrawingEditable(!1);
@@ -1168,7 +1163,7 @@ let He = class extends Z {
1168
1163
  if (h == null)
1169
1164
  return;
1170
1165
  h.getAllObjectsByOrder().forEach((m) => {
1171
- m.classType === he.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.detachTransformerFrom(m);
1166
+ m.classType === ue.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.detachTransformerFrom(m);
1172
1167
  });
1173
1168
  }
1174
1169
  });
@@ -1176,7 +1171,7 @@ let He = class extends Z {
1176
1171
  );
1177
1172
  }
1178
1173
  _initViewPermissionChange() {
1179
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET);
1174
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET);
1180
1175
  this.disposeWithMe(
1181
1176
  Te([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1182
1177
  e && e.activeSheet$.subscribe((t) => {
@@ -1188,20 +1183,20 @@ let He = class extends Z {
1188
1183
  const d = this._renderManagerService.getRenderById(r), l = d == null ? void 0 : d.scene;
1189
1184
  if (l == null)
1190
1185
  return;
1191
- const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new Wt(r).id, new st(r, s).id]).pipe(Be((h) => h.every((u) => u.value)));
1186
+ const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new jt(r).id, new it(r, s).id]).pipe($e((h) => h.every((u) => u.value)));
1192
1187
  c == null || c.pipe(
1193
- se((h) => h !== o),
1188
+ ie((h) => h !== o),
1194
1189
  Ee()
1195
1190
  ).subscribe({
1196
1191
  next: (h) => {
1197
1192
  o = h, this._drawingManagerService.setDrawingVisible(h);
1198
1193
  const u = l.getAllObjectsByOrder(), m = this._drawingManagerService.getDrawingData(r, s), f = Object.values(m);
1199
1194
  h ? this._drawingManagerService.addNotification(f) : (u.forEach((p) => {
1200
- p.classType === he.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.removeObject(p);
1195
+ p.classType === ue.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.removeObject(p);
1201
1196
  }), g.clearSelectedObjects());
1202
1197
  }
1203
- }), (a = this._permissionService.getPermissionPoint$(new st(r, s).id)) == null || a.pipe(
1204
- se((h) => h.value !== o),
1198
+ }), (a = this._permissionService.getPermissionPoint$(new it(r, s).id)) == null || a.pipe(
1199
+ ie((h) => h.value !== o),
1205
1200
  Ee()
1206
1201
  ).subscribe({
1207
1202
  complete: () => {
@@ -1215,7 +1210,7 @@ let He = class extends Z {
1215
1210
  );
1216
1211
  }
1217
1212
  _initEditPermissionChange() {
1218
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET);
1213
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET);
1219
1214
  this.disposeWithMe(
1220
1215
  Te([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1221
1216
  e && e.activeSheet$.subscribe((t) => {
@@ -1227,22 +1222,22 @@ let He = class extends Z {
1227
1222
  const d = this._renderManagerService.getRenderById(r), l = d == null ? void 0 : d.scene;
1228
1223
  if (l == null)
1229
1224
  return;
1230
- const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new ut(r).id, new xe(r, s).id]).pipe(Be((h) => h.every((u) => u.value)));
1225
+ const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new lt(r).id, new xe(r, s).id]).pipe($e((h) => h.every((u) => u.value)));
1231
1226
  c == null || c.pipe(
1232
- se((h) => h !== o),
1227
+ ie((h) => h !== o),
1233
1228
  Ee()
1234
1229
  ).subscribe({
1235
1230
  next: (h) => {
1236
1231
  o = h, this._drawingManagerService.setDrawingEditable(h);
1237
1232
  const u = l.getAllObjectsByOrder(), m = this._drawingManagerService.getDrawingData(r, s), f = Object.values(m);
1238
1233
  h ? (u.forEach((p) => {
1239
- p.classType === he.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.attachTransformerTo(p);
1234
+ p.classType === ue.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.attachTransformerTo(p);
1240
1235
  }), this._drawingManagerService.addNotification(f)) : (u.forEach((p) => {
1241
- p.classType === he.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.detachTransformerFrom(p);
1236
+ p.classType === ue.IMAGE && f.some((v) => p.oKey.includes(v.drawingId)) && l.detachTransformerFrom(p);
1242
1237
  }), g.clearSelectedObjects());
1243
1238
  }
1244
1239
  }), (a = this._permissionService.getPermissionPoint$(new xe(r, s).id)) == null || a.pipe(
1245
- se((h) => h.value !== o),
1240
+ ie((h) => h.value !== o),
1246
1241
  Ee()
1247
1242
  ).subscribe({
1248
1243
  complete: () => {
@@ -1251,7 +1246,7 @@ let He = class extends Z {
1251
1246
  if (v == null)
1252
1247
  return;
1253
1248
  this._drawingManagerService.setDrawingEditable(!0), v.getAllObjectsByOrder().forEach((S) => {
1254
- S.classType === he.IMAGE && f.some((R) => S.oKey.includes(R.drawingId)) && v.detachTransformerFrom(S);
1249
+ S.classType === ue.IMAGE && f.some((R) => S.oKey.includes(R.drawingId)) && v.detachTransformerFrom(S);
1255
1250
  });
1256
1251
  }
1257
1252
  });
@@ -1260,19 +1255,19 @@ let He = class extends Z {
1260
1255
  );
1261
1256
  }
1262
1257
  };
1263
- He = Hi([
1258
+ ke = zi([
1264
1259
  we(0, q),
1265
1260
  we(1, X),
1266
- we(2, Jn),
1261
+ we(2, qn),
1267
1262
  we(3, fe),
1268
- we(4, N(Kn))
1269
- ], He);
1270
- var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, zi = (i, e, n, t) => {
1271
- for (var r = t > 1 ? void 0 : t ? Xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1263
+ we(4, U(Jn))
1264
+ ], ke);
1265
+ var Ki = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, qi = (i, e, n, t) => {
1266
+ for (var r = t > 1 ? void 0 : t ? Ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1272
1267
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1273
- return t && r && Yi(e, n, r), r;
1268
+ return t && r && Ki(e, n, r), r;
1274
1269
  }, Ne = (i, e) => (n, t) => e(n, t, i);
1275
- let Ye = class extends Z {
1270
+ let He = class extends Z {
1276
1271
  constructor(i, e, n, t) {
1277
1272
  super(), this._sheetPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = n, this._renderManagerService = t, this._initPrinting();
1278
1273
  }
@@ -1303,7 +1298,7 @@ let Ye = class extends Z {
1303
1298
  const d = this._drawingManagerService.getDrawingDataForUnit(t), l = d == null ? void 0 : d[e.subUnitId];
1304
1299
  if (!l)
1305
1300
  return n(i);
1306
- const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== V.DRAWING_DOM);
1301
+ const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== k.DRAWING_DOM);
1307
1302
  return h.length ? (h.forEach((u) => {
1308
1303
  if (!u.groupId && u.transform && _e.isDefine(u.transform.left) && _e.isDefine(u.transform.top) && _e.isDefine(u.transform.width) && _e.isDefine(u.transform.height)) {
1309
1304
  const m = o.skeleton.getCellIndexByOffset(u.transform.left, u.transform.top, g, c, { x: 0, y: 0 }), f = o.skeleton.getCellIndexByOffset(u.transform.left + u.transform.width, u.transform.top + u.transform.height, g, c, { x: 0, y: 0 });
@@ -1316,19 +1311,18 @@ let Ye = class extends Z {
1316
1311
  );
1317
1312
  }
1318
1313
  };
1319
- Ye = zi([
1320
- Ne(0, N(Or)),
1321
- Ne(1, N(Vt)),
1314
+ He = qi([
1315
+ Ne(0, U(Ar)),
1316
+ Ne(1, U(Vt)),
1322
1317
  Ne(2, q),
1323
1318
  Ne(3, X)
1324
- ], Ye);
1325
- var Ki = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, qi = (i, e, n, t) => {
1326
- for (var r = t > 1 ? void 0 : t ? Ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1319
+ ], He);
1320
+ var Zi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (i, e, n, t) => {
1321
+ for (var r = t > 1 ? void 0 : t ? Qi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1327
1322
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1328
- return t && r && Ki(e, n, r), r;
1323
+ return t && r && Zi(e, n, r), r;
1329
1324
  }, te = (i, e) => (n, t) => e(n, t, i);
1330
- const Zi = [
1331
- Kt.id,
1325
+ const ts = [
1332
1326
  Jt.id,
1333
1327
  qt.id,
1334
1328
  Zt.id,
@@ -1336,9 +1330,9 @@ const Zi = [
1336
1330
  en.id,
1337
1331
  tn.id,
1338
1332
  nn.id,
1339
- ht.id,
1340
- gt.id,
1341
1333
  rn.id,
1334
+ ut.id,
1335
+ ht.id,
1342
1336
  sn.id,
1343
1337
  on.id,
1344
1338
  an.id,
@@ -1346,16 +1340,17 @@ const Zi = [
1346
1340
  dn.id,
1347
1341
  ln.id,
1348
1342
  un.id,
1349
- hn.id
1350
- ], Qi = [
1351
- qr.id,
1352
- Zr.id,
1353
- Qr.id,
1354
- ei.id,
1355
- Xt.id,
1356
- zt.id
1343
+ hn.id,
1344
+ gn.id
1345
+ ], ns = [
1346
+ ni.id,
1347
+ ri.id,
1348
+ ii.id,
1349
+ si.id,
1350
+ zt.id,
1351
+ Kt.id
1357
1352
  ];
1358
- let wt = class extends Z {
1353
+ let pt = class extends Z {
1359
1354
  constructor(i, e, n, t, r, s, o, d, l) {
1360
1355
  super(), this._context = i, this._renderManagerService = e, this._commandService = n, this._selectionRenderService = t, this._skeletonManagerService = r, this._sheetInterceptorService = s, this._sheetDrawingService = o, this._drawingManagerService = d, this._univerInstanceService = l, this._sheetInterceptorListener(), this._commandListener(), this._sheetRefreshListener();
1361
1356
  }
@@ -1363,57 +1358,57 @@ let wt = class extends Z {
1363
1358
  this.disposeWithMe(
1364
1359
  this._sheetInterceptorService.interceptCommand({
1365
1360
  getMutations: (i) => {
1366
- if (!Zi.includes(i.id))
1361
+ if (!ts.includes(i.id))
1367
1362
  return { redos: [], undos: [] };
1368
1363
  if (i.params == null)
1369
1364
  return { redos: [], undos: [] };
1370
1365
  const e = i.id;
1371
- if (e === Kt.id)
1366
+ if (e === Jt.id)
1372
1367
  return this._moveRowInterceptor(i.params, "insert");
1373
- if ([ln.id, un.id, hn.id].includes(e))
1368
+ if ([un.id, hn.id, gn.id].includes(e))
1374
1369
  return this._moveRangeInterceptor(i.params);
1375
- if (e === Jt.id)
1376
- return this._moveColInterceptor(i.params, "insert");
1377
1370
  if (e === qt.id)
1378
- return this._moveRowInterceptor(i.params, "remove");
1371
+ return this._moveColInterceptor(i.params, "insert");
1379
1372
  if (e === Zt.id)
1373
+ return this._moveRowInterceptor(i.params, "remove");
1374
+ if (e === Qt.id)
1380
1375
  return this._moveColInterceptor(i.params, "remove");
1381
- if (e === Qt.id) {
1376
+ if (e === en.id) {
1382
1377
  const { range: n } = i.params;
1383
1378
  return this._getRangeMoveUndo(
1384
1379
  n,
1385
1380
  0
1386
1381
  /* deleteLeft */
1387
1382
  );
1388
- } else if (e === en.id) {
1383
+ } else if (e === tn.id) {
1389
1384
  const { range: n } = i.params;
1390
1385
  return this._getRangeMoveUndo(
1391
1386
  n,
1392
1387
  1
1393
1388
  /* deleteUp */
1394
1389
  );
1395
- } else if (e === tn.id) {
1390
+ } else if (e === nn.id) {
1396
1391
  const { range: n } = i.params;
1397
1392
  return this._getRangeMoveUndo(
1398
1393
  n,
1399
1394
  2
1400
1395
  /* insertDown */
1401
1396
  );
1402
- } else if (e === nn.id) {
1397
+ } else if (e === rn.id) {
1403
1398
  const { range: n } = i.params;
1404
1399
  return this._getRangeMoveUndo(
1405
1400
  n,
1406
1401
  3
1407
1402
  /* insertRight */
1408
1403
  );
1409
- } else if (e === on.id || e === an.id) {
1404
+ } else if (e === an.id || e === cn.id) {
1410
1405
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1411
1406
  return this._getDrawingUndoForRowVisible(t, r, s);
1412
- } else if (e === cn.id || e === dn.id) {
1407
+ } else if (e === dn.id || e === ln.id) {
1413
1408
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1414
1409
  return this._getDrawingUndoForColVisible(t, r, s);
1415
- } else if (e === ht.id || e === gt.id || e === rn.id || e === sn.id) {
1416
- const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === ht.id || e === gt.id;
1410
+ } else if (e === ut.id || e === ht.id || e === sn.id || e === on.id) {
1411
+ const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === ut.id || e === ht.id;
1417
1412
  return this._getDrawingUndoForRowAndColSize(t, r, s, o);
1418
1413
  }
1419
1414
  return { redos: [], undos: [] };
@@ -1433,11 +1428,11 @@ let wt = class extends Z {
1433
1428
  return { redos: [], undos: [] };
1434
1429
  if (l.length > 0) {
1435
1430
  const c = this._sheetDrawingService.getBatchUpdateOp(l), { undo: a, redo: h, objects: u } = c;
1436
- s.push({ id: T.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: E.UPDATE } }), o.push({ id: T.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: E.UPDATE } });
1431
+ s.push({ id: O.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: T.UPDATE } }), o.push({ id: O.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: T.UPDATE } });
1437
1432
  }
1438
1433
  if (g.length > 0) {
1439
1434
  const c = this._sheetDrawingService.getBatchRemoveOp(g), a = c.undo, h = c.redo, u = c.objects;
1440
- s.push({ id: T.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: E.REMOVE } }), o.push({ id: T.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: E.INSERT } });
1435
+ s.push({ id: O.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: T.REMOVE } }), o.push({ id: O.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: T.INSERT } });
1441
1436
  }
1442
1437
  return s.push({ id: W.id, params: [t] }), o.push({ id: W.id, params: [t] }), {
1443
1438
  redos: s,
@@ -1497,29 +1492,29 @@ let wt = class extends Z {
1497
1492
  else {
1498
1493
  const { from: f, to: p } = h, { row: v, column: I } = f, { row: S, column: R } = p;
1499
1494
  for (let _ = 0; _ < n.length; _++) {
1500
- const C = n[_], { startRow: w, endRow: O, startColumn: b, endColumn: A } = C;
1495
+ const C = n[_], { startRow: w, endRow: E, startColumn: b, endColumn: N } = C;
1501
1496
  if (R < b)
1502
1497
  continue;
1503
1498
  if (m === y.Position) {
1504
- let M = null, U = null;
1505
- if (I >= b && I <= A) {
1506
- const x = this._skeletonManagerService.attachRangeWithCoord({ startColumn: I, endColumn: A, startRow: f.row, endRow: p.row });
1499
+ let M = null, P = null;
1500
+ if (I >= b && I <= N) {
1501
+ const x = this._skeletonManagerService.attachRangeWithCoord({ startColumn: I, endColumn: N, startRow: f.row, endRow: p.row });
1507
1502
  if (x == null)
1508
1503
  return;
1509
- U = { ...u, left: x.startX };
1504
+ P = { ...u, left: x.startX };
1510
1505
  }
1511
- if (U != null && (M = j(U, this._selectionRenderService), M != null && U != null)) {
1512
- r.push({ ...a, sheetTransform: M, transform: U });
1506
+ if (P != null && (M = j(P, this._selectionRenderService), M != null && P != null)) {
1507
+ r.push({ ...a, sheetTransform: M, transform: P });
1513
1508
  break;
1514
1509
  }
1515
1510
  this._remainDrawingSize(u, r, a);
1516
1511
  continue;
1517
1512
  }
1518
- if (I >= b && R <= A)
1513
+ if (I >= b && R <= N)
1519
1514
  continue;
1520
- let P = null, D = null;
1521
- if (I >= b && I <= A) {
1522
- const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: I, endColumn: A, startRow: f.row, endRow: p.row });
1515
+ let A = null, D = null;
1516
+ if (I >= b && I <= N) {
1517
+ const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: I, endColumn: N, startRow: f.row, endRow: p.row });
1523
1518
  if (M == null)
1524
1519
  return;
1525
1520
  D = {
@@ -1527,7 +1522,7 @@ let wt = class extends Z {
1527
1522
  left: (M == null ? void 0 : M.startX) || 0,
1528
1523
  width: ((u == null ? void 0 : u.width) || 0) - M.endX + M.startX
1529
1524
  };
1530
- } else if (R >= b && R <= A) {
1525
+ } else if (R >= b && R <= N) {
1531
1526
  const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: b, endColumn: R, startRow: f.row, endRow: p.row });
1532
1527
  if (M == null)
1533
1528
  return;
@@ -1536,19 +1531,19 @@ let wt = class extends Z {
1536
1531
  left: M.startX - ((u == null ? void 0 : u.width) || 0)
1537
1532
  };
1538
1533
  } else {
1539
- const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: b, endColumn: A, startRow: f.row, endRow: p.row });
1534
+ const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: b, endColumn: N, startRow: f.row, endRow: p.row });
1540
1535
  if (M == null)
1541
1536
  return;
1542
1537
  if (D = {
1543
1538
  ...u,
1544
1539
  width: ((u == null ? void 0 : u.width) || 0) - M.endX + M.startX
1545
- }, P = j(D, this._selectionRenderService), P != null && D != null) {
1546
- s.push({ ...a, sheetTransform: P, transform: D });
1540
+ }, A = j(D, this._selectionRenderService), A != null && D != null) {
1541
+ s.push({ ...a, sheetTransform: A, transform: D });
1547
1542
  break;
1548
1543
  }
1549
1544
  }
1550
- if (D != null && (P = j(D, this._selectionRenderService)), D != null && P != null) {
1551
- r.push({ ...a, sheetTransform: P, transform: D });
1545
+ if (D != null && (A = j(D, this._selectionRenderService)), D != null && A != null) {
1546
+ r.push({ ...a, sheetTransform: A, transform: D });
1552
1547
  break;
1553
1548
  } else
1554
1549
  this._remainDrawingSize(u, r, a);
@@ -1570,10 +1565,10 @@ let wt = class extends Z {
1570
1565
  }
1571
1566
  _createUndoAndRedoMutation(i, e, n) {
1572
1567
  const t = this._sheetDrawingService.getBatchUpdateOp(n), { undo: r, redo: s, objects: o } = t, d = [
1573
- { id: T.id, params: { unitId: i, subUnitId: e, op: s, objects: o, type: E.UPDATE } },
1568
+ { id: O.id, params: { unitId: i, subUnitId: e, op: s, objects: o, type: T.UPDATE } },
1574
1569
  { id: W.id, params: [i] }
1575
1570
  ], l = [
1576
- { id: T.id, params: { unitId: i, subUnitId: e, op: r, objects: o, type: E.UPDATE } },
1571
+ { id: O.id, params: { unitId: i, subUnitId: e, op: r, objects: o, type: T.UPDATE } },
1577
1572
  { id: W.id, params: [i] }
1578
1573
  ];
1579
1574
  return {
@@ -1591,29 +1586,29 @@ let wt = class extends Z {
1591
1586
  else {
1592
1587
  const { from: f, to: p } = h, { row: v, column: I } = f, { row: S, column: R } = p;
1593
1588
  for (let _ = 0; _ < n.length; _++) {
1594
- const C = n[_], { startRow: w, endRow: O, startColumn: b, endColumn: A } = C;
1589
+ const C = n[_], { startRow: w, endRow: E, startColumn: b, endColumn: N } = C;
1595
1590
  if (S < w)
1596
1591
  continue;
1597
1592
  if (m === y.Position) {
1598
- let M = null, U = null;
1599
- if (v >= w && v <= O) {
1600
- const x = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: v, endRow: O });
1593
+ let M = null, P = null;
1594
+ if (v >= w && v <= E) {
1595
+ const x = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: v, endRow: E });
1601
1596
  if (x == null)
1602
1597
  return;
1603
- U = { ...u, top: x.startY };
1598
+ P = { ...u, top: x.startY };
1604
1599
  }
1605
- if (U != null && (M = j(U, this._selectionRenderService), M != null && U != null)) {
1606
- r.push({ ...a, sheetTransform: M, transform: U });
1600
+ if (P != null && (M = j(P, this._selectionRenderService), M != null && P != null)) {
1601
+ r.push({ ...a, sheetTransform: M, transform: P });
1607
1602
  break;
1608
1603
  }
1609
1604
  this._remainDrawingSize(u, r, a);
1610
1605
  continue;
1611
1606
  }
1612
- if (v >= w && S <= O)
1607
+ if (v >= w && S <= E)
1613
1608
  continue;
1614
- let P = null, D = null;
1615
- if (v >= w && v <= O) {
1616
- const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: v, endRow: O });
1609
+ let A = null, D = null;
1610
+ if (v >= w && v <= E) {
1611
+ const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: v, endRow: E });
1617
1612
  if (M == null)
1618
1613
  return;
1619
1614
  D = {
@@ -1621,7 +1616,7 @@ let wt = class extends Z {
1621
1616
  top: (M == null ? void 0 : M.startY) || 0,
1622
1617
  height: ((u == null ? void 0 : u.height) || 0) - M.endY + M.startY
1623
1618
  };
1624
- } else if (S >= w && S <= O) {
1619
+ } else if (S >= w && S <= E) {
1625
1620
  const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: w, endRow: S });
1626
1621
  if (M == null)
1627
1622
  return;
@@ -1630,19 +1625,19 @@ let wt = class extends Z {
1630
1625
  top: M.startY - ((u == null ? void 0 : u.height) || 0)
1631
1626
  };
1632
1627
  } else {
1633
- const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: w, endRow: O });
1628
+ const M = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: w, endRow: E });
1634
1629
  if (M == null)
1635
1630
  return;
1636
1631
  if (D = {
1637
1632
  ...u,
1638
1633
  height: ((u == null ? void 0 : u.height) || 0) - M.endY + M.startY
1639
- }, P = j(D, this._selectionRenderService), P != null && D != null) {
1640
- s.push({ ...a, sheetTransform: P, transform: D });
1634
+ }, A = j(D, this._selectionRenderService), A != null && D != null) {
1635
+ s.push({ ...a, sheetTransform: A, transform: D });
1641
1636
  break;
1642
1637
  }
1643
1638
  }
1644
- if (D != null && (P = j(D, this._selectionRenderService)), D != null && P != null) {
1645
- r.push({ ...a, sheetTransform: P, transform: D });
1639
+ if (D != null && (A = j(D, this._selectionRenderService)), D != null && A != null) {
1640
+ r.push({ ...a, sheetTransform: A, transform: D });
1646
1641
  break;
1647
1642
  } else
1648
1643
  this._remainDrawingSize(u, r, a);
@@ -1714,7 +1709,7 @@ let wt = class extends Z {
1714
1709
  const { unitId: r, subUnitId: s } = t, o = (R = (S = this._renderManagerService.getRenderById(r)) == null ? void 0 : S.with(Q)) == null ? void 0 : R.getCurrentSkeleton();
1715
1710
  if (!o)
1716
1711
  return { redos: [], undos: [] };
1717
- const d = $e(o, n);
1712
+ const d = Ht(o, n);
1718
1713
  if (!d)
1719
1714
  return { redos: [], undos: [] };
1720
1715
  const { startX: l, endX: g, startY: c, endY: a } = d, h = this._sheetDrawingService.getDrawingData(r, s), u = [];
@@ -1725,30 +1720,30 @@ let wt = class extends Z {
1725
1720
  const { transform: w } = C;
1726
1721
  if (!w)
1727
1722
  return;
1728
- const { left: O = 0, top: b = 0, width: A = 0, height: P = 0 } = w, { drawingStartX: D, drawingEndX: M, drawingStartY: U, drawingEndY: x } = {
1729
- drawingStartX: O,
1730
- drawingEndX: O + A,
1723
+ const { left: E = 0, top: b = 0, width: N = 0, height: A = 0 } = w, { drawingStartX: D, drawingEndX: M, drawingStartY: P, drawingEndY: x } = {
1724
+ drawingStartX: E,
1725
+ drawingEndX: E + N,
1731
1726
  drawingStartY: b,
1732
- drawingEndY: b + P
1727
+ drawingEndY: b + A
1733
1728
  };
1734
- l <= D && M <= g && c <= U && x <= a && u.push(C);
1729
+ l <= D && M <= g && c <= P && x <= a && u.push(C);
1735
1730
  });
1736
1731
  const m = [], f = [], p = e.startRow - n.startRow, v = e.startColumn - n.startColumn, I = u.map((_) => {
1737
1732
  const C = _.sheetTransform, w = {
1738
1733
  to: { ...C.to, row: C.to.row + p, column: C.to.column + v },
1739
1734
  from: { ...C.from, row: C.from.row + p, column: C.from.column + v }
1740
- }, O = B(w, this._selectionRenderService, this._skeletonManagerService);
1735
+ }, E = B(w, this._selectionRenderService, this._skeletonManagerService);
1741
1736
  return {
1742
1737
  unitId: r,
1743
1738
  subUnitId: s,
1744
1739
  drawingId: _.drawingId,
1745
- transform: O,
1740
+ transform: E,
1746
1741
  sheetTransform: w
1747
1742
  };
1748
1743
  });
1749
1744
  if (I.length) {
1750
- const _ = this._sheetDrawingService.getBatchUpdateOp(I), { undo: C, redo: w, objects: O } = _;
1751
- m.push({ id: T.id, params: { unitId: r, subUnitId: s, op: w, objects: O, type: E.UPDATE } }), f.push({ id: T.id, params: { unitId: r, subUnitId: s, op: C, objects: O, type: E.UPDATE } });
1745
+ const _ = this._sheetDrawingService.getBatchUpdateOp(I), { undo: C, redo: w, objects: E } = _;
1746
+ m.push({ id: O.id, params: { unitId: r, subUnitId: s, op: w, objects: E, type: T.UPDATE } }), f.push({ id: O.id, params: { unitId: r, subUnitId: s, op: C, objects: E, type: T.UPDATE } });
1752
1747
  }
1753
1748
  return { redos: m, undos: f };
1754
1749
  }
@@ -1766,8 +1761,8 @@ let wt = class extends Z {
1766
1761
  const _ = this._expandRow(f, p, o, d, v);
1767
1762
  I = _ == null ? void 0 : _.newSheetTransform, S = _ == null ? void 0 : _.newTransform;
1768
1763
  } else {
1769
- const { from: _, to: C } = f, { row: w } = _, { row: O } = C;
1770
- if (v === y.Both && w >= o && O <= d)
1764
+ const { from: _, to: C } = f, { row: w } = _, { row: E } = C;
1765
+ if (v === y.Both && w >= o && E <= d)
1771
1766
  h.push({ unitId: t, subUnitId: r, drawingId: u });
1772
1767
  else {
1773
1768
  const b = this._shrinkRow(f, p, o, d, v);
@@ -1782,11 +1777,11 @@ let wt = class extends Z {
1782
1777
  return { redos: [], undos: [] };
1783
1778
  if (a.length > 0) {
1784
1779
  const u = this._sheetDrawingService.getBatchUpdateOp(a), { undo: m, redo: f, objects: p } = u;
1785
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: E.UPDATE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: E.UPDATE } });
1780
+ l.push({ id: O.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.UPDATE } }), g.push({ id: O.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.UPDATE } });
1786
1781
  }
1787
1782
  if (h.length > 0) {
1788
1783
  const u = this._sheetDrawingService.getBatchRemoveOp(h), m = u.undo, f = u.redo, p = u.objects;
1789
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: E.REMOVE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: E.INSERT } });
1784
+ l.push({ id: O.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.REMOVE } }), g.push({ id: O.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.INSERT } });
1790
1785
  }
1791
1786
  return l.push({ id: W.id, params: [t] }), g.push({ id: W.id, params: [t] }), {
1792
1787
  redos: l,
@@ -1807,8 +1802,8 @@ let wt = class extends Z {
1807
1802
  const _ = this._expandCol(f, p, o, d, v);
1808
1803
  I = _ == null ? void 0 : _.newSheetTransform, S = _ == null ? void 0 : _.newTransform;
1809
1804
  } else {
1810
- const { from: _, to: C } = f, { column: w } = _, { column: O } = C;
1811
- if (v === y.Both && w >= o && O <= d)
1805
+ const { from: _, to: C } = f, { column: w } = _, { column: E } = C;
1806
+ if (v === y.Both && w >= o && E <= d)
1812
1807
  h.push({ unitId: t, subUnitId: r, drawingId: u });
1813
1808
  else {
1814
1809
  const b = this._shrinkCol(f, p, o, d, v);
@@ -1823,11 +1818,11 @@ let wt = class extends Z {
1823
1818
  return { redos: [], undos: [] };
1824
1819
  if (a.length > 0) {
1825
1820
  const u = this._sheetDrawingService.getBatchUpdateOp(a), { undo: m, redo: f, objects: p } = u;
1826
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: E.UPDATE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: E.UPDATE } });
1821
+ l.push({ id: O.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.UPDATE } }), g.push({ id: O.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.UPDATE } });
1827
1822
  }
1828
1823
  if (h.length > 0) {
1829
1824
  const u = this._sheetDrawingService.getBatchRemoveOp(h), m = u.undo, f = u.redo, p = u.objects;
1830
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: E.REMOVE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: E.INSERT } });
1825
+ l.push({ id: O.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.REMOVE } }), g.push({ id: O.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.INSERT } });
1831
1826
  }
1832
1827
  return l.push({ id: W.id, params: [t] }), g.push({ id: W.id, params: [t] }), { redos: l, undos: g };
1833
1828
  }
@@ -2004,7 +1999,7 @@ let wt = class extends Z {
2004
1999
  _commandListener() {
2005
2000
  this.disposeWithMe(
2006
2001
  this._commandService.onCommandExecuted((i) => {
2007
- i.id === ti.id && setTimeout(() => {
2002
+ i.id === oi.id && setTimeout(() => {
2008
2003
  const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
2009
2004
  Object.keys(r).forEach((d) => {
2010
2005
  const l = r[d];
@@ -2026,7 +2021,7 @@ let wt = class extends Z {
2026
2021
  _sheetRefreshListener() {
2027
2022
  this.disposeWithMe(
2028
2023
  this._commandService.onCommandExecuted((i) => {
2029
- Qi.includes(i.id) && requestIdleCallback(() => {
2024
+ ns.includes(i.id) && requestIdleCallback(() => {
2030
2025
  const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
2031
2026
  this._refreshDrawingTransform(n, t, r);
2032
2027
  });
@@ -2042,7 +2037,7 @@ let wt = class extends Z {
2042
2037
  const { from: c, to: a } = d, { row: h, column: u } = c, { row: m, column: f } = a;
2043
2038
  for (let p = 0; p < n.length; p++) {
2044
2039
  const v = n[p], { startRow: I, endRow: S, startColumn: R, endColumn: _ } = v;
2045
- if (qn.intersects(
2040
+ if (Zn.intersects(
2046
2041
  {
2047
2042
  startRow: I,
2048
2043
  endRow: S,
@@ -2071,16 +2066,16 @@ let wt = class extends Z {
2071
2066
  }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(W.id, [i]));
2072
2067
  }
2073
2068
  };
2074
- wt = qi([
2069
+ pt = es([
2075
2070
  te(1, X),
2076
- te(2, G),
2077
- te(3, Ce),
2078
- te(4, N(Q)),
2079
- te(5, N(qe)),
2071
+ te(2, F),
2072
+ te(3, Ie),
2073
+ te(4, U(Q)),
2074
+ te(5, U(Je)),
2080
2075
  te(6, z),
2081
2076
  te(7, q),
2082
2077
  te(8, fe)
2083
- ], wt);
2078
+ ], pt);
2084
2079
  var J = function() {
2085
2080
  return J = Object.assign || function(i) {
2086
2081
  for (var e, n = 1, t = arguments.length; n < t; n++) {
@@ -2089,23 +2084,23 @@ var J = function() {
2089
2084
  }
2090
2085
  return i;
2091
2086
  }, J.apply(this, arguments);
2092
- }, es = function(i, e) {
2087
+ }, rs = function(i, e) {
2093
2088
  var n = {};
2094
2089
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
2095
2090
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
2096
2091
  for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
2097
2092
  e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
2098
2093
  return n;
2099
- }, Rn = mn(function(i, e) {
2100
- var n = i.icon, t = i.id, r = i.className, s = i.extend, o = es(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = ii("_".concat(rs()));
2101
- return Mn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
2094
+ }, Mn = fn(function(i, e) {
2095
+ var n = i.icon, t = i.id, r = i.className, s = i.extend, o = rs(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = di("_".concat(os()));
2096
+ return Dn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
2102
2097
  });
2103
- function Mn(i, e, n, t, r) {
2104
- return fn(i.tag, J(J({ key: e }, ts(i, n, r)), t), (ns(i, n).children || []).map(function(s, o) {
2105
- return Mn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
2098
+ function Dn(i, e, n, t, r) {
2099
+ return pn(i.tag, J(J({ key: e }, is(i, n, r)), t), (ss(i, n).children || []).map(function(s, o) {
2100
+ return Dn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
2106
2101
  }));
2107
2102
  }
2108
- function ts(i, e, n) {
2103
+ function is(i, e, n) {
2109
2104
  var t = J({}, i.attrs);
2110
2105
  n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
2111
2106
  var r = e.defIds;
@@ -2114,29 +2109,29 @@ function ts(i, e, n) {
2114
2109
  typeof d == "string" && (t[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
2115
2110
  })), t;
2116
2111
  }
2117
- function ns(i, e) {
2112
+ function ss(i, e) {
2118
2113
  var n, t = e.defIds;
2119
2114
  return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? J(J({}, i), { children: i.children.map(function(r) {
2120
2115
  return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? J(J({}, r), { attrs: J(J({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
2121
2116
  }) }) : i;
2122
2117
  }
2123
- function rs() {
2118
+ function os() {
2124
2119
  return Math.random().toString(36).substring(2, 8);
2125
2120
  }
2126
- Rn.displayName = "UniverIcon";
2127
- var is = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Dn = mn(function(i, e) {
2128
- return fn(Rn, Object.assign({}, i, {
2121
+ Mn.displayName = "UniverIcon";
2122
+ var as = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, bn = fn(function(i, e) {
2123
+ return pn(Mn, Object.assign({}, i, {
2129
2124
  id: "add-image-single",
2130
2125
  ref: e,
2131
- icon: is
2126
+ icon: as
2132
2127
  }));
2133
2128
  });
2134
- Dn.displayName = "AddImageSingle";
2135
- const bn = {
2129
+ bn.displayName = "AddImageSingle";
2130
+ const yn = {
2136
2131
  id: "sheet.command.delete-drawing",
2137
2132
  type: Y.COMMAND,
2138
2133
  handler: (i) => {
2139
- const e = i.get(G), t = i.get(z).getFocusDrawings();
2134
+ const e = i.get(F), t = i.get(z).getFocusDrawings();
2140
2135
  if (t.length === 0)
2141
2136
  return !1;
2142
2137
  const r = t[0].unitId, s = t.map((o) => {
@@ -2148,30 +2143,30 @@ const bn = {
2148
2143
  drawingType: c
2149
2144
  };
2150
2145
  });
2151
- return e.executeCommand(Ze.id, {
2146
+ return e.executeCommand(qe.id, {
2152
2147
  unitId: r,
2153
2148
  drawings: s
2154
2149
  });
2155
2150
  }
2156
- }, St = {
2151
+ }, vt = {
2157
2152
  id: "sheet.command.insert-float-image",
2158
2153
  type: Y.COMMAND,
2159
2154
  handler: (i) => {
2160
2155
  var n, t;
2161
- return (t = (n = i.get(X).getCurrentTypeOfRenderer(L.UNIVER_SHEET)) == null ? void 0 : n.with(Se).insertFloatImage()) != null ? t : !1;
2156
+ return (t = (n = i.get(X).getCurrentTypeOfRenderer(G.UNIVER_SHEET)) == null ? void 0 : n.with(ve).insertFloatImage()) != null ? t : !1;
2162
2157
  }
2163
- }, It = {
2158
+ }, St = {
2164
2159
  id: "sheet.command.insert-cell-image",
2165
2160
  type: Y.COMMAND,
2166
2161
  handler: (i) => {
2167
2162
  var n, t;
2168
- return (t = (n = i.get(X).getCurrentTypeOfRenderer(L.UNIVER_SHEET)) == null ? void 0 : n.with(Se).insertCellImage()) != null ? t : !1;
2163
+ return (t = (n = i.get(X).getCurrentTypeOfRenderer(G.UNIVER_SHEET)) == null ? void 0 : n.with(ve).insertCellImage()) != null ? t : !1;
2169
2164
  }
2170
- }, Re = {
2165
+ }, Ce = {
2171
2166
  id: "sheet.command.move-drawing",
2172
2167
  type: Y.COMMAND,
2173
2168
  handler: (i, e) => {
2174
- const n = i.get(G), t = i.get(z), r = i.get(Ce), { direction: s } = e, o = t.getFocusDrawings();
2169
+ const n = i.get(F), t = i.get(z), r = i.get(Ie), { direction: s } = e, o = t.getFocusDrawings();
2175
2170
  if (o.length === 0)
2176
2171
  return !1;
2177
2172
  const d = o[0].unitId, l = o.map((c) => {
@@ -2185,105 +2180,105 @@ const bn = {
2185
2180
  sheetTransform: j(h, r)
2186
2181
  };
2187
2182
  }).filter((c) => c != null);
2188
- return n.syncExecuteCommand(et.id, {
2183
+ return n.syncExecuteCommand(Qe.id, {
2189
2184
  unitId: d,
2190
2185
  drawings: l
2191
2186
  }) ? (n.syncExecuteCommand(W.id, [d]), !0) : !1;
2192
2187
  }
2193
- }, yn = "addition-and-subtraction-single", On = "sheet.menu.image";
2194
- function ss(i) {
2188
+ }, On = "addition-and-subtraction-single", Tn = "sheet.menu.image";
2189
+ function cs(i) {
2195
2190
  return {
2196
- id: On,
2197
- type: _t.SUBITEMS,
2198
- icon: yn,
2191
+ id: Tn,
2192
+ type: wt.SUBITEMS,
2193
+ icon: On,
2199
2194
  tooltip: "sheetImage.title",
2200
- hidden$: Ht(i, L.UNIVER_SHEET),
2201
- disabled$: Tr(i, { workbookTypes: [ut], worksheetTypes: [xe], rangeTypes: [ni] })
2195
+ hidden$: Yt(i, G.UNIVER_SHEET),
2196
+ disabled$: Nr(i, { workbookTypes: [lt], worksheetTypes: [xe], rangeTypes: [ai] })
2202
2197
  };
2203
2198
  }
2204
- function os(i) {
2199
+ function ds(i) {
2205
2200
  return {
2206
- id: St.id,
2201
+ id: vt.id,
2207
2202
  title: "sheetImage.upload.float",
2208
- type: _t.BUTTON,
2209
- hidden$: Ht(i, L.UNIVER_SHEET)
2203
+ type: wt.BUTTON,
2204
+ hidden$: Yt(i, G.UNIVER_SHEET)
2210
2205
  };
2211
2206
  }
2212
- function as(i) {
2207
+ function ls(i) {
2213
2208
  return {
2214
- id: It.id,
2209
+ id: St.id,
2215
2210
  title: "sheetImage.upload.cell",
2216
- type: _t.BUTTON
2211
+ type: wt.BUTTON
2217
2212
  };
2218
2213
  }
2219
- const cs = "univer-image-common-panel", ds = "univer-image-common-panel-grid", ls = "univer-image-common-panel-border", us = "univer-image-common-panel-title", hs = "univer-image-common-panel-subtitle", gs = "univer-image-common-panel-row", ms = "univer-image-common-panel-row-vertical", fs = "univer-image-common-panel-column", ps = "univer-image-common-panel-column-center", ws = "univer-image-common-panel-inline", _s = "univer-image-common-panel-span2", vs = "univer-image-common-panel-span3", Ss = "univer-image-common-panel-input", Is = "univer-sheet-image-menu", Cs = "univer-sheet-image-menu-input", ne = {
2220
- imageCommonPanel: cs,
2221
- imageCommonPanelGrid: ds,
2222
- imageCommonPanelBorder: ls,
2223
- imageCommonPanelTitle: us,
2224
- imageCommonPanelSubtitle: hs,
2225
- imageCommonPanelRow: gs,
2226
- imageCommonPanelRowVertical: ms,
2227
- imageCommonPanelColumn: fs,
2228
- imageCommonPanelColumnCenter: ps,
2229
- imageCommonPanelInline: ws,
2230
- imageCommonPanelSpan2: _s,
2231
- imageCommonPanelSpan3: vs,
2232
- imageCommonPanelInput: Ss,
2233
- sheetImageMenu: Is,
2234
- sheetImageMenuInput: Cs
2214
+ const us = "univer-image-common-panel", hs = "univer-image-common-panel-grid", gs = "univer-image-common-panel-border", ms = "univer-image-common-panel-title", fs = "univer-image-common-panel-subtitle", ps = "univer-image-common-panel-row", ws = "univer-image-common-panel-row-vertical", _s = "univer-image-common-panel-column", vs = "univer-image-common-panel-column-center", Ss = "univer-image-common-panel-inline", Is = "univer-image-common-panel-span2", Cs = "univer-image-common-panel-span3", Rs = "univer-image-common-panel-input", Ms = "univer-sheet-image-menu", Ds = "univer-sheet-image-menu-input", ne = {
2215
+ imageCommonPanel: us,
2216
+ imageCommonPanelGrid: hs,
2217
+ imageCommonPanelBorder: gs,
2218
+ imageCommonPanelTitle: ms,
2219
+ imageCommonPanelSubtitle: fs,
2220
+ imageCommonPanelRow: ps,
2221
+ imageCommonPanelRowVertical: ws,
2222
+ imageCommonPanelColumn: _s,
2223
+ imageCommonPanelColumnCenter: vs,
2224
+ imageCommonPanelInline: Ss,
2225
+ imageCommonPanelSpan2: Is,
2226
+ imageCommonPanelSpan3: Cs,
2227
+ imageCommonPanelInput: Rs,
2228
+ sheetImageMenu: Ms,
2229
+ sheetImageMenuInput: Ds
2235
2230
  };
2236
- function Tn(i) {
2231
+ function En(i) {
2237
2232
  var e, n, t = "";
2238
2233
  if (typeof i == "string" || typeof i == "number") t += i;
2239
2234
  else if (typeof i == "object") if (Array.isArray(i)) {
2240
2235
  var r = i.length;
2241
- for (e = 0; e < r; e++) i[e] && (n = Tn(i[e])) && (t && (t += " "), t += n);
2236
+ for (e = 0; e < r; e++) i[e] && (n = En(i[e])) && (t && (t += " "), t += n);
2242
2237
  } else for (n in i) i[n] && (t && (t += " "), t += n);
2243
2238
  return t;
2244
2239
  }
2245
2240
  function je() {
2246
- for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = Tn(i)) && (t && (t += " "), t += e);
2241
+ for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = En(i)) && (t && (t += " "), t += e);
2247
2242
  return t;
2248
2243
  }
2249
- const Rs = (i) => {
2244
+ const bs = (i) => {
2250
2245
  var S;
2251
- const e = le(G), n = le(Je), t = le(q), r = le(X), { drawings: s } = i, o = s[0];
2246
+ const e = de(F), n = de(Ke), t = de(q), r = de(X), { drawings: s } = i, o = s[0];
2252
2247
  if (o == null)
2253
2248
  return;
2254
2249
  const { unitId: d } = o, l = r.getRenderById(d), g = l == null ? void 0 : l.scene;
2255
2250
  if (g == null)
2256
2251
  return;
2257
- const c = g.getTransformerByCreate(), [a, h] = mt(!0), u = (S = o.anchorType) != null ? S : y.Position, [m, f] = mt(u);
2252
+ const c = g.getTransformerByCreate(), [a, h] = gt(!0), u = (S = o.anchorType) != null ? S : y.Position, [m, f] = gt(u);
2258
2253
  function p(R, _) {
2259
2254
  const C = [];
2260
2255
  return R.forEach((w) => {
2261
- const { oKey: O } = w, b = _.getDrawingOKey(O);
2256
+ const { oKey: E } = w, b = _.getDrawingOKey(E);
2262
2257
  if (b == null)
2263
2258
  return C.push(null), !0;
2264
- const { unitId: A, subUnitId: P, drawingId: D, drawingType: M, anchorType: U, sheetTransform: x } = b;
2259
+ const { unitId: N, subUnitId: A, drawingId: D, drawingType: M, anchorType: P, sheetTransform: x } = b;
2265
2260
  C.push({
2266
- unitId: A,
2267
- subUnitId: P,
2261
+ unitId: N,
2262
+ subUnitId: A,
2268
2263
  drawingId: D,
2269
- anchorType: U,
2264
+ anchorType: P,
2270
2265
  sheetTransform: x,
2271
2266
  drawingType: M
2272
2267
  });
2273
2268
  }), C;
2274
2269
  }
2275
- vt(() => {
2270
+ _t(() => {
2276
2271
  const R = c.clearControl$.subscribe((C) => {
2277
2272
  C === !0 && h(!1);
2278
2273
  }), _ = c.changeStart$.subscribe((C) => {
2279
2274
  var b;
2280
- const { objects: w } = C, O = p(w, t);
2281
- if (O.length === 0)
2275
+ const { objects: w } = C, E = p(w, t);
2276
+ if (E.length === 0)
2282
2277
  h(!1);
2283
- else if (O.length >= 1) {
2278
+ else if (E.length >= 1) {
2284
2279
  h(!0);
2285
- const A = ((b = O[0]) == null ? void 0 : b.anchorType) || y.Position;
2286
- f(A);
2280
+ const N = ((b = E[0]) == null ? void 0 : b.anchorType) || y.Position;
2281
+ f(N);
2287
2282
  }
2288
2283
  });
2289
2284
  return () => {
@@ -2301,7 +2296,7 @@ const Rs = (i) => {
2301
2296
  drawingId: w.drawingId,
2302
2297
  anchorType: R
2303
2298
  }));
2304
- e.executeCommand(et.id, {
2299
+ e.executeCommand(Qe.id, {
2305
2300
  unitId: _[0].unitId,
2306
2301
  drawings: C
2307
2302
  });
@@ -2309,15 +2304,15 @@ const Rs = (i) => {
2309
2304
  const I = (R) => R ? "block" : "none";
2310
2305
  return /* @__PURE__ */ $.jsxs("div", { className: je(ne.imageCommonPanelGrid, ne.imageCommonPanelBorder), style: { display: I(a) }, children: [
2311
2306
  /* @__PURE__ */ $.jsx("div", { className: ne.imageCommonPanelRow, children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn, ne.imageCommonPanelTitle), children: /* @__PURE__ */ $.jsx("div", { children: n.t("drawing-anchor.title") }) }) }),
2312
- /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(ci, { value: m, onChange: v, direction: "vertical", children: [
2313
- /* @__PURE__ */ $.jsx(ot, { value: y.Both, children: n.t("drawing-anchor.both") }),
2314
- /* @__PURE__ */ $.jsx(ot, { value: y.Position, children: n.t("drawing-anchor.position") }),
2315
- /* @__PURE__ */ $.jsx(ot, { value: y.None, children: n.t("drawing-anchor.none") })
2307
+ /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(hi, { value: m, onChange: v, direction: "vertical", children: [
2308
+ /* @__PURE__ */ $.jsx(st, { value: y.Both, children: n.t("drawing-anchor.both") }),
2309
+ /* @__PURE__ */ $.jsx(st, { value: y.Position, children: n.t("drawing-anchor.position") }),
2310
+ /* @__PURE__ */ $.jsx(st, { value: y.None, children: n.t("drawing-anchor.none") })
2316
2311
  ] }) }) })
2317
2312
  ] });
2318
- }, Ms = () => {
2319
- const i = le(q), e = i.getFocusDrawings(), [n, t] = mt(e);
2320
- return vt(() => {
2313
+ }, ys = () => {
2314
+ const i = de(q), e = i.getFocusDrawings(), [n, t] = gt(e);
2315
+ return _t(() => {
2321
2316
  const r = i.focus$.subscribe((s) => {
2322
2317
  t(s);
2323
2318
  });
@@ -2325,118 +2320,118 @@ const Rs = (i) => {
2325
2320
  r.unsubscribe();
2326
2321
  };
2327
2322
  }, []), !!(n != null && n.length) && /* @__PURE__ */ $.jsxs("div", { className: ne.imageCommonPanel, children: [
2328
- /* @__PURE__ */ $.jsx(fr, { drawings: n }),
2329
- /* @__PURE__ */ $.jsx(Rs, { drawings: n })
2323
+ /* @__PURE__ */ $.jsx(vr, { drawings: n }),
2324
+ /* @__PURE__ */ $.jsx(bs, { drawings: n })
2330
2325
  ] });
2331
- }, Ds = {
2332
- [Wr.FORMULAS_INSERT]: {
2333
- [On]: {
2326
+ }, Os = {
2327
+ [Gr.FORMULAS_INSERT]: {
2328
+ [Tn]: {
2334
2329
  order: 3,
2335
- menuItemFactory: ss,
2336
- [St.id]: {
2330
+ menuItemFactory: cs,
2331
+ [vt.id]: {
2337
2332
  order: 0,
2338
- menuItemFactory: os
2333
+ menuItemFactory: ds
2339
2334
  },
2340
- [It.id]: {
2335
+ [St.id]: {
2341
2336
  order: 1,
2342
- menuItemFactory: as
2337
+ menuItemFactory: ls
2343
2338
  }
2344
2339
  }
2345
2340
  }
2346
2341
  };
2347
- function Me(i) {
2348
- return !i.getContextValue(Zn) && !i.getContextValue(Qn) && !i.getContextValue(er) && i.getContextValue(ve);
2342
+ function Re(i) {
2343
+ return !i.getContextValue(Qn) && !i.getContextValue(er) && !i.getContextValue(tr) && i.getContextValue(he);
2349
2344
  }
2350
- const bs = {
2351
- id: Re.id,
2345
+ const Ts = {
2346
+ id: Ce.id,
2352
2347
  description: "shortcut.sheet.drawing-move-down",
2353
2348
  group: "4_sheet-drawing-view",
2354
2349
  binding: ge.ARROW_DOWN,
2355
2350
  priority: 100,
2356
- preconditions: Me,
2351
+ preconditions: Re,
2357
2352
  staticParameters: {
2358
2353
  direction: re.DOWN
2359
2354
  }
2360
- }, ys = {
2361
- id: Re.id,
2355
+ }, Es = {
2356
+ id: Ce.id,
2362
2357
  description: "shortcut.sheet.drawing-move-up",
2363
2358
  group: "4_sheet-drawing-view",
2364
2359
  binding: ge.ARROW_UP,
2365
2360
  priority: 100,
2366
- preconditions: Me,
2361
+ preconditions: Re,
2367
2362
  staticParameters: {
2368
2363
  direction: re.UP
2369
2364
  }
2370
- }, Os = {
2371
- id: Re.id,
2365
+ }, Ps = {
2366
+ id: Ce.id,
2372
2367
  description: "shortcut.sheet.drawing-move-left",
2373
2368
  group: "4_sheet-drawing-view",
2374
2369
  binding: ge.ARROW_LEFT,
2375
2370
  priority: 100,
2376
- preconditions: Me,
2371
+ preconditions: Re,
2377
2372
  staticParameters: {
2378
2373
  direction: re.LEFT
2379
2374
  }
2380
- }, Ts = {
2381
- id: Re.id,
2375
+ }, Us = {
2376
+ id: Ce.id,
2382
2377
  description: "shortcut.sheet.drawing-move-right",
2383
2378
  group: "4_sheet-drawing-view",
2384
2379
  binding: ge.ARROW_RIGHT,
2385
2380
  priority: 100,
2386
- preconditions: Me,
2381
+ preconditions: Re,
2387
2382
  staticParameters: {
2388
2383
  direction: re.RIGHT
2389
2384
  }
2390
- }, Es = {
2391
- id: bn.id,
2385
+ }, As = {
2386
+ id: yn.id,
2392
2387
  description: "shortcut.sheet.drawing-delete",
2393
2388
  group: "4_sheet-drawing-view",
2394
2389
  // when focusing on any other input tag do not trigger this shortcut
2395
- preconditions: Me,
2390
+ preconditions: Re,
2396
2391
  binding: ge.DELETE,
2397
2392
  mac: ge.BACKSPACE
2398
2393
  };
2399
- var Ps = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, As = (i, e, n, t) => {
2400
- for (var r = t > 1 ? void 0 : t ? Us(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2394
+ var Ns = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ws = (i, e, n, t) => {
2395
+ for (var r = t > 1 ? void 0 : t ? js(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2401
2396
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2402
- return t && r && Ps(e, n, r), r;
2397
+ return t && r && Ns(e, n, r), r;
2403
2398
  }, We = (i, e) => (n, t) => e(n, t, i);
2404
- let Xe = class extends Z {
2399
+ let Ye = class extends Z {
2405
2400
  constructor(i, e, n, t) {
2406
2401
  super(), this._componentManager = i, this._menuManagerService = e, this._commandService = n, this._shortcutService = t, this._init();
2407
2402
  }
2408
2403
  _initCustomComponents() {
2409
2404
  const i = this._componentManager;
2410
- this.disposeWithMe(i.register(yn, Dn)), this.disposeWithMe(i.register(pn, Ms));
2405
+ this.disposeWithMe(i.register(On, bn)), this.disposeWithMe(i.register(wn, ys));
2411
2406
  }
2412
2407
  _initMenus() {
2413
- this._menuManagerService.mergeMenu(Ds);
2408
+ this._menuManagerService.mergeMenu(Os);
2414
2409
  }
2415
2410
  _initCommands() {
2416
2411
  [
2412
+ vt,
2417
2413
  St,
2418
- It,
2419
- Qe,
2420
2414
  Ze,
2421
- et,
2422
- wn,
2423
- W,
2415
+ qe,
2416
+ Qe,
2424
2417
  _n,
2418
+ W,
2425
2419
  vn,
2426
- In,
2427
- Re,
2428
- bn,
2429
- Sn
2420
+ Sn,
2421
+ Cn,
2422
+ Ce,
2423
+ yn,
2424
+ In
2430
2425
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
2431
2426
  }
2432
2427
  _initShortcuts() {
2433
2428
  [
2434
2429
  // sheet drawing shortcuts
2435
- bs,
2436
- ys,
2437
- Os,
2438
2430
  Ts,
2439
- Es
2431
+ Es,
2432
+ Ps,
2433
+ Us,
2434
+ As
2440
2435
  ].forEach((i) => {
2441
2436
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
2442
2437
  });
@@ -2445,18 +2440,18 @@ let Xe = class extends Z {
2445
2440
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
2446
2441
  }
2447
2442
  };
2448
- Xe = As([
2449
- We(0, N(xr)),
2450
- We(1, $r),
2451
- We(2, G),
2452
- We(3, Br)
2453
- ], Xe);
2454
- var Ns = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ws = (i, e, n, t) => {
2455
- for (var r = t > 1 ? void 0 : t ? js(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2443
+ Ye = Ws([
2444
+ We(0, U(Fr)),
2445
+ We(1, Vr),
2446
+ We(2, F),
2447
+ We(3, kr)
2448
+ ], Ye);
2449
+ var xs = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Bs = (i, e, n, t) => {
2450
+ for (var r = t > 1 ? void 0 : t ? $s(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2456
2451
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2457
- return t && r && Ns(e, n, r), r;
2458
- }, de = (i, e) => (n, t) => e(n, t, i);
2459
- function xs(i, e, n, t) {
2452
+ return t && r && xs(e, n, r), r;
2453
+ }, ce = (i, e) => (n, t) => e(n, t, i);
2454
+ function Ls(i, e, n, t) {
2460
2455
  const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(kt.VIEW_MAIN), d = {
2461
2456
  left: !0,
2462
2457
  top: !0
@@ -2466,37 +2461,37 @@ function xs(i, e, n, t) {
2466
2461
  ...i,
2467
2462
  absolute: d
2468
2463
  };
2469
- const { left: l, right: g, top: c, bottom: a } = i, h = t.getFreeze(), { startColumn: u, startRow: m, xSplit: f, ySplit: p } = h, v = n.getNoMergeCellPositionByIndexWithNoHeader(m - p, u - f), I = n.getNoMergeCellPositionByIndexWithNoHeader(m, u), { rowHeaderWidth: S, columnHeaderHeight: R } = n, _ = I.startX - v.startX, C = I.startY - v.startY, { top: w, left: O, viewportScrollX: b, viewportScrollY: A } = o;
2470
- let P, D;
2471
- l < O ? (d.left = !0, P = (_ + S + (l - O)) * r, D = Math.max(
2464
+ const { left: l, right: g, top: c, bottom: a } = i, h = t.getFreeze(), { startColumn: u, startRow: m, xSplit: f, ySplit: p } = h, v = n.getNoMergeCellPositionByIndexWithNoHeader(m - p, u - f), I = n.getNoMergeCellPositionByIndexWithNoHeader(m, u), { rowHeaderWidth: S, columnHeaderHeight: R } = n, _ = I.startX - v.startX, C = I.startY - v.startY, { top: w, left: E, viewportScrollX: b, viewportScrollY: N } = o;
2465
+ let A, D;
2466
+ l < E ? (d.left = !0, A = (_ + S + (l - E)) * r, D = Math.max(
2472
2467
  Math.min(
2473
- (_ + S + (g - O)) * r,
2468
+ (_ + S + (g - E)) * r,
2474
2469
  (_ + S) * r
2475
2470
  ),
2476
2471
  (g - b) * r
2477
- )) : (d.left = !1, P = Math.max((l - b) * r, (_ + S) * r), D = Math.max((g - b) * r, (_ + S) * r));
2478
- let M, U;
2479
- return c < w ? (d.top = !0, M = (C + R + (c - w)) * s, U = Math.max(
2472
+ )) : (d.left = !1, A = Math.max((l - b) * r, (_ + S) * r), D = Math.max((g - b) * r, (_ + S) * r));
2473
+ let M, P;
2474
+ return c < w ? (d.top = !0, M = (C + R + (c - w)) * s, P = Math.max(
2480
2475
  Math.min(
2481
2476
  (C + R + (g - w)) * s,
2482
2477
  (C + R) * s
2483
2478
  ),
2484
- (a - A) * s
2485
- )) : (d.top = !1, M = Math.max((c - A) * s, (C + R) * s), U = Math.max((a - A) * s, (C + R) * s)), {
2486
- left: P,
2479
+ (a - N) * s
2480
+ )) : (d.top = !1, M = Math.max((c - N) * s, (C + R) * s), P = Math.max((a - N) * s, (C + R) * s)), {
2481
+ left: A,
2487
2482
  right: D,
2488
2483
  top: M,
2489
- bottom: U,
2484
+ bottom: P,
2490
2485
  absolute: d
2491
2486
  };
2492
2487
  }
2493
- const dt = (i, e, n, t) => {
2488
+ const ct = (i, e, n, t) => {
2494
2489
  const { scene: r } = e, { left: s, top: o, width: d, height: l, angle: g } = i, c = {
2495
2490
  left: s,
2496
2491
  right: s + d,
2497
2492
  top: o,
2498
2493
  bottom: o + l
2499
- }, a = xs(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2494
+ }, a = Ls(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2500
2495
  return {
2501
2496
  startX: a.left,
2502
2497
  endX: a.right,
@@ -2508,22 +2503,22 @@ const dt = (i, e, n, t) => {
2508
2503
  absolute: a.absolute
2509
2504
  };
2510
2505
  };
2511
- let ze = class extends Z {
2506
+ let Xe = class extends Z {
2512
2507
  constructor(e, n, t, r, s, o, d) {
2513
2508
  super();
2514
- F(this, "_domLayerMap", /* @__PURE__ */ new Map());
2515
- F(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
2516
- F(this, "_transformChange$", new it());
2517
- F(this, "transformChange$", this._transformChange$.asObservable());
2518
- F(this, "_add$", new it());
2519
- F(this, "add$", this._add$.asObservable());
2520
- F(this, "_remove$", new it());
2521
- F(this, "remove$", this._remove$.asObservable());
2522
- F(this, "_hooks", []);
2509
+ V(this, "_domLayerMap", /* @__PURE__ */ new Map());
2510
+ V(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
2511
+ V(this, "_transformChange$", new rt());
2512
+ V(this, "transformChange$", this._transformChange$.asObservable());
2513
+ V(this, "_add$", new rt());
2514
+ V(this, "add$", this._add$.asObservable());
2515
+ V(this, "_remove$", new rt());
2516
+ V(this, "remove$", this._remove$.asObservable());
2517
+ V(this, "_hooks", []);
2523
2518
  this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = d, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
2524
2519
  }
2525
2520
  _bindScrollEvent() {
2526
- this._lifecycleService.lifecycle$.pipe(se((e) => e === nr.Rendered), Gr(1)).subscribe(() => {
2521
+ this._lifecycleService.lifecycle$.pipe(ie((e) => e === rr.Rendered), Yr(1)).subscribe(() => {
2527
2522
  this._scrollUpdateListener();
2528
2523
  });
2529
2524
  }
@@ -2557,18 +2552,18 @@ let ze = class extends Z {
2557
2552
  // eslint-disable-next-line max-lines-per-function
2558
2553
  this._drawingManagerService.add$.subscribe((e) => {
2559
2554
  e.forEach((n) => {
2560
- var Rt, Mt, Dt;
2561
- const { unitId: t, subUnitId: r, drawingId: s } = n, o = H(this._univerInstanceService, { unitId: t, subUnitId: r }), d = this._drawingManagerService.getDrawingByParam(n), l = this._univerInstanceService.getUnit(t, L.UNIVER_SHEET);
2555
+ var Ct, Rt, Mt;
2556
+ const { unitId: t, subUnitId: r, drawingId: s } = n, o = H(this._univerInstanceService, { unitId: t, subUnitId: r }), d = this._drawingManagerService.getDrawingByParam(n), l = this._univerInstanceService.getUnit(t, G.UNIVER_SHEET);
2562
2557
  if (!l)
2563
2558
  return;
2564
2559
  const g = l.getActiveSheet().getSheetId();
2565
2560
  if (!d || !o)
2566
2561
  return;
2567
- const c = (Rt = this._renderManagerService.getRenderById(t)) == null ? void 0 : Rt.with(Q).getWorksheetSkeleton(r);
2562
+ const c = (Ct = this._renderManagerService.getRenderById(t)) == null ? void 0 : Ct.with(Q).getWorksheetSkeleton(r);
2568
2563
  if (!c)
2569
2564
  return;
2570
2565
  const { transform: a, drawingType: h, data: u } = d;
2571
- if (h !== V.DRAWING_DOM && h !== V.DRAWING_CHART)
2566
+ if (h !== k.DRAWING_DOM && h !== k.DRAWING_CHART)
2572
2567
  return;
2573
2568
  const m = this._getSceneAndTransformerByDrawingSearch(t);
2574
2569
  if (m == null)
@@ -2578,9 +2573,9 @@ let ze = class extends Z {
2578
2573
  return !0;
2579
2574
  if (g !== r)
2580
2575
  return;
2581
- const { left: v, top: I, width: S, height: R, angle: _, flipX: C, flipY: w, skewX: O, skewY: b } = a, A = rt({ unitId: t, subUnitId: r, drawingId: s }), P = f.getObject(A);
2582
- if (P != null) {
2583
- P.transformByState({ left: v, top: I, width: S, height: R, angle: _, flipX: C, flipY: w, skewX: O, skewY: b });
2576
+ const { left: v, top: I, width: S, height: R, angle: _, flipX: C, flipY: w, skewX: E, skewY: b } = a, N = nt({ unitId: t, subUnitId: r, drawingId: s }), A = f.getObject(N);
2577
+ if (A != null) {
2578
+ A.transformByState({ left: v, top: I, width: S, height: R, angle: _, flipX: C, flipY: w, skewX: E, skewY: b });
2584
2579
  return;
2585
2580
  }
2586
2581
  const D = {
@@ -2589,46 +2584,49 @@ let ze = class extends Z {
2589
2584
  width: S,
2590
2585
  height: R,
2591
2586
  zIndex: this._drawingManagerService.getDrawingOrder(t, r).length - 1
2592
- }, M = h === V.DRAWING_CHART;
2593
- M && (D.fill = "white", D.rotateEnabled = !1, u && u.border && (D.stroke = u.border), D.paintFirst = "stroke", D.strokeWidth = 1, D.borderEnabled = !1, D.radius = 8);
2594
- const U = new Ut(A, D);
2595
- M && U.setObjectType(vr.CHART), f.addObject(U, Sr), d.allowTransform !== !1 && f.attachTransformerTo(U);
2596
- const x = this._ensureMap(t, r), ee = new rr(), Un = dt(U, m.renderObject, c.skeleton, o.worksheet), tt = new Fr(Un), An = {
2587
+ }, M = h === k.DRAWING_CHART;
2588
+ if (M) {
2589
+ const L = u ? u.backgroundColor : "white";
2590
+ D.fill = L, D.rotateEnabled = !1, u && u.border && (D.stroke = u.border), D.paintFirst = "stroke", D.strokeWidth = 1, D.borderEnabled = !1, D.radius = 8;
2591
+ }
2592
+ const P = new Pt(N, D);
2593
+ M && P.setObjectType(Rr.CHART), f.addObject(P, Mr), d.allowTransform !== !1 && f.attachTransformerTo(P);
2594
+ const x = this._ensureMap(t, r), ee = new ir(), An = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new Xr(An), Nn = {
2597
2595
  dispose: ee,
2598
- rect: U,
2599
- position$: tt,
2596
+ rect: P,
2597
+ position$: et,
2600
2598
  unitId: t,
2601
2599
  subUnitId: r
2602
2600
  };
2603
2601
  this._canvasFloatDomService.addFloatDom({
2604
- position$: tt,
2602
+ position$: et,
2605
2603
  id: s,
2606
2604
  componentKey: d.componentKey,
2607
- onPointerDown: (k) => {
2608
- p.dispatchEvent(new PointerEvent(k.type, k));
2605
+ onPointerDown: (L) => {
2606
+ p.dispatchEvent(new PointerEvent(L.type, L));
2609
2607
  },
2610
- onPointerMove: (k) => {
2611
- p.dispatchEvent(new PointerEvent(k.type, k));
2608
+ onPointerMove: (L) => {
2609
+ p.dispatchEvent(new PointerEvent(L.type, L));
2612
2610
  },
2613
- onPointerUp: (k) => {
2614
- p.dispatchEvent(new PointerEvent(k.type, k));
2611
+ onPointerUp: (L) => {
2612
+ p.dispatchEvent(new PointerEvent(L.type, L));
2615
2613
  },
2616
- onWheel: (k) => {
2617
- p.dispatchEvent(new WheelEvent(k.type, k));
2614
+ onWheel: (L) => {
2615
+ p.dispatchEvent(new WheelEvent(L.type, L));
2618
2616
  },
2619
- props: (Dt = (Mt = x.get(s)) == null ? void 0 : Mt.props) != null ? Dt : this._getFloatDomProps(s),
2617
+ props: (Mt = (Rt = x.get(s)) == null ? void 0 : Rt.props) != null ? Mt : this._getFloatDomProps(s),
2620
2618
  data: u,
2621
2619
  unitId: t
2622
2620
  });
2623
- const Ct = U.onTransformChange$.subscribeEvent(() => {
2624
- const k = dt(U, m.renderObject, c.skeleton, o.worksheet);
2625
- tt.next(
2626
- k
2621
+ const It = P.onTransformChange$.subscribeEvent(() => {
2622
+ const L = ct(P, m.renderObject, c.skeleton, o.worksheet);
2623
+ et.next(
2624
+ L
2627
2625
  );
2628
2626
  });
2629
2627
  ee.add(() => {
2630
2628
  this._canvasFloatDomService.removeFloatDom(s);
2631
- }), Ct && ee.add(Ct), this._domLayerInfoMap.set(s, An), x.set(s, {
2629
+ }), It && ee.add(It), this._domLayerInfoMap.set(s, Nn), x.set(s, {
2632
2630
  ...x.get(s)
2633
2631
  });
2634
2632
  });
@@ -2636,7 +2634,7 @@ let ze = class extends Z {
2636
2634
  ), this.disposeWithMe(
2637
2635
  this._drawingManagerService.remove$.subscribe((e) => {
2638
2636
  e.forEach((n) => {
2639
- const { unitId: t, subUnitId: r, drawingId: s } = n, o = rt({ unitId: t, subUnitId: r, drawingId: s }), d = this._getSceneAndTransformerByDrawingSearch(t);
2637
+ const { unitId: t, subUnitId: r, drawingId: s } = n, o = nt({ unitId: t, subUnitId: r, drawingId: s }), d = this._getSceneAndTransformerByDrawingSearch(t);
2640
2638
  if (d == null)
2641
2639
  return;
2642
2640
  const { transformer: l, scene: g } = d, c = g.getObject(o);
@@ -2652,35 +2650,35 @@ let ze = class extends Z {
2652
2650
  !r || !d || !l || o.forEach((c) => {
2653
2651
  const a = this._domLayerInfoMap.get(c);
2654
2652
  if (a) {
2655
- const h = dt(a.rect, r.renderObject, l.skeleton, d.worksheet);
2653
+ const h = ct(a.rect, r.renderObject, l.skeleton, d.worksheet);
2656
2654
  a.position$.next(h);
2657
2655
  }
2658
2656
  });
2659
2657
  };
2660
2658
  this.disposeWithMe(
2661
- this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET).pipe(
2662
- se((n) => !!n),
2663
- jt((n) => n.activeSheet$),
2664
- se((n) => !!n),
2665
- Be((n) => {
2659
+ this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(
2660
+ ie((n) => !!n),
2661
+ Nt((n) => n.activeSheet$),
2662
+ ie((n) => !!n),
2663
+ $e((n) => {
2666
2664
  const t = this._renderManagerService.getRenderById(n.getUnitId());
2667
2665
  return t ? { render: t, unitId: n.getUnitId(), subUnitId: n.getSheetId() } : null;
2668
2666
  }),
2669
- se((n) => !!n),
2670
- jt(
2671
- (n) => ir(n.render.scene.getViewport(kt.VIEW_MAIN).onScrollAfter$).pipe(Be(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2667
+ ie((n) => !!n),
2668
+ Nt(
2669
+ (n) => sr(n.render.scene.getViewport(kt.VIEW_MAIN).onScrollAfter$).pipe($e(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2672
2670
  )
2673
2671
  ).subscribe(({ unitId: n, subUnitId: t }) => {
2674
2672
  e(n, t);
2675
2673
  })
2676
2674
  ), this.disposeWithMe(this._commandService.onCommandExecuted((n) => {
2677
2675
  var t, r;
2678
- if (n.id === Er.id) {
2676
+ if (n.id === jr.id) {
2679
2677
  const s = n.params, { unitId: o } = s;
2680
2678
  Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((l) => {
2681
2679
  e(o, l);
2682
2680
  });
2683
- } else if (n.id === ri.id) {
2681
+ } else if (n.id === ci.id) {
2684
2682
  const { unitId: s, subUnitId: o } = n.params;
2685
2683
  e(s, o);
2686
2684
  }
@@ -2688,7 +2686,7 @@ let ze = class extends Z {
2688
2686
  }
2689
2687
  _getPosition(e, n) {
2690
2688
  var h;
2691
- const { startX: t, endX: r, startY: s, endY: o } = e, d = (h = this._renderManagerService.getRenderById(n)) == null ? void 0 : h.with(Ce);
2689
+ const { startX: t, endX: r, startY: s, endY: o } = e, d = (h = this._renderManagerService.getRenderById(n)) == null ? void 0 : h.with(Ie);
2692
2690
  if (d == null)
2693
2691
  return;
2694
2692
  const l = d.getCellWithCoordByOffset(t, s);
@@ -2718,7 +2716,7 @@ let ze = class extends Z {
2718
2716
  this._drawingManagerService.update$.subscribe((e) => {
2719
2717
  e.forEach((n) => {
2720
2718
  const t = this._drawingManagerService.getDrawingByParam(n);
2721
- if (!t || t.drawingType !== V.DRAWING_DOM && t.drawingType !== V.DRAWING_CHART)
2719
+ if (!t || t.drawingType !== k.DRAWING_DOM && t.drawingType !== k.DRAWING_CHART)
2722
2720
  return;
2723
2721
  const r = {
2724
2722
  ...t.transform
@@ -2740,8 +2738,8 @@ let ze = class extends Z {
2740
2738
  updateFloatDomProps(e, n, t, r) {
2741
2739
  const s = this._domLayerInfoMap.get(t), o = this._getSceneAndTransformerByDrawingSearch(e);
2742
2740
  if (s && o) {
2743
- const { scene: d } = o, l = rt({ unitId: e, subUnitId: n, drawingId: t }), g = d.getObject(l);
2744
- g && g instanceof Ut && g.setProps(r);
2741
+ const { scene: d } = o, l = nt({ unitId: e, subUnitId: n, drawingId: t }), g = d.getObject(l);
2742
+ g && g instanceof Pt && g.setProps(r);
2745
2743
  }
2746
2744
  }
2747
2745
  addFloatDomToPosition(e, n) {
@@ -2751,7 +2749,7 @@ let ze = class extends Z {
2751
2749
  });
2752
2750
  if (!t)
2753
2751
  throw new Error("cannot find current target!");
2754
- const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : sr(), a = this._getPosition(o, r);
2752
+ const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : or(), a = this._getPosition(o, r);
2755
2753
  if (a == null)
2756
2754
  return;
2757
2755
  this._ensureMap(r, s).set(c, e);
@@ -2759,7 +2757,7 @@ let ze = class extends Z {
2759
2757
  unitId: r,
2760
2758
  subUnitId: s,
2761
2759
  drawingId: c,
2762
- drawingType: e.type || V.DRAWING_DOM,
2760
+ drawingType: e.type || k.DRAWING_DOM,
2763
2761
  componentKey: d,
2764
2762
  sheetTransform: a,
2765
2763
  transform: {
@@ -2771,7 +2769,7 @@ let ze = class extends Z {
2771
2769
  data: l,
2772
2770
  allowTransform: g
2773
2771
  };
2774
- return this._commandService.executeCommand(Qe.id, {
2772
+ return this._commandService.executeCommand(Ze.id, {
2775
2773
  unitId: r,
2776
2774
  drawings: [u]
2777
2775
  }), this._add$.next({ unitId: r, subUnitId: s, id: c }), {
@@ -2794,7 +2792,7 @@ let ze = class extends Z {
2794
2792
  if (!l)
2795
2793
  return;
2796
2794
  const g = this._sheetDrawingService.getBatchRemoveOp([l]), { redo: c, objects: a } = g;
2797
- this._commandService.syncExecuteCommand(T.id, { unitId: r, subUnitId: s, op: c, objects: a, type: E.REMOVE });
2795
+ this._commandService.syncExecuteCommand(O.id, { unitId: r, subUnitId: s, op: c, objects: a, type: T.REMOVE });
2798
2796
  }
2799
2797
  }
2800
2798
  addHook(e) {
@@ -2806,92 +2804,96 @@ let ze = class extends Z {
2806
2804
  };
2807
2805
  }
2808
2806
  };
2809
- ze = Ws([
2810
- de(0, N(X)),
2811
- de(1, fe),
2812
- de(2, N(G)),
2813
- de(3, q),
2814
- de(4, N(Lr)),
2815
- de(5, z),
2816
- de(6, N(tr))
2817
- ], ze);
2818
- var En = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Bs = (i, e, n) => e in i ? En(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Ls = (i, e, n, t) => {
2819
- for (var r = t > 1 ? void 0 : t ? $s(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2807
+ Xe = Bs([
2808
+ ce(0, U(X)),
2809
+ ce(1, fe),
2810
+ ce(2, U(F)),
2811
+ ce(3, q),
2812
+ ce(4, U(Hr)),
2813
+ ce(5, z),
2814
+ ce(6, U(nr))
2815
+ ], Xe);
2816
+ var Pn = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, Fs = (i, e, n) => e in i ? Pn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Vs = (i, e, n, t) => {
2817
+ for (var r = t > 1 ? void 0 : t ? Gs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2820
2818
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2821
- return t && r && En(e, n, r), r;
2822
- }, lt = (i, e) => (n, t) => e(n, t, i), Pn = (i, e, n) => Bs(i, typeof e != "symbol" ? e + "" : e, n);
2823
- const Gs = "SHEET_IMAGE_UI_PLUGIN";
2824
- let Ke = class extends ar {
2825
- constructor(i = li, e, n, t) {
2819
+ return t && r && Pn(e, n, r), r;
2820
+ }, dt = (i, e) => (n, t) => e(n, t, i), Un = (i, e, n) => Fs(i, typeof e != "symbol" ? e + "" : e, n);
2821
+ const ks = "SHEET_IMAGE_UI_PLUGIN";
2822
+ let ze = class extends cr {
2823
+ constructor(i = Wt, e, n, t) {
2826
2824
  super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
2827
- const { menu: r, ...s } = this._config;
2828
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(di, s);
2825
+ const { menu: r, ...s } = dr(
2826
+ {},
2827
+ Wt,
2828
+ this._config
2829
+ );
2830
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(gi, s);
2829
2831
  }
2830
2832
  onStarting() {
2831
- cr(this._injector, [
2832
- [ze],
2833
+ lr(this._injector, [
2833
2834
  [Xe],
2834
- [Le],
2835
2835
  [Ye],
2836
+ [Be],
2836
2837
  [He],
2837
2838
  [ke],
2838
- [Ge],
2839
2839
  [Ve],
2840
- [Fe]
2841
- ]), nt(this._injector, [
2842
- [ze]
2840
+ [Le],
2841
+ [Fe],
2842
+ [Ge]
2843
+ ]), tt(this._injector, [
2844
+ [Xe]
2843
2845
  ]);
2844
2846
  }
2845
2847
  onReady() {
2846
- nt(this._injector, [
2847
- [ke]
2848
+ tt(this._injector, [
2849
+ [Ve]
2848
2850
  ]);
2849
2851
  }
2850
2852
  onRendered() {
2851
- this._registerRenderModules(), nt(this._injector, [
2853
+ this._registerRenderModules(), tt(this._injector, [
2854
+ [ke],
2852
2855
  [He],
2853
2856
  [Ye],
2854
- [Xe],
2855
- [Ge],
2856
- [Ve],
2857
- [Fe]
2857
+ [Le],
2858
+ [Fe],
2859
+ [Ge]
2858
2860
  ]);
2859
2861
  }
2860
2862
  onSteady() {
2861
- this._injector.get(Le);
2863
+ this._injector.get(Be);
2862
2864
  }
2863
2865
  _registerRenderModules() {
2864
2866
  [
2865
- [Se],
2866
- [wt],
2867
- [ft]
2867
+ [ve],
2868
+ [pt],
2869
+ [mt]
2868
2870
  ].forEach((i) => {
2869
- this.disposeWithMe(this._renderManagerService.registerRenderModule(L.UNIVER_SHEET, i));
2871
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(G.UNIVER_SHEET, i));
2870
2872
  });
2871
2873
  }
2872
2874
  };
2873
- Pn(Ke, "type", L.UNIVER_SHEET);
2874
- Pn(Ke, "pluginName", Gs);
2875
- Ke = Ls([
2876
- or(lr, pr, Ir),
2877
- lt(1, N(Ie)),
2878
- lt(2, X),
2879
- lt(3, dr)
2880
- ], Ke);
2875
+ Un(ze, "type", G.UNIVER_SHEET);
2876
+ Un(ze, "pluginName", ks);
2877
+ ze = Vs([
2878
+ ar(mr, gr, Sr, Dr),
2879
+ dt(1, U(Se)),
2880
+ dt(2, X),
2881
+ dt(3, ur)
2882
+ ], ze);
2881
2883
  export {
2882
2884
  W as ClearSheetDrawingTransformerOperation,
2883
- bn as DeleteDrawingsCommand,
2884
- _n as EditSheetDrawingOperation,
2885
- vn as GroupSheetDrawingCommand,
2886
- St as InsertFloatImageCommand,
2887
- Qe as InsertSheetDrawingCommand,
2888
- Re as MoveDrawingsCommand,
2889
- Ze as RemoveSheetDrawingCommand,
2890
- On as SHEETS_IMAGE_MENU_ID,
2891
- Sn as SetDrawingArrangeCommand,
2892
- et as SetSheetDrawingCommand,
2893
- ze as SheetCanvasFloatDomManagerService,
2894
- wn as SidebarSheetDrawingOperation,
2895
- In as UngroupSheetDrawingCommand,
2896
- Ke as UniverSheetsDrawingUIPlugin
2885
+ yn as DeleteDrawingsCommand,
2886
+ vn as EditSheetDrawingOperation,
2887
+ Sn as GroupSheetDrawingCommand,
2888
+ vt as InsertFloatImageCommand,
2889
+ Ze as InsertSheetDrawingCommand,
2890
+ Ce as MoveDrawingsCommand,
2891
+ qe as RemoveSheetDrawingCommand,
2892
+ Tn as SHEETS_IMAGE_MENU_ID,
2893
+ In as SetDrawingArrangeCommand,
2894
+ Qe as SetSheetDrawingCommand,
2895
+ Xe as SheetCanvasFloatDomManagerService,
2896
+ _n as SidebarSheetDrawingOperation,
2897
+ Cn as UngroupSheetDrawingCommand,
2898
+ ze as UniverSheetsDrawingUIPlugin
2897
2899
  };