@univerjs/sheets-drawing-ui 0.5.1-nightly.202412251606 → 0.5.1-nightly.202412261606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,20 +1,20 @@
1
- var Nn = Object.defineProperty;
2
- var jn = (i, e, n) => e in i ? Nn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
- var V = (i, e, n) => jn(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as Y, ICommandService as F, IUndoRedoService as me, sequenceExecute as Bt, LocaleService as Ke, IUniverInstanceService as fe, useDependency as de, Inject as U, Injector as Se, IContextService as Lt, RxDisposable as Wn, UniverInstanceType as G, connectInjector as xn, toDisposable as $n, FOCUSING_COMMON_DRAWINGS as he, DrawingTypeEnum as k, Disposable as Z, ArrangeTypeEnum as Me, createDocumentModelWithStyle as Bn, ObjectRelativeFromH as Ln, ObjectRelativeFromV as Gn, BooleanNumber as Fn, PositionedObjectLayoutType as Vn, WrapTextType as kn, BuildTextUtils as Hn, Range as Yn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, DOCS_ZEN_EDITOR_UNIT_ID_KEY as be, InterceptorEffectEnum as Xn, ObjectMatrix as zn, Tools as _e, UserManagerService as Kn, IPermissionService as Jn, Rectangle as qn, Direction as re, FOCUSING_FX_BAR_EDITOR as Zn, EDITOR_ACTIVATED as Qn, FOCUSING_PANEL_EDITOR as er, LifecycleService as tr, LifecycleStages as nr, DisposableCollection as rr, fromEventSubject as ir, generateRandomId as sr, DependentOn as or, Plugin as ar, registerDependencies as cr, touchDependencies as tt, IConfigService as dr } from "@univerjs/core";
5
- import { DocDrawingController as lr, UniverDocsDrawingPlugin as ur } from "@univerjs/docs-drawing";
6
- import { IDrawingManagerService as q, IImageIoService as Gt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as hr } from "@univerjs/drawing";
7
- import { ImageCropperObject as gr, COMPONENT_IMAGE_POPUP_MENU as mr, OpenImageCropOperation as fr, ImageResetSizeOperation as pr, DrawingRenderService as Ft, DrawingCommonPanel as wr, UniverDrawingUIPlugin as _r } from "@univerjs/drawing-ui";
8
- import { IRenderManagerService as X, precisionTo as ye, getGroupState as vr, transformObjectOutOfGroup as Sr, RENDER_CLASS_TYPE as ue, Rect as Pt, ObjectType as Ir, DRAWING_OBJECT_LAYER_INDEX as Cr, SHEET_VIEWPORT_KEY as Vt } from "@univerjs/engine-render";
9
- import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Rr } from "@univerjs/sheets-drawing";
10
- import { SheetCanvasPopManagerService as Mr, convertPositionSheetOverGridToAbsolute as Dr, ISheetSelectionRenderService as Ie, SheetSkeletonManagerService as Q, attachRangeWithCoord as kt, IEditorBridgeService as br, IAutoFillService as yr, HoverManagerService as Or, COPY_TYPE as Ut, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Tr, ISheetClipboardService as Er, SheetPrintInterceptorService as Pr, getCurrentRangeDisable$ as Ur, SetZoomRatioOperation as Ar } from "@univerjs/sheets-ui";
11
- import { ISidebarService as Nr, IUIPartsService as jr, BuiltInUIPart as Wr, ILocalFileService as xr, IMessageService as $r, MenuItemType as wt, getMenuHiddenObservable as Ht, RibbonStartGroup as Br, KeyCode as ge, ComponentManager as Lr, IMenuManagerService as Gr, IShortcutService as Fr, CanvasFloatDomService as Vr } from "@univerjs/ui";
12
- import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as kr, BehaviorSubject as Hr, switchMap as Nt } from "rxjs";
13
- import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Yt, SetRangeValuesCommand as Yr, SetWorksheetRowHeightMutation as Xt, SetWorksheetColWidthMutation as zt, SetWorksheetRowIsAutoHeightMutation as Xr, SetWorksheetRowAutoHeightMutation as zr, AddWorksheetMergeMutation as Kr, RemoveWorksheetMergeMutation as Jr, AFTER_CELL_EDIT as qr, INTERCEPTOR_POINT as Zr, InterceptCellContentPriority as Qr, WorkbookViewPermission as jt, WorksheetViewPermission as it, WorkbookEditablePermission as lt, WorksheetEditPermission as xe, InsertRowCommand as Kt, InsertColCommand as Jt, RemoveRowCommand as qt, RemoveColCommand as Zt, DeleteRangeMoveLeftCommand as Qt, DeleteRangeMoveUpCommand as en, InsertRangeMoveDownCommand as tn, InsertRangeMoveRightCommand as nn, DeltaRowHeightCommand as ut, SetRowHeightCommand as ht, DeltaColumnWidthCommand as rn, SetColWidthCommand as sn, SetRowHiddenCommand as on, SetSpecificRowsVisibleCommand as an, SetSpecificColsVisibleCommand as cn, SetColHiddenCommand as dn, MoveColsCommand as ln, MoveRowsCommand as un, MoveRangeCommand as hn, SetRowVisibleMutation as ei, SetRowHiddenMutation as ti, SetColVisibleMutation as ni, SetColHiddenMutation as ri, SetWorksheetActiveOperation as ii, RangeProtectionPermissionEditPoint as si, SetFrozenMutation as oi } from "@univerjs/sheets";
14
- import gn, { useEffect as _t, forwardRef as mn, useRef as ai, createElement as fn, useState as gt } from "react";
15
- import { docDrawingPositionToTransform as ci, ReplaceSnapshotCommand as di } from "@univerjs/docs-ui";
16
- import { MessageType as se, RadioGroup as li, Radio as st } from "@univerjs/design";
17
- const ui = "sheets-drawing-ui.config", hi = {}, W = {
1
+ var jn = Object.defineProperty;
2
+ var Wn = (i, e, n) => e in i ? jn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
+ var V = (i, e, n) => Wn(i, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CommandType as Y, ICommandService as F, IUndoRedoService as fe, sequenceExecute as Lt, LocaleService as Ke, IUniverInstanceService as pe, useDependency as de, Inject as U, Injector as Se, IContextService as Gt, RxDisposable as xn, UniverInstanceType as G, connectInjector as $n, toDisposable as Bn, FOCUSING_COMMON_DRAWINGS as ge, DrawingTypeEnum as k, Disposable as Z, ArrangeTypeEnum as Me, createDocumentModelWithStyle as Ln, ObjectRelativeFromH as Gn, ObjectRelativeFromV as Fn, BooleanNumber as Vn, PositionedObjectLayoutType as kn, WrapTextType as Hn, BuildTextUtils as Yn, Range as Xn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, DOCS_ZEN_EDITOR_UNIT_ID_KEY as be, InterceptorEffectEnum as zn, ObjectMatrix as Kn, Tools as he, UserManagerService as Jn, IPermissionService as qn, Rectangle as Zn, Direction as re, FOCUSING_FX_BAR_EDITOR as Qn, EDITOR_ACTIVATED as er, FOCUSING_PANEL_EDITOR as tr, LifecycleService as nr, LifecycleStages as rr, DisposableCollection as ir, fromEventSubject as sr, generateRandomId as or, DependentOn as ar, Plugin as cr, registerDependencies as dr, touchDependencies as tt, IConfigService as lr } from "@univerjs/core";
5
+ import { DocDrawingController as ur, UniverDocsDrawingPlugin as hr } from "@univerjs/docs-drawing";
6
+ import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as gr } from "@univerjs/drawing";
7
+ import { ImageCropperObject as mr, COMPONENT_IMAGE_POPUP_MENU as fr, OpenImageCropOperation as pr, ImageResetSizeOperation as wr, DrawingRenderService as Vt, DrawingCommonPanel as _r, UniverDrawingUIPlugin as vr } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as X, precisionTo as ye, getGroupState as Sr, transformObjectOutOfGroup as Ir, RENDER_CLASS_TYPE as ue, Rect as Pt, ObjectType as Cr, DRAWING_OBJECT_LAYER_INDEX as Rr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
9
+ import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Mr } from "@univerjs/sheets-drawing";
10
+ import { SheetCanvasPopManagerService as Dr, convertPositionSheetOverGridToAbsolute as br, ISheetSelectionRenderService as Ie, SheetSkeletonManagerService as Q, attachRangeWithCoord as Ht, IEditorBridgeService as yr, IAutoFillService as Or, HoverManagerService as Tr, COPY_TYPE as Ut, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Er, ISheetClipboardService as Pr, SheetPrintInterceptorService as Ur, getCurrentRangeDisable$ as Ar, SetZoomRatioOperation as Nr } from "@univerjs/sheets-ui";
11
+ import { ISidebarService as jr, IUIPartsService as Wr, BuiltInUIPart as xr, ILocalFileService as $r, IMessageService as Br, MenuItemType as wt, getMenuHiddenObservable as Yt, RibbonStartGroup as Lr, KeyCode as me, ComponentManager as Gr, IMenuManagerService as Fr, IShortcutService as Vr, CanvasFloatDomService as kr } from "@univerjs/ui";
12
+ import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as Hr, BehaviorSubject as Yr, switchMap as Nt } from "rxjs";
13
+ import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Xt, SetRangeValuesCommand as Xr, SetWorksheetRowHeightMutation as zt, SetWorksheetColWidthMutation as Kt, SetWorksheetRowIsAutoHeightMutation as zr, SetWorksheetRowAutoHeightMutation as Kr, AddWorksheetMergeMutation as Jr, RemoveWorksheetMergeMutation as qr, AFTER_CELL_EDIT as Zr, INTERCEPTOR_POINT as Qr, InterceptCellContentPriority as ei, WorkbookViewPermission as jt, WorksheetViewPermission as it, WorkbookEditablePermission as lt, WorksheetEditPermission as xe, InsertRowCommand as Jt, InsertColCommand as qt, RemoveRowCommand as Zt, RemoveColCommand as Qt, DeleteRangeMoveLeftCommand as en, DeleteRangeMoveUpCommand as tn, InsertRangeMoveDownCommand as nn, InsertRangeMoveRightCommand as rn, DeltaRowHeightCommand as ut, SetRowHeightCommand as ht, DeltaColumnWidthCommand as sn, SetColWidthCommand as on, SetRowHiddenCommand as an, SetSpecificRowsVisibleCommand as cn, SetSpecificColsVisibleCommand as dn, SetColHiddenCommand as ln, MoveColsCommand as un, MoveRowsCommand as hn, MoveRangeCommand as gn, SetRowVisibleMutation as ti, SetRowHiddenMutation as ni, SetColVisibleMutation as ri, SetColHiddenMutation as ii, SetWorksheetActiveOperation as si, RangeProtectionPermissionEditPoint as oi, SetFrozenMutation as ai } from "@univerjs/sheets";
14
+ import mn, { useEffect as _t, forwardRef as fn, useRef as ci, createElement as pn, useState as gt } from "react";
15
+ import { docDrawingPositionToTransform as di, ReplaceSnapshotCommand as li } from "@univerjs/docs-ui";
16
+ import { MessageType as se, RadioGroup as ui, Radio as st } from "@univerjs/design";
17
+ const hi = "sheets-drawing-ui.config", Wt = {}, W = {
18
18
  id: "sheet.operation.clear-drawing-transformer",
19
19
  type: Y.MUTATION,
20
20
  handler: (i, e) => {
@@ -29,7 +29,7 @@ const ui = "sheets-drawing-ui.config", hi = {}, W = {
29
29
  type: Y.COMMAND,
30
30
  handler: (i, e) => {
31
31
  var I, S, R;
32
- const n = i.get(F), t = i.get(me), r = i.get(Je), s = i.get(z);
32
+ const n = i.get(F), t = i.get(fe), r = i.get(Je), s = i.get(z);
33
33
  if (!e) return !1;
34
34
  const { drawings: o } = e, d = [];
35
35
  o.forEach((_) => {
@@ -37,7 +37,7 @@ const ui = "sheets-drawing-ui.config", hi = {}, W = {
37
37
  d.push(C);
38
38
  });
39
39
  const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: qe.id, params: e }), f = { id: O.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: T.REMOVE } }, p = { id: O.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: T.INSERT } };
40
- return Bt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
40
+ return Lt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
41
41
  unitID: g,
42
42
  undoMutations: [
43
43
  ...(S = m.preUndos) != null ? S : [],
@@ -53,17 +53,17 @@ const ui = "sheets-drawing-ui.config", hi = {}, W = {
53
53
  ]
54
54
  }), !0) : !1;
55
55
  }
56
- }, pn = "COMPONENT_SHEET_DRAWING_PANEL", wn = {
56
+ }, wn = "COMPONENT_SHEET_DRAWING_PANEL", _n = {
57
57
  id: "sidebar.operation.sheet-image",
58
58
  type: Y.COMMAND,
59
59
  handler: async (i, e) => {
60
- const n = i.get(Nr), t = i.get(Ke), r = i.get(fe), s = i.get(q);
60
+ const n = i.get(jr), t = i.get(Ke), r = i.get(pe), s = i.get(q);
61
61
  if (!H(r)) return !1;
62
62
  switch (e.value) {
63
63
  case "open":
64
64
  n.open({
65
65
  header: { title: t.t("sheetImage.panel.title") },
66
- children: { label: pn },
66
+ children: { label: wn },
67
67
  onClose: () => {
68
68
  s.focusDrawing(null);
69
69
  },
@@ -77,15 +77,15 @@ const ui = "sheets-drawing-ui.config", hi = {}, W = {
77
77
  }
78
78
  return !0;
79
79
  }
80
- }, _n = {
80
+ }, vn = {
81
81
  id: "sheet.operation.edit-sheet-image",
82
82
  type: Y.OPERATION,
83
83
  handler: (i, e) => {
84
84
  const n = i.get(q), t = i.get(F);
85
- return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(wn.id, { value: "open" }), !0);
85
+ return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(_n.id, { value: "open" }), !0);
86
86
  }
87
87
  };
88
- var ot = { exports: {} }, pe = {};
88
+ var ot = { exports: {} }, we = {};
89
89
  /**
90
90
  * @license React
91
91
  * react-jsx-runtime.production.min.js
@@ -95,11 +95,11 @@ var ot = { exports: {} }, pe = {};
95
95
  * This source code is licensed under the MIT license found in the
96
96
  * LICENSE file in the root directory of this source tree.
97
97
  */
98
- var Wt;
98
+ var xt;
99
99
  function gi() {
100
- if (Wt) return pe;
101
- Wt = 1;
102
- var i = gn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
100
+ if (xt) return we;
101
+ xt = 1;
102
+ var i = mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
103
103
  function o(d, l, g) {
104
104
  var c, a = {}, h = null, u = null;
105
105
  g !== void 0 && (h = "" + g), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (u = l.ref);
@@ -107,11 +107,11 @@ function gi() {
107
107
  if (d && d.defaultProps) for (c in l = d.defaultProps, l) a[c] === void 0 && (a[c] = l[c]);
108
108
  return { $$typeof: e, type: d, key: h, ref: u, props: a, _owner: r.current };
109
109
  }
110
- return pe.Fragment = n, pe.jsx = o, pe.jsxs = o, pe;
110
+ return we.Fragment = n, we.jsx = o, we.jsxs = o, we;
111
111
  }
112
- var xt;
112
+ var $t;
113
113
  function mi() {
114
- return xt || (xt = 1, ot.exports = gi()), ot.exports;
114
+ return $t || ($t = 1, ot.exports = gi()), ot.exports;
115
115
  }
116
116
  var $ = mi();
117
117
  const fi = "univer-upload-loading", pi = "univer-upload-loading-body", wi = "univer-upload-loading-body-animation", _i = "univer-UniverCircleAnimation", vi = "univer-upload-loading-body-text", Pe = {
@@ -121,7 +121,7 @@ const fi = "univer-upload-loading", pi = "univer-upload-loading-body", wi = "uni
121
121
  univerCircleAnimation: _i,
122
122
  uploadLoadingBodyText: vi
123
123
  }, Si = () => {
124
- const i = de(Gt), e = de(Ke), [n, t] = gn.useState(0);
124
+ const i = de(Ft), e = de(Ke), [n, t] = mn.useState(0);
125
125
  return _t(() => {
126
126
  const r = i.change$.subscribe((s) => {
127
127
  t(s);
@@ -139,14 +139,14 @@ var Ii = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Ri = (i, e
139
139
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
140
140
  return t && r && Ii(e, n, r), r;
141
141
  }, oe = (i, e) => (n, t) => e(n, t, i);
142
- let Be = class extends Wn {
142
+ let Be = class extends xn {
143
143
  constructor(e, n, t, r, s, o, d) {
144
144
  super();
145
145
  V(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
146
146
  this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = d, this._init();
147
147
  }
148
148
  _init() {
149
- this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(G.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(Wr.CONTENT, () => xn(Si, this._injector));
149
+ this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(G.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(xr.CONTENT, () => $n(Si, this._injector));
150
150
  }
151
151
  _dispose(e) {
152
152
  const n = e.getUnitId();
@@ -161,7 +161,7 @@ let Be = class extends Wn {
161
161
  _hasCropObject(e) {
162
162
  const n = e.getAllObjectsByOrder();
163
163
  for (const t of n)
164
- if (t instanceof gr)
164
+ if (t instanceof mr)
165
165
  return !0;
166
166
  return !1;
167
167
  }
@@ -175,9 +175,9 @@ let Be = class extends Wn {
175
175
  return;
176
176
  let r;
177
177
  this.disposeWithMe(
178
- $n(
178
+ Bn(
179
179
  t.createControl$.subscribe(() => {
180
- if (this._contextService.setContextValue(he, !0), this._hasCropObject(n))
180
+ if (this._contextService.setContextValue(ge, !0), this._hasCropObject(n))
181
181
  return;
182
182
  const o = t.getSelectedObjectMap();
183
183
  if (o.size > 1) {
@@ -196,7 +196,7 @@ let Be = class extends Wn {
196
196
  r == null || r.dispose();
197
197
  const f = this._canvasPopManagerService.getFeatureMenu(c, a, h, u);
198
198
  r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
199
- componentKey: mr,
199
+ componentKey: fr,
200
200
  direction: "horizontal",
201
201
  offset: [2, 0],
202
202
  extraProps: {
@@ -211,11 +211,11 @@ let Be = class extends Wn {
211
211
  )
212
212
  ), this.disposeWithMe(
213
213
  t.clearControl$.subscribe(() => {
214
- r == null || r.dispose(), this._contextService.setContextValue(he, !1), this._drawingManagerService.focusDrawing(null);
214
+ r == null || r.dispose(), this._contextService.setContextValue(ge, !1), this._drawingManagerService.focusDrawing(null);
215
215
  })
216
216
  ), this.disposeWithMe(
217
217
  this._contextService.contextChanged$.subscribe((o) => {
218
- o[he] === !1 && (r == null || r.dispose());
218
+ o[ge] === !1 && (r == null || r.dispose());
219
219
  })
220
220
  ), this.disposeWithMe(
221
221
  t.changing$.subscribe(() => {
@@ -228,7 +228,7 @@ let Be = class extends Wn {
228
228
  {
229
229
  label: "image-popup.edit",
230
230
  index: 0,
231
- commandId: _n.id,
231
+ commandId: vn.id,
232
232
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
233
233
  disable: r === k.DRAWING_DOM
234
234
  },
@@ -242,14 +242,14 @@ let Be = class extends Wn {
242
242
  {
243
243
  label: "image-popup.crop",
244
244
  index: 2,
245
- commandId: fr.id,
245
+ commandId: pr.id,
246
246
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
247
247
  disable: r === k.DRAWING_DOM
248
248
  },
249
249
  {
250
250
  label: "image-popup.reset",
251
251
  index: 3,
252
- commandId: pr.id,
252
+ commandId: wr.id,
253
253
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
254
254
  disable: r === k.DRAWING_DOM
255
255
  }
@@ -259,17 +259,17 @@ let Be = class extends Wn {
259
259
  Be = Ri([
260
260
  oe(0, U(Se)),
261
261
  oe(1, q),
262
- oe(2, U(Mr)),
262
+ oe(2, U(Dr)),
263
263
  oe(3, X),
264
- oe(4, fe),
265
- oe(5, Lt),
266
- oe(6, U(jr))
264
+ oe(4, pe),
265
+ oe(5, Gt),
266
+ oe(6, U(Wr))
267
267
  ], Be);
268
268
  function B(i, e, n) {
269
269
  const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, c = n.getCurrent();
270
270
  if (c == null)
271
271
  return;
272
- const a = Dr(
272
+ const a = br(
273
273
  c.unitId,
274
274
  c.sheetId,
275
275
  { from: t, to: r },
@@ -351,7 +351,7 @@ mt = bi([
351
351
  function yi(i) {
352
352
  const e = [];
353
353
  return i.forEach((n) => {
354
- const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = vr(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
354
+ const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = Sr(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
355
355
  const h = a.transform || { left: 0, top: 0 }, { unitId: u, subUnitId: m, drawingId: f } = a;
356
356
  return {
357
357
  unitId: u,
@@ -384,7 +384,7 @@ function Oi(i) {
384
384
  if (l == null)
385
385
  return;
386
386
  const g = r.map((a) => {
387
- const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Sr(h || {}, l, l.width || 0, l.height || 0);
387
+ const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Ir(h || {}, l, l.width || 0, l.height || 0);
388
388
  return {
389
389
  unitId: u,
390
390
  subUnitId: m,
@@ -408,11 +408,11 @@ function Oi(i) {
408
408
  });
409
409
  }), e;
410
410
  }
411
- const vn = {
411
+ const Sn = {
412
412
  id: "sheet.command.group-sheet-image",
413
413
  type: Y.COMMAND,
414
414
  handler: (i, e) => {
415
- const n = i.get(F), t = i.get(me), r = i.get(z);
415
+ const n = i.get(F), t = i.get(fe), r = i.get(z);
416
416
  if (!e) return !1;
417
417
  const s = [];
418
418
  e.forEach(({ parent: u, children: m }) => {
@@ -438,10 +438,10 @@ const vn = {
438
438
  type: Y.COMMAND,
439
439
  handler: (i, e) => {
440
440
  var I, S, R;
441
- const n = i.get(F), t = i.get(me), r = i.get(z), s = i.get(Je);
441
+ const n = i.get(F), t = i.get(fe), r = i.get(z), s = i.get(Je);
442
442
  if (!e) return !1;
443
443
  const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: Ze.id, params: e }), f = { id: O.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: O.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
444
- return Bt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
444
+ return Lt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
445
445
  unitID: g,
446
446
  undoMutations: [
447
447
  ...(S = m.preUndos) != null ? S : [],
@@ -457,11 +457,11 @@ const vn = {
457
457
  ]
458
458
  }), !0) : !1;
459
459
  }
460
- }, Sn = {
460
+ }, In = {
461
461
  id: "sheet.command.set-drawing-arrange",
462
462
  type: Y.COMMAND,
463
463
  handler: (i, e) => {
464
- const n = i.get(F), t = i.get(me);
464
+ const n = i.get(F), t = i.get(fe);
465
465
  if (!e) return !1;
466
466
  const r = i.get(z), { unitId: s, subUnitId: o, drawingIds: d, arrangeType: l } = e, g = { unitId: s, subUnitId: o, drawingIds: d };
467
467
  let c;
@@ -482,7 +482,7 @@ const vn = {
482
482
  id: "sheet.command.set-sheet-image",
483
483
  type: Y.COMMAND,
484
484
  handler: (i, e) => {
485
- const n = i.get(F), t = i.get(me), r = i.get(z);
485
+ const n = i.get(F), t = i.get(fe), r = i.get(z);
486
486
  if (!e) return !1;
487
487
  const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
488
488
  return n.syncExecuteCommand(O.id, { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE }) ? (t.pushUndoRedo({
@@ -497,11 +497,11 @@ const vn = {
497
497
  ]
498
498
  }), !0) : !1;
499
499
  }
500
- }, In = {
500
+ }, Cn = {
501
501
  id: "sheet.command.ungroup-sheet-image",
502
502
  type: Y.COMMAND,
503
503
  handler: (i, e) => {
504
- const n = i.get(F), t = i.get(me), r = i.get(z);
504
+ const n = i.get(F), t = i.get(fe), r = i.get(z);
505
505
  if (!e) return !1;
506
506
  const s = [];
507
507
  e.forEach(({ parent: u, children: m }) => {
@@ -532,7 +532,7 @@ function Ui(i, e, n) {
532
532
  const t = n * Math.PI / 180, r = Math.abs(i * Math.cos(t)) + Math.abs(e * Math.sin(t)), s = Math.abs(i * Math.sin(t)) + Math.abs(e * Math.cos(t));
533
533
  return { rotatedWidth: r, rotatedHeight: s };
534
534
  }
535
- function Cn(i, e, n, t, r) {
535
+ function Rn(i, e, n, t, r) {
536
536
  var I;
537
537
  const { rotatedHeight: s, rotatedWidth: o } = Ui(n, t, r), l = i.get(X).getRenderById(e.unitId);
538
538
  if (!l)
@@ -638,7 +638,7 @@ let ve = class extends Z {
638
638
  const c = this._workbookSelections.getCurrentLastSelection();
639
639
  if (!c)
640
640
  return !1;
641
- const a = Bn("", {}), h = Cn(
641
+ const a = Ln("", {}), h = Rn(
642
642
  this._injector,
643
643
  {
644
644
  unitId: this._context.unitId,
@@ -658,11 +658,11 @@ let ve = class extends Z {
658
658
  height: h.height
659
659
  },
660
660
  positionH: {
661
- relativeFrom: Ln.PAGE,
661
+ relativeFrom: Gn.PAGE,
662
662
  posOffset: 0
663
663
  },
664
664
  positionV: {
665
- relativeFrom: Gn.PARAGRAPH,
665
+ relativeFrom: Fn.PARAGRAPH,
666
666
  posOffset: 0
667
667
  },
668
668
  angle: 0
@@ -673,19 +673,19 @@ let ve = class extends Z {
673
673
  drawingType: k.DRAWING_IMAGE,
674
674
  imageSourceType: r,
675
675
  source: s,
676
- transform: ci(u),
676
+ transform: di(u),
677
677
  docTransform: u,
678
- behindDoc: Fn.FALSE,
678
+ behindDoc: Vn.FALSE,
679
679
  title: "",
680
680
  description: "",
681
- layoutType: Vn.INLINE,
681
+ layoutType: kn.INLINE,
682
682
  // Insert inline drawing by default.
683
- wrapText: kn.BOTH_SIDES,
683
+ wrapText: Hn.BOTH_SIDES,
684
684
  distB: 0,
685
685
  distL: 0,
686
686
  distR: 0,
687
687
  distT: 0
688
- }, f = Hn.drawing.add({
688
+ }, f = Yn.drawing.add({
689
689
  documentDataModel: a,
690
690
  drawings: [m],
691
691
  selection: {
@@ -694,7 +694,7 @@ let ve = class extends Z {
694
694
  endOffset: 0
695
695
  }
696
696
  });
697
- return f ? (a.apply(f), this._commandService.syncExecuteCommand(Yr.id, {
697
+ return f ? (a.apply(f), this._commandService.syncExecuteCommand(Xr.id, {
698
698
  value: {
699
699
  [c.primary.actualRow]: {
700
700
  [c.primary.actualColumn]: {
@@ -721,7 +721,7 @@ let ve = class extends Z {
721
721
  endColumn: 0
722
722
  };
723
723
  s && s.length > 0 && (o = s[s.length - 1].range);
724
- const d = kt(this._skeletonManagerService.getCurrent().skeleton, o);
724
+ const d = Ht(this._skeletonManagerService.getCurrent().skeleton, o);
725
725
  if (d == null)
726
726
  return;
727
727
  let { startColumn: l, startRow: g, startX: c, startY: a } = d, h = !1;
@@ -753,7 +753,7 @@ let ve = class extends Z {
753
753
  _updateOrderListener() {
754
754
  this.disposeWithMe(this._drawingManagerService.featurePluginOrderUpdate$.subscribe((e) => {
755
755
  const { unitId: n, subUnitId: t, drawingIds: r, arrangeType: s } = e;
756
- this._commandService.executeCommand(Sn.id, {
756
+ this._commandService.executeCommand(In.id, {
757
757
  unitId: n,
758
758
  subUnitId: t,
759
759
  drawingIds: r,
@@ -788,17 +788,17 @@ let ve = class extends Z {
788
788
  }
789
789
  _groupDrawingListener() {
790
790
  this.disposeWithMe(this._drawingManagerService.featurePluginGroupUpdate$.subscribe((e) => {
791
- this._commandService.executeCommand(vn.id, e);
791
+ this._commandService.executeCommand(Sn.id, e);
792
792
  const { unitId: n, subUnitId: t, drawingId: r } = e[0].parent;
793
793
  this._drawingManagerService.focusDrawing([{ unitId: n, subUnitId: t, drawingId: r }]);
794
794
  })), this.disposeWithMe(this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((e) => {
795
- this._commandService.executeCommand(In.id, e);
795
+ this._commandService.executeCommand(Cn.id, e);
796
796
  }));
797
797
  }
798
798
  _focusDrawingListener() {
799
799
  this.disposeWithMe(
800
800
  this._drawingManagerService.focus$.subscribe((e) => {
801
- e == null || e.length === 0 ? (this._contextService.setContextValue(he, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(he, !0), this._sheetDrawingService.focusDrawing(e));
801
+ e == null || e.length === 0 ? (this._contextService.setContextValue(ge, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(ge, !0), this._sheetDrawingService.focusDrawing(e));
802
802
  })
803
803
  );
804
804
  }
@@ -807,14 +807,14 @@ ve = Pi([
807
807
  K(1, U(Q)),
808
808
  K(2, F),
809
809
  K(3, Ie),
810
- K(4, Gt),
811
- K(5, xr),
810
+ K(4, Ft),
811
+ K(5, $r),
812
812
  K(6, z),
813
813
  K(7, q),
814
- K(8, Lt),
815
- K(9, $r),
814
+ K(8, Gt),
815
+ K(9, Br),
816
816
  K(10, U(Ke)),
817
- K(11, U(Yt)),
817
+ K(11, U(Xt)),
818
818
  K(12, U(Se))
819
819
  ], ve);
820
820
  var Ai = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, ji = (i, e, n, t) => {
@@ -825,7 +825,7 @@ var Ai = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, ji = (i, e
825
825
  function ft(i, e, n) {
826
826
  var t, r, s, o;
827
827
  if (((r = (t = n == null ? void 0 : n.p) == null ? void 0 : t.body) == null ? void 0 : r.dataStream.length) === 3 && ((o = (s = n.p) == null ? void 0 : s.drawingsOrder) == null ? void 0 : o.length) === 1) {
828
- const d = n.p.drawings[n.p.drawingsOrder[0]], l = Cn(
828
+ const d = n.p.drawings[n.p.drawingsOrder[0]], l = Rn(
829
829
  i,
830
830
  {
831
831
  unitId: e.unitId,
@@ -849,16 +849,16 @@ let Le = class extends Z {
849
849
  _initHandleResize() {
850
850
  this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
851
851
  let e, n = [];
852
- if (i.id === Xt.id) {
852
+ if (i.id === zt.id) {
853
853
  const t = i.params;
854
854
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
855
- } else if (i.id === zt.id) {
855
+ } else if (i.id === Kt.id) {
856
856
  const t = i.params;
857
857
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
858
- } else if (i.id === Xr.id) {
858
+ } else if (i.id === zr.id) {
859
859
  const t = i.params;
860
860
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
861
- } else if (i.id === zr.id) {
861
+ } else if (i.id === Kr.id) {
862
862
  const t = i.params;
863
863
  e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId }), n = t.rowsAutoHeightInfo.map((r) => ({
864
864
  startRow: r.row,
@@ -866,15 +866,15 @@ let Le = class extends Z {
866
866
  startColumn: 0,
867
867
  endColumn: 9999
868
868
  }));
869
- } else if (i.id === Kr.id) {
869
+ } else if (i.id === Jr.id) {
870
870
  const t = i.params;
871
871
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
872
- } else if (i.id === Jr.id) {
872
+ } else if (i.id === qr.id) {
873
873
  const t = i.params;
874
874
  n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
875
875
  }
876
876
  e && n.length && n.forEach((t) => {
877
- const r = Yn.transformRange(t, e.worksheet);
877
+ const r = Xn.transformRange(t, e.worksheet);
878
878
  for (let s = r.startRow; s <= r.endRow; s++)
879
879
  for (let o = r.startColumn; o <= r.endColumn; o++)
880
880
  ft(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: s, col: o }, e.worksheet.getCellRaw(s, o));
@@ -885,11 +885,11 @@ let Le = class extends Z {
885
885
  this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
886
886
  i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(De), this._docDrawingController.loadDrawingDataForUnit(De), this._drawingManagerService.initializeNotification(De)) : this._drawingManagerService.removeDrawingDataForUnit(De);
887
887
  })), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
888
- i.id === di.id && i.params.unitId === be && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be));
888
+ i.id === li.id && i.params.unitId === be && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be));
889
889
  }));
890
890
  }
891
891
  _handleWriteCell() {
892
- this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(qr, {
892
+ this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(Zr, {
893
893
  priority: 9999,
894
894
  handler: (i, e, n) => (ft(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: e.row, col: e.col }, i), n(i))
895
895
  }));
@@ -897,10 +897,10 @@ let Le = class extends Z {
897
897
  _initCellContentInterceptor() {
898
898
  this.disposeWithMe(
899
899
  this._sheetInterceptorService.intercept(
900
- Zr.CELL_CONTENT,
900
+ Qr.CELL_CONTENT,
901
901
  {
902
- effect: Xn.Style,
903
- priority: Qr.CELL_IMAGE,
902
+ effect: zn.Style,
903
+ priority: ei.CELL_IMAGE,
904
904
  handler: (i, e, n) => {
905
905
  var t;
906
906
  return i != null && i.p && ((t = i.p.drawingsOrder) != null && t.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }), n(i);
@@ -913,17 +913,17 @@ let Le = class extends Z {
913
913
  Le = ji([
914
914
  ae(0, F),
915
915
  ae(1, U(Je)),
916
- ae(2, fe),
916
+ ae(2, pe),
917
917
  ae(3, U(Se)),
918
918
  ae(4, q),
919
- ae(5, U(lr)),
920
- ae(6, U(br))
919
+ ae(5, U(ur)),
920
+ ae(6, U(yr))
921
921
  ], Le);
922
922
  var Wi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, $i = (i, e, n, t) => {
923
923
  for (var r = t > 1 ? void 0 : t ? xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
924
924
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
925
925
  return t && r && Wi(e, n, r), r;
926
- }, $t = (i, e) => (n, t) => e(n, t, i);
926
+ }, Bt = (i, e) => (n, t) => e(n, t, i);
927
927
  let Ge = class extends Z {
928
928
  constructor(i, e) {
929
929
  super(), this._autoFillService = i, this._injector = e, this._initAutoFillHooks();
@@ -933,7 +933,7 @@ let Ge = class extends Z {
933
933
  this._autoFillService.addHook({
934
934
  id: "sheet-cell-image-autofill",
935
935
  onBeforeSubmit: (i, e, n, t) => {
936
- new zn(t).forValue((r, s, o) => {
936
+ new Kn(t).forValue((r, s, o) => {
937
937
  ft(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
938
938
  });
939
939
  }
@@ -942,8 +942,8 @@ let Ge = class extends Z {
942
942
  }
943
943
  };
944
944
  Ge = $i([
945
- $t(0, U(yr)),
946
- $t(1, U(Se))
945
+ Bt(0, U(Or)),
946
+ Bt(1, U(Se))
947
947
  ], Ge);
948
948
  var Bi = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, Gi = (i, e, n, t) => {
949
949
  for (var r = t > 1 ? void 0 : t ? Li(e, n) : e, s = i.length - 1, o; s >= 0; s--)
@@ -962,10 +962,10 @@ let Fe = class extends Z {
962
962
  }
963
963
  };
964
964
  Fe = Gi([
965
- Ae(0, U(Or)),
965
+ Ae(0, U(Tr)),
966
966
  Ae(1, U(X)),
967
- Ae(2, U(Yt)),
968
- Ae(3, U(Ft))
967
+ Ae(2, U(Xt)),
968
+ Ae(3, U(Vt))
969
969
  ], Fe);
970
970
  var Fi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ki = (i, e, n, t) => {
971
971
  for (var r = t > 1 ? void 0 : t ? Vi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
@@ -1031,7 +1031,7 @@ let Ve = class extends Z {
1031
1031
  const { copyRange: t } = n;
1032
1032
  if (!t)
1033
1033
  return { redos: [], undos: [] };
1034
- const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = Tr([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
1034
+ const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = Er([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
1035
1035
  if (!m)
1036
1036
  return { redos: [], undos: [] };
1037
1037
  const f = m.attachRangeWithCoord({
@@ -1056,7 +1056,7 @@ let Ve = class extends Z {
1056
1056
  ...N,
1057
1057
  unitId: s,
1058
1058
  subUnitId: o,
1059
- drawingId: w ? N.drawingId : _e.generateRandomId(),
1059
+ drawingId: w ? N.drawingId : he.generateRandomId(),
1060
1060
  transform: {
1061
1061
  ...A,
1062
1062
  left: A.left + S,
@@ -1099,7 +1099,7 @@ let Ve = class extends Z {
1099
1099
  }
1100
1100
  };
1101
1101
  Ve = ki([
1102
- at(0, Er),
1102
+ at(0, Pr),
1103
1103
  at(1, X),
1104
1104
  at(2, z)
1105
1105
  ], Ve);
@@ -1107,7 +1107,7 @@ var Hi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Xi = (i, e
1107
1107
  for (var r = t > 1 ? void 0 : t ? Yi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1108
1108
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1109
1109
  return t && r && Hi(e, n, r), r;
1110
- }, we = (i, e) => (n, t) => e(n, t, i);
1110
+ }, _e = (i, e) => (n, t) => e(n, t, i);
1111
1111
  let ke = class extends Z {
1112
1112
  constructor(i, e, n, t, r) {
1113
1113
  super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
@@ -1256,11 +1256,11 @@ let ke = class extends Z {
1256
1256
  }
1257
1257
  };
1258
1258
  ke = Xi([
1259
- we(0, q),
1260
- we(1, X),
1261
- we(2, Jn),
1262
- we(3, fe),
1263
- we(4, U(Kn))
1259
+ _e(0, q),
1260
+ _e(1, X),
1261
+ _e(2, qn),
1262
+ _e(3, pe),
1263
+ _e(4, U(Jn))
1264
1264
  ], ke);
1265
1265
  var zi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Ji = (i, e, n, t) => {
1266
1266
  for (var r = t > 1 ? void 0 : t ? Ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
@@ -1300,7 +1300,7 @@ let He = class extends Z {
1300
1300
  return n(i);
1301
1301
  const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== k.DRAWING_DOM);
1302
1302
  return h.length ? (h.forEach((u) => {
1303
- if (!u.groupId && u.transform && _e.isDefine(u.transform.left) && _e.isDefine(u.transform.top) && _e.isDefine(u.transform.width) && _e.isDefine(u.transform.height)) {
1303
+ if (!u.groupId && u.transform && he.isDefine(u.transform.left) && he.isDefine(u.transform.top) && he.isDefine(u.transform.width) && he.isDefine(u.transform.height)) {
1304
1304
  const m = o.skeleton.getCellIndexByOffset(u.transform.left, u.transform.top, g, c, { x: 0, y: 0 }), f = o.skeleton.getCellIndexByOffset(u.transform.left + u.transform.width, u.transform.top + u.transform.height, g, c, { x: 0, y: 0 });
1305
1305
  m.column < a.startColumn && (a.startColumn = m.column), m.row < a.startRow && (a.startRow = m.row), a.endRow < f.row && (a.endRow = f.row), a.endColumn < f.column && (a.endColumn = f.column);
1306
1306
  }
@@ -1312,8 +1312,8 @@ let He = class extends Z {
1312
1312
  }
1313
1313
  };
1314
1314
  He = Ji([
1315
- Ne(0, U(Pr)),
1316
- Ne(1, U(Ft)),
1315
+ Ne(0, U(Ur)),
1316
+ Ne(1, U(Vt)),
1317
1317
  Ne(2, q),
1318
1318
  Ne(3, X)
1319
1319
  ], He);
@@ -1323,7 +1323,6 @@ var qi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Qi = (i, e
1323
1323
  return t && r && qi(e, n, r), r;
1324
1324
  }, te = (i, e) => (n, t) => e(n, t, i);
1325
1325
  const es = [
1326
- Kt.id,
1327
1326
  Jt.id,
1328
1327
  qt.id,
1329
1328
  Zt.id,
@@ -1331,9 +1330,9 @@ const es = [
1331
1330
  en.id,
1332
1331
  tn.id,
1333
1332
  nn.id,
1333
+ rn.id,
1334
1334
  ut.id,
1335
1335
  ht.id,
1336
- rn.id,
1337
1336
  sn.id,
1338
1337
  on.id,
1339
1338
  an.id,
@@ -1341,14 +1340,15 @@ const es = [
1341
1340
  dn.id,
1342
1341
  ln.id,
1343
1342
  un.id,
1344
- hn.id
1343
+ hn.id,
1344
+ gn.id
1345
1345
  ], ts = [
1346
- ei.id,
1347
1346
  ti.id,
1348
1347
  ni.id,
1349
1348
  ri.id,
1350
- Xt.id,
1351
- zt.id
1349
+ ii.id,
1350
+ zt.id,
1351
+ Kt.id
1352
1352
  ];
1353
1353
  let pt = class extends Z {
1354
1354
  constructor(i, e, n, t, r, s, o, d, l) {
@@ -1363,51 +1363,51 @@ let pt = class extends Z {
1363
1363
  if (i.params == null)
1364
1364
  return { redos: [], undos: [] };
1365
1365
  const e = i.id;
1366
- if (e === Kt.id)
1366
+ if (e === Jt.id)
1367
1367
  return this._moveRowInterceptor(i.params, "insert");
1368
- if ([ln.id, un.id, hn.id].includes(e))
1368
+ if ([un.id, hn.id, gn.id].includes(e))
1369
1369
  return this._moveRangeInterceptor(i.params);
1370
- if (e === Jt.id)
1371
- return this._moveColInterceptor(i.params, "insert");
1372
1370
  if (e === qt.id)
1373
- return this._moveRowInterceptor(i.params, "remove");
1371
+ return this._moveColInterceptor(i.params, "insert");
1374
1372
  if (e === Zt.id)
1373
+ return this._moveRowInterceptor(i.params, "remove");
1374
+ if (e === Qt.id)
1375
1375
  return this._moveColInterceptor(i.params, "remove");
1376
- if (e === Qt.id) {
1376
+ if (e === en.id) {
1377
1377
  const { range: n } = i.params;
1378
1378
  return this._getRangeMoveUndo(
1379
1379
  n,
1380
1380
  0
1381
1381
  /* deleteLeft */
1382
1382
  );
1383
- } else if (e === en.id) {
1383
+ } else if (e === tn.id) {
1384
1384
  const { range: n } = i.params;
1385
1385
  return this._getRangeMoveUndo(
1386
1386
  n,
1387
1387
  1
1388
1388
  /* deleteUp */
1389
1389
  );
1390
- } else if (e === tn.id) {
1390
+ } else if (e === nn.id) {
1391
1391
  const { range: n } = i.params;
1392
1392
  return this._getRangeMoveUndo(
1393
1393
  n,
1394
1394
  2
1395
1395
  /* insertDown */
1396
1396
  );
1397
- } else if (e === nn.id) {
1397
+ } else if (e === rn.id) {
1398
1398
  const { range: n } = i.params;
1399
1399
  return this._getRangeMoveUndo(
1400
1400
  n,
1401
1401
  3
1402
1402
  /* insertRight */
1403
1403
  );
1404
- } else if (e === on.id || e === an.id) {
1404
+ } else if (e === an.id || e === cn.id) {
1405
1405
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1406
1406
  return this._getDrawingUndoForRowVisible(t, r, s);
1407
- } else if (e === cn.id || e === dn.id) {
1407
+ } else if (e === dn.id || e === ln.id) {
1408
1408
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1409
1409
  return this._getDrawingUndoForColVisible(t, r, s);
1410
- } else if (e === ut.id || e === ht.id || e === rn.id || e === sn.id) {
1410
+ } else if (e === ut.id || e === ht.id || e === sn.id || e === on.id) {
1411
1411
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === ut.id || e === ht.id;
1412
1412
  return this._getDrawingUndoForRowAndColSize(t, r, s, o);
1413
1413
  }
@@ -1709,7 +1709,7 @@ let pt = class extends Z {
1709
1709
  const { unitId: r, subUnitId: s } = t, o = (R = (S = this._renderManagerService.getRenderById(r)) == null ? void 0 : S.with(Q)) == null ? void 0 : R.getCurrentSkeleton();
1710
1710
  if (!o)
1711
1711
  return { redos: [], undos: [] };
1712
- const d = kt(o, n);
1712
+ const d = Ht(o, n);
1713
1713
  if (!d)
1714
1714
  return { redos: [], undos: [] };
1715
1715
  const { startX: l, endX: g, startY: c, endY: a } = d, h = this._sheetDrawingService.getDrawingData(r, s), u = [];
@@ -1999,7 +1999,7 @@ let pt = class extends Z {
1999
1999
  _commandListener() {
2000
2000
  this.disposeWithMe(
2001
2001
  this._commandService.onCommandExecuted((i) => {
2002
- i.id === ii.id && setTimeout(() => {
2002
+ i.id === si.id && setTimeout(() => {
2003
2003
  const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
2004
2004
  Object.keys(r).forEach((d) => {
2005
2005
  const l = r[d];
@@ -2037,7 +2037,7 @@ let pt = class extends Z {
2037
2037
  const { from: c, to: a } = d, { row: h, column: u } = c, { row: m, column: f } = a;
2038
2038
  for (let p = 0; p < n.length; p++) {
2039
2039
  const v = n[p], { startRow: I, endRow: S, startColumn: R, endColumn: _ } = v;
2040
- if (qn.intersects(
2040
+ if (Zn.intersects(
2041
2041
  {
2042
2042
  startRow: I,
2043
2043
  endRow: S,
@@ -2074,7 +2074,7 @@ pt = Qi([
2074
2074
  te(5, U(Je)),
2075
2075
  te(6, z),
2076
2076
  te(7, q),
2077
- te(8, fe)
2077
+ te(8, pe)
2078
2078
  ], pt);
2079
2079
  var J = function() {
2080
2080
  return J = Object.assign || function(i) {
@@ -2091,13 +2091,13 @@ var J = function() {
2091
2091
  for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
2092
2092
  e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
2093
2093
  return n;
2094
- }, Rn = mn(function(i, e) {
2095
- var n = i.icon, t = i.id, r = i.className, s = i.extend, o = ns(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = ai("_".concat(ss()));
2096
- return Mn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
2094
+ }, Mn = fn(function(i, e) {
2095
+ var n = i.icon, t = i.id, r = i.className, s = i.extend, o = ns(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = ci("_".concat(ss()));
2096
+ return Dn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
2097
2097
  });
2098
- function Mn(i, e, n, t, r) {
2099
- return fn(i.tag, J(J({ key: e }, rs(i, n, r)), t), (is(i, n).children || []).map(function(s, o) {
2100
- return Mn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
2098
+ function Dn(i, e, n, t, r) {
2099
+ return pn(i.tag, J(J({ key: e }, rs(i, n, r)), t), (is(i, n).children || []).map(function(s, o) {
2100
+ return Dn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
2101
2101
  }));
2102
2102
  }
2103
2103
  function rs(i, e, n) {
@@ -2118,16 +2118,16 @@ function is(i, e) {
2118
2118
  function ss() {
2119
2119
  return Math.random().toString(36).substring(2, 8);
2120
2120
  }
2121
- Rn.displayName = "UniverIcon";
2122
- var os = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Dn = mn(function(i, e) {
2123
- return fn(Rn, Object.assign({}, i, {
2121
+ Mn.displayName = "UniverIcon";
2122
+ var os = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, bn = fn(function(i, e) {
2123
+ return pn(Mn, Object.assign({}, i, {
2124
2124
  id: "add-image-single",
2125
2125
  ref: e,
2126
2126
  icon: os
2127
2127
  }));
2128
2128
  });
2129
- Dn.displayName = "AddImageSingle";
2130
- const bn = {
2129
+ bn.displayName = "AddImageSingle";
2130
+ const yn = {
2131
2131
  id: "sheet.command.delete-drawing",
2132
2132
  type: Y.COMMAND,
2133
2133
  handler: (i) => {
@@ -2185,15 +2185,15 @@ const bn = {
2185
2185
  drawings: l
2186
2186
  }) ? (n.syncExecuteCommand(W.id, [d]), !0) : !1;
2187
2187
  }
2188
- }, yn = "addition-and-subtraction-single", On = "sheet.menu.image";
2188
+ }, On = "addition-and-subtraction-single", Tn = "sheet.menu.image";
2189
2189
  function as(i) {
2190
2190
  return {
2191
- id: On,
2191
+ id: Tn,
2192
2192
  type: wt.SUBITEMS,
2193
- icon: yn,
2193
+ icon: On,
2194
2194
  tooltip: "sheetImage.title",
2195
- hidden$: Ht(i, G.UNIVER_SHEET),
2196
- disabled$: Ur(i, { workbookTypes: [lt], worksheetTypes: [xe], rangeTypes: [si] })
2195
+ hidden$: Yt(i, G.UNIVER_SHEET),
2196
+ disabled$: Ar(i, { workbookTypes: [lt], worksheetTypes: [xe], rangeTypes: [oi] })
2197
2197
  };
2198
2198
  }
2199
2199
  function cs(i) {
@@ -2201,7 +2201,7 @@ function cs(i) {
2201
2201
  id: vt.id,
2202
2202
  title: "sheetImage.upload.float",
2203
2203
  type: wt.BUTTON,
2204
- hidden$: Ht(i, G.UNIVER_SHEET)
2204
+ hidden$: Yt(i, G.UNIVER_SHEET)
2205
2205
  };
2206
2206
  }
2207
2207
  function ds(i) {
@@ -2228,17 +2228,17 @@ const ls = "univer-image-common-panel", us = "univer-image-common-panel-grid", h
2228
2228
  sheetImageMenu: Rs,
2229
2229
  sheetImageMenuInput: Ms
2230
2230
  };
2231
- function Tn(i) {
2231
+ function En(i) {
2232
2232
  var e, n, t = "";
2233
2233
  if (typeof i == "string" || typeof i == "number") t += i;
2234
2234
  else if (typeof i == "object") if (Array.isArray(i)) {
2235
2235
  var r = i.length;
2236
- for (e = 0; e < r; e++) i[e] && (n = Tn(i[e])) && (t && (t += " "), t += n);
2236
+ for (e = 0; e < r; e++) i[e] && (n = En(i[e])) && (t && (t += " "), t += n);
2237
2237
  } else for (n in i) i[n] && (t && (t += " "), t += n);
2238
2238
  return t;
2239
2239
  }
2240
2240
  function je() {
2241
- for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = Tn(i)) && (t && (t += " "), t += e);
2241
+ for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = En(i)) && (t && (t += " "), t += e);
2242
2242
  return t;
2243
2243
  }
2244
2244
  const Ds = (i) => {
@@ -2304,7 +2304,7 @@ const Ds = (i) => {
2304
2304
  const I = (R) => R ? "block" : "none";
2305
2305
  return /* @__PURE__ */ $.jsxs("div", { className: je(ne.imageCommonPanelGrid, ne.imageCommonPanelBorder), style: { display: I(a) }, children: [
2306
2306
  /* @__PURE__ */ $.jsx("div", { className: ne.imageCommonPanelRow, children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn, ne.imageCommonPanelTitle), children: /* @__PURE__ */ $.jsx("div", { children: n.t("drawing-anchor.title") }) }) }),
2307
- /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(li, { value: m, onChange: v, direction: "vertical", children: [
2307
+ /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(ui, { value: m, onChange: v, direction: "vertical", children: [
2308
2308
  /* @__PURE__ */ $.jsx(st, { value: y.Both, children: n.t("drawing-anchor.both") }),
2309
2309
  /* @__PURE__ */ $.jsx(st, { value: y.Position, children: n.t("drawing-anchor.position") }),
2310
2310
  /* @__PURE__ */ $.jsx(st, { value: y.None, children: n.t("drawing-anchor.none") })
@@ -2320,12 +2320,12 @@ const Ds = (i) => {
2320
2320
  r.unsubscribe();
2321
2321
  };
2322
2322
  }, []), !!(n != null && n.length) && /* @__PURE__ */ $.jsxs("div", { className: ne.imageCommonPanel, children: [
2323
- /* @__PURE__ */ $.jsx(wr, { drawings: n }),
2323
+ /* @__PURE__ */ $.jsx(_r, { drawings: n }),
2324
2324
  /* @__PURE__ */ $.jsx(Ds, { drawings: n })
2325
2325
  ] });
2326
2326
  }, ys = {
2327
- [Br.FORMULAS_INSERT]: {
2328
- [On]: {
2327
+ [Lr.FORMULAS_INSERT]: {
2328
+ [Tn]: {
2329
2329
  order: 3,
2330
2330
  menuItemFactory: as,
2331
2331
  [vt.id]: {
@@ -2340,13 +2340,13 @@ const Ds = (i) => {
2340
2340
  }
2341
2341
  };
2342
2342
  function Re(i) {
2343
- return !i.getContextValue(Zn) && !i.getContextValue(Qn) && !i.getContextValue(er) && i.getContextValue(he);
2343
+ return !i.getContextValue(Qn) && !i.getContextValue(er) && !i.getContextValue(tr) && i.getContextValue(ge);
2344
2344
  }
2345
2345
  const Os = {
2346
2346
  id: Ce.id,
2347
2347
  description: "shortcut.sheet.drawing-move-down",
2348
2348
  group: "4_sheet-drawing-view",
2349
- binding: ge.ARROW_DOWN,
2349
+ binding: me.ARROW_DOWN,
2350
2350
  priority: 100,
2351
2351
  preconditions: Re,
2352
2352
  staticParameters: {
@@ -2356,7 +2356,7 @@ const Os = {
2356
2356
  id: Ce.id,
2357
2357
  description: "shortcut.sheet.drawing-move-up",
2358
2358
  group: "4_sheet-drawing-view",
2359
- binding: ge.ARROW_UP,
2359
+ binding: me.ARROW_UP,
2360
2360
  priority: 100,
2361
2361
  preconditions: Re,
2362
2362
  staticParameters: {
@@ -2366,7 +2366,7 @@ const Os = {
2366
2366
  id: Ce.id,
2367
2367
  description: "shortcut.sheet.drawing-move-left",
2368
2368
  group: "4_sheet-drawing-view",
2369
- binding: ge.ARROW_LEFT,
2369
+ binding: me.ARROW_LEFT,
2370
2370
  priority: 100,
2371
2371
  preconditions: Re,
2372
2372
  staticParameters: {
@@ -2376,20 +2376,20 @@ const Os = {
2376
2376
  id: Ce.id,
2377
2377
  description: "shortcut.sheet.drawing-move-right",
2378
2378
  group: "4_sheet-drawing-view",
2379
- binding: ge.ARROW_RIGHT,
2379
+ binding: me.ARROW_RIGHT,
2380
2380
  priority: 100,
2381
2381
  preconditions: Re,
2382
2382
  staticParameters: {
2383
2383
  direction: re.RIGHT
2384
2384
  }
2385
2385
  }, Us = {
2386
- id: bn.id,
2386
+ id: yn.id,
2387
2387
  description: "shortcut.sheet.drawing-delete",
2388
2388
  group: "4_sheet-drawing-view",
2389
2389
  // when focusing on any other input tag do not trigger this shortcut
2390
2390
  preconditions: Re,
2391
- binding: ge.DELETE,
2392
- mac: ge.BACKSPACE
2391
+ binding: me.DELETE,
2392
+ mac: me.BACKSPACE
2393
2393
  };
2394
2394
  var As = Object.defineProperty, Ns = Object.getOwnPropertyDescriptor, js = (i, e, n, t) => {
2395
2395
  for (var r = t > 1 ? void 0 : t ? Ns(e, n) : e, s = i.length - 1, o; s >= 0; s--)
@@ -2402,7 +2402,7 @@ let Ye = class extends Z {
2402
2402
  }
2403
2403
  _initCustomComponents() {
2404
2404
  const i = this._componentManager;
2405
- this.disposeWithMe(i.register(yn, Dn)), this.disposeWithMe(i.register(pn, bs));
2405
+ this.disposeWithMe(i.register(On, bn)), this.disposeWithMe(i.register(wn, bs));
2406
2406
  }
2407
2407
  _initMenus() {
2408
2408
  this._menuManagerService.mergeMenu(ys);
@@ -2414,14 +2414,14 @@ let Ye = class extends Z {
2414
2414
  Ze,
2415
2415
  qe,
2416
2416
  Qe,
2417
- wn,
2418
- W,
2419
2417
  _n,
2418
+ W,
2420
2419
  vn,
2421
- In,
2420
+ Sn,
2421
+ Cn,
2422
2422
  Ce,
2423
- bn,
2424
- Sn
2423
+ yn,
2424
+ In
2425
2425
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
2426
2426
  }
2427
2427
  _initShortcuts() {
@@ -2441,10 +2441,10 @@ let Ye = class extends Z {
2441
2441
  }
2442
2442
  };
2443
2443
  Ye = js([
2444
- We(0, U(Lr)),
2445
- We(1, Gr),
2444
+ We(0, U(Gr)),
2445
+ We(1, Fr),
2446
2446
  We(2, F),
2447
- We(3, Fr)
2447
+ We(3, Vr)
2448
2448
  ], Ye);
2449
2449
  var Ws = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, $s = (i, e, n, t) => {
2450
2450
  for (var r = t > 1 ? void 0 : t ? xs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
@@ -2452,7 +2452,7 @@ var Ws = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, $s = (i, e
2452
2452
  return t && r && Ws(e, n, r), r;
2453
2453
  }, ce = (i, e) => (n, t) => e(n, t, i);
2454
2454
  function Bs(i, e, n, t) {
2455
- const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Vt.VIEW_MAIN), d = {
2455
+ const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(kt.VIEW_MAIN), d = {
2456
2456
  left: !0,
2457
2457
  top: !0
2458
2458
  };
@@ -2518,7 +2518,7 @@ let Xe = class extends Z {
2518
2518
  this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = d, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
2519
2519
  }
2520
2520
  _bindScrollEvent() {
2521
- this._lifecycleService.lifecycle$.pipe(ie((e) => e === nr.Rendered), kr(1)).subscribe(() => {
2521
+ this._lifecycleService.lifecycle$.pipe(ie((e) => e === rr.Rendered), Hr(1)).subscribe(() => {
2522
2522
  this._scrollUpdateListener();
2523
2523
  });
2524
2524
  }
@@ -2590,8 +2590,8 @@ let Xe = class extends Z {
2590
2590
  D.fill = L, D.rotateEnabled = !1, u && u.border && (D.stroke = u.border), D.paintFirst = "stroke", D.strokeWidth = 1, D.borderEnabled = !1, D.radius = 8;
2591
2591
  }
2592
2592
  const P = new Pt(N, D);
2593
- M && P.setObjectType(Ir.CHART), f.addObject(P, Cr), d.allowTransform !== !1 && f.attachTransformerTo(P);
2594
- const x = this._ensureMap(t, r), ee = new rr(), Un = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new Hr(Un), An = {
2593
+ M && P.setObjectType(Cr.CHART), f.addObject(P, Rr), d.allowTransform !== !1 && f.attachTransformerTo(P);
2594
+ const x = this._ensureMap(t, r), ee = new ir(), An = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new Yr(An), Nn = {
2595
2595
  dispose: ee,
2596
2596
  rect: P,
2597
2597
  position$: et,
@@ -2626,7 +2626,7 @@ let Xe = class extends Z {
2626
2626
  });
2627
2627
  ee.add(() => {
2628
2628
  this._canvasFloatDomService.removeFloatDom(s);
2629
- }), It && ee.add(It), this._domLayerInfoMap.set(s, An), x.set(s, {
2629
+ }), It && ee.add(It), this._domLayerInfoMap.set(s, Nn), x.set(s, {
2630
2630
  ...x.get(s)
2631
2631
  });
2632
2632
  });
@@ -2666,19 +2666,19 @@ let Xe = class extends Z {
2666
2666
  }),
2667
2667
  ie((n) => !!n),
2668
2668
  Nt(
2669
- (n) => ir(n.render.scene.getViewport(Vt.VIEW_MAIN).onScrollAfter$).pipe($e(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2669
+ (n) => sr(n.render.scene.getViewport(kt.VIEW_MAIN).onScrollAfter$).pipe($e(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2670
2670
  )
2671
2671
  ).subscribe(({ unitId: n, subUnitId: t }) => {
2672
2672
  e(n, t);
2673
2673
  })
2674
2674
  ), this.disposeWithMe(this._commandService.onCommandExecuted((n) => {
2675
2675
  var t, r;
2676
- if (n.id === Ar.id) {
2676
+ if (n.id === Nr.id) {
2677
2677
  const s = n.params, { unitId: o } = s;
2678
2678
  Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((l) => {
2679
2679
  e(o, l);
2680
2680
  });
2681
- } else if (n.id === oi.id) {
2681
+ } else if (n.id === ai.id) {
2682
2682
  const { unitId: s, subUnitId: o } = n.params;
2683
2683
  e(s, o);
2684
2684
  }
@@ -2749,7 +2749,7 @@ let Xe = class extends Z {
2749
2749
  });
2750
2750
  if (!t)
2751
2751
  throw new Error("cannot find current target!");
2752
- const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : sr(), a = this._getPosition(o, r);
2752
+ const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : or(), a = this._getPosition(o, r);
2753
2753
  if (a == null)
2754
2754
  return;
2755
2755
  this._ensureMap(r, s).set(c, e);
@@ -2806,27 +2806,30 @@ let Xe = class extends Z {
2806
2806
  };
2807
2807
  Xe = $s([
2808
2808
  ce(0, U(X)),
2809
- ce(1, fe),
2809
+ ce(1, pe),
2810
2810
  ce(2, U(F)),
2811
2811
  ce(3, q),
2812
- ce(4, U(Vr)),
2812
+ ce(4, U(kr)),
2813
2813
  ce(5, z),
2814
- ce(6, U(tr))
2814
+ ce(6, U(nr))
2815
2815
  ], Xe);
2816
- var En = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Gs = (i, e, n) => e in i ? En(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Fs = (i, e, n, t) => {
2816
+ var Pn = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Gs = (i, e, n) => e in i ? Pn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Fs = (i, e, n, t) => {
2817
2817
  for (var r = t > 1 ? void 0 : t ? Ls(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2818
2818
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2819
- return t && r && En(e, n, r), r;
2820
- }, dt = (i, e) => (n, t) => e(n, t, i), Pn = (i, e, n) => Gs(i, typeof e != "symbol" ? e + "" : e, n);
2819
+ return t && r && Pn(e, n, r), r;
2820
+ }, dt = (i, e) => (n, t) => e(n, t, i), Un = (i, e, n) => Gs(i, typeof e != "symbol" ? e + "" : e, n);
2821
2821
  const Vs = "SHEET_IMAGE_UI_PLUGIN";
2822
- let ze = class extends ar {
2823
- constructor(i = hi, e, n, t) {
2822
+ let ze = class extends cr {
2823
+ constructor(i = Wt, e, n, t) {
2824
2824
  super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
2825
- const { menu: r, ...s } = this._config;
2826
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(ui, s);
2825
+ const { menu: r, ...s } = he.deepMerge(
2826
+ Wt,
2827
+ this._config
2828
+ );
2829
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(hi, s);
2827
2830
  }
2828
2831
  onStarting() {
2829
- cr(this._injector, [
2832
+ dr(this._injector, [
2830
2833
  [Xe],
2831
2834
  [Ye],
2832
2835
  [Be],
@@ -2868,28 +2871,28 @@ let ze = class extends ar {
2868
2871
  });
2869
2872
  }
2870
2873
  };
2871
- Pn(ze, "type", G.UNIVER_SHEET);
2872
- Pn(ze, "pluginName", Vs);
2874
+ Un(ze, "type", G.UNIVER_SHEET);
2875
+ Un(ze, "pluginName", Vs);
2873
2876
  ze = Fs([
2874
- or(hr, ur, _r, Rr),
2877
+ ar(gr, hr, vr, Mr),
2875
2878
  dt(1, U(Se)),
2876
2879
  dt(2, X),
2877
- dt(3, dr)
2880
+ dt(3, lr)
2878
2881
  ], ze);
2879
2882
  export {
2880
2883
  W as ClearSheetDrawingTransformerOperation,
2881
- bn as DeleteDrawingsCommand,
2882
- _n as EditSheetDrawingOperation,
2883
- vn as GroupSheetDrawingCommand,
2884
+ yn as DeleteDrawingsCommand,
2885
+ vn as EditSheetDrawingOperation,
2886
+ Sn as GroupSheetDrawingCommand,
2884
2887
  vt as InsertFloatImageCommand,
2885
2888
  Ze as InsertSheetDrawingCommand,
2886
2889
  Ce as MoveDrawingsCommand,
2887
2890
  qe as RemoveSheetDrawingCommand,
2888
- On as SHEETS_IMAGE_MENU_ID,
2889
- Sn as SetDrawingArrangeCommand,
2891
+ Tn as SHEETS_IMAGE_MENU_ID,
2892
+ In as SetDrawingArrangeCommand,
2890
2893
  Qe as SetSheetDrawingCommand,
2891
2894
  Xe as SheetCanvasFloatDomManagerService,
2892
- wn as SidebarSheetDrawingOperation,
2893
- In as UngroupSheetDrawingCommand,
2895
+ _n as SidebarSheetDrawingOperation,
2896
+ Cn as UngroupSheetDrawingCommand,
2894
2897
  ze as UniverSheetsDrawingUIPlugin
2895
2898
  };