@univerjs/slides-ui 0.8.2 → 0.8.3-nightly.202507010644

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,17 +1,17 @@
1
1
  var ni = Object.defineProperty;
2
2
  var ri = (n, e, t) => e in n ? ni(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var S = (n, e, t) => ri(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as Z, Injector as ke, IUniverInstanceService as w, RxDisposable as ge, UniverInstanceType as E, debounce as si, getColorStyle as oi, CommandType as D, Tools as ci, LocaleService as Q, ICommandService as U, generateRandomId as Ct, BasicShapes as ai, PageElementType as ze, Disposable as De, DisposableCollection as Ke, IContextService as fe, toDisposable as St, FOCUSING_COMMON_DRAWINGS as li, createInternalEditorID as di, createIdentifier as It, EDITOR_ACTIVATED as Re, FOCUSING_EDITOR_STANDALONE as bt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Et, DocumentDataModel as ui, HorizontalAlign as xt, VerticalAlign as Oe, IUndoRedoService as hi, WrapStrategy as et, FOCUSING_EDITOR_BUT_HIDDEN as vi, DEFAULT_EMPTY_DOCUMENT_VALUE as gi, Direction as j, DocumentFlavor as fi, FOCUSING_UNIVER_EDITOR as Rt, FORMULA_EDITOR_ACTIVATED as pi, Plugin as mi, merge as _i, mergeOverrideWithDependencies as tt, IConfigService as Ci } from "@univerjs/core";
5
- import { IRenderManagerService as X, Viewport as it, ScrollBar as Ot, getCurrentTypeOfRenderer as Le, Slide as Si, Rect as wt, Scene as Ii, ObjectType as le, pxToNum as bi, DeviceInputEventType as q, convertTextRotation as nt, FIX_ONE_PIXEL_BLUR_OFFSET as ne, fixLineWidthByScale as rt } from "@univerjs/engine-render";
4
+ import { Inject as Z, Injector as ke, IUniverInstanceService as w, RxDisposable as ge, UniverInstanceType as E, debounce as si, getColorStyle as oi, CommandType as D, PageElementType as ze, Tools as ci, LocaleService as Q, ICommandService as U, generateRandomId as Ct, BasicShapes as ai, createInternalEditorID as li, createIdentifier as St, IContextService as fe, DocumentFlavor as di, FOCUSING_UNIVER_EDITOR as It, EDITOR_ACTIVATED as Re, FORMULA_EDITOR_ACTIVATED as ui, Disposable as De, DisposableCollection as Ke, toDisposable as bt, FOCUSING_COMMON_DRAWINGS as hi, FOCUSING_EDITOR_STANDALONE as Et, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as xt, DocumentDataModel as vi, HorizontalAlign as Rt, VerticalAlign as Oe, IUndoRedoService as gi, WrapStrategy as et, FOCUSING_EDITOR_BUT_HIDDEN as fi, DEFAULT_EMPTY_DOCUMENT_VALUE as pi, Direction as j, Plugin as mi, merge as _i, mergeOverrideWithDependencies as tt, IConfigService as Ci } from "@univerjs/core";
5
+ import { IRenderManagerService as X, Viewport as it, ScrollBar as Ot, getCurrentTypeOfRenderer as Le, Slide as Si, Rect as wt, Scene as Ii, ObjectType as le, FIX_ONE_PIXEL_BLUR_OFFSET as ne, DeviceInputEventType as q, pxToNum as bi, convertTextRotation as nt, fixLineWidthByScale as rt } from "@univerjs/engine-render";
6
6
  import { ObjectProvider as Ei, SLIDE_KEY as re } from "@univerjs/slides";
7
- import { useDependency as O, ISidebarService as yt, ICanvasPopupService as xi, ILayoutService as Ri, KeyCode as y, ILocalFileService as Oi, useObservable as wi, DISABLE_AUTO_FOCUS_KEY as st, getMenuHiddenObservable as pe, MenuItemType as me, RibbonStartGroup as yi, MetaKeys as Pi, IMenuManagerService as Ti, ComponentManager as Mi, IUIPartsService as Ni, IShortcutService as Di, BuiltInUIPart as ot, connectInjector as ct } from "@univerjs/ui";
7
+ import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as xi, IImageIoService as Ri, getImageSize as Oi } from "@univerjs/drawing";
8
+ import { ILocalFileService as wi, useDependency as O, ISidebarService as yt, getMenuHiddenObservable as pe, MenuItemType as me, RibbonStartGroup as yi, useObservable as Pi, DISABLE_AUTO_FOCUS_KEY as st, KeyCode as y, MetaKeys as Ti, IMenuManagerService as Mi, ComponentManager as Ni, IUIPartsService as Di, IShortcutService as Ui, BuiltInUIPart as ot, connectInjector as ct, ICanvasPopupService as Vi, ILayoutService as ji } from "@univerjs/ui";
8
9
  import { jsxs as x, jsx as u } from "react/jsx-runtime";
9
- import { Button as Se, clsx as K, Dropdown as Pt, ColorPicker as Ui, borderTopClassName as Tt, InputNumber as ae, borderClassName as ue, scrollbarClassName as Vi } from "@univerjs/design";
10
- import { forwardRef as F, useRef as Mt, createElement as W, useState as $, useEffect as he, useMemo as ji, createRef as Ai, useCallback as at } from "react";
11
- import { BehaviorSubject as J, Subject as Nt, filter as Li, takeUntil as lt } from "rxjs";
12
- import { DocSelectionManagerService as Bi, DocSkeletonManagerService as dt, RichTextEditingMutation as $i } from "@univerjs/docs";
13
- import { IEditorService as Ze, DocSelectionRenderService as ut, VIEWPORT_KEY as ht, DOCS_COMPONENT_MAIN_LAYER_INDEX as Hi, MoveSelectionOperation as Fi, MoveCursorOperation as Wi, DOCS_VIEW_KEY as ki, DeleteLeftCommand as zi } from "@univerjs/docs-ui";
14
- import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Ki, IImageIoService as Zi, getImageSize as Xi } from "@univerjs/drawing";
10
+ import { Button as Se, clsx as K, Dropdown as Pt, ColorPicker as Ai, borderTopClassName as Tt, InputNumber as ae, borderClassName as ue, scrollbarClassName as Li } from "@univerjs/design";
11
+ import { forwardRef as F, useRef as Mt, createElement as W, useState as $, useEffect as he, useMemo as Bi, createRef as $i, useCallback as at } from "react";
12
+ import { IEditorService as Ze, DeleteLeftCommand as Hi, DocSelectionRenderService as lt, VIEWPORT_KEY as dt, DOCS_COMPONENT_MAIN_LAYER_INDEX as Fi, MoveSelectionOperation as Wi, MoveCursorOperation as ki, DOCS_VIEW_KEY as zi } from "@univerjs/docs-ui";
13
+ import { BehaviorSubject as J, Subject as Nt, filter as Ki, takeUntil as ut } from "rxjs";
14
+ import { DocSelectionManagerService as Zi, DocSkeletonManagerService as ht, RichTextEditingMutation as Xi } from "@univerjs/docs";
15
15
  var Gi = Object.getOwnPropertyDescriptor, Yi = (n, e, t, i) => {
16
16
  for (var r = i > 1 ? void 0 : i ? Gi(e, t) : e, s = n.length - 1, o; s >= 0; s--)
17
17
  (o = n[s]) && (r = o(r) || r);
@@ -294,7 +294,26 @@ let T = class extends ge {
294
294
  T = Ji([
295
295
  Qi(0, X)
296
296
  ], T);
297
- const en = "slides-ui.config", vt = {}, Dt = {
297
+ const Dt = {
298
+ id: "slide.operation.activate-slide",
299
+ type: D.OPERATION,
300
+ handler: (n, e) => {
301
+ var h, l;
302
+ const t = e.unitId, i = n.get(T), s = n.get(w).getUnit(t), o = (h = s == null ? void 0 : s.getActivePage()) == null ? void 0 : h.id;
303
+ if (!o) return !1;
304
+ const c = i.getRenderUnitByPageId(o, t);
305
+ if (!c) return !1;
306
+ const a = (l = c.scene) == null ? void 0 : l.getTransformer();
307
+ return a && a.clearControls(), i.activePage(e.id, t), !0;
308
+ }
309
+ }, Ut = {
310
+ id: "slide.operation.append-slide",
311
+ type: D.OPERATION,
312
+ handler: (n, e) => {
313
+ const t = e.unitId;
314
+ return n.get(w).getUnit(t) ? (n.get(T).appendPage(t), !0) : !1;
315
+ }
316
+ }, Vt = {
298
317
  id: "slide.operation.delete-element",
299
318
  type: D.OPERATION,
300
319
  handler: (n, e) => {
@@ -304,6 +323,46 @@ const en = "slides-ui.config", vt = {}, Dt = {
304
323
  const s = r.getActivePage();
305
324
  return delete s.pageElements[e.id], r.updatePage(s.id, s), n.get(T).removeObjectById(e.id, s.id, t), !0;
306
325
  }
326
+ }, Xe = {
327
+ id: "slide.command.insert-float-image",
328
+ type: D.COMMAND,
329
+ handler: async (n, e) => {
330
+ var V;
331
+ const t = n.get(w), i = (V = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : V.getUnitId();
332
+ if (!i) return !1;
333
+ const s = await n.get(wi).openFile({
334
+ multiple: !0,
335
+ accept: xi.map((R) => `.${R.replace("image/", "")}`).join(",")
336
+ });
337
+ if (s.length !== 1) return !1;
338
+ const c = await n.get(Ri).saveImage(s[0]);
339
+ if (!c) return !1;
340
+ const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: g, height: m, image: p } = await Oi(d || ""), f = t.getUnit(i);
341
+ if (!f) return !1;
342
+ const v = f.getActivePage(), _ = Object.values(v.pageElements), I = _ != null && _.length ? Math.max(..._.map((R) => R.zIndex)) : 20, b = {
343
+ id: a,
344
+ zIndex: I + 1,
345
+ left: 0,
346
+ top: 0,
347
+ width: g,
348
+ height: m,
349
+ title: "",
350
+ description: "",
351
+ type: ze.IMAGE,
352
+ image: {
353
+ imageProperties: {
354
+ contentUrl: d,
355
+ imageSourceType: h,
356
+ source: l,
357
+ base64Cache: d,
358
+ image: p
359
+ }
360
+ }
361
+ };
362
+ v.pageElements[a] = b, f.updatePage(v.id, v);
363
+ const P = n.get(T), M = P.createObjectToPage(b, v.id, i);
364
+ return M && P.setObjectActiveByPage(M, v.id, i), !0;
365
+ }
307
366
  };
308
367
  var N = function() {
309
368
  return N = Object.assign || function(n) {
@@ -313,7 +372,7 @@ var N = function() {
313
372
  }
314
373
  return n;
315
374
  }, N.apply(this, arguments);
316
- }, tn = function(n, e) {
375
+ }, en = function(n, e) {
317
376
  var t = {};
318
377
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
319
378
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -321,15 +380,15 @@ var N = function() {
321
380
  e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[r]) && (t[i[r]] = n[i[r]]);
322
381
  return t;
323
382
  }, k = F(function(n, e) {
324
- var t = n.icon, i = n.id, r = n.className, s = n.extend, o = tn(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Mt("_".concat(sn()));
325
- return Ut(t, "".concat(i), { defIds: t.defIds, idSuffix: a.current }, N({ ref: e, className: c }, o), s);
383
+ var t = n.icon, i = n.id, r = n.className, s = n.extend, o = en(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Mt("_".concat(rn()));
384
+ return jt(t, "".concat(i), { defIds: t.defIds, idSuffix: a.current }, N({ ref: e, className: c }, o), s);
326
385
  });
327
- function Ut(n, e, t, i, r) {
328
- return W(n.tag, N(N({ key: e }, nn(n, t, r)), i), (rn(n, t).children || []).map(function(s, o) {
329
- return Ut(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
386
+ function jt(n, e, t, i, r) {
387
+ return W(n.tag, N(N({ key: e }, tn(n, t, r)), i), (nn(n, t).children || []).map(function(s, o) {
388
+ return jt(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
330
389
  }));
331
390
  }
332
- function nn(n, e, t) {
391
+ function tn(n, e, t) {
333
392
  var i = N({}, n.attrs);
334
393
  t != null && t.colorChannel1 && i.fill === "colorChannel1" && (i.fill = t.colorChannel1), n.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
335
394
  var o = s[0], c = s[1];
@@ -341,88 +400,88 @@ function nn(n, e, t) {
341
400
  typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
342
401
  })), i;
343
402
  }
344
- function rn(n, e) {
403
+ function nn(n, e) {
345
404
  var t, i = e.defIds;
346
405
  return !i || i.length === 0 ? n : n.tag === "defs" && (!((t = n.children) === null || t === void 0) && t.length) ? N(N({}, n), { children: n.children.map(function(r) {
347
406
  return typeof r.attrs.id == "string" && i && i.includes(r.attrs.id) ? N(N({}, r), { attrs: N(N({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
348
407
  }) }) : n;
349
408
  }
350
- function sn() {
409
+ function rn() {
351
410
  return Math.random().toString(36).substring(2, 8);
352
411
  }
353
412
  k.displayName = "UniverIcon";
354
- var on = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365ZM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365ZM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635ZM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vt = F(function(n, e) {
413
+ var sn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365ZM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365ZM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635ZM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = F(function(n, e) {
355
414
  return W(k, Object.assign({}, n, {
356
415
  id: "autofill-double-icon",
357
416
  ref: e,
358
- icon: on
417
+ icon: sn
359
418
  }));
360
419
  });
361
- Vt.displayName = "AutofillDoubleIcon";
362
- var cn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334C15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334C2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045ZM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334C3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999C15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999C2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544ZM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999C3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421C6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641C9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421C11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946C8.64077 14.6502 8.70566 14.6923 8.77482 14.7209C8.84557 14.7502 8.92314 14.7664 9.00449 14.7664C9.08585 14.7664 9.16342 14.7502 9.23416 14.7209C9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, jt = F(function(n, e) {
420
+ At.displayName = "AutofillDoubleIcon";
421
+ var on = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334C15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334C2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045ZM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334C3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999C15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999C2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544ZM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999C3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421C6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641C9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421C11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946C8.64077 14.6502 8.70566 14.6923 8.77482 14.7209C8.84557 14.7502 8.92314 14.7664 9.00449 14.7664C9.08585 14.7664 9.16342 14.7502 9.23416 14.7209C9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, Lt = F(function(n, e) {
363
422
  return W(k, Object.assign({}, n, {
364
423
  id: "bottom-icon",
365
424
  ref: e,
366
- icon: cn
425
+ icon: on
367
426
  }));
368
427
  });
369
- jt.displayName = "BottomIcon";
370
- var an = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-icon_clip0_1293_28)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.29541 11.1896C3.83208 10.7489 1.9624 8.59552 1.9624 6.00544C1.9624 3.09673 4.32036 0.73877 7.22907 0.73877C9.93483 0.73877 12.164 2.77918 12.4619 5.40527H13.5621C14.998 5.40527 16.1621 6.56933 16.1621 8.00527V12.6719C16.1621 14.1079 14.998 15.2719 13.5621 15.2719H8.89541C7.45947 15.2719 6.29541 14.1079 6.29541 12.6719V11.1896ZM3.1624 6.00544C3.1624 3.75947 4.98311 1.93877 7.22907 1.93877C9.27112 1.93877 10.9616 3.44388 11.2518 5.40527H8.89541C7.45947 5.40527 6.29541 6.56933 6.29541 8.00527V9.96442C4.49946 9.5425 3.1624 7.93012 3.1624 6.00544ZM7.49541 8.00527C7.49541 7.23207 8.12221 6.60527 8.89541 6.60527H13.5621C14.3353 6.60527 14.9621 7.23207 14.9621 8.00527V12.6719C14.9621 13.4451 14.3353 14.0719 13.5621 14.0719H8.89541C8.12221 14.0719 7.49541 13.4451 7.49541 12.6719V8.00527Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "graph-icon_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-icon_clip0_1293_28"] }, At = F(function(n, e) {
428
+ Lt.displayName = "BottomIcon";
429
+ var cn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-icon_clip0_1293_28)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.29541 11.1896C3.83208 10.7489 1.9624 8.59552 1.9624 6.00544C1.9624 3.09673 4.32036 0.73877 7.22907 0.73877C9.93483 0.73877 12.164 2.77918 12.4619 5.40527H13.5621C14.998 5.40527 16.1621 6.56933 16.1621 8.00527V12.6719C16.1621 14.1079 14.998 15.2719 13.5621 15.2719H8.89541C7.45947 15.2719 6.29541 14.1079 6.29541 12.6719V11.1896ZM3.1624 6.00544C3.1624 3.75947 4.98311 1.93877 7.22907 1.93877C9.27112 1.93877 10.9616 3.44388 11.2518 5.40527H8.89541C7.45947 5.40527 6.29541 6.56933 6.29541 8.00527V9.96442C4.49946 9.5425 3.1624 7.93012 3.1624 6.00544ZM7.49541 8.00527C7.49541 7.23207 8.12221 6.60527 8.89541 6.60527H13.5621C14.3353 6.60527 14.9621 7.23207 14.9621 8.00527V12.6719C14.9621 13.4451 14.3353 14.0719 13.5621 14.0719H8.89541C8.12221 14.0719 7.49541 13.4451 7.49541 12.6719V8.00527Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "graph-icon_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-icon_clip0_1293_28"] }, Bt = F(function(n, e) {
371
430
  return W(k, Object.assign({}, n, {
372
431
  id: "graph-icon",
373
432
  ref: e,
374
- icon: an
433
+ icon: cn
375
434
  }));
376
435
  });
377
- At.displayName = "GraphIcon";
378
- var ln = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Xe = F(function(n, e) {
436
+ Bt.displayName = "GraphIcon";
437
+ var an = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ge = F(function(n, e) {
379
438
  return W(k, Object.assign({}, n, {
380
439
  id: "more-down-icon",
381
440
  ref: e,
382
- icon: ln
441
+ icon: an
383
442
  }));
384
443
  });
385
- Xe.displayName = "MoreDownIcon";
386
- var dn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, Lt = F(function(n, e) {
444
+ Ge.displayName = "MoreDownIcon";
445
+ var ln = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, $t = F(function(n, e) {
387
446
  return W(k, Object.assign({}, n, {
388
447
  id: "move-down-icon",
389
448
  ref: e,
390
- icon: dn
449
+ icon: ln
391
450
  }));
392
451
  });
393
- Lt.displayName = "MoveDownIcon";
394
- var un = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, Bt = F(function(n, e) {
452
+ $t.displayName = "MoveDownIcon";
453
+ var dn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, Ht = F(function(n, e) {
395
454
  return W(k, Object.assign({}, n, {
396
455
  id: "move-up-icon",
397
456
  ref: e,
398
- icon: un
457
+ icon: dn
399
458
  }));
400
459
  });
401
- Bt.displayName = "MoveUpIcon";
402
- var hn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, $t = F(function(n, e) {
460
+ Ht.displayName = "MoveUpIcon";
461
+ var un = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, Ft = F(function(n, e) {
403
462
  return W(k, Object.assign({}, n, {
404
463
  id: "paint-bucket-double-icon",
405
464
  ref: e,
406
- icon: hn
465
+ icon: un
407
466
  }));
408
467
  });
409
- $t.displayName = "PaintBucketDoubleIcon";
410
- var vn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-icon_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-icon_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-icon_clip0_1293_26"] }, Ht = F(function(n, e) {
468
+ Ft.displayName = "PaintBucketDoubleIcon";
469
+ var hn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-icon_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-icon_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-icon_clip0_1293_26"] }, Wt = F(function(n, e) {
411
470
  return W(k, Object.assign({}, n, {
412
471
  id: "text-icon",
413
472
  ref: e,
414
- icon: vn
473
+ icon: hn
415
474
  }));
416
475
  });
417
- Ht.displayName = "TextIcon";
418
- var gn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9C15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9ZM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9C2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9C13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665C15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665ZM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665C2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665C13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ft = F(function(n, e) {
476
+ Wt.displayName = "TextIcon";
477
+ var vn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9C15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9ZM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9C2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9C13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665C15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665ZM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665C2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665C13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, kt = F(function(n, e) {
419
478
  return W(k, Object.assign({}, n, {
420
479
  id: "topmost-icon",
421
480
  ref: e,
422
- icon: gn
481
+ icon: vn
423
482
  }));
424
483
  });
425
- Ft.displayName = "TopmostIcon";
484
+ kt.displayName = "TopmostIcon";
426
485
  const H = {
427
486
  id: "slide.operation.update-element",
428
487
  type: D.OPERATION,
@@ -433,7 +492,7 @@ const H = {
433
492
  return c.pageElements[t] = ci.deepMerge(c.pageElements[t], i), o.updatePage(c.id, c), !0;
434
493
  }
435
494
  };
436
- function fn(n) {
495
+ function gn(n) {
437
496
  const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
438
497
  if (!c) return null;
439
498
  const a = c.getTransformer();
@@ -471,7 +530,7 @@ function fn(n) {
471
530
  /* forward */
472
531
  );
473
532
  }, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
474
- /* @__PURE__ */ u(Bt, {}),
533
+ /* @__PURE__ */ u(Ht, {}),
475
534
  i.t("image-panel.arrange.forward")
476
535
  ] }) }) }),
477
536
  /* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
@@ -480,7 +539,7 @@ function fn(n) {
480
539
  /* backward */
481
540
  );
482
541
  }, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
483
- /* @__PURE__ */ u(Lt, {}),
542
+ /* @__PURE__ */ u($t, {}),
484
543
  i.t("image-panel.arrange.backward")
485
544
  ] }) }) })
486
545
  ] }),
@@ -491,7 +550,7 @@ function fn(n) {
491
550
  /* front */
492
551
  );
493
552
  }, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
494
- /* @__PURE__ */ u(Ft, {}),
553
+ /* @__PURE__ */ u(kt, {}),
495
554
  i.t("image-panel.arrange.front")
496
555
  ] }) }) }),
497
556
  /* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
@@ -500,13 +559,13 @@ function fn(n) {
500
559
  /* back */
501
560
  );
502
561
  }, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
503
- /* @__PURE__ */ u(jt, {}),
562
+ /* @__PURE__ */ u(Lt, {}),
504
563
  i.t("image-panel.arrange.back")
505
564
  ] }) }) })
506
565
  ] })
507
566
  ] });
508
567
  }
509
- function pn(n) {
568
+ function fn(n) {
510
569
  var p, f;
511
570
  const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
512
571
  if (!c) return null;
@@ -548,15 +607,15 @@ function pn(n) {
548
607
  Pt,
549
608
  {
550
609
  overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
551
- Ui,
610
+ Ai,
552
611
  {
553
612
  value: "#fff",
554
613
  onChange: m
555
614
  }
556
615
  ) }),
557
616
  children: /* @__PURE__ */ x("a", { className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1", children: [
558
- /* @__PURE__ */ u($t, { className: "univer-fill-primary-600" }),
559
- /* @__PURE__ */ u(Xe, {})
617
+ /* @__PURE__ */ u(Ft, { className: "univer-fill-primary-600" }),
618
+ /* @__PURE__ */ u(Ge, {})
560
619
  ] })
561
620
  }
562
621
  ) }) })
@@ -564,7 +623,7 @@ function pn(n) {
564
623
  }
565
624
  );
566
625
  }
567
- function mn(n) {
626
+ function pn(n) {
568
627
  const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
569
628
  if (!c) return null;
570
629
  const a = c.getTransformer();
@@ -735,7 +794,7 @@ function mn(n) {
735
794
  );
736
795
  }
737
796
  const xe = "COMPONENT_SLIDE_SIDEBAR";
738
- function _n() {
797
+ function mn() {
739
798
  var h, l, d;
740
799
  const n = O(w), e = O(T), t = n.getCurrentUnitForType(E.UNIVER_SLIDE), i = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id;
741
800
  if (!i) return null;
@@ -746,20 +805,20 @@ function _n() {
746
805
  return null;
747
806
  const a = ((d = n.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
748
807
  return /* @__PURE__ */ x("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
749
- /* @__PURE__ */ u(fn, { pageId: i, unitId: a }),
750
- /* @__PURE__ */ u(mn, { pageId: i, unitId: a }),
751
- c.objectType === le.RECT && /* @__PURE__ */ u(pn, { pageId: i, unitId: a })
808
+ /* @__PURE__ */ u(gn, { pageId: i, unitId: a }),
809
+ /* @__PURE__ */ u(pn, { pageId: i, unitId: a }),
810
+ c.objectType === le.RECT && /* @__PURE__ */ u(fn, { pageId: i, unitId: a })
752
811
  ] });
753
812
  }
754
- const Ge = {
813
+ const Ye = {
755
814
  id: "slide.command.insert-float-shape",
756
815
  type: D.COMMAND,
757
816
  handler: async (n) => {
758
817
  var r;
759
818
  const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
760
- return e.executeCommand(Wt.id, { unitId: i });
819
+ return e.executeCommand(zt.id, { unitId: i });
761
820
  }
762
- }, Wt = {
821
+ }, zt = {
763
822
  id: "slide.operation.insert-float-shape",
764
823
  type: D.OPERATION,
765
824
  handler: async (n, e) => {
@@ -803,147 +862,589 @@ const Ge = {
803
862
  width: 360
804
863
  }) : r.close(), !0;
805
864
  }
806
- }, kt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
807
- var Cn = Object.getOwnPropertyDescriptor, Sn = (n, e, t, i) => {
808
- for (var r = i > 1 ? void 0 : i ? Cn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
809
- (o = n[s]) && (r = o(r) || r);
810
- return r;
811
- }, Ie = (n, e) => (t, i) => e(t, i, n);
812
- function In(n, e) {
813
- const t = gt(n.left, n.top, e), i = gt(n.right, n.bottom, e);
865
+ }, qe = {
866
+ id: "slide.command.add-text",
867
+ type: D.COMMAND,
868
+ handler: async (n) => {
869
+ var r;
870
+ const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
871
+ return await e.executeCommand(Kt.id, { unitId: i });
872
+ }
873
+ }, Kt = {
874
+ id: "slide.operation.add-text",
875
+ type: D.OPERATION,
876
+ handler: async (n, e) => {
877
+ const t = e.unitId, i = Ct(6), r = 220, s = 40, o = 230, c = 142, a = (e == null ? void 0 : e.text) || "A New Text", l = n.get(w).getUnit(t);
878
+ if (!l) return !1;
879
+ const d = l.getActivePage(), g = Object.values(d.pageElements), m = g != null && g.length ? Math.max(...g.map((_) => _.zIndex)) : 21, p = {
880
+ id: i,
881
+ zIndex: m + 1,
882
+ left: o,
883
+ top: c,
884
+ width: r,
885
+ height: s,
886
+ title: "text",
887
+ description: "",
888
+ type: ze.TEXT,
889
+ richText: {
890
+ text: a,
891
+ fs: 30,
892
+ cl: {
893
+ rgb: "rgb(51, 51, 51)"
894
+ },
895
+ bl: 1
896
+ }
897
+ };
898
+ d.pageElements[i] = p, l.updatePage(d.id, d);
899
+ const f = n.get(T), v = f.createObjectToPage(p, d.id, t);
900
+ return v && f.setObjectActiveByPage(v, d.id, t), !0;
901
+ }
902
+ }, Zt = {
903
+ id: "slide.operation.set-slide-page-thumb",
904
+ type: D.OPERATION,
905
+ handler: (n, e) => (n.get(T).createThumbs(e.unitId), !0)
906
+ };
907
+ function _n() {
908
+ var p, f;
909
+ const n = O(w), e = O(U), t = O(X), i = O(Q), r = Mt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), c = s == null ? void 0 : s.getPageOrder();
910
+ if (!o || !c)
911
+ return null;
912
+ const a = c.map((v) => o[v]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d = Bi(() => a.map(() => $i()), [a]);
913
+ he(() => {
914
+ const v = s == null ? void 0 : s.activePage$.subscribe((_) => {
915
+ var b;
916
+ const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
917
+ I && l(I);
918
+ });
919
+ return () => {
920
+ v == null || v.unsubscribe();
921
+ };
922
+ }, []), he(() => {
923
+ d.forEach((v, _) => {
924
+ var I;
925
+ if (v.current) {
926
+ const b = a[_];
927
+ (I = t.getRenderById(b.id)) == null || I.engine.setContainer(v.current);
928
+ }
929
+ }), d.length > 0 && e.syncExecuteCommand(Zt.id, { unitId: s == null ? void 0 : s.getUnitId() });
930
+ }, [d, a, t, e, s]);
931
+ const g = at((v) => {
932
+ e.syncExecuteCommand(Dt.id, { id: v, unitId: s == null ? void 0 : s.getUnitId() });
933
+ }, [e, s]), m = at(() => {
934
+ e.syncExecuteCommand(Ut.id, { unitId: s == null ? void 0 : s.getUnitId() });
935
+ }, [e, s]);
936
+ return /* @__PURE__ */ u(
937
+ "aside",
938
+ {
939
+ ref: r,
940
+ className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Li),
941
+ children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
942
+ /* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
943
+ "a",
944
+ {
945
+ className: K("univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer univer-rounded-md univer-bg-white univer-text-center univer-text-sm univer-leading-8 univer-transition-colors", ue),
946
+ onClick: m,
947
+ children: i.t("slide.append")
948
+ }
949
+ ) }),
950
+ a.map((v, _) => /* @__PURE__ */ x(
951
+ "div",
952
+ {
953
+ className: K("univer-my-4 univer-flex univer-gap-2", {
954
+ "[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": v.id === h
955
+ }),
956
+ onClick: () => g(v.id),
957
+ children: [
958
+ /* @__PURE__ */ u("span", { children: _ + 1 }),
959
+ /* @__PURE__ */ u(
960
+ "div",
961
+ {
962
+ ref: d[_],
963
+ className: K("univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-white hover:univer-border-primary-600", ue)
964
+ }
965
+ )
966
+ ]
967
+ },
968
+ v.id
969
+ ))
970
+ ] })
971
+ }
972
+ );
973
+ }
974
+ const de = li("SLIDE_EDITOR"), Xt = "slide.menu.image";
975
+ function Cn(n) {
814
976
  return {
815
- left: t.x,
816
- top: t.y,
817
- right: i.x,
818
- bottom: i.y
977
+ id: Xt,
978
+ type: me.SUBITEMS,
979
+ icon: "AddImageIcon",
980
+ tooltip: "slide.image.insert.title",
981
+ hidden$: pe(n, E.UNIVER_SLIDE)
819
982
  };
820
983
  }
821
- function gt(n, e, t) {
822
- const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(re.VIEW);
823
- if (!s)
824
- return {
825
- x: n,
826
- y: e
827
- };
828
- const { viewportScrollX: o, viewportScrollY: c } = s, a = (n - o) * i, h = (e - c) * r;
984
+ function Sn(n) {
829
985
  return {
830
- x: a,
831
- y: h
986
+ id: Xe.id,
987
+ title: "slide.image.insert.float",
988
+ type: me.BUTTON,
989
+ hidden$: pe(n, E.UNIVER_SLIDE)
832
990
  };
833
991
  }
834
- let we = class extends De {
835
- constructor(n, e, t, i) {
836
- super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
992
+ const Gt = "slide.menu.shape";
993
+ function In(n) {
994
+ return {
995
+ id: Gt,
996
+ type: me.SUBITEMS,
997
+ icon: "GraphIcon",
998
+ tooltip: "slide.shape.insert.title",
999
+ hidden$: pe(n, E.UNIVER_SLIDE)
1000
+ // disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
1001
+ };
1002
+ }
1003
+ function bn(n) {
1004
+ return {
1005
+ id: Ye.id,
1006
+ title: "slide.shape.insert.rectangle",
1007
+ type: me.BUTTON,
1008
+ hidden$: pe(n, E.UNIVER_SLIDE)
1009
+ };
1010
+ }
1011
+ function En(n) {
1012
+ return {
1013
+ id: qe.id,
1014
+ type: me.BUTTON,
1015
+ icon: "TextIcon",
1016
+ tooltip: "slide.text.insert.title",
1017
+ hidden$: pe(n, E.UNIVER_SLIDE)
1018
+ };
1019
+ }
1020
+ const xn = {
1021
+ [yi.FORMAT]: {
1022
+ [qe.id]: {
1023
+ order: 0,
1024
+ menuItemFactory: En
1025
+ },
1026
+ [Xt]: {
1027
+ order: 0,
1028
+ menuItemFactory: Cn,
1029
+ [Xe.id]: {
1030
+ order: 0,
1031
+ menuItemFactory: Sn
1032
+ }
1033
+ },
1034
+ [Gt]: {
1035
+ order: 0,
1036
+ menuItemFactory: In,
1037
+ [Ye.id]: {
1038
+ order: 0,
1039
+ menuItemFactory: bn
1040
+ }
1041
+ }
837
1042
  }
838
- _createObjectPositionObserver(n, e) {
839
- const i = (() => {
840
- var L, B, ee, te;
841
- const { scene: o, engine: c } = e, { left: a, top: h, width: l, height: d } = n, g = (o.width - ((B = (L = e.mainComponent) == null ? void 0 : L.width) != null ? B : 0)) / 2, m = (o.height - ((te = (ee = e.mainComponent) == null ? void 0 : ee.height) != null ? te : 0)) / 2, p = {
842
- left: a,
843
- right: a + l,
844
- top: h,
845
- bottom: h + d
846
- }, f = c.getCanvasElement(), v = f.getBoundingClientRect(), _ = bi(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), P = In(p, o), { top: M, left: V, width: R } = v, z = R / _;
847
- return {
848
- left: P.left * z * I + V + g,
849
- right: P.right * z * I + V + g,
850
- top: P.top * z * b + M + m,
851
- bottom: P.bottom * z * b + M + m
852
- };
853
- })(), r = new J(i), s = new Ke();
854
- return {
855
- position: i,
856
- position$: r,
857
- disposable: s
858
- };
859
- }
860
- attachPopupToObject(n, e) {
861
- const i = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getUnitId(), r = this._renderManagerService.getRenderById(i);
862
- if (!r)
863
- return {
864
- dispose: () => {
1043
+ }, we = {
1044
+ id: "slide.operation.edit-arrow",
1045
+ type: D.OPERATION,
1046
+ handler: () => !0
1047
+ }, Yt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
1048
+ function Rn(n) {
1049
+ var p, f;
1050
+ const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
1051
+ if (!e)
1052
+ return null;
1053
+ const t = O(U), i = O(Q), [r, s] = $(!1), [o, c] = $(!1), a = () => {
1054
+ c(!0);
1055
+ }, h = () => {
1056
+ c(!1);
1057
+ }, l = (v) => {
1058
+ s(v);
1059
+ }, d = (v) => {
1060
+ t.executeCommand(v.commandId, v.commandParams), s(!1);
1061
+ }, g = r || o, m = e.filter((v) => !v.disable);
1062
+ return /* @__PURE__ */ u(
1063
+ "div",
1064
+ {
1065
+ onMouseEnter: a,
1066
+ onMouseLeave: h,
1067
+ children: /* @__PURE__ */ u(
1068
+ Pt,
1069
+ {
1070
+ align: "start",
1071
+ overlay: /* @__PURE__ */ u(
1072
+ "ul",
1073
+ {
1074
+ className: K("univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1 univer-rounded-lg univer-bg-white univer-p-1.5 univer-text-sm univer-shadow-lg", ue),
1075
+ children: m.map((v) => /* @__PURE__ */ u(
1076
+ "li",
1077
+ {
1078
+ className: "univer-relative univer-box-border univer-flex univer-h-8 univer-cursor-pointer univer-items-center univer-rounded univer-text-sm univer-transition-colors hover:univer-bg-gray-100",
1079
+ onClick: () => d(v),
1080
+ children: /* @__PURE__ */ u("span", { className: "univer-px-2 univer-py-1.5 univer-align-middle", children: i.t(v.label) })
1081
+ },
1082
+ v.index
1083
+ ))
1084
+ }
1085
+ ),
1086
+ open: r,
1087
+ onOpenChange: l,
1088
+ children: /* @__PURE__ */ x(
1089
+ "div",
1090
+ {
1091
+ className: K("univer-flex univer-items-center univer-gap-2 univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-800", ue, {
1092
+ "univer-bg-gray-100 dark:!univer-bg-gray-800": r,
1093
+ "univer-bg-white dark:!univer-bg-gray-900": !r
1094
+ }),
1095
+ children: [
1096
+ /* @__PURE__ */ u(
1097
+ At,
1098
+ {
1099
+ className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
1100
+ }
1101
+ ),
1102
+ g && /* @__PURE__ */ u(Ge, { className: "dark:!univer-text-white" })
1103
+ ]
1104
+ }
1105
+ )
865
1106
  }
866
- };
867
- const { position: s, position$: o, disposable: c } = this._createObjectPositionObserver(n, r), a = this._globalPopupManagerService.addPopup({
868
- ...e,
869
- unitId: i,
870
- subUnitId: "default",
871
- anchorRect: s,
872
- anchorRect$: o,
873
- canvasElement: r.engine.getCanvasElement()
1107
+ )
1108
+ }
1109
+ );
1110
+ }
1111
+ class On {
1112
+ constructor() {
1113
+ S(this, "_state", null);
1114
+ S(this, "_rect", null);
1115
+ S(this, "_state$", new J(null));
1116
+ S(this, "state$", this._state$.asObservable());
1117
+ S(this, "_rect$", new J(null));
1118
+ S(this, "rect$", this._rect$.asObservable());
1119
+ S(this, "_focus", !1);
1120
+ S(this, "_focus$", new J(this._focus));
1121
+ S(this, "focus$", this._focus$.asObservable());
1122
+ }
1123
+ dispose() {
1124
+ this._state$.complete(), this._state = null, this._rect$.complete(), this._rect = null;
1125
+ }
1126
+ setState(e) {
1127
+ this._state = e, this._refresh(e);
1128
+ }
1129
+ getRect() {
1130
+ return this._rect;
1131
+ }
1132
+ setRect(e) {
1133
+ this._rect = e, this._rect$.next(e);
1134
+ }
1135
+ getState() {
1136
+ return this._state;
1137
+ }
1138
+ setFocus(e = !1) {
1139
+ this._focus = e, this._focus$.next(e);
1140
+ }
1141
+ _refresh(e) {
1142
+ this._state$.next(e);
1143
+ }
1144
+ }
1145
+ const Je = St(
1146
+ "univer.slide-editor-manager.service"
1147
+ ), ye = -1e3, vt = {
1148
+ width: 0,
1149
+ height: 0,
1150
+ top: ye,
1151
+ left: ye
1152
+ };
1153
+ function wn() {
1154
+ const [n, e] = $({
1155
+ ...vt
1156
+ }), t = O(Je), i = O(Ze), r = O(fe), s = Pi(
1157
+ () => r.subscribeContextValue$(st),
1158
+ !1,
1159
+ void 0,
1160
+ [r, st]
1161
+ );
1162
+ return di.UNSPECIFIED, he(() => {
1163
+ t.state$.subscribe((o) => {
1164
+ if (o == null)
1165
+ return;
1166
+ const {
1167
+ startX: c = ye,
1168
+ startY: a = ye,
1169
+ endX: h = 0,
1170
+ endY: l = 0,
1171
+ show: d = !1
1172
+ } = o;
1173
+ if (!d)
1174
+ e({
1175
+ ...vt
1176
+ });
1177
+ else {
1178
+ e({
1179
+ width: h - c - ne + 2,
1180
+ height: l - a - ne + 2,
1181
+ left: c + ne,
1182
+ top: a + ne
1183
+ });
1184
+ const g = i.getEditor(de);
1185
+ if (g == null)
1186
+ return;
1187
+ const { left: m, top: p, width: f, height: v } = g.getBoundingClientRect();
1188
+ t.setRect({ left: m, top: p, width: f, height: v });
1189
+ }
874
1190
  });
875
- return {
876
- dispose: () => {
877
- this._globalPopupManagerService.removePopup(a), o.complete(), c.dispose();
1191
+ }, []), he(() => {
1192
+ s || t.setFocus(!0);
1193
+ }, [s, n]), /* @__PURE__ */ u(
1194
+ "div",
1195
+ {
1196
+ className: K("univer-absolute univer-z-10 univer-box-border univer-flex", ue),
1197
+ style: {
1198
+ left: n.left,
1199
+ top: n.top,
1200
+ width: n.width,
1201
+ height: n.height
878
1202
  }
879
- };
880
- }
1203
+ }
1204
+ );
1205
+ }
1206
+ function $e(n) {
1207
+ return n.getContextValue(It) && n.getContextValue(Re);
1208
+ }
1209
+ function yn(n) {
1210
+ return n.getContextValue(ui) && n.getContextValue(It);
1211
+ }
1212
+ const qt = [
1213
+ y.ARROW_DOWN,
1214
+ y.ARROW_UP,
1215
+ y.ARROW_LEFT,
1216
+ y.ARROW_RIGHT
1217
+ ];
1218
+ [y.ENTER, y.TAB, ...qt];
1219
+ function Pn() {
1220
+ const n = [];
1221
+ for (const e of qt)
1222
+ n.push({
1223
+ id: we.id,
1224
+ binding: e,
1225
+ preconditions: (t) => $e(t),
1226
+ staticParameters: {
1227
+ visible: !1,
1228
+ eventType: q.Keyboard,
1229
+ keycode: e,
1230
+ isShift: !1
1231
+ }
1232
+ }), n.push({
1233
+ id: we.id,
1234
+ binding: e | Ti.SHIFT,
1235
+ preconditions: (t) => $e(t),
1236
+ staticParameters: {
1237
+ visible: !1,
1238
+ eventType: q.Keyboard,
1239
+ keycode: e,
1240
+ isShift: !0
1241
+ }
1242
+ });
1243
+ return n;
1244
+ }
1245
+ const Tn = {
1246
+ id: Hi.id,
1247
+ preconditions: (n) => $e(n) || yn(n),
1248
+ binding: y.BACKSPACE
881
1249
  };
882
- we = Sn([
883
- Ie(0, Z(xi)),
884
- Ie(1, X),
885
- Ie(2, w),
886
- Ie(3, U)
887
- ], we);
888
- var bn = Object.getOwnPropertyDescriptor, En = (n, e, t, i) => {
889
- for (var r = i > 1 ? void 0 : i ? bn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1250
+ var Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
1251
+ for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
890
1252
  (o = n[s]) && (r = o(r) || r);
891
1253
  return r;
892
- }, Y = (n, e) => (t, i) => e(t, i, n);
893
- let ye = class extends ge {
894
- constructor(e, t, i, r, s, o, c) {
895
- super();
896
- S(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
897
- this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = c, this._init();
1254
+ }, ie = (n, e) => (t, i) => e(t, i, n);
1255
+ let Pe = class extends De {
1256
+ constructor(n, e, t, i, r, s) {
1257
+ super(), this._injector = n, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = i, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
898
1258
  }
899
- _init() {
900
- this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
1259
+ _initMenus() {
1260
+ this._menuManagerService.mergeMenu(xn);
901
1261
  }
902
- _create(e) {
903
- if (!e)
904
- return;
905
- const t = e.getUnitId();
906
- this._renderManagerService.has(t) && !this._initImagePopupMenu.has(t) && (this._popupMenuListener(t), this._initImagePopupMenu.add(t));
1262
+ _initCustomComponents() {
1263
+ const n = this._componentManager;
1264
+ this.disposeWithMe(n.register("TextIcon", Wt)), this.disposeWithMe(n.register("GraphIcon", Bt)), this.disposeWithMe(n.register(Yt, Rn)), this.disposeWithMe(n.register(xe, mn));
907
1265
  }
908
- _hasCropObject(e) {
1266
+ _initCommands() {
1267
+ [
1268
+ Ut,
1269
+ Dt,
1270
+ Zt,
1271
+ Xe,
1272
+ Kt,
1273
+ qe,
1274
+ zt,
1275
+ Ye,
1276
+ Be,
1277
+ Vt,
1278
+ H,
1279
+ // commands for editor
1280
+ we
1281
+ ].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
909
1282
  }
910
- // eslint-disable-next-line max-lines-per-function
911
- _popupMenuListener(e) {
912
- var r;
913
- const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
914
- Object.keys(i).forEach((s) => {
915
- var h;
916
- const c = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
917
- if (!c) return;
918
- let a;
919
- this.disposeWithMe(
920
- St(
921
- c.createControl$.subscribe(() => {
922
- const l = c.getSelectedObjectMap();
923
- if (l.size > 1) {
924
- a == null || a.dispose();
925
- return;
926
- }
927
- const d = l.values().next().value;
928
- if (!d)
929
- return;
930
- const g = d.oKey;
931
- a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
932
- componentKey: kt,
933
- direction: "horizontal",
934
- offset: [2, 0],
935
- extraProps: {
936
- menuItems: this._getMenuItemsByObjectType(d.objectType, g, e)
937
- }
938
- })), this._sidebarService.visible && this._commandService.executeCommand(Be.id, {
939
- visible: !0,
940
- objectType: d.objectType
1283
+ _initUIComponents() {
1284
+ this.disposeWithMe(
1285
+ this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () => ct(_n, this._injector))
1286
+ ), this.disposeWithMe(
1287
+ this._uiPartsService.registerComponent(ot.CONTENT, () => ct(wn, this._injector))
1288
+ );
1289
+ }
1290
+ _initShortcuts() {
1291
+ [
1292
+ Tn,
1293
+ ...Pn()
1294
+ ].forEach((n) => {
1295
+ this.disposeWithMe(this._shortcutService.registerShortcut(n));
1296
+ });
1297
+ }
1298
+ };
1299
+ Pe = Nn([
1300
+ ie(0, Z(ke)),
1301
+ ie(1, Mi),
1302
+ ie(2, Z(Ni)),
1303
+ ie(3, Di),
1304
+ ie(4, U),
1305
+ ie(5, Ui)
1306
+ ], Pe);
1307
+ const Dn = "slides-ui.config", gt = {};
1308
+ var Un = Object.getOwnPropertyDescriptor, Vn = (n, e, t, i) => {
1309
+ for (var r = i > 1 ? void 0 : i ? Un(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1310
+ (o = n[s]) && (r = o(r) || r);
1311
+ return r;
1312
+ }, Ie = (n, e) => (t, i) => e(t, i, n);
1313
+ function jn(n, e) {
1314
+ const t = ft(n.left, n.top, e), i = ft(n.right, n.bottom, e);
1315
+ return {
1316
+ left: t.x,
1317
+ top: t.y,
1318
+ right: i.x,
1319
+ bottom: i.y
1320
+ };
1321
+ }
1322
+ function ft(n, e, t) {
1323
+ const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(re.VIEW);
1324
+ if (!s)
1325
+ return {
1326
+ x: n,
1327
+ y: e
1328
+ };
1329
+ const { viewportScrollX: o, viewportScrollY: c } = s, a = (n - o) * i, h = (e - c) * r;
1330
+ return {
1331
+ x: a,
1332
+ y: h
1333
+ };
1334
+ }
1335
+ let Te = class extends De {
1336
+ constructor(n, e, t, i) {
1337
+ super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
1338
+ }
1339
+ _createObjectPositionObserver(n, e) {
1340
+ const i = (() => {
1341
+ var L, B, ee, te;
1342
+ const { scene: o, engine: c } = e, { left: a, top: h, width: l, height: d } = n, g = (o.width - ((B = (L = e.mainComponent) == null ? void 0 : L.width) != null ? B : 0)) / 2, m = (o.height - ((te = (ee = e.mainComponent) == null ? void 0 : ee.height) != null ? te : 0)) / 2, p = {
1343
+ left: a,
1344
+ right: a + l,
1345
+ top: h,
1346
+ bottom: h + d
1347
+ }, f = c.getCanvasElement(), v = f.getBoundingClientRect(), _ = bi(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), P = jn(p, o), { top: M, left: V, width: R } = v, z = R / _;
1348
+ return {
1349
+ left: P.left * z * I + V + g,
1350
+ right: P.right * z * I + V + g,
1351
+ top: P.top * z * b + M + m,
1352
+ bottom: P.bottom * z * b + M + m
1353
+ };
1354
+ })(), r = new J(i), s = new Ke();
1355
+ return {
1356
+ position: i,
1357
+ position$: r,
1358
+ disposable: s
1359
+ };
1360
+ }
1361
+ attachPopupToObject(n, e) {
1362
+ const i = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getUnitId(), r = this._renderManagerService.getRenderById(i);
1363
+ if (!r)
1364
+ return {
1365
+ dispose: () => {
1366
+ }
1367
+ };
1368
+ const { position: s, position$: o, disposable: c } = this._createObjectPositionObserver(n, r), a = this._globalPopupManagerService.addPopup({
1369
+ ...e,
1370
+ unitId: i,
1371
+ subUnitId: "default",
1372
+ anchorRect: s,
1373
+ anchorRect$: o,
1374
+ canvasElement: r.engine.getCanvasElement()
1375
+ });
1376
+ return {
1377
+ dispose: () => {
1378
+ this._globalPopupManagerService.removePopup(a), o.complete(), c.dispose();
1379
+ }
1380
+ };
1381
+ }
1382
+ };
1383
+ Te = Vn([
1384
+ Ie(0, Z(Vi)),
1385
+ Ie(1, X),
1386
+ Ie(2, w),
1387
+ Ie(3, U)
1388
+ ], Te);
1389
+ var An = Object.getOwnPropertyDescriptor, Ln = (n, e, t, i) => {
1390
+ for (var r = i > 1 ? void 0 : i ? An(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1391
+ (o = n[s]) && (r = o(r) || r);
1392
+ return r;
1393
+ }, Y = (n, e) => (t, i) => e(t, i, n);
1394
+ let Me = class extends ge {
1395
+ constructor(e, t, i, r, s, o, c) {
1396
+ super();
1397
+ S(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
1398
+ this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = c, this._init();
1399
+ }
1400
+ _init() {
1401
+ this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
1402
+ }
1403
+ _create(e) {
1404
+ if (!e)
1405
+ return;
1406
+ const t = e.getUnitId();
1407
+ this._renderManagerService.has(t) && !this._initImagePopupMenu.has(t) && (this._popupMenuListener(t), this._initImagePopupMenu.add(t));
1408
+ }
1409
+ _hasCropObject(e) {
1410
+ }
1411
+ // eslint-disable-next-line max-lines-per-function
1412
+ _popupMenuListener(e) {
1413
+ var r;
1414
+ const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
1415
+ Object.keys(i).forEach((s) => {
1416
+ var h;
1417
+ const c = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
1418
+ if (!c) return;
1419
+ let a;
1420
+ this.disposeWithMe(
1421
+ bt(
1422
+ c.createControl$.subscribe(() => {
1423
+ const l = c.getSelectedObjectMap();
1424
+ if (l.size > 1) {
1425
+ a == null || a.dispose();
1426
+ return;
1427
+ }
1428
+ const d = l.values().next().value;
1429
+ if (!d)
1430
+ return;
1431
+ const g = d.oKey;
1432
+ a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
1433
+ componentKey: Yt,
1434
+ direction: "horizontal",
1435
+ offset: [2, 0],
1436
+ extraProps: {
1437
+ menuItems: this._getMenuItemsByObjectType(d.objectType, g, e)
1438
+ }
1439
+ })), this._sidebarService.visible && this._commandService.executeCommand(Be.id, {
1440
+ visible: !0,
1441
+ objectType: d.objectType
941
1442
  });
942
1443
  })
943
1444
  )
944
1445
  ), this.disposeWithMe(
945
1446
  c.clearControl$.subscribe(() => {
946
- a == null || a.dispose(), this._contextService.setContextValue(li, !1);
1447
+ a == null || a.dispose(), this._contextService.setContextValue(hi, !1);
947
1448
  })
948
1449
  ), this.disposeWithMe(
949
1450
  c.changing$.subscribe(() => {
@@ -981,7 +1482,7 @@ let ye = class extends ge {
981
1482
  }, {
982
1483
  label: "slide.popup.delete",
983
1484
  index: 5,
984
- commandId: Dt.id,
1485
+ commandId: Vt.id,
985
1486
  commandParams: {
986
1487
  id: t,
987
1488
  unitId: i
@@ -990,27 +1491,22 @@ let ye = class extends ge {
990
1491
  }];
991
1492
  }
992
1493
  };
993
- ye = En([
994
- Y(0, Z(we)),
1494
+ Me = Ln([
1495
+ Y(0, Z(Te)),
995
1496
  Y(1, X),
996
1497
  Y(2, w),
997
1498
  Y(3, fe),
998
1499
  Y(4, Z(T)),
999
1500
  Y(5, yt),
1000
1501
  Y(6, U)
1001
- ], ye);
1002
- const Pe = {
1003
- id: "slide.operation.edit-arrow",
1004
- type: D.OPERATION,
1005
- handler: () => !0
1006
- }, de = di("SLIDE_EDITOR");
1007
- var xn = Object.getOwnPropertyDescriptor, Rn = (n, e, t, i) => {
1008
- for (var r = i > 1 ? void 0 : i ? xn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1502
+ ], Me);
1503
+ var Bn = Object.getOwnPropertyDescriptor, $n = (n, e, t, i) => {
1504
+ for (var r = i > 1 ? void 0 : i ? Bn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1009
1505
  (o = n[s]) && (r = o(r) || r);
1010
1506
  return r;
1011
1507
  }, Ve = (n, e) => (t, i) => e(t, i, n);
1012
- const Ye = It("univer.slide-editor-bridge.service");
1013
- let $e = class extends De {
1508
+ const Qe = St("univer.slide-editor-bridge.service");
1509
+ let He = class extends De {
1014
1510
  constructor(e, t, i) {
1015
1511
  super();
1016
1512
  S(this, "_editorUnitId", de);
@@ -1043,7 +1539,7 @@ let $e = class extends De {
1043
1539
  * @editorInfo editorInfo
1044
1540
  */
1045
1541
  setEditorRect(e) {
1046
- this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(Re, !1), this._contextService.setContextValue(bt, !1), this._contextService.setContextValue(Et, !1));
1542
+ this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(Re, !1), this._contextService.setContextValue(Et, !1), this._contextService.setContextValue(xt, !1));
1047
1543
  const t = this.getEditRectState();
1048
1544
  this._currentEditRectState = t, this._currentEditRectState$.next(t);
1049
1545
  }
@@ -1063,12 +1559,12 @@ let $e = class extends De {
1063
1559
  pageSize: { width: t.richTextObj.width, height: 1 / 0 }
1064
1560
  };
1065
1561
  const o = {
1066
- documentModel: new ui(r),
1562
+ documentModel: new vi(r),
1067
1563
  fontString: "document",
1068
1564
  textRotation: { a: 0, v: 0 },
1069
1565
  wrapStrategy: 0,
1070
1566
  verticalAlign: Oe.TOP,
1071
- horizontalAlign: xt.LEFT,
1567
+ horizontalAlign: Rt.LEFT,
1072
1568
  paddingData: { t: 0, b: 1, l: 2, r: 2 }
1073
1569
  }, c = t.richTextObj.width, a = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
1074
1570
  left: 0,
@@ -1147,55 +1643,18 @@ let $e = class extends De {
1147
1643
  };
1148
1644
  }
1149
1645
  };
1150
- $e = Rn([
1646
+ He = $n([
1151
1647
  Ve(0, Ze),
1152
1648
  Ve(1, fe),
1153
1649
  Ve(2, X)
1154
- ], $e);
1155
- class On {
1156
- constructor() {
1157
- S(this, "_state", null);
1158
- S(this, "_rect", null);
1159
- S(this, "_state$", new J(null));
1160
- S(this, "state$", this._state$.asObservable());
1161
- S(this, "_rect$", new J(null));
1162
- S(this, "rect$", this._rect$.asObservable());
1163
- S(this, "_focus", !1);
1164
- S(this, "_focus$", new J(this._focus));
1165
- S(this, "focus$", this._focus$.asObservable());
1166
- }
1167
- dispose() {
1168
- this._state$.complete(), this._state = null, this._rect$.complete(), this._rect = null;
1169
- }
1170
- setState(e) {
1171
- this._state = e, this._refresh(e);
1172
- }
1173
- getRect() {
1174
- return this._rect;
1175
- }
1176
- setRect(e) {
1177
- this._rect = e, this._rect$.next(e);
1178
- }
1179
- getState() {
1180
- return this._state;
1181
- }
1182
- setFocus(e = !1) {
1183
- this._focus = e, this._focus$.next(e);
1184
- }
1185
- _refresh(e) {
1186
- this._state$.next(e);
1187
- }
1188
- }
1189
- const qe = It(
1190
- "univer.slide-editor-manager.service"
1191
- );
1192
- var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), wn = Object.getOwnPropertyDescriptor, yn = (n, e, t, i) => {
1193
- for (var r = i > 1 ? void 0 : i ? wn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1650
+ ], He);
1651
+ var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), Hn = Object.getOwnPropertyDescriptor, Fn = (n, e, t, i) => {
1652
+ for (var r = i > 1 ? void 0 : i ? Hn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1194
1653
  (o = n[s]) && (r = o(r) || r);
1195
1654
  return r;
1196
1655
  }, A = (n, e) => (t, i) => e(t, i, n);
1197
- const ft = -1e3, pt = 5, Pn = 2;
1198
- let He = class extends De {
1656
+ const pt = -1e3, mt = 5, Wn = 2;
1657
+ let Fe = class extends De {
1199
1658
  constructor(e, t, i, r, s, o, c, a, h, l, d, g) {
1200
1659
  super();
1201
1660
  /**
@@ -1239,16 +1698,16 @@ let He = class extends De {
1239
1698
  }
1240
1699
  _getEditorSkeleton(e) {
1241
1700
  var t;
1242
- return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(dt).getSkeleton();
1701
+ return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ht).getSkeleton();
1243
1702
  }
1244
1703
  _getEditorViewModel(e) {
1245
1704
  var t;
1246
- return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(dt).getViewModel();
1705
+ return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ht).getViewModel();
1247
1706
  }
1248
1707
  _initialCursorSync(e) {
1249
- e.add(this._cellEditorManagerService.focus$.pipe(Li((t) => !!t)).subscribe(() => {
1708
+ e.add(this._cellEditorManagerService.focus$.pipe(Ki((t) => !!t)).subscribe(() => {
1250
1709
  var t;
1251
- (t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(ut).sync();
1710
+ (t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(lt).sync();
1252
1711
  }));
1253
1712
  }
1254
1713
  /**
@@ -1258,7 +1717,7 @@ let He = class extends De {
1258
1717
  _subscribeToCurrentCell(e) {
1259
1718
  e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
1260
1719
  var d;
1261
- if (t == null || this._contextService.getContextValue(bt) || this._contextService.getContextValue(Et))
1720
+ if (t == null || this._contextService.getContextValue(Et) || this._contextService.getContextValue(xt))
1262
1721
  return;
1263
1722
  const {
1264
1723
  position: { startX: i, endX: r },
@@ -1266,10 +1725,10 @@ let He = class extends De {
1266
1725
  scaleX: a,
1267
1726
  editorUnitId: h
1268
1727
  } = t, { vertexAngle: l } = nt(s);
1269
- c.updateDocumentId(h), o === et.WRAP && l === 0 && c.updateDocumentDataPageSize((r - i) / a), this._instanceSrv.changeDoc(h, c), this._contextService.setContextValue(vi, !0), this._textSelectionManagerService.replaceTextRanges([{
1728
+ c.updateDocumentId(h), o === et.WRAP && l === 0 && c.updateDocumentDataPageSize((r - i) / a), this._instanceSrv.changeDoc(h, c), this._contextService.setContextValue(fi, !0), this._textSelectionManagerService.replaceTextRanges([{
1270
1729
  startOffset: 0,
1271
1730
  endOffset: 0
1272
- }]), (d = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(ut).activate(ft, ft);
1731
+ }]), (d = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(lt).activate(pt, pt);
1273
1732
  }));
1274
1733
  }
1275
1734
  /**
@@ -1320,8 +1779,8 @@ let He = class extends De {
1320
1779
  d == null || d.updateDocumentDataPageSize((m - c - t.left) / s), i.calculate();
1321
1780
  const p = i.getActualSize();
1322
1781
  let f = a - c;
1323
- return f < p.actualWidth * s + pt * s && (f = p.actualWidth * s + pt * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
1324
- horizontalAlign: xt.UNSPECIFIED,
1782
+ return f < p.actualWidth * s + mt * s && (f = p.actualWidth * s + mt * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
1783
+ horizontalAlign: Rt.UNSPECIFIED,
1325
1784
  cellValueType: void 0
1326
1785
  }), {
1327
1786
  actualWidth: f,
@@ -1343,7 +1802,7 @@ let He = class extends De {
1343
1802
  const d = this._renderContext.engine.getCanvasElement(), g = d.getBoundingClientRect(), m = h(d.style.width), { top: p, left: f, width: v } = g, _ = v / m;
1344
1803
  let { startX: I, startY: b } = i;
1345
1804
  I += r.left, b += r.top;
1346
- const { document: P, scene: M, engine: V } = a, R = M.getViewport(ht.VIEW_MAIN), z = document.body.clientHeight - b - r.top - Pn * 2, se = document.body.clientWidth - I - r.left;
1805
+ const { document: P, scene: M, engine: V } = a, R = M.getViewport(dt.VIEW_MAIN), z = document.body.clientHeight - b - r.top - Wn * 2, se = document.body.clientWidth - I - r.left;
1347
1806
  let L = t, B = R == null ? void 0 : R.getScrollBar();
1348
1807
  L > z ? (L = z, B == null ? R && new Ot(R, { enableHorizontal: !1, barSize: 8 }) : R == null || R.resetCanvasSizeAndUpdateScroll()) : (B = null, (C = R == null ? void 0 : R.getScrollBar()) == null || C.dispose()), e += (B == null ? void 0 : B.barSize) || 0, e = Math.min(e, se), I -= ne, b -= ne, this._addBackground(M, e / o, t / c, s);
1349
1808
  const { scaleX: ee, scaleY: te } = M.getPrecisionScale();
@@ -1381,7 +1840,7 @@ let He = class extends De {
1381
1840
  evented: !1
1382
1841
  })
1383
1842
  ],
1384
- Hi
1843
+ Fi
1385
1844
  ) : r == null ? o.dispose() : (o.setProps({
1386
1845
  fill: r
1387
1846
  }), o.transformByState({
@@ -1422,7 +1881,7 @@ let He = class extends De {
1422
1881
  return;
1423
1882
  this._fitTextSize(r, o, p, s, c, a);
1424
1883
  const f = m.getBody().dataStream.length - 2 || 0;
1425
- (v = g.getViewport(ht.VIEW_MAIN)) == null || v.scrollToViewportPos({
1884
+ (v = g.getViewport(dt.VIEW_MAIN)) == null || v.scrollToViewportPos({
1426
1885
  viewportScrollX: Number.POSITIVE_INFINITY
1427
1886
  }), this._textSelectionManagerService.replaceTextRanges([
1428
1887
  {
@@ -1432,7 +1891,7 @@ let He = class extends De {
1432
1891
  ]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
1433
1892
  }
1434
1893
  _resetBodyStyle(e, t = !1) {
1435
- e.dataStream = gi, e.textRuns != null && (e.textRuns.length === 1 && !t ? (e.textRuns[0].st = 0, e.textRuns[0].ed = 1) : e.textRuns = void 0), e.paragraphs != null && (e.paragraphs.length === 1 ? e.paragraphs[0].startIndex = 0 : e.paragraphs = [
1894
+ e.dataStream = pi, e.textRuns != null && (e.textRuns.length === 1 && !t ? (e.textRuns[0].st = 0, e.textRuns[0].ed = 1) : e.textRuns = void 0), e.paragraphs != null && (e.paragraphs.length === 1 ? e.paragraphs[0].startIndex = 0 : e.paragraphs = [
1436
1895
  {
1437
1896
  startIndex: 0
1438
1897
  }
@@ -1444,699 +1903,238 @@ let He = class extends De {
1444
1903
  */
1445
1904
  _initialKeyboardListener(e) {
1446
1905
  }
1447
- _showEditorByKeyboard(e) {
1448
- }
1449
- _commandExecutedListener(e) {
1450
- const t = [Pe.id], i = [$i.id];
1451
- e.add(this._commandService.onCommandExecuted((r) => {
1452
- this._editorService.getFocusId() === de && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
1453
- }));
1454
- }
1455
- _moveCursorCmdHandler(e) {
1456
- const t = e.params, { keycode: i, isShift: r } = t;
1457
- i != null && this._cursorChange === G.CursorChange ? this._moveInEditor(i, r) : this._editorBridgeService.changeVisible(t);
1458
- }
1459
- _editingChangedHandler() {
1460
- const e = this._editorBridgeService.getEditorRect();
1461
- if (!e)
1462
- return;
1463
- const t = e.richTextObj;
1464
- t.refreshDocumentByDocData(), t.resizeToContentSize();
1465
- const { unitId: i } = this._renderContext;
1466
- this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
1467
- }
1468
- _getEditorObject() {
1469
- return Tn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
1470
- }
1471
- async _handleEditorInvisible(e) {
1472
- const { keycode: t } = e;
1473
- if (this._cursorChange = G.InitialState, this._exitInput(e), this._editorBridgeService.getEditRectState() == null)
1474
- return;
1475
- if (this._editorBridgeService.getEditorDirty() === !1) {
1476
- this._moveCursor(t);
1477
- return;
1478
- }
1479
- this._moveCursor(t);
1480
- }
1481
- _exitInput(e) {
1482
- this._contextService.setContextValue(Re, !1), this._cellEditorManagerService.setState({
1483
- show: e.visible
1484
- });
1485
- const t = this._editorBridgeService.getCurrentEditorId();
1486
- t != null && this._undoRedoService.clearUndoRedo(t);
1487
- }
1488
- _moveCursor(e) {
1489
- if (e != null)
1490
- switch (j.LEFT, e) {
1491
- case y.ENTER:
1492
- j.DOWN;
1493
- break;
1494
- case y.TAB:
1495
- j.RIGHT;
1496
- break;
1497
- case y.ARROW_DOWN:
1498
- j.DOWN;
1499
- break;
1500
- case y.ARROW_UP:
1501
- j.UP;
1502
- break;
1503
- case y.ARROW_LEFT:
1504
- j.LEFT;
1505
- break;
1506
- case y.ARROW_RIGHT:
1507
- j.RIGHT;
1508
- break;
1509
- }
1510
- }
1511
- /**
1512
- * The user's operations follow the sequence of opening the editor and then moving the cursor.
1513
- * The logic here predicts the user's first cursor movement behavior based on this rule
1514
- */
1515
- _cursorStateListener(e) {
1516
- const t = this._getEditorObject();
1517
- if (!t)
1518
- return;
1519
- const { document: i } = t;
1520
- e.add(St(i.onPointerDown$.subscribeEvent(() => {
1521
- this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
1522
- })));
1523
- }
1524
- // TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
1525
- _moveInEditor(e, t) {
1526
- let i = j.LEFT;
1527
- e === y.ARROW_DOWN ? i = j.DOWN : e === y.ARROW_UP ? i = j.UP : e === y.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(Fi.id, {
1528
- direction: i
1529
- }) : this._commandService.executeCommand(Wi.id, {
1530
- direction: i
1531
- });
1532
- }
1533
- };
1534
- He = yn([
1535
- A(1, Ri),
1536
- A(2, hi),
1537
- A(3, fe),
1538
- A(4, w),
1539
- A(5, X),
1540
- A(6, Ye),
1541
- A(7, qe),
1542
- A(8, Z(Bi)),
1543
- A(9, U),
1544
- A(10, Z(Q)),
1545
- A(11, Ze)
1546
- ], He);
1547
- function Tn(n, e) {
1548
- if (n == null)
1549
- return;
1550
- const t = e.getRenderById(n);
1551
- if (t == null)
1552
- return;
1553
- const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(ki.BACKGROUND);
1554
- return {
1555
- document: c,
1556
- docBackground: a,
1557
- scene: r,
1558
- engine: s
1559
- };
1560
- }
1561
- var Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
1562
- for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
1563
- (o = n[s]) && (r = o(r) || r);
1564
- return r;
1565
- }, je = (n, e) => (t, i) => e(t, i, n);
1566
- let Fe = class extends ge {
1567
- constructor(e, t, i, r) {
1568
- super();
1569
- /**
1570
- * It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
1571
- */
1572
- // private _cursorChange: CursorChange = CursorChange.InitialState;
1573
- /** If the corresponding unit is active and prepared for editing. */
1574
- // private _isUnitEditing = false;
1575
- S(this, "setSlideTextEditor$", new Nt());
1576
- S(this, "_curRichText", null);
1577
- S(this, "_d");
1578
- this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
1579
- s && s.getUnitId() === this._renderContext.unitId ? this._d = this._init() : this._disposeCurrent();
1580
- }));
1581
- }
1582
- _init() {
1583
- const e = new Ke();
1584
- return this._initEventListener(e), e;
1585
- }
1586
- _disposeCurrent() {
1587
- var e;
1588
- (e = this._d) == null || e.dispose(), this._d = null;
1589
- }
1590
- _setEditorRect(e, t) {
1591
- this._curRichText = t;
1592
- const { scene: i, engine: r } = this._renderContext, s = this._renderContext.unitId, o = {
1593
- scene: i,
1594
- engine: r,
1595
- unitId: s,
1596
- pageId: e,
1597
- richTextObj: t
1598
- };
1599
- this._editorBridgeService.setEditorRect(o);
1600
- }
1601
- _initEventListener(e) {
1602
- const t = (o) => {
1603
- const c = o.getTransformer();
1604
- c && (e.add(c.clearControl$.subscribe(() => {
1605
- this.setEditorVisible(!1), this.pickOtherObjects();
1606
- })), e.add(c.createControl$.subscribe(() => {
1607
- this.setEditorVisible(!1);
1608
- })), e.add(o.onDblclick$.subscribeEvent(() => {
1609
- c.clearControls();
1610
- const h = c.getSelectedObjectMap().values().next().value;
1611
- h && (h.objectType !== le.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
1612
- })), e.add(this._instanceSrv.focused$.subscribe((a) => {
1613
- this.endEditing();
1614
- })));
1615
- }, { mainComponent: i } = this._renderContext;
1616
- i.subSceneChanged$.subscribeEvent((o) => {
1617
- t(o);
1618
- });
1619
- const s = Array.from(i.getSubScenes().values());
1620
- for (let o = 0; o < s.length; o++) {
1621
- const c = s[o];
1622
- t(c);
1623
- }
1624
- }
1625
- pickOtherObjects() {
1626
- this.endEditing();
1627
- }
1628
- /**
1629
- * invoked when picking other object.
1630
- *
1631
- * save editing state to curr richText.
1632
- */
1633
- endEditing() {
1634
- var s;
1635
- if (!this._curRichText) return;
1636
- this.setEditorVisible(!1);
1637
- const e = this._curRichText;
1638
- if (!this._instanceSrv.getCurrentUnitForType(E.UNIVER_SLIDE)) return !1;
1639
- e.refreshDocumentByDocData(), e.resizeToContentSize(), this._editorBridgeService.endEditing$.next(e);
1640
- const i = {
1641
- bl: 1,
1642
- fs: e.fs,
1643
- text: e.text
1644
- }, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
1645
- if (r && r.length) {
1646
- const c = r[0].ts;
1647
- i.cl = c == null ? void 0 : c.cl;
1648
- }
1649
- this._commandService.executeCommand(H.id, {
1650
- unitId: this._renderContext.unitId,
1651
- oKey: e == null ? void 0 : e.oKey,
1652
- props: {
1653
- richText: i
1654
- }
1655
- }), this._curRichText = null;
1656
- }
1657
- /**
1658
- * TODO calling twice ????
1659
- * editingParam derives from RichText object.
1660
- *
1661
- * TODO @lumixraku need scale param
1662
- * @param target
1663
- */
1664
- startEditing(e, t) {
1665
- this._setEditorRect(e, t), this.setEditorVisible(!0);
1666
- }
1667
- setEditorVisible(e) {
1668
- var i, r;
1669
- e ? (i = this._curRichText) == null || i.hide() : (r = this._curRichText) == null || r.show();
1670
- const { unitId: t } = this._renderContext;
1671
- this._editorBridgeService.changeVisible({ visible: e, eventType: q.PointerDown, unitId: t });
1672
- }
1673
- };
1674
- Fe = Nn([
1675
- je(1, w),
1676
- je(2, U),
1677
- je(3, Ye)
1678
- ], Fe);
1679
- const zt = {
1680
- id: "slide.operation.activate-slide",
1681
- type: D.OPERATION,
1682
- handler: (n, e) => {
1683
- var h, l;
1684
- const t = e.unitId, i = n.get(T), s = n.get(w).getUnit(t), o = (h = s == null ? void 0 : s.getActivePage()) == null ? void 0 : h.id;
1685
- if (!o) return !1;
1686
- const c = i.getRenderUnitByPageId(o, t);
1687
- if (!c) return !1;
1688
- const a = (l = c.scene) == null ? void 0 : l.getTransformer();
1689
- return a && a.clearControls(), i.activePage(e.id, t), !0;
1690
- }
1691
- }, Kt = {
1692
- id: "slide.operation.append-slide",
1693
- type: D.OPERATION,
1694
- handler: (n, e) => {
1695
- const t = e.unitId;
1696
- return n.get(w).getUnit(t) ? (n.get(T).appendPage(t), !0) : !1;
1697
- }
1698
- }, Je = {
1699
- id: "slide.command.insert-float-image",
1700
- type: D.COMMAND,
1701
- handler: async (n, e) => {
1702
- var V;
1703
- const t = n.get(w), i = (V = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : V.getUnitId();
1704
- if (!i) return !1;
1705
- const s = await n.get(Oi).openFile({
1706
- multiple: !0,
1707
- accept: Ki.map((R) => `.${R.replace("image/", "")}`).join(",")
1708
- });
1709
- if (s.length !== 1) return !1;
1710
- const c = await n.get(Zi).saveImage(s[0]);
1711
- if (!c) return !1;
1712
- const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: g, height: m, image: p } = await Xi(d || ""), f = t.getUnit(i);
1713
- if (!f) return !1;
1714
- const v = f.getActivePage(), _ = Object.values(v.pageElements), I = _ != null && _.length ? Math.max(..._.map((R) => R.zIndex)) : 20, b = {
1715
- id: a,
1716
- zIndex: I + 1,
1717
- left: 0,
1718
- top: 0,
1719
- width: g,
1720
- height: m,
1721
- title: "",
1722
- description: "",
1723
- type: ze.IMAGE,
1724
- image: {
1725
- imageProperties: {
1726
- contentUrl: d,
1727
- imageSourceType: h,
1728
- source: l,
1729
- base64Cache: d,
1730
- image: p
1731
- }
1732
- }
1733
- };
1734
- v.pageElements[a] = b, f.updatePage(v.id, v);
1735
- const P = n.get(T), M = P.createObjectToPage(b, v.id, i);
1736
- return M && P.setObjectActiveByPage(M, v.id, i), !0;
1737
- }
1738
- }, Qe = {
1739
- id: "slide.command.add-text",
1740
- type: D.COMMAND,
1741
- handler: async (n) => {
1742
- var r;
1743
- const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
1744
- return await e.executeCommand(Zt.id, { unitId: i });
1745
- }
1746
- }, Zt = {
1747
- id: "slide.operation.add-text",
1748
- type: D.OPERATION,
1749
- handler: async (n, e) => {
1750
- const t = e.unitId, i = Ct(6), r = 220, s = 40, o = 230, c = 142, a = (e == null ? void 0 : e.text) || "A New Text", l = n.get(w).getUnit(t);
1751
- if (!l) return !1;
1752
- const d = l.getActivePage(), g = Object.values(d.pageElements), m = g != null && g.length ? Math.max(...g.map((_) => _.zIndex)) : 21, p = {
1753
- id: i,
1754
- zIndex: m + 1,
1755
- left: o,
1756
- top: c,
1757
- width: r,
1758
- height: s,
1759
- title: "text",
1760
- description: "",
1761
- type: ze.TEXT,
1762
- richText: {
1763
- text: a,
1764
- fs: 30,
1765
- cl: {
1766
- rgb: "rgb(51, 51, 51)"
1767
- },
1768
- bl: 1
1769
- }
1770
- };
1771
- d.pageElements[i] = p, l.updatePage(d.id, d);
1772
- const f = n.get(T), v = f.createObjectToPage(p, d.id, t);
1773
- return v && f.setObjectActiveByPage(v, d.id, t), !0;
1774
- }
1775
- }, Xt = {
1776
- id: "slide.operation.set-slide-page-thumb",
1777
- type: D.OPERATION,
1778
- handler: (n, e) => (n.get(T).createThumbs(e.unitId), !0)
1779
- };
1780
- function Dn(n) {
1781
- var p, f;
1782
- const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
1783
- if (!e)
1784
- return null;
1785
- const t = O(U), i = O(Q), [r, s] = $(!1), [o, c] = $(!1), a = () => {
1786
- c(!0);
1787
- }, h = () => {
1788
- c(!1);
1789
- }, l = (v) => {
1790
- s(v);
1791
- }, d = (v) => {
1792
- t.executeCommand(v.commandId, v.commandParams), s(!1);
1793
- }, g = r || o, m = e.filter((v) => !v.disable);
1794
- return /* @__PURE__ */ u(
1795
- "div",
1796
- {
1797
- onMouseEnter: a,
1798
- onMouseLeave: h,
1799
- children: /* @__PURE__ */ u(
1800
- Pt,
1801
- {
1802
- align: "start",
1803
- overlay: /* @__PURE__ */ u(
1804
- "ul",
1805
- {
1806
- className: K("univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1 univer-rounded-lg univer-bg-white univer-p-1.5 univer-text-sm univer-shadow-lg", ue),
1807
- children: m.map((v) => /* @__PURE__ */ u(
1808
- "li",
1809
- {
1810
- className: "univer-relative univer-box-border univer-flex univer-h-8 univer-cursor-pointer univer-items-center univer-rounded univer-text-sm univer-transition-colors hover:univer-bg-gray-100",
1811
- onClick: () => d(v),
1812
- children: /* @__PURE__ */ u("span", { className: "univer-px-2 univer-py-1.5 univer-align-middle", children: i.t(v.label) })
1813
- },
1814
- v.index
1815
- ))
1816
- }
1817
- ),
1818
- open: r,
1819
- onOpenChange: l,
1820
- children: /* @__PURE__ */ x(
1821
- "div",
1822
- {
1823
- className: K("univer-flex univer-items-center univer-gap-2 univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-800", ue, {
1824
- "univer-bg-gray-100 dark:!univer-bg-gray-800": r,
1825
- "univer-bg-white dark:!univer-bg-gray-900": !r
1826
- }),
1827
- children: [
1828
- /* @__PURE__ */ u(
1829
- Vt,
1830
- {
1831
- className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
1832
- }
1833
- ),
1834
- g && /* @__PURE__ */ u(Xe, { className: "dark:!univer-text-white" })
1835
- ]
1836
- }
1837
- )
1838
- }
1839
- )
1840
- }
1841
- );
1842
- }
1843
- function Un() {
1844
- var p, f;
1845
- const n = O(w), e = O(U), t = O(X), i = O(Q), r = Mt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), c = s == null ? void 0 : s.getPageOrder();
1846
- if (!o || !c)
1847
- return null;
1848
- const a = c.map((v) => o[v]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d = ji(() => a.map(() => Ai()), [a]);
1849
- he(() => {
1850
- const v = s == null ? void 0 : s.activePage$.subscribe((_) => {
1851
- var b;
1852
- const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
1853
- I && l(I);
1854
- });
1855
- return () => {
1856
- v == null || v.unsubscribe();
1857
- };
1858
- }, []), he(() => {
1859
- d.forEach((v, _) => {
1860
- var I;
1861
- if (v.current) {
1862
- const b = a[_];
1863
- (I = t.getRenderById(b.id)) == null || I.engine.setContainer(v.current);
1864
- }
1865
- }), d.length > 0 && e.syncExecuteCommand(Xt.id, { unitId: s == null ? void 0 : s.getUnitId() });
1866
- }, [d, a, t, e, s]);
1867
- const g = at((v) => {
1868
- e.syncExecuteCommand(zt.id, { id: v, unitId: s == null ? void 0 : s.getUnitId() });
1869
- }, [e, s]), m = at(() => {
1870
- e.syncExecuteCommand(Kt.id, { unitId: s == null ? void 0 : s.getUnitId() });
1871
- }, [e, s]);
1872
- return /* @__PURE__ */ u(
1873
- "aside",
1874
- {
1875
- ref: r,
1876
- className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Vi),
1877
- children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
1878
- /* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
1879
- "a",
1880
- {
1881
- className: K("univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer univer-rounded-md univer-bg-white univer-text-center univer-text-sm univer-leading-8 univer-transition-colors", ue),
1882
- onClick: m,
1883
- children: i.t("slide.append")
1884
- }
1885
- ) }),
1886
- a.map((v, _) => /* @__PURE__ */ x(
1887
- "div",
1888
- {
1889
- className: K("univer-my-4 univer-flex univer-gap-2", {
1890
- "[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": v.id === h
1891
- }),
1892
- onClick: () => g(v.id),
1893
- children: [
1894
- /* @__PURE__ */ u("span", { children: _ + 1 }),
1895
- /* @__PURE__ */ u(
1896
- "div",
1897
- {
1898
- ref: d[_],
1899
- className: K("univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-white hover:univer-border-primary-600", ue)
1900
- }
1901
- )
1902
- ]
1903
- },
1904
- v.id
1905
- ))
1906
- ] })
1907
- }
1908
- );
1909
- }
1910
- const Te = -1e3, mt = {
1911
- width: 0,
1912
- height: 0,
1913
- top: Te,
1914
- left: Te
1915
- };
1916
- function Vn() {
1917
- const [n, e] = $({
1918
- ...mt
1919
- }), t = O(qe), i = O(Ze), r = O(fe), s = wi(
1920
- () => r.subscribeContextValue$(st),
1921
- !1,
1922
- void 0,
1923
- [r, st]
1924
- );
1925
- return fi.UNSPECIFIED, he(() => {
1926
- t.state$.subscribe((o) => {
1927
- if (o == null)
1928
- return;
1929
- const {
1930
- startX: c = Te,
1931
- startY: a = Te,
1932
- endX: h = 0,
1933
- endY: l = 0,
1934
- show: d = !1
1935
- } = o;
1936
- if (!d)
1937
- e({
1938
- ...mt
1939
- });
1940
- else {
1941
- e({
1942
- width: h - c - ne + 2,
1943
- height: l - a - ne + 2,
1944
- left: c + ne,
1945
- top: a + ne
1946
- });
1947
- const g = i.getEditor(de);
1948
- if (g == null)
1949
- return;
1950
- const { left: m, top: p, width: f, height: v } = g.getBoundingClientRect();
1951
- t.setRect({ left: m, top: p, width: f, height: v });
1952
- }
1953
- });
1954
- }, []), he(() => {
1955
- s || t.setFocus(!0);
1956
- }, [s, n]), /* @__PURE__ */ u(
1957
- "div",
1958
- {
1959
- className: K("univer-absolute univer-z-10 univer-box-border univer-flex", ue),
1960
- style: {
1961
- left: n.left,
1962
- top: n.top,
1963
- width: n.width,
1964
- height: n.height
1965
- }
1966
- }
1967
- );
1968
- }
1969
- const Gt = "slide.menu.image";
1970
- function jn(n) {
1971
- return {
1972
- id: Gt,
1973
- type: me.SUBITEMS,
1974
- icon: "AddImageIcon",
1975
- tooltip: "slide.image.insert.title",
1976
- hidden$: pe(n, E.UNIVER_SLIDE)
1977
- };
1978
- }
1979
- function An(n) {
1980
- return {
1981
- id: Je.id,
1982
- title: "slide.image.insert.float",
1983
- type: me.BUTTON,
1984
- hidden$: pe(n, E.UNIVER_SLIDE)
1985
- };
1986
- }
1987
- const Yt = "slide.menu.shape";
1988
- function Ln(n) {
1989
- return {
1990
- id: Yt,
1991
- type: me.SUBITEMS,
1992
- icon: "GraphIcon",
1993
- tooltip: "slide.shape.insert.title",
1994
- hidden$: pe(n, E.UNIVER_SLIDE)
1995
- // disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
1996
- };
1997
- }
1998
- function Bn(n) {
1999
- return {
2000
- id: Ge.id,
2001
- title: "slide.shape.insert.rectangle",
2002
- type: me.BUTTON,
2003
- hidden$: pe(n, E.UNIVER_SLIDE)
2004
- };
2005
- }
2006
- function $n(n) {
2007
- return {
2008
- id: Qe.id,
2009
- type: me.BUTTON,
2010
- icon: "TextIcon",
2011
- tooltip: "slide.text.insert.title",
2012
- hidden$: pe(n, E.UNIVER_SLIDE)
2013
- };
2014
- }
2015
- const Hn = {
2016
- [yi.FORMAT]: {
2017
- [Qe.id]: {
2018
- order: 0,
2019
- menuItemFactory: $n
2020
- },
2021
- [Gt]: {
2022
- order: 0,
2023
- menuItemFactory: jn,
2024
- [Je.id]: {
2025
- order: 0,
2026
- menuItemFactory: An
2027
- }
2028
- },
2029
- [Yt]: {
2030
- order: 0,
2031
- menuItemFactory: Ln,
2032
- [Ge.id]: {
2033
- order: 0,
2034
- menuItemFactory: Bn
2035
- }
1906
+ _showEditorByKeyboard(e) {
1907
+ }
1908
+ _commandExecutedListener(e) {
1909
+ const t = [we.id], i = [Xi.id];
1910
+ e.add(this._commandService.onCommandExecuted((r) => {
1911
+ this._editorService.getFocusId() === de && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
1912
+ }));
1913
+ }
1914
+ _moveCursorCmdHandler(e) {
1915
+ const t = e.params, { keycode: i, isShift: r } = t;
1916
+ i != null && this._cursorChange === G.CursorChange ? this._moveInEditor(i, r) : this._editorBridgeService.changeVisible(t);
1917
+ }
1918
+ _editingChangedHandler() {
1919
+ const e = this._editorBridgeService.getEditorRect();
1920
+ if (!e)
1921
+ return;
1922
+ const t = e.richTextObj;
1923
+ t.refreshDocumentByDocData(), t.resizeToContentSize();
1924
+ const { unitId: i } = this._renderContext;
1925
+ this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
1926
+ }
1927
+ _getEditorObject() {
1928
+ return kn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
1929
+ }
1930
+ async _handleEditorInvisible(e) {
1931
+ const { keycode: t } = e;
1932
+ if (this._cursorChange = G.InitialState, this._exitInput(e), this._editorBridgeService.getEditRectState() == null)
1933
+ return;
1934
+ if (this._editorBridgeService.getEditorDirty() === !1) {
1935
+ this._moveCursor(t);
1936
+ return;
2036
1937
  }
1938
+ this._moveCursor(t);
2037
1939
  }
2038
- };
2039
- function We(n) {
2040
- return n.getContextValue(Rt) && n.getContextValue(Re);
2041
- }
2042
- function Fn(n) {
2043
- return n.getContextValue(pi) && n.getContextValue(Rt);
2044
- }
2045
- const qt = [
2046
- y.ARROW_DOWN,
2047
- y.ARROW_UP,
2048
- y.ARROW_LEFT,
2049
- y.ARROW_RIGHT
2050
- ];
2051
- [y.ENTER, y.TAB, ...qt];
2052
- function Wn() {
2053
- const n = [];
2054
- for (const e of qt)
2055
- n.push({
2056
- id: Pe.id,
2057
- binding: e,
2058
- preconditions: (t) => We(t),
2059
- staticParameters: {
2060
- visible: !1,
2061
- eventType: q.Keyboard,
2062
- keycode: e,
2063
- isShift: !1
2064
- }
2065
- }), n.push({
2066
- id: Pe.id,
2067
- binding: e | Pi.SHIFT,
2068
- preconditions: (t) => We(t),
2069
- staticParameters: {
2070
- visible: !1,
2071
- eventType: q.Keyboard,
2072
- keycode: e,
2073
- isShift: !0
1940
+ _exitInput(e) {
1941
+ this._contextService.setContextValue(Re, !1), this._cellEditorManagerService.setState({
1942
+ show: e.visible
1943
+ });
1944
+ const t = this._editorBridgeService.getCurrentEditorId();
1945
+ t != null && this._undoRedoService.clearUndoRedo(t);
1946
+ }
1947
+ _moveCursor(e) {
1948
+ if (e != null)
1949
+ switch (j.LEFT, e) {
1950
+ case y.ENTER:
1951
+ j.DOWN;
1952
+ break;
1953
+ case y.TAB:
1954
+ j.RIGHT;
1955
+ break;
1956
+ case y.ARROW_DOWN:
1957
+ j.DOWN;
1958
+ break;
1959
+ case y.ARROW_UP:
1960
+ j.UP;
1961
+ break;
1962
+ case y.ARROW_LEFT:
1963
+ j.LEFT;
1964
+ break;
1965
+ case y.ARROW_RIGHT:
1966
+ j.RIGHT;
1967
+ break;
2074
1968
  }
1969
+ }
1970
+ /**
1971
+ * The user's operations follow the sequence of opening the editor and then moving the cursor.
1972
+ * The logic here predicts the user's first cursor movement behavior based on this rule
1973
+ */
1974
+ _cursorStateListener(e) {
1975
+ const t = this._getEditorObject();
1976
+ if (!t)
1977
+ return;
1978
+ const { document: i } = t;
1979
+ e.add(bt(i.onPointerDown$.subscribeEvent(() => {
1980
+ this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
1981
+ })));
1982
+ }
1983
+ // TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
1984
+ _moveInEditor(e, t) {
1985
+ let i = j.LEFT;
1986
+ e === y.ARROW_DOWN ? i = j.DOWN : e === y.ARROW_UP ? i = j.UP : e === y.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(Wi.id, {
1987
+ direction: i
1988
+ }) : this._commandService.executeCommand(ki.id, {
1989
+ direction: i
2075
1990
  });
2076
- return n;
2077
- }
2078
- const kn = {
2079
- id: zi.id,
2080
- preconditions: (n) => We(n) || Fn(n),
2081
- binding: y.BACKSPACE
1991
+ }
2082
1992
  };
1993
+ Fe = Fn([
1994
+ A(1, ji),
1995
+ A(2, gi),
1996
+ A(3, fe),
1997
+ A(4, w),
1998
+ A(5, X),
1999
+ A(6, Qe),
2000
+ A(7, Je),
2001
+ A(8, Z(Zi)),
2002
+ A(9, U),
2003
+ A(10, Z(Q)),
2004
+ A(11, Ze)
2005
+ ], Fe);
2006
+ function kn(n, e) {
2007
+ if (n == null)
2008
+ return;
2009
+ const t = e.getRenderById(n);
2010
+ if (t == null)
2011
+ return;
2012
+ const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(zi.BACKGROUND);
2013
+ return {
2014
+ document: c,
2015
+ docBackground: a,
2016
+ scene: r,
2017
+ engine: s
2018
+ };
2019
+ }
2083
2020
  var zn = Object.getOwnPropertyDescriptor, Kn = (n, e, t, i) => {
2084
2021
  for (var r = i > 1 ? void 0 : i ? zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
2085
2022
  (o = n[s]) && (r = o(r) || r);
2086
2023
  return r;
2087
- }, ie = (n, e) => (t, i) => e(t, i, n);
2088
- let Me = class extends De {
2089
- constructor(n, e, t, i, r, s) {
2090
- super(), this._injector = n, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = i, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
2091
- }
2092
- _initMenus() {
2093
- this._menuManagerService.mergeMenu(Hn);
2024
+ }, je = (n, e) => (t, i) => e(t, i, n);
2025
+ let We = class extends ge {
2026
+ constructor(e, t, i, r) {
2027
+ super();
2028
+ /**
2029
+ * It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
2030
+ */
2031
+ // private _cursorChange: CursorChange = CursorChange.InitialState;
2032
+ /** If the corresponding unit is active and prepared for editing. */
2033
+ // private _isUnitEditing = false;
2034
+ S(this, "setSlideTextEditor$", new Nt());
2035
+ S(this, "_curRichText", null);
2036
+ S(this, "_d");
2037
+ this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
2038
+ s && s.getUnitId() === this._renderContext.unitId ? this._d = this._init() : this._disposeCurrent();
2039
+ }));
2094
2040
  }
2095
- _initCustomComponents() {
2096
- const n = this._componentManager;
2097
- this.disposeWithMe(n.register("TextIcon", Ht)), this.disposeWithMe(n.register("GraphIcon", At)), this.disposeWithMe(n.register(kt, Dn)), this.disposeWithMe(n.register(xe, _n));
2041
+ _init() {
2042
+ const e = new Ke();
2043
+ return this._initEventListener(e), e;
2098
2044
  }
2099
- _initCommands() {
2100
- [
2101
- Kt,
2102
- zt,
2103
- Xt,
2104
- Je,
2105
- Zt,
2106
- Qe,
2107
- Wt,
2108
- Ge,
2109
- Be,
2110
- Dt,
2111
- H,
2112
- // commands for editor
2113
- Pe
2114
- ].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
2045
+ _disposeCurrent() {
2046
+ var e;
2047
+ (e = this._d) == null || e.dispose(), this._d = null;
2115
2048
  }
2116
- _initUIComponents() {
2117
- this.disposeWithMe(
2118
- this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () => ct(Un, this._injector))
2119
- ), this.disposeWithMe(
2120
- this._uiPartsService.registerComponent(ot.CONTENT, () => ct(Vn, this._injector))
2121
- );
2049
+ _setEditorRect(e, t) {
2050
+ this._curRichText = t;
2051
+ const { scene: i, engine: r } = this._renderContext, s = this._renderContext.unitId, o = {
2052
+ scene: i,
2053
+ engine: r,
2054
+ unitId: s,
2055
+ pageId: e,
2056
+ richTextObj: t
2057
+ };
2058
+ this._editorBridgeService.setEditorRect(o);
2122
2059
  }
2123
- _initShortcuts() {
2124
- [
2125
- kn,
2126
- ...Wn()
2127
- ].forEach((n) => {
2128
- this.disposeWithMe(this._shortcutService.registerShortcut(n));
2060
+ _initEventListener(e) {
2061
+ const t = (o) => {
2062
+ const c = o.getTransformer();
2063
+ c && (e.add(c.clearControl$.subscribe(() => {
2064
+ this.setEditorVisible(!1), this.pickOtherObjects();
2065
+ })), e.add(c.createControl$.subscribe(() => {
2066
+ this.setEditorVisible(!1);
2067
+ })), e.add(o.onDblclick$.subscribeEvent(() => {
2068
+ c.clearControls();
2069
+ const h = c.getSelectedObjectMap().values().next().value;
2070
+ h && (h.objectType !== le.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
2071
+ })), e.add(this._instanceSrv.focused$.subscribe((a) => {
2072
+ this.endEditing();
2073
+ })));
2074
+ }, { mainComponent: i } = this._renderContext;
2075
+ i.subSceneChanged$.subscribeEvent((o) => {
2076
+ t(o);
2129
2077
  });
2078
+ const s = Array.from(i.getSubScenes().values());
2079
+ for (let o = 0; o < s.length; o++) {
2080
+ const c = s[o];
2081
+ t(c);
2082
+ }
2083
+ }
2084
+ pickOtherObjects() {
2085
+ this.endEditing();
2086
+ }
2087
+ /**
2088
+ * invoked when picking other object.
2089
+ *
2090
+ * save editing state to curr richText.
2091
+ */
2092
+ endEditing() {
2093
+ var s;
2094
+ if (!this._curRichText) return;
2095
+ this.setEditorVisible(!1);
2096
+ const e = this._curRichText;
2097
+ if (!this._instanceSrv.getCurrentUnitForType(E.UNIVER_SLIDE)) return !1;
2098
+ e.refreshDocumentByDocData(), e.resizeToContentSize(), this._editorBridgeService.endEditing$.next(e);
2099
+ const i = {
2100
+ bl: 1,
2101
+ fs: e.fs,
2102
+ text: e.text
2103
+ }, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
2104
+ if (r && r.length) {
2105
+ const c = r[0].ts;
2106
+ i.cl = c == null ? void 0 : c.cl;
2107
+ }
2108
+ this._commandService.executeCommand(H.id, {
2109
+ unitId: this._renderContext.unitId,
2110
+ oKey: e == null ? void 0 : e.oKey,
2111
+ props: {
2112
+ richText: i
2113
+ }
2114
+ }), this._curRichText = null;
2115
+ }
2116
+ /**
2117
+ * TODO calling twice ????
2118
+ * editingParam derives from RichText object.
2119
+ *
2120
+ * TODO @lumixraku need scale param
2121
+ * @param target
2122
+ */
2123
+ startEditing(e, t) {
2124
+ this._setEditorRect(e, t), this.setEditorVisible(!0);
2125
+ }
2126
+ setEditorVisible(e) {
2127
+ var i, r;
2128
+ e ? (i = this._curRichText) == null || i.hide() : (r = this._curRichText) == null || r.show();
2129
+ const { unitId: t } = this._renderContext;
2130
+ this._editorBridgeService.changeVisible({ visible: e, eventType: q.PointerDown, unitId: t });
2130
2131
  }
2131
2132
  };
2132
- Me = Kn([
2133
- ie(0, Z(ke)),
2134
- ie(1, Ti),
2135
- ie(2, Z(Mi)),
2136
- ie(3, Ni),
2137
- ie(4, U),
2138
- ie(5, Di)
2139
- ], Me);
2133
+ We = Kn([
2134
+ je(1, w),
2135
+ je(2, U),
2136
+ je(3, Qe)
2137
+ ], We);
2140
2138
  var Zn = Object.getOwnPropertyDescriptor, Xn = (n, e, t, i) => {
2141
2139
  for (var r = i > 1 ? void 0 : i ? Zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
2142
2140
  (o = n[s]) && (r = o(r) || r);
@@ -2151,11 +2149,11 @@ let Ne = class extends ge {
2151
2149
  this._initSlideDataListener(), this._initContextListener();
2152
2150
  }
2153
2151
  _initSlideDataListener() {
2154
- this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(lt(this.dispose$)).subscribe((n) => {
2152
+ this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(ut(this.dispose$)).subscribe((n) => {
2155
2153
  this._createRenderer(n == null ? void 0 : n.getUnitId());
2156
2154
  }), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((n) => {
2157
2155
  this._createRenderer(n.getUnitId());
2158
- }), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(lt(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
2156
+ }), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(ut(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
2159
2157
  }
2160
2158
  _createRenderer(n) {
2161
2159
  n == null || this._instanceSrv.getUnit(n, E.UNIVER_SLIDE) == null || this._renderManagerService.createRender(n);
@@ -2180,22 +2178,22 @@ var Gn = Object.getOwnPropertyDescriptor, Yn = (n, e, t, i) => {
2180
2178
  const qn = "SLIDE_UI";
2181
2179
  var Ee;
2182
2180
  let _t = (Ee = class extends mi {
2183
- constructor(n = vt, e, t, i, r) {
2181
+ constructor(n = gt, e, t, i, r) {
2184
2182
  super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
2185
2183
  const { menu: s, ...o } = _i(
2186
2184
  {},
2187
- vt,
2185
+ gt,
2188
2186
  this._config
2189
2187
  );
2190
- s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(en, o);
2188
+ s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Dn, o);
2191
2189
  }
2192
2190
  onStarting() {
2193
2191
  tt([
2194
2192
  [Ne],
2195
- [Ye, { useClass: $e }],
2193
+ [Qe, { useClass: He }],
2196
2194
  // used by SlideUIController --> EditorContainer
2197
- [qe, { useClass: On }],
2198
- [we]
2195
+ [Je, { useClass: On }],
2196
+ [Te]
2199
2197
  ], this._config.override).forEach((n) => this._injector.add(n));
2200
2198
  }
2201
2199
  onReady() {
@@ -2212,10 +2210,10 @@ let _t = (Ee = class extends mi {
2212
2210
  // [ISlideEditorManagerService, { useClass: SlideEditorManagerService }],
2213
2211
  // SlidesUIController controller should be registered in Ready stage.
2214
2212
  // SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
2215
- [Me],
2213
+ [Pe],
2216
2214
  // editor service was create in renderManagerService
2217
2215
  [ve],
2218
- [ye]
2216
+ [Me]
2219
2217
  ], this._config.override).forEach((n) => {
2220
2218
  this._injector.add(n);
2221
2219
  }), this._injector.get(T), this._injector.get(Ne);
@@ -2224,14 +2222,14 @@ let _t = (Ee = class extends mi {
2224
2222
  [
2225
2223
  // need slideEditorBridgeService
2226
2224
  // need TextSelectionRenderService which init by EditorContainer
2227
- [Fe],
2228
- [He]
2225
+ [We],
2226
+ [Fe]
2229
2227
  ].forEach((n) => {
2230
2228
  this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
2231
- }), this._markSlideAsFocused(), this._injector.get(Me);
2229
+ }), this._markSlideAsFocused(), this._injector.get(Pe);
2232
2230
  }
2233
2231
  onSteady() {
2234
- this._injector.get(ye);
2232
+ this._injector.get(Me);
2235
2233
  }
2236
2234
  _markSlideAsFocused() {
2237
2235
  const n = this._univerInstanceService;
@@ -2249,25 +2247,25 @@ _t = Yn([
2249
2247
  be(4, Ci)
2250
2248
  ], _t);
2251
2249
  export {
2252
- zt as ActivateSlidePageOperation,
2253
- Kt as AppendSlideOperation,
2250
+ Dt as ActivateSlidePageOperation,
2251
+ Ut as AppendSlideOperation,
2254
2252
  T as CanvasView,
2255
- Dt as DeleteSlideElementOperation,
2256
- Ye as ISlideEditorBridgeService,
2257
- Je as InsertSlideFloatImageCommand,
2258
- Ge as InsertSlideShapeRectangleCommand,
2259
- Wt as InsertSlideShapeRectangleOperation,
2260
- Yt as SHAPE_MENU_ID,
2261
- Gt as SLIDES_IMAGE_MENU_ID,
2253
+ Vt as DeleteSlideElementOperation,
2254
+ Qe as ISlideEditorBridgeService,
2255
+ Xe as InsertSlideFloatImageCommand,
2256
+ Ye as InsertSlideShapeRectangleCommand,
2257
+ zt as InsertSlideShapeRectangleOperation,
2258
+ Gt as SHAPE_MENU_ID,
2259
+ Xt as SLIDES_IMAGE_MENU_ID,
2262
2260
  de as SLIDE_EDITOR_ID,
2263
- Xt as SetSlidePageThumbOperation,
2264
- Qe as SlideAddTextCommand,
2265
- Zt as SlideAddTextOperation,
2266
- we as SlideCanvasPopMangerService,
2267
- Vn as SlideEditorContainer,
2268
- Un as SlideSideBar,
2269
- Me as SlidesUIController,
2270
- Hn as SlidesUIMenuSchema,
2261
+ Zt as SetSlidePageThumbOperation,
2262
+ qe as SlideAddTextCommand,
2263
+ Kt as SlideAddTextOperation,
2264
+ Te as SlideCanvasPopMangerService,
2265
+ wn as SlideEditorContainer,
2266
+ _n as SlideSideBar,
2267
+ Pe as SlidesUIController,
2268
+ xn as SlidesUIMenuSchema,
2271
2269
  _t as UniverSlidesUIPlugin,
2272
2270
  H as UpdateSlideElementOperation
2273
2271
  };