@univerjs/find-replace 0.1.6 → 0.1.8

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,13 +1,13 @@
1
- var rt = Object.defineProperty;
2
- var at = (t, e, n) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var c = (t, e, n) => (at(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { Disposable as X, IUniverInstanceService as he, ILogService as ue, toDisposable as q, IContextService as U, DisposableCollection as ot, CommandType as M, LocaleService as D, ICommandService as ee, FOCUSING_SHEET as pe, EDITOR_ACTIVATED as fe, UniverInstanceType as ct, RxDisposable as lt, OnLifecycle as dt, LifecycleStages as ht, Plugin as ut } from "@univerjs/core";
5
- import { createIdentifier as pt, Inject as y, Injector as _e } from "@wendellhu/redi";
6
- import { IConfirmService as ft, IMessageService as ge, useObservable as I, ILayoutService as me, KeyCode as b, MetaKeys as x, MenuGroup as _t, MenuItemType as gt, MenuPosition as mt, getMenuHiddenObservable as vt, ComponentManager as St, IMenuService as Ct, IShortcutService as Rt, IDialogService as bt } from "@univerjs/ui";
7
- import { BehaviorSubject as F, Subject as ve, throttleTime as xt, combineLatest as Se, debounceTime as Mt, fromEvent as yt, map as It, takeUntil as ae } from "rxjs";
8
- import { RENDER_RAW_FORMULA_KEY as Ft } from "@univerjs/engine-render";
9
- import Dt, { forwardRef as B, useRef as z, createElement as Ce, useCallback as _, Fragment as E, useEffect as w, useMemo as te, useImperativeHandle as Pt } from "react";
10
- import { MessageType as $, InputWithSlot as Ot, Pager as Tt, Button as N, FormLayout as R, Input as Et, Select as H, FormDualColumnLayout as oe, Checkbox as ce } from "@univerjs/design";
1
+ var at = Object.defineProperty;
2
+ var ot = (t, e, n) => e in t ? at(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var c = (t, e, n) => (ot(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ import { Disposable as ee, IUniverInstanceService as ue, ILogService as pe, toDisposable as z, IContextService as U, DisposableCollection as ct, CommandType as M, LocaleService as D, ICommandService as te, FOCUSING_SHEET as fe, EDITOR_ACTIVATED as _e, UniverInstanceType as lt, RxDisposable as dt, OnLifecycle as ht, LifecycleStages as ut, Plugin as pt } from "@univerjs/core";
5
+ import { createIdentifier as ft, Inject as y, Injector as ge } from "@wendellhu/redi";
6
+ import { IConfirmService as _t, IMessageService as me, useObservable as I, ILayoutService as ve, KeyCode as b, MetaKeys as x, MenuGroup as gt, MenuItemType as mt, MenuPosition as vt, getMenuHiddenObservable as St, ComponentManager as Ct, IMenuService as Rt, IShortcutService as bt, IDialogService as xt } from "@univerjs/ui";
7
+ import { BehaviorSubject as F, Subject as Se, throttleTime as Mt, combineLatest as Ce, debounceTime as yt, fromEvent as It, map as Ft, takeUntil as oe } from "rxjs";
8
+ import { RENDER_RAW_FORMULA_KEY as Dt } from "@univerjs/engine-render";
9
+ import Pt, { forwardRef as B, useRef as K, createElement as Re, useCallback as _, Fragment as E, useEffect as w, useMemo as ie, useImperativeHandle as Ot } from "react";
10
+ import { MessageType as $, InputWithSlot as Tt, Pager as Et, Button as N, FormLayout as R, Input as $t, Select as H, FormDualColumnLayout as ce, Checkbox as le } from "@univerjs/design";
11
11
  import { useDependency as S } from "@wendellhu/redi/react-bindings";
12
12
  var m = function() {
13
13
  return m = Object.assign || function(t) {
@@ -18,7 +18,7 @@ var m = function() {
18
18
  }
19
19
  return t;
20
20
  }, m.apply(this, arguments);
21
- }, $t = function(t, e) {
21
+ }, Nt = function(t, e) {
22
22
  var n = {};
23
23
  for (var i in t)
24
24
  Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
@@ -26,16 +26,16 @@ var m = function() {
26
26
  for (var s = 0, i = Object.getOwnPropertySymbols(t); s < i.length; s++)
27
27
  e.indexOf(i[s]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[s]) && (n[i[s]] = t[i[s]]);
28
28
  return n;
29
- }, Re = B(function(t, e) {
30
- var n = t.icon, i = t.id, s = t.className, r = t.extend, a = $t(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(i, " ").concat(s || "").trim(), d = z("_".concat(wt()));
31
- return be(n, "".concat(i), { defIds: n.defIds, idSuffix: d.current }, m({ ref: e, className: o }, a), r);
29
+ }, be = B(function(t, e) {
30
+ var n = t.icon, i = t.id, s = t.className, r = t.extend, a = Nt(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(i, " ").concat(s || "").trim(), d = K("_".concat(jt()));
31
+ return xe(n, "".concat(i), { defIds: n.defIds, idSuffix: d.current }, m({ ref: e, className: o }, a), r);
32
32
  });
33
- function be(t, e, n, i, s) {
34
- return Ce(t.tag, m(m({ key: e }, Nt(t, n, s)), i), (At(t, n).children || []).map(function(r, a) {
35
- return be(r, "".concat(e, "-").concat(t.tag, "-").concat(a), n, void 0, s);
33
+ function xe(t, e, n, i, s) {
34
+ return Re(t.tag, m(m({ key: e }, At(t, n, s)), i), (wt(t, n).children || []).map(function(r, a) {
35
+ return xe(r, "".concat(e, "-").concat(t.tag, "-").concat(a), n, void 0, s);
36
36
  }));
37
37
  }
38
- function Nt(t, e, n) {
38
+ function At(t, e, n) {
39
39
  var i = m({}, t.attrs);
40
40
  n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
41
41
  var s = e.defIds;
@@ -44,37 +44,37 @@ function Nt(t, e, n) {
44
44
  typeof o == "string" && (i[a] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
45
45
  })), i;
46
46
  }
47
- function At(t, e) {
47
+ function wt(t, e) {
48
48
  var n, i = e.defIds;
49
49
  return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? m(m({}, t), { children: t.children.map(function(s) {
50
50
  return typeof s.attrs.id == "string" && i && i.indexOf(s.attrs.id) > -1 ? m(m({}, s), { attrs: m(m({}, s.attrs), { id: s.attrs.id + e.idSuffix }) }) : s;
51
51
  }) }) : t;
52
52
  }
53
- function wt() {
53
+ function jt() {
54
54
  return Math.random().toString(36).substring(2, 8);
55
55
  }
56
- Re.displayName = "UniverIcon";
57
- var jt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_217_40", style: { maskType: "alpha" }, width: 17, height: 17, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0.9 0.09H16.9V16.09H0.9z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_217_40)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.39551 7.37266C2.39551 4.18105 4.98281 1.59375 8.17441 1.59375C11.366 1.59375 13.9533 4.18105 13.9533 7.37266C13.9533 8.72342 13.4898 9.96603 12.7133 10.95L15.1964 13.4331C15.4619 13.6986 15.4619 14.1291 15.1964 14.3946C14.9309 14.6601 14.5004 14.6601 14.2349 14.3946L11.7518 11.9115C10.7678 12.6881 9.52525 13.1516 8.17441 13.1516C4.98281 13.1516 2.39551 10.5642 2.39551 7.37266ZM8.17441 2.95349C5.73378 2.95349 3.75525 4.93202 3.75525 7.37266C3.75525 9.81333 5.73378 11.7918 8.17441 11.7918C10.6151 11.7918 12.5936 9.81333 12.5936 7.37266C12.5936 4.93202 10.6151 2.95349 8.17441 2.95349Z", fillRule: "evenodd", clipRule: "evenodd" } }] }] }, xe = B(function(t, e) {
58
- return Ce(Re, Object.assign({}, t, {
56
+ be.displayName = "UniverIcon";
57
+ var Lt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_217_40", style: { maskType: "alpha" }, width: 17, height: 17, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0.9 0.09H16.9V16.09H0.9z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_217_40)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.39551 7.37266C2.39551 4.18105 4.98281 1.59375 8.17441 1.59375C11.366 1.59375 13.9533 4.18105 13.9533 7.37266C13.9533 8.72342 13.4898 9.96603 12.7133 10.95L15.1964 13.4331C15.4619 13.6986 15.4619 14.1291 15.1964 14.3946C14.9309 14.6601 14.5004 14.6601 14.2349 14.3946L11.7518 11.9115C10.7678 12.6881 9.52525 13.1516 8.17441 13.1516C4.98281 13.1516 2.39551 10.5642 2.39551 7.37266ZM8.17441 2.95349C5.73378 2.95349 3.75525 4.93202 3.75525 7.37266C3.75525 9.81333 5.73378 11.7918 8.17441 11.7918C10.6151 11.7918 12.5936 9.81333 12.5936 7.37266C12.5936 4.93202 10.6151 2.95349 8.17441 2.95349Z", fillRule: "evenodd", clipRule: "evenodd" } }] }] }, Me = B(function(t, e) {
58
+ return Re(be, Object.assign({}, t, {
59
59
  id: "search-single-16",
60
60
  ref: e,
61
- icon: jt
61
+ icon: Lt
62
62
  }));
63
63
  });
64
- xe.displayName = "SearchSingle16";
65
- const Me = "FIND_REPLACE_INPUT_FOCUS", ye = "FIND_REPLACE_DIALOG_FOCUS", Ie = "FIND_REPLACE_REPLACE_REVEALED";
66
- var Lt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, Fe = (t, e, n, i) => {
67
- for (var s = i > 1 ? void 0 : i ? Ut(e, n) : e, r = t.length - 1, a; r >= 0; r--)
64
+ Me.displayName = "SearchSingle16";
65
+ const ye = "FIND_REPLACE_INPUT_FOCUS", Ie = "FIND_REPLACE_DIALOG_FOCUS", Fe = "FIND_REPLACE_REPLACE_REVEALED";
66
+ var Ut = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, De = (t, e, n, i) => {
67
+ for (var s = i > 1 ? void 0 : i ? Bt(e, n) : e, r = t.length - 1, a; r >= 0; r--)
68
68
  (a = t[r]) && (s = (i ? a(e, n, s) : a(s)) || s);
69
- return i && s && Lt(e, n, s), s;
69
+ return i && s && Ut(e, n, s), s;
70
70
  }, j = (t, e) => (n, i) => e(n, i, t);
71
- class wi extends X {
71
+ class ji extends ee {
72
72
  }
73
- const v = pt("find-replace.service");
74
- function Bt(t) {
73
+ const v = ft("find-replace.service");
74
+ function Wt(t) {
75
75
  return typeof t.findString < "u" || typeof t.inputtingFindString < "u" || typeof t.findDirection < "u" || typeof t.matchesTheWholeCell < "u" || typeof t.caseSensitive < "u" || typeof t.findScope < "u" || typeof t.findBy < "u";
76
76
  }
77
- let K = class extends X {
77
+ let Y = class extends ee {
78
78
  constructor(e, n, i, s) {
79
79
  super();
80
80
  c(this, "currentMatch$", new F(null));
@@ -86,9 +86,9 @@ let K = class extends X {
86
86
  c(this, "_matches", []);
87
87
  c(this, "_currentSearchingDisposables", null);
88
88
  this._state = e, this._providers = n, this._univerInstanceService = i, this._logService = s, this.disposeWithMe(
89
- this._state.stateUpdates$.pipe(xt(200, void 0, { leading: !0, trailing: !0 })).subscribe(async (r) => {
89
+ this._state.stateUpdates$.pipe(Mt(200, void 0, { leading: !0, trailing: !0 })).subscribe(async (r) => {
90
90
  const a = this._state.state;
91
- Bt(r) && (a.findString !== "" && !a.replaceRevealed ? (await this._startSearching(), this._state.changeState({ findCompleted: !0 })) : r.replaceRevealed !== !0 && this._stopSearching());
91
+ Wt(r) && (a.findString !== "" && !a.replaceRevealed ? (await this._startSearching(), this._state.changeState({ findCompleted: !0 })) : r.replaceRevealed !== !0 && this._stopSearching());
92
92
  })
93
93
  );
94
94
  }
@@ -96,7 +96,7 @@ let K = class extends X {
96
96
  return this._findModels.length > 0;
97
97
  }
98
98
  dispose() {
99
- super.dispose(), this._stopSearching(), this.currentMatch$.complete(), this.replaceables$.complete(), this._state.changeState({ ...ie(), revealed: !1 });
99
+ super.dispose(), this._stopSearching(), this.currentMatch$.complete(), this.replaceables$.complete(), this._state.changeState({ ...ne(), revealed: !1 });
100
100
  }
101
101
  async start() {
102
102
  if (!this._state.findString)
@@ -139,7 +139,7 @@ let K = class extends X {
139
139
  }
140
140
  // When a document's content changes, we should reset all matches and try to move to the next match.
141
141
  _subscribeToModelsChanges(e) {
142
- const n = this._currentSearchingDisposables = new ot(), i = Se(e.map((s) => s.matchesUpdate$)).pipe(Mt(220)).subscribe(([...s]) => {
142
+ const n = this._currentSearchingDisposables = new ct(), i = Ce(e.map((s) => s.matchesUpdate$)).pipe(yt(220)).subscribe(([...s]) => {
143
143
  const r = this._matches = s.flat();
144
144
  if (r.length) {
145
145
  const a = this._moveToInitialMatch(this._findModels, r, !0);
@@ -147,10 +147,10 @@ let K = class extends X {
147
147
  } else
148
148
  this._state.changeState({ matchesCount: 0, matchesPosition: 0 }), this.replaceables$.next([]);
149
149
  });
150
- e.forEach((s) => n.add(q(s.activelyChangingMatch$.subscribe((r) => {
150
+ e.forEach((s) => n.add(z(s.activelyChangingMatch$.subscribe((r) => {
151
151
  const a = this._matches.findIndex((o) => o === r);
152
152
  this._state.changeState({ matchesPosition: a + 1 });
153
- })))), n.add(q(i));
153
+ })))), n.add(z(i));
154
154
  }
155
155
  async replace() {
156
156
  return this._matchingModel ? this._matchingModel.replace(this._state.replaceString) : !1;
@@ -196,7 +196,7 @@ let K = class extends X {
196
196
  }
197
197
  _moveToInitialMatch(e, n, i = !1) {
198
198
  var d;
199
- const s = (d = this._univerInstanceService.getFocusedUniverInstance()) == null ? void 0 : d.getUnitId();
199
+ const s = (d = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : d.getUnitId();
200
200
  if (!s)
201
201
  return -1;
202
202
  const r = e.find((u) => u.unitId === s);
@@ -210,12 +210,12 @@ let K = class extends X {
210
210
  return this.currentMatch$.next(a), o;
211
211
  }
212
212
  };
213
- K = Fe([
214
- j(2, he),
215
- j(3, ue)
216
- ], K);
217
- var Y = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(Y || {}), Z = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(Z || {}), J = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(J || {});
218
- function ie() {
213
+ Y = De([
214
+ j(2, ue),
215
+ j(3, pe)
216
+ ], Y);
217
+ var Z = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(Z || {}), J = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(J || {}), Q = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(Q || {});
218
+ function ne() {
219
219
  return {
220
220
  caseSensitive: !1,
221
221
  findBy: "value",
@@ -232,11 +232,11 @@ function ie() {
232
232
  revealed: !0
233
233
  };
234
234
  }
235
- class Wt {
235
+ class kt {
236
236
  constructor() {
237
- c(this, "_stateUpdates$", new ve());
237
+ c(this, "_stateUpdates$", new Se());
238
238
  c(this, "stateUpdates$", this._stateUpdates$.asObservable());
239
- c(this, "_state$", new F(ie()));
239
+ c(this, "_state$", new F(ne()));
240
240
  c(this, "state$", this._state$.asObservable());
241
241
  c(this, "_findString", "");
242
242
  c(this, "_inputtingFindString", "");
@@ -313,17 +313,17 @@ class Wt {
313
313
  }), this._stateUpdates$.next(i));
314
314
  }
315
315
  }
316
- let Q = class extends X {
316
+ let X = class extends ee {
317
317
  constructor(e, n) {
318
318
  super();
319
319
  c(this, "_providers", /* @__PURE__ */ new Set());
320
- c(this, "_state", new Wt());
320
+ c(this, "_state", new kt());
321
321
  c(this, "_model");
322
322
  c(this, "_currentMatch$", new F(null));
323
323
  c(this, "currentMatch$", this._currentMatch$.asObservable());
324
324
  c(this, "_replaceables$", new F([]));
325
325
  c(this, "replaceables$", this._replaceables$.asObservable());
326
- c(this, "_focusSignal$", new ve());
326
+ c(this, "_focusSignal$", new Se());
327
327
  c(this, "focusSignal$", this._focusSignal$.asObservable());
328
328
  this._injector = e, this._contextService = n;
329
329
  }
@@ -399,8 +399,8 @@ let Q = class extends X {
399
399
  start(e = !1) {
400
400
  if (this._providers.size === 0)
401
401
  return !1;
402
- this._model = this._injector.createInstance(K, this._state, this._providers), this._model.currentMatch$.subscribe((i) => this._currentMatch$.next(i)), this._model.replaceables$.subscribe((i) => this._replaceables$.next(i));
403
- const n = ie();
402
+ this._model = this._injector.createInstance(Y, this._state, this._providers), this._model.currentMatch$.subscribe((i) => this._currentMatch$.next(i)), this._model.replaceables$.subscribe((i) => this._replaceables$.next(i));
403
+ const n = ne();
404
404
  return e && (n.replaceRevealed = !0), this._state.changeState(n), this._toggleRevealReplace(e), !0;
405
405
  }
406
406
  find() {
@@ -412,19 +412,19 @@ let Q = class extends X {
412
412
  (e = this._model) == null || e.dispose(), this._model = null, this._toggleDisplayRawFormula(!1), this._toggleRevealReplace(!1);
413
413
  }
414
414
  registerFindReplaceProvider(e) {
415
- return this._providers.add(e), q(() => this._providers.delete(e));
415
+ return this._providers.add(e), z(() => this._providers.delete(e));
416
416
  }
417
417
  _toggleRevealReplace(e) {
418
- this._contextService.setContextValue(Ie, e);
418
+ this._contextService.setContextValue(Fe, e);
419
419
  }
420
420
  _toggleDisplayRawFormula(e) {
421
- this._contextService.setContextValue(Ft, e);
421
+ this._contextService.setContextValue(Dt, e);
422
422
  }
423
423
  };
424
- Q = Fe([
425
- j(0, y(_e)),
424
+ X = De([
425
+ j(0, y(ge)),
426
426
  j(1, U)
427
- ], Q);
427
+ ], X);
428
428
  const W = {
429
429
  id: "ui.operation.open-find-dialog",
430
430
  type: M.OPERATION,
@@ -432,23 +432,23 @@ const W = {
432
432
  const e = t.get(v);
433
433
  return e.revealed ? e.focusFindInput() : e.start(), !0;
434
434
  }
435
- }, ne = {
435
+ }, se = {
436
436
  id: "ui.operation.open-replace-dialog",
437
437
  type: M.OPERATION,
438
438
  handler: (t) => {
439
439
  const e = t.get(v);
440
440
  return e.revealed ? e.replaceRevealed ? e.focusFindInput() : e.revealReplace() : e.start(!0), !0;
441
441
  }
442
- }, De = {
442
+ }, Pe = {
443
443
  type: M.OPERATION,
444
444
  id: "ui.operation.go-to-next-match",
445
445
  handler: (t) => (t.get(v).moveToNextMatch(), !0)
446
- }, Pe = {
446
+ }, Oe = {
447
447
  type: M.OPERATION,
448
448
  id: "ui.operation.go-to-previous-match",
449
449
  handler: (t) => (t.get(v).moveToPreviousMatch(), !0)
450
450
  };
451
- var Oe = { exports: {} }, k = {};
451
+ var Te = { exports: {} }, k = {};
452
452
  /**
453
453
  * @license React
454
454
  * react-jsx-runtime.production.min.js
@@ -458,33 +458,33 @@ var Oe = { exports: {} }, k = {};
458
458
  * This source code is licensed under the MIT license found in the
459
459
  * LICENSE file in the root directory of this source tree.
460
460
  */
461
- var kt = Dt, Gt = Symbol.for("react.element"), Vt = Symbol.for("react.fragment"), Ht = Object.prototype.hasOwnProperty, qt = kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, zt = { key: !0, ref: !0, __self: !0, __source: !0 };
462
- function Te(t, e, n) {
461
+ var Gt = Pt, Vt = Symbol.for("react.element"), Ht = Symbol.for("react.fragment"), qt = Object.prototype.hasOwnProperty, zt = Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Kt = { key: !0, ref: !0, __self: !0, __source: !0 };
462
+ function Ee(t, e, n) {
463
463
  var i, s = {}, r = null, a = null;
464
464
  n !== void 0 && (r = "" + n), e.key !== void 0 && (r = "" + e.key), e.ref !== void 0 && (a = e.ref);
465
465
  for (i in e)
466
- Ht.call(e, i) && !zt.hasOwnProperty(i) && (s[i] = e[i]);
466
+ qt.call(e, i) && !Kt.hasOwnProperty(i) && (s[i] = e[i]);
467
467
  if (t && t.defaultProps)
468
468
  for (i in e = t.defaultProps, e)
469
469
  s[i] === void 0 && (s[i] = e[i]);
470
- return { $$typeof: Gt, type: t, key: r, ref: a, props: s, _owner: qt.current };
470
+ return { $$typeof: Vt, type: t, key: r, ref: a, props: s, _owner: zt.current };
471
471
  }
472
- k.Fragment = Vt;
473
- k.jsx = Te;
474
- k.jsxs = Te;
475
- Oe.exports = k;
476
- var l = Oe.exports;
477
- const Ee = {
472
+ k.Fragment = Ht;
473
+ k.jsx = Ee;
474
+ k.jsxs = Ee;
475
+ Te.exports = k;
476
+ var l = Te.exports;
477
+ const $e = {
478
478
  id: "ui.command.replace-current-match",
479
479
  type: M.COMMAND,
480
480
  handler: (t) => t.get(v).replace()
481
- }, Kt = "CONFIRM_REPLACE_ALL", $e = {
481
+ }, Yt = "CONFIRM_REPLACE_ALL", Ne = {
482
482
  id: "ui.command.replace-all-matches",
483
483
  type: M.COMMAND,
484
484
  handler: async (t) => {
485
- const e = t.get(ft), n = t.get(D), i = t.get(ge);
485
+ const e = t.get(_t), n = t.get(D), i = t.get(me);
486
486
  if (!await e.confirm({
487
- id: Kt,
487
+ id: Yt,
488
488
  title: { title: n.t("find-replace.replace.confirm.title") },
489
489
  cancelText: n.t("button.cancel"),
490
490
  confirmText: n.t("button.confirm")
@@ -503,15 +503,15 @@ const Ee = {
503
503
  }), !0);
504
504
  }
505
505
  };
506
- function Ne(t) {
506
+ function Ae(t) {
507
507
  const { findCompleted: e, localeService: n, matchesCount: i, matchesPosition: s, findString: r, findReplaceService: a, onChange: o, ...d } = t, f = e && i === 0 ? n.t("find-replace.dialog.no-result") : i === 0 ? " " : void 0;
508
508
  return /* @__PURE__ */ l.jsx(
509
- Ot,
509
+ Tt,
510
510
  {
511
511
  autoFocus: !0,
512
512
  placeholder: n.t("find-replace.dialog.find-placeholder"),
513
513
  slot: /* @__PURE__ */ l.jsx(
514
- Tt,
514
+ Et,
515
515
  {
516
516
  loop: !0,
517
517
  text: f,
@@ -528,14 +528,14 @@ function Ne(t) {
528
528
  }
529
529
  );
530
530
  }
531
- const Yt = "univer-find-replace-dialog-container", Zt = "univer-find-replace-expand-container", Jt = "univer-button-text", Qt = "univer-find-replace-buttons-group", Xt = "univer-find-replace-buttons-group-right", L = {
532
- findReplaceDialogContainer: Yt,
533
- findReplaceExpandContainer: Zt,
534
- buttonText: Jt,
535
- findReplaceButtonsGroup: Qt,
536
- findReplaceButtonsGroupRight: Xt
531
+ const Zt = "univer-find-replace-dialog-container", Jt = "univer-find-replace-expand-container", Qt = "univer-button-text", Xt = "univer-find-replace-buttons-group", ei = "univer-find-replace-buttons-group-right", L = {
532
+ findReplaceDialogContainer: Zt,
533
+ findReplaceExpandContainer: Jt,
534
+ buttonText: Qt,
535
+ findReplaceButtonsGroup: Xt,
536
+ findReplaceButtonsGroupRight: ei
537
537
  };
538
- function Ae(t, e) {
538
+ function we(t, e) {
539
539
  const n = _(() => {
540
540
  var s;
541
541
  (s = document.querySelector(".univer-find-input input")) == null || s.focus();
@@ -543,18 +543,18 @@ function Ae(t, e) {
543
543
  const s = document.querySelectorAll(".univer-find-replace-dialog-container .univer-select-selection-search-input");
544
544
  return Array.from(s).some((r) => r === document.activeElement);
545
545
  }, []);
546
- return Pt(e, () => ({ focus: n, selectHasFocus: i })), w(() => {
546
+ return Ot(e, () => ({ focus: n, selectHasFocus: i })), w(() => {
547
547
  const s = t.focusSignal$.subscribe(() => n());
548
548
  return () => s.unsubscribe();
549
549
  }, [t, n]), { focus: n, selectHasFocus: i };
550
550
  }
551
- const ei = B(function(e, n) {
552
- const i = S(D), s = S(v), r = S(ee), a = I(s.state$, void 0, !0), { findCompleted: o, findString: d, matchesCount: u, matchesPosition: f } = a, p = _(() => {
553
- r.executeCommand(ne.id);
551
+ const ti = B(function(e, n) {
552
+ const i = S(D), s = S(v), r = S(te), a = I(s.state$, void 0, !0), { findCompleted: o, findString: d, matchesCount: u, matchesPosition: f } = a, p = _(() => {
553
+ r.executeCommand(se.id);
554
554
  }, [r]), O = _((C) => s.changeFindString(C), [s]);
555
- return Ae(s, n), /* @__PURE__ */ l.jsxs(E, { children: [
555
+ return we(s, n), /* @__PURE__ */ l.jsxs(E, { children: [
556
556
  /* @__PURE__ */ l.jsx(
557
- Ne,
557
+ Ae,
558
558
  {
559
559
  findCompleted: o,
560
560
  className: "univer-find-input",
@@ -568,36 +568,36 @@ const ei = B(function(e, n) {
568
568
  ),
569
569
  /* @__PURE__ */ l.jsx("div", { className: L.findReplaceExpandContainer, children: /* @__PURE__ */ l.jsx(N, { type: "text", size: "small", onClick: p, children: i.t("find-replace.dialog.advanced-finding") }) })
570
570
  ] });
571
- }), ti = B(function(e, n) {
572
- const i = S(v), s = S(D), r = S(ee), a = S(ge), o = I(i.currentMatch$, void 0, !0), d = I(i.replaceables$, void 0, !0), u = I(i.state$, void 0, !0), {
571
+ }), ii = B(function(e, n) {
572
+ const i = S(v), s = S(D), r = S(te), a = S(me), o = I(i.currentMatch$, void 0, !0), d = I(i.replaceables$, void 0, !0), u = I(i.state$, void 0, !0), {
573
573
  matchesCount: f,
574
574
  matchesPosition: p,
575
575
  findString: O,
576
576
  inputtingFindString: C,
577
- replaceString: Le,
578
- caseSensitive: Ue,
579
- matchesTheWholeCell: Be,
580
- findDirection: We,
581
- findScope: ke,
582
- findBy: Ge,
577
+ replaceString: Ue,
578
+ caseSensitive: Be,
579
+ matchesTheWholeCell: We,
580
+ findDirection: ke,
581
+ findScope: Ge,
582
+ findBy: Ve,
583
583
  findCompleted: V
584
- } = u, Ve = C.length === 0, He = f === 0 || !(o != null && o.replaceable), qe = d.length === 0, ze = _(
584
+ } = u, He = C.length === 0, qe = f === 0 || !(o != null && o.replaceable), ze = d.length === 0, Ke = _(
585
585
  (h) => i.changeInputtingFindString(h),
586
586
  [i]
587
- ), Ke = _(
587
+ ), Ye = _(
588
588
  (h) => i.changeReplaceString(h),
589
589
  [i]
590
- ), { focus: Ye } = Ae(i, n), Ze = _(() => {
590
+ ), { focus: Ze } = we(i, n), Je = _(() => {
591
591
  O === C ? i.moveToNextMatch() : (i.changeFindString(C), i.find());
592
- }, [O, C, i]), Je = _(() => r.executeCommand(Ee.id), [r]), Qe = _(async () => {
593
- await r.executeCommand($e.id), Ye();
594
- }, [r]), Xe = _((h) => {
592
+ }, [O, C, i]), Qe = _(() => r.executeCommand($e.id), [r]), Xe = _(async () => {
593
+ await r.executeCommand(Ne.id), Ze();
594
+ }, [r]), et = _((h) => {
595
595
  i.changeFindDirection(h);
596
- }, [i]), et = _((h) => {
597
- i.changeFindScope(h);
598
596
  }, [i]), tt = _((h) => {
597
+ i.changeFindScope(h);
598
+ }, [i]), it = _((h) => {
599
599
  i.changeFindBy(h);
600
- }, [i]), it = ni(s), nt = si(s), st = ri(s);
600
+ }, [i]), nt = si(s), st = ri(s), rt = ai(s);
601
601
  return w(() => {
602
602
  const h = V && f === 0;
603
603
  let T = null;
@@ -608,7 +608,7 @@ const ei = B(function(e, n) {
608
608
  })), () => T == null ? void 0 : T.dispose();
609
609
  }, [V, f, a, s]), /* @__PURE__ */ l.jsxs(E, { children: [
610
610
  /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find"), children: /* @__PURE__ */ l.jsx(
611
- Ne,
611
+ Ae,
612
612
  {
613
613
  findCompleted: V,
614
614
  className: "univer-find-input",
@@ -617,27 +617,27 @@ const ei = B(function(e, n) {
617
617
  findReplaceService: i,
618
618
  localeService: s,
619
619
  findString: C,
620
- onChange: ze
620
+ onChange: Ke
621
621
  }
622
622
  ) }),
623
623
  /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.replace"), children: /* @__PURE__ */ l.jsx(
624
- Et,
624
+ $t,
625
625
  {
626
626
  placeholder: s.t("find-replace.dialog.replace-placeholder"),
627
- value: Le,
628
- onChange: (h) => Ke(h)
627
+ value: Ue,
628
+ onChange: (h) => Ye(h)
629
629
  }
630
630
  ) }),
631
- /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-direction.title"), children: /* @__PURE__ */ l.jsx(H, { value: We, options: nt, onChange: Xe }) }),
632
- /* @__PURE__ */ l.jsx(oe, { children: /* @__PURE__ */ l.jsxs(E, { children: [
633
- /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-scope.title"), children: /* @__PURE__ */ l.jsx(H, { value: ke, options: it, onChange: et }) }),
634
- /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l.jsx(H, { value: Ge, options: st, onChange: tt }) })
631
+ /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-direction.title"), children: /* @__PURE__ */ l.jsx(H, { value: ke, options: st, onChange: et }) }),
632
+ /* @__PURE__ */ l.jsx(ce, { children: /* @__PURE__ */ l.jsxs(E, { children: [
633
+ /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-scope.title"), children: /* @__PURE__ */ l.jsx(H, { value: Ge, options: nt, onChange: tt }) }),
634
+ /* @__PURE__ */ l.jsx(R, { label: s.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l.jsx(H, { value: Ve, options: rt, onChange: it }) })
635
635
  ] }) }),
636
- /* @__PURE__ */ l.jsx(oe, { children: /* @__PURE__ */ l.jsxs(E, { children: [
636
+ /* @__PURE__ */ l.jsx(ce, { children: /* @__PURE__ */ l.jsxs(E, { children: [
637
637
  /* @__PURE__ */ l.jsx(R, { children: /* @__PURE__ */ l.jsx(
638
- ce,
638
+ le,
639
639
  {
640
- checked: Ue,
640
+ checked: Be,
641
641
  onChange: (h) => {
642
642
  i.changeCaseSensitive(h);
643
643
  },
@@ -645,9 +645,9 @@ const ei = B(function(e, n) {
645
645
  }
646
646
  ) }),
647
647
  /* @__PURE__ */ l.jsx(R, { children: /* @__PURE__ */ l.jsx(
648
- ce,
648
+ le,
649
649
  {
650
- checked: Be,
650
+ checked: We,
651
651
  onChange: (h) => {
652
652
  i.changeMatchesTheWholeCell(h);
653
653
  },
@@ -656,212 +656,212 @@ const ei = B(function(e, n) {
656
656
  ) })
657
657
  ] }) }),
658
658
  /* @__PURE__ */ l.jsxs("div", { className: L.findReplaceButtonsGroup, children: [
659
- /* @__PURE__ */ l.jsx(N, { type: "primary", onClick: Ze, disabled: Ve, children: s.t("find-replace.dialog.find") }),
659
+ /* @__PURE__ */ l.jsx(N, { type: "primary", onClick: Je, disabled: He, children: s.t("find-replace.dialog.find") }),
660
660
  /* @__PURE__ */ l.jsxs("span", { className: L.findReplaceButtonsGroupRight, children: [
661
- /* @__PURE__ */ l.jsx(N, { disabled: He, onClick: Je, children: s.t("find-replace.dialog.replace") }),
662
- /* @__PURE__ */ l.jsx(N, { disabled: qe, onClick: Qe, children: s.t("find-replace.dialog.replace-all") })
661
+ /* @__PURE__ */ l.jsx(N, { disabled: qe, onClick: Qe, children: s.t("find-replace.dialog.replace") }),
662
+ /* @__PURE__ */ l.jsx(N, { disabled: ze, onClick: Xe, children: s.t("find-replace.dialog.replace-all") })
663
663
  ] })
664
664
  ] })
665
665
  ] });
666
666
  });
667
- function ii() {
668
- const t = S(v), e = S(me), n = S(U), i = I(t.state$, void 0, !0), s = z(null);
667
+ function ni() {
668
+ const t = S(v), e = S(ve), n = S(U), i = I(t.state$, void 0, !0), s = K(null);
669
669
  w(() => {
670
670
  let d;
671
671
  return s.current && (d = e.registerContainerElement(s.current)), () => d == null ? void 0 : d.dispose();
672
672
  }, [e]);
673
- const r = z(null), a = _(
674
- (d) => n.setContextValue(ye, d),
673
+ const r = K(null), a = _(
674
+ (d) => n.setContextValue(Ie, d),
675
675
  [n]
676
676
  ), o = _(
677
- (d) => n.setContextValue(Me, d),
677
+ (d) => n.setContextValue(ye, d),
678
678
  [n]
679
679
  );
680
680
  return w(() => {
681
681
  var u;
682
- const d = yt(document, "focusin").subscribe((f) => {
682
+ const d = It(document, "focusin").subscribe((f) => {
683
683
  var p;
684
684
  f.target && ((p = s.current) != null && p.contains(f.target)) ? a(!0) : a(!1), !r.current || !r.current.selectHasFocus() ? o(!0) : o(!1);
685
685
  });
686
686
  return (u = r.current) == null || u.focus(), a(!0), o(!0), () => {
687
687
  d.unsubscribe(), a(!1);
688
688
  };
689
- }, [a, o]), /* @__PURE__ */ l.jsx("div", { className: L.findReplaceDialogContainer, ref: s, children: i.replaceRevealed ? /* @__PURE__ */ l.jsx(ti, { ref: r }) : /* @__PURE__ */ l.jsx(ei, { ref: r }) });
689
+ }, [a, o]), /* @__PURE__ */ l.jsx("div", { className: L.findReplaceDialogContainer, ref: s, children: i.replaceRevealed ? /* @__PURE__ */ l.jsx(ii, { ref: r }) : /* @__PURE__ */ l.jsx(ti, { ref: r }) });
690
690
  }
691
- function ni(t) {
691
+ function si(t) {
692
692
  const e = t.getCurrentLocale();
693
- return te(() => [
694
- { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: J.SUBUNIT },
695
- { label: t.t("find-replace.dialog.find-scope.workbook"), value: J.UNIT }
693
+ return ie(() => [
694
+ { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: Q.SUBUNIT },
695
+ { label: t.t("find-replace.dialog.find-scope.workbook"), value: Q.UNIT }
696
696
  ], [e]);
697
697
  }
698
- function si(t) {
698
+ function ri(t) {
699
699
  const e = t.getCurrentLocale();
700
- return te(() => [
701
- { label: t.t("find-replace.dialog.find-direction.row"), value: Y.ROW },
702
- { label: t.t("find-replace.dialog.find-direction.column"), value: Y.COLUMN }
700
+ return ie(() => [
701
+ { label: t.t("find-replace.dialog.find-direction.row"), value: Z.ROW },
702
+ { label: t.t("find-replace.dialog.find-direction.column"), value: Z.COLUMN }
703
703
  ], [e]);
704
704
  }
705
- function ri(t) {
705
+ function ai(t) {
706
706
  const e = t.getCurrentLocale();
707
- return te(() => [
708
- { label: t.t("find-replace.dialog.find-by.value"), value: Z.VALUE },
709
- { label: t.t("find-replace.dialog.find-by.formula"), value: Z.FORMULA }
707
+ return ie(() => [
708
+ { label: t.t("find-replace.dialog.find-by.value"), value: J.VALUE },
709
+ { label: t.t("find-replace.dialog.find-by.formula"), value: J.FORMULA }
710
710
  ], [e]);
711
711
  }
712
712
  function P(t) {
713
- return t.getContextValue(ye);
714
- }
715
- function ai(t) {
716
713
  return t.getContextValue(Ie);
717
714
  }
718
- function we(t) {
719
- return t.getContextValue(Me);
715
+ function oi(t) {
716
+ return t.getContextValue(Fe);
720
717
  }
721
- const G = "7_find-replace-shortcuts";
722
- function se(t) {
723
- return t.getContextValue(pe);
718
+ function je(t) {
719
+ return t.getContextValue(ye);
724
720
  }
721
+ const G = "7_find-replace-shortcuts";
725
722
  function re(t) {
726
- return !t.getContextValue(fe);
723
+ return t.getContextValue(fe);
724
+ }
725
+ function ae(t) {
726
+ return !t.getContextValue(_e);
727
727
  }
728
- const oi = {
728
+ const ci = {
729
729
  id: W.id,
730
730
  description: "find-replace.shortcut.open-find-dialog",
731
731
  binding: b.F | x.CTRL_COMMAND,
732
732
  group: G,
733
733
  preconditions(t) {
734
- return !P(t) && se(t) && re(t);
734
+ return !P(t) && re(t) && ae(t);
735
735
  }
736
- }, ci = {
736
+ }, li = {
737
737
  id: W.id,
738
738
  description: "find-replace.shortcut.open-find-dialog",
739
739
  binding: b.F | x.CTRL_COMMAND,
740
740
  mac: b.F | x.MAC_CTRL,
741
741
  preconditions(t) {
742
- return !P(t) && se(t) && re(t);
742
+ return !P(t) && re(t) && ae(t);
743
743
  }
744
- }, li = {
745
- id: ne.id,
744
+ }, di = {
745
+ id: se.id,
746
746
  description: "find-replace.shortcut.open-replace-dialog",
747
747
  binding: b.H | x.CTRL_COMMAND,
748
748
  mac: b.H | x.MAC_CTRL,
749
749
  group: G,
750
750
  preconditions(t) {
751
- return se(t) && re(t) && (!P(t) || !ai(t));
751
+ return re(t) && ae(t) && (!P(t) || !oi(t));
752
752
  }
753
- }, di = {
754
- id: De.id,
753
+ }, hi = {
754
+ id: Pe.id,
755
755
  description: "find-replace.shortcut.go-to-next-match",
756
756
  binding: b.ENTER,
757
757
  group: G,
758
758
  priority: 1e3,
759
759
  preconditions(t) {
760
- return we(t) && P(t);
760
+ return je(t) && P(t);
761
761
  }
762
- }, hi = {
763
- id: Pe.id,
762
+ }, ui = {
763
+ id: Oe.id,
764
764
  description: "find-replace.shortcut.go-to-previous-match",
765
765
  binding: b.ENTER | x.SHIFT,
766
766
  group: G,
767
767
  priority: 1e3,
768
768
  preconditions(t) {
769
- return we(t) && P(t);
769
+ return je(t) && P(t);
770
770
  }
771
771
  };
772
- function ui(t) {
772
+ function pi(t) {
773
773
  const e = t.get(U);
774
774
  return {
775
775
  id: W.id,
776
776
  icon: "SearchIcon",
777
777
  tooltip: "find-replace.toolbar",
778
- group: _t.TOOLBAR_OTHERS,
779
- type: gt.BUTTON,
780
- positions: [mt.TOOLBAR_START],
781
- hidden$: vt(t, ct.SHEET),
782
- disabled$: Se([
783
- e.subscribeContextValue$(fe),
784
- e.subscribeContextValue$(pe)
785
- ]).pipe(It(([n, i]) => n || !i))
778
+ group: gt.TOOLBAR_OTHERS,
779
+ type: mt.BUTTON,
780
+ positions: [vt.TOOLBAR_START],
781
+ hidden$: St(t, lt.UNIVER_SHEET),
782
+ disabled$: Ce([
783
+ e.subscribeContextValue$(_e),
784
+ e.subscribeContextValue$(fe)
785
+ ]).pipe(Ft(([n, i]) => n || !i))
786
786
  };
787
787
  }
788
- var pi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, _i = (t, e, n, i) => {
789
- for (var s = i > 1 ? void 0 : i ? fi(e, n) : e, r = t.length - 1, a; r >= 0; r--)
788
+ var fi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, gi = (t, e, n, i) => {
789
+ for (var s = i > 1 ? void 0 : i ? _i(e, n) : e, r = t.length - 1, a; r >= 0; r--)
790
790
  (a = t[r]) && (s = (i ? a(e, n, s) : a(s)) || s);
791
- return i && s && pi(e, n, s), s;
791
+ return i && s && fi(e, n, s), s;
792
792
  }, g = (t, e) => (n, i) => e(n, i, t);
793
- const le = "DESKTOP_FIND_REPLACE_DIALOG", je = 350, gi = 20, mi = -90;
794
- let A = class extends lt {
793
+ const de = "DESKTOP_FIND_REPLACE_DIALOG", Le = 350, mi = 20, vi = -90;
794
+ let A = class extends dt {
795
795
  constructor(t, e, n, i, s, r, a, o, d, u, f, p) {
796
796
  super(), this._univerInstanceService = t, this._menuService = e, this._shortcutService = n, this._commandService = i, this._findReplaceService = s, this._logService = r, this._dialogService = a, this._contextService = o, this._layoutService = d, this._localeService = u, this._componentManager = f, this._injector = p, this._initCommands(), this._initUI(), this._initShortcuts();
797
797
  }
798
798
  _initCommands() {
799
799
  [
800
800
  W,
801
- ne,
802
- De,
801
+ se,
803
802
  Pe,
804
- $e,
805
- Ee
803
+ Oe,
804
+ Ne,
805
+ $e
806
806
  ].forEach((t) => {
807
807
  this.disposeWithMe(this._commandService.registerCommand(t));
808
808
  });
809
809
  }
810
810
  _initShortcuts() {
811
811
  [
812
- li,
813
- oi,
812
+ di,
814
813
  ci,
815
- hi,
816
- di
814
+ li,
815
+ ui,
816
+ hi
817
817
  ].forEach((t) => this.disposeWithMe(this._shortcutService.registerShortcut(t)));
818
818
  }
819
819
  _initUI() {
820
- this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(ui))), this.disposeWithMe(this._componentManager.register("FindReplaceDialog", ii)), this.disposeWithMe(this._componentManager.register("SearchIcon", xe)), this._findReplaceService.stateUpdates$.pipe(ae(this.dispose$)).subscribe((t) => {
820
+ this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(pi))), this.disposeWithMe(this._componentManager.register("FindReplaceDialog", ni)), this.disposeWithMe(this._componentManager.register("SearchIcon", Me)), this._findReplaceService.stateUpdates$.pipe(oe(this.dispose$)).subscribe((t) => {
821
821
  t.revealed === !0 && this._openPanel();
822
822
  }), this.disposeWithMe(
823
- this._univerInstanceService.focused$.pipe(ae(this.dispose$)).subscribe((t) => {
823
+ this._univerInstanceService.focused$.pipe(oe(this.dispose$)).subscribe((t) => {
824
824
  (!t || !this._univerInstanceService.getUniverSheetInstance(t)) && this.closePanel();
825
825
  })
826
826
  );
827
827
  }
828
828
  _openPanel() {
829
829
  this._dialogService.open({
830
- id: le,
830
+ id: de,
831
831
  draggable: !0,
832
- width: je,
832
+ width: Le,
833
833
  title: { title: this._localeService.t("find-replace.dialog.title") },
834
834
  children: { label: "FindReplaceDialog" },
835
835
  destroyOnClose: !0,
836
- defaultPosition: vi(),
836
+ defaultPosition: Si(),
837
837
  preservePositionOnDestroy: !0,
838
838
  onClose: () => this.closePanel()
839
839
  });
840
840
  }
841
841
  closePanel() {
842
- this._dialogService.close(le), this._findReplaceService.terminate(), queueMicrotask(() => this._layoutService.focus());
842
+ this._dialogService.close(de), this._findReplaceService.terminate(), queueMicrotask(() => this._layoutService.focus());
843
843
  }
844
844
  };
845
- A = _i([
846
- dt(ht.Rendered, A),
847
- g(0, he),
848
- g(1, Ct),
849
- g(2, Rt),
850
- g(3, ee),
845
+ A = gi([
846
+ ht(ut.Rendered, A),
847
+ g(0, ue),
848
+ g(1, Rt),
849
+ g(2, bt),
850
+ g(3, te),
851
851
  g(4, v),
852
- g(5, ue),
853
- g(6, bt),
852
+ g(5, pe),
853
+ g(6, xt),
854
854
  g(7, U),
855
- g(8, me),
855
+ g(8, ve),
856
856
  g(9, y(D)),
857
- g(10, y(St)),
858
- g(11, y(_e))
857
+ g(10, y(Ct)),
858
+ g(11, y(ge))
859
859
  ], A);
860
- function vi() {
860
+ function Si() {
861
861
  const { innerWidth: t } = window;
862
- return { x: (t - je) / 2 - gi, y: mi };
862
+ return { x: (t - Le) / 2 - mi, y: vi };
863
863
  }
864
- const Si = {
864
+ const Ci = {
865
865
  "find-replace": {
866
866
  toolbar: "Find & Replace",
867
867
  shortcut: {
@@ -908,7 +908,7 @@ const Si = {
908
908
  }
909
909
  },
910
910
  "find-replace-shortcuts": "Find & Replace"
911
- }, ji = Si, Ci = {
911
+ }, Li = Ci, Ri = {
912
912
  "find-replace": {
913
913
  toolbar: "查找替换",
914
914
  shortcut: {
@@ -955,38 +955,39 @@ const Si = {
955
955
  }
956
956
  },
957
957
  "find-replace-shortcuts": "查找替换"
958
- }, Ri = Ci;
959
- var bi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Mi = (t, e, n, i) => {
960
- for (var s = i > 1 ? void 0 : i ? xi(e, n) : e, r = t.length - 1, a; r >= 0; r--)
958
+ }, bi = Ri;
959
+ var xi = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, yi = (t, e, n, i) => {
960
+ for (var s = i > 1 ? void 0 : i ? Mi(e, n) : e, r = t.length - 1, a; r >= 0; r--)
961
961
  (a = t[r]) && (s = (i ? a(e, n, s) : a(s)) || s);
962
- return i && s && bi(e, n, s), s;
963
- }, yi = (t, e) => (n, i) => e(n, i, t);
964
- const Ii = "FIND_REPLACE";
965
- let de = class extends ut {
962
+ return i && s && xi(e, n, s), s;
963
+ }, Ii = (t, e) => (n, i) => e(n, i, t);
964
+ const Fi = "FIND_REPLACE";
965
+ var q;
966
+ let he = (q = class extends pt {
966
967
  constructor(t, e) {
967
- super(Ii), this._injector = t, this._localeService = e, this._localeService.load({
968
- zhCN: Ri
968
+ super(), this._injector = t, this._localeService = e, this._localeService.load({
969
+ zhCN: bi
969
970
  });
970
971
  }
971
972
  onStarting(t) {
972
- [[A], [v, { useClass: Q }]].forEach(
973
+ [[A], [v, { useClass: X }]].forEach(
973
974
  (e) => {
974
975
  t.add(e);
975
976
  }
976
977
  );
977
978
  }
978
- };
979
- de = Mi([
980
- yi(1, y(D))
981
- ], de);
979
+ }, c(q, "pluginName", Fi), q);
980
+ he = yi([
981
+ Ii(1, y(D))
982
+ ], he);
982
983
  export {
983
- Z as FindBy,
984
- Y as FindDirection,
985
- wi as FindModel,
984
+ J as FindBy,
985
+ Z as FindDirection,
986
+ ji as FindModel,
986
987
  A as FindReplaceController,
987
- J as FindScope,
988
+ Q as FindScope,
988
989
  v as IFindReplaceService,
989
- de as UniverFindReplacePlugin,
990
- ji as enUS,
991
- Ri as zhCN
990
+ he as UniverFindReplacePlugin,
991
+ Li as enUS,
992
+ bi as zhCN
992
993
  };