@netless/appliance-plugin 1.1.36-beta.3 → 1.1.36-beta.4

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.
@@ -1,13 +1,13 @@
1
1
  var bo = Object.defineProperty;
2
2
  var jo = (o, n, e) => n in o ? bo(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
3
  var m = (o, n, e) => jo(o, typeof n != "symbol" ? n + "" : n, e);
4
- import { toJS as gn, autorun as Rn, isRoom as $, isPlayer as ai, InvisiblePlugin as zr, RoomPhase as Er } from "white-web-sdk";
4
+ import { toJS as gn, autorun as Rn, isRoom as F, isPlayer as ai, InvisiblePlugin as zr, RoomPhase as Er } from "white-web-sdk";
5
5
  import "spritejs";
6
6
  import { compress as Do, decompress as Ao } from "lz-string";
7
7
  import "clipper-lib";
8
8
  import "lineclip";
9
9
  import Zn from "xss";
10
- import { debounce as nn, cloneDeep as ae, isEqual as he, isSet as Qe, isNumber as K, isBoolean as Fe, throttle as ci, omit as Ei, clone as Li } from "lodash";
10
+ import { debounce as nn, cloneDeep as ae, isEqual as he, isSet as Qe, isNumber as K, isBoolean as $e, throttle as ci, omit as Ei, clone as Li } from "lodash";
11
11
  import Hn from "eventemitter2";
12
12
  import T, { useContext as ze, useState as ce, useMemo as q, useEffect as fe, useRef as Ce, useCallback as jt } from "react";
13
13
  import li, { createPortal as zo } from "react-dom";
@@ -511,15 +511,15 @@ var un = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
511
511
  function ui(o) {
512
512
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
513
513
  }
514
- var Ro = typeof un == "object" && un && un.Object === Object && un, Or = Ro, Uo = Or, Yo = typeof self == "object" && self && self.Object === Object && self, Bo = Uo || Yo || Function("return this")(), it = Bo, Wo = it, Vo = Wo.Symbol, rn = Vo, Pi = rn, Rr = Object.prototype, Fo = Rr.hasOwnProperty, $o = Rr.toString, Jt = Pi ? Pi.toStringTag : void 0;
514
+ var Ro = typeof un == "object" && un && un.Object === Object && un, Or = Ro, Uo = Or, Yo = typeof self == "object" && self && self.Object === Object && self, Bo = Uo || Yo || Function("return this")(), it = Bo, Wo = it, Vo = Wo.Symbol, rn = Vo, Pi = rn, Rr = Object.prototype, $o = Rr.hasOwnProperty, Fo = Rr.toString, Jt = Pi ? Pi.toStringTag : void 0;
515
515
  function Go(o) {
516
- var n = Fo.call(o, Jt), e = o[Jt];
516
+ var n = $o.call(o, Jt), e = o[Jt];
517
517
  try {
518
518
  o[Jt] = void 0;
519
519
  var t = !0;
520
520
  } catch {
521
521
  }
522
- var i = $o.call(o);
522
+ var i = Fo.call(o);
523
523
  return t && (n ? o[Jt] = e : delete o[Jt]), i;
524
524
  }
525
525
  var Qo = Go, Zo = Object.prototype, Ho = Zo.toString;
@@ -607,13 +607,13 @@ function Os(o) {
607
607
  return o != null && (n == "object" || n == "function");
608
608
  }
609
609
  var Mt = Os, Rs = on, Us = Mt, Ys = "[object AsyncFunction]", Bs = "[object Function]", Ws = "[object GeneratorFunction]", Vs = "[object Proxy]";
610
- function Fs(o) {
610
+ function $s(o) {
611
611
  if (!Us(o))
612
612
  return !1;
613
613
  var n = Rs(o);
614
614
  return n == Bs || n == Ws || n == Ys || n == Vs;
615
615
  }
616
- var Ur = Fs, $s = it, Gs = $s["__core-js_shared__"], Qs = Gs, Un = Qs, Ui = function() {
616
+ var Ur = $s, Fs = it, Gs = Fs["__core-js_shared__"], Qs = Gs, Un = Qs, Ui = function() {
617
617
  var o = /[^.]+$/.exec(Un && Un.keys && Un.keys.IE_PROTO || "");
618
618
  return o ? "Symbol(src)_1." + o : "";
619
619
  }();
@@ -680,20 +680,20 @@ function Ua(o, n) {
680
680
  var e = this.__data__;
681
681
  return this.size += this.has(o) ? 0 : 1, e[o] = Oa && n === void 0 ? Ra : n, this;
682
682
  }
683
- var Ya = Ua, Ba = Sa, Wa = Ca, Va = Da, Fa = Pa, $a = Ya;
684
- function Ft(o) {
683
+ var Ya = Ua, Ba = Sa, Wa = Ca, Va = Da, $a = Pa, Fa = Ya;
684
+ function $t(o) {
685
685
  var n = -1, e = o == null ? 0 : o.length;
686
686
  for (this.clear(); ++n < e; ) {
687
687
  var t = o[n];
688
688
  this.set(t[0], t[1]);
689
689
  }
690
690
  }
691
- Ft.prototype.clear = Ba;
692
- Ft.prototype.delete = Wa;
693
- Ft.prototype.get = Va;
694
- Ft.prototype.has = Fa;
695
- Ft.prototype.set = $a;
696
- var Ga = Ft, Bi = Ga, Qa = Nn, Za = di;
691
+ $t.prototype.clear = Ba;
692
+ $t.prototype.delete = Wa;
693
+ $t.prototype.get = Va;
694
+ $t.prototype.has = $a;
695
+ $t.prototype.set = Fa;
696
+ var Ga = $t, Bi = Ga, Qa = Nn, Za = di;
697
697
  function Ha() {
698
698
  this.size = 0, this.__data__ = {
699
699
  hash: new Bi(),
@@ -730,19 +730,19 @@ function uc(o, n) {
730
730
  return e.set(o, n), this.size += e.size == t ? 0 : 1, this;
731
731
  }
732
732
  var hc = uc, dc = qa, gc = nc, fc = oc, pc = cc, Mc = hc;
733
- function $t(o) {
733
+ function Ft(o) {
734
734
  var n = -1, e = o == null ? 0 : o.length;
735
735
  for (this.clear(); ++n < e; ) {
736
736
  var t = o[n];
737
737
  this.set(t[0], t[1]);
738
738
  }
739
739
  }
740
- $t.prototype.clear = dc;
741
- $t.prototype.delete = gc;
742
- $t.prototype.get = fc;
743
- $t.prototype.has = pc;
744
- $t.prototype.set = Mc;
745
- var Br = $t, yc = Nn, mc = di, Ic = Br, wc = 200;
740
+ Ft.prototype.clear = dc;
741
+ Ft.prototype.delete = gc;
742
+ Ft.prototype.get = fc;
743
+ Ft.prototype.has = pc;
744
+ Ft.prototype.set = Mc;
745
+ var Br = Ft, yc = Nn, mc = di, Ic = Br, wc = 200;
746
746
  function Tc(o, n) {
747
747
  var e = this.__data__;
748
748
  if (e instanceof yc) {
@@ -789,7 +789,7 @@ function Yc(o, n, e) {
789
789
  var t = o[n];
790
790
  (!(Uc.call(o, n) && Oc(t, e)) || e === void 0 && !(n in o)) && Pc(o, n, e);
791
791
  }
792
- var Fr = Yc, Bc = Fr, Wc = Vr;
792
+ var $r = Yc, Bc = $r, Wc = Vr;
793
793
  function Vc(o, n, e, t) {
794
794
  var i = !e;
795
795
  e || (e = {});
@@ -800,16 +800,16 @@ function Vc(o, n, e, t) {
800
800
  return e;
801
801
  }
802
802
  var bn = Vc;
803
- function Fc(o, n) {
803
+ function $c(o, n) {
804
804
  for (var e = -1, t = Array(o); ++e < o; )
805
805
  t[e] = n(e);
806
806
  return t;
807
807
  }
808
- var $c = Fc, Gc = on, Qc = zt, Zc = "[object Arguments]";
808
+ var Fc = $c, Gc = on, Qc = zt, Zc = "[object Arguments]";
809
809
  function Hc(o) {
810
810
  return Qc(o) && Gc(o) == Zc;
811
811
  }
812
- var qc = Hc, Vi = qc, Jc = zt, $r = Object.prototype, Kc = $r.hasOwnProperty, Xc = $r.propertyIsEnumerable, _c = Vi(/* @__PURE__ */ function() {
812
+ var qc = Hc, Vi = qc, Jc = zt, Fr = Object.prototype, Kc = Fr.hasOwnProperty, Xc = Fr.propertyIsEnumerable, _c = Vi(/* @__PURE__ */ function() {
813
813
  return arguments;
814
814
  }()) ? Vi : function(o) {
815
815
  return Jc(o) && Kc.call(o, "callee") && !Xc.call(o, "callee");
@@ -856,9 +856,9 @@ wn.exports;
856
856
  }();
857
857
  o.exports = a;
858
858
  })(wn, wn.exports);
859
- var gi = wn.exports, Yl = Rl, Bl = Dn, Fi = gi, $i = Fi && Fi.isTypedArray, Wl = $i ? Bl($i) : Yl, Vl = Wl, Fl = $c, $l = Gr, Gl = jn, Ql = Qr, Zl = sl, Hl = Vl, ql = Object.prototype, Jl = ql.hasOwnProperty;
859
+ var gi = wn.exports, Yl = Rl, Bl = Dn, $i = gi, Fi = $i && $i.isTypedArray, Wl = Fi ? Bl(Fi) : Yl, Vl = Wl, $l = Fc, Fl = Gr, Gl = jn, Ql = Qr, Zl = sl, Hl = Vl, ql = Object.prototype, Jl = ql.hasOwnProperty;
860
860
  function Kl(o, n) {
861
- var e = Gl(o), t = !e && $l(o), i = !e && !t && Ql(o), r = !e && !t && !i && Hl(o), s = e || t || i || r, a = s ? Fl(o.length, String) : [], c = a.length;
861
+ var e = Gl(o), t = !e && Fl(o), i = !e && !t && Ql(o), r = !e && !t && !i && Hl(o), s = e || t || i || r, a = s ? $l(o.length, String) : [], c = a.length;
862
862
  for (var l in o)
863
863
  (n || Jl.call(o, l)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
864
864
  (l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -955,11 +955,11 @@ var Jr = Wu;
955
955
  function Vu() {
956
956
  return [];
957
957
  }
958
- var Kr = Vu, Fu = Jr, $u = Kr, Gu = Object.prototype, Qu = Gu.propertyIsEnumerable, Gi = Object.getOwnPropertySymbols, Zu = Gi ? function(o) {
959
- return o == null ? [] : (o = Object(o), Fu(Gi(o), function(n) {
958
+ var Kr = Vu, $u = Jr, Fu = Kr, Gu = Object.prototype, Qu = Gu.propertyIsEnumerable, Gi = Object.getOwnPropertySymbols, Zu = Gi ? function(o) {
959
+ return o == null ? [] : (o = Object(o), $u(Gi(o), function(n) {
960
960
  return Qu.call(o, n);
961
961
  }));
962
- } : $u, mi = Zu, Hu = bn, qu = mi;
962
+ } : Fu, mi = Zu, Hu = bn, qu = mi;
963
963
  function Ju(o, n) {
964
964
  return Hu(o, qu(o), n);
965
965
  }
@@ -990,7 +990,7 @@ var mh = yh, Ih = eo, wh = _r, Th = yi;
990
990
  function Sh(o) {
991
991
  return Ih(o, Th, wh);
992
992
  }
993
- var vh = Sh, Ch = Et, Nh = it, kh = Ch(Nh, "DataView"), xh = kh, bh = Et, jh = it, Dh = bh(jh, "Promise"), Ah = Dh, zh = Et, Eh = it, Lh = zh(Eh, "Set"), to = Lh, Ph = Et, Oh = it, Rh = Ph(Oh, "WeakMap"), Uh = Rh, qn = xh, Jn = di, Kn = Ah, Xn = to, _n = Uh, no = on, Qt = Yr, Qi = "[object Map]", Yh = "[object Object]", Zi = "[object Promise]", Hi = "[object Set]", qi = "[object WeakMap]", Ji = "[object DataView]", Bh = Qt(qn), Wh = Qt(Jn), Vh = Qt(Kn), Fh = Qt(Xn), $h = Qt(_n), Nt = no;
993
+ var vh = Sh, Ch = Et, Nh = it, kh = Ch(Nh, "DataView"), xh = kh, bh = Et, jh = it, Dh = bh(jh, "Promise"), Ah = Dh, zh = Et, Eh = it, Lh = zh(Eh, "Set"), to = Lh, Ph = Et, Oh = it, Rh = Ph(Oh, "WeakMap"), Uh = Rh, qn = xh, Jn = di, Kn = Ah, Xn = to, _n = Uh, no = on, Qt = Yr, Qi = "[object Map]", Yh = "[object Object]", Zi = "[object Promise]", Hi = "[object Set]", qi = "[object WeakMap]", Ji = "[object DataView]", Bh = Qt(qn), Wh = Qt(Jn), Vh = Qt(Kn), $h = Qt(Xn), Fh = Qt(_n), Nt = no;
994
994
  (qn && Nt(new qn(new ArrayBuffer(1))) != Ji || Jn && Nt(new Jn()) != Qi || Kn && Nt(Kn.resolve()) != Zi || Xn && Nt(new Xn()) != Hi || _n && Nt(new _n()) != qi) && (Nt = function(o) {
995
995
  var n = no(o), e = n == Yh ? o.constructor : void 0, t = e ? Qt(e) : "";
996
996
  if (t)
@@ -1001,9 +1001,9 @@ var vh = Sh, Ch = Et, Nh = it, kh = Ch(Nh, "DataView"), xh = kh, bh = Et, jh = i
1001
1001
  return Qi;
1002
1002
  case Vh:
1003
1003
  return Zi;
1004
- case Fh:
1005
- return Hi;
1006
1004
  case $h:
1005
+ return Hi;
1006
+ case Fh:
1007
1007
  return qi;
1008
1008
  }
1009
1009
  return n;
@@ -1087,9 +1087,9 @@ var Ld = Ed, Pd = Mt, tr = Object.create, Od = /* @__PURE__ */ function() {
1087
1087
  function Wd(o) {
1088
1088
  return typeof o.constructor == "function" && !Bd(o) ? Ud(Yd(o)) : {};
1089
1089
  }
1090
- var Vd = Wd, Fd = wi, $d = zt, Gd = "[object Map]";
1090
+ var Vd = Wd, $d = wi, Fd = zt, Gd = "[object Map]";
1091
1091
  function Qd(o) {
1092
- return $d(o) && Fd(o) == Gd;
1092
+ return Fd(o) && $d(o) == Gd;
1093
1093
  }
1094
1094
  var Zd = Qd, Hd = Zd, qd = Dn, nr = gi, ir = nr && nr.isMap, Jd = ir ? qd(ir) : Hd, Kd = Jd, Xd = wi, _d = zt, eg = "[object Set]";
1095
1095
  function tg(o) {
@@ -1097,8 +1097,8 @@ function tg(o) {
1097
1097
  }
1098
1098
  var ng = tg, ig = ng, rg = Dn, rr = gi, or = rr && rr.isSet, og = or ? rg(or) : ig, ro = og;
1099
1099
  const zw = /* @__PURE__ */ ui(ro);
1100
- var sg = jc, ag = Ac, cg = Fr, lg = wu, ug = Ru, hg = Uu, dg = Bu, gg = Ku, fg = uh, pg = mh, Mg = vh, yg = wi, mg = Hh, Ig = Ld, wg = Vd, Tg = jn, Sg = Qr, vg = Kd, Cg = Mt, Ng = ro, kg = Mi, xg = yi, bg = 1, jg = 2, Dg = 4, oo = "[object Arguments]", Ag = "[object Array]", zg = "[object Boolean]", Eg = "[object Date]", Lg = "[object Error]", so = "[object Function]", Pg = "[object GeneratorFunction]", Og = "[object Map]", Rg = "[object Number]", ao = "[object Object]", Ug = "[object RegExp]", Yg = "[object Set]", Bg = "[object String]", Wg = "[object Symbol]", Vg = "[object WeakMap]", Fg = "[object ArrayBuffer]", $g = "[object DataView]", Gg = "[object Float32Array]", Qg = "[object Float64Array]", Zg = "[object Int8Array]", Hg = "[object Int16Array]", qg = "[object Int32Array]", Jg = "[object Uint8Array]", Kg = "[object Uint8ClampedArray]", Xg = "[object Uint16Array]", _g = "[object Uint32Array]", be = {};
1101
- be[oo] = be[Ag] = be[Fg] = be[$g] = be[zg] = be[Eg] = be[Gg] = be[Qg] = be[Zg] = be[Hg] = be[qg] = be[Og] = be[Rg] = be[ao] = be[Ug] = be[Yg] = be[Bg] = be[Wg] = be[Jg] = be[Kg] = be[Xg] = be[_g] = !0;
1100
+ var sg = jc, ag = Ac, cg = $r, lg = wu, ug = Ru, hg = Uu, dg = Bu, gg = Ku, fg = uh, pg = mh, Mg = vh, yg = wi, mg = Hh, Ig = Ld, wg = Vd, Tg = jn, Sg = Qr, vg = Kd, Cg = Mt, Ng = ro, kg = Mi, xg = yi, bg = 1, jg = 2, Dg = 4, oo = "[object Arguments]", Ag = "[object Array]", zg = "[object Boolean]", Eg = "[object Date]", Lg = "[object Error]", so = "[object Function]", Pg = "[object GeneratorFunction]", Og = "[object Map]", Rg = "[object Number]", ao = "[object Object]", Ug = "[object RegExp]", Yg = "[object Set]", Bg = "[object String]", Wg = "[object Symbol]", Vg = "[object WeakMap]", $g = "[object ArrayBuffer]", Fg = "[object DataView]", Gg = "[object Float32Array]", Qg = "[object Float64Array]", Zg = "[object Int8Array]", Hg = "[object Int16Array]", qg = "[object Int32Array]", Jg = "[object Uint8Array]", Kg = "[object Uint8ClampedArray]", Xg = "[object Uint16Array]", _g = "[object Uint32Array]", be = {};
1101
+ be[oo] = be[Ag] = be[$g] = be[Fg] = be[zg] = be[Eg] = be[Gg] = be[Qg] = be[Zg] = be[Hg] = be[qg] = be[Og] = be[Rg] = be[ao] = be[Ug] = be[Yg] = be[Bg] = be[Wg] = be[Jg] = be[Kg] = be[Xg] = be[_g] = !0;
1102
1102
  be[Lg] = be[so] = be[Vg] = !1;
1103
1103
  function mn(o, n, e, t, i, r) {
1104
1104
  var s, a = n & bg, c = n & jg, l = n & Dg;
@@ -1142,7 +1142,7 @@ function of(o) {
1142
1142
  return tf(o, nf | rf);
1143
1143
  }
1144
1144
  var sf = of;
1145
- const An = /* @__PURE__ */ ui(sf), co = "1.1.36-beta.3", af = "@netless/appliance-plugin", sr = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1145
+ const An = /* @__PURE__ */ ui(sf), co = "1.1.36-beta.4", af = "@netless/appliance-plugin", sr = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1146
1146
  if (typeof window < "u") {
1147
1147
  let o = window.__netlessUA || "";
1148
1148
  o += ` ${af}@${co}`, window.__netlessUA = o;
@@ -1302,7 +1302,7 @@ function jf(o) {
1302
1302
  e[++n] = t;
1303
1303
  }), e;
1304
1304
  }
1305
- var Ni = jf, ar = rn, cr = io, Df = hi, Af = kf, zf = bf, Ef = Ni, Lf = 1, Pf = 2, Of = "[object Boolean]", Rf = "[object Date]", Uf = "[object Error]", Yf = "[object Map]", Bf = "[object Number]", Wf = "[object RegExp]", Vf = "[object Set]", Ff = "[object String]", $f = "[object Symbol]", Gf = "[object ArrayBuffer]", Qf = "[object DataView]", lr = ar ? ar.prototype : void 0, Yn = lr ? lr.valueOf : void 0;
1305
+ var Ni = jf, ar = rn, cr = io, Df = hi, Af = kf, zf = bf, Ef = Ni, Lf = 1, Pf = 2, Of = "[object Boolean]", Rf = "[object Date]", Uf = "[object Error]", Yf = "[object Map]", Bf = "[object Number]", Wf = "[object RegExp]", Vf = "[object Set]", $f = "[object String]", Ff = "[object Symbol]", Gf = "[object ArrayBuffer]", Qf = "[object DataView]", lr = ar ? ar.prototype : void 0, Yn = lr ? lr.valueOf : void 0;
1306
1306
  function Zf(o, n, e, t, i, r, s) {
1307
1307
  switch (e) {
1308
1308
  case Qf:
@@ -1318,7 +1318,7 @@ function Zf(o, n, e, t, i, r, s) {
1318
1318
  case Uf:
1319
1319
  return o.name == n.name && o.message == n.message;
1320
1320
  case Wf:
1321
- case Ff:
1321
+ case $f:
1322
1322
  return o == n + "";
1323
1323
  case Yf:
1324
1324
  var a = zf;
@@ -1332,7 +1332,7 @@ function Zf(o, n, e, t, i, r, s) {
1332
1332
  t |= Pf, s.set(o, n);
1333
1333
  var u = Af(a(o), a(n), t, i, r, s);
1334
1334
  return s.delete(o), u;
1335
- case $f:
1335
+ case Ff:
1336
1336
  if (Yn)
1337
1337
  return Yn.call(o) == Yn.call(n);
1338
1338
  }
@@ -1981,12 +1981,12 @@ function Pp(o, n) {
1981
1981
  i[e] = n(o[e], e, o);
1982
1982
  return i;
1983
1983
  }
1984
- var Op = Pp, Rp = vi, Up = uo, Yp = ho, Bp = Op, Wp = Dn, Vp = Ci, Fp = 200;
1985
- function $p(o, n, e, t) {
1984
+ var Op = Pp, Rp = vi, Up = uo, Yp = ho, Bp = Op, Wp = Dn, Vp = Ci, $p = 200;
1985
+ function Fp(o, n, e, t) {
1986
1986
  var i = -1, r = Up, s = !0, a = o.length, c = [], l = n.length;
1987
1987
  if (!a)
1988
1988
  return c;
1989
- e && (n = Bp(n, Wp(e))), t ? (r = Yp, s = !1) : n.length >= Fp && (r = Vp, s = !1, n = new Rp(n));
1989
+ e && (n = Bp(n, Wp(e))), t ? (r = Yp, s = !1) : n.length >= $p && (r = Vp, s = !1, n = new Rp(n));
1990
1990
  e:
1991
1991
  for (; ++i < a; ) {
1992
1992
  var u = o[i], h = e == null ? u : e(u);
@@ -1999,7 +1999,7 @@ function $p(o, n, e, t) {
1999
1999
  }
2000
2000
  return c;
2001
2001
  }
2002
- var Gp = $p, gr = rn, Qp = Gr, Zp = jn, fr = gr ? gr.isConcatSpreadable : void 0;
2002
+ var Gp = Fp, gr = rn, Qp = Gr, Zp = jn, fr = gr ? gr.isConcatSpreadable : void 0;
2003
2003
  function Hp(o) {
2004
2004
  return Zp(o) || Qp(o) || !!(fr && o && o[fr]);
2005
2005
  }
@@ -2139,7 +2139,7 @@ function Vw(o, n, e, t = [0, 0]) {
2139
2139
  o[r] = c.x + t[0], o[r + 1] = c.y + t[1];
2140
2140
  }
2141
2141
  }
2142
- function Fw(o, n, e, t = [0, 0]) {
2142
+ function $w(o, n, e, t = [0, 0]) {
2143
2143
  const i = new W(n[0], n[1]);
2144
2144
  for (let r = 0; r < o.length; r += 2) {
2145
2145
  const s = new W(o[r], o[r + 1]), a = new W(e[0], e[1]), c = W.ScaleWOrigin(s, a, i);
@@ -2149,7 +2149,7 @@ function Fw(o, n, e, t = [0, 0]) {
2149
2149
  function bM(o, n) {
2150
2150
  return o[0] >= n.x && o[0] <= n.x + n.w && o[1] >= n.y && o[1] <= n.y + n.h;
2151
2151
  }
2152
- function $w(o, n) {
2152
+ function Fw(o, n) {
2153
2153
  const e = o <= n ? 1 : o / n, t = n <= o ? 1 : n / o;
2154
2154
  return [e, t];
2155
2155
  }
@@ -2306,7 +2306,7 @@ class DM {
2306
2306
  return this.getLocalId(n) === Q;
2307
2307
  }
2308
2308
  }
2309
- const $e = class $e extends DM {
2309
+ const Fe = class Fe extends DM {
2310
2310
  constructor(e, t, i) {
2311
2311
  super(e, t);
2312
2312
  m(this, "namespace");
@@ -2333,7 +2333,7 @@ const $e = class $e extends DM {
2333
2333
  this.limitNums.set(`${e}/${t}`, d), r = d;
2334
2334
  }
2335
2335
  if (r > 0 && i >= r) {
2336
- const d = $e.componentsLimits.indexOf(r), M = d >= 0 && d < $e.componentsLimits.length - 1;
2336
+ const d = Fe.componentsLimits.indexOf(r), M = d >= 0 && d < Fe.componentsLimits.length - 1;
2337
2337
  if ((u = (l = (c = this.control.room) == null ? void 0 : c.callbacks) == null ? void 0 : l.listeners) != null && u.map.onObjectsLimit && ((g = (h = this.control.room) == null ? void 0 : h.callbacks) == null || g.dispatch(
2338
2338
  "onObjectsLimit",
2339
2339
  (y) => y(r, M)
@@ -2354,7 +2354,7 @@ const $e = class $e extends DM {
2354
2354
  console.warn(
2355
2355
  `exceeds the limit of ${r} components, current: ${i}`
2356
2356
  );
2357
- const I = M ? $e.componentsLimits[d + 1] : 0;
2357
+ const I = M ? Fe.componentsLimits[d + 1] : 0;
2358
2358
  this.limitNums.set(`${e}/${t}`, I);
2359
2359
  }
2360
2360
  },
@@ -2368,7 +2368,7 @@ const $e = class $e extends DM {
2368
2368
  for (const i of this.limitNums.keys())
2369
2369
  `${e}/`.indexOf(i) === 0 && this.limitNums.delete(i);
2370
2370
  });
2371
- this.syncInterval = i, this.namespace = $e.namespace, this.authSpace = $e.authSpace, this.globalUndoRedoStackSpace = $e.globalUndoRedoStackSpace, this.serviceStorage = this.getNamespaceData(), this.storage = ae(this.serviceStorage), this.authStorage = this.getAuthSpaceData(), this.globalUndoRedoStackStorage = {}, this.getLimitNums();
2371
+ this.syncInterval = i, this.namespace = Fe.namespace, this.authSpace = Fe.authSpace, this.globalUndoRedoStackSpace = Fe.globalUndoRedoStackSpace, this.serviceStorage = this.getNamespaceData(), this.storage = ae(this.serviceStorage), this.authStorage = this.getAuthSpaceData(), this.globalUndoRedoStackStorage = {}, this.getLimitNums();
2372
2372
  }
2373
2373
  get Logger() {
2374
2374
  return this.control.logger;
@@ -2378,7 +2378,7 @@ const $e = class $e extends DM {
2378
2378
  return !!(this.storage[e] && this.storage[e][t] && this.storage[e][t][r]);
2379
2379
  }
2380
2380
  getLimitNum(e) {
2381
- return e >= $e.componentsLimits[0] ? $e.componentsLimits[1] : $e.componentsLimits[0];
2381
+ return e >= Fe.componentsLimits[0] ? Fe.componentsLimits[1] : Fe.componentsLimits[0];
2382
2382
  }
2383
2383
  getLimitNums() {
2384
2384
  for (const [e, t] of Object.entries(this.storage))
@@ -3043,7 +3043,7 @@ const $e = class $e extends DM {
3043
3043
  return s;
3044
3044
  }
3045
3045
  dispatchPageAuth(e, t = !0) {
3046
- var l, u, h, g, p, d, M, I, y, f, w, v, N, C, k, L, A, x, D, b, P, O, U, V, Y, Z, G, F, X, Se, le, Ie, ue, ht, yt, mt, It, wt;
3046
+ var l, u, h, g, p, d, M, I, y, f, w, v, N, C, k, L, A, x, D, b, P, O, U, V, Y, Z, G, $, X, Se, le, Ie, ue, ht, yt, mt, It, wt;
3047
3047
  const { operation: i, viewId: r, scenePath: s, pageId: a, pageData: c } = e;
3048
3048
  switch (i) {
3049
3049
  case Re.addPage: {
@@ -3119,7 +3119,7 @@ const $e = class $e extends DM {
3119
3119
  case Re.deleteElement: {
3120
3120
  if (!r || !s || !a || !(c != null && c.elementId))
3121
3121
  return;
3122
- (Se = (X = (F = (G = (Z = (Y = this.authStorage) == null ? void 0 : Y.pageAuth) == null ? void 0 : Z[r]) == null ? void 0 : G[s]) == null ? void 0 : F.pages) == null ? void 0 : X[a]) != null && Se[c.elementId] && (delete this.authStorage.pageAuth[r][s].pages[a][c.elementId], t && ((le = this.plugin) == null || le.updateAttributes(
3122
+ (Se = (X = ($ = (G = (Z = (Y = this.authStorage) == null ? void 0 : Y.pageAuth) == null ? void 0 : Z[r]) == null ? void 0 : G[s]) == null ? void 0 : $.pages) == null ? void 0 : X[a]) != null && Se[c.elementId] && (delete this.authStorage.pageAuth[r][s].pages[a][c.elementId], t && ((le = this.plugin) == null || le.updateAttributes(
3123
3123
  [
3124
3124
  this.authSpace,
3125
3125
  "pageAuth",
@@ -3323,9 +3323,9 @@ const $e = class $e extends DM {
3323
3323
  return s;
3324
3324
  }
3325
3325
  };
3326
- m($e, "namespace", "PluginState"), m($e, "authSpace", "PluginAuth"), m($e, "globalUndoRedoStackSpace", "GlobalUndoRedoStack"), // static syncInterval: number = 500;
3327
- m($e, "componentsLimits", [500, 1e3]);
3328
- let lt = $e;
3326
+ m(Fe, "namespace", "PluginState"), m(Fe, "authSpace", "PluginAuth"), m(Fe, "globalUndoRedoStackSpace", "GlobalUndoRedoStack"), // static syncInterval: number = 500;
3327
+ m(Fe, "componentsLimits", [500, 1e3]);
3328
+ let lt = Fe;
3329
3329
  var qe = /* @__PURE__ */ ((o) => (o[o.Draw = 1] = "Draw", o[o.Delete = 2] = "Delete", o[o.Update = 3] = "Update", o))(qe || {});
3330
3330
  class AM {
3331
3331
  constructor() {
@@ -3521,7 +3521,7 @@ class zM {
3521
3521
  (this.willConsumeEventWorkers.size || this.cursorInfoMap.size) && this.runAnimation();
3522
3522
  }
3523
3523
  sendEvent(n, e) {
3524
- if (this.displayer && $(this.displayer)) {
3524
+ if (this.displayer && F(this.displayer)) {
3525
3525
  const t = K(n[0]) && K(n[1]) && this.control.viewContainerManager.transformToScenePoint(
3526
3526
  n,
3527
3527
  e
@@ -3533,7 +3533,7 @@ class zM {
3533
3533
  }
3534
3534
  dispatchMagixEvent() {
3535
3535
  var n;
3536
- this.displayer && $(this.displayer) && this.displayer.isWritable && this.displayer.dispatchMagixEvent(this.eventName, {
3536
+ this.displayer && F(this.displayer) && this.displayer.isWritable && this.displayer.dispatchMagixEvent(this.eventName, {
3537
3537
  type: fn.Cursor,
3538
3538
  op: ae(this.willSendEventWorkers),
3539
3539
  uid: (n = this.control.collector) == null ? void 0 : n.uid
@@ -3581,7 +3581,7 @@ class zM {
3581
3581
  }
3582
3582
  unabled() {
3583
3583
  var n;
3584
- this.displayer && $(this.displayer) && (this.willSendEventWorkers.length = 0, this.displayer.dispatchMagixEvent(this.eventName, {
3584
+ this.displayer && F(this.displayer) && (this.willSendEventWorkers.length = 0, this.displayer.dispatchMagixEvent(this.eventName, {
3585
3585
  type: fn.Cursor,
3586
3586
  op: [
3587
3587
  {
@@ -4260,12 +4260,12 @@ class OM extends tt {
4260
4260
  for (const b of k.selectIds) {
4261
4261
  const P = M(b, this.serviceColloctor), O = (y = (I = u == null ? void 0 : u[r]) == null ? void 0 : I[c]) == null ? void 0 : y[P];
4262
4262
  O && O.toolsType === S.BackgroundSVG ? (p.push(b), p.sort((U, V) => {
4263
- var G, F, X, Se;
4264
- const Y = ((F = (G = u[M(U, this.serviceColloctor)]) == null ? void 0 : G.opt) == null ? void 0 : F.zIndex) || 0, Z = ((Se = (X = u[M(U, this.serviceColloctor)]) == null ? void 0 : X.opt) == null ? void 0 : Se.zIndex) || 0;
4263
+ var G, $, X, Se;
4264
+ const Y = (($ = (G = u[M(U, this.serviceColloctor)]) == null ? void 0 : G.opt) == null ? void 0 : $.zIndex) || 0, Z = ((Se = (X = u[M(U, this.serviceColloctor)]) == null ? void 0 : X.opt) == null ? void 0 : Se.zIndex) || 0;
4265
4265
  return Y > Z ? 1 : U < V ? -1 : 0;
4266
4266
  })) : (g.push(b), g.sort((U, V) => {
4267
- var G, F, X, Se;
4268
- const Y = ((F = (G = u[M(U, this.serviceColloctor)]) == null ? void 0 : G.opt) == null ? void 0 : F.zIndex) || 0, Z = ((Se = (X = u[M(U, this.serviceColloctor)]) == null ? void 0 : X.opt) == null ? void 0 : Se.zIndex) || 0;
4267
+ var G, $, X, Se;
4268
+ const Y = (($ = (G = u[M(U, this.serviceColloctor)]) == null ? void 0 : G.opt) == null ? void 0 : $.zIndex) || 0, Z = ((Se = (X = u[M(U, this.serviceColloctor)]) == null ? void 0 : X.opt) == null ? void 0 : Se.zIndex) || 0;
4269
4269
  return Y > Z ? 1 : U < V ? -1 : 0;
4270
4270
  }));
4271
4271
  }
@@ -4284,17 +4284,17 @@ class OM extends tt {
4284
4284
  needUndoTicker: this.control.viewContainerManager.getUndoTickerId(r)
4285
4285
  };
4286
4286
  g.length && (i === Dt.Top ? (this.addMaxLayer(r), L = this.getMaxZIndex(r)) : (this.addMinLayer(r), L = this.getMinZIndex(r)), g.forEach((b) => {
4287
- var V, Y, Z, G, F;
4287
+ var V, Y, Z, G, $;
4288
4288
  const P = (V = this.serviceColloctor) == null ? void 0 : V.isLocalId(b);
4289
4289
  let O = P && ((Y = this.serviceColloctor) == null ? void 0 : Y.transformKey(b)) || b;
4290
4290
  const U = (G = (Z = u == null ? void 0 : u[r]) == null ? void 0 : Z[c]) == null ? void 0 : G[O];
4291
- U && (!P && ((F = this.serviceColloctor) != null && F.isOwn(O)) && (O = this.serviceColloctor.getLocalId(O)), x.zIndex = L, U != null && U.opt && (U.opt.zIndex = L));
4291
+ U && (!P && (($ = this.serviceColloctor) != null && $.isOwn(O)) && (O = this.serviceColloctor.getLocalId(O)), x.zIndex = L, U != null && U.opt && (U.opt.zIndex = L));
4292
4292
  })), p.length && (i === Dt.Top ? (this.addMaxLayerForBackgroundSVG(r), A = this.getMaxZIndexForBackgroundSVG(r)) : (this.addMinLayerForBackgroundSVG(r), A = this.getMinZIndexForBackgroundSVG(r)), p.forEach((b) => {
4293
- var V, Y, Z, G, F;
4293
+ var V, Y, Z, G, $;
4294
4294
  const P = (V = this.serviceColloctor) == null ? void 0 : V.isLocalId(b);
4295
4295
  let O = P && ((Y = this.serviceColloctor) == null ? void 0 : Y.transformKey(b)) || b;
4296
4296
  const U = (G = (Z = u == null ? void 0 : u[r]) == null ? void 0 : Z[c]) == null ? void 0 : G[O];
4297
- U && (!P && ((F = this.serviceColloctor) != null && F.isOwn(O)) && (O = this.serviceColloctor.getLocalId(O)), x.zIndexForBackgroundSVG = A, U != null && U.opt && (U.opt.zIndex = A));
4297
+ U && (!P && (($ = this.serviceColloctor) != null && $.isOwn(O)) && (O = this.serviceColloctor.getLocalId(O)), x.zIndexForBackgroundSVG = A, U != null && U.opt && (U.opt.zIndex = A));
4298
4298
  })), D.willSerializeData = !0, h.push([
4299
4299
  D,
4300
4300
  {
@@ -4521,16 +4521,16 @@ class YM extends tt {
4521
4521
  this.cacheTextInfo.clear();
4522
4522
  for (const Y of O.selectIds) {
4523
4523
  const Z = (N = this.serviceColloctor) == null ? void 0 : N.isLocalId(Y), G = Z && ((C = this.serviceColloctor) == null ? void 0 : C.transformKey(Y)) || Y;
4524
- let F = G;
4525
- !Z && ((k = this.serviceColloctor) != null && k.isOwn(G)) && (F = this.serviceColloctor.getLocalId(G));
4526
- const X = this.control.textEditorManager.get(F);
4527
- X && r === j.Start && this.targetText.set(F, An(X));
4524
+ let $ = G;
4525
+ !Z && ((k = this.serviceColloctor) != null && k.isOwn(G)) && ($ = this.serviceColloctor.getLocalId(G));
4526
+ const X = this.control.textEditorManager.get($);
4527
+ X && r === j.Start && this.targetText.set($, An(X));
4528
4528
  }
4529
4529
  }
4530
4530
  if (this.targetText.size && r !== j.Start && u) {
4531
4531
  const Y = [];
4532
- for (const [G, F] of this.targetText.entries()) {
4533
- const { opt: X } = F, Se = Math.floor(X.fontSize * u[0]), le = this.cacheTextInfo.get(G), Ie = !le && X.fontSize !== Se || le && le.fontSize !== Se || !1, ue = (L = this.control.textEditorManager.get(G)) == null ? void 0 : L.opt;
4532
+ for (const [G, $] of this.targetText.entries()) {
4533
+ const { opt: X } = $, Se = Math.floor(X.fontSize * u[0]), le = this.cacheTextInfo.get(G), Ie = !le && X.fontSize !== Se || le && le.fontSize !== Se || !1, ue = (L = this.control.textEditorManager.get(G)) == null ? void 0 : L.opt;
4534
4534
  if (Ie && ue && X.boxSize && X.boxPoint) {
4535
4535
  const ht = this.setTextStyle(
4536
4536
  G,
@@ -4543,8 +4543,8 @@ class YM extends tt {
4543
4543
  const Z = await Promise.all(Y);
4544
4544
  for (const G of Z)
4545
4545
  if (G) {
4546
- const { key: F, textInfo: X } = G;
4547
- this.cacheTextInfo.set(F, {
4546
+ const { key: $, textInfo: X } = G;
4547
+ this.cacheTextInfo.set($, {
4548
4548
  fontSize: X.opt.fontSize,
4549
4549
  boxSize: X.opt.boxSize,
4550
4550
  boxPoint: X.opt.boxPoint
@@ -4707,7 +4707,7 @@ function VM(o) {
4707
4707
  const t = document.createTextNode("");
4708
4708
  return e.appendChild(t), t;
4709
4709
  }
4710
- function FM(o, n) {
4710
+ function $M(o, n) {
4711
4711
  var i;
4712
4712
  const e = document.createRange(), t = VM(n);
4713
4713
  t.nodeType === Node.TEXT_NODE ? e.setStart(t, ((i = t.textContent) == null ? void 0 : i.length) || 0) : e.setStart(t, 0), e.collapse(!0), o.removeAllRanges(), o.addRange(e);
@@ -4730,7 +4730,7 @@ function yr(o) {
4730
4730
  lastLine: t || null
4731
4731
  };
4732
4732
  }
4733
- function $M(o) {
4733
+ function FM(o) {
4734
4734
  const n = document.createTreeWalker(o, NodeFilter.SHOW_TEXT, null), e = [];
4735
4735
  let t;
4736
4736
  for (; (t = n.nextNode()) !== null; )
@@ -4804,7 +4804,7 @@ class QM extends tt {
4804
4804
  async setTextStyle(e, t, i, r, s, a) {
4805
4805
  const { bold: c, underline: l, lineThrough: u, italic: h, fontSize: g } = i;
4806
4806
  if (t.toolsType && WM(t.toolsType) === nt.Text) {
4807
- t.opt && (c && (t.opt.bold = c), Fe(l) && (t.opt.underline = l), Fe(u) && (t.opt.lineThrough = u), h && (t.opt.italic = h), g && (t.opt.fontSize = g));
4807
+ t.opt && (c && (t.opt.bold = c), $e(l) && (t.opt.underline = l), $e(u) && (t.opt.lineThrough = u), h && (t.opt.italic = h), g && (t.opt.fontSize = g));
4808
4808
  const d = await this.control.textEditorManager.updateTextControllerWithEffectAsync(
4809
4809
  {
4810
4810
  workId: e,
@@ -4854,7 +4854,7 @@ class QM extends tt {
4854
4854
  const U = (N = (v = d == null ? void 0 : d[c]) == null ? void 0 : v[g]) == null ? void 0 : N[P];
4855
4855
  if (U) {
4856
4856
  const V = U.updateNodeOpt || {};
4857
- if (i && (V.bold = i, M.bold = i === "bold"), r && (V.italic = r, M.italic = r === "italic"), Fe(s) && (V.lineThrough = s, M.lineThrough = s), Fe(a) && (V.underline = a, M.underline = a), l && (V.fontSize = l, M.textSize = l), U.toolsType === S.Text && U.opt) {
4857
+ if (i && (V.bold = i, M.bold = i === "bold"), r && (V.italic = r, M.italic = r === "italic"), $e(s) && (V.lineThrough = s, M.lineThrough = s), $e(a) && (V.underline = a, M.underline = a), l && (V.fontSize = l, M.textSize = l), U.toolsType === S.Text && U.opt) {
4858
4858
  const Y = this.setTextStyle(
4859
4859
  O,
4860
4860
  ae(U),
@@ -4870,11 +4870,11 @@ class QM extends tt {
4870
4870
  for (const Y of U.selectIds) {
4871
4871
  const Z = (k = this.serviceColloctor) == null ? void 0 : k.isLocalId(Y);
4872
4872
  let G = Z && ((L = this.serviceColloctor) == null ? void 0 : L.transformKey(Y)) || Y;
4873
- const F = d[c][g][G] || void 0;
4874
- if (!Z && ((A = this.serviceColloctor) != null && A.isOwn(G)) && (G = this.serviceColloctor.getLocalId(G)), F && F.toolsType === S.Text && U.opt) {
4873
+ const $ = d[c][g][G] || void 0;
4874
+ if (!Z && ((A = this.serviceColloctor) != null && A.isOwn(G)) && (G = this.serviceColloctor.getLocalId(G)), $ && $.toolsType === S.Text && U.opt) {
4875
4875
  const X = this.setTextStyle(
4876
4876
  G,
4877
- ae(F),
4877
+ ae($),
4878
4878
  V,
4879
4879
  c,
4880
4880
  u,
@@ -6038,7 +6038,7 @@ class By extends Yy {
6038
6038
  m(this, "indexDBUtils", ei.getInstance());
6039
6039
  m(this, "markmapIdResolveMap", /* @__PURE__ */ new Map());
6040
6040
  const { control: t, internalMsgEmitter: i, publicMsgEmitter: r } = e;
6041
- this.control = t, this.maxLastSyncTime = this.control.pluginOptions.extras.syncOpt.interval, this.combineUnitTime = this.control.pluginOptions.extras.bezier.combineUnitTime || this.combineUnitTime, this.smoothSync = Fe(
6041
+ this.control = t, this.maxLastSyncTime = this.control.pluginOptions.extras.syncOpt.interval, this.combineUnitTime = this.control.pluginOptions.extras.bezier.combineUnitTime || this.combineUnitTime, this.smoothSync = $e(
6042
6042
  this.control.pluginOptions.extras.syncOpt.smoothSync
6043
6043
  ) ? this.control.pluginOptions.extras.syncOpt.smoothSync : this.smoothSync, this.maxCombineEraserTime = this.control.pluginOptions.extras.pencilEraser.maxCombineTime || this.maxCombineEraserTime, this.fullWorkerUrl = this.control.pluginOptions.cdn.fullWorkerUrl || "", this.subWorkerUrl = this.control.pluginOptions.cdn.subWorkerUrl || "", this.internalMsgEmitter = i, this.publicMsgEmitter = r, this.currentLocalWorkData = { workState: j.Pending };
6044
6044
  }
@@ -6125,14 +6125,14 @@ class By extends Yy {
6125
6125
  }
6126
6126
  async useBackgroundThread() {
6127
6127
  this.Logger.info("[Appliance]: use background thread");
6128
- const { BackgroundThreadManagerImpl: e } = await import("./index-C-mmzWhD.mjs");
6128
+ const { BackgroundThreadManagerImpl: e } = await import("./index-DzTeGttZ.mjs");
6129
6129
  this.backgroundThreadManager = new e(this);
6130
6130
  }
6131
6131
  async useMainThread() {
6132
6132
  this.Logger.info("[Appliance]: no OffscreenCanvas"), this.control.hasExtendFontFaces && await document.fonts.ready.then(() => {
6133
6133
  this.Logger.info("[Appliance]: set font faces in main thread success");
6134
6134
  });
6135
- const { MainThreadManagerImpl: e } = await import("./index-v6moTe3J.mjs");
6135
+ const { MainThreadManagerImpl: e } = await import("./index-CXsBcxaO.mjs");
6136
6136
  this.mainThread = new e(this);
6137
6137
  }
6138
6138
  async on() {
@@ -6383,7 +6383,7 @@ class By extends Yy {
6383
6383
  canTextEdit: Y,
6384
6384
  points: Z,
6385
6385
  selectorColor: G,
6386
- canRotate: F,
6386
+ canRotate: $,
6387
6387
  scaleType: X,
6388
6388
  textOpt: Se,
6389
6389
  toolsType: le,
@@ -6440,7 +6440,7 @@ class By extends Yy {
6440
6440
  }
6441
6441
  case B.Select: {
6442
6442
  const J = N != null && N.length ? { ...k, selectIds: N, canvasHeight: P, canvasWidth: O, points: Z } : void 0;
6443
- if (J && (C != null && C.strokeColor) && (J.selectorColor = C.strokeColor), J && G && (J.selectorColor = G), J && L && (J.strokeColor = L), J && (C != null && C.fillColor) && (J.fillColor = C.fillColor), J && A && (J.fillColor = A), J && Fe(F) && (J.canRotate = F), J && X && (J.scaleType = X), J && Y && (J.canTextEdit = Y), J && Se && (J.textOpt = Se), J && Fe(yt) && (J.canLock = yt), J && Fe(mt) && (J.isLocked = mt), J && It && (J.shapeOpt = It), J && wt && (J.toolsTypes = wt), J && Le && (J.thickness = Le), J && Ve && (J.strokeType = Ve), J && Fe(dt) && (J.useStroke = dt), ue && this.viewContainerManager.showFloatBar(ue, !!J, J), x && ((a = this.collector) == null || a.dispatch({
6443
+ if (J && (C != null && C.strokeColor) && (J.selectorColor = C.strokeColor), J && G && (J.selectorColor = G), J && L && (J.strokeColor = L), J && (C != null && C.fillColor) && (J.fillColor = C.fillColor), J && A && (J.fillColor = A), J && $e($) && (J.canRotate = $), J && X && (J.scaleType = X), J && Y && (J.canTextEdit = Y), J && Se && (J.textOpt = Se), J && $e(yt) && (J.canLock = yt), J && $e(mt) && (J.isLocked = mt), J && It && (J.shapeOpt = It), J && wt && (J.toolsTypes = wt), J && Le && (J.thickness = Le), J && Ve && (J.strokeType = Ve), J && $e(dt) && (J.useStroke = dt), ue && this.viewContainerManager.showFloatBar(ue, !!J, J), x && ((a = this.collector) == null || a.dispatch({
6444
6444
  type: v,
6445
6445
  selectIds: N,
6446
6446
  opt: C,
@@ -8897,7 +8897,7 @@ class Vy {
8897
8897
  }));
8898
8898
  }
8899
8899
  }
8900
- class Fy {
8900
+ class $y {
8901
8901
  constructor(n) {
8902
8902
  m(this, "internalMsgEmitter");
8903
8903
  m(this, "control");
@@ -9041,7 +9041,7 @@ class _w {
9041
9041
  delete this._listeners[n];
9042
9042
  }
9043
9043
  }
9044
- class $y {
9044
+ class Fy {
9045
9045
  constructor(n) {
9046
9046
  m(this, "control");
9047
9047
  m(this, "worker");
@@ -9594,8 +9594,8 @@ class om {
9594
9594
  var Z, G;
9595
9595
  const V = setTimeout(() => {
9596
9596
  var X, Se;
9597
- const F = this.updateResolveMap.get(t);
9598
- F && (this.updateResolveMap.delete(t), (Se = (X = this.logger) == null ? void 0 : X.warn) == null || Se.call(
9597
+ const $ = this.updateResolveMap.get(t);
9598
+ $ && (this.updateResolveMap.delete(t), (Se = (X = this.logger) == null ? void 0 : X.warn) == null || Se.call(
9599
9599
  X,
9600
9600
  `${re} updateSelectedElements timeout requestId=${t} viewId=${i}`
9601
9601
  ), U({
@@ -9603,10 +9603,10 @@ class om {
9603
9603
  viewId: i,
9604
9604
  ok: !1,
9605
9605
  reason: "worker-failed",
9606
- selectedIds: F.selectedIds,
9607
- skippedIds: F.skippedIds.length ? F.skippedIds : void 0,
9608
- warnings: F.warnings.length ? F.warnings : void 0,
9609
- geometryChanged: F.geometryChanged
9606
+ selectedIds: $.selectedIds,
9607
+ skippedIds: $.skippedIds.length ? $.skippedIds : void 0,
9608
+ warnings: $.warnings.length ? $.warnings : void 0,
9609
+ geometryChanged: $.geometryChanged
9610
9610
  }));
9611
9611
  }, 8e3);
9612
9612
  this.updateResolveMap.set(t, {
@@ -9628,7 +9628,7 @@ class om {
9628
9628
  t,
9629
9629
  I
9630
9630
  );
9631
- } catch (F) {
9631
+ } catch ($) {
9632
9632
  this.updateResolveMap.delete(t), clearTimeout(V), this.cancelUndoTicker(
9633
9633
  this.resolveCancelableUndoTickerId(
9634
9634
  Y.getUndoTickerId(),
@@ -9638,7 +9638,7 @@ class om {
9638
9638
  s == null ? void 0 : s.scenePath
9639
9639
  ), (G = (Z = this.logger) == null ? void 0 : Z.error) == null || G.call(
9640
9640
  Z,
9641
- `${re} updateSelectedElements dispatch failed requestId=${t} viewId=${i} err=${F == null ? void 0 : F.message}`
9641
+ `${re} updateSelectedElements dispatch failed requestId=${t} viewId=${i} err=${$ == null ? void 0 : $.message}`
9642
9642
  ), U({
9643
9643
  requestId: t,
9644
9644
  viewId: i,
@@ -10412,7 +10412,7 @@ class om {
10412
10412
  toolsType: c,
10413
10413
  style: h
10414
10414
  };
10415
- if (i && (Fe(i.canRotate) && (g.canRotate = i.canRotate), Fe(i.canLock) && (g.canLock = i.canLock), i.scaleType && (g.scaleType = i.scaleType), Fe(i.isLocked) && (g.isLocked = i.isLocked)), c === S.Text && l) {
10415
+ if (i && ($e(i.canRotate) && (g.canRotate = i.canRotate), $e(i.canLock) && (g.canLock = i.canLock), i.scaleType && (g.scaleType = i.scaleType), $e(i.isLocked) && (g.isLocked = i.isLocked)), c === S.Text && l) {
10416
10416
  const f = l, w = {
10417
10417
  text: f.text,
10418
10418
  fontSize: f.fontSize,
@@ -10512,11 +10512,11 @@ function lm(o) {
10512
10512
  function um(o, n) {
10513
10513
  return o.size > 0 ? o.has(At) ? n === At : !!n && o.has(n) : !n || o.has(n);
10514
10514
  }
10515
- function Fn(o, n) {
10515
+ function $n(o, n) {
10516
10516
  const e = n.toString();
10517
10517
  return o.isLocalId(e) ? o.transformKey(e) : e;
10518
10518
  }
10519
- function $n(o, n, e, t) {
10519
+ function Fn(o, n, e, t) {
10520
10520
  var s, a;
10521
10521
  const i = /* @__PURE__ */ new Set();
10522
10522
  if (!o)
@@ -10529,15 +10529,15 @@ function $n(o, n, e, t) {
10529
10529
  i.add(At);
10530
10530
  continue;
10531
10531
  }
10532
- const l = Fn(o, c), u = r == null ? void 0 : r[l];
10532
+ const l = $n(o, c), u = r == null ? void 0 : r[l];
10533
10533
  if (o.getLocalId(l) === Q) {
10534
10534
  (s = u == null ? void 0 : u.selectIds) == null || s.forEach((h) => {
10535
- i.add(Fn(o, h));
10535
+ i.add($n(o, h));
10536
10536
  });
10537
10537
  continue;
10538
10538
  }
10539
10539
  i.add(l), (a = u == null ? void 0 : u.selectIds) == null || a.forEach((h) => {
10540
- i.add(Fn(o, h));
10540
+ i.add($n(o, h));
10541
10541
  });
10542
10542
  }
10543
10543
  return i;
@@ -10620,7 +10620,7 @@ const Ke = class Ke {
10620
10620
  });
10621
10621
  var a, c;
10622
10622
  const { displayer: e, plugin: t, options: i } = n;
10623
- this.plugin = t, this.room = $(e) ? e : void 0, this.play = ai(e) ? e : void 0;
10623
+ this.plugin = t, this.room = F(e) ? e : void 0, this.play = ai(e) ? e : void 0;
10624
10624
  let r;
10625
10625
  this.room && (r = (a = this.room) == null ? void 0 : a.logger, this._disableDeviceInputs = this.room.disableDeviceInputs, this._disableEraseImage = this.room.disableEraseImage, this._disableEraseText = !1), this.pluginOptions = i, ((c = i.extras) == null ? void 0 : c.useWorker) === "mainThread" ? this._disableUseWorker = !0 : this._disableUseWorker = sr !== "worker", this.roomMember = new AM();
10626
10626
  const s = {
@@ -10628,7 +10628,7 @@ const Ke = class Ke {
10628
10628
  internalMsgEmitter: Ke.InternalMsgEmitter,
10629
10629
  publicMsgEmitter: Ke.PublicMsgEmitter
10630
10630
  };
10631
- this.cursor = new zM(s), this.textEditorManager = new Hf(s), this.worker = new By(s), this.hotkeyManager = new Wy(s), this.renderControl = new Vy(s), this.pluginManager = new $y(s), this.isUseSimple || (this.miniMapManager = new Fy(s)), this.logger = new ji(r);
10631
+ this.cursor = new zM(s), this.textEditorManager = new Hf(s), this.worker = new By(s), this.hotkeyManager = new Wy(s), this.renderControl = new Vy(s), this.pluginManager = new Fy(s), this.isUseSimple || (this.miniMapManager = new $y(s)), this.logger = new ji(r);
10632
10632
  }
10633
10633
  /** WB-429: selector API 事件派发用,指向 BaseApplianceManager.PublicMsgEmitter */
10634
10634
  get publicMsgEmitter() {
@@ -11437,7 +11437,7 @@ const ct = class ct {
11437
11437
  const i = this.pendingState.get(n);
11438
11438
  if (!i || i.scenePath !== e || !t.length)
11439
11439
  return;
11440
- $n(
11440
+ Fn(
11441
11441
  this.collector,
11442
11442
  this.viewId,
11443
11443
  e,
@@ -11450,7 +11450,7 @@ const ct = class ct {
11450
11450
  const i = this.pendingState.get(n);
11451
11451
  if (!i || i.scenePath !== e || !t.length)
11452
11452
  return;
11453
- const r = $n(
11453
+ const r = Fn(
11454
11454
  this.collector,
11455
11455
  this.viewId,
11456
11456
  e,
@@ -11468,7 +11468,7 @@ const ct = class ct {
11468
11468
  const i = this.pendingState.get(n);
11469
11469
  if (!i || i.scenePath !== e)
11470
11470
  return;
11471
- const r = $n(
11471
+ const r = Fn(
11472
11472
  this.collector,
11473
11473
  this.viewId,
11474
11474
  e,
@@ -11951,19 +11951,19 @@ const ct = class ct {
11951
11951
  if (V) {
11952
11952
  const Y = U.filter(
11953
11953
  (G) => {
11954
- var F, X;
11955
- return ((F = this.collector) == null ? void 0 : F.getLocalId(G)) === Q && !((X = this.collector) != null && X.isOwn(G));
11954
+ var $, X;
11955
+ return (($ = this.collector) == null ? void 0 : $.getLocalId(G)) === Q && !((X = this.collector) != null && X.isOwn(G));
11956
11956
  }
11957
11957
  ).map(
11958
11958
  (G) => {
11959
- var F;
11960
- return (F = this.collector) == null ? void 0 : F.storage[this.viewId][i][G];
11959
+ var $;
11960
+ return ($ = this.collector) == null ? void 0 : $.storage[this.viewId][i][G];
11961
11961
  }
11962
11962
  );
11963
11963
  let Z = !1;
11964
11964
  for (const G of Y)
11965
- for (let F = 0; F < V.length; F++)
11966
- (g = G == null ? void 0 : G.selectIds) != null && g.includes(V[F]) && (delete V[F], Z = !0);
11965
+ for (let $ = 0; $ < V.length; $++)
11966
+ (g = G == null ? void 0 : G.selectIds) != null && g.includes(V[$]) && (delete V[$], Z = !0);
11967
11967
  Z && (b.selectIds = V.filter((G) => !!G));
11968
11968
  }
11969
11969
  }
@@ -11980,19 +11980,19 @@ const ct = class ct {
11980
11980
  if (V) {
11981
11981
  const Y = U.filter(
11982
11982
  (G) => {
11983
- var F, X;
11984
- return ((F = this.collector) == null ? void 0 : F.getLocalId(G)) === Q && !((X = this.collector) != null && X.isOwn(G));
11983
+ var $, X;
11984
+ return (($ = this.collector) == null ? void 0 : $.getLocalId(G)) === Q && !((X = this.collector) != null && X.isOwn(G));
11985
11985
  }
11986
11986
  ).map(
11987
11987
  (G) => {
11988
- var F;
11989
- return (F = this.collector) == null ? void 0 : F.storage[this.viewId][i][G];
11988
+ var $;
11989
+ return ($ = this.collector) == null ? void 0 : $.storage[this.viewId][i][G];
11990
11990
  }
11991
11991
  );
11992
11992
  let Z = !1;
11993
11993
  for (const G of Y)
11994
- for (let F = 0; F < V.length; F++)
11995
- (I = G == null ? void 0 : G.selectIds) != null && I.includes(V[F]) && (delete V[F], Z = !0);
11994
+ for (let $ = 0; $ < V.length; $++)
11995
+ (I = G == null ? void 0 : G.selectIds) != null && I.includes(V[$]) && (delete V[$], Z = !0);
11996
11996
  Z && (b.selectIds = V.filter((G) => !!G));
11997
11997
  }
11998
11998
  }
@@ -12008,21 +12008,21 @@ const ct = class ct {
12008
12008
  const Y = V.selectIds;
12009
12009
  if (Y) {
12010
12010
  const Z = U.filter(
12011
- (F) => {
12011
+ ($) => {
12012
12012
  var X, Se;
12013
- return ((X = this.collector) == null ? void 0 : X.getLocalId(F)) === Q && !((Se = this.collector) != null && Se.isOwn(F));
12013
+ return ((X = this.collector) == null ? void 0 : X.getLocalId($)) === Q && !((Se = this.collector) != null && Se.isOwn($));
12014
12014
  }
12015
12015
  ).map(
12016
- (F) => {
12016
+ ($) => {
12017
12017
  var X;
12018
- return (X = this.collector) == null ? void 0 : X.storage[this.viewId][i][F];
12018
+ return (X = this.collector) == null ? void 0 : X.storage[this.viewId][i][$];
12019
12019
  }
12020
12020
  );
12021
12021
  let G = !1;
12022
- for (const F of Z)
12022
+ for (const $ of Z)
12023
12023
  for (let X = 0; X < Y.length; X++)
12024
- F != null && F.selectIds && ((v = F.selectIds) != null && v.includes(Y[X])) && (delete Y[X], G = !0);
12025
- G && (V.selectIds = Y.filter((F) => !!F));
12024
+ $ != null && $.selectIds && ((v = $.selectIds) != null && v.includes(Y[X])) && (delete Y[X], G = !0);
12025
+ G && (V.selectIds = Y.filter(($) => !!$));
12026
12026
  }
12027
12027
  }
12028
12028
  a[P] = V, c = !0;
@@ -12032,21 +12032,21 @@ const ct = class ct {
12032
12032
  const Y = V.selectIds;
12033
12033
  if (Y) {
12034
12034
  const Z = U.filter(
12035
- (F) => {
12035
+ ($) => {
12036
12036
  var X, Se;
12037
- return ((X = this.collector) == null ? void 0 : X.getLocalId(F)) === Q && !((Se = this.collector) != null && Se.isOwn(F));
12037
+ return ((X = this.collector) == null ? void 0 : X.getLocalId($)) === Q && !((Se = this.collector) != null && Se.isOwn($));
12038
12038
  }
12039
12039
  ).map(
12040
- (F) => {
12040
+ ($) => {
12041
12041
  var X;
12042
- return (X = this.collector) == null ? void 0 : X.storage[this.viewId][i][F];
12042
+ return (X = this.collector) == null ? void 0 : X.storage[this.viewId][i][$];
12043
12043
  }
12044
12044
  );
12045
12045
  let G = !1;
12046
- for (const F of Z)
12046
+ for (const $ of Z)
12047
12047
  for (let X = 0; X < Y.length; X++)
12048
- F != null && F.selectIds && F.selectIds.includes(Y[X]) && (delete Y[X], G = !0);
12049
- G && (V.selectIds = Y.filter((F) => !!F));
12048
+ $ != null && $.selectIds && $.selectIds.includes(Y[X]) && (delete Y[X], G = !0);
12049
+ G && (V.selectIds = Y.filter(($) => !!$));
12050
12050
  }
12051
12051
  }
12052
12052
  a[x.key] = V, c = !0;
@@ -12311,20 +12311,20 @@ class tn {
12311
12311
  canvasFloatRef: O,
12312
12312
  canvasServiceFloatRef: U,
12313
12313
  canvasTopRef: V
12314
- } = D, Y = Math.floor(v.w * b), Z = Math.floor(v.h * b), G = v.x * b, F = v.y * b;
12314
+ } = D, Y = Math.floor(v.w * b), Z = Math.floor(v.h * b), G = v.x * b, $ = v.y * b;
12315
12315
  if (C) {
12316
12316
  switch (A) {
12317
12317
  case at.TopFloat:
12318
- (i = (t = V == null ? void 0 : V.current) == null ? void 0 : t.getContext("2d")) == null || i.clearRect(G, F, Y, Z);
12318
+ (i = (t = V == null ? void 0 : V.current) == null ? void 0 : t.getContext("2d")) == null || i.clearRect(G, $, Y, Z);
12319
12319
  break;
12320
12320
  case at.Float:
12321
- (s = (r = O.current) == null ? void 0 : r.getContext("2d")) == null || s.clearRect(G, F, Y, Z);
12321
+ (s = (r = O.current) == null ? void 0 : r.getContext("2d")) == null || s.clearRect(G, $, Y, Z);
12322
12322
  break;
12323
12323
  case at.ServiceFloat:
12324
- (c = (a = U.current) == null ? void 0 : a.getContext("2d")) == null || c.clearRect(G, F, Y, Z);
12324
+ (c = (a = U.current) == null ? void 0 : a.getContext("2d")) == null || c.clearRect(G, $, Y, Z);
12325
12325
  break;
12326
12326
  case at.Bg:
12327
- (u = (l = P.current) == null ? void 0 : l.getContext("2d")) == null || u.clearRect(G, F, Y, Z);
12327
+ (u = (l = P.current) == null ? void 0 : l.getContext("2d")) == null || u.clearRect(G, $, Y, Z);
12328
12328
  break;
12329
12329
  }
12330
12330
  continue;
@@ -12332,18 +12332,18 @@ class tn {
12332
12332
  if (L && N)
12333
12333
  switch (L) {
12334
12334
  case at.TopFloat:
12335
- (g = (h = V == null ? void 0 : V.current) == null ? void 0 : h.getContext("2d")) == null || g.drawImage(N, 0, 0, Y, Z, G, F, Y, Z);
12335
+ (g = (h = V == null ? void 0 : V.current) == null ? void 0 : h.getContext("2d")) == null || g.drawImage(N, 0, 0, Y, Z, G, $, Y, Z);
12336
12336
  break;
12337
12337
  case at.Float: {
12338
- (d = (p = O.current) == null ? void 0 : p.getContext("2d")) == null || d.drawImage(N, 0, 0, Y, Z, G, F, Y, Z);
12338
+ (d = (p = O.current) == null ? void 0 : p.getContext("2d")) == null || d.drawImage(N, 0, 0, Y, Z, G, $, Y, Z);
12339
12339
  break;
12340
12340
  }
12341
12341
  case at.ServiceFloat: {
12342
- (I = (M = U.current) == null ? void 0 : M.getContext("2d")) == null || I.drawImage(N, 0, 0, Y, Z, G, F, Y, Z);
12342
+ (I = (M = U.current) == null ? void 0 : M.getContext("2d")) == null || I.drawImage(N, 0, 0, Y, Z, G, $, Y, Z);
12343
12343
  break;
12344
12344
  }
12345
12345
  case at.Bg: {
12346
- (f = (y = P.current) == null ? void 0 : y.getContext("2d")) == null || f.drawImage(N, 0, 0, Y, Z, G, F, Y, Z);
12346
+ (f = (y = P.current) == null ? void 0 : y.getContext("2d")) == null || f.drawImage(N, 0, 0, Y, Z, G, $, Y, Z);
12347
12347
  break;
12348
12348
  }
12349
12349
  }
@@ -13737,7 +13737,7 @@ const Dm = (o) => {
13737
13737
  src: We(n ? "line-through-active" : "line-through")
13738
13738
  }
13739
13739
  ));
13740
- }, Fm = (o) => {
13740
+ }, $m = (o) => {
13741
13741
  const { italic: n, setItalic: e, workIds: t, viewId: i } = o, r = (s) => {
13742
13742
  const a = n === "italic" ? "normal" : "italic";
13743
13743
  s == null || s.stopPropagation(), e(a), te.emitMethod(
@@ -13753,7 +13753,7 @@ const Dm = (o) => {
13753
13753
  src: We(n === "italic" ? "italic-active" : "italic")
13754
13754
  }
13755
13755
  ));
13756
- }, $m = (o) => {
13756
+ }, Fm = (o) => {
13757
13757
  const {
13758
13758
  open: n,
13759
13759
  setOpen: e,
@@ -13763,7 +13763,7 @@ const Dm = (o) => {
13763
13763
  floatBarRef: s
13764
13764
  } = o, { mananger: a, floatBarData: c } = ze(De), [l, u] = ce("normal"), [h, g] = ce("normal"), [p, d] = ce(!1), [M, I] = ce(!1);
13765
13765
  fe(() => {
13766
- t != null && t.bold && u(t.bold), Fe(t == null ? void 0 : t.underline) && d(t.underline || !1), Fe(t == null ? void 0 : t.lineThrough) && I(t.lineThrough || !1), t != null && t.italic && g(t.italic);
13766
+ t != null && t.bold && u(t.bold), $e(t == null ? void 0 : t.underline) && d(t.underline || !1), $e(t == null ? void 0 : t.lineThrough) && I(t.lineThrough || !1), t != null && t.italic && g(t.italic);
13767
13767
  }, [t]);
13768
13768
  const y = q(() => {
13769
13769
  if (r && (s != null && s.current) && K(c == null ? void 0 : c.y) && (a != null && a.height)) {
@@ -13812,7 +13812,7 @@ const Dm = (o) => {
13812
13812
  }
13813
13813
  ),
13814
13814
  /* @__PURE__ */ T.createElement(
13815
- Fm,
13815
+ $m,
13816
13816
  {
13817
13817
  workIds: i || [Q],
13818
13818
  italic: h,
@@ -14521,7 +14521,7 @@ const Dm = (o) => {
14521
14521
  workIds: e
14522
14522
  }
14523
14523
  ) : null, [n, l, e, c, p]), f = q(() => n && (c != null && c.viewId) ? /* @__PURE__ */ T.createElement(
14524
- $m,
14524
+ Fm,
14525
14525
  {
14526
14526
  floatBarRef: p,
14527
14527
  open: l === 6,
@@ -14757,7 +14757,7 @@ const Dm = (o) => {
14757
14757
  fontStyle: D.fontStyle,
14758
14758
  fontWeight: D.fontWeight,
14759
14759
  fontFamily: D.fontFamily
14760
- }), G = q(() => typeof window > "u" ? !1 : navigator.maxTouchPoints > 0 || "ontouchstart" in window, []), F = q(() => u === e ? "hover" : g.workState === j.Doing || g.workState === j.Start ? "editing" : l ? "active" : "none", [u, e, g.workState, l]);
14760
+ }), G = q(() => typeof window > "u" ? !1 : navigator.maxTouchPoints > 0 || "ontouchstart" in window, []), $ = q(() => u === e ? "hover" : g.workState === j.Doing || g.workState === j.Start ? "editing" : l ? "active" : "none", [u, e, g.workState, l]);
14761
14761
  function X(H) {
14762
14762
  if (!x.current)
14763
14763
  return;
@@ -14795,7 +14795,7 @@ const Dm = (o) => {
14795
14795
  hasSelectionInEditor: Mr(xe, Pe),
14796
14796
  rangeCount: xe.rangeCount,
14797
14797
  isCollapsed: xe.isCollapsed
14798
- }) || (FM(xe, Pe), Y.current = !1);
14798
+ }) || ($M(xe, Pe), Y.current = !1);
14799
14799
  }
14800
14800
  };
14801
14801
  pe(), ke(ie), G && (O.current = requestAnimationFrame(() => {
@@ -14812,9 +14812,9 @@ const Dm = (o) => {
14812
14812
  zIndex: 2,
14813
14813
  transform: H,
14814
14814
  transformOrigin: "left top",
14815
- borderColor: F === "editing" || F === "hover" ? v : "transparent"
14815
+ borderColor: $ === "editing" || $ === "hover" ? v : "transparent"
14816
14816
  };
14817
- }, [p, d, M, I, v, F]), le = q(() => {
14817
+ }, [p, d, M, I, v, $]), le = q(() => {
14818
14818
  let H = "";
14819
14819
  const ee = "<div></div>";
14820
14820
  if (g.text) {
@@ -14840,7 +14840,7 @@ const Dm = (o) => {
14840
14840
  return H;
14841
14841
  }, [g.fontBgColor, g.text]), Ie = q(() => {
14842
14842
  var H, ee;
14843
- if (F === "hover") {
14843
+ if ($ === "hover") {
14844
14844
  if (p && t && K(M) && K(I) && g.boxSize && K((H = g.boxSize) == null ? void 0 : H[0]) && K((ee = g.boxSize) == null ? void 0 : ee[1])) {
14845
14845
  const ie = { x: M, y: I }, pe = {
14846
14846
  left: M,
@@ -14864,7 +14864,7 @@ const Dm = (o) => {
14864
14864
  return null;
14865
14865
  }
14866
14866
  return null;
14867
- }, [g, t, e, M, I, p, F]);
14867
+ }, [g, t, e, M, I, p, $]);
14868
14868
  fe(() => {
14869
14869
  V.current = u === e, u !== e && (O.current && (cancelAnimationFrame(O.current), O.current = void 0), U.current && (window.clearTimeout(U.current), U.current = void 0), Y.current = !1);
14870
14870
  }, [u, e]), fe(() => {
@@ -14906,7 +14906,7 @@ const Dm = (o) => {
14906
14906
  a(e, ee);
14907
14907
  }
14908
14908
  }
14909
- }, [D, e, a, F, l, u]);
14909
+ }, [D, e, a, $, l, u]);
14910
14910
  const ue = jt(
14911
14911
  (H) => {
14912
14912
  const ee = h == null ? void 0 : h.parentElement, ie = x.current;
@@ -14919,7 +14919,7 @@ const Dm = (o) => {
14919
14919
  if (!ke || !ve)
14920
14920
  return !1;
14921
14921
  if (ke.right + H > ve.right) {
14922
- const { textContent: Pe, textNodes: xe } = $M(pe);
14922
+ const { textContent: Pe, textNodes: xe } = FM(pe);
14923
14923
  if (!xe.length)
14924
14924
  return !1;
14925
14925
  const Ye = Pe.length, Be = Xt(xe, 0);
@@ -15089,31 +15089,31 @@ const Dm = (o) => {
15089
15089
  Le(), s();
15090
15090
  }
15091
15091
  const Ht = jt(() => {
15092
- if (F === "active" && x.current && x.current.parentElement) {
15092
+ if ($ === "active" && x.current && x.current.parentElement) {
15093
15093
  const H = x.current.parentElement;
15094
15094
  H.style.borderColor = v;
15095
15095
  }
15096
- }, [F, v]), cn = jt(() => {
15097
- if (F === "active" && x.current && x.current.parentElement) {
15096
+ }, [$, v]), cn = jt(() => {
15097
+ if ($ === "active" && x.current && x.current.parentElement) {
15098
15098
  const H = x.current.parentElement;
15099
15099
  H.style.borderColor = "transparent";
15100
15100
  }
15101
- }, [F]);
15101
+ }, [$]);
15102
15102
  return /* @__PURE__ */ T.createElement(T.Fragment, null, Ie, /* @__PURE__ */ T.createElement(
15103
15103
  "div",
15104
15104
  {
15105
- className: `editor-box ${F}`,
15105
+ className: `editor-box ${$}`,
15106
15106
  style: Se,
15107
15107
  onPointerUp: () => {
15108
15108
  var H;
15109
- if (F === "editing") {
15109
+ if ($ === "editing") {
15110
15110
  s(() => {
15111
15111
  var ee;
15112
15112
  (ee = document.activeElement) == null || ee.blur(), h == null || h.control.textEditorManager.checkEmptyTextBlur();
15113
15113
  });
15114
15114
  return;
15115
15115
  }
15116
- if (F === "active" && h) {
15116
+ if ($ === "active" && h) {
15117
15117
  if ((H = h.control.collector) != null && H.hasIncludeSelector(e)) {
15118
15118
  s(() => {
15119
15119
  var ee;
@@ -16697,7 +16697,7 @@ class Di extends T.Component {
16697
16697
  activeMiniMapViewId: (r = this.props.mananger.control.miniMapManager) == null ? void 0 : r.activeViewId
16698
16698
  };
16699
16699
  const t = this.props.mananger.control.pluginOptions.extras.textEditor;
16700
- this.showTextFloatBar = Fe(t.showFloatBar) ? t.showFloatBar : Ne.textEditor.showFloatBar, this.canSelectorSwitch = Fe(t == null ? void 0 : t.canSelectorSwitch) ? t.canSelectorSwitch : Ne.textEditor.canSelectorSwitch, this.rightBoundBreak = Fe(t == null ? void 0 : t.rightBoundBreak) ? t.rightBoundBreak : Ne.textEditor.rightBoundBreak;
16700
+ this.showTextFloatBar = $e(t.showFloatBar) ? t.showFloatBar : Ne.textEditor.showFloatBar, this.canSelectorSwitch = $e(t == null ? void 0 : t.canSelectorSwitch) ? t.canSelectorSwitch : Ne.textEditor.canSelectorSwitch, this.rightBoundBreak = $e(t == null ? void 0 : t.rightBoundBreak) ? t.rightBoundBreak : Ne.textEditor.rightBoundBreak;
16701
16701
  }
16702
16702
  get editors() {
16703
16703
  return An(
@@ -17525,7 +17525,7 @@ const z = class z extends zr {
17525
17525
  var t, i;
17526
17526
  e != null && e.roomMembers && ((t = z.currentManager) == null || t.onRoomMembersChange(
17527
17527
  e.roomMembers
17528
- )), !($(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i = z.currentManager) == null || i.onMemberChange(
17528
+ )), !(F(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i = z.currentManager) == null || i.onMemberChange(
17529
17529
  e.memberState
17530
17530
  ));
17531
17531
  });
@@ -17537,7 +17537,7 @@ const z = class z extends zr {
17537
17537
  ));
17538
17538
  const i = e.displayer, r = i.callbacks.on, s = i.callbacks.off, a = i.callbacks.once, c = e.cleanCurrentScene, l = e.mainView.setMemberState;
17539
17539
  let u;
17540
- $(i) && (u = i.setWritable), t != null && t.logger && (z.logger = new ji(t.logger));
17540
+ F(i) && (u = i.setWritable), t != null && t.logger && (z.logger = new ji(t.logger));
17541
17541
  let h = i.getInvisiblePlugin(
17542
17542
  z.kind
17543
17543
  );
@@ -17664,20 +17664,20 @@ const z = class z extends zr {
17664
17664
  _callbacksOn: function(y, f) {
17665
17665
  z.logger.info(
17666
17666
  `[ApplianceMultiPlugin] callbacks ${y}`
17667
- ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && $(i) && i.isWritable ? gt.InternalMsgEmitter.on(y, f) : r.call(i.callbacks, y, f);
17667
+ ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && F(i) && i.isWritable ? gt.InternalMsgEmitter.on(y, f) : r.call(i.callbacks, y, f);
17668
17668
  },
17669
17669
  _callbacksOnce: function(y, f) {
17670
17670
  z.logger.info(
17671
17671
  `[ApplianceMultiPlugin] callbacks ${y}`
17672
- ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && $(i) && i.isWritable ? gt.InternalMsgEmitter.on(y, f) : a.call(i.callbacks, y, f);
17672
+ ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && F(i) && i.isWritable ? gt.InternalMsgEmitter.on(y, f) : a.call(i.callbacks, y, f);
17673
17673
  },
17674
17674
  _callbacksOff: function(y, f) {
17675
17675
  z.logger.info(
17676
17676
  `[ApplianceMultiPlugin] callbacks ${y}`
17677
- ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && $(i) && i.isWritable ? gt.InternalMsgEmitter.off(y, f) : s.call(i.callbacks, y, f);
17677
+ ), (y === "onCanUndoStepsUpdate" || y === "onCanRedoStepsUpdate") && F(i) && i.isWritable ? gt.InternalMsgEmitter.off(y, f) : s.call(i.callbacks, y, f);
17678
17678
  },
17679
17679
  canRedoSteps() {
17680
- if (z.logger.info("[ApplianceMultiPlugin] canRedoSteps"), z.currentManager && $(i) && !i.disableSerialization) {
17680
+ if (z.logger.info("[ApplianceMultiPlugin] canRedoSteps"), z.currentManager && F(i) && !i.disableSerialization) {
17681
17681
  const y = z.currentManager.viewContainerManager.focuedView, f = y == null ? void 0 : y.focusScenePath;
17682
17682
  if (y && f)
17683
17683
  return y.displayer.commiter.redoStack.filter(
@@ -17687,7 +17687,7 @@ const z = class z extends zr {
17687
17687
  return 0;
17688
17688
  },
17689
17689
  canUndoSteps() {
17690
- if (z.logger.info("[ApplianceMultiPlugin] canUndoSteps"), z.currentManager && $(i) && !i.disableSerialization) {
17690
+ if (z.logger.info("[ApplianceMultiPlugin] canUndoSteps"), z.currentManager && F(i) && !i.disableSerialization) {
17691
17691
  const y = z.currentManager.viewContainerManager.focuedView, f = y == null ? void 0 : y.focusScenePath;
17692
17692
  if (y && f)
17693
17693
  return y.displayer.commiter.undoStack.filter(
@@ -17697,20 +17697,20 @@ const z = class z extends zr {
17697
17697
  return 0;
17698
17698
  },
17699
17699
  undo: function() {
17700
- return z.logger.info("[ApplianceMultiPlugin] undo"), z.currentManager && $(i) && !i.disableSerialization && i.isWritable ? z.currentManager.viewContainerManager.undo() : 0;
17700
+ return z.logger.info("[ApplianceMultiPlugin] undo"), z.currentManager && F(i) && !i.disableSerialization && i.isWritable ? z.currentManager.viewContainerManager.undo() : 0;
17701
17701
  },
17702
17702
  redo: function() {
17703
- return z.logger.info("[ApplianceMultiPlugin] redo"), z.currentManager && $(i) && !i.disableSerialization && i.isWritable ? z.currentManager.viewContainerManager.redo() : 0;
17703
+ return z.logger.info("[ApplianceMultiPlugin] redo"), z.currentManager && F(i) && !i.disableSerialization && i.isWritable ? z.currentManager.viewContainerManager.redo() : 0;
17704
17704
  },
17705
17705
  cleanCurrentScene: function() {
17706
17706
  z.logger.info(
17707
17707
  "[ApplianceMultiPlugin] cleanCurrentScene"
17708
- ), z.currentManager && $(i) && i.isWritable && (z.currentManager.logger.info(
17708
+ ), z.currentManager && F(i) && i.isWritable && (z.currentManager.logger.info(
17709
17709
  "[Appliance]: cleanCurrentScene"
17710
17710
  ), z.currentManager.cleanCurrentScene(), c.call(e));
17711
17711
  },
17712
17712
  insertImage: function(y) {
17713
- if (z.logger.info("[ApplianceMultiPlugin] insertImage"), z.currentManager && $(i) && i.isWritable) {
17713
+ if (z.logger.info("[ApplianceMultiPlugin] insertImage"), z.currentManager && F(i) && i.isWritable) {
17714
17714
  const f = z.currentManager.viewContainerManager.focuedViewId || se;
17715
17715
  z.currentManager.worker.insertImage(
17716
17716
  f,
@@ -17719,7 +17719,7 @@ const z = class z extends zr {
17719
17719
  }
17720
17720
  },
17721
17721
  lockImage: function(y, f) {
17722
- if (z.logger.info("[ApplianceMultiPlugin] lockImage"), z.currentManager && $(i) && i.isWritable) {
17722
+ if (z.logger.info("[ApplianceMultiPlugin] lockImage"), z.currentManager && F(i) && i.isWritable) {
17723
17723
  const w = z.currentManager.viewContainerManager.focuedViewId || se;
17724
17724
  z.currentManager.worker.lockImage(
17725
17725
  w,
@@ -17731,7 +17731,7 @@ const z = class z extends zr {
17731
17731
  completeImageUpload: function(y, f) {
17732
17732
  if (z.logger.info(
17733
17733
  "[ApplianceMultiPlugin] completeImageUpload"
17734
- ), z.currentManager && $(i) && i.isWritable) {
17734
+ ), z.currentManager && F(i) && i.isWritable) {
17735
17735
  const w = z.currentManager.viewContainerManager.focuedViewId || se;
17736
17736
  z.currentManager.worker.completeImageUpload(
17737
17737
  w,
@@ -17743,12 +17743,12 @@ const z = class z extends zr {
17743
17743
  getImagesInformation: function(y) {
17744
17744
  return z.logger.info(
17745
17745
  "[ApplianceMultiPlugin] completeImageUpload"
17746
- ), z.currentManager && $(i) && i.isWritable ? z.currentManager.worker.getImagesInformation(
17746
+ ), z.currentManager && F(i) && i.isWritable ? z.currentManager.worker.getImagesInformation(
17747
17747
  y
17748
17748
  ) : [];
17749
17749
  },
17750
17750
  insertText: function(y, f, w) {
17751
- if (z.logger.info("[ApplianceMultiPlugin] insertText"), z.currentManager && $(i) && i.isWritable) {
17751
+ if (z.logger.info("[ApplianceMultiPlugin] insertText"), z.currentManager && F(i) && i.isWritable) {
17752
17752
  const v = z.currentManager.viewContainerManager.focuedViewId || se;
17753
17753
  return z.currentManager.textEditorManager.insertText(
17754
17754
  v,
@@ -17759,7 +17759,7 @@ const z = class z extends zr {
17759
17759
  }
17760
17760
  },
17761
17761
  updateText: function(y, f) {
17762
- z.logger.info("[ApplianceMultiPlugin] updateText"), z.currentManager && $(i) && i.isWritable && z.currentManager.textEditorManager.updateText(
17762
+ z.logger.info("[ApplianceMultiPlugin] updateText"), z.currentManager && F(i) && i.isWritable && z.currentManager.textEditorManager.updateText(
17763
17763
  y,
17764
17764
  f
17765
17765
  );
@@ -17783,7 +17783,7 @@ const z = class z extends zr {
17783
17783
  `[Appliance]: setMemberState ${JSON.stringify(y)}`
17784
17784
  );
17785
17785
  const f = Object.keys(y);
17786
- if ($(i) && i.isWritable) {
17786
+ if (F(i) && i.isWritable) {
17787
17787
  if (f.includes("currentApplianceName"))
17788
17788
  if (y.currentApplianceName && y.currentApplianceName === oe.laserPen) {
17789
17789
  if (z.currentManager.isUseSimple)
@@ -17810,7 +17810,7 @@ const z = class z extends zr {
17810
17810
  createMiniMap: async function(y, f) {
17811
17811
  if (z.logger.info(
17812
17812
  "[ApplianceMultiPlugin] createMiniMap"
17813
- ), z.currentManager && $(i) && i.isWritable)
17813
+ ), z.currentManager && F(i) && i.isWritable)
17814
17814
  return z.currentManager.logger.info(
17815
17815
  "[Appliance]: [ApplianceMultiPlugin] createMiniMap"
17816
17816
  ), z.currentManager.createMiniMap(y, f);
@@ -17818,7 +17818,7 @@ const z = class z extends zr {
17818
17818
  destroyMiniMap: async function(y) {
17819
17819
  if (z.logger.info(
17820
17820
  "[ApplianceMultiPlugin] destroyeMiniMap"
17821
- ), z.currentManager && $(i) && i.isWritable)
17821
+ ), z.currentManager && F(i) && i.isWritable)
17822
17822
  return z.currentManager.logger.info(
17823
17823
  "[Appliance]: [ApplianceMultiPlugin] destroyeMiniMap"
17824
17824
  ), z.currentManager.destroyMiniMap(y);
@@ -17826,7 +17826,7 @@ const z = class z extends zr {
17826
17826
  filterRenderByUid(y, f, w) {
17827
17827
  if (z.logger.info(
17828
17828
  "[ApplianceMultiPlugin] filterRenderByUid"
17829
- ), z.currentManager && $(i) && i.isWritable)
17829
+ ), z.currentManager && F(i) && i.isWritable)
17830
17830
  return z.currentManager.filterRenderByUid(
17831
17831
  y,
17832
17832
  f,
@@ -17836,7 +17836,7 @@ const z = class z extends zr {
17836
17836
  cancelFilterRender(y, f) {
17837
17837
  if (z.logger.info(
17838
17838
  "[ApplianceMultiPlugin] filterRenderByUid"
17839
- ), z.currentManager && $(i) && i.isWritable)
17839
+ ), z.currentManager && F(i) && i.isWritable)
17840
17840
  return z.currentManager.cancelFilterRender(
17841
17841
  y,
17842
17842
  f
@@ -17860,37 +17860,37 @@ const z = class z extends zr {
17860
17860
  ), (f = z.currentManager) == null || f.usePlugin(y);
17861
17861
  },
17862
17862
  getDisableDeviceInputs() {
17863
- if (z.currentManager && $(i))
17863
+ if (z.currentManager && F(i))
17864
17864
  return z.currentManager.disableDeviceInputs;
17865
17865
  },
17866
17866
  setDisableDeviceInputs(y) {
17867
17867
  z.logger.info(
17868
17868
  `[ApplianceMultiPlugin] setDisableDeviceInputs ${y}`
17869
- ), z.currentManager && $(i) && (z.currentManager.disableDeviceInputs = y);
17869
+ ), z.currentManager && F(i) && (z.currentManager.disableDeviceInputs = y);
17870
17870
  },
17871
17871
  getDisableCameraTransform() {
17872
- if (z.currentManager && $(i))
17872
+ if (z.currentManager && F(i))
17873
17873
  return z.currentManager.disableCameraTransform;
17874
17874
  },
17875
17875
  setDisableCameraTransform(y) {
17876
17876
  z.logger.info(
17877
17877
  `[ApplianceMultiPlugin] setDisableCameraTransform ${y}`
17878
- ), z.currentManager && $(i) && (z.currentManager.disableCameraTransform = y);
17878
+ ), z.currentManager && F(i) && (z.currentManager.disableCameraTransform = y);
17879
17879
  },
17880
17880
  getDisableEraseImage() {
17881
- if (z.currentManager && $(i))
17881
+ if (z.currentManager && F(i))
17882
17882
  return z.currentManager.disableEraseImage;
17883
17883
  },
17884
17884
  setDisableEraseImage(y) {
17885
17885
  z.logger.info(
17886
17886
  `[ApplianceMultiPlugin] setDisableEraseImage ${y}`
17887
- ), z.currentManager && $(i) && (z.currentManager.disableEraseImage = y);
17887
+ ), z.currentManager && F(i) && (z.currentManager.disableEraseImage = y);
17888
17888
  },
17889
17889
  setWritable: async function(y) {
17890
17890
  var f;
17891
17891
  z.logger.info(
17892
17892
  `[ApplianceMultiPlugin] setWritable ${y}`
17893
- ), $(i) && u && (await ((f = z.currentManager) == null ? void 0 : f.setWritable(y)), await u.call(i, y));
17893
+ ), F(i) && u && (await ((f = z.currentManager) == null ? void 0 : f.setWritable(y)), await u.call(i, y));
17894
17894
  },
17895
17895
  requestIdleCallback: (y, f) => {
17896
17896
  const w = (f == null ? void 0 : f.timeout) || 0, v = performance.now();
@@ -17945,13 +17945,13 @@ const z = class z extends zr {
17945
17945
  f === "callbacks" && (y.callbacks.on = g._callbacksOn.bind(g), y.callbacks.off = g._callbacksOff.bind(g), y.callbacks.once = g._callbacksOnce.bind(g));
17946
17946
  },
17947
17947
  blurText: () => {
17948
- z.logger.info("[ApplianceMultiPlugin] blurText"), z.currentManager && $(i) && i.isWritable && z.currentManager.textEditorManager.checkEmptyTextBlur();
17948
+ z.logger.info("[ApplianceMultiPlugin] blurText"), z.currentManager && F(i) && i.isWritable && z.currentManager.textEditorManager.checkEmptyTextBlur();
17949
17949
  },
17950
17950
  hasElements: (y, f) => {
17951
17951
  var w;
17952
17952
  if (z.logger.info(
17953
17953
  `[ApplianceMultiPlugin] hasElements ${y}`
17954
- ), z.currentManager && $(i) && i.isWritable) {
17954
+ ), z.currentManager && F(i) && i.isWritable) {
17955
17955
  let v = y;
17956
17956
  if (!v) {
17957
17957
  const N = z.currentManager.viewContainerManager.focuedView;
@@ -17976,7 +17976,7 @@ const z = class z extends zr {
17976
17976
  var w;
17977
17977
  if (z.logger.info(
17978
17978
  `[ApplianceMultiPlugin] getElements ${y}`
17979
- ), z.currentManager && $(i) && i.isWritable) {
17979
+ ), z.currentManager && F(i) && i.isWritable) {
17980
17980
  let v = y;
17981
17981
  if (!v) {
17982
17982
  const N = z.currentManager.viewContainerManager.focuedView;
@@ -17996,7 +17996,7 @@ const z = class z extends zr {
17996
17996
  stopDraw: (y) => {
17997
17997
  if (z.logger.info(
17998
17998
  `[ApplianceMultiPlugin] stopDraw ${y}`
17999
- ), z.currentManager && $(i))
17999
+ ), z.currentManager && F(i))
18000
18000
  return z.currentManager.stopDraw(y);
18001
18001
  },
18002
18002
  setViewLocalScenePathChange: async (y, f) => {
@@ -18048,7 +18048,7 @@ const z = class z extends zr {
18048
18048
  },
18049
18049
  blurSelector: (y) => {
18050
18050
  var f;
18051
- if (z.currentManager && $(i) && i.isWritable) {
18051
+ if (z.currentManager && F(i) && i.isWritable) {
18052
18052
  const w = (f = z.currentManager) == null ? void 0 : f.selectorApi;
18053
18053
  return w ? w.blurSelector(y) : Promise.resolve({
18054
18054
  ok: !1,
@@ -18066,7 +18066,7 @@ const z = class z extends zr {
18066
18066
  },
18067
18067
  updateSelectedElements: (y, f) => {
18068
18068
  var w;
18069
- if (z.currentManager && $(i) && i.isWritable) {
18069
+ if (z.currentManager && F(i) && i.isWritable) {
18070
18070
  const v = (w = z.currentManager) == null ? void 0 : w.selectorApi;
18071
18071
  return v ? v.updateSelectedElements(y, f) : Promise.resolve({
18072
18072
  requestId: `update-${Date.now().toString(36)}`,
@@ -18084,7 +18084,7 @@ const z = class z extends zr {
18084
18084
  },
18085
18085
  updateElement: (y, f, w, v, N = !0) => {
18086
18086
  var C;
18087
- if (z.currentManager && $(i) && i.isWritable) {
18087
+ if (z.currentManager && F(i) && i.isWritable) {
18088
18088
  const k = (C = z.currentManager) == null ? void 0 : C.selectorApi;
18089
18089
  return k ? k.updateElement(
18090
18090
  y,
@@ -18098,7 +18098,7 @@ const z = class z extends zr {
18098
18098
  },
18099
18099
  copySelectedElements: (y) => {
18100
18100
  var f;
18101
- if (z.currentManager && $(i) && i.isWritable) {
18101
+ if (z.currentManager && F(i) && i.isWritable) {
18102
18102
  const w = (f = z.currentManager) == null ? void 0 : f.selectorApi;
18103
18103
  return w ? w.copySelectedElements(y) : Promise.resolve({
18104
18104
  ok: !1,
@@ -18116,7 +18116,7 @@ const z = class z extends zr {
18116
18116
  },
18117
18117
  deleteSelectedElements: (y) => {
18118
18118
  var f;
18119
- if (z.currentManager && $(i) && i.isWritable) {
18119
+ if (z.currentManager && F(i) && i.isWritable) {
18120
18120
  const w = (f = z.currentManager) == null ? void 0 : f.selectorApi;
18121
18121
  return w ? w.deleteSelectedElements(y) : Promise.resolve({
18122
18122
  ok: !1,
@@ -18146,7 +18146,7 @@ const z = class z extends zr {
18146
18146
  );
18147
18147
  }
18148
18148
  };
18149
- g.injectMethodToObject(e, "undo"), g.injectMethodToObject(e, "redo"), g.injectMethodToObject(e, "cleanCurrentScene"), g.injectMethodToObject(e, "blurSelector"), g.injectMethodToObject(e, "updateElement"), g.injectMethodToObject(e, "insertImage"), g.injectMethodToObject(e, "completeImageUpload"), g.injectMethodToObject(e, "lockImage"), g.injectMethodToObject(e, "insertText"), g.injectMethodToObject(e, "updateText"), g.injectMethodToObject(i, "getImagesInformation"), g.injectMethodToObject(i, "callbacks"), g.injectMethodToObject(i, "screenshotToCanvasAsync"), g.injectMethodToObject(i, "getBoundingRectAsync"), g.injectMethodToObject(i, "scenePreviewAsync"), g.injectMethodToObject(i, "fillSceneSnapshotAsync"), g.injectMethodToObject(i, "blurSelector"), g.injectMethodToObject(i, "updateElement"), g.injectMethodToObject(e.mainView, "setMemberState"), $(i) && g.injectMethodToObject(i, "setWritable"), Object.defineProperty(e, "canUndoSteps", {
18149
+ g.injectMethodToObject(e, "undo"), g.injectMethodToObject(e, "redo"), g.injectMethodToObject(e, "cleanCurrentScene"), g.injectMethodToObject(e, "blurSelector"), g.injectMethodToObject(e, "updateElement"), g.injectMethodToObject(e, "insertImage"), g.injectMethodToObject(e, "completeImageUpload"), g.injectMethodToObject(e, "lockImage"), g.injectMethodToObject(e, "insertText"), g.injectMethodToObject(e, "updateText"), g.injectMethodToObject(i, "getImagesInformation"), g.injectMethodToObject(i, "callbacks"), g.injectMethodToObject(i, "screenshotToCanvasAsync"), g.injectMethodToObject(i, "getBoundingRectAsync"), g.injectMethodToObject(i, "scenePreviewAsync"), g.injectMethodToObject(i, "fillSceneSnapshotAsync"), g.injectMethodToObject(i, "blurSelector"), g.injectMethodToObject(i, "updateElement"), g.injectMethodToObject(e.mainView, "setMemberState"), F(i) && g.injectMethodToObject(i, "setWritable"), Object.defineProperty(e, "canUndoSteps", {
18150
18150
  get() {
18151
18151
  return g.canUndoSteps();
18152
18152
  }
@@ -18237,7 +18237,7 @@ const z = class z extends zr {
18237
18237
  const t = e.state;
18238
18238
  (i = z.currentManager) == null || i.onRoomMembersChange(
18239
18239
  t.roomMembers
18240
- ), $(e) && ((r = z.currentManager) == null || r.onMemberChange(
18240
+ ), F(e) && ((r = z.currentManager) == null || r.onMemberChange(
18241
18241
  t.memberState
18242
18242
  )), this.displayer.callbacks.on(
18243
18243
  this.callbackName,
@@ -18284,9 +18284,9 @@ var UI = RI, YI = UI, BI = /^\s+/;
18284
18284
  function WI(o) {
18285
18285
  return o && o.slice(0, YI(o) + 1).replace(BI, "");
18286
18286
  }
18287
- var VI = WI, FI = on, $I = zt, GI = "[object Symbol]";
18287
+ var VI = WI, $I = on, FI = zt, GI = "[object Symbol]";
18288
18288
  function QI(o) {
18289
- return typeof o == "symbol" || $I(o) && FI(o) == GI;
18289
+ return typeof o == "symbol" || FI(o) && $I(o) == GI;
18290
18290
  }
18291
18291
  var ZI = QI, HI = VI, xr = Mt, qI = ZI, br = NaN, JI = /^[-+]0x[0-9a-f]+$/i, KI = /^0b[01]+$/i, XI = /^0o[0-7]+$/i, _I = parseInt;
18292
18292
  function ew(o) {
@@ -18664,7 +18664,7 @@ const E = class E extends zr {
18664
18664
  se
18665
18665
  )), e != null && e.roomMembers && ((t = E.currentManager) == null || t.onRoomMembersChange(
18666
18666
  e.roomMembers
18667
- )), !($(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i = E.currentManager) == null || i.onMemberChange(
18667
+ )), !(F(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i = E.currentManager) == null || i.onMemberChange(
18668
18668
  e.memberState
18669
18669
  ));
18670
18670
  });
@@ -18678,7 +18678,7 @@ const E = class E extends zr {
18678
18678
  e
18679
18679
  ), c = e.setMemberState.bind(e);
18680
18680
  let l;
18681
- $(e) && (l = e.setWritable), t != null && t.logger && (E.logger = new ji(t.logger));
18681
+ F(e) && (l = e.setWritable), t != null && t.logger && (E.logger = new ji(t.logger));
18682
18682
  let u = e.getInvisiblePlugin(
18683
18683
  E.kind
18684
18684
  );
@@ -18796,22 +18796,22 @@ const E = class E extends zr {
18796
18796
  _callbacksOn: function(d, M) {
18797
18797
  E.logger.info(
18798
18798
  `[ApplianceSinglePlugin] callbacks ${d}`
18799
- ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && $(e) && e.isWritable ? _e.InternalMsgEmitter.on(d, M) : i.call(e.callbacks, d, M);
18799
+ ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && F(e) && e.isWritable ? _e.InternalMsgEmitter.on(d, M) : i.call(e.callbacks, d, M);
18800
18800
  },
18801
18801
  _callbacksOnce: function(d, M) {
18802
18802
  E.logger.info(
18803
18803
  `[ApplianceSinglePlugin] callbacks ${d}`
18804
- ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && $(e) && e.isWritable ? _e.InternalMsgEmitter.on(d, M) : s.call(e.callbacks, d, M);
18804
+ ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && F(e) && e.isWritable ? _e.InternalMsgEmitter.on(d, M) : s.call(e.callbacks, d, M);
18805
18805
  },
18806
18806
  _callbacksOff: function(d, M) {
18807
18807
  E.logger.info(
18808
18808
  `[ApplianceSinglePlugin] callbacks ${d}`
18809
- ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && $(e) && e.isWritable ? _e.InternalMsgEmitter.off(d, M) : r.call(e.callbacks, d, M);
18809
+ ), (d === "onCanUndoStepsUpdate" || d === "onCanRedoStepsUpdate") && F(e) && e.isWritable ? _e.InternalMsgEmitter.off(d, M) : r.call(e.callbacks, d, M);
18810
18810
  },
18811
18811
  canRedoSteps() {
18812
18812
  if (E.logger.info(
18813
18813
  "[ApplianceSinglePlugin] canRedoSteps"
18814
- ), E.currentManager && $(e) && !e.disableSerialization) {
18814
+ ), E.currentManager && F(e) && !e.disableSerialization) {
18815
18815
  const d = E.currentManager.viewContainerManager.focuedView, M = d == null ? void 0 : d.focusScenePath;
18816
18816
  if (d && M)
18817
18817
  return d.displayer.commiter.redoStack.filter(
@@ -18823,7 +18823,7 @@ const E = class E extends zr {
18823
18823
  canUndoSteps() {
18824
18824
  if (E.logger.info(
18825
18825
  "[ApplianceSinglePlugin] canUndoSteps"
18826
- ), E.currentManager && $(e) && !e.disableSerialization) {
18826
+ ), E.currentManager && F(e) && !e.disableSerialization) {
18827
18827
  const d = E.currentManager.viewContainerManager.focuedView, M = d == null ? void 0 : d.focusScenePath;
18828
18828
  if (d && M)
18829
18829
  return d.displayer.commiter.undoStack.filter(
@@ -18833,26 +18833,26 @@ const E = class E extends zr {
18833
18833
  return 0;
18834
18834
  },
18835
18835
  undo: function() {
18836
- return E.logger.info("[ApplianceSinglePlugin] undo"), E.currentManager && $(e) && !e.disableSerialization ? E.currentManager.viewContainerManager.undo() : 0;
18836
+ return E.logger.info("[ApplianceSinglePlugin] undo"), E.currentManager && F(e) && !e.disableSerialization ? E.currentManager.viewContainerManager.undo() : 0;
18837
18837
  },
18838
18838
  redo: function() {
18839
- return E.logger.info("[ApplianceSinglePlugin] redo"), E.currentManager && $(e) && !e.disableSerialization ? E.currentManager.viewContainerManager.redo() : 0;
18839
+ return E.logger.info("[ApplianceSinglePlugin] redo"), E.currentManager && F(e) && !e.disableSerialization ? E.currentManager.viewContainerManager.redo() : 0;
18840
18840
  },
18841
18841
  cleanCurrentScene: function(d) {
18842
18842
  E.logger.info(
18843
18843
  "[ApplianceSinglePlugin] cleanCurrentScene"
18844
- ), E.currentManager && $(e) && e.isWritable && (E.currentManager.cleanCurrentScene(), a.call(e, d));
18844
+ ), E.currentManager && F(e) && e.isWritable && (E.currentManager.cleanCurrentScene(), a.call(e, d));
18845
18845
  },
18846
18846
  insertImage: function(d) {
18847
18847
  E.logger.info(
18848
18848
  "[ApplianceSinglePlugin] insertImage"
18849
- ), E.currentManager && $(e) && e.isWritable && E.currentManager.worker.insertImage(
18849
+ ), E.currentManager && F(e) && e.isWritable && E.currentManager.worker.insertImage(
18850
18850
  se,
18851
18851
  d
18852
18852
  );
18853
18853
  },
18854
18854
  lockImage: function(d, M) {
18855
- E.logger.info("[ApplianceSinglePlugin] lockImage"), E.currentManager && $(e) && e.isWritable && E.currentManager.worker.lockImage(
18855
+ E.logger.info("[ApplianceSinglePlugin] lockImage"), E.currentManager && F(e) && e.isWritable && E.currentManager.worker.lockImage(
18856
18856
  se,
18857
18857
  d,
18858
18858
  M
@@ -18861,7 +18861,7 @@ const E = class E extends zr {
18861
18861
  completeImageUpload: function(d, M) {
18862
18862
  E.logger.info(
18863
18863
  "[ApplianceSinglePlugin] completeImageUpload"
18864
- ), E.currentManager && $(e) && e.isWritable && E.currentManager.worker.completeImageUpload(
18864
+ ), E.currentManager && F(e) && e.isWritable && E.currentManager.worker.completeImageUpload(
18865
18865
  se,
18866
18866
  d,
18867
18867
  M
@@ -18870,12 +18870,12 @@ const E = class E extends zr {
18870
18870
  getImagesInformation: function(d) {
18871
18871
  return E.logger.info(
18872
18872
  "[ApplianceSinglePlugin] completeImageUpload"
18873
- ), E.currentManager && $(e) && e.isWritable ? E.currentManager.worker.getImagesInformation(
18873
+ ), E.currentManager && F(e) && e.isWritable ? E.currentManager.worker.getImagesInformation(
18874
18874
  d
18875
18875
  ) : [];
18876
18876
  },
18877
18877
  insertText: function(d, M, I) {
18878
- if (E.logger.info("[ApplianceSinglePlugin] insertText"), E.currentManager && $(e) && e.isWritable)
18878
+ if (E.logger.info("[ApplianceSinglePlugin] insertText"), E.currentManager && F(e) && e.isWritable)
18879
18879
  return E.currentManager.textEditorManager.insertText(
18880
18880
  se,
18881
18881
  d,
@@ -18884,7 +18884,7 @@ const E = class E extends zr {
18884
18884
  );
18885
18885
  },
18886
18886
  updateText: function(d, M) {
18887
- E.logger.info("[ApplianceMultiPlugin] updateText"), E.currentManager && $(e) && e.isWritable && E.currentManager.textEditorManager.updateText(
18887
+ E.logger.info("[ApplianceMultiPlugin] updateText"), E.currentManager && F(e) && e.isWritable && E.currentManager.textEditorManager.updateText(
18888
18888
  d,
18889
18889
  M
18890
18890
  );
@@ -18904,7 +18904,7 @@ const E = class E extends zr {
18904
18904
  `[ApplianceSinglePlugin] setMemberState ${JSON.stringify(d)}`
18905
18905
  );
18906
18906
  const M = Object.keys(d);
18907
- if ($(e) && e.isWritable) {
18907
+ if (F(e) && e.isWritable) {
18908
18908
  if (M.includes("currentApplianceName"))
18909
18909
  if (d.currentApplianceName && d.currentApplianceName === oe.laserPen) {
18910
18910
  if ((I = E.currentManager) != null && I.isUseSimple)
@@ -18921,7 +18921,7 @@ const E = class E extends zr {
18921
18921
  createMiniMap: async function(d, M) {
18922
18922
  if (E.logger.info(
18923
18923
  "[ApplianceSinglePlugin] createMiniMap"
18924
- ), E.currentManager && $(e) && e.isWritable)
18924
+ ), E.currentManager && F(e) && e.isWritable)
18925
18925
  return E.currentManager.createMiniMap(
18926
18926
  d,
18927
18927
  M
@@ -18930,13 +18930,13 @@ const E = class E extends zr {
18930
18930
  destroyMiniMap: async function(d) {
18931
18931
  if (E.logger.info(
18932
18932
  "[ApplianceMultiPlugin] destroyeMiniMap"
18933
- ), E.currentManager && $(e) && e.isWritable)
18933
+ ), E.currentManager && F(e) && e.isWritable)
18934
18934
  return E.currentManager.destroyMiniMap(d);
18935
18935
  },
18936
18936
  filterRenderByUid(d, M, I) {
18937
18937
  if (E.logger.info(
18938
18938
  "[ApplianceSinglePlugin] filterRenderByUid"
18939
- ), E.currentManager && $(e) && e.isWritable)
18939
+ ), E.currentManager && F(e) && e.isWritable)
18940
18940
  return E.currentManager.filterRenderByUid(
18941
18941
  d,
18942
18942
  M,
@@ -18946,7 +18946,7 @@ const E = class E extends zr {
18946
18946
  cancelFilterRender(d, M) {
18947
18947
  if (E.logger.info(
18948
18948
  "[ApplianceSinglePlugin] filterRenderByUid"
18949
- ), E.currentManager && $(e) && e.isWritable)
18949
+ ), E.currentManager && F(e) && e.isWritable)
18950
18950
  return E.currentManager.cancelFilterRender(
18951
18951
  d,
18952
18952
  M
@@ -18970,37 +18970,37 @@ const E = class E extends zr {
18970
18970
  ), (M = E.currentManager) == null || M.usePlugin(d);
18971
18971
  },
18972
18972
  getDisableDeviceInputs() {
18973
- if (E.currentManager && $(e))
18973
+ if (E.currentManager && F(e))
18974
18974
  return E.currentManager.disableDeviceInputs;
18975
18975
  },
18976
18976
  setDisableDeviceInputs(d) {
18977
18977
  E.logger.info(
18978
18978
  `[ApplianceSinglePlugin] setDisableDeviceInputs ${d}`
18979
- ), E.currentManager && $(e) && (E.currentManager.disableDeviceInputs = d);
18979
+ ), E.currentManager && F(e) && (E.currentManager.disableDeviceInputs = d);
18980
18980
  },
18981
18981
  getDisableCameraTransform() {
18982
- if (E.currentManager && $(e))
18982
+ if (E.currentManager && F(e))
18983
18983
  return E.currentManager.disableCameraTransform;
18984
18984
  },
18985
18985
  setDisableCameraTransform(d) {
18986
18986
  E.logger.info(
18987
18987
  `[ApplianceSinglePlugin] setDisableCameraTransform ${d}`
18988
- ), E.currentManager && $(e) && (E.currentManager.disableCameraTransform = d);
18988
+ ), E.currentManager && F(e) && (E.currentManager.disableCameraTransform = d);
18989
18989
  },
18990
18990
  getDisableEraseImage() {
18991
- if (E.currentManager && $(e))
18991
+ if (E.currentManager && F(e))
18992
18992
  return E.currentManager.disableEraseImage;
18993
18993
  },
18994
18994
  setDisableEraseImage(d) {
18995
18995
  E.logger.info(
18996
18996
  `[ApplianceSinglePlugin] setDisableEraseImage ${d}`
18997
- ), E.currentManager && $(e) && (E.currentManager.disableEraseImage = d);
18997
+ ), E.currentManager && F(e) && (E.currentManager.disableEraseImage = d);
18998
18998
  },
18999
18999
  setWritable: async function(d) {
19000
19000
  var M;
19001
19001
  E.logger.info(
19002
19002
  `[ApplianceSinglePlugin] setWritable ${d}`
19003
- ), $(e) && l && (await ((M = E.currentManager) == null ? void 0 : M.setWritable(d)), await l.call(e, d));
19003
+ ), F(e) && l && (await ((M = E.currentManager) == null ? void 0 : M.setWritable(d)), await l.call(e, d));
19004
19004
  },
19005
19005
  requestIdleCallback: (d, M) => {
19006
19006
  const I = (M == null ? void 0 : M.timeout) || 0, y = performance.now();
@@ -19053,13 +19053,13 @@ const E = class E extends zr {
19053
19053
  M === "callbacks" && (d.callbacks.on = h._callbacksOn.bind(h), d.callbacks.off = h._callbacksOff.bind(h), d.callbacks.once = h._callbacksOnce.bind(h));
19054
19054
  },
19055
19055
  blurText: () => {
19056
- E.logger.info("[ApplianceSinglePlugin] blurText"), E.currentManager && $(e) && e.isWritable && E.currentManager.textEditorManager.checkEmptyTextBlur();
19056
+ E.logger.info("[ApplianceSinglePlugin] blurText"), E.currentManager && F(e) && e.isWritable && E.currentManager.textEditorManager.checkEmptyTextBlur();
19057
19057
  },
19058
19058
  hasElements: (d, M) => {
19059
19059
  var I;
19060
19060
  if (E.logger.info(
19061
19061
  `[ApplianceSinglePlugin] hasElements ${d}`
19062
- ), E.currentManager && $(e) && e.isWritable) {
19062
+ ), E.currentManager && F(e) && e.isWritable) {
19063
19063
  let y = d;
19064
19064
  if (!y) {
19065
19065
  const f = E.currentManager.viewContainerManager.focuedView;
@@ -19084,7 +19084,7 @@ const E = class E extends zr {
19084
19084
  var I;
19085
19085
  if (E.logger.info(
19086
19086
  `[ApplianceSinglePlugin] getElements ${d}`
19087
- ), E.currentManager && $(e) && e.isWritable) {
19087
+ ), E.currentManager && F(e) && e.isWritable) {
19088
19088
  let y = d;
19089
19089
  if (!y) {
19090
19090
  const f = E.currentManager.viewContainerManager.focuedView;
@@ -19104,7 +19104,7 @@ const E = class E extends zr {
19104
19104
  stopDraw: (d) => {
19105
19105
  if (E.logger.info(
19106
19106
  `[ApplianceSinglePlugin] stopDraw ${d}`
19107
- ), E.currentManager && $(e))
19107
+ ), E.currentManager && F(e))
19108
19108
  return E.currentManager.stopDraw(d);
19109
19109
  },
19110
19110
  setViewLocalScenePathChange: async (d, M) => {
@@ -19156,7 +19156,7 @@ const E = class E extends zr {
19156
19156
  },
19157
19157
  blurSelector: (d) => {
19158
19158
  var M;
19159
- if (E.currentManager && $(e) && e.isWritable) {
19159
+ if (E.currentManager && F(e) && e.isWritable) {
19160
19160
  const I = (M = E.currentManager) == null ? void 0 : M.selectorApi;
19161
19161
  return I ? I.blurSelector(d) : Promise.resolve({
19162
19162
  ok: !1,
@@ -19174,7 +19174,7 @@ const E = class E extends zr {
19174
19174
  },
19175
19175
  updateSelectedElements: (d) => {
19176
19176
  var M;
19177
- if (E.currentManager && $(e) && e.isWritable) {
19177
+ if (E.currentManager && F(e) && e.isWritable) {
19178
19178
  const I = (M = E.currentManager) == null ? void 0 : M.selectorApi;
19179
19179
  return I ? I.updateSelectedElements(se, d) : Promise.resolve({
19180
19180
  requestId: `update-${Date.now().toString(36)}`,
@@ -19192,7 +19192,7 @@ const E = class E extends zr {
19192
19192
  },
19193
19193
  updateElement: (d, M, I, y, f = !0) => {
19194
19194
  var w;
19195
- if (E.currentManager && $(e) && e.isWritable) {
19195
+ if (E.currentManager && F(e) && e.isWritable) {
19196
19196
  const v = (w = E.currentManager) == null ? void 0 : w.selectorApi;
19197
19197
  return v ? v.updateElement(
19198
19198
  d,
@@ -19206,7 +19206,7 @@ const E = class E extends zr {
19206
19206
  },
19207
19207
  copySelectedElements: (d) => {
19208
19208
  var M;
19209
- if (E.currentManager && $(e) && e.isWritable) {
19209
+ if (E.currentManager && F(e) && e.isWritable) {
19210
19210
  const I = (M = E.currentManager) == null ? void 0 : M.selectorApi;
19211
19211
  return I ? I.copySelectedElements(d) : Promise.resolve({
19212
19212
  ok: !1,
@@ -19224,7 +19224,7 @@ const E = class E extends zr {
19224
19224
  },
19225
19225
  deleteSelectedElements: (d) => {
19226
19226
  var M;
19227
- if (E.currentManager && $(e) && e.isWritable) {
19227
+ if (E.currentManager && F(e) && e.isWritable) {
19228
19228
  const I = (M = E.currentManager) == null ? void 0 : M.selectorApi;
19229
19229
  return I ? I.deleteSelectedElements(d) : Promise.resolve({
19230
19230
  ok: !1,
@@ -19254,7 +19254,7 @@ const E = class E extends zr {
19254
19254
  );
19255
19255
  }
19256
19256
  };
19257
- h.injectMethodToObject(e, "undo"), h.injectMethodToObject(e, "redo"), h.injectMethodToObject(e, "cleanCurrentScene"), h.injectMethodToObject(e, "blurSelector"), h.injectMethodToObject(e, "updateElement"), h.injectMethodToObject(e, "insertImage"), h.injectMethodToObject(e, "completeImageUpload"), h.injectMethodToObject(e, "lockImage"), h.injectMethodToObject(e, "getImagesInformation"), h.injectMethodToObject(e, "insertText"), h.injectMethodToObject(e, "updateText"), h.injectMethodToObject(e, "callbacks"), h.injectMethodToObject(e, "screenshotToCanvasAsync"), h.injectMethodToObject(e, "getBoundingRectAsync"), h.injectMethodToObject(e, "scenePreviewAsync"), h.injectMethodToObject(e, "fillSceneSnapshotAsync"), h.injectMethodToObject(e, "setMemberState"), $(e) && h.injectMethodToObject(e, "setWritable"), Object.defineProperty(e, "canUndoSteps", {
19257
+ h.injectMethodToObject(e, "undo"), h.injectMethodToObject(e, "redo"), h.injectMethodToObject(e, "cleanCurrentScene"), h.injectMethodToObject(e, "blurSelector"), h.injectMethodToObject(e, "updateElement"), h.injectMethodToObject(e, "insertImage"), h.injectMethodToObject(e, "completeImageUpload"), h.injectMethodToObject(e, "lockImage"), h.injectMethodToObject(e, "getImagesInformation"), h.injectMethodToObject(e, "insertText"), h.injectMethodToObject(e, "updateText"), h.injectMethodToObject(e, "callbacks"), h.injectMethodToObject(e, "screenshotToCanvasAsync"), h.injectMethodToObject(e, "getBoundingRectAsync"), h.injectMethodToObject(e, "scenePreviewAsync"), h.injectMethodToObject(e, "fillSceneSnapshotAsync"), h.injectMethodToObject(e, "setMemberState"), F(e) && h.injectMethodToObject(e, "setWritable"), Object.defineProperty(e, "canUndoSteps", {
19258
19258
  get() {
19259
19259
  return h.canUndoSteps();
19260
19260
  }
@@ -19342,7 +19342,7 @@ const E = class E extends zr {
19342
19342
  const t = e.state;
19343
19343
  (i = E.currentManager) == null || i.onRoomMembersChange(
19344
19344
  t.roomMembers
19345
- ), $(e) && t != null && t.memberState && ((r = E.currentManager) == null || r.onMemberChange(
19345
+ ), F(e) && t != null && t.memberState && ((r = E.currentManager) == null || r.onMemberChange(
19346
19346
  t.memberState
19347
19347
  )), this.displayer.callbacks.on(
19348
19348
  this.callbackName,
@@ -19373,7 +19373,7 @@ m(E, "kind", "appliance-single-plugin"), m(E, "cursorAdapter"), m(E, "currentMan
19373
19373
  }, s = new _e(r);
19374
19374
  if (s.init(), E.logger.info(
19375
19375
  "[ApplianceSinglePlugin] refresh ApplianceSingleManager object"
19376
- ), E.currentManager = s, $(e)) {
19376
+ ), E.currentManager = s, F(e)) {
19377
19377
  const a = s.hasOffscreenCanvas, c = s.isUseOffscreenTransfer, l = s.pluginOptions, u = s.isUseSimple;
19378
19378
  e.logger.info(
19379
19379
  `[Appliance]: [ApplianceSinglePlugin] use ${a ? "worker" : "mainThread"}, isUseSimple: ${u} ${c ? "offscreenTransfer" : ""}, options: ${JSON.stringify(l)}`
@@ -19420,7 +19420,7 @@ export {
19420
19420
  hn as L,
19421
19421
  Kt as M,
19422
19422
  et as N,
19423
- $w as O,
19423
+ Fw as O,
19424
19424
  Te as P,
19425
19425
  Si as Q,
19426
19426
  Xw as R,
@@ -19467,7 +19467,7 @@ export {
19467
19467
  pn as j,
19468
19468
  An as k,
19469
19469
  W as l,
19470
- Fw as m,
19470
+ $w as m,
19471
19471
  Rw as n,
19472
19472
  Uw as o,
19473
19473
  qw as p,