@univerjs/docs-drawing-ui 0.13.0 → 0.14.0-insiders.20251227-b250a8d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var Pn = Object.defineProperty;
2
2
  var xn = (r, e, t) => e in r ? Pn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var me = (r, e, t) => xn(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as _t, JSONX as $, MemoryCursor as Nn, TextXActionType as Y, IUndoRedoService as Kt, BuildTextUtils as Un, ArrangeTypeEnum as Ze, Tools as Ae, Inject as Z, IContextService as Yt, LocaleService as lt, Disposable as xe, WrapTextType as $e, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as nt, UniverInstanceType as ve, Direction as he, DisposableCollection as Ln, toDisposable as ze, fromEventSubject as Zt, generateRandomId as Qt, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as St, FOCUSING_UNIVER_EDITOR as Bn, UndoCommand as Fn, RedoCommand as kn, Injector as Jt, DOC_DRAWING_PRINTING_COMPONENT_KEY as Wn, throttle as Et, COLORS as Gn, RxDisposable as Hn, LifecycleService as jn, LifecycleStages as Rt, DependentOn as Vn, IConfigService as $n, Plugin as zn, merge as Xn } from "@univerjs/core";
4
+ import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as _t, JSONX as $, MemoryCursor as Nn, TextXActionType as Y, IUndoRedoService as Kt, BuildTextUtils as Un, ArrangeTypeEnum as Ze, Tools as Ae, Inject as Z, IContextService as Yt, LocaleService as lt, Disposable as xe, WrapTextType as $e, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as nt, UniverInstanceType as ve, Direction as he, DisposableCollection as Ln, toDisposable as ze, fromEventSubject as Zt, generateRandomId as Qt, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as St, FOCUSING_UNIVER_EDITOR as Bn, UndoCommand as Fn, RedoCommand as kn, Injector as Jt, DOC_DRAWING_PRINTING_COMPONENT_KEY as Wn, throttle as Et, COLORS as Hn, RxDisposable as Gn, LifecycleService as jn, LifecycleStages as Rt, DependentOn as Vn, IConfigService as $n, Plugin as zn, merge as Xn } from "@univerjs/core";
5
5
  import { IDocDrawingService as Ne, UniverDocsDrawingPlugin as qn } from "@univerjs/docs-drawing";
6
6
  import { RichTextEditingMutation as ee, DocSelectionManagerService as Dt, DocSkeletonManagerService as te } from "@univerjs/docs";
7
7
  import { DocSelectionRenderService as Me, getRichTextEditPath as Xe, getCustomBlockIdsInSelections as Kn, docDrawingPositionToTransform as en, VIEWPORT_KEY as tn, SetDocZoomRatioOperation as nn, DocPrintInterceptorService as Yn, NodePositionConvertToCursor as At, getOneTextSelectionRange as Pt, getAnchorBounding as Zn, TEXT_RANGE_LAYER_INDEX as Qn, getDocObject as Jn, DocCanvasPopManagerService as ei, IEditorService as ti } from "@univerjs/docs-ui";
8
8
  import { IRenderManagerService as Q, DocumentEditArea as Fe, getCurrentTypeOfRenderer as ni, CURSOR_TYPE as xt, Liquid as rn, PageLayoutType as Nt, DocumentSkeletonPageType as Ut, Vector2 as ii, Rect as ri, getColor as si, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oi } from "@univerjs/engine-render";
9
9
  import { MessageType as Lt, clsx as sn, InputNumber as Be, Select as Bt, Checkbox as ai, RadioGroup as Ft, Radio as Te, render as ci, unmount as di } from "@univerjs/design";
10
- import { IImageIoService as gi, IDrawingManagerService as fe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as li, DRAWING_IMAGE_COUNT_LIMIT as kt, ImageUploadStatusType as mt, DRAWING_IMAGE_ALLOW_SIZE as ui, getImageSize as hi, getDrawingShapeKeyByDrawingSearch as fi, DRAWING_IMAGE_WIDTH_LIMIT as Wt, DRAWING_IMAGE_HEIGHT_LIMIT as Gt, UniverDrawingPlugin as pi } from "@univerjs/drawing";
10
+ import { IImageIoService as gi, IDrawingManagerService as fe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as li, DRAWING_IMAGE_COUNT_LIMIT as kt, ImageUploadStatusType as mt, DRAWING_IMAGE_ALLOW_SIZE as ui, getImageSize as hi, getDrawingShapeKeyByDrawingSearch as fi, DRAWING_IMAGE_WIDTH_LIMIT as Wt, DRAWING_IMAGE_HEIGHT_LIMIT as Ht, UniverDrawingPlugin as pi } from "@univerjs/drawing";
11
11
  import { IMessageService as mi, ILocalFileService as wi, ISidebarService as vi, CanvasFloatDomService as Ii, useDependency as we, getMenuHiddenObservable as on, MenuItemType as an, RibbonInsertGroup as _i, KeyCode as ke, ComponentManager as cn, IMenuManagerService as Si, IShortcutService as Di, PrintFloatDomSingle as Oi, connectInjector as Ti, UniverUIPlugin as Mi } from "@univerjs/ui";
12
- import { BehaviorSubject as Ot, debounceTime as dn, map as Ht, switchMap as yi, of as bi, Observable as Ci, takeUntil as jt, filter as Vt } from "rxjs";
12
+ import { BehaviorSubject as Ot, debounceTime as dn, map as Gt, switchMap as yi, of as bi, Observable as Ci, takeUntil as jt, filter as Vt } from "rxjs";
13
13
  import { DrawingRenderService as gn, DrawingCommonPanel as Ei, ImageCropperObject as Ri, COMPONENT_IMAGE_POPUP_MENU as Ai, OpenImageCropOperation as Pi, ImageResetSizeOperation as xi, UniverDrawingUIPlugin as Ni } from "@univerjs/drawing-ui";
14
14
  import { jsxs as X, jsx as M } from "react/jsx-runtime";
15
15
  import { useState as re, useEffect as Tt, useMemo as Ui } from "react";
@@ -50,8 +50,8 @@ const Mt = {
50
50
  const S = Xe(s, d);
51
51
  D.push(g.editOp(a.serialize(), S));
52
52
  for (const R of l) {
53
- const { blockId: v } = R, N = ((L = s.getDrawings()) != null ? L : {})[v], x = s.getDrawingsOrder().indexOf(v), H = g.removeOp(["drawings", v], N), I = g.removeOp(["drawingsOrder", x], v);
54
- D.push(H), D.push(I);
53
+ const { blockId: v } = R, N = ((L = s.getDrawings()) != null ? L : {})[v], x = s.getDrawingsOrder().indexOf(v), G = g.removeOp(["drawings", v], N), I = g.removeOp(["drawingsOrder", x], v);
54
+ D.push(G), D.push(I);
55
55
  }
56
56
  return w.params.actions = D.reduce((R, v) => $.compose(R, v), null), !!t.syncExecuteCommand(w.id, w.params);
57
57
  }
@@ -116,10 +116,10 @@ const Mt = {
116
116
  else {
117
117
  const v = Un.selection.delete([s], l, 0, null, !1);
118
118
  f.push(...v);
119
- const N = Kn(l, [s]), G = (L = o.getDrawings()) != null ? L : {}, x = (R = o.getDrawingsOrder()) != null ? R : [], H = N.sort((I, _) => x.indexOf(I) > x.indexOf(_) ? -1 : x.indexOf(I) < x.indexOf(_) ? 1 : 0);
120
- if (H.length > 0)
121
- for (const I of H) {
122
- const _ = G[I], E = x.indexOf(I);
119
+ const N = Kn(l, [s]), H = (L = o.getDrawings()) != null ? L : {}, x = (R = o.getDrawingsOrder()) != null ? R : [], G = N.sort((I, _) => x.indexOf(I) > x.indexOf(_) ? -1 : x.indexOf(I) < x.indexOf(_) ? 1 : 0);
120
+ if (G.length > 0)
121
+ for (const I of G) {
122
+ const _ = H[I], E = x.indexOf(I);
123
123
  if (_ == null || E < 0)
124
124
  continue;
125
125
  const T = h.removeOp(["drawings", I], _), U = h.removeOp(["drawingsOrder", E], I);
@@ -140,8 +140,8 @@ const Mt = {
140
140
  const D = Xe(o, u), S = h.editOp(f.serialize(), D);
141
141
  m.push(S);
142
142
  for (const v of d) {
143
- const { drawingId: N } = v, G = h.insertOp(["drawings", N], v), x = h.insertOp(["drawingsOrder", p - w], N);
144
- m.push(G), m.push(x);
143
+ const { drawingId: N } = v, H = h.insertOp(["drawings", N], v), x = h.insertOp(["drawingsOrder", p - w], N);
144
+ m.push(H), m.push(x);
145
145
  }
146
146
  const O = {
147
147
  id: ee.id,
@@ -261,8 +261,8 @@ let it = class extends xe {
261
261
  const { imageId: s, imageSourceType: o, source: c, base64Cache: d } = i, { width: a, height: g, image: u } = await hi(d || "");
262
262
  this._imageIoService.addImageSourceCache(s, o, u);
263
263
  let l = 1;
264
- if (a > Wt || g > Gt) {
265
- const p = Wt / a, w = Gt / g;
264
+ if (a > Wt || g > Ht) {
265
+ const p = Wt / a, w = Ht / g;
266
266
  l = Math.min(p, w);
267
267
  }
268
268
  const f = this._getImagePosition(a * l, g * l);
@@ -571,9 +571,9 @@ const wn = {
571
571
  return !1;
572
572
  const f = g.getEditArea(), h = u.getTransformerByCreate(), { pages: m, skeHeaders: p, skeFooters: w } = a, D = $.getInstance(), S = [], { drawings: O = {} } = l.getSnapshot();
573
573
  for (const R of t) {
574
- const { drawingId: v } = R, N = O[v].layoutType, G = Fi[n];
575
- if (N !== G) {
576
- const _ = D.replaceOp(["drawings", v, "layoutType"], N, G);
574
+ const { drawingId: v } = R, N = O[v].layoutType, H = Fi[n];
575
+ if (N !== H) {
576
+ const _ = D.replaceOp(["drawings", v, "layoutType"], N, H);
577
577
  S.push(_);
578
578
  }
579
579
  if (n === "behindText" || n === "inFrontOfText") {
@@ -585,22 +585,22 @@ const wn = {
585
585
  }
586
586
  if (n === "inline")
587
587
  continue;
588
- let x = null, H = 0, I = 0;
588
+ let x = null, G = 0, I = 0;
589
589
  for (const _ of m) {
590
590
  const { headerId: E, footerId: T, marginTop: U, marginLeft: B, marginBottom: b, pageWidth: P, pageHeight: V } = _;
591
591
  switch (f) {
592
592
  case Fe.HEADER: {
593
593
  const F = (A = p.get(E)) == null ? void 0 : A.get(P);
594
- F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), H = F.marginTop, I = B);
594
+ F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), G = F.marginTop, I = B);
595
595
  break;
596
596
  }
597
597
  case Fe.FOOTER: {
598
598
  const F = (L = w.get(T)) == null ? void 0 : L.get(P);
599
- F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), H = V - b + F.marginTop, I = B);
599
+ F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), G = V - b + F.marginTop, I = B);
600
600
  break;
601
601
  }
602
602
  case Fe.BODY: {
603
- _.skeDrawings.has(v) && (x = _.skeDrawings.get(v), H = U, I = B);
603
+ _.skeDrawings.has(v) && (x = _.skeDrawings.get(v), G = U, I = B);
604
604
  break;
605
605
  }
606
606
  }
@@ -621,7 +621,7 @@ const wn = {
621
621
  }
622
622
  const b = O[v].docTransform.positionV;
623
623
  let P = _;
624
- b.relativeFrom === W.PAGE ? P += H : b.relativeFrom === W.LINE ? P -= x.lineTop : b.relativeFrom === W.PARAGRAPH && (P -= x.blockAnchorTop);
624
+ b.relativeFrom === W.PAGE ? P += G : b.relativeFrom === W.LINE ? P -= x.lineTop : b.relativeFrom === W.PARAGRAPH && (P -= x.blockAnchorTop);
625
625
  const V = {
626
626
  relativeFrom: b.relativeFrom,
627
627
  posOffset: P
@@ -779,7 +779,7 @@ const wn = {
779
779
  type: q.COMMAND,
780
780
  // eslint-disable-next-line max-lines-per-function
781
781
  handler: (r, e) => {
782
- var x, H;
782
+ var x, G;
783
783
  if (e == null)
784
784
  return !1;
785
785
  const t = r.get(Q), n = (x = t.getRenderById(e.unitId)) == null ? void 0 : x.with(Me), i = t.getRenderById(e.unitId), s = i == null ? void 0 : i.scene;
@@ -788,7 +788,7 @@ const wn = {
788
788
  const o = s.getTransformerByCreate(), c = r.get(j), a = r.get(z).getCurrentUniverDocInstance();
789
789
  if (a == null)
790
790
  return !1;
791
- const { drawing: g, unitId: u, offset: l, docTransform: f, segmentId: h, segmentPage: m } = e, p = [], { drawingId: w } = g, D = (H = n.getSegment()) != null ? H : "", S = mn(
791
+ const { drawing: g, unitId: u, offset: l, docTransform: f, segmentId: h, segmentPage: m } = e, p = [], { drawingId: w } = g, D = (G = n.getSegment()) != null ? G : "", S = mn(
792
792
  h,
793
793
  D,
794
794
  m,
@@ -827,8 +827,8 @@ const wn = {
827
827
  }
828
828
  };
829
829
  N.params.actions = p.reduce((I, _) => $.compose(I, _), null);
830
- const G = c.syncExecuteCommand(N.id, N.params);
831
- return o.refreshControls(), !!G;
830
+ const H = c.syncExecuteCommand(N.id, N.params);
831
+ return o.refreshControls(), !!H;
832
832
  }
833
833
  }, Ke = {
834
834
  id: "doc.command.move-drawing",
@@ -876,23 +876,14 @@ const wn = {
876
876
  type: q.COMMAND,
877
877
  handler: async (r, e) => {
878
878
  const t = r.get(vi), n = r.get(lt), i = r.get(fe);
879
- switch (e.value) {
880
- case "open":
881
- t.open({
882
- header: { title: n.t("docImage.panel.title") },
883
- children: { label: Dn },
884
- onClose: () => {
885
- i.focusDrawing(null);
886
- },
887
- width: 360
888
- });
889
- break;
890
- case "close":
891
- default:
892
- t.close();
893
- break;
894
- }
895
- return !0;
879
+ return e.value === "open" ? t.open({
880
+ header: { title: n.t("docImage.panel.title") },
881
+ children: { label: Dn },
882
+ onClose: () => {
883
+ i.focusDrawing(null);
884
+ },
885
+ width: 360
886
+ }) : t.close(), !0;
896
887
  }
897
888
  }, Tn = {
898
889
  id: "doc.operation.edit-doc-image",
@@ -902,7 +893,7 @@ const wn = {
902
893
  return e == null ? !1 : (t.focusDrawing([e]), n.executeCommand(On.id, { value: "open" }), !0);
903
894
  }
904
895
  };
905
- var Wi = Object.getOwnPropertyDescriptor, Gi = (r, e, t, n) => {
896
+ var Wi = Object.getOwnPropertyDescriptor, Hi = (r, e, t, n) => {
906
897
  for (var i = n > 1 ? void 0 : n ? Wi(e, t) : e, s = r.length - 1, o; s >= 0; s--)
907
898
  (o = r[s]) && (i = o(i) || i);
908
899
  return i;
@@ -1049,13 +1040,13 @@ let rt = class extends xe {
1049
1040
  };
1050
1041
  this.disposeWithMe(
1051
1042
  this._univerInstanceService.getCurrentTypeOfUnit$(ve.UNIVER_DOC).pipe(
1052
- Ht((t) => {
1043
+ Gt((t) => {
1053
1044
  if (!t) return null;
1054
1045
  const n = t.getUnitId(), i = this._renderManagerService.getRenderById(n);
1055
1046
  return i ? { render: i, unitId: n } : null;
1056
1047
  }),
1057
1048
  yi(
1058
- (t) => t ? Zt(t.render.scene.getViewport(tn.VIEW_MAIN).onScrollAfter$).pipe(Ht(() => ({ unitId: t.unitId }))) : bi(null)
1049
+ (t) => t ? Zt(t.render.scene.getViewport(tn.VIEW_MAIN).onScrollAfter$).pipe(Gt(() => ({ unitId: t.unitId }))) : bi(null)
1059
1050
  )
1060
1051
  ).subscribe((t) => {
1061
1052
  if (!t) return;
@@ -1111,7 +1102,7 @@ let rt = class extends xe {
1111
1102
  return this._commandService.syncExecuteCommand(yt.id, h), f;
1112
1103
  }
1113
1104
  };
1114
- rt = Gi([
1105
+ rt = Hi([
1115
1106
  Le(0, Q),
1116
1107
  Le(1, fe),
1117
1108
  Le(2, Z(gn)),
@@ -1119,7 +1110,7 @@ rt = Gi([
1119
1110
  Le(4, z),
1120
1111
  Le(5, j)
1121
1112
  ], rt);
1122
- const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1113
+ const Gi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1123
1114
  const e = we(j), t = we(lt), n = we(fe), i = we(Q), s = we(z), { drawings: o } = r, c = o[0];
1124
1115
  if (c == null)
1125
1116
  return;
@@ -1221,7 +1212,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1221
1212
  };
1222
1213
  v("positionH", ne);
1223
1214
  }
1224
- function G(_) {
1215
+ function H(_) {
1225
1216
  var De, be, Ce, Oe, de, ge;
1226
1217
  const E = O.relativeFrom, T = O.posOffset, U = Number(_);
1227
1218
  if (E === U)
@@ -1254,15 +1245,15 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1254
1245
  } = T.docTransform;
1255
1246
  S(B), C(b), w(U === k.INLINE), A(b.relativeFrom === W.PARAGRAPH || b.relativeFrom === W.LINE);
1256
1247
  }
1257
- function H() {
1248
+ function G() {
1258
1249
  const _ = n.getFocusDrawings();
1259
1250
  _.length !== 0 && x(_[0]);
1260
1251
  }
1261
1252
  function I(_) {
1262
- A(_), G(String(_ ? W.PARAGRAPH : W.PAGE));
1253
+ A(_), H(String(_ ? W.PARAGRAPH : W.PAGE));
1263
1254
  }
1264
1255
  return Tt(() => {
1265
- H();
1256
+ G();
1266
1257
  const _ = n.focus$.subscribe((T) => {
1267
1258
  if (T.length === 0) {
1268
1259
  R(!1);
@@ -1270,7 +1261,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1270
1261
  }
1271
1262
  R(!0), x(T[0]);
1272
1263
  }), E = e.onCommandExecuted(async (T) => {
1273
- T.id === ee.id && H();
1264
+ T.id === ee.id && G();
1274
1265
  });
1275
1266
  return () => {
1276
1267
  _.unsubscribe(), E.dispose();
@@ -1374,7 +1365,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1374
1365
  disabled: p,
1375
1366
  value: String(O.relativeFrom),
1376
1367
  options: m,
1377
- onChange: G
1368
+ onChange: H
1378
1369
  }
1379
1370
  )
1380
1371
  ] })
@@ -1447,7 +1438,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1447
1438
  wrapText: I
1448
1439
  });
1449
1440
  }
1450
- function G(I, _) {
1441
+ function H(I, _) {
1451
1442
  if (I == null)
1452
1443
  return;
1453
1444
  const E = { ...y, [_]: I };
@@ -1471,9 +1462,9 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1471
1462
  }
1472
1463
  function x() {
1473
1464
  const I = n.getFocusDrawings();
1474
- I.length !== 0 && H(I[0]);
1465
+ I.length !== 0 && G(I[0]);
1475
1466
  }
1476
- function H(I) {
1467
+ function G(I) {
1477
1468
  var K, oe;
1478
1469
  const _ = (oe = (K = a == null ? void 0 : a.getSnapshot()) == null ? void 0 : K.drawings) == null ? void 0 : oe[I.drawingId];
1479
1470
  if (_ == null)
@@ -1516,7 +1507,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1516
1507
  R(!1);
1517
1508
  return;
1518
1509
  }
1519
- R(!0), H(E[0]);
1510
+ R(!0), G(E[0]);
1520
1511
  }), _ = e.onCommandExecuted(async (E) => {
1521
1512
  E.id === ee.id && x();
1522
1513
  });
@@ -1586,7 +1577,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1586
1577
  precision: 1,
1587
1578
  value: y.distT,
1588
1579
  onChange: (I) => {
1589
- G(I, "distT");
1580
+ H(I, "distT");
1590
1581
  }
1591
1582
  }
1592
1583
  )
@@ -1602,7 +1593,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1602
1593
  precision: 1,
1603
1594
  value: y.distL,
1604
1595
  onChange: (I) => {
1605
- G(I, "distL");
1596
+ H(I, "distL");
1606
1597
  }
1607
1598
  }
1608
1599
  )
@@ -1626,7 +1617,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1626
1617
  precision: 1,
1627
1618
  value: y.distB,
1628
1619
  onChange: (I) => {
1629
- G(I, "distB");
1620
+ H(I, "distB");
1630
1621
  }
1631
1622
  }
1632
1623
  )
@@ -1642,7 +1633,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1642
1633
  precision: 1,
1643
1634
  value: y.distR,
1644
1635
  onChange: (I) => {
1645
- G(I, "distR");
1636
+ H(I, "distR");
1646
1637
  }
1647
1638
  }
1648
1639
  )
@@ -1836,7 +1827,7 @@ var ir = Object.getOwnPropertyDescriptor, rr = (r, e, t, n) => {
1836
1827
  for (var i = n > 1 ? void 0 : n ? ir(e, t) : e, s = r.length - 1, o; s >= 0; s--)
1837
1828
  (o = r[s]) && (i = o(i) || i);
1838
1829
  return i;
1839
- }, He = (r, e) => (t, n) => e(t, n, r);
1830
+ }, Ge = (r, e) => (t, n) => e(t, n, r);
1840
1831
  function sr(r) {
1841
1832
  var n, i, s, o;
1842
1833
  if ($.isNoop(r) || !Array.isArray(r))
@@ -1944,11 +1935,11 @@ let ot = class extends xe {
1944
1935
  }
1945
1936
  };
1946
1937
  ot = rr([
1947
- He(0, z),
1948
- He(1, j),
1949
- He(2, fe),
1950
- He(3, Ne),
1951
- He(4, Q)
1938
+ Ge(0, z),
1939
+ Ge(1, j),
1940
+ Ge(2, fe),
1941
+ Ge(3, Ne),
1942
+ Ge(4, Q)
1952
1943
  ], ot);
1953
1944
  const ar = (r) => {
1954
1945
  const { floatDomInfos: e, scene: t, offset: n, bound: i } = r, s = i.right - i.left, o = i.bottom - i.top, c = Ui(() => e.map((d) => {
@@ -2240,7 +2231,7 @@ let ct = class extends xe {
2240
2231
  i != null && this._createOrUpdateInlineAnchor(e.unitId, i);
2241
2232
  }
2242
2233
  _getInlineDrawingAnchor(e, t, n) {
2243
- var x, H;
2234
+ var x, G;
2244
2235
  const i = this._renderManagerService.getRenderById(e.unitId), s = i == null ? void 0 : i.with(te).getSkeleton();
2245
2236
  if (i == null)
2246
2237
  return;
@@ -2273,9 +2264,9 @@ let ct = class extends xe {
2273
2264
  const A = {
2274
2265
  ...C,
2275
2266
  isBack: h
2276
- }, L = y.document.getOffsetConfig(), R = new At(L, s), { cursorList: v, contentBoxPointGroup: N } = R.getRangePointData(A, A), { startOffset: G } = (H = Pt(v)) != null ? H : {};
2277
- if (G != null)
2278
- return { offset: G, contentBoxPointGroup: N, segmentId: p, segmentPage: m };
2267
+ }, L = y.document.getOffsetConfig(), R = new At(L, s), { cursorList: v, contentBoxPointGroup: N } = R.getRangePointData(A, A), { startOffset: H } = (G = Pt(v)) != null ? G : {};
2268
+ if (H != null)
2269
+ return { offset: H, contentBoxPointGroup: N, segmentId: p, segmentPage: m };
2279
2270
  }
2280
2271
  // eslint-disable-next-line max-lines-per-function, complexity
2281
2272
  _getDrawingAnchor(e, t) {
@@ -2287,8 +2278,8 @@ let ct = class extends xe {
2287
2278
  let { width: C, height: y } = t;
2288
2279
  const { positionV: A, positionH: L } = e.docTransform, { width: R, height: v } = this._getPageContentSize(e);
2289
2280
  C = Math.min(C, R), y = Math.min(y, v);
2290
- let N = null, G = "", x = -1;
2291
- const H = !1, I = {
2281
+ let N = null, H = "", x = -1;
2282
+ const G = !1, I = {
2292
2283
  ...e.docTransform,
2293
2284
  size: {
2294
2285
  width: C,
@@ -2308,7 +2299,7 @@ let ct = class extends xe {
2308
2299
  });
2309
2300
  if (B) {
2310
2301
  const { node: pe, segmentPage: ht, segmentId: ft } = B;
2311
- N = pe, x = ht, G = ft;
2302
+ N = pe, x = ht, H = ft;
2312
2303
  }
2313
2304
  if (N == null)
2314
2305
  return;
@@ -2322,10 +2313,10 @@ let ct = class extends xe {
2322
2313
  if (x > -1 && An === x) {
2323
2314
  switch (K) {
2324
2315
  case Ut.HEADER: {
2325
- const Ge = (De = c.get(ht)) == null ? void 0 : De.get(bt);
2326
- if (Ge)
2316
+ const He = (De = c.get(ht)) == null ? void 0 : De.get(bt);
2317
+ if (He)
2327
2318
  this._liquid.translatePagePadding({
2328
- marginTop: Ge.marginTop,
2319
+ marginTop: He.marginTop,
2329
2320
  marginLeft: Ct
2330
2321
  });
2331
2322
  else
@@ -2333,10 +2324,10 @@ let ct = class extends xe {
2333
2324
  break;
2334
2325
  }
2335
2326
  case Ut.FOOTER: {
2336
- const Ge = (be = d.get(ft)) == null ? void 0 : be.get(bt);
2337
- if (Ge)
2327
+ const He = (be = d.get(ft)) == null ? void 0 : be.get(bt);
2328
+ if (He)
2338
2329
  this._liquid.translatePagePadding({
2339
- marginTop: En - Rn + Ge.marginTop,
2330
+ marginTop: En - Rn + He.marginTop,
2340
2331
  marginLeft: Ct
2341
2332
  });
2342
2333
  else
@@ -2387,10 +2378,10 @@ let ct = class extends xe {
2387
2378
  return;
2388
2379
  const ye = {
2389
2380
  ...oe,
2390
- isBack: H
2381
+ isBack: G
2391
2382
  }, We = Ue.document.getOffsetConfig(), ae = new At(We, i), { cursorList: ne } = ae.getRangePointData(ye, ye), { startOffset: ie } = (Ee = Pt(ne)) != null ? Ee : {};
2392
2383
  if (ie != null)
2393
- return { offset: ie, docTransform: I, segmentId: G, segmentPage: x };
2384
+ return { offset: ie, docTransform: I, segmentId: H, segmentPage: x };
2394
2385
  }
2395
2386
  // Update drawing when use transformer to resize it.
2396
2387
  _updateDrawingSize(e, t) {
@@ -2511,7 +2502,7 @@ let ct = class extends xe {
2511
2502
  top: h,
2512
2503
  height: l,
2513
2504
  strokeWidth: 2,
2514
- stroke: si(Gn.darkGray, 1),
2505
+ stroke: si(Hn.darkgray, 1),
2515
2506
  evented: !1
2516
2507
  });
2517
2508
  this._anchorShape = p, s.addObject(p, Qn);
@@ -2559,7 +2550,7 @@ var hr = Object.getOwnPropertyDescriptor, fr = (r, e, t, n) => {
2559
2550
  (o = r[s]) && (i = o(i) || i);
2560
2551
  return i;
2561
2552
  }, Ve = (r, e) => (t, n) => e(t, n, r);
2562
- let dt = class extends Hn {
2553
+ let dt = class extends Gn {
2563
2554
  constructor(e, t, n, i, s) {
2564
2555
  super();
2565
2556
  me(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
@@ -2860,7 +2851,7 @@ let gt = class extends zn {
2860
2851
  $t,
2861
2852
  this._config
2862
2853
  );
2863
- this._configService.setConfig(Hi, i);
2854
+ this._configService.setConfig(Gi, i);
2864
2855
  }
2865
2856
  onStarting() {
2866
2857
  [