@univerjs/sheets-drawing-ui 0.12.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,33 +1,33 @@
1
- var Qr = Object.defineProperty;
2
- var ei = (i, t, e) => t in i ? Qr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var re = (i, t, e) => ei(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { precisionTo as bt, IRenderManagerService as Q, transformObjectOutOfGroup as ti, getGroupState as ni, getCurrentTypeOfRenderer as Dn, CURSOR_TYPE as ri, RENDER_CLASS_TYPE as $e, Rect as ke, ObjectType as An, DRAWING_OBJECT_LAYER_INDEX as qt, SHEET_VIEWPORT_KEY as cr } from "@univerjs/engine-render";
5
- import { convertPositionSheetOverGridToAbsolute as ii, SheetSkeletonManagerService as X, ISheetSelectionRenderService as Ze, attachRangeWithCoord as dr, SheetCanvasPopManagerService as si, HoverManagerService as oi, IEditorBridgeService as ai, IAutoFillService as ci, EditingRenderController as di, SetCellEditVisibleOperation as Nn, PREDEFINED_HOOK_NAME as Le, COPY_TYPE as Re, discreteRangeToRange as $n, virtualizeDiscreteRanges as li, ISheetClipboardService as ui, SetZoomRatioOperation as kn, SetScrollOperation as hi, SheetPrintInterceptorService as gi, useHighlightRange as fi, getCurrentRangeDisable$ as mi } from "@univerjs/sheets-ui";
6
- import { CommandType as q, ICommandService as Y, IUndoRedoService as Je, sequenceExecute as lr, DrawingTypeEnum as x, ArrangeTypeEnum as Mt, Inject as A, IContextService as ur, LocaleService as Te, Injector as qe, Disposable as ee, createDocumentModelWithStyle as un, ObjectRelativeFromV as xn, ObjectRelativeFromH as Wn, WrapTextType as Bn, PositionedObjectLayoutType as jn, BooleanNumber as Fn, BuildTextUtils as hn, ImageSourceType as Ce, generateRandomId as Ve, FOCUSING_COMMON_DRAWINGS as Ge, IUniverInstanceService as de, UniverInstanceType as $, Direction as ve, createIdentifier as pi, IImageIoService as hr, RxDisposable as wi, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ot, DOCS_ZEN_EDITOR_UNIT_ID_KEY as He, InterceptorEffectEnum as _i, ObjectMatrix as Si, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as vi, IPermissionService as Ii, UserManagerService as Ci, LifecycleService as Ri, LifecycleStages as Di, DisposableCollection as yt, fromEventSubject as bi, Tools as Ye, PRINT_CHART_COMPONENT_KEY as Mi, Rectangle as yi, FOCUSING_FX_BAR_EDITOR as Ei, EDITOR_ACTIVATED as Ti, FOCUSING_PANEL_EDITOR as Oi, DependentOn as Ui, IConfigService as Pi, Plugin as Ai, merge as Ni, registerDependencies as $i, touchDependencies as Qt } from "@univerjs/core";
7
- import { ISheetDrawingService as se, DrawingApplyType as U, SetDrawingApplyMutation as P, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as ki } from "@univerjs/sheets-drawing";
8
- import { SheetInterceptorService as Vt, SheetsSelectionsService as ut, SetRangeValuesCommand as Ln, getSheetCommandTarget as ae, INTERCEPTOR_POINT as xi, InterceptCellContentPriority as Wi, WorkbookViewPermission as Vn, WorksheetViewPermission as Hn, WorkbookEditablePermission as gn, WorksheetEditPermission as fn, SetFrozenMutation as Bi, SetSelectionsOperation as ji, SetWorksheetRowAutoHeightMutation as Fi, COMMAND_LISTENER_SKELETON_CHANGE as Li, InsertRowCommand as gr, InsertColCommand as fr, RemoveRowCommand as mr, RemoveColCommand as pr, DeleteRangeMoveLeftCommand as wr, DeleteRangeMoveUpCommand as _r, InsertRangeMoveDownCommand as Sr, InsertRangeMoveRightCommand as vr, DeltaRowHeightCommand as mn, SetRowHeightCommand as pn, DeltaColumnWidthCommand as Ir, SetColWidthCommand as Cr, SetRowHiddenCommand as Rr, SetSpecificRowsVisibleCommand as Dr, SetSpecificColsVisibleCommand as br, SetColHiddenCommand as Mr, MoveColsCommand as yr, MoveRowsCommand as Er, MoveRangeCommand as Tr, SetRowVisibleMutation as Vi, SetRowHiddenMutation as Hi, SetColVisibleMutation as Yi, SetColHiddenMutation as Gi, SetWorksheetRowHeightMutation as Xi, SetWorksheetColWidthMutation as zi, SetWorksheetActiveOperation as Ki, RangeProtectionPermissionEditPoint as Zi } from "@univerjs/sheets";
9
- import { MessageType as Se, render as Ji, unmount as qi, FormLayout as en, CheckboxGroup as Qi, Checkbox as Yn, Select as es, Button as Gn, clsx as ts, RadioGroup as ns, Radio as tn } from "@univerjs/design";
10
- import { docDrawingPositionToTransform as Xn, ReplaceSnapshotCommand as rs, InnerPasteCommand as is } from "@univerjs/docs-ui";
11
- import { IImageIoService as ss, IDrawingManagerService as oe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as zn, DRAWING_IMAGE_COUNT_LIMIT as Kn, ImageUploadStatusType as xe, DRAWING_IMAGE_ALLOW_SIZE as Zn, getImageSize as nn, SetDrawingSelectedOperation as Ht, DRAWING_IMAGE_WIDTH_LIMIT as Jn, DRAWING_IMAGE_HEIGHT_LIMIT as qn, ImageSourceType as os, getDrawingShapeKeyByDrawingSearch as De, UniverDrawingPlugin as as } from "@univerjs/drawing";
12
- import { ILocalFileService as cs, IMessageService as Or, IDialogService as bn, ISidebarService as ds, IClipboardInterfaceService as ls, CanvasFloatDomService as us, PrintFloatDomSingle as hs, ComponentManager as Ur, connectInjector as gs, useDependency as Ie, getMenuHiddenObservable as Yt, MenuItemType as Gt, ContextMenuPosition as rn, ContextMenuGroup as sn, RibbonInsertGroup as fs, KeyCode as Ke, IMenuManagerService as ms, IShortcutService as ps } from "@univerjs/ui";
13
- import { DocDrawingController as ws, UniverDocsDrawingPlugin as _s } from "@univerjs/docs-drawing";
14
- import { ImageCropperObject as Ss, COMPONENT_IMAGE_POPUP_MENU as vs, OpenImageCropOperation as Is, ImageResetSizeOperation as Cs, DrawingRenderService as Pr, DrawingCommonPanel as Rs, UniverDrawingUIPlugin as Ds } from "@univerjs/drawing-ui";
15
- import { takeUntil as Qn, throttleTime as bs, combineLatest as at, switchMap as me, EMPTY as we, tap as er, map as pe, distinctUntilChanged as tr, Subject as on, filter as Ms, take as ys, BehaviorSubject as je, of as wn } from "rxjs";
1
+ var Kr = Object.defineProperty;
2
+ var Jr = (i, t, e) => t in i ? Kr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var re = (i, t, e) => Jr(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { precisionTo as bt, IRenderManagerService as Q, transformObjectOutOfGroup as Zr, getGroupState as qr, getCurrentTypeOfRenderer as Dn, CURSOR_TYPE as Qr, RENDER_CLASS_TYPE as ke, Rect as $e, ObjectType as An, DRAWING_OBJECT_LAYER_INDEX as qt, SHEET_VIEWPORT_KEY as cr } from "@univerjs/engine-render";
5
+ import { convertPositionSheetOverGridToAbsolute as ei, SheetSkeletonManagerService as X, ISheetSelectionRenderService as Je, attachRangeWithCoord as dr, SheetCanvasPopManagerService as ti, HoverManagerService as ni, IEditorBridgeService as ri, IAutoFillService as ii, EditingRenderController as si, SetCellEditVisibleOperation as Nn, PREDEFINED_HOOK_NAME_PASTE as Le, COPY_TYPE as Re, discreteRangeToRange as kn, virtualizeDiscreteRanges as oi, ISheetClipboardService as ai, SetZoomRatioOperation as $n, SetScrollOperation as ci, SheetPrintInterceptorService as di, useHighlightRange as li, getCurrentRangeDisable$ as ui } from "@univerjs/sheets-ui";
6
+ import { CommandType as q, ICommandService as Y, IUndoRedoService as Ze, sequenceExecute as lr, DrawingTypeEnum as x, ArrangeTypeEnum as Mt, Inject as A, IContextService as ur, LocaleService as Te, Injector as qe, Disposable as ee, createDocumentModelWithStyle as un, ObjectRelativeFromV as xn, ObjectRelativeFromH as Wn, WrapTextType as Bn, PositionedObjectLayoutType as jn, BooleanNumber as Fn, BuildTextUtils as hn, ImageSourceType as Ce, generateRandomId as He, FOCUSING_COMMON_DRAWINGS as Ge, IUniverInstanceService as de, UniverInstanceType as k, Direction as ve, createIdentifier as hi, IImageIoService as hr, RxDisposable as gi, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ot, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Ve, InterceptorEffectEnum as mi, ObjectMatrix as fi, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as pi, IPermissionService as wi, UserManagerService as _i, LifecycleService as Si, LifecycleStages as vi, DisposableCollection as yt, fromEventSubject as Ii, Tools as Ye, PRINT_CHART_COMPONENT_KEY as Ci, Rectangle as Ri, FOCUSING_FX_BAR_EDITOR as Di, EDITOR_ACTIVATED as bi, FOCUSING_PANEL_EDITOR as Mi, DependentOn as yi, IConfigService as Ei, Plugin as Ti, merge as Oi, registerDependencies as Ui, touchDependencies as Qt } from "@univerjs/core";
7
+ import { ISheetDrawingService as se, DrawingApplyType as U, SetDrawingApplyMutation as P, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as Pi } from "@univerjs/sheets-drawing";
8
+ import { SheetInterceptorService as Ht, SheetsSelectionsService as ut, SetRangeValuesCommand as Ln, getSheetCommandTarget as ae, INTERCEPTOR_POINT as Ai, InterceptCellContentPriority as Ni, WorkbookViewPermission as Hn, WorksheetViewPermission as Vn, WorkbookEditablePermission as gn, WorksheetEditPermission as mn, SetFrozenMutation as ki, SetSelectionsOperation as $i, SetWorksheetRowAutoHeightMutation as xi, COMMAND_LISTENER_SKELETON_CHANGE as Wi, InsertRowCommand as gr, InsertColCommand as mr, RemoveRowCommand as fr, RemoveColCommand as pr, DeleteRangeMoveLeftCommand as wr, DeleteRangeMoveUpCommand as _r, InsertRangeMoveDownCommand as Sr, InsertRangeMoveRightCommand as vr, DeltaRowHeightCommand as fn, SetRowHeightCommand as pn, DeltaColumnWidthCommand as Ir, SetColWidthCommand as Cr, SetRowHiddenCommand as Rr, SetSpecificRowsVisibleCommand as Dr, SetSpecificColsVisibleCommand as br, SetColHiddenCommand as Mr, MoveColsCommand as yr, MoveRowsCommand as Er, MoveRangeCommand as Tr, SetRowVisibleMutation as Bi, SetRowHiddenMutation as ji, SetColVisibleMutation as Fi, SetColHiddenMutation as Li, SetWorksheetRowHeightMutation as Hi, SetWorksheetColWidthMutation as Vi, SetWorksheetActiveOperation as Yi, RangeProtectionPermissionEditPoint as Gi } from "@univerjs/sheets";
9
+ import { MessageType as Se, render as Xi, unmount as zi, FormLayout as en, CheckboxGroup as Ki, Checkbox as Yn, Select as Ji, Button as Gn, clsx as Zi, RadioGroup as qi, Radio as tn } from "@univerjs/design";
10
+ import { docDrawingPositionToTransform as Xn, ReplaceSnapshotCommand as Qi, InnerPasteCommand as es } from "@univerjs/docs-ui";
11
+ import { IImageIoService as ts, IDrawingManagerService as oe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as zn, DRAWING_IMAGE_COUNT_LIMIT as Kn, ImageUploadStatusType as xe, DRAWING_IMAGE_ALLOW_SIZE as Jn, getImageSize as nn, SetDrawingSelectedOperation as Vt, DRAWING_IMAGE_WIDTH_LIMIT as Zn, DRAWING_IMAGE_HEIGHT_LIMIT as qn, ImageSourceType as ns, getDrawingShapeKeyByDrawingSearch as De, UniverDrawingPlugin as rs } from "@univerjs/drawing";
12
+ import { ILocalFileService as is, IMessageService as Or, IDialogService as bn, ISidebarService as ss, IClipboardInterfaceService as os, CanvasFloatDomService as as, PrintFloatDomSingle as cs, ComponentManager as Ur, connectInjector as ds, useDependency as Ie, getMenuHiddenObservable as Yt, MenuItemType as Gt, ContextMenuPosition as rn, ContextMenuGroup as sn, RibbonInsertGroup as ls, KeyCode as Ke, IMenuManagerService as us, IShortcutService as hs } from "@univerjs/ui";
13
+ import { DocDrawingController as gs, UniverDocsDrawingPlugin as ms } from "@univerjs/docs-drawing";
14
+ import { ImageCropperObject as fs, COMPONENT_IMAGE_POPUP_MENU as ps, OpenImageCropOperation as ws, ImageResetSizeOperation as _s, DrawingRenderService as Pr, DrawingCommonPanel as Ss, UniverDrawingUIPlugin as vs } from "@univerjs/drawing-ui";
15
+ import { takeUntil as Qn, throttleTime as Is, combineLatest as at, switchMap as fe, EMPTY as we, tap as er, map as pe, distinctUntilChanged as tr, Subject as on, filter as Cs, take as Rs, BehaviorSubject as je, of as wn } from "rxjs";
16
16
  import { jsx as L, jsxs as Xe } from "react/jsx-runtime";
17
- import { useMemo as Fe, useRef as Es, createElement as Ar, forwardRef as Ts, useState as Ee, useCallback as Et, useEffect as Nr } from "react";
18
- function Z(i, t, e) {
17
+ import { useMemo as Fe, useState as Ee, useCallback as Et, useEffect as Ar } from "react";
18
+ function J(i, t, e) {
19
19
  const { from: n, to: r, flipY: s = !1, flipX: o = !1, angle: a = 0, skewX: d = 0, skewY: u = 0 } = i, c = e.getCurrent();
20
20
  if (c == null)
21
21
  return;
22
- const l = ii(
22
+ const l = ei(
23
23
  c.unitId,
24
24
  c.sheetId,
25
25
  { from: n, to: r },
26
26
  e
27
27
  );
28
- let { left: g, top: h, width: f, height: m } = l;
28
+ let { left: g, top: h, width: m, height: f } = l;
29
29
  const p = e.getCurrentSkeleton(), w = p.rowHeaderWidth + p.columnTotalWidth, S = p.columnHeaderHeight + p.rowTotalHeight;
30
- return g + f > w && (g = w - f), h + m > S && (h = S - m), {
30
+ return g + m > w && (g = w - m), h + f > S && (h = S - f), {
31
31
  flipY: s,
32
32
  flipX: o,
33
33
  angle: a,
@@ -35,8 +35,8 @@ function Z(i, t, e) {
35
35
  skewY: u,
36
36
  left: g,
37
37
  top: h,
38
- width: f,
39
- height: m
38
+ width: m,
39
+ height: f
40
40
  };
41
41
  }
42
42
  function j(i, t) {
@@ -51,7 +51,7 @@ function j(i, t) {
51
51
  }, h = t.getCellWithCoordByOffset(e + r, n + s);
52
52
  if (h == null)
53
53
  return;
54
- const f = {
54
+ const m = {
55
55
  column: h.actualColumn,
56
56
  columnOffset: bt(e + r - h.startX, 1),
57
57
  row: h.actualRow,
@@ -64,10 +64,10 @@ function j(i, t) {
64
64
  skewX: u,
65
65
  skewY: c,
66
66
  from: g,
67
- to: f
67
+ to: m
68
68
  };
69
69
  }
70
- const V = {
70
+ const H = {
71
71
  id: "sheet.operation.clear-drawing-transformer",
72
72
  type: q.MUTATION,
73
73
  handler: (i, t) => {
@@ -82,31 +82,31 @@ const V = {
82
82
  type: q.COMMAND,
83
83
  handler: (i, t) => {
84
84
  var S, I, D;
85
- const e = i.get(Y), n = i.get(Je), r = i.get(Vt), s = i.get(se);
85
+ const e = i.get(Y), n = i.get(Ze), r = i.get(Ht), s = i.get(se);
86
86
  if (!t) return !1;
87
87
  const { drawings: o } = t, a = [];
88
88
  o.forEach((v) => {
89
89
  const { unitId: C } = v;
90
90
  a.push(C);
91
91
  });
92
- const d = s.getBatchRemoveOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, f = r.onCommandExecute({ id: ht.id, params: t }), m = { id: P.id, params: { unitId: u, subUnitId: c, op: g, objects: h, type: U.REMOVE } }, p = { id: P.id, params: { unitId: u, subUnitId: c, op: l, objects: h, type: U.INSERT } };
93
- return lr([...(S = f.preRedos) != null ? S : [], m, ...f.redos], e) ? (n.pushUndoRedo({
92
+ const d = s.getBatchRemoveOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, m = r.onCommandExecute({ id: ht.id, params: t }), f = { id: P.id, params: { unitId: u, subUnitId: c, op: g, objects: h, type: U.REMOVE } }, p = { id: P.id, params: { unitId: u, subUnitId: c, op: l, objects: h, type: U.INSERT } };
93
+ return lr([...(S = m.preRedos) != null ? S : [], f, ...m.redos], e) ? (n.pushUndoRedo({
94
94
  unitID: u,
95
95
  undoMutations: [
96
- ...(I = f.preUndos) != null ? I : [],
96
+ ...(I = m.preUndos) != null ? I : [],
97
97
  p,
98
- ...f.undos,
99
- { id: V.id, params: a }
98
+ ...m.undos,
99
+ { id: H.id, params: a }
100
100
  ],
101
101
  redoMutations: [
102
- ...(D = f.preRedos) != null ? D : [],
103
- m,
104
- ...f.redos,
105
- { id: V.id, params: a }
102
+ ...(D = m.preRedos) != null ? D : [],
103
+ f,
104
+ ...m.redos,
105
+ { id: H.id, params: a }
106
106
  ]
107
107
  }), !0) : !1;
108
108
  }
109
- }, $r = {
109
+ }, Nr = {
110
110
  id: "sheet.command.delete-drawing",
111
111
  type: q.COMMAND,
112
112
  handler: (i) => {
@@ -128,15 +128,15 @@ const V = {
128
128
  });
129
129
  }
130
130
  };
131
- function Os(i) {
131
+ function Ds(i) {
132
132
  const t = [];
133
133
  return i.forEach((e) => {
134
- const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a } = n, d = ni(0, 0, r.map((l) => l.transform || {})), u = r.map((l) => {
135
- const g = l.transform || { left: 0, top: 0 }, { unitId: h, subUnitId: f, drawingId: m } = l;
134
+ const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a } = n, d = qr(0, 0, r.map((l) => l.transform || {})), u = r.map((l) => {
135
+ const g = l.transform || { left: 0, top: 0 }, { unitId: h, subUnitId: m, drawingId: f } = l;
136
136
  return {
137
137
  unitId: h,
138
- subUnitId: f,
139
- drawingId: m,
138
+ subUnitId: m,
139
+ drawingId: f,
140
140
  transform: {
141
141
  ...g,
142
142
  left: g.left - d.left,
@@ -157,18 +157,18 @@ function Os(i) {
157
157
  });
158
158
  }), t;
159
159
  }
160
- function Us(i) {
160
+ function bs(i) {
161
161
  const t = [];
162
162
  return i.forEach((e) => {
163
163
  const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a, transform: d = { width: 0, height: 0 } } = n;
164
164
  if (d == null)
165
165
  return;
166
166
  const u = r.map((l) => {
167
- const { transform: g } = l, { unitId: h, subUnitId: f, drawingId: m } = l, p = ti(g || {}, d, d.width || 0, d.height || 0);
167
+ const { transform: g } = l, { unitId: h, subUnitId: m, drawingId: f } = l, p = Zr(g || {}, d, d.width || 0, d.height || 0);
168
168
  return {
169
169
  unitId: h,
170
- subUnitId: f,
171
- drawingId: m,
170
+ subUnitId: m,
171
+ drawingId: f,
172
172
  transform: p,
173
173
  groupId: void 0
174
174
  };
@@ -192,24 +192,24 @@ const kr = {
192
192
  id: "sheet.command.group-sheet-image",
193
193
  type: q.COMMAND,
194
194
  handler: (i, t) => {
195
- const e = i.get(Y), n = i.get(Je), r = i.get(se);
195
+ const e = i.get(Y), n = i.get(Ze), r = i.get(se);
196
196
  if (!t) return !1;
197
197
  const s = [];
198
- t.forEach(({ parent: h, children: f }) => {
199
- s.push(h.unitId), f.forEach((m) => {
200
- s.push(m.unitId);
198
+ t.forEach(({ parent: h, children: m }) => {
199
+ s.push(h.unitId), m.forEach((f) => {
200
+ s.push(f.unitId);
201
201
  });
202
202
  });
203
203
  const o = r.getGroupDrawingOp(t), { unitId: a, subUnitId: d, undo: u, redo: c, objects: l } = o;
204
204
  return e.syncExecuteCommand(P.id, { op: c, unitId: a, subUnitId: d, objects: l, type: U.GROUP }) ? (n.pushUndoRedo({
205
205
  unitID: a,
206
206
  undoMutations: [
207
- { id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: Us(l), type: U.UNGROUP } },
208
- { id: V.id, params: s }
207
+ { id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: bs(l), type: U.UNGROUP } },
208
+ { id: H.id, params: s }
209
209
  ],
210
210
  redoMutations: [
211
211
  { id: P.id, params: { op: c, unitId: a, subUnitId: d, objects: l, type: U.GROUP } },
212
- { id: V.id, params: s }
212
+ { id: H.id, params: s }
213
213
  ]
214
214
  }), !0) : !1;
215
215
  }
@@ -218,30 +218,30 @@ const kr = {
218
218
  type: q.COMMAND,
219
219
  handler: (i, t) => {
220
220
  var S, I, D;
221
- const e = i.get(Y), n = i.get(Je), r = i.get(se), s = i.get(Vt);
221
+ const e = i.get(Y), n = i.get(Ze), r = i.get(se), s = i.get(Ht);
222
222
  if (!t) return !1;
223
- const o = t.drawings, a = o.map((v) => v.unitId), d = r.getBatchAddOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, f = s.onCommandExecute({ id: Xt.id, params: t }), m = { id: P.id, params: { op: g, unitId: u, subUnitId: c, objects: h, type: U.INSERT } }, p = { id: P.id, params: { op: l, unitId: u, subUnitId: c, objects: h, type: U.REMOVE } };
224
- return lr([...(S = f.preRedos) != null ? S : [], m, ...f.redos], e) ? (n.pushUndoRedo({
223
+ const o = t.drawings, a = o.map((v) => v.unitId), d = r.getBatchAddOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, m = s.onCommandExecute({ id: Xt.id, params: t }), f = { id: P.id, params: { op: g, unitId: u, subUnitId: c, objects: h, type: U.INSERT } }, p = { id: P.id, params: { op: l, unitId: u, subUnitId: c, objects: h, type: U.REMOVE } };
224
+ return lr([...(S = m.preRedos) != null ? S : [], f, ...m.redos], e) ? (n.pushUndoRedo({
225
225
  unitID: u,
226
226
  undoMutations: [
227
- ...(I = f.preUndos) != null ? I : [],
227
+ ...(I = m.preUndos) != null ? I : [],
228
228
  p,
229
- ...f.undos,
230
- { id: V.id, params: a }
229
+ ...m.undos,
230
+ { id: H.id, params: a }
231
231
  ],
232
232
  redoMutations: [
233
- ...(D = f.preRedos) != null ? D : [],
234
- m,
235
- ...f.redos,
236
- { id: V.id, params: a }
233
+ ...(D = m.preRedos) != null ? D : [],
234
+ f,
235
+ ...m.redos,
236
+ { id: H.id, params: a }
237
237
  ]
238
238
  }), !0) : !1;
239
239
  }
240
- }, xr = {
240
+ }, $r = {
241
241
  id: "sheet.command.set-drawing-arrange",
242
242
  type: q.COMMAND,
243
243
  handler: (i, t) => {
244
- const e = i.get(Y), n = i.get(Je);
244
+ const e = i.get(Y), n = i.get(Ze);
245
245
  if (!t) return !1;
246
246
  const r = i.get(se), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: d } = t, u = { unitId: s, subUnitId: o, drawingIds: a };
247
247
  let c;
@@ -262,65 +262,65 @@ const kr = {
262
262
  id: "sheet.command.set-sheet-image",
263
263
  type: q.COMMAND,
264
264
  handler: (i, t) => {
265
- const e = i.get(Y), n = i.get(Je), r = i.get(se);
265
+ const e = i.get(Y), n = i.get(Ze), r = i.get(se);
266
266
  if (!t) return !1;
267
267
  const { drawings: s } = t, o = r.getBatchUpdateOp(s), { unitId: a, subUnitId: d, undo: u, redo: c, objects: l } = o;
268
268
  return e.syncExecuteCommand(P.id, { unitId: a, subUnitId: d, op: c, objects: l, type: U.UPDATE }) ? (n.pushUndoRedo({
269
269
  unitID: a,
270
270
  undoMutations: [
271
271
  { id: P.id, params: { unitId: a, subUnitId: d, op: u, objects: l, type: U.UPDATE } },
272
- { id: V.id, params: [a] }
272
+ { id: H.id, params: [a] }
273
273
  ],
274
274
  redoMutations: [
275
275
  { id: P.id, params: { unitId: a, subUnitId: d, op: c, objects: l, type: U.UPDATE } },
276
- { id: V.id, params: [a] }
276
+ { id: H.id, params: [a] }
277
277
  ]
278
278
  }), !0) : !1;
279
279
  }
280
- }, Wr = {
280
+ }, xr = {
281
281
  id: "sheet.command.ungroup-sheet-image",
282
282
  type: q.COMMAND,
283
283
  handler: (i, t) => {
284
- const e = i.get(Y), n = i.get(Je), r = i.get(se);
284
+ const e = i.get(Y), n = i.get(Ze), r = i.get(se);
285
285
  if (!t) return !1;
286
286
  const s = [];
287
- t.forEach(({ parent: h, children: f }) => {
288
- s.push(h.unitId), f.forEach((m) => {
289
- s.push(m.unitId);
287
+ t.forEach(({ parent: h, children: m }) => {
288
+ s.push(h.unitId), m.forEach((f) => {
289
+ s.push(f.unitId);
290
290
  });
291
291
  });
292
292
  const o = r.getUngroupDrawingOp(t), { unitId: a, subUnitId: d, undo: u, redo: c, objects: l } = o;
293
293
  return e.syncExecuteCommand(P.id, { op: c, unitId: a, subUnitId: d, objects: l, type: U.UNGROUP }) ? (n.pushUndoRedo({
294
294
  unitID: a,
295
295
  undoMutations: [
296
- { id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: Os(l), type: U.GROUP } },
297
- { id: V.id, params: s }
296
+ { id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: Ds(l), type: U.GROUP } },
297
+ { id: H.id, params: s }
298
298
  ],
299
299
  redoMutations: [
300
300
  { id: P.id, params: { op: c, unitId: a, subUnitId: d, objects: l, type: U.UNGROUP } },
301
- { id: V.id, params: s }
301
+ { id: H.id, params: s }
302
302
  ]
303
303
  }), !0) : !1;
304
304
  }
305
305
  };
306
- var Ps = Object.getOwnPropertyDescriptor, As = (i, t, e, n) => {
307
- for (var r = n > 1 ? void 0 : n ? Ps(t, e) : t, s = i.length - 1, o; s >= 0; s--)
306
+ var Ms = Object.getOwnPropertyDescriptor, ys = (i, t, e, n) => {
307
+ for (var r = n > 1 ? void 0 : n ? Ms(t, e) : t, s = i.length - 1, o; s >= 0; s--)
308
308
  (o = i[s]) && (r = o(r) || r);
309
309
  return r;
310
310
  }, ie = (i, t) => (e, n) => t(e, n, i);
311
- function Ns(i, t, e) {
311
+ function Es(i, t, e) {
312
312
  const n = e * Math.PI / 180, r = Math.abs(i * Math.cos(n)) + Math.abs(t * Math.sin(n)), s = Math.abs(i * Math.sin(n)) + Math.abs(t * Math.cos(n));
313
313
  return { rotatedWidth: r, rotatedHeight: s };
314
314
  }
315
315
  function _n(i, t, e, n, r) {
316
316
  var S;
317
- const { rotatedHeight: s, rotatedWidth: o } = Ns(e, n, r), d = i.get(Q).getRenderById(t.unitId);
317
+ const { rotatedHeight: s, rotatedWidth: o } = Es(e, n, r), d = i.get(Q).getRenderById(t.unitId);
318
318
  if (!d)
319
319
  return !1;
320
320
  const c = (S = d.with(X).getSkeletonParam(t.subUnitId)) == null ? void 0 : S.skeleton;
321
321
  if (c == null)
322
322
  return !1;
323
- const l = c.getCellByIndex(t.row, t.col), g = l.mergeInfo.endX - l.mergeInfo.startX - 2, h = l.mergeInfo.endY - l.mergeInfo.startY - 2, f = o / s, p = Math.ceil(Math.min(g, h * f)) / o, w = !p || Number.isNaN(p) ? 1e-3 : p;
323
+ const l = c.getCellByIndex(t.row, t.col), g = l.mergeInfo.endX - l.mergeInfo.startX - 2, h = l.mergeInfo.endY - l.mergeInfo.startY - 2, m = o / s, p = Math.ceil(Math.min(g, h * m)) / o, w = !p || Number.isNaN(p) ? 1e-3 : p;
324
324
  return {
325
325
  width: e * w,
326
326
  height: n * w
@@ -360,7 +360,7 @@ let dt = class extends ee {
360
360
  const I = S.message;
361
361
  I === xe.ERROR_EXCEED_SIZE ? this._messageService.show({
362
362
  type: Se.Error,
363
- content: this._localeService.t("update-status.exceedMaxSize", String(Zn / (1024 * 1024)))
363
+ content: this._localeService.t("update-status.exceedMaxSize", String(Jn / (1024 * 1024)))
364
364
  }) : I === xe.ERROR_IMAGE_TYPE ? this._messageService.show({
365
365
  type: Se.Error,
366
366
  content: this._localeService.t("update-status.invalidImageType")
@@ -371,14 +371,14 @@ let dt = class extends ee {
371
371
  }
372
372
  if (e == null)
373
373
  return;
374
- const n = this._getUnitInfo(), { unitId: r, subUnitId: s } = n, { imageId: o, imageSourceType: a, source: d, base64Cache: u } = e, { width: c, height: l, image: g } = await nn(u || ""), { width: h, height: f } = this._context.scene;
374
+ const n = this._getUnitInfo(), { unitId: r, subUnitId: s } = n, { imageId: o, imageSourceType: a, source: d, base64Cache: u } = e, { width: c, height: l, image: g } = await nn(u || ""), { width: h, height: m } = this._context.scene;
375
375
  this._imageIoService.addImageSourceCache(d, a, g);
376
- let m = 1;
377
- if (c > Jn || l > qn) {
378
- const S = Jn / c, I = qn / l;
379
- m = Math.max(S, I);
376
+ let f = 1;
377
+ if (c > Zn || l > qn) {
378
+ const S = Zn / c, I = qn / l;
379
+ f = Math.max(S, I);
380
380
  }
381
- const p = this._getImagePosition(c * m, l * m, h, f);
381
+ const p = this._getImagePosition(c * f, l * f, h, m);
382
382
  if (p == null)
383
383
  return;
384
384
  const w = {
@@ -388,7 +388,7 @@ let dt = class extends ee {
388
388
  drawingType: x.DRAWING_IMAGE,
389
389
  imageSourceType: a,
390
390
  source: d,
391
- transform: Z(p, this._selectionRenderService, this._skeletonManagerService),
391
+ transform: J(p, this._selectionRenderService, this._skeletonManagerService),
392
392
  sheetTransform: p
393
393
  };
394
394
  return this._commandService.executeCommand(Xt.id, {
@@ -406,7 +406,7 @@ let dt = class extends ee {
406
406
  const C = v.message;
407
407
  C === xe.ERROR_EXCEED_SIZE ? this._messageService.show({
408
408
  type: Se.Error,
409
- content: this._localeService.t("update-status.exceedMaxSize", String(Zn / (1024 * 1024)))
409
+ content: this._localeService.t("update-status.exceedMaxSize", String(Jn / (1024 * 1024)))
410
410
  }) : C === xe.ERROR_IMAGE_TYPE ? this._messageService.show({
411
411
  type: Se.Error,
412
412
  content: this._localeService.t("update-status.invalidImageType")
@@ -424,7 +424,7 @@ let dt = class extends ee {
424
424
  return !1;
425
425
  let g = l.primary.actualRow, h = l.primary.actualColumn;
426
426
  l.primary.isMerged && (g = l.primary.startRow, h = l.primary.startColumn);
427
- const f = un("", {}), m = _n(
427
+ const m = un("", {}), f = _n(
428
428
  this._injector,
429
429
  {
430
430
  unitId: this._context.unitId,
@@ -436,12 +436,12 @@ let dt = class extends ee {
436
436
  u,
437
437
  0
438
438
  );
439
- if (!m)
439
+ if (!f)
440
440
  return !1;
441
441
  const p = {
442
442
  size: {
443
- width: m.width,
444
- height: m.height
443
+ width: f.width,
444
+ height: f.height
445
445
  },
446
446
  positionH: {
447
447
  relativeFrom: Wn.PAGE,
@@ -453,8 +453,8 @@ let dt = class extends ee {
453
453
  },
454
454
  angle: 0
455
455
  }, w = {
456
- unitId: f.getUnitId(),
457
- subUnitId: f.getUnitId(),
456
+ unitId: m.getUnitId(),
457
+ subUnitId: m.getUnitId(),
458
458
  drawingId: r,
459
459
  drawingType: x.DRAWING_IMAGE,
460
460
  imageSourceType: s,
@@ -472,7 +472,7 @@ let dt = class extends ee {
472
472
  distR: 0,
473
473
  distT: 0
474
474
  }, S = hn.drawing.add({
475
- documentDataModel: f,
475
+ documentDataModel: m,
476
476
  drawings: [w],
477
477
  selection: {
478
478
  collapsed: !0,
@@ -480,11 +480,11 @@ let dt = class extends ee {
480
480
  endOffset: 0
481
481
  }
482
482
  });
483
- return S ? (f.apply(S), this._commandService.syncExecuteCommand(Ln.id, {
483
+ return S ? (m.apply(S), this._commandService.syncExecuteCommand(Ln.id, {
484
484
  value: {
485
485
  [(I = e == null ? void 0 : e.row) != null ? I : g]: {
486
486
  [(D = e == null ? void 0 : e.col) != null ? D : h]: {
487
- p: f.getSnapshot(),
487
+ p: m.getSnapshot(),
488
488
  t: 1
489
489
  }
490
490
  }
@@ -532,7 +532,7 @@ let dt = class extends ee {
532
532
  }, c = {
533
533
  unitId: a.getUnitId(),
534
534
  subUnitId: a.getUnitId(),
535
- drawingId: Ve(),
535
+ drawingId: He(),
536
536
  drawingType: x.DRAWING_IMAGE,
537
537
  imageSourceType: Ce.URL,
538
538
  source: t,
@@ -601,24 +601,24 @@ let dt = class extends ee {
601
601
  columnOffset: 0,
602
602
  row: u,
603
603
  rowOffset: 0
604
- }, f = this._selectionRenderService.getCellWithCoordByOffset(c + t, l + e);
605
- if (f == null)
604
+ }, m = this._selectionRenderService.getCellWithCoordByOffset(c + t, l + e);
605
+ if (m == null)
606
606
  return;
607
- const m = {
608
- column: f.actualColumn,
609
- columnOffset: c + t - f.startX,
610
- row: f.actualRow,
611
- rowOffset: l + e - f.startY
607
+ const f = {
608
+ column: m.actualColumn,
609
+ columnOffset: c + t - m.startX,
610
+ row: m.actualRow,
611
+ rowOffset: l + e - m.startY
612
612
  };
613
613
  return {
614
614
  from: h,
615
- to: m
615
+ to: f
616
616
  };
617
617
  }
618
618
  _updateOrderListener() {
619
619
  this.disposeWithMe(this._drawingManagerService.featurePluginOrderUpdate$.subscribe((t) => {
620
620
  const { unitId: e, subUnitId: n, drawingIds: r, arrangeType: s } = t;
621
- this._commandService.executeCommand(xr.id, {
621
+ this._commandService.executeCommand($r.id, {
622
622
  unitId: e,
623
623
  subUnitId: n,
624
624
  drawingIds: r,
@@ -641,7 +641,7 @@ let dt = class extends ee {
641
641
  return;
642
642
  const l = {
643
643
  ...n,
644
- transform: { ...u.transform, ...d, ...Z(c, this._selectionRenderService, this._skeletonManagerService) },
644
+ transform: { ...u.transform, ...d, ...J(c, this._selectionRenderService, this._skeletonManagerService) },
645
645
  sheetTransform: { ...c }
646
646
  };
647
647
  e.push(l);
@@ -655,9 +655,9 @@ let dt = class extends ee {
655
655
  this.disposeWithMe(this._drawingManagerService.featurePluginGroupUpdate$.subscribe((t) => {
656
656
  this._commandService.executeCommand(kr.id, t);
657
657
  const { unitId: e, subUnitId: n, drawingId: r } = t[0].parent;
658
- this._commandService.syncExecuteCommand(Ht.id, [{ unitId: e, subUnitId: n, drawingId: r }]);
658
+ this._commandService.syncExecuteCommand(Vt.id, [{ unitId: e, subUnitId: n, drawingId: r }]);
659
659
  })), this.disposeWithMe(this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((t) => {
660
- this._commandService.executeCommand(Wr.id, t);
660
+ this._commandService.executeCommand(xr.id, t);
661
661
  }));
662
662
  }
663
663
  _focusDrawingListener() {
@@ -668,12 +668,12 @@ let dt = class extends ee {
668
668
  );
669
669
  }
670
670
  };
671
- dt = As([
671
+ dt = ys([
672
672
  ie(1, A(X)),
673
673
  ie(2, Y),
674
- ie(3, Ze),
675
- ie(4, ss),
676
- ie(5, cs),
674
+ ie(3, Je),
675
+ ie(4, ts),
676
+ ie(5, is),
677
677
  ie(6, se),
678
678
  ie(7, oe),
679
679
  ie(8, ur),
@@ -688,7 +688,7 @@ const Kt = {
688
688
  handler: async (i, t) => {
689
689
  var o, a;
690
690
  const e = i.get(de), n = i.get(Q), r = (o = Dn(
691
- $.UNIVER_SHEET,
691
+ k.UNIVER_SHEET,
692
692
  e,
693
693
  n
694
694
  )) == null ? void 0 : o.with(dt);
@@ -708,7 +708,7 @@ const Kt = {
708
708
  var n, r;
709
709
  const t = i.get(de), e = i.get(Q);
710
710
  return (r = (n = Dn(
711
- $.UNIVER_SHEET,
711
+ k.UNIVER_SHEET,
712
712
  t,
713
713
  e
714
714
  )) == null ? void 0 : n.with(dt).insertCellImage()) != null ? r : !1;
@@ -717,15 +717,15 @@ const Kt = {
717
717
  id: "sheet.command.move-drawing",
718
718
  type: q.COMMAND,
719
719
  handler: (i, t) => {
720
- const e = i.get(Y), n = i.get(se), r = i.get(Ze), { direction: s } = t, o = n.getFocusDrawings();
720
+ const e = i.get(Y), n = i.get(se), r = i.get(Je), { direction: s } = t, o = n.getFocusDrawings();
721
721
  if (o.length === 0)
722
722
  return !1;
723
723
  const a = o[0].unitId, d = o.map((c) => {
724
724
  const { transform: l } = c;
725
725
  if (l == null)
726
726
  return null;
727
- const g = { ...l }, { left: h = 0, top: f = 0 } = l;
728
- return s === ve.UP ? g.top = f - 1 : s === ve.DOWN ? g.top = f + 1 : s === ve.LEFT ? g.left = h - 1 : s === ve.RIGHT && (g.left = h + 1), {
727
+ const g = { ...l }, { left: h = 0, top: m = 0 } = l;
728
+ return s === ve.UP ? g.top = m - 1 : s === ve.DOWN ? g.top = m + 1 : s === ve.LEFT ? g.left = h - 1 : s === ve.RIGHT && (g.left = h + 1), {
729
729
  ...c,
730
730
  transform: g,
731
731
  sheetTransform: j(g, r)
@@ -734,15 +734,15 @@ const Kt = {
734
734
  return e.syncExecuteCommand(zt.id, {
735
735
  unitId: a,
736
736
  drawings: d
737
- }) ? (e.syncExecuteCommand(V.id, [a]), !0) : !1;
737
+ }) ? (e.syncExecuteCommand(H.id, [a]), !0) : !1;
738
738
  }
739
739
  };
740
- var $s = Object.getOwnPropertyDescriptor, ks = (i, t, e, n) => {
741
- for (var r = n > 1 ? void 0 : n ? $s(t, e) : t, s = i.length - 1, o; s >= 0; s--)
740
+ var Ts = Object.getOwnPropertyDescriptor, Os = (i, t, e, n) => {
741
+ for (var r = n > 1 ? void 0 : n ? Ts(t, e) : t, s = i.length - 1, o; s >= 0; s--)
742
742
  (o = i[s]) && (r = o(r) || r);
743
743
  return r;
744
744
  }, an = (i, t) => (e, n) => t(e, n, i), ye = /* @__PURE__ */ ((i) => (i.CELL_ADDRESS = "cellAddress", i.COLUMN_VALUE = "columnValue", i))(ye || {});
745
- const yn = pi("sheets-drawing-ui.batch-save-images.service");
745
+ const yn = hi("sheets-drawing-ui.batch-save-images.service");
746
746
  function Sn(i) {
747
747
  let t = "", e = i;
748
748
  for (; e >= 0; )
@@ -752,7 +752,7 @@ function Sn(i) {
752
752
  function At(i, t) {
753
753
  return `${Sn(t)}${i + 1}`;
754
754
  }
755
- function xs(i) {
755
+ function Us(i) {
756
756
  const t = At(i.startRow, i.startColumn), e = At(i.endRow, i.endColumn);
757
757
  return t === e ? t : `${t}:${e}`;
758
758
  }
@@ -792,7 +792,7 @@ let vn = class extends ee {
792
792
  super(), this._univerInstanceService = i, this._selectionService = t, this._imageIoService = e;
793
793
  }
794
794
  getCellImagesInSelection() {
795
- const i = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET);
795
+ const i = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET);
796
796
  if (!i) return [];
797
797
  const t = i.getActiveSheet();
798
798
  if (!t) return [];
@@ -820,7 +820,7 @@ let vn = class extends ee {
820
820
  return r;
821
821
  }
822
822
  getCellImagesFromRanges(i, t, e) {
823
- const n = this._univerInstanceService.getUnit(i, $.UNIVER_SHEET);
823
+ const n = this._univerInstanceService.getUnit(i, k.UNIVER_SHEET);
824
824
  if (!n) return [];
825
825
  const r = n.getSheetBySheetId(t);
826
826
  if (!r) return [];
@@ -829,16 +829,16 @@ let vn = class extends ee {
829
829
  const { startRow: d, endRow: u, startColumn: c, endColumn: l } = a;
830
830
  for (let g = d; g <= u; g++)
831
831
  for (let h = c; h <= l; h++) {
832
- const f = s.getValue(g, h);
833
- if (nr(f)) {
834
- const m = rr(f);
835
- m && o.push({
832
+ const m = s.getValue(g, h);
833
+ if (nr(m)) {
834
+ const f = rr(m);
835
+ f && o.push({
836
836
  row: g,
837
837
  col: h,
838
838
  cellAddress: At(g, h),
839
- source: m.source,
840
- imageSourceType: m.imageSourceType,
841
- imageId: m.drawingId
839
+ source: f.source,
840
+ imageSourceType: f.imageSourceType,
841
+ imageId: f.drawingId
842
842
  });
843
843
  }
844
844
  }
@@ -846,8 +846,8 @@ let vn = class extends ee {
846
846
  return o;
847
847
  }
848
848
  getDataColumns() {
849
- var l, g, h, f;
850
- const i = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET);
849
+ var l, g, h, m;
850
+ const i = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET);
851
851
  if (!i) return [];
852
852
  const t = i.getActiveSheet();
853
853
  if (!t) return [];
@@ -856,32 +856,32 @@ let vn = class extends ee {
856
856
  const n = t.getCellMatrix(), r = n.getDataRange();
857
857
  let s = 1 / 0, o = -1 / 0;
858
858
  const a = /* @__PURE__ */ new Set();
859
- for (const m of e) {
860
- s = Math.min(s, m.range.startRow), o = Math.max(o, m.range.endRow);
861
- for (let p = m.range.startColumn; p <= m.range.endColumn; p++)
859
+ for (const f of e) {
860
+ s = Math.min(s, f.range.startRow), o = Math.max(o, f.range.endRow);
861
+ for (let p = f.range.startColumn; p <= f.range.endColumn; p++)
862
862
  a.add(p);
863
863
  }
864
864
  const d = /* @__PURE__ */ new Set();
865
- for (let m = r.startColumn; m <= r.endColumn; m++)
866
- if (!a.has(m))
865
+ for (let f = r.startColumn; f <= r.endColumn; f++)
866
+ if (!a.has(f))
867
867
  for (let p = s; p <= o; p++) {
868
- const w = n.getValue(p, m);
869
- if (w && (((l = w.v) == null ? void 0 : l.toString()) || ((f = (h = (g = w.p) == null ? void 0 : g.body) == null ? void 0 : h.dataStream) == null ? void 0 : f.trim()) || "")) {
870
- d.add(m);
868
+ const w = n.getValue(p, f);
869
+ if (w && (((l = w.v) == null ? void 0 : l.toString()) || ((m = (h = (g = w.p) == null ? void 0 : g.body) == null ? void 0 : h.dataStream) == null ? void 0 : m.trim()) || "")) {
870
+ d.add(f);
871
871
  break;
872
872
  }
873
873
  }
874
- const u = [], c = Array.from(d).sort((m, p) => m - p);
875
- for (const m of c)
874
+ const u = [], c = Array.from(d).sort((f, p) => f - p);
875
+ for (const f of c)
876
876
  u.push({
877
- index: m,
878
- label: Sn(m)
877
+ index: f,
878
+ label: Sn(f)
879
879
  });
880
880
  return u;
881
881
  }
882
882
  getDataColumnsForRanges(i, t, e) {
883
- var h, f, m, p;
884
- const n = this._univerInstanceService.getUnit(i, $.UNIVER_SHEET);
883
+ var h, m, f, p;
884
+ const n = this._univerInstanceService.getUnit(i, k.UNIVER_SHEET);
885
885
  if (!n) return [];
886
886
  const r = n.getSheetBySheetId(t);
887
887
  if (!r) return [];
@@ -898,7 +898,7 @@ let vn = class extends ee {
898
898
  if (!u.has(w))
899
899
  for (let S = a; S <= d; S++) {
900
900
  const I = s.getValue(S, w);
901
- if (I && (((h = I.v) == null ? void 0 : h.toString()) || ((p = (m = (f = I.p) == null ? void 0 : f.body) == null ? void 0 : m.dataStream) == null ? void 0 : p.trim()) || "")) {
901
+ if (I && (((h = I.v) == null ? void 0 : h.toString()) || ((p = (f = (m = I.p) == null ? void 0 : m.body) == null ? void 0 : f.dataStream) == null ? void 0 : p.trim()) || "")) {
902
902
  c.add(w);
903
903
  break;
904
904
  }
@@ -913,7 +913,7 @@ let vn = class extends ee {
913
913
  }
914
914
  getSelectionRangeNotation() {
915
915
  const i = this._selectionService.getCurrentSelections();
916
- return !i || i.length === 0 ? "" : i.map((t) => xs(t.range)).join(", ");
916
+ return !i || i.length === 0 ? "" : i.map((t) => Us(t.range)).join(", ");
917
917
  }
918
918
  getSelectionRowRange() {
919
919
  const i = this._selectionService.getCurrentSelections();
@@ -934,7 +934,7 @@ let vn = class extends ee {
934
934
  }
935
935
  generateFileName(i, t) {
936
936
  var s, o, a, d;
937
- const e = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET), n = cn(i.source, i.imageSourceType), r = [];
937
+ const e = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET), n = cn(i.source, i.imageSourceType), r = [];
938
938
  for (const u of t.fileNameParts)
939
939
  if (u === "cellAddress")
940
940
  r.push(i.cellAddress);
@@ -945,8 +945,8 @@ let vn = class extends ee {
945
945
  if (g) {
946
946
  const h = ((s = g.v) == null ? void 0 : s.toString()) || ((d = (a = (o = g.p) == null ? void 0 : o.body) == null ? void 0 : a.dataStream) == null ? void 0 : d.trim()) || "";
947
947
  if (h) {
948
- const f = h.replace(/[<>:"/\\|?*]/g, "_").trim();
949
- f && r.push(f);
948
+ const m = h.replace(/[<>:"/\\|?*]/g, "_").trim();
949
+ m && r.push(m);
950
950
  }
951
951
  }
952
952
  }
@@ -955,18 +955,18 @@ let vn = class extends ee {
955
955
  }
956
956
  generateFileNameWithContext(i, t, e, n) {
957
957
  var a, d, u, c;
958
- const r = this._univerInstanceService.getUnit(e, $.UNIVER_SHEET), s = cn(i.source, i.imageSourceType), o = [];
958
+ const r = this._univerInstanceService.getUnit(e, k.UNIVER_SHEET), s = cn(i.source, i.imageSourceType), o = [];
959
959
  for (const l of t.fileNameParts)
960
960
  if (l === "cellAddress")
961
961
  o.push(i.cellAddress);
962
962
  else if (l === "columnValue" && t.columnIndex !== void 0) {
963
963
  const g = r == null ? void 0 : r.getSheetBySheetId(n);
964
964
  if (g) {
965
- const f = g.getCellMatrix().getValue(i.row, t.columnIndex);
966
- if (f) {
967
- const m = ((a = f.v) == null ? void 0 : a.toString()) || ((c = (u = (d = f.p) == null ? void 0 : d.body) == null ? void 0 : u.dataStream) == null ? void 0 : c.trim()) || "";
968
- if (m) {
969
- const p = m.replace(/[<>:"/\\|?*]/g, "_").trim();
965
+ const m = g.getCellMatrix().getValue(i.row, t.columnIndex);
966
+ if (m) {
967
+ const f = ((a = m.v) == null ? void 0 : a.toString()) || ((c = (u = (d = m.p) == null ? void 0 : d.body) == null ? void 0 : u.dataStream) == null ? void 0 : c.trim()) || "";
968
+ if (f) {
969
+ const p = f.replace(/[<>:"/\\|?*]/g, "_").trim();
970
970
  p && o.push(p);
971
971
  }
972
972
  }
@@ -997,8 +997,8 @@ let vn = class extends ee {
997
997
  const u = d.replace(/\.\w+$/, ""), c = ((o = d.match(/\.\w+$/)) == null ? void 0 : o[0]) || ".png", l = s.get(u) || 0;
998
998
  l > 0 && (d = `${u}_${l}${c}`), s.set(u, l + 1);
999
999
  try {
1000
- const g = await this._getImageBlob(a), f = await (await r.getFileHandle(d, { create: !0 })).createWritable();
1001
- await f.write(g), await f.close();
1000
+ const g = await this._getImageBlob(a), m = await (await r.getFileHandle(d, { create: !0 })).createWritable();
1001
+ await m.write(g), await m.close();
1002
1002
  } catch (g) {
1003
1003
  throw console.error(`Failed to save image ${d}:`, g), g;
1004
1004
  }
@@ -1021,7 +1021,7 @@ let vn = class extends ee {
1021
1021
  return ir(i.source, i.imageSourceType);
1022
1022
  }
1023
1023
  };
1024
- vn = ks([
1024
+ vn = Os([
1025
1025
  an(0, de),
1026
1026
  an(1, A(ut)),
1027
1027
  an(2, hr)
@@ -1051,19 +1051,19 @@ const ze = "sheet.dialog.batch-save-images", ct = {
1051
1051
  onClose: () => t.close(ze)
1052
1052
  }), !0;
1053
1053
  }
1054
- }, Br = "COMPONENT_SHEET_DRAWING_PANEL", jr = {
1054
+ }, Wr = "COMPONENT_SHEET_DRAWING_PANEL", Br = {
1055
1055
  id: "sidebar.operation.sheet-image",
1056
1056
  type: q.COMMAND,
1057
1057
  handler: async (i, t) => {
1058
- const e = i.get(ds), n = i.get(Te), r = i.get(de), s = i.get(Y);
1058
+ const e = i.get(ss), n = i.get(Te), r = i.get(de), s = i.get(Y);
1059
1059
  if (!ae(r)) return !1;
1060
1060
  switch (t.value) {
1061
1061
  case "open":
1062
1062
  e.open({
1063
1063
  header: { title: n.t("sheetImage.panel.title") },
1064
- children: { label: Br },
1064
+ children: { label: Wr },
1065
1065
  onClose: () => {
1066
- s.syncExecuteCommand(Ht.id, []);
1066
+ s.syncExecuteCommand(Vt.id, []);
1067
1067
  },
1068
1068
  width: 360
1069
1069
  });
@@ -1075,27 +1075,27 @@ const ze = "sheet.dialog.batch-save-images", ct = {
1075
1075
  }
1076
1076
  return !0;
1077
1077
  }
1078
- }, Fr = {
1078
+ }, jr = {
1079
1079
  id: "sheet.operation.edit-sheet-image",
1080
1080
  type: q.OPERATION,
1081
1081
  handler: (i, t) => {
1082
1082
  const e = i.get(Y);
1083
- return t == null ? !1 : (e.syncExecuteCommand(Ht.id, [t]), e.executeCommand(jr.id, { value: "open" }), !0);
1083
+ return t == null ? !1 : (e.syncExecuteCommand(Vt.id, [t]), e.executeCommand(Br.id, { value: "open" }), !0);
1084
1084
  }
1085
- }, Ws = "sheets-drawing-ui.config", sr = {};
1086
- var Bs = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => {
1087
- for (var r = n > 1 ? void 0 : n ? Bs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1085
+ }, Ps = "sheets-drawing-ui.config", sr = {};
1086
+ var As = Object.getOwnPropertyDescriptor, Ns = (i, t, e, n) => {
1087
+ for (var r = n > 1 ? void 0 : n ? As(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1088
1088
  (o = i[s]) && (r = o(r) || r);
1089
1089
  return r;
1090
1090
  }, ce = (i, t) => (e, n) => t(e, n, i);
1091
- let Nt = class extends wi {
1091
+ let Nt = class extends gi {
1092
1092
  constructor(t, e, n, r, s, o, a, d, u, c) {
1093
1093
  super();
1094
1094
  re(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
1095
1095
  this._injector = t, this._localeService = e, this._drawingManagerService = n, this._canvasPopManagerService = r, this._renderManagerService = s, this._univerInstanceService = o, this._messageService = a, this._contextService = d, this._ioService = u, this._commandService = c, this._init();
1096
1096
  }
1097
1097
  _init() {
1098
- this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET).pipe(Qn(this.dispose$)).subscribe((t) => this._create(t)), this._univerInstanceService.getTypeOfUnitDisposed$($.UNIVER_SHEET).pipe(Qn(this.dispose$)).subscribe((t) => this._dispose(t)), this._univerInstanceService.getAllUnitsForType($.UNIVER_SHEET).forEach((t) => this._create(t)), this._setupLoadingStatus();
1098
+ this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(Qn(this.dispose$)).subscribe((t) => this._create(t)), this._univerInstanceService.getTypeOfUnitDisposed$(k.UNIVER_SHEET).pipe(Qn(this.dispose$)).subscribe((t) => this._dispose(t)), this._univerInstanceService.getAllUnitsForType(k.UNIVER_SHEET).forEach((t) => this._create(t)), this._setupLoadingStatus();
1099
1099
  }
1100
1100
  _setupLoadingStatus() {
1101
1101
  const t = "image-upload-loading";
@@ -1123,7 +1123,7 @@ let Nt = class extends wi {
1123
1123
  _hasCropObject(t) {
1124
1124
  const e = t.getAllObjectsByOrder();
1125
1125
  for (const n of e)
1126
- if (n instanceof Ss)
1126
+ if (n instanceof fs)
1127
1127
  return !0;
1128
1128
  return !1;
1129
1129
  }
@@ -1151,23 +1151,23 @@ let Nt = class extends wi {
1151
1151
  const d = a.oKey, u = this._drawingManagerService.getDrawingOKey(d);
1152
1152
  if (!u)
1153
1153
  return;
1154
- const { unitId: c, subUnitId: l, drawingId: g, drawingType: h } = u, f = u.data;
1155
- if (f && f.disablePopup)
1154
+ const { unitId: c, subUnitId: l, drawingId: g, drawingType: h } = u, m = u.data;
1155
+ if (m && m.disablePopup)
1156
1156
  return;
1157
1157
  r == null || r.dispose();
1158
- const m = this._canvasPopManagerService.getFeatureMenu(c, l, g, h);
1158
+ const f = this._canvasPopManagerService.getFeatureMenu(c, l, g, h);
1159
1159
  r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(a, {
1160
- componentKey: vs,
1160
+ componentKey: ps,
1161
1161
  direction: "horizontal",
1162
1162
  offset: [2, 0],
1163
1163
  extraProps: {
1164
- menuItems: m || this._getImageMenuItems(c, l, g, h)
1164
+ menuItems: f || this._getImageMenuItems(c, l, g, h)
1165
1165
  }
1166
1166
  }));
1167
1167
  })
1168
1168
  ), this.disposeWithMe(
1169
1169
  n.clearControl$.subscribe(() => {
1170
- r == null || r.dispose(), this._contextService.setContextValue(Ge, !1), this._commandService.syncExecuteCommand(Ht.id, []);
1170
+ r == null || r.dispose(), this._contextService.setContextValue(Ge, !1), this._commandService.syncExecuteCommand(Vt.id, []);
1171
1171
  })
1172
1172
  ), this.disposeWithMe(
1173
1173
  this._contextService.contextChanged$.subscribe((o) => {
@@ -1184,7 +1184,7 @@ let Nt = class extends wi {
1184
1184
  {
1185
1185
  label: "image-popup.edit",
1186
1186
  index: 0,
1187
- commandId: Fr.id,
1187
+ commandId: jr.id,
1188
1188
  commandParams: { unitId: t, subUnitId: e, drawingId: n },
1189
1189
  disable: r === x.DRAWING_DOM
1190
1190
  },
@@ -1198,25 +1198,25 @@ let Nt = class extends wi {
1198
1198
  {
1199
1199
  label: "image-popup.crop",
1200
1200
  index: 2,
1201
- commandId: Is.id,
1201
+ commandId: ws.id,
1202
1202
  commandParams: { unitId: t, subUnitId: e, drawingId: n },
1203
1203
  disable: r === x.DRAWING_DOM
1204
1204
  },
1205
1205
  {
1206
1206
  label: "image-popup.reset",
1207
1207
  index: 3,
1208
- commandId: Cs.id,
1208
+ commandId: _s.id,
1209
1209
  commandParams: [{ unitId: t, subUnitId: e, drawingId: n }],
1210
1210
  disable: r === x.DRAWING_DOM
1211
1211
  }
1212
1212
  ];
1213
1213
  }
1214
1214
  };
1215
- Nt = js([
1215
+ Nt = Ns([
1216
1216
  ce(0, A(qe)),
1217
1217
  ce(1, A(Te)),
1218
1218
  ce(2, oe),
1219
- ce(3, A(si)),
1219
+ ce(3, A(ti)),
1220
1220
  ce(4, Q),
1221
1221
  ce(5, de),
1222
1222
  ce(6, Or),
@@ -1224,8 +1224,8 @@ Nt = js([
1224
1224
  ce(8, hr),
1225
1225
  ce(9, Y)
1226
1226
  ], Nt);
1227
- var Fs = Object.getOwnPropertyDescriptor, Ls = (i, t, e, n) => {
1228
- for (var r = n > 1 ? void 0 : n ? Fs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1227
+ var ks = Object.getOwnPropertyDescriptor, $s = (i, t, e, n) => {
1228
+ for (var r = n > 1 ? void 0 : n ? ks(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1229
1229
  (o = i[s]) && (r = o(r) || r);
1230
1230
  return r;
1231
1231
  }, Tt = (i, t) => (e, n) => t(e, n, i);
@@ -1236,10 +1236,10 @@ let In = class extends ee {
1236
1236
  this._context = t, this._hoverManagerService = e, this._selectionsService = n, this._drawingRenderService = r, this._sheetSkeletonManagerService = s, this._initHover(), this._initImageClick();
1237
1237
  }
1238
1238
  _initHover() {
1239
- this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(bs(33)).subscribe((t) => {
1239
+ this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(Is(33)).subscribe((t) => {
1240
1240
  var n, r;
1241
1241
  let e = [];
1242
- t !== null && (e = this._selectionsService.getWorkbookSelections(this._context.unitId).getCurrentSelections()), e.length > 0 && (t == null ? void 0 : t.unitId) === this._context.unitId && (t != null && t.drawing) && e.length === 1 && ((n = e[0].primary) == null ? void 0 : n.actualRow) === t.row && ((r = e[0].primary) == null ? void 0 : r.actualColumn) === t.col ? (this._isSetCursor = !0, this._context.scene.setCursor(ri.ZOOM_IN)) : this._isSetCursor && (this._isSetCursor = !1, this._context.scene.resetCursor());
1242
+ t !== null && (e = this._selectionsService.getWorkbookSelections(this._context.unitId).getCurrentSelections()), e.length > 0 && (t == null ? void 0 : t.unitId) === this._context.unitId && (t != null && t.drawing) && e.length === 1 && ((n = e[0].primary) == null ? void 0 : n.actualRow) === t.row && ((r = e[0].primary) == null ? void 0 : r.actualColumn) === t.col ? (this._isSetCursor = !0, this._context.scene.setCursor(Qr.ZOOM_IN)) : this._isSetCursor && (this._isSetCursor = !1, this._context.scene.resetCursor());
1243
1243
  }));
1244
1244
  }
1245
1245
  _initImageClick() {
@@ -1253,14 +1253,14 @@ let In = class extends ee {
1253
1253
  }));
1254
1254
  }
1255
1255
  };
1256
- In = Ls([
1257
- Tt(1, A(oi)),
1256
+ In = $s([
1257
+ Tt(1, A(ni)),
1258
1258
  Tt(2, A(ut)),
1259
1259
  Tt(3, A(Pr)),
1260
1260
  Tt(4, A(X))
1261
1261
  ], In);
1262
- var Vs = Object.getOwnPropertyDescriptor, Hs = (i, t, e, n) => {
1263
- for (var r = n > 1 ? void 0 : n ? Vs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1262
+ var xs = Object.getOwnPropertyDescriptor, Ws = (i, t, e, n) => {
1263
+ for (var r = n > 1 ? void 0 : n ? xs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1264
1264
  (o = i[s]) && (r = o(r) || r);
1265
1265
  return r;
1266
1266
  }, Ot = (i, t) => (e, n) => t(e, n, i);
@@ -1278,24 +1278,24 @@ let Cn = class extends ee {
1278
1278
  const e = i[t];
1279
1279
  for (const n in e.data) {
1280
1280
  const r = e.data[n];
1281
- r.sheetTransform && (r.transform = Z(r.sheetTransform, this._sheetSelectionRenderService, this._sheetSkeletonManagerService));
1281
+ r.sheetTransform && (r.transform = J(r.sheetTransform, this._sheetSelectionRenderService, this._sheetSkeletonManagerService));
1282
1282
  }
1283
1283
  }
1284
1284
  this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
1285
1285
  }
1286
1286
  };
1287
- Cn = Hs([
1287
+ Cn = Ws([
1288
1288
  Ot(1, se),
1289
1289
  Ot(2, oe),
1290
- Ot(3, A(Ze)),
1290
+ Ot(3, A(Je)),
1291
1291
  Ot(4, A(X))
1292
1292
  ], Cn);
1293
- var Ys = Object.getOwnPropertyDescriptor, Gs = (i, t, e, n) => {
1294
- for (var r = n > 1 ? void 0 : n ? Ys(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1293
+ var Bs = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => {
1294
+ for (var r = n > 1 ? void 0 : n ? Bs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1295
1295
  (o = i[s]) && (r = o(r) || r);
1296
1296
  return r;
1297
1297
  }, We = (i, t) => (e, n) => t(e, n, i);
1298
- function Lr(i, t, e) {
1298
+ function Fr(i, t, e) {
1299
1299
  var n, r, s, o;
1300
1300
  if (((r = (n = e == null ? void 0 : e.p) == null ? void 0 : n.body) == null ? void 0 : r.dataStream.length) === 3 && ((o = (s = e.p) == null ? void 0 : s.drawingsOrder) == null ? void 0 : o.length) === 1) {
1301
1301
  const a = e.p.drawings[e.p.drawingsOrder[0]], d = _n(
@@ -1315,7 +1315,7 @@ function Lr(i, t, e) {
1315
1315
  }
1316
1316
  return !1;
1317
1317
  }
1318
- let $t = class extends ee {
1318
+ let kt = class extends ee {
1319
1319
  constructor(i, t, e, n, r, s) {
1320
1320
  super(), this._commandService = i, this._sheetInterceptorService = t, this._injector = e, this._drawingManagerService = n, this._docDrawingController = r, this._editorBridgeService = s, this._handleInitEditor(), this._initCellContentInterceptor();
1321
1321
  }
@@ -1323,39 +1323,39 @@ let $t = class extends ee {
1323
1323
  this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
1324
1324
  i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(ot), this._docDrawingController.loadDrawingDataForUnit(ot), this._drawingManagerService.initializeNotification(ot)) : this._drawingManagerService.removeDrawingDataForUnit(ot);
1325
1325
  })), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
1326
- i.id === rs.id && i.params.unitId === He && (this._drawingManagerService.removeDrawingDataForUnit(He), this._docDrawingController.loadDrawingDataForUnit(He), this._drawingManagerService.initializeNotification(He));
1326
+ i.id === Qi.id && i.params.unitId === Ve && (this._drawingManagerService.removeDrawingDataForUnit(Ve), this._docDrawingController.loadDrawingDataForUnit(Ve), this._drawingManagerService.initializeNotification(Ve));
1327
1327
  }));
1328
1328
  }
1329
1329
  _initCellContentInterceptor() {
1330
1330
  this.disposeWithMe(
1331
1331
  this._sheetInterceptorService.intercept(
1332
- xi.CELL_CONTENT,
1332
+ Ai.CELL_CONTENT,
1333
1333
  {
1334
- effect: _i.Style,
1335
- priority: Wi.CELL_IMAGE,
1334
+ effect: mi.Style,
1335
+ priority: Ni.CELL_IMAGE,
1336
1336
  handler: (i, t, e) => {
1337
1337
  var n;
1338
- return i != null && i.p && ((n = i.p.drawingsOrder) != null && n.length) && (i === t.rawData && (i = { ...t.rawData }), i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }, Lr(this._injector, { unitId: t.unitId, subUnitId: t.subUnitId, row: t.row, col: t.col }, i)), e(i);
1338
+ return i != null && i.p && ((n = i.p.drawingsOrder) != null && n.length) && (i === t.rawData && (i = { ...t.rawData }), i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }, Fr(this._injector, { unitId: t.unitId, subUnitId: t.subUnitId, row: t.row, col: t.col }, i)), e(i);
1339
1339
  }
1340
1340
  }
1341
1341
  )
1342
1342
  );
1343
1343
  }
1344
1344
  };
1345
- $t = Gs([
1345
+ kt = js([
1346
1346
  We(0, Y),
1347
- We(1, A(Vt)),
1347
+ We(1, A(Ht)),
1348
1348
  We(2, A(qe)),
1349
1349
  We(3, oe),
1350
- We(4, A(ws)),
1351
- We(5, A(ai))
1352
- ], $t);
1353
- var Xs = Object.getOwnPropertyDescriptor, zs = (i, t, e, n) => {
1354
- for (var r = n > 1 ? void 0 : n ? Xs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1350
+ We(4, A(gs)),
1351
+ We(5, A(ri))
1352
+ ], kt);
1353
+ var Fs = Object.getOwnPropertyDescriptor, Ls = (i, t, e, n) => {
1354
+ for (var r = n > 1 ? void 0 : n ? Fs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1355
1355
  (o = i[s]) && (r = o(r) || r);
1356
1356
  return r;
1357
1357
  }, or = (i, t) => (e, n) => t(e, n, i);
1358
- let kt = class extends ee {
1358
+ let $t = class extends ee {
1359
1359
  constructor(i, t) {
1360
1360
  super(), this._autoFillService = i, this._injector = t, this._initAutoFillHooks();
1361
1361
  }
@@ -1364,27 +1364,27 @@ let kt = class extends ee {
1364
1364
  this._autoFillService.addHook({
1365
1365
  id: "sheet-cell-image-autofill",
1366
1366
  onBeforeSubmit: (i, t, e, n) => {
1367
- new Si(n).forValue((r, s, o) => {
1368
- Lr(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
1367
+ new fi(n).forValue((r, s, o) => {
1368
+ Fr(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
1369
1369
  });
1370
1370
  }
1371
1371
  })
1372
1372
  );
1373
1373
  }
1374
1374
  };
1375
- kt = zs([
1376
- or(0, A(ci)),
1375
+ $t = Ls([
1376
+ or(0, A(ii)),
1377
1377
  or(1, A(qe))
1378
- ], kt);
1379
- var Ks = Object.getOwnPropertyDescriptor, Zs = (i, t, e, n) => {
1380
- for (var r = n > 1 ? void 0 : n ? Ks(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1378
+ ], $t);
1379
+ var Hs = Object.getOwnPropertyDescriptor, Vs = (i, t, e, n) => {
1380
+ for (var r = n > 1 ? void 0 : n ? Hs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1381
1381
  (o = i[s]) && (r = o(r) || r);
1382
1382
  return r;
1383
1383
  }, nt = (i, t) => (e, n) => t(e, n, i);
1384
- const Js = [
1384
+ const Ys = [
1385
1385
  ot,
1386
- vi,
1387
- He
1386
+ pi,
1387
+ Ve
1388
1388
  ];
1389
1389
  let xt = class extends ee {
1390
1390
  constructor(i, t, e, n, r) {
@@ -1392,7 +1392,7 @@ let xt = class extends ee {
1392
1392
  }
1393
1393
  _setCellImage(i) {
1394
1394
  var r;
1395
- const t = un("", {}), e = (r = Dn($.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.with(di), n = hn.drawing.add({
1395
+ const t = un("", {}), e = (r = Dn(k.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.with(si), n = hn.drawing.add({
1396
1396
  documentDataModel: t,
1397
1397
  drawings: [i],
1398
1398
  selection: {
@@ -1407,13 +1407,13 @@ let xt = class extends ee {
1407
1407
  this.disposeWithMe(
1408
1408
  this._commandService.beforeCommandExecuted((i) => {
1409
1409
  var t, e;
1410
- if (i.id === is.id) {
1411
- const n = i.params, { doc: r } = n, s = this._univerInstanceService.getCurrentUnitOfType($.UNIVER_DOC);
1410
+ if (i.id === es.id) {
1411
+ const n = i.params, { doc: r } = n, s = this._univerInstanceService.getCurrentUnitOfType(k.UNIVER_DOC);
1412
1412
  if (s == null || !Object.keys((t = r.drawings) != null ? t : {}).length)
1413
1413
  return;
1414
1414
  const o = s.getUnitId();
1415
- if (Js.includes(o)) {
1416
- if (o !== He) {
1415
+ if (Ys.includes(o)) {
1416
+ if (o !== Ve) {
1417
1417
  const a = () => {
1418
1418
  this._dialogService.close("sheet-cell-image-copy-paste"), this._commandService.syncExecuteCommand(Nn.id, {
1419
1419
  visible: !1
@@ -1448,32 +1448,32 @@ let xt = class extends ee {
1448
1448
  );
1449
1449
  }
1450
1450
  };
1451
- xt = Zs([
1451
+ xt = Vs([
1452
1452
  nt(0, Y),
1453
1453
  nt(1, de),
1454
1454
  nt(2, bn),
1455
1455
  nt(3, Q),
1456
1456
  nt(4, A(Te))
1457
1457
  ], xt);
1458
- var qs = Object.getOwnPropertyDescriptor, Qs = (i, t, e, n) => {
1459
- for (var r = n > 1 ? void 0 : n ? qs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1458
+ var Gs = Object.getOwnPropertyDescriptor, Xs = (i, t, e, n) => {
1459
+ for (var r = n > 1 ? void 0 : n ? Gs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1460
1460
  (o = i[s]) && (r = o(r) || r);
1461
1461
  return r;
1462
1462
  }, rt = (i, t) => (e, n) => t(e, n, i);
1463
- const Vr = "image/png";
1464
- function eo(i) {
1463
+ const Lr = "image/png";
1464
+ function zs(i) {
1465
1465
  const t = i.split(","), e = atob(t[1]), n = e.length, r = new Uint8Array(n);
1466
1466
  for (let s = 0; s < n; s++)
1467
1467
  r[s] = e.charCodeAt(s);
1468
- return new Blob([r], { type: Vr });
1468
+ return new Blob([r], { type: Lr });
1469
1469
  }
1470
- function to(i) {
1471
- const t = new ClipboardItem({ [Vr]: eo(i) });
1470
+ function Ks(i) {
1471
+ const t = new ClipboardItem({ [Lr]: zs(i) });
1472
1472
  navigator.clipboard.write([t]).catch((e) => {
1473
1473
  console.error("Could not copy image using clipboard API: ", e);
1474
1474
  });
1475
1475
  }
1476
- function no() {
1476
+ function Js() {
1477
1477
  function i() {
1478
1478
  const n = document.createElement("input");
1479
1479
  return n.style.position = "absolute", n.style.height = "1px", n.style.width = "1px", n.style.opacity = "0", n;
@@ -1517,8 +1517,8 @@ let Wt = class extends ee {
1517
1517
  this._commandService.executeCommand(ht.id, d);
1518
1518
  }
1519
1519
  setTimeout(() => {
1520
- const d = no();
1521
- o.drawingType === x.DRAWING_IMAGE && o.imageSourceType === os.BASE64 ? to(o.source) : this._clipboardInterfaceService.writeText(""), d();
1520
+ const d = Js();
1521
+ o.drawingType === x.DRAWING_IMAGE && o.imageSourceType === ns.BASE64 ? Ks(o.source) : this._clipboardInterfaceService.writeText(""), d();
1522
1522
  }, 200);
1523
1523
  const a = {
1524
1524
  unitId: o.unitId,
@@ -1568,19 +1568,19 @@ let Wt = class extends ee {
1568
1568
  return;
1569
1569
  const { startX: o, endX: a, startY: d, endY: u } = s, c = this._drawingService.getDrawingData(t, e), l = this._focusedDrawings.slice();
1570
1570
  if (Object.keys(c).forEach((h) => {
1571
- const f = c[h];
1572
- if (f.drawingType !== x.DRAWING_IMAGE)
1571
+ const m = c[h];
1572
+ if (m.drawingType !== x.DRAWING_IMAGE)
1573
1573
  return;
1574
- const { transform: m } = f;
1575
- if (f.anchorType !== O.Both || !m)
1574
+ const { transform: f } = m;
1575
+ if (m.anchorType !== O.Both || !f)
1576
1576
  return;
1577
- const { left: p = 0, top: w = 0, width: S = 0, height: I = 0 } = m, { drawingStartX: D, drawingEndX: v, drawingStartY: C, drawingEndY: _ } = {
1577
+ const { left: p = 0, top: w = 0, width: S = 0, height: I = 0 } = f, { drawingStartX: D, drawingEndX: v, drawingStartY: C, drawingEndY: _ } = {
1578
1578
  drawingStartX: p,
1579
1579
  drawingEndX: p + S,
1580
1580
  drawingStartY: w,
1581
1581
  drawingEndY: w + I
1582
1582
  };
1583
- o <= D && v <= a && d <= C && _ <= u && l.push(f);
1583
+ o <= D && v <= a && d <= C && _ <= u && l.push(m);
1584
1584
  }), l.length)
1585
1585
  return {
1586
1586
  copyRange: n,
@@ -1593,15 +1593,15 @@ let Wt = class extends ee {
1593
1593
  const { pasteType: n, pasteTo: r } = t;
1594
1594
  if (ar.includes(n))
1595
1595
  return { redos: [], undos: [] };
1596
- const { unitId: s, subUnitId: o, range: a } = r, d = this._renderManagerService.getRenderById(s), u = d == null ? void 0 : d.with(X), c = d == null ? void 0 : d.with(Ze), l = this._copyInfo;
1596
+ const { unitId: s, subUnitId: o, range: a } = r, d = this._renderManagerService.getRenderById(s), u = d == null ? void 0 : d.with(X), c = d == null ? void 0 : d.with(Je), l = this._copyInfo;
1597
1597
  if (!u || !c)
1598
1598
  return { redos: [], undos: [] };
1599
- const { drawings: g } = l, h = $n(a);
1599
+ const { drawings: g } = l, h = kn(a);
1600
1600
  return this._generateMutations(g, {
1601
1601
  unitId: s,
1602
1602
  subUnitId: o,
1603
1603
  isCut: e === Re.CUT,
1604
- getTransform: (f, m) => {
1604
+ getTransform: (m, f) => {
1605
1605
  var S;
1606
1606
  const p = u.attachRangeWithCoord({
1607
1607
  startRow: h.startRow,
@@ -1609,13 +1609,13 @@ let Wt = class extends ee {
1609
1609
  startColumn: h.startColumn,
1610
1610
  endColumn: h.endColumn
1611
1611
  }), w = {
1612
- ...f,
1612
+ ...m,
1613
1613
  left: p == null ? void 0 : p.startX,
1614
1614
  top: p == null ? void 0 : p.startY
1615
1615
  };
1616
1616
  return {
1617
1617
  transform: w,
1618
- sheetTransform: (S = j(w, c)) != null ? S : m
1618
+ sheetTransform: (S = j(w, c)) != null ? S : f
1619
1619
  };
1620
1620
  }
1621
1621
  });
@@ -1631,16 +1631,16 @@ let Wt = class extends ee {
1631
1631
  const { transform: l, sheetTransform: g } = c;
1632
1632
  if (!l)
1633
1633
  return;
1634
- const h = s(l, g), f = {
1634
+ const h = s(l, g), m = {
1635
1635
  ...c,
1636
1636
  unitId: n,
1637
1637
  subUnitId: r,
1638
- drawingId: o ? c.drawingId : Ve(),
1638
+ drawingId: o ? c.drawingId : He(),
1639
1639
  transform: h.transform,
1640
1640
  sheetTransform: h.sheetTransform
1641
1641
  };
1642
1642
  if (o) {
1643
- const { undo: m, redo: p, objects: w } = u.getBatchUpdateOp([f]);
1643
+ const { undo: f, redo: p, objects: w } = u.getBatchUpdateOp([m]);
1644
1644
  a.push({
1645
1645
  id: P.id,
1646
1646
  params: {
@@ -1656,13 +1656,13 @@ let Wt = class extends ee {
1656
1656
  unitId: n,
1657
1657
  subUnitId: r,
1658
1658
  type: U.UPDATE,
1659
- op: m,
1659
+ op: f,
1660
1660
  objects: w
1661
1661
  }
1662
1662
  });
1663
1663
  } else {
1664
- const { undo: m, redo: p, objects: w } = u.getBatchAddOp([f]);
1665
- a.push({ id: P.id, params: { op: p, unitId: n, subUnitId: r, objects: w, type: U.INSERT } }), d.push({ id: P.id, params: { op: m, unitId: n, subUnitId: r, objects: w, type: U.REMOVE } });
1664
+ const { undo: f, redo: p, objects: w } = u.getBatchAddOp([m]);
1665
+ a.push({ id: P.id, params: { op: p, unitId: n, subUnitId: r, objects: w, type: U.INSERT } }), d.push({ id: P.id, params: { op: f, unitId: n, subUnitId: r, objects: w, type: U.REMOVE } });
1666
1666
  }
1667
1667
  }), { redos: a, undos: d };
1668
1668
  }
@@ -1686,14 +1686,14 @@ let Wt = class extends ee {
1686
1686
  const { drawings: c } = this._copyInfo;
1687
1687
  if (!a)
1688
1688
  return this._generateSingleDrawingPasteMutations({
1689
- pasteTo: { unitId: n, subUnitId: r, range: $n(o) },
1689
+ pasteTo: { unitId: n, subUnitId: r, range: kn(o) },
1690
1690
  pasteType: s
1691
1691
  }, d);
1692
- const { ranges: [l, g], mapFunc: h } = li([a, o]), { row: f, col: m } = h(l.startRow, l.startColumn), { row: p, col: w } = h(g.startRow, g.startColumn), S = u.attachRangeWithCoord({
1693
- startRow: f,
1694
- endRow: f,
1695
- startColumn: m,
1696
- endColumn: m
1692
+ const { ranges: [l, g], mapFunc: h } = oi([a, o]), { row: m, col: f } = h(l.startRow, l.startColumn), { row: p, col: w } = h(g.startRow, g.startColumn), S = u.attachRangeWithCoord({
1693
+ startRow: m,
1694
+ endRow: m,
1695
+ startColumn: f,
1696
+ endColumn: f
1697
1697
  }), I = u.attachRangeWithCoord({
1698
1698
  startRow: p,
1699
1699
  endRow: p,
@@ -1702,7 +1702,7 @@ let Wt = class extends ee {
1702
1702
  });
1703
1703
  if (!S || !I || !this._copyInfo)
1704
1704
  return { redos: [], undos: [] };
1705
- const D = I.startX - S.startX, v = I.startY - S.startY, C = p - f, _ = w - m;
1705
+ const D = I.startX - S.startX, v = I.startY - S.startY, C = p - m, _ = w - f;
1706
1706
  return this._generateMutations(c, {
1707
1707
  unitId: n,
1708
1708
  subUnitId: r,
@@ -1733,15 +1733,15 @@ let Wt = class extends ee {
1733
1733
  });
1734
1734
  }
1735
1735
  };
1736
- Wt = Qs([
1737
- rt(0, ui),
1736
+ Wt = Xs([
1737
+ rt(0, ai),
1738
1738
  rt(1, Q),
1739
1739
  rt(2, oe),
1740
- rt(3, ls),
1740
+ rt(3, os),
1741
1741
  rt(4, Y)
1742
1742
  ], Wt);
1743
- var ro = Object.getOwnPropertyDescriptor, io = (i, t, e, n) => {
1744
- for (var r = n > 1 ? void 0 : n ? ro(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1743
+ var Zs = Object.getOwnPropertyDescriptor, qs = (i, t, e, n) => {
1744
+ for (var r = n > 1 ? void 0 : n ? Zs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1745
1745
  (o = i[s]) && (r = o(r) || r);
1746
1746
  return r;
1747
1747
  }, it = (i, t) => (e, n) => t(e, n, i);
@@ -1750,10 +1750,10 @@ let Bt = class extends ee {
1750
1750
  super(), this._drawingManagerService = i, this._renderManagerService = t, this._permissionService = e, this._univerInstanceService = n, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
1751
1751
  }
1752
1752
  _initDrawingVisible() {
1753
- const i = this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = at([i, t]);
1753
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = at([i, t]);
1754
1754
  this.disposeWithMe(
1755
1755
  e.pipe(
1756
- me(([n, r]) => n ? n.activeSheet$.pipe(
1756
+ fe(([n, r]) => n ? n.activeSheet$.pipe(
1757
1757
  er((s) => {
1758
1758
  if (!s) {
1759
1759
  this._drawingManagerService.setDrawingVisible(!1);
@@ -1761,8 +1761,8 @@ let Bt = class extends ee {
1761
1761
  }
1762
1762
  const o = n.getUnitId(), a = s.getSheetId();
1763
1763
  this._permissionService.composePermission([
1764
- new Vn(o).id,
1765
- new Hn(o, a).id
1764
+ new Hn(o).id,
1765
+ new Vn(o, a).id
1766
1766
  ]).every((u) => u.value) ? this._drawingManagerService.setDrawingVisible(!0) : this._handleDrawingVisibilityFalse(n, s);
1767
1767
  })
1768
1768
  ) : (this._drawingManagerService.setDrawingVisible(!1), we))
@@ -1775,14 +1775,14 @@ let Bt = class extends ee {
1775
1775
  if (!a)
1776
1776
  return;
1777
1777
  a.getAllObjectsByOrder().forEach((u) => {
1778
- u.classType === $e.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.removeObject(u);
1778
+ u.classType === ke.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.removeObject(u);
1779
1779
  });
1780
1780
  }
1781
1781
  _initDrawingEditable() {
1782
- const i = this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = at([i, t]);
1782
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = at([i, t]);
1783
1783
  this.disposeWithMe(
1784
1784
  e.pipe(
1785
- me(([n, r]) => n ? n.activeSheet$.pipe(
1785
+ fe(([n, r]) => n ? n.activeSheet$.pipe(
1786
1786
  er((s) => {
1787
1787
  if (!s) {
1788
1788
  this._drawingManagerService.setDrawingEditable(!1);
@@ -1791,7 +1791,7 @@ let Bt = class extends ee {
1791
1791
  const o = n.getUnitId(), a = s.getSheetId();
1792
1792
  this._permissionService.composePermission([
1793
1793
  new gn(o).id,
1794
- new fn(o, a).id
1794
+ new mn(o, a).id
1795
1795
  ]).every((u) => u.value) ? this._drawingManagerService.setDrawingEditable(!0) : this._handleDrawingEditableFalse(n, s);
1796
1796
  })
1797
1797
  ) : (this._drawingManagerService.setDrawingEditable(!1), we))
@@ -1804,15 +1804,15 @@ let Bt = class extends ee {
1804
1804
  if (!a)
1805
1805
  return;
1806
1806
  a.getAllObjectsByOrder().forEach((u) => {
1807
- u.classType === $e.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.detachTransformerFrom(u);
1807
+ u.classType === ke.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.detachTransformerFrom(u);
1808
1808
  });
1809
1809
  }
1810
1810
  _initViewPermissionChange() {
1811
- const i = this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1811
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1812
1812
  this.disposeWithMe(
1813
1813
  at([i, t]).pipe(
1814
- me(([e, n]) => e ? e.activeSheet$.pipe(
1815
- me((r) => {
1814
+ fe(([e, n]) => e ? e.activeSheet$.pipe(
1815
+ fe((r) => {
1816
1816
  if (!r)
1817
1817
  return we;
1818
1818
  const s = e.getUnitId(), o = r.getSheetId(), a = this._renderManagerService.getRenderById(s), d = a == null ? void 0 : a.scene;
@@ -1820,8 +1820,8 @@ let Bt = class extends ee {
1820
1820
  return we;
1821
1821
  const u = d.getTransformerByCreate();
1822
1822
  return this._permissionService.composePermission$([
1823
- new Vn(s).id,
1824
- new Hn(s, o).id
1823
+ new Hn(s).id,
1824
+ new Vn(s, o).id
1825
1825
  ]).pipe(
1826
1826
  pe((l) => l.every((g) => g.value)),
1827
1827
  tr()
@@ -1841,12 +1841,12 @@ let Bt = class extends ee {
1841
1841
  this._drawingManagerService.setDrawingVisible(e);
1842
1842
  const a = n.getAllObjectsByOrder(), d = this._drawingManagerService.getDrawingData(s, o), u = Object.values(d);
1843
1843
  e ? this._drawingManagerService.addNotification(u) : (a.forEach((c) => {
1844
- c.classType === $e.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.removeObject(c);
1844
+ c.classType === ke.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.removeObject(c);
1845
1845
  }), r.clearSelectedObjects());
1846
1846
  },
1847
1847
  complete: () => {
1848
1848
  this._drawingManagerService.setDrawingVisible(!0);
1849
- const e = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET), n = e == null ? void 0 : e.getActiveSheet(), r = e == null ? void 0 : e.getUnitId(), s = n == null ? void 0 : n.getSheetId();
1849
+ const e = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET), n = e == null ? void 0 : e.getActiveSheet(), r = e == null ? void 0 : e.getUnitId(), s = n == null ? void 0 : n.getSheetId();
1850
1850
  if (!r || !s)
1851
1851
  return;
1852
1852
  const o = this._drawingManagerService.getDrawingData(r, s), a = Object.values(o);
@@ -1856,11 +1856,11 @@ let Bt = class extends ee {
1856
1856
  );
1857
1857
  }
1858
1858
  _initEditPermissionChange() {
1859
- const i = this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1859
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1860
1860
  this.disposeWithMe(
1861
1861
  at([i, t]).pipe(
1862
- me(([e, n]) => e ? e.activeSheet$.pipe(
1863
- me((r) => {
1862
+ fe(([e, n]) => e ? e.activeSheet$.pipe(
1863
+ fe((r) => {
1864
1864
  if (!r)
1865
1865
  return we;
1866
1866
  const s = e.getUnitId(), o = r.getSheetId(), a = this._renderManagerService.getRenderById(s), d = a == null ? void 0 : a.scene;
@@ -1869,7 +1869,7 @@ let Bt = class extends ee {
1869
1869
  const u = d.getTransformerByCreate();
1870
1870
  return this._permissionService.composePermission$([
1871
1871
  new gn(s).id,
1872
- new fn(s, o).id
1872
+ new mn(s, o).id
1873
1873
  ]).pipe(
1874
1874
  pe((l) => l.every((g) => g.value)),
1875
1875
  tr()
@@ -1889,13 +1889,13 @@ let Bt = class extends ee {
1889
1889
  this._drawingManagerService.setDrawingEditable(e);
1890
1890
  const a = n.getAllObjectsByOrder(), d = this._drawingManagerService.getDrawingData(s, o), u = Object.values(d);
1891
1891
  e ? (a.forEach((c) => {
1892
- c.classType === $e.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.attachTransformerTo(c);
1892
+ c.classType === ke.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.attachTransformerTo(c);
1893
1893
  }), this._drawingManagerService.addNotification(u)) : (a.forEach((c) => {
1894
- c.classType === $e.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.detachTransformerFrom(c);
1894
+ c.classType === ke.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.detachTransformerFrom(c);
1895
1895
  }), r.clearSelectedObjects());
1896
1896
  },
1897
1897
  complete: () => {
1898
- const e = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET);
1898
+ const e = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET);
1899
1899
  if (!e)
1900
1900
  return;
1901
1901
  const n = e.getUnitId(), r = e.getActiveSheet();
@@ -1906,28 +1906,28 @@ let Bt = class extends ee {
1906
1906
  return;
1907
1907
  const d = this._drawingManagerService.getDrawingData(n, s), u = Object.values(d);
1908
1908
  this._drawingManagerService.setDrawingEditable(!0), a.getAllObjectsByOrder().forEach((l) => {
1909
- l.classType === $e.IMAGE && u.some((g) => l.oKey.includes(g.drawingId)) && a.detachTransformerFrom(l);
1909
+ l.classType === ke.IMAGE && u.some((g) => l.oKey.includes(g.drawingId)) && a.detachTransformerFrom(l);
1910
1910
  });
1911
1911
  }
1912
1912
  })
1913
1913
  );
1914
1914
  }
1915
1915
  };
1916
- Bt = io([
1916
+ Bt = qs([
1917
1917
  it(0, oe),
1918
1918
  it(1, Q),
1919
- it(2, Ii),
1919
+ it(2, wi),
1920
1920
  it(3, de),
1921
- it(4, A(Ci))
1921
+ it(4, A(_i))
1922
1922
  ], Bt);
1923
- var so = Object.getOwnPropertyDescriptor, oo = (i, t, e, n) => {
1924
- for (var r = n > 1 ? void 0 : n ? so(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1923
+ var Qs = Object.getOwnPropertyDescriptor, eo = (i, t, e, n) => {
1924
+ for (var r = n > 1 ? void 0 : n ? Qs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1925
1925
  (o = i[s]) && (r = o(r) || r);
1926
1926
  return r;
1927
1927
  }, be = (i, t) => (e, n) => t(e, n, i);
1928
- const ao = "univer-sheet-float-dom-";
1928
+ const to = "univer-sheet-float-dom-";
1929
1929
  function Hr(i, t, e, n, r, s = !1) {
1930
- const { scaleX: o, scaleY: a } = t.getAncestorScale(), d = t.getViewport(cr.VIEW_MAIN), u = n.getFreeze(), { startColumn: c, startRow: l, xSplit: g, ySplit: h } = u, f = {
1930
+ const { scaleX: o, scaleY: a } = t.getAncestorScale(), d = t.getViewport(cr.VIEW_MAIN), u = n.getFreeze(), { startColumn: c, startRow: l, xSplit: g, ySplit: h } = u, m = {
1931
1931
  left: !0,
1932
1932
  // left means the left of pic is in a viewMainLeft
1933
1933
  top: !0
@@ -1935,9 +1935,9 @@ function Hr(i, t, e, n, r, s = !1) {
1935
1935
  if (!d)
1936
1936
  return {
1937
1937
  ...i,
1938
- absolute: f
1938
+ absolute: m
1939
1939
  };
1940
- const { left: m, right: p, top: w, bottom: S } = i;
1940
+ const { left: f, right: p, top: w, bottom: S } = i;
1941
1941
  let { top: I, left: D, viewportScrollX: v, viewportScrollY: C } = d;
1942
1942
  const { boundsOfViewArea: _, scrollDirectionResponse: y } = r || {}, { rowHeaderWidth: R, columnHeaderHeight: E } = e, T = {
1943
1943
  top: s ? 0 : E,
@@ -1947,27 +1947,27 @@ function Hr(i, t, e, n, r, s = !1) {
1947
1947
  let M = 0, b = 0;
1948
1948
  const N = e.rowStartY(l - h) + E, F = e.colStartX(c - g) + R, te = e.rowStartY(l) + E, z = e.colStartX(c) + R;
1949
1949
  if (g === 0)
1950
- f.left = !1, M = (m - v) * o, b = (p - v) * o;
1950
+ m.left = !1, M = (f - v) * o, b = (p - v) * o;
1951
1951
  else {
1952
- const K = m - (F - R), W = p - (F - R);
1953
- p < z ? (M = K * o, b = W * o) : m <= z && p >= z ? (M = K * o, b = Math.max(D, (p - v) * o)) : m > z && (f.left = !1, M = Math.max((m - v) * o, D), b = Math.max((p - v) * o, D));
1952
+ const K = f - (F - R), W = p - (F - R);
1953
+ p < z ? (M = K * o, b = W * o) : f <= z && p >= z ? (M = K * o, b = Math.max(D, (p - v) * o)) : f > z && (m.left = !1, M = Math.max((f - v) * o, D), b = Math.max((p - v) * o, D));
1954
1954
  }
1955
- let H = 0, G = 0;
1955
+ let V = 0, G = 0;
1956
1956
  if (h === 0)
1957
- f.top = !1, H = (w - C) * a, G = (S - C) * a;
1957
+ m.top = !1, V = (w - C) * a, G = (S - C) * a;
1958
1958
  else {
1959
1959
  const K = w - (N - E), W = S - (N - E);
1960
- S < te ? (H = K * a, G = W * a) : w <= te && S >= te ? (H = K * a, G = Math.max(I, (S - C) * a)) : w > te && (f.top = !1, H = Math.max((w - C) * a, I), G = Math.max((S - C) * a, I));
1960
+ S < te ? (V = K * a, G = W * a) : w <= te && S >= te ? (V = K * a, G = Math.max(I, (S - C) * a)) : w > te && (m.top = !1, V = Math.max((w - C) * a, I), G = Math.max((S - C) * a, I));
1961
1961
  }
1962
- return M = Math.max(M, T.left), H = Math.max(H, T.top), b = Math.max(b, T.left), G = Math.max(G, T.top), {
1962
+ return M = Math.max(M, T.left), V = Math.max(V, T.top), b = Math.max(b, T.left), G = Math.max(G, T.top), {
1963
1963
  left: M,
1964
1964
  right: b,
1965
- top: H,
1965
+ top: V,
1966
1966
  bottom: G,
1967
- absolute: f
1967
+ absolute: m
1968
1968
  };
1969
1969
  }
1970
- const fe = (i, t, e, n, r) => {
1970
+ const me = (i, t, e, n, r) => {
1971
1971
  const { left: s, top: o, width: a, height: d, angle: u } = i, c = {
1972
1972
  left: s,
1973
1973
  right: s + a,
@@ -2001,7 +2001,7 @@ let lt = class extends ee {
2001
2001
  this._renderManagerService = t, this._univerInstanceService = e, this._commandService = n, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = a, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
2002
2002
  }
2003
2003
  _bindScrollEvent() {
2004
- this._lifecycleService.lifecycle$.pipe(Ms((t) => t === Di.Rendered), ys(1)).subscribe(() => {
2004
+ this._lifecycleService.lifecycle$.pipe(Cs((t) => t === vi.Rendered), Rs(1)).subscribe(() => {
2005
2005
  this._scrollUpdateListener();
2006
2006
  });
2007
2007
  }
@@ -2027,7 +2027,7 @@ let lt = class extends ee {
2027
2027
  this._drawingManagerService.add$.subscribe((t) => {
2028
2028
  t.forEach((e) => {
2029
2029
  var K;
2030
- const { unitId: n, subUnitId: r, drawingId: s } = e, o = ae(this._univerInstanceService, { unitId: n, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(e), d = this._univerInstanceService.getUnit(n, $.UNIVER_SHEET);
2030
+ const { unitId: n, subUnitId: r, drawingId: s } = e, o = ae(this._univerInstanceService, { unitId: n, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(e), d = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET);
2031
2031
  if (!d)
2032
2032
  return;
2033
2033
  const u = d.getActiveSheet().getSheetId();
@@ -2039,15 +2039,15 @@ let lt = class extends ee {
2039
2039
  const { transform: l, drawingType: g, data: h } = a;
2040
2040
  if (g !== x.DRAWING_DOM && g !== x.DRAWING_CHART)
2041
2041
  return;
2042
- const f = this._getSceneAndTransformerByDrawingSearch(n);
2043
- if (f == null)
2042
+ const m = this._getSceneAndTransformerByDrawingSearch(n);
2043
+ if (m == null)
2044
2044
  return;
2045
- const { scene: m, canvas: p } = f;
2045
+ const { scene: f, canvas: p } = m;
2046
2046
  if (l == null)
2047
2047
  return !0;
2048
2048
  if (u !== r)
2049
2049
  return;
2050
- const { left: w, top: S, width: I, height: D, angle: v, flipX: C, flipY: _, skewX: y, skewY: R } = l, E = De({ unitId: n, subUnitId: r, drawingId: s }), T = m.getObject(E);
2050
+ const { left: w, top: S, width: I, height: D, angle: v, flipX: C, flipY: _, skewX: y, skewY: R } = l, E = De({ unitId: n, subUnitId: r, drawingId: s }), T = f.getObject(E);
2051
2051
  if (T != null) {
2052
2052
  T.transformByState({ left: w, top: S, width: I, height: D, angle: v, flipX: C, flipY: _, skewX: y, skewY: R });
2053
2053
  return;
@@ -2063,21 +2063,21 @@ let lt = class extends ee {
2063
2063
  const W = h ? h.backgroundColor : "white";
2064
2064
  M.fill = W, h && h.border && (M.stroke = h.border), M.paintFirst = "stroke", M.strokeWidth = 1, M.borderEnabled = !1, M.radius = 8;
2065
2065
  }
2066
- const N = new ke(E, M);
2067
- b && N.setObjectType(An.CHART), m.addObject(N, qt), a.allowTransform !== !1 && m.attachTransformerTo(N);
2068
- const F = new yt(), te = fe(N, f.renderUnit.scene, c.skeleton, o.worksheet), z = new je(te), H = `${ao}${Ve(6)}`, G = {
2066
+ const N = new $e(E, M);
2067
+ b && N.setObjectType(An.CHART), f.addObject(N, qt), a.allowTransform !== !1 && f.attachTransformerTo(N);
2068
+ const F = new yt(), te = me(N, m.renderUnit.scene, c.skeleton, o.worksheet), z = new je(te), V = `${to}${He(6)}`, G = {
2069
2069
  dispose: F,
2070
2070
  rect: N,
2071
2071
  position$: z,
2072
2072
  unitId: n,
2073
2073
  subUnitId: r,
2074
2074
  id: s,
2075
- domId: H
2075
+ domId: V
2076
2076
  };
2077
2077
  this._canvasFloatDomService.addFloatDom({
2078
2078
  position$: z,
2079
2079
  id: s,
2080
- domId: H,
2080
+ domId: V,
2081
2081
  componentKey: a.componentKey,
2082
2082
  onPointerDown: (W) => {
2083
2083
  p.dispatchEvent(new PointerEvent(W.type, W));
@@ -2094,15 +2094,15 @@ let lt = class extends ee {
2094
2094
  data: h,
2095
2095
  unitId: n
2096
2096
  });
2097
- const J = N.onTransformChange$.subscribeEvent(() => {
2098
- const W = fe(N, f.renderUnit.scene, c.skeleton, o.worksheet);
2097
+ const Z = N.onTransformChange$.subscribeEvent(() => {
2098
+ const W = me(N, m.renderUnit.scene, c.skeleton, o.worksheet);
2099
2099
  z.next(
2100
2100
  W
2101
2101
  );
2102
2102
  });
2103
2103
  F.add(() => {
2104
2104
  this._canvasFloatDomService.removeFloatDom(s);
2105
- }), J && F.add(J), this._domLayerInfoMap.set(s, G);
2105
+ }), Z && F.add(Z), this._domLayerInfoMap.set(s, G);
2106
2106
  });
2107
2107
  })
2108
2108
  ), this.disposeWithMe(
@@ -2125,21 +2125,21 @@ let lt = class extends ee {
2125
2125
  !r || !o || !a || s.forEach((u) => {
2126
2126
  const c = this._domLayerInfoMap.get(u);
2127
2127
  if (c) {
2128
- const l = fe(c.rect, r.renderUnit.scene, a.skeleton, o.worksheet, c);
2128
+ const l = me(c.rect, r.renderUnit.scene, a.skeleton, o.worksheet, c);
2129
2129
  c.position$.next(l);
2130
2130
  }
2131
2131
  });
2132
2132
  };
2133
2133
  this.disposeWithMe(
2134
- this._univerInstanceService.getCurrentTypeOfUnit$($.UNIVER_SHEET).pipe(
2135
- me((e) => e ? e.activeSheet$ : wn(null)),
2134
+ this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(
2135
+ fe((e) => e ? e.activeSheet$ : wn(null)),
2136
2136
  pe((e) => {
2137
2137
  if (!e) return null;
2138
2138
  const n = e.getUnitId(), r = this._renderManagerService.getRenderById(n);
2139
2139
  return r ? { render: r, unitId: n, subUnitId: e.getSheetId() } : null;
2140
2140
  }),
2141
- me(
2142
- (e) => e ? bi(e.render.scene.getViewport(cr.VIEW_MAIN).onScrollAfter$).pipe(pe(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : wn(null)
2141
+ fe(
2142
+ (e) => e ? Ii(e.render.scene.getViewport(cr.VIEW_MAIN).onScrollAfter$).pipe(pe(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : wn(null)
2143
2143
  )
2144
2144
  ).subscribe((e) => {
2145
2145
  if (!e) return;
@@ -2147,15 +2147,15 @@ let lt = class extends ee {
2147
2147
  t(n, r);
2148
2148
  })
2149
2149
  ), this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
2150
- if (e.id === kn.id) {
2150
+ if (e.id === $n.id) {
2151
2151
  const n = e.params, { unitId: r } = n;
2152
2152
  Array.from(this._domLayerInfoMap.values()).filter((o) => o.unitId === r).map((o) => o.subUnitId).forEach((o) => {
2153
2153
  t(r, o);
2154
2154
  });
2155
- } else if (e.id === Bi.id) {
2155
+ } else if (e.id === ki.id) {
2156
2156
  const { unitId: n, subUnitId: r } = e.params;
2157
2157
  t(n, r);
2158
- } else if (e.id === ji.id) {
2158
+ } else if (e.id === $i.id) {
2159
2159
  const { unitId: n, subUnitId: r } = e.params;
2160
2160
  t(n, r);
2161
2161
  }
@@ -2165,12 +2165,12 @@ let lt = class extends ee {
2165
2165
  const s = this._domLayerInfoMap.get(n), o = this._getSceneAndTransformerByDrawingSearch(t);
2166
2166
  if (s && o) {
2167
2167
  const { scene: a } = o, d = De({ unitId: t, subUnitId: e, drawingId: n }), u = a.getObject(d);
2168
- u && u instanceof ke && u.setProps(r);
2168
+ u && u instanceof $e && u.setProps(r);
2169
2169
  }
2170
2170
  }
2171
2171
  _getPosition(t, e) {
2172
2172
  var g;
2173
- const { startX: n, endX: r, startY: s, endY: o } = t, a = (g = this._renderManagerService.getRenderById(e)) == null ? void 0 : g.with(Ze);
2173
+ const { startX: n, endX: r, startY: s, endY: o } = t, a = (g = this._renderManagerService.getRenderById(e)) == null ? void 0 : g.with(Je);
2174
2174
  if (a == null)
2175
2175
  return;
2176
2176
  const d = a.getCellWithCoordByOffset(n, s);
@@ -2234,7 +2234,7 @@ let lt = class extends ee {
2234
2234
  });
2235
2235
  if (!n)
2236
2236
  throw new Error("cannot find current target!");
2237
- const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: d, allowTransform: u = !0 } = t, c = e != null ? e : Ve(), l = this._getPosition(o, r);
2237
+ const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: d, allowTransform: u = !0 } = t, c = e != null ? e : He(), l = this._getPosition(o, r);
2238
2238
  if (l == null)
2239
2239
  return;
2240
2240
  const g = {
@@ -2293,13 +2293,13 @@ let lt = class extends ee {
2293
2293
  if (!u) return;
2294
2294
  const c = (C = this._renderManagerService.getRenderById(o)) == null ? void 0 : C.with(X).getWorksheetSkeleton(a);
2295
2295
  if (!c) return;
2296
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Ve(), { position: m, position$: p } = this._createRangePositionObserver(t, u, c.skeleton);
2297
- if (this._getPosition(m, o) == null)
2296
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, m = r != null ? r : He(), { position: f, position$: p } = this._createRangePositionObserver(t, u, c.skeleton);
2297
+ if (this._getPosition(f, o) == null)
2298
2298
  return;
2299
- const S = d.scene, { scaleX: I } = S.getAncestorScale(), D = Ut(m, n, I), v = {
2299
+ const S = d.scene, { scaleX: I } = S.getAncestorScale(), D = Ut(f, n, I), v = {
2300
2300
  unitId: o,
2301
2301
  subUnitId: a,
2302
- drawingId: f,
2302
+ drawingId: m,
2303
2303
  drawingType: e.type || x.DRAWING_DOM,
2304
2304
  componentKey: l,
2305
2305
  transform: {
@@ -2312,7 +2312,7 @@ let lt = class extends ee {
2312
2312
  allowTransform: h
2313
2313
  };
2314
2314
  {
2315
- const { unitId: R, subUnitId: E, drawingId: T } = v, M = ae(this._univerInstanceService, { unitId: R, subUnitId: E }), b = v, N = this._univerInstanceService.getUnit(R, $.UNIVER_SHEET);
2315
+ const { unitId: R, subUnitId: E, drawingId: T } = v, M = ae(this._univerInstanceService, { unitId: R, subUnitId: E }), b = v, N = this._univerInstanceService.getUnit(R, k.UNIVER_SHEET);
2316
2316
  if (!N)
2317
2317
  return;
2318
2318
  const F = N.getActiveSheet().getSheetId();
@@ -2324,22 +2324,22 @@ let lt = class extends ee {
2324
2324
  const z = te.getWorksheetSkeleton(E);
2325
2325
  if (!z)
2326
2326
  return;
2327
- const { transform: H, drawingType: G, data: J } = b;
2327
+ const { transform: V, drawingType: G, data: Z } = b;
2328
2328
  if (G !== x.DRAWING_DOM && G !== x.DRAWING_CHART)
2329
2329
  return;
2330
2330
  const K = this._getSceneAndTransformerByDrawingSearch(R);
2331
2331
  if (K == null)
2332
2332
  return;
2333
2333
  const { scene: W, canvas: Oe } = K;
2334
- if (H == null || F !== E)
2334
+ if (V == null || F !== E)
2335
2335
  return;
2336
- const { left: mt, top: pt, width: wt, height: _t, angle: Zt, flipX: Jt, flipY: St, skewX: vt, skewY: Ue } = H, It = De({ unitId: R, subUnitId: E, drawingId: T }), le = W.getObject(It);
2336
+ const { left: ft, top: pt, width: wt, height: _t, angle: Jt, flipX: Zt, flipY: St, skewX: vt, skewY: Ue } = V, It = De({ unitId: R, subUnitId: E, drawingId: T }), le = W.getObject(It);
2337
2337
  if (le != null) {
2338
- le.transformByState({ left: mt, top: pt, width: wt, height: _t, angle: Zt, flipX: Jt, flipY: St, skewX: vt, skewY: Ue });
2338
+ le.transformByState({ left: ft, top: pt, width: wt, height: _t, angle: Jt, flipX: Zt, flipY: St, skewX: vt, skewY: Ue });
2339
2339
  return;
2340
2340
  }
2341
2341
  const ne = {
2342
- left: mt,
2342
+ left: ft,
2343
2343
  // from floatDomParam.transform
2344
2344
  top: pt,
2345
2345
  width: wt,
@@ -2347,10 +2347,10 @@ let lt = class extends ee {
2347
2347
  zIndex: this._drawingManagerService.getDrawingOrder(R, E).length - 1
2348
2348
  }, Pe = G === x.DRAWING_CHART;
2349
2349
  if (Pe) {
2350
- const k = J ? J.backgroundColor : "white";
2351
- ne.fill = k, ne.rotateEnabled = !1, J && J.border && (ne.stroke = J.border), ne.paintFirst = "stroke", ne.strokeWidth = 1, ne.borderEnabled = !1, ne.radius = 8;
2350
+ const $ = Z ? Z.backgroundColor : "white";
2351
+ ne.fill = $, ne.rotateEnabled = !1, Z && Z.border && (ne.stroke = Z.border), ne.paintFirst = "stroke", ne.strokeWidth = 1, ne.borderEnabled = !1, ne.radius = 8;
2352
2352
  }
2353
- const ue = new ke(It, ne);
2353
+ const ue = new $e(It, ne);
2354
2354
  Pe && ue.setObjectType(An.CHART), W.addObject(ue, qt), b.allowTransform !== !1 && W.attachTransformerTo(ue);
2355
2355
  const he = new yt(), Ct = W.getMainViewport(), { rowHeaderWidth: Ae, columnHeaderHeight: Qe } = z.skeleton, Rt = {
2356
2356
  top: Qe,
@@ -2364,7 +2364,7 @@ let lt = class extends ee {
2364
2364
  domAnchor: n,
2365
2365
  unitId: R,
2366
2366
  subUnitId: E
2367
- }, B = fe(ue, K.renderUnit.scene, z.skeleton, M.worksheet, ge), Ne = new je(B);
2367
+ }, B = me(ue, K.renderUnit.scene, z.skeleton, M.worksheet, ge), Ne = new je(B);
2368
2368
  ge.position$ = Ne;
2369
2369
  let et = {
2370
2370
  position$: Ne,
@@ -2376,53 +2376,53 @@ let lt = class extends ee {
2376
2376
  },
2377
2377
  onPointerUp: () => {
2378
2378
  },
2379
- onWheel: (k) => {
2380
- Oe.dispatchEvent(new WheelEvent(k.type, k));
2379
+ onWheel: ($) => {
2380
+ Oe.dispatchEvent(new WheelEvent($.type, $));
2381
2381
  },
2382
- data: J,
2382
+ data: Z,
2383
2383
  unitId: R
2384
2384
  };
2385
2385
  e.eventPassThrough && (et = {
2386
2386
  ...et,
2387
- onPointerDown: (k) => {
2388
- Oe.dispatchEvent(new PointerEvent(k.type, k));
2387
+ onPointerDown: ($) => {
2388
+ Oe.dispatchEvent(new PointerEvent($.type, $));
2389
2389
  },
2390
- onPointerMove: (k) => {
2391
- Oe.dispatchEvent(new PointerEvent(k.type, k));
2390
+ onPointerMove: ($) => {
2391
+ Oe.dispatchEvent(new PointerEvent($.type, $));
2392
2392
  },
2393
- onPointerUp: (k) => {
2394
- Oe.dispatchEvent(new PointerEvent(k.type, k));
2393
+ onPointerUp: ($) => {
2394
+ Oe.dispatchEvent(new PointerEvent($.type, $));
2395
2395
  }
2396
- }), this._canvasFloatDomService.addFloatDom(et), this.disposeWithMe(p.subscribe((k) => {
2396
+ }), this._canvasFloatDomService.addFloatDom(et), this.disposeWithMe(p.subscribe(($) => {
2397
2397
  var Tn, On, Un, Pn;
2398
2398
  const En = Ut({
2399
- startX: k.startX,
2400
- startY: k.startY,
2401
- endX: k.endX,
2402
- endY: k.endY,
2403
- width: (Tn = n.width) != null ? Tn : k.width,
2404
- height: (On = n.height) != null ? On : k.height,
2399
+ startX: $.startX,
2400
+ startY: $.startY,
2401
+ endX: $.endX,
2402
+ endY: $.endY,
2403
+ width: (Tn = n.width) != null ? Tn : $.width,
2404
+ height: (On = n.height) != null ? On : $.height,
2405
2405
  absolute: {
2406
- left: m.absolute.left,
2407
- top: m.absolute.top
2406
+ left: f.absolute.left,
2407
+ top: f.absolute.top
2408
2408
  }
2409
- }, n), Zr = De({ unitId: R, subUnitId: E, drawingId: T }), Jr = new ke(Zr, {
2409
+ }, n), Gr = De({ unitId: R, subUnitId: E, drawingId: T }), Xr = new $e(Gr, {
2410
2410
  left: En.startX,
2411
2411
  top: En.startY,
2412
- width: (Un = n.width) != null ? Un : k.width,
2413
- height: (Pn = n.height) != null ? Pn : k.height,
2412
+ width: (Un = n.width) != null ? Un : $.width,
2413
+ height: (Pn = n.height) != null ? Pn : $.height,
2414
2414
  zIndex: this._drawingManagerService.getDrawingOrder(R, E).length - 1
2415
- }), qr = fe(Jr, K.renderUnit.scene, z.skeleton, M.worksheet, ge);
2416
- Ne.next(qr);
2415
+ }), zr = me(Xr, K.renderUnit.scene, z.skeleton, M.worksheet, ge);
2416
+ Ne.next(zr);
2417
2417
  }));
2418
2418
  const tt = (y = this._renderManagerService.getRenderById(R)) == null ? void 0 : y.with(X);
2419
- tt == null || tt.currentSkeleton$.subscribe((k) => {
2420
- k && z.sheetId !== k.sheetId && this._removeDom(f, !0);
2419
+ tt == null || tt.currentSkeleton$.subscribe(($) => {
2420
+ $ && z.sheetId !== $.sheetId && this._removeDom(m, !0);
2421
2421
  });
2422
2422
  const Dt = ue.onTransformChange$.subscribeEvent(() => {
2423
- const k = fe(ue, K.renderUnit.scene, z.skeleton, M.worksheet, ge);
2423
+ const $ = me(ue, K.renderUnit.scene, z.skeleton, M.worksheet, ge);
2424
2424
  Ne.next(
2425
- k
2425
+ $
2426
2426
  );
2427
2427
  });
2428
2428
  he.add(() => {
@@ -2430,9 +2430,9 @@ let lt = class extends ee {
2430
2430
  }), Dt && he.add(Dt), this._domLayerInfoMap.set(T, ge);
2431
2431
  }
2432
2432
  return {
2433
- id: f,
2433
+ id: m,
2434
2434
  dispose: () => {
2435
- this._removeDom(f, !0);
2435
+ this._removeDom(m, !0);
2436
2436
  }
2437
2437
  };
2438
2438
  }
@@ -2451,18 +2451,18 @@ let lt = class extends ee {
2451
2451
  if (!u) return;
2452
2452
  const c = (D = this._renderManagerService.getRenderById(o)) == null ? void 0 : D.with(X).getWorksheetSkeleton(a);
2453
2453
  if (!c) return;
2454
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Ve(), { position: m, position$: p } = this._createRangePositionObserver({
2454
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, m = r != null ? r : He(), { position: f, position$: p } = this._createRangePositionObserver({
2455
2455
  startRow: 0,
2456
2456
  endRow: 0,
2457
2457
  startColumn: t,
2458
2458
  endColumn: t
2459
- }, u, c.skeleton), w = m;
2460
- if (w.startY = 0, this._getPosition(m, o) == null)
2459
+ }, u, c.skeleton), w = f;
2460
+ if (w.startY = 0, this._getPosition(f, o) == null)
2461
2461
  return;
2462
2462
  const I = {
2463
2463
  unitId: o,
2464
2464
  subUnitId: a,
2465
- drawingId: f,
2465
+ drawingId: m,
2466
2466
  drawingType: e.type || x.DRAWING_DOM,
2467
2467
  componentKey: l,
2468
2468
  transform: {
@@ -2475,7 +2475,7 @@ let lt = class extends ee {
2475
2475
  allowTransform: h
2476
2476
  };
2477
2477
  {
2478
- const { unitId: _, subUnitId: y, drawingId: R } = I, E = ae(this._univerInstanceService, { unitId: _, subUnitId: y }), T = I, M = this._univerInstanceService.getUnit(_, $.UNIVER_SHEET);
2478
+ const { unitId: _, subUnitId: y, drawingId: R } = I, E = ae(this._univerInstanceService, { unitId: _, subUnitId: y }), T = I, M = this._univerInstanceService.getUnit(_, k.UNIVER_SHEET);
2479
2479
  if (!M)
2480
2480
  return;
2481
2481
  const b = M.getActiveSheet().getSheetId();
@@ -2487,27 +2487,27 @@ let lt = class extends ee {
2487
2487
  const F = N.getWorksheetSkeleton(y);
2488
2488
  if (!F)
2489
2489
  return;
2490
- const { transform: te, data: z } = T, H = this._getSceneAndTransformerByDrawingSearch(_);
2491
- if (H == null)
2490
+ const { transform: te, data: z } = T, V = this._getSceneAndTransformerByDrawingSearch(_);
2491
+ if (V == null)
2492
2492
  return;
2493
- const { scene: G, canvas: J } = H;
2493
+ const { scene: G, canvas: Z } = V;
2494
2494
  if (te == null || b !== y)
2495
2495
  return;
2496
- const { left: K, top: W, width: Oe, height: mt, angle: pt, flipX: wt, flipY: _t, skewX: Zt, skewY: Jt } = te, St = De({ unitId: _, subUnitId: y, drawingId: R }), vt = G.getObject(St);
2496
+ const { left: K, top: W, width: Oe, height: ft, angle: pt, flipX: wt, flipY: _t, skewX: Jt, skewY: Zt } = te, St = De({ unitId: _, subUnitId: y, drawingId: R }), vt = G.getObject(St);
2497
2497
  if (vt != null) {
2498
- vt.transformByState({ left: K, top: W, width: Oe, height: mt, angle: pt, flipX: wt, flipY: _t, skewX: Zt, skewY: Jt });
2498
+ vt.transformByState({ left: K, top: W, width: Oe, height: ft, angle: pt, flipX: wt, flipY: _t, skewX: Jt, skewY: Zt });
2499
2499
  return;
2500
2500
  }
2501
2501
  const Ue = Ut({
2502
2502
  startX: w.startX,
2503
2503
  startY: 0,
2504
- endX: m.endX,
2505
- endY: m.endY,
2504
+ endX: f.endX,
2505
+ endY: f.endY,
2506
2506
  width: n.width,
2507
2507
  height: n.height,
2508
2508
  absolute: {
2509
- left: m.absolute.left,
2510
- top: m.absolute.top
2509
+ left: f.absolute.left,
2510
+ top: f.absolute.top
2511
2511
  }
2512
2512
  }, n), It = {
2513
2513
  left: Ue.startX,
@@ -2515,7 +2515,7 @@ let lt = class extends ee {
2515
2515
  width: Ue.width,
2516
2516
  height: Ue.height,
2517
2517
  zIndex: this._drawingManagerService.getDrawingOrder(_, y).length - 1
2518
- }, le = new ke(St, It);
2518
+ }, le = new $e(St, It);
2519
2519
  G.addObject(le, qt), T.allowTransform !== !1 && G.attachTransformerTo(le);
2520
2520
  const ne = new yt(), Pe = G.getMainViewport(), ue = {
2521
2521
  top: 0,
@@ -2533,7 +2533,7 @@ let lt = class extends ee {
2533
2533
  domAnchor: n,
2534
2534
  scrollDirectionResponse: "HORIZONTAL"
2535
2535
  /* HORIZONTAL */
2536
- }, Ct = fe(le, H.renderUnit.scene, F.skeleton, E.worksheet, he), Ae = new je(Ct);
2536
+ }, Ct = me(le, V.renderUnit.scene, F.skeleton, E.worksheet, he), Ae = new je(Ct);
2537
2537
  he.position$ = Ae;
2538
2538
  let Qe = {
2539
2539
  position$: Ae,
@@ -2546,7 +2546,7 @@ let lt = class extends ee {
2546
2546
  onPointerUp: () => {
2547
2547
  },
2548
2548
  onWheel: (B) => {
2549
- J.dispatchEvent(new WheelEvent(B.type, B));
2549
+ Z.dispatchEvent(new WheelEvent(B.type, B));
2550
2550
  },
2551
2551
  data: z,
2552
2552
  unitId: _
@@ -2554,17 +2554,17 @@ let lt = class extends ee {
2554
2554
  e.eventPassThrough && (Qe = {
2555
2555
  ...Qe,
2556
2556
  onPointerDown: (B) => {
2557
- J.dispatchEvent(new PointerEvent(B.type, B));
2557
+ Z.dispatchEvent(new PointerEvent(B.type, B));
2558
2558
  },
2559
2559
  onPointerMove: (B) => {
2560
- J.dispatchEvent(new PointerEvent(B.type, B));
2560
+ Z.dispatchEvent(new PointerEvent(B.type, B));
2561
2561
  },
2562
2562
  onPointerUp: (B) => {
2563
- J.dispatchEvent(new PointerEvent(B.type, B));
2563
+ Z.dispatchEvent(new PointerEvent(B.type, B));
2564
2564
  }
2565
2565
  }), this._canvasFloatDomService.addFloatDom(Qe);
2566
2566
  const Rt = le.onTransformChange$.subscribeEvent(() => {
2567
- const B = fe(le, H.renderUnit.scene, F.skeleton, E.worksheet, he);
2567
+ const B = me(le, V.renderUnit.scene, F.skeleton, E.worksheet, he);
2568
2568
  Ae.next(
2569
2569
  B
2570
2570
  );
@@ -2578,29 +2578,29 @@ let lt = class extends ee {
2578
2578
  width: n.width,
2579
2579
  height: n.height,
2580
2580
  absolute: {
2581
- left: m.absolute.left,
2582
- top: m.absolute.top
2581
+ left: f.absolute.left,
2582
+ top: f.absolute.top
2583
2583
  }
2584
- }, n), et = De({ unitId: _, subUnitId: y, drawingId: R }), tt = new ke(et, {
2584
+ }, n), et = De({ unitId: _, subUnitId: y, drawingId: R }), tt = new $e(et, {
2585
2585
  left: Ne.startX,
2586
2586
  top: 0,
2587
2587
  width: n.width,
2588
2588
  height: n.height,
2589
2589
  zIndex: this._drawingManagerService.getDrawingOrder(_, y).length - 1
2590
- }), Dt = fe(tt, H.renderUnit.scene, F.skeleton, E.worksheet, he);
2590
+ }), Dt = me(tt, V.renderUnit.scene, F.skeleton, E.worksheet, he);
2591
2591
  Ae.next(Dt);
2592
2592
  }));
2593
2593
  const ge = (C = this._renderManagerService.getRenderById(_)) == null ? void 0 : C.with(X);
2594
2594
  ge == null || ge.currentSkeleton$.subscribe((B) => {
2595
- B && c.sheetId !== B.sheetId && this._removeDom(f, !0);
2595
+ B && c.sheetId !== B.sheetId && this._removeDom(m, !0);
2596
2596
  }), ne.add(() => {
2597
2597
  this._canvasFloatDomService.removeFloatDom(R);
2598
2598
  }), Rt && ne.add(Rt), this._domLayerInfoMap.set(R, he);
2599
2599
  }
2600
2600
  return {
2601
- id: f,
2601
+ id: m,
2602
2602
  dispose: () => {
2603
- this._removeDom(f, !0);
2603
+ this._removeDom(m, !0);
2604
2604
  }
2605
2605
  };
2606
2606
  }
@@ -2622,11 +2622,11 @@ let lt = class extends ee {
2622
2622
  a.next(p), u.next(w);
2623
2623
  }, l = new yt();
2624
2624
  l.add(e.engine.clientRect$.subscribe(() => c())), l.add(this._commandService.onCommandExecuted((p) => {
2625
- if (p.id === Fi.id && p.params.rowsAutoHeightInfo.findIndex((S) => S.row === r) > -1) {
2625
+ if (p.id === xi.id && p.params.rowsAutoHeightInfo.findIndex((S) => S.row === r) > -1) {
2626
2626
  c();
2627
2627
  return;
2628
2628
  }
2629
- (Li.indexOf(p.id) > -1 || p.id === hi.id || p.id === kn.id) && c();
2629
+ (Wi.indexOf(p.id) > -1 || p.id === ci.id || p.id === $n.id) && c();
2630
2630
  }));
2631
2631
  const g = (p, w) => {
2632
2632
  r = p, s = w, c();
@@ -2642,7 +2642,7 @@ let lt = class extends ee {
2642
2642
  startY: o.top,
2643
2643
  endX: d.right,
2644
2644
  endY: d.bottom
2645
- }), f = a.pipe(
2645
+ }), m = a.pipe(
2646
2646
  pe((p) => {
2647
2647
  const w = st(t.endRow, t.endColumn, n);
2648
2648
  return {
@@ -2659,10 +2659,10 @@ let lt = class extends ee {
2659
2659
  endY: w.bottom
2660
2660
  };
2661
2661
  })
2662
- ), m = h();
2662
+ ), f = h();
2663
2663
  return {
2664
- position$: f,
2665
- position: m,
2664
+ position$: m,
2665
+ position: f,
2666
2666
  updateRowCol: g,
2667
2667
  topLeftPos$: a,
2668
2668
  rightBottomPos$: u,
@@ -2670,14 +2670,14 @@ let lt = class extends ee {
2670
2670
  };
2671
2671
  }
2672
2672
  };
2673
- lt = oo([
2673
+ lt = eo([
2674
2674
  be(0, A(Q)),
2675
2675
  be(1, de),
2676
2676
  be(2, A(Y)),
2677
2677
  be(3, oe),
2678
- be(4, A(us)),
2678
+ be(4, A(as)),
2679
2679
  be(5, se),
2680
- be(6, A(Ri))
2680
+ be(6, A(Si))
2681
2681
  ], lt);
2682
2682
  function st(i, t, e) {
2683
2683
  const n = e.getCellWithCoordByIndex(i, t), r = n.isMergedMainCell ? n.mergeInfo : n;
@@ -2725,7 +2725,7 @@ function Pt(i, t) {
2725
2725
  const e = Number.parseFloat(i);
2726
2726
  return t * e / 100;
2727
2727
  }
2728
- const co = (i) => {
2728
+ const no = (i) => {
2729
2729
  const { floatDomInfos: t, scene: e, skeleton: n, worksheet: r } = i, s = Fe(() => t.map((o) => {
2730
2730
  const { width: a, height: d, angle: u, left: c, top: l } = o.transform, g = Hr(
2731
2731
  {
@@ -2739,18 +2739,18 @@ const co = (i) => {
2739
2739
  r,
2740
2740
  void 0,
2741
2741
  !0
2742
- ), { scaleX: h, scaleY: f } = e.getAncestorScale(), m = {
2742
+ ), { scaleX: h, scaleY: m } = e.getAncestorScale(), f = {
2743
2743
  startX: g.left,
2744
2744
  endX: g.right,
2745
2745
  startY: g.top,
2746
2746
  endY: g.bottom,
2747
2747
  rotate: u,
2748
2748
  width: a * h,
2749
- height: d * f,
2749
+ height: d * m,
2750
2750
  absolute: g.absolute
2751
2751
  }, p = {
2752
- position$: new je(m),
2753
- position: m,
2752
+ position$: new je(f),
2753
+ position: f,
2754
2754
  id: o.drawingId,
2755
2755
  componentKey: o.componentKey,
2756
2756
  onPointerMove: () => {
@@ -2766,10 +2766,10 @@ const co = (i) => {
2766
2766
  };
2767
2767
  return [o.drawingId, p];
2768
2768
  }), [t, e, n, r]);
2769
- return /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ L(hs, { layer: a, id: o, position: a.position }, o)) });
2769
+ return /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ L(cs, { layer: a, id: o, position: a.position }, o)) });
2770
2770
  };
2771
- var lo = Object.getOwnPropertyDescriptor, uo = (i, t, e, n) => {
2772
- for (var r = n > 1 ? void 0 : n ? lo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2771
+ var ro = Object.getOwnPropertyDescriptor, io = (i, t, e, n) => {
2772
+ for (var r = n > 1 ? void 0 : n ? ro(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2773
2773
  (o = i[s]) && (r = o(r) || r);
2774
2774
  return r;
2775
2775
  }, Me = (i, t) => (e, n) => t(e, n, i);
@@ -2808,8 +2808,8 @@ let jt = class extends ee {
2808
2808
  const { scaleX: u, scaleY: c } = s.scene, l = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, g = d.order.map((h) => d.data[h]);
2809
2809
  return g.length ? (g.forEach((h) => {
2810
2810
  if (!h.groupId && h.transform && Ye.isDefine(h.transform.left) && Ye.isDefine(h.transform.top) && Ye.isDefine(h.transform.width) && Ye.isDefine(h.transform.height)) {
2811
- const f = o.skeleton.getCellIndexByOffset(h.transform.left, h.transform.top, u, c, { x: 0, y: 0 }), m = o.skeleton.getCellIndexByOffset(h.transform.left + h.transform.width, h.transform.top + h.transform.height, u, c, { x: 0, y: 0 });
2812
- f.column < l.startColumn && (l.startColumn = f.column), f.row < l.startRow && (l.startRow = f.row), l.endRow < m.row && (l.endRow = m.row), l.endColumn < m.column && (l.endColumn = m.column);
2811
+ const m = o.skeleton.getCellIndexByOffset(h.transform.left, h.transform.top, u, c, { x: 0, y: 0 }), f = o.skeleton.getCellIndexByOffset(h.transform.left + h.transform.width, h.transform.top + h.transform.height, u, c, { x: 0, y: 0 });
2812
+ m.column < l.startColumn && (l.startColumn = m.column), m.row < l.startRow && (l.startRow = m.row), l.endRow < f.row && (l.endRow = f.row), l.endColumn < f.column && (l.endColumn = f.column);
2813
2813
  }
2814
2814
  }), e(l)) : e(i);
2815
2815
  }
@@ -2830,7 +2830,7 @@ let jt = class extends ee {
2830
2830
  if (c.drawingType === x.DRAWING_CHART)
2831
2831
  return {
2832
2832
  ...c,
2833
- componentKey: this._componetManager.get(Mi)
2833
+ componentKey: this._componetManager.get(Ci)
2834
2834
  };
2835
2835
  if (c.drawingType === x.DRAWING_DOM) {
2836
2836
  const l = this._sheetPrintInterceptorService.getPrintComponent(c.componentKey);
@@ -2840,12 +2840,12 @@ let jt = class extends ee {
2840
2840
  };
2841
2841
  }
2842
2842
  return null;
2843
- }).filter(Boolean), d = gs(co, this._injector);
2844
- return Ji(
2843
+ }).filter(Boolean), d = ds(no, this._injector);
2844
+ return Xi(
2845
2845
  /* @__PURE__ */ L(d, { floatDomInfos: a, scene: t.scene, skeleton: t.skeleton, worksheet: t.worksheet }),
2846
2846
  t.root
2847
2847
  ), i == null || i.add(() => {
2848
- qi(t.root);
2848
+ zi(t.root);
2849
2849
  }), e(i);
2850
2850
  }
2851
2851
  }
@@ -2854,8 +2854,8 @@ let jt = class extends ee {
2854
2854
  );
2855
2855
  }
2856
2856
  };
2857
- jt = uo([
2858
- Me(0, A(gi)),
2857
+ jt = io([
2858
+ Me(0, A(di)),
2859
2859
  Me(1, A(Pr)),
2860
2860
  Me(2, oe),
2861
2861
  Me(3, Q),
@@ -2863,21 +2863,21 @@ jt = uo([
2863
2863
  Me(5, A(Ur)),
2864
2864
  Me(6, A(qe))
2865
2865
  ], jt);
2866
- var ho = Object.getOwnPropertyDescriptor, go = (i, t, e, n) => {
2867
- for (var r = n > 1 ? void 0 : n ? ho(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2866
+ var so = Object.getOwnPropertyDescriptor, oo = (i, t, e, n) => {
2867
+ for (var r = n > 1 ? void 0 : n ? so(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2868
2868
  (o = i[s]) && (r = o(r) || r);
2869
2869
  return r;
2870
2870
  }, _e = (i, t) => (e, n) => t(e, n, i);
2871
- const fo = [
2871
+ const ao = [
2872
2872
  gr.id,
2873
- fr.id,
2874
2873
  mr.id,
2874
+ fr.id,
2875
2875
  pr.id,
2876
2876
  wr.id,
2877
2877
  _r.id,
2878
2878
  Sr.id,
2879
2879
  vr.id,
2880
- mn.id,
2880
+ fn.id,
2881
2881
  pn.id,
2882
2882
  Ir.id,
2883
2883
  Cr.id,
@@ -2888,13 +2888,13 @@ const fo = [
2888
2888
  yr.id,
2889
2889
  Er.id,
2890
2890
  Tr.id
2891
- ], mo = [
2892
- Vi.id,
2891
+ ], co = [
2892
+ Bi.id,
2893
+ ji.id,
2894
+ Fi.id,
2895
+ Li.id,
2893
2896
  Hi.id,
2894
- Yi.id,
2895
- Gi.id,
2896
- Xi.id,
2897
- zi.id
2897
+ Vi.id
2898
2898
  ];
2899
2899
  let Rn = class extends ee {
2900
2900
  constructor(i, t, e, n, r, s, o, a, d) {
@@ -2905,7 +2905,7 @@ let Rn = class extends ee {
2905
2905
  this._sheetInterceptorService.interceptAfterCommand({
2906
2906
  /* eslint-disable-next-line complexity */
2907
2907
  getMutations: (i) => {
2908
- if (!fo.includes(i.id))
2908
+ if (!ao.includes(i.id))
2909
2909
  return { redos: [], undos: [] };
2910
2910
  if (i.params == null)
2911
2911
  return { redos: [], undos: [] };
@@ -2914,9 +2914,9 @@ let Rn = class extends ee {
2914
2914
  return this._moveRowInterceptor(i.params, "insert");
2915
2915
  if ([yr.id, Er.id, Tr.id].includes(t))
2916
2916
  return this._moveRangeInterceptor(i.params);
2917
- if (t === fr.id)
2918
- return this._moveColInterceptor(i.params, "insert");
2919
2917
  if (t === mr.id)
2918
+ return this._moveColInterceptor(i.params, "insert");
2919
+ if (t === fr.id)
2920
2920
  return this._moveRowInterceptor(i.params, "remove");
2921
2921
  if (t === pr.id)
2922
2922
  return this._moveColInterceptor(i.params, "remove");
@@ -2954,8 +2954,8 @@ let Rn = class extends ee {
2954
2954
  } else if (t === br.id || t === Mr.id) {
2955
2955
  const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e;
2956
2956
  return this._getDrawingUndoForColVisible(n, r, s);
2957
- } else if (t === mn.id || t === pn.id || t === Ir.id || t === Cr.id) {
2958
- const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e, o = t === mn.id || t === pn.id;
2957
+ } else if (t === fn.id || t === pn.id || t === Ir.id || t === Cr.id) {
2958
+ const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e, o = t === fn.id || t === pn.id;
2959
2959
  return this._getDrawingUndoForRowAndColSize(n, r, s, o);
2960
2960
  }
2961
2961
  return { redos: [], undos: [] };
@@ -2981,13 +2981,13 @@ let Rn = class extends ee {
2981
2981
  const c = this._sheetDrawingService.getBatchRemoveOp(u), l = c.undo, g = c.redo, h = c.objects;
2982
2982
  s.push({ id: P.id, params: { unitId: n, subUnitId: r, op: g, objects: h, type: U.REMOVE } }), o.push({ id: P.id, params: { unitId: n, subUnitId: r, op: l, objects: h, type: U.INSERT } });
2983
2983
  }
2984
- return s.push({ id: V.id, params: [n] }), o.push({ id: V.id, params: [n] }), {
2984
+ return s.push({ id: H.id, params: [n] }), o.push({ id: H.id, params: [n] }), {
2985
2985
  redos: s,
2986
2986
  undos: o
2987
2987
  };
2988
2988
  }
2989
2989
  _getUpdateOrDeleteDrawings(i, t, e) {
2990
- const n = [], r = [], { sheetTransform: s, anchorType: o = O.Position, transform: a, unitId: d, subUnitId: u, drawingId: c } = e, { from: l, to: g } = s, { row: h, column: f } = l, { row: m, column: p } = g;
2990
+ const n = [], r = [], { sheetTransform: s, anchorType: o = O.Position, transform: a, unitId: d, subUnitId: u, drawingId: c } = e, { from: l, to: g } = s, { row: h, column: m } = l, { row: f, column: p } = g;
2991
2991
  if (s == null || a == null)
2992
2992
  return {
2993
2993
  updateDrawings: n,
@@ -2995,15 +2995,15 @@ let Rn = class extends ee {
2995
2995
  };
2996
2996
  const { startRow: w, endRow: S, startColumn: I, endColumn: D } = i;
2997
2997
  let v = null, C = null;
2998
- if (t === 0 && h >= w && m <= S)
2999
- if (f >= I && p <= D)
2998
+ if (t === 0 && h >= w && f <= S)
2999
+ if (m >= I && p <= D)
3000
3000
  r.push({ unitId: d, subUnitId: u, drawingId: c });
3001
3001
  else {
3002
3002
  const _ = this._shrinkCol(s, a, I, D, o);
3003
3003
  v = _ == null ? void 0 : _.newSheetTransform, C = _ == null ? void 0 : _.newTransform;
3004
3004
  }
3005
- else if (t === 1 && f >= I && p <= D)
3006
- if (h >= w && m <= S)
3005
+ else if (t === 1 && m >= I && p <= D)
3006
+ if (h >= w && f <= S)
3007
3007
  r.push({ unitId: d, subUnitId: u, drawingId: c });
3008
3008
  else {
3009
3009
  const _ = this._shrinkRow(s, a, w, S, o);
@@ -3017,7 +3017,7 @@ let Rn = class extends ee {
3017
3017
  v = _ == null ? void 0 : _.newSheetTransform, C = _ == null ? void 0 : _.newTransform;
3018
3018
  }
3019
3019
  if (v != null && C != null) {
3020
- const _ = Z(v, this._selectionRenderService, this._skeletonManagerService);
3020
+ const _ = J(v, this._selectionRenderService, this._skeletonManagerService);
3021
3021
  n.push({ ...e, sheetTransform: v, transform: _ });
3022
3022
  }
3023
3023
  return { updateDrawings: n, deleteDrawings: r };
@@ -3033,19 +3033,19 @@ let Rn = class extends ee {
3033
3033
  _getDrawingUndoForColVisible(i, t, e) {
3034
3034
  const n = this._drawingManagerService.getDrawingData(i, t), r = [], s = [];
3035
3035
  if (Object.keys(n).forEach((c) => {
3036
- const l = n[c], { sheetTransform: g, transform: h, anchorType: f = O.Position } = l;
3037
- if (f === O.None)
3036
+ const l = n[c], { sheetTransform: g, transform: h, anchorType: m = O.Position } = l;
3037
+ if (m === O.None)
3038
3038
  this._remainDrawingSize(h, r, l);
3039
3039
  else {
3040
- const { from: m, to: p } = g, { row: w, column: S } = m, { row: I, column: D } = p;
3040
+ const { from: f, to: p } = g, { row: w, column: S } = f, { row: I, column: D } = p;
3041
3041
  for (let v = 0; v < e.length; v++) {
3042
3042
  const C = e[v], { startRow: _, endRow: y, startColumn: R, endColumn: E } = C;
3043
3043
  if (D < R)
3044
3044
  continue;
3045
- if (f === O.Position) {
3045
+ if (m === O.Position) {
3046
3046
  let b = null, N = null;
3047
3047
  if (S >= R && S <= E) {
3048
- const F = this._skeletonManagerService.attachRangeWithCoord({ startColumn: S, endColumn: E, startRow: m.row, endRow: p.row });
3048
+ const F = this._skeletonManagerService.attachRangeWithCoord({ startColumn: S, endColumn: E, startRow: f.row, endRow: p.row });
3049
3049
  if (F == null)
3050
3050
  return;
3051
3051
  N = { ...h, left: F.startX };
@@ -3061,7 +3061,7 @@ let Rn = class extends ee {
3061
3061
  continue;
3062
3062
  let T = null, M = null;
3063
3063
  if (S >= R && S <= E) {
3064
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: S, endColumn: E, startRow: m.row, endRow: p.row });
3064
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: S, endColumn: E, startRow: f.row, endRow: p.row });
3065
3065
  if (b == null)
3066
3066
  return;
3067
3067
  M = {
@@ -3070,7 +3070,7 @@ let Rn = class extends ee {
3070
3070
  width: ((h == null ? void 0 : h.width) || 0) - b.endX + b.startX
3071
3071
  };
3072
3072
  } else if (D >= R && D <= E) {
3073
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: R, endColumn: D, startRow: m.row, endRow: p.row });
3073
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: R, endColumn: D, startRow: f.row, endRow: p.row });
3074
3074
  if (b == null)
3075
3075
  return;
3076
3076
  M = {
@@ -3078,7 +3078,7 @@ let Rn = class extends ee {
3078
3078
  left: b.startX - ((h == null ? void 0 : h.width) || 0)
3079
3079
  };
3080
3080
  } else {
3081
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: R, endColumn: E, startRow: m.row, endRow: p.row });
3081
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: R, endColumn: E, startRow: f.row, endRow: p.row });
3082
3082
  if (b == null)
3083
3083
  return;
3084
3084
  if (M = {
@@ -3113,10 +3113,10 @@ let Rn = class extends ee {
3113
3113
  _createUndoAndRedoMutation(i, t, e) {
3114
3114
  const n = this._sheetDrawingService.getBatchUpdateOp(e), { undo: r, redo: s, objects: o } = n, a = [
3115
3115
  { id: P.id, params: { unitId: i, subUnitId: t, op: s, objects: o, type: U.UPDATE } },
3116
- { id: V.id, params: [i] }
3116
+ { id: H.id, params: [i] }
3117
3117
  ], d = [
3118
3118
  { id: P.id, params: { unitId: i, subUnitId: t, op: r, objects: o, type: U.UPDATE } },
3119
- { id: V.id, params: [i] }
3119
+ { id: H.id, params: [i] }
3120
3120
  ];
3121
3121
  return {
3122
3122
  redos: a,
@@ -3127,19 +3127,19 @@ let Rn = class extends ee {
3127
3127
  _getDrawingUndoForRowVisible(i, t, e) {
3128
3128
  const n = this._drawingManagerService.getDrawingData(i, t), r = [], s = [];
3129
3129
  if (Object.keys(n).forEach((c) => {
3130
- const l = n[c], { sheetTransform: g, transform: h, anchorType: f = O.Position } = l;
3131
- if (f === O.None)
3130
+ const l = n[c], { sheetTransform: g, transform: h, anchorType: m = O.Position } = l;
3131
+ if (m === O.None)
3132
3132
  this._remainDrawingSize(h, r, l);
3133
3133
  else {
3134
- const { from: m, to: p } = g, { row: w, column: S } = m, { row: I, column: D } = p;
3134
+ const { from: f, to: p } = g, { row: w, column: S } = f, { row: I, column: D } = p;
3135
3135
  for (let v = 0; v < e.length; v++) {
3136
3136
  const C = e[v], { startRow: _, endRow: y, startColumn: R, endColumn: E } = C;
3137
3137
  if (I < _)
3138
3138
  continue;
3139
- if (f === O.Position) {
3139
+ if (m === O.Position) {
3140
3140
  let b = null, N = null;
3141
3141
  if (w >= _ && w <= y) {
3142
- const F = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: y });
3142
+ const F = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: w, endRow: y });
3143
3143
  if (F == null)
3144
3144
  return;
3145
3145
  N = { ...h, top: F.startY };
@@ -3155,7 +3155,7 @@ let Rn = class extends ee {
3155
3155
  continue;
3156
3156
  let T = null, M = null;
3157
3157
  if (w >= _ && w <= y) {
3158
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: y });
3158
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: w, endRow: y });
3159
3159
  if (b == null)
3160
3160
  return;
3161
3161
  M = {
@@ -3164,7 +3164,7 @@ let Rn = class extends ee {
3164
3164
  height: ((h == null ? void 0 : h.height) || 0) - b.endY + b.startY
3165
3165
  };
3166
3166
  } else if (I >= _ && I <= y) {
3167
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: _, endRow: I });
3167
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: _, endRow: I });
3168
3168
  if (b == null)
3169
3169
  return;
3170
3170
  M = {
@@ -3172,7 +3172,7 @@ let Rn = class extends ee {
3172
3172
  top: b.startY - ((h == null ? void 0 : h.height) || 0)
3173
3173
  };
3174
3174
  } else {
3175
- const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: _, endRow: y });
3175
+ const b = this._skeletonManagerService.attachRangeWithCoord({ startColumn: f.column, endColumn: p.column, startRow: _, endRow: y });
3176
3176
  if (b == null)
3177
3177
  return;
3178
3178
  if (M = {
@@ -3211,16 +3211,16 @@ let Rn = class extends ee {
3211
3211
  if (c === O.None)
3212
3212
  this._remainDrawingSize(u, s, a);
3213
3213
  else {
3214
- const { from: l, to: g } = d, { row: h, column: f } = l, { row: m, column: p } = g;
3214
+ const { from: l, to: g } = d, { row: h, column: m } = l, { row: f, column: p } = g;
3215
3215
  for (let w = 0; w < e.length; w++) {
3216
3216
  const S = e[w], { startRow: I, endRow: D, startColumn: v, endColumn: C } = S;
3217
- if (m < I || p < v)
3217
+ if (f < I || p < v)
3218
3218
  continue;
3219
- if (c === O.Position && (h <= I && m >= D || f <= v && p >= C)) {
3219
+ if (c === O.Position && (h <= I && f >= D || m <= v && p >= C)) {
3220
3220
  this._remainDrawingSize(u, s, a);
3221
3221
  continue;
3222
3222
  }
3223
- const _ = Z({ ...d }, this._selectionRenderService, this._skeletonManagerService);
3223
+ const _ = J({ ...d }, this._selectionRenderService, this._skeletonManagerService);
3224
3224
  if (_ != null) {
3225
3225
  s.push({
3226
3226
  ...a,
@@ -3271,11 +3271,11 @@ let Rn = class extends ee {
3271
3271
  };
3272
3272
  d <= M && b <= u && c <= N && F <= l && h.push(C);
3273
3273
  });
3274
- const f = [], m = [], p = t.startRow - e.startRow, w = t.startColumn - e.startColumn, S = h.map((v) => {
3274
+ const m = [], f = [], p = t.startRow - e.startRow, w = t.startColumn - e.startColumn, S = h.map((v) => {
3275
3275
  const C = v.sheetTransform, _ = {
3276
3276
  to: { ...C.to, row: C.to.row + p, column: C.to.column + w },
3277
3277
  from: { ...C.from, row: C.from.row + p, column: C.from.column + w }
3278
- }, y = Z(_, this._selectionRenderService, this._skeletonManagerService);
3278
+ }, y = J(_, this._selectionRenderService, this._skeletonManagerService);
3279
3279
  return {
3280
3280
  unitId: r,
3281
3281
  subUnitId: s,
@@ -3286,9 +3286,9 @@ let Rn = class extends ee {
3286
3286
  });
3287
3287
  if (S.length) {
3288
3288
  const v = this._sheetDrawingService.getBatchUpdateOp(S), { undo: C, redo: _, objects: y } = v;
3289
- f.push({ id: P.id, params: { unitId: r, subUnitId: s, op: _, objects: y, type: U.UPDATE } }), m.push({ id: P.id, params: { unitId: r, subUnitId: s, op: C, objects: y, type: U.UPDATE } });
3289
+ m.push({ id: P.id, params: { unitId: r, subUnitId: s, op: _, objects: y, type: U.UPDATE } }), f.push({ id: P.id, params: { unitId: r, subUnitId: s, op: C, objects: y, type: U.UPDATE } });
3290
3290
  }
3291
- return { redos: f, undos: m };
3291
+ return { redos: m, undos: f };
3292
3292
  }
3293
3293
  _moveRowInterceptor(i, t) {
3294
3294
  const e = this._getUnitIdAndSubUnitId(i, t);
@@ -3296,19 +3296,19 @@ let Rn = class extends ee {
3296
3296
  return { redos: [], undos: [] };
3297
3297
  const { unitId: n, subUnitId: r } = e, { range: s } = i, o = s.startRow, a = s.endRow, d = [], u = [], c = this._sheetDrawingService.getDrawingData(n, r), l = [], g = [];
3298
3298
  if (Object.keys(c).forEach((h) => {
3299
- const f = c[h], { sheetTransform: m, transform: p, anchorType: w = O.Position } = f;
3300
- if (m == null || p == null)
3299
+ const m = c[h], { sheetTransform: f, transform: p, anchorType: w = O.Position } = m;
3300
+ if (f == null || p == null)
3301
3301
  return;
3302
3302
  let S, I;
3303
3303
  if (t === "insert") {
3304
- const v = this._expandRow(m, p, o, a, w);
3304
+ const v = this._expandRow(f, p, o, a, w);
3305
3305
  S = v == null ? void 0 : v.newSheetTransform, I = v == null ? void 0 : v.newTransform;
3306
3306
  } else {
3307
- const { from: v, to: C } = m, { row: _ } = v, { row: y } = C;
3307
+ const { from: v, to: C } = f, { row: _ } = v, { row: y } = C;
3308
3308
  if (w === O.Both && _ >= o && y <= a)
3309
3309
  g.push({ unitId: n, subUnitId: r, drawingId: h });
3310
3310
  else {
3311
- const R = this._shrinkRow(m, p, o, a, w);
3311
+ const R = this._shrinkRow(f, p, o, a, w);
3312
3312
  S = R == null ? void 0 : R.newSheetTransform, I = R == null ? void 0 : R.newTransform;
3313
3313
  }
3314
3314
  }
@@ -3319,14 +3319,14 @@ let Rn = class extends ee {
3319
3319
  }), l.length === 0 && g.length === 0)
3320
3320
  return { redos: [], undos: [] };
3321
3321
  if (l.length > 0) {
3322
- const h = this._sheetDrawingService.getBatchUpdateOp(l), { undo: f, redo: m, objects: p } = h;
3323
- d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.UPDATE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.UPDATE } });
3322
+ const h = this._sheetDrawingService.getBatchUpdateOp(l), { undo: m, redo: f, objects: p } = h;
3323
+ d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.UPDATE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.UPDATE } });
3324
3324
  }
3325
3325
  if (g.length > 0) {
3326
- const h = this._sheetDrawingService.getBatchRemoveOp(g), f = h.undo, m = h.redo, p = h.objects;
3327
- d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.REMOVE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.INSERT } });
3326
+ const h = this._sheetDrawingService.getBatchRemoveOp(g), m = h.undo, f = h.redo, p = h.objects;
3327
+ d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.REMOVE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.INSERT } });
3328
3328
  }
3329
- return d.push({ id: V.id, params: [n] }), u.push({ id: V.id, params: [n] }), {
3329
+ return d.push({ id: H.id, params: [n] }), u.push({ id: H.id, params: [n] }), {
3330
3330
  redos: d,
3331
3331
  undos: u
3332
3332
  };
@@ -3337,19 +3337,19 @@ let Rn = class extends ee {
3337
3337
  return { redos: [], undos: [] };
3338
3338
  const { unitId: n, subUnitId: r } = e, { range: s } = i, o = s.startColumn, a = s.endColumn, d = [], u = [], c = this._sheetDrawingService.getDrawingData(n, r), l = [], g = [];
3339
3339
  if (Object.keys(c).forEach((h) => {
3340
- const f = c[h], { sheetTransform: m, transform: p, anchorType: w = O.Position } = f;
3341
- if (m == null || p == null)
3340
+ const m = c[h], { sheetTransform: f, transform: p, anchorType: w = O.Position } = m;
3341
+ if (f == null || p == null)
3342
3342
  return;
3343
3343
  let S, I;
3344
3344
  if (t === "insert") {
3345
- const v = this._expandCol(m, p, o, a, w);
3345
+ const v = this._expandCol(f, p, o, a, w);
3346
3346
  S = v == null ? void 0 : v.newSheetTransform, I = v == null ? void 0 : v.newTransform;
3347
3347
  } else {
3348
- const { from: v, to: C } = m, { column: _ } = v, { column: y } = C;
3348
+ const { from: v, to: C } = f, { column: _ } = v, { column: y } = C;
3349
3349
  if (w === O.Both && _ >= o && y <= a)
3350
3350
  g.push({ unitId: n, subUnitId: r, drawingId: h });
3351
3351
  else {
3352
- const R = this._shrinkCol(m, p, o, a, w);
3352
+ const R = this._shrinkCol(f, p, o, a, w);
3353
3353
  S = R == null ? void 0 : R.newSheetTransform, I = R == null ? void 0 : R.newTransform;
3354
3354
  }
3355
3355
  }
@@ -3360,14 +3360,14 @@ let Rn = class extends ee {
3360
3360
  }), l.length === 0 && g.length === 0)
3361
3361
  return { redos: [], undos: [] };
3362
3362
  if (l.length > 0) {
3363
- const h = this._sheetDrawingService.getBatchUpdateOp(l), { undo: f, redo: m, objects: p } = h;
3364
- d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.UPDATE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.UPDATE } });
3363
+ const h = this._sheetDrawingService.getBatchUpdateOp(l), { undo: m, redo: f, objects: p } = h;
3364
+ d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.UPDATE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.UPDATE } });
3365
3365
  }
3366
3366
  if (g.length > 0) {
3367
- const h = this._sheetDrawingService.getBatchRemoveOp(g), f = h.undo, m = h.redo, p = h.objects;
3368
- d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.REMOVE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.INSERT } });
3367
+ const h = this._sheetDrawingService.getBatchRemoveOp(g), m = h.undo, f = h.redo, p = h.objects;
3368
+ d.push({ id: P.id, params: { unitId: n, subUnitId: r, op: f, objects: p, type: U.REMOVE } }), u.push({ id: P.id, params: { unitId: n, subUnitId: r, op: m, objects: p, type: U.INSERT } });
3369
3369
  }
3370
- return d.push({ id: V.id, params: [n] }), u.push({ id: V.id, params: [n] }), { redos: d, undos: u };
3370
+ return d.push({ id: H.id, params: [n] }), u.push({ id: H.id, params: [n] }), { redos: d, undos: u };
3371
3371
  }
3372
3372
  _expandCol(i, t, e, n, r = O.Position) {
3373
3373
  const s = n - e + 1, { from: o, to: a } = i, { column: d } = o, { column: u } = a;
@@ -3387,7 +3387,7 @@ let Rn = class extends ee {
3387
3387
  c = {
3388
3388
  from: { ...o },
3389
3389
  to: { ...a, column: u + s }
3390
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3390
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3391
3391
  else
3392
3392
  return {
3393
3393
  newSheetTransform: j({ ...t }, this._selectionRenderService),
@@ -3410,7 +3410,7 @@ let Rn = class extends ee {
3410
3410
  c = {
3411
3411
  from: { ...o, column: d - s },
3412
3412
  to: { ...a, column: u - s }
3413
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3413
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3414
3414
  else {
3415
3415
  if (d >= e && u <= n)
3416
3416
  return null;
@@ -3419,7 +3419,7 @@ let Rn = class extends ee {
3419
3419
  c = {
3420
3420
  from: { ...o },
3421
3421
  to: { ...a, column: u - s }
3422
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3422
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3423
3423
  else
3424
3424
  return {
3425
3425
  newSheetTransform: j({ ...t }, this._selectionRenderService),
@@ -3447,7 +3447,7 @@ let Rn = class extends ee {
3447
3447
  c = {
3448
3448
  from: { ...o },
3449
3449
  to: { ...a, column: e - 1, columnOffset: g.endX - g.startX }
3450
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3450
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3451
3451
  }
3452
3452
  }
3453
3453
  return c != null && l != null ? {
@@ -3476,7 +3476,7 @@ let Rn = class extends ee {
3476
3476
  ...a,
3477
3477
  row: u + s
3478
3478
  }
3479
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3479
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3480
3480
  else
3481
3481
  return {
3482
3482
  newSheetTransform: j({ ...t }, this._selectionRenderService),
@@ -3499,7 +3499,7 @@ let Rn = class extends ee {
3499
3499
  c = {
3500
3500
  from: { ...o, row: d - s },
3501
3501
  to: { ...a, row: u - s }
3502
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3502
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3503
3503
  else {
3504
3504
  if (d >= e && u <= n)
3505
3505
  return null;
@@ -3508,7 +3508,7 @@ let Rn = class extends ee {
3508
3508
  c = {
3509
3509
  from: { ...o },
3510
3510
  to: { ...a, row: u - s }
3511
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3511
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3512
3512
  else
3513
3513
  return {
3514
3514
  newSheetTransform: j({ ...t }, this._selectionRenderService),
@@ -3531,7 +3531,7 @@ let Rn = class extends ee {
3531
3531
  c = {
3532
3532
  from: { ...o },
3533
3533
  to: { ...a, row: e - 1, rowOffset: g.endY - g.startY }
3534
- }, l = Z(c, this._selectionRenderService, this._skeletonManagerService);
3534
+ }, l = J(c, this._selectionRenderService, this._skeletonManagerService);
3535
3535
  }
3536
3536
  }
3537
3537
  return c != null && l != null ? {
@@ -3545,7 +3545,7 @@ let Rn = class extends ee {
3545
3545
  // but the skeleton changes like other render modules. These two signals are not equivalent.
3546
3546
  // As a temp solution, I subscribed to activate$ here.
3547
3547
  this._commandService.onCommandExecuted((i) => {
3548
- if (i.id === Ki.id) {
3548
+ if (i.id === Yi.id) {
3549
3549
  const { unitId: t, subUnitId: e } = i.params;
3550
3550
  this._updateDrawings(t, e);
3551
3551
  }
@@ -3585,7 +3585,7 @@ let Rn = class extends ee {
3585
3585
  d != null && Object.keys(d).forEach((u) => {
3586
3586
  if (s === i && a === t) {
3587
3587
  const c = d[u];
3588
- c.transform = Z(c.sheetTransform, this._selectionRenderService, this._skeletonManagerService), n.push(d[u]);
3588
+ c.transform = J(c.sheetTransform, this._selectionRenderService, this._skeletonManagerService), n.push(d[u]);
3589
3589
  } else
3590
3590
  r.push(d[u]);
3591
3591
  });
@@ -3596,7 +3596,7 @@ let Rn = class extends ee {
3596
3596
  _sheetRefreshListener() {
3597
3597
  this.disposeWithMe(
3598
3598
  this._commandService.onCommandExecuted((i) => {
3599
- mo.includes(i.id) && requestIdleCallback(() => {
3599
+ co.includes(i.id) && requestIdleCallback(() => {
3600
3600
  const t = i.params, { unitId: e, subUnitId: n, ranges: r } = t;
3601
3601
  this._refreshDrawingTransform(e, n, r);
3602
3602
  });
@@ -3609,10 +3609,10 @@ let Rn = class extends ee {
3609
3609
  const o = n[s], { sheetTransform: a, transform: d, anchorType: u = O.Position } = o;
3610
3610
  if (u === O.None)
3611
3611
  return !0;
3612
- const { from: c, to: l } = a, { row: g, column: h } = c, { row: f, column: m } = l;
3612
+ const { from: c, to: l } = a, { row: g, column: h } = c, { row: m, column: f } = l;
3613
3613
  for (let p = 0; p < e.length; p++) {
3614
3614
  const w = e[p], { startRow: S, endRow: I, startColumn: D, endColumn: v } = w;
3615
- if (yi.intersects(
3615
+ if (Ri.intersects(
3616
3616
  {
3617
3617
  startRow: S,
3618
3618
  endRow: I,
@@ -3621,12 +3621,12 @@ let Rn = class extends ee {
3621
3621
  },
3622
3622
  {
3623
3623
  startRow: g,
3624
- endRow: f,
3624
+ endRow: m,
3625
3625
  startColumn: h,
3626
- endColumn: m
3626
+ endColumn: f
3627
3627
  }
3628
3628
  ) || g > I || h > v) {
3629
- const C = u === O.Position, _ = Z(a, this._selectionRenderService, this._skeletonManagerService);
3629
+ const C = u === O.Position, _ = J(a, this._selectionRenderService, this._skeletonManagerService);
3630
3630
  r.push({
3631
3631
  ...o,
3632
3632
  transform: {
@@ -3638,119 +3638,41 @@ let Rn = class extends ee {
3638
3638
  break;
3639
3639
  }
3640
3640
  }
3641
- }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(V.id, [i]));
3641
+ }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(H.id, [i]));
3642
3642
  }
3643
3643
  };
3644
- Rn = go([
3644
+ Rn = oo([
3645
3645
  _e(1, Q),
3646
3646
  _e(2, Y),
3647
- _e(3, Ze),
3647
+ _e(3, Je),
3648
3648
  _e(4, A(X)),
3649
- _e(5, A(Vt)),
3649
+ _e(5, A(Ht)),
3650
3650
  _e(6, se),
3651
3651
  _e(7, oe),
3652
3652
  _e(8, de)
3653
3653
  ], Rn);
3654
- function Yr({ ref: i, ...t }) {
3655
- const { icon: e, id: n, className: r, extend: s, ...o } = t, a = `univerjs-icon univerjs-icon-${n} ${r || ""}`.trim(), d = Es(`_${_o()}`);
3656
- return Gr(e, `${n}`, {
3657
- defIds: e.defIds,
3658
- idSuffix: d.current
3659
- }, {
3660
- ref: i,
3661
- className: a,
3662
- ...o
3663
- }, s);
3664
- }
3665
- function Gr(i, t, e, n, r) {
3666
- return Ar(i.tag, {
3667
- key: t,
3668
- ...po(i, e, r),
3669
- ...n
3670
- }, (wo(i, e).children || []).map((s, o) => Gr(s, `${t}-${i.tag}-${o}`, e, void 0, r)));
3671
- }
3672
- function po(i, t, e) {
3673
- const n = { ...i.attrs };
3674
- e != null && e.colorChannel1 && n.fill === "colorChannel1" && (n.fill = e.colorChannel1), i.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(([s, o]) => {
3675
- s === "mask" && typeof o == "string" && (n[s] = o.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
3676
- });
3677
- const { defIds: r } = t;
3678
- return !r || r.length === 0 || (i.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(([s, o]) => {
3679
- typeof o == "string" && (n[s] = o.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
3680
- })), n;
3681
- }
3682
- function wo(i, t) {
3683
- var n;
3684
- const { defIds: e } = t;
3685
- return !e || e.length === 0 ? i : i.tag === "defs" && ((n = i.children) != null && n.length) ? {
3686
- ...i,
3687
- children: i.children.map((r) => typeof r.attrs.id == "string" && e && e.includes(r.attrs.id) ? {
3688
- ...r,
3689
- attrs: {
3690
- ...r.attrs,
3691
- id: r.attrs.id + t.idSuffix
3692
- }
3693
- } : r)
3694
- } : i;
3695
- }
3696
- function _o() {
3697
- return Math.random().toString(36).substring(2, 8);
3698
- }
3699
- Yr.displayName = "UniverIcon";
3700
- const So = {
3701
- tag: "svg",
3702
- attrs: {
3703
- xmlns: "http://www.w3.org/2000/svg",
3704
- fill: "none",
3705
- viewBox: "0 0 17 16",
3706
- width: "1em",
3707
- height: "1em"
3708
- },
3709
- children: [{
3710
- tag: "path",
3711
- attrs: {
3712
- fill: "currentColor",
3713
- d: "M2.35381 3.65517C2.35381 2.88198 2.98061 2.25518 3.75381 2.25518H8.10381C8.43518 2.25518 8.70381 1.98655 8.70381 1.65518C8.70381 1.3238 8.43518 1.05518 8.10381 1.05518H3.75381C2.31787 1.05518 1.15381 2.21923 1.15381 3.65517V12.3552C1.15381 13.7911 2.31787 14.9552 3.75381 14.9552H12.4538C13.8897 14.9552 15.0538 13.7911 15.0538 12.3552V8.00518C15.0538 7.6738 14.7852 7.40518 14.4538 7.40518C14.1224 7.40518 13.8538 7.6738 13.8538 8.00518V9.24469L12.3428 8.11143C11.8294 7.72642 11.1111 7.77744 10.6573 8.23119L9.11281 9.77567L6.84342 7.83047C6.34812 7.40592 5.61375 7.41815 5.13289 7.85896L2.35381 10.4064V3.65517ZM2.35381 12.0343V12.3552C2.35381 13.1284 2.98061 13.7552 3.75381 13.7552H12.4538C13.227 13.7552 13.8538 13.1284 13.8538 12.3552V10.7447L11.6228 9.07144C11.5871 9.04469 11.5373 9.04827 11.5058 9.07971L10.0266 10.5589L11.2057 11.5696C11.4573 11.7853 11.4865 12.164 11.2708 12.4156C11.0552 12.6672 10.6764 12.6964 10.4248 12.4807L6.06245 8.74157C6.02809 8.71212 5.97713 8.71296 5.94377 8.74353L2.35381 12.0343Z",
3714
- fillRule: "evenodd",
3715
- clipRule: "evenodd"
3716
- }
3717
- }, {
3718
- tag: "path",
3719
- attrs: {
3720
- fill: "currentColor",
3721
- d: "M10.3911 3.84419C10.6254 3.60988 11.0053 3.60988 11.2396 3.84419L11.8818 4.48643V1.93496C11.8818 1.60359 12.1505 1.33496 12.4818 1.33496C12.8132 1.33496 13.0818 1.60359 13.0818 1.93496V4.48676L13.7244 3.84419C13.9587 3.60988 14.3386 3.60988 14.5729 3.84419C14.8072 4.07851 14.8072 4.45841 14.5729 4.69272L12.9063 6.35939C12.6719 6.5937 12.292 6.5937 12.0577 6.35939L10.3911 4.69272C10.1568 4.45841 10.1568 4.07851 10.3911 3.84419Z"
3722
- }
3723
- }]
3724
- }, Xr = Ts(function(t, e) {
3725
- return Ar(Yr, Object.assign({}, t, {
3726
- id: "download-image-icon",
3727
- ref: e,
3728
- icon: So
3729
- }));
3730
- });
3731
- Xr.displayName = "DownloadImageIcon";
3732
- function vo() {
3654
+ function lo() {
3733
3655
  const i = Ie(Te), t = Ie(bn), e = Ie(yn), [n, r] = Ee([ye.CELL_ADDRESS]), [s, o] = Ee(!1), [a, d] = Ee(null), u = Fe(() => e.getCellImagesInSelection(), [e]), c = Fe(() => e.getDataColumns(), [e]), l = Fe(() => e.getSelectionRowRange(), [e]), g = c.length > 0, h = Fe(() => c.map((C) => ({
3734
3656
  label: C.label,
3735
3657
  value: String(C.index)
3736
- })), [c]), [f, m] = Ee(
3658
+ })), [c]), [m, f] = Ee(
3737
3659
  () => h.length > 0 ? h[0].value : "0"
3738
3660
  ), p = Fe(() => {
3739
3661
  if (!n.includes(ye.COLUMN_VALUE) || !l)
3740
3662
  return [];
3741
- const _ = Number(f);
3663
+ const _ = Number(m);
3742
3664
  return [{
3743
3665
  startRow: l.startRow,
3744
3666
  endRow: l.endRow,
3745
3667
  startColumn: _,
3746
3668
  endColumn: _
3747
3669
  }];
3748
- }, [n, f, l]);
3749
- fi(p);
3670
+ }, [n, m, l]);
3671
+ li(p);
3750
3672
  const w = Et((C) => {
3751
3673
  C.length !== 0 && r(C);
3752
3674
  }, []), S = Et((C) => {
3753
- m(String(C));
3675
+ f(String(C));
3754
3676
  }, []), I = Et(() => {
3755
3677
  t.close(ze);
3756
3678
  }, [t]), D = Et(async () => {
@@ -3759,7 +3681,7 @@ function vo() {
3759
3681
  try {
3760
3682
  await e.saveImages(u, {
3761
3683
  fileNameParts: n,
3762
- columnIndex: n.includes(ye.COLUMN_VALUE) ? Number(f) : void 0
3684
+ columnIndex: n.includes(ye.COLUMN_VALUE) ? Number(m) : void 0
3763
3685
  }), t.close(ze);
3764
3686
  } catch (C) {
3765
3687
  console.error("Failed to save images:", C), d(i.t("sheetImage.save.error"));
@@ -3767,17 +3689,17 @@ function vo() {
3767
3689
  o(!1);
3768
3690
  }
3769
3691
  }
3770
- }, [e, u, n, f, t, i]), v = n.includes(ye.COLUMN_VALUE);
3692
+ }, [e, u, n, m, t, i]), v = n.includes(ye.COLUMN_VALUE);
3771
3693
  return /* @__PURE__ */ Xe("div", { className: "univer-flex univer-flex-col", children: [
3772
3694
  /* @__PURE__ */ L(en, { label: i.t("sheetImage.save.imageCount"), children: /* @__PURE__ */ L("div", { className: "univer-text-sm univer-text-gray-600", children: u.length }) }),
3773
- /* @__PURE__ */ L(en, { label: i.t("sheetImage.save.fileNameConfig"), children: /* @__PURE__ */ Xe(Qi, { value: n, onChange: w, direction: "vertical", children: [
3695
+ /* @__PURE__ */ L(en, { label: i.t("sheetImage.save.fileNameConfig"), children: /* @__PURE__ */ Xe(Ki, { value: n, onChange: w, direction: "vertical", children: [
3774
3696
  /* @__PURE__ */ L(Yn, { value: ye.CELL_ADDRESS, disabled: !g, children: i.t("sheetImage.save.useRowCol") }),
3775
3697
  g && /* @__PURE__ */ L(Yn, { value: ye.COLUMN_VALUE, children: i.t("sheetImage.save.useColumnValue") })
3776
3698
  ] }) }),
3777
3699
  v && /* @__PURE__ */ L(en, { label: i.t("sheetImage.save.selectColumn"), children: /* @__PURE__ */ L(
3778
- es,
3700
+ Ji,
3779
3701
  {
3780
- value: f,
3702
+ value: m,
3781
3703
  options: h,
3782
3704
  onChange: S
3783
3705
  }
@@ -3803,7 +3725,7 @@ function vo() {
3803
3725
  )
3804
3726
  ] });
3805
3727
  }
3806
- const Io = (i) => {
3728
+ const uo = (i) => {
3807
3729
  var S;
3808
3730
  const t = Ie(Y), e = Ie(Te), n = Ie(oe), r = Ie(Q), { drawings: s } = i, o = s[0];
3809
3731
  if (o == null)
@@ -3811,7 +3733,7 @@ const Io = (i) => {
3811
3733
  const { unitId: a } = o, d = r.getRenderById(a), u = d == null ? void 0 : d.scene;
3812
3734
  if (u == null)
3813
3735
  return;
3814
- const c = u.getTransformerByCreate(), [l, g] = Ee(!0), h = (S = o.anchorType) != null ? S : O.Position, [f, m] = Ee(h);
3736
+ const c = u.getTransformerByCreate(), [l, g] = Ee(!0), h = (S = o.anchorType) != null ? S : O.Position, [m, f] = Ee(h);
3815
3737
  function p(I, D) {
3816
3738
  const v = [];
3817
3739
  return I.forEach((C) => {
@@ -3829,7 +3751,7 @@ const Io = (i) => {
3829
3751
  });
3830
3752
  }), v;
3831
3753
  }
3832
- Nr(() => {
3754
+ Ar(() => {
3833
3755
  const I = c.clearControl$.subscribe((v) => {
3834
3756
  v === !0 && g(!1);
3835
3757
  }), D = c.changeStart$.subscribe((v) => {
@@ -3840,7 +3762,7 @@ const Io = (i) => {
3840
3762
  else if (_.length >= 1) {
3841
3763
  g(!0);
3842
3764
  const R = ((y = _[0]) == null ? void 0 : y.anchorType) || O.Position;
3843
- m(R);
3765
+ f(R);
3844
3766
  }
3845
3767
  });
3846
3768
  return () => {
@@ -3848,7 +3770,7 @@ const Io = (i) => {
3848
3770
  };
3849
3771
  }, []);
3850
3772
  function w(I) {
3851
- m(I);
3773
+ f(I);
3852
3774
  const D = n.getFocusDrawings();
3853
3775
  if (D.length === 0)
3854
3776
  return;
@@ -3866,7 +3788,7 @@ const Io = (i) => {
3866
3788
  return /* @__PURE__ */ Xe(
3867
3789
  "div",
3868
3790
  {
3869
- className: ts("univer-grid univer-gap-2 univer-py-2 univer-text-gray-400", {
3791
+ className: Zi("univer-grid univer-gap-2 univer-py-2 univer-text-gray-400", {
3870
3792
  "univer-hidden": !l
3871
3793
  }),
3872
3794
  children: [
@@ -3877,7 +3799,7 @@ const Io = (i) => {
3877
3799
  children: /* @__PURE__ */ L("div", { children: e.t("drawing-anchor.title") })
3878
3800
  }
3879
3801
  ),
3880
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ Xe(ns, { value: f, onChange: w, direction: "vertical", children: [
3802
+ /* @__PURE__ */ L("div", { children: /* @__PURE__ */ Xe(qi, { value: m, onChange: w, direction: "vertical", children: [
3881
3803
  /* @__PURE__ */ L(tn, { value: O.Both, children: e.t("drawing-anchor.both") }),
3882
3804
  /* @__PURE__ */ L(tn, { value: O.Position, children: e.t("drawing-anchor.position") }),
3883
3805
  /* @__PURE__ */ L(tn, { value: O.None, children: e.t("drawing-anchor.none") })
@@ -3885,9 +3807,9 @@ const Io = (i) => {
3885
3807
  ]
3886
3808
  }
3887
3809
  );
3888
- }, Co = () => {
3810
+ }, ho = () => {
3889
3811
  const i = Ie(oe), t = i.getFocusDrawings(), [e, n] = Ee(t);
3890
- return Nr(() => {
3812
+ return Ar(() => {
3891
3813
  const r = i.focus$.subscribe((s) => {
3892
3814
  n(s);
3893
3815
  });
@@ -3895,68 +3817,68 @@ const Io = (i) => {
3895
3817
  r.unsubscribe();
3896
3818
  };
3897
3819
  }, []), !!(e != null && e.length) && /* @__PURE__ */ Xe("div", { className: "univer-text-sm", children: [
3898
- /* @__PURE__ */ L(Rs, { drawings: e }),
3899
- /* @__PURE__ */ L(Io, { drawings: e })
3820
+ /* @__PURE__ */ L(Ss, { drawings: e }),
3821
+ /* @__PURE__ */ L(uo, { drawings: e })
3900
3822
  ] });
3901
- }, zr = "sheet.menu.image";
3902
- function Ro(i) {
3823
+ }, Vr = "sheet.menu.image";
3824
+ function go(i) {
3903
3825
  return {
3904
- id: zr,
3826
+ id: Vr,
3905
3827
  type: Gt.SUBITEMS,
3906
3828
  icon: "AddImageIcon",
3907
3829
  tooltip: "sheetImage.title",
3908
- hidden$: Yt(i, $.UNIVER_SHEET),
3909
- disabled$: mi(i, { workbookTypes: [gn], worksheetTypes: [fn], rangeTypes: [Zi] })
3830
+ hidden$: Yt(i, k.UNIVER_SHEET),
3831
+ disabled$: ui(i, { workbookTypes: [gn], worksheetTypes: [mn], rangeTypes: [Gi] })
3910
3832
  };
3911
3833
  }
3912
- function Do(i) {
3834
+ function mo(i) {
3913
3835
  return {
3914
3836
  id: Kt.id,
3915
3837
  title: "sheetImage.upload.float",
3916
3838
  type: Gt.BUTTON,
3917
- hidden$: Yt(i, $.UNIVER_SHEET)
3839
+ hidden$: Yt(i, k.UNIVER_SHEET)
3918
3840
  };
3919
3841
  }
3920
- function bo(i) {
3842
+ function fo(i) {
3921
3843
  return {
3922
3844
  id: Mn.id,
3923
3845
  title: "sheetImage.upload.cell",
3924
3846
  type: Gt.BUTTON,
3925
- hidden$: Yt(i, $.UNIVER_SHEET)
3847
+ hidden$: Yt(i, k.UNIVER_SHEET)
3926
3848
  };
3927
3849
  }
3928
- function Mo(i) {
3850
+ function po(i) {
3929
3851
  var t, e, n, r;
3930
3852
  return !!((e = (t = i == null ? void 0 : i.p) == null ? void 0 : t.drawingsOrder) != null && e.length && ((r = (n = i == null ? void 0 : i.p) == null ? void 0 : n.drawingsOrder) == null ? void 0 : r.length) > 0);
3931
3853
  }
3932
- function yo(i, t) {
3854
+ function wo(i, t) {
3933
3855
  const e = i.getActiveSheet();
3934
3856
  if (!e) return !1;
3935
3857
  const n = e.getCellMatrix(), { startRow: r, endRow: s, startColumn: o, endColumn: a } = t;
3936
3858
  for (let d = r; d <= s; d++)
3937
3859
  for (let u = o; u <= a; u++) {
3938
3860
  const c = n.getValue(d, u);
3939
- if (Mo(c))
3861
+ if (po(c))
3940
3862
  return !0;
3941
3863
  }
3942
3864
  return !1;
3943
3865
  }
3944
- function Eo() {
3866
+ function _o() {
3945
3867
  return "showDirectoryPicker" in window;
3946
3868
  }
3947
3869
  function dn(i) {
3948
3870
  const t = i.get(de), e = i.get(ut), n = at([
3949
- Yt(i, $.UNIVER_SHEET),
3950
- t.getCurrentTypeOfUnit$($.UNIVER_SHEET).pipe(
3951
- me((r) => r ? e.selectionMoveEnd$.pipe(
3871
+ Yt(i, k.UNIVER_SHEET),
3872
+ t.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(
3873
+ fe((r) => r ? e.selectionMoveEnd$.pipe(
3952
3874
  pe(() => {
3953
- if (!Eo())
3875
+ if (!_o())
3954
3876
  return !0;
3955
3877
  const s = e.getCurrentSelections();
3956
3878
  if (!s || s.length === 0)
3957
3879
  return !0;
3958
3880
  for (const o of s)
3959
- if (yo(r, o.range))
3881
+ if (wo(r, o.range))
3960
3882
  return !1;
3961
3883
  return !0;
3962
3884
  })
@@ -3973,18 +3895,18 @@ function dn(i) {
3973
3895
  hidden$: n
3974
3896
  };
3975
3897
  }
3976
- const To = {
3977
- [fs.MEDIA]: {
3978
- [zr]: {
3898
+ const So = {
3899
+ [ls.MEDIA]: {
3900
+ [Vr]: {
3979
3901
  order: 0,
3980
- menuItemFactory: Ro,
3902
+ menuItemFactory: go,
3981
3903
  [Kt.id]: {
3982
3904
  order: 0,
3983
- menuItemFactory: Do
3905
+ menuItemFactory: mo
3984
3906
  },
3985
3907
  [Mn.id]: {
3986
3908
  order: 1,
3987
- menuItemFactory: bo
3909
+ menuItemFactory: fo
3988
3910
  }
3989
3911
  }
3990
3912
  },
@@ -4013,60 +3935,60 @@ const To = {
4013
3935
  }
4014
3936
  }
4015
3937
  };
4016
- function ft(i) {
4017
- return !i.getContextValue(Ei) && !i.getContextValue(Ti) && !i.getContextValue(Oi) && i.getContextValue(Ge);
3938
+ function mt(i) {
3939
+ return !i.getContextValue(Di) && !i.getContextValue(bi) && !i.getContextValue(Mi) && i.getContextValue(Ge);
4018
3940
  }
4019
- const Oo = {
3941
+ const vo = {
4020
3942
  id: gt.id,
4021
3943
  description: "shortcut.drawing-move-down",
4022
3944
  group: "4_drawing-view",
4023
3945
  binding: Ke.ARROW_DOWN,
4024
3946
  priority: 100,
4025
- preconditions: ft,
3947
+ preconditions: mt,
4026
3948
  staticParameters: {
4027
3949
  direction: ve.DOWN
4028
3950
  }
4029
- }, Uo = {
3951
+ }, Io = {
4030
3952
  id: gt.id,
4031
3953
  description: "shortcut.drawing-move-up",
4032
3954
  group: "4_drawing-view",
4033
3955
  binding: Ke.ARROW_UP,
4034
3956
  priority: 100,
4035
- preconditions: ft,
3957
+ preconditions: mt,
4036
3958
  staticParameters: {
4037
3959
  direction: ve.UP
4038
3960
  }
4039
- }, Po = {
3961
+ }, Co = {
4040
3962
  id: gt.id,
4041
3963
  description: "shortcut.drawing-move-left",
4042
3964
  group: "4_drawing-view",
4043
3965
  binding: Ke.ARROW_LEFT,
4044
3966
  priority: 100,
4045
- preconditions: ft,
3967
+ preconditions: mt,
4046
3968
  staticParameters: {
4047
3969
  direction: ve.LEFT
4048
3970
  }
4049
- }, Ao = {
3971
+ }, Ro = {
4050
3972
  id: gt.id,
4051
3973
  description: "shortcut.drawing-move-right",
4052
3974
  group: "4_drawing-view",
4053
3975
  binding: Ke.ARROW_RIGHT,
4054
3976
  priority: 100,
4055
- preconditions: ft,
3977
+ preconditions: mt,
4056
3978
  staticParameters: {
4057
3979
  direction: ve.RIGHT
4058
3980
  }
4059
- }, No = {
4060
- id: $r.id,
3981
+ }, Do = {
3982
+ id: Nr.id,
4061
3983
  description: "shortcut.drawing-delete",
4062
3984
  group: "4_drawing-view",
4063
3985
  // when focusing on any other input tag do not trigger this shortcut
4064
- preconditions: ft,
3986
+ preconditions: mt,
4065
3987
  binding: Ke.DELETE,
4066
3988
  mac: Ke.BACKSPACE
4067
3989
  };
4068
- var $o = Object.getOwnPropertyDescriptor, ko = (i, t, e, n) => {
4069
- for (var r = n > 1 ? void 0 : n ? $o(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3990
+ var bo = Object.getOwnPropertyDescriptor, Mo = (i, t, e, n) => {
3991
+ for (var r = n > 1 ? void 0 : n ? bo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
4070
3992
  (o = i[s]) && (r = o(r) || r);
4071
3993
  return r;
4072
3994
  }, Be = (i, t) => (e, n) => t(e, n, i);
@@ -4076,10 +3998,10 @@ let Ft = class extends ee {
4076
3998
  }
4077
3999
  _initCustomComponents() {
4078
4000
  const i = this._componentManager;
4079
- this.disposeWithMe(i.register(Br, Co)), this.disposeWithMe(i.register(ze, vo)), this.disposeWithMe(i.register("DownloadImageIcon", Xr));
4001
+ this.disposeWithMe(i.register(Wr, ho)), this.disposeWithMe(i.register(ze, lo));
4080
4002
  }
4081
4003
  _initMenus() {
4082
- this._menuManagerService.mergeMenu(To);
4004
+ this._menuManagerService.mergeMenu(So);
4083
4005
  }
4084
4006
  _initCommands() {
4085
4007
  [
@@ -4088,25 +4010,25 @@ let Ft = class extends ee {
4088
4010
  Xt,
4089
4011
  ht,
4090
4012
  zt,
4013
+ Br,
4014
+ H,
4091
4015
  jr,
4092
- V,
4093
- Fr,
4094
4016
  kr,
4095
- Wr,
4017
+ xr,
4096
4018
  gt,
4019
+ Nr,
4097
4020
  $r,
4098
- xr,
4099
4021
  ct
4100
4022
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
4101
4023
  }
4102
4024
  _initShortcuts() {
4103
4025
  [
4104
4026
  // sheet drawing shortcuts
4105
- Oo,
4106
- Uo,
4107
- Po,
4108
- Ao,
4109
- No
4027
+ vo,
4028
+ Io,
4029
+ Co,
4030
+ Ro,
4031
+ Do
4110
4032
  ].forEach((i) => {
4111
4033
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
4112
4034
  });
@@ -4115,40 +4037,40 @@ let Ft = class extends ee {
4115
4037
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
4116
4038
  }
4117
4039
  };
4118
- Ft = ko([
4040
+ Ft = Mo([
4119
4041
  Be(0, A(Ur)),
4120
- Be(1, ms),
4042
+ Be(1, us),
4121
4043
  Be(2, Y),
4122
- Be(3, ps),
4044
+ Be(3, hs),
4123
4045
  Be(4, oe),
4124
4046
  Be(5, A(ut))
4125
4047
  ], Ft);
4126
- var xo = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, Bo = (i, t, e) => t in i ? xo(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, jo = (i, t, e, n) => {
4127
- for (var r = n > 1 ? void 0 : n ? Wo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
4048
+ var yo = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, To = (i, t, e) => t in i ? yo(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, Oo = (i, t, e, n) => {
4049
+ for (var r = n > 1 ? void 0 : n ? Eo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
4128
4050
  (o = i[s]) && (r = o(r) || r);
4129
4051
  return r;
4130
- }, ln = (i, t) => (e, n) => t(e, n, i), Kr = (i, t, e) => Bo(i, typeof t != "symbol" ? t + "" : t, e);
4131
- const Fo = "SHEET_IMAGE_UI_PLUGIN";
4132
- let Lt = class extends Ai {
4052
+ }, ln = (i, t) => (e, n) => t(e, n, i), Yr = (i, t, e) => To(i, typeof t != "symbol" ? t + "" : t, e);
4053
+ const Uo = "SHEET_IMAGE_UI_PLUGIN";
4054
+ let Lt = class extends Ti {
4133
4055
  constructor(i = sr, t, e, n) {
4134
4056
  super(), this._config = i, this._injector = t, this._renderManagerService = e, this._configService = n;
4135
- const { menu: r, ...s } = Ni(
4057
+ const { menu: r, ...s } = Oi(
4136
4058
  {},
4137
4059
  sr,
4138
4060
  this._config
4139
4061
  );
4140
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Ws, s);
4062
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Ps, s);
4141
4063
  }
4142
4064
  onStarting() {
4143
- $i(this._injector, [
4065
+ Ui(this._injector, [
4144
4066
  [lt],
4145
4067
  [Ft],
4146
4068
  [Nt],
4147
4069
  [jt],
4148
4070
  [Bt],
4149
4071
  [Wt],
4150
- [$t],
4151
4072
  [kt],
4073
+ [$t],
4152
4074
  [xt],
4153
4075
  [yn, { useClass: vn }]
4154
4076
  ]), Qt(this._injector, [
@@ -4166,8 +4088,8 @@ let Lt = class extends Ai {
4166
4088
  [Bt],
4167
4089
  [jt],
4168
4090
  [Ft],
4169
- [$t],
4170
- [kt]
4091
+ [kt],
4092
+ [$t]
4171
4093
  ]);
4172
4094
  }
4173
4095
  onSteady() {
@@ -4180,23 +4102,23 @@ let Lt = class extends Ai {
4180
4102
  [Cn],
4181
4103
  [In]
4182
4104
  ].forEach((i) => {
4183
- this.disposeWithMe(this._renderManagerService.registerRenderModule($.UNIVER_SHEET, i));
4105
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(k.UNIVER_SHEET, i));
4184
4106
  });
4185
4107
  }
4186
4108
  };
4187
- Kr(Lt, "type", $.UNIVER_SHEET);
4188
- Kr(Lt, "pluginName", Fo);
4189
- Lt = jo([
4190
- Ui(as, _s, Ds, ki),
4109
+ Yr(Lt, "type", k.UNIVER_SHEET);
4110
+ Yr(Lt, "pluginName", Uo);
4111
+ Lt = Oo([
4112
+ yi(rs, ms, vs, Pi),
4191
4113
  ln(1, A(qe)),
4192
4114
  ln(2, Q),
4193
- ln(3, Pi)
4115
+ ln(3, Ei)
4194
4116
  ], Lt);
4195
4117
  export {
4196
4118
  vn as BatchSaveImagesService,
4197
- V as ClearSheetDrawingTransformerOperation,
4198
- $r as DeleteDrawingsCommand,
4199
- Fr as EditSheetDrawingOperation,
4119
+ H as ClearSheetDrawingTransformerOperation,
4120
+ Nr as DeleteDrawingsCommand,
4121
+ jr as EditSheetDrawingOperation,
4200
4122
  ye as FileNamePart,
4201
4123
  kr as GroupSheetDrawingCommand,
4202
4124
  yn as IBatchSaveImagesService,
@@ -4204,17 +4126,17 @@ export {
4204
4126
  Xt as InsertSheetDrawingCommand,
4205
4127
  gt as MoveDrawingsCommand,
4206
4128
  ht as RemoveSheetDrawingCommand,
4207
- zr as SHEETS_IMAGE_MENU_ID,
4208
- ao as SHEET_FLOAT_DOM_PREFIX,
4129
+ Vr as SHEETS_IMAGE_MENU_ID,
4130
+ to as SHEET_FLOAT_DOM_PREFIX,
4209
4131
  ct as SaveCellImagesCommand,
4210
- xr as SetDrawingArrangeCommand,
4132
+ $r as SetDrawingArrangeCommand,
4211
4133
  zt as SetSheetDrawingCommand,
4212
4134
  lt as SheetCanvasFloatDomManagerService,
4213
4135
  dt as SheetDrawingUpdateController,
4214
- jr as SidebarSheetDrawingOperation,
4215
- Wr as UngroupSheetDrawingCommand,
4136
+ Br as SidebarSheetDrawingOperation,
4137
+ xr as UngroupSheetDrawingCommand,
4216
4138
  Lt as UniverSheetsDrawingUIPlugin,
4217
- fe as calcSheetFloatDomPosition,
4218
- Z as drawingPositionToTransform,
4139
+ me as calcSheetFloatDomPosition,
4140
+ J as drawingPositionToTransform,
4219
4141
  j as transformToDrawingPosition
4220
4142
  };