@netless/appliance-plugin 1.1.32 → 1.1.33-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/READMA.zh-CN.md +9 -6
  2. package/README.md +293 -32
  3. package/cdn/cdn.js +1 -1
  4. package/cdn/{fullWorker-BuCr8Z.js → fullWorker-D5ZxtP.js} +98 -98
  5. package/cdn/{subWorker-00SXWn.js → subWorker-DJi31K.js} +98 -98
  6. package/dist/appliance-plugin.js +1 -1
  7. package/dist/appliance-plugin.mjs +13 -14
  8. package/dist/component/textEditor/types.d.ts +2 -2
  9. package/dist/core/enum.d.ts +1 -9
  10. package/dist/core/mainEngine.d.ts +7 -7
  11. package/dist/core/msgEvent/rotateNode/forMain.d.ts +2 -2
  12. package/dist/core/msgEvent/scaleNode/forMain.d.ts +2 -2
  13. package/dist/core/msgEvent/setColor/forMain.d.ts +2 -2
  14. package/dist/core/msgEvent/setPoint/forMain.d.ts +2 -2
  15. package/dist/core/msgEvent/translateNode/forMain.d.ts +2 -2
  16. package/dist/core/plugin.d.ts +2 -2
  17. package/dist/core/tools/arrow.d.ts +2 -2
  18. package/dist/core/tools/base.d.ts +2 -2
  19. package/dist/core/tools/ellipse.d.ts +2 -2
  20. package/dist/core/tools/pencil.d.ts +2 -2
  21. package/dist/core/tools/polygon.d.ts +2 -2
  22. package/dist/core/tools/rectangle.d.ts +2 -2
  23. package/dist/core/tools/speechBalloon.d.ts +2 -2
  24. package/dist/core/tools/star.d.ts +2 -2
  25. package/dist/core/tools/straight.d.ts +2 -2
  26. package/dist/core/tools/utils.d.ts +0 -3
  27. package/dist/core/types.d.ts +6 -6
  28. package/dist/core/worker/base.d.ts +2 -2
  29. package/dist/cursors/index.d.ts +3 -3
  30. package/dist/fullWorker.js +98 -98
  31. package/dist/{index-B9IvzEGP.mjs → index-C7U3tEJL.mjs} +80 -89
  32. package/dist/{index-BA9yB27Q.mjs → index-COnrz1Bl.mjs} +682 -683
  33. package/dist/index-CbCGd4f7.js +1 -0
  34. package/dist/{index-DFQ4hkMe.mjs → index-CxKr64Ya.mjs} +1 -1
  35. package/dist/index-ht-Ylmvp.js +1 -0
  36. package/dist/{index-DfV03MPS.js → index-u7Hv85FE.js} +1 -1
  37. package/dist/plugin/baseApplianceManager.d.ts +3 -3
  38. package/dist/plugin/types.d.ts +2 -3
  39. package/dist/subWorker.js +98 -98
  40. package/package.json +1 -1
  41. package/dist/index-CcTOfya8.js +0 -1
  42. package/dist/index-DpQJ_LNL.js +0 -1
@@ -1,13 +1,13 @@
1
1
  var _e = Object.defineProperty;
2
2
  var Ve = (T, i, t) => i in T ? _e(T, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : T[i] = t;
3
3
  var y = (T, i, t) => Ve(T, typeof i != "symbol" ? i + "" : i, t);
4
- import { g as Jt, _ as Pe, i as te, p as St, e as Tt, D as J, f as E, h as Rt, j as Vt, k as st, P as O, l as W, s as Ht, m as ee, n as Nt, o as se, r as He, q as qe, c as k, t as Mt, u as U, a as w, b as x, v as A, w as G, x as tt, y as $, z as Zt, A as je, B as Ze, C as Ke, F as Qe, G as Je, H as ts, I as es, J as ss, K as X, L as os, M as he, N as Wt, O as We, T as Bt, Q as yt, R as is, U as Le, W as rs, X as ns, Y as ct, Z as _, $ as ut, a0 as as, a1 as cs, a2 as ls, a3 as hs, a4 as bt, a5 as ps, E as Y, a6 as pe, V as de, S as ds } from "./index-BA9yB27Q.mjs";
4
+ import { g as Jt, _ as Pe, i as te, p as St, e as Tt, D as J, f as E, h as Rt, j as Vt, k as st, P as O, l as W, s as Ht, m as ee, n as Nt, o as se, r as He, q as qe, c as k, t as Mt, u as z, a as w, b as x, v as A, w as G, x as tt, y as $, z as Zt, A as je, B as Ze, C as Ke, F as Qe, G as Je, H as ts, I as es, J as ss, K as X, L as os, M as he, N as Wt, O as We, T as Bt, Q as yt, R as is, U as Le, W as rs, X as ns, Y as ct, Z as _, $ as ut, a0 as as, a1 as cs, a2 as ls, a3 as hs, a4 as bt, a5 as ps, E as Y, a6 as pe, V as de, S as ds } from "./index-COnrz1Bl.mjs";
5
5
  import { Group as j, Path as wt, Sprite as Ce, Rect as Kt, Polyline as ht, Ellipse as us, Label as fs, Scene as oe, Layer as ms } from "spritejs";
6
6
  import it from "clipper-lib";
7
7
  import ie from "lineclip";
8
8
  import "lz-string";
9
9
  import "xss";
10
- import { cloneDeep as be, xor as ys, isNumber as Ut, isEqual as ue } from "lodash";
10
+ import { cloneDeep as be, xor as ys, isNumber as zt, isEqual as ue } from "lodash";
11
11
  import { O as fe } from "./ObserverMap-BudneEfB.mjs";
12
12
  import "white-web-sdk";
13
13
  import "react-dom";
@@ -151,8 +151,8 @@ const et = class et {
151
151
  }
152
152
  const D = st(R);
153
153
  D.x = Math.floor(Math.max(R.x, 0)), D.y = Math.floor(Math.max(R.y, 0)), D.w = Math.min(R.x + R.w, f.width) - D.x, D.h = Math.min(R.y + R.h, f.height) - D.y;
154
- const B = this.getGroupRect(D, C), F = B.x, z = B.y, V = B.w, Z = B.h;
155
- let K = L.getImageData(F, z, V, Z);
154
+ const B = this.getGroupRect(D, C), F = B.x, U = B.y, V = B.w, Z = B.h;
155
+ let K = L.getImageData(F, U, V, Z);
156
156
  if (this.isTransparentRectByCanvas(K)) {
157
157
  Q(I, S), f.removeChild(S), this.isDelete = !0, K = null;
158
158
  return;
@@ -547,7 +547,7 @@ class Ne extends b {
547
547
  constructor(t) {
548
548
  super(t);
549
549
  y(this, "canRotate", !0);
550
- y(this, "scaleType", U.all);
550
+ y(this, "scaleType", z.all);
551
551
  y(this, "toolsType", k.Pencil);
552
552
  y(this, "syncTimestamp");
553
553
  y(this, "syncIndex", 0);
@@ -812,12 +812,12 @@ class Ne extends b {
812
812
  const L = [], C = n.worldPosition, N = n.worldScaling;
813
813
  for (let P = 0; P < s.length; P++) {
814
814
  const { pos: M, points: D } = s[P], { ps: B, rect: F } = this.computDrawPoints(D);
815
- let z;
815
+ let U;
816
816
  const V = D.length === 1;
817
- h === G.Stroke || V ? z = mt(B, !0) : z = mt(B, !1);
817
+ h === G.Stroke || V ? U = mt(B, !0) : U = mt(B, !1);
818
818
  const Z = {
819
819
  pos: M,
820
- d: z,
820
+ d: U,
821
821
  fillColor: h === G.Stroke || V ? l : void 0,
822
822
  lineDash: V ? void 0 : h === G.Dotted ? [
823
823
  S && S[0] || 1,
@@ -866,7 +866,7 @@ class Ne extends b {
866
866
  D.pos[0] - this.centerPos[0],
867
867
  D.pos[1] - this.centerPos[1]
868
868
  ], new wt(D)));
869
- R.append(...M), P && R.seal(), g && (this.scaleType = U.proportional, this.drawEraserlines(
869
+ R.append(...M), P && R.seal(), g && (this.scaleType = z.proportional, this.drawEraserlines(
870
870
  {
871
871
  group: R,
872
872
  eraserlines: g,
@@ -1131,11 +1131,11 @@ class Ne extends b {
1131
1131
  }
1132
1132
  }
1133
1133
  static updateNodeOpt(t) {
1134
- var c, l;
1135
- const { node: e, opt: s, vNodes: o } = t, { strokeColor: r, strokeType: n } = s, a = o.get(e.name);
1136
- return r && (e.tagName === "GROUP" ? so(e) ? e.setAttribute("bgcolor", r) : e.children.forEach((h) => {
1137
- h.setAttribute("strokeColor", r), h.getAttribute("fillColor") && h.setAttribute("fillColor", r);
1138
- }) : (e.setAttribute("strokeColor", r), e.setAttribute("fillColor", r)), (c = a == null ? void 0 : a.opt) != null && c.strokeColor && (a.opt.strokeColor = r)), n && (a != null && a.opt) && ((l = a.opt) != null && l.strokeType) && (a.opt.strokeType = n), a && o.setInfo(e.name, a), b.updateNodeOpt(t);
1134
+ var h, p;
1135
+ const { node: e, opt: s, vNodes: o } = t, { strokeColor: r, strokeType: n, lineCap: a, lineDash: c } = s, l = o.get(e.name);
1136
+ return r && (e.tagName === "GROUP" ? so(e) ? e.setAttribute("bgcolor", r) : e.children.forEach((d) => {
1137
+ d.setAttribute("strokeColor", r), d.getAttribute("fillColor") && d.setAttribute("fillColor", r);
1138
+ }) : (e.setAttribute("strokeColor", r), e.setAttribute("fillColor", r)), (h = l == null ? void 0 : l.opt) != null && h.strokeColor && (l.opt.strokeColor = r)), n && (l != null && l.opt) && ((p = l.opt) != null && p.strokeType) && (l.opt.strokeType = n), a && (l != null && l.opt) && (l.opt.lineCap = a), c && (l != null && l.opt) && (l.opt.lineDash = c), l && o.setInfo(e.name, l), b.updateNodeOpt(t);
1139
1139
  }
1140
1140
  }
1141
1141
  class xe extends b {
@@ -1143,7 +1143,7 @@ class xe extends b {
1143
1143
  super(t);
1144
1144
  y(this, "toolsType", k.LaserPen);
1145
1145
  y(this, "canRotate", !1);
1146
- y(this, "scaleType", U.none);
1146
+ y(this, "scaleType", z.none);
1147
1147
  y(this, "syncTimestamp");
1148
1148
  y(this, "syncIndex", 0);
1149
1149
  y(this, "tmpPoints", []);
@@ -1336,16 +1336,7 @@ class xe extends b {
1336
1336
  ...e,
1337
1337
  pos: l,
1338
1338
  d: p
1339
- });
1340
- const { vertex: d, fragment: u } = this.workOptions;
1341
- if (d && u) {
1342
- const f = r.renderer.createProgram({ vertex: d, fragment: u }), { width: m, height: g } = r.getResolution();
1343
- c.setUniforms({
1344
- u_time: 0,
1345
- u_resolution: [m, g]
1346
- }), c.setProgram(f);
1347
- }
1348
- r.appendChild(c), c.transition(n).attr({
1339
+ }), r.appendChild(c), c.transition(n).attr({
1349
1340
  scale: o ? [0.1, 0.1] : [1, 1],
1350
1341
  lineWidth: o ? 0 : 1
1351
1342
  }).then(() => {
@@ -1405,7 +1396,7 @@ const vt = class vt extends b {
1405
1396
  constructor(t, e) {
1406
1397
  super(t);
1407
1398
  y(this, "canRotate", !1);
1408
- y(this, "scaleType", U.none);
1399
+ y(this, "scaleType", z.none);
1409
1400
  y(this, "toolsType", k.Eraser);
1410
1401
  y(this, "serviceWork");
1411
1402
  y(this, "tmpPoints", []);
@@ -1552,7 +1543,7 @@ const vt = class vt extends b {
1552
1543
  };
1553
1544
  // 来源于white-sdk
1554
1545
  y(vt, "eraserSizes", re);
1555
- let zt = vt;
1546
+ let Ut = vt;
1556
1547
  var ye = je, bs = 1, Rs = Object.prototype, Ns = Rs.hasOwnProperty;
1557
1548
  function xs(T, i, t, e, s, o) {
1558
1549
  var r = t & bs, n = ye(T), a = n.length, c = ye(i), l = c.length;
@@ -1586,7 +1577,7 @@ function xs(T, i, t, e, s, o) {
1586
1577
  return o.delete(T), o.delete(i), f;
1587
1578
  }
1588
1579
  var Ds = xs, jt = Ze, Ms = Ke, Os = Qe, As = Ds, we = Je, ge = ss, ke = ts, Es = es, Bs = 1, Se = "[object Arguments]", Te = "[object Array]", Ft = "[object Object]", Fs = Object.prototype, ve = Fs.hasOwnProperty;
1589
- function Us(T, i, t, e, s, o) {
1580
+ function zs(T, i, t, e, s, o) {
1590
1581
  var r = ge(T), n = ge(i), a = r ? Te : we(T), c = n ? Te : we(i);
1591
1582
  a = a == Se ? Ft : a, c = c == Se ? Ft : c;
1592
1583
  var l = a == Ft, h = c == Ft, p = a == c;
@@ -1606,7 +1597,7 @@ function Us(T, i, t, e, s, o) {
1606
1597
  }
1607
1598
  return p ? (o || (o = new jt()), As(T, i, t, e, s, o)) : !1;
1608
1599
  }
1609
- var zs = Us, Gs = zs, Ie = te;
1600
+ var Us = zs, Gs = Us, Ie = te;
1610
1601
  function De(T, i, t, e, s) {
1611
1602
  return T === i ? !0 : T == null || i == null || !Ie(T) && !Ie(i) ? T !== T && i !== i : Gs(T, i, t, e, De, s);
1612
1603
  }
@@ -1632,7 +1623,7 @@ const lt = /* @__PURE__ */ Jt(_s), _t = class _t extends b {
1632
1623
  y(this, "canRotate", !1);
1633
1624
  y(this, "canTextEdit", !1);
1634
1625
  y(this, "canLock", !1);
1635
- y(this, "scaleType", U.all);
1626
+ y(this, "scaleType", z.all);
1636
1627
  y(this, "toolsTypes");
1637
1628
  y(this, "shapeOpt");
1638
1629
  y(this, "textOpt");
@@ -1720,18 +1711,18 @@ const lt = /* @__PURE__ */ Jt(_s), _t = class _t extends b {
1720
1711
  });
1721
1712
  }
1722
1713
  getSelecteorInfo(t) {
1723
- this.scaleType = U.all, this.canRotate = !1, this.textOpt = void 0, this.strokeColor = void 0, this.fillColor = void 0, this.canTextEdit = !1, this.canLock = !1, this.isLocked = !1, this.toolsTypes = void 0, this.shapeOpt = void 0, this.thickness = void 0, this.strokeType = void 0, this.useStroke = !1;
1714
+ this.scaleType = z.all, this.canRotate = !1, this.textOpt = void 0, this.strokeColor = void 0, this.fillColor = void 0, this.canTextEdit = !1, this.canLock = !1, this.isLocked = !1, this.toolsTypes = void 0, this.shapeOpt = void 0, this.thickness = void 0, this.strokeType = void 0, this.useStroke = !1;
1724
1715
  const e = /* @__PURE__ */ new Set();
1725
1716
  let s, o = !0;
1726
1717
  for (const r of t.values()) {
1727
1718
  const { opt: n, canRotate: a, scaleType: c, toolsType: l } = r;
1728
- this.selectorColor = this.workOptions.strokeColor, n.strokeColor && (this.strokeColor = n.strokeColor), n.fillColor && (this.fillColor = n.fillColor), n.textOpt && (this.textOpt = n.textOpt), n.thickness && (this.thickness = n.thickness), l !== k.Pencil && (o = !1), n.strokeType && (this.strokeType = n.strokeType), l === k.SpeechBalloon && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.placement = n.placement), l === k.Polygon && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.vertices = n.vertices), l === k.Star && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.vertices = n.vertices, this.shapeOpt.innerRatio = n.innerRatio, this.shapeOpt.innerVerticeStep = n.innerVerticeStep), l === k.Text && (this.textOpt = n), t.size === 1 && (this.textOpt && (this.canTextEdit = !0), this.canRotate = a, this.scaleType = c), (l === k.Image || l === k.BackgroundSVG) && (s = r), (c === U.proportional && this.scaleType !== U.none || c === U.none) && (this.scaleType = c);
1719
+ this.selectorColor = this.workOptions.strokeColor, n.strokeColor && (this.strokeColor = n.strokeColor), n.fillColor && (this.fillColor = n.fillColor), n.textOpt && (this.textOpt = n.textOpt), n.thickness && (this.thickness = n.thickness), l !== k.Pencil && (o = !1), n.strokeType && (this.strokeType = n.strokeType), l === k.SpeechBalloon && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.placement = n.placement), l === k.Polygon && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.vertices = n.vertices), l === k.Star && (e.add(l), this.shapeOpt || (this.shapeOpt = {}), this.shapeOpt.vertices = n.vertices, this.shapeOpt.innerRatio = n.innerRatio, this.shapeOpt.innerVerticeStep = n.innerVerticeStep), l === k.Text && (this.textOpt = n), t.size === 1 && (this.textOpt && (this.canTextEdit = !0), this.canRotate = a, this.scaleType = c), (l === k.Image || l === k.BackgroundSVG) && (s = r), (c === z.proportional && this.scaleType !== z.none || c === z.none) && (this.scaleType = c);
1729
1720
  }
1730
- o && (this.useStroke = !0), e.size && (this.toolsTypes = [...e]), s && (t.size === 1 ? (this.canLock = !0, s.opt.locked && (this.isLocked = !0, this.scaleType = U.none, this.canRotate = !1, this.textOpt = void 0, this.fillColor = void 0, this.selectorColor = "rgb(177,177,177)", this.strokeColor = void 0, this.canTextEdit = !1, this.thickness = void 0, this.strokeType = void 0, this.useStroke = void 0)) : t.size > 1 && !s.opt.locked && (this.canLock = !1, this.canRotate = !1));
1721
+ o && (this.useStroke = !0), e.size && (this.toolsTypes = [...e]), s && (t.size === 1 ? (this.canLock = !0, s.opt.locked && (this.isLocked = !0, this.scaleType = z.none, this.canRotate = !1, this.textOpt = void 0, this.fillColor = void 0, this.selectorColor = "rgb(177,177,177)", this.strokeColor = void 0, this.canTextEdit = !1, this.thickness = void 0, this.strokeType = void 0, this.useStroke = void 0)) : t.size > 1 && !s.opt.locked && (this.canLock = !1, this.canRotate = !1));
1731
1722
  }
1732
1723
  getChildrenPoints() {
1733
1724
  var t, e;
1734
- if (this.scaleType === U.both && ((t = this.selectIds) == null ? void 0 : t.length) === 1) {
1725
+ if (this.scaleType === z.both && ((t = this.selectIds) == null ? void 0 : t.length) === 1) {
1735
1726
  const s = this.selectIds[0], o = (e = this.vNodes.get(s)) == null ? void 0 : e.op;
1736
1727
  if (o) {
1737
1728
  const r = [];
@@ -2071,7 +2062,7 @@ const lt = /* @__PURE__ */ Jt(_s), _t = class _t extends b {
2071
2062
  });
2072
2063
  if (N) {
2073
2064
  D = I == null ? void 0 : I.get(L);
2074
- const F = ze(N);
2065
+ const F = Ue(N);
2075
2066
  if (F == null || F.updateNodeOpt({
2076
2067
  node: P,
2077
2068
  opt: M,
@@ -2079,33 +2070,33 @@ const lt = /* @__PURE__ */ Jt(_s), _t = class _t extends b {
2079
2070
  willSerializeData: r,
2080
2071
  targetNode: D
2081
2072
  }), C && n && B) {
2082
- const z = n.createWorkShapeNode({
2073
+ const U = n.createWorkShapeNode({
2083
2074
  workId: L,
2084
2075
  toolsType: N,
2085
2076
  toolsOpt: C.opt
2086
2077
  });
2087
- z == null || z.setWorkId(L);
2078
+ U == null || U.setWorkId(L);
2088
2079
  let V;
2089
2080
  if (N === k.BackgroundSVG)
2090
- V = z.consumeService({
2081
+ V = U.consumeService({
2091
2082
  isFullWork: !0,
2092
2083
  replaceId: L
2093
2084
  });
2094
2085
  else if (N === k.Image)
2095
- V = await z.consumeServiceAsync({
2086
+ V = await U.consumeServiceAsync({
2096
2087
  isFullWork: !0,
2097
2088
  replaceId: L,
2098
2089
  worker: n
2099
2090
  });
2100
2091
  else if (N === k.Text)
2101
- V = await z.consumeServiceAsync({
2092
+ V = await U.consumeServiceAsync({
2102
2093
  isFullWork: !0,
2103
2094
  replaceId: L,
2104
2095
  isDrawLabel: !0
2105
2096
  });
2106
2097
  else
2107
2098
  try {
2108
- V = z == null ? void 0 : z.consumeService({
2099
+ V = U == null ? void 0 : U.consumeService({
2109
2100
  op: C.op,
2110
2101
  isFullWork: !0,
2111
2102
  replaceId: L,
@@ -2280,7 +2271,7 @@ class Me extends b {
2280
2271
  constructor(t) {
2281
2272
  super(t);
2282
2273
  y(this, "canRotate", !1);
2283
- y(this, "scaleType", U.both);
2274
+ y(this, "scaleType", z.both);
2284
2275
  y(this, "toolsType", k.Arrow);
2285
2276
  y(this, "tmpPoints", []);
2286
2277
  y(this, "workOptions");
@@ -2408,7 +2399,7 @@ class Me extends b {
2408
2399
  normalize: !1
2409
2400
  }, B = new ht(D);
2410
2401
  if (M.append(B), !L && I && S) {
2411
- const z = {
2402
+ const U = {
2412
2403
  points: I,
2413
2404
  pos: [S[0] - R[0], S[1] - R[1]],
2414
2405
  fillColor: r,
@@ -2423,10 +2414,10 @@ class Me extends b {
2423
2414
  lineCap: p === G.Normal ? void 0 : f,
2424
2415
  lineWidth: n,
2425
2416
  normalize: !1
2426
- }, V = new ht(z);
2417
+ }, V = new ht(U);
2427
2418
  M.append(V);
2428
2419
  }
2429
- d && (this.scaleType = U.proportional, this.drawEraserlines(
2420
+ d && (this.scaleType = z.proportional, this.drawEraserlines(
2430
2421
  {
2431
2422
  group: M,
2432
2423
  eraserlines: d,
@@ -2450,12 +2441,12 @@ class Me extends b {
2450
2441
  )
2451
2442
  };
2452
2443
  if (c || l || h) {
2453
- const z = M.getBoundingClientRect();
2444
+ const U = M.getBoundingClientRect();
2454
2445
  F = {
2455
- x: Math.floor(z.x - b.SafeBorderPadding),
2456
- y: Math.floor(z.y - b.SafeBorderPadding),
2457
- w: Math.floor(z.width + b.SafeBorderPadding * 2),
2458
- h: Math.floor(z.height + b.SafeBorderPadding * 2)
2446
+ x: Math.floor(U.x - b.SafeBorderPadding),
2447
+ y: Math.floor(U.y - b.SafeBorderPadding),
2448
+ w: Math.floor(U.width + b.SafeBorderPadding * 2),
2449
+ h: Math.floor(U.height + b.SafeBorderPadding * 2)
2459
2450
  };
2460
2451
  }
2461
2452
  return this.isDelete && M.setAttribute("opacity", 0), F;
@@ -2550,7 +2541,7 @@ class Oe extends b {
2550
2541
  constructor(t) {
2551
2542
  super(t);
2552
2543
  y(this, "canRotate", !1);
2553
- y(this, "scaleType", U.all);
2544
+ y(this, "scaleType", z.all);
2554
2545
  y(this, "toolsType", k.Ellipse);
2555
2546
  y(this, "tmpPoints", []);
2556
2547
  y(this, "workOptions");
@@ -2700,7 +2691,7 @@ class Oe extends b {
2700
2691
  ...C,
2701
2692
  pos: [0, 0]
2702
2693
  });
2703
- R.append(P), f && (this.scaleType = U.proportional, this.drawEraserlines(
2694
+ R.append(P), f && (this.scaleType = z.proportional, this.drawEraserlines(
2704
2695
  {
2705
2696
  group: R,
2706
2697
  eraserlines: f,
@@ -2778,7 +2769,7 @@ class Ae extends b {
2778
2769
  constructor(t) {
2779
2770
  super(t);
2780
2771
  y(this, "canRotate", !0);
2781
- y(this, "scaleType", U.all);
2772
+ y(this, "scaleType", z.all);
2782
2773
  y(this, "toolsType", k.Rectangle);
2783
2774
  y(this, "tmpPoints", []);
2784
2775
  y(this, "workOptions");
@@ -2974,7 +2965,7 @@ class Ae extends b {
2974
2965
  });
2975
2966
  D.appendChild(F);
2976
2967
  }
2977
- if (g && (this.scaleType = U.proportional, this.drawEraserlines(
2968
+ if (g && (this.scaleType = z.proportional, this.drawEraserlines(
2978
2969
  {
2979
2970
  group: D,
2980
2971
  eraserlines: g,
@@ -3050,7 +3041,7 @@ class Ee extends b {
3050
3041
  constructor(t) {
3051
3042
  super(t);
3052
3043
  y(this, "canRotate", !1);
3053
- y(this, "scaleType", U.all);
3044
+ y(this, "scaleType", z.all);
3054
3045
  y(this, "toolsType", k.Star);
3055
3046
  y(this, "tmpPoints", []);
3056
3047
  y(this, "workOptions");
@@ -3194,7 +3185,7 @@ class Ee extends b {
3194
3185
  u && (M.scale = u), f && (M.rotate = f), m && (M.translate = m);
3195
3186
  const D = new j(M);
3196
3187
  if (o) {
3197
- const z = new wt({
3188
+ const U = new wt({
3198
3189
  d: "M-4,0H4M0,-4V4",
3199
3190
  normalize: !0,
3200
3191
  pos: [0, 0],
@@ -3202,13 +3193,13 @@ class Ee extends b {
3202
3193
  lineWidth: 1,
3203
3194
  scale: [1 / L[0], 1 / L[1]]
3204
3195
  });
3205
- D.append(z);
3196
+ D.append(U);
3206
3197
  }
3207
3198
  const B = new ht({
3208
3199
  ...P,
3209
3200
  pos: [0, 0]
3210
3201
  });
3211
- D.append(B), I && (this.scaleType = U.proportional, this.drawEraserlines(
3202
+ D.append(B), I && (this.scaleType = z.proportional, this.drawEraserlines(
3212
3203
  {
3213
3204
  group: D,
3214
3205
  eraserlines: I,
@@ -3299,7 +3290,7 @@ class Be extends b {
3299
3290
  constructor(t) {
3300
3291
  super(t);
3301
3292
  y(this, "canRotate", !1);
3302
- y(this, "scaleType", U.all);
3293
+ y(this, "scaleType", z.all);
3303
3294
  y(this, "toolsType", k.Polygon);
3304
3295
  y(this, "tmpPoints", []);
3305
3296
  y(this, "workOptions");
@@ -3451,7 +3442,7 @@ class Be extends b {
3451
3442
  ...N,
3452
3443
  pos: [0, 0]
3453
3444
  });
3454
- P.append(M), m && (this.scaleType = U.proportional, this.drawEraserlines(
3445
+ P.append(M), m && (this.scaleType = z.proportional, this.drawEraserlines(
3455
3446
  {
3456
3447
  group: P,
3457
3448
  eraserlines: m,
@@ -3595,7 +3586,7 @@ class Fe extends b {
3595
3586
  constructor(t) {
3596
3587
  super(t);
3597
3588
  y(this, "canRotate", !1);
3598
- y(this, "scaleType", U.all);
3589
+ y(this, "scaleType", z.all);
3599
3590
  y(this, "toolsType", k.SpeechBalloon);
3600
3591
  y(this, "ratio", 0.8);
3601
3592
  y(this, "tmpPoints", []);
@@ -3739,7 +3730,7 @@ class Fe extends b {
3739
3730
  ...L,
3740
3731
  pos: [0, 0]
3741
3732
  });
3742
- N.append(R), f && (this.scaleType = U.proportional, this.drawEraserlines(
3733
+ N.append(R), f && (this.scaleType = z.proportional, this.drawEraserlines(
3743
3734
  {
3744
3735
  group: N,
3745
3736
  eraserlines: f,
@@ -4167,11 +4158,11 @@ function js(T) {
4167
4158
  }
4168
4159
  var Zs = js;
4169
4160
  const kt = /* @__PURE__ */ Jt(Zs);
4170
- class Ue extends b {
4161
+ class ze extends b {
4171
4162
  constructor(t) {
4172
4163
  super(t);
4173
4164
  y(this, "canRotate", !1);
4174
- y(this, "scaleType", U.both);
4165
+ y(this, "scaleType", z.both);
4175
4166
  y(this, "toolsType", k.Straight);
4176
4167
  y(this, "tmpPoints", []);
4177
4168
  y(this, "workOptions");
@@ -4306,7 +4297,7 @@ class Ue extends b {
4306
4297
  };
4307
4298
  c && (N.scale = c), l && (N.rotate = l), h && (N.translate = h);
4308
4299
  const R = new wt(N);
4309
- C.append(R), d && (this.scaleType = U.proportional, this.drawEraserlines(
4300
+ C.append(R), d && (this.scaleType = z.proportional, this.drawEraserlines(
4310
4301
  {
4311
4302
  group: C,
4312
4303
  eraserlines: d,
@@ -4445,7 +4436,7 @@ const ft = class ft extends b {
4445
4436
  constructor(t) {
4446
4437
  super(t);
4447
4438
  y(this, "canRotate", !1);
4448
- y(this, "scaleType", U.proportional);
4439
+ y(this, "scaleType", z.proportional);
4449
4440
  y(this, "toolsType", k.Text);
4450
4441
  y(this, "tmpPoints", []);
4451
4442
  y(this, "workOptions");
@@ -4579,7 +4570,7 @@ const ft = class ft extends b {
4579
4570
  } = t, N = ft.getSafetySnippetRatio(e) || 1, R = Math.floor(p * N), P = ft.getSafetySnippetFontLength(R);
4580
4571
  let M = 0;
4581
4572
  for (let B = 0; B < h; B++) {
4582
- const F = l[B], z = d || R * 1.5;
4573
+ const F = l[B], U = d || R * 1.5;
4583
4574
  if (F) {
4584
4575
  const V = is(F), Z = [0, 0], K = [0, p * 1.2];
4585
4576
  I === "middle" && (Z[1] = Math.floor(
@@ -4599,7 +4590,7 @@ const ft = class ft extends b {
4599
4590
  text: qt,
4600
4591
  fontFamily: g,
4601
4592
  fontSize: R,
4602
- lineHeight: z,
4593
+ lineHeight: U,
4603
4594
  strokeColor: S,
4604
4595
  fontWeight: u,
4605
4596
  fillColor: S,
@@ -4694,8 +4685,8 @@ const ft = class ft extends b {
4694
4685
  for (const D of v.opt.eraserlines) {
4695
4686
  const { op: B, thickness: F } = D;
4696
4687
  D.thickness = Math.round(F * Math.max(p[0], p[1]));
4697
- for (let z = 0; z < B.length; z++)
4698
- ee(B[z], h, p, c);
4688
+ for (let U = 0; U < B.length; U++)
4689
+ ee(B[U], h, p, c);
4699
4690
  }
4700
4691
  } else if (c && C.boxPoint && (C.boxPoint = [
4701
4692
  Math.round(C.boxPoint[0] + c[0]),
@@ -4744,7 +4735,7 @@ const It = class It extends b {
4744
4735
  constructor(t) {
4745
4736
  super(t);
4746
4737
  y(this, "canRotate", !1);
4747
- y(this, "scaleType", U.none);
4738
+ y(this, "scaleType", z.none);
4748
4739
  y(this, "toolsType", k.PencilEraser);
4749
4740
  y(this, "tmpPoints", []);
4750
4741
  y(this, "workOptions");
@@ -4933,7 +4924,7 @@ const Pt = class Pt extends b {
4933
4924
  constructor(t) {
4934
4925
  super(t);
4935
4926
  y(this, "canRotate", !1);
4936
- y(this, "scaleType", U.none);
4927
+ y(this, "scaleType", z.none);
4937
4928
  y(this, "toolsType", k.BitMapEraser);
4938
4929
  y(this, "tmpPoints", []);
4939
4930
  y(this, "workOptions");
@@ -5115,7 +5106,7 @@ class xt extends b {
5115
5106
  constructor(t) {
5116
5107
  super(t);
5117
5108
  y(this, "canRotate", !1);
5118
- y(this, "scaleType", U.all);
5109
+ y(this, "scaleType", z.all);
5119
5110
  y(this, "toolsType", k.BackgroundSVG);
5120
5111
  y(this, "tmpPoints", []);
5121
5112
  y(this, "workOptions");
@@ -5170,7 +5161,7 @@ class xt extends b {
5170
5161
  }
5171
5162
  static getScaleType(t) {
5172
5163
  const { uniformScale: e, rotate: s } = t;
5173
- return e !== !1 ? U.proportional : s && Math.abs(s) % 90 > 0 ? U.proportional : U.all;
5164
+ return e !== !1 ? z.proportional : s && Math.abs(s) % 90 > 0 ? z.proportional : z.all;
5174
5165
  }
5175
5166
  static updateNodeOpt(t) {
5176
5167
  const { node: e, opt: s, vNodes: o, targetNode: r } = t, {
@@ -5219,14 +5210,14 @@ class xt extends b {
5219
5210
  }
5220
5211
  }
5221
5212
  }
5222
- function ze(T) {
5213
+ function Ue(T) {
5223
5214
  switch (T) {
5224
5215
  case k.Arrow:
5225
5216
  return Me;
5226
5217
  case k.Pencil:
5227
5218
  return Ne;
5228
5219
  case k.Straight:
5229
- return Ue;
5220
+ return ze;
5230
5221
  case k.Ellipse:
5231
5222
  return Oe;
5232
5223
  case k.Polygon:
@@ -5244,7 +5235,7 @@ function ze(T) {
5244
5235
  case k.LaserPen:
5245
5236
  return xe;
5246
5237
  case k.Eraser:
5247
- return zt;
5238
+ return Ut;
5248
5239
  case k.PencilEraser:
5249
5240
  return Yt;
5250
5241
  case k.BitMapEraser:
@@ -5265,7 +5256,7 @@ function Lt(T, i) {
5265
5256
  case k.Pencil:
5266
5257
  return new Ne(e);
5267
5258
  case k.Straight:
5268
- return new Ue(e);
5259
+ return new ze(e);
5269
5260
  case k.Ellipse:
5270
5261
  return new Oe(e);
5271
5262
  case k.Polygon:
@@ -5283,7 +5274,7 @@ function Lt(T, i) {
5283
5274
  case k.LaserPen:
5284
5275
  return new xe(e);
5285
5276
  case k.Eraser:
5286
- return new zt(e, i);
5277
+ return new Ut(e, i);
5287
5278
  case k.BitMapEraser:
5288
5279
  return new $t(e);
5289
5280
  case k.PencilEraser:
@@ -5413,7 +5404,7 @@ class Xe {
5413
5404
  };
5414
5405
  }
5415
5406
  getNodeRectFormShape(i, t) {
5416
- const e = ze(t.toolsType);
5407
+ const e = Ue(t.toolsType);
5417
5408
  return this.fullLayer && (e == null ? void 0 : e.getRectFromLayer(this.fullLayer, i));
5418
5409
  }
5419
5410
  updateNodeRect(i) {
@@ -6761,7 +6752,7 @@ class Dt extends b {
6761
6752
  constructor(t) {
6762
6753
  super(t);
6763
6754
  y(this, "canRotate", !0);
6764
- y(this, "scaleType", U.all);
6755
+ y(this, "scaleType", z.all);
6765
6756
  y(this, "toolsType", k.Image);
6766
6757
  y(this, "tmpPoints", []);
6767
6758
  y(this, "workOptions");
@@ -6836,7 +6827,7 @@ class Dt extends b {
6836
6827
  }
6837
6828
  static getScaleType(t) {
6838
6829
  const { uniformScale: e, rotate: s } = t;
6839
- return e !== !1 ? U.proportional : s && Math.abs(s) % 90 > 0 ? U.proportional : U.all;
6830
+ return e !== !1 ? z.proportional : s && Math.abs(s) % 90 > 0 ? z.proportional : z.all;
6840
6831
  }
6841
6832
  static updateNodeOpt(t) {
6842
6833
  const { node: e, opt: s, vNodes: o, targetNode: r } = t, {
@@ -7687,7 +7678,7 @@ class no {
7687
7678
  dataType: x.Local
7688
7679
  },
7689
7680
  t
7690
- ), this.drawWorkActiveId = void 0), !this.drawWorkActiveId && a !== X && (this.drawWorkActiveId = a), Ut(r) && (this.consumeCount = r), l) {
7681
+ ), this.drawWorkActiveId = void 0), !this.drawWorkActiveId && a !== X && (this.drawWorkActiveId = a), zt(r) && (this.consumeCount = r), l) {
7691
7682
  case k.Selector: {
7692
7683
  const h = c.consume({
7693
7684
  data: i,
@@ -8041,8 +8032,8 @@ class ao {
8041
8032
  op: P.animationWorkData,
8042
8033
  isFullWork: M
8043
8034
  }), M && (this.selectorWorkShapes.forEach((B, F) => {
8044
- var z;
8045
- (z = B.selectIds) != null && z.includes(R) && (this.willRunEffectSelectorIds.add(F), this.runEffect());
8035
+ var U;
8036
+ (U = B.selectIds) != null && U.includes(R) && (this.willRunEffectSelectorIds.add(F), this.runEffect());
8046
8037
  }), (c = P.node) == null || c.clearTmpPoints(), this.workShapes.delete(R)), P.isEnableCursor ? t.set(R, {
8047
8038
  workState: D ? P.ops ? A.Done : A.Doing : A.Start,
8048
8039
  op: P.animationWorkData.slice(-3, -1)
@@ -8067,7 +8058,7 @@ class ao {
8067
8058
  ), B = P.isDiff ? 0 : Math.max(0, (P.animationIndex || 0) - M), F = (P.animationWorkData || []).slice(
8068
8059
  B,
8069
8060
  D
8070
- ), z = (v = (S = P.node) == null ? void 0 : S.getWorkId()) == null ? void 0 : v.toString();
8061
+ ), U = (v = (S = P.node) == null ? void 0 : S.getWorkId()) == null ? void 0 : v.toString();
8071
8062
  if ((P.animationIndex || 0) < D || P.isDiff) {
8072
8063
  if ((L = P.node) == null || L.consumeService({
8073
8064
  op: F,
@@ -8082,7 +8073,7 @@ class ao {
8082
8073
  } else P.ops && ((N = P.node) == null || N.consumeService({
8083
8074
  op: P.animationWorkData || [],
8084
8075
  isFullWork: !0,
8085
- replaceId: z
8076
+ replaceId: U
8086
8077
  }), P.isDel = !0, P.isEnableCursor && t.set(R, {
8087
8078
  workState: A.Done,
8088
8079
  op: F.slice(-3, -1)
@@ -9015,7 +9006,7 @@ class So {
9015
9006
  } = i, p = r == null ? void 0 : r.toString();
9016
9007
  switch (t) {
9017
9008
  case w.UpdateDpr:
9018
- Ut(i.dpr) && this.updateDpr(i.dpr);
9009
+ zt(i.dpr) && this.updateDpr(i.dpr);
9019
9010
  break;
9020
9011
  case w.AuthClear: {
9021
9012
  const { clearUids: d, localUid: u } = i;
@@ -9210,7 +9201,7 @@ class So {
9210
9201
  }
9211
9202
  n || i.push(r);
9212
9203
  }
9213
- Ut(o.fullWorkerDrawCount) && (t = o.fullWorkerDrawCount), Ut(o.consumeCount) && (e = o.consumeCount);
9204
+ zt(o.fullWorkerDrawCount) && (t = o.fullWorkerDrawCount), zt(o.consumeCount) && (e = o.consumeCount);
9214
9205
  }
9215
9206
  return this.combinePostMsg.clear(), {
9216
9207
  sp: i,