@univerjs/sheets-hyper-link 0.16.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,23 +1,23 @@
1
- var $e = Object.defineProperty;
2
- var Ae = (s, e, t) => e in s ? $e(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var w = (s, e, t) => Ae(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { Disposable as T, ObjectMatrix as Z, UniverInstanceType as I, IUniverInstanceService as k, CommandType as L, ICommandService as b, IUndoRedoService as Se, Tools as Y, BuildTextUtils as ee, CustomRangeType as U, TextX as ce, CellValueType as Re, sequenceExecute as G, generateRandomId as le, getBodySlice as De, Inject as M, sequenceExecuteAsync as We, isValidRange as Ie, toDisposable as Be, DisposableCollection as je, Rectangle as Fe, Range as Ke, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ye, IResourceManagerService as Ge, LocaleService as ze, DependentOn as Je, Injector as Xe, IConfigService as qe, Plugin as Qe, merge as Ze, registerDependencies as et, touchDependencies as tt } from "@univerjs/core";
5
- import { addCustomRangeBySelectionFactory as nt, deleteCustomRangeFactory as rt, replaceSelectionFactory as Ne } from "@univerjs/docs";
6
- import { SheetInterceptorService as ue, getSheetCommandTarget as j, SetRangeValuesMutation as V, SetRangeValuesUndoMutationFactory as Me, RefRangeService as Oe, SheetsSelectionsService as He, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests as st, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests as it, RemoveSheetCommand as at, handleDefaultRangeChangeWithEffectRefCommands as ot, SetRangeValuesCommand as dt, ClearSelectionContentCommand as ct, ClearSelectionAllCommand as lt, ClearSelectionFormatCommand as ut, AFTER_CELL_EDIT as pt, UniverSheetsPlugin as ht } from "@univerjs/sheets";
7
- import { Subject as gt } from "rxjs";
8
- import { deserializeRangeWithSheet as Ce, serializeRange as B, IDefinedNamesService as ft, serializeRangeWithSheet as mt } from "@univerjs/engine-formula";
9
- var _t = Object.getOwnPropertyDescriptor, yt = (s, e, t, n) => {
10
- for (var r = n > 1 ? void 0 : n ? _t(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1
+ var Ae = Object.defineProperty;
2
+ var We = (s, e, t) => e in s ? Ae(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var k = (s, e, t) => We(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Disposable as T, ObjectMatrix as ee, UniverInstanceType as I, IUniverInstanceService as w, CommandType as L, ICommandService as b, IUndoRedoService as Re, Tools as G, BuildTextUtils as te, CustomRangeType as U, TextX as ce, CellValueType as Ie, sequenceExecute as z, generateRandomId as le, getBodySlice as De, Inject as M, sequenceExecuteAsync as Be, isValidRange as Me, toDisposable as je, DisposableCollection as Fe, Rectangle as Ke, Range as Ye, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ge, IResourceManagerService as ze, LocaleService as Je, DependentOn as Xe, Injector as qe, IConfigService as Qe, Plugin as Ze, merge as et, registerDependencies as tt, touchDependencies as nt } from "@univerjs/core";
5
+ import { addCustomRangeBySelectionFactory as rt, deleteCustomRangeFactory as st, replaceSelectionFactory as Oe } from "@univerjs/docs";
6
+ import { SheetInterceptorService as ue, getSheetCommandTarget as F, SetRangeValuesMutation as V, SetRangeValuesUndoMutationFactory as Ce, RefRangeService as He, SheetsSelectionsService as xe, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests as it, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests as at, RemoveSheetCommand as ot, handleDefaultRangeChangeWithEffectRefCommands as dt, SetRangeValuesCommand as ct, ClearSelectionContentCommand as lt, ClearSelectionAllCommand as ut, ClearSelectionFormatCommand as pt, AFTER_CELL_EDIT as ht, UniverSheetsPlugin as gt } from "@univerjs/sheets";
7
+ import { Subject as ft } from "rxjs";
8
+ import { deserializeRangeWithSheet as ke, serializeRange as B, IDefinedNamesService as mt, serializeRangeWithSheet as _t } from "@univerjs/engine-formula";
9
+ var yt = Object.getOwnPropertyDescriptor, vt = (s, e, t, n) => {
10
+ for (var r = n > 1 ? void 0 : n ? yt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
11
11
  (a = s[i]) && (r = a(r) || r);
12
12
  return r;
13
- }, vt = (s, e) => (t, n) => e(t, n, s);
13
+ }, St = (s, e) => (t, n) => e(t, n, s);
14
14
  let R = class extends T {
15
15
  constructor(e) {
16
16
  super();
17
- w(this, "_linkUpdate$", new gt());
18
- w(this, "linkUpdate$", this._linkUpdate$.asObservable());
19
- w(this, "_linkMap", /* @__PURE__ */ new Map());
20
- w(this, "_linkPositionMap", /* @__PURE__ */ new Map());
17
+ k(this, "_linkUpdate$", new ft());
18
+ k(this, "linkUpdate$", this._linkUpdate$.asObservable());
19
+ k(this, "_linkMap", /* @__PURE__ */ new Map());
20
+ k(this, "_linkPositionMap", /* @__PURE__ */ new Map());
21
21
  this._univerInstanceService = e, this.disposeWithMe({
22
22
  dispose: () => {
23
23
  this._linkUpdate$.complete();
@@ -28,7 +28,7 @@ let R = class extends T {
28
28
  let n = this._linkMap.get(e);
29
29
  n || (n = /* @__PURE__ */ new Map(), this._linkMap.set(e, n));
30
30
  let r = n.get(t);
31
- r || (r = new Z(), n.set(t, r));
31
+ r || (r = new ee(), n.set(t, r));
32
32
  let i = this._linkPositionMap.get(e);
33
33
  i || (i = /* @__PURE__ */ new Map(), this._linkPositionMap.set(e, i));
34
34
  let a = i.get(t);
@@ -137,10 +137,10 @@ let R = class extends T {
137
137
  return Array.from(this._linkMap.keys()).map((t) => this.getUnit(t));
138
138
  }
139
139
  };
140
- R = yt([
141
- vt(0, k)
140
+ R = vt([
141
+ St(0, w)
142
142
  ], R);
143
- const D = {
143
+ const N = {
144
144
  type: L.MUTATION,
145
145
  id: "sheets.mutation.add-hyper-link",
146
146
  handler(s, e) {
@@ -149,7 +149,7 @@ const D = {
149
149
  const t = s.get(R), { unitId: n, subUnitId: r, link: i } = e;
150
150
  return t.addHyperLink(n, r, i);
151
151
  }
152
- }, N = {
152
+ }, D = {
153
153
  type: L.MUTATION,
154
154
  id: "sheets.mutation.remove-hyper-link",
155
155
  handler(s, e) {
@@ -158,18 +158,18 @@ const D = {
158
158
  const t = s.get(R), { unitId: n, subUnitId: r, id: i } = e;
159
159
  return t.removeHyperLink(n, r, i);
160
160
  }
161
- }, St = {
161
+ }, Rt = {
162
162
  type: L.COMMAND,
163
163
  id: "sheets.command.add-hyper-link",
164
164
  // eslint-disable-next-line max-lines-per-function
165
165
  async handler(s, e) {
166
166
  if (!e) return !1;
167
- const t = s.get(b), n = s.get(Se), r = s.get(k), i = s.get(R), a = s.get(ue), o = j(r, e);
167
+ const t = s.get(b), n = s.get(Re), r = s.get(w), i = s.get(R), a = s.get(ue), o = F(r, e);
168
168
  if (!o) return !1;
169
- const { unitId: c, subUnitId: d, workbook: l, worksheet: u } = o, { link: h } = e, { payload: g, display: p, row: f, column: m, id: _ } = h, C = u.getCell(f, m), y = u.getBlankCellDocumentModel(C, f, m), v = y.documentModel.getSnapshot(), S = Y.deepClone(v.body);
169
+ const { unitId: c, subUnitId: d, workbook: l, worksheet: u } = o, { link: h } = e, { payload: g, display: p, row: f, column: m, id: _ } = h, C = u.getCell(f, m), y = u.getBlankCellDocumentModel(C, f, m), v = y.documentModel.getSnapshot(), S = G.deepClone(v.body);
170
170
  if (!S) return !1;
171
171
  let P;
172
- if (p ? P = ee.selection.replace({
172
+ if (p ? P = te.selection.replace({
173
173
  selection: {
174
174
  startOffset: 0,
175
175
  endOffset: S.dataStream.length - 2,
@@ -189,7 +189,7 @@ const D = {
189
189
  }]
190
190
  },
191
191
  doc: y.documentModel
192
- }) : P = ee.customRange.add({
192
+ }) : P = te.customRange.add({
193
193
  body: S,
194
194
  ranges: [{ startOffset: 0, endOffset: S.dataStream.length - 2, collapsed: !1 }],
195
195
  rangeId: _,
@@ -199,12 +199,12 @@ const D = {
199
199
  refId: _
200
200
  }
201
201
  }), !P) return !1;
202
- const F = ce.apply(S, P.serialize()), O = {
202
+ const K = ce.apply(S, P.serialize()), O = {
203
203
  p: {
204
204
  ...v,
205
- body: F
205
+ body: K
206
206
  },
207
- t: Re.STRING
207
+ t: Ie.STRING
208
208
  }, A = a.onWriteCell(l, u, f, m, O), W = {
209
209
  unitId: c,
210
210
  subUnitId: d,
@@ -213,40 +213,40 @@ const D = {
213
213
  [h.column]: A
214
214
  }
215
215
  }
216
- }, pe = {
216
+ }, he = {
217
217
  id: V.id,
218
218
  params: W
219
- }, z = Me(s, W), he = {
219
+ }, J = Ce(s, W), ge = {
220
220
  id: V.id,
221
- params: z
222
- }, K = [pe], H = [he], x = i.getHyperLinkByLocation(c, d, f, m);
223
- return x && (K.push({
224
- id: N.id,
221
+ params: J
222
+ }, Y = [he], H = [ge], x = i.getHyperLinkByLocation(c, d, f, m);
223
+ return x && (Y.push({
224
+ id: D.id,
225
225
  params: {
226
226
  unitId: c,
227
227
  subUnitId: d,
228
228
  id: x.id
229
229
  }
230
230
  }), H.push({
231
- id: D.id,
231
+ id: N.id,
232
232
  params: {
233
233
  unitId: c,
234
234
  subUnitId: d,
235
235
  link: x
236
236
  }
237
- })), await G(K, t) ? await a.onValidateCell(l, u, f, m) === !1 ? (G(H, t), !1) : (n.pushUndoRedo({
238
- redoMutations: K,
237
+ })), await z(Y, t) ? await a.onValidateCell(l, u, f, m) === !1 ? (z(H, t), !1) : (n.pushUndoRedo({
238
+ redoMutations: Y,
239
239
  undoMutations: H,
240
240
  unitID: c
241
241
  }), !0) : !1;
242
242
  }
243
- }, Rt = {
243
+ }, It = {
244
244
  id: "sheets.command.add-rich-hyper-link",
245
245
  type: L.COMMAND,
246
246
  handler: async (s, e) => {
247
247
  if (!e)
248
248
  return !1;
249
- const { documentId: t, link: n } = e, r = s.get(b), i = le(), { payload: a } = n, o = nt(s, {
249
+ const { documentId: t, link: n } = e, r = s.get(b), i = le(), { payload: a } = n, o = rt(s, {
250
250
  unitId: t,
251
251
  rangeId: i,
252
252
  rangeType: U.HYPERLINK,
@@ -257,22 +257,22 @@ const D = {
257
257
  });
258
258
  return o ? r.syncExecuteCommand(o.id, o.params) : !1;
259
259
  }
260
- }, It = {
260
+ }, Mt = {
261
261
  type: L.COMMAND,
262
262
  id: "sheets.command.cancel-hyper-link",
263
263
  // eslint-disable-next-line max-lines-per-function
264
264
  handler(s, e) {
265
265
  var O, A;
266
266
  if (!e) return !1;
267
- const t = s.get(b), n = s.get(Se), r = s.get(k), i = s.get(R), a = j(r, e);
267
+ const t = s.get(b), n = s.get(Re), r = s.get(w), i = s.get(R), a = F(r, e);
268
268
  if (!a) return !1;
269
269
  const { row: o, column: c, id: d } = e, { unitId: l, subUnitId: u, worksheet: h } = a, g = h.getCell(o, c);
270
270
  if (!g) return !1;
271
271
  const p = h.getCellDocumentModelWithFormula(g, o, c);
272
272
  if (!(p != null && p.documentModel)) return !1;
273
- const f = Y.deepClone(p.documentModel.getSnapshot()), m = (A = (O = f.body) == null ? void 0 : O.customRanges) == null ? void 0 : A.find((W) => `${W.rangeId}` === d);
273
+ const f = G.deepClone(p.documentModel.getSnapshot()), m = (A = (O = f.body) == null ? void 0 : O.customRanges) == null ? void 0 : A.find((W) => `${W.rangeId}` === d);
274
274
  if (!m) return !1;
275
- const _ = ee.customRange.delete({ documentDataModel: p.documentModel, rangeId: m.rangeId });
275
+ const _ = te.customRange.delete({ documentDataModel: p.documentModel, rangeId: m.rangeId });
276
276
  if (!_) return !1;
277
277
  const C = ce.apply(f.body, _.serialize()), y = [], v = [], S = {
278
278
  unitId: l,
@@ -284,7 +284,7 @@ const D = {
284
284
  ...f,
285
285
  body: C
286
286
  },
287
- t: Re.STRING
287
+ t: Ie.STRING
288
288
  }
289
289
  }
290
290
  }
@@ -293,57 +293,57 @@ const D = {
293
293
  id: V.id,
294
294
  params: S
295
295
  });
296
- const P = Me(s, S);
296
+ const P = Ce(s, S);
297
297
  v.push({
298
298
  id: V.id,
299
299
  params: P
300
300
  });
301
- const F = i.getHyperLinkByLocation(l, u, o, c);
302
- return F && (y.push({
303
- id: N.id,
301
+ const K = i.getHyperLinkByLocation(l, u, o, c);
302
+ return K && (y.push({
303
+ id: D.id,
304
304
  params: {
305
305
  unitId: l,
306
306
  subUnitId: u,
307
307
  id: d
308
308
  }
309
309
  }), v.push({
310
- id: D.id,
310
+ id: N.id,
311
311
  params: {
312
312
  unitId: l,
313
313
  subUnitId: u,
314
314
  link: {
315
- ...F
315
+ ...K
316
316
  }
317
317
  }
318
- })), G(y, t).result ? (n.pushUndoRedo({
318
+ })), z(y, t).result ? (n.pushUndoRedo({
319
319
  redoMutations: y,
320
320
  undoMutations: v,
321
321
  unitID: l
322
322
  }), !0) : !1;
323
323
  }
324
- }, Mt = {
324
+ }, Ct = {
325
325
  type: L.COMMAND,
326
326
  id: "sheets.command.cancel-rich-hyper-link",
327
327
  handler(s, e) {
328
328
  var l, u;
329
329
  if (!e)
330
330
  return !1;
331
- const { id: t, documentId: n } = e, r = s.get(b), a = s.get(k).getUnit(n, I.UNIVER_DOC), o = (u = (l = a == null ? void 0 : a.getBody()) == null ? void 0 : l.customRanges) == null ? void 0 : u.find((h) => h.rangeId === t);
331
+ const { id: t, documentId: n } = e, r = s.get(b), a = s.get(w).getUnit(n, I.UNIVER_DOC), o = (u = (l = a == null ? void 0 : a.getBody()) == null ? void 0 : l.customRanges) == null ? void 0 : u.find((h) => h.rangeId === t);
332
332
  let c = null;
333
333
  o && o.endIndex === a.getBody().dataStream.length - 3 && (c = {
334
334
  dataStream: " "
335
335
  });
336
- const d = rt(s, { unitId: n, rangeId: t, insert: c });
336
+ const d = st(s, { unitId: n, rangeId: t, insert: c });
337
337
  return d ? r.syncExecuteCommand(d.id, d.params) : !1;
338
338
  }
339
- }, Ct = {
339
+ }, kt = {
340
340
  type: L.COMMAND,
341
341
  id: "sheets.command.update-hyper-link",
342
342
  // eslint-disable-next-line max-lines-per-function
343
343
  async handler(s, e) {
344
- var we, ke, Le;
344
+ var we, Le, Ee;
345
345
  if (!e) return !1;
346
- const t = s.get(b), n = s.get(Se), r = s.get(k), i = s.get(R), a = s.get(ue), o = j(r, {
346
+ const t = s.get(b), n = s.get(Re), r = s.get(w), i = s.get(R), a = s.get(ue), o = F(r, {
347
347
  unitId: e.unitId,
348
348
  subUnitId: e.subUnitId
349
349
  });
@@ -352,11 +352,11 @@ const D = {
352
352
  if (!C) return !1;
353
353
  const y = g.getCellDocumentModelWithFormula(C, d, l);
354
354
  if (!(y != null && y.documentModel)) return !1;
355
- const v = y.documentModel.getSnapshot(), S = (ke = (we = v.body) == null ? void 0 : we.customRanges) == null ? void 0 : ke.find((Ee) => `${Ee.rangeId}` === u);
355
+ const v = y.documentModel.getSnapshot(), S = (Le = (we = v.body) == null ? void 0 : we.customRanges) == null ? void 0 : Le.find((Ue) => `${Ue.rangeId}` === u);
356
356
  if (!S) return !1;
357
- const P = le(), $ = (Le = De(y.documentModel.getBody(), S.startIndex, S.endIndex + 1).textRuns) == null ? void 0 : Le[0];
357
+ const P = le(), $ = (Ee = De(y.documentModel.getBody(), S.startIndex, S.endIndex + 1).textRuns) == null ? void 0 : Ee[0];
358
358
  $ && ($.ed = _.length + 1);
359
- const O = Ne(s, {
359
+ const O = Oe(s, {
360
360
  unitId: p,
361
361
  body: {
362
362
  dataStream: `${_}`,
@@ -380,42 +380,42 @@ const D = {
380
380
  });
381
381
  if (!O)
382
382
  return !1;
383
- const A = ce.apply(Y.deepClone(v.body), O.textX.serialize()), W = {
383
+ const A = ce.apply(G.deepClone(v.body), O.textX.serialize()), W = {
384
384
  p: {
385
385
  ...v,
386
386
  body: A
387
387
  },
388
- t: Re.STRING
389
- }, pe = a.onWriteCell(h, g, d, l, W), z = {
388
+ t: Ie.STRING
389
+ }, he = a.onWriteCell(h, g, d, l, W), J = {
390
390
  id: V.id,
391
391
  params: {
392
392
  unitId: p,
393
393
  subUnitId: f,
394
394
  cellValue: {
395
395
  [d]: {
396
- [l]: pe
396
+ [l]: he
397
397
  }
398
398
  }
399
399
  }
400
- }, he = Me(s, z.params), K = {
400
+ }, ge = Ce(s, J.params), Y = {
401
401
  id: V.id,
402
- params: he
403
- }, H = [z], x = [K], J = i.getHyperLinkByLocation(p, f, d, l);
404
- return J && (H.push({
405
- id: N.id,
402
+ params: ge
403
+ }, H = [J], x = [Y], X = i.getHyperLinkByLocation(p, f, d, l);
404
+ return X && (H.push({
405
+ id: D.id,
406
406
  params: {
407
407
  unitId: p,
408
408
  subUnitId: f,
409
- id: J.id
409
+ id: X.id
410
410
  }
411
411
  }), x.push({
412
- id: D.id,
412
+ id: N.id,
413
413
  params: {
414
414
  unitId: p,
415
415
  subUnitId: f,
416
- link: J
416
+ link: X
417
417
  }
418
- })), G(H, t) ? await a.onValidateCell(h, g, d, l) === !1 ? (G(x, t), !1) : (n.pushUndoRedo({
418
+ })), z(H, t) ? await a.onValidateCell(h, g, d, l) === !1 ? (z(x, t), !1) : (n.pushUndoRedo({
419
419
  redoMutations: H,
420
420
  undoMutations: x,
421
421
  unitID: p
@@ -428,7 +428,7 @@ const D = {
428
428
  var p, f, m, _;
429
429
  if (!e)
430
430
  return !1;
431
- const { documentId: t, payload: n, id: r } = e, i = s.get(k), a = s.get(b), o = i.getUnit(t, I.UNIVER_DOC);
431
+ const { documentId: t, payload: n, id: r } = e, i = s.get(w), a = s.get(b), o = i.getUnit(t, I.UNIVER_DOC);
432
432
  if (!o)
433
433
  return !1;
434
434
  const c = (f = (p = o.getBody()) == null ? void 0 : p.customRanges) == null ? void 0 : f.find((C) => C.rangeId === r);
@@ -436,7 +436,7 @@ const D = {
436
436
  return !1;
437
437
  const d = (m = e.payload.display) != null ? m : "", l = le(), h = (_ = De(o.getBody(), c.startIndex, c.endIndex + 1).textRuns) == null ? void 0 : _[0];
438
438
  h && (h.ed = d.length + 1);
439
- const g = Ne(s, {
439
+ const g = Oe(s, {
440
440
  unitId: t,
441
441
  body: {
442
442
  dataStream: `${d}`,
@@ -460,7 +460,7 @@ const D = {
460
460
  });
461
461
  return g ? a.syncExecuteCommand(g.id, g.params) : !1;
462
462
  }
463
- }, _e = {
463
+ }, ye = {
464
464
  type: L.MUTATION,
465
465
  id: "sheets.mutation.update-hyper-link",
466
466
  handler(s, e) {
@@ -469,7 +469,7 @@ const D = {
469
469
  const t = s.get(R), { unitId: n, subUnitId: r, payload: i, id: a } = e;
470
470
  return t.updateHyperLink(n, r, a, i, !1);
471
471
  }
472
- }, ye = {
472
+ }, ve = {
473
473
  type: L.MUTATION,
474
474
  id: "sheets.mutation.update-hyper-link-ref",
475
475
  handler(s, e) {
@@ -478,33 +478,36 @@ const D = {
478
478
  const t = s.get(R), { unitId: n, subUnitId: r, id: i, row: a, column: o, silent: c } = e;
479
479
  return t.updateHyperLinkRef(n, r, i, { row: a, column: o }, c);
480
480
  }
481
- }, Q = {
481
+ }, Z = {
482
482
  type: L.MUTATION,
483
483
  id: "sheets.mutation.update-rich-hyper-link",
484
484
  handler(s, e) {
485
485
  var g, p, f;
486
486
  if (!e)
487
487
  return !1;
488
- const { unitId: t, subUnitId: n, row: r, col: i, id: a, url: o } = e, c = s.get(k), d = j(c, { unitId: t, subUnitId: n });
488
+ const { unitId: t, subUnitId: n, row: r, col: i, id: a, url: o } = e, c = s.get(w), d = F(c, { unitId: t, subUnitId: n });
489
489
  if (!d)
490
490
  return !1;
491
491
  const { worksheet: l } = d, u = l.getCellRaw(r, i), h = (f = (p = (g = u == null ? void 0 : u.p) == null ? void 0 : g.body) == null ? void 0 : p.customRanges) == null ? void 0 : f.find((m) => m.rangeType === U.HYPERLINK && m.rangeId === a);
492
492
  return h && (h.properties.url = o), !0;
493
493
  }
494
- }, kt = "sheets-hyper-link.config", Ue = {}, xe = "SHEET_HYPER_LINK_PLUGIN", te = "err";
495
- var Lt = Object.getOwnPropertyDescriptor, Et = (s, e, t, n) => {
496
- for (var r = n > 1 ? void 0 : n ? Lt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
494
+ }, Lt = "@univerjs/sheets-hyper-link", Et = "0.17.0", Ve = {
495
+ name: Lt,
496
+ version: Et
497
+ }, Ut = "sheets-hyper-link.config", be = {}, Te = "SHEET_HYPER_LINK_PLUGIN", ne = "err";
498
+ var bt = Object.getOwnPropertyDescriptor, Pt = (s, e, t, n) => {
499
+ for (var r = n > 1 ? void 0 : n ? bt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
497
500
  (a = s[i]) && (r = a(r) || r);
498
501
  return r;
499
- }, X = (s, e) => (t, n) => e(t, n, s);
500
- let ne = class extends T {
502
+ }, q = (s, e) => (t, n) => e(t, n, s);
503
+ let re = class extends T {
501
504
  constructor(e, t, n, r) {
502
505
  super();
503
- w(this, "_disposableMap", /* @__PURE__ */ new Map());
504
- w(this, "_watchDisposableMap", /* @__PURE__ */ new Map());
505
- w(this, "_rangeDisableMap", /* @__PURE__ */ new Map());
506
- w(this, "_rangeWatcherMap", /* @__PURE__ */ new Map());
507
- w(this, "_handlePositionChange", (e, t, n, r, i) => {
506
+ k(this, "_disposableMap", /* @__PURE__ */ new Map());
507
+ k(this, "_watchDisposableMap", /* @__PURE__ */ new Map());
508
+ k(this, "_rangeDisableMap", /* @__PURE__ */ new Map());
509
+ k(this, "_rangeWatcherMap", /* @__PURE__ */ new Map());
510
+ k(this, "_handlePositionChange", (e, t, n, r, i) => {
508
511
  const a = {
509
512
  startColumn: n.column,
510
513
  endColumn: n.column,
@@ -513,7 +516,7 @@ let ne = class extends T {
513
516
  };
514
517
  return r ? {
515
518
  redos: [{
516
- id: ye.id,
519
+ id: ve.id,
517
520
  params: {
518
521
  unitId: e,
519
522
  subUnitId: t,
@@ -524,7 +527,7 @@ let ne = class extends T {
524
527
  }
525
528
  }],
526
529
  undos: [{
527
- id: ye.id,
530
+ id: ve.id,
528
531
  params: {
529
532
  unitId: e,
530
533
  subUnitId: t,
@@ -536,7 +539,7 @@ let ne = class extends T {
536
539
  }]
537
540
  } : {
538
541
  redos: [{
539
- id: N.id,
542
+ id: D.id,
540
543
  params: {
541
544
  unitId: e,
542
545
  subUnitId: t,
@@ -544,7 +547,7 @@ let ne = class extends T {
544
547
  }
545
548
  }],
546
549
  undos: [{
547
- id: D.id,
550
+ id: N.id,
548
551
  params: {
549
552
  unitId: e,
550
553
  subUnitId: t,
@@ -562,7 +565,7 @@ let ne = class extends T {
562
565
  startRow: n.row,
563
566
  endRow: n.row
564
567
  }, a = (o) => {
565
- const c = st(i, o, { selectionManagerService: this._selectionManagerService }), d = Array.isArray(c) ? c[0] : c;
568
+ const c = it(i, o, { selectionManagerService: this._selectionManagerService }), d = Array.isArray(c) ? c[0] : c;
566
569
  return d && d.startColumn === i.startColumn && d.startRow === i.startRow ? {
567
570
  undos: [],
568
571
  redos: []
@@ -579,7 +582,7 @@ let ne = class extends T {
579
582
  };
580
583
  this._watchDisposableMap.set(r, this._refRangeService.watchRange(e, t, i, (a, o) => {
581
584
  const { redos: c } = this._handlePositionChange(e, t, n, o, !0);
582
- We(c, this._commandService, { onlyLocal: !0 });
585
+ Be(c, this._commandService, { onlyLocal: !0 });
583
586
  }, !0));
584
587
  }
585
588
  _unregisterPosition(e) {
@@ -599,16 +602,16 @@ let ne = class extends T {
599
602
  rangeid: (o = c.get("rangeid")) != null ? o : ""
600
603
  };
601
604
  if (d.range && d.gid) {
602
- const l = d.gid, u = Ce(d.range).range;
603
- if (Ie(u) && d.range !== te) {
605
+ const l = d.gid, u = ke(d.range).range;
606
+ if (Me(u) && d.range !== ne) {
604
607
  const h = (g) => {
605
- const p = it(u, g, { selectionManagerService: this._selectionManagerService });
608
+ const p = at(u, g, { selectionManagerService: this._selectionManagerService });
606
609
  return p && B(p) === B(u) ? {
607
610
  redos: [],
608
611
  undos: []
609
612
  } : {
610
613
  redos: [{
611
- id: _e.id,
614
+ id: ye.id,
612
615
  params: {
613
616
  unitId: e,
614
617
  subUnitId: l,
@@ -619,7 +622,7 @@ let ne = class extends T {
619
622
  }
620
623
  }],
621
624
  undos: [{
622
- id: _e.id,
625
+ id: ye.id,
623
626
  params: {
624
627
  unitId: e,
625
628
  subUnitId: l,
@@ -693,25 +696,25 @@ let ne = class extends T {
693
696
  }
694
697
  }
695
698
  })
696
- ), this.disposeWithMe(Be(() => {
699
+ ), this.disposeWithMe(je(() => {
697
700
  this._disposableMap.forEach((e) => {
698
701
  e.dispose();
699
702
  }), this._disposableMap.clear();
700
703
  }));
701
704
  }
702
705
  };
703
- ne = Et([
704
- X(0, M(Oe)),
705
- X(1, M(R)),
706
- X(2, M(He)),
707
- X(3, b)
708
- ], ne);
709
- var Ut = Object.getOwnPropertyDescriptor, bt = (s, e, t, n) => {
710
- for (var r = n > 1 ? void 0 : n ? Ut(e, t) : e, i = s.length - 1, a; i >= 0; i--)
706
+ re = Pt([
707
+ q(0, M(He)),
708
+ q(1, M(R)),
709
+ q(2, M(xe)),
710
+ q(3, b)
711
+ ], re);
712
+ var Nt = Object.getOwnPropertyDescriptor, Dt = (s, e, t, n) => {
713
+ for (var r = n > 1 ? void 0 : n ? Nt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
711
714
  (a = s[i]) && (r = a(r) || r);
712
715
  return r;
713
- }, ge = (s, e) => (t, n) => e(t, n, s);
714
- let re = class extends T {
716
+ }, fe = (s, e) => (t, n) => e(t, n, s);
717
+ let se = class extends T {
715
718
  constructor(s, e, t) {
716
719
  super(), this._sheetInterceptorService = s, this._univerInstanceService = e, this._hyperLinkModel = t, this._initSheetChange();
717
720
  }
@@ -720,7 +723,7 @@ let re = class extends T {
720
723
  this._sheetInterceptorService.interceptCommand({
721
724
  getMutations: (s) => {
722
725
  var e;
723
- if (s.id === at.id) {
726
+ if (s.id === ot.id) {
724
727
  const t = s.params, n = t.unitId ? this._univerInstanceService.getUnit(t.unitId) : this._univerInstanceService.getCurrentUnitForType(I.UNIVER_SHEET);
725
728
  if (!n)
726
729
  return { redos: [], undos: [] };
@@ -728,14 +731,14 @@ let re = class extends T {
728
731
  if (!i)
729
732
  return { redos: [], undos: [] };
730
733
  const a = this._hyperLinkModel.getSubUnit(r, i), o = a.map((d) => ({
731
- id: N.id,
734
+ id: D.id,
732
735
  params: {
733
736
  unitId: r,
734
737
  subUnitId: i,
735
738
  id: d.id
736
739
  }
737
740
  })), c = a.map((d) => ({
738
- id: D.id,
741
+ id: N.id,
739
742
  params: {
740
743
  unitId: r,
741
744
  subUnitId: i,
@@ -750,27 +753,27 @@ let re = class extends T {
750
753
  );
751
754
  }
752
755
  };
753
- re = bt([
754
- ge(0, M(ue)),
755
- ge(1, k),
756
- ge(2, M(R))
757
- ], re);
758
- var Pt = Object.getOwnPropertyDescriptor, Dt = (s, e, t, n) => {
759
- for (var r = n > 1 ? void 0 : n ? Pt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
756
+ se = Dt([
757
+ fe(0, M(ue)),
758
+ fe(1, w),
759
+ fe(2, M(R))
760
+ ], se);
761
+ var Ot = Object.getOwnPropertyDescriptor, Ht = (s, e, t, n) => {
762
+ for (var r = n > 1 ? void 0 : n ? Ot(e, t) : e, i = s.length - 1, a; i >= 0; i--)
760
763
  (a = s[i]) && (r = a(r) || r);
761
764
  return r;
762
- }, fe = (s, e) => (t, n) => e(t, n, s);
763
- let se = class extends T {
765
+ }, me = (s, e) => (t, n) => e(t, n, s);
766
+ let ie = class extends T {
764
767
  constructor(e, t, n) {
765
768
  super();
766
- w(this, "_refRangeMap", /* @__PURE__ */ new Map());
769
+ k(this, "_refRangeMap", /* @__PURE__ */ new Map());
767
770
  this._commandService = e, this._univerInstanceService = t, this._refRangeService = n, this._initWorkbookLoad(), this._initWorkbookUnload(), this._initSetRangesListener();
768
771
  }
769
772
  _enusreMap(e, t) {
770
773
  let n = this._refRangeMap.get(e);
771
774
  n || (n = /* @__PURE__ */ new Map(), this._refRangeMap.set(e, n));
772
775
  let r = n.get(t);
773
- return r || (r = new Z(), n.set(t, r)), r;
776
+ return r || (r = new ee(), n.set(t, r)), r;
774
777
  }
775
778
  _isLegalRangeUrl(e, t) {
776
779
  var r, i, a;
@@ -787,8 +790,8 @@ let se = class extends T {
787
790
  const d = c.gid, l = n.getSheetBySheetId(d);
788
791
  if (!l)
789
792
  return null;
790
- const u = Ce(c.range).range;
791
- if (Ie(u, l) && c.range !== te)
793
+ const u = ke(c.range).range;
794
+ if (Me(u, l) && c.range !== ne)
792
795
  return {
793
796
  range: u,
794
797
  worksheet: l
@@ -804,7 +807,7 @@ let se = class extends T {
804
807
  var h;
805
808
  return u.rangeType === U.HYPERLINK && this._isLegalRangeUrl(e, (h = u.properties) == null ? void 0 : h.url);
806
809
  })) {
807
- const u = new je();
810
+ const u = new Fe();
808
811
  let h = !1;
809
812
  (l = (d = i.body) == null ? void 0 : d.customRanges) == null || l.forEach((g) => {
810
813
  var p;
@@ -816,26 +819,26 @@ let se = class extends T {
816
819
  this._refRangeService.registerRefRange(
817
820
  _,
818
821
  (y) => {
819
- const v = ot(_, y);
820
- return v && Fe.equals(v, _) ? {
822
+ const v = dt(_, y);
823
+ return v && Ke.equals(v, _) ? {
821
824
  preRedos: [],
822
825
  preUndos: [],
823
826
  redos: [],
824
827
  undos: []
825
828
  } : {
826
829
  preRedos: [{
827
- id: Q.id,
830
+ id: Z.id,
828
831
  params: {
829
832
  unitId: e,
830
833
  subUnitId: t,
831
834
  row: n,
832
835
  col: r,
833
836
  id: g.rangeId,
834
- url: `#gid=${t}&range=${v ? B(v) : te}`
837
+ url: `#gid=${t}&range=${v ? B(v) : ne}`
835
838
  }
836
839
  }],
837
840
  undos: [{
838
- id: Q.id,
841
+ id: Z.id,
839
842
  params: {
840
843
  unitId: e,
841
844
  subUnitId: t,
@@ -896,7 +899,7 @@ let se = class extends T {
896
899
  this._commandService.onCommandExecuted((e) => {
897
900
  if (e.id === V.id) {
898
901
  const t = e.params, { unitId: n, subUnitId: r, cellValue: i } = t, a = this._enusreMap(n, r);
899
- i && new Z(i).forValue((o, c, d) => {
902
+ i && new ee(i).forValue((o, c, d) => {
900
903
  const l = a.getValue(o, c);
901
904
  l && l.dispose(), d && d.p && this._registerRange(n, r, o, c, d.p);
902
905
  });
@@ -904,8 +907,8 @@ let se = class extends T {
904
907
  })
905
908
  ), this.disposeWithMe(
906
909
  this._commandService.onCommandExecuted((e) => {
907
- if (e.id === Q.id) {
908
- const t = e.params, { unitId: n, subUnitId: r, row: i, col: a } = t, o = j(this._univerInstanceService, { unitId: n, subUnitId: r }), d = this._enusreMap(n, r).getValue(i, a);
910
+ if (e.id === Z.id) {
911
+ const t = e.params, { unitId: n, subUnitId: r, row: i, col: a } = t, o = F(this._univerInstanceService, { unitId: n, subUnitId: r }), d = this._enusreMap(n, r).getValue(i, a);
909
912
  if (d && d.dispose(), o) {
910
913
  const { worksheet: l } = o, u = l.getCellRaw(i, a);
911
914
  u && u.p && this._registerRange(n, r, i, a, u.p);
@@ -915,17 +918,17 @@ let se = class extends T {
915
918
  );
916
919
  }
917
920
  };
918
- se = Dt([
919
- fe(0, b),
920
- fe(1, k),
921
- fe(2, M(Oe))
922
- ], se);
923
- var Nt = Object.getOwnPropertyDescriptor, Ot = (s, e, t, n) => {
924
- for (var r = n > 1 ? void 0 : n ? Nt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
921
+ ie = Ht([
922
+ me(0, b),
923
+ me(1, w),
924
+ me(2, M(He))
925
+ ], ie);
926
+ var xt = Object.getOwnPropertyDescriptor, Vt = (s, e, t, n) => {
927
+ for (var r = n > 1 ? void 0 : n ? xt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
925
928
  (a = s[i]) && (r = a(r) || r);
926
929
  return r;
927
- }, q = (s, e) => (t, n) => e(t, n, s);
928
- let ie = class extends T {
930
+ }, Q = (s, e) => (t, n) => e(t, n, s);
931
+ let ae = class extends T {
929
932
  constructor(s, e, t, n) {
930
933
  super(), this._sheetInterceptorService = s, this._hyperLinkModel = e, this._selectionManagerService = t, this._univerInstanceService = n, this._initCommandInterceptor(), this._initAfterEditor();
931
934
  }
@@ -935,19 +938,19 @@ let ie = class extends T {
935
938
  _initSetRangeValuesCommandInterceptor() {
936
939
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
937
940
  getMutations: (s) => {
938
- if (s.id === dt.id) {
941
+ if (s.id === ct.id) {
939
942
  const e = s.params, { unitId: t, subUnitId: n } = e, r = [], i = [];
940
- return e.cellValue && new Z(e.cellValue).forValue((a, o) => {
943
+ return e.cellValue && new ee(e.cellValue).forValue((a, o) => {
941
944
  const c = this._hyperLinkModel.getHyperLinkByLocation(t, n, a, o);
942
945
  c && (r.push({
943
- id: N.id,
946
+ id: D.id,
944
947
  params: {
945
948
  unitId: t,
946
949
  subUnitId: n,
947
950
  id: c.id
948
951
  }
949
952
  }), i.push({
950
- id: D.id,
953
+ id: N.id,
951
954
  params: {
952
955
  unitId: t,
953
956
  subUnitId: n,
@@ -969,21 +972,21 @@ let ie = class extends T {
969
972
  _initClearSelectionCommandInterceptor() {
970
973
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
971
974
  getMutations: (s) => {
972
- if (s.id === ct.id || s.id === lt.id || s.id === ut.id) {
973
- const e = [], t = [], n = this._selectionManagerService.getCurrentLastSelection(), r = j(this._univerInstanceService, s.params);
975
+ if (s.id === lt.id || s.id === ut.id || s.id === pt.id) {
976
+ const e = [], t = [], n = this._selectionManagerService.getCurrentLastSelection(), r = F(this._univerInstanceService, s.params);
974
977
  if (n && r) {
975
978
  const { unitId: i, subUnitId: a } = r;
976
- Ke.foreach(n.range, (o, c) => {
979
+ Ye.foreach(n.range, (o, c) => {
977
980
  const d = this._hyperLinkModel.getHyperLinkByLocation(i, a, o, c);
978
981
  d && (e.push({
979
- id: N.id,
982
+ id: D.id,
980
983
  params: {
981
984
  unitId: i,
982
985
  subUnitId: a,
983
986
  id: d.id
984
987
  }
985
988
  }), t.push({
986
- id: D.id,
989
+ id: N.id,
987
990
  params: {
988
991
  unitId: i,
989
992
  subUnitId: a,
@@ -1005,18 +1008,18 @@ let ie = class extends T {
1005
1008
  }));
1006
1009
  }
1007
1010
  _initAfterEditor() {
1008
- this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(pt, {
1011
+ this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(ht, {
1009
1012
  handler: (s, e, t) => {
1010
1013
  if (!s || s.p)
1011
1014
  return t(s);
1012
- if (typeof s.v == "string" && Y.isLegalUrl(s.v) && s.v[s.v.length - 1] !== " ") {
1013
- const { unitId: n, subUnitId: r, row: i, col: a } = e, o = Y.normalizeUrl(s.v), c = this._univerInstanceService.getUnit(n, I.UNIVER_SHEET), d = c == null ? void 0 : c.getSheetBySheetId(r);
1015
+ if (typeof s.v == "string" && G.isLegalUrl(s.v) && s.v[s.v.length - 1] !== " ") {
1016
+ const { unitId: n, subUnitId: r, row: i, col: a } = e, o = G.normalizeUrl(s.v), c = this._univerInstanceService.getUnit(n, I.UNIVER_SHEET), d = c == null ? void 0 : c.getSheetBySheetId(r);
1014
1017
  if (!d)
1015
1018
  return t(s);
1016
1019
  const l = d.getBlankCellDocumentModel(s, i, a);
1017
1020
  if (!l.documentModel)
1018
1021
  return t(s);
1019
- const u = ee.selection.replace({
1022
+ const u = te.selection.replace({
1020
1023
  selection: {
1021
1024
  startOffset: 0,
1022
1025
  endOffset: s.v.length,
@@ -1042,7 +1045,7 @@ let ie = class extends T {
1042
1045
  return ce.apply(h, u.serialize()), t({
1043
1046
  ...s,
1044
1047
  p: {
1045
- id: Ye,
1048
+ id: Ge,
1046
1049
  body: h,
1047
1050
  documentStyle: {
1048
1051
  pageSize: {
@@ -1058,18 +1061,18 @@ let ie = class extends T {
1058
1061
  }));
1059
1062
  }
1060
1063
  };
1061
- ie = Ot([
1062
- q(0, M(ue)),
1063
- q(1, M(R)),
1064
- q(2, M(He)),
1065
- q(3, k)
1066
- ], ie);
1067
- var Ht = Object.getOwnPropertyDescriptor, xt = (s, e, t, n) => {
1068
- for (var r = n > 1 ? void 0 : n ? Ht(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1064
+ ae = Vt([
1065
+ Q(0, M(ue)),
1066
+ Q(1, M(R)),
1067
+ Q(2, M(xe)),
1068
+ Q(3, w)
1069
+ ], ae);
1070
+ var Tt = Object.getOwnPropertyDescriptor, $t = (s, e, t, n) => {
1071
+ for (var r = n > 1 ? void 0 : n ? Tt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1069
1072
  (a = s[i]) && (r = a(r) || r);
1070
1073
  return r;
1071
- }, be = (s, e) => (t, n) => e(t, n, s);
1072
- let ae = class extends T {
1074
+ }, Pe = (s, e) => (t, n) => e(t, n, s);
1075
+ let oe = class extends T {
1073
1076
  constructor(s, e) {
1074
1077
  super(), this._resourceManagerService = s, this._hyperLinkModel = e, this._initSnapshot();
1075
1078
  }
@@ -1090,7 +1093,7 @@ let ae = class extends T {
1090
1093
  };
1091
1094
  this.disposeWithMe(
1092
1095
  this._resourceManagerService.registerPluginResource({
1093
- pluginName: xe,
1096
+ pluginName: Te,
1094
1097
  businesses: [I.UNIVER_SHEET],
1095
1098
  toJson: (t) => s(t),
1096
1099
  parseJson: (t) => e(t),
@@ -1108,46 +1111,46 @@ let ae = class extends T {
1108
1111
  );
1109
1112
  }
1110
1113
  };
1111
- ae = xt([
1112
- be(0, Ge),
1113
- be(1, M(R))
1114
- ], ae);
1115
- var Vt = Object.getOwnPropertyDescriptor, Tt = (s, e, t, n) => {
1116
- for (var r = n > 1 ? void 0 : n ? Vt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1114
+ oe = $t([
1115
+ Pe(0, ze),
1116
+ Pe(1, M(R))
1117
+ ], oe);
1118
+ var At = Object.getOwnPropertyDescriptor, Wt = (s, e, t, n) => {
1119
+ for (var r = n > 1 ? void 0 : n ? At(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1117
1120
  (a = s[i]) && (r = a(r) || r);
1118
1121
  return r;
1119
- }, $t = (s, e) => (t, n) => e(t, n, s);
1120
- let oe = class extends T {
1122
+ }, Bt = (s, e) => (t, n) => e(t, n, s);
1123
+ let de = class extends T {
1121
1124
  constructor(s) {
1122
1125
  super(), this._commandService = s, this._registerCommands();
1123
1126
  }
1124
1127
  _registerCommands() {
1125
1128
  [
1126
- St,
1129
+ Rt,
1130
+ kt,
1131
+ Mt,
1132
+ wt,
1127
1133
  Ct,
1128
1134
  It,
1129
- wt,
1130
- Mt,
1131
- Rt,
1132
- D,
1133
- _e,
1134
1135
  N,
1135
1136
  ye,
1136
- Q
1137
+ D,
1138
+ ve,
1139
+ Z
1137
1140
  ].forEach((s) => {
1138
1141
  this._commandService.registerCommand(s);
1139
1142
  });
1140
1143
  }
1141
1144
  };
1142
- oe = Tt([
1143
- $t(0, b)
1144
- ], oe);
1145
- var E = /* @__PURE__ */ ((s) => (s.SHEET = "gid", s.RANGE = "range", s.DEFINE_NAME = "rangeid", s.INVALID = "invalid", s.URL = "url", s))(E || {}), At = Object.getOwnPropertyDescriptor, Wt = (s, e, t, n) => {
1146
- for (var r = n > 1 ? void 0 : n ? At(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1145
+ de = Wt([
1146
+ Bt(0, b)
1147
+ ], de);
1148
+ var E = /* @__PURE__ */ ((s) => (s.SHEET = "gid", s.RANGE = "range", s.DEFINE_NAME = "rangeid", s.INVALID = "invalid", s.URL = "url", s))(E || {}), jt = Object.getOwnPropertyDescriptor, Ft = (s, e, t, n) => {
1149
+ for (var r = n > 1 ? void 0 : n ? jt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1147
1150
  (a = s[i]) && (r = a(r) || r);
1148
1151
  return r;
1149
- }, me = (s, e) => (t, n) => e(t, n, s);
1150
- let ve = class {
1152
+ }, _e = (s, e) => (t, n) => e(t, n, s);
1153
+ let Se = class {
1151
1154
  constructor(s, e, t) {
1152
1155
  this._univerInstanceService = s, this._localeService = e, this._definedNamesService = t;
1153
1156
  }
@@ -1188,10 +1191,10 @@ let ve = class {
1188
1191
  const o = e ? i.getSheetBySheetId(e) : i.getActiveSheet(), c = (d = o == null ? void 0 : o.getName()) != null ? d : "";
1189
1192
  if (t) {
1190
1193
  if (!o) return a;
1191
- const l = Ce(t).range;
1192
- return Ie(l, o) && t !== te ? {
1194
+ const l = ke(t).range;
1195
+ return Me(l, o) && t !== ne ? {
1193
1196
  type: E.RANGE,
1194
- name: mt(c, l)
1197
+ name: _t(c, l)
1195
1198
  } : a;
1196
1199
  }
1197
1200
  if (n) {
@@ -1211,67 +1214,69 @@ let ve = class {
1211
1214
  return a;
1212
1215
  }
1213
1216
  };
1214
- ve = Wt([
1215
- me(0, k),
1216
- me(1, M(ze)),
1217
- me(2, ft)
1218
- ], ve);
1219
- var Bt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Ft = (s, e, t) => e in s ? Bt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, Kt = (s, e, t, n) => {
1220
- for (var r = n > 1 ? void 0 : n ? jt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1217
+ Se = Ft([
1218
+ _e(0, w),
1219
+ _e(1, M(Je)),
1220
+ _e(2, mt)
1221
+ ], Se);
1222
+ var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Gt = (s, e, t) => e in s ? Kt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, zt = (s, e, t, n) => {
1223
+ for (var r = n > 1 ? void 0 : n ? Yt(e, t) : e, i = s.length - 1, a; i >= 0; i--)
1221
1224
  (a = s[i]) && (r = a(r) || r);
1222
1225
  return r;
1223
- }, Pe = (s, e) => (t, n) => e(t, n, s), Ve = (s, e, t) => Ft(s, typeof e != "symbol" ? e + "" : e, t);
1224
- let de = class extends Qe {
1225
- constructor(s = Ue, e, t) {
1226
+ }, Ne = (s, e) => (t, n) => e(t, n, s), pe = (s, e, t) => Gt(s, typeof e != "symbol" ? e + "" : e, t);
1227
+ let j = class extends Ze {
1228
+ constructor(s = be, e, t) {
1226
1229
  super(), this._config = s, this._injector = e, this._configService = t;
1227
- const { ...n } = Ze(
1230
+ const { ...n } = et(
1228
1231
  {},
1229
- Ue,
1232
+ be,
1230
1233
  this._config
1231
1234
  );
1232
- this._configService.setConfig(kt, n);
1235
+ this._configService.setConfig(Ut, n);
1233
1236
  }
1234
1237
  onStarting() {
1235
- et(this._injector, [
1238
+ tt(this._injector, [
1236
1239
  [R],
1237
- [ve],
1238
- [ae],
1240
+ [Se],
1239
1241
  [oe],
1240
- [ne],
1241
- [ie],
1242
+ [de],
1242
1243
  [re],
1243
- [se]
1244
- ]), tt(this._injector, [
1245
- [ne],
1246
1244
  [ae],
1247
- [oe],
1248
- [ie],
1245
+ [se],
1246
+ [ie]
1247
+ ]), nt(this._injector, [
1249
1248
  [re],
1250
- [se]
1249
+ [oe],
1250
+ [de],
1251
+ [ae],
1252
+ [se],
1253
+ [ie]
1251
1254
  ]);
1252
1255
  }
1253
1256
  };
1254
- Ve(de, "pluginName", xe);
1255
- Ve(de, "type", I.UNIVER_SHEET);
1256
- de = Kt([
1257
- Je(ht),
1258
- Pe(1, M(Xe)),
1259
- Pe(2, qe)
1260
- ], de);
1257
+ pe(j, "pluginName", Te);
1258
+ pe(j, "packageName", Ve.name);
1259
+ pe(j, "version", Ve.version);
1260
+ pe(j, "type", I.UNIVER_SHEET);
1261
+ j = zt([
1262
+ Xe(gt),
1263
+ Ne(1, M(qe)),
1264
+ Ne(2, Qe)
1265
+ ], j);
1261
1266
  export {
1262
- St as AddHyperLinkCommand,
1263
- D as AddHyperLinkMutation,
1264
- Rt as AddRichHyperLinkCommand,
1265
- It as CancelHyperLinkCommand,
1266
- Mt as CancelRichHyperLinkCommand,
1267
- te as ERROR_RANGE,
1267
+ Rt as AddHyperLinkCommand,
1268
+ N as AddHyperLinkMutation,
1269
+ It as AddRichHyperLinkCommand,
1270
+ Mt as CancelHyperLinkCommand,
1271
+ Ct as CancelRichHyperLinkCommand,
1272
+ ne as ERROR_RANGE,
1268
1273
  R as HyperLinkModel,
1269
- N as RemoveHyperLinkMutation,
1274
+ D as RemoveHyperLinkMutation,
1270
1275
  E as SheetHyperLinkType,
1271
- ve as SheetsHyperLinkParserService,
1272
- de as UniverSheetsHyperLinkPlugin,
1273
- Ct as UpdateHyperLinkCommand,
1274
- _e as UpdateHyperLinkMutation,
1275
- ye as UpdateHyperLinkRefMutation,
1276
+ Se as SheetsHyperLinkParserService,
1277
+ j as UniverSheetsHyperLinkPlugin,
1278
+ kt as UpdateHyperLinkCommand,
1279
+ ye as UpdateHyperLinkMutation,
1280
+ ve as UpdateHyperLinkRefMutation,
1276
1281
  wt as UpdateRichHyperLinkCommand
1277
1282
  };