@univerjs/sheets-hyper-link-ui 0.1.13 → 0.1.14

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,26 +1,26 @@
1
- var Kt = Object.defineProperty;
2
- var Yt = (t, e, n) => e in t ? Kt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var O = (t, e, n) => (Yt(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { Disposable as T, UniverInstanceType as E, OnLifecycle as U, LifecycleStages as j, IUniverInstanceService as F, isValidRange as Pe, LocaleService as de, Rectangle as oe, ICommandService as W, toDisposable as Gt, BooleanNumber as Xt, ThemeService as qt, createInternalEditorID as Jt, DEFAULT_EMPTY_DOCUMENT_VALUE as Qt, Tools as ae, CommandType as Ue, CellValueType as ot, ObjectMatrix as yt, Range as Xe } from "@univerjs/core";
5
- import { RemoveSheetCommand as en, SheetInterceptorService as qe, SetSelectionsOperation as tn, NORMAL_SELECTION_PLUGIN_NAME as nn, SetWorksheetActiveOperation as Oe, RefRangeService as rn, handleDefaultRangeChangeWithEffectRefCommands as at, INTERCEPTOR_POINT as sn, getSheetCommandTarget as St, SelectionManagerService as Ct, SetRangeValuesMutation as pe, SetRangeValuesUndoMutationFactory as ct, SetRangeValuesCommand as on, ClearSelectionContentCommand as an, ClearSelectionAllCommand as cn, WorkbookEditablePermission as Je, WorksheetEditPermission as Qe, WorksheetSetCellValuePermission as et, WorksheetInsertHyperlinkPermission as tt, RangeProtectionPermissionEditPoint as nt } from "@univerjs/sheets";
6
- import { Inject as g, Injector as je } from "@wendellhu/redi";
7
- import { RemoveHyperLinkCommand as ln, AddHyperLinkCommand as rt, HyperLinkModel as H, RemoveHyperLinkMutation as M, AddHyperLinkMutation as x, UpdateHyperLinkRefMutation as lt, UpdateHyperLinkMutation as we, UpdateHyperLinkCommand as Lt, CancelHyperLinkCommand as dn, UniverSheetsHyperLinkPlugin as un } from "@univerjs/sheets-hyper-link";
8
- import { deserializeRangeWithSheet as ce, serializeRangeWithSheet as It, IDefinedNamesService as kt, serializeRange as ve, serializeRangeToRefString as pn } from "@univerjs/engine-formula";
9
- import { MessageType as ie, FormLayout as X, Input as dt, Select as Ve, Button as ut, Tooltip as Fe } from "@univerjs/design";
10
- import { ScrollToCellCommand as bt, SheetSkeletonManagerService as hn, SheetCanvasPopManagerService as gn, HoverManagerService as mn, whenSheetEditorFocused as fn, getCurrentRangeDisable$ as Rt, APPLY_TYPE as he, IAutoFillService as vn, virtualizeDiscreteRanges as Ye, getAutoFillRepeatRange as _n, COPY_TYPE as pt, rangeToDiscreteRange as yn, PREDEFINED_HOOK_NAME as We, getRepeatRange as Sn, ISheetClipboardService as Cn, SheetPermissionInterceptorBaseController as Ln } from "@univerjs/sheets-ui";
11
- import { IMessageService as Pt, useObservable as In, RangeSelector as kn, ISidebarService as Ot, KeyCode as bn, MetaKeys as Rn, MenuItemType as wt, MenuPosition as Et, getMenuHiddenObservable as Mt, MenuGroup as Pn, ComponentManager as On, IShortcutService as wn, IMenuService as En } from "@univerjs/ui";
12
- import { IRenderManagerService as Mn } from "@univerjs/engine-render";
13
- import { Subject as xn, BehaviorSubject as Tn, debounceTime as Un } from "rxjs";
14
- import jn, { forwardRef as Z, useRef as xt, createElement as z, useState as te, useEffect as Hn, useMemo as $n } from "react";
15
- import { useDependency as b, useObservable as Nn } from "@wendellhu/redi/react-bindings";
16
- import ht from "clsx";
17
- import { SPECIAL_PASTE_FORMULA as Dn } from "@univerjs/sheets-formula";
18
- var An = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, Vn = (t, e, n, i) => {
19
- for (var r = i > 1 ? void 0 : i ? Bn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
20
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
21
- return i && r && An(e, n, r), r;
22
- }, Ze = (t, e) => (n, i) => e(n, i, t);
23
- let _e = class extends T {
1
+ var Jt = Object.defineProperty;
2
+ var Qt = (t, e, n) => e in t ? Jt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var H = (t, e, n) => (Qt(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ import { Disposable as O, UniverInstanceType as M, OnLifecycle as T, LifecycleStages as U, IUniverInstanceService as J, isValidRange as Re, LocaleService as de, Rectangle as oe, ICommandService as F, toDisposable as en, BooleanNumber as tn, ThemeService as nn, createInternalEditorID as rn, DEFAULT_EMPTY_DOCUMENT_VALUE as sn, Tools as ae, CommandType as Te, CellValueType as at, ObjectMatrix as St, Range as qe, Plugin as on, DependentOn as an } from "@univerjs/core";
5
+ import { RemoveSheetCommand as cn, SheetInterceptorService as Je, SetSelectionsOperation as ln, NORMAL_SELECTION_PLUGIN_NAME as dn, SetWorksheetActiveOperation as Pe, RefRangeService as un, handleDefaultRangeChangeWithEffectRefCommands as ct, INTERCEPTOR_POINT as pn, getSheetCommandTarget as Ct, SelectionManagerService as Lt, SetRangeValuesMutation as pe, SetRangeValuesUndoMutationFactory as lt, SetRangeValuesCommand as hn, ClearSelectionContentCommand as gn, ClearSelectionAllCommand as mn, WorkbookEditablePermission as Qe, WorksheetEditPermission as et, WorksheetSetCellValuePermission as tt, WorksheetInsertHyperlinkPermission as nt, RangeProtectionPermissionEditPoint as rt } from "@univerjs/sheets";
6
+ import { Inject as g, Injector as Ue } from "@wendellhu/redi";
7
+ import { RemoveHyperLinkCommand as fn, AddHyperLinkCommand as it, HyperLinkModel as w, RemoveHyperLinkMutation as x, AddHyperLinkMutation as j, UpdateHyperLinkRefMutation as dt, UpdateHyperLinkMutation as Oe, UpdateHyperLinkCommand as It, CancelHyperLinkCommand as _n, UniverSheetsHyperLinkPlugin as vn } from "@univerjs/sheets-hyper-link";
8
+ import { deserializeRangeWithSheet as ce, serializeRangeWithSheet as kt, IDefinedNamesService as bt, serializeRange as fe, serializeRangeToRefString as yn } from "@univerjs/engine-formula";
9
+ import { MessageType as ie, FormLayout as G, Input as ut, Select as Ve, Button as pt, Tooltip as Fe } from "@univerjs/design";
10
+ import { ScrollToCellCommand as Rt, SheetSkeletonManagerService as Sn, SheetCanvasPopManagerService as Cn, HoverManagerService as Ln, whenSheetEditorFocused as In, getCurrentRangeDisable$ as Pt, APPLY_TYPE as he, IAutoFillService as kn, virtualizeDiscreteRanges as Ye, getAutoFillRepeatRange as bn, COPY_TYPE as ht, rangeToDiscreteRange as Rn, PREDEFINED_HOOK_NAME as We, getRepeatRange as Pn, ISheetClipboardService as On, SheetPermissionInterceptorBaseController as wn } from "@univerjs/sheets-ui";
11
+ import { IMessageService as Ot, useObservable as En, RangeSelector as Mn, ISidebarService as wt, KeyCode as xn, MetaKeys as jn, MenuItemType as Et, MenuPosition as Mt, getMenuHiddenObservable as xt, MenuGroup as Tn, ComponentManager as Un, IShortcutService as Hn, IMenuService as $n } from "@univerjs/ui";
12
+ import { IRenderManagerService as jt } from "@univerjs/engine-render";
13
+ import { Subject as Nn, BehaviorSubject as Dn, debounceTime as An } from "rxjs";
14
+ import Bn, { forwardRef as W, useRef as Tt, createElement as Z, useState as te, useEffect as Vn, useMemo as Fn } from "react";
15
+ import { useDependency as b, useObservable as Wn } from "@wendellhu/redi/react-bindings";
16
+ import gt from "clsx";
17
+ import { SPECIAL_PASTE_FORMULA as Zn } from "@univerjs/sheets-formula";
18
+ var zn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Yn = (t, e, n, r) => {
19
+ for (var i = r > 1 ? void 0 : r ? Kn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
20
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
21
+ return r && i && zn(e, n, i), i;
22
+ }, Ze = (t, e) => (n, r) => e(n, r, t);
23
+ let _e = class extends O {
24
24
  constructor(t, e, n) {
25
25
  super(), this._sheetInterceptorService = t, this._univerInstanceService = e, this._hyperLinkModel = n, this._initSheetChange();
26
26
  }
@@ -28,22 +28,22 @@ let _e = class extends T {
28
28
  this.disposeWithMe(
29
29
  this._sheetInterceptorService.interceptCommand({
30
30
  getMutations: (t) => {
31
- if (t.id === en.id) {
32
- const e = t.params, n = e.unitId ? this._univerInstanceService.getUnit(e.unitId) : this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
31
+ if (t.id === cn.id) {
32
+ const e = t.params, n = e.unitId ? this._univerInstanceService.getUnit(e.unitId) : this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
33
33
  if (!n)
34
34
  return { redos: [], undos: [] };
35
- const i = n.getUnitId(), r = e.subUnitId || n.getActiveSheet().getSheetId(), s = this._hyperLinkModel.getSubUnit(i, r), o = s.map((a) => ({
36
- id: ln.id,
35
+ const r = n.getUnitId(), i = e.subUnitId || n.getActiveSheet().getSheetId(), s = this._hyperLinkModel.getSubUnit(r, i), o = s.map((a) => ({
36
+ id: fn.id,
37
37
  params: {
38
- unitId: i,
39
- subUnitId: r,
38
+ unitId: r,
39
+ subUnitId: i,
40
40
  id: a.id
41
41
  }
42
42
  })), c = s.map((a) => ({
43
- id: rt.id,
43
+ id: it.id,
44
44
  params: {
45
- unitId: i,
46
- subUnitId: r,
45
+ unitId: r,
46
+ subUnitId: i,
47
47
  link: a
48
48
  }
49
49
  }));
@@ -55,46 +55,46 @@ let _e = class extends T {
55
55
  );
56
56
  }
57
57
  };
58
- _e = Vn([
59
- U(j.Ready, _e),
60
- Ze(0, g(qe)),
61
- Ze(1, F),
62
- Ze(2, g(H))
58
+ _e = Yn([
59
+ T(U.Ready, _e),
60
+ Ze(0, g(Je)),
61
+ Ze(1, J),
62
+ Ze(2, g(w))
63
63
  ], _e);
64
- const it = "SHEETS_HYPER_LINK_UI_PLUGIN", Ge = "err";
65
- var Fn = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, Zn = (t, e, n, i) => {
66
- for (var r = i > 1 ? void 0 : i ? Wn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
67
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
68
- return i && r && Fn(e, n, r), r;
69
- }, ne = (t, e) => (n, i) => e(n, i, t);
70
- function zn(t, e) {
64
+ const st = "SHEET_HYPER_LINK_UI_PLUGIN", Ge = "err";
65
+ var Gn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, qn = (t, e, n, r) => {
66
+ for (var i = r > 1 ? void 0 : r ? Xn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
67
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
68
+ return r && i && Gn(e, n, i), i;
69
+ }, ne = (t, e) => (n, r) => e(n, r, t);
70
+ function Jn(t, e) {
71
71
  const n = [];
72
- return e.forEach((i) => {
73
- oe.intersects(t, i) && n.push(i);
72
+ return e.forEach((r) => {
73
+ oe.intersects(t, r) && n.push(r);
74
74
  }), oe.realUnion(t, ...n);
75
75
  }
76
76
  let B = class {
77
- constructor(t, e, n, i, r) {
78
- this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r;
77
+ constructor(t, e, n, r, i) {
78
+ this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = r, this._localeService = i;
79
79
  }
80
80
  _getURLName(t) {
81
81
  var c;
82
- const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
83
- if (!r)
82
+ const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
83
+ if (!i)
84
84
  return null;
85
- const s = e ? r.getSheetBySheetId(e) : r.getActiveSheet(), o = (c = s == null ? void 0 : s.getName()) != null ? c : "";
85
+ const s = e ? i.getSheetBySheetId(e) : i.getActiveSheet(), o = (c = s == null ? void 0 : s.getName()) != null ? c : "";
86
86
  if (n) {
87
87
  const a = ce(n).range;
88
- return Pe(a) && n !== Ge ? {
88
+ return Re(a) && n !== Ge ? {
89
89
  type: "range",
90
- name: It(o, a)
90
+ name: kt(o, a)
91
91
  } : {
92
92
  type: "range-error",
93
93
  name: this._localeService.t("hyperLink.message.refError")
94
94
  };
95
95
  }
96
- if (i) {
97
- const a = this._definedNamesService.getValueById(r.getUnitId(), i);
96
+ if (r) {
97
+ const a = this._definedNamesService.getValueById(i.getUnitId(), r);
98
98
  return a ? {
99
99
  type: "defineName",
100
100
  name: a.formulaOrRefString
@@ -104,7 +104,7 @@ let B = class {
104
104
  };
105
105
  }
106
106
  if (e) {
107
- const a = r.getSheetBySheetId(e);
107
+ const a = i.getSheetBySheetId(e);
108
108
  return a ? {
109
109
  type: "sheet",
110
110
  name: a.getName()
@@ -116,26 +116,26 @@ let B = class {
116
116
  return null;
117
117
  }
118
118
  navigateTo(t) {
119
- const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
120
- if (!r)
119
+ const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SHEET);
120
+ if (!i)
121
121
  return;
122
- const s = r.getUnitId();
123
- if (i && this.navigateToDefineName(s, i), !!e) {
122
+ const s = i.getUnitId();
123
+ if (r && this.navigateToDefineName(s, r), !!e) {
124
124
  if (n) {
125
125
  const o = ce(n);
126
- Pe(o.range) && n !== Ge && this.navigateToRange(s, e, o.range);
126
+ Re(o.range) && n !== Ge && this.navigateToRange(s, e, o.range);
127
127
  return;
128
128
  }
129
129
  this.navigateToSheetById(s, e);
130
130
  }
131
131
  }
132
132
  parseHyperLink(t) {
133
- var e, n, i;
133
+ var e, n, r;
134
134
  if (t != null && t.startsWith("#")) {
135
- const r = new URLSearchParams(t.slice(1)), s = {
136
- gid: (e = r.get("gid")) != null ? e : "",
137
- range: (n = r.get("range")) != null ? n : "",
138
- rangeid: (i = r.get("rangeid")) != null ? i : ""
135
+ const i = new URLSearchParams(t.slice(1)), s = {
136
+ gid: (e = i.get("gid")) != null ? e : "",
137
+ range: (n = i.get("range")) != null ? n : "",
138
+ rangeid: (r = i.get("rangeid")) != null ? r : ""
139
139
  }, o = this._getURLName(s);
140
140
  return {
141
141
  type: (o == null ? void 0 : o.type) || "link",
@@ -157,57 +157,57 @@ let B = class {
157
157
  };
158
158
  }
159
159
  async navigateToRange(t, e, n) {
160
- const i = await this.navigateToSheetById(t, e);
161
- if (i) {
162
- const r = zn(n, i.getMergeData());
160
+ const r = await this.navigateToSheetById(t, e);
161
+ if (r) {
162
+ const i = Jn(n, r.getMergeData());
163
163
  await this._commandService.executeCommand(
164
- tn.id,
164
+ ln.id,
165
165
  {
166
166
  unitId: t,
167
167
  subUnitId: e,
168
- pluginName: nn,
168
+ pluginName: dn,
169
169
  selections: [{
170
- range: r
170
+ range: i
171
171
  }]
172
172
  }
173
- ), await this._commandService.executeCommand(bt.id, {
174
- range: r
173
+ ), await this._commandService.executeCommand(Rt.id, {
174
+ range: i
175
175
  });
176
176
  }
177
177
  }
178
178
  async navigateToSheet(t, e) {
179
- const n = this._univerInstanceService.getUnit(t, E.UNIVER_SHEET);
179
+ const n = this._univerInstanceService.getUnit(t, M.UNIVER_SHEET);
180
180
  if (!n)
181
181
  return !1;
182
- const i = n.getActiveSheet();
183
- if ((i == null ? void 0 : i.getName()) === e)
182
+ const r = n.getActiveSheet();
183
+ if ((r == null ? void 0 : r.getName()) === e)
184
184
  return !0;
185
- const r = n.getSheetBySheetName(e);
186
- if (!r) {
185
+ const i = n.getSheetBySheetName(e);
186
+ if (!i) {
187
187
  this._messageService.show({
188
188
  content: this._localeService.t("hyperLink.message.noSheet"),
189
189
  type: ie.Error
190
190
  });
191
191
  return;
192
192
  }
193
- const s = r.getSheetId();
193
+ const s = i.getSheetId();
194
194
  return n.getHiddenWorksheets().indexOf(s) > -1 && this._messageService.show({
195
195
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
196
196
  type: ie.Error
197
- }), await this._commandService.executeCommand(Oe.id, { unitId: t, subUnitId: s });
197
+ }), await this._commandService.executeCommand(Pe.id, { unitId: t, subUnitId: s });
198
198
  }
199
199
  async navigateToSheetById(t, e) {
200
- const n = this._univerInstanceService.getUnit(t, E.UNIVER_SHEET);
200
+ const n = this._univerInstanceService.getUnit(t, M.UNIVER_SHEET);
201
201
  if (!n)
202
202
  return !1;
203
- const i = n.getActiveSheet();
204
- if (i.getSheetId() === e)
205
- return i;
206
- const r = n.getSheetBySheetId(e);
207
- return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
203
+ const r = n.getActiveSheet();
204
+ if (r.getSheetId() === e)
205
+ return r;
206
+ const i = n.getSheetBySheetId(e);
207
+ return i ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
208
208
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
209
209
  type: ie.Error
210
- }), !1) : await this._commandService.executeCommand(Oe.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
210
+ }), !1) : await this._commandService.executeCommand(Pe.id, { unitId: t, subUnitId: e }) ? i : !1 : (this._messageService.show({
211
211
  content: this._localeService.t("hyperLink.message.noSheet"),
212
212
  type: ie.Error
213
213
  }), !1);
@@ -219,78 +219,78 @@ let B = class {
219
219
  window.open(t, "_blank", "noopener noreferrer");
220
220
  }
221
221
  };
222
- B = Zn([
223
- ne(0, F),
224
- ne(1, W),
225
- ne(2, kt),
226
- ne(3, Pt),
222
+ B = qn([
223
+ ne(0, J),
224
+ ne(1, F),
225
+ ne(2, bt),
226
+ ne(3, Ot),
227
227
  ne(4, g(de))
228
228
  ], B);
229
- var Kn = Object.defineProperty, Yn = Object.getOwnPropertyDescriptor, Gn = (t, e, n, i) => {
230
- for (var r = i > 1 ? void 0 : i ? Yn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
231
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
232
- return i && r && Kn(e, n, r), r;
233
- }, ge = (t, e) => (n, i) => e(n, i, t);
234
- let ye = class extends T {
235
- constructor(e, n, i, r) {
229
+ var Qn = Object.defineProperty, er = Object.getOwnPropertyDescriptor, tr = (t, e, n, r) => {
230
+ for (var i = r > 1 ? void 0 : r ? er(e, n) : e, s = t.length - 1, o; s >= 0; s--)
231
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
232
+ return r && i && Qn(e, n, i), i;
233
+ }, ge = (t, e) => (n, r) => e(n, r, t);
234
+ let ve = class extends O {
235
+ constructor(e, n, r, i) {
236
236
  super();
237
- O(this, "_disposableMap", /* @__PURE__ */ new Map());
238
- O(this, "_rangeDisableMap", /* @__PURE__ */ new Map());
239
- this._refRangeService = e, this._hyperLinkModel = n, this._resolverService = i, this._univerInstanceService = r, this._initData(), this._initRefRange();
237
+ H(this, "_disposableMap", /* @__PURE__ */ new Map());
238
+ H(this, "_rangeDisableMap", /* @__PURE__ */ new Map());
239
+ this._refRangeService = e, this._hyperLinkModel = n, this._resolverService = r, this._univerInstanceService = i, this._initData(), this._initRefRange();
240
240
  }
241
- _register(e, n, i) {
242
- const r = i.id, s = {
243
- startColumn: i.column,
244
- endColumn: i.column,
245
- startRow: i.row,
246
- endRow: i.row
241
+ _register(e, n, r) {
242
+ const i = r.id, s = {
243
+ startColumn: r.column,
244
+ endColumn: r.column,
245
+ startRow: r.row,
246
+ endRow: r.row
247
247
  }, o = (c) => {
248
- const a = at(s, c);
248
+ const a = ct(s, c);
249
249
  return a && a.startColumn === s.startColumn && a.startRow === s.startRow ? {
250
250
  undos: [],
251
251
  redos: []
252
252
  } : a ? {
253
253
  redos: [{
254
- id: lt.id,
254
+ id: dt.id,
255
255
  params: {
256
256
  unitId: e,
257
257
  subUnitId: n,
258
- id: i.id,
258
+ id: r.id,
259
259
  row: a.startRow,
260
260
  column: a.startColumn
261
261
  }
262
262
  }],
263
263
  undos: [{
264
- id: lt.id,
264
+ id: dt.id,
265
265
  params: {
266
266
  unitId: e,
267
267
  subUnitId: n,
268
- id: i.id,
268
+ id: r.id,
269
269
  row: s.startRow,
270
270
  column: s.startColumn
271
271
  }
272
272
  }]
273
273
  } : {
274
274
  redos: [{
275
- id: M.id,
275
+ id: x.id,
276
276
  params: {
277
277
  unitId: e,
278
278
  subUnitId: n,
279
- id: i.id
279
+ id: r.id
280
280
  }
281
281
  }],
282
282
  undos: [{
283
- id: x.id,
283
+ id: j.id,
284
284
  params: {
285
285
  unitId: e,
286
286
  subUnitId: n,
287
- link: i
287
+ link: r
288
288
  }
289
289
  }]
290
290
  };
291
291
  };
292
292
  this._disposableMap.set(
293
- r,
293
+ i,
294
294
  this._refRangeService.registerRefRange(s, o, e, n)
295
295
  );
296
296
  }
@@ -298,36 +298,36 @@ let ye = class extends T {
298
298
  const n = this._disposableMap.get(e);
299
299
  n == null || n.dispose(), this._disposableMap.delete(e);
300
300
  }
301
- _registerRange(e, n, i) {
302
- const r = this._resolverService.parseHyperLink(i);
303
- if (r.searchObj && r.searchObj.range && r.searchObj.gid) {
304
- const s = r.searchObj.gid, o = ce(r.searchObj.range).range;
305
- if (Pe(o) && r.searchObj.range !== Ge) {
301
+ _registerRange(e, n, r) {
302
+ const i = this._resolverService.parseHyperLink(r);
303
+ if (i.searchObj && i.searchObj.range && i.searchObj.gid) {
304
+ const s = i.searchObj.gid, o = ce(i.searchObj.range).range;
305
+ if (Re(o) && i.searchObj.range !== Ge) {
306
306
  const c = (a) => {
307
- const p = at(o, a);
308
- return p && ve(p) === ve(o) ? {
307
+ const p = ct(o, a);
308
+ return p && fe(p) === fe(o) ? {
309
309
  redos: [],
310
310
  undos: []
311
311
  } : {
312
312
  redos: [{
313
- id: we.id,
313
+ id: Oe.id,
314
314
  params: {
315
315
  unitId: e,
316
316
  subUnitId: s,
317
317
  id: n,
318
318
  payload: {
319
- payload: `#gid=${s}&range=${p ? ve(p) : "err"}`
319
+ payload: `#gid=${s}&range=${p ? fe(p) : "err"}`
320
320
  }
321
321
  }
322
322
  }],
323
323
  undos: [{
324
- id: we.id,
324
+ id: Oe.id,
325
325
  params: {
326
326
  unitId: e,
327
327
  subUnitId: s,
328
328
  id: n,
329
329
  payload: {
330
- payload: i
330
+ payload: r
331
331
  }
332
332
  }
333
333
  }]
@@ -343,10 +343,10 @@ let ye = class extends T {
343
343
  }
344
344
  _initData() {
345
345
  this._hyperLinkModel.getAll().forEach((n) => {
346
- n.forEach((i) => {
347
- const { unitId: r, subUnitId: s, links: o } = i;
346
+ n.forEach((r) => {
347
+ const { unitId: i, subUnitId: s, links: o } = r;
348
348
  o.forEach((c) => {
349
- this._register(r, s, c);
349
+ this._register(i, s, c);
350
350
  });
351
351
  });
352
352
  });
@@ -364,17 +364,17 @@ let ye = class extends T {
364
364
  break;
365
365
  }
366
366
  case "updateRef": {
367
- const { unitId: n, subUnitId: i, id: r } = e, s = this._hyperLinkModel.getHyperLink(n, i, r);
367
+ const { unitId: n, subUnitId: r, id: i } = e, s = this._hyperLinkModel.getHyperLink(n, r, i);
368
368
  if (!s)
369
369
  return;
370
- this._unregister(r), this._register(n, i, s);
370
+ this._unregister(i), this._register(n, r, s);
371
371
  break;
372
372
  }
373
373
  case "unload": {
374
374
  const { unitLinks: n } = e;
375
- n.forEach((i) => {
376
- const { links: r } = i;
377
- r.forEach((s) => {
375
+ n.forEach((r) => {
376
+ const { links: i } = r;
377
+ i.forEach((s) => {
378
378
  this._unregister(s.id), this._unregisterRange(s.id);
379
379
  });
380
380
  });
@@ -386,41 +386,60 @@ let ye = class extends T {
386
386
  }
387
387
  }
388
388
  })
389
- ), this.disposeWithMe(Gt(() => {
389
+ ), this.disposeWithMe(en(() => {
390
390
  this._disposableMap.forEach((e) => {
391
391
  e.dispose();
392
392
  }), this._disposableMap.clear();
393
393
  }));
394
394
  }
395
395
  };
396
- ye = Gn([
397
- U(j.Starting, ye),
398
- ge(0, g(rn)),
399
- ge(1, g(H)),
396
+ ve = tr([
397
+ T(U.Starting, ve),
398
+ ge(0, g(un)),
399
+ ge(1, g(w)),
400
400
  ge(2, g(B)),
401
- ge(3, F)
402
- ], ye);
403
- var Xn = Object.defineProperty, qn = Object.getOwnPropertyDescriptor, Jn = (t, e, n, i) => {
404
- for (var r = i > 1 ? void 0 : i ? qn(e, n) : e, s = t.length - 1, o; s >= 0; s--)
405
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
406
- return i && r && Xn(e, n, r), r;
407
- }, q = (t, e) => (n, i) => e(n, i, t);
408
- let Se = class extends T {
409
- constructor(t, e, n, i, r, s) {
410
- super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._univerInstanceService = n, this._sheetSkeletonManagerService = i, this._renderManagerService = r, this._themeService = s, this._initViewModelIntercept(), this._initSkeletonChange();
401
+ ge(3, J)
402
+ ], ve);
403
+ var nr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, Ut = (t, e, n, r) => {
404
+ for (var i = r > 1 ? void 0 : r ? rr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
405
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
406
+ return r && i && nr(e, n, i), i;
407
+ }, q = (t, e) => (n, r) => e(n, r, t);
408
+ let Xe = class extends O {
409
+ constructor(t, e, n, r) {
410
+ super(), this._context = t, this._hyperLinkModel = e, this._sheetSkeletonManagerService = n, this._renderManagerService = r, this._initSkeletonChange();
411
+ }
412
+ _initSkeletonChange() {
413
+ const t = () => {
414
+ const e = this._context.unit, n = e.getUnitId(), r = e.getActiveSheet().getSheetId(), i = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: r }), s = this._renderManagerService.getRenderById(n);
415
+ i == null || i.makeDirty(!0), i == null || i.calculate(), s && s.mainComponent.makeForceDirty();
416
+ };
417
+ this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
418
+ t();
419
+ }));
420
+ }
421
+ };
422
+ Xe = Ut([
423
+ q(1, g(w)),
424
+ q(2, g(Sn)),
425
+ q(3, jt)
426
+ ], Xe);
427
+ let ye = class extends O {
428
+ constructor(t, e, n) {
429
+ super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._themeService = n, this._initViewModelIntercept();
411
430
  }
412
431
  _initViewModelIntercept() {
413
432
  this.disposeWithMe(
414
433
  this._sheetInterceptorService.intercept(
415
- sn.CELL_CONTENT,
434
+ pn.CELL_CONTENT,
416
435
  {
417
436
  handler: (t, e, n) => {
418
- const { row: i, col: r, unitId: s, subUnitId: o } = e, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, i, r), a = this._themeService.getCurrentTheme();
437
+ const { row: r, col: i, unitId: s, subUnitId: o } = e, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, r, i), a = this._themeService.getCurrentTheme();
419
438
  return n(c ? {
420
439
  ...t,
421
440
  interceptorStyle: {
422
441
  ul: {
423
- s: Xt.TRUE
442
+ s: tn.TRUE
424
443
  },
425
444
  cl: {
426
445
  rgb: a.blue500
@@ -433,29 +452,14 @@ let Se = class extends T {
433
452
  )
434
453
  );
435
454
  }
436
- _initSkeletonChange() {
437
- const t = () => {
438
- const e = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
439
- if (!e)
440
- return;
441
- const n = e.getUnitId(), i = e.getActiveSheet().getSheetId(), r = this._sheetSkeletonManagerService.getOrCreateSkeleton({ unitId: n, sheetId: i }), s = this._renderManagerService.getRenderById(n);
442
- r == null || r.makeDirty(!0), r == null || r.calculate(), s && s.mainComponent.makeForceDirty();
443
- };
444
- this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
445
- t();
446
- }));
447
- }
448
455
  };
449
- Se = Jn([
450
- U(j.Ready, Se),
451
- q(0, g(qe)),
452
- q(1, g(H)),
453
- q(2, F),
454
- q(3, g(hn)),
455
- q(4, Mn),
456
- q(5, g(qt))
457
- ], Se);
458
- var Tt = { exports: {} }, He = {};
456
+ ye = Ut([
457
+ T(U.Ready, ye),
458
+ q(0, g(Je)),
459
+ q(1, g(w)),
460
+ q(2, g(nn))
461
+ ], ye);
462
+ var Ht = { exports: {} }, He = {};
459
463
  /**
460
464
  * @license React
461
465
  * react-jsx-runtime.production.min.js
@@ -465,135 +469,135 @@ var Tt = { exports: {} }, He = {};
465
469
  * This source code is licensed under the MIT license found in the
466
470
  * LICENSE file in the root directory of this source tree.
467
471
  */
468
- var Qn = jn, er = Symbol.for("react.element"), tr = Symbol.for("react.fragment"), nr = Object.prototype.hasOwnProperty, rr = Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, ir = { key: !0, ref: !0, __self: !0, __source: !0 };
469
- function Ut(t, e, n) {
470
- var i, r = {}, s = null, o = null;
472
+ var ir = Bn, sr = Symbol.for("react.element"), or = Symbol.for("react.fragment"), ar = Object.prototype.hasOwnProperty, cr = ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, lr = { key: !0, ref: !0, __self: !0, __source: !0 };
473
+ function $t(t, e, n) {
474
+ var r, i = {}, s = null, o = null;
471
475
  n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref);
472
- for (i in e)
473
- nr.call(e, i) && !ir.hasOwnProperty(i) && (r[i] = e[i]);
476
+ for (r in e)
477
+ ar.call(e, r) && !lr.hasOwnProperty(r) && (i[r] = e[r]);
474
478
  if (t && t.defaultProps)
475
- for (i in e = t.defaultProps, e)
476
- r[i] === void 0 && (r[i] = e[i]);
477
- return { $$typeof: er, type: t, key: s, ref: o, props: r, _owner: rr.current };
479
+ for (r in e = t.defaultProps, e)
480
+ i[r] === void 0 && (i[r] = e[r]);
481
+ return { $$typeof: sr, type: t, key: s, ref: o, props: i, _owner: cr.current };
478
482
  }
479
- He.Fragment = tr;
480
- He.jsx = Ut;
481
- He.jsxs = Ut;
482
- Tt.exports = He;
483
- var d = Tt.exports, P = function() {
483
+ He.Fragment = or;
484
+ He.jsx = $t;
485
+ He.jsxs = $t;
486
+ Ht.exports = He;
487
+ var d = Ht.exports, P = function() {
484
488
  return P = Object.assign || function(t) {
485
- for (var e, n = 1, i = arguments.length; n < i; n++) {
489
+ for (var e, n = 1, r = arguments.length; n < r; n++) {
486
490
  e = arguments[n];
487
- for (var r in e)
488
- Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
491
+ for (var i in e)
492
+ Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
489
493
  }
490
494
  return t;
491
495
  }, P.apply(this, arguments);
492
- }, sr = function(t, e) {
496
+ }, dr = function(t, e) {
493
497
  var n = {};
494
- for (var i in t)
495
- Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
498
+ for (var r in t)
499
+ Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
496
500
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
497
- for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
498
- e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
501
+ for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
502
+ e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
499
503
  return n;
500
- }, K = Z(function(t, e) {
501
- var n = t.icon, i = t.id, r = t.className, s = t.extend, o = sr(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = xt("_".concat(cr()));
502
- return jt(n, "".concat(i), { defIds: n.defIds, idSuffix: a.current }, P({ ref: e, className: c }, o), s);
504
+ }, z = W(function(t, e) {
505
+ var n = t.icon, r = t.id, i = t.className, s = t.extend, o = dr(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Tt("_".concat(hr()));
506
+ return Nt(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, P({ ref: e, className: c }, o), s);
503
507
  });
504
- function jt(t, e, n, i, r) {
505
- return z(t.tag, P(P({ key: e }, or(t, n, r)), i), (ar(t, n).children || []).map(function(s, o) {
506
- return jt(s, "".concat(e, "-").concat(t.tag, "-").concat(o), n, void 0, r);
508
+ function Nt(t, e, n, r, i) {
509
+ return Z(t.tag, P(P({ key: e }, ur(t, n, i)), r), (pr(t, n).children || []).map(function(s, o) {
510
+ return Nt(s, "".concat(e, "-").concat(t.tag, "-").concat(o), n, void 0, i);
507
511
  }));
508
512
  }
509
- function or(t, e, n) {
510
- var i = P({}, t.attrs);
511
- n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
512
- var r = e.defIds;
513
- return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(s) {
513
+ function ur(t, e, n) {
514
+ var r = P({}, t.attrs);
515
+ n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
516
+ var i = e.defIds;
517
+ return !i || i.length === 0 || (t.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(s) {
514
518
  var o = s[0], c = s[1];
515
- typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
516
- })), i;
519
+ typeof c == "string" && (r[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
520
+ })), r;
517
521
  }
518
- function ar(t, e) {
519
- var n, i = e.defIds;
520
- return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? P(P({}, t), { children: t.children.map(function(r) {
521
- return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? P(P({}, r), { attrs: P(P({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
522
+ function pr(t, e) {
523
+ var n, r = e.defIds;
524
+ return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? P(P({}, t), { children: t.children.map(function(i) {
525
+ return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? P(P({}, i), { attrs: P(P({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
522
526
  }) }) : t;
523
527
  }
524
- function cr() {
528
+ function hr() {
525
529
  return Math.random().toString(36).substring(2, 8);
526
530
  }
527
- K.displayName = "UniverIcon";
528
- var lr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ht = Z(function(t, e) {
529
- return z(K, Object.assign({}, t, {
531
+ z.displayName = "UniverIcon";
532
+ var gr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Dt = W(function(t, e) {
533
+ return Z(z, Object.assign({}, t, {
530
534
  id: "all-border-single",
531
535
  ref: e,
532
- icon: lr
536
+ icon: gr
533
537
  }));
534
538
  });
535
- Ht.displayName = "AllBorderSingle";
536
- const ze = Ht;
537
- var dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, $t = Z(function(t, e) {
538
- return z(K, Object.assign({}, t, {
539
+ Dt.displayName = "AllBorderSingle";
540
+ const ze = Dt;
541
+ var mr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = W(function(t, e) {
542
+ return Z(z, Object.assign({}, t, {
539
543
  id: "copy-single",
540
544
  ref: e,
541
- icon: dr
545
+ icon: mr
542
546
  }));
543
547
  });
544
- $t.displayName = "CopySingle";
545
- const ur = $t;
546
- var pr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ee = Z(function(t, e) {
547
- return z(K, Object.assign({}, t, {
548
+ At.displayName = "CopySingle";
549
+ const fr = At;
550
+ var _r = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, we = W(function(t, e) {
551
+ return Z(z, Object.assign({}, t, {
548
552
  id: "link-single",
549
553
  ref: e,
550
- icon: pr
554
+ icon: _r
551
555
  }));
552
556
  });
553
- Ee.displayName = "LinkSingle";
554
- var hr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, Nt = Z(function(t, e) {
555
- return z(K, Object.assign({}, t, {
557
+ we.displayName = "LinkSingle";
558
+ var vr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, Bt = W(function(t, e) {
559
+ return Z(z, Object.assign({}, t, {
556
560
  id: "unlink-single",
557
561
  ref: e,
558
- icon: hr
562
+ icon: vr
559
563
  }));
560
564
  });
561
- Nt.displayName = "UnlinkSingle";
562
- const gr = Nt;
563
- var mr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, Dt = Z(function(t, e) {
564
- return z(K, Object.assign({}, t, {
565
+ Bt.displayName = "UnlinkSingle";
566
+ const yr = Bt;
567
+ var Sr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, Vt = W(function(t, e) {
568
+ return Z(z, Object.assign({}, t, {
565
569
  id: "write-single",
566
570
  ref: e,
567
- icon: mr
571
+ icon: Sr
568
572
  }));
569
573
  });
570
- Dt.displayName = "WriteSingle";
571
- const fr = Dt;
572
- var vr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = Z(function(t, e) {
573
- return z(K, Object.assign({}, t, {
574
+ Vt.displayName = "WriteSingle";
575
+ const Cr = Vt;
576
+ var Lr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ft = W(function(t, e) {
577
+ return Z(z, Object.assign({}, t, {
574
578
  id: "xlsx",
575
579
  ref: e,
576
- icon: vr
580
+ icon: Lr
577
581
  }));
578
582
  });
579
- At.displayName = "Xlsx";
580
- const gt = At, _r = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, yr = new RegExp(_r);
583
+ Ft.displayName = "Xlsx";
584
+ const mt = Ft, Ir = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, kr = new RegExp(Ir);
581
585
  function le(t) {
582
- return t.startsWith("http://localhost:3002") || t.startsWith("localhost:3002") ? !0 : !!t.match(yr);
586
+ return t.startsWith("http://localhost:3002") || t.startsWith("localhost:3002") ? !0 : !!t.match(kr);
583
587
  }
584
- function Bt(t) {
588
+ function Wt(t) {
585
589
  return /^[a-zA-Z]+:\/\//.test(t);
586
590
  }
587
- function Sr(t) {
591
+ function br(t) {
588
592
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
589
593
  }
590
- function Vt(t) {
591
- return le(t) ? Bt(t) ? t : Sr(t) ? `mailto://${t}` : `http://${t}` : t;
594
+ function Zt(t) {
595
+ return le(t) ? Wt(t) ? t : br(t) ? `mailto://${t}` : `http://${t}` : t;
592
596
  }
593
- const Cr = "univer-cell-link-edit-buttons", Lr = {
594
- cellLinkEditButtons: Cr
597
+ const Rr = "univer-cell-link-edit-buttons", Pr = {
598
+ cellLinkEditButtons: Rr
595
599
  };
596
- function Ir(t) {
600
+ function Or(t) {
597
601
  if (t === null)
598
602
  return "";
599
603
  if (t != null && t.p) {
@@ -601,23 +605,23 @@ function Ir(t) {
601
605
  if (e == null)
602
606
  return "";
603
607
  const n = e.dataStream;
604
- return n.substring(n.length - 2, n.length) === Qt ? n.substring(0, n.length - 2) : n;
608
+ return n.substring(n.length - 2, n.length) === sn ? n.substring(0, n.length - 2) : n;
605
609
  }
606
610
  return t == null ? void 0 : t.v;
607
611
  }
608
- const Me = () => {
612
+ const Ee = () => {
609
613
  var ee;
610
- const [t, e] = te(""), [n, i] = te(""), [r, s] = te(
614
+ const [t, e] = te(""), [n, r] = te(""), [i, s] = te(
611
615
  "link"
612
616
  /* link */
613
- ), [o, c] = te(""), a = b(de), p = b(kt), h = b(F), v = b($), l = In(v.currentEditing$), f = b(H), L = b(B), y = b(W), [S, I] = te(!1), _ = xt(!1);
614
- Hn(() => {
617
+ ), [o, c] = te(""), a = b(de), p = b(bt), h = b(J), _ = b($), l = En(_.currentEditing$), f = b(w), L = b(B), y = b(F), [S, I] = te(!1), v = Tt(!1);
618
+ Vn(() => {
615
619
  var u, m, C;
616
620
  if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
617
621
  const k = f.getHyperLinkByLocation(l.unitId, l.subUnitId, l.row, l.column);
618
622
  if (k) {
619
623
  const Be = L.parseHyperLink(k.payload);
620
- if (e(k.id), i(k.display), Be.type === "outer") {
624
+ if (e(k.id), r(k.display), Be.type === "outer") {
621
625
  s(
622
626
  "link"
623
627
  /* link */
@@ -633,11 +637,11 @@ const Me = () => {
633
637
  return;
634
638
  }
635
639
  if (A.range) {
636
- const zt = A.gid && (C = (m = (u = h.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(A.gid)) == null ? void 0 : m.getName()) != null ? C : "";
640
+ const qt = A.gid && (C = (m = (u = h.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(A.gid)) == null ? void 0 : m.getName()) != null ? C : "";
637
641
  s(
638
642
  "range"
639
643
  /* range */
640
- ), c(It(zt, ce(A.range).range));
644
+ ), c(kt(qt, ce(A.range).range));
641
645
  return;
642
646
  }
643
647
  if (A.gid) {
@@ -649,19 +653,19 @@ const Me = () => {
649
653
  }
650
654
  }
651
655
  }
652
- const D = h.getUnit(l.unitId), De = D == null ? void 0 : D.getSheetBySheetId(l.subUnitId), Zt = De == null ? void 0 : De.getCellRaw(l.row, l.column), Ae = Ir(Zt);
656
+ const D = h.getUnit(l.unitId), De = D == null ? void 0 : D.getSheetBySheetId(l.subUnitId), Xt = De == null ? void 0 : De.getCellRaw(l.row, l.column), Ae = Or(Xt);
653
657
  s(
654
658
  "link"
655
659
  /* link */
656
- ), c(""), i((Ae != null ? Ae : "").toString()), e("");
660
+ ), c(""), r((Ae != null ? Ae : "").toString()), e("");
657
661
  return;
658
662
  }
659
663
  s(
660
664
  "link"
661
665
  /* link */
662
- ), c(""), i(""), e("");
666
+ ), c(""), r(""), e("");
663
667
  }, [l, f, L, h]);
664
- const Y = $n(() => o, [r]), N = [
668
+ const K = Fn(() => o, [i]), N = [
665
669
  {
666
670
  label: a.t("hyperLink.form.link"),
667
671
  value: "link"
@@ -682,114 +686,114 @@ const Me = () => {
682
686
  value: "rangeid"
683
687
  /* definedName */
684
688
  }
685
- ], R = h.getCurrentUnitForType(E.UNIVER_SHEET);
689
+ ], R = h.getCurrentUnitForType(M.UNIVER_SHEET);
686
690
  if (!R)
687
691
  return;
688
- const G = R.getHiddenWorksheets(), V = R.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => G.indexOf(u.value) === -1), Q = Object.values((ee = p.getDefinedNameMap(R.getUnitId())) != null ? ee : {}).map((u) => ({
692
+ const Y = R.getHiddenWorksheets(), V = R.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => Y.indexOf(u.value) === -1), Q = Object.values((ee = p.getDefinedNameMap(R.getUnitId())) != null ? ee : {}).map((u) => ({
689
693
  label: u.name,
690
694
  value: u.id
691
695
  })), ue = (u, m) => {
692
696
  if (u === "link")
693
- return Bt(m) ? m : `http://${m}`;
697
+ return Wt(m) ? m : `http://${m}`;
694
698
  if (u === "range") {
695
699
  const C = ce(m), k = R.getSheetBySheetName(C.sheetName);
696
700
  if (k)
697
- return `#gid=${k.getSheetId()}&range=${ve(C.range)}`;
701
+ return `#gid=${k.getSheetId()}&range=${fe(C.range)}`;
698
702
  }
699
703
  return `#${u}=${m}`;
700
704
  }, Ne = async () => {
701
- l && (t ? await y.executeCommand(Lt.id, {
705
+ l && (t ? await y.executeCommand(It.id, {
702
706
  unitId: l.unitId,
703
707
  subUnitId: l.subUnitId,
704
708
  id: t,
705
709
  payload: {
706
710
  display: n,
707
- payload: ue(r, o)
711
+ payload: ue(i, o)
708
712
  }
709
- }) : await y.executeCommand(rt.id, {
713
+ }) : await y.executeCommand(it.id, {
710
714
  unitId: l.unitId,
711
715
  subUnitId: l.subUnitId,
712
716
  link: {
713
717
  id: ae.generateRandomId(),
714
718
  row: l.row,
715
719
  column: l.column,
716
- payload: ue(r, o),
720
+ payload: ue(i, o),
717
721
  display: n
718
722
  }
719
- })), l && (await y.executeCommand(Oe.id, {
723
+ })), l && (await y.executeCommand(Pe.id, {
720
724
  unitId: l.unitId,
721
725
  subUnitId: l.subUnitId
722
- }), await y.executeCommand(bt.id, {
726
+ }), await y.executeCommand(Rt.id, {
723
727
  range: {
724
728
  startRow: l.row,
725
729
  endRow: l.row,
726
730
  startColumn: l.column,
727
731
  endColumn: l.column
728
732
  }
729
- })), y.executeCommand(xe.id);
733
+ })), y.executeCommand(Me.id);
730
734
  };
731
735
  return /* @__PURE__ */ d.jsxs("div", { children: [
732
736
  /* @__PURE__ */ d.jsx(
733
- X,
737
+ G,
734
738
  {
735
739
  label: a.t("hyperLink.form.label"),
736
740
  error: S && !n ? a.t("hyperLink.form.inputError") : "",
737
741
  children: /* @__PURE__ */ d.jsx(
738
- dt,
742
+ ut,
739
743
  {
740
744
  value: n,
741
745
  onChange: (u) => {
742
- i(u), _.current = !1;
746
+ r(u), v.current = !1;
743
747
  },
744
748
  placeholder: a.t("hyperLink.form.labelPlaceholder")
745
749
  }
746
750
  )
747
751
  }
748
752
  ),
749
- /* @__PURE__ */ d.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
753
+ /* @__PURE__ */ d.jsx(G, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
750
754
  Ve,
751
755
  {
752
756
  options: N,
753
- value: r,
757
+ value: i,
754
758
  onChange: (u) => {
755
759
  s(u), c("");
756
760
  }
757
761
  }
758
762
  ) }),
759
- r === "link" && /* @__PURE__ */ d.jsx(
760
- X,
763
+ i === "link" && /* @__PURE__ */ d.jsx(
764
+ G,
761
765
  {
762
766
  error: S ? o ? le(o) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
763
767
  children: /* @__PURE__ */ d.jsx(
764
- dt,
768
+ ut,
765
769
  {
766
770
  value: o,
767
771
  onChange: (u) => {
768
- c(u), u && (_.current || !n) && (i(u), _.current = !0);
772
+ c(u), u && (v.current || !n) && (r(u), v.current = !0);
769
773
  },
770
774
  placeholder: a.t("hyperLink.form.linkPlaceholder")
771
775
  }
772
776
  )
773
777
  }
774
778
  ),
775
- r === "range" && /* @__PURE__ */ d.jsx(X, { error: S && !o ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
776
- kn,
779
+ i === "range" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
780
+ Mn,
777
781
  {
778
782
  openForSheetUnitId: R.getUnitId(),
779
- id: Jt("hyper-link-edit"),
783
+ id: rn("hyper-link-edit"),
780
784
  isSingleChoice: !0,
781
- value: Y,
785
+ value: K,
782
786
  onChange: (u) => {
783
787
  const m = u[0];
784
- if (!m || !Pe(m.range))
788
+ if (!m || !Re(m.range))
785
789
  return;
786
790
  m.sheetName || (m.sheetName = R.getActiveSheet().getName());
787
- const C = pn(m);
788
- c(C), C && (_.current || !n) && (i(C), _.current = !0);
791
+ const C = yn(m);
792
+ c(C), C && (v.current || !n) && (r(C), v.current = !0);
789
793
  }
790
794
  }
791
795
  ) }),
792
- r === "gid" && /* @__PURE__ */ d.jsx(X, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
796
+ i === "gid" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
793
797
  Ve,
794
798
  {
795
799
  options: V,
@@ -798,11 +802,11 @@ const Me = () => {
798
802
  var C;
799
803
  c(u);
800
804
  const m = (C = V.find((k) => k.value === u)) == null ? void 0 : C.label;
801
- m && (_.current || !n) && (i(m), _.current = !0);
805
+ m && (v.current || !n) && (r(m), v.current = !0);
802
806
  }
803
807
  }
804
808
  ) }),
805
- r === "rangeid" && /* @__PURE__ */ d.jsx(X, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
809
+ i === "rangeid" && /* @__PURE__ */ d.jsx(G, { error: S && !o ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
806
810
  Ve,
807
811
  {
808
812
  options: Q,
@@ -811,30 +815,30 @@ const Me = () => {
811
815
  var C;
812
816
  c(u);
813
817
  const m = (C = Q.find((k) => k.value === u)) == null ? void 0 : C.label;
814
- m && (_.current || !n) && (i(m), _.current = !0);
818
+ m && (v.current || !n) && (r(m), v.current = !0);
815
819
  }
816
820
  }
817
821
  ) }),
818
- /* @__PURE__ */ d.jsxs("div", { className: Lr.cellLinkEditButtons, children: [
822
+ /* @__PURE__ */ d.jsxs("div", { className: Pr.cellLinkEditButtons, children: [
819
823
  /* @__PURE__ */ d.jsx(
820
- ut,
824
+ pt,
821
825
  {
822
826
  onClick: () => {
823
- l && y.executeCommand(Oe.id, {
827
+ l && y.executeCommand(Pe.id, {
824
828
  unitId: l.unitId,
825
829
  subUnitId: l.subUnitId
826
- }), y.executeCommand(xe.id);
830
+ }), y.executeCommand(Me.id);
827
831
  },
828
832
  children: a.t("hyperLink.form.cancel")
829
833
  }
830
834
  ),
831
835
  /* @__PURE__ */ d.jsx(
832
- ut,
836
+ pt,
833
837
  {
834
838
  type: "primary",
835
839
  style: { marginLeft: 8 },
836
840
  onClick: async () => {
837
- if (!n || !o || r === "link" && !le(o)) {
841
+ if (!n || !o || i === "link" && !le(o)) {
838
842
  I(!0);
839
843
  return;
840
844
  }
@@ -846,151 +850,151 @@ const Me = () => {
846
850
  ] })
847
851
  ] });
848
852
  };
849
- Me.componentKey = "univer.sheet.cell-link-edit";
850
- const st = {
851
- type: Ue.OPERATION,
853
+ Ee.componentKey = "univer.sheet.cell-link-edit";
854
+ const ot = {
855
+ type: Te.OPERATION,
852
856
  id: "sheet.operation.open-hyper-link-sidebar",
853
857
  handler(t, e) {
854
858
  if (!e)
855
859
  return !1;
856
- const { unitId: n, subUnitId: i, row: r, column: s } = e, o = t.get(H), c = t.get(Ot), a = t.get($), p = o.getHyperLinkByLocation(n, i, r, s);
860
+ const { unitId: n, subUnitId: r, row: i, column: s } = e, o = t.get(w), c = t.get(wt), a = t.get($), p = o.getHyperLinkByLocation(n, r, i, s);
857
861
  return a.startEditing(e), c.open({
858
862
  header: {
859
863
  title: p ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
860
864
  },
861
865
  children: {
862
- label: Me.componentKey
866
+ label: Ee.componentKey
863
867
  }
864
868
  }), !0;
865
869
  }
866
- }, xe = {
867
- type: Ue.OPERATION,
870
+ }, Me = {
871
+ type: Te.OPERATION,
868
872
  id: "sheet.operation.close-hyper-link-sidebar",
869
873
  handler(t) {
870
- const e = t.get(Ot), n = t.get($);
874
+ const e = t.get(wt), n = t.get($);
871
875
  return e.close(), n.endEditing(), !0;
872
876
  }
873
877
  }, $e = {
874
- type: Ue.OPERATION,
878
+ type: Te.OPERATION,
875
879
  id: "sheet.operation.insert-hyper-link",
876
880
  handler(t) {
877
- const e = t.get(F), n = St(e);
881
+ const e = t.get(J), n = Ct(e);
878
882
  if (!n)
879
883
  return !1;
880
- const i = t.get(W), s = t.get(Ct).getFirst();
884
+ const r = t.get(F), s = t.get(Lt).getFirst();
881
885
  if (!(s != null && s.primary))
882
886
  return !1;
883
887
  const o = s.primary.actualRow, c = s.primary.actualColumn;
884
- return i.executeCommand(st.id, {
888
+ return r.executeCommand(ot.id, {
885
889
  unitId: n.unitId,
886
890
  subUnitId: n.subUnitId,
887
891
  row: o,
888
892
  column: c
889
893
  });
890
894
  }
891
- }, Ft = {
892
- type: Ue.OPERATION,
895
+ }, zt = {
896
+ type: Te.OPERATION,
893
897
  id: "sheet.operation.insert-hyper-link-toolbar",
894
898
  handler(t) {
895
- const e = t.get(W);
896
- return t.get($).currentEditing ? e.executeCommand(xe.id) : e.executeCommand($e.id);
899
+ const e = t.get(F);
900
+ return t.get($).currentEditing ? e.executeCommand(Me.id) : e.executeCommand($e.id);
897
901
  }
898
- }, kr = "univer-cell-link", br = "univer-cell-link-type", Rr = "univer-cell-link-content", Pr = "univer-cell-link-content-error", Or = "univer-cell-link-url", wr = "univer-cell-link-operations", Er = "univer-cell-link-operation", Mr = "univer-cell-link-operation-error", w = {
899
- cellLink: kr,
900
- cellLinkType: br,
901
- cellLinkContent: Rr,
902
- cellLinkContentError: Pr,
903
- cellLinkUrl: Or,
904
- cellLinkOperations: wr,
905
- cellLinkOperation: Er,
906
- cellLinkOperationError: Mr
907
- }, xr = {
908
- outer: /* @__PURE__ */ d.jsx(Ee, {}),
909
- link: /* @__PURE__ */ d.jsx(Ee, {}),
910
- sheet: /* @__PURE__ */ d.jsx(gt, {}),
902
+ }, wr = "univer-cell-link", Er = "univer-cell-link-type", Mr = "univer-cell-link-content", xr = "univer-cell-link-content-error", jr = "univer-cell-link-url", Tr = "univer-cell-link-operations", Ur = "univer-cell-link-operation", Hr = "univer-cell-link-operation-error", E = {
903
+ cellLink: wr,
904
+ cellLinkType: Er,
905
+ cellLinkContent: Mr,
906
+ cellLinkContentError: xr,
907
+ cellLinkUrl: jr,
908
+ cellLinkOperations: Tr,
909
+ cellLinkOperation: Ur,
910
+ cellLinkOperationError: Hr
911
+ }, $r = {
912
+ outer: /* @__PURE__ */ d.jsx(we, {}),
913
+ link: /* @__PURE__ */ d.jsx(we, {}),
914
+ sheet: /* @__PURE__ */ d.jsx(mt, {}),
911
915
  range: /* @__PURE__ */ d.jsx(ze, {}),
912
916
  defineName: /* @__PURE__ */ d.jsx(ze, {}),
913
917
  "range-error": /* @__PURE__ */ d.jsx(ze, {}),
914
- "sheet-error": /* @__PURE__ */ d.jsx(gt, {})
915
- }, Te = () => {
916
- const t = b($), e = b(H), n = b(W), i = b(Pt), r = b(de), s = Nn(t.currentPopup$, t.currentPopup), o = b(B);
918
+ "sheet-error": /* @__PURE__ */ d.jsx(mt, {})
919
+ }, xe = () => {
920
+ const t = b($), e = b(w), n = b(F), r = b(Ot), i = b(de), s = Wn(t.currentPopup$, t.currentPopup), o = b(B);
917
921
  if (!s)
918
922
  return null;
919
923
  const { unitId: c, subUnitId: a, id: p } = s, h = e.getHyperLink(c, a, p);
920
924
  if (!h)
921
925
  return null;
922
- const v = o.parseHyperLink(h.payload), l = v.type.indexOf("error") > -1;
923
- return /* @__PURE__ */ d.jsxs("div", { className: w.cellLink, onClick: () => t.hideCurrentPopup(), children: [
924
- /* @__PURE__ */ d.jsxs("div", { className: ht(w.cellLinkContent, { [w.cellLinkContentError]: l }), onClick: v.handler, children: [
925
- /* @__PURE__ */ d.jsx("div", { className: w.cellLinkType, children: xr[v.type] }),
926
- /* @__PURE__ */ d.jsx("div", { className: w.cellLinkUrl, children: v.name })
926
+ const _ = o.parseHyperLink(h.payload), l = _.type.indexOf("error") > -1;
927
+ return /* @__PURE__ */ d.jsxs("div", { className: E.cellLink, onClick: () => t.hideCurrentPopup(), children: [
928
+ /* @__PURE__ */ d.jsxs("div", { className: gt(E.cellLinkContent, { [E.cellLinkContentError]: l }), onClick: _.handler, children: [
929
+ /* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children: $r[_.type] }),
930
+ /* @__PURE__ */ d.jsx("div", { className: E.cellLinkUrl, children: _.name })
927
931
  ] }),
928
- /* @__PURE__ */ d.jsxs("div", { className: w.cellLinkOperations, children: [
932
+ /* @__PURE__ */ d.jsxs("div", { className: E.cellLinkOperations, children: [
929
933
  /* @__PURE__ */ d.jsx(
930
934
  "div",
931
935
  {
932
- className: ht(w.cellLinkOperation, { [w.cellLinkOperationError]: l }),
936
+ className: gt(E.cellLinkOperation, { [E.cellLinkOperationError]: l }),
933
937
  onClick: () => {
934
938
  if (!l) {
935
- if (v.type !== "outer") {
939
+ if (_.type !== "outer") {
936
940
  const f = new URL(window.location.href);
937
- f.hash = v.url.slice(1), navigator.clipboard.writeText(f.href);
941
+ f.hash = _.url.slice(1), navigator.clipboard.writeText(f.href);
938
942
  } else
939
- navigator.clipboard.writeText(v.url);
940
- i.show({
941
- content: r.t("hyperLink.message.coped"),
943
+ navigator.clipboard.writeText(_.url);
944
+ r.show({
945
+ content: i.t("hyperLink.message.coped"),
942
946
  type: ie.Info
943
947
  });
944
948
  }
945
949
  },
946
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(ur, {}) })
950
+ children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(fr, {}) })
947
951
  }
948
952
  ),
949
953
  /* @__PURE__ */ d.jsx(
950
954
  "div",
951
955
  {
952
- className: w.cellLinkOperation,
956
+ className: E.cellLinkOperation,
953
957
  onClick: () => {
954
- n.executeCommand(st.id, {
958
+ n.executeCommand(ot.id, {
955
959
  unitId: c,
956
960
  subUnitId: a,
957
961
  row: h.row,
958
962
  column: h.column
959
963
  });
960
964
  },
961
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(fr, {}) })
965
+ children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Cr, {}) })
962
966
  }
963
967
  ),
964
968
  /* @__PURE__ */ d.jsx(
965
969
  "div",
966
970
  {
967
- className: w.cellLinkOperation,
971
+ className: E.cellLinkOperation,
968
972
  onClick: () => {
969
- n.executeCommand(dn.id, {
973
+ n.executeCommand(_n.id, {
970
974
  unitId: c,
971
975
  subUnitId: a,
972
976
  id: h.id
973
977
  });
974
978
  },
975
- children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(gr, {}) })
979
+ children: /* @__PURE__ */ d.jsx(Fe, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(yr, {}) })
976
980
  }
977
981
  )
978
982
  ] })
979
983
  ] });
980
984
  };
981
- Te.componentKey = "univer.sheet.cell-link-popup";
982
- var Tr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, jr = (t, e, n, i) => {
983
- for (var r = i > 1 ? void 0 : i ? Ur(e, n) : e, s = t.length - 1, o; s >= 0; s--)
984
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
985
- return i && r && Tr(e, n, r), r;
986
- }, mt = (t, e) => (n, i) => e(n, i, t);
985
+ xe.componentKey = "univer.sheet.cell-link-popup";
986
+ var Nr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Ar = (t, e, n, r) => {
987
+ for (var i = r > 1 ? void 0 : r ? Dr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
988
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
989
+ return r && i && Nr(e, n, i), i;
990
+ }, ft = (t, e) => (n, r) => e(n, r, t);
987
991
  let $ = class {
988
992
  constructor(t, e) {
989
- O(this, "_currentPopup", null);
990
- O(this, "_currentPopup$", new xn());
991
- O(this, "currentPopup$", this._currentPopup$.asObservable());
992
- O(this, "_currentEditing$", new Tn(null));
993
- O(this, "currentEditing$", this._currentEditing$.asObservable());
993
+ H(this, "_currentPopup", null);
994
+ H(this, "_currentPopup$", new Nn());
995
+ H(this, "currentPopup$", this._currentPopup$.asObservable());
996
+ H(this, "_currentEditing$", new Dn(null));
997
+ H(this, "currentEditing$", this._currentEditing$.asObservable());
994
998
  this._hyperLinkModel = t, this._sheetCanvasPopManagerService = e;
995
999
  }
996
1000
  get currentPopup() {
@@ -1001,11 +1005,11 @@ let $ = class {
1001
1005
  }
1002
1006
  showPopup(t) {
1003
1007
  this.hideCurrentPopup();
1004
- const { unitId: e, subUnitId: n, row: i, col: r } = t, s = this._hyperLinkModel.getHyperLinkByLocation(e, n, i, r);
1008
+ const { unitId: e, subUnitId: n, row: r, col: i } = t, s = this._hyperLinkModel.getHyperLinkByLocation(e, n, r, i);
1005
1009
  if (!s)
1006
1010
  return;
1007
- const o = this._sheetCanvasPopManagerService.attachPopupToCell(i, r, {
1008
- componentKey: Te.componentKey,
1011
+ const o = this._sheetCanvasPopManagerService.attachPopupToCell(r, i, {
1012
+ componentKey: xe.componentKey,
1009
1013
  direction: "bottom",
1010
1014
  closeOnSelfTarget: !0
1011
1015
  });
@@ -1027,18 +1031,18 @@ let $ = class {
1027
1031
  this._currentEditing$.next(null);
1028
1032
  }
1029
1033
  };
1030
- $ = jr([
1031
- mt(0, g(H)),
1032
- mt(1, g(gn))
1034
+ $ = Ar([
1035
+ ft(0, g(w)),
1036
+ ft(1, g(Cn))
1033
1037
  ], $);
1034
- var Hr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, Nr = (t, e, n, i) => {
1035
- for (var r = i > 1 ? void 0 : i ? $r(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1036
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1037
- return i && r && Hr(e, n, r), r;
1038
- }, re = (t, e) => (n, i) => e(n, i, t);
1039
- let Ce = class extends T {
1040
- constructor(t, e, n, i, r) {
1041
- super(), this._sheetInterceptorService = t, this._injector = e, this._hyperLinkModel = n, this._selectionManagerService = i, this._univerInstanceService = r, this._initCommandInterceptor();
1038
+ var Br = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Fr = (t, e, n, r) => {
1039
+ for (var i = r > 1 ? void 0 : r ? Vr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1040
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1041
+ return r && i && Br(e, n, i), i;
1042
+ }, re = (t, e) => (n, r) => e(n, r, t);
1043
+ let Se = class extends O {
1044
+ constructor(t, e, n, r, i) {
1045
+ super(), this._sheetInterceptorService = t, this._injector = e, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._initCommandInterceptor();
1042
1046
  }
1043
1047
  _initCommandInterceptor() {
1044
1048
  this._initAddHyperLinkCommandInterceptor(), this._initSetRangeValuesCommandInterceptor(), this._initUpdateHyperLinkCommandInterceptor(), this._initClearSelectionCommandInterceptor();
@@ -1046,15 +1050,15 @@ let Ce = class extends T {
1046
1050
  _initAddHyperLinkCommandInterceptor() {
1047
1051
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1048
1052
  getMutations: (t) => {
1049
- if (t.id === rt.id) {
1050
- const e = t.params, { unitId: n, subUnitId: i, link: r } = e, s = {
1053
+ if (t.id === it.id) {
1054
+ const e = t.params, { unitId: n, subUnitId: r, link: i } = e, s = {
1051
1055
  unitId: n,
1052
- subUnitId: i,
1056
+ subUnitId: r,
1053
1057
  cellValue: {
1054
- [r.row]: {
1055
- [r.column]: {
1056
- v: r.display,
1057
- t: ot.STRING,
1058
+ [i.row]: {
1059
+ [i.column]: {
1060
+ v: i.display,
1061
+ t: at.STRING,
1058
1062
  p: null
1059
1063
  }
1060
1064
  }
@@ -1067,7 +1071,7 @@ let Ce = class extends T {
1067
1071
  }],
1068
1072
  undos: [{
1069
1073
  id: pe.id,
1070
- params: ct(this._injector, s)
1074
+ params: lt(this._injector, s)
1071
1075
  }]
1072
1076
  };
1073
1077
  }
@@ -1081,17 +1085,17 @@ let Ce = class extends T {
1081
1085
  _initUpdateHyperLinkCommandInterceptor() {
1082
1086
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1083
1087
  getMutations: (t) => {
1084
- if (t.id === Lt.id) {
1085
- const e = t.params, { unitId: n, subUnitId: i, id: r, payload: s } = e, o = this._hyperLinkModel.getHyperLink(n, i, r);
1088
+ if (t.id === It.id) {
1089
+ const e = t.params, { unitId: n, subUnitId: r, id: i, payload: s } = e, o = this._hyperLinkModel.getHyperLink(n, r, i);
1086
1090
  if (o && o.display !== s.display) {
1087
1091
  const c = {
1088
1092
  unitId: n,
1089
- subUnitId: i,
1093
+ subUnitId: r,
1090
1094
  cellValue: {
1091
1095
  [o.row]: {
1092
1096
  [o.column]: {
1093
1097
  v: s.display,
1094
- t: ot.STRING,
1098
+ t: at.STRING,
1095
1099
  p: null
1096
1100
  }
1097
1101
  }
@@ -1104,7 +1108,7 @@ let Ce = class extends T {
1104
1108
  }],
1105
1109
  undos: [{
1106
1110
  id: pe.id,
1107
- params: ct(this._injector, c)
1111
+ params: lt(this._injector, c)
1108
1112
  }]
1109
1113
  };
1110
1114
  }
@@ -1121,32 +1125,32 @@ let Ce = class extends T {
1121
1125
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1122
1126
  // eslint-disable-next-line max-lines-per-function
1123
1127
  getMutations: (t) => {
1124
- if (t.id === on.id) {
1125
- const e = t.params, { unitId: n, subUnitId: i } = e, r = [], s = [];
1126
- return e.cellValue && new yt(e.cellValue).forValue((o, c, a) => {
1128
+ if (t.id === hn.id) {
1129
+ const e = t.params, { unitId: n, subUnitId: r } = e, i = [], s = [];
1130
+ return e.cellValue && new St(e.cellValue).forValue((o, c, a) => {
1127
1131
  var f, L, y, S;
1128
- const p = ((S = (y = a == null ? void 0 : a.v) != null ? y : (L = (f = a == null ? void 0 : a.p) == null ? void 0 : f.body) == null ? void 0 : L.dataStream.slice(0, -2)) != null ? S : "").toString(), h = this._hyperLinkModel.getHyperLinkByLocation(n, i, o, c);
1132
+ const p = ((S = (y = a == null ? void 0 : a.v) != null ? y : (L = (f = a == null ? void 0 : a.p) == null ? void 0 : f.body) == null ? void 0 : L.dataStream.slice(0, -2)) != null ? S : "").toString(), h = this._hyperLinkModel.getHyperLinkByLocation(n, r, o, c);
1129
1133
  if (!h) {
1130
1134
  if (le(p)) {
1131
1135
  const I = ae.generateRandomId();
1132
1136
  s.push({
1133
- id: M.id,
1137
+ id: x.id,
1134
1138
  params: {
1135
1139
  unitId: n,
1136
- subUnitId: i,
1140
+ subUnitId: r,
1137
1141
  id: I
1138
1142
  }
1139
- }), r.push({
1140
- id: x.id,
1143
+ }), i.push({
1144
+ id: j.id,
1141
1145
  params: {
1142
1146
  unitId: n,
1143
- subUnitId: i,
1147
+ subUnitId: r,
1144
1148
  link: {
1145
1149
  id: I,
1146
1150
  row: o,
1147
1151
  column: c,
1148
1152
  display: p,
1149
- payload: Vt(p)
1153
+ payload: Zt(p)
1150
1154
  }
1151
1155
  }
1152
1156
  });
@@ -1155,24 +1159,24 @@ let Ce = class extends T {
1155
1159
  }
1156
1160
  if (h.display === p)
1157
1161
  return;
1158
- p || (r.push({
1159
- id: M.id,
1162
+ p || (i.push({
1163
+ id: x.id,
1160
1164
  params: {
1161
1165
  unitId: n,
1162
- subUnitId: i,
1166
+ subUnitId: r,
1163
1167
  id: h.id
1164
1168
  }
1165
1169
  }), s.push({
1166
- id: x.id,
1170
+ id: j.id,
1167
1171
  params: {
1168
1172
  unitId: n,
1169
- subUnitId: i,
1173
+ subUnitId: r,
1170
1174
  link: h
1171
1175
  }
1172
1176
  }));
1173
- const v = {
1177
+ const _ = {
1174
1178
  unitId: n,
1175
- subUnitId: i,
1179
+ subUnitId: r,
1176
1180
  id: h.id,
1177
1181
  payload: {
1178
1182
  payload: h.payload,
@@ -1180,23 +1184,23 @@ let Ce = class extends T {
1180
1184
  }
1181
1185
  }, l = {
1182
1186
  unitId: n,
1183
- subUnitId: i,
1187
+ subUnitId: r,
1184
1188
  id: h.id,
1185
1189
  payload: {
1186
1190
  payload: h.payload,
1187
1191
  display: h.display
1188
1192
  }
1189
1193
  };
1190
- r.push({
1191
- id: we.id,
1192
- params: v
1194
+ i.push({
1195
+ id: Oe.id,
1196
+ params: _
1193
1197
  }), s.push({
1194
- id: we.id,
1198
+ id: Oe.id,
1195
1199
  params: l
1196
1200
  });
1197
1201
  }), {
1198
1202
  undos: s,
1199
- redos: r
1203
+ redos: i
1200
1204
  };
1201
1205
  }
1202
1206
  return {
@@ -1209,21 +1213,21 @@ let Ce = class extends T {
1209
1213
  _initClearSelectionCommandInterceptor() {
1210
1214
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1211
1215
  getMutations: (t) => {
1212
- if (t.id === an.id || t.id === cn.id) {
1213
- const e = [], n = [], i = this._selectionManagerService.getFirst(), r = St(this._univerInstanceService);
1214
- if (i && r) {
1215
- const { unitId: s, subUnitId: o } = r;
1216
- Xe.foreach(i.range, (c, a) => {
1216
+ if (t.id === gn.id || t.id === mn.id) {
1217
+ const e = [], n = [], r = this._selectionManagerService.getFirst(), i = Ct(this._univerInstanceService);
1218
+ if (r && i) {
1219
+ const { unitId: s, subUnitId: o } = i;
1220
+ qe.foreach(r.range, (c, a) => {
1217
1221
  const p = this._hyperLinkModel.getHyperLinkByLocation(s, o, c, a);
1218
1222
  p && (e.push({
1219
- id: M.id,
1223
+ id: x.id,
1220
1224
  params: {
1221
1225
  unitId: s,
1222
1226
  subUnitId: o,
1223
1227
  id: p.id
1224
1228
  }
1225
1229
  }), n.push({
1226
- id: x.id,
1230
+ id: j.id,
1227
1231
  params: {
1228
1232
  unitId: s,
1229
1233
  subUnitId: o,
@@ -1245,26 +1249,26 @@ let Ce = class extends T {
1245
1249
  }));
1246
1250
  }
1247
1251
  };
1248
- Ce = Nr([
1249
- U(j.Starting, Ce),
1250
- re(0, g(qe)),
1251
- re(1, g(je)),
1252
- re(2, g(H)),
1253
- re(3, g(Ct)),
1254
- re(4, F)
1255
- ], Ce);
1256
- var Dr = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Br = (t, e, n, i) => {
1257
- for (var r = i > 1 ? void 0 : i ? Ar(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1258
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1259
- return i && r && Dr(e, n, r), r;
1260
- }, ft = (t, e) => (n, i) => e(n, i, t);
1261
- let Le = class extends T {
1252
+ Se = Fr([
1253
+ T(U.Starting, Se),
1254
+ re(0, g(Je)),
1255
+ re(1, g(Ue)),
1256
+ re(2, g(w)),
1257
+ re(3, g(Lt)),
1258
+ re(4, J)
1259
+ ], Se);
1260
+ var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (t, e, n, r) => {
1261
+ for (var i = r > 1 ? void 0 : r ? Zr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1262
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1263
+ return r && i && Wr(e, n, i), i;
1264
+ }, _t = (t, e) => (n, r) => e(n, r, t);
1265
+ let Ce = class extends O {
1262
1266
  constructor(t, e) {
1263
1267
  super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._initHoverListener();
1264
1268
  }
1265
1269
  _initHoverListener() {
1266
1270
  this.disposeWithMe(
1267
- this._hoverManagerService.currentCell$.pipe(Un(100)).subscribe((t) => {
1271
+ this._hoverManagerService.currentCell$.pipe(An(100)).subscribe((t) => {
1268
1272
  if (!t) {
1269
1273
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1270
1274
  return;
@@ -1274,135 +1278,135 @@ let Le = class extends T {
1274
1278
  );
1275
1279
  }
1276
1280
  };
1277
- Le = Br([
1278
- U(j.Rendered, Le),
1279
- ft(0, g(mn)),
1280
- ft(1, g($))
1281
- ], Le);
1282
- const Vr = (t) => ({
1281
+ Ce = zr([
1282
+ T(U.Rendered, Ce),
1283
+ _t(0, g(Ln)),
1284
+ _t(1, g($))
1285
+ ], Ce);
1286
+ const Kr = (t) => ({
1283
1287
  id: $e.id,
1284
- type: wt.BUTTON,
1285
- positions: [Et.CONTEXT_MENU],
1288
+ type: Et.BUTTON,
1289
+ positions: [Mt.CONTEXT_MENU],
1286
1290
  title: "hyperLink.menu.add",
1287
- hidden$: Mt(t, E.UNIVER_SHEET),
1291
+ hidden$: xt(t, M.UNIVER_SHEET),
1288
1292
  icon: "LinkSingle",
1289
- disabled$: Rt(t, { workbookTypes: [Je], worksheetTypes: [Qe, et, tt], rangeTypes: [nt] })
1290
- }), Fr = (t) => ({
1293
+ disabled$: Pt(t, { workbookTypes: [Qe], worksheetTypes: [et, tt, nt], rangeTypes: [rt] })
1294
+ }), Yr = (t) => ({
1291
1295
  tooltip: "hyperLink.form.addTitle",
1292
- positions: Et.TOOLBAR_START,
1293
- group: Pn.TOOLBAR_OTHERS,
1294
- id: Ft.id,
1295
- type: wt.BUTTON,
1296
+ positions: Mt.TOOLBAR_START,
1297
+ group: Tn.TOOLBAR_OTHERS,
1298
+ id: zt.id,
1299
+ type: Et.BUTTON,
1296
1300
  icon: "LinkSingle",
1297
- hidden$: Mt(t, E.UNIVER_SHEET),
1298
- disabled$: Rt(t, { workbookTypes: [Je], worksheetTypes: [Qe, et, tt], rangeTypes: [nt] })
1299
- }), Wt = {
1301
+ hidden$: xt(t, M.UNIVER_SHEET),
1302
+ disabled$: Pt(t, { workbookTypes: [Qe], worksheetTypes: [et, tt, nt], rangeTypes: [rt] })
1303
+ }), Kt = {
1300
1304
  id: $e.id,
1301
- binding: bn.K | Rn.CTRL_COMMAND,
1302
- preconditions: fn
1305
+ binding: xn.K | jn.CTRL_COMMAND,
1306
+ preconditions: In
1303
1307
  };
1304
- var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (t, e, n, i) => {
1305
- for (var r = i > 1 ? void 0 : i ? Zr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1306
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1307
- return i && r && Wr(e, n, r), r;
1308
- }, J = (t, e) => (n, i) => e(n, i, t);
1309
- let se = class extends T {
1310
- constructor(t, e, n, i, r, s, o) {
1311
- super(), this._config = t, this._componentManager = e, this._commandService = n, this._localeService = i, this._menuService = r, this._injector = s, this._shortcutService = o, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1308
+ var Gr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, qr = (t, e, n, r) => {
1309
+ for (var i = r > 1 ? void 0 : r ? Xr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1310
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1311
+ return r && i && Gr(e, n, i), i;
1312
+ }, X = (t, e) => (n, r) => e(n, r, t);
1313
+ let se = class extends O {
1314
+ constructor(t, e, n, r, i, s, o) {
1315
+ super(), this._config = t, this._componentManager = e, this._commandService = n, this._localeService = r, this._menuService = i, this._injector = s, this._shortcutService = o, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1312
1316
  }
1313
1317
  _initComponents() {
1314
1318
  [
1315
- [Te, Te.componentKey],
1316
- [Me, Me.componentKey],
1317
- [Ee, "LinkSingle"]
1319
+ [xe, xe.componentKey],
1320
+ [Ee, Ee.componentKey],
1321
+ [we, "LinkSingle"]
1318
1322
  ].forEach(([t, e]) => {
1319
1323
  this._componentManager.register(e, t);
1320
1324
  });
1321
1325
  }
1322
1326
  _initCommands() {
1323
1327
  [
1324
- st,
1325
- xe,
1328
+ ot,
1329
+ Me,
1326
1330
  $e,
1327
- Ft
1331
+ zt
1328
1332
  ].forEach((t) => {
1329
1333
  this._commandService.registerCommand(t);
1330
1334
  });
1331
1335
  }
1332
1336
  _initMenus() {
1333
- var t, e, n, i;
1334
- this._menuService.addMenuItem(Vr(this._injector), (e = (t = this._config) == null ? void 0 : t.menu) != null ? e : {}), this._menuService.addMenuItem(Fr(this._injector), (i = (n = this._config) == null ? void 0 : n.menu) != null ? i : {});
1337
+ var t, e, n, r;
1338
+ this._menuService.addMenuItem(Kr(this._injector), (e = (t = this._config) == null ? void 0 : t.menu) != null ? e : {}), this._menuService.addMenuItem(Yr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
1335
1339
  }
1336
1340
  _initShortCut() {
1337
- this._shortcutService.registerShortcut(Wt);
1341
+ this._shortcutService.registerShortcut(Kt);
1338
1342
  }
1339
1343
  };
1340
- se = zr([
1341
- U(j.Ready, se),
1342
- J(1, g(On)),
1343
- J(2, W),
1344
- J(3, g(de)),
1345
- J(4, En),
1346
- J(5, g(je)),
1347
- J(6, g(wn))
1344
+ se = qr([
1345
+ T(U.Ready, se),
1346
+ X(1, g(Un)),
1347
+ X(2, F),
1348
+ X(3, g(de)),
1349
+ X(4, $n),
1350
+ X(5, g(Ue)),
1351
+ X(6, g(Hn))
1348
1352
  ], se);
1349
- var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Gr = (t, e, n, i) => {
1350
- for (var r = i > 1 ? void 0 : i ? Yr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1351
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1352
- return i && r && Kr(e, n, r), r;
1353
- }, vt = (t, e) => (n, i) => e(n, i, t);
1354
- let Ie = class extends T {
1353
+ var Jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, ei = (t, e, n, r) => {
1354
+ for (var i = r > 1 ? void 0 : r ? Qr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1355
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1356
+ return r && i && Jr(e, n, i), i;
1357
+ }, vt = (t, e) => (n, r) => e(n, r, t);
1358
+ let Le = class extends O {
1355
1359
  constructor(t, e) {
1356
1360
  super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1357
1361
  }
1358
1362
  // eslint-disable-next-line max-lines-per-function
1359
1363
  _initAutoFill() {
1360
- const t = () => ({ redos: [], undos: [] }), e = (i, r) => {
1361
- const { source: s, target: o, unitId: c, subUnitId: a } = i, p = Ye([s, o]), [h, v] = p.ranges, { mapFunc: l } = p, f = {
1364
+ const t = () => ({ redos: [], undos: [] }), e = (r, i) => {
1365
+ const { source: s, target: o, unitId: c, subUnitId: a } = r, p = Ye([s, o]), [h, _] = p.ranges, { mapFunc: l } = p, f = {
1362
1366
  row: h.startRow,
1363
1367
  col: h.startColumn
1364
- }, L = _n(h, v), y = [], S = [];
1368
+ }, L = bn(h, _), y = [], S = [];
1365
1369
  return L.forEach((I) => {
1366
- const _ = I.repeatStartCell, Y = I.relativeRange, N = {
1370
+ const v = I.repeatStartCell, K = I.relativeRange, N = {
1367
1371
  startRow: f.row,
1368
1372
  startColumn: f.col,
1369
1373
  endColumn: f.col,
1370
1374
  endRow: f.row
1371
1375
  }, R = {
1372
- startRow: _.row,
1373
- startColumn: _.col,
1374
- endColumn: _.col,
1375
- endRow: _.row
1376
+ startRow: v.row,
1377
+ startColumn: v.col,
1378
+ endColumn: v.col,
1379
+ endRow: v.row
1376
1380
  };
1377
- Xe.foreach(Y, (G, V) => {
1381
+ qe.foreach(K, (Y, V) => {
1378
1382
  const Q = oe.getPositionRange(
1379
1383
  {
1380
- startRow: G,
1384
+ startRow: Y,
1381
1385
  startColumn: V,
1382
1386
  endColumn: V,
1383
- endRow: G
1387
+ endRow: Y
1384
1388
  },
1385
1389
  N
1386
1390
  ), { row: ue, col: Ne } = l(Q.startRow, Q.startColumn), ee = this._hyperLinkModel.getHyperLinkByLocation(c, a, ue, Ne);
1387
1391
  if (ee) {
1388
1392
  const u = oe.getPositionRange(
1389
1393
  {
1390
- startRow: G,
1394
+ startRow: Y,
1391
1395
  startColumn: V,
1392
1396
  endColumn: V,
1393
- endRow: G
1397
+ endRow: Y
1394
1398
  },
1395
1399
  R
1396
1400
  ), { row: m, col: C } = l(u.startRow, u.startColumn), k = ae.generateRandomId(), D = this._hyperLinkModel.getHyperLinkByLocation(c, a, m, C);
1397
1401
  D && y.push({
1398
- id: M.id,
1402
+ id: x.id,
1399
1403
  params: {
1400
1404
  unitId: c,
1401
1405
  subUnitId: a,
1402
1406
  id: D.id
1403
1407
  }
1404
- }), he.COPY === r && (y.push({
1405
- id: x.id,
1408
+ }), he.COPY === i && (y.push({
1409
+ id: j.id,
1406
1410
  params: {
1407
1411
  unitId: c,
1408
1412
  subUnitId: a,
@@ -1414,14 +1418,14 @@ let Ie = class extends T {
1414
1418
  }
1415
1419
  }
1416
1420
  }), S.push({
1417
- id: M.id,
1421
+ id: x.id,
1418
1422
  params: {
1419
1423
  unitId: c,
1420
1424
  subUnitId: a,
1421
1425
  id: k
1422
1426
  }
1423
1427
  })), D && S.push({
1424
- id: x.id,
1428
+ id: j.id,
1425
1429
  params: {
1426
1430
  unitId: c,
1427
1431
  subUnitId: a,
@@ -1435,106 +1439,106 @@ let Ie = class extends T {
1435
1439
  redos: y
1436
1440
  };
1437
1441
  }, n = {
1438
- id: it,
1439
- onFillData: (i, r, s) => s === he.COPY || s === he.ONLY_FORMAT || s === he.SERIES ? e(i, s) : t()
1442
+ id: st,
1443
+ onFillData: (r, i, s) => s === he.COPY || s === he.ONLY_FORMAT || s === he.SERIES ? e(r, s) : t()
1440
1444
  };
1441
1445
  this.disposeWithMe(this._autoFillService.addHook(n));
1442
1446
  }
1443
1447
  };
1444
- Ie = Gr([
1445
- U(j.Ready, Ie),
1446
- vt(0, vn),
1447
- vt(1, g(H))
1448
- ], Ie);
1449
- var Xr = Object.defineProperty, qr = Object.getOwnPropertyDescriptor, Jr = (t, e, n, i) => {
1450
- for (var r = i > 1 ? void 0 : i ? qr(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1451
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1452
- return i && r && Xr(e, n, r), r;
1453
- }, me = (t, e) => (n, i) => e(n, i, t);
1454
- let ke = class extends T {
1455
- constructor(e, n, i, r) {
1448
+ Le = ei([
1449
+ T(U.Ready, Le),
1450
+ vt(0, kn),
1451
+ vt(1, g(w))
1452
+ ], Le);
1453
+ var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (t, e, n, r) => {
1454
+ for (var i = r > 1 ? void 0 : r ? ni(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1455
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1456
+ return r && i && ti(e, n, i), i;
1457
+ }, me = (t, e) => (n, r) => e(n, r, t);
1458
+ let Ie = class extends O {
1459
+ constructor(e, n, r, i) {
1456
1460
  super();
1457
- O(this, "_copyInfo");
1458
- this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste();
1461
+ H(this, "_copyInfo");
1462
+ this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = r, this._resolverService = i, this._initCopyPaste();
1459
1463
  }
1460
1464
  // eslint-disable-next-line max-lines-per-function
1461
1465
  _initCopyPaste() {
1462
1466
  this._sheetClipboardService.addClipboardHook({
1463
- id: it,
1464
- onBeforeCopy: (e, n, i) => this._collect(e, n, i),
1465
- onPasteCells: (e, n, i, r) => {
1466
- const { copyType: s = pt.COPY, pasteType: o } = r, { range: c } = e || {}, { range: a, unitId: p, subUnitId: h } = n;
1467
+ id: st,
1468
+ onBeforeCopy: (e, n, r) => this._collect(e, n, r),
1469
+ onPasteCells: (e, n, r, i) => {
1470
+ const { copyType: s = ht.COPY, pasteType: o } = i, { range: c } = e || {}, { range: a, unitId: p, subUnitId: h } = n;
1467
1471
  return this._generateMutations(a, { copyType: s, pasteType: o, copyRange: c, unitId: p, subUnitId: h });
1468
1472
  },
1469
1473
  onPastePlainText: (e, n) => {
1470
1474
  if (le(n)) {
1471
- let i = Vt(n);
1472
- const r = new URL(i), s = n;
1473
- r.hostname === location.hostname && r.port === location.port && r.protocol === location.protocol && r.pathname === location.pathname && r.hash && (i = r.hash);
1474
- const { range: o, unitId: c, subUnitId: a } = e, { ranges: [p], mapFunc: h } = Ye([o]), v = [], l = [];
1475
- return Xe.foreach(p, (f, L) => {
1475
+ let r = Zt(n);
1476
+ const i = new URL(r), s = n;
1477
+ i.hostname === location.hostname && i.port === location.port && i.protocol === location.protocol && i.pathname === location.pathname && i.hash && (r = i.hash);
1478
+ const { range: o, unitId: c, subUnitId: a } = e, { ranges: [p], mapFunc: h } = Ye([o]), _ = [], l = [];
1479
+ return qe.foreach(p, (f, L) => {
1476
1480
  const { row: y, col: S } = h(f, L), I = this._hyperLinkModel.getHyperLinkByLocation(c, a, y, S);
1477
- I && v.push({
1478
- id: M.id,
1481
+ I && _.push({
1482
+ id: x.id,
1479
1483
  params: {
1480
1484
  unitId: c,
1481
1485
  subUnitId: a,
1482
1486
  id: I.id
1483
1487
  }
1484
1488
  });
1485
- const _ = ae.generateRandomId();
1486
- v.push({
1487
- id: x.id,
1489
+ const v = ae.generateRandomId();
1490
+ _.push({
1491
+ id: j.id,
1488
1492
  params: {
1489
1493
  unitId: c,
1490
1494
  subUnitId: a,
1491
1495
  link: {
1492
- id: _,
1496
+ id: v,
1493
1497
  row: y,
1494
1498
  column: S,
1495
1499
  display: s,
1496
- payload: i
1500
+ payload: r
1497
1501
  }
1498
1502
  }
1499
1503
  }), l.push({
1500
- id: M.id,
1504
+ id: x.id,
1501
1505
  params: {
1502
1506
  unitId: c,
1503
1507
  subUnitId: a,
1504
- id: _
1508
+ id: v
1505
1509
  }
1506
1510
  }), I && l.push({
1507
- id: x.id,
1511
+ id: j.id,
1508
1512
  params: {
1509
1513
  unitId: c,
1510
1514
  subUnitId: a,
1511
1515
  link: I
1512
1516
  }
1513
1517
  });
1514
- }), { redos: v, undos: l };
1518
+ }), { redos: _, undos: l };
1515
1519
  }
1516
1520
  return { undos: [], redos: [] };
1517
1521
  }
1518
1522
  });
1519
1523
  }
1520
- _collect(e, n, i) {
1521
- const r = new yt();
1524
+ _collect(e, n, r) {
1525
+ const i = new St();
1522
1526
  this._copyInfo = {
1523
1527
  unitId: e,
1524
1528
  subUnitId: n,
1525
- matrix: r
1529
+ matrix: i
1526
1530
  };
1527
1531
  const s = {
1528
1532
  get: this._injector.get.bind(this._injector)
1529
- }, o = yn(i, s, e, n);
1533
+ }, o = Rn(r, s, e, n);
1530
1534
  if (!o)
1531
1535
  return;
1532
1536
  const { rows: c, cols: a } = o;
1533
1537
  c.forEach((p, h) => {
1534
- a.forEach((v, l) => {
1538
+ a.forEach((_, l) => {
1535
1539
  var L;
1536
- const f = this._hyperLinkModel.getHyperLinkByLocation(e, n, p, v);
1537
- r.setValue(h, l, (L = f == null ? void 0 : f.id) != null ? L : "");
1540
+ const f = this._hyperLinkModel.getHyperLinkByLocation(e, n, p, _);
1541
+ i.setValue(h, l, (L = f == null ? void 0 : f.id) != null ? L : "");
1538
1542
  });
1539
1543
  });
1540
1544
  }
@@ -1542,7 +1546,7 @@ let ke = class extends T {
1542
1546
  _generateMutations(e, n) {
1543
1547
  if (!this._copyInfo)
1544
1548
  return { redos: [], undos: [] };
1545
- if (n.copyType === pt.CUT)
1549
+ if (n.copyType === ht.CUT)
1546
1550
  return this._copyInfo = null, { redos: [], undos: [] };
1547
1551
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1548
1552
  return { redos: [], undos: [] };
@@ -1550,13 +1554,13 @@ let ke = class extends T {
1550
1554
  We.SPECIAL_PASTE_COL_WIDTH,
1551
1555
  We.SPECIAL_PASTE_VALUE,
1552
1556
  We.SPECIAL_PASTE_FORMAT,
1553
- Dn
1557
+ Zn
1554
1558
  ].includes(
1555
1559
  n.pasteType
1556
1560
  ))
1557
1561
  return { redos: [], undos: [] };
1558
- const { unitId: i, subUnitId: r } = this._copyInfo, s = [], o = [], { ranges: [c, a], mapFunc: p } = Ye([n.copyRange, e]);
1559
- return Sn(c, a, !0).forEach(({ startRange: v }) => {
1562
+ const { unitId: r, subUnitId: i } = this._copyInfo, s = [], o = [], { ranges: [c, a], mapFunc: p } = Ye([n.copyRange, e]);
1563
+ return Pn(c, a, !0).forEach(({ startRange: _ }) => {
1560
1564
  var l;
1561
1565
  (l = this._copyInfo) == null || l.matrix.forValue((f, L, y) => {
1562
1566
  const S = oe.getPositionRange(
@@ -1566,36 +1570,36 @@ let ke = class extends T {
1566
1570
  startColumn: L,
1567
1571
  endColumn: L
1568
1572
  },
1569
- v
1570
- ), I = this._hyperLinkModel.getHyperLink(i, r, y), { row: _, col: Y } = p(S.startRow, S.startColumn), N = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, _, Y), R = ae.generateRandomId();
1573
+ _
1574
+ ), I = this._hyperLinkModel.getHyperLink(r, i, y), { row: v, col: K } = p(S.startRow, S.startColumn), N = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, v, K), R = ae.generateRandomId();
1571
1575
  N && s.push({
1572
- id: M.id,
1576
+ id: x.id,
1573
1577
  params: {
1574
1578
  unitId: n.unitId,
1575
1579
  subUnitId: n.subUnitId,
1576
1580
  id: N.id
1577
1581
  }
1578
1582
  }), I && (s.push({
1579
- id: x.id,
1583
+ id: j.id,
1580
1584
  params: {
1581
1585
  unitId: n.unitId,
1582
1586
  subUnitId: n.subUnitId,
1583
1587
  link: {
1584
1588
  ...I,
1585
1589
  id: R,
1586
- row: _,
1587
- column: Y
1590
+ row: v,
1591
+ column: K
1588
1592
  }
1589
1593
  }
1590
1594
  }), o.push({
1591
- id: M.id,
1595
+ id: x.id,
1592
1596
  params: {
1593
1597
  unitId: n.unitId,
1594
1598
  subUnitId: n.subUnitId,
1595
1599
  id: R
1596
1600
  }
1597
1601
  })), N && o.push({
1598
- id: x.id,
1602
+ id: j.id,
1599
1603
  params: {
1600
1604
  unitId: n.unitId,
1601
1605
  subUnitId: n.subUnitId,
@@ -1609,19 +1613,19 @@ let ke = class extends T {
1609
1613
  };
1610
1614
  }
1611
1615
  };
1612
- ke = Jr([
1613
- U(j.Ready, ke),
1614
- me(0, Cn),
1615
- me(1, g(H)),
1616
- me(2, g(je)),
1616
+ Ie = ri([
1617
+ T(U.Ready, Ie),
1618
+ me(0, On),
1619
+ me(1, g(w)),
1620
+ me(2, g(Ue)),
1617
1621
  me(3, g(B))
1618
- ], ke);
1619
- var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (t, e, n, i) => {
1620
- for (var r = i > 1 ? void 0 : i ? ei(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1621
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1622
- return i && r && Qr(e, n, r), r;
1623
- }, ni = (t, e) => (n, i) => e(n, i, t);
1624
- let be = class extends T {
1622
+ ], Ie);
1623
+ var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, oi = (t, e, n, r) => {
1624
+ for (var i = r > 1 ? void 0 : r ? si(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1625
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1626
+ return r && i && ii(e, n, i), i;
1627
+ }, ai = (t, e) => (n, r) => e(n, r, t);
1628
+ let ke = class extends O {
1625
1629
  constructor(t) {
1626
1630
  super(), this._resolverService = t, this._handleInitUrl();
1627
1631
  }
@@ -1630,88 +1634,91 @@ let be = class extends T {
1630
1634
  t && this._resolverService.parseHyperLink(t).handler();
1631
1635
  }
1632
1636
  };
1633
- be = ti([
1634
- U(j.Rendered, be),
1635
- ni(0, g(B))
1636
- ], be);
1637
- var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, si = (t, e, n, i) => {
1638
- for (var r = i > 1 ? void 0 : i ? ii(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1639
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1640
- return i && r && ri(e, n, r), r;
1641
- }, Ke = (t, e) => (n, i) => e(n, i, t);
1642
- let Re = class extends T {
1637
+ ke = oi([
1638
+ T(U.Rendered, ke),
1639
+ ai(0, g(B))
1640
+ ], ke);
1641
+ var ci = Object.defineProperty, li = Object.getOwnPropertyDescriptor, di = (t, e, n, r) => {
1642
+ for (var i = r > 1 ? void 0 : r ? li(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1643
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1644
+ return r && i && ci(e, n, i), i;
1645
+ }, Ke = (t, e) => (n, r) => e(n, r, t);
1646
+ let be = class extends O {
1643
1647
  constructor(t, e, n) {
1644
1648
  super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1645
1649
  }
1646
1650
  _commandExecutedListener() {
1647
1651
  this.disposeWithMe(
1648
1652
  this._commandService.beforeCommandExecuted((t) => {
1649
- t.id === Wt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1650
- workbookTypes: [Je],
1651
- rangeTypes: [nt],
1652
- worksheetTypes: [Qe, et, tt]
1653
+ t.id === Kt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1654
+ workbookTypes: [Qe],
1655
+ rangeTypes: [rt],
1656
+ worksheetTypes: [et, tt, nt]
1653
1657
  }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
1654
1658
  })
1655
1659
  );
1656
1660
  }
1657
1661
  };
1658
- Re = si([
1659
- U(j.Rendered, Re),
1662
+ be = di([
1663
+ T(U.Rendered, be),
1660
1664
  Ke(0, g(de)),
1661
- Ke(1, W),
1662
- Ke(2, g(Ln))
1663
- ], Re);
1664
- var oi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, ci = (t, e, n, i) => {
1665
- for (var r = i > 1 ? void 0 : i ? ai(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1666
- (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1667
- return i && r && oi(e, n, r), r;
1668
- }, li = (t, e) => (n, i) => e(n, i, t), fe;
1669
- let _t = (fe = class extends un {
1670
- constructor(t, e) {
1671
- super(t, e), this._config = t, this._injector = e;
1665
+ Ke(1, F),
1666
+ Ke(2, g(wn))
1667
+ ], be);
1668
+ var Yt = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, pi = (t, e, n) => e in t ? Yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, hi = (t, e, n, r) => {
1669
+ for (var i = r > 1 ? void 0 : r ? ui(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1670
+ (o = t[s]) && (i = (r ? o(e, n, i) : o(i)) || i);
1671
+ return r && i && Yt(e, n, i), i;
1672
+ }, yt = (t, e) => (n, r) => e(n, r, t), Gt = (t, e, n) => (pi(t, typeof e != "symbol" ? e + "" : e, n), n);
1673
+ let je = class extends on {
1674
+ constructor(t, e, n) {
1675
+ super(), this._config = t, this._injector = e, this._renderManagerService = n;
1672
1676
  }
1673
1677
  onStarting(t) {
1674
- super.onStarting(t), [
1678
+ [
1675
1679
  [B],
1676
1680
  [$],
1677
1681
  [_e],
1682
+ [ve],
1678
1683
  [ye],
1679
1684
  [Se],
1680
1685
  [Ce],
1681
- [Le],
1682
1686
  [
1683
1687
  se,
1684
1688
  {
1685
1689
  useFactory: () => this._injector.createInstance(se, this._config)
1686
1690
  }
1687
1691
  ],
1692
+ [Le],
1688
1693
  [Ie],
1689
- [ke],
1690
- [Re],
1691
- [be]
1692
- ].forEach((n) => {
1693
- t.add(n);
1694
- });
1694
+ [be],
1695
+ [ke]
1696
+ ].forEach((n) => t.add(n)), this._renderManagerService.registerRenderController(M.UNIVER_SHEET, Xe);
1695
1697
  }
1696
- }, O(fe, "pluginName", it), O(fe, "type", E.UNIVER_SHEET), fe);
1697
- _t = ci([
1698
- li(1, g(je))
1699
- ], _t);
1698
+ };
1699
+ Gt(je, "pluginName", st);
1700
+ Gt(je, "type", M.UNIVER_SHEET);
1701
+ je = hi([
1702
+ an(vn),
1703
+ yt(1, g(Ue)),
1704
+ yt(2, jt)
1705
+ ], je);
1700
1706
  export {
1701
- xe as CloseHyperLinkSidebarOperation,
1707
+ Me as CloseHyperLinkSidebarOperation,
1702
1708
  $e as InsertHyperLinkOperation,
1703
- Wt as InsertLinkShortcut,
1704
- st as OpenHyperLinkSidebarOperation,
1705
- Ce as SheetHyperLinkSetRangeController,
1706
- be as SheetHyperLinkUrlController,
1707
- Ie as SheetsHyperLinkAutoFillController,
1708
- ke as SheetsHyperLinkCopyPasteController,
1709
- Le as SheetsHyperLinkPopupController,
1709
+ Kt as InsertLinkShortcut,
1710
+ ot as OpenHyperLinkSidebarOperation,
1711
+ Se as SheetHyperLinkSetRangeController,
1712
+ ke as SheetHyperLinkUrlController,
1713
+ Le as SheetsHyperLinkAutoFillController,
1714
+ Ie as SheetsHyperLinkCopyPasteController,
1715
+ Ce as SheetsHyperLinkPopupController,
1710
1716
  $ as SheetsHyperLinkPopupService,
1711
- ye as SheetsHyperLinkRefRangeController,
1717
+ ve as SheetsHyperLinkRefRangeController,
1712
1718
  _e as SheetsHyperLinkRemoveSheetController,
1713
- Se as SheetsHyperLinkRenderController,
1719
+ Xe as SheetsHyperLinkRenderController,
1720
+ ye as SheetsHyperLinkRenderManagerController,
1714
1721
  B as SheetsHyperLinkResolverService,
1715
1722
  se as SheetsHyperLinkUIController,
1716
- _t as UniverSheetsHyperLinkUIPlugin
1723
+ je as UniverSheetsHyperLinkUIPlugin
1717
1724
  };