@netless/appliance-plugin 1.1.27 → 1.1.28

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.
@@ -11,7 +11,7 @@ import { debounce as Lt, cloneDeep as ae, isEqual as ce, isSet as We, isNumber a
11
11
  import wi from "eventemitter2";
12
12
  import w, { useContext as Se, useState as se, useMemo as G, useEffect as Me, useRef as xe, useCallback as yt } from "react";
13
13
  import bi, { createPortal as Yo } from "react-dom";
14
- import Ct from "react-draggable";
14
+ import vt from "react-draggable";
15
15
  import { Resizable as Ro } from "re-resizable";
16
16
  const MI = "/fullWorker.js", fI = "/subWorker.js";
17
17
  var ie = /* @__PURE__ */ ((o) => (o.selector = "selector", o.clicker = "clicker", o.laserPointer = "laserPointer", o.pencil = "pencil", o.rectangle = "rectangle", o.ellipse = "ellipse", o.shape = "shape", o.eraser = "eraser", o.pencilEraser = "pencilEraser", o.text = "text", o.straight = "straight", o.arrow = "arrow", o.hand = "hand", o.laserPen = "laserPen", o))(ie || {}), me = /* @__PURE__ */ ((o) => (o.Normal = "Normal", o.Stroke = "Stroke", o.Dotted = "Dotted", o.LongDotted = "LongDotted", o))(me || {}), _e = /* @__PURE__ */ ((o) => (o.Triangle = "triangle", o.Rhombus = "rhombus", o.Pentagram = "pentagram", o.SpeechBalloon = "speechBalloon", o.Star = "star", o.Polygon = "polygon", o))(_e || {}), U = /* @__PURE__ */ ((o) => (o.None = "None", o.ShowFloatBar = "ShowFloatBar", o.ZIndexFloatBar = "ZIndexFloatBar", o.DeleteNode = "DeleteNode", o.CopyNode = "CopyNode", o.ZIndexActive = "ZIndexActive", o.ZIndexNode = "ZIndexNode", o.RotateNode = "RotateNode", o.SetColorNode = "SetColorNode", o.TranslateNode = "TranslateNode", o.ScaleNode = "ScaleNode", o.OriginalEvent = "OriginalEvent", o.CreateScene = "CreateScene", o.ActiveCursor = "ActiveCursor", o.MoveCursor = "MoveCursor", o.CommandEditor = "CommandEditor", o.SetEditorData = "SetEditorData", o.SetFontStyle = "SetFontStyle", o.SetPoint = "SetPoint", o.SetLock = "SetLock", o.SetShapeOpt = "SetShapeOpt", o.CameraChange = "CameraChange", o.ActiveMethod = "ActiveMethod", o.HidFloatBarBtn = "HidFloatBarBtn", o))(U || {}), ee = /* @__PURE__ */ ((o) => (o.DisplayState = "DisplayState", o.MainEngine = "MainEngine", o.Cursor = "Cursor", o.BindMainView = "BindMainView", o))(ee || {}), Uo = /* @__PURE__ */ ((o) => (o[o.MainView = 0] = "MainView", o[o.Plugin = 1] = "Plugin", o[o.Both = 2] = "Both", o))(Uo || {}), Hn = /* @__PURE__ */ ((o) => (o.longPencil = "longPencil", o))(Hn || {}), T = /* @__PURE__ */ ((o) => (o[o.Pencil = 1] = "Pencil", o[o.Eraser = 2] = "Eraser", o[o.PencilEraser = 3] = "PencilEraser", o[o.BitMapEraser = 4] = "BitMapEraser", o[o.Selector = 5] = "Selector", o[o.Clicker = 6] = "Clicker", o[o.Arrow = 7] = "Arrow", o[o.Hand = 8] = "Hand", o[o.LaserPen = 9] = "LaserPen", o[o.Text = 10] = "Text", o[o.Straight = 11] = "Straight", o[o.Rectangle = 12] = "Rectangle", o[o.Ellipse = 13] = "Ellipse", o[o.Star = 14] = "Star", o[o.Triangle = 15] = "Triangle", o[o.Rhombus = 16] = "Rhombus", o[o.Polygon = 17] = "Polygon", o[o.SpeechBalloon = 18] = "SpeechBalloon", o[o.Image = 19] = "Image", o))(T || {}), q = /* @__PURE__ */ ((o) => (o[o.Local = 1] = "Local", o[o.Service = 2] = "Service", o[o.Worker = 3] = "Worker", o))(q || {}), x = /* @__PURE__ */ ((o) => (o[o.Pending = 0] = "Pending", o[o.Start = 1] = "Start", o[o.Doing = 2] = "Doing", o[o.Done = 3] = "Done", o[o.Unwritable = 4] = "Unwritable", o))(x || {}), R = /* @__PURE__ */ ((o) => (o[o.None = 0] = "None", o[o.Init = 1] = "Init", o[o.UpdateCamera = 2] = "UpdateCamera", o[o.UpdateTools = 3] = "UpdateTools", o[o.CreateWork = 4] = "CreateWork", o[o.DrawWork = 5] = "DrawWork", o[o.FullWork = 6] = "FullWork", o[o.UpdateNode = 7] = "UpdateNode", o[o.RemoveNode = 8] = "RemoveNode", o[o.Clear = 9] = "Clear", o[o.Select = 10] = "Select", o[o.Destroy = 11] = "Destroy", o[o.Snapshot = 12] = "Snapshot", o[o.BoundingBox = 13] = "BoundingBox", o[o.Cursor = 14] = "Cursor", o[o.TextUpdate = 15] = "TextUpdate", o[o.GetTextActive = 16] = "GetTextActive", o[o.TasksQueue = 17] = "TasksQueue", o[o.CursorHover = 18] = "CursorHover", o[o.CursorBlur = 19] = "CursorBlur", o[o.Console = 20] = "Console", o[o.GetImageBitMap = 23] = "GetImageBitMap", o[o.AuthWriter = 24] = "AuthWriter", o[o.AuthReader = 25] = "AuthReader", o[o.AuthClear = 26] = "AuthClear", o[o.AuthPage = 27] = "AuthPage", o[o.GetVNodeInfo = 28] = "GetVNodeInfo", o[o.UpdateDpr = 29] = "UpdateDpr", o[o.SetFontFace = 30] = "SetFontFace", o[o.ReportError = 31] = "ReportError", o[o.ReportLog = 32] = "ReportLog", o))(R || {}), nt = /* @__PURE__ */ ((o) => (o[o.None = 0] = "None", o[o.Bg = 1] = "Bg", o[o.ServiceFloat = 2] = "ServiceFloat", o[o.Float = 3] = "Float", o[o.TopFloat = 4] = "TopFloat", o))(nt || {}), Qt = /* @__PURE__ */ ((o) => (o[o.Cursor = 1] = "Cursor", o[o.TextCreate = 2] = "TextCreate", o))(Qt || {}), Gt = /* @__PURE__ */ ((o) => (o[o.Top = 1] = "Top", o[o.Bottom = 2] = "Bottom", o))(Gt || {}), Fe = /* @__PURE__ */ ((o) => (o[o.none = 1] = "none", o[o.all = 2] = "all", o[o.both = 3] = "both", o[o.proportional = 4] = "proportional", o))(Fe || {}), Wo = /* @__PURE__ */ ((o) => (o[o.Pending = 0] = "Pending", o[o.Start = 1] = "Start", o[o.Doing = 2] = "Doing", o[o.Done = 3] = "Done", o[o.Unwritable = 4] = "Unwritable", o))(Wo || {}), Vt = /* @__PURE__ */ ((o) => (o[o.inside = 0] = "inside", o[o.outside = 1] = "outside", o[o.intersect = 2] = "intersect", o))(Vt || {}), ke = /* @__PURE__ */ ((o) => (o.renderPage = "renderPage", o.addPage = "addPage", o.deletePage = "deletePage", o.addElement = "addElement", o.deleteElement = "deleteElement", o.clearPage = "clearPage", o.clearViewScenePath = "clearViewScenePath", o.clearView = "clearView", o.syncUndoStack = "syncUndoStack", o.syncRedoStack = "syncRedoStack", o))(ke || {}), tt = /* @__PURE__ */ ((o) => (o.setAuth = "setAuth", o.setShow = "addShow", o.setHide = "setHide", o.setClear = "setClear", o))(tt || {}), Zt = /* @__PURE__ */ ((o) => (o.Image = "image", o.Iconify = "iconify", o))(Zt || {});
@@ -572,19 +572,19 @@ function jr(o, i) {
572
572
  return t < 0 ? (++this.size, e.push([o, i])) : e[t][1] = i, this;
573
573
  }
574
574
  var xr = jr, Dr = ur, zr = Ir, Ar = Nr, kr = Cr, br = xr;
575
- function St(o) {
575
+ function Ct(o) {
576
576
  var i = -1, e = o == null ? 0 : o.length;
577
577
  for (this.clear(); ++i < e; ) {
578
578
  var t = o[i];
579
579
  this.set(t[0], t[1]);
580
580
  }
581
581
  }
582
- St.prototype.clear = Dr;
583
- St.prototype.delete = zr;
584
- St.prototype.get = Ar;
585
- St.prototype.has = kr;
586
- St.prototype.set = br;
587
- var ii = St, Er = ii;
582
+ Ct.prototype.clear = Dr;
583
+ Ct.prototype.delete = zr;
584
+ Ct.prototype.get = Ar;
585
+ Ct.prototype.has = kr;
586
+ Ct.prototype.set = br;
587
+ var ii = Ct, Er = ii;
588
588
  function Lr() {
589
589
  this.__data__ = new Er(), this.size = 0;
590
590
  }
@@ -681,19 +681,19 @@ function Vs(o, i) {
681
681
  return this.size += this.has(o) ? 0 : 1, e[o] = Fs && i === void 0 ? Qs : i, this;
682
682
  }
683
683
  var Zs = Vs, $s = Ds, Hs = As, Gs = Os, Js = Bs, Xs = Zs;
684
- function jt(o) {
684
+ function St(o) {
685
685
  var i = -1, e = o == null ? 0 : o.length;
686
686
  for (this.clear(); ++i < e; ) {
687
687
  var t = o[i];
688
688
  this.set(t[0], t[1]);
689
689
  }
690
690
  }
691
- jt.prototype.clear = $s;
692
- jt.prototype.delete = Hs;
693
- jt.prototype.get = Gs;
694
- jt.prototype.has = Js;
695
- jt.prototype.set = Xs;
696
- var Ks = jt, sn = Ks, qs = ii, _s = Pi;
691
+ St.prototype.clear = $s;
692
+ St.prototype.delete = Hs;
693
+ St.prototype.get = Gs;
694
+ St.prototype.has = Js;
695
+ St.prototype.set = Xs;
696
+ var Ks = St, sn = Ks, qs = ii, _s = Pi;
697
697
  function ea() {
698
698
  this.size = 0, this.__data__ = {
699
699
  hash: new sn(),
@@ -730,19 +730,19 @@ function pa(o, i) {
730
730
  return e.set(o, i), this.size += e.size == t ? 0 : 1, this;
731
731
  }
732
732
  var ya = pa, Ia = ta, wa = ca, ma = ha, Na = Ma, Ta = ya;
733
- function xt(o) {
733
+ function jt(o) {
734
734
  var i = -1, e = o == null ? 0 : o.length;
735
735
  for (this.clear(); ++i < e; ) {
736
736
  var t = o[i];
737
737
  this.set(t[0], t[1]);
738
738
  }
739
739
  }
740
- xt.prototype.clear = Ia;
741
- xt.prototype.delete = wa;
742
- xt.prototype.get = ma;
743
- xt.prototype.has = Na;
744
- xt.prototype.set = Ta;
745
- var _n = xt, va = ii, Ca = Pi, Sa = _n, ja = 200;
740
+ jt.prototype.clear = Ia;
741
+ jt.prototype.delete = wa;
742
+ jt.prototype.get = ma;
743
+ jt.prototype.has = Na;
744
+ jt.prototype.set = Ta;
745
+ var _n = jt, va = ii, Ca = Pi, Sa = _n, ja = 200;
746
746
  function xa(o, i) {
747
747
  var e = this.__data__;
748
748
  if (e instanceof va) {
@@ -754,16 +754,16 @@ function xa(o, i) {
754
754
  return e.set(o, i), this.size = e.size, this;
755
755
  }
756
756
  var Da = xa, za = ii, Aa = Pr, ka = Yr, ba = Ur, Ea = Br, La = Da;
757
- function Dt(o) {
757
+ function xt(o) {
758
758
  var i = this.__data__ = new za(o);
759
759
  this.size = i.size;
760
760
  }
761
- Dt.prototype.clear = Aa;
762
- Dt.prototype.delete = ka;
763
- Dt.prototype.get = ba;
764
- Dt.prototype.has = Ea;
765
- Dt.prototype.set = La;
766
- var Pa = Dt;
761
+ xt.prototype.clear = Aa;
762
+ xt.prototype.delete = ka;
763
+ xt.prototype.get = ba;
764
+ xt.prototype.has = Ea;
765
+ xt.prototype.set = La;
766
+ var Pa = xt;
767
767
  function Oa(o, i) {
768
768
  for (var e = -1, t = o == null ? 0 : o.length; ++e < t && i(o[e], e, o) !== !1; )
769
769
  ;
@@ -990,9 +990,9 @@ var Cu = vu, Su = Mo, ju = go, xu = Wi;
990
990
  function Du(o) {
991
991
  return Su(o, xu, ju);
992
992
  }
993
- var zu = Du, Au = wt, ku = Ge, bu = Au(ku, "DataView"), Eu = bu, Lu = wt, Pu = Ge, Ou = Lu(Pu, "Promise"), Yu = Ou, Ru = wt, Uu = Ge, Wu = Ru(Uu, "Set"), fo = Wu, Bu = wt, Fu = Ge, Qu = Bu(Fu, "WeakMap"), Vu = Qu, mi = Eu, Ni = Pi, Ti = Yu, vi = fo, Ci = Vu, po = Ot, zt = qn, dn = "[object Map]", Zu = "[object Object]", gn = "[object Promise]", Mn = "[object Set]", fn = "[object WeakMap]", pn = "[object DataView]", $u = zt(mi), Hu = zt(Ni), Gu = zt(Ti), Ju = zt(vi), Xu = zt(Ci), Mt = po;
993
+ var zu = Du, Au = wt, ku = Ge, bu = Au(ku, "DataView"), Eu = bu, Lu = wt, Pu = Ge, Ou = Lu(Pu, "Promise"), Yu = Ou, Ru = wt, Uu = Ge, Wu = Ru(Uu, "Set"), fo = Wu, Bu = wt, Fu = Ge, Qu = Bu(Fu, "WeakMap"), Vu = Qu, mi = Eu, Ni = Pi, Ti = Yu, vi = fo, Ci = Vu, po = Ot, Dt = qn, dn = "[object Map]", Zu = "[object Object]", gn = "[object Promise]", Mn = "[object Set]", fn = "[object WeakMap]", pn = "[object DataView]", $u = Dt(mi), Hu = Dt(Ni), Gu = Dt(Ti), Ju = Dt(vi), Xu = Dt(Ci), Mt = po;
994
994
  (mi && Mt(new mi(new ArrayBuffer(1))) != pn || Ni && Mt(new Ni()) != dn || Ti && Mt(Ti.resolve()) != gn || vi && Mt(new vi()) != Mn || Ci && Mt(new Ci()) != fn) && (Mt = function(o) {
995
- var i = po(o), e = i == Zu ? o.constructor : void 0, t = e ? zt(e) : "";
995
+ var i = po(o), e = i == Zu ? o.constructor : void 0, t = e ? Dt(e) : "";
996
996
  if (t)
997
997
  switch (t) {
998
998
  case $u:
@@ -1142,7 +1142,7 @@ function ug(o) {
1142
1142
  return ag(o, cg | lg);
1143
1143
  }
1144
1144
  var hg = ug;
1145
- const ci = /* @__PURE__ */ Ei(hg), To = "1.1.27", dg = "@netless/appliance-plugin", jn = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1145
+ const ci = /* @__PURE__ */ Ei(hg), To = "1.1.28", dg = "@netless/appliance-plugin", jn = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1146
1146
  if (typeof window < "u") {
1147
1147
  let o = window.__netlessUA || "";
1148
1148
  o += ` ${dg}@${To}`, window.__netlessUA = o;
@@ -2144,7 +2144,7 @@ const st = async (o, i, e = !1) => {
2144
2144
  }).catch(function() {
2145
2145
  o();
2146
2146
  });
2147
- }, vt = (o) => Math.max(1, (window.devicePixelRatio || 1) / 1), OI = (o, i) => o.x + o.w < i.x || o.x > i.x + i.w || o.y + o.h < i.y || o.y > i.y + i.h ? Vt.outside : o.x >= i.x && o.y >= i.y && o.x + o.w <= i.x + i.w && o.y + o.h <= i.y + i.h ? Vt.inside : Vt.intersect;
2147
+ }, Tt = (o) => Math.max(1, (window.devicePixelRatio || 1) / 1), OI = (o, i) => o.x + o.w < i.x || o.x > i.x + i.w || o.y + o.h < i.y || o.y > i.y + i.h ? Vt.outside : o.x >= i.x && o.y >= i.y && o.x + o.w <= i.x + i.w && o.y + o.h <= i.y + i.h ? Vt.inside : Vt.intersect;
2148
2148
  function YI(o) {
2149
2149
  let i = 0;
2150
2150
  for (let e = 0; e < o.length; e++) {
@@ -4901,7 +4901,7 @@ class qf extends Kf {
4901
4901
  "set font faces in main thread success"
4902
4902
  );
4903
4903
  });
4904
- const { MainThreadManagerImpl: e } = await import("./index-Dble46rY.mjs");
4904
+ const { MainThreadManagerImpl: e } = await import("./index-dNUi36ql.mjs");
4905
4905
  this.mainThread = new e(this);
4906
4906
  }
4907
4907
  async on() {
@@ -9101,7 +9101,7 @@ const rp = "index-module__Container__nLsM3", sp = "index-module__CanvasBox__j2Xe
9101
9101
  "speechBallon-active": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTgzMiA4MzJINDQ4bC0xMjggMTkyLTEyOC0xOTJjLTEwNi4wNDggMC0xOTItODYuMDE2LTE5Mi0xOTJWMTkyYTE5MiAxOTIgMCAwIDEgMTkyLTE5Mmg2NDBjMTA1Ljk4NCAwIDE5MiA4NS45NTIgMTkyIDE5MnY0NDhjMCAxMDUuOTg0LTg2LjAxNiAxOTItMTkyIDE5MnogbTY0LTY0MGE2NCA2NCAwIDAgMC02NC02NEgxOTJDMTU2LjY3MiAxMjggMTI4IDE1Ni42NzIgMTI4IDE5MnY0NDhhNjQgNjQgMCAwIDAgNjQgNjRoNDIuNjg4TDMyMCA4MzJsODUuMzEyLTEyOEg4MzJjMzUuMzkyIDAgNjQtMjguNjA4IDY0LTY0VjE5MnoiIGZpbGw9IiMzMzgxRkYiPjwvcGF0aD48L3N2Zz4=",
9102
9102
  "speechBallon-placement": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB4bWxucz0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NDUuMjI2NjY2eiIgIGZpbGw9IiM0NDRFNjAiPjwvcGF0aD48L3N2Zz4="
9103
9103
  };
9104
- function Le(o) {
9104
+ function Ee(o) {
9105
9105
  return Ip[o];
9106
9106
  }
9107
9107
  const wp = (o) => {
@@ -9122,7 +9122,7 @@ const wp = (o) => {
9122
9122
  );
9123
9123
  }
9124
9124
  },
9125
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le("delete") })
9125
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee("delete") })
9126
9126
  );
9127
9127
  }, mp = (o) => {
9128
9128
  const { workIds: i, viewId: e } = o;
@@ -9138,11 +9138,11 @@ const wp = (o) => {
9138
9138
  );
9139
9139
  }
9140
9140
  },
9141
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le("duplicate") })
9141
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee("duplicate") })
9142
9142
  );
9143
9143
  }, On = (o) => {
9144
9144
  const { icon: i, onPointerUpHandler: e } = o;
9145
- return /* @__PURE__ */ w.createElement("div", { className: "button normal-button", onPointerUp: e }, /* @__PURE__ */ w.createElement("img", { src: Le(i) }));
9145
+ return /* @__PURE__ */ w.createElement("div", { className: "button normal-button", onPointerUp: e }, /* @__PURE__ */ w.createElement("img", { src: Ee(i) }));
9146
9146
  }, Np = (o) => {
9147
9147
  const { open: i, setOpen: e, floatBarRef: t } = o, { floatBarData: n, mananger: r } = Se(Te), [s, a] = se([]), c = G(() => {
9148
9148
  if (t != null && t.current && te(n == null ? void 0 : n.y) && (r != null && r.height)) {
@@ -9198,7 +9198,7 @@ const wp = (o) => {
9198
9198
  onPointerUp: h
9199
9199
  },
9200
9200
  l,
9201
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le(i ? "layer-pressed" : "layer") })
9201
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee(i ? "layer-pressed" : "layer") })
9202
9202
  );
9203
9203
  }, Rt = (o) => {
9204
9204
  o.stopPropagation(), o.nativeEvent.stopImmediatePropagation();
@@ -9282,7 +9282,7 @@ const wp = (o) => {
9282
9282
  }
9283
9283
  ),
9284
9284
  /* @__PURE__ */ w.createElement("div", { className: "range-opacity" }, /* @__PURE__ */ w.createElement(
9285
- Ct,
9285
+ vt,
9286
9286
  {
9287
9287
  bounds: "parent",
9288
9288
  axis: "x",
@@ -9345,7 +9345,7 @@ const wp = (o) => {
9345
9345
  }
9346
9346
  ),
9347
9347
  /* @__PURE__ */ w.createElement("div", { className: "range-opacity" }, /* @__PURE__ */ w.createElement(
9348
- Ct,
9348
+ vt,
9349
9349
  {
9350
9350
  bounds: "parent",
9351
9351
  axis: "x",
@@ -9804,7 +9804,7 @@ const wp = (o) => {
9804
9804
  M.stopPropagation(), M.nativeEvent.stopImmediatePropagation(), e(!i);
9805
9805
  }
9806
9806
  },
9807
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le("font-colors") }),
9807
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee("font-colors") }),
9808
9808
  f,
9809
9809
  m
9810
9810
  );
@@ -9951,7 +9951,7 @@ const wp = (o) => {
9951
9951
  { workIds: t, viewId: n, bold: a }
9952
9952
  );
9953
9953
  };
9954
- return /* @__PURE__ */ w.createElement("div", { className: "font-style-button", onPointerUp: r }, /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le(i === "bold" ? "bold-active" : "bold") }));
9954
+ return /* @__PURE__ */ w.createElement("div", { className: "font-style-button", onPointerUp: r }, /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee(i === "bold" ? "bold-active" : "bold") }));
9955
9955
  }, Ap = (o) => {
9956
9956
  const { underline: i, setUnderline: e, workIds: t, viewId: n } = o, r = (s) => {
9957
9957
  const a = !i;
@@ -9965,7 +9965,7 @@ const wp = (o) => {
9965
9965
  "img",
9966
9966
  {
9967
9967
  alt: "icon",
9968
- src: Le(i ? "underline-active" : "underline")
9968
+ src: Ee(i ? "underline-active" : "underline")
9969
9969
  }
9970
9970
  ));
9971
9971
  }, kp = (o) => {
@@ -9981,7 +9981,7 @@ const wp = (o) => {
9981
9981
  "img",
9982
9982
  {
9983
9983
  alt: "icon",
9984
- src: Le(i ? "line-through-active" : "line-through")
9984
+ src: Ee(i ? "line-through-active" : "line-through")
9985
9985
  }
9986
9986
  ));
9987
9987
  }, bp = (o) => {
@@ -9997,7 +9997,7 @@ const wp = (o) => {
9997
9997
  "img",
9998
9998
  {
9999
9999
  alt: "icon",
10000
- src: Le(i === "italic" ? "italic-active" : "italic")
10000
+ src: Ee(i === "italic" ? "italic-active" : "italic")
10001
10001
  }
10002
10002
  ));
10003
10003
  }, Ep = (o) => {
@@ -10089,7 +10089,7 @@ const wp = (o) => {
10089
10089
  "img",
10090
10090
  {
10091
10091
  alt: "icon",
10092
- src: Le(i ? "font-style-active" : "font-style")
10092
+ src: Ee(i ? "font-style-active" : "font-style")
10093
10093
  }
10094
10094
  ),
10095
10095
  M
@@ -10105,7 +10105,7 @@ const wp = (o) => {
10105
10105
  80,
10106
10106
  144,
10107
10107
  288
10108
- ]), Nt = [
10108
+ ]), mt = [
10109
10109
  "top",
10110
10110
  "topLeft",
10111
10111
  "topRight",
@@ -10275,7 +10275,7 @@ const wp = (o) => {
10275
10275
  );
10276
10276
  }
10277
10277
  },
10278
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le(t ? "unlock-new" : "lock-new") })
10278
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee(t ? "unlock-new" : "lock-new") })
10279
10279
  );
10280
10280
  }, Ai = (o) => {
10281
10281
  const { icon: i, min: e, max: t, step: n, value: r, onInputHandler: s } = o, [a, c] = se(0), l = xe(null), h = (u) => {
@@ -10283,7 +10283,7 @@ const wp = (o) => {
10283
10283
  };
10284
10284
  return Me(() => {
10285
10285
  r && (c(r), l.current && (l.current.value = r.toString()));
10286
- }, [r]), /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Le(i) }), /* @__PURE__ */ w.createElement(
10286
+ }, [r]), /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Ee(i) }), /* @__PURE__ */ w.createElement(
10287
10287
  "input",
10288
10288
  {
10289
10289
  className: "input-number",
@@ -10329,7 +10329,7 @@ const wp = (o) => {
10329
10329
  )));
10330
10330
  }, Rp = (o) => {
10331
10331
  const { icon: i, min: e, max: t, step: n, value: r, onInputHandler: s } = o;
10332
- return /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Le(i) }), /* @__PURE__ */ w.createElement(
10332
+ return /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Ee(i) }), /* @__PURE__ */ w.createElement(
10333
10333
  Up,
10334
10334
  {
10335
10335
  min: e,
@@ -10370,7 +10370,7 @@ const wp = (o) => {
10370
10370
  },
10371
10371
  /* @__PURE__ */ w.createElement("div", { className: "range-number-color" }),
10372
10372
  /* @__PURE__ */ w.createElement("div", { className: "range-number" }, /* @__PURE__ */ w.createElement(
10373
- Ct,
10373
+ vt,
10374
10374
  {
10375
10375
  bounds: "parent",
10376
10376
  axis: "x",
@@ -10385,7 +10385,7 @@ const wp = (o) => {
10385
10385
  }, Wp = (o) => {
10386
10386
  const { icon: i, value: e, onChangeHandler: t, style: n } = o, [r, s] = se(0), [a, c] = se(), l = xe(null), h = yt(
10387
10387
  (p) => {
10388
- p >= Nt.length && (p = 0), p < 0 && (p = Nt.length - 1), s(p), t(Nt[p]), c(!1), l.current && (l.current.value = Nt[p]);
10388
+ p >= mt.length && (p = 0), p < 0 && (p = mt.length - 1), s(p), t(mt[p]), c(!1), l.current && (l.current.value = mt[p]);
10389
10389
  },
10390
10390
  [t]
10391
10391
  ), u = G(() => {
@@ -10395,17 +10395,17 @@ const wp = (o) => {
10395
10395
  }
10396
10396
  }, [n]);
10397
10397
  Me(() => {
10398
- e && (s(Nt.indexOf(e)), l.current && (l.current.value = e));
10398
+ e && (s(mt.indexOf(e)), l.current && (l.current.value = e));
10399
10399
  }, [e]);
10400
10400
  const g = G(() => a ? /* @__PURE__ */ w.createElement(
10401
10401
  Bp,
10402
10402
  {
10403
- options: Nt,
10403
+ options: mt,
10404
10404
  onClickHandler: h,
10405
10405
  style: u
10406
10406
  }
10407
10407
  ) : null, [a, h, u]);
10408
- return /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Le(i) }), /* @__PURE__ */ w.createElement(
10408
+ return /* @__PURE__ */ w.createElement("div", { className: "button input-button" }, /* @__PURE__ */ w.createElement("img", { src: Ee(i) }), /* @__PURE__ */ w.createElement(
10409
10409
  "input",
10410
10410
  {
10411
10411
  readOnly: !0,
@@ -10565,7 +10565,7 @@ const wp = (o) => {
10565
10565
  className: `button tab-button ${e ? "active" : ""}`,
10566
10566
  onPointerUp: t
10567
10567
  },
10568
- /* @__PURE__ */ w.createElement("img", { src: Le(i) })
10568
+ /* @__PURE__ */ w.createElement("img", { src: Ee(i) })
10569
10569
  );
10570
10570
  }, Zp = (o) => {
10571
10571
  const { toolsTypes: i, style: e, mananger: t, shapeOpt: n, setShapeOpt: r } = o, [s, a] = se();
@@ -10684,7 +10684,7 @@ const wp = (o) => {
10684
10684
  onPointerUp: p
10685
10685
  },
10686
10686
  g,
10687
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le(i ? "shapes-active" : "shapes") })
10687
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee(i ? "shapes-active" : "shapes") })
10688
10688
  );
10689
10689
  }, bo = w.memo(
10690
10690
  (o) => {
@@ -11021,8 +11021,8 @@ const wp = (o) => {
11021
11021
  if (ye.childNodes.length > 0) {
11022
11022
  const De = ye.lastChild;
11023
11023
  if (De) {
11024
- const Pe = De.lastChild;
11025
- Pe && Pe.nodeType === Node.TEXT_NODE ? Ie.setStart(Pe, ((de = Pe.textContent) == null ? void 0 : de.length) || 0) : Ie.setStart(De, 0);
11024
+ const Le = De.lastChild;
11025
+ Le && Le.nodeType === Node.TEXT_NODE ? Ie.setStart(Le, ((de = Le.textContent) == null ? void 0 : de.length) || 0) : Ie.setStart(De, 0);
11026
11026
  } else
11027
11027
  Ie.setStart(ye, 0);
11028
11028
  } else
@@ -11061,7 +11061,7 @@ const wp = (o) => {
11061
11061
  };
11062
11062
  }, [p, d, y, m, S, F]), J = G(() => {
11063
11063
  let B = "";
11064
- const H = `<div style="background-color:${g.fontBgColor};"></div>`;
11064
+ const H = "<div></div>";
11065
11065
  if (g.text) {
11066
11066
  const K = Zi(g.text);
11067
11067
  for (let he = 0; he < K.length; he++) {
@@ -11077,7 +11077,7 @@ const wp = (o) => {
11077
11077
  "&": "&amp;"
11078
11078
  })[Ie]
11079
11079
  );
11080
- B = B + `<div style="background-color:${g.fontBgColor}">${ye}</div>`;
11080
+ B = B + `<div>${ye}</div>`;
11081
11081
  }
11082
11082
  }
11083
11083
  } else
@@ -11151,47 +11151,47 @@ const wp = (o) => {
11151
11151
  if (!(de instanceof Text))
11152
11152
  return !1;
11153
11153
  const De = de.length || 0;
11154
- let Pe = 0, ve = 0, Re = De;
11154
+ let Le = 0, ve = 0, Re = De;
11155
11155
  for (; ve < Re; ) {
11156
- const Ee = Math.floor((ve + Re) / 2), ct = document.createRange();
11157
- ct.setStart(de, 0), ct.setEnd(de, Ee);
11158
- const mt = ct.getBoundingClientRect(), Ki = ge.right - mt.right;
11156
+ const Pe = Math.floor((ve + Re) / 2), ct = document.createRange();
11157
+ ct.setStart(de, 0), ct.setEnd(de, Pe);
11158
+ const zt = ct.getBoundingClientRect(), Ki = ge.right - zt.right;
11159
11159
  if (Ki < B) {
11160
- if (Ee > 0) {
11160
+ if (Pe > 0) {
11161
11161
  const gt = document.createRange();
11162
- gt.setStart(de, 0), gt.setEnd(de, Ee - 1);
11162
+ gt.setStart(de, 0), gt.setEnd(de, Pe - 1);
11163
11163
  const At = gt.getBoundingClientRect();
11164
11164
  if (ge.right - At.right >= B) {
11165
- Pe = Ee - 1;
11165
+ Le = Pe - 1;
11166
11166
  break;
11167
11167
  }
11168
11168
  }
11169
- Re = Ee;
11169
+ Re = Pe;
11170
11170
  } else {
11171
- const gt = Ee + 1;
11171
+ const gt = Pe + 1;
11172
11172
  if (gt < De) {
11173
11173
  const At = document.createRange();
11174
11174
  At.setStart(de, 0), At.setEnd(de, gt);
11175
11175
  const qi = At.getBoundingClientRect();
11176
11176
  if (ge.right - qi.right <= B && Ki > B) {
11177
- Pe = Ee;
11177
+ Le = Pe;
11178
11178
  break;
11179
11179
  }
11180
11180
  }
11181
11181
  ve = gt;
11182
11182
  }
11183
11183
  }
11184
- if (!Pe) {
11185
- const Ee = document.createRange();
11186
- Ee.setStart(de, 0), Ee.setEnd(de, ve);
11187
- const ct = Ee.getBoundingClientRect();
11188
- ge.right - ct.right > B ? Pe = ve : ve > 0 && (Pe = ve - 1);
11184
+ if (!Le) {
11185
+ const Pe = document.createRange();
11186
+ Pe.setStart(de, 0), Pe.setEnd(de, ve);
11187
+ const ct = Pe.getBoundingClientRect();
11188
+ ge.right - ct.right > B ? Le = ve : ve > 0 && (Le = ve - 1);
11189
11189
  }
11190
- if (Pe > 0) {
11191
- const Ee = ((ye = de.textContent) == null ? void 0 : ye.slice(0, Pe)) || "", ct = ((Ie = de.textContent) == null ? void 0 : Ie.slice(Pe)) || "";
11192
- de.textContent = Ee;
11193
- const mt = document.createElement("div");
11194
- return g.fontBgColor && (mt.style.backgroundColor = g.fontBgColor), ct && (mt.textContent = ct), E.current.appendChild(mt), le(B), !0;
11190
+ if (Le > 0) {
11191
+ const Pe = ((ye = de.textContent) == null ? void 0 : ye.slice(0, Le)) || "", ct = ((Ie = de.textContent) == null ? void 0 : Ie.slice(Le)) || "";
11192
+ de.textContent = Pe;
11193
+ const zt = document.createElement("div");
11194
+ return ct && (zt.textContent = ct), E.current.appendChild(zt), le(B), !0;
11195
11195
  }
11196
11196
  }
11197
11197
  return !1;
@@ -11220,13 +11220,13 @@ const wp = (o) => {
11220
11220
  let ye = he.anchorNode.parentNode;
11221
11221
  ye === K && (ye = he.anchorNode);
11222
11222
  const Ie = [...K.childNodes], de = [];
11223
- let De, Pe = he.anchorOffset;
11223
+ let De, Le = he.anchorOffset;
11224
11224
  for (; Ie.length; ) {
11225
11225
  const ve = Ie.pop();
11226
11226
  if (ve) {
11227
11227
  if (ve === ye) {
11228
11228
  let Re = ge[0];
11229
- ge.length === 1 && (Pe = ge[0].length, Re = ge[0].concat(H)), ye.nodeName === "#text" ? (ye.textContent = Re, De = ye) : ye.nodeName === "DIV" && (ye.innerText = Re, De = ye.childNodes[0]);
11229
+ ge.length === 1 && (Le = ge[0].length, Re = ge[0].concat(H)), ye.nodeName === "#text" ? (ye.textContent = Re, De = ye) : ye.nodeName === "DIV" && (ye.innerText = Re, De = ye.childNodes[0]);
11230
11230
  break;
11231
11231
  }
11232
11232
  de.push(ve), K.removeChild(ve);
@@ -11235,8 +11235,8 @@ const wp = (o) => {
11235
11235
  if (ge.length > 1)
11236
11236
  for (let ve = 1; ve < ge.length; ve++) {
11237
11237
  let Re = ge[ve];
11238
- const Ee = document.createElement("div");
11239
- g.fontBgColor && (Ee.style.backgroundColor = g.fontBgColor), ve === ge.length - 1 && (Pe = Re.length, Re = Re.concat(H)), Ee.innerText = Re, K.appendChild(Ee), ve === ge.length - 1 && (De = Ee.childNodes[0]);
11238
+ const Pe = document.createElement("div");
11239
+ ve === ge.length - 1 && (Le = Re.length, Re = Re.concat(H)), Pe.innerText = Re, K.appendChild(Pe), ve === ge.length - 1 && (De = Pe.childNodes[0]);
11240
11240
  }
11241
11241
  if (de.length) {
11242
11242
  de.reverse();
@@ -11245,7 +11245,7 @@ const wp = (o) => {
11245
11245
  }
11246
11246
  if (De && De.nodeName === "#text") {
11247
11247
  he.deleteFromDocument();
11248
- const ve = document.createRange(), Re = Math.min(Pe, (De == null ? void 0 : De.length) || 0);
11248
+ const ve = document.createRange(), Re = Math.min(Le, (De == null ? void 0 : De.length) || 0);
11249
11249
  ve.setStart(De, Re), ve.collapse(!0), he.removeAllRanges(), he.addRange(ve);
11250
11250
  }
11251
11251
  }
@@ -11777,7 +11777,7 @@ const wp = (o) => {
11777
11777
  }, 60));
11778
11778
  };
11779
11779
  return /* @__PURE__ */ w.createElement(
11780
- Ct,
11780
+ vt,
11781
11781
  {
11782
11782
  disabled: f,
11783
11783
  position: l,
@@ -11801,7 +11801,7 @@ const wp = (o) => {
11801
11801
  className: "appliance-plugin-rotate-btn",
11802
11802
  style: { backgroundColor: e == null ? void 0 : e.selectorColor }
11803
11803
  },
11804
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le("rotation-button") })
11804
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee("rotation-button") })
11805
11805
  ),
11806
11806
  /* @__PURE__ */ w.createElement(
11807
11807
  "div",
@@ -11809,7 +11809,7 @@ const wp = (o) => {
11809
11809
  ref: S,
11810
11810
  className: `appliance-plugin-rotate-mouse-pointer ${u ? "active" : ""}`
11811
11811
  },
11812
- /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Le("rotation") }),
11812
+ /* @__PURE__ */ w.createElement("img", { alt: "icon", src: Ee("rotation") }),
11813
11813
  /* @__PURE__ */ w.createElement("div", { className: "angle-icon" }, t, "°")
11814
11814
  )
11815
11815
  )
@@ -11908,7 +11908,7 @@ const wp = (o) => {
11908
11908
  r && e && p.current === x.Start && g.current && r.control.textEditorManager.active(g.current);
11909
11909
  };
11910
11910
  return /* @__PURE__ */ w.createElement(
11911
- Ct,
11911
+ vt,
11912
11912
  {
11913
11913
  disabled: l,
11914
11914
  position: a,
@@ -12262,7 +12262,7 @@ const wp = (o) => {
12262
12262
  s != null && s.control.worker.isBusy && p(!0), f(v, j);
12263
12263
  };
12264
12264
  return /* @__PURE__ */ w.createElement(
12265
- Ct,
12265
+ vt,
12266
12266
  {
12267
12267
  disabled: g,
12268
12268
  position: c,
@@ -12985,7 +12985,7 @@ class py extends Ao {
12985
12985
  super(e, t);
12986
12986
  I(this, "width", 1e3);
12987
12987
  I(this, "height", 1e3);
12988
- I(this, "dpr", vt());
12988
+ I(this, "dpr", Tt());
12989
12989
  I(this, "vDom");
12990
12990
  I(this, "eventTragetElement");
12991
12991
  I(this, "snapshotContainerRef");
@@ -13002,7 +13002,7 @@ class py extends Ao {
13002
13002
  setCanvassStyle() {
13003
13003
  var e;
13004
13004
  if (this.eventTragetElement) {
13005
- const t = this.eventTragetElement.offsetWidth || this.width, n = this.eventTragetElement.offsetHeight || this.height, r = vt();
13005
+ const t = this.eventTragetElement.offsetWidth || this.width, n = this.eventTragetElement.offsetHeight || this.height, r = Tt();
13006
13006
  r !== this.dpr && (this.dpr = r, this.control.worker.updateDpr(this.viewId, this.dpr)), t && n && this.canvasContainerRef.current && (t !== this.width || n !== this.height) && (this.width = t, this.height = n, this.canvasContainerRef.current.style.width = `${t}px`, this.canvasContainerRef.current.style.height = `${n}px`), t && n && this.snapshotContainerRef && this.snapshotContainerRef.current && (t !== this.width || n !== this.height) && (this.width = t, this.height = n), t && n && this.canvasBgRef.current && (t !== this.width || n !== this.height) && (this.width = t, this.height = n, this.control.isUseOffscreenTransfer || (this.canvasBgRef.current.width = t * this.dpr, this.canvasBgRef.current.height = n * this.dpr, this.canvasFloatRef.current && (this.canvasFloatRef.current.width = t * this.dpr, this.canvasFloatRef.current.height = n * this.dpr), this.canvasServiceFloatRef.current && (this.canvasServiceFloatRef.current.width = t * this.dpr, this.canvasServiceFloatRef.current.height = n * this.dpr), (e = this.canvasTopRef) != null && e.current && (this.canvasTopRef.current.width = t * this.dpr, this.canvasTopRef.current.height = n * this.dpr)));
13007
13007
  }
13008
13008
  }
@@ -13048,7 +13048,7 @@ class py extends Ao {
13048
13048
  class yy extends op {
13049
13049
  constructor(e, t, n) {
13050
13050
  super(e, t, n);
13051
- I(this, "dpr", vt());
13051
+ I(this, "dpr", Tt());
13052
13052
  I(this, "width", 1e3);
13053
13053
  I(this, "height", 1e3);
13054
13054
  I(this, "vDom");
@@ -13066,7 +13066,7 @@ class yy extends op {
13066
13066
  setCanvassStyle() {
13067
13067
  var e;
13068
13068
  if (this.eventTragetElement) {
13069
- const t = vt();
13069
+ const t = Tt();
13070
13070
  if (t !== this.dpr && (this.dpr = t, this.control.worker.updateDpr(this.viewId, this.dpr)), this.canvasContainerRef.current) {
13071
13071
  const n = this.eventTragetElement.offsetWidth || this.width, r = this.eventTragetElement.offsetHeight || this.height;
13072
13072
  n && r && (n !== this.width || r !== this.height) && (this.width = n, this.height = r, this.canvasContainerRef.current.style.width = `${n}px`, this.canvasContainerRef.current.style.height = `${r}px`);
@@ -14301,7 +14301,7 @@ class _y extends Ao {
14301
14301
  super(e, t);
14302
14302
  I(this, "width", 1e3);
14303
14303
  I(this, "height", 1e3);
14304
- I(this, "dpr", vt());
14304
+ I(this, "dpr", Tt());
14305
14305
  I(this, "vDom");
14306
14306
  I(this, "eventTragetElement");
14307
14307
  I(this, "snapshotContainerRef");
@@ -14318,7 +14318,7 @@ class _y extends Ao {
14318
14318
  setCanvassStyle() {
14319
14319
  var e;
14320
14320
  if (this.eventTragetElement) {
14321
- const t = this.eventTragetElement.offsetWidth, n = this.eventTragetElement.offsetHeight, r = vt();
14321
+ const t = this.eventTragetElement.offsetWidth, n = this.eventTragetElement.offsetHeight, r = Tt();
14322
14322
  r !== this.dpr && (this.dpr = r, this.control.worker.updateDpr(this.viewId, this.dpr)), t && n && this.canvasContainerRef.current && (t !== this.width || n !== this.height) && (this.width = t, this.height = n), t && n && this.canvasBgRef.current && (t !== this.width || n !== this.height) && (this.width = t, this.height = n, this.control.isUseOffscreenTransfer || (this.canvasBgRef.current.width = t * this.dpr, this.canvasBgRef.current.height = n * this.dpr, this.canvasFloatRef.current && (this.canvasFloatRef.current.width = t * this.dpr, this.canvasFloatRef.current.height = n * this.dpr), this.canvasServiceFloatRef.current && (this.canvasServiceFloatRef.current.width = t * this.dpr, this.canvasServiceFloatRef.current.height = n * this.dpr), (e = this.canvasTopRef) != null && e.current && (this.canvasTopRef.current.width = t * this.dpr, this.canvasTopRef.current.height = n * this.dpr)));
14323
14323
  }
14324
14324
  }
@@ -15177,13 +15177,13 @@ I(A, "kind", "appliance-single-plugin"), I(A, "cursorAdapter"), I(A, "currentMan
15177
15177
  }
15178
15178
  });
15179
15179
  let Fn = A;
15180
- const Tt = class Tt extends w.Component {
15180
+ const Nt = class Nt extends w.Component {
15181
15181
  constructor() {
15182
15182
  super(...arguments);
15183
15183
  I(this, "mainViewRef", null);
15184
15184
  }
15185
15185
  componentDidMount() {
15186
- Tt.emiter || (Tt.emiter = Ze.InternalMsgEmitter), Tt.emiter.emit(
15186
+ Nt.emiter || (Nt.emiter = Ze.InternalMsgEmitter), Nt.emiter.emit(
15187
15187
  ee.BindMainView,
15188
15188
  this.mainViewRef
15189
15189
  );
@@ -15198,8 +15198,8 @@ const Tt = class Tt extends w.Component {
15198
15198
  ));
15199
15199
  }
15200
15200
  };
15201
- I(Tt, "emiter");
15202
- let Qn = Tt;
15201
+ I(Nt, "emiter");
15202
+ let Qn = Nt;
15203
15203
  export {
15204
15204
  Lf as $,
15205
15205
  II as A,