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

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 me, sequenceExecute as Lt, LocaleService as Ke, IUniverInstanceService as fe, useDependency as de, Inject as U, Injector as Se, IContextService as Gt, RxDisposable as xn, UniverInstanceType as G, connectInjector as $n, toDisposable as Bn, FOCUSING_COMMON_DRAWINGS as he, DrawingTypeEnum as k, Disposable as Z, ArrangeTypeEnum as Me, createDocumentModelWithStyle as Ln, ObjectRelativeFromH as Gn, ObjectRelativeFromV as Fn, BooleanNumber as Vn, PositionedObjectLayoutType as kn, WrapTextType as Hn, BuildTextUtils as Yn, Range as Xn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, DOCS_ZEN_EDITOR_UNIT_ID_KEY as be, InterceptorEffectEnum as zn, ObjectMatrix as Kn, Tools as _e, UserManagerService as Jn, IPermissionService as qn, Rectangle as Zn, Direction as re, FOCUSING_FX_BAR_EDITOR as Qn, EDITOR_ACTIVATED as er, FOCUSING_PANEL_EDITOR as tr, LifecycleService as nr, LifecycleStages as rr, DisposableCollection as ir, fromEventSubject as sr, generateRandomId as or, DependentOn as ar, Plugin as cr, merge as dr, registerDependencies as lr, touchDependencies as tt, IConfigService as ur } from "@univerjs/core";
5
+ import { DocDrawingController as hr, UniverDocsDrawingPlugin as gr } from "@univerjs/docs-drawing";
6
+ import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as mr } from "@univerjs/drawing";
7
+ import { ImageCropperObject as fr, COMPONENT_IMAGE_POPUP_MENU as pr, OpenImageCropOperation as wr, ImageResetSizeOperation as _r, DrawingRenderService as Vt, DrawingCommonPanel as vr, UniverDrawingUIPlugin as Sr } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as X, precisionTo as ye, getGroupState as Ir, transformObjectOutOfGroup as Cr, RENDER_CLASS_TYPE as ue, Rect as Pt, ObjectType as Rr, DRAWING_OBJECT_LAYER_INDEX as Mr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
9
+ import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Dr } from "@univerjs/sheets-drawing";
10
+ import { SheetCanvasPopManagerService as br, convertPositionSheetOverGridToAbsolute as yr, ISheetSelectionRenderService as Ie, SheetSkeletonManagerService as Q, attachRangeWithCoord as Ht, IEditorBridgeService as Or, IAutoFillService as Tr, HoverManagerService as Er, COPY_TYPE as Ut, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Pr, ISheetClipboardService as Ur, SheetPrintInterceptorService as Ar, getCurrentRangeDisable$ as Nr, SetZoomRatioOperation as jr } from "@univerjs/sheets-ui";
11
+ import { ISidebarService as Wr, IUIPartsService as xr, BuiltInUIPart as $r, ILocalFileService as Br, IMessageService as Lr, MenuItemType as wt, getMenuHiddenObservable as Yt, RibbonStartGroup as Gr, KeyCode as ge, ComponentManager as Fr, IMenuManagerService as Vr, IShortcutService as kr, CanvasFloatDomService as Hr } from "@univerjs/ui";
12
+ import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as Yr, BehaviorSubject as Xr, switchMap as Nt } from "rxjs";
13
+ import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Xt, SetRangeValuesCommand as zr, SetWorksheetRowHeightMutation as zt, SetWorksheetColWidthMutation as Kt, SetWorksheetRowIsAutoHeightMutation as Kr, SetWorksheetRowAutoHeightMutation as Jr, AddWorksheetMergeMutation as qr, RemoveWorksheetMergeMutation as Zr, AFTER_CELL_EDIT as Qr, INTERCEPTOR_POINT as ei, InterceptCellContentPriority as ti, WorkbookViewPermission as jt, WorksheetViewPermission as it, WorkbookEditablePermission as lt, WorksheetEditPermission as xe, InsertRowCommand as Jt, InsertColCommand as qt, RemoveRowCommand as Zt, RemoveColCommand as Qt, DeleteRangeMoveLeftCommand as en, DeleteRangeMoveUpCommand as tn, InsertRangeMoveDownCommand as nn, InsertRangeMoveRightCommand as rn, DeltaRowHeightCommand as ut, SetRowHeightCommand as ht, DeltaColumnWidthCommand as sn, SetColWidthCommand as on, SetRowHiddenCommand as an, SetSpecificRowsVisibleCommand as cn, SetSpecificColsVisibleCommand as dn, SetColHiddenCommand as ln, MoveColsCommand as un, MoveRowsCommand as hn, MoveRangeCommand as gn, SetRowVisibleMutation as ni, SetRowHiddenMutation as ri, SetColVisibleMutation as ii, SetColHiddenMutation as si, SetWorksheetActiveOperation as oi, RangeProtectionPermissionEditPoint as ai, SetFrozenMutation as ci } from "@univerjs/sheets";
14
+ import mn, { useEffect as _t, forwardRef as fn, useRef as di, createElement as pn, useState as gt } from "react";
15
+ import { docDrawingPositionToTransform as li, ReplaceSnapshotCommand as ui } from "@univerjs/docs-ui";
16
+ import { MessageType as se, RadioGroup as hi, Radio as st } from "@univerjs/design";
17
+ const gi = "sheets-drawing-ui.config", Wt = {}, W = {
18
18
  id: "sheet.operation.clear-drawing-transformer",
19
19
  type: Y.MUTATION,
20
20
  handler: (i, e) => {
@@ -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(Wr), t = i.get(Ke), r = i.get(fe), s = i.get(q);
61
61
  if (!H(r)) return !1;
62
62
  switch (e.value) {
63
63
  case "open":
64
64
  n.open({
65
65
  header: { title: t.t("sheetImage.panel.title") },
66
- children: { label: pn },
66
+ children: { label: wn },
67
67
  onClose: () => {
68
68
  s.focusDrawing(null);
69
69
  },
@@ -77,12 +77,12 @@ 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
88
  var ot = { exports: {} }, pe = {};
@@ -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;
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 };
98
+ var xt;
99
+ function mi() {
100
+ if (xt) return pe;
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);
@@ -109,19 +109,19 @@ function gi() {
109
109
  }
110
110
  return pe.Fragment = n, pe.jsx = o, pe.jsxs = o, pe;
111
111
  }
112
- var xt;
113
- function mi() {
114
- return xt || (xt = 1, ot.exports = gi()), ot.exports;
112
+ var $t;
113
+ function fi() {
114
+ return $t || ($t = 1, ot.exports = mi()), ot.exports;
115
115
  }
116
- var $ = mi();
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 = {
118
- uploadLoading: fi,
119
- uploadLoadingBody: pi,
120
- uploadLoadingBodyAnimation: wi,
121
- univerCircleAnimation: _i,
122
- uploadLoadingBodyText: vi
123
- }, Si = () => {
124
- const i = de(Gt), e = de(Ke), [n, t] = gn.useState(0);
116
+ var $ = fi();
117
+ const pi = "univer-upload-loading", wi = "univer-upload-loading-body", _i = "univer-upload-loading-body-animation", vi = "univer-UniverCircleAnimation", Si = "univer-upload-loading-body-text", Pe = {
118
+ uploadLoading: pi,
119
+ uploadLoadingBody: wi,
120
+ uploadLoadingBodyAnimation: _i,
121
+ univerCircleAnimation: vi,
122
+ uploadLoadingBodyText: Si
123
+ }, Ii = () => {
124
+ const i = de(Ft), e = de(Ke), [n, t] = mn.useState(0);
125
125
  return _t(() => {
126
126
  const r = i.change$.subscribe((s) => {
127
127
  t(s);
@@ -134,19 +134,19 @@ const fi = "univer-upload-loading", pi = "univer-upload-loading-body", wi = "uni
134
134
  /* @__PURE__ */ $.jsx("div", { className: Pe.uploadLoadingBodyText, children: `${e.t("uploadLoading.loading")}: ${n}` })
135
135
  ] }) });
136
136
  };
137
- var Ii = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Ri = (i, e, n, t) => {
138
- for (var r = t > 1 ? void 0 : t ? Ci(e, n) : e, s = i.length - 1, o; s >= 0; s--)
137
+ var Ci = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (i, e, n, t) => {
138
+ for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
139
139
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
140
- return t && r && Ii(e, n, r), r;
140
+ return t && r && Ci(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($r.CONTENT, () => $n(Ii, 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 fr)
165
165
  return !0;
166
166
  return !1;
167
167
  }
@@ -175,7 +175,7 @@ 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
180
  if (this._contextService.setContextValue(he, !0), this._hasCropObject(n))
181
181
  return;
@@ -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: pr,
200
200
  direction: "horizontal",
201
201
  offset: [2, 0],
202
202
  extraProps: {
@@ -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,34 +242,34 @@ let Be = class extends Wn {
242
242
  {
243
243
  label: "image-popup.crop",
244
244
  index: 2,
245
- commandId: fr.id,
245
+ commandId: wr.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: _r.id,
253
253
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
254
254
  disable: r === k.DRAWING_DOM
255
255
  }
256
256
  ];
257
257
  }
258
258
  };
259
- Be = Ri([
259
+ Be = Mi([
260
260
  oe(0, U(Se)),
261
261
  oe(1, q),
262
- oe(2, U(Mr)),
262
+ oe(2, U(br)),
263
263
  oe(3, X),
264
264
  oe(4, fe),
265
- oe(5, Lt),
266
- oe(6, U(jr))
265
+ oe(5, Gt),
266
+ oe(6, U(xr))
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 = yr(
273
273
  c.unitId,
274
274
  c.sheetId,
275
275
  { from: t, to: r },
@@ -317,10 +317,10 @@ function j(i, e) {
317
317
  to: m
318
318
  };
319
319
  }
320
- var Mi = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, bi = (i, e, n, t) => {
321
- for (var r = t > 1 ? void 0 : t ? Di(e, n) : e, s = i.length - 1, o; s >= 0; s--)
320
+ var Di = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, yi = (i, e, n, t) => {
321
+ for (var r = t > 1 ? void 0 : t ? bi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
322
322
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
323
- return t && r && Mi(e, n, r), r;
323
+ return t && r && Di(e, n, r), r;
324
324
  }, Ue = (i, e) => (n, t) => e(n, t, i);
325
325
  let mt = class extends Z {
326
326
  constructor(i, e, n, t, r) {
@@ -342,16 +342,16 @@ let mt = class extends Z {
342
342
  this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
343
343
  }
344
344
  };
345
- mt = bi([
345
+ mt = yi([
346
346
  Ue(1, z),
347
347
  Ue(2, q),
348
348
  Ue(3, U(Ie)),
349
349
  Ue(4, U(Q))
350
350
  ], mt);
351
- function yi(i) {
351
+ function Oi(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 = Ir(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,
@@ -377,14 +377,14 @@ function yi(i) {
377
377
  });
378
378
  }), e;
379
379
  }
380
- function Oi(i) {
380
+ function Ti(i) {
381
381
  const e = [];
382
382
  return i.forEach((n) => {
383
383
  const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d, transform: l = { width: 0, height: 0 } } = t;
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 = Cr(h || {}, l, l.width || 0, l.height || 0);
388
388
  return {
389
389
  unitId: u,
390
390
  subUnitId: m,
@@ -408,7 +408,7 @@ 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) => {
@@ -424,7 +424,7 @@ const vn = {
424
424
  return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP }) ? (t.pushUndoRedo({
425
425
  unitID: d,
426
426
  undoMutations: [
427
- { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Oi(a), type: T.UNGROUP } },
427
+ { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Ti(a), type: T.UNGROUP } },
428
428
  { id: W.id, params: s }
429
429
  ],
430
430
  redoMutations: [
@@ -441,7 +441,7 @@ const vn = {
441
441
  const n = i.get(F), t = i.get(me), 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,7 +457,7 @@ 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) => {
@@ -497,7 +497,7 @@ 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) => {
@@ -513,7 +513,7 @@ const vn = {
513
513
  return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP }) ? (t.pushUndoRedo({
514
514
  unitID: d,
515
515
  undoMutations: [
516
- { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: yi(a), type: T.GROUP } },
516
+ { id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Oi(a), type: T.GROUP } },
517
517
  { id: W.id, params: s }
518
518
  ],
519
519
  redoMutations: [
@@ -523,18 +523,18 @@ const vn = {
523
523
  }), !0) : !1;
524
524
  }
525
525
  };
526
- var Ti = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Pi = (i, e, n, t) => {
527
- for (var r = t > 1 ? void 0 : t ? Ei(e, n) : e, s = i.length - 1, o; s >= 0; s--)
526
+ var Ei = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ui = (i, e, n, t) => {
527
+ for (var r = t > 1 ? void 0 : t ? Pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
528
528
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
529
- return t && r && Ti(e, n, r), r;
529
+ return t && r && Ei(e, n, r), r;
530
530
  }, K = (i, e) => (n, t) => e(n, t, i);
531
- function Ui(i, e, n) {
531
+ function Ai(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
- const { rotatedHeight: s, rotatedWidth: o } = Ui(n, t, r), l = i.get(X).getRenderById(e.unitId);
537
+ const { rotatedHeight: s, rotatedWidth: o } = Ai(n, t, r), l = i.get(X).getRenderById(e.unitId);
538
538
  if (!l)
539
539
  return !1;
540
540
  const c = (I = l.with(Q).getWorksheetSkeleton(e.subUnitId)) == null ? void 0 : I.skeleton;
@@ -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: li(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(zr.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,11 +788,11 @@ 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() {
@@ -803,29 +803,29 @@ let ve = class extends Z {
803
803
  );
804
804
  }
805
805
  };
806
- ve = Pi([
806
+ ve = Ui([
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, Br),
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, Lr),
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
- var Ai = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, ji = (i, e, n, t) => {
821
- for (var r = t > 1 ? void 0 : t ? Ni(e, n) : e, s = i.length - 1, o; s >= 0; s--)
820
+ var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Wi = (i, e, n, t) => {
821
+ for (var r = t > 1 ? void 0 : t ? ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
822
822
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
823
- return t && r && Ai(e, n, r), r;
823
+ return t && r && Ni(e, n, r), r;
824
824
  }, ae = (i, e) => (n, t) => e(n, t, i);
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 === Kr.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 === Jr.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 === qr.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 === Zr.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 === ui.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(Qr, {
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
+ ei.CELL_CONTENT,
901
901
  {
902
- effect: Xn.Style,
903
- priority: Qr.CELL_IMAGE,
902
+ effect: zn.Style,
903
+ priority: ti.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);
@@ -910,20 +910,20 @@ let Le = class extends Z {
910
910
  );
911
911
  }
912
912
  };
913
- Le = ji([
913
+ Le = Wi([
914
914
  ae(0, F),
915
915
  ae(1, U(Je)),
916
916
  ae(2, fe),
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(hr)),
920
+ ae(6, U(Or))
921
921
  ], Le);
922
- var Wi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, $i = (i, e, n, t) => {
923
- for (var r = t > 1 ? void 0 : t ? xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
922
+ var xi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Bi = (i, e, n, t) => {
923
+ for (var r = t > 1 ? void 0 : t ? $i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
924
924
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
925
- return t && r && Wi(e, n, r), r;
926
- }, $t = (i, e) => (n, t) => e(n, t, i);
925
+ return t && r && xi(e, n, r), r;
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
  }
@@ -941,14 +941,14 @@ let Ge = class extends Z {
941
941
  );
942
942
  }
943
943
  };
944
- Ge = $i([
945
- $t(0, U(yr)),
946
- $t(1, U(Se))
944
+ Ge = Bi([
945
+ Bt(0, U(Tr)),
946
+ Bt(1, U(Se))
947
947
  ], Ge);
948
- var Bi = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, Gi = (i, e, n, t) => {
949
- for (var r = t > 1 ? void 0 : t ? Li(e, n) : e, s = i.length - 1, o; s >= 0; s--)
948
+ var Li = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
949
+ for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
950
950
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
951
- return t && r && Bi(e, n, r), r;
951
+ return t && r && Li(e, n, r), r;
952
952
  }, Ae = (i, e) => (n, t) => e(n, t, i);
953
953
  let Fe = class extends Z {
954
954
  constructor(e, n, t, r) {
@@ -961,16 +961,16 @@ let Fe = class extends Z {
961
961
  _initImageClick() {
962
962
  }
963
963
  };
964
- Fe = Gi([
965
- Ae(0, U(Or)),
964
+ Fe = Fi([
965
+ Ae(0, U(Er)),
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
- var Fi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ki = (i, e, n, t) => {
971
- for (var r = t > 1 ? void 0 : t ? Vi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
970
+ var Vi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Hi = (i, e, n, t) => {
971
+ for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
972
972
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
973
- return t && r && Fi(e, n, r), r;
973
+ return t && r && Vi(e, n, r), r;
974
974
  }, at = (i, e) => (n, t) => e(n, t, i);
975
975
  let Ve = class extends Z {
976
976
  constructor(e, n, t) {
@@ -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 } = Pr([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
1035
1035
  if (!m)
1036
1036
  return { redos: [], undos: [] };
1037
1037
  const f = m.attachRangeWithCoord({
@@ -1098,15 +1098,15 @@ let Ve = class extends Z {
1098
1098
  };
1099
1099
  }
1100
1100
  };
1101
- Ve = ki([
1102
- at(0, Er),
1101
+ Ve = Hi([
1102
+ at(0, Ur),
1103
1103
  at(1, X),
1104
1104
  at(2, z)
1105
1105
  ], Ve);
1106
- var Hi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Xi = (i, e, n, t) => {
1107
- for (var r = t > 1 ? void 0 : t ? Yi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1106
+ var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, zi = (i, e, n, t) => {
1107
+ for (var r = t > 1 ? void 0 : t ? Xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1108
1108
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1109
- return t && r && Hi(e, n, r), r;
1109
+ return t && r && Yi(e, n, r), r;
1110
1110
  }, we = (i, e) => (n, t) => e(n, t, i);
1111
1111
  let ke = class extends Z {
1112
1112
  constructor(i, e, n, t, r) {
@@ -1255,17 +1255,17 @@ let ke = class extends Z {
1255
1255
  );
1256
1256
  }
1257
1257
  };
1258
- ke = Xi([
1258
+ ke = zi([
1259
1259
  we(0, q),
1260
1260
  we(1, X),
1261
- we(2, Jn),
1261
+ we(2, qn),
1262
1262
  we(3, fe),
1263
- we(4, U(Kn))
1263
+ we(4, U(Jn))
1264
1264
  ], ke);
1265
- var zi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Ji = (i, e, n, t) => {
1266
- for (var r = t > 1 ? void 0 : t ? Ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1265
+ var Ki = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, qi = (i, e, n, t) => {
1266
+ for (var r = t > 1 ? void 0 : t ? Ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1267
1267
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1268
- return t && r && zi(e, n, r), r;
1268
+ return t && r && Ki(e, n, r), r;
1269
1269
  }, Ne = (i, e) => (n, t) => e(n, t, i);
1270
1270
  let He = class extends Z {
1271
1271
  constructor(i, e, n, t) {
@@ -1311,19 +1311,18 @@ let He = class extends Z {
1311
1311
  );
1312
1312
  }
1313
1313
  };
1314
- He = Ji([
1315
- Ne(0, U(Pr)),
1316
- Ne(1, U(Ft)),
1314
+ He = qi([
1315
+ Ne(0, U(Ar)),
1316
+ Ne(1, U(Vt)),
1317
1317
  Ne(2, q),
1318
1318
  Ne(3, X)
1319
1319
  ], He);
1320
- var qi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Qi = (i, e, n, t) => {
1321
- for (var r = t > 1 ? void 0 : t ? Zi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1320
+ var Zi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (i, e, n, t) => {
1321
+ for (var r = t > 1 ? void 0 : t ? Qi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1322
1322
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1323
- return t && r && qi(e, n, r), r;
1323
+ return t && r && Zi(e, n, r), r;
1324
1324
  }, te = (i, e) => (n, t) => e(n, t, i);
1325
- const es = [
1326
- Kt.id,
1325
+ const ts = [
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
1345
- ], ts = [
1346
- ei.id,
1347
- ti.id,
1343
+ hn.id,
1344
+ gn.id
1345
+ ], ns = [
1348
1346
  ni.id,
1349
1347
  ri.id,
1350
- Xt.id,
1351
- zt.id
1348
+ ii.id,
1349
+ si.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) {
@@ -1358,56 +1358,56 @@ let pt = class extends Z {
1358
1358
  this.disposeWithMe(
1359
1359
  this._sheetInterceptorService.interceptCommand({
1360
1360
  getMutations: (i) => {
1361
- if (!es.includes(i.id))
1361
+ if (!ts.includes(i.id))
1362
1362
  return { redos: [], undos: [] };
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 === oi.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];
@@ -2021,7 +2021,7 @@ let pt = class extends Z {
2021
2021
  _sheetRefreshListener() {
2022
2022
  this.disposeWithMe(
2023
2023
  this._commandService.onCommandExecuted((i) => {
2024
- ts.includes(i.id) && requestIdleCallback(() => {
2024
+ ns.includes(i.id) && requestIdleCallback(() => {
2025
2025
  const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
2026
2026
  this._refreshDrawingTransform(n, t, r);
2027
2027
  });
@@ -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,
@@ -2066,7 +2066,7 @@ let pt = class extends Z {
2066
2066
  }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(W.id, [i]));
2067
2067
  }
2068
2068
  };
2069
- pt = Qi([
2069
+ pt = es([
2070
2070
  te(1, X),
2071
2071
  te(2, F),
2072
2072
  te(3, Ie),
@@ -2084,23 +2084,23 @@ var J = function() {
2084
2084
  }
2085
2085
  return i;
2086
2086
  }, J.apply(this, arguments);
2087
- }, ns = function(i, e) {
2087
+ }, rs = function(i, e) {
2088
2088
  var n = {};
2089
2089
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
2090
2090
  if (i != null && typeof Object.getOwnPropertySymbols == "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 = rs(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = di("_".concat(os()));
2096
+ return Dn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
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 }, is(i, n, r)), t), (ss(i, n).children || []).map(function(s, o) {
2100
+ return Dn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
2101
2101
  }));
2102
2102
  }
2103
- function rs(i, e, n) {
2103
+ function is(i, e, n) {
2104
2104
  var t = J({}, i.attrs);
2105
2105
  n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
2106
2106
  var r = e.defIds;
@@ -2109,25 +2109,25 @@ function rs(i, e, n) {
2109
2109
  typeof d == "string" && (t[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
2110
2110
  })), t;
2111
2111
  }
2112
- function is(i, e) {
2112
+ function ss(i, e) {
2113
2113
  var n, t = e.defIds;
2114
2114
  return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? J(J({}, i), { children: i.children.map(function(r) {
2115
2115
  return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? J(J({}, r), { attrs: J(J({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
2116
2116
  }) }) : i;
2117
2117
  }
2118
- function ss() {
2118
+ function os() {
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 as = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, bn = fn(function(i, e) {
2123
+ return pn(Mn, Object.assign({}, i, {
2124
2124
  id: "add-image-single",
2125
2125
  ref: e,
2126
- icon: os
2126
+ icon: as
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,63 +2185,63 @@ 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";
2189
- function as(i) {
2188
+ }, On = "addition-and-subtraction-single", Tn = "sheet.menu.image";
2189
+ function cs(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$: Nr(i, { workbookTypes: [lt], worksheetTypes: [xe], rangeTypes: [ai] })
2197
2197
  };
2198
2198
  }
2199
- function cs(i) {
2199
+ function ds(i) {
2200
2200
  return {
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
- function ds(i) {
2207
+ function ls(i) {
2208
2208
  return {
2209
2209
  id: St.id,
2210
2210
  title: "sheetImage.upload.cell",
2211
2211
  type: wt.BUTTON
2212
2212
  };
2213
2213
  }
2214
- const ls = "univer-image-common-panel", us = "univer-image-common-panel-grid", hs = "univer-image-common-panel-border", gs = "univer-image-common-panel-title", ms = "univer-image-common-panel-subtitle", fs = "univer-image-common-panel-row", ps = "univer-image-common-panel-row-vertical", ws = "univer-image-common-panel-column", _s = "univer-image-common-panel-column-center", vs = "univer-image-common-panel-inline", Ss = "univer-image-common-panel-span2", Is = "univer-image-common-panel-span3", Cs = "univer-image-common-panel-input", Rs = "univer-sheet-image-menu", Ms = "univer-sheet-image-menu-input", ne = {
2215
- imageCommonPanel: ls,
2216
- imageCommonPanelGrid: us,
2217
- imageCommonPanelBorder: hs,
2218
- imageCommonPanelTitle: gs,
2219
- imageCommonPanelSubtitle: ms,
2220
- imageCommonPanelRow: fs,
2221
- imageCommonPanelRowVertical: ps,
2222
- imageCommonPanelColumn: ws,
2223
- imageCommonPanelColumnCenter: _s,
2224
- imageCommonPanelInline: vs,
2225
- imageCommonPanelSpan2: Ss,
2226
- imageCommonPanelSpan3: Is,
2227
- imageCommonPanelInput: Cs,
2228
- sheetImageMenu: Rs,
2229
- sheetImageMenuInput: Ms
2214
+ const us = "univer-image-common-panel", hs = "univer-image-common-panel-grid", gs = "univer-image-common-panel-border", ms = "univer-image-common-panel-title", fs = "univer-image-common-panel-subtitle", ps = "univer-image-common-panel-row", ws = "univer-image-common-panel-row-vertical", _s = "univer-image-common-panel-column", vs = "univer-image-common-panel-column-center", Ss = "univer-image-common-panel-inline", Is = "univer-image-common-panel-span2", Cs = "univer-image-common-panel-span3", Rs = "univer-image-common-panel-input", Ms = "univer-sheet-image-menu", Ds = "univer-sheet-image-menu-input", ne = {
2215
+ imageCommonPanel: us,
2216
+ imageCommonPanelGrid: hs,
2217
+ imageCommonPanelBorder: gs,
2218
+ imageCommonPanelTitle: ms,
2219
+ imageCommonPanelSubtitle: fs,
2220
+ imageCommonPanelRow: ps,
2221
+ imageCommonPanelRowVertical: ws,
2222
+ imageCommonPanelColumn: _s,
2223
+ imageCommonPanelColumnCenter: vs,
2224
+ imageCommonPanelInline: Ss,
2225
+ imageCommonPanelSpan2: Is,
2226
+ imageCommonPanelSpan3: Cs,
2227
+ imageCommonPanelInput: Rs,
2228
+ sheetImageMenu: Ms,
2229
+ sheetImageMenuInput: Ds
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
- const Ds = (i) => {
2244
+ const bs = (i) => {
2245
2245
  var S;
2246
2246
  const e = de(F), n = de(Ke), t = de(q), r = de(X), { drawings: s } = i, o = s[0];
2247
2247
  if (o == null)
@@ -2304,13 +2304,13 @@ 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(hi, { 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") })
2311
2311
  ] }) }) })
2312
2312
  ] });
2313
- }, bs = () => {
2313
+ }, ys = () => {
2314
2314
  const i = de(q), e = i.getFocusDrawings(), [n, t] = gt(e);
2315
2315
  return _t(() => {
2316
2316
  const r = i.focus$.subscribe((s) => {
@@ -2320,29 +2320,29 @@ 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 }),
2324
- /* @__PURE__ */ $.jsx(Ds, { drawings: n })
2323
+ /* @__PURE__ */ $.jsx(vr, { drawings: n }),
2324
+ /* @__PURE__ */ $.jsx(bs, { drawings: n })
2325
2325
  ] });
2326
- }, ys = {
2327
- [Br.FORMULAS_INSERT]: {
2328
- [On]: {
2326
+ }, Os = {
2327
+ [Gr.FORMULAS_INSERT]: {
2328
+ [Tn]: {
2329
2329
  order: 3,
2330
- menuItemFactory: as,
2330
+ menuItemFactory: cs,
2331
2331
  [vt.id]: {
2332
2332
  order: 0,
2333
- menuItemFactory: cs
2333
+ menuItemFactory: ds
2334
2334
  },
2335
2335
  [St.id]: {
2336
2336
  order: 1,
2337
- menuItemFactory: ds
2337
+ menuItemFactory: ls
2338
2338
  }
2339
2339
  }
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(he);
2344
2344
  }
2345
- const Os = {
2345
+ const Ts = {
2346
2346
  id: Ce.id,
2347
2347
  description: "shortcut.sheet.drawing-move-down",
2348
2348
  group: "4_sheet-drawing-view",
@@ -2352,7 +2352,7 @@ const Os = {
2352
2352
  staticParameters: {
2353
2353
  direction: re.DOWN
2354
2354
  }
2355
- }, Ts = {
2355
+ }, Es = {
2356
2356
  id: Ce.id,
2357
2357
  description: "shortcut.sheet.drawing-move-up",
2358
2358
  group: "4_sheet-drawing-view",
@@ -2362,7 +2362,7 @@ const Os = {
2362
2362
  staticParameters: {
2363
2363
  direction: re.UP
2364
2364
  }
2365
- }, Es = {
2365
+ }, Ps = {
2366
2366
  id: Ce.id,
2367
2367
  description: "shortcut.sheet.drawing-move-left",
2368
2368
  group: "4_sheet-drawing-view",
@@ -2372,7 +2372,7 @@ const Os = {
2372
2372
  staticParameters: {
2373
2373
  direction: re.LEFT
2374
2374
  }
2375
- }, Ps = {
2375
+ }, Us = {
2376
2376
  id: Ce.id,
2377
2377
  description: "shortcut.sheet.drawing-move-right",
2378
2378
  group: "4_sheet-drawing-view",
@@ -2382,8 +2382,8 @@ const Os = {
2382
2382
  staticParameters: {
2383
2383
  direction: re.RIGHT
2384
2384
  }
2385
- }, Us = {
2386
- id: bn.id,
2385
+ }, As = {
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
@@ -2391,10 +2391,10 @@ const Os = {
2391
2391
  binding: ge.DELETE,
2392
2392
  mac: ge.BACKSPACE
2393
2393
  };
2394
- var As = Object.defineProperty, Ns = Object.getOwnPropertyDescriptor, js = (i, e, n, t) => {
2395
- for (var r = t > 1 ? void 0 : t ? Ns(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2394
+ var Ns = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ws = (i, e, n, t) => {
2395
+ for (var r = t > 1 ? void 0 : t ? js(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2396
2396
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2397
- return t && r && As(e, n, r), r;
2397
+ return t && r && Ns(e, n, r), r;
2398
2398
  }, We = (i, e) => (n, t) => e(n, t, i);
2399
2399
  let Ye = class extends Z {
2400
2400
  constructor(i, e, n, t) {
@@ -2402,10 +2402,10 @@ 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, ys));
2406
2406
  }
2407
2407
  _initMenus() {
2408
- this._menuManagerService.mergeMenu(ys);
2408
+ this._menuManagerService.mergeMenu(Os);
2409
2409
  }
2410
2410
  _initCommands() {
2411
2411
  [
@@ -2414,24 +2414,24 @@ 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() {
2428
2428
  [
2429
2429
  // sheet drawing shortcuts
2430
- Os,
2431
2430
  Ts,
2432
2431
  Es,
2433
2432
  Ps,
2434
- Us
2433
+ Us,
2434
+ As
2435
2435
  ].forEach((i) => {
2436
2436
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
2437
2437
  });
@@ -2440,19 +2440,19 @@ let Ye = class extends Z {
2440
2440
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
2441
2441
  }
2442
2442
  };
2443
- Ye = js([
2444
- We(0, U(Lr)),
2445
- We(1, Gr),
2443
+ Ye = Ws([
2444
+ We(0, U(Fr)),
2445
+ We(1, Vr),
2446
2446
  We(2, F),
2447
- We(3, Fr)
2447
+ We(3, kr)
2448
2448
  ], Ye);
2449
- var Ws = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, $s = (i, e, n, t) => {
2450
- for (var r = t > 1 ? void 0 : t ? xs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2449
+ var xs = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Bs = (i, e, n, t) => {
2450
+ for (var r = t > 1 ? void 0 : t ? $s(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2451
2451
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2452
- return t && r && Ws(e, n, r), r;
2452
+ return t && r && xs(e, n, r), r;
2453
2453
  }, ce = (i, e) => (n, t) => e(n, t, i);
2454
- function Bs(i, e, n, t) {
2455
- const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Vt.VIEW_MAIN), d = {
2454
+ function Ls(i, e, n, t) {
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
  };
@@ -2491,7 +2491,7 @@ const ct = (i, e, n, t) => {
2491
2491
  right: s + d,
2492
2492
  top: o,
2493
2493
  bottom: o + l
2494
- }, a = Bs(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2494
+ }, a = Ls(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2495
2495
  return {
2496
2496
  startX: a.left,
2497
2497
  endX: a.right,
@@ -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), Yr(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(Rr.CHART), f.addObject(P, Mr), d.allowTransform !== !1 && f.attachTransformerTo(P);
2594
+ const x = this._ensureMap(t, r), ee = new ir(), An = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new Xr(An), Nn = {
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 === jr.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 === ci.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);
@@ -2804,29 +2804,33 @@ let Xe = class extends Z {
2804
2804
  };
2805
2805
  }
2806
2806
  };
2807
- Xe = $s([
2807
+ Xe = Bs([
2808
2808
  ce(0, U(X)),
2809
2809
  ce(1, fe),
2810
2810
  ce(2, U(F)),
2811
2811
  ce(3, q),
2812
- ce(4, U(Vr)),
2812
+ ce(4, U(Hr)),
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) => {
2817
- for (var r = t > 1 ? void 0 : t ? Ls(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2816
+ var Pn = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, Fs = (i, e, n) => e in i ? Pn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Vs = (i, e, n, t) => {
2817
+ for (var r = t > 1 ? void 0 : t ? Gs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
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);
2821
- const Vs = "SHEET_IMAGE_UI_PLUGIN";
2822
- let ze = class extends ar {
2823
- constructor(i = hi, e, n, t) {
2819
+ return t && r && Pn(e, n, r), r;
2820
+ }, dt = (i, e) => (n, t) => e(n, t, i), Un = (i, e, n) => Fs(i, typeof e != "symbol" ? e + "" : e, n);
2821
+ const ks = "SHEET_IMAGE_UI_PLUGIN";
2822
+ let ze = class extends cr {
2823
+ constructor(i = Wt, e, n, t) {
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 } = dr(
2826
+ {},
2827
+ Wt,
2828
+ this._config
2829
+ );
2830
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(gi, s);
2827
2831
  }
2828
2832
  onStarting() {
2829
- cr(this._injector, [
2833
+ lr(this._injector, [
2830
2834
  [Xe],
2831
2835
  [Ye],
2832
2836
  [Be],
@@ -2868,28 +2872,28 @@ let ze = class extends ar {
2868
2872
  });
2869
2873
  }
2870
2874
  };
2871
- Pn(ze, "type", G.UNIVER_SHEET);
2872
- Pn(ze, "pluginName", Vs);
2873
- ze = Fs([
2874
- or(hr, ur, _r, Rr),
2875
+ Un(ze, "type", G.UNIVER_SHEET);
2876
+ Un(ze, "pluginName", ks);
2877
+ ze = Vs([
2878
+ ar(mr, gr, Sr, Dr),
2875
2879
  dt(1, U(Se)),
2876
2880
  dt(2, X),
2877
- dt(3, dr)
2881
+ dt(3, ur)
2878
2882
  ], ze);
2879
2883
  export {
2880
2884
  W as ClearSheetDrawingTransformerOperation,
2881
- bn as DeleteDrawingsCommand,
2882
- _n as EditSheetDrawingOperation,
2883
- vn as GroupSheetDrawingCommand,
2885
+ yn as DeleteDrawingsCommand,
2886
+ vn as EditSheetDrawingOperation,
2887
+ Sn as GroupSheetDrawingCommand,
2884
2888
  vt as InsertFloatImageCommand,
2885
2889
  Ze as InsertSheetDrawingCommand,
2886
2890
  Ce as MoveDrawingsCommand,
2887
2891
  qe as RemoveSheetDrawingCommand,
2888
- On as SHEETS_IMAGE_MENU_ID,
2889
- Sn as SetDrawingArrangeCommand,
2892
+ Tn as SHEETS_IMAGE_MENU_ID,
2893
+ In as SetDrawingArrangeCommand,
2890
2894
  Qe as SetSheetDrawingCommand,
2891
2895
  Xe as SheetCanvasFloatDomManagerService,
2892
- wn as SidebarSheetDrawingOperation,
2893
- In as UngroupSheetDrawingCommand,
2896
+ _n as SidebarSheetDrawingOperation,
2897
+ Cn as UngroupSheetDrawingCommand,
2894
2898
  ze as UniverSheetsDrawingUIPlugin
2895
2899
  };