@component-hook/pdf-canvas 1.1.3 → 1.1.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.
@@ -48,7 +48,7 @@ var li = {};
48
48
  */
49
49
  var _o;
50
50
  function iu() {
51
- return _o || (_o = 1, process.env.NODE_ENV !== "production" && function() {
51
+ return _o || (_o = 1, process.env.NODE_ENV !== "production" && (function() {
52
52
  var o = Fl, t = Symbol.for("react.element"), e = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), g = Symbol.iterator, p = "@@iterator";
53
53
  function v(y) {
54
54
  if (y === null || typeof y != "object")
@@ -634,7 +634,7 @@ React keys must be passed directly to JSX without using spread:
634
634
  }
635
635
  var Kc = qc, Jc = $c;
636
636
  li.Fragment = s, li.jsx = Kc, li.jsxs = Jc;
637
- }()), li;
637
+ })()), li;
638
638
  }
639
639
  var wo;
640
640
  function nu() {
@@ -677,8 +677,8 @@ const ru = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
677
677
  "selectionBackgroundColor"
678
678
  ];
679
679
  function S(o, t, e) {
680
- return (t = function(s) {
681
- var i = function(n, r) {
680
+ return (t = (function(s) {
681
+ var i = (function(n, r) {
682
682
  if (typeof n != "object" || !n) return n;
683
683
  var a = n[Symbol.toPrimitive];
684
684
  if (a !== void 0) {
@@ -687,34 +687,34 @@ function S(o, t, e) {
687
687
  throw new TypeError("@@toPrimitive must return a primitive value.");
688
688
  }
689
689
  return (r === "string" ? String : Number)(n);
690
- }(s, "string");
690
+ })(s, "string");
691
691
  return typeof i == "symbol" ? i : i + "";
692
- }(t)) in o ? Object.defineProperty(o, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : o[t] = e, o;
692
+ })(t)) in o ? Object.defineProperty(o, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : o[t] = e, o;
693
693
  }
694
694
  function So(o, t) {
695
695
  var e = Object.keys(o);
696
696
  if (Object.getOwnPropertySymbols) {
697
697
  var s = Object.getOwnPropertySymbols(o);
698
- t && (s = s.filter(function(i) {
698
+ t && (s = s.filter((function(i) {
699
699
  return Object.getOwnPropertyDescriptor(o, i).enumerable;
700
- })), e.push.apply(e, s);
700
+ }))), e.push.apply(e, s);
701
701
  }
702
702
  return e;
703
703
  }
704
704
  function x(o) {
705
705
  for (var t = 1; t < arguments.length; t++) {
706
706
  var e = arguments[t] != null ? arguments[t] : {};
707
- t % 2 ? So(Object(e), !0).forEach(function(s) {
707
+ t % 2 ? So(Object(e), !0).forEach((function(s) {
708
708
  S(o, s, e[s]);
709
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : So(Object(e)).forEach(function(s) {
709
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : So(Object(e)).forEach((function(s) {
710
710
  Object.defineProperty(o, s, Object.getOwnPropertyDescriptor(e, s));
711
- });
711
+ }));
712
712
  }
713
713
  return o;
714
714
  }
715
715
  function mt(o, t) {
716
716
  if (o == null) return {};
717
- var e, s, i = function(r, a) {
717
+ var e, s, i = (function(r, a) {
718
718
  if (r == null) return {};
719
719
  var l = {};
720
720
  for (var h in r) if ({}.hasOwnProperty.call(r, h)) {
@@ -722,7 +722,7 @@ function mt(o, t) {
722
722
  l[h] = r[h];
723
723
  }
724
724
  return l;
725
- }(o, t);
725
+ })(o, t);
726
726
  if (Object.getOwnPropertySymbols) {
727
727
  var n = Object.getOwnPropertySymbols(o);
728
728
  for (s = 0; s < n.length; s++) e = n[s], t.indexOf(e) >= 0 || {}.propertyIsEnumerable.call(o, e) && (i[e] = o[e]);
@@ -750,15 +750,15 @@ const it = new class extends Co {
750
750
  this.fontPaths = x(x({}, this.fontPaths), o);
751
751
  }
752
752
  removeFonts() {
753
- (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach((o) => {
753
+ (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach(((o) => {
754
754
  delete this.fontPaths[o];
755
- });
755
+ }));
756
756
  }
757
757
  clearFonts() {
758
758
  this.fontPaths = {};
759
759
  }
760
760
  restoreDefaults(o) {
761
- const t = new Co(), e = o?.reduce((s, i) => (s[i] = t[i], s), {}) || t;
761
+ const t = new Co(), e = o?.reduce(((s, i) => (s[i] = t[i], s)), {}) || t;
762
762
  this.configure(e);
763
763
  }
764
764
  }(), qe = function(o) {
@@ -785,7 +785,7 @@ void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
785
785
  }
786
786
  queryWebGL(t) {
787
787
  const e = t.getContext("webgl");
788
- e && (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.GLPrecision = ["highp", "mediump", "lowp"].find((s) => this.testPrecision(e, s)), e.getExtension("WEBGL_lose_context").loseContext(), qe("log", "WebGL: max texture size ".concat(this.maxTextureSize)));
788
+ e && (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.GLPrecision = ["highp", "mediump", "lowp"].find(((s) => this.testPrecision(e, s))), e.getExtension("WEBGL_lose_context").loseContext(), qe("log", "WebGL: max texture size ".concat(this.maxTextureSize)));
789
789
  }
790
790
  isSupported(t) {
791
791
  return !!this.maxTextureSize && this.maxTextureSize >= t;
@@ -814,7 +814,7 @@ const je = () => Ao || (Ao = { document, window, isTouchSupported: "ontouchstart
814
814
  const { perfLimitSizeTotal: t } = it, e = Math.sqrt(t * o);
815
815
  return [Math.floor(e), Math.floor(t / e)];
816
816
  }
817
- }(), Ur = "6.7.0";
817
+ }(), Ur = "6.7.1";
818
818
  function xs() {
819
819
  }
820
820
  const ns = Math.PI / 2, Ke = 2 * Math.PI, ma = Math.PI / 180, Qt = Object.freeze([1, 0, 0, 1, 0, 0]), va = 16, ts = 0.4477152502, K = "center", at = "left", ae = "top", Yr = "bottom", St = "right", qt = "none", ba = /\r?\n/, Il = "moving", $n = "scaling", jl = "rotating", ya = "rotate", Nl = "skewing", Pi = "resizing", gu = "modifyPoly", pu = "modifyPath", Mn = "changed", qn = "scale", Zt = "scaleX", ce = "scaleY", ti = "skewX", ei = "skewY", Ot = "fill", Kt = "stroke", On = "modified", Is = "json", Sr = "svg", j = new class {
@@ -845,20 +845,20 @@ const ns = Math.PI / 2, Ke = 2 * Math.PI, ma = Math.PI / 180, Qt = Object.freeze
845
845
  }
846
846
  cancelAll() {
847
847
  const o = this.splice(0);
848
- return o.forEach((t) => t.abort()), o;
848
+ return o.forEach(((t) => t.abort())), o;
849
849
  }
850
850
  cancelByCanvas(o) {
851
851
  if (!o) return [];
852
- const t = this.filter((e) => {
852
+ const t = this.filter(((e) => {
853
853
  var s;
854
854
  return e.target === o || typeof e.target == "object" && ((s = e.target) === null || s === void 0 ? void 0 : s.canvas) === o;
855
- });
856
- return t.forEach((e) => e.abort()), t;
855
+ }));
856
+ return t.forEach(((e) => e.abort())), t;
857
857
  }
858
858
  cancelByTarget(o) {
859
859
  if (!o) return [];
860
- const t = this.filter((e) => e.target === o);
861
- return t.forEach((e) => e.abort()), t;
860
+ const t = this.filter(((e) => e.target === o));
861
+ return t.forEach(((e) => e.abort())), t;
862
862
  }
863
863
  }();
864
864
  class mu {
@@ -866,10 +866,10 @@ class mu {
866
866
  S(this, "__eventListeners", {});
867
867
  }
868
868
  on(t, e) {
869
- if (this.__eventListeners || (this.__eventListeners = {}), typeof t == "object") return Object.entries(t).forEach((s) => {
869
+ if (this.__eventListeners || (this.__eventListeners = {}), typeof t == "object") return Object.entries(t).forEach(((s) => {
870
870
  let [i, n] = s;
871
871
  this.on(i, n);
872
- }), () => this.off(t);
872
+ })), () => this.off(t);
873
873
  if (e) {
874
874
  const s = t;
875
875
  return this.__eventListeners[s] || (this.__eventListeners[s] = []), this.__eventListeners[s].push(e), () => this.off(s, e);
@@ -879,16 +879,16 @@ class mu {
879
879
  once(t, e) {
880
880
  if (typeof t == "object") {
881
881
  const s = [];
882
- return Object.entries(t).forEach((i) => {
882
+ return Object.entries(t).forEach(((i) => {
883
883
  let [n, r] = i;
884
884
  s.push(this.once(n, r));
885
- }), () => s.forEach((i) => i());
885
+ })), () => s.forEach(((i) => i()));
886
886
  }
887
887
  if (e) {
888
- const s = this.on(t, function() {
888
+ const s = this.on(t, (function() {
889
889
  for (var i = arguments.length, n = new Array(i), r = 0; r < i; r++) n[r] = arguments[r];
890
890
  e.call(this, ...n), s();
891
- });
891
+ }));
892
892
  return s;
893
893
  }
894
894
  return () => !1;
@@ -901,10 +901,10 @@ class mu {
901
901
  }
902
902
  off(t, e) {
903
903
  if (this.__eventListeners) if (t === void 0) for (const s in this.__eventListeners) this._removeEventListener(s);
904
- else typeof t == "object" ? Object.entries(t).forEach((s) => {
904
+ else typeof t == "object" ? Object.entries(t).forEach(((s) => {
905
905
  let [i, n] = s;
906
906
  this._removeEventListener(i, n);
907
- }) : this._removeEventListener(t, e);
907
+ })) : this._removeEventListener(t, e);
908
908
  }
909
909
  fire(t, e) {
910
910
  var s;
@@ -1065,26 +1065,26 @@ function Bl(o) {
1065
1065
  add() {
1066
1066
  for (var s = arguments.length, i = new Array(s), n = 0; n < s; n++) i[n] = arguments[n];
1067
1067
  const r = this._objects.push(...i);
1068
- return i.forEach((a) => this._onObjectAdded(a)), r;
1068
+ return i.forEach(((a) => this._onObjectAdded(a))), r;
1069
1069
  }
1070
1070
  insertAt(s) {
1071
1071
  for (var i = arguments.length, n = new Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
1072
- return this._objects.splice(s, 0, ...n), n.forEach((a) => this._onObjectAdded(a)), this._objects.length;
1072
+ return this._objects.splice(s, 0, ...n), n.forEach(((a) => this._onObjectAdded(a))), this._objects.length;
1073
1073
  }
1074
1074
  remove() {
1075
1075
  const s = this._objects, i = [];
1076
1076
  for (var n = arguments.length, r = new Array(n), a = 0; a < n; a++) r[a] = arguments[a];
1077
- return r.forEach((l) => {
1077
+ return r.forEach(((l) => {
1078
1078
  const h = s.indexOf(l);
1079
1079
  h !== -1 && (s.splice(h, 1), i.push(l), this._onObjectRemoved(l));
1080
- }), i;
1080
+ })), i;
1081
1081
  }
1082
1082
  forEachObject(s) {
1083
- this.getObjects().forEach((i, n, r) => s(i, n, r));
1083
+ this.getObjects().forEach(((i, n, r) => s(i, n, r)));
1084
1084
  }
1085
1085
  getObjects() {
1086
1086
  for (var s = arguments.length, i = new Array(s), n = 0; n < s; n++) i[n] = arguments[n];
1087
- return i.length === 0 ? [...this._objects] : this._objects.filter((r) => r.isType(...i));
1087
+ return i.length === 0 ? [...this._objects] : this._objects.filter(((r) => r.isType(...i)));
1088
1088
  }
1089
1089
  item(s) {
1090
1090
  return this._objects[s];
@@ -1096,10 +1096,10 @@ function Bl(o) {
1096
1096
  return this._objects.length;
1097
1097
  }
1098
1098
  contains(s, i) {
1099
- return !!this._objects.includes(s) || !!i && this._objects.some((n) => n instanceof t && n.contains(s, !0));
1099
+ return !!this._objects.includes(s) || !!i && this._objects.some(((n) => n instanceof t && n.contains(s, !0)));
1100
1100
  }
1101
1101
  complexity() {
1102
- return this._objects.reduce((s, i) => s += i.complexity ? i.complexity() : 0, 0);
1102
+ return this._objects.reduce(((s, i) => s += i.complexity ? i.complexity() : 0), 0);
1103
1103
  }
1104
1104
  sendObjectToBack(s) {
1105
1105
  return !(!s || s === this._objects[0]) && (ds(this._objects, s), this._objects.unshift(s), this._onStackOrderChanged(s), !0);
@@ -1198,12 +1198,12 @@ const rs = () => vu++, Ne = () => {
1198
1198
  }, Vl = () => Zs().createElement("img"), ue = (o) => {
1199
1199
  const t = Ne();
1200
1200
  return t.width = o.width, t.height = o.height, t;
1201
- }, wa = (o, t, e) => o.toDataURL("image/".concat(t), e), xa = (o, t, e) => new Promise((s, i) => {
1201
+ }, wa = (o, t, e) => o.toDataURL("image/".concat(t), e), xa = (o, t, e) => new Promise(((s, i) => {
1202
1202
  o.toBlob(s, "image/".concat(t), e);
1203
- }), yt = (o) => o * ma, Be = (o) => o / ma, Gl = (o) => o.every((t, e) => t === Qt[e]), Nt = (o, t, e) => new A(o).transform(t, e), re = (o) => {
1203
+ })), yt = (o) => o * ma, Be = (o) => o / ma, Gl = (o) => o.every(((t, e) => t === Qt[e])), Nt = (o, t, e) => new A(o).transform(t, e), re = (o) => {
1204
1204
  const t = 1 / (o[0] * o[3] - o[1] * o[2]), e = [t * o[3], -t * o[1], -t * o[2], t * o[0], 0, 0], { x: s, y: i } = new A(o[4], o[5]).transform(e, !0);
1205
1205
  return e[4] = -s, e[5] = -i, e;
1206
- }, Ct = (o, t, e) => [o[0] * t[0] + o[2] * t[1], o[1] * t[0] + o[3] * t[1], o[0] * t[2] + o[2] * t[3], o[1] * t[2] + o[3] * t[3], e ? 0 : o[0] * t[4] + o[2] * t[5] + o[4], e ? 0 : o[1] * t[4] + o[3] * t[5] + o[5]], Kn = (o, t) => o.reduceRight((e, s) => s && e ? Ct(s, e, t) : s || e, void 0) || Qt.concat(), Wl = (o) => {
1206
+ }, Ct = (o, t, e) => [o[0] * t[0] + o[2] * t[1], o[1] * t[0] + o[3] * t[1], o[0] * t[2] + o[2] * t[3], o[1] * t[2] + o[3] * t[3], e ? 0 : o[0] * t[4] + o[2] * t[5] + o[4], e ? 0 : o[1] * t[4] + o[3] * t[5] + o[5]], Kn = (o, t) => o.reduceRight(((e, s) => s && e ? Ct(s, e, t) : s || e), void 0) || Qt.concat(), Wl = (o) => {
1207
1207
  let [t, e] = o;
1208
1208
  return Math.atan2(e, t);
1209
1209
  }, Cs = (o) => {
@@ -1230,7 +1230,7 @@ const Jn = function(o) {
1230
1230
  return Gl(n) || (i = Ct(i, n)), i;
1231
1231
  }, Si = function(o) {
1232
1232
  let { signal: t, crossOrigin: e = null } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1233
- return new Promise(function(s, i) {
1233
+ return new Promise((function(s, i) {
1234
1234
  if (t && t.aborted) return i(new pa("loadImage"));
1235
1235
  const n = Vl();
1236
1236
  let r;
@@ -1243,39 +1243,39 @@ const Jn = function(o) {
1243
1243
  o ? (n.onload = a, n.onerror = function() {
1244
1244
  r && t?.removeEventListener("abort", r), i(new Le("Error loading ".concat(n.src)));
1245
1245
  }, e && (n.crossOrigin = e), n.src = o) : a();
1246
- });
1246
+ }));
1247
1247
  }, qs = function(o) {
1248
1248
  let { signal: t, reviver: e = xs } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1249
- return new Promise((s, i) => {
1249
+ return new Promise(((s, i) => {
1250
1250
  const n = [];
1251
- t && t.addEventListener("abort", i, { once: !0 }), Promise.all(o.map((r) => j.getClass(r.type).fromObject(r, { signal: t }).then((a) => (e(r, a), n.push(a), a)))).then(s).catch((r) => {
1252
- n.forEach((a) => {
1251
+ t && t.addEventListener("abort", i, { once: !0 }), Promise.all(o.map(((r) => j.getClass(r.type).fromObject(r, { signal: t }).then(((a) => (e(r, a), n.push(a), a)))))).then(s).catch(((r) => {
1252
+ n.forEach(((a) => {
1253
1253
  a.dispose && a.dispose();
1254
- }), i(r);
1255
- }).finally(() => {
1254
+ })), i(r);
1255
+ })).finally((() => {
1256
1256
  t && t.removeEventListener("abort", i);
1257
- });
1258
- });
1257
+ }));
1258
+ }));
1259
1259
  }, ji = function(o) {
1260
1260
  let { signal: t } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1261
- return new Promise((e, s) => {
1261
+ return new Promise(((e, s) => {
1262
1262
  const i = [];
1263
1263
  t && t.addEventListener("abort", s, { once: !0 });
1264
- const n = Object.values(o).map((a) => a && a.type && j.has(a.type) ? qs([a], { signal: t }).then((l) => {
1264
+ const n = Object.values(o).map(((a) => a && a.type && j.has(a.type) ? qs([a], { signal: t }).then(((l) => {
1265
1265
  let [h] = l;
1266
1266
  return i.push(h), h;
1267
- }) : a), r = Object.keys(o);
1268
- Promise.all(n).then((a) => a.reduce((l, h, c) => (l[r[c]] = h, l), {})).then(e).catch((a) => {
1269
- i.forEach((l) => {
1267
+ })) : a)), r = Object.keys(o);
1268
+ Promise.all(n).then(((a) => a.reduce(((l, h, c) => (l[r[c]] = h, l)), {}))).then(e).catch(((a) => {
1269
+ i.forEach(((l) => {
1270
1270
  l.dispose && l.dispose();
1271
- }), s(a);
1272
- }).finally(() => {
1271
+ })), s(a);
1272
+ })).finally((() => {
1273
1273
  t && t.removeEventListener("abort", s);
1274
- });
1275
- });
1274
+ }));
1275
+ }));
1276
1276
  }, Ms = function(o) {
1277
- return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []).reduce((t, e) => (e in o && (t[e] = o[e]), t), {});
1278
- }, Aa = (o, t) => Object.keys(o).reduce((e, s) => (t(o[s], s, o) && (e[s] = o[s]), e), {}), ht = (o, t) => parseFloat(Number(o).toFixed(t)), Ks = (o) => "matrix(" + o.map((t) => ht(t, it.NUM_FRACTION_DIGITS)).join(" ") + ")", ve = (o) => !!o && o.toLive !== void 0, To = (o) => !!o && typeof o.toObject == "function", Eo = (o) => !!o && o.offsetX !== void 0 && "source" in o, fs = (o) => !!o && "multiSelectionStacking" in o;
1277
+ return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []).reduce(((t, e) => (e in o && (t[e] = o[e]), t)), {});
1278
+ }, Aa = (o, t) => Object.keys(o).reduce(((e, s) => (t(o[s], s, o) && (e[s] = o[s]), e)), {}), ht = (o, t) => parseFloat(Number(o).toFixed(t)), Ks = (o) => "matrix(" + o.map(((t) => ht(t, it.NUM_FRACTION_DIGITS))).join(" ") + ")", ve = (o) => !!o && o.toLive !== void 0, To = (o) => !!o && typeof o.toObject == "function", Eo = (o) => !!o && o.offsetX !== void 0 && "source" in o, fs = (o) => !!o && "multiSelectionStacking" in o;
1279
1279
  function Yl(o) {
1280
1280
  const t = o && Ce(o);
1281
1281
  let e = 0, s = 0;
@@ -1323,7 +1323,7 @@ class Kl {
1323
1323
  $r(this.lower.el, t);
1324
1324
  }
1325
1325
  calcOffset() {
1326
- return function(t) {
1326
+ return (function(t) {
1327
1327
  var e;
1328
1328
  const s = t && Ce(t), i = { left: 0, top: 0 };
1329
1329
  if (!s) return i;
@@ -1334,7 +1334,7 @@ class Kl {
1334
1334
  t.getBoundingClientRect !== void 0 && (r = t.getBoundingClientRect());
1335
1335
  const l = Yl(t);
1336
1336
  return { left: r.left + l.left - (a.clientLeft || 0) + i.left, top: r.top + l.top - (a.clientTop || 0) + i.top };
1337
- }(this.lower.el);
1337
+ })(this.lower.el);
1338
1338
  }
1339
1339
  dispose() {
1340
1340
  je().dispose(this.lower.el), delete this.lower;
@@ -1453,7 +1453,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
1453
1453
  this.nextRenderHandle = 0, this.renderAll();
1454
1454
  }
1455
1455
  requestRenderAll() {
1456
- this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = xi(() => this.renderAndReset()));
1456
+ this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = xi((() => this.renderAndReset())));
1457
1457
  }
1458
1458
  calcViewportBoundaries() {
1459
1459
  const t = this.width, e = this.height, s = re(this.viewportTransform), i = Nt({ x: 0, y: 0 }, s), n = Nt({ x: t, y: e }, s), r = i.min(n), a = i.max(n);
@@ -1544,7 +1544,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
1544
1544
  }
1545
1545
  _toObjectMethod(t, e) {
1546
1546
  const s = this.clipPath, i = s && !s.excludeFromExport ? this._toObject(s, t, e) : null;
1547
- return x(x(x({ version: Ur }, Ms(this, e)), {}, { objects: this._objects.filter((n) => !n.excludeFromExport).map((n) => this._toObject(n, t, e)) }, this.__serializeBgOverlay(t, e)), i ? { clipPath: i } : null);
1547
+ return x(x(x({ version: Ur }, Ms(this, e)), {}, { objects: this._objects.filter(((n) => !n.excludeFromExport)).map(((n) => this._toObject(n, t, e))) }, this.__serializeBgOverlay(t, e)), i ? { clipPath: i } : null);
1548
1548
  }
1549
1549
  _toObject(t, e, s) {
1550
1550
  let i;
@@ -1590,42 +1590,42 @@ Resulting to default behavior: removing object from previous canvas and adding t
1590
1590
  `)) : "";
1591
1591
  }
1592
1592
  createSVGRefElementsMarkup() {
1593
- return ["background", "overlay"].map((t) => {
1593
+ return ["background", "overlay"].map(((t) => {
1594
1594
  const e = this["".concat(t, "Color")];
1595
1595
  if (ve(e)) {
1596
1596
  const s = this["".concat(t, "Vpt")], i = this.viewportTransform, n = { isType: () => !1, width: this.width / (s ? i[0] : 1), height: this.height / (s ? i[3] : 1) };
1597
1597
  return e.toSVG(n, { additionalTransform: s ? Ks(i) : "" });
1598
1598
  }
1599
- }).join("");
1599
+ })).join("");
1600
1600
  }
1601
1601
  createSVGFontFacesMarkup() {
1602
1602
  const t = [], e = {}, s = it.fontPaths;
1603
- this._objects.forEach(function n(r) {
1603
+ this._objects.forEach((function n(r) {
1604
1604
  t.push(r), Cn(r) && r._objects.forEach(n);
1605
- }), t.forEach((n) => {
1605
+ })), t.forEach(((n) => {
1606
1606
  if (!(r = n) || typeof r._renderText != "function") return;
1607
1607
  var r;
1608
1608
  const { styles: a, fontFamily: l } = n;
1609
- !e[l] && s[l] && (e[l] = !0, a && Object.values(a).forEach((h) => {
1610
- Object.values(h).forEach((c) => {
1609
+ !e[l] && s[l] && (e[l] = !0, a && Object.values(a).forEach(((h) => {
1610
+ Object.values(h).forEach(((c) => {
1611
1611
  let { fontFamily: u = "" } = c;
1612
1612
  !e[u] && s[u] && (e[u] = !0);
1613
- });
1614
- }));
1615
- });
1616
- const i = Object.keys(e).map((n) => ` @font-face {
1613
+ }));
1614
+ })));
1615
+ }));
1616
+ const i = Object.keys(e).map(((n) => ` @font-face {
1617
1617
  font-family: '`.concat(n, `';
1618
1618
  src: url('`).concat(s[n], `');
1619
1619
  }
1620
- `)).join("");
1620
+ `))).join("");
1621
1621
  return i ? ` <style type="text/css"><![CDATA[
1622
1622
  `.concat(i, `]]></style>
1623
1623
  `) : "";
1624
1624
  }
1625
1625
  _setSVGObjects(t, e) {
1626
- this.forEachObject((s) => {
1626
+ this.forEachObject(((s) => {
1627
1627
  s.excludeFromExport || this._setSVGObject(t, s, e);
1628
- });
1628
+ }));
1629
1629
  }
1630
1630
  _setSVGObject(t, e, s) {
1631
1631
  t.push(e.toSVG(s));
@@ -1647,10 +1647,10 @@ Resulting to default behavior: removing object from previous canvas and adding t
1647
1647
  let { signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1648
1648
  if (!t) return Promise.reject(new Le("`json` is undefined"));
1649
1649
  const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [], backgroundImage: r, background: a, overlayImage: l, overlay: h, clipPath: c } = i, u = this.renderOnAddRemove;
1650
- return this.renderOnAddRemove = !1, Promise.all([qs(n, { reviver: e, signal: s }), ji({ backgroundImage: r, backgroundColor: a, overlayImage: l, overlayColor: h, clipPath: c }, { signal: s })]).then((d) => {
1650
+ return this.renderOnAddRemove = !1, Promise.all([qs(n, { reviver: e, signal: s }), ji({ backgroundImage: r, backgroundColor: a, overlayImage: l, overlayColor: h, clipPath: c }, { signal: s })]).then(((d) => {
1651
1651
  let [f, g] = d;
1652
1652
  return this.clear(), this.add(...f), this.set(i), this.set(g), this.renderOnAddRemove = u, this;
1653
- });
1653
+ }));
1654
1654
  }
1655
1655
  clone(t) {
1656
1656
  const e = this.toObject(t);
@@ -1672,19 +1672,19 @@ Resulting to default behavior: removing object from previous canvas and adding t
1672
1672
  }
1673
1673
  toCanvasElement() {
1674
1674
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, { width: e, height: s, left: i, top: n, filter: r } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1675
- const a = (e || this.width) * t, l = (s || this.height) * t, h = this.getZoom(), c = this.width, u = this.height, d = this.skipControlsDrawing, f = h * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (i || 0)) * t, (g[5] - (n || 0)) * t], v = this.enableRetinaScaling, m = ue({ width: a, height: l }), b = r ? this._objects.filter((_) => r(_)) : this._objects;
1675
+ const a = (e || this.width) * t, l = (s || this.height) * t, h = this.getZoom(), c = this.width, u = this.height, d = this.skipControlsDrawing, f = h * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (i || 0)) * t, (g[5] - (n || 0)) * t], v = this.enableRetinaScaling, m = ue({ width: a, height: l }), b = r ? this._objects.filter(((_) => r(_))) : this._objects;
1676
1676
  return this.enableRetinaScaling = !1, this.viewportTransform = p, this.width = a, this.height = l, this.skipControlsDrawing = !0, this.calcViewportBoundaries(), this.renderCanvas(m.getContext("2d"), b), this.viewportTransform = g, this.width = c, this.height = u, this.calcViewportBoundaries(), this.enableRetinaScaling = v, this.skipControlsDrawing = d, m;
1677
1677
  }
1678
1678
  dispose() {
1679
- return !this.disposed && this.elements.cleanupDOM({ width: this.width, height: this.height }), Dn.cancelByCanvas(this), this.disposed = !0, new Promise((t, e) => {
1679
+ return !this.disposed && this.elements.cleanupDOM({ width: this.width, height: this.height }), Dn.cancelByCanvas(this), this.disposed = !0, new Promise(((t, e) => {
1680
1680
  const s = () => {
1681
1681
  this.destroy(), t(!0);
1682
1682
  };
1683
1683
  s.kill = e, this.__cleanupTask && this.__cleanupTask.kill("aborted"), this.destroyed ? t(!1) : this.nextRenderHandle ? this.__cleanupTask = s : s();
1684
- });
1684
+ }));
1685
1685
  }
1686
1686
  destroy() {
1687
- this.destroyed = !0, this.cancelRequestedRender(), this.forEachObject((t) => t.dispose()), this._objects = [], this.backgroundImage && this.backgroundImage.dispose(), this.backgroundImage = void 0, this.overlayImage && this.overlayImage.dispose(), this.overlayImage = void 0, this.elements.dispose();
1687
+ this.destroyed = !0, this.cancelRequestedRender(), this.forEachObject(((t) => t.dispose())), this._objects = [], this.backgroundImage && this.backgroundImage.dispose(), this.backgroundImage = void 0, this.overlayImage && this.overlayImage.dispose(), this.overlayImage = void 0, this.elements.dispose();
1688
1688
  }
1689
1689
  toString() {
1690
1690
  return "#<Canvas (".concat(this.complexity(), "): { objects: ").concat(this._objects.length, " }>");
@@ -1692,10 +1692,10 @@ Resulting to default behavior: removing object from previous canvas and adding t
1692
1692
  }
1693
1693
  S(Ni, "ownDefaults", bu);
1694
1694
  const yu = ["touchstart", "touchmove", "touchend"], Jl = (o) => {
1695
- const t = Yl(o.target), e = function(s) {
1695
+ const t = Yl(o.target), e = (function(s) {
1696
1696
  const i = s.changedTouches;
1697
1697
  return i && i[0] ? i[0] : s;
1698
- }(o);
1698
+ })(o);
1699
1699
  return new A(e.clientX + t.left, e.clientY + t.top);
1700
1700
  }, Rn = (o) => yu.includes(o.type) || o.pointerType === "touch", Po = (o) => {
1701
1701
  o.preventDefault(), o.stopPropagation();
@@ -1712,7 +1712,7 @@ const yu = ["touchstart", "touchmove", "touchend"], Jl = (o) => {
1712
1712
  }, Zl = (o) => {
1713
1713
  o.scaleX = 1, o.scaleY = 1, o.skewX = 0, o.skewY = 0, o.flipX = !1, o.flipY = !1, o.rotate(0);
1714
1714
  }, Ta = (o) => ({ scaleX: o.scaleX, scaleY: o.scaleY, skewX: o.skewX, skewY: o.skewY, angle: o.angle, left: o.left, flipX: o.flipX, flipY: o.flipY, top: o.top }), Qn = (o, t, e) => {
1715
- const s = o / 2, i = t / 2, n = [new A(-s, -i), new A(s, -i), new A(-s, i), new A(s, i)].map((a) => a.transform(e)), r = Ie(n);
1715
+ const s = o / 2, i = t / 2, n = [new A(-s, -i), new A(s, -i), new A(-s, i), new A(s, i)].map(((a) => a.transform(e))), r = Ie(n);
1716
1716
  return new A(r.width, r.height);
1717
1717
  }, Bi = function() {
1718
1718
  let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qt;
@@ -1745,10 +1745,10 @@ function nh(o, t) {
1745
1745
  function Ea(o, t, e, s, i) {
1746
1746
  var n;
1747
1747
  let { target: r, corner: a } = o;
1748
- const l = r.controls[a], h = ((n = r.canvas) === null || n === void 0 ? void 0 : n.getZoom()) || 1, c = r.padding / h, u = function(d, f, g, p) {
1748
+ const l = r.controls[a], h = ((n = r.canvas) === null || n === void 0 ? void 0 : n.getZoom()) || 1, c = r.padding / h, u = (function(d, f, g, p) {
1749
1749
  const v = d.getRelativeCenterPoint(), m = g !== void 0 && p !== void 0 ? d.translateToGivenOrigin(v, K, K, g, p) : new A(d.left, d.top);
1750
1750
  return (d.angle ? f.rotate(-yt(d.angle), v) : f).subtract(m);
1751
- }(r, new A(s, i), t, e);
1751
+ })(r, new A(s, i), t, e);
1752
1752
  return u.x >= c && (u.x -= c), u.x <= -c && (u.x += c), u.y >= c && (u.y -= c), u.y <= c && (u.y += c), u.x -= l.offsetX, u.y -= l.offsetY, u;
1753
1753
  }
1754
1754
  const xu = (o, t, e, s) => {
@@ -1838,7 +1838,7 @@ class ot {
1838
1838
  }
1839
1839
  overlayWith(t) {
1840
1840
  t instanceof ot || (t = new ot(t));
1841
- const e = this.getSource(), s = t.getSource(), [i, n, r] = e.map((a, l) => Math.round(0.5 * a + 0.5 * s[l]));
1841
+ const e = this.getSource(), s = t.getSource(), [i, n, r] = e.map(((a, l) => Math.round(0.5 * a + 0.5 * s[l])));
1842
1842
  return this.setSource([i, n, r, e[3]]), this;
1843
1843
  }
1844
1844
  static fromRgb(t) {
@@ -1850,10 +1850,10 @@ class ot {
1850
1850
  static sourceFromRgb(t) {
1851
1851
  const e = t.match(/^rgba?\(\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d{0,3}(?:\.\d+)?%?)\s*)?\)$/i);
1852
1852
  if (e) {
1853
- const [s, i, n] = e.slice(1, 4).map((r) => {
1853
+ const [s, i, n] = e.slice(1, 4).map(((r) => {
1854
1854
  const a = parseFloat(r);
1855
1855
  return r.endsWith("%") ? Math.round(2.55 * a) : a;
1856
- });
1856
+ }));
1857
1857
  return [s, i, n, Ro(e[4])];
1858
1858
  }
1859
1859
  }
@@ -1882,8 +1882,8 @@ class ot {
1882
1882
  if (t.match(/^#?(([0-9a-f]){3,4}|([0-9a-f]{2}){3,4})$/i)) {
1883
1883
  const e = t.slice(t.indexOf("#") + 1);
1884
1884
  let s;
1885
- s = e.length <= 4 ? e.split("").map((l) => l + l) : e.match(/.{2}/g);
1886
- const [i, n, r, a = 255] = s.map((l) => parseInt(l, 16));
1885
+ s = e.length <= 4 ? e.split("").map(((l) => l + l)) : e.match(/.{2}/g);
1886
+ const [i, n, r, a = 255] = s.map(((l) => parseInt(l, 16)));
1887
1887
  return [i, n, r, a / 255];
1888
1888
  }
1889
1889
  }
@@ -1992,7 +1992,7 @@ class $e {
1992
1992
  Object.assign(this, $e.ownDefaults, e), this.id = rs();
1993
1993
  }
1994
1994
  static parseShadow(t) {
1995
- const e = t.trim(), [, s = 0, i = 0, n = 0] = (zo.exec(e) || []).map((r) => parseFloat(r) || 0);
1995
+ const e = t.trim(), [, s = 0, i = 0, n = 0] = (zo.exec(e) || []).map(((r) => parseFloat(r) || 0));
1996
1996
  return { color: (e.replace(zo, "") || "rgb(0,0,0)").trim(), offsetX: s, offsetY: i, blur: n };
1997
1997
  }
1998
1998
  toString() {
@@ -2015,7 +2015,7 @@ class $e {
2015
2015
  }
2016
2016
  toObject() {
2017
2017
  const t = { color: this.color, blur: this.blur, offsetX: this.offsetX, offsetY: this.offsetY, affectStroke: this.affectStroke, nonScaling: this.nonScaling, type: this.constructor.type }, e = $e.ownDefaults;
2018
- return this.includeDefaultValues ? t : Aa(t, (s, i) => s !== e[i]);
2018
+ return this.includeDefaultValues ? t : Aa(t, ((s, i) => s !== e[i]));
2019
2019
  }
2020
2020
  static async fromObject(t) {
2021
2021
  return new this(t);
@@ -2073,7 +2073,7 @@ class Oa {
2073
2073
  const t = (e) => {
2074
2074
  this._state === "pending" && (this.startTime = e || +/* @__PURE__ */ new Date(), this._state = "running", this._onStart(), this.tick(this.startTime));
2075
2075
  };
2076
- this.register(), this.delay > 0 ? setTimeout(() => xi(t), this.delay) : xi(t);
2076
+ this.register(), this.delay > 0 ? setTimeout((() => xi(t)), this.delay) : xi(t);
2077
2077
  }
2078
2078
  tick(t) {
2079
2079
  const e = (t || +/* @__PURE__ */ new Date()) - this.startTime, s = Math.min(e, this.duration);
@@ -2106,10 +2106,10 @@ const Iu = ["startValue", "endValue"];
2106
2106
  class ju extends Oa {
2107
2107
  constructor(t) {
2108
2108
  let { startValue: e = [0], endValue: s = [100] } = t;
2109
- super(x(x({}, mt(t, Iu)), {}, { startValue: e, byValue: s.map((i, n) => i - e[n]) }));
2109
+ super(x(x({}, mt(t, Iu)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
2110
2110
  }
2111
2111
  calculate(t) {
2112
- const e = this.startValue.map((s, i) => this.easing(t, s, this.byValue[i], this.duration, i));
2112
+ const e = this.startValue.map(((s, i) => this.easing(t, s, this.byValue[i], this.duration, i)));
2113
2113
  return { value: e, valueProgress: Math.abs((e[0] - this.startValue[0]) / this.byValue[0]) };
2114
2114
  }
2115
2115
  }
@@ -2118,11 +2118,11 @@ class Hu extends Oa {
2118
2118
  constructor(t) {
2119
2119
  let { startValue: e, endValue: s, easing: i = Bu, onChange: n, onComplete: r, abort: a } = t, l = mt(t, Nu);
2120
2120
  const h = new ot(e).getSource(), c = new ot(s).getSource();
2121
- super(x(x({}, l), {}, { startValue: h, byValue: c.map((u, d) => u - h[d]), easing: i, onChange: Pr(n), onComplete: Pr(r), abort: Pr(a) }));
2121
+ super(x(x({}, l), {}, { startValue: h, byValue: c.map(((u, d) => u - h[d])), easing: i, onChange: Pr(n), onComplete: Pr(r), abort: Pr(a) }));
2122
2122
  }
2123
2123
  calculate(t) {
2124
- const [e, s, i, n] = this.startValue.map((a, l) => this.easing(t, a, this.byValue[l], this.duration, l)), r = [...[e, s, i].map(Math.round), Ts(0, n, 1)];
2125
- return { value: r, valueProgress: r.map((a, l) => this.byValue[l] !== 0 ? Math.abs((a - this.startValue[l]) / this.byValue[l]) : 0).find((a) => a !== 0) || 0 };
2124
+ const [e, s, i, n] = this.startValue.map(((a, l) => this.easing(t, a, this.byValue[l], this.duration, l))), r = [...[e, s, i].map(Math.round), Ts(0, n, 1)];
2125
+ return { value: r, valueProgress: r.map(((a, l) => this.byValue[l] !== 0 ? Math.abs((a - this.startValue[l]) / this.byValue[l]) : 0)).find(((a) => a !== 0)) || 0 };
2126
2126
  }
2127
2127
  }
2128
2128
  function Da(o) {
@@ -2138,11 +2138,11 @@ class bt {
2138
2138
  this.status = t, this.points = [];
2139
2139
  }
2140
2140
  includes(t) {
2141
- return this.points.some((e) => e.eq(t));
2141
+ return this.points.some(((e) => e.eq(t)));
2142
2142
  }
2143
2143
  append() {
2144
2144
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
2145
- return this.points = this.points.concat(e.filter((i) => !this.includes(i))), this;
2145
+ return this.points = this.points.concat(e.filter(((i) => !this.includes(i)))), this;
2146
2146
  }
2147
2147
  static isPointContained(t, e, s) {
2148
2148
  let i = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
@@ -2155,7 +2155,7 @@ class bt {
2155
2155
  }
2156
2156
  }
2157
2157
  static isPointInPolygon(t, e) {
2158
- const s = new A(t).setX(Math.min(t.x - 1, ...e.map((n) => n.x)));
2158
+ const s = new A(t).setX(Math.min(t.x - 1, ...e.map(((n) => n.x))));
2159
2159
  let i = 0;
2160
2160
  for (let n = 0; n < e.length; n++) {
2161
2161
  const r = this.intersectSegmentSegment(e[n], e[(n + 1) % e.length], t, s);
@@ -2254,7 +2254,7 @@ class zu extends Hl {
2254
2254
  const { tl: t, tr: e, br: s, bl: i } = this.aCoords || (this.aCoords = this.calcACoords()), n = [t, e, s, i];
2255
2255
  if (this.group) {
2256
2256
  const r = this.group.calcTransformMatrix();
2257
- return n.map((a) => Nt(a, r));
2257
+ return n.map(((a) => Nt(a, r)));
2258
2258
  }
2259
2259
  return n;
2260
2260
  }
@@ -2266,7 +2266,7 @@ class zu extends Hl {
2266
2266
  return e.status === "Intersection" || e.status === "Coincident" || t.isContainedWithinObject(this) || this.isContainedWithinObject(t);
2267
2267
  }
2268
2268
  isContainedWithinObject(t) {
2269
- return this.getCoords().every((e) => t.containsPoint(e));
2269
+ return this.getCoords().every(((e) => t.containsPoint(e)));
2270
2270
  }
2271
2271
  isContainedWithinRect(t, e) {
2272
2272
  const { left: s, top: i, width: n, height: r } = this.getBoundingRect();
@@ -2281,12 +2281,12 @@ class zu extends Hl {
2281
2281
  isOnScreen() {
2282
2282
  if (!this.canvas) return !1;
2283
2283
  const { tl: t, br: e } = this.canvas.vptCoords;
2284
- return !!this.getCoords().some((s) => s.x <= e.x && s.x >= t.x && s.y <= e.y && s.y >= t.y) || !!this.intersectsWithRect(t, e) || this.containsPoint(t.midPointFrom(e));
2284
+ return !!this.getCoords().some(((s) => s.x <= e.x && s.x >= t.x && s.y <= e.y && s.y >= t.y)) || !!this.intersectsWithRect(t, e) || this.containsPoint(t.midPointFrom(e));
2285
2285
  }
2286
2286
  isPartiallyOnScreen() {
2287
2287
  if (!this.canvas) return !1;
2288
2288
  const { tl: t, br: e } = this.canvas.vptCoords;
2289
- return this.intersectsWithRect(t, e) ? !0 : this.getCoords().every((s) => (s.x >= e.x || s.x <= t.x) && (s.y >= e.y || s.y <= t.y)) && this.containsPoint(t.midPointFrom(e));
2289
+ return this.intersectsWithRect(t, e) ? !0 : this.getCoords().every(((s) => (s.x >= e.x || s.x <= t.x) && (s.y >= e.y || s.y <= t.y))) && this.containsPoint(t.midPointFrom(e));
2290
2290
  }
2291
2291
  getBoundingRect() {
2292
2292
  return Ie(this.getCoords());
@@ -2334,7 +2334,7 @@ class zu extends Hl {
2334
2334
  let t = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], e = this.calcOwnMatrix();
2335
2335
  if (t || !this.group) return e;
2336
2336
  const s = this.transformMatrixKey(t), i = this.matrixCache;
2337
- return i && i.key.every((n, r) => n === s[r]) ? i.value : (this.group && (e = Ct(this.group.calcTransformMatrix(!1), e)), this.matrixCache = { key: s, value: e }, e);
2337
+ return i && i.key.every(((n, r) => n === s[r])) ? i.value : (this.group && (e = Ct(this.group.calcTransformMatrix(!1), e)), this.matrixCache = { key: s, value: e }, e);
2338
2338
  }
2339
2339
  calcOwnMatrix() {
2340
2340
  const t = this.transformMatrixKey(!0), e = this.ownMatrixCache;
@@ -2505,9 +2505,9 @@ let ze = class An extends zu {
2505
2505
  }
2506
2506
  createClipPathLayer(t, e) {
2507
2507
  const s = ue(e), i = s.getContext("2d");
2508
- if (i.translate(e.cacheTranslationX, e.cacheTranslationY), i.scale(e.zoomX, e.zoomY), t._cacheCanvas = s, e.parentClipPaths.forEach((n) => {
2508
+ if (i.translate(e.cacheTranslationX, e.cacheTranslationY), i.scale(e.zoomX, e.zoomY), t._cacheCanvas = s, e.parentClipPaths.forEach(((n) => {
2509
2509
  n.transform(i);
2510
- }), e.parentClipPaths.push(t), t.absolutePositioned) {
2510
+ })), e.parentClipPaths.push(t), t.absolutePositioned) {
2511
2511
  const n = re(this.calcTransformMatrix());
2512
2512
  i.transform(n[0], n[1], n[2], n[3], n[4], n[5]);
2513
2513
  }
@@ -2652,15 +2652,15 @@ let ze = class An extends zu {
2652
2652
  Dn.cancelByTarget(this), this.off(), this._set("canvas", void 0), this._cacheCanvas && je().dispose(this._cacheCanvas), this._cacheCanvas = void 0, this._cacheContext = null;
2653
2653
  }
2654
2654
  animate(t, e) {
2655
- return Object.entries(t).reduce((s, i) => {
2655
+ return Object.entries(t).reduce(((s, i) => {
2656
2656
  let [n, r] = i;
2657
2657
  return s[n] = this._animate(n, r, e), s;
2658
- }, {});
2658
+ }), {});
2659
2659
  }
2660
2660
  _animate(t, e) {
2661
2661
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2662
- const i = t.split("."), n = this.constructor.colorProperties.includes(i[i.length - 1]), { abort: r, startValue: a, onChange: l, onComplete: h } = s, c = x(x({}, s), {}, { target: this, startValue: a ?? i.reduce((u, d) => u[d], this), endValue: e, abort: r?.bind(this), onChange: (u, d, f) => {
2663
- i.reduce((g, p, v) => (v === i.length - 1 && (g[p] = u), g[p]), this), l && l(u, d, f);
2662
+ const i = t.split("."), n = this.constructor.colorProperties.includes(i[i.length - 1]), { abort: r, startValue: a, onChange: l, onComplete: h } = s, c = x(x({}, s), {}, { target: this, startValue: a ?? i.reduce(((u, d) => u[d]), this), endValue: e, abort: r?.bind(this), onChange: (u, d, f) => {
2663
+ i.reduce(((g, p, v) => (v === i.length - 1 && (g[p] = u), g[p])), this), l && l(u, d, f);
2664
2664
  }, onComplete: (u, d, f) => {
2665
2665
  this.setCoords(), h && h(u, d, f);
2666
2666
  } });
@@ -2718,18 +2718,18 @@ let ze = class An extends zu {
2718
2718
  }
2719
2719
  _removeDefaultValues(t) {
2720
2720
  const e = this.constructor.getDefaults(), s = Object.keys(e).length > 0 ? e : Object.getPrototypeOf(this);
2721
- return Aa(t, (i, n) => {
2721
+ return Aa(t, ((i, n) => {
2722
2722
  if (n === at || n === ae || n === "type") return !0;
2723
2723
  const r = s[n];
2724
2724
  return i !== r && !(Array.isArray(i) && Array.isArray(r) && i.length === 0 && r.length === 0);
2725
- });
2725
+ }));
2726
2726
  }
2727
2727
  toString() {
2728
2728
  return "#<".concat(this.constructor.type, ">");
2729
2729
  }
2730
2730
  static _fromObject(t) {
2731
2731
  let e = mt(t, Vu), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = mt(s, Gu);
2732
- return ji(e, n).then((r) => i ? (delete r[i], new this(e[i], r)) : new this(r));
2732
+ return ji(e, n).then(((r) => i ? (delete r[i], new this(e[i], r)) : new this(r)));
2733
2733
  }
2734
2734
  static fromObject(t, e) {
2735
2735
  return this._fromObject(t, e);
@@ -2746,14 +2746,14 @@ function ni(o) {
2746
2746
  return n.setPositionByOrigin(h, e.originX, e.originY), c;
2747
2747
  };
2748
2748
  }
2749
- const Wo = ii(Pi, ni((o, t, e, s) => {
2749
+ const Wo = ii(Pi, ni(((o, t, e, s) => {
2750
2750
  const i = Ea(t, t.originX, t.originY, e, s);
2751
2751
  if (Pt(t.originX) === Pt(K) || Pt(t.originX) === Pt(St) && i.x < 0 || Pt(t.originX) === Pt(at) && i.x > 0) {
2752
2752
  const { target: n } = t, r = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = sh(t) ? 2 : 1, l = n.width, h = Math.abs(i.x * a / n.scaleX) - r;
2753
2753
  return n.set("width", Math.max(h, 1)), l !== n.width;
2754
2754
  }
2755
2755
  return !1;
2756
- }));
2756
+ })));
2757
2757
  function Wu(o, t, e, s, i) {
2758
2758
  s = s || {};
2759
2759
  const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, l = a ? Kt : Ot, h = !a && (s.cornerStrokeColor || i.cornerStrokeColor);
@@ -2809,7 +2809,7 @@ class we {
2809
2809
  ((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ? Wu.call(this, t, e, s, i, n) : Xu.call(this, t, e, s, i, n);
2810
2810
  }
2811
2811
  }
2812
- const Uu = (o, t, e) => e.lockRotation ? Fn : t.cursorStyle, Yu = ii(jl, ni((o, t, e, s) => {
2812
+ const Uu = (o, t, e) => e.lockRotation ? Fn : t.cursorStyle, Yu = ii(jl, ni(((o, t, e, s) => {
2813
2813
  let { target: i, ex: n, ey: r, theta: a, originX: l, originY: h } = t;
2814
2814
  const c = i.translateToOriginPoint(i.getRelativeCenterPoint(), l, h);
2815
2815
  if (Te(i, "lockRotation")) return !1;
@@ -2822,7 +2822,7 @@ const Uu = (o, t, e) => e.lockRotation ? Fn : t.cursorStyle, Yu = ii(jl, ni((o,
2822
2822
  f < 0 && (f = 360 + f), f %= 360;
2823
2823
  const g = i.angle !== f;
2824
2824
  return i.angle = f, g;
2825
- }));
2825
+ })));
2826
2826
  function ph(o, t) {
2827
2827
  const e = t.canvas, s = o[e.uniScaleKey];
2828
2828
  return e.uniformScaling && !s || !e.uniformScaling && s;
@@ -2856,7 +2856,7 @@ function Ra(o, t, e, s) {
2856
2856
  const g = n.scaleX, p = n.scaleY;
2857
2857
  return r ? (r === "x" && n.set(Zt, h), r === "y" && n.set(ce, c)) : (!Te(n, "lockScalingX") && n.set(Zt, h), !Te(n, "lockScalingY") && n.set(ce, c)), g !== n.scaleX || p !== n.scaleY;
2858
2858
  }
2859
- const Ki = ii($n, ni((o, t, e, s) => Ra(o, t, e, s))), qu = ii($n, ni((o, t, e, s) => Ra(o, t, e, s, { by: "x" }))), Ku = ii($n, ni((o, t, e, s) => Ra(o, t, e, s, { by: "y" }))), Ju = ["target", "ex", "ey", "skewingSide"], Mr = { x: { counterAxis: "y", scale: Zt, skew: ti, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: ce, skew: ei, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Qu = ["ns", "nesw", "ew", "nwse"], Zu = (o, t, e) => {
2859
+ const Ki = ii($n, ni(((o, t, e, s) => Ra(o, t, e, s)))), qu = ii($n, ni(((o, t, e, s) => Ra(o, t, e, s, { by: "x" })))), Ku = ii($n, ni(((o, t, e, s) => Ra(o, t, e, s, { by: "y" })))), Ju = ["target", "ex", "ey", "skewingSide"], Mr = { x: { counterAxis: "y", scale: Zt, skew: ti, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: ce, skew: ei, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Qu = ["ns", "nesw", "ew", "nwse"], Zu = (o, t, e) => {
2860
2860
  if (t.x !== 0 && Te(e, "lockSkewingY") || t.y !== 0 && Te(e, "lockSkewingX")) return Fn;
2861
2861
  const s = nh(e, t) % 4;
2862
2862
  return "".concat(Qu[s], "-resize");
@@ -2865,7 +2865,7 @@ function vh(o, t, e, s, i) {
2865
2865
  const { target: n } = e, { counterAxis: r, origin: a, lockSkewing: l, skew: h, flip: c } = Mr[o];
2866
2866
  if (Te(n, l)) return !1;
2867
2867
  const { origin: u, flip: d } = Mr[r], f = Pt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[h] === 0 && Ea(e, K, K, s, i)[o] > 0 || n[h] > 0 ? 1 : -1) * g) + 0.5;
2868
- return ii(Nl, ni((m, b, _, w) => function(C, T, E) {
2868
+ return ii(Nl, ni(((m, b, _, w) => (function(C, T, E) {
2869
2869
  let { target: k, ex: O, ey: B, skewingSide: N } = T, P = mt(T, Ju);
2870
2870
  const { skew: R } = Mr[C], F = E.subtract(new A(O, B)).divide(new A(k.scaleX, k.scaleY))[C], z = k[R], M = P[R], L = Math.tan(yt(M)), Y = C === "y" ? k._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : k._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, ut = 2 * F * N / Math.max(Y, 1) + L, ft = Be(Math.atan(ut));
2871
2871
  k.set(R, ft);
@@ -2875,7 +2875,7 @@ function vh(o, t, e, s, i) {
2875
2875
  q !== 1 && k.set(Zt, q * nt);
2876
2876
  }
2877
2877
  return vt;
2878
- }(o, b, new A(_, w))))(t, x(x({}, e), {}, { [a]: p, skewingSide: g }), s, i);
2878
+ })(o, b, new A(_, w)))))(t, x(x({}, e), {}, { [a]: p, skewingSide: g }), s, i);
2879
2879
  }
2880
2880
  const td = (o, t, e, s) => vh("x", o, t, e, s), ed = (o, t, e, s) => vh("y", o, t, e, s);
2881
2881
  function er(o, t) {
@@ -2921,10 +2921,10 @@ class Oi extends ze {
2921
2921
  const t = this.getViewportTransform(), e = this.getCenterPoint(), s = si(e.x, e.y), i = Ps({ angle: this.getTotalAngle() - (this.group && this.flipX ? 180 : 0) }), n = Ct(s, i), r = Ct(t, n), a = Ct(r, [1 / t[0], 0, 0, 1 / t[3], 0, 0]), l = this.group ? Cs(this.calcTransformMatrix()) : void 0;
2922
2922
  l && (l.scaleX = Math.abs(l.scaleX), l.scaleY = Math.abs(l.scaleY));
2923
2923
  const h = this._calculateCurrentDimensions(l), c = {};
2924
- return this.forEachControl((u, d) => {
2924
+ return this.forEachControl(((u, d) => {
2925
2925
  const f = u.positionHandler(h, a, this, u);
2926
2926
  c[d] = Object.assign(f, this._calcCornerCoords(u, f));
2927
- }), c;
2927
+ })), c;
2928
2928
  }
2929
2929
  _calcCornerCoords(t, e) {
2930
2930
  const s = this.getTotalAngle();
@@ -2965,20 +2965,20 @@ class Oi extends ze {
2965
2965
  }
2966
2966
  drawControlsConnectingLines(t, e) {
2967
2967
  let s = !1;
2968
- t.beginPath(), this.forEachControl((i, n) => {
2968
+ t.beginPath(), this.forEachControl(((i, n) => {
2969
2969
  i.withConnection && i.getVisibility(this, n) && (s = !0, t.moveTo(i.x * e.x, i.y * e.y), t.lineTo(i.x * e.x + i.offsetX, i.y * e.y + i.offsetY));
2970
- }), s && t.stroke();
2970
+ })), s && t.stroke();
2971
2971
  }
2972
2972
  drawControls(t) {
2973
2973
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2974
2974
  t.save();
2975
2975
  const s = this.getCanvasRetinaScaling(), { cornerStrokeColor: i, cornerDashArray: n, cornerColor: r } = this, a = x({ cornerStrokeColor: i, cornerDashArray: n, cornerColor: r }, e);
2976
- t.setTransform(s, 0, 0, s, 0, 0), t.strokeStyle = t.fillStyle = a.cornerColor, this.transparentCorners || (t.strokeStyle = a.cornerStrokeColor), this._setLineDash(t, a.cornerDashArray), this.forEachControl((l, h) => {
2976
+ t.setTransform(s, 0, 0, s, 0, 0), t.strokeStyle = t.fillStyle = a.cornerColor, this.transparentCorners || (t.strokeStyle = a.cornerStrokeColor), this._setLineDash(t, a.cornerDashArray), this.forEachControl(((l, h) => {
2977
2977
  if (l.getVisibility(this, h)) {
2978
2978
  const c = this.oCoords[h];
2979
2979
  l.render(t, c.x, c.y, a, this);
2980
2980
  }
2981
- }), t.restore();
2981
+ })), t.restore();
2982
2982
  }
2983
2983
  isControlVisible(t) {
2984
2984
  return this.controls[t] && this.controls[t].getVisibility(this, t);
@@ -2988,10 +2988,10 @@ class Oi extends ze {
2988
2988
  }
2989
2989
  setControlsVisibility() {
2990
2990
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2991
- Object.entries(t).forEach((e) => {
2991
+ Object.entries(t).forEach(((e) => {
2992
2992
  let [s, i] = e;
2993
2993
  return this.setControlVisible(s, i);
2994
- });
2994
+ }));
2995
2995
  }
2996
2996
  clearContextTop(t) {
2997
2997
  if (!this.canvas) return;
@@ -3023,11 +3023,11 @@ class Oi extends ze {
3023
3023
  }
3024
3024
  }
3025
3025
  function yh(o, t) {
3026
- return t.forEach((e) => {
3027
- Object.getOwnPropertyNames(e.prototype).forEach((s) => {
3026
+ return t.forEach(((e) => {
3027
+ Object.getOwnPropertyNames(e.prototype).forEach(((s) => {
3028
3028
  s !== "constructor" && Object.defineProperty(o.prototype, s, Object.getOwnPropertyDescriptor(e.prototype, s) || /* @__PURE__ */ Object.create(null));
3029
- });
3030
- }), o;
3029
+ }));
3030
+ })), o;
3031
3031
  }
3032
3032
  S(Oi, "ownDefaults", { noScaleCache: !0, lockMovementX: !1, lockMovementY: !1, lockRotation: !1, lockScalingX: !1, lockScalingY: !1, lockSkewingX: !1, lockSkewingY: !1, lockScalingFlip: !1, cornerSize: 13, touchCornerSize: 24, transparentCorners: !0, cornerColor: "rgb(178,204,255)", cornerStrokeColor: "", cornerStyle: "rect", cornerDashArray: null, hasControls: !0, borderColor: "rgb(178,204,255)", borderDashArray: null, borderOpacityWhenMoving: 0.4, borderScaleFactor: 1, hasBorders: !0, selectionBackgroundColor: "", selectable: !0, evented: !0, perPixelTargetFind: !1, activeOn: "down", hoverCursor: null, moveCursor: null });
3033
3033
  class Vt extends Oi {
@@ -3077,9 +3077,9 @@ class Ws extends wh {
3077
3077
  }
3078
3078
  projectBevel() {
3079
3079
  const t = [];
3080
- return (this.alpha % Ke == 0 ? [this.B] : [this.B, this.C]).forEach((e) => {
3080
+ return (this.alpha % Ke == 0 ? [this.B] : [this.B, this.C]).forEach(((e) => {
3081
3081
  t.push(this.projectOrthogonally(this.A, e)), t.push(this.projectOrthogonally(this.A, e, -this.strokeProjectionMagnitude));
3082
- }), t;
3082
+ })), t;
3083
3083
  }
3084
3084
  projectMiter() {
3085
3085
  const t = [], e = Math.abs(this.alpha), s = 1 / Math.sin(e / 2), i = this.scaleUnitVector(this.bisector, -this.strokeProjectionMagnitude * s), n = this.options.strokeUniform ? jn(this.scaleUnitVector(this.bisector, this.options.strokeMiterLimit)) : this.options.strokeMiterLimit;
@@ -3087,15 +3087,15 @@ class Ws extends wh {
3087
3087
  }
3088
3088
  projectRoundNoSkew(t, e) {
3089
3089
  const s = [], i = new A(Ws.getOrthogonalRotationFactor(this.bisector), Ws.getOrthogonalRotationFactor(new A(this.bisector.y, this.bisector.x)));
3090
- return [new A(1, 0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i), new A(0, 1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i)].forEach((n) => {
3090
+ return [new A(1, 0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i), new A(0, 1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i)].forEach(((n) => {
3091
3091
  Jr(n, t, e) && s.push(this.A.add(n));
3092
- }), s;
3092
+ })), s;
3093
3093
  }
3094
3094
  projectRoundWithSkew(t, e) {
3095
3095
  const s = [], { skewX: i, skewY: n, scaleX: r, scaleY: a, strokeUniform: l } = this.options, h = new A(Math.tan(yt(i)), Math.tan(yt(n))), c = this.strokeProjectionMagnitude, u = l ? c / a / Math.sqrt(1 / a ** 2 + 1 / r ** 2 * h.y ** 2) : c / Math.sqrt(1 + h.y ** 2), d = new A(Math.sqrt(Math.max(c ** 2 - u ** 2, 0)), u), f = l ? c / Math.sqrt(1 + h.x ** 2 * (1 / a) ** 2 / (1 / r + 1 / r * h.x * h.y) ** 2) : c / Math.sqrt(1 + h.x ** 2 / (1 + h.x * h.y) ** 2), g = new A(f, Math.sqrt(Math.max(c ** 2 - f ** 2, 0)));
3096
- return [g, g.scalarMultiply(-1), d, d.scalarMultiply(-1)].map((p) => this.applySkew(l ? p.multiply(this.strokeUniformScalar) : p)).forEach((p) => {
3096
+ return [g, g.scalarMultiply(-1), d, d.scalarMultiply(-1)].map(((p) => this.applySkew(l ? p.multiply(this.strokeUniformScalar) : p))).forEach(((p) => {
3097
3097
  Jr(p, t, e) && s.push(this.applySkew(this.A).add(p));
3098
- }), s;
3098
+ })), s;
3099
3099
  }
3100
3100
  projectRound() {
3101
3101
  const t = [];
@@ -3114,7 +3114,7 @@ class Ws extends wh {
3114
3114
  }
3115
3115
  }
3116
3116
  project() {
3117
- return this.projectPoints().map((t) => ({ originPoint: this.A, projectedPoint: t, angle: this.alpha, bisector: this.bisector }));
3117
+ return this.projectPoints().map(((t) => ({ originPoint: this.A, projectedPoint: t, angle: this.alpha, bisector: this.bisector })));
3118
3118
  }
3119
3119
  }
3120
3120
  class Yo extends wh {
@@ -3146,7 +3146,7 @@ class Yo extends wh {
3146
3146
  const e = this.calcOrthogonalProjection(this.A, this.T, this.strokeProjectionMagnitude), s = this.scaleUnitVector(tr(this.createSideVector(this.A, this.T)), -this.strokeProjectionMagnitude), i = this.A.add(s);
3147
3147
  t.push(i.add(e), i.subtract(e));
3148
3148
  }
3149
- return t.map((e) => this.applySkew(e));
3149
+ return t.map(((e) => this.applySkew(e)));
3150
3150
  }
3151
3151
  projectPoints() {
3152
3152
  switch (this.options.strokeLineCap) {
@@ -3159,42 +3159,42 @@ class Yo extends wh {
3159
3159
  }
3160
3160
  }
3161
3161
  project() {
3162
- return this.projectPoints().map((t) => ({ originPoint: this.A, projectedPoint: t }));
3162
+ return this.projectPoints().map(((t) => ({ originPoint: this.A, projectedPoint: t })));
3163
3163
  }
3164
3164
  }
3165
3165
  const xh = function(o, t) {
3166
3166
  let e = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
3167
3167
  const s = [];
3168
3168
  if (o.length === 0) return s;
3169
- const i = o.reduce((n, r) => (n[n.length - 1].eq(r) || n.push(new A(r)), n), [new A(o[0])]);
3169
+ const i = o.reduce(((n, r) => (n[n.length - 1].eq(r) || n.push(new A(r)), n)), [new A(o[0])]);
3170
3170
  if (i.length === 1) e = !0;
3171
3171
  else if (!e) {
3172
3172
  const n = i[0], r = ((a, l) => {
3173
3173
  for (let h = a.length - 1; h >= 0; h--) if (l(a[h], h, a)) return h;
3174
3174
  return -1;
3175
- })(i, (a) => !a.eq(n));
3175
+ })(i, ((a) => !a.eq(n)));
3176
3176
  i.splice(r + 1);
3177
3177
  }
3178
- return i.forEach((n, r, a) => {
3178
+ return i.forEach(((n, r, a) => {
3179
3179
  let l, h;
3180
3180
  r === 0 ? (h = a[1], l = e ? n : a[a.length - 1]) : r === a.length - 1 ? (l = a[r - 1], h = e ? n : a[0]) : (l = a[r - 1], h = a[r + 1]), e && a.length === 1 ? s.push(...new Yo(n, n, t).project()) : !e || r !== 0 && r !== a.length - 1 ? s.push(...new Ws(n, l, h, t).project()) : s.push(...new Yo(n, r === 0 ? h : l, t).project());
3181
- }), s;
3181
+ })), s;
3182
3182
  }, Fa = (o) => {
3183
3183
  const t = {};
3184
- return Object.keys(o).forEach((e) => {
3185
- t[e] = {}, Object.keys(o[e]).forEach((s) => {
3184
+ return Object.keys(o).forEach(((e) => {
3185
+ t[e] = {}, Object.keys(o[e]).forEach(((s) => {
3186
3186
  t[e][s] = x({}, o[e][s]);
3187
- });
3188
- }), t;
3187
+ }));
3188
+ })), t;
3189
3189
  }, Sh = (o) => o.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3190
3190
  let hi;
3191
3191
  const sr = (o) => {
3192
3192
  if (hi || hi || (hi = "Intl" in Li() && "Segmenter" in Intl && new Intl.Segmenter(void 0, { granularity: "grapheme" })), hi) {
3193
3193
  const t = hi.segment(o);
3194
- return Array.from(t).map((e) => {
3194
+ return Array.from(t).map(((e) => {
3195
3195
  let { segment: s } = e;
3196
3196
  return s;
3197
- });
3197
+ }));
3198
3198
  }
3199
3199
  return rd(o);
3200
3200
  }, rd = (o) => {
@@ -3260,11 +3260,11 @@ function $o(o, t) {
3260
3260
  function ld(o, t) {
3261
3261
  let e = !0;
3262
3262
  const s = $o(o, t.pop());
3263
- return s && t.length && (e = function(i, n) {
3263
+ return s && t.length && (e = (function(i, n) {
3264
3264
  let r, a = !0;
3265
3265
  for (; i.parentElement && i.parentElement.nodeType === 1 && n.length; ) a && (r = n.pop()), a = $o(i = i.parentElement, r);
3266
3266
  return n.length === 0;
3267
- }(o, t)), s && e && t.length === 0;
3267
+ })(o, t)), s && e && t.length === 0;
3268
3268
  }
3269
3269
  const hd = (o) => {
3270
3270
  var t;
@@ -3279,7 +3279,7 @@ function Bn(o) {
3279
3279
  const s = wd.exec(e[0]);
3280
3280
  if (!s) continue;
3281
3281
  let i = Qt;
3282
- const n = s.filter((g) => !!g), [, r, ...a] = n, [l, h, c, u, d, f] = a.map((g) => parseFloat(g));
3282
+ const n = s.filter(((g) => !!g)), [, r, ...a] = n, [l, h, c, u, d, f] = a.map(((g) => parseFloat(g)));
3283
3283
  switch (r) {
3284
3284
  case "translate":
3285
3285
  i = si(l, h);
@@ -3332,34 +3332,34 @@ function Cd(o, t) {
3332
3332
  s && (t.fontStyle = s), i && (t.fontWeight = isNaN(parseFloat(i)) ? i : parseFloat(i)), n && (t.fontSize = Yt(n)), a && (t.fontFamily = a), r && (t.lineHeight = r === "normal" ? 1 : r);
3333
3333
  }
3334
3334
  function Zr(o, t) {
3335
- o.replace(/;\s*$/, "").split(";").forEach((e) => {
3335
+ o.replace(/;\s*$/, "").split(";").forEach(((e) => {
3336
3336
  if (!e) return;
3337
3337
  const [s, i] = e.split(":");
3338
3338
  t[s.trim().toLowerCase()] = i.trim();
3339
- });
3339
+ }));
3340
3340
  }
3341
3341
  function Ad(o) {
3342
3342
  const t = {}, e = o.getAttribute("style");
3343
- return e && (typeof e == "string" ? Zr(e, t) : function(s, i) {
3344
- Object.entries(s).forEach((n) => {
3343
+ return e && (typeof e == "string" ? Zr(e, t) : (function(s, i) {
3344
+ Object.entries(s).forEach(((n) => {
3345
3345
  let [r, a] = n;
3346
3346
  a !== void 0 && (i[r.toLowerCase()] = a);
3347
- });
3348
- }(e, t)), t;
3347
+ }));
3348
+ })(e, t)), t;
3349
3349
  }
3350
3350
  const Td = { stroke: "strokeOpacity", fill: "fillOpacity" };
3351
3351
  function Qe(o, t, e) {
3352
3352
  if (!o) return {};
3353
3353
  let s, i = {}, n = va;
3354
3354
  o.parentNode && No.test(o.parentNode.nodeName) && (i = Qe(o.parentElement, t, e), i.fontSize && (s = n = Yt(i.fontSize)));
3355
- const r = x(x(x({}, t.reduce((h, c) => {
3355
+ const r = x(x(x({}, t.reduce(((h, c) => {
3356
3356
  const u = o.getAttribute(c);
3357
3357
  return u && (h[c] = u), h;
3358
- }, {})), function(h) {
3358
+ }), {})), (function(h) {
3359
3359
  let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = {};
3360
3360
  for (const d in c) ld(h, d.split(" ")) && (u = x(x({}, u), c[d]));
3361
3361
  return u;
3362
- }(o, e)), Ad(o));
3362
+ })(o, e)), Ad(o));
3363
3363
  r[Er] && o.setAttribute(Er, r[Er]), r[Tr] && (s = Yt(r[Tr], n), r[Tr] = "".concat(s));
3364
3364
  const a = {};
3365
3365
  for (const h in r) {
@@ -3368,9 +3368,9 @@ function Qe(o, t, e) {
3368
3368
  }
3369
3369
  a && a.font && Cd(a.font, a);
3370
3370
  const l = x(x({}, i), a);
3371
- return No.test(o.nodeName) ? l : function(h) {
3371
+ return No.test(o.nodeName) ? l : (function(h) {
3372
3372
  const c = Vt.getDefaults();
3373
- return Object.entries(Td).forEach((u) => {
3373
+ return Object.entries(Td).forEach(((u) => {
3374
3374
  let [d, f] = u;
3375
3375
  if (h[f] === void 0 || h[d] === "") return;
3376
3376
  if (h[d] === void 0) {
@@ -3380,8 +3380,8 @@ function Qe(o, t, e) {
3380
3380
  if (h[d].indexOf("url(") === 0) return;
3381
3381
  const g = new ot(h[d]);
3382
3382
  h[d] = g.setAlpha(ht(g.getAlpha() * h[f], 2)).toRgba();
3383
- }), h;
3384
- }(l);
3383
+ })), h;
3384
+ })(l);
3385
3385
  }
3386
3386
  const Ed = ["left", "top", "width", "height", "visible"], Th = ["rx", "ry"];
3387
3387
  class Re extends Vt {
@@ -3437,7 +3437,7 @@ class nr {
3437
3437
  const { type: s, target: i } = e;
3438
3438
  if (s === zn && e.overrides) return e.overrides;
3439
3439
  if (t.length === 0) return;
3440
- const { left: n, top: r, width: a, height: l } = Ie(t.map((u) => Eh(i, u)).reduce((u, d) => u.concat(d), [])), h = new A(a, l), c = new A(n, r).add(h.scalarDivide(2));
3440
+ const { left: n, top: r, width: a, height: l } = Ie(t.map(((u) => Eh(i, u))).reduce(((u, d) => u.concat(d)), [])), h = new A(a, l), c = new A(n, r).add(h.scalarDivide(2));
3441
3441
  if (s === Ue) {
3442
3442
  const u = this.getInitialSize(e, { size: h, center: c });
3443
3443
  return { center: c, relativeCorrection: new A(0, 0), size: u };
@@ -3468,7 +3468,7 @@ class Di {
3468
3468
  }
3469
3469
  attachHandlers(t, e) {
3470
3470
  const { target: s } = e;
3471
- return [On, Il, Pi, jl, $n, Nl, Mn, gu, pu].map((i) => t.on(i, (n) => this.performLayout(i === On ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })));
3471
+ return [On, Il, Pi, jl, $n, Nl, Mn, gu, pu].map(((i) => t.on(i, ((n) => this.performLayout(i === On ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
3472
3472
  }
3473
3473
  subscribe(t, e) {
3474
3474
  this.unsubscribe(t, e);
@@ -3476,19 +3476,19 @@ class Di {
3476
3476
  this._subscriptions.set(t, s);
3477
3477
  }
3478
3478
  unsubscribe(t, e) {
3479
- (this._subscriptions.get(t) || []).forEach((s) => s()), this._subscriptions.delete(t);
3479
+ (this._subscriptions.get(t) || []).forEach(((s) => s())), this._subscriptions.delete(t);
3480
3480
  }
3481
3481
  unsubscribeTargets(t) {
3482
- t.targets.forEach((e) => this.unsubscribe(e, t));
3482
+ t.targets.forEach(((e) => this.unsubscribe(e, t)));
3483
3483
  }
3484
3484
  subscribeTargets(t) {
3485
- t.targets.forEach((e) => this.subscribe(e, t));
3485
+ t.targets.forEach(((e) => this.subscribe(e, t)));
3486
3486
  }
3487
3487
  onBeforeLayout(t) {
3488
3488
  const { target: e, type: s } = t, { canvas: i } = e;
3489
3489
  if (s === Ue || s === Hn ? this.subscribeTargets(t) : s === Ia && this.unsubscribeTargets(t), e.fire("layout:before", { context: t }), i && i.fire("object:layout:before", { target: e, context: t }), s === zn && t.deep) {
3490
3490
  const n = mt(t, kd);
3491
- e.forEachObject((r) => r.layoutManager && r.layoutManager.performLayout(x(x({}, n), {}, { bubbles: !1, target: r })));
3491
+ e.forEachObject(((r) => r.layoutManager && r.layoutManager.performLayout(x(x({}, n), {}, { bubbles: !1, target: r }))));
3492
3492
  }
3493
3493
  }
3494
3494
  getLayoutResult(t) {
@@ -3504,9 +3504,9 @@ class Di {
3504
3504
  }
3505
3505
  layoutObjects(t, e) {
3506
3506
  const { target: s } = t;
3507
- s.forEachObject((i) => {
3507
+ s.forEachObject(((i) => {
3508
3508
  i.group === s && this.layoutObject(t, e, i);
3509
- }), t.strategy.shouldLayoutClipPath(t) && this.layoutObject(t, e, s.clipPath);
3509
+ })), t.strategy.shouldLayoutClipPath(t) && this.layoutObject(t, e, s.clipPath);
3510
3510
  }
3511
3511
  layoutObject(t, e, s) {
3512
3512
  let { offset: i } = e;
@@ -3520,7 +3520,7 @@ class Di {
3520
3520
  }
3521
3521
  dispose() {
3522
3522
  const { _subscriptions: t } = this;
3523
- t.forEach((e) => e.forEach((s) => s())), t.clear();
3523
+ t.forEach(((e) => e.forEach(((s) => s())))), t.clear();
3524
3524
  }
3525
3525
  toObject() {
3526
3526
  return { type: kh, strategy: this.strategy.constructor.type };
@@ -3545,15 +3545,15 @@ class be extends Bl(Vt) {
3545
3545
  }
3546
3546
  groupInit(t, e) {
3547
3547
  var s;
3548
- this._objects = [...t], this.__objectSelectionTracker = this.__objectSelectionMonitor.bind(this, !0), this.__objectSelectionDisposer = this.__objectSelectionMonitor.bind(this, !1), this.forEachObject((i) => {
3548
+ this._objects = [...t], this.__objectSelectionTracker = this.__objectSelectionMonitor.bind(this, !0), this.__objectSelectionDisposer = this.__objectSelectionMonitor.bind(this, !1), this.forEachObject(((i) => {
3549
3549
  this.enterGroup(i, !1);
3550
- }), this.layoutManager = (s = e.layoutManager) !== null && s !== void 0 ? s : new Di(), this.layoutManager.performLayout({ type: Ue, target: this, targets: [...t], x: e.left, y: e.top });
3550
+ })), this.layoutManager = (s = e.layoutManager) !== null && s !== void 0 ? s : new Di(), this.layoutManager.performLayout({ type: Ue, target: this, targets: [...t], x: e.left, y: e.top });
3551
3551
  }
3552
3552
  canEnterGroup(t) {
3553
3553
  return t === this || this.isDescendantOf(t) ? (qe("error", "Group: circular object trees are not supported, this call has no effect"), !1) : this._objects.indexOf(t) === -1 || (qe("error", "Group: duplicate objects are not supported inside group, this call has no effect"), !1);
3554
3554
  }
3555
3555
  _filterObjectsBeforeEnteringGroup(t) {
3556
- return t.filter((e, s, i) => this.canEnterGroup(e) && i.indexOf(e) === s);
3556
+ return t.filter(((e, s, i) => this.canEnterGroup(e) && i.indexOf(e) === s));
3557
3557
  }
3558
3558
  add() {
3559
3559
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
@@ -3583,9 +3583,9 @@ class be extends Bl(Vt) {
3583
3583
  }
3584
3584
  _set(t, e) {
3585
3585
  const s = this[t];
3586
- return super._set(t, e), t === "canvas" && s !== e && (this._objects || []).forEach((i) => {
3586
+ return super._set(t, e), t === "canvas" && s !== e && (this._objects || []).forEach(((i) => {
3587
3587
  i._set(t, e);
3588
- }), this;
3588
+ })), this;
3589
3589
  }
3590
3590
  _shouldSetNestedCoords() {
3591
3591
  return this.subTargetCheck;
@@ -3646,7 +3646,7 @@ class be extends Bl(Vt) {
3646
3646
  this._drawClipPath(t, this.clipPath, s);
3647
3647
  }
3648
3648
  setCoords() {
3649
- super.setCoords(), this._shouldSetNestedCoords() && this.forEachObject((t) => t.setCoords());
3649
+ super.setCoords(), this._shouldSetNestedCoords() && this.forEachObject(((t) => t.setCoords()));
3650
3650
  }
3651
3651
  triggerLayout() {
3652
3652
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -3657,14 +3657,14 @@ class be extends Bl(Vt) {
3657
3657
  }
3658
3658
  __serializeObjects(t, e) {
3659
3659
  const s = this.includeDefaultValues;
3660
- return this._objects.filter(function(i) {
3660
+ return this._objects.filter((function(i) {
3661
3661
  return !i.excludeFromExport;
3662
- }).map(function(i) {
3662
+ })).map((function(i) {
3663
3663
  const n = i.includeDefaultValues;
3664
3664
  i.includeDefaultValues = s;
3665
3665
  const r = i[t || "toObject"](e);
3666
3666
  return i.includeDefaultValues = n, r;
3667
- });
3667
+ }));
3668
3668
  }
3669
3669
  toObject() {
3670
3670
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -3675,9 +3675,9 @@ class be extends Bl(Vt) {
3675
3675
  return "#<Group: (".concat(this.complexity(), ")>");
3676
3676
  }
3677
3677
  dispose() {
3678
- this.layoutManager.unsubscribeTargets({ targets: this.getObjects(), target: this }), this._activeObjects = [], this.forEachObject((t) => {
3678
+ this.layoutManager.unsubscribeTargets({ targets: this.getObjects(), target: this }), this._activeObjects = [], this.forEachObject(((t) => {
3679
3679
  this._watchObject(!1, t), t.dispose();
3680
- }), super.dispose();
3680
+ })), super.dispose();
3681
3681
  }
3682
3682
  _createSVGBgRect(t) {
3683
3683
  if (!this.backgroundColor) return "";
@@ -3706,7 +3706,7 @@ class be extends Bl(Vt) {
3706
3706
  }
3707
3707
  static fromObject(t, e) {
3708
3708
  let { type: s, objects: i = [], layoutManager: n } = t, r = mt(t, Md);
3709
- return Promise.all([qs(i, e), ji(r, e)]).then((a) => {
3709
+ return Promise.all([qs(i, e), ji(r, e)]).then(((a) => {
3710
3710
  let [l, h] = a;
3711
3711
  const c = new this(l, x(x(x({}, r), h), {}, { layoutManager: new Od() }));
3712
3712
  if (n) {
@@ -3714,7 +3714,7 @@ class be extends Bl(Vt) {
3714
3714
  c.layoutManager = new u(new d());
3715
3715
  } else c.layoutManager = new Di();
3716
3716
  return c.layoutManager.subscribeTargets({ type: Ue, target: c, targets: c.getObjects() }), c.setCoords(), c;
3717
- });
3717
+ }));
3718
3718
  }
3719
3719
  }
3720
3720
  S(be, "type", "Group"), S(be, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), j.setClass(be);
@@ -3826,7 +3826,7 @@ const Ld = (o, t, e) => {
3826
3826
  case "a":
3827
3827
  c[6] += t, c[7] += e;
3828
3828
  case "A":
3829
- Ld(t, e, c).forEach((d) => n.push(d)), t = c[6], e = c[7];
3829
+ Ld(t, e, c).forEach(((d) => n.push(d))), t = c[6], e = c[7];
3830
3830
  break;
3831
3831
  case "z":
3832
3832
  case "Z":
@@ -3933,13 +3933,13 @@ const Ld = (o, t, e) => {
3933
3933
  e = o[h], h + 1 < o.length && (s = o[h + 1]);
3934
3934
  }
3935
3935
  return l && (i = e.x > o[h - 2].x ? 1 : e.x === o[h - 2].x ? 0 : -1, n = e.y > o[h - 2].y ? 1 : e.y === o[h - 2].y ? 0 : -1), r.push(["L", e.x + i * t, e.y + n * t]), r;
3936
- }, Nh = (o, t) => o.map((e) => e.map((s, i) => i === 0 || t === void 0 ? s : ht(s, t)).join(" ")).join(" ");
3936
+ }, Nh = (o, t) => o.map(((e) => e.map(((s, i) => i === 0 || t === void 0 ? s : ht(s, t))).join(" "))).join(" ");
3937
3937
  function Gn(o, t) {
3938
3938
  const e = o.style;
3939
- e && t && (typeof t == "string" ? e.cssText += ";" + t : Object.entries(t).forEach((s) => {
3939
+ e && t && (typeof t == "string" ? e.cssText += ";" + t : Object.entries(t).forEach(((s) => {
3940
3940
  let [i, n] = s;
3941
3941
  return e.setProperty(i, n);
3942
- }));
3942
+ })));
3943
3943
  }
3944
3944
  const Wd = (o, t) => Math.floor(Math.random() * (t - o + 1)) + o;
3945
3945
  function Bh(o) {
@@ -3997,14 +3997,14 @@ var Xd = Object.freeze({ __proto__: null, addTransformToObject: Ql, animate: Da,
3997
3997
  }, multiplyTransformMatrices: Ct, multiplyTransformMatrixArray: Kn, parsePath: jh, parsePreserveAspectRatioAttribute: ka, parseUnit: Yt, pick: Ms, projectStrokeOnPoints: xh, qrDecompose: Cs, radiansToDegrees: Be, removeFromArray: ds, removeTransformFromObject: (o, t) => {
3998
3998
  const e = re(t), s = Ct(e, o.calcOwnMatrix());
3999
3999
  Js(o, s);
4000
- }, removeTransformMatrixForSvgParsing: Tn, request: Bh, requestAnimFrame: xi, resetObjectTransform: Zl, rotatePoint: (o, t, e) => o.rotate(e, t), rotateVector: Pa, saveObjectTransform: Ta, sendObjectToPlane: qr, sendPointToPlane: Ss, sendVectorToPlane: th, setStyle: Gn, sin: ke, sizeAfterTransform: Qn, string: od, stylesFromArray: Ah, stylesToArray: Ch, toBlob: xa, toDataURL: wa, toFixed: ht, transformPath: (o, t, e) => (e && (t = Ct(t, [1, 0, 0, 1, -e.x, -e.y])), o.map((s) => {
4000
+ }, removeTransformMatrixForSvgParsing: Tn, request: Bh, requestAnimFrame: xi, resetObjectTransform: Zl, rotatePoint: (o, t, e) => o.rotate(e, t), rotateVector: Pa, saveObjectTransform: Ta, sendObjectToPlane: qr, sendPointToPlane: Ss, sendVectorToPlane: th, setStyle: Gn, sin: ke, sizeAfterTransform: Qn, string: od, stylesFromArray: Ah, stylesToArray: Ch, toBlob: xa, toDataURL: wa, toFixed: ht, transformPath: (o, t, e) => (e && (t = Ct(t, [1, 0, 0, 1, -e.x, -e.y])), o.map(((s) => {
4001
4001
  const i = [...s];
4002
4002
  for (let n = 1; n < s.length - 1; n += 2) {
4003
4003
  const { x: r, y: a } = Nt({ x: s[n], y: s[n + 1] }, t);
4004
4004
  i[n] = r, i[n + 1] = a;
4005
4005
  }
4006
4006
  return i;
4007
- })), transformPoint: Nt });
4007
+ }))), transformPoint: Nt });
4008
4008
  class Ud extends Kl {
4009
4009
  constructor(t) {
4010
4010
  let { allowTouchScrolling: e = !1, containerClass: s = "" } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -4074,7 +4074,7 @@ class rr extends Ni {
4074
4074
  }
4075
4075
  _chooseObjectsToRender() {
4076
4076
  const t = this._activeObject;
4077
- return !this.preserveObjectStacking && t ? this._objects.filter((e) => !e.group && e !== t).concat(t) : this._objects;
4077
+ return !this.preserveObjectStacking && t ? this._objects.filter(((e) => !e.group && e !== t)).concat(t) : this._objects;
4078
4078
  }
4079
4079
  renderAll() {
4080
4080
  this.cancelRequestedRender(), this.destroyed || (!this.contextTopDirty || this._groupSelector || this.isDrawingMode || (this.clearContext(this.contextTop), this.contextTopDirty = !1), this.hasLostContext && (this.renderTopLayer(this.contextTop), this.hasLostContext = !1), !this._objectsToRender && (this._objectsToRender = this._chooseObjectsToRender()), this.renderCanvas(this.getContext(), this._objectsToRender));
@@ -4101,7 +4101,7 @@ class rr extends Ni {
4101
4101
  }
4102
4102
  _isSelectionKeyPressed(t) {
4103
4103
  const e = this.selectionKey;
4104
- return !!e && (Array.isArray(e) ? !!e.find((s) => !!s && t[s] === !0) : t[e]);
4104
+ return !!e && (Array.isArray(e) ? !!e.find(((s) => !!s && t[s] === !0)) : t[e]);
4105
4105
  }
4106
4106
  _shouldClearSelection(t, e) {
4107
4107
  const s = this.getActiveObjects(), i = this._activeObject;
@@ -4228,11 +4228,11 @@ class rr extends Ni {
4228
4228
  _fireSelectionEvents(t, e) {
4229
4229
  let s = !1, i = !1;
4230
4230
  const n = this.getActiveObjects(), r = [], a = [];
4231
- t.forEach((l) => {
4231
+ t.forEach(((l) => {
4232
4232
  n.includes(l) || (s = !0, l.fire("deselected", { e, target: l }), a.push(l));
4233
- }), n.forEach((l) => {
4233
+ })), n.forEach(((l) => {
4234
4234
  t.includes(l) || (s = !0, l.fire("selected", { e, target: l }), r.push(l));
4235
- }), t.length > 0 && n.length > 0 ? (i = !0, s && this.fire("selection:updated", { e, selected: r, deselected: a })) : n.length > 0 ? (i = !0, this.fire("selection:created", { e, selected: r })) : t.length > 0 && (i = !0, this.fire("selection:cleared", { e, deselected: a })), i && (this._objectsToRender = void 0);
4235
+ })), t.length > 0 && n.length > 0 ? (i = !0, s && this.fire("selection:updated", { e, selected: r, deselected: a })) : n.length > 0 ? (i = !0, this.fire("selection:created", { e, selected: r })) : t.length > 0 && (i = !0, this.fire("selection:cleared", { e, deselected: a })), i && (this._objectsToRender = void 0);
4236
4236
  }
4237
4237
  setActiveObject(t, e) {
4238
4238
  const s = this.getActiveObjects(), i = this._setActiveObject(t, e);
@@ -4304,9 +4304,9 @@ class Yd {
4304
4304
  s.addEventListener("click", e), this.__disposer = () => s.removeEventListener("click", e);
4305
4305
  }
4306
4306
  exitTextEditing() {
4307
- this.target = void 0, this.targets.forEach((t) => {
4307
+ this.target = void 0, this.targets.forEach(((t) => {
4308
4308
  t.isEditing && t.exitEditing();
4309
- });
4309
+ }));
4310
4310
  }
4311
4311
  add(t) {
4312
4312
  this.targets.push(t);
@@ -4343,9 +4343,9 @@ const $d = ["target", "oldTarget", "fireCanvas", "e"], oe = { passive: !1 }, js
4343
4343
  }, qd = { mouse: { in: "over", out: "out", targetIn: "mouseover", targetOut: "mouseout", canvasIn: "mouse:over", canvasOut: "mouse:out" }, drag: { in: "enter", out: "leave", targetIn: "dragenter", targetOut: "dragleave", canvasIn: "drag:enter", canvasOut: "drag:leave" } };
4344
4344
  class ia extends rr {
4345
4345
  constructor(t) {
4346
- super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), S(this, "_isClick", void 0), S(this, "textEditingManager", new Yd(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach((e) => {
4346
+ super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), S(this, "_isClick", void 0), S(this, "textEditingManager", new Yd(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach(((e) => {
4347
4347
  this[e] = this[e].bind(this);
4348
- }), this.addOrRemove(es, "add");
4348
+ })), this.addOrRemove(es, "add");
4349
4349
  }
4350
4350
  _getEventPrefix() {
4351
4351
  return this.enablePointerEvents ? "pointer" : "mouse";
@@ -4364,9 +4364,9 @@ class ia extends rr {
4364
4364
  }
4365
4365
  _onMouseOut(t) {
4366
4366
  const e = this._hoveredTarget, s = x({ e: t }, js(this, t));
4367
- this.fire("mouse:out", x(x({}, s), {}, { target: e })), this._hoveredTarget = void 0, e && e.fire("mouseout", x({}, s)), this._hoveredTargets.forEach((i) => {
4367
+ this.fire("mouse:out", x(x({}, s), {}, { target: e })), this._hoveredTarget = void 0, e && e.fire("mouseout", x({}, s)), this._hoveredTargets.forEach(((i) => {
4368
4368
  this.fire("mouse:out", x(x({}, s), {}, { target: i })), i && i.fire("mouseout", x({}, s));
4369
- }), this._hoveredTargets = [];
4369
+ })), this._hoveredTargets = [];
4370
4370
  }
4371
4371
  _onMouseEnter(t) {
4372
4372
  this._currentTransform || this.findTarget(t) || (this.fire("mouse:over", x({ e: t }, js(this, t))), this._hoveredTarget = void 0, this._hoveredTargets = []);
@@ -4454,9 +4454,9 @@ class ia extends rr {
4454
4454
  if (t.touches.length > 0) return;
4455
4455
  this.__onMouseUp(t), this._resetTransformEventData(), delete this.mainTouchId;
4456
4456
  const e = this._getEventPrefix(), s = Ce(this.upperCanvasEl);
4457
- ge(s, "touchend", this._onTouchEnd, oe), ge(s, "touchmove", this._onMouseMove, oe), this._willAddMouseDown && clearTimeout(this._willAddMouseDown), this._willAddMouseDown = setTimeout(() => {
4457
+ ge(s, "touchend", this._onTouchEnd, oe), ge(s, "touchmove", this._onMouseMove, oe), this._willAddMouseDown && clearTimeout(this._willAddMouseDown), this._willAddMouseDown = setTimeout((() => {
4458
4458
  es(this.upperCanvasEl, "".concat(e, "down"), this._onMouseDown), this._willAddMouseDown = 0;
4459
- }, 400);
4459
+ }), 400);
4460
4460
  }
4461
4461
  _onMouseUp(t) {
4462
4462
  this.__onMouseUp(t), this._resetTransformEventData();
@@ -4616,9 +4616,9 @@ class ia extends rr {
4616
4616
  if (n) {
4617
4617
  const r = n.control;
4618
4618
  this.setCursor(r.cursorStyleHandler(t, r, e));
4619
- } else e.subTargetCheck && this.targets.concat().reverse().map((r) => {
4619
+ } else e.subTargetCheck && this.targets.concat().reverse().map(((r) => {
4620
4620
  s = r.hoverCursor || s;
4621
- }), this.setCursor(s);
4621
+ })), this.setCursor(s);
4622
4622
  }
4623
4623
  handleMultiSelection(t, e) {
4624
4624
  const s = this._activeObject, i = fs(s);
@@ -4641,7 +4641,7 @@ class ia extends rr {
4641
4641
  }
4642
4642
  handleSelection(t) {
4643
4643
  if (!this.selection || !this._groupSelector) return !1;
4644
- const { x: e, y: s, deltaX: i, deltaY: n } = this._groupSelector, r = new A(e, s), a = r.add(new A(i, n)), l = r.min(a), h = r.max(a).subtract(l), c = this.collectObjects({ left: l.x, top: l.y, width: h.x, height: h.y }, { includeIntersecting: !this.selectionFullyContained }), u = r.eq(a) ? c[0] ? [c[0]] : [] : c.length > 1 ? c.filter((d) => !d.onSelect({ e: t })).reverse() : c;
4644
+ const { x: e, y: s, deltaX: i, deltaY: n } = this._groupSelector, r = new A(e, s), a = r.add(new A(i, n)), l = r.min(a), h = r.max(a).subtract(l), c = this.collectObjects({ left: l.x, top: l.y, width: h.x, height: h.y }, { includeIntersecting: !this.selectionFullyContained }), u = r.eq(a) ? c[0] ? [c[0]] : [] : c.length > 1 ? c.filter(((d) => !d.onSelect({ e: t }))).reverse() : c;
4645
4645
  if (u.length === 1) this.setActiveObject(u[0], t);
4646
4646
  else if (u.length > 1) {
4647
4647
  const d = j.getClass("ActiveSelection");
@@ -4672,7 +4672,7 @@ function tf(o, t) {
4672
4672
  const r = i.split(Qd);
4673
4673
  r[r.length - 1] === "" && r.pop();
4674
4674
  for (let a = r.length; a--; ) {
4675
- const [l, h] = r[a].split(Zd).map((c) => c.trim());
4675
+ const [l, h] = r[a].split(Zd).map(((c) => c.trim()));
4676
4676
  l === "stop-color" ? e = h : l === "stop-opacity" && (s = h);
4677
4677
  }
4678
4678
  }
@@ -4694,17 +4694,17 @@ function _e(o, t) {
4694
4694
  return o.getAttribute(t);
4695
4695
  }
4696
4696
  function sf(o, t) {
4697
- return function(e, s) {
4697
+ return (function(e, s) {
4698
4698
  let i, { width: n, height: r, gradientUnits: a } = s;
4699
- return Object.keys(e).reduce((l, h) => {
4699
+ return Object.keys(e).reduce(((l, h) => {
4700
4700
  const c = e[h];
4701
4701
  return c === "Infinity" ? i = 1 : c === "-Infinity" ? i = 0 : (i = typeof c == "string" ? parseFloat(c) : c, typeof c == "string" && zh(c) && (i *= 0.01, a === "pixels" && (h !== "x1" && h !== "x2" && h !== "r2" || (i *= n), h !== "y1" && h !== "y2" || (i *= r)))), l[h] = i, l;
4702
- }, {});
4703
- }(Gh(o) === "linear" ? function(e) {
4702
+ }), {});
4703
+ })(Gh(o) === "linear" ? (function(e) {
4704
4704
  return { x1: _e(e, "x1") || 0, y1: _e(e, "y1") || 0, x2: _e(e, "x2") || "100%", y2: _e(e, "y2") || 0 };
4705
- }(o) : function(e) {
4705
+ })(o) : (function(e) {
4706
4706
  return { x1: _e(e, "fx") || _e(e, "cx") || "50%", y1: _e(e, "fy") || _e(e, "cy") || "50%", r1: 0, x2: _e(e, "cx") || "50%", y2: _e(e, "cy") || "50%", r2: _e(e, "r") || "50%" };
4707
- }(o), x(x({}, t), {}, { gradientUnits: Wh(o) }));
4707
+ })(o), x(x({}, t), {}, { gradientUnits: Wh(o) }));
4708
4708
  }
4709
4709
  class bi {
4710
4710
  constructor(t) {
@@ -4719,11 +4719,11 @@ class bi {
4719
4719
  return this;
4720
4720
  }
4721
4721
  toObject(t) {
4722
- return x(x({}, Ms(this, t)), {}, { type: this.type, coords: x({}, this.coords), colorStops: this.colorStops.map((e) => x({}, e)), offsetX: this.offsetX, offsetY: this.offsetY, gradientUnits: this.gradientUnits, gradientTransform: this.gradientTransform ? [...this.gradientTransform] : void 0 });
4722
+ return x(x({}, Ms(this, t)), {}, { type: this.type, coords: x({}, this.coords), colorStops: this.colorStops.map(((e) => x({}, e))), offsetX: this.offsetX, offsetY: this.offsetY, gradientUnits: this.gradientUnits, gradientTransform: this.gradientTransform ? [...this.gradientTransform] : void 0 });
4723
4723
  }
4724
4724
  toSVG(t) {
4725
4725
  let { additionalTransform: e } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4726
- const s = [], i = this.gradientTransform ? this.gradientTransform.concat() : Qt.concat(), n = this.gradientUnits === "pixels" ? "userSpaceOnUse" : "objectBoundingBox", r = this.colorStops.map((u) => x({}, u)).sort((u, d) => u.offset - d.offset);
4726
+ const s = [], i = this.gradientTransform ? this.gradientTransform.concat() : Qt.concat(), n = this.gradientUnits === "pixels" ? "userSpaceOnUse" : "objectBoundingBox", r = this.colorStops.map(((u) => x({}, u))).sort(((u, d) => u.offset - d.offset));
4727
4727
  let a = -this.offsetX, l = -this.offsetY;
4728
4728
  var h;
4729
4729
  n === "objectBoundingBox" ? (a /= t.width, l /= t.height) : (a += t.width / 2, l += t.height / 2), (h = t) && typeof h._renderPathCommands == "function" && this.gradientUnits !== "percentage" && (a -= t.pathOffset.x, l -= t.pathOffset.y), i[4] -= a, i[5] -= l;
@@ -4735,34 +4735,34 @@ class bi {
4735
4735
  } else if (this.type === "radial") {
4736
4736
  const { x1: u, y1: d, x2: f, y2: g, r1: p, r2: v } = this.coords, m = p > v;
4737
4737
  s.push("<radialGradient ", c, ' cx="', m ? u : f, '" cy="', m ? d : g, '" r="', m ? p : v, '" fx="', m ? f : u, '" fy="', m ? g : d, `">
4738
- `), m && (r.reverse(), r.forEach((_) => {
4738
+ `), m && (r.reverse(), r.forEach(((_) => {
4739
4739
  _.offset = 1 - _.offset;
4740
- }));
4740
+ })));
4741
4741
  const b = Math.min(p, v);
4742
4742
  if (b > 0) {
4743
4743
  const _ = b / Math.max(p, v);
4744
- r.forEach((w) => {
4744
+ r.forEach(((w) => {
4745
4745
  w.offset += _ * (1 - w.offset);
4746
- });
4746
+ }));
4747
4747
  }
4748
4748
  }
4749
- return r.forEach((u) => {
4749
+ return r.forEach(((u) => {
4750
4750
  let { color: d, offset: f, opacity: g } = u;
4751
4751
  s.push("<stop ", 'offset="', 100 * f + "%", '" style="stop-color:', d, g !== void 0 ? ";stop-opacity: " + g : ";", `"/>
4752
4752
  `);
4753
- }), s.push(this.type === "linear" ? "</linearGradient>" : "</radialGradient>", `
4753
+ })), s.push(this.type === "linear" ? "</linearGradient>" : "</radialGradient>", `
4754
4754
  `), s.join("");
4755
4755
  }
4756
4756
  toLive(t) {
4757
4757
  const { x1: e, y1: s, x2: i, y2: n, r1: r, r2: a } = this.coords, l = this.type === "linear" ? t.createLinearGradient(e, s, i, n) : t.createRadialGradient(e, s, r, i, n, a);
4758
- return this.colorStops.forEach((h) => {
4758
+ return this.colorStops.forEach(((h) => {
4759
4759
  let { color: c, opacity: u, offset: d } = h;
4760
4760
  l.addColorStop(d, u !== void 0 ? new ot(c).setAlpha(u).toRgba() : c);
4761
- }), l;
4761
+ })), l;
4762
4762
  }
4763
4763
  static async fromObject(t) {
4764
4764
  const { colorStops: e, gradientTransform: s } = t;
4765
- return new this(x(x({}, t), {}, { colorStops: e ? e.map((i) => x({}, i)) : void 0, gradientTransform: s ? [...s] : void 0 }));
4765
+ return new this(x(x({}, t), {}, { colorStops: e ? e.map(((i) => x({}, i))) : void 0, gradientTransform: s ? [...s] : void 0 }));
4766
4766
  }
4767
4767
  static fromElement(t, e, s) {
4768
4768
  const i = Wh(t), n = e._findCenterFromElement();
@@ -4852,7 +4852,7 @@ class gs extends Vt {
4852
4852
  }
4853
4853
  toObject() {
4854
4854
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
4855
- return x(x({}, super.toObject(t)), {}, { path: this.path.map((e) => e.slice()) });
4855
+ return x(x({}, super.toObject(t)), {}, { path: this.path.map(((e) => e.slice())) });
4856
4856
  }
4857
4857
  toDatalessObject() {
4858
4858
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -5104,9 +5104,9 @@ class Se extends Vt {
5104
5104
  }
5105
5105
  _calcDimensions(t) {
5106
5106
  t = x({ scaleX: this.scaleX, scaleY: this.scaleY, skewX: this.skewX, skewY: this.skewY, strokeLineCap: this.strokeLineCap, strokeLineJoin: this.strokeLineJoin, strokeMiterLimit: this.strokeMiterLimit, strokeUniform: this.strokeUniform, strokeWidth: this.strokeWidth }, t || {});
5107
- const e = this.exactBoundingBox ? this._projectStrokeOnPoints(t).map((h) => h.projectedPoint) : this.points;
5107
+ const e = this.exactBoundingBox ? this._projectStrokeOnPoints(t).map(((h) => h.projectedPoint)) : this.points;
5108
5108
  if (e.length === 0) return { left: 0, top: 0, width: 0, height: 0, pathOffset: new A(), strokeOffset: new A(), strokeDiff: new A() };
5109
- const s = Ie(e), i = Ii(x(x({}, t), {}, { scaleX: 1, scaleY: 1 })), n = Ie(this.points.map((h) => Nt(h, i, !0))), r = new A(this.scaleX, this.scaleY);
5109
+ const s = Ie(e), i = Ii(x(x({}, t), {}, { scaleX: 1, scaleY: 1 })), n = Ie(this.points.map(((h) => Nt(h, i, !0)))), r = new A(this.scaleX, this.scaleY);
5110
5110
  let a = s.left + s.width / 2, l = s.top + s.height / 2;
5111
5111
  return this.exactBoundingBox && (a -= l * Math.tan(yt(this.skewX)), l -= a * Math.tan(yt(this.skewY))), x(x({}, s), {}, { pathOffset: new A(a, l), strokeOffset: new A(n.left, n.top).subtract(new A(s.left, s.top)).multiply(r), strokeDiff: new A(s.width, s.height).subtract(new A(n.width, n.height)).multiply(r) });
5112
5112
  }
@@ -5131,7 +5131,7 @@ class Se extends Vt {
5131
5131
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
5132
5132
  if (this.exactBoundingBox) {
5133
5133
  let r;
5134
- if (Object.keys(t).some((a) => this.strokeUniform || this.constructor.layoutProperties.includes(a))) {
5134
+ if (Object.keys(t).some(((a) => this.strokeUniform || this.constructor.layoutProperties.includes(a)))) {
5135
5135
  var e, s;
5136
5136
  const { width: a, height: l } = this._calcDimensions(t);
5137
5137
  r = new A((e = t.width) !== null && e !== void 0 ? e : a, (s = t.height) !== null && s !== void 0 ? s : l);
@@ -5149,10 +5149,10 @@ class Se extends Vt {
5149
5149
  }
5150
5150
  toObject() {
5151
5151
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
5152
- return x(x({}, super.toObject(t)), {}, { points: this.points.map((e) => {
5152
+ return x(x({}, super.toObject(t)), {}, { points: this.points.map(((e) => {
5153
5153
  let { x: s, y: i } = e;
5154
5154
  return { x: s, y: i };
5155
- }) });
5155
+ })) });
5156
5156
  }
5157
5157
  _toSVG() {
5158
5158
  const t = [], e = this.pathOffset.x, s = this.pathOffset.y, i = it.NUM_FRACTION_DIGITS;
@@ -5228,7 +5228,7 @@ class $h extends Vt {
5228
5228
  _extendStyles(t, e) {
5229
5229
  const { lineIndex: s, charIndex: i } = this.get2DCursorLocation(t);
5230
5230
  this._getLineStyle(s) || this._setLineStyle(s);
5231
- const n = Aa(x(x({}, this._getStyleDeclaration(s, i)), e), (r) => r !== void 0);
5231
+ const n = Aa(x(x({}, this._getStyleDeclaration(s, i)), e), ((r) => r !== void 0));
5232
5232
  this._setStyleDeclaration(s, i, n);
5233
5233
  }
5234
5234
  getSelectionStyles(t, e, s) {
@@ -5271,11 +5271,11 @@ class $h extends Vt {
5271
5271
  S($h, "_styleProperties", Su);
5272
5272
  const df = / +/g, ff = /"/g;
5273
5273
  function Dr(o, t, e, s, i) {
5274
- return " ".concat(function(n, r) {
5274
+ return " ".concat((function(n, r) {
5275
5275
  let { left: a, top: l, width: h, height: c } = r, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : it.NUM_FRACTION_DIGITS;
5276
- const d = Mi(Ot, n, !1), [f, g, p, v] = [a, l, h, c].map((m) => ht(m, u));
5276
+ const d = Mi(Ot, n, !1), [f, g, p, v] = [a, l, h, c].map(((m) => ht(m, u)));
5277
5277
  return "<rect ".concat(d, ' x="').concat(f, '" y="').concat(g, '" width="').concat(p, '" height="').concat(v, '"></rect>');
5278
- }(o, { left: t, top: e, width: s, height: i }), `
5278
+ })(o, { left: t, top: e, width: s, height: i }), `
5279
5279
  `);
5280
5280
  }
5281
5281
  const gf = ["textAnchor", "textDecoration", "dx", "dy", "top", "left", "fontSize", "strokeWidth"];
@@ -5382,9 +5382,9 @@ class jt extends $h {
5382
5382
  const n = wi.getFontCache(e), r = this._getFontDeclaration(e), a = s + t, l = s && r === this._getFontDeclaration(i), h = e.fontSize / this.CACHE_FONT_SIZE;
5383
5383
  let c, u, d, f;
5384
5384
  if (s && n[s] !== void 0 && (d = n[s]), n[t] !== void 0 && (f = c = n[t]), l && n[a] !== void 0 && (u = n[a], f = u - d), c === void 0 || d === void 0 || u === void 0) {
5385
- const g = function() {
5385
+ const g = (function() {
5386
5386
  return Rr || (Rr = ue({ width: 0, height: 0 }).getContext("2d")), Rr;
5387
- }();
5387
+ })();
5388
5388
  this._setTextStyles(g, e, !0), c === void 0 && (f = c = g.measureText(t).width, n[t] = c), d === void 0 && l && s && (d = g.measureText(s).width, n[s] = d), l && u === void 0 && (u = g.measureText(a).width, n[a] = u, f = u - d);
5389
5389
  }
5390
5390
  return { width: c * h, kernedWidth: f * h };
@@ -5680,7 +5680,7 @@ S(jt, "textLayoutProperties", lh), S(jt, "cacheProperties", [...Je, ...hh]), S(j
5680
5680
  return [i ? Mi(Kt, i) : "", s ? "stroke-width: ".concat(s, "; ") : "", e ? "font-family: ".concat(e.includes("'") || e.includes('"') ? e : "'".concat(e, "'"), "; ") : "", r ? "font-size: ".concat(r, "px; ") : "", a ? "font-style: ".concat(a, "; ") : "", l ? "font-weight: ".concat(l, "; ") : "", g ? "text-decoration: ".concat(g, "; text-decoration-thickness: ").concat(ht(p * this.getObjectScaling().y / 10, it.NUM_FRACTION_DIGITS), "%; ") : "", n ? Mi(Ot, n) : "", h ? "baseline-shift: ".concat(-h, "; ") : "", t ? "white-space: pre; " : ""].join("");
5681
5681
  }
5682
5682
  getSvgTextDecoration(o) {
5683
- return ["overline", "underline", "line-through"].filter((t) => o[t.replace("-", "")]).join(" ");
5683
+ return ["overline", "underline", "line-through"].filter(((t) => o[t.replace("-", "")])).join(" ");
5684
5684
  }
5685
5685
  }]), j.setClass(jt), j.setSVGClass(jt);
5686
5686
  class pf {
@@ -5688,7 +5688,7 @@ class pf {
5688
5688
  S(this, "target", void 0), S(this, "__mouseDownInPlace", !1), S(this, "__dragStartFired", !1), S(this, "__isDraggingOver", !1), S(this, "__dragStartSelection", void 0), S(this, "__dragImageDisposer", void 0), S(this, "_dispose", void 0), this.target = t;
5689
5689
  const e = [this.target.on("dragenter", this.dragEnterHandler.bind(this)), this.target.on("dragover", this.dragOverHandler.bind(this)), this.target.on("dragleave", this.dragLeaveHandler.bind(this)), this.target.on("dragend", this.dragEndHandler.bind(this)), this.target.on("drop", this.dropHandler.bind(this))];
5690
5690
  this._dispose = () => {
5691
- e.forEach((s) => s()), this._dispose = void 0;
5691
+ e.forEach(((s) => s())), this._dispose = void 0;
5692
5692
  };
5693
5693
  }
5694
5694
  isPointerOverSelection(t) {
@@ -5812,12 +5812,12 @@ class mf extends jt {
5812
5812
  }
5813
5813
  abortCursorAnimation() {
5814
5814
  let t = !1;
5815
- [this._currentTickState, this._currentTickCompleteState].forEach((e) => {
5815
+ [this._currentTickState, this._currentTickCompleteState].forEach(((e) => {
5816
5816
  e && !e.isDone() && (t = !0, e.abort());
5817
- }), this._currentCursorOpacity = 1, t && this.clearContextTop();
5817
+ })), this._currentCursorOpacity = 1, t && this.clearContextTop();
5818
5818
  }
5819
5819
  restartCursorIfNeeded() {
5820
- [this._currentTickState, this._currentTickCompleteState].some((t) => !t || t.isDone()) && this.initDelayedCursor();
5820
+ [this._currentTickState, this._currentTickCompleteState].some(((t) => !t || t.isDone())) && this.initDelayedCursor();
5821
5821
  }
5822
5822
  selectAll() {
5823
5823
  return this.selectionStart = 0, this.selectionEnd = this._text.length, this._fireSelectionChanged(), this._updateTextarea(), this;
@@ -6022,15 +6022,15 @@ class mf extends jt {
6022
6022
  class vf extends mf {
6023
6023
  initHiddenTextarea() {
6024
6024
  const t = this.canvas && Ce(this.canvas.getElement()) || Zs(), e = t.createElement("textarea");
6025
- Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off" }).map((r) => {
6025
+ Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off" }).map(((r) => {
6026
6026
  let [a, l] = r;
6027
6027
  return e.setAttribute(a, l);
6028
- });
6028
+ }));
6029
6029
  const { top: s, left: i, fontSize: n } = this._calcTextareaPosition();
6030
- e.style.cssText = "position: absolute; top: ".concat(s, "; left: ").concat(i, "; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(n, ";"), (this.hiddenTextareaContainer || t.body).appendChild(e), Object.entries({ blur: "blur", keydown: "onKeyDown", keyup: "onKeyUp", input: "onInput", copy: "copy", cut: "copy", paste: "paste", compositionstart: "onCompositionStart", compositionupdate: "onCompositionUpdate", compositionend: "onCompositionEnd" }).map((r) => {
6030
+ e.style.cssText = "position: absolute; top: ".concat(s, "; left: ").concat(i, "; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(n, ";"), (this.hiddenTextareaContainer || t.body).appendChild(e), Object.entries({ blur: "blur", keydown: "onKeyDown", keyup: "onKeyUp", input: "onInput", copy: "copy", cut: "copy", paste: "paste", compositionstart: "onCompositionStart", compositionupdate: "onCompositionUpdate", compositionend: "onCompositionEnd" }).map(((r) => {
6031
6031
  let [a, l] = r;
6032
6032
  return e.addEventListener(a, this[l].bind(this));
6033
- }), this.hiddenTextarea = e;
6033
+ })), this.hiddenTextarea = e;
6034
6034
  }
6035
6035
  blur() {
6036
6036
  this.abortCursorAnimation();
@@ -6060,7 +6060,7 @@ class vf extends mf {
6060
6060
  const b = this.fromStringToGraphemeSelection(i, n, s), _ = c > b.selectionStart;
6061
6061
  d ? (g = this._text.slice(c, u), m += u - c) : h < l && (g = _ ? this._text.slice(u + m, u) : this._text.slice(c, c - m));
6062
6062
  const w = a.slice(b.selectionEnd - m, b.selectionEnd);
6063
- if (g && g.length && (w.length && (f = this.getSelectionStyles(c, c + 1, !1), f = w.map(() => f[0])), d ? (p = c, v = u) : _ ? (p = u - g.length, v = u) : (p = u, v = u + g.length), this.removeStyleFromTo(p, v)), w.length) {
6063
+ if (g && g.length && (w.length && (f = this.getSelectionStyles(c, c + 1, !1), f = w.map((() => f[0]))), d ? (p = c, v = u) : _ ? (p = u - g.length, v = u) : (p = u, v = u + g.length), this.removeStyleFromTo(p, v)), w.length) {
6064
6064
  const { copyPasteData: C } = je();
6065
6065
  e && w.join("") === C.copiedText && !it.disableStyleCopyPaste && (f = C.copiedTextStyle), this.insertNewStyleBlock(w, c, f);
6066
6066
  }
@@ -6466,14 +6466,14 @@ class vs extends Ye {
6466
6466
  getGraphemeDataForRender(t) {
6467
6467
  const e = this.splitByGrapheme, s = e ? "" : " ";
6468
6468
  let i = 0;
6469
- return { wordsData: t.map((n, r) => {
6469
+ return { wordsData: t.map(((n, r) => {
6470
6470
  let a = 0;
6471
6471
  const l = e ? this.graphemeSplit(n) : this.wordSplit(n);
6472
- return l.length === 0 ? [{ word: [], width: 0 }] : l.map((h) => {
6472
+ return l.length === 0 ? [{ word: [], width: 0 }] : l.map(((h) => {
6473
6473
  const c = e ? [h] : this.graphemeSplit(h), u = this._measureWord(c, r, a);
6474
6474
  return i = Math.max(u, i), a += c.length + s.length, { word: c, width: u };
6475
- });
6476
- }), largestWordWidth: i };
6475
+ }));
6476
+ })), largestWordWidth: i };
6477
6477
  }
6478
6478
  _measureWord(t, e) {
6479
6479
  let s, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = 0;
@@ -6562,15 +6562,15 @@ S(hl, "type", "fixed"), j.setClass(hl);
6562
6562
  class _f extends Di {
6563
6563
  subscribeTargets(t) {
6564
6564
  const e = t.target;
6565
- t.targets.reduce((s, i) => (i.parent && s.add(i.parent), s), /* @__PURE__ */ new Set()).forEach((s) => {
6565
+ t.targets.reduce(((s, i) => (i.parent && s.add(i.parent), s)), /* @__PURE__ */ new Set()).forEach(((s) => {
6566
6566
  s.layoutManager.subscribeTargets({ target: s, targets: [e] });
6567
- });
6567
+ }));
6568
6568
  }
6569
6569
  unsubscribeTargets(t) {
6570
6570
  const e = t.target, s = e.getObjects();
6571
- t.targets.reduce((i, n) => (n.parent && i.add(n.parent), i), /* @__PURE__ */ new Set()).forEach((i) => {
6572
- !s.some((n) => n.parent === i) && i.layoutManager.unsubscribeTargets({ target: i, targets: [e] });
6573
- });
6571
+ t.targets.reduce(((i, n) => (n.parent && i.add(n.parent), i)), /* @__PURE__ */ new Set()).forEach(((i) => {
6572
+ !s.some(((n) => n.parent === i)) && i.layoutManager.unsubscribeTargets({ target: i, targets: [e] });
6573
+ }));
6574
6574
  }
6575
6575
  }
6576
6576
  class bs extends be {
@@ -6590,13 +6590,13 @@ class bs extends be {
6590
6590
  }
6591
6591
  multiSelectAdd() {
6592
6592
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
6593
- this.multiSelectionStacking === "selection-order" ? this.add(...e) : e.forEach((i) => {
6594
- const n = this._objects.findIndex((a) => a.isInFrontOf(i)), r = n === -1 ? this.size() : n;
6593
+ this.multiSelectionStacking === "selection-order" ? this.add(...e) : e.forEach(((i) => {
6594
+ const n = this._objects.findIndex(((a) => a.isInFrontOf(i))), r = n === -1 ? this.size() : n;
6595
6595
  this.insertAt(r, i);
6596
- });
6596
+ }));
6597
6597
  }
6598
6598
  canEnterGroup(t) {
6599
- return this.getObjects().some((e) => e.isDescendantOf(t) || t.isDescendantOf(e)) ? (qe("error", "ActiveSelection: circular object trees are not supported, this call has no effect"), !1) : super.canEnterGroup(t);
6599
+ return this.getObjects().some(((e) => e.isDescendantOf(t) || t.isDescendantOf(e))) ? (qe("error", "ActiveSelection: circular object trees are not supported, this call has no effect"), !1) : super.canEnterGroup(t);
6600
6600
  }
6601
6601
  enterGroup(t, e) {
6602
6602
  t.parent && t.parent === t.group ? t.parent._exitGroup(t) : t.group && t.parent !== t.group && t.group.remove(t), this._enterGroup(t, e);
@@ -6607,14 +6607,14 @@ class bs extends be {
6607
6607
  _onAfterObjectsChange(t, e) {
6608
6608
  super._onAfterObjectsChange(t, e);
6609
6609
  const s = /* @__PURE__ */ new Set();
6610
- e.forEach((i) => {
6610
+ e.forEach(((i) => {
6611
6611
  const { parent: n } = i;
6612
6612
  n && s.add(n);
6613
- }), t === Ia ? s.forEach((i) => {
6613
+ })), t === Ia ? s.forEach(((i) => {
6614
6614
  i._onAfterObjectsChange(Hn, e);
6615
- }) : s.forEach((i) => {
6615
+ })) : s.forEach(((i) => {
6616
6616
  i._set("dirty", !0);
6617
- });
6617
+ }));
6618
6618
  }
6619
6619
  onDeselect() {
6620
6620
  return this.removeAll(), !1;
@@ -6645,9 +6645,9 @@ class wf {
6645
6645
  if (!r) return;
6646
6646
  r.drawImage(e, 0, 0, s, i);
6647
6647
  const a = { sourceWidth: s, sourceHeight: i, imageData: r.getImageData(0, 0, s, i), originalEl: e, originalImageData: r.getImageData(0, 0, s, i), canvasEl: n, ctx: r, filterBackend: this };
6648
- t.forEach((h) => {
6648
+ t.forEach(((h) => {
6649
6649
  h.applyTo(a);
6650
- });
6650
+ }));
6651
6651
  const { imageData: l } = a;
6652
6652
  return l.width === s && l.height === i || (n.width = l.width, n.height = l.height), r.putImageData(l, 0, 0), a;
6653
6653
  }
@@ -6670,12 +6670,12 @@ class qh {
6670
6670
  let h;
6671
6671
  r && (h = this.getCachedTexture(r, e));
6672
6672
  const c = { originalWidth: e.width || e.naturalWidth || 0, originalHeight: e.height || e.naturalHeight || 0, sourceWidth: s, sourceHeight: i, destinationWidth: s, destinationHeight: i, context: a, sourceTexture: this.createTexture(a, s, i, h ? void 0 : e), targetTexture: this.createTexture(a, s, i), originalTexture: h || this.createTexture(a, s, i, h ? void 0 : e), passes: t.length, webgl: !0, aPosition: this.aPosition, programCache: this.programCache, pass: 0, filterBackend: this, targetCanvas: n }, u = a.createFramebuffer();
6673
- return a.bindFramebuffer(a.FRAMEBUFFER, u), t.forEach((d) => {
6673
+ return a.bindFramebuffer(a.FRAMEBUFFER, u), t.forEach(((d) => {
6674
6674
  d && d.applyTo(c);
6675
- }), function(d) {
6675
+ })), (function(d) {
6676
6676
  const f = d.targetCanvas, g = f.width, p = f.height, v = d.destinationWidth, m = d.destinationHeight;
6677
6677
  g === v && p === m || (f.width = v, f.height = m);
6678
- }(c), this.copyGLTo2D(a, c), a.bindTexture(a.TEXTURE_2D, null), a.deleteTexture(c.sourceTexture), a.deleteTexture(c.targetTexture), a.deleteFramebuffer(u), l.setTransform(1, 0, 0, 1, 0, 0), c;
6678
+ })(c), this.copyGLTo2D(a, c), a.bindTexture(a.TEXTURE_2D, null), a.deleteTexture(c.sourceTexture), a.deleteTexture(c.targetTexture), a.deleteFramebuffer(u), l.setTransform(1, 0, 0, 1, 0, 0), c;
6679
6679
  }
6680
6680
  dispose() {
6681
6681
  this.canvas && (this.canvas = null, this.gl = null), this.clearWebGLCaches();
@@ -6754,10 +6754,10 @@ class Bt extends Vt {
6754
6754
  e instanceof qh && e.evictCachesForKey(t);
6755
6755
  }
6756
6756
  dispose() {
6757
- super.dispose(), this.removeTexture(this.cacheKey), this.removeTexture("".concat(this.cacheKey, "_filtered")), this._cacheContext = null, ["_originalElement", "_element", "_filteredEl", "_cacheCanvas"].forEach((t) => {
6757
+ super.dispose(), this.removeTexture(this.cacheKey), this.removeTexture("".concat(this.cacheKey, "_filtered")), this._cacheContext = null, ["_originalElement", "_element", "_filteredEl", "_cacheCanvas"].forEach(((t) => {
6758
6758
  const e = this[t];
6759
6759
  e && je().dispose(e), this[t] = void 0;
6760
- });
6760
+ }));
6761
6761
  }
6762
6762
  getCrossOrigin() {
6763
6763
  return this._originalElement && (this._originalElement.crossOrigin || null);
@@ -6774,9 +6774,9 @@ class Bt extends Vt {
6774
6774
  toObject() {
6775
6775
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
6776
6776
  const e = [];
6777
- return this.filters.forEach((s) => {
6777
+ return this.filters.forEach(((s) => {
6778
6778
  s && e.push(s.toObject());
6779
- }), x(x({}, super.toObject([...Kh, ...t])), {}, { src: this.getSrc(), crossOrigin: this.getCrossOrigin(), filters: e }, this.resizeFilter ? { resizeFilter: this.resizeFilter.toObject() } : {});
6779
+ })), x(x({}, super.toObject([...Kh, ...t])), {}, { src: this.getSrc(), crossOrigin: this.getCrossOrigin(), filters: e }, this.resizeFilter ? { resizeFilter: this.resizeFilter.toObject() } : {});
6780
6780
  }
6781
6781
  hasCrop() {
6782
6782
  return !!this.cropX || !!this.cropY || this.width < this._element.width || this.height < this._element.height;
@@ -6809,9 +6809,9 @@ class Bt extends Vt {
6809
6809
  }
6810
6810
  setSrc(t) {
6811
6811
  let { crossOrigin: e, signal: s } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6812
- return Si(t, { crossOrigin: e, signal: s }).then((i) => {
6812
+ return Si(t, { crossOrigin: e, signal: s }).then(((i) => {
6813
6813
  e !== void 0 && this.set({ crossOrigin: e }), this.setElement(i);
6814
- });
6814
+ }));
6815
6815
  }
6816
6816
  toString() {
6817
6817
  return '#<Image: { src: "'.concat(this.getSrc(), '" }>');
@@ -6824,7 +6824,7 @@ class Bt extends Vt {
6824
6824
  }
6825
6825
  applyFilters() {
6826
6826
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.filters || [];
6827
- if (t = t.filter((n) => n && !n.isNeutralState()), this.set("dirty", !0), this.removeTexture("".concat(this.cacheKey, "_filtered")), t.length === 0) return this._element = this._originalElement, this._filteredEl = void 0, this._filterScalingX = 1, void (this._filterScalingY = 1);
6827
+ if (t = t.filter(((n) => n && !n.isNeutralState())), this.set("dirty", !0), this.removeTexture("".concat(this.cacheKey, "_filtered")), t.length === 0) return this._element = this._originalElement, this._filteredEl = void 0, this._filterScalingX = 1, void (this._filterScalingY = 1);
6828
6828
  const e = this._originalElement, s = e.naturalWidth || e.width, i = e.naturalHeight || e.height;
6829
6829
  if (this._element === this._originalElement) {
6830
6830
  const n = ue({ width: s, height: i });
@@ -6866,19 +6866,19 @@ class Bt extends Vt {
6866
6866
  }
6867
6867
  static fromObject(t, e) {
6868
6868
  let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: a } = t, l = mt(t, Sf);
6869
- return Promise.all([Si(n, x(x({}, e), {}, { crossOrigin: r })), s && qs(s, e), i && qs([i], e), ji(l, e)]).then((h) => {
6869
+ return Promise.all([Si(n, x(x({}, e), {}, { crossOrigin: r })), s && qs(s, e), i && qs([i], e), ji(l, e)]).then(((h) => {
6870
6870
  let [c, u = [], [d] = [], f = {}] = h;
6871
6871
  return new this(c, x(x({}, l), {}, { src: n, filters: u, resizeFilter: d }, f));
6872
- });
6872
+ }));
6873
6873
  }
6874
6874
  static fromURL(t) {
6875
6875
  let { crossOrigin: e = null, signal: s } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0;
6876
- return Si(t, { crossOrigin: e, signal: s }).then((n) => new this(n, i));
6876
+ return Si(t, { crossOrigin: e, signal: s }).then(((n) => new this(n, i)));
6877
6877
  }
6878
6878
  static async fromElement(t) {
6879
6879
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = arguments.length > 2 ? arguments[2] : void 0;
6880
6880
  const i = Qe(t, this.ATTRIBUTE_NAMES, s);
6881
- return this.fromURL(i["xlink:href"] || i.href, e, i).catch((n) => (qe("log", "Unable to parse Image", n), null));
6881
+ return this.fromURL(i["xlink:href"] || i.href, e, i).catch(((n) => (qe("log", "Unable to parse Image", n), null)));
6882
6882
  }
6883
6883
  }
6884
6884
  function Ir(o) {
@@ -6913,10 +6913,10 @@ const Af = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx",
6913
6913
  function Qh(o, t) {
6914
6914
  var e;
6915
6915
  const s = ((e = t.getAttribute(jr)) === null || e === void 0 ? void 0 : e.slice(1)) || "", i = o.getElementById(s);
6916
- if (i && i.getAttribute(jr) && Qh(o, i), i && (Af.forEach((n) => {
6916
+ if (i && i.getAttribute(jr) && Qh(o, i), i && (Af.forEach(((n) => {
6917
6917
  const r = i.getAttribute(n);
6918
6918
  !t.hasAttribute(n) && r && t.setAttribute(n, r);
6919
- }), !t.children.length)) {
6919
+ })), !t.children.length)) {
6920
6920
  const n = i.cloneNode(!0);
6921
6921
  for (; n.firstChild; ) t.appendChild(n.firstChild);
6922
6922
  }
@@ -6924,31 +6924,29 @@ function Qh(o, t) {
6924
6924
  }
6925
6925
  const Tf = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
6926
6926
  function Ef(o) {
6927
- const t = o.getElementsByTagName("style");
6928
- let e, s;
6929
- const i = {};
6930
- for (e = 0, s = t.length; e < s; e++) {
6931
- const n = (t[e].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
6932
- n.trim() !== "" && n.split("}").filter((r, a, l) => l.length > 1 && r.trim()).forEach((r) => {
6933
- if ((r.match(/{/g) || []).length > 1 && r.trim().startsWith("@")) return;
6934
- const a = r.split("{"), l = {}, h = a[1].trim().split(";").filter(function(c) {
6935
- return c.trim();
6936
- });
6937
- for (e = 0, s = h.length; e < s; e++) {
6938
- const c = h[e].split(":"), u = c[0].trim(), d = c[1].trim();
6939
- l[u] = d;
6927
+ const t = o.getElementsByTagName("style"), e = {};
6928
+ for (let s = 0; s < t.length; s++) {
6929
+ const i = (t[s].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
6930
+ i.trim() !== "" && i.split("}").filter(((n, r, a) => a.length > 1 && n.trim())).forEach(((n) => {
6931
+ if ((n.match(/{/g) || []).length > 1 && n.trim().startsWith("@")) return;
6932
+ const r = n.split("{"), a = {}, l = r[1].trim().split(";").filter((function(h) {
6933
+ return h.trim();
6934
+ }));
6935
+ for (let h = 0; h < l.length; h++) {
6936
+ const c = l[h].split(":"), u = c[0].trim(), d = c[1].trim();
6937
+ a[u] = d;
6940
6938
  }
6941
- (r = a[0].trim()).split(",").forEach((c) => {
6942
- (c = c.replace(/^svg/i, "").trim()) !== "" && (i[c] = x(x({}, i[c] || {}), l));
6943
- });
6944
- });
6939
+ (n = r[0].trim()).split(",").forEach(((h) => {
6940
+ (h = h.replace(/^svg/i, "").trim()) !== "" && (e[h] = x(x({}, e[h] || {}), a));
6941
+ }));
6942
+ }));
6945
6943
  }
6946
- return i;
6944
+ return e;
6947
6945
  }
6948
6946
  const cl = (o) => j.getSVGClass(Wn(o).toLowerCase());
6949
6947
  class kf {
6950
6948
  constructor(t, e, s, i, n) {
6951
- this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = function(r) {
6949
+ this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = (function(r) {
6952
6950
  const a = Jh(r, Tf), l = {};
6953
6951
  let h = a.length;
6954
6952
  for (; h--; ) {
@@ -6958,10 +6956,10 @@ class kf {
6958
6956
  u && (l[u] = c);
6959
6957
  }
6960
6958
  return l;
6961
- }(i), this.cssRules = Ef(i);
6959
+ })(i), this.cssRules = Ef(i);
6962
6960
  }
6963
6961
  parse() {
6964
- return Promise.all(this.elements.map((t) => this.createObject(t)));
6962
+ return Promise.all(this.elements.map(((t) => this.createObject(t))));
6965
6963
  }
6966
6964
  async createObject(t) {
6967
6965
  const e = cl(t);
@@ -6994,7 +6992,7 @@ class kf {
6994
6992
  a.parentElement.appendChild(r);
6995
6993
  const l = Bn("".concat(a.getAttribute("transform") || "", " ").concat(r.getAttribute("originalTransform") || ""));
6996
6994
  r.setAttribute("transform", "matrix(".concat(l.join(","), ")"));
6997
- const h = await Promise.all(i.map((b) => cl(b).fromElement(b, this.options, this.cssRules).then((_) => (Tn(_), _.fillRule = _.clipRule, delete _.clipRule, _)))), c = h.length === 1 ? h[0] : new be(h), u = Ct(n, c.calcTransformMatrix());
6995
+ const h = await Promise.all(i.map(((b) => cl(b).fromElement(b, this.options, this.cssRules).then(((_) => (Tn(_), _.fillRule = _.clipRule, delete _.clipRule, _)))))), c = h.length === 1 ? h[0] : new be(h), u = Ct(n, c.calcTransformMatrix());
6998
6996
  c.clipPath && await this.resolveClipPath(c, a, r.getAttribute("clip-path") ? a : void 0);
6999
6997
  const { scaleX: d, scaleY: f, angle: g, skewX: p, translateX: v, translateY: m } = Cs(u);
7000
6998
  c.set({ flipX: !1, flipY: !1 }), c.set({ scaleX: d, scaleY: f, angle: g, skewX: p, skewY: 0 }), c.setPositionByOrigin(new A(v, m), K, K), t.clipPath = c;
@@ -7021,48 +7019,48 @@ async function Pf(o, t) {
7021
7019
  const { x: C = 0, y: T = 0, transform: E = "" } = p, k = "".concat(E, " ").concat(w.transform || "", " translate(").concat(C, ", ").concat(T, ")");
7022
7020
  if (Ir(b), /^svg$/i.test(b.nodeName)) {
7023
7021
  const O = b.ownerDocument.createElementNS(Kr, "g");
7024
- Object.entries(w).forEach((B) => {
7022
+ Object.entries(w).forEach(((B) => {
7025
7023
  let [N, P] = B;
7026
7024
  return O.setAttributeNS(Kr, N, P);
7027
- }), O.append(...b.childNodes), b = O;
7025
+ })), O.append(...b.childNodes), b = O;
7028
7026
  }
7029
7027
  for (const O of g) {
7030
7028
  if (!O) continue;
7031
7029
  const { name: B, value: N } = O;
7032
7030
  if (!d.includes(B)) if (B === "style") {
7033
7031
  const P = {};
7034
- Zr(N, P), Object.entries(w).forEach((F) => {
7032
+ Zr(N, P), Object.entries(w).forEach(((F) => {
7035
7033
  let [z, M] = F;
7036
7034
  P[z] = M;
7037
- }), Zr(w.style || "", P);
7038
- const R = Object.entries(P).map((F) => F.join(":")).join(";");
7035
+ })), Zr(w.style || "", P);
7036
+ const R = Object.entries(P).map(((F) => F.join(":"))).join(";");
7039
7037
  b.setAttribute(B, R);
7040
7038
  } else !w[B] && b.setAttribute(B, N);
7041
7039
  }
7042
7040
  b.setAttribute("transform", k), b.setAttribute("instantiated_by_use", "1"), b.removeAttribute("id"), f.parentNode.replaceChild(b, f);
7043
7041
  }
7044
7042
  })(o);
7045
- const n = Array.from(i.getElementsByTagName("*")), r = x(x({}, Ir(i)), {}, { crossOrigin: e, signal: s }), a = n.filter((c) => (Ir(c), ul(c) && !function(u) {
7043
+ const n = Array.from(i.getElementsByTagName("*")), r = x(x({}, Ir(i)), {}, { crossOrigin: e, signal: s }), a = n.filter(((c) => (Ir(c), ul(c) && !(function(u) {
7046
7044
  let d = u;
7047
7045
  for (; d && (d = d.parentElement); ) if (d && d.nodeName && Cf.test(Wn(d)) && !d.getAttribute("instantiated_by_use")) return !0;
7048
7046
  return !1;
7049
- }(c)));
7047
+ })(c))));
7050
7048
  if (!a || a && !a.length) return x(x({}, ra()), {}, { options: r, allElements: n });
7051
7049
  const l = {};
7052
- return n.filter((c) => Wn(c) === "clipPath").forEach((c) => {
7050
+ return n.filter(((c) => Wn(c) === "clipPath")).forEach(((c) => {
7053
7051
  c.setAttribute("originalTransform", c.getAttribute("transform") || "");
7054
7052
  const u = c.getAttribute("id");
7055
- l[u] = Array.from(c.getElementsByTagName("*")).filter((d) => ul(d));
7056
- }), { objects: await new kf(a, r, t, o, l).parse(), elements: a, options: r, allElements: n };
7053
+ l[u] = Array.from(c.getElementsByTagName("*")).filter(((d) => ul(d)));
7054
+ })), { objects: await new kf(a, r, t, o, l).parse(), elements: a, options: r, allElements: n };
7057
7055
  }
7058
7056
  function Mf(o, t) {
7059
7057
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7060
- return new Promise((s, i) => {
7058
+ return new Promise(((s, i) => {
7061
7059
  Bh(o.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
7062
7060
  const r = n.responseXML;
7063
7061
  r && s(r), i();
7064
7062
  }, signal: e.signal });
7065
- }).then((s) => Pf(s, t, e)).catch(() => ra());
7063
+ })).then(((s) => Pf(s, t, e))).catch((() => ra()));
7066
7064
  }
7067
7065
  const ar = (o) => o.webgl !== void 0, Na = "precision highp float", Of = `
7068
7066
  `.concat(Na, `;
@@ -7162,7 +7160,7 @@ class Ft {
7162
7160
  }
7163
7161
  toObject() {
7164
7162
  const t = Object.keys(this.constructor.defaults || {});
7165
- return x({ type: this.type }, t.reduce((e, s) => (e[s] = this[s], e), {}));
7163
+ return x({ type: this.type }, t.reduce(((e, s) => (e[s] = this[s], e)), {}));
7166
7164
  }
7167
7165
  toJSON() {
7168
7166
  return this.toObject();
@@ -7350,7 +7348,7 @@ class an extends Ft {
7350
7348
  }
7351
7349
  static async fromObject(t, e) {
7352
7350
  let { type: s, image: i } = t, n = mt(t, jf);
7353
- return Bt.fromObject(i, e).then((r) => new this(x(x({}, n), {}, { image: r })));
7351
+ return Bt.fromObject(i, e).then(((r) => new this(x(x({}, n), {}, { image: r }))));
7354
7352
  }
7355
7353
  }
7356
7354
  S(an, "type", "BlendImage"), S(an, "defaults", { mode: "multiply", alpha: 1 }), S(an, "uniformLocations", ["uTransformMatrix", "uImage"]), j.setClass(an);
@@ -7523,18 +7521,18 @@ class dl extends Ft {
7523
7521
  super(t), this.subFilters = t.subFilters || [];
7524
7522
  }
7525
7523
  applyTo(t) {
7526
- ar(t) && (t.passes += this.subFilters.length - 1), this.subFilters.forEach((e) => {
7524
+ ar(t) && (t.passes += this.subFilters.length - 1), this.subFilters.forEach(((e) => {
7527
7525
  e.applyTo(t);
7528
- });
7526
+ }));
7529
7527
  }
7530
7528
  toObject() {
7531
- return { type: this.type, subFilters: this.subFilters.map((t) => t.toObject()) };
7529
+ return { type: this.type, subFilters: this.subFilters.map(((t) => t.toObject())) };
7532
7530
  }
7533
7531
  isNeutralState() {
7534
- return !this.subFilters.some((t) => !t.isNeutralState());
7532
+ return !this.subFilters.some(((t) => !t.isNeutralState()));
7535
7533
  }
7536
7534
  static fromObject(t, e) {
7537
- return Promise.all((t.subFilters || []).map((s) => j.getClass(s.type).fromObject(s, e))).then((s) => new this({ subFilters: s }));
7535
+ return Promise.all((t.subFilters || []).map(((s) => j.getClass(s.type).fromObject(s, e)))).then(((s) => new this({ subFilters: s })));
7538
7536
  }
7539
7537
  }
7540
7538
  S(dl, "type", "Composed"), j.setClass(dl);
@@ -8028,10 +8026,10 @@ class vn extends Ft {
8028
8026
  void main() {
8029
8027
  vec4 color = texture2D(uTexture, vTexCoord);
8030
8028
  float sum = 1.0;
8031
- `).concat(e.map((s, i) => `
8029
+ `).concat(e.map(((s, i) => `
8032
8030
  color += texture2D(uTexture, vTexCoord + `.concat(s, ") * uTaps[").concat(i, "] + texture2D(uTexture, vTexCoord - ").concat(s, ") * uTaps[").concat(i, `];
8033
8031
  sum += 2.0 * uTaps[`).concat(i, `];
8034
- `)).join(`
8032
+ `))).join(`
8035
8033
  `), `
8036
8034
  gl_FragColor = color / sum;
8037
8035
  }
@@ -8077,7 +8075,7 @@ class vn extends Ft {
8077
8075
  }
8078
8076
  lanczosResize(t, e, s, i, n) {
8079
8077
  const r = t.imageData.data, a = t.ctx.createImageData(i, n), l = a.data, h = this.lanczosCreate(this.lanczosLobes), c = this.rcpScaleX, u = this.rcpScaleY, d = 2 / this.rcpScaleX, f = 2 / this.rcpScaleY, g = Math.ceil(c * this.lanczosLobes / 2), p = Math.ceil(u * this.lanczosLobes / 2), v = {}, m = { x: 0, y: 0 }, b = { x: 0, y: 0 };
8080
- return function _(w) {
8078
+ return (function _(w) {
8081
8079
  let C, T, E, k, O, B, N, P, R, F, z;
8082
8080
  for (m.x = (w + 0.5) * c, b.x = Math.floor(m.x), C = 0; C < n; C++) {
8083
8081
  for (m.y = (C + 0.5) * u, b.y = Math.floor(m.y), O = 0, B = 0, N = 0, P = 0, R = 0, T = b.x - g; T <= b.x + g; T++) if (!(T < 0 || T >= e)) {
@@ -8087,7 +8085,7 @@ class vn extends Ft {
8087
8085
  k = 4 * (C * i + w), l[k] = B / O, l[k + 1] = N / O, l[k + 2] = P / O, l[k + 3] = R / O;
8088
8086
  }
8089
8087
  return ++w < i ? _(w) : a;
8090
- }(0);
8088
+ })(0);
8091
8089
  }
8092
8090
  bilinearFiltering(t, e, s, i, n) {
8093
8091
  let r, a, l, h, c, u, d, f, g, p, v, m, b, _ = 0;
@@ -8644,12 +8642,12 @@ function Z(o, t, e, s = !1) {
8644
8642
  writable: !1
8645
8643
  }), e;
8646
8644
  }
8647
- const hs = function() {
8645
+ const hs = (function() {
8648
8646
  function t(e, s) {
8649
8647
  this.message = e, this.name = s;
8650
8648
  }
8651
8649
  return t.prototype = new Error(), t.constructor = t, t;
8652
- }();
8650
+ })();
8653
8651
  class gl extends hs {
8654
8652
  constructor(t, e) {
8655
8653
  super(t, "PasswordException"), this.code = e;
@@ -12849,7 +12847,7 @@ class Tg extends Ya {
12849
12847
  offsetY: -l,
12850
12848
  scaleX: 1 / f,
12851
12849
  scaleY: 1 / g
12852
- }, v = u + 2 * 2, m = d + 2 * 2, b = s.getCanvas("mesh", v, m), _ = b.context, w = _.createImageData(u, d);
12850
+ }, v = u + 4, m = d + 4, b = s.getCanvas("mesh", v, m), _ = b.context, w = _.createImageData(u, d);
12853
12851
  if (e) {
12854
12852
  const T = w.data;
12855
12853
  for (let E = 0, k = T.length; E < k; E += 4)