@univerjs/sheets-drawing-ui 0.2.4-alpha.0 → 0.2.5

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,17 +1,17 @@
1
- var en = Object.defineProperty;
2
- var tn = (i, e, n) => e in i ? en(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
- var H = (i, e, n) => tn(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as F, ICommandService as V, IUndoRedoService as ge, LocaleService as _e, IUniverInstanceService as he, useDependency as q, RxDisposable as nn, UniverInstanceType as B, connectInjector as rn, toDisposable as sn, FOCUSING_COMMON_DRAWINGS as we, OnLifecycle as ie, LifecycleStages as se, Inject as W, Injector as nt, IContextService as _t, Disposable as oe, Direction as Q, FOCUSING_FORMULA_EDITOR as on, EDITOR_ACTIVATED as an, Rectangle as cn, DrawingTypeEnum as Ye, DisposableCollection as dn, Tools as ne, UserManagerService as ln, IPermissionService as un, Plugin as gn, DependentOn as hn } from "@univerjs/core";
5
- import { ImageCropperObject as mn, COMPONENT_IMAGE_POPUP_MENU as fn, OpenImageCropOperation as pn, ImageResetSizeOperation as wn, DrawingCommonPanel as _n, DrawingRenderService as vn, UniverDrawingUIPlugin as Sn } from "@univerjs/drawing-ui";
6
- import { ISheetDrawingService as k, SetDrawingApplyMutation as E, DrawingApplyType as y, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as Cn } from "@univerjs/sheets-drawing";
7
- import { IDrawingManagerService as z, IImageIoService as vt, ArrangeTypeEnum as Ce, DrawingTypeEnum as Ve, DRAWING_IMAGE_COUNT_LIMIT as dt, ImageUploadStatusType as ke, DRAWING_IMAGE_ALLOW_SIZE as In, getImageSize as Rn, DRAWING_IMAGE_WIDTH_LIMIT as lt, DRAWING_IMAGE_HEIGHT_LIMIT as ut, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Mn, getDrawingShapeKeyByDrawingSearch as Dn, UniverDrawingPlugin as bn } from "@univerjs/drawing";
8
- import { IRenderManagerService as K, getGroupState as En, transformObjectOutOfGroup as yn, precisionTo as ee, Rect as On, DRAWING_OBJECT_LAYER_INDEX as Pn, SHEET_VIEWPORT_KEY as Tn, RENDER_CLASS_TYPE as ae } from "@univerjs/engine-render";
9
- import { SheetCanvasPopManagerService as Un, ISheetSelectionRenderService as Ge, SheetSkeletonManagerService as re, attachRangeWithCoord as An, getCurrentRangeDisable$ as Nn, SetScrollOperation as jn, SetZoomRatioOperation as Ln, SheetPrintInterceptorService as Bn, COPY_TYPE as gt, PREDEFINED_HOOK_NAME as Ie, virtualizeDiscreteRanges as Wn, ISheetClipboardService as $n } from "@univerjs/sheets-ui";
10
- import { takeUntil as ht, Subject as mt, BehaviorSubject as Vn, combineLatest as Re, map as ft, filter as Me, distinctUntilChanged as De } from "rxjs";
11
- import { ISidebarService as Gn, BuiltInUIPart as xn, IUIPartsService as Fn, IMessageService as Yn, MenuItemType as St, MenuPosition as kn, MenuGroup as Hn, getMenuHiddenObservable as Ct, KeyCode as ue, ComponentManager as Xn, IMenuService as zn, IShortcutService as Kn, CanvasFloatDomService as Jn } from "@univerjs/ui";
12
- import { getSheetCommandTarget as le, SheetsSelectionsService as Zn, WorkbookEditablePermission as Ze, WorksheetEditPermission as Pe, RangeProtectionPermissionEditPoint as qn, InsertRowCommand as It, InsertColCommand as Rt, RemoveRowCommand as Mt, RemoveColCommand as Dt, DeleteRangeMoveLeftCommand as bt, DeleteRangeMoveUpCommand as Et, InsertRangeMoveDownCommand as yt, InsertRangeMoveRightCommand as Ot, DeltaRowHeightCommand as qe, SetRowHeightCommand as Qe, DeltaColumnWidthCommand as Pt, SetColWidthCommand as Tt, SetRowHiddenCommand as Ut, SetSpecificRowsVisibleCommand as At, SetSpecificColsVisibleCommand as Nt, SetColHiddenCommand as jt, SetRowVisibleMutation as Qn, SetRowHiddenMutation as er, SetColVisibleMutation as tr, SetColHiddenMutation as nr, SetWorksheetRowHeightMutation as rr, SetWorksheetColWidthMutation as ir, SetWorksheetActiveOperation as sr, SheetInterceptorService as or, SetFrozenMutation as ar, WorkbookViewPermission as pt, WorksheetViewPermission as He } from "@univerjs/sheets";
13
- import L, { useEffect as rt, forwardRef as Lt, useRef as Bt, createElement as Wt, useState as et } from "react";
14
- import { MessageType as be, RadioGroup as cr, Radio as Xe } from "@univerjs/design";
1
+ var tn = Object.defineProperty;
2
+ var nn = (i, e, n) => e in i ? tn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
+ var H = (i, e, n) => nn(i, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CommandType as F, ICommandService as G, IUndoRedoService as ge, LocaleService as _e, IUniverInstanceService as he, useDependency as Z, RxDisposable as rn, UniverInstanceType as B, connectInjector as sn, toDisposable as on, FOCUSING_COMMON_DRAWINGS as we, OnLifecycle as ee, LifecycleStages as te, Inject as W, Injector as nt, IContextService as vt, Disposable as oe, Direction as q, FOCUSING_FORMULA_EDITOR as an, EDITOR_ACTIVATED as cn, Rectangle as dn, DrawingTypeEnum as ke, DisposableCollection as ln, Tools as ie, UserManagerService as un, IPermissionService as gn, Plugin as hn, DependentOn as mn } from "@univerjs/core";
5
+ import { ImageCropperObject as fn, COMPONENT_IMAGE_POPUP_MENU as pn, OpenImageCropOperation as wn, ImageResetSizeOperation as _n, DrawingCommonPanel as vn, DrawingRenderService as Sn, UniverDrawingUIPlugin as Cn } from "@univerjs/drawing-ui";
6
+ import { ISheetDrawingService as k, SetDrawingApplyMutation as E, DrawingApplyType as y, SheetDrawingAnchorType as P, UniverSheetsDrawingPlugin as In } from "@univerjs/sheets-drawing";
7
+ import { IDrawingManagerService as z, IImageIoService as St, ArrangeTypeEnum as Ce, DrawingTypeEnum as Ge, DRAWING_IMAGE_COUNT_LIMIT as lt, ImageUploadStatusType as He, DRAWING_IMAGE_ALLOW_SIZE as Rn, getImageSize as Mn, DRAWING_IMAGE_WIDTH_LIMIT as ut, DRAWING_IMAGE_HEIGHT_LIMIT as gt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dn, getDrawingShapeKeyByDrawingSearch as bn, UniverDrawingPlugin as En } from "@univerjs/drawing";
8
+ import { IRenderManagerService as K, getGroupState as yn, transformObjectOutOfGroup as On, precisionTo as Q, Rect as Pn, DRAWING_OBJECT_LAYER_INDEX as Tn, SHEET_VIEWPORT_KEY as Un, RENDER_CLASS_TYPE as ae } from "@univerjs/engine-render";
9
+ import { SheetCanvasPopManagerService as An, ISheetSelectionRenderService as xe, SheetSkeletonManagerService as se, attachRangeWithCoord as Nn, getCurrentRangeDisable$ as jn, SetScrollOperation as Ln, SetZoomRatioOperation as Bn, SheetPrintInterceptorService as Wn, COPY_TYPE as ht, PREDEFINED_HOOK_NAME as Ie, virtualizeDiscreteRanges as $n, ISheetClipboardService as Vn } from "@univerjs/sheets-ui";
10
+ import { takeUntil as mt, Subject as ft, BehaviorSubject as Gn, combineLatest as Re, map as pt, filter as Me, distinctUntilChanged as De } from "rxjs";
11
+ import { ISidebarService as xn, BuiltInUIPart as Fn, IUIPartsService as Yn, IMessageService as kn, MenuItemType as Ct, MenuPosition as Hn, MenuGroup as Xn, getMenuHiddenObservable as It, KeyCode as ue, ComponentManager as zn, IMenuService as Kn, IShortcutService as Jn, CanvasFloatDomService as Zn } from "@univerjs/ui";
12
+ import { getSheetCommandTarget as le, SheetsSelectionsService as qn, WorkbookEditablePermission as qe, WorksheetEditPermission as Pe, RangeProtectionPermissionEditPoint as Qn, InsertRowCommand as Rt, InsertColCommand as Mt, RemoveRowCommand as Dt, RemoveColCommand as bt, DeleteRangeMoveLeftCommand as Et, DeleteRangeMoveUpCommand as yt, InsertRangeMoveDownCommand as Ot, InsertRangeMoveRightCommand as Pt, DeltaRowHeightCommand as Qe, SetRowHeightCommand as et, DeltaColumnWidthCommand as Tt, SetColWidthCommand as Ut, SetRowHiddenCommand as At, SetSpecificRowsVisibleCommand as Nt, SetSpecificColsVisibleCommand as jt, SetColHiddenCommand as Lt, SetRowVisibleMutation as er, SetRowHiddenMutation as tr, SetColVisibleMutation as nr, SetColHiddenMutation as rr, SetWorksheetRowHeightMutation as ir, SetWorksheetColWidthMutation as sr, SetWorksheetActiveOperation as or, SheetInterceptorService as ar, SetFrozenMutation as cr, WorkbookViewPermission as wt, WorksheetViewPermission as Xe } from "@univerjs/sheets";
13
+ import L, { useEffect as rt, forwardRef as Bt, useRef as Wt, createElement as $t, useState as tt } from "react";
14
+ import { MessageType as be, RadioGroup as dr, Radio as ze } from "@univerjs/design";
15
15
  import Ee from "clsx";
16
16
  const j = {
17
17
  id: "sheet.operation.clear-drawing-transformer",
@@ -27,7 +27,7 @@ const j = {
27
27
  id: "sheet.command.remove-sheet-image",
28
28
  type: F.COMMAND,
29
29
  handler: (i, e) => {
30
- const n = i.get(V), t = i.get(ge), r = i.get(k);
30
+ const n = i.get(G), t = i.get(ge), r = i.get(k);
31
31
  if (!e) return !1;
32
32
  const { drawings: s } = e, o = [];
33
33
  s.forEach((f) => {
@@ -47,17 +47,17 @@ const j = {
47
47
  ]
48
48
  }), !0) : !1;
49
49
  }
50
- }, $t = "COMPONENT_SHEET_DRAWING_PANEL", Vt = {
50
+ }, Vt = "COMPONENT_SHEET_DRAWING_PANEL", Gt = {
51
51
  id: "sidebar.operation.sheet-image",
52
52
  type: F.COMMAND,
53
53
  handler: async (i, e) => {
54
- const n = i.get(Gn), t = i.get(_e), r = i.get(he), s = i.get(z);
54
+ const n = i.get(xn), t = i.get(_e), r = i.get(he), s = i.get(z);
55
55
  if (!le(r)) return !1;
56
56
  switch (e.value) {
57
57
  case "open":
58
58
  n.open({
59
59
  header: { title: t.t("sheetImage.panel.title") },
60
- children: { label: $t },
60
+ children: { label: Vt },
61
61
  onClose: () => {
62
62
  s.focusDrawing(null);
63
63
  },
@@ -71,21 +71,21 @@ const j = {
71
71
  }
72
72
  return !0;
73
73
  }
74
- }, Gt = {
74
+ }, xt = {
75
75
  id: "sheet.operation.edit-sheet-image",
76
76
  type: F.OPERATION,
77
77
  handler: (i, e) => {
78
- const n = i.get(z), t = i.get(V);
79
- return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(Vt.id, { value: "open" }), !0);
80
- }
81
- }, dr = "univer-upload-loading", lr = "univer-upload-loading-body", ur = "univer-upload-loading-body-animation", gr = "univer-UniverCircleAnimation", hr = "univer-upload-loading-body-text", ye = {
82
- uploadLoading: dr,
83
- uploadLoadingBody: lr,
84
- uploadLoadingBodyAnimation: ur,
85
- univerCircleAnimation: gr,
86
- uploadLoadingBodyText: hr
87
- }, mr = () => {
88
- const i = q(vt), e = q(_e), [n, t] = L.useState(0);
78
+ const n = i.get(z), t = i.get(G);
79
+ return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(Gt.id, { value: "open" }), !0);
80
+ }
81
+ }, lr = "univer-upload-loading", ur = "univer-upload-loading-body", gr = "univer-upload-loading-body-animation", hr = "univer-UniverCircleAnimation", mr = "univer-upload-loading-body-text", ye = {
82
+ uploadLoading: lr,
83
+ uploadLoadingBody: ur,
84
+ uploadLoadingBodyAnimation: gr,
85
+ univerCircleAnimation: hr,
86
+ uploadLoadingBodyText: mr
87
+ }, fr = () => {
88
+ const i = Z(St), e = Z(_e), [n, t] = L.useState(0);
89
89
  return rt(() => {
90
90
  const r = i.change$.subscribe((s) => {
91
91
  t(s);
@@ -95,19 +95,19 @@ const j = {
95
95
  };
96
96
  }, [i]), /* @__PURE__ */ L.createElement("div", { style: { display: n > 0 ? "block" : "none" }, className: ye.uploadLoading }, /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBody }, /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBodyAnimation }), /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBodyText }, `${e.t("uploadLoading.loading")}: ${n}`)));
97
97
  };
98
- var fr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, wr = (i, e, n, t) => {
99
- for (var r = t > 1 ? void 0 : t ? pr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
98
+ var pr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, _r = (i, e, n, t) => {
99
+ for (var r = t > 1 ? void 0 : t ? wr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
100
100
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
101
- return t && r && fr(e, n, r), r;
102
- }, te = (i, e) => (n, t) => e(n, t, i);
103
- let Te = class extends nn {
101
+ return t && r && pr(e, n, r), r;
102
+ }, re = (i, e) => (n, t) => e(n, t, i);
103
+ let Te = class extends rn {
104
104
  constructor(e, n, t, r, s, o, a) {
105
105
  super();
106
106
  H(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
107
107
  this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = a, this._init();
108
108
  }
109
109
  _init() {
110
- this._univerInstanceService.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(ht(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(ht(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(xn.CONTENT, () => rn(mr, this._injector));
110
+ this._univerInstanceService.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(mt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(mt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(Fn.CONTENT, () => sn(fr, this._injector));
111
111
  }
112
112
  _dispose(e) {
113
113
  const n = e.getUnitId();
@@ -122,7 +122,7 @@ let Te = class extends nn {
122
122
  _hasCropObject(e) {
123
123
  const n = e.getAllObjects();
124
124
  for (const t of n)
125
- if (t instanceof mn)
125
+ if (t instanceof fn)
126
126
  return !0;
127
127
  return !1;
128
128
  }
@@ -136,7 +136,7 @@ let Te = class extends nn {
136
136
  return;
137
137
  let r;
138
138
  this.disposeWithMe(
139
- sn(
139
+ on(
140
140
  t.createControl$.subscribe(() => {
141
141
  if (this._contextService.setContextValue(we, !0), this._hasCropObject(n))
142
142
  return;
@@ -153,7 +153,7 @@ let Te = class extends nn {
153
153
  return;
154
154
  const { unitId: l, subUnitId: c, drawingId: u } = h;
155
155
  r == null || r.dispose(), r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(a, {
156
- componentKey: fn,
156
+ componentKey: pn,
157
157
  direction: "horizontal",
158
158
  offset: [2, 0],
159
159
  extraProps: {
@@ -181,7 +181,7 @@ let Te = class extends nn {
181
181
  {
182
182
  label: "image-popup.edit",
183
183
  index: 0,
184
- commandId: Gt.id,
184
+ commandId: xt.id,
185
185
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
186
186
  disable: !1
187
187
  },
@@ -195,35 +195,35 @@ let Te = class extends nn {
195
195
  {
196
196
  label: "image-popup.crop",
197
197
  index: 2,
198
- commandId: pn.id,
198
+ commandId: wn.id,
199
199
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
200
200
  disable: !1
201
201
  },
202
202
  {
203
203
  label: "image-popup.reset",
204
204
  index: 3,
205
- commandId: wn.id,
205
+ commandId: _n.id,
206
206
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
207
207
  disable: !1
208
208
  }
209
209
  ];
210
210
  }
211
211
  };
212
- Te = wr([
213
- ie(se.Steady, Te),
214
- te(0, W(nt)),
215
- te(1, z),
216
- te(2, W(Un)),
217
- te(3, K),
218
- te(4, he),
219
- te(5, _t),
220
- te(6, W(Fn))
212
+ Te = _r([
213
+ ee(te.Steady, Te),
214
+ re(0, W(nt)),
215
+ re(1, z),
216
+ re(2, W(An)),
217
+ re(3, K),
218
+ re(4, he),
219
+ re(5, vt),
220
+ re(6, W(Yn))
221
221
  ], Te);
222
- const xe = {
222
+ const Fe = {
223
223
  id: "sheet.operation.insert-float-image",
224
224
  type: F.OPERATION,
225
225
  handler: (i, e) => !0
226
- }, Be = {
226
+ }, We = {
227
227
  id: "sheet.operation.insert-cell-image",
228
228
  type: F.OPERATION,
229
229
  handler: (i, e) => !0
@@ -231,7 +231,7 @@ const xe = {
231
231
  id: "sheet.command.insert-sheet-image",
232
232
  type: F.COMMAND,
233
233
  handler: (i, e) => {
234
- const n = i.get(V), t = i.get(ge), r = i.get(k);
234
+ const n = i.get(G), t = i.get(ge), r = i.get(k);
235
235
  if (!e) return !1;
236
236
  const s = e.drawings, o = s.map((f) => f.unitId), a = r.getBatchAddOp(s), { unitId: d, subUnitId: h, undo: l, redo: c, objects: u } = a;
237
237
  return n.syncExecuteCommand(E.id, { op: c, unitId: d, subUnitId: h, objects: u, type: y.INSERT }) ? (t.pushUndoRedo({
@@ -246,11 +246,11 @@ const xe = {
246
246
  ]
247
247
  }), !0) : !1;
248
248
  }
249
- }, Fe = {
249
+ }, Ye = {
250
250
  id: "sheet.command.set-sheet-image",
251
251
  type: F.COMMAND,
252
252
  handler: (i, e) => {
253
- const n = i.get(V), t = i.get(ge), r = i.get(k);
253
+ const n = i.get(G), t = i.get(ge), r = i.get(k);
254
254
  if (!e) return !1;
255
255
  const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: a, subUnitId: d, undo: h, redo: l, objects: c } = o;
256
256
  return n.syncExecuteCommand(E.id, { unitId: a, subUnitId: d, op: l, objects: c, type: y.UPDATE }) ? (t.pushUndoRedo({
@@ -265,11 +265,11 @@ const xe = {
265
265
  ]
266
266
  }), !0) : !1;
267
267
  }
268
- }, xt = {
268
+ }, Ft = {
269
269
  id: "sheet.command.set-drawing-arrange",
270
270
  type: F.COMMAND,
271
271
  handler: (i, e) => {
272
- const n = i.get(V), t = i.get(ge);
272
+ const n = i.get(G), t = i.get(ge);
273
273
  if (!e) return !1;
274
274
  const r = i.get(k), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: d } = e, h = { unitId: s, subUnitId: o, drawingIds: a };
275
275
  let l;
@@ -287,10 +287,10 @@ const xe = {
287
287
  }), !0) : !1;
288
288
  }
289
289
  };
290
- function _r(i) {
290
+ function vr(i) {
291
291
  const e = [];
292
292
  return i.forEach((n) => {
293
- const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a } = t, d = En(0, 0, r.map((c) => c.transform || {})), h = r.map((c) => {
293
+ const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a } = t, d = yn(0, 0, r.map((c) => c.transform || {})), h = r.map((c) => {
294
294
  const u = c.transform || { left: 0, top: 0 }, { unitId: g, subUnitId: f, drawingId: m } = c;
295
295
  return {
296
296
  unitId: g,
@@ -307,7 +307,7 @@ function _r(i) {
307
307
  unitId: s,
308
308
  subUnitId: o,
309
309
  drawingId: a,
310
- drawingType: Ve.DRAWING_GROUP,
310
+ drawingType: Ge.DRAWING_GROUP,
311
311
  transform: d
312
312
  };
313
313
  e.push({
@@ -316,14 +316,14 @@ function _r(i) {
316
316
  });
317
317
  }), e;
318
318
  }
319
- function vr(i) {
319
+ function Sr(i) {
320
320
  const e = [];
321
321
  return i.forEach((n) => {
322
322
  const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a, transform: d = { width: 0, height: 0 } } = t;
323
323
  if (d == null)
324
324
  return;
325
325
  const h = r.map((c) => {
326
- const { transform: u } = c, { unitId: g, subUnitId: f, drawingId: m } = c, p = yn(u || {}, d, d.width || 0, d.height || 0);
326
+ const { transform: u } = c, { unitId: g, subUnitId: f, drawingId: m } = c, p = On(u || {}, d, d.width || 0, d.height || 0);
327
327
  return {
328
328
  unitId: g,
329
329
  subUnitId: f,
@@ -335,7 +335,7 @@ function vr(i) {
335
335
  unitId: s,
336
336
  subUnitId: o,
337
337
  drawingId: a,
338
- drawingType: Ve.DRAWING_GROUP,
338
+ drawingType: Ge.DRAWING_GROUP,
339
339
  transform: {
340
340
  left: 0,
341
341
  top: 0
@@ -347,11 +347,11 @@ function vr(i) {
347
347
  });
348
348
  }), e;
349
349
  }
350
- const Ft = {
350
+ const Yt = {
351
351
  id: "sheet.command.group-sheet-image",
352
352
  type: F.COMMAND,
353
353
  handler: (i, e) => {
354
- const n = i.get(V), t = i.get(ge), r = i.get(k);
354
+ const n = i.get(G), t = i.get(ge), r = i.get(k);
355
355
  if (!e) return !1;
356
356
  const s = [];
357
357
  e.forEach(({ parent: g, children: f }) => {
@@ -363,7 +363,7 @@ const Ft = {
363
363
  return n.syncExecuteCommand(E.id, { op: l, unitId: a, subUnitId: d, objects: c, type: y.GROUP }) ? (t.pushUndoRedo({
364
364
  unitID: a,
365
365
  undoMutations: [
366
- { id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: vr(c), type: y.UNGROUP } },
366
+ { id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: Sr(c), type: y.UNGROUP } },
367
367
  { id: j.id, params: s }
368
368
  ],
369
369
  redoMutations: [
@@ -372,11 +372,11 @@ const Ft = {
372
372
  ]
373
373
  }), !0) : !1;
374
374
  }
375
- }, Yt = {
375
+ }, kt = {
376
376
  id: "sheet.command.ungroup-sheet-image",
377
377
  type: F.COMMAND,
378
378
  handler: (i, e) => {
379
- const n = i.get(V), t = i.get(ge), r = i.get(k);
379
+ const n = i.get(G), t = i.get(ge), r = i.get(k);
380
380
  if (!e) return !1;
381
381
  const s = [];
382
382
  e.forEach(({ parent: g, children: f }) => {
@@ -388,7 +388,7 @@ const Ft = {
388
388
  return n.syncExecuteCommand(E.id, { op: l, unitId: a, subUnitId: d, objects: c, type: y.UNGROUP }) ? (t.pushUndoRedo({
389
389
  unitID: a,
390
390
  undoMutations: [
391
- { id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: _r(c), type: y.GROUP } },
391
+ { id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: vr(c), type: y.GROUP } },
392
392
  { id: j.id, params: s }
393
393
  ],
394
394
  redoMutations: [
@@ -398,7 +398,7 @@ const Ft = {
398
398
  }), !0) : !1;
399
399
  }
400
400
  };
401
- function $(i, e, n) {
401
+ function V(i, e, n) {
402
402
  const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: a = 0, skewX: d = 0, skewY: h = 0 } = i, { column: l, columnOffset: c, row: u, rowOffset: g } = t, { column: f, columnOffset: m, row: p, rowOffset: S } = r, C = n.attachRangeWithCoord({
403
403
  startColumn: l,
404
404
  endColumn: l,
@@ -416,19 +416,19 @@ function $(i, e, n) {
416
416
  if (v == null)
417
417
  return;
418
418
  const { startX: R, startY: _ } = C, { startX: b, startY: w } = v;
419
- let P = ee(R + c, 1), D = ee(_ + g, 1), T = ee(b + m - P, 1), U = ee(w + S - D, 1);
420
- C.startX === v.endX && (T = 0), C.startY === v.endY && (U = 0);
421
- const M = n.getCurrentSkeleton(), I = M.rowHeaderWidth + M.columnTotalWidth, A = M.columnHeaderHeight + M.rowTotalHeight;
422
- return P + T > I && (P = I - T), D + U > A && (D = A - U), {
419
+ let T = Q(R + c, 1), M = Q(_ + g, 1), U = Q(b + m - T, 1), O = Q(w + S - M, 1);
420
+ C.startX === v.endX && (U = 0), C.startY === v.endY && (O = 0);
421
+ const D = n.getCurrentSkeleton(), I = D.rowHeaderWidth + D.columnTotalWidth, A = D.columnHeaderHeight + D.rowTotalHeight;
422
+ return T + U > I && (T = I - U), M + O > A && (M = A - O), {
423
423
  flipY: s,
424
424
  flipX: o,
425
425
  angle: a,
426
426
  skewX: d,
427
427
  skewY: h,
428
- left: P,
429
- top: D,
430
- width: T,
431
- height: U
428
+ left: T,
429
+ top: M,
430
+ width: U,
431
+ height: O
432
432
  };
433
433
  }
434
434
  function N(i, e) {
@@ -437,17 +437,17 @@ function N(i, e) {
437
437
  return;
438
438
  const u = {
439
439
  column: c.actualColumn,
440
- columnOffset: ee(n - c.startX, 1),
440
+ columnOffset: Q(n - c.startX, 1),
441
441
  row: c.actualRow,
442
- rowOffset: ee(t - c.startY, 1)
442
+ rowOffset: Q(t - c.startY, 1)
443
443
  }, g = e.getSelectionCellByPosition(n + r, t + s);
444
444
  if (g == null)
445
445
  return;
446
446
  const f = {
447
447
  column: g.actualColumn,
448
- columnOffset: ee(n + r - g.startX, 1),
448
+ columnOffset: Q(n + r - g.startX, 1),
449
449
  row: g.actualRow,
450
- rowOffset: ee(t + s - g.startY, 1)
450
+ rowOffset: Q(t + s - g.startY, 1)
451
451
  };
452
452
  return {
453
453
  flipY: o,
@@ -459,10 +459,10 @@ function N(i, e) {
459
459
  to: f
460
460
  };
461
461
  }
462
- var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Ir = (i, e, n, t) => {
463
- for (var r = t > 1 ? void 0 : t ? Cr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
462
+ var Cr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, Rr = (i, e, n, t) => {
463
+ for (var r = t > 1 ? void 0 : t ? Ir(e, n) : e, s = i.length - 1, o; s >= 0; s--)
464
464
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
465
- return t && r && Sr(e, n, r), r;
465
+ return t && r && Cr(e, n, r), r;
466
466
  }, X = (i, e) => (n, t) => e(n, t, i);
467
467
  let Ue = class extends oe {
468
468
  constructor(i, e, n, t, r, s, o, a, d, h) {
@@ -473,12 +473,12 @@ let Ue = class extends oe {
473
473
  get _selectionRenderService() {
474
474
  return this._renderManagerService.getRenderById(
475
475
  this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
476
- ).with(Ge);
476
+ ).with(xe);
477
477
  }
478
478
  get _skeletonManagerService() {
479
479
  return this._renderManagerService.getRenderById(
480
480
  this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
481
- ).with(re);
481
+ ).with(se);
482
482
  }
483
483
  _init() {
484
484
  this._initCommandListeners(), this._updateImageListener(), this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._drawingAddListener();
@@ -489,19 +489,19 @@ let Ue = class extends oe {
489
489
  _initCommandListeners() {
490
490
  this.disposeWithMe(
491
491
  this._commandService.onCommandExecuted(async (i) => {
492
- if (i.id === Be.id || i.id === xe.id) {
492
+ if (i.id === We.id || i.id === Fe.id) {
493
493
  const e = i.params;
494
494
  if (e.files == null)
495
495
  return;
496
496
  const n = e.files.length;
497
- if (n > dt) {
497
+ if (n > lt) {
498
498
  this._messageService.show({
499
499
  type: be.Error,
500
- content: this._localeService.t("update-status.exceedMaxCount", String(dt))
500
+ content: this._localeService.t("update-status.exceedMaxCount", String(lt))
501
501
  });
502
502
  return;
503
503
  }
504
- this._imageIoService.setWaitCount(n), i.id === Be.id ? e.files.forEach(async (t) => {
504
+ this._imageIoService.setWaitCount(n), i.id === We.id ? e.files.forEach(async (t) => {
505
505
  await this._insertCellImage(t);
506
506
  }) : e.files.forEach(async (t) => {
507
507
  await this._insertFloatImage(t);
@@ -518,13 +518,13 @@ let Ue = class extends oe {
518
518
  e = await this._imageIoService.saveImage(i);
519
519
  } catch (C) {
520
520
  const v = C.message;
521
- v === ke.ERROR_EXCEED_SIZE ? this._messageService.show({
521
+ v === He.ERROR_EXCEED_SIZE ? this._messageService.show({
522
522
  type: be.Error,
523
- content: this._localeService.t("update-status.exceedMaxSize", String(In / (1024 * 1024)))
524
- }) : v === ke.ERROR_IMAGE_TYPE ? this._messageService.show({
523
+ content: this._localeService.t("update-status.exceedMaxSize", String(Rn / (1024 * 1024)))
524
+ }) : v === He.ERROR_IMAGE_TYPE ? this._messageService.show({
525
525
  type: be.Error,
526
526
  content: this._localeService.t("update-status.invalidImageType")
527
- }) : v === ke.ERROR_IMAGE && this._messageService.show({
527
+ }) : v === He.ERROR_IMAGE && this._messageService.show({
528
528
  type: be.Error,
529
529
  content: this._localeService.t("update-status.invalidImage")
530
530
  });
@@ -534,14 +534,14 @@ let Ue = class extends oe {
534
534
  const n = this._getUnitInfo();
535
535
  if (n == null)
536
536
  return;
537
- const { unitId: t, subUnitId: r } = n, { imageId: s, imageSourceType: o, source: a, base64Cache: d } = e, { width: h, height: l, image: c } = await Rn(d || ""), u = this._renderManagerService.getRenderById(t);
537
+ const { unitId: t, subUnitId: r } = n, { imageId: s, imageSourceType: o, source: a, base64Cache: d } = e, { width: h, height: l, image: c } = await Mn(d || ""), u = this._renderManagerService.getRenderById(t);
538
538
  if (u == null)
539
539
  return;
540
540
  const { width: g, height: f } = u.scene;
541
541
  this._imageIoService.addImageSourceCache(a, o, c);
542
542
  let m = 1;
543
- if (h > lt || l > ut) {
544
- const C = lt / h, v = ut / l;
543
+ if (h > ut || l > gt) {
544
+ const C = ut / h, v = gt / l;
545
545
  m = Math.max(C, v);
546
546
  }
547
547
  const p = this._getImagePosition(h * m, l * m, g, f);
@@ -551,10 +551,10 @@ let Ue = class extends oe {
551
551
  unitId: t,
552
552
  subUnitId: r,
553
553
  drawingId: s,
554
- drawingType: Ve.DRAWING_IMAGE,
554
+ drawingType: Ge.DRAWING_IMAGE,
555
555
  imageSourceType: o,
556
556
  source: a,
557
- transform: $(p, this._selectionRenderService, this._skeletonManagerService),
557
+ transform: V(p, this._selectionRenderService, this._skeletonManagerService),
558
558
  sheetTransform: p
559
559
  };
560
560
  this._commandService.executeCommand(st.id, {
@@ -584,7 +584,7 @@ let Ue = class extends oe {
584
584
  endColumn: 0
585
585
  };
586
586
  r && r.length > 0 && (s = r[r.length - 1].range);
587
- const o = An(this._skeletonManagerService.getCurrent().skeleton, s);
587
+ const o = Nn(this._skeletonManagerService.getCurrent().skeleton, s);
588
588
  if (o == null)
589
589
  return;
590
590
  let { startColumn: a, startRow: d, startX: h, startY: l } = o, c = !1;
@@ -616,7 +616,7 @@ let Ue = class extends oe {
616
616
  _updateOrderListener() {
617
617
  this._drawingManagerService.featurePluginOrderUpdate$.subscribe((i) => {
618
618
  const { unitId: e, subUnitId: n, drawingIds: t, arrangeType: r } = i;
619
- this._commandService.executeCommand(xt.id, {
619
+ this._commandService.executeCommand(Ft.id, {
620
620
  unitId: e,
621
621
  subUnitId: n,
622
622
  drawingIds: t,
@@ -639,11 +639,11 @@ let Ue = class extends oe {
639
639
  return;
640
640
  const l = {
641
641
  ...n,
642
- transform: { ...d.transform, ...a, ...$(h, this._selectionRenderService, this._skeletonManagerService) },
642
+ transform: { ...d.transform, ...a, ...V(h, this._selectionRenderService, this._skeletonManagerService) },
643
643
  sheetTransform: { ...h }
644
644
  };
645
645
  e.push(l);
646
- }), e.length > 0 && this._commandService.executeCommand(Fe.id, {
646
+ }), e.length > 0 && this._commandService.executeCommand(Ye.id, {
647
647
  unitId: i[0].unitId,
648
648
  drawings: e
649
649
  }));
@@ -651,11 +651,11 @@ let Ue = class extends oe {
651
651
  }
652
652
  _groupDrawingListener() {
653
653
  this._drawingManagerService.featurePluginGroupUpdate$.subscribe((i) => {
654
- this._commandService.executeCommand(Ft.id, i);
654
+ this._commandService.executeCommand(Yt.id, i);
655
655
  const { unitId: e, subUnitId: n, drawingId: t } = i[0].parent;
656
656
  this._drawingManagerService.focusDrawing([{ unitId: e, subUnitId: n, drawingId: t }]);
657
657
  }), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((i) => {
658
- this._commandService.executeCommand(Yt.id, i);
658
+ this._commandService.executeCommand(kt.id, i);
659
659
  });
660
660
  }
661
661
  _focusDrawingListener() {
@@ -678,22 +678,22 @@ let Ue = class extends oe {
678
678
  if (t == null)
679
679
  return;
680
680
  const { sheetTransform: r } = t;
681
- t.transform = $(r, this._selectionRenderService, this._skeletonManagerService);
681
+ t.transform = V(r, this._selectionRenderService, this._skeletonManagerService);
682
682
  });
683
683
  const e = i[0].unitId;
684
684
  this._drawingManagerService.registerDrawingData(e, this._sheetDrawingService.getDrawingDataForUnit(e)), this._drawingManagerService.initializeNotification(e);
685
685
  }
686
686
  };
687
- Ue = Ir([
688
- ie(se.Rendered, Ue),
689
- X(0, V),
687
+ Ue = Rr([
688
+ ee(te.Rendered, Ue),
689
+ X(0, G),
690
690
  X(1, he),
691
- X(2, W(Zn)),
692
- X(3, vt),
691
+ X(2, W(qn)),
692
+ X(3, St),
693
693
  X(4, k),
694
694
  X(5, z),
695
- X(6, _t),
696
- X(7, Yn),
695
+ X(6, vt),
696
+ X(7, kn),
697
697
  X(8, W(_e)),
698
698
  X(9, K)
699
699
  ], Ue);
@@ -705,23 +705,23 @@ var Y = function() {
705
705
  }
706
706
  return i;
707
707
  }, Y.apply(this, arguments);
708
- }, Rr = function(i, e) {
708
+ }, Mr = function(i, e) {
709
709
  var n = {};
710
710
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
711
711
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
712
712
  for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
713
713
  e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
714
714
  return n;
715
- }, kt = Lt(function(i, e) {
716
- var n = i.icon, t = i.id, r = i.className, s = i.extend, o = Rr(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Bt("_".concat(br()));
717
- return Ht(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, Y({ ref: e, className: a }, o), s);
715
+ }, Ht = Bt(function(i, e) {
716
+ var n = i.icon, t = i.id, r = i.className, s = i.extend, o = Mr(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Wt("_".concat(Er()));
717
+ return Xt(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, Y({ ref: e, className: a }, o), s);
718
718
  });
719
- function Ht(i, e, n, t, r) {
720
- return Wt(i.tag, Y(Y({ key: e }, Mr(i, n, r)), t), (Dr(i, n).children || []).map(function(s, o) {
721
- return Ht(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
719
+ function Xt(i, e, n, t, r) {
720
+ return $t(i.tag, Y(Y({ key: e }, Dr(i, n, r)), t), (br(i, n).children || []).map(function(s, o) {
721
+ return Xt(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
722
722
  }));
723
723
  }
724
- function Mr(i, e, n) {
724
+ function Dr(i, e, n) {
725
725
  var t = Y({}, i.attrs);
726
726
  n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
727
727
  var r = e.defIds;
@@ -730,117 +730,117 @@ function Mr(i, e, n) {
730
730
  typeof a == "string" && (t[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
731
731
  })), t;
732
732
  }
733
- function Dr(i, e) {
733
+ function br(i, e) {
734
734
  var n, t = e.defIds;
735
735
  return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? Y(Y({}, i), { children: i.children.map(function(r) {
736
736
  return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? Y(Y({}, r), { attrs: Y(Y({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
737
737
  }) }) : i;
738
738
  }
739
- function br() {
739
+ function Er() {
740
740
  return Math.random().toString(36).substring(2, 8);
741
741
  }
742
- kt.displayName = "UniverIcon";
743
- var Er = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Xt = Lt(function(i, e) {
744
- return Wt(kt, Object.assign({}, i, {
742
+ Ht.displayName = "UniverIcon";
743
+ var yr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, zt = Bt(function(i, e) {
744
+ return $t(Ht, Object.assign({}, i, {
745
745
  id: "add-image-single",
746
746
  ref: e,
747
- icon: Er
747
+ icon: yr
748
748
  }));
749
749
  });
750
- Xt.displayName = "AddImageSingle";
751
- const yr = "univer-upload-file-menu", Or = "univer-upload-file-menu-input", wt = {
752
- uploadFileMenu: yr,
753
- uploadFileMenuInput: Or
754
- }, zt = "COMPONENT_UPLOAD_FILE_MENU";
755
- var We = /* @__PURE__ */ ((i) => (i[i.cellImage = 0] = "cellImage", i[i.floatImage = 1] = "floatImage", i))(We || {});
756
- const Pr = (i) => {
757
- const { type: e } = i, n = q(V), t = Bt(null), r = () => {
750
+ zt.displayName = "AddImageSingle";
751
+ const Or = "univer-upload-file-menu", Pr = "univer-upload-file-menu-input", _t = {
752
+ uploadFileMenu: Or,
753
+ uploadFileMenuInput: Pr
754
+ }, Kt = "COMPONENT_UPLOAD_FILE_MENU";
755
+ var $e = /* @__PURE__ */ ((i) => (i[i.cellImage = 0] = "cellImage", i[i.floatImage = 1] = "floatImage", i))($e || {});
756
+ const Tr = (i) => {
757
+ const { type: e } = i, n = Z(G), t = Wt(null), r = () => {
758
758
  var a;
759
759
  (a = t.current) == null || a.click();
760
- }, s = Mn.map((a) => `.${a.replace("image/", "")}`).join(","), o = (a) => {
760
+ }, s = Dn.map((a) => `.${a.replace("image/", "")}`).join(","), o = (a) => {
761
761
  const d = a.target.files;
762
762
  if (d == null)
763
763
  return;
764
764
  const h = Array.from(d);
765
- e === We.floatImage ? n.executeCommand(xe.id, { files: h }) : e === We.cellImage && n.executeCommand(Be.id, { files: h }), t.current && (t.current.value = "");
765
+ e === $e.floatImage ? n.executeCommand(Fe.id, { files: h }) : e === $e.cellImage && n.executeCommand(We.id, { files: h }), t.current && (t.current.value = "");
766
766
  };
767
- return /* @__PURE__ */ L.createElement("div", { onClick: r, className: wt.uploadFileMenu }, /* @__PURE__ */ L.createElement(
767
+ return /* @__PURE__ */ L.createElement("div", { onClick: r, className: _t.uploadFileMenu }, /* @__PURE__ */ L.createElement(
768
768
  "input",
769
769
  {
770
770
  type: "file",
771
- className: wt.uploadFileMenuInput,
771
+ className: _t.uploadFileMenuInput,
772
772
  ref: t,
773
773
  onChange: o,
774
774
  accept: s,
775
775
  multiple: !0
776
776
  }
777
777
  ));
778
- }, Kt = "addition-and-subtraction-single", Jt = "sheet.menu.image";
779
- function Tr(i) {
778
+ }, Jt = "addition-and-subtraction-single", Zt = "sheet.menu.image";
779
+ function Ur(i) {
780
780
  return {
781
- id: Jt,
782
- type: St.SUBITEMS,
783
- positions: [kn.TOOLBAR_START],
784
- group: Hn.TOOLBAR_FORMULAS_INSERT,
785
- icon: Kt,
781
+ id: Zt,
782
+ type: Ct.SUBITEMS,
783
+ positions: [Hn.TOOLBAR_START],
784
+ group: Xn.TOOLBAR_FORMULAS_INSERT,
785
+ icon: Jt,
786
786
  tooltip: "sheetImage.title",
787
- hidden$: Ct(i, B.UNIVER_SHEET),
788
- disabled$: Nn(i, { workbookTypes: [Ze], worksheetTypes: [Pe], rangeTypes: [qn] })
787
+ hidden$: It(i, B.UNIVER_SHEET),
788
+ disabled$: jn(i, { workbookTypes: [qe], worksheetTypes: [Pe], rangeTypes: [Qn] })
789
789
  };
790
790
  }
791
- function Ur(i) {
791
+ function Ar(i) {
792
792
  return {
793
- id: xe.id,
793
+ id: Fe.id,
794
794
  title: "sheetImage.upload.float",
795
- type: St.SELECTOR,
795
+ type: Ct.SELECTOR,
796
796
  label: {
797
- name: zt,
797
+ name: Kt,
798
798
  props: {
799
- type: We.floatImage
799
+ type: $e.floatImage
800
800
  }
801
801
  },
802
- positions: [Jt],
803
- hidden$: Ct(i, B.UNIVER_SHEET)
802
+ positions: [Zt],
803
+ hidden$: It(i, B.UNIVER_SHEET)
804
804
  };
805
805
  }
806
- const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", jr = "univer-image-common-panel-border", Lr = "univer-image-common-panel-title", Br = "univer-image-common-panel-subtitle", Wr = "univer-image-common-panel-row", $r = "univer-image-common-panel-row-vertical", Vr = "univer-image-common-panel-column", Gr = "univer-image-common-panel-column-center", xr = "univer-image-common-panel-inline", Fr = "univer-image-common-panel-span2", Yr = "univer-image-common-panel-span3", kr = "univer-image-common-panel-input", Hr = "univer-sheet-image-menu", Xr = "univer-sheet-image-menu-input", Z = {
807
- imageCommonPanel: Ar,
808
- imageCommonPanelGrid: Nr,
809
- imageCommonPanelBorder: jr,
810
- imageCommonPanelTitle: Lr,
811
- imageCommonPanelSubtitle: Br,
812
- imageCommonPanelRow: Wr,
813
- imageCommonPanelRowVertical: $r,
814
- imageCommonPanelColumn: Vr,
815
- imageCommonPanelColumnCenter: Gr,
816
- imageCommonPanelInline: xr,
817
- imageCommonPanelSpan2: Fr,
818
- imageCommonPanelSpan3: Yr,
819
- imageCommonPanelInput: kr,
820
- sheetImageMenu: Hr,
821
- sheetImageMenuInput: Xr
822
- }, zr = (i) => {
806
+ const Nr = "univer-image-common-panel", jr = "univer-image-common-panel-grid", Lr = "univer-image-common-panel-border", Br = "univer-image-common-panel-title", Wr = "univer-image-common-panel-subtitle", $r = "univer-image-common-panel-row", Vr = "univer-image-common-panel-row-vertical", Gr = "univer-image-common-panel-column", xr = "univer-image-common-panel-column-center", Fr = "univer-image-common-panel-inline", Yr = "univer-image-common-panel-span2", kr = "univer-image-common-panel-span3", Hr = "univer-image-common-panel-input", Xr = "univer-sheet-image-menu", zr = "univer-sheet-image-menu-input", J = {
807
+ imageCommonPanel: Nr,
808
+ imageCommonPanelGrid: jr,
809
+ imageCommonPanelBorder: Lr,
810
+ imageCommonPanelTitle: Br,
811
+ imageCommonPanelSubtitle: Wr,
812
+ imageCommonPanelRow: $r,
813
+ imageCommonPanelRowVertical: Vr,
814
+ imageCommonPanelColumn: Gr,
815
+ imageCommonPanelColumnCenter: xr,
816
+ imageCommonPanelInline: Fr,
817
+ imageCommonPanelSpan2: Yr,
818
+ imageCommonPanelSpan3: kr,
819
+ imageCommonPanelInput: Hr,
820
+ sheetImageMenu: Xr,
821
+ sheetImageMenuInput: zr
822
+ }, Kr = (i) => {
823
823
  var v;
824
- const e = q(V), n = q(_e), t = q(z), r = q(K), { drawings: s } = i, o = s[0];
824
+ const e = Z(G), n = Z(_e), t = Z(z), r = Z(K), { drawings: s } = i, o = s[0];
825
825
  if (o == null)
826
826
  return;
827
827
  const { unitId: a } = o, d = r.getRenderById(a), h = d == null ? void 0 : d.scene;
828
828
  if (h == null)
829
829
  return;
830
- const l = h.getTransformerByCreate(), [c, u] = et(!0), g = (v = o.anchorType) != null ? v : O.Position, [f, m] = et(g);
830
+ const l = h.getTransformerByCreate(), [c, u] = tt(!0), g = (v = o.anchorType) != null ? v : P.Position, [f, m] = tt(g);
831
831
  function p(R, _) {
832
832
  const b = [];
833
833
  return R.forEach((w) => {
834
- const { oKey: P } = w, D = _.getDrawingOKey(P);
835
- if (D == null)
834
+ const { oKey: T } = w, M = _.getDrawingOKey(T);
835
+ if (M == null)
836
836
  return b.push(null), !0;
837
- const { unitId: T, subUnitId: U, drawingId: M, drawingType: I, anchorType: A, sheetTransform: G } = D;
837
+ const { unitId: U, subUnitId: O, drawingId: D, drawingType: I, anchorType: A, sheetTransform: $ } = M;
838
838
  b.push({
839
- unitId: T,
840
- subUnitId: U,
841
- drawingId: M,
839
+ unitId: U,
840
+ subUnitId: O,
841
+ drawingId: D,
842
842
  anchorType: A,
843
- sheetTransform: G,
843
+ sheetTransform: $,
844
844
  drawingType: I
845
845
  });
846
846
  }), b;
@@ -849,14 +849,14 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
849
849
  const R = l.clearControl$.subscribe((b) => {
850
850
  b === !0 && u(!1);
851
851
  }), _ = l.changeStart$.subscribe((b) => {
852
- var D;
853
- const { objects: w } = b, P = p(w, t);
854
- if (P.length === 0)
852
+ var M;
853
+ const { objects: w } = b, T = p(w, t);
854
+ if (T.length === 0)
855
855
  u(!1);
856
- else if (P.length >= 1) {
856
+ else if (T.length >= 1) {
857
857
  u(!0);
858
- const T = ((D = P[0]) == null ? void 0 : D.anchorType) || O.Position;
859
- m(T);
858
+ const U = ((M = T[0]) == null ? void 0 : M.anchorType) || P.Position;
859
+ m(U);
860
860
  }
861
861
  });
862
862
  return () => {
@@ -874,15 +874,15 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
874
874
  drawingId: w.drawingId,
875
875
  anchorType: R
876
876
  }));
877
- e.executeCommand(Fe.id, {
877
+ e.executeCommand(Ye.id, {
878
878
  unitId: _[0].unitId,
879
879
  drawings: b
880
880
  });
881
881
  }
882
882
  const C = (R) => R ? "block" : "none";
883
- return /* @__PURE__ */ L.createElement("div", { className: Ee(Z.imageCommonPanelGrid, Z.imageCommonPanelBorder), style: { display: C(c) } }, /* @__PURE__ */ L.createElement("div", { className: Z.imageCommonPanelRow }, /* @__PURE__ */ L.createElement("div", { className: Ee(Z.imageCommonPanelColumn, Z.imageCommonPanelTitle) }, /* @__PURE__ */ L.createElement("div", null, n.t("drawing-anchor.title")))), /* @__PURE__ */ L.createElement("div", { className: Ee(Z.imageCommonPanelRow) }, /* @__PURE__ */ L.createElement("div", { className: Ee(Z.imageCommonPanelColumn) }, /* @__PURE__ */ L.createElement(cr, { value: f, onChange: S, direction: "vertical" }, /* @__PURE__ */ L.createElement(Xe, { value: O.Both }, n.t("drawing-anchor.both")), /* @__PURE__ */ L.createElement(Xe, { value: O.Position }, n.t("drawing-anchor.position")), /* @__PURE__ */ L.createElement(Xe, { value: O.None }, n.t("drawing-anchor.none"))))));
884
- }, Kr = () => {
885
- const i = q(z), e = i.getFocusDrawings(), [n, t] = et(e);
883
+ return /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelGrid, J.imageCommonPanelBorder), style: { display: C(c) } }, /* @__PURE__ */ L.createElement("div", { className: J.imageCommonPanelRow }, /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelColumn, J.imageCommonPanelTitle) }, /* @__PURE__ */ L.createElement("div", null, n.t("drawing-anchor.title")))), /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelRow) }, /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelColumn) }, /* @__PURE__ */ L.createElement(dr, { value: f, onChange: S, direction: "vertical" }, /* @__PURE__ */ L.createElement(ze, { value: P.Both }, n.t("drawing-anchor.both")), /* @__PURE__ */ L.createElement(ze, { value: P.Position }, n.t("drawing-anchor.position")), /* @__PURE__ */ L.createElement(ze, { value: P.None }, n.t("drawing-anchor.none"))))));
884
+ }, Jr = () => {
885
+ const i = Z(z), e = i.getFocusDrawings(), [n, t] = tt(e);
886
886
  return rt(() => {
887
887
  const r = i.focus$.subscribe((s) => {
888
888
  t(s);
@@ -890,12 +890,12 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
890
890
  return () => {
891
891
  r.unsubscribe();
892
892
  };
893
- }, []), !!(n != null && n.length) && /* @__PURE__ */ L.createElement("div", { className: Z.imageCommonPanel }, /* @__PURE__ */ L.createElement(_n, { drawings: n }), /* @__PURE__ */ L.createElement(zr, { drawings: n }));
893
+ }, []), !!(n != null && n.length) && /* @__PURE__ */ L.createElement("div", { className: J.imageCommonPanel }, /* @__PURE__ */ L.createElement(vn, { drawings: n }), /* @__PURE__ */ L.createElement(Kr, { drawings: n }));
894
894
  }, ve = {
895
895
  id: "sheet.command.move-drawing",
896
896
  type: F.COMMAND,
897
897
  handler: (i, e) => {
898
- const n = i.get(V), t = i.get(k), r = i.get(Ge), { direction: s } = e, o = t.getFocusDrawings();
898
+ const n = i.get(G), t = i.get(k), r = i.get(xe), { direction: s } = e, o = t.getFocusDrawings();
899
899
  if (o.length === 0)
900
900
  return !1;
901
901
  const a = o[0].unitId, d = o.map((l) => {
@@ -903,22 +903,22 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
903
903
  if (c == null)
904
904
  return null;
905
905
  const u = { ...c }, { left: g = 0, top: f = 0 } = c;
906
- return s === Q.UP ? u.top = f - 1 : s === Q.DOWN ? u.top = f + 1 : s === Q.LEFT ? u.left = g - 1 : s === Q.RIGHT && (u.left = g + 1), {
906
+ return s === q.UP ? u.top = f - 1 : s === q.DOWN ? u.top = f + 1 : s === q.LEFT ? u.left = g - 1 : s === q.RIGHT && (u.left = g + 1), {
907
907
  ...l,
908
908
  transform: u,
909
909
  sheetTransform: N(u, r)
910
910
  };
911
911
  }).filter((l) => l != null);
912
- return n.syncExecuteCommand(Fe.id, {
912
+ return n.syncExecuteCommand(Ye.id, {
913
913
  unitId: a,
914
914
  drawings: d
915
915
  }) ? (n.syncExecuteCommand(j.id, [a]), !0) : !1;
916
916
  }
917
- }, Zt = {
917
+ }, qt = {
918
918
  id: "sheet.command.delete-drawing",
919
919
  type: F.COMMAND,
920
920
  handler: (i) => {
921
- const e = i.get(V), t = i.get(k).getFocusDrawings();
921
+ const e = i.get(G), t = i.get(k).getFocusDrawings();
922
922
  if (t.length === 0)
923
923
  return !1;
924
924
  const r = t[0].unitId, s = t.map((o) => {
@@ -937,9 +937,9 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
937
937
  }
938
938
  };
939
939
  function Se(i) {
940
- return !i.getContextValue(on) && !i.getContextValue(an) && i.getContextValue(we);
940
+ return !i.getContextValue(an) && !i.getContextValue(cn) && i.getContextValue(we);
941
941
  }
942
- const Jr = {
942
+ const Zr = {
943
943
  id: ve.id,
944
944
  description: "shortcut.sheet.drawing-move-down",
945
945
  group: "4_sheet-drawing-view",
@@ -947,9 +947,9 @@ const Jr = {
947
947
  priority: 100,
948
948
  preconditions: Se,
949
949
  staticParameters: {
950
- direction: Q.DOWN
950
+ direction: q.DOWN
951
951
  }
952
- }, Zr = {
952
+ }, qr = {
953
953
  id: ve.id,
954
954
  description: "shortcut.sheet.drawing-move-up",
955
955
  group: "4_sheet-drawing-view",
@@ -957,9 +957,9 @@ const Jr = {
957
957
  priority: 100,
958
958
  preconditions: Se,
959
959
  staticParameters: {
960
- direction: Q.UP
960
+ direction: q.UP
961
961
  }
962
- }, qr = {
962
+ }, Qr = {
963
963
  id: ve.id,
964
964
  description: "shortcut.sheet.drawing-move-left",
965
965
  group: "4_sheet-drawing-view",
@@ -967,9 +967,9 @@ const Jr = {
967
967
  priority: 100,
968
968
  preconditions: Se,
969
969
  staticParameters: {
970
- direction: Q.LEFT
970
+ direction: q.LEFT
971
971
  }
972
- }, Qr = {
972
+ }, ei = {
973
973
  id: ve.id,
974
974
  description: "shortcut.sheet.drawing-move-right",
975
975
  group: "4_sheet-drawing-view",
@@ -977,10 +977,10 @@ const Jr = {
977
977
  priority: 100,
978
978
  preconditions: Se,
979
979
  staticParameters: {
980
- direction: Q.RIGHT
980
+ direction: q.RIGHT
981
981
  }
982
- }, ei = {
983
- id: Zt.id,
982
+ }, ti = {
983
+ id: qt.id,
984
984
  description: "shortcut.sheet.drawing-delete",
985
985
  group: "4_sheet-drawing-view",
986
986
  // when focusing on any other input tag do not trigger this shortcut
@@ -988,25 +988,25 @@ const Jr = {
988
988
  binding: ue.DELETE,
989
989
  mac: ue.BACKSPACE
990
990
  };
991
- var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (i, e, n, t) => {
992
- for (var r = t > 1 ? void 0 : t ? ni(e, n) : e, s = i.length - 1, o; s >= 0; s--)
991
+ var ni = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, ii = (i, e, n, t) => {
992
+ for (var r = t > 1 ? void 0 : t ? ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
993
993
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
994
- return t && r && ti(e, n, r), r;
994
+ return t && r && ni(e, n, r), r;
995
995
  }, me = (i, e) => (n, t) => e(n, t, i);
996
- const ii = {};
996
+ const si = {};
997
997
  let pe = class extends oe {
998
998
  constructor(i, e, n, t, r, s) {
999
999
  super(), this._config = i, this._injector = e, this._componentManager = n, this._menuService = t, this._commandService = r, this._shortcutService = s, this._init();
1000
1000
  }
1001
1001
  _initCustomComponents() {
1002
1002
  const i = this._componentManager;
1003
- this.disposeWithMe(i.register(Kt, Xt)), this.disposeWithMe(i.register(zt, Pr)), this.disposeWithMe(i.register($t, Kr));
1003
+ this.disposeWithMe(i.register(Jt, zt)), this.disposeWithMe(i.register(Kt, Tr)), this.disposeWithMe(i.register(Vt, Jr));
1004
1004
  }
1005
1005
  _initMenus() {
1006
1006
  const { menu: i = {} } = this._config;
1007
1007
  [
1008
- Tr,
1009
- Ur
1008
+ Ur,
1009
+ Ar
1010
1010
  // UploadCellImageMenuFactory,
1011
1011
  ].forEach((e) => {
1012
1012
  this._menuService.addMenuItem(e(this._injector), i);
@@ -1014,29 +1014,29 @@ let pe = class extends oe {
1014
1014
  }
1015
1015
  _initCommands() {
1016
1016
  [
1017
- xe,
1018
- Be,
1017
+ Fe,
1018
+ We,
1019
1019
  st,
1020
1020
  it,
1021
- Fe,
1022
- Vt,
1023
- j,
1021
+ Ye,
1024
1022
  Gt,
1025
- Ft,
1023
+ j,
1024
+ xt,
1026
1025
  Yt,
1026
+ kt,
1027
1027
  ve,
1028
- Zt,
1029
- xt
1028
+ qt,
1029
+ Ft
1030
1030
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
1031
1031
  }
1032
1032
  _initShortcuts() {
1033
1033
  [
1034
1034
  // sheet drawing shortcuts
1035
- Jr,
1036
1035
  Zr,
1037
1036
  qr,
1038
1037
  Qr,
1039
- ei
1038
+ ei,
1039
+ ti
1040
1040
  ].forEach((i) => {
1041
1041
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
1042
1042
  });
@@ -1045,21 +1045,20 @@ let pe = class extends oe {
1045
1045
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
1046
1046
  }
1047
1047
  };
1048
- pe = ri([
1049
- ie(se.Rendered, pe),
1048
+ pe = ii([
1049
+ ee(te.Rendered, pe),
1050
1050
  me(1, W(nt)),
1051
- me(2, W(Xn)),
1052
- me(3, zn),
1053
- me(4, V),
1054
- me(5, Kn)
1051
+ me(2, W(zn)),
1052
+ me(3, Kn),
1053
+ me(4, G),
1054
+ me(5, Jn)
1055
1055
  ], pe);
1056
- var si = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, ai = (i, e, n, t) => {
1057
- for (var r = t > 1 ? void 0 : t ? oi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1056
+ var oi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, ci = (i, e, n, t) => {
1057
+ for (var r = t > 1 ? void 0 : t ? ai(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1058
1058
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1059
- return t && r && si(e, n, r), r;
1059
+ return t && r && oi(e, n, r), r;
1060
1060
  }, ce = (i, e) => (n, t) => e(n, t, i);
1061
- const ci = [
1062
- It.id,
1061
+ const di = [
1063
1062
  Rt.id,
1064
1063
  Mt.id,
1065
1064
  Dt.id,
@@ -1067,21 +1066,22 @@ const ci = [
1067
1066
  Et.id,
1068
1067
  yt.id,
1069
1068
  Ot.id,
1070
- qe.id,
1071
- Qe.id,
1072
1069
  Pt.id,
1070
+ Qe.id,
1071
+ et.id,
1073
1072
  Tt.id,
1074
1073
  Ut.id,
1075
1074
  At.id,
1076
1075
  Nt.id,
1077
- jt.id
1078
- ], di = [
1079
- Qn.id,
1076
+ jt.id,
1077
+ Lt.id
1078
+ ], li = [
1080
1079
  er.id,
1081
1080
  tr.id,
1082
1081
  nr.id,
1083
1082
  rr.id,
1084
- ir.id
1083
+ ir.id,
1084
+ sr.id
1085
1085
  ];
1086
1086
  let Ae = class extends oe {
1087
1087
  constructor(i, e, n, t, r, s) {
@@ -1092,12 +1092,12 @@ let Ae = class extends oe {
1092
1092
  get _selectionRenderService() {
1093
1093
  return this._renderManagerService.getRenderById(
1094
1094
  this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
1095
- ).with(Ge);
1095
+ ).with(xe);
1096
1096
  }
1097
1097
  get _skeletonManagerService() {
1098
1098
  return this._renderManagerService.getRenderById(
1099
1099
  this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
1100
- ).with(re);
1100
+ ).with(se);
1101
1101
  }
1102
1102
  _init() {
1103
1103
  this._sheetInterceptorListener(), this._commandListener(), this._sheetRefreshListener();
@@ -1106,55 +1106,55 @@ let Ae = class extends oe {
1106
1106
  this.disposeWithMe(
1107
1107
  this._sheetInterceptorService.interceptCommand({
1108
1108
  getMutations: (i) => {
1109
- if (!ci.includes(i.id))
1109
+ if (!di.includes(i.id))
1110
1110
  return { redos: [], undos: [] };
1111
1111
  if (i.params == null)
1112
1112
  return { redos: [], undos: [] };
1113
1113
  const e = i.id;
1114
- if (e === It.id)
1115
- return this._moveRowInterceptor(i.params, "insert");
1116
1114
  if (e === Rt.id)
1117
- return this._moveColInterceptor(i.params, "insert");
1115
+ return this._moveRowInterceptor(i.params, "insert");
1118
1116
  if (e === Mt.id)
1119
- return this._moveRowInterceptor(i.params, "remove");
1117
+ return this._moveColInterceptor(i.params, "insert");
1120
1118
  if (e === Dt.id)
1119
+ return this._moveRowInterceptor(i.params, "remove");
1120
+ if (e === bt.id)
1121
1121
  return this._moveColInterceptor(i.params, "remove");
1122
- if (e === bt.id) {
1122
+ if (e === Et.id) {
1123
1123
  const { range: n } = i.params;
1124
1124
  return this._getRangeMoveUndo(
1125
1125
  n,
1126
1126
  0
1127
1127
  /* deleteLeft */
1128
1128
  );
1129
- } else if (e === Et.id) {
1129
+ } else if (e === yt.id) {
1130
1130
  const { range: n } = i.params;
1131
1131
  return this._getRangeMoveUndo(
1132
1132
  n,
1133
1133
  1
1134
1134
  /* deleteUp */
1135
1135
  );
1136
- } else if (e === yt.id) {
1136
+ } else if (e === Ot.id) {
1137
1137
  const { range: n } = i.params;
1138
1138
  return this._getRangeMoveUndo(
1139
1139
  n,
1140
1140
  2
1141
1141
  /* insertDown */
1142
1142
  );
1143
- } else if (e === Ot.id) {
1143
+ } else if (e === Pt.id) {
1144
1144
  const { range: n } = i.params;
1145
1145
  return this._getRangeMoveUndo(
1146
1146
  n,
1147
1147
  3
1148
1148
  /* insertRight */
1149
1149
  );
1150
- } else if (e === Ut.id || e === At.id) {
1150
+ } else if (e === At.id || e === Nt.id) {
1151
1151
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1152
1152
  return this._getDrawingUndoForRowVisible(t, r, s);
1153
- } else if (e === Nt.id || e === jt.id) {
1153
+ } else if (e === jt.id || e === Lt.id) {
1154
1154
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1155
1155
  return this._getDrawingUndoForColVisible(t, r, s);
1156
- } else if (e === qe.id || e === Qe.id || e === Pt.id || e === Tt.id) {
1157
- const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === qe.id || e === Qe.id;
1156
+ } else if (e === Qe.id || e === et.id || e === Tt.id || e === Ut.id) {
1157
+ const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === Qe.id || e === et.id;
1158
1158
  return this._getDrawingUndoForRowAndColSize(t, r, s, o);
1159
1159
  }
1160
1160
  return { redos: [], undos: [] };
@@ -1186,7 +1186,7 @@ let Ae = class extends oe {
1186
1186
  };
1187
1187
  }
1188
1188
  _getUpdateOrDeleteDrawings(i, e, n) {
1189
- const t = [], r = [], { sheetTransform: s, anchorType: o = O.Position, transform: a, unitId: d, subUnitId: h, drawingId: l } = n, { from: c, to: u } = s, { row: g, column: f } = c, { row: m, column: p } = u;
1189
+ const t = [], r = [], { sheetTransform: s, anchorType: o = P.Position, transform: a, unitId: d, subUnitId: h, drawingId: l } = n, { from: c, to: u } = s, { row: g, column: f } = c, { row: m, column: p } = u;
1190
1190
  if (s == null || a == null)
1191
1191
  return {
1192
1192
  updateDrawings: t,
@@ -1216,7 +1216,7 @@ let Ae = class extends oe {
1216
1216
  _ = w == null ? void 0 : w.newSheetTransform, b = w == null ? void 0 : w.newTransform;
1217
1217
  }
1218
1218
  if (_ != null && b != null) {
1219
- const w = $(_, this._selectionRenderService, this._skeletonManagerService);
1219
+ const w = V(_, this._selectionRenderService, this._skeletonManagerService);
1220
1220
  t.push({ ...n, sheetTransform: _, transform: w });
1221
1221
  }
1222
1222
  return { updateDrawings: t, deleteDrawings: r };
@@ -1232,22 +1232,22 @@ let Ae = class extends oe {
1232
1232
  _getDrawingUndoForColVisible(i, e, n) {
1233
1233
  const t = this._drawingManagerService.getDrawingData(i, e), r = [], s = [];
1234
1234
  if (Object.keys(t).forEach((l) => {
1235
- const c = t[l], { sheetTransform: u, transform: g, anchorType: f = O.Position } = c;
1236
- if (f === O.None)
1235
+ const c = t[l], { sheetTransform: u, transform: g, anchorType: f = P.Position } = c;
1236
+ if (f === P.None)
1237
1237
  this._remainDrawingSize(g, r, c);
1238
1238
  else {
1239
1239
  const { from: m, to: p } = u, { row: S, column: C } = m, { row: v, column: R } = p;
1240
1240
  for (let _ = 0; _ < n.length; _++) {
1241
- const b = n[_], { startRow: w, endRow: P, startColumn: D, endColumn: T } = b;
1242
- if (R < D)
1241
+ const b = n[_], { startRow: w, endRow: T, startColumn: M, endColumn: U } = b;
1242
+ if (R < M)
1243
1243
  continue;
1244
- if (f === O.Position) {
1244
+ if (f === P.Position) {
1245
1245
  let I = null, A = null;
1246
- if (C >= D && C <= T) {
1247
- const G = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: T, startRow: m.row, endRow: p.row });
1248
- if (G == null)
1246
+ if (C >= M && C <= U) {
1247
+ const $ = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: U, startRow: m.row, endRow: p.row });
1248
+ if ($ == null)
1249
1249
  return;
1250
- A = { ...g, left: G.startX };
1250
+ A = { ...g, left: $.startX };
1251
1251
  }
1252
1252
  if (A != null && (I = N(A, this._selectionRenderService), I != null && A != null)) {
1253
1253
  r.push({ ...c, sheetTransform: I, transform: A });
@@ -1256,40 +1256,40 @@ let Ae = class extends oe {
1256
1256
  this._remainDrawingSize(g, r, c);
1257
1257
  continue;
1258
1258
  }
1259
- if (C >= D && R <= T)
1259
+ if (C >= M && R <= U)
1260
1260
  continue;
1261
- let U = null, M = null;
1262
- if (C >= D && C <= T) {
1263
- const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: T, startRow: m.row, endRow: p.row });
1261
+ let O = null, D = null;
1262
+ if (C >= M && C <= U) {
1263
+ const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: U, startRow: m.row, endRow: p.row });
1264
1264
  if (I == null)
1265
1265
  return;
1266
- M = {
1266
+ D = {
1267
1267
  ...g,
1268
1268
  left: (I == null ? void 0 : I.startX) || 0,
1269
1269
  width: ((g == null ? void 0 : g.width) || 0) - I.endX + I.startX
1270
1270
  };
1271
- } else if (R >= D && R <= T) {
1272
- const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: D, endColumn: R, startRow: m.row, endRow: p.row });
1271
+ } else if (R >= M && R <= U) {
1272
+ const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: M, endColumn: R, startRow: m.row, endRow: p.row });
1273
1273
  if (I == null)
1274
1274
  return;
1275
- M = {
1275
+ D = {
1276
1276
  ...g,
1277
1277
  left: I.startX - ((g == null ? void 0 : g.width) || 0)
1278
1278
  };
1279
1279
  } else {
1280
- const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: D, endColumn: T, startRow: m.row, endRow: p.row });
1280
+ const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: M, endColumn: U, startRow: m.row, endRow: p.row });
1281
1281
  if (I == null)
1282
1282
  return;
1283
- if (M = {
1283
+ if (D = {
1284
1284
  ...g,
1285
1285
  width: ((g == null ? void 0 : g.width) || 0) - I.endX + I.startX
1286
- }, U = N(M, this._selectionRenderService), U != null && M != null) {
1287
- s.push({ ...c, sheetTransform: U, transform: M });
1286
+ }, O = N(D, this._selectionRenderService), O != null && D != null) {
1287
+ s.push({ ...c, sheetTransform: O, transform: D });
1288
1288
  break;
1289
1289
  }
1290
1290
  }
1291
- if (M != null && (U = N(M, this._selectionRenderService)), M != null && U != null) {
1292
- r.push({ ...c, sheetTransform: U, transform: M });
1291
+ if (D != null && (O = N(D, this._selectionRenderService)), D != null && O != null) {
1292
+ r.push({ ...c, sheetTransform: O, transform: D });
1293
1293
  break;
1294
1294
  } else
1295
1295
  this._remainDrawingSize(g, r, c);
@@ -1326,22 +1326,22 @@ let Ae = class extends oe {
1326
1326
  _getDrawingUndoForRowVisible(i, e, n) {
1327
1327
  const t = this._drawingManagerService.getDrawingData(i, e), r = [], s = [];
1328
1328
  if (Object.keys(t).forEach((l) => {
1329
- const c = t[l], { sheetTransform: u, transform: g, anchorType: f = O.Position } = c;
1330
- if (f === O.None)
1329
+ const c = t[l], { sheetTransform: u, transform: g, anchorType: f = P.Position } = c;
1330
+ if (f === P.None)
1331
1331
  this._remainDrawingSize(g, r, c);
1332
1332
  else {
1333
1333
  const { from: m, to: p } = u, { row: S, column: C } = m, { row: v, column: R } = p;
1334
1334
  for (let _ = 0; _ < n.length; _++) {
1335
- const b = n[_], { startRow: w, endRow: P, startColumn: D, endColumn: T } = b;
1335
+ const b = n[_], { startRow: w, endRow: T, startColumn: M, endColumn: U } = b;
1336
1336
  if (v < w)
1337
1337
  continue;
1338
- if (f === O.Position) {
1338
+ if (f === P.Position) {
1339
1339
  let I = null, A = null;
1340
- if (S >= w && S <= P) {
1341
- const G = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: P });
1342
- if (G == null)
1340
+ if (S >= w && S <= T) {
1341
+ const $ = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: T });
1342
+ if ($ == null)
1343
1343
  return;
1344
- A = { ...g, top: G.startY };
1344
+ A = { ...g, top: $.startY };
1345
1345
  }
1346
1346
  if (A != null && (I = N(A, this._selectionRenderService), I != null && A != null)) {
1347
1347
  r.push({ ...c, sheetTransform: I, transform: A });
@@ -1350,40 +1350,40 @@ let Ae = class extends oe {
1350
1350
  this._remainDrawingSize(g, r, c);
1351
1351
  continue;
1352
1352
  }
1353
- if (S >= w && v <= P)
1353
+ if (S >= w && v <= T)
1354
1354
  continue;
1355
- let U = null, M = null;
1356
- if (S >= w && S <= P) {
1357
- const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: P });
1355
+ let O = null, D = null;
1356
+ if (S >= w && S <= T) {
1357
+ const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: T });
1358
1358
  if (I == null)
1359
1359
  return;
1360
- M = {
1360
+ D = {
1361
1361
  ...g,
1362
1362
  top: (I == null ? void 0 : I.startY) || 0,
1363
1363
  height: ((g == null ? void 0 : g.height) || 0) - I.endY + I.startY
1364
1364
  };
1365
- } else if (v >= w && v <= P) {
1365
+ } else if (v >= w && v <= T) {
1366
1366
  const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: v });
1367
1367
  if (I == null)
1368
1368
  return;
1369
- M = {
1369
+ D = {
1370
1370
  ...g,
1371
1371
  top: I.startY - ((g == null ? void 0 : g.height) || 0)
1372
1372
  };
1373
1373
  } else {
1374
- const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: P });
1374
+ const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: T });
1375
1375
  if (I == null)
1376
1376
  return;
1377
- if (M = {
1377
+ if (D = {
1378
1378
  ...g,
1379
1379
  height: ((g == null ? void 0 : g.height) || 0) - I.endY + I.startY
1380
- }, U = N(M, this._selectionRenderService), U != null && M != null) {
1381
- s.push({ ...c, sheetTransform: U, transform: M });
1380
+ }, O = N(D, this._selectionRenderService), O != null && D != null) {
1381
+ s.push({ ...c, sheetTransform: O, transform: D });
1382
1382
  break;
1383
1383
  }
1384
1384
  }
1385
- if (M != null && (U = N(M, this._selectionRenderService)), M != null && U != null) {
1386
- r.push({ ...c, sheetTransform: U, transform: M });
1385
+ if (D != null && (O = N(D, this._selectionRenderService)), D != null && O != null) {
1386
+ r.push({ ...c, sheetTransform: O, transform: D });
1387
1387
  break;
1388
1388
  } else
1389
1389
  this._remainDrawingSize(g, r, c);
@@ -1406,8 +1406,8 @@ let Ae = class extends oe {
1406
1406
  _getDrawingUndoForRowAndColSize(i, e, n, t) {
1407
1407
  const r = this._drawingManagerService.getDrawingData(i, e), s = [];
1408
1408
  return Object.keys(r).forEach((o) => {
1409
- const a = r[o], { sheetTransform: d, transform: h, anchorType: l = O.Position } = a;
1410
- if (l === O.None)
1409
+ const a = r[o], { sheetTransform: d, transform: h, anchorType: l = P.Position } = a;
1410
+ if (l === P.None)
1411
1411
  this._remainDrawingSize(h, s, a);
1412
1412
  else {
1413
1413
  const { from: c, to: u } = d, { row: g, column: f } = c, { row: m, column: p } = u;
@@ -1415,11 +1415,11 @@ let Ae = class extends oe {
1415
1415
  const C = n[S], { startRow: v, endRow: R, startColumn: _, endColumn: b } = C;
1416
1416
  if (m < v || p < _)
1417
1417
  continue;
1418
- if (l === O.Position && (g <= v && m >= R || f <= _ && p >= b)) {
1418
+ if (l === P.Position && (g <= v && m >= R || f <= _ && p >= b)) {
1419
1419
  this._remainDrawingSize(h, s, a);
1420
1420
  continue;
1421
1421
  }
1422
- const w = $(
1422
+ const w = V(
1423
1423
  { ...d },
1424
1424
  this._selectionRenderService,
1425
1425
  this._skeletonManagerService
@@ -1453,7 +1453,7 @@ let Ae = class extends oe {
1453
1453
  return { redos: [], undos: [] };
1454
1454
  const { unitId: t, subUnitId: r } = n, { range: s } = i, o = s.startRow, a = s.endRow, d = [], h = [], l = this._sheetDrawingService.getDrawingData(t, r), c = [], u = [];
1455
1455
  if (Object.keys(l).forEach((g) => {
1456
- const f = l[g], { sheetTransform: m, transform: p, anchorType: S = O.Position } = f;
1456
+ const f = l[g], { sheetTransform: m, transform: p, anchorType: S = P.Position } = f;
1457
1457
  if (m == null || p == null)
1458
1458
  return;
1459
1459
  let C, v;
@@ -1461,12 +1461,12 @@ let Ae = class extends oe {
1461
1461
  const _ = this._expandRow(m, p, o, a, S);
1462
1462
  C = _ == null ? void 0 : _.newSheetTransform, v = _ == null ? void 0 : _.newTransform;
1463
1463
  } else {
1464
- const { from: _, to: b } = m, { row: w } = _, { row: P } = b;
1465
- if (w >= o && P <= a)
1464
+ const { from: _, to: b } = m, { row: w } = _, { row: T } = b;
1465
+ if (w >= o && T <= a)
1466
1466
  u.push({ unitId: t, subUnitId: r, drawingId: g });
1467
1467
  else {
1468
- const D = this._shrinkRow(m, p, o, a, S);
1469
- C = D == null ? void 0 : D.newSheetTransform, v = D == null ? void 0 : D.newTransform;
1468
+ const M = this._shrinkRow(m, p, o, a, S);
1469
+ C = M == null ? void 0 : M.newSheetTransform, v = M == null ? void 0 : M.newTransform;
1470
1470
  }
1471
1471
  }
1472
1472
  if (!C || !v)
@@ -1494,7 +1494,7 @@ let Ae = class extends oe {
1494
1494
  return { redos: [], undos: [] };
1495
1495
  const { unitId: t, subUnitId: r } = n, { range: s } = i, o = s.startColumn, a = s.endColumn, d = [], h = [], l = this._sheetDrawingService.getDrawingData(t, r), c = [], u = [];
1496
1496
  if (Object.keys(l).forEach((g) => {
1497
- const f = l[g], { sheetTransform: m, transform: p, anchorType: S = O.Position } = f;
1497
+ const f = l[g], { sheetTransform: m, transform: p, anchorType: S = P.Position } = f;
1498
1498
  if (m == null || p == null)
1499
1499
  return;
1500
1500
  let C, v;
@@ -1502,12 +1502,12 @@ let Ae = class extends oe {
1502
1502
  const _ = this._expandCol(m, p, o, a, S);
1503
1503
  C = _ == null ? void 0 : _.newSheetTransform, v = _ == null ? void 0 : _.newTransform;
1504
1504
  } else {
1505
- const { from: _, to: b } = m, { column: w } = _, { column: P } = b;
1506
- if (w >= o && P <= a)
1505
+ const { from: _, to: b } = m, { column: w } = _, { column: T } = b;
1506
+ if (w >= o && T <= a)
1507
1507
  u.push({ unitId: t, subUnitId: r, drawingId: g });
1508
1508
  else {
1509
- const D = this._shrinkCol(m, p, o, a, S);
1510
- C = D == null ? void 0 : D.newSheetTransform, v = D == null ? void 0 : D.newTransform;
1509
+ const M = this._shrinkCol(m, p, o, a, S);
1510
+ C = M == null ? void 0 : M.newSheetTransform, v = M == null ? void 0 : M.newTransform;
1511
1511
  }
1512
1512
  }
1513
1513
  if (!C || !v)
@@ -1526,9 +1526,9 @@ let Ae = class extends oe {
1526
1526
  }
1527
1527
  return d.push({ id: j.id, params: [t] }), h.push({ id: j.id, params: [t] }), { redos: d, undos: h };
1528
1528
  }
1529
- _expandCol(i, e, n, t, r = O.Position) {
1529
+ _expandCol(i, e, n, t, r = P.Position) {
1530
1530
  const s = t - n + 1, { from: o, to: a } = i, { column: d } = o, { column: h } = a;
1531
- if (r === O.None)
1531
+ if (r === P.None)
1532
1532
  return {
1533
1533
  newSheetTransform: N({ ...e }, this._selectionRenderService),
1534
1534
  newTransform: e
@@ -1540,11 +1540,11 @@ let Ae = class extends oe {
1540
1540
  return;
1541
1541
  c = { ...e, left: (e.left || 0) + u.endX - u.startX }, l = N(c, this._selectionRenderService);
1542
1542
  } else if (h >= t)
1543
- if (r === O.Both)
1543
+ if (r === P.Both)
1544
1544
  l = {
1545
1545
  from: { ...o },
1546
1546
  to: { ...a, column: h + s }
1547
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1547
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1548
1548
  else
1549
1549
  return {
1550
1550
  newSheetTransform: N({ ...e }, this._selectionRenderService),
@@ -1555,9 +1555,9 @@ let Ae = class extends oe {
1555
1555
  newTransform: c
1556
1556
  } : null;
1557
1557
  }
1558
- _shrinkCol(i, e, n, t, r = O.Position) {
1558
+ _shrinkCol(i, e, n, t, r = P.Position) {
1559
1559
  const s = t - n + 1, { from: o, to: a } = i, { column: d } = o, { column: h } = a;
1560
- if (r === O.None)
1560
+ if (r === P.None)
1561
1561
  return {
1562
1562
  newSheetTransform: N({ ...e }, this._selectionRenderService),
1563
1563
  newTransform: e
@@ -1567,16 +1567,16 @@ let Ae = class extends oe {
1567
1567
  l = {
1568
1568
  from: { ...o, column: d - s },
1569
1569
  to: { ...a, column: h - s }
1570
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1570
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1571
1571
  else {
1572
1572
  if (d >= n && h <= t)
1573
1573
  return null;
1574
1574
  if (d < n && h > t)
1575
- if (r === O.Both)
1575
+ if (r === P.Both)
1576
1576
  l = {
1577
1577
  from: { ...o },
1578
1578
  to: { ...a, column: h - s }
1579
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1579
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1580
1580
  else
1581
1581
  return {
1582
1582
  newSheetTransform: N({ ...e }, this._selectionRenderService),
@@ -1592,7 +1592,7 @@ let Ae = class extends oe {
1592
1592
  c = { ...e, left: (e.left || 0) - u.endX + u.startX - i.from.columnOffset };
1593
1593
  }
1594
1594
  l = N(c, this._selectionRenderService);
1595
- } else if (h >= n && h <= t && r === O.Both) {
1595
+ } else if (h >= n && h <= t && r === P.Both) {
1596
1596
  const u = this._skeletonManagerService.attachRangeWithCoord({
1597
1597
  startColumn: n - 1,
1598
1598
  endColumn: n - 1,
@@ -1604,7 +1604,7 @@ let Ae = class extends oe {
1604
1604
  l = {
1605
1605
  from: { ...o },
1606
1606
  to: { ...a, column: n - 1, columnOffset: u.endX - u.startX }
1607
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1607
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1608
1608
  }
1609
1609
  }
1610
1610
  return l != null && c != null ? {
@@ -1612,9 +1612,9 @@ let Ae = class extends oe {
1612
1612
  newTransform: c
1613
1613
  } : null;
1614
1614
  }
1615
- _expandRow(i, e, n, t, r = O.Position) {
1615
+ _expandRow(i, e, n, t, r = P.Position) {
1616
1616
  const s = t - n + 1, { from: o, to: a } = i, { row: d } = o, { row: h } = a;
1617
- if (r === O.None)
1617
+ if (r === P.None)
1618
1618
  return {
1619
1619
  newSheetTransform: N({ ...e }, this._selectionRenderService),
1620
1620
  newTransform: e
@@ -1626,14 +1626,14 @@ let Ae = class extends oe {
1626
1626
  return;
1627
1627
  c = { ...e, top: (e.top || 0) + u.endY - u.startY }, l = N(c, this._selectionRenderService);
1628
1628
  } else if (h >= t)
1629
- if (r === O.Both)
1629
+ if (r === P.Both)
1630
1630
  l = {
1631
1631
  from: { ...o },
1632
1632
  to: {
1633
1633
  ...a,
1634
1634
  row: h + s
1635
1635
  }
1636
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1636
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1637
1637
  else
1638
1638
  return {
1639
1639
  newSheetTransform: N({ ...e }, this._selectionRenderService),
@@ -1644,9 +1644,9 @@ let Ae = class extends oe {
1644
1644
  newTransform: c
1645
1645
  } : null;
1646
1646
  }
1647
- _shrinkRow(i, e, n, t, r = O.Position) {
1647
+ _shrinkRow(i, e, n, t, r = P.Position) {
1648
1648
  const s = t - n + 1, { from: o, to: a } = i, { row: d } = o, { row: h } = a;
1649
- if (r === O.None)
1649
+ if (r === P.None)
1650
1650
  return {
1651
1651
  newSheetTransform: N({ ...e }, this._selectionRenderService),
1652
1652
  newTransform: e
@@ -1656,16 +1656,16 @@ let Ae = class extends oe {
1656
1656
  l = {
1657
1657
  from: { ...o, row: d - s },
1658
1658
  to: { ...a, row: h - s }
1659
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1659
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1660
1660
  else {
1661
1661
  if (d >= n && h <= t)
1662
1662
  return null;
1663
1663
  if (d < n && h > t)
1664
- if (r === O.Both)
1664
+ if (r === P.Both)
1665
1665
  l = {
1666
1666
  from: { ...o },
1667
1667
  to: { ...a, row: h - s }
1668
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1668
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1669
1669
  else
1670
1670
  return {
1671
1671
  newSheetTransform: N({ ...e }, this._selectionRenderService),
@@ -1681,14 +1681,14 @@ let Ae = class extends oe {
1681
1681
  c = { ...e, top: (e.top || 0) - u.endY + u.startY - i.from.rowOffset };
1682
1682
  }
1683
1683
  l = N(c, this._selectionRenderService);
1684
- } else if (h >= n && h <= t && r === O.Both) {
1684
+ } else if (h >= n && h <= t && r === P.Both) {
1685
1685
  const u = this._skeletonManagerService.attachRangeWithCoord({ startColumn: o.column, endColumn: o.column, startRow: n - 1, endRow: n - 1 });
1686
1686
  if (u == null)
1687
1687
  return;
1688
1688
  l = {
1689
1689
  from: { ...o },
1690
1690
  to: { ...a, row: n - 1, rowOffset: u.endY - u.startY }
1691
- }, c = $(l, this._selectionRenderService, this._skeletonManagerService);
1691
+ }, c = V(l, this._selectionRenderService, this._skeletonManagerService);
1692
1692
  }
1693
1693
  }
1694
1694
  return l != null && c != null ? {
@@ -1699,7 +1699,7 @@ let Ae = class extends oe {
1699
1699
  _commandListener() {
1700
1700
  this.disposeWithMe(
1701
1701
  this._commandService.onCommandExecuted((i) => {
1702
- i.id === sr.id && setTimeout(() => {
1702
+ i.id === or.id && setTimeout(() => {
1703
1703
  const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
1704
1704
  Object.keys(r).forEach((a) => {
1705
1705
  const d = r[a];
@@ -1708,7 +1708,7 @@ let Ae = class extends oe {
1708
1708
  l != null && Object.keys(l).forEach((c) => {
1709
1709
  if (a === n && h === t) {
1710
1710
  const u = l[c];
1711
- u.transform = $(u.sheetTransform, this._selectionRenderService, this._skeletonManagerService), s.push(l[c]);
1711
+ u.transform = V(u.sheetTransform, this._selectionRenderService, this._skeletonManagerService), s.push(l[c]);
1712
1712
  } else
1713
1713
  o.push(l[c]);
1714
1714
  });
@@ -1721,7 +1721,7 @@ let Ae = class extends oe {
1721
1721
  _sheetRefreshListener() {
1722
1722
  this.disposeWithMe(
1723
1723
  this._commandService.onCommandExecuted((i) => {
1724
- di.includes(i.id) && requestIdleCallback(() => {
1724
+ li.includes(i.id) && requestIdleCallback(() => {
1725
1725
  const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
1726
1726
  this._refreshDrawingTransform(n, t, r);
1727
1727
  });
@@ -1731,13 +1731,13 @@ let Ae = class extends oe {
1731
1731
  _refreshDrawingTransform(i, e, n) {
1732
1732
  const t = this._drawingManagerService.getDrawingData(i, e), r = [];
1733
1733
  Object.keys(t).forEach((s) => {
1734
- const o = t[s], { sheetTransform: a, anchorType: d = O.Position } = o;
1735
- if (d === O.None)
1734
+ const o = t[s], { sheetTransform: a, anchorType: d = P.Position } = o;
1735
+ if (d === P.None)
1736
1736
  return !0;
1737
1737
  const { from: h, to: l } = a, { row: c, column: u } = h, { row: g, column: f } = l;
1738
1738
  for (let m = 0; m < n.length; m++) {
1739
1739
  const p = n[m], { startRow: S, endRow: C, startColumn: v, endColumn: R } = p;
1740
- if (cn.intersects(
1740
+ if (dn.intersects(
1741
1741
  {
1742
1742
  startRow: S,
1743
1743
  endRow: C,
@@ -1753,7 +1753,7 @@ let Ae = class extends oe {
1753
1753
  ) || c > C || u > R) {
1754
1754
  r.push({
1755
1755
  ...o,
1756
- transform: $(a, this._selectionRenderService, this._skeletonManagerService)
1756
+ transform: V(a, this._selectionRenderService, this._skeletonManagerService)
1757
1757
  });
1758
1758
  break;
1759
1759
  }
@@ -1761,22 +1761,22 @@ let Ae = class extends oe {
1761
1761
  }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(j.id, [i]));
1762
1762
  }
1763
1763
  };
1764
- Ae = ai([
1765
- ie(se.Rendered, Ae),
1766
- ce(0, V),
1767
- ce(1, W(or)),
1764
+ Ae = ci([
1765
+ ee(te.Rendered, Ae),
1766
+ ce(0, G),
1767
+ ce(1, W(ar)),
1768
1768
  ce(2, K),
1769
1769
  ce(3, k),
1770
1770
  ce(4, z),
1771
1771
  ce(5, he)
1772
1772
  ], Ae);
1773
- var li = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, gi = (i, e, n, t) => {
1774
- for (var r = t > 1 ? void 0 : t ? ui(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1773
+ var ui = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, hi = (i, e, n, t) => {
1774
+ for (var r = t > 1 ? void 0 : t ? gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1775
1775
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1776
- return t && r && li(e, n, r), r;
1776
+ return t && r && ui(e, n, r), r;
1777
1777
  }, de = (i, e) => (n, t) => e(n, t, i);
1778
- function hi(i, e, n, t) {
1779
- const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Tn.VIEW_MAIN), a = {
1778
+ function mi(i, e, n, t) {
1779
+ const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Un.VIEW_MAIN), a = {
1780
1780
  left: !0,
1781
1781
  top: !0
1782
1782
  };
@@ -1785,37 +1785,37 @@ function hi(i, e, n, t) {
1785
1785
  ...i,
1786
1786
  absolute: a
1787
1787
  };
1788
- const { left: d, right: h, top: l, bottom: c } = i, u = t.getFreeze(), { startColumn: g, startRow: f, xSplit: m, ySplit: p } = u, S = n.getNoMergeCellPositionByIndexWithNoHeader(f - p, g - m), C = n.getNoMergeCellPositionByIndexWithNoHeader(f, g), { rowHeaderWidth: v, columnHeaderHeight: R } = n, _ = C.startX - S.startX, b = C.startY - S.startY, { top: w, left: P, viewportScrollX: D, viewportScrollY: T } = o;
1789
- let U, M;
1790
- d < P ? (a.left = !0, U = (_ + v + (d - P)) * r, M = Math.max(
1788
+ const { left: d, right: h, top: l, bottom: c } = i, u = t.getFreeze(), { startColumn: g, startRow: f, xSplit: m, ySplit: p } = u, S = n.getNoMergeCellPositionByIndexWithNoHeader(f - p, g - m), C = n.getNoMergeCellPositionByIndexWithNoHeader(f, g), { rowHeaderWidth: v, columnHeaderHeight: R } = n, _ = C.startX - S.startX, b = C.startY - S.startY, { top: w, left: T, viewportScrollX: M, viewportScrollY: U } = o;
1789
+ let O, D;
1790
+ d < T ? (a.left = !0, O = (_ + v + (d - T)) * r, D = Math.max(
1791
1791
  Math.min(
1792
- (_ + v + (h - P)) * r,
1792
+ (_ + v + (h - T)) * r,
1793
1793
  (_ + v) * r
1794
1794
  ),
1795
- (h - D) * r
1796
- )) : (a.left = !1, U = Math.max((d - D) * r, (_ + v) * r), M = Math.max((h - D) * r, (_ + v) * r));
1795
+ (h - M) * r
1796
+ )) : (a.left = !1, O = Math.max((d - M) * r, (_ + v) * r), D = Math.max((h - M) * r, (_ + v) * r));
1797
1797
  let I, A;
1798
1798
  return l < w ? (a.top = !0, I = (b + R + (l - w)) * s, A = Math.max(
1799
1799
  Math.min(
1800
1800
  (b + R + (h - w)) * s,
1801
1801
  (b + R) * s
1802
1802
  ),
1803
- (c - T) * s
1804
- )) : (a.top = !1, I = Math.max((l - T) * s, (b + R) * s), A = Math.max((c - T) * s, (b + R) * s)), {
1805
- left: U,
1806
- right: M,
1803
+ (c - U) * s
1804
+ )) : (a.top = !1, I = Math.max((l - U) * s, (b + R) * s), A = Math.max((c - U) * s, (b + R) * s)), {
1805
+ left: O,
1806
+ right: D,
1807
1807
  top: I,
1808
1808
  bottom: A,
1809
1809
  absolute: a
1810
1810
  };
1811
1811
  }
1812
- const ze = (i, e, n, t) => {
1812
+ const Ke = (i, e, n, t) => {
1813
1813
  const { scene: r } = e, { left: s, top: o, width: a, height: d, angle: h } = i, l = {
1814
1814
  left: s,
1815
1815
  right: s + a,
1816
1816
  top: o,
1817
1817
  bottom: o + d
1818
- }, c = hi(l, r, n, t);
1818
+ }, c = mi(l, r, n, t);
1819
1819
  return {
1820
1820
  startX: c.left,
1821
1821
  endX: c.right,
@@ -1827,14 +1827,14 @@ const ze = (i, e, n, t) => {
1827
1827
  absolute: c.absolute
1828
1828
  };
1829
1829
  };
1830
- let tt = class extends oe {
1830
+ let Ne = class extends oe {
1831
1831
  constructor(e, n, t, r, s, o) {
1832
1832
  super();
1833
1833
  H(this, "_domLayerMap", /* @__PURE__ */ new Map());
1834
1834
  H(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
1835
- H(this, "_transformChange$", new mt());
1835
+ H(this, "_transformChange$", new ft());
1836
1836
  H(this, "transformChange$", this._transformChange$.asObservable());
1837
- H(this, "_remove$", new mt());
1837
+ H(this, "_remove$", new ft());
1838
1838
  H(this, "remove$", this._remove$.asObservable());
1839
1839
  H(this, "_hooks", []);
1840
1840
  this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._drawingAddListener(), this._scrollUpdateListener(), this._featureUpdateListener(), this._deleteListener();
@@ -1866,66 +1866,67 @@ let tt = class extends oe {
1866
1866
  // eslint-disable-next-line max-lines-per-function
1867
1867
  this._drawingManagerService.add$.subscribe((e) => {
1868
1868
  e.forEach((n) => {
1869
- var ot, at, ct;
1870
- const { unitId: t, subUnitId: r, drawingId: s } = n, o = le(this._univerInstanceService, { unitId: t, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(n), d = (ot = this._renderManagerService.getRenderById(t)) == null ? void 0 : ot.with(re).getWorksheetSkeleton(r);
1869
+ var at, ct, dt;
1870
+ const { unitId: t, subUnitId: r, drawingId: s } = n, o = le(this._univerInstanceService, { unitId: t, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(n), d = (at = this._renderManagerService.getRenderById(t)) == null ? void 0 : at.with(se).getWorksheetSkeleton(r);
1871
1871
  if (a == null || o == null || d == null)
1872
1872
  return;
1873
- const { transform: h, drawingType: l } = a;
1874
- if (l !== Ye.DRAWING_DOM)
1873
+ const { transform: h, drawingType: l, data: c } = a;
1874
+ if (l !== ke.DRAWING_DOM)
1875
1875
  return;
1876
- const c = this._getSceneAndTransformerByDrawingSearch(t);
1877
- if (c == null)
1876
+ const u = this._getSceneAndTransformerByDrawingSearch(t);
1877
+ if (u == null)
1878
1878
  return;
1879
- const { scene: u, canvas: g } = c;
1879
+ const { scene: g, canvas: f } = u;
1880
1880
  if (h == null)
1881
1881
  return !0;
1882
- const { left: f, top: m, width: p, height: S, angle: C, flipX: v, flipY: R, skewX: _, skewY: b } = h, w = Dn({ unitId: t, subUnitId: r, drawingId: s }), P = u.getObject(w);
1883
- if (P != null) {
1884
- P.transformByState({ left: f, top: m, width: p, height: S, angle: C, flipX: v, flipY: R, skewX: _, skewY: b });
1882
+ const { left: m, top: p, width: S, height: C, angle: v, flipX: R, flipY: _, skewX: b, skewY: w } = h, T = bn({ unitId: t, subUnitId: r, drawingId: s }), M = g.getObject(T);
1883
+ if (M != null) {
1884
+ M.transformByState({ left: m, top: p, width: S, height: C, angle: v, flipX: R, flipY: _, skewX: b, skewY: w });
1885
1885
  return;
1886
1886
  }
1887
- const D = {
1888
- left: f,
1889
- top: m,
1890
- width: p,
1891
- height: S,
1887
+ const U = {
1888
+ left: m,
1889
+ top: p,
1890
+ width: S,
1891
+ height: C,
1892
1892
  zIndex: this._drawingManagerService.getDrawingOrder(t, r).length - 1
1893
- }, T = new On(w, D);
1894
- u.addObject(T, Pn).attachTransformerTo(T);
1895
- const U = this._ensureMap(t, r), M = new dn(), I = ze(T, c.renderObject, d.skeleton, o.worksheet), A = new Vn(I), G = {
1896
- dispose: M,
1897
- rect: T,
1898
- position$: A,
1893
+ }, O = new Pn(T, U);
1894
+ g.addObject(O, Tn).attachTransformerTo(O);
1895
+ const D = this._ensureMap(t, r), I = new ln(), A = Ke(O, u.renderObject, d.skeleton, o.worksheet), $ = new Gn(A), ne = {
1896
+ dispose: I,
1897
+ rect: O,
1898
+ position$: $,
1899
1899
  unitId: t,
1900
1900
  subUnitId: r
1901
1901
  };
1902
1902
  this._canvasFloatDomService.addFloatDom({
1903
- position$: A,
1903
+ position$: $,
1904
1904
  id: s,
1905
1905
  componentKey: a.componentKey,
1906
1906
  onPointerDown: (x) => {
1907
- g.dispatchEvent(new PointerEvent(x.type, x));
1907
+ f.dispatchEvent(new PointerEvent(x.type, x));
1908
1908
  },
1909
1909
  onPointerMove: (x) => {
1910
- g.dispatchEvent(new PointerEvent(x.type, x));
1910
+ f.dispatchEvent(new PointerEvent(x.type, x));
1911
1911
  },
1912
1912
  onPointerUp: (x) => {
1913
- g.dispatchEvent(new PointerEvent(x.type, x));
1913
+ f.dispatchEvent(new PointerEvent(x.type, x));
1914
1914
  },
1915
1915
  onWheel: (x) => {
1916
- g.dispatchEvent(new WheelEvent(x.type, x));
1916
+ f.dispatchEvent(new WheelEvent(x.type, x));
1917
1917
  },
1918
- props: (ct = (at = U.get(s)) == null ? void 0 : at.props) != null ? ct : this._getFloatDomProps(s)
1918
+ props: (dt = (ct = D.get(s)) == null ? void 0 : ct.props) != null ? dt : this._getFloatDomProps(s),
1919
+ data: c
1919
1920
  });
1920
- const J = T.onTransformChange$.subscribeEvent(() => {
1921
- const x = ze(T, c.renderObject, d.skeleton, o.worksheet);
1922
- A.next(
1921
+ const ot = O.onTransformChange$.subscribeEvent(() => {
1922
+ const x = Ke(O, u.renderObject, d.skeleton, o.worksheet);
1923
+ $.next(
1923
1924
  x
1924
1925
  );
1925
1926
  });
1926
- M.add(() => {
1927
+ I.add(() => {
1927
1928
  this._canvasFloatDomService.removeFloatDom(s);
1928
- }), J && M.add(J), this._domLayerInfoMap.set(s, G);
1929
+ }), ot && I.add(ot), this._domLayerInfoMap.set(s, ne), D.set(s, {});
1929
1930
  });
1930
1931
  })
1931
1932
  );
@@ -1935,24 +1936,24 @@ let tt = class extends oe {
1935
1936
  var t, r;
1936
1937
  const n = (s, o) => {
1937
1938
  var u;
1938
- const a = this._getSceneAndTransformerByDrawingSearch(s), d = this._ensureMap(s, o), h = Array.from(d.keys()), l = le(this._univerInstanceService, { unitId: s, subUnitId: o }), c = (u = this._renderManagerService.getRenderById(s)) == null ? void 0 : u.with(re).getWorksheetSkeleton(o);
1939
+ const a = this._getSceneAndTransformerByDrawingSearch(s), d = this._ensureMap(s, o), h = Array.from(d.keys()), l = le(this._univerInstanceService, { unitId: s, subUnitId: o }), c = (u = this._renderManagerService.getRenderById(s)) == null ? void 0 : u.with(se).getWorksheetSkeleton(o);
1939
1940
  !a || !l || !c || h.forEach((g) => {
1940
1941
  const f = this._domLayerInfoMap.get(g);
1941
1942
  if (f) {
1942
- const m = ze(f.rect, a.renderObject, c.skeleton, l.worksheet);
1943
+ const m = Ke(f.rect, a.renderObject, c.skeleton, l.worksheet);
1943
1944
  f.position$.next(m);
1944
1945
  }
1945
1946
  });
1946
1947
  };
1947
- if (e.id === jn.id) {
1948
+ if (e.id === Ln.id) {
1948
1949
  const s = e.params, { unitId: o, sheetId: a } = s;
1949
1950
  n(o, a);
1950
- } else if (e.id === Ln.id) {
1951
+ } else if (e.id === Bn.id) {
1951
1952
  const s = e.params, { unitId: o } = s;
1952
1953
  Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((d) => {
1953
1954
  n(o, d);
1954
1955
  });
1955
- } else if (e.id === ar.id) {
1956
+ } else if (e.id === cr.id) {
1956
1957
  const { unitId: s, subUnitId: o } = e.params;
1957
1958
  n(s, o);
1958
1959
  }
@@ -1960,7 +1961,7 @@ let tt = class extends oe {
1960
1961
  }
1961
1962
  _getPosition(e, n) {
1962
1963
  var u;
1963
- const { startX: t, endX: r, startY: s, endY: o } = e, a = (u = this._renderManagerService.getRenderById(n)) == null ? void 0 : u.with(Ge);
1964
+ const { startX: t, endX: r, startY: s, endY: o } = e, a = (u = this._renderManagerService.getRenderById(n)) == null ? void 0 : u.with(xe);
1964
1965
  if (a == null)
1965
1966
  return;
1966
1967
  const d = a.getSelectionCellByPosition(t, s);
@@ -1990,7 +1991,7 @@ let tt = class extends oe {
1990
1991
  this._drawingManagerService.update$.subscribe((e) => {
1991
1992
  e.forEach((n) => {
1992
1993
  const t = this._drawingManagerService.getDrawingByParam(n);
1993
- if (!t || t.drawingType !== Ye.DRAWING_DOM)
1994
+ if (!t || t.drawingType !== ke.DRAWING_DOM)
1994
1995
  return;
1995
1996
  const r = {
1996
1997
  ...t.transform
@@ -2016,31 +2017,32 @@ let tt = class extends oe {
2016
2017
  });
2017
2018
  if (!n)
2018
2019
  throw new Error("cannot find current target!");
2019
- const { unitId: t, subUnitId: r } = n, { initPosition: s, componentKey: o } = e, a = ne.generateRandomId(), d = this._getPosition(s, t);
2020
- if (d == null)
2020
+ const { unitId: t, subUnitId: r } = n, { initPosition: s, componentKey: o, data: a } = e, d = ie.generateRandomId(), h = this._getPosition(s, t);
2021
+ if (h == null)
2021
2022
  return;
2022
- this._ensureMap(t, r).set(a, e);
2023
- const l = {
2023
+ this._ensureMap(t, r).set(d, e);
2024
+ const c = {
2024
2025
  unitId: t,
2025
2026
  subUnitId: r,
2026
- drawingId: a,
2027
- drawingType: Ye.DRAWING_DOM,
2027
+ drawingId: d,
2028
+ drawingType: ke.DRAWING_DOM,
2028
2029
  componentKey: o,
2029
- sheetTransform: d,
2030
+ sheetTransform: h,
2030
2031
  transform: {
2031
2032
  left: s.startX,
2032
2033
  top: s.startY,
2033
2034
  width: s.endX - s.startX,
2034
2035
  height: s.endY - s.startY
2035
- }
2036
+ },
2037
+ data: a
2036
2038
  };
2037
2039
  return this._commandService.executeCommand(st.id, {
2038
2040
  unitId: t,
2039
- drawings: [l]
2041
+ drawings: [c]
2040
2042
  }), {
2041
- id: a,
2043
+ id: d,
2042
2044
  dispose: () => {
2043
- this._removeDom(a, !0);
2045
+ this._removeDom(d, !0);
2044
2046
  }
2045
2047
  };
2046
2048
  }
@@ -2069,20 +2071,21 @@ let tt = class extends oe {
2069
2071
  };
2070
2072
  }
2071
2073
  };
2072
- tt = gi([
2074
+ Ne = hi([
2075
+ ee(te.Starting, Ne),
2073
2076
  de(0, W(K)),
2074
2077
  de(1, he),
2075
- de(2, W(V)),
2078
+ de(2, W(G)),
2076
2079
  de(3, z),
2077
- de(4, W(Jn)),
2080
+ de(4, W(Zn)),
2078
2081
  de(5, k)
2079
- ], tt);
2080
- var mi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, pi = (i, e, n, t) => {
2081
- for (var r = t > 1 ? void 0 : t ? fi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2082
+ ], Ne);
2083
+ var fi = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, wi = (i, e, n, t) => {
2084
+ for (var r = t > 1 ? void 0 : t ? pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2082
2085
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2083
- return t && r && mi(e, n, r), r;
2086
+ return t && r && fi(e, n, r), r;
2084
2087
  }, Oe = (i, e) => (n, t) => e(n, t, i);
2085
- let Ne = class extends oe {
2088
+ let je = class extends oe {
2086
2089
  constructor(i, e, n, t) {
2087
2090
  super(), this._sheetPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = n, this._renderManagerService = t, this._initPrinting();
2088
2091
  }
@@ -2107,15 +2110,15 @@ let Ne = class extends oe {
2107
2110
  const { unitId: t, subUnitId: r } = e, s = this._renderManagerService.getRenderById(t);
2108
2111
  if (!s)
2109
2112
  return n(i);
2110
- const o = s.with(re).getWorksheetSkeleton(r);
2113
+ const o = s.with(se).getWorksheetSkeleton(r);
2111
2114
  if (!o)
2112
2115
  return n(i);
2113
2116
  const a = this._drawingManagerService.getDrawingDataForUnit(t), d = a == null ? void 0 : a[e.subUnitId];
2114
2117
  if (!d)
2115
2118
  return n(i);
2116
- const { scaleX: h, scaleY: l } = s.scene, c = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, u = d.order.map((g) => d.data[g]).filter((g) => g.drawingType !== Ve.DRAWING_DOM);
2119
+ const { scaleX: h, scaleY: l } = s.scene, c = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, u = d.order.map((g) => d.data[g]).filter((g) => g.drawingType !== Ge.DRAWING_DOM);
2117
2120
  return u.length ? (u.forEach((g) => {
2118
- if (!g.groupId && g.transform && ne.isDefine(g.transform.left) && ne.isDefine(g.transform.top) && ne.isDefine(g.transform.width) && ne.isDefine(g.transform.height)) {
2121
+ if (!g.groupId && g.transform && ie.isDefine(g.transform.left) && ie.isDefine(g.transform.top) && ie.isDefine(g.transform.width) && ie.isDefine(g.transform.height)) {
2119
2122
  const f = o.skeleton.getCellPositionByOffset(g.transform.left, g.transform.top, h, l, { x: 0, y: 0 }), m = o.skeleton.getCellPositionByOffset(g.transform.left + g.transform.width, g.transform.top + g.transform.height, h, l, { x: 0, y: 0 });
2120
2123
  f.column < c.startColumn && (c.startColumn = f.column), f.row < c.startRow && (c.startRow = f.row), c.endRow < m.row && (c.endRow = m.row), c.endColumn < m.column && (c.endColumn = m.column);
2121
2124
  }
@@ -2126,19 +2129,19 @@ let Ne = class extends oe {
2126
2129
  );
2127
2130
  }
2128
2131
  };
2129
- Ne = pi([
2130
- ie(se.Rendered, Ne),
2131
- Oe(0, W(Bn)),
2132
- Oe(1, W(vn)),
2132
+ je = wi([
2133
+ ee(te.Rendered, je),
2134
+ Oe(0, W(Wn)),
2135
+ Oe(1, W(Sn)),
2133
2136
  Oe(2, z),
2134
2137
  Oe(3, K)
2135
- ], Ne);
2136
- var wi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, vi = (i, e, n, t) => {
2137
- for (var r = t > 1 ? void 0 : t ? _i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2138
+ ], je);
2139
+ var _i = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Si = (i, e, n, t) => {
2140
+ for (var r = t > 1 ? void 0 : t ? vi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2138
2141
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2139
- return t && r && wi(e, n, r), r;
2142
+ return t && r && _i(e, n, r), r;
2140
2143
  }, fe = (i, e) => (n, t) => e(n, t, i);
2141
- let je = class extends oe {
2144
+ let Le = class extends oe {
2142
2145
  constructor(i, e, n, t, r) {
2143
2146
  super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
2144
2147
  }
@@ -2156,7 +2159,7 @@ let je = class extends oe {
2156
2159
  return;
2157
2160
  }
2158
2161
  const r = e.getUnitId(), s = t.getSheetId();
2159
- if (this._permissionService.composePermission([new pt(r).id, new He(r, s).id]).every((a) => a.value))
2162
+ if (this._permissionService.composePermission([new wt(r).id, new Xe(r, s).id]).every((a) => a.value))
2160
2163
  this._drawingManagerService.setDrawingVisible(!0);
2161
2164
  else {
2162
2165
  this._drawingManagerService.setDrawingVisible(!1);
@@ -2185,7 +2188,7 @@ let je = class extends oe {
2185
2188
  return;
2186
2189
  }
2187
2190
  const r = e.getUnitId(), s = t.getSheetId();
2188
- if (this._permissionService.composePermission([new Ze(r).id, new Pe(r, s).id]).every((a) => a.value))
2191
+ if (this._permissionService.composePermission([new qe(r).id, new Pe(r, s).id]).every((a) => a.value))
2189
2192
  this._drawingManagerService.setDrawingEditable(!0);
2190
2193
  else {
2191
2194
  this._drawingManagerService.setDrawingEditable(!1);
@@ -2213,7 +2216,7 @@ let je = class extends oe {
2213
2216
  const a = this._renderManagerService.getRenderById(r), d = a == null ? void 0 : a.scene;
2214
2217
  if (d == null)
2215
2218
  return;
2216
- const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new pt(r).id, new He(r, s).id]).pipe(ft((u) => u.every((g) => g.value)));
2219
+ const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new wt(r).id, new Xe(r, s).id]).pipe(pt((u) => u.every((g) => g.value)));
2217
2220
  l == null || l.pipe(
2218
2221
  Me((u) => u !== o),
2219
2222
  De()
@@ -2225,7 +2228,7 @@ let je = class extends oe {
2225
2228
  p.classType === ae.IMAGE && m.some((S) => p.oKey.includes(S.drawingId)) && d.removeObject(p);
2226
2229
  }), h.clearSelectedObjects());
2227
2230
  }
2228
- }), (c = this._permissionService.getPermissionPoint$(new He(r, s).id)) == null || c.pipe(
2231
+ }), (c = this._permissionService.getPermissionPoint$(new Xe(r, s).id)) == null || c.pipe(
2229
2232
  Me((u) => u.value !== o),
2230
2233
  De()
2231
2234
  ).subscribe({
@@ -2252,7 +2255,7 @@ let je = class extends oe {
2252
2255
  const a = this._renderManagerService.getRenderById(r), d = a == null ? void 0 : a.scene;
2253
2256
  if (d == null)
2254
2257
  return;
2255
- const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new Ze(r).id, new Pe(r, s).id]).pipe(ft((u) => u.every((g) => g.value)));
2258
+ const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new qe(r).id, new Pe(r, s).id]).pipe(pt((u) => u.every((g) => g.value)));
2256
2259
  l == null || l.pipe(
2257
2260
  Me((u) => u !== o),
2258
2261
  De()
@@ -2285,20 +2288,20 @@ let je = class extends oe {
2285
2288
  );
2286
2289
  }
2287
2290
  };
2288
- je = vi([
2289
- ie(se.Rendered, je),
2291
+ Le = Si([
2292
+ ee(te.Rendered, Le),
2290
2293
  fe(0, z),
2291
2294
  fe(1, K),
2292
- fe(2, un),
2295
+ fe(2, gn),
2293
2296
  fe(3, he),
2294
- fe(4, W(ln))
2295
- ], je);
2296
- var Si = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Ii = (i, e, n, t) => {
2297
- for (var r = t > 1 ? void 0 : t ? Ci(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2297
+ fe(4, W(un))
2298
+ ], Le);
2299
+ var Ci = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ri = (i, e, n, t) => {
2300
+ for (var r = t > 1 ? void 0 : t ? Ii(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2298
2301
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2299
- return t && r && Si(e, n, r), r;
2300
- }, Ke = (i, e) => (n, t) => e(n, t, i);
2301
- let Le = class extends oe {
2302
+ return t && r && Ci(e, n, r), r;
2303
+ }, Je = (i, e) => (n, t) => e(n, t, i);
2304
+ let Be = class extends oe {
2302
2305
  constructor(e, n, t) {
2303
2306
  super();
2304
2307
  H(this, "_copyInfo");
@@ -2309,7 +2312,7 @@ let Le = class extends oe {
2309
2312
  id: "SHEET_IMAGE_UI_PLUGIN",
2310
2313
  onBeforeCopy: (e, n, t) => this._collect(e, n, t),
2311
2314
  onPasteCells: (e, n, t, r) => {
2312
- const { copyType: s = gt.COPY, pasteType: o } = r, { range: a } = e || {}, { range: d, unitId: h, subUnitId: l } = n;
2315
+ const { copyType: s = ht.COPY, pasteType: o } = r, { range: a } = e || {}, { range: d, unitId: h, subUnitId: l } = n;
2313
2316
  return this._generateMutations(d, { copyType: s, pasteType: o, copyRange: a, unitId: h, subUnitId: l });
2314
2317
  },
2315
2318
  onPastePlainText: (e, n) => ({ undos: [], redos: [] })
@@ -2317,7 +2320,7 @@ let Le = class extends oe {
2317
2320
  }
2318
2321
  _collect(e, n, t) {
2319
2322
  var u;
2320
- const r = (u = this._renderManagerService.getRenderById(e)) == null ? void 0 : u.with(re);
2323
+ const r = (u = this._renderManagerService.getRenderById(e)) == null ? void 0 : u.with(se);
2321
2324
  if (!r) return;
2322
2325
  const s = r.attachRangeWithCoord(t);
2323
2326
  if (!s)
@@ -2325,7 +2328,7 @@ let Le = class extends oe {
2325
2328
  const { startX: o, endX: a, startY: d, endY: h } = s, l = this._sheetDrawingService.getDrawingData(e, n), c = [];
2326
2329
  Object.keys(l).forEach((g) => {
2327
2330
  const f = l[g], { transform: m } = f;
2328
- if (f.anchorType !== O.Both || !m)
2331
+ if (f.anchorType !== P.Both || !m)
2329
2332
  return;
2330
2333
  const { left: p = 0, top: S = 0, width: C = 0, height: v = 0 } = m, { drawingStartX: R, drawingEndX: _, drawingStartY: b, drawingEndY: w } = {
2331
2334
  drawingStartX: p,
@@ -2342,7 +2345,7 @@ let Le = class extends oe {
2342
2345
  }
2343
2346
  // eslint-disable-next-line max-lines-per-function
2344
2347
  _generateMutations(e, n) {
2345
- var D;
2348
+ var M;
2346
2349
  if (!this._copyInfo)
2347
2350
  return { redos: [], undos: [] };
2348
2351
  if ([
@@ -2357,7 +2360,7 @@ let Le = class extends oe {
2357
2360
  const { copyRange: t } = n;
2358
2361
  if (!t)
2359
2362
  return { redos: [], undos: [] };
2360
- const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [a, d], mapFunc: h } = Wn([t, e]), { row: l, col: c } = h(a.startRow, a.startColumn), { row: u, col: g } = h(d.startRow, d.startColumn), f = (D = this._renderManagerService.getRenderById(s)) == null ? void 0 : D.with(re);
2363
+ const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [a, d], mapFunc: h } = $n([t, e]), { row: l, col: c } = h(a.startRow, a.startColumn), { row: u, col: g } = h(d.startRow, d.startColumn), f = (M = this._renderManagerService.getRenderById(s)) == null ? void 0 : M.with(se);
2361
2364
  if (!f)
2362
2365
  return { redos: [], undos: [] };
2363
2366
  const m = f.attachRangeWithCoord({
@@ -2373,36 +2376,36 @@ let Le = class extends oe {
2373
2376
  });
2374
2377
  if (!m || !p)
2375
2378
  return { redos: [], undos: [] };
2376
- const S = [], C = [], v = p.startX - m.startX, R = p.startY - m.startY, _ = u - l, b = g - c, w = n.copyType === gt.CUT, { _sheetDrawingService: P } = this;
2377
- return r.forEach((T) => {
2378
- const { transform: U, sheetTransform: M } = T;
2379
- if (!U)
2379
+ const S = [], C = [], v = p.startX - m.startX, R = p.startY - m.startY, _ = u - l, b = g - c, w = n.copyType === ht.CUT, { _sheetDrawingService: T } = this;
2380
+ return r.forEach((U) => {
2381
+ const { transform: O, sheetTransform: D } = U;
2382
+ if (!O)
2380
2383
  return;
2381
2384
  const I = {
2382
- ...T,
2385
+ ...U,
2383
2386
  unitId: s,
2384
2387
  subUnitId: o,
2385
- drawingId: w ? T.drawingId : ne.generateRandomId(),
2388
+ drawingId: w ? U.drawingId : ie.generateRandomId(),
2386
2389
  transform: {
2387
- ...U,
2388
- left: U.left + v,
2389
- top: U.top + R
2390
+ ...O,
2391
+ left: O.left + v,
2392
+ top: O.top + R
2390
2393
  },
2391
2394
  sheetTransform: {
2392
- to: { ...M.to, row: M.to.row + _, column: M.to.column + b },
2393
- from: { ...M.from, row: M.from.row + _, column: M.from.column + b }
2395
+ to: { ...D.to, row: D.to.row + _, column: D.to.column + b },
2396
+ from: { ...D.from, row: D.from.row + _, column: D.from.column + b }
2394
2397
  }
2395
2398
  };
2396
2399
  if (w) {
2397
- const { undo: A, redo: G, objects: J } = P.getBatchUpdateOp([I]);
2400
+ const { undo: A, redo: $, objects: ne } = T.getBatchUpdateOp([I]);
2398
2401
  S.push({
2399
2402
  id: E.id,
2400
2403
  params: {
2401
2404
  unitId: s,
2402
2405
  subUnitId: o,
2403
2406
  type: y.UPDATE,
2404
- op: G,
2405
- objects: J
2407
+ op: $,
2408
+ objects: ne
2406
2409
  }
2407
2410
  }), C.push({
2408
2411
  id: E.id,
@@ -2411,12 +2414,12 @@ let Le = class extends oe {
2411
2414
  subUnitId: o,
2412
2415
  type: y.UPDATE,
2413
2416
  op: A,
2414
- objects: J
2417
+ objects: ne
2415
2418
  }
2416
2419
  });
2417
2420
  } else {
2418
- const { undo: A, redo: G, objects: J } = P.getBatchAddOp([I]);
2419
- S.push({ id: E.id, params: { op: G, unitId: s, subUnitId: o, objects: J, type: y.INSERT } }), C.push({ id: E.id, params: { op: A, unitId: s, subUnitId: o, objects: J, type: y.REMOVE } });
2421
+ const { undo: A, redo: $, objects: ne } = T.getBatchAddOp([I]);
2422
+ S.push({ id: E.id, params: { op: $, unitId: s, subUnitId: o, objects: ne, type: y.INSERT } }), C.push({ id: E.id, params: { op: A, unitId: s, subUnitId: o, objects: ne, type: y.REMOVE } });
2420
2423
  }
2421
2424
  }), {
2422
2425
  redos: S,
@@ -2424,23 +2427,23 @@ let Le = class extends oe {
2424
2427
  };
2425
2428
  }
2426
2429
  };
2427
- Le = Ii([
2428
- ie(se.Ready, Le),
2429
- Ke(0, $n),
2430
- Ke(1, K),
2431
- Ke(2, k)
2432
- ], Le);
2433
- var qt = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (i, e, n) => e in i ? qt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Di = (i, e, n, t) => {
2434
- for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2430
+ Be = Ri([
2431
+ ee(te.Ready, Be),
2432
+ Je(0, Vn),
2433
+ Je(1, K),
2434
+ Je(2, k)
2435
+ ], Be);
2436
+ var Qt = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Di = (i, e, n) => e in i ? Qt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, bi = (i, e, n, t) => {
2437
+ for (var r = t > 1 ? void 0 : t ? Mi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2435
2438
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2436
- return t && r && qt(e, n, r), r;
2437
- }, Je = (i, e) => (n, t) => e(n, t, i), Qt = (i, e, n) => Mi(i, typeof e != "symbol" ? e + "" : e, n);
2438
- const bi = "SHEET_IMAGE_UI_PLUGIN";
2439
- let $e = class extends gn {
2439
+ return t && r && Qt(e, n, r), r;
2440
+ }, Ze = (i, e) => (n, t) => e(n, t, i), en = (i, e, n) => Di(i, typeof e != "symbol" ? e + "" : e, n);
2441
+ const Ei = "SHEET_IMAGE_UI_PLUGIN";
2442
+ let Ve = class extends hn {
2440
2443
  constructor(e = {}, n, t, r) {
2441
2444
  super();
2442
2445
  H(this, "_pluginConfig");
2443
- this._injector = n, this._localeService = t, this._renderManagerService = r, this._pluginConfig = ne.deepMerge({}, ii, e);
2446
+ this._injector = n, this._localeService = t, this._renderManagerService = r, this._pluginConfig = ie.deepMerge({}, si, e);
2444
2447
  }
2445
2448
  onStarting(e) {
2446
2449
  super.onStarting(e), this._initDependencies(e);
@@ -2451,7 +2454,7 @@ let $e = class extends gn {
2451
2454
  _initDependencies(e) {
2452
2455
  const n = [
2453
2456
  // services
2454
- [tt],
2457
+ [Ne],
2455
2458
  // controllers
2456
2459
  [
2457
2460
  pe,
@@ -2460,8 +2463,8 @@ let $e = class extends gn {
2460
2463
  }
2461
2464
  ],
2462
2465
  [Te],
2463
- [Ne],
2464
- [je]
2466
+ [je],
2467
+ [Le]
2465
2468
  ], t = [
2466
2469
  Ue,
2467
2470
  Ae
@@ -2470,34 +2473,34 @@ let $e = class extends gn {
2470
2473
  }
2471
2474
  _registerRenderModules() {
2472
2475
  [
2473
- [Le]
2476
+ [Be]
2474
2477
  ].forEach((e) => {
2475
2478
  this.disposeWithMe(this._renderManagerService.registerRenderModule(B.UNIVER_SHEET, e));
2476
2479
  });
2477
2480
  }
2478
2481
  };
2479
- Qt($e, "type", B.UNIVER_SHEET);
2480
- Qt($e, "pluginName", bi);
2481
- $e = Di([
2482
- hn(bn, Sn, Cn),
2483
- Je(1, W(nt)),
2484
- Je(2, W(_e)),
2485
- Je(3, K)
2486
- ], $e);
2482
+ en(Ve, "type", B.UNIVER_SHEET);
2483
+ en(Ve, "pluginName", Ei);
2484
+ Ve = bi([
2485
+ mn(En, Cn, In),
2486
+ Ze(1, W(nt)),
2487
+ Ze(2, W(_e)),
2488
+ Ze(3, K)
2489
+ ], Ve);
2487
2490
  export {
2488
2491
  j as ClearSheetDrawingTransformerOperation,
2489
- Zt as DeleteDrawingsCommand,
2490
- Gt as EditSheetDrawingOperation,
2491
- Ft as GroupSheetDrawingCommand,
2492
- Be as InsertCellImageOperation,
2493
- xe as InsertFloatImageOperation,
2492
+ qt as DeleteDrawingsCommand,
2493
+ xt as EditSheetDrawingOperation,
2494
+ Yt as GroupSheetDrawingCommand,
2495
+ We as InsertCellImageOperation,
2496
+ Fe as InsertFloatImageOperation,
2494
2497
  st as InsertSheetDrawingCommand,
2495
2498
  ve as MoveDrawingsCommand,
2496
2499
  it as RemoveSheetDrawingCommand,
2497
- xt as SetDrawingArrangeCommand,
2498
- Fe as SetSheetDrawingCommand,
2499
- tt as SheetCanvasFloatDomManagerService,
2500
- Vt as SidebarSheetDrawingOperation,
2501
- Yt as UngroupSheetDrawingCommand,
2502
- $e as UniverSheetsDrawingUIPlugin
2500
+ Ft as SetDrawingArrangeCommand,
2501
+ Ye as SetSheetDrawingCommand,
2502
+ Ne as SheetCanvasFloatDomManagerService,
2503
+ Gt as SidebarSheetDrawingOperation,
2504
+ kt as UngroupSheetDrawingCommand,
2505
+ Ve as UniverSheetsDrawingUIPlugin
2503
2506
  };