@anu3ev/fabric-image-editor 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +222 -198
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -35,9 +35,9 @@ var Z = (h, t, e) => new Promise((n, s) => {
35
35
  }, a = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(o, i);
36
36
  a((e = e.apply(h, t)).next());
37
37
  });
38
- import { ActiveSelection as K, Textbox as ct, util as bt, controlsUtils as Je, InteractiveFabricObject as Qe, Point as lt, FitContentLayout as $e, loadSVGFromURL as xn, FabricImage as qt, Gradient as tn, Rect as Rn, Circle as kn, Triangle as Bn, Group as Pt, Color as Nn, classRegistry as en, loadSVGFromString as Pn, Canvas as zn, Pattern as Fn } from "fabric";
39
- import { create as Wn } from "jsondiffpatch";
40
- import Un from "diff-match-patch";
38
+ import { ActiveSelection as K, Textbox as ct, util as bt, controlsUtils as Je, InteractiveFabricObject as Qe, Point as lt, FitContentLayout as $e, loadSVGFromURL as xn, FabricImage as qt, Gradient as tn, Rect as kn, Circle as Rn, Triangle as Bn, Group as Pt, Color as Nn, classRegistry as en, loadSVGFromString as Pn, Canvas as zn, Pattern as Fn } from "fabric";
39
+ import { create as Un } from "jsondiffpatch";
40
+ import Wn from "diff-match-patch";
41
41
  var Yn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", et = function() {
42
42
  for (var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 21, e = "", n = crypto.getRandomValues(new Uint8Array(t |= 0)); t--; )
43
43
  e += Yn[n[t] & 63];
@@ -457,18 +457,18 @@ class Gn {
457
457
  this.worker.terminate();
458
458
  }
459
459
  }
460
- const At = 12, Vn = 2, Oe = 8, _e = 20, Xn = 100, Le = 20, De = 8, Kn = 100, me = 32, Fe = 1, qn = "#2B2D33", We = "#3D8BF4", Ue = "#FFFFFF";
460
+ const At = 12, Vn = 2, Oe = 8, _e = 20, Xn = 100, Le = 20, De = 8, Kn = 100, me = 32, Fe = 1, qn = "#2B2D33", Ue = "#3D8BF4", We = "#FFFFFF";
461
461
  function he(h, t, e, n, s) {
462
462
  const o = At, i = Vn;
463
- h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = Ue, h.strokeStyle = We, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -o / 2, o, o, i), h.fill(), h.stroke(), h.restore();
463
+ h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = We, h.strokeStyle = Ue, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -o / 2, o, o, i), h.fill(), h.stroke(), h.restore();
464
464
  }
465
465
  function sn(h, t, e, n, s) {
466
466
  const o = Oe, i = _e, a = Xn;
467
- h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = Ue, h.strokeStyle = We, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -i / 2, o, i, a), h.fill(), h.stroke(), h.restore();
467
+ h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = We, h.strokeStyle = Ue, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -i / 2, o, i, a), h.fill(), h.stroke(), h.restore();
468
468
  }
469
469
  function on(h, t, e, n, s) {
470
470
  const o = Le, i = De, a = Kn;
471
- h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = Ue, h.strokeStyle = We, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -i / 2, o, i, a), h.fill(), h.stroke(), h.restore();
471
+ h.save(), h.translate(t, e), h.rotate(bt.degreesToRadians(s.angle)), h.fillStyle = We, h.strokeStyle = Ue, h.lineWidth = Fe, h.beginPath(), h.roundRect(-o / 2, -i / 2, o, i, a), h.fill(), h.stroke(), h.restore();
472
472
  }
473
473
  const Jn = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE4Ljc1IDQuMzc1djMuNzVhLjYyNS42MjUgMCAwIDEtLjYyNS42MjVoLTMuNzVhLjYyNS42MjUgMCAwIDEgMC0xLjI1aDIuMTRsLTIuMDc3LTEuOTAzLS4wMi0uMDE5YTYuMjUgNi4yNSAwIDEgMC0uMTMgOC45NjcuNjI2LjYyNiAwIDAgMSAuODYuOTA5QTcuNDU2IDcuNDU2IDAgMCAxIDEwIDE3LjVoLS4xMDNhNy41IDcuNSAwIDEgMSA1LjM5Ni0xMi44MTJMMTcuNSA2LjcwM1Y0LjM3NWEuNjI1LjYyNSAwIDAgMSAxLjI1IDBaIi8+PC9zdmc+", wn = new Image();
474
474
  wn.src = Jn;
@@ -1187,7 +1187,7 @@ class Ye {
1187
1187
  this.canvas && (this.canvas.off("object:rotating", this._onObjectRotating), this.canvas.off("mouse:up", this._onMouseUp), this.canvas.off("object:modified", this._onObjectModified), this.canvas.off("selection:cleared", this._onSelectionCleared)), (t = this.el) != null && t.parentNode && this.el.parentNode.removeChild(this.el), this.el = null, this.editor = null, this.canvas = null, this.options = null;
1188
1188
  }
1189
1189
  }
1190
- const Re = [
1190
+ const ke = [
1191
1191
  "id",
1192
1192
  "backgroundId",
1193
1193
  "customData",
@@ -1228,7 +1228,7 @@ const Re = [
1228
1228
  ];
1229
1229
  class J {
1230
1230
  constructor({ editor: t }) {
1231
- this.editor = t, this.canvas = t.canvas, this._isSavingState = !1, this._historySuspendCount = 0, this._isActionInProgress = !1, this._actionSnapshot = null, this._actionReason = null, this._pendingSaveTimeoutId = null, this._pendingSaveReason = null, this.baseState = null, this.patches = [], this.currentIndex = 0, this.maxHistoryLength = t.options.maxHistoryLength, this.totalChangesCount = 0, this.baseStateChangesCount = 0, this._createDiffPatcher();
1231
+ this.editor = t, this.canvas = t.canvas, this._isSavingState = !1, this._historySuspendCount = 0, this._isActionInProgress = !1, this._actionSnapshot = null, this._actionReason = null, this._pendingSaveTimeoutId = null, this._pendingSaveReason = null, this._hasDeferredSaveAfterUnblock = !1, this.baseState = null, this.patches = [], this.currentIndex = 0, this.maxHistoryLength = t.options.maxHistoryLength, this.totalChangesCount = 0, this.baseStateChangesCount = 0, this._createDiffPatcher();
1232
1232
  }
1233
1233
  /** Проверка, нужно ли пропускать сохранение истории */
1234
1234
  get skipHistory() {
@@ -1238,7 +1238,7 @@ class J {
1238
1238
  return this.patches[this.currentIndex - 1] || null;
1239
1239
  }
1240
1240
  _createDiffPatcher() {
1241
- this.diffPatcher = Wn({
1241
+ this.diffPatcher = Un({
1242
1242
  objectHash(t) {
1243
1243
  return [JSON.stringify(t)].join("-");
1244
1244
  },
@@ -1247,7 +1247,7 @@ class J {
1247
1247
  includeValueOnMove: !1
1248
1248
  },
1249
1249
  textDiff: {
1250
- diffMatchPatch: Un,
1250
+ diffMatchPatch: Wn,
1251
1251
  minLength: 60
1252
1252
  }
1253
1253
  });
@@ -1302,6 +1302,25 @@ class J {
1302
1302
  getCurrentChangePosition() {
1303
1303
  return this.baseStateChangesCount + this.currentIndex;
1304
1304
  }
1305
+ /**
1306
+ * Проверяет, заблокирован ли UI редактора.
1307
+ */
1308
+ _isUiBlocked() {
1309
+ const { interactionBlocker: t } = this.editor;
1310
+ return t ? t.isBlocked : !1;
1311
+ }
1312
+ /**
1313
+ * Помечает, что состояние нужно сохранить после снятия блокировки UI.
1314
+ */
1315
+ _deferSaveAfterUiUnblock() {
1316
+ this._hasDeferredSaveAfterUnblock = !0;
1317
+ }
1318
+ /**
1319
+ * Выполняет отложенное сохранение после снятия блокировки UI.
1320
+ */
1321
+ flushDeferredSaveAfterUnblock() {
1322
+ return !this._hasDeferredSaveAfterUnblock || this._isUiBlocked() || this.skipHistory ? !1 : (this._hasDeferredSaveAfterUnblock = !1, this.saveState(), !0);
1323
+ }
1305
1324
  /**
1306
1325
  * Получаем полное состояние, применяя все диффы к базовому состоянию.
1307
1326
  */
@@ -1323,7 +1342,7 @@ class J {
1323
1342
  */
1324
1343
  _serializeCanvasState() {
1325
1344
  const { canvas: t } = this;
1326
- return t.toDatalessObject([...Re]);
1345
+ return t.toDatalessObject([...ke]);
1327
1346
  }
1328
1347
  /**
1329
1348
  * Обрабатывает срабатывание отложенного сохранения.
@@ -1381,10 +1400,14 @@ class J {
1381
1400
  */
1382
1401
  saveState() {
1383
1402
  if (console.log("saveState"), !this.skipHistory) {
1403
+ if (this._isUiBlocked()) {
1404
+ this._deferSaveAfterUiUnblock();
1405
+ return;
1406
+ }
1384
1407
  this._isSavingState = !0, console.time("saveState");
1385
1408
  try {
1386
1409
  const t = this._withTemporaryUnlock(
1387
- () => this.canvas.toDatalessObject([...Re])
1410
+ () => this.canvas.toDatalessObject([...ke])
1388
1411
  );
1389
1412
  if (console.timeEnd("saveState"), !this.baseState) {
1390
1413
  this.baseState = t, this.patches = [], this.currentIndex = 0, console.log("Базовое состояние сохранено.");
@@ -2150,27 +2173,27 @@ class pt {
2150
2173
  [T]
2151
2174
  );
2152
2175
  if (l) {
2153
- const I = m * 0.264583, O = g * 0.264583, L = (yield this.editor.moduleLoader.loadModule("jspdf")).jsPDF, W = new L({
2176
+ const I = m * 0.264583, O = g * 0.264583, L = (yield this.editor.moduleLoader.loadModule("jspdf")).jsPDF, U = new L({
2154
2177
  orientation: I > O ? "landscape" : "portrait",
2155
2178
  unit: "mm",
2156
2179
  format: [I, O]
2157
2180
  });
2158
- if (W.addImage(String(E), "JPG", 0, 0, I, O), s) {
2181
+ if (U.addImage(String(E), "JPG", 0, 0, I, O), s) {
2159
2182
  const x = {
2160
- image: W.output("datauristring"),
2183
+ image: U.output("datauristring"),
2161
2184
  format: "pdf",
2162
2185
  contentType: "application/pdf",
2163
2186
  fileName: e
2164
2187
  };
2165
2188
  return i.fire("editor:canvas-exported", x), x;
2166
2189
  }
2167
- const z = W.output("blob"), k = {
2190
+ const z = U.output("blob"), R = {
2168
2191
  image: new File([z], e, { type: "application/pdf" }),
2169
2192
  format: "pdf",
2170
2193
  contentType: "application/pdf",
2171
2194
  fileName: e
2172
2195
  };
2173
- return i.fire("editor:canvas-exported", k), k;
2196
+ return i.fire("editor:canvas-exported", R), R;
2174
2197
  }
2175
2198
  if (s) {
2176
2199
  const M = {
@@ -3265,10 +3288,10 @@ class Ms {
3265
3288
  const { canvas: t, canvasManager: e, historyManager: n } = this.editor;
3266
3289
  n.suspendHistory(), this.isBlocked = !1, t.selection = !0, t.skipTargetFind = !1, e.getObjects().forEach((s) => {
3267
3290
  s.evented = !0, s.selectable = !0;
3268
- }), t.upperCanvasEl.style.pointerEvents = "", t.lowerCanvasEl.style.pointerEvents = "", this.overlayMask.visible = !1, t.requestRenderAll(), t.fire("editor:enabled"), n.resumeHistory();
3291
+ }), t.upperCanvasEl.style.pointerEvents = "", t.lowerCanvasEl.style.pointerEvents = "", this.overlayMask.visible = !1, t.requestRenderAll(), t.fire("editor:enabled"), n.resumeHistory(), n.flushDeferredSaveAfterUnblock();
3269
3292
  }
3270
3293
  }
3271
- class Wt {
3294
+ class Ut {
3272
3295
  constructor({ editor: t }) {
3273
3296
  this.editor = t, this.backgroundObject = null;
3274
3297
  }
@@ -3331,8 +3354,8 @@ class Wt {
3331
3354
  try {
3332
3355
  const { historyManager: i } = this.editor, { backgroundObject: a } = this;
3333
3356
  if (i.suspendHistory(), a && a.backgroundType === "gradient") {
3334
- const r = Wt._createFabricGradient(t);
3335
- if (Wt._isGradientEqual(a.fill, r)) {
3357
+ const r = Ut._createFabricGradient(t);
3358
+ if (Ut._isGradientEqual(a.fill, r)) {
3336
3359
  i.resumeHistory();
3337
3360
  return;
3338
3361
  }
@@ -3515,7 +3538,7 @@ class Wt {
3515
3538
  backgroundType: "gradient",
3516
3539
  backgroundId: `background-${et()}`
3517
3540
  }, { withoutSelection: !0 }), this.refresh();
3518
- const e = Wt._createFabricGradient(t);
3541
+ const e = Ut._createFabricGradient(t);
3519
3542
  this.backgroundObject.set("fill", e), this.editor.canvas.requestRenderAll();
3520
3543
  }
3521
3544
  /**
@@ -3575,7 +3598,7 @@ class Wt {
3575
3598
  { offset: 0, color: "#000000" },
3576
3599
  { offset: 1, color: "#ffffff" }
3577
3600
  ], t.type === "linear") {
3578
- const u = t.angle * Math.PI / 180, f = Wt._angleToCoords(u);
3601
+ const u = t.angle * Math.PI / 180, f = Ut._angleToCoords(u);
3579
3602
  return new tn({
3580
3603
  type: "linear",
3581
3604
  gradientUnits: "percentage",
@@ -3798,7 +3821,7 @@ class Ss {
3798
3821
  "height",
3799
3822
  "fill"
3800
3823
  ]);
3801
- const { canvas: u } = this.editor, f = new Rn(F({
3824
+ const { canvas: u } = this.editor, f = new kn(F({
3802
3825
  id: t,
3803
3826
  left: e,
3804
3827
  top: n,
@@ -3838,7 +3861,7 @@ class Ss {
3838
3861
  "radius",
3839
3862
  "fill"
3840
3863
  ]);
3841
- const { canvas: d } = this.editor, u = new kn(F({
3864
+ const { canvas: d } = this.editor, u = new Rn(F({
3842
3865
  id: t,
3843
3866
  left: e,
3844
3867
  top: n,
@@ -4066,8 +4089,9 @@ class ws {
4066
4089
  importOptions: e = {}
4067
4090
  }) {
4068
4091
  var r;
4069
- const s = It(F({}, e), {
4070
- source: t,
4092
+ const s = It(F({
4093
+ source: t
4094
+ }, e), {
4071
4095
  fromClipboard: !0
4072
4096
  }), o = yield this.editor.imageManager.importImage(s), i = o == null ? void 0 : o.image, a = (r = o == null ? void 0 : o.source) != null ? r : t;
4073
4097
  i && this.editor.canvas.fire("editor:object-pasted", {
@@ -5047,7 +5071,7 @@ const Cs = ({ textbox: h }) => {
5047
5071
  );
5048
5072
  if (n.length)
5049
5073
  return (s = n[0]) == null ? void 0 : s[e];
5050
- }, ke = ({ strokeColor: h, width: t }) => t <= 0 ? null : h != null ? h : "#000000", Be = ({ width: h = 0 }) => h ? Math.max(0, h) : 0, Ce = ({ value: h }) => typeof h == "string" ? h.toLocaleUpperCase() : "", wt = ({
5074
+ }, Re = ({ strokeColor: h, width: t }) => t <= 0 ? null : h != null ? h : "#000000", Be = ({ width: h = 0 }) => h ? Math.max(0, h) : 0, Ce = ({ value: h }) => typeof h == "string" ? h.toLocaleUpperCase() : "", wt = ({
5051
5075
  value: h,
5052
5076
  min: t,
5053
5077
  max: e
@@ -5141,38 +5165,38 @@ const Cs = ({ textbox: h }) => {
5141
5165
  }
5142
5166
  const A = c[g], w = b / o, T = this._getLineLeftOffset(g);
5143
5167
  let E = 0, C = 0, v = this.getValueOfPropertyAt(g, 0, e), S = this._getDecorationColorAt(g, 0), M = this.getValueOfPropertyAt(g, 0, "textDecorationThickness"), I = v, O = S, L = M;
5144
- const W = l + w * (1 - r);
5168
+ const U = l + w * (1 - r);
5145
5169
  let z = this.getHeightOfChar(g, 0), j = this.getValueOfPropertyAt(g, 0, "deltaY");
5146
5170
  for (let x = 0, B = A.length; x < B; x += 1) {
5147
5171
  const _ = this.__charBounds[g][x];
5148
5172
  I = this.getValueOfPropertyAt(g, x, e), O = this._getDecorationColorAt(g, x), L = this.getValueOfPropertyAt(g, x, "textDecorationThickness");
5149
5173
  const D = this.getHeightOfChar(g, x), P = this.getValueOfPropertyAt(g, x, "deltaY");
5150
5174
  if (u && I && O) {
5151
- const R = s * L / 1e3;
5175
+ const k = s * L / 1e3;
5152
5176
  t.save(), t.fillStyle = S, t.translate(_.renderLeft, _.renderTop), t.rotate(_.angle), t.fillRect(
5153
5177
  -_.kernedWidth / 2,
5154
- p * D + P - m * R,
5178
+ p * D + P - m * k,
5155
5179
  _.kernedWidth,
5156
- R
5180
+ k
5157
5181
  ), t.restore();
5158
5182
  } else if ((I !== v || O !== S || D !== z || L !== M || P !== j) && C > 0) {
5159
- const R = s * M / 1e3;
5183
+ const k = s * M / 1e3;
5160
5184
  let V = d + T + E;
5161
5185
  n === "rtl" && (V = a - V - C), v && S && M && (t.fillStyle = S, t.fillRect(
5162
5186
  V,
5163
- W + p * z + j - m * R,
5187
+ U + p * z + j - m * k,
5164
5188
  C,
5165
- R
5189
+ k
5166
5190
  )), E = _.left, C = _.width, v = I, M = L, S = O, z = D, j = P;
5167
5191
  } else
5168
5192
  C += _.kernedWidth;
5169
5193
  }
5170
- let k = d + T + E;
5171
- n === "rtl" && (k = a - k - C), t.fillStyle = O;
5194
+ let R = d + T + E;
5195
+ n === "rtl" && (R = a - R - C), t.fillStyle = O;
5172
5196
  const N = s * L / 1e3;
5173
5197
  I && O && L && t.fillRect(
5174
- k,
5175
- W + p * z + j - m * N,
5198
+ R,
5199
+ U + p * z + j - m * N,
5176
5200
  C - f,
5177
5201
  N
5178
5202
  ), l += b;
@@ -5185,7 +5209,7 @@ const Cs = ({ textbox: h }) => {
5185
5209
  _getDecorationColorAt(t, e) {
5186
5210
  const n = this.getValueOfPropertyAt(t, e, "strokeWidth"), s = Be({
5187
5211
  width: typeof n == "number" && Number.isFinite(n) ? n : 0
5188
- }), o = this.getValueOfPropertyAt(t, e, "stroke"), i = o == null ? null : ke({ strokeColor: o, width: s });
5212
+ }), o = this.getValueOfPropertyAt(t, e, "stroke"), i = o == null ? null : Re({ strokeColor: o, width: s });
5189
5213
  if (s > 0 && i != null)
5190
5214
  return i;
5191
5215
  const a = this.getValueOfPropertyAt(t, e, "fill");
@@ -5439,7 +5463,7 @@ const Es = () => {
5439
5463
  s > u && n < f && i.push(l), a = f + 1;
5440
5464
  }
5441
5465
  return i;
5442
- }, Rs = ({
5466
+ }, ks = ({
5443
5467
  textbox: h,
5444
5468
  range: t
5445
5469
  }) => {
@@ -5454,7 +5478,7 @@ const Es = () => {
5454
5478
  n <= u && s >= f && i.push(l), a = f + 1;
5455
5479
  }
5456
5480
  return i;
5457
- }, ks = ({
5481
+ }, Rs = ({
5458
5482
  previous: h,
5459
5483
  next: t
5460
5484
  }) => {
@@ -5619,7 +5643,7 @@ class rt {
5619
5643
  event: i != null ? i : null
5620
5644
  });
5621
5645
  }, this._handleObjectScaling = (n) => {
5622
- var ie, Se, oe, ae, re, kt, we, ce, Zt, Gt, Vt, Xt, Kt;
5646
+ var ie, Se, oe, ae, re, Rt, we, ce, Zt, Gt, Vt, Xt, Kt;
5623
5647
  const { target: s, transform: o } = n;
5624
5648
  if (s instanceof K || !rt._isTextbox(s) || !o) return;
5625
5649
  s.isScaling = !0;
@@ -5633,19 +5657,19 @@ class rt {
5633
5657
  baseLineFontDefaults: f
5634
5658
  } = i, p = typeof ((ie = o.original) == null ? void 0 : ie.width) == "number" ? o.original.width : void 0, m = typeof ((Se = o.original) == null ? void 0 : Se.left) == "number" ? o.original.left : void 0, g = p != null ? p : a, y = m != null ? m : r, b = (oe = o.corner) != null ? oe : "", A = (ae = o.action) != null ? ae : "", w = ["ml", "mr"].includes(b) || A === "scaleX", T = ["mt", "mb"].includes(b) || A === "scaleY", E = ["tl", "tr", "bl", "br"].includes(b) || A === "scale", C = E || T;
5635
5659
  if (!w && !T && !E) return;
5636
- const v = Math.abs((kt = (re = s.scaleX) != null ? re : o.scaleX) != null ? kt : 1) || 1, S = Math.abs((ce = (we = s.scaleY) != null ? we : o.scaleY) != null ? ce : 1) || 1, M = Math.max(1, g * v), I = Math.max(1, Math.round(M)), O = Math.max(1, c * S), {
5660
+ const v = Math.abs((Rt = (re = s.scaleX) != null ? re : o.scaleX) != null ? Rt : 1) || 1, S = Math.abs((ce = (we = s.scaleY) != null ? we : o.scaleY) != null ? ce : 1) || 1, M = Math.max(1, g * v), I = Math.max(1, Math.round(M)), O = Math.max(1, c * S), {
5637
5661
  paddingTop: L = 0,
5638
- paddingRight: W = 0,
5662
+ paddingRight: U = 0,
5639
5663
  paddingBottom: z = 0,
5640
5664
  paddingLeft: j = 0,
5641
- radiusTopLeft: k = 0,
5665
+ radiusTopLeft: R = 0,
5642
5666
  radiusTopRight: N = 0,
5643
5667
  radiusBottomRight: x = 0,
5644
5668
  radiusBottomLeft: B = 0,
5645
5669
  fontSize: _,
5646
5670
  width: D,
5647
5671
  originX: P = "left"
5648
- } = s, R = E || T, V = E || T, H = R ? {
5672
+ } = s, k = E || T, V = E || T, H = k ? {
5649
5673
  top: Math.max(0, l.top * S),
5650
5674
  right: Math.max(0, l.right * S),
5651
5675
  bottom: Math.max(0, l.bottom * S),
@@ -5674,8 +5698,8 @@ class rt {
5674
5698
  lineFontDefaults: f,
5675
5699
  scale: S
5676
5700
  }));
5677
- const jt = (Gt = (Zt = o.originX) != null ? Zt : P) != null ? Gt : "left", dt = y + g, ht = y + g / 2, Et = D != null ? D : g, Ct = I !== Et, Dt = Math.abs(O - (_ != null ? _ : c)) > it, xt = Math.abs(H.top - L) > it || Math.abs(H.right - W) > it || Math.abs(H.bottom - z) > it || Math.abs(H.left - j) > it, Rt = Math.abs(q.topLeft - k) > it || Math.abs(q.topRight - N) > it || Math.abs(q.bottomRight - x) > it || Math.abs(q.bottomLeft - B) > it;
5678
- if (!Ct && !Dt && !xt && !Rt) {
5701
+ const jt = (Gt = (Zt = o.originX) != null ? Zt : P) != null ? Gt : "left", dt = y + g, ht = y + g / 2, Et = D != null ? D : g, Ct = I !== Et, Dt = Math.abs(O - (_ != null ? _ : c)) > it, xt = Math.abs(H.top - L) > it || Math.abs(H.right - U) > it || Math.abs(H.bottom - z) > it || Math.abs(H.left - j) > it, kt = Math.abs(q.topLeft - R) > it || Math.abs(q.topRight - N) > it || Math.abs(q.bottomRight - x) > it || Math.abs(q.bottomLeft - B) > it;
5702
+ if (!Ct && !Dt && !xt && !kt) {
5679
5703
  s.set({ scaleX: 1, scaleY: 1 }), o.scaleX = 1, o.scaleY = 1;
5680
5704
  return;
5681
5705
  }
@@ -5711,7 +5735,7 @@ class rt {
5711
5735
  topRight: q.topRight,
5712
5736
  bottomRight: q.bottomRight,
5713
5737
  bottomLeft: q.bottomLeft
5714
- }, i.hasWidthChange = se || Dt || xt || Rt || Ht;
5738
+ }, i.hasWidthChange = se || Dt || xt || kt || Ht;
5715
5739
  }, this._handleObjectModified = (n) => {
5716
5740
  var b, A, w;
5717
5741
  const { target: s } = n;
@@ -5721,14 +5745,14 @@ class rt {
5721
5745
  const { scaleX: C = 1, scaleY: v = 1 } = s;
5722
5746
  if (Math.abs(C - 1) < it && Math.abs(v - 1) < it) return;
5723
5747
  this.canvas.discardActiveObject(), T.forEach((M) => {
5724
- var I, O, L, W;
5748
+ var I, O, L, U;
5725
5749
  if (rt._isTextbox(M)) {
5726
- const z = (I = M.scaleX) != null ? I : 1, j = (O = M.scaleY) != null ? O : 1, k = ((L = M.fontSize) != null ? L : 16) * j, N = ((W = M.width) != null ? W : 0) * z, x = j, {
5750
+ const z = (I = M.scaleX) != null ? I : 1, j = (O = M.scaleY) != null ? O : 1, R = ((L = M.fontSize) != null ? L : 16) * j, N = ((U = M.width) != null ? U : 0) * z, x = j, {
5727
5751
  paddingTop: B = 0,
5728
5752
  paddingRight: _ = 0,
5729
5753
  paddingBottom: D = 0,
5730
5754
  paddingLeft: P = 0,
5731
- radiusTopLeft: R = 0,
5755
+ radiusTopLeft: k = 0,
5732
5756
  radiusTopRight: V = 0,
5733
5757
  radiusBottomRight: H = 0,
5734
5758
  radiusBottomLeft: q = 0,
@@ -5739,7 +5763,7 @@ class rt {
5739
5763
  paddingBottom: Math.max(0, D * x),
5740
5764
  paddingLeft: Math.max(0, P * x)
5741
5765
  }, gt = {
5742
- radiusTopLeft: Math.max(0, R * x),
5766
+ radiusTopLeft: Math.max(0, k * x),
5743
5767
  radiusTopRight: Math.max(0, V * x),
5744
5768
  radiusBottomRight: Math.max(0, H * x),
5745
5769
  radiusBottomLeft: Math.max(0, q * x)
@@ -5754,7 +5778,7 @@ class rt {
5754
5778
  lineFontDefaults: M.lineFontDefaults,
5755
5779
  scale: x
5756
5780
  }), ht = It(F(F({
5757
- fontSize: k,
5781
+ fontSize: R,
5758
5782
  width: N,
5759
5783
  scaleX: 1,
5760
5784
  scaleY: 1
@@ -5806,8 +5830,8 @@ class rt {
5806
5830
  * @param options — настройки текста
5807
5831
  * @param flags — флаги поведения
5808
5832
  */
5809
- addText(W = {}, { withoutSelection: I = !1, withoutSave: O = !1, withoutAdding: L = !1 } = {}) {
5810
- var z = W, {
5833
+ addText(U = {}, { withoutSelection: I = !1, withoutSave: O = !1, withoutAdding: L = !1 } = {}) {
5834
+ var z = U, {
5811
5835
  id: t = `text-${et()}`,
5812
5836
  text: e = "Новый текст",
5813
5837
  autoExpand: n = !0,
@@ -5861,9 +5885,9 @@ class rt {
5861
5885
  "radiusBottomLeft"
5862
5886
  ]);
5863
5887
  var V;
5864
- const { historyManager: j } = this.editor, { canvas: k } = this;
5888
+ const { historyManager: j } = this.editor, { canvas: R } = this;
5865
5889
  j.suspendHistory();
5866
- const N = s != null ? s : this._getDefaultFontFamily(), x = Be({ width: p }), B = ke({
5890
+ const N = s != null ? s : this._getDefaultFontFamily(), x = Be({ width: p }), B = Re({
5867
5891
  strokeColor: f,
5868
5892
  width: x
5869
5893
  }), _ = F({
@@ -5896,7 +5920,7 @@ class rt {
5896
5920
  const H = Ce({ value: D.textCaseRaw });
5897
5921
  H !== D.text && D.set({ text: H });
5898
5922
  }
5899
- return _t({ textbox: D }) && (D.dirty = !0), M.left === void 0 && M.top === void 0 && k.centerObject(D), L || k.add(D), I || k.setActiveObject(D), k.requestRenderAll(), j.resumeHistory(), O || j.saveState(), k.fire("editor:text-added", {
5923
+ return _t({ textbox: D }) && (D.dirty = !0), M.left === void 0 && M.top === void 0 && R.centerObject(D), L || R.add(D), I || R.setActiveObject(D), R.requestRenderAll(), j.resumeHistory(), O || j.saveState(), R.fire("editor:text-added", {
5900
5924
  textbox: D,
5901
5925
  options: It(F({}, _), {
5902
5926
  text: e,
@@ -5957,10 +5981,10 @@ class rt {
5957
5981
  opacity: I,
5958
5982
  backgroundColor: O,
5959
5983
  backgroundOpacity: L,
5960
- paddingTop: W,
5984
+ paddingTop: U,
5961
5985
  paddingRight: z,
5962
5986
  paddingBottom: j,
5963
- paddingLeft: k,
5987
+ paddingLeft: R,
5964
5988
  radiusTopLeft: N,
5965
5989
  radiusTopRight: x,
5966
5990
  radiusBottomRight: B,
@@ -5990,39 +6014,39 @@ class rt {
5990
6014
  "radiusTopRight",
5991
6015
  "radiusBottomRight",
5992
6016
  "radiusBottomLeft"
5993
- ]), P = F({}, D), R = o !== void 0 ? Ls({
6017
+ ]), P = F({}, D), k = o !== void 0 ? Ls({
5994
6018
  text: a,
5995
6019
  range: o
5996
- }) : Cs({ textbox: i }), V = R ? Ds({ textbox: i, range: R }) : null, H = {}, q = {}, tt = {};
6020
+ }) : Cs({ textbox: i }), V = k ? Ds({ textbox: i, range: k }) : null, H = {}, q = {}, tt = {};
5997
6021
  let at, gt;
5998
- const jt = Ts({ textbox: i, range: R }), dt = !R || jt, ht = !R;
6022
+ const jt = Ts({ textbox: i, range: k }), dt = !k || jt, ht = !k;
5999
6023
  if (g !== void 0 && (V && (q.fontFamily = g), dt && (P.fontFamily = g, ht && (tt.fontFamily = g))), y !== void 0 && (V && (q.fontSize = y), dt && (P.fontSize = y, ht && (tt.fontSize = y))), b !== void 0) {
6000
6024
  const Q = b ? "bold" : "normal";
6001
- R && (H.fontWeight = Q), dt && (P.fontWeight = Q, ht && (tt.fontWeight = Q));
6025
+ k && (H.fontWeight = Q), dt && (P.fontWeight = Q, ht && (tt.fontWeight = Q));
6002
6026
  }
6003
6027
  if (A !== void 0) {
6004
6028
  const Q = A ? "italic" : "normal";
6005
- R && (H.fontStyle = Q), dt && (P.fontStyle = Q, ht && (tt.fontStyle = Q));
6029
+ k && (H.fontStyle = Q), dt && (P.fontStyle = Q, ht && (tt.fontStyle = Q));
6006
6030
  }
6007
- if (w !== void 0 && (R && (H.underline = w), dt && (P.underline = w, ht && (tt.underline = w))), E !== void 0 && (R && (H.linethrough = E), dt && (P.linethrough = E, ht && (tt.linethrough = E))), C !== void 0 && (P.textAlign = C), v !== void 0 && (R && (H.fill = v), dt && (P.fill = v, ht && (tt.fill = v))), S !== void 0 || M !== void 0) {
6008
- const Q = R ? hn({ textbox: i, range: R, property: "strokeWidth" }) : void 0, st = R ? hn({ textbox: i, range: R, property: "stroke" }) : void 0, Ae = (Xt = (Vt = M != null ? M : Q) != null ? Vt : i.strokeWidth) != null ? Xt : 0;
6031
+ if (w !== void 0 && (k && (H.underline = w), dt && (P.underline = w, ht && (tt.underline = w))), E !== void 0 && (k && (H.linethrough = E), dt && (P.linethrough = E, ht && (tt.linethrough = E))), C !== void 0 && (P.textAlign = C), v !== void 0 && (k && (H.fill = v), dt && (P.fill = v, ht && (tt.fill = v))), S !== void 0 || M !== void 0) {
6032
+ const Q = k ? hn({ textbox: i, range: k, property: "strokeWidth" }) : void 0, st = k ? hn({ textbox: i, range: k, property: "stroke" }) : void 0, Ae = (Xt = (Vt = M != null ? M : Q) != null ? Vt : i.strokeWidth) != null ? Xt : 0;
6009
6033
  gt = Be({ width: Ae });
6010
6034
  const Nt = (Bt = (Kt = S != null ? S : st) != null ? Kt : i.stroke) != null ? Bt : void 0;
6011
- at = ke({
6035
+ at = Re({
6012
6036
  strokeColor: Nt,
6013
6037
  width: gt
6014
- }), R && (H.stroke = at, H.strokeWidth = gt), dt && (P.stroke = at, P.strokeWidth = gt, ht && (tt.stroke = at, tt.strokeWidth = gt));
6038
+ }), k && (H.stroke = at, H.strokeWidth = gt), dt && (P.stroke = at, P.strokeWidth = gt, ht && (tt.stroke = at, tt.strokeWidth = gt));
6015
6039
  }
6016
- I !== void 0 && (P.opacity = I), O !== void 0 && (P.backgroundColor = O), L !== void 0 && (P.backgroundOpacity = L), W !== void 0 && (P.paddingTop = W), z !== void 0 && (P.paddingRight = z), j !== void 0 && (P.paddingBottom = j), k !== void 0 && (P.paddingLeft = k), N !== void 0 && (P.radiusTopLeft = N), x !== void 0 && (P.radiusTopRight = x), B !== void 0 && (P.radiusBottomRight = B), _ !== void 0 && (P.radiusBottomLeft = _);
6017
- const Et = (le = i.textCaseRaw) != null ? le : a, Ct = !!i.uppercase, Dt = p !== void 0, xt = Dt ? p != null ? p : "" : Et, Rt = T != null ? T : Ct, Ht = Rt !== Ct;
6040
+ I !== void 0 && (P.opacity = I), O !== void 0 && (P.backgroundColor = O), L !== void 0 && (P.backgroundOpacity = L), U !== void 0 && (P.paddingTop = U), z !== void 0 && (P.paddingRight = z), j !== void 0 && (P.paddingBottom = j), R !== void 0 && (P.paddingLeft = R), N !== void 0 && (P.radiusTopLeft = N), x !== void 0 && (P.radiusTopRight = x), B !== void 0 && (P.radiusBottomRight = B), _ !== void 0 && (P.radiusBottomLeft = _);
6041
+ const Et = (le = i.textCaseRaw) != null ? le : a, Ct = !!i.uppercase, Dt = p !== void 0, xt = Dt ? p != null ? p : "" : Et, kt = T != null ? T : Ct, Ht = kt !== Ct;
6018
6042
  if (Dt || Ht) {
6019
- const Q = Rt ? Ce({ value: xt }) : xt;
6043
+ const Q = kt ? Ce({ value: xt }) : xt;
6020
6044
  P.text = Q, i.textCaseRaw = xt;
6021
6045
  } else i.textCaseRaw === void 0 && (i.textCaseRaw = Et);
6022
- i.uppercase = Rt, i.set(P);
6046
+ i.uppercase = kt, i.set(P);
6023
6047
  let mt = !1;
6024
- if (R) {
6025
- const Q = je({ textbox: i, styles: H, range: R }), st = V ? je({ textbox: i, styles: q, range: V }) : !1;
6048
+ if (k) {
6049
+ const Q = je({ textbox: i, styles: H, range: k }), st = V ? je({ textbox: i, styles: q, range: V }) : !1;
6026
6050
  mt = Q || st;
6027
6051
  } else if (Object.keys(tt).length) {
6028
6052
  const Q = Is({ textbox: i });
@@ -6046,10 +6070,10 @@ class rt {
6046
6070
  updates: st
6047
6071
  });
6048
6072
  }
6049
- if (R && (v !== void 0 || S !== void 0 || M !== void 0)) {
6050
- const Q = Rs({
6073
+ if (k && (v !== void 0 || S !== void 0 || M !== void 0)) {
6074
+ const Q = ks({
6051
6075
  textbox: i,
6052
- range: R
6076
+ range: k
6053
6077
  }), st = {};
6054
6078
  v !== void 0 && (st.fill = v), (S !== void 0 || M !== void 0) && (at === null && (st.stroke = null), at != null && (st.stroke = at)), un({
6055
6079
  textbox: i,
@@ -6057,7 +6081,7 @@ class rt {
6057
6081
  updates: st
6058
6082
  });
6059
6083
  }
6060
- se && (i.initDimensions(), i.dirty = !0), (O !== void 0 || L !== void 0 || W !== void 0 || z !== void 0 || j !== void 0 || k !== void 0 || N !== void 0 || x !== void 0 || B !== void 0 || _ !== void 0) && (i.dirty = !0);
6084
+ se && (i.initDimensions(), i.dirty = !0), (O !== void 0 || L !== void 0 || U !== void 0 || z !== void 0 || j !== void 0 || R !== void 0 || N !== void 0 || x !== void 0 || B !== void 0 || _ !== void 0) && (i.dirty = !0);
6061
6085
  const Ot = mn({
6062
6086
  stylesList: [
6063
6087
  P,
@@ -6068,10 +6092,10 @@ class rt {
6068
6092
  }), { autoExpand: Mt } = i, ie = m !== void 0, oe = (m != null ? m : Mt) !== !1;
6069
6093
  ie ? i.autoExpand = m !== !1 : Mt === void 0 && (i.autoExpand = !0);
6070
6094
  const ae = Object.prototype.hasOwnProperty.call(P, "width"), re = oe && !ae && (Dt || Ht || Ot);
6071
- let kt = !1;
6072
- re && (kt = this._autoExpandTextboxWidth(i, {
6095
+ let Rt = !1;
6096
+ re && (Rt = this._autoExpandTextboxWidth(i, {
6073
6097
  anchor: f
6074
- }), kt && (i.dirty = !0)), (kt ? !1 : _t({ textbox: i })) && (i.dirty = !0), i.setCoords(), s || c.requestRenderAll(), r.resumeHistory(), n || r.saveState();
6098
+ }), Rt && (i.dirty = !0)), (Rt ? !1 : _t({ textbox: i })) && (i.dirty = !0), i.setCoords(), s || c.requestRenderAll(), r.resumeHistory(), n || r.saveState();
6075
6099
  const ce = rt._getSnapshot(i);
6076
6100
  return c.fire("editor:text-updated", {
6077
6101
  textbox: i,
@@ -6084,8 +6108,8 @@ class rt {
6084
6108
  updates: P,
6085
6109
  before: l,
6086
6110
  after: ce,
6087
- selectionRange: R != null ? R : void 0,
6088
- selectionStyles: R && Object.keys(H).length ? H : void 0
6111
+ selectionRange: k != null ? k : void 0,
6112
+ selectionStyles: k && Object.keys(H).length ? H : void 0
6089
6113
  }), i;
6090
6114
  }
6091
6115
  /**
@@ -6135,7 +6159,7 @@ class rt {
6135
6159
  * Синхронизирует lineFontDefaults при изменении текста и сохраняет typing style для пустых строк.
6136
6160
  */
6137
6161
  _syncLineFontDefaultsOnTextChanged({ textbox: t }) {
6138
- var L, W, z;
6162
+ var L, U, z;
6139
6163
  const {
6140
6164
  text: e = "",
6141
6165
  lineFontDefaults: n,
@@ -6152,20 +6176,20 @@ class rt {
6152
6176
  let b = n, A = !1, w = !1;
6153
6177
  const T = typeof a == "string" ? a : void 0, E = typeof r == "string" ? r : void 0;
6154
6178
  if (y !== 0 && n && Object.keys(n).length) {
6155
- const j = ks({
6179
+ const j = Rs({
6156
6180
  previous: u,
6157
6181
  next: d
6158
- }), k = Bs({
6182
+ }), R = Bs({
6159
6183
  text: u,
6160
6184
  charIndex: j
6161
6185
  });
6162
6186
  if (y > 0) {
6163
6187
  const N = Ns({
6164
6188
  text: u,
6165
- lineIndex: k
6189
+ lineIndex: R
6166
6190
  });
6167
- let x = k + 1;
6168
- j === N && (x = k);
6191
+ let x = R + 1;
6192
+ j === N && (x = R);
6169
6193
  const B = {};
6170
6194
  for (const _ in n) {
6171
6195
  if (!Object.prototype.hasOwnProperty.call(n, _)) continue;
@@ -6173,43 +6197,43 @@ class rt {
6173
6197
  if (!Number.isFinite(D)) continue;
6174
6198
  const P = n[D];
6175
6199
  if (!P) continue;
6176
- const R = D >= x ? D + y : D;
6177
- B[R] = F({}, P);
6200
+ const k = D >= x ? D + y : D;
6201
+ B[k] = F({}, P);
6178
6202
  }
6179
6203
  b = B, A = !0, w = !0;
6180
6204
  }
6181
6205
  if (y < 0) {
6182
6206
  const N = Math.abs(y);
6183
- let x = k;
6207
+ let x = R;
6184
6208
  u[j] === `
6185
- ` && ((W = f[k]) != null ? W : "").length > 0 && (x = k + 1);
6209
+ ` && ((U = f[R]) != null ? U : "").length > 0 && (x = R + 1);
6186
6210
  const _ = x + N - 1, D = {};
6187
6211
  for (const P in n) {
6188
6212
  if (!Object.prototype.hasOwnProperty.call(n, P)) continue;
6189
- const R = Number(P);
6190
- if (!Number.isFinite(R)) continue;
6191
- const V = n[R];
6192
- V && (R < x && (D[R] = F({}, V)), R > _ && (D[R + y] = F({}, V)));
6213
+ const k = Number(P);
6214
+ if (!Number.isFinite(k)) continue;
6215
+ const V = n[k];
6216
+ V && (k < x && (D[k] = F({}, V)), k > _ && (D[k + y] = F({}, V)));
6193
6217
  }
6194
6218
  b = D, A = !0, w = !0;
6195
6219
  }
6196
6220
  }
6197
6221
  let C = null;
6198
6222
  if (l && typeof c == "number") {
6199
- const j = t.get2DCursorLocation(c), { lineIndex: k } = j;
6200
- Number.isFinite(k) && (C = k);
6223
+ const j = t.get2DCursorLocation(c), { lineIndex: R } = j;
6224
+ Number.isFinite(R) && (C = R);
6201
6225
  }
6202
6226
  let v = s, S = !1, M = !1, I, O = null;
6203
6227
  for (let j = 0; j < p.length; j += 1) {
6204
- const k = (z = p[j]) != null ? z : "", N = b ? b[j] : void 0;
6205
- if (N && (I = N), k.length !== 0) {
6228
+ const R = (z = p[j]) != null ? z : "", N = b ? b[j] : void 0;
6229
+ if (N && (I = N), R.length !== 0) {
6206
6230
  if (N) {
6207
- const R = Os({
6208
- lineText: k,
6231
+ const k = Os({
6232
+ lineText: R,
6209
6233
  lineStyles: v ? v[j] : void 0,
6210
6234
  lineDefaults: N
6211
6235
  });
6212
- R.changed && (v || (v = {}, M = !0), M || (v = F({}, v), M = !0), R.lineStyles && (v[j] = R.lineStyles), !R.lineStyles && v[j] && delete v[j], S = !0);
6236
+ k.changed && (v || (v = {}, M = !0), M || (v = F({}, v), M = !0), k.lineStyles && (v[j] = k.lineStyles), !k.lineStyles && v[j] && delete v[j], S = !0);
6213
6237
  }
6214
6238
  continue;
6215
6239
  }
@@ -6238,7 +6262,7 @@ class rt {
6238
6262
  * но не шире монтажной области, и удерживает объект в её пределах.
6239
6263
  */
6240
6264
  _autoExpandTextboxWidth(t, { anchor: e } = {}) {
6241
- var C, v, S, M, I, O, L, W, z, j, k, N, x;
6265
+ var C, v, S, M, I, O, L, U, z, j, R, N, x;
6242
6266
  const { montageArea: n } = this.editor;
6243
6267
  if (!n) return !1;
6244
6268
  const s = typeof t.text == "string" ? t.text : "";
@@ -6246,7 +6270,7 @@ class rt {
6246
6270
  n.setCoords();
6247
6271
  const o = n.getBoundingRect(!1, !0), i = (C = o.width) != null ? C : 0;
6248
6272
  if (!Number.isFinite(i) || i <= 0) return !1;
6249
- const a = e != null ? e : (v = this.editingAnchorState) == null ? void 0 : v.get(t), r = (M = (S = a == null ? void 0 : a.originY) != null ? S : t.originY) != null ? M : "top", c = Math.abs((I = t.scaleX) != null ? I : 1) || 1, l = (O = t.paddingLeft) != null ? O : 0, d = (L = t.paddingRight) != null ? L : 0, u = (W = t.strokeWidth) != null ? W : 0, f = Math.max(
6273
+ const a = e != null ? e : (v = this.editingAnchorState) == null ? void 0 : v.get(t), r = (M = (S = a == null ? void 0 : a.originY) != null ? S : t.originY) != null ? M : "top", c = Math.abs((I = t.scaleX) != null ? I : 1) || 1, l = (O = t.paddingLeft) != null ? O : 0, d = (L = t.paddingRight) != null ? L : 0, u = (U = t.strokeWidth) != null ? U : 0, f = Math.max(
6250
6274
  1,
6251
6275
  i / c - l - d - u
6252
6276
  );
@@ -6262,7 +6286,7 @@ class rt {
6262
6286
  f,
6263
6287
  Math.max(b, A)
6264
6288
  );
6265
- y && (w = f), Math.abs(((k = t.width) != null ? k : 0) - w) > it && (t.set({ width: w }), t.initDimensions(), m = !0), _t({ textbox: t }) && (m = !0), a && (t.setPositionByOrigin(new lt(a.x, a.y), "center", r), m = !0);
6289
+ y && (w = f), Math.abs(((R = t.width) != null ? R : 0) - w) > it && (t.set({ width: w }), t.initDimensions(), m = !0), _t({ textbox: t }) && (m = !0), a && (t.setPositionByOrigin(new lt(a.x, a.y), "center", r), m = !0);
6266
6290
  const E = zs({
6267
6291
  textbox: t,
6268
6292
  montageLeft: (N = o.left) != null ? N : 0,
@@ -6325,8 +6349,8 @@ class rt {
6325
6349
  snapshot: _,
6326
6350
  entries: D
6327
6351
  }) => {
6328
- Object.entries(D).forEach(([P, R]) => {
6329
- R != null && (_[P] = R);
6352
+ Object.entries(D).forEach(([P, k]) => {
6353
+ k != null && (_[P] = k);
6330
6354
  });
6331
6355
  }, {
6332
6356
  id: n,
@@ -6356,10 +6380,10 @@ class rt {
6356
6380
  radiusBottomRight: I,
6357
6381
  radiusBottomLeft: O,
6358
6382
  left: L,
6359
- top: W,
6383
+ top: U,
6360
6384
  width: z,
6361
6385
  height: j,
6362
- angle: k,
6386
+ angle: R,
6363
6387
  scaleX: N,
6364
6388
  scaleY: x
6365
6389
  } = t, B = {
@@ -6394,10 +6418,10 @@ class rt {
6394
6418
  radiusBottomRight: I,
6395
6419
  radiusBottomLeft: O,
6396
6420
  left: L,
6397
- top: W,
6421
+ top: U,
6398
6422
  width: z,
6399
6423
  height: j,
6400
- angle: k,
6424
+ angle: R,
6401
6425
  scaleX: N,
6402
6426
  scaleY: x
6403
6427
  }
@@ -6457,7 +6481,7 @@ const fe = ({
6457
6481
  x: d + f / 2,
6458
6482
  y: u + p / 2
6459
6483
  };
6460
- }, Ws = ({
6484
+ }, Us = ({
6461
6485
  normalizedX: h,
6462
6486
  normalizedY: t,
6463
6487
  bounds: e,
@@ -6471,7 +6495,7 @@ const fe = ({
6471
6495
  }
6472
6496
  const c = o + h * a, l = i + t * r;
6473
6497
  return new lt(c, l);
6474
- }, Us = ({
6498
+ }, Ws = ({
6475
6499
  object: h,
6476
6500
  montageArea: t,
6477
6501
  bounds: e
@@ -6752,8 +6776,8 @@ class G {
6752
6776
  return;
6753
6777
  }
6754
6778
  if (I === "stretch") {
6755
- const W = S ? T / m : null, z = M ? E / g : null;
6756
- W && W > 0 && (O.scaleX = W), z && z > 0 && (O.scaleY = z), c.set(O);
6779
+ const U = S ? T / m : null, z = M ? E / g : null;
6780
+ U && U > 0 && (O.scaleX = U), z && z > 0 && (O.scaleY = z), c.set(O);
6757
6781
  return;
6758
6782
  }
6759
6783
  if (!S || !M) {
@@ -6863,7 +6887,7 @@ class G {
6863
6887
  useRelativePositions: r,
6864
6888
  anchorX: G._resolveAnchor(c, pe),
6865
6889
  anchorY: G._resolveAnchor(c, Te)
6866
- }), y = Ws({
6890
+ }), y = Us({
6867
6891
  normalizedX: l,
6868
6892
  normalizedY: d,
6869
6893
  bounds: g,
@@ -6958,12 +6982,12 @@ class G {
6958
6982
  object: t,
6959
6983
  baseWidth: e
6960
6984
  }) {
6961
- var j, k;
6985
+ var j, R;
6962
6986
  if (!(t instanceof ct)) return;
6963
6987
  const n = typeof t.text == "string" ? t.text : "";
6964
6988
  if (!n) return;
6965
6989
  const s = nt({
6966
- value: (k = (j = this.editor) == null ? void 0 : j.montageArea) == null ? void 0 : k.width,
6990
+ value: (R = (j = this.editor) == null ? void 0 : j.montageArea) == null ? void 0 : R.width,
6967
6991
  fallback: 0
6968
6992
  }), {
6969
6993
  width: o = 0,
@@ -6979,9 +7003,9 @@ class G {
6979
7003
  text: n
6980
7004
  }), O = I > p ? I + 1 : p;
6981
7005
  t.set("width", O), t.initDimensions(), t.setPositionByOrigin(M, "center", "center"), t.setCoords();
6982
- const W = (O * u + g + y + f) / r;
7006
+ const U = (O * u + g + y + f) / r;
6983
7007
  let z = T;
6984
- E === "start" && v !== null ? z = Math.max(0, v) + W / 2 : E === "end" && S !== null && (z = Math.min(1, S) - W / 2), typeof z == "number" && (A[Qt] = z);
7008
+ E === "start" && v !== null ? z = Math.max(0, v) + U / 2 : E === "end" && S !== null && (z = Math.min(1, S) - U / 2), typeof z == "number" && (A[Qt] = z);
6985
7009
  }
6986
7010
  /**
6987
7011
  * Возвращает ширину самой длинной строки текстового объекта.
@@ -7011,7 +7035,7 @@ class G {
7011
7035
  baseHeight: s,
7012
7036
  montageArea: o
7013
7037
  }) {
7014
- const i = t.toDatalessObject([...Re]);
7038
+ const i = t.toDatalessObject([...ke]);
7015
7039
  if (G._isSvgObject(t)) {
7016
7040
  const w = G._extractSvgMarkup(t);
7017
7041
  w && (i.svgMarkup = w, delete i.objects, delete i.path);
@@ -7022,7 +7046,7 @@ class G {
7022
7046
  top: r,
7023
7047
  width: c,
7024
7048
  height: l
7025
- } = e, d = t.getBoundingRect(!1, !0), u = n || c || 1, f = s || l || 1, p = Us({
7049
+ } = e, d = t.getBoundingRect(!1, !0), u = n || c || 1, f = s || l || 1, p = Ws({
7026
7050
  object: t,
7027
7051
  montageArea: o,
7028
7052
  bounds: e
@@ -7358,19 +7382,19 @@ const Ee = 5, An = "#3D8BF4", Ne = 1, ot = 2, jn = ({
7358
7382
  if (g && y) {
7359
7383
  const { bounds: v } = g, { bounds: S } = y, { bottom: M } = v, { top: I } = S, L = I - M - f;
7360
7384
  if (L >= 0) {
7361
- const W = L / 2;
7362
- if (vt({ value: W, step: ot })) {
7363
- const j = Ze({ value: W, step: ot }), k = o - M, N = I - i, x = Math.abs(k - j), B = Math.abs(N - j), _ = Math.max(x, B);
7385
+ const U = L / 2;
7386
+ if (vt({ value: U, step: ot })) {
7387
+ const j = Ze({ value: U, step: ot }), R = o - M, N = I - i, x = Math.abs(R - j), B = Math.abs(N - j), _ = Math.max(x, B);
7364
7388
  if (_ <= e) {
7365
- const D = j - k;
7389
+ const D = j - R;
7366
7390
  if (vt({ value: D, step: ot })) {
7367
- const R = i + D, V = {
7391
+ const k = i + D, V = {
7368
7392
  type: "vertical",
7369
7393
  axis: s,
7370
7394
  refStart: M,
7371
7395
  refEnd: M + j,
7372
- activeStart: R,
7373
- activeEnd: R + j,
7396
+ activeStart: k,
7397
+ activeEnd: k + j,
7374
7398
  distance: j
7375
7399
  };
7376
7400
  u.push({ delta: D, guide: V, diff: _ });
@@ -7495,19 +7519,19 @@ const Ee = 5, An = "#3D8BF4", Ne = 1, ot = 2, jn = ({
7495
7519
  if (g && y) {
7496
7520
  const { bounds: v } = g, { bounds: S } = y, { right: M } = v, { left: I } = S, L = I - M - f;
7497
7521
  if (L >= 0) {
7498
- const W = L / 2;
7499
- if (vt({ value: W, step: ot })) {
7500
- const j = Ze({ value: W, step: ot }), k = o - M, N = I - i, x = Math.abs(k - j), B = Math.abs(N - j), _ = Math.max(x, B);
7522
+ const U = L / 2;
7523
+ if (vt({ value: U, step: ot })) {
7524
+ const j = Ze({ value: U, step: ot }), R = o - M, N = I - i, x = Math.abs(R - j), B = Math.abs(N - j), _ = Math.max(x, B);
7501
7525
  if (_ <= e) {
7502
- const D = j - k;
7526
+ const D = j - R;
7503
7527
  if (vt({ value: D, step: ot })) {
7504
- const R = i + D, V = {
7528
+ const k = i + D, V = {
7505
7529
  type: "horizontal",
7506
7530
  axis: s,
7507
7531
  refStart: M,
7508
7532
  refEnd: M + j,
7509
- activeStart: R,
7510
- activeEnd: R + j,
7533
+ activeStart: k,
7534
+ activeEnd: k + j,
7511
7535
  distance: j
7512
7536
  };
7513
7537
  u.push({ delta: D, guide: V, diff: _ });
@@ -7901,13 +7925,13 @@ class $ {
7901
7925
  anchors: d,
7902
7926
  candidates: S,
7903
7927
  threshold: m
7904
- }), { guidePosition: O } = M, { guidePosition: L } = I, W = O !== null, z = L !== null;
7905
- if (!W && !z) {
7928
+ }), { guidePosition: O } = M, { guidePosition: L } = I, U = O !== null, z = L !== null;
7929
+ if (!U && !z) {
7906
7930
  this._clearGuides();
7907
7931
  return;
7908
7932
  }
7909
7933
  const j = [];
7910
- let k = null, N = null;
7934
+ let R = null, N = null;
7911
7935
  if (r) {
7912
7936
  const B = $._resolveUniformScale({
7913
7937
  bounds: u,
@@ -7918,12 +7942,12 @@ class $ {
7918
7942
  });
7919
7943
  if (B) {
7920
7944
  const { scaleFactor: _, guide: D } = B;
7921
- k = w * _, N = T * _, j.push(D);
7945
+ R = w * _, N = T * _, j.push(D);
7922
7946
  }
7923
7947
  }
7924
7948
  if (!r) {
7925
- const { angle: B = 0 } = e, { width: _, height: D } = $._resolveBaseDimensions({ target: e }), P = Math.abs(w) || 1, R = Math.abs(T) || 1;
7926
- if (W) {
7949
+ const { angle: B = 0 } = e, { width: _, height: D } = $._resolveBaseDimensions({ target: e }), P = Math.abs(w) || 1, k = Math.abs(T) || 1;
7950
+ if (U) {
7927
7951
  const V = $._resolveDesiredWidth({
7928
7952
  bounds: u,
7929
7953
  originX: E,
@@ -7934,12 +7958,12 @@ class $ {
7934
7958
  desiredWidth: V,
7935
7959
  baseWidth: _,
7936
7960
  baseHeight: D,
7937
- scaleY: R,
7961
+ scaleY: k,
7938
7962
  angle: B
7939
7963
  });
7940
7964
  if (H !== null) {
7941
7965
  const q = w < 0 ? -1 : 1;
7942
- k = H * q, O !== null && j.push({
7966
+ R = H * q, O !== null && j.push({
7943
7967
  type: "vertical",
7944
7968
  position: O
7945
7969
  });
@@ -7970,14 +7994,14 @@ class $ {
7970
7994
  }
7971
7995
  }
7972
7996
  }
7973
- const x = k !== null || N !== null;
7997
+ const x = R !== null || N !== null;
7974
7998
  if (!x && !j.length) {
7975
7999
  this._clearGuides();
7976
8000
  return;
7977
8001
  }
7978
8002
  if (x) {
7979
8003
  const B = e.getRelativeCenterPoint(), _ = e.translateToOriginPoint(B, E, C), D = {};
7980
- k !== null && (D.scaleX = k, s.scaleX = k), N !== null && (D.scaleY = N, s.scaleY = N), Object.keys(D).length && (e.set(D), e.setPositionByOrigin(_, E, C), e.setCoords());
8004
+ R !== null && (D.scaleX = R, s.scaleX = R), N !== null && (D.scaleY = N, s.scaleY = N), Object.keys(D).length && (e.set(D), e.setPositionByOrigin(_, E, C), e.setCoords());
7981
8005
  }
7982
8006
  this._applyGuides({
7983
8007
  guides: j,
@@ -8433,7 +8457,7 @@ class $ {
8433
8457
  }
8434
8458
  }
8435
8459
  const Mn = "#3D8BF4", Sn = 1;
8436
- class Ut {
8460
+ class Wt {
8437
8461
  /**
8438
8462
  * Создаёт менеджер измерений и инициализирует события.
8439
8463
  */
@@ -8543,7 +8567,7 @@ class Ut {
8543
8567
  this._clearGuides();
8544
8568
  return;
8545
8569
  }
8546
- const i = Ut._resolveTarget({
8570
+ const i = Wt._resolveTarget({
8547
8571
  event: t,
8548
8572
  activeObject: s
8549
8573
  }), { montageArea: a } = n, r = i != null ? i : a, c = r === a, l = yt({ object: r });
@@ -8555,7 +8579,7 @@ class Ut {
8555
8579
  this._clearGuides();
8556
8580
  return;
8557
8581
  }
8558
- const u = Ut._buildGuides({
8582
+ const u = Wt._buildGuides({
8559
8583
  activeBounds: o,
8560
8584
  targetBounds: l,
8561
8585
  targetIsMontageArea: c
@@ -8584,11 +8608,11 @@ class Ut {
8584
8608
  targetBounds: e,
8585
8609
  targetIsMontageArea: n
8586
8610
  }) {
8587
- const s = Ut._buildHorizontalGuides({
8611
+ const s = Wt._buildHorizontalGuides({
8588
8612
  activeBounds: t,
8589
8613
  targetBounds: e,
8590
8614
  targetIsMontageArea: n
8591
- }), o = Ut._buildVerticalGuides({
8615
+ }), o = Wt._buildVerticalGuides({
8592
8616
  activeBounds: t,
8593
8617
  targetBounds: e,
8594
8618
  targetIsMontageArea: n
@@ -8810,7 +8834,7 @@ class Ge {
8810
8834
  showRotationAngle: l,
8811
8835
  _onReadyCallback: d
8812
8836
  } = this.options;
8813
- if (ut.apply(), this.canvas = new zn(this.containerId, this.options), this.moduleLoader = new Hn(), this.workerManager = new Gn(), this.errorManager = new ne({ editor: this }), this.historyManager = new J({ editor: this }), this.toolbar = new cs({ editor: this }), this.transformManager = new vs({ editor: this }), this.zoomManager = new bs({ editor: this }), this.canvasManager = new ys({ editor: this }), this.imageManager = new pt({ editor: this }), this.layerManager = new ye({ editor: this }), this.shapeManager = new Ss({ editor: this }), this.interactionBlocker = new Ms({ editor: this }), this.backgroundManager = new Wt({ editor: this }), this.clipboardManager = new ws({ editor: this }), this.objectLockManager = new ve({ editor: this }), this.groupingManager = new As({ editor: this }), this.selectionManager = new ft({ editor: this }), this.deletionManager = new He({ editor: this }), this.panConstraintManager = new js({ editor: this }), this.snappingManager = new $({ editor: this }), this.measurementManager = new Ut({ editor: this }), this.fontManager = new xe((u = this.options.fonts) != null ? u : []), this.textManager = new rt({ editor: this }), this.templateManager = new G({ editor: this }), l && (this.angleIndicator = new Ye({ editor: this })), this._createMontageArea(), this._createClippingArea(), this.listeners = new ze({ editor: this, options: this.options }), this.canvasManager.setEditorContainerWidth(t), this.canvasManager.setEditorContainerHeight(e), this.canvasManager.setCanvasWrapperWidth(n), this.canvasManager.setCanvasWrapperHeight(s), this.canvasManager.setCanvasCSSWidth(o), this.canvasManager.setCanvasCSSHeight(i), this.canvasManager.updateCanvas(), this.zoomManager.calculateAndApplyDefaultZoom(), yield this.fontManager.loadFonts(), r) {
8837
+ if (ut.apply(), this.canvas = new zn(this.containerId, this.options), this.moduleLoader = new Hn(), this.workerManager = new Gn(), this.errorManager = new ne({ editor: this }), this.historyManager = new J({ editor: this }), this.toolbar = new cs({ editor: this }), this.transformManager = new vs({ editor: this }), this.zoomManager = new bs({ editor: this }), this.canvasManager = new ys({ editor: this }), this.imageManager = new pt({ editor: this }), this.layerManager = new ye({ editor: this }), this.shapeManager = new Ss({ editor: this }), this.interactionBlocker = new Ms({ editor: this }), this.backgroundManager = new Ut({ editor: this }), this.clipboardManager = new ws({ editor: this }), this.objectLockManager = new ve({ editor: this }), this.groupingManager = new As({ editor: this }), this.selectionManager = new ft({ editor: this }), this.deletionManager = new He({ editor: this }), this.panConstraintManager = new js({ editor: this }), this.snappingManager = new $({ editor: this }), this.measurementManager = new Wt({ editor: this }), this.fontManager = new xe((u = this.options.fonts) != null ? u : []), this.textManager = new rt({ editor: this }), this.templateManager = new G({ editor: this }), l && (this.angleIndicator = new Ye({ editor: this })), this._createMontageArea(), this._createClippingArea(), this.listeners = new ze({ editor: this, options: this.options }), this.canvasManager.setEditorContainerWidth(t), this.canvasManager.setEditorContainerHeight(e), this.canvasManager.setCanvasWrapperWidth(n), this.canvasManager.setCanvasWrapperHeight(s), this.canvasManager.setCanvasCSSWidth(o), this.canvasManager.setCanvasCSSHeight(i), this.canvasManager.updateCanvas(), this.zoomManager.calculateAndApplyDefaultZoom(), yield this.fontManager.loadFonts(), r) {
8814
8838
  this.historyManager.suspendHistory();
8815
8839
  try {
8816
8840
  const m = yield this.imageManager.prepareInitialState({
@@ -8923,7 +8947,7 @@ class Ge {
8923
8947
  });
8924
8948
  }
8925
8949
  }
8926
- const U = [
8950
+ const W = [
8927
8951
  "U+0000-00FF",
8928
8952
  "U+0100-02BA",
8929
8953
  "U+02BB-02BC",
@@ -8989,7 +9013,7 @@ const U = [
8989
9013
  style: "normal",
8990
9014
  weight: "400",
8991
9015
  display: "swap",
8992
- unicodeRange: U
9016
+ unicodeRange: W
8993
9017
  }
8994
9018
  },
8995
9019
  {
@@ -9009,7 +9033,7 @@ const U = [
9009
9033
  style: "normal",
9010
9034
  weight: "700",
9011
9035
  display: "swap",
9012
- unicodeRange: U
9036
+ unicodeRange: W
9013
9037
  }
9014
9038
  },
9015
9039
  {
@@ -9029,7 +9053,7 @@ const U = [
9029
9053
  style: "normal",
9030
9054
  weight: "200 700",
9031
9055
  display: "swap",
9032
- unicodeRange: U
9056
+ unicodeRange: W
9033
9057
  }
9034
9058
  },
9035
9059
  {
@@ -9049,7 +9073,7 @@ const U = [
9049
9073
  style: "normal",
9050
9074
  weight: "300 900",
9051
9075
  display: "swap",
9052
- unicodeRange: U
9076
+ unicodeRange: W
9053
9077
  }
9054
9078
  },
9055
9079
  {
@@ -9069,7 +9093,7 @@ const U = [
9069
9093
  style: "normal",
9070
9094
  weight: "400 700",
9071
9095
  display: "swap",
9072
- unicodeRange: U
9096
+ unicodeRange: W
9073
9097
  }
9074
9098
  },
9075
9099
  {
@@ -9089,7 +9113,7 @@ const U = [
9089
9113
  style: "normal",
9090
9114
  weight: "300 700",
9091
9115
  display: "swap",
9092
- unicodeRange: U
9116
+ unicodeRange: W
9093
9117
  }
9094
9118
  },
9095
9119
  {
@@ -9109,7 +9133,7 @@ const U = [
9109
9133
  style: "normal",
9110
9134
  weight: "300 700",
9111
9135
  display: "swap",
9112
- unicodeRange: U
9136
+ unicodeRange: W
9113
9137
  }
9114
9138
  },
9115
9139
  {
@@ -9129,7 +9153,7 @@ const U = [
9129
9153
  style: "normal",
9130
9154
  weight: "400",
9131
9155
  display: "swap",
9132
- unicodeRange: U
9156
+ unicodeRange: W
9133
9157
  }
9134
9158
  },
9135
9159
  {
@@ -9149,7 +9173,7 @@ const U = [
9149
9173
  style: "normal",
9150
9174
  weight: "400 700",
9151
9175
  display: "swap",
9152
- unicodeRange: U
9176
+ unicodeRange: W
9153
9177
  }
9154
9178
  },
9155
9179
  {
@@ -9169,7 +9193,7 @@ const U = [
9169
9193
  style: "normal",
9170
9194
  weight: "100 900",
9171
9195
  display: "swap",
9172
- unicodeRange: U
9196
+ unicodeRange: W
9173
9197
  }
9174
9198
  },
9175
9199
  {
@@ -9189,7 +9213,7 @@ const U = [
9189
9213
  style: "normal",
9190
9214
  weight: "400",
9191
9215
  display: "swap",
9192
- unicodeRange: U
9216
+ unicodeRange: W
9193
9217
  }
9194
9218
  },
9195
9219
  {
@@ -9209,7 +9233,7 @@ const U = [
9209
9233
  style: "normal",
9210
9234
  weight: "700",
9211
9235
  display: "swap",
9212
- unicodeRange: U
9236
+ unicodeRange: W
9213
9237
  }
9214
9238
  },
9215
9239
  {
@@ -9229,7 +9253,7 @@ const U = [
9229
9253
  style: "normal",
9230
9254
  weight: "400 700",
9231
9255
  display: "swap",
9232
- unicodeRange: U
9256
+ unicodeRange: W
9233
9257
  }
9234
9258
  },
9235
9259
  {
@@ -9249,7 +9273,7 @@ const U = [
9249
9273
  style: "normal",
9250
9274
  weight: "100 900",
9251
9275
  display: "swap",
9252
- unicodeRange: U
9276
+ unicodeRange: W
9253
9277
  }
9254
9278
  },
9255
9279
  {
@@ -9269,7 +9293,7 @@ const U = [
9269
9293
  style: "normal",
9270
9294
  weight: "100",
9271
9295
  display: "swap",
9272
- unicodeRange: U
9296
+ unicodeRange: W
9273
9297
  }
9274
9298
  },
9275
9299
  {
@@ -9289,7 +9313,7 @@ const U = [
9289
9313
  style: "normal",
9290
9314
  weight: "200",
9291
9315
  display: "swap",
9292
- unicodeRange: U
9316
+ unicodeRange: W
9293
9317
  }
9294
9318
  },
9295
9319
  {
@@ -9309,7 +9333,7 @@ const U = [
9309
9333
  style: "normal",
9310
9334
  weight: "300",
9311
9335
  display: "swap",
9312
- unicodeRange: U
9336
+ unicodeRange: W
9313
9337
  }
9314
9338
  },
9315
9339
  {
@@ -9329,7 +9353,7 @@ const U = [
9329
9353
  style: "normal",
9330
9354
  weight: "400",
9331
9355
  display: "swap",
9332
- unicodeRange: U
9356
+ unicodeRange: W
9333
9357
  }
9334
9358
  },
9335
9359
  {
@@ -9349,7 +9373,7 @@ const U = [
9349
9373
  style: "normal",
9350
9374
  weight: "500",
9351
9375
  display: "swap",
9352
- unicodeRange: U
9376
+ unicodeRange: W
9353
9377
  }
9354
9378
  },
9355
9379
  {
@@ -9369,7 +9393,7 @@ const U = [
9369
9393
  style: "normal",
9370
9394
  weight: "600",
9371
9395
  display: "swap",
9372
- unicodeRange: U
9396
+ unicodeRange: W
9373
9397
  }
9374
9398
  },
9375
9399
  {
@@ -9389,7 +9413,7 @@ const U = [
9389
9413
  style: "normal",
9390
9414
  weight: "700",
9391
9415
  display: "swap",
9392
- unicodeRange: U
9416
+ unicodeRange: W
9393
9417
  }
9394
9418
  },
9395
9419
  {
@@ -9409,7 +9433,7 @@ const U = [
9409
9433
  style: "normal",
9410
9434
  weight: "800",
9411
9435
  display: "swap",
9412
- unicodeRange: U
9436
+ unicodeRange: W
9413
9437
  }
9414
9438
  },
9415
9439
  {
@@ -9429,7 +9453,7 @@ const U = [
9429
9453
  style: "normal",
9430
9454
  weight: "900",
9431
9455
  display: "swap",
9432
- unicodeRange: U
9456
+ unicodeRange: W
9433
9457
  }
9434
9458
  },
9435
9459
  {
@@ -9449,7 +9473,7 @@ const U = [
9449
9473
  style: "normal",
9450
9474
  weight: "400",
9451
9475
  display: "swap",
9452
- unicodeRange: U
9476
+ unicodeRange: W
9453
9477
  }
9454
9478
  },
9455
9479
  {
@@ -9469,7 +9493,7 @@ const U = [
9469
9493
  style: "normal",
9470
9494
  weight: "700",
9471
9495
  display: "swap",
9472
- unicodeRange: U
9496
+ unicodeRange: W
9473
9497
  }
9474
9498
  },
9475
9499
  {
@@ -9489,7 +9513,7 @@ const U = [
9489
9513
  style: "normal",
9490
9514
  weight: "100 900",
9491
9515
  display: "swap",
9492
- unicodeRange: U
9516
+ unicodeRange: W
9493
9517
  }
9494
9518
  },
9495
9519
  {
@@ -9509,7 +9533,7 @@ const U = [
9509
9533
  style: "normal",
9510
9534
  weight: "300 700",
9511
9535
  display: "swap",
9512
- unicodeRange: U
9536
+ unicodeRange: W
9513
9537
  }
9514
9538
  },
9515
9539
  {
@@ -9529,7 +9553,7 @@ const U = [
9529
9553
  style: "normal",
9530
9554
  weight: "400",
9531
9555
  display: "swap",
9532
- unicodeRange: U
9556
+ unicodeRange: W
9533
9557
  }
9534
9558
  },
9535
9559
  {
@@ -9549,7 +9573,7 @@ const U = [
9549
9573
  style: "normal",
9550
9574
  weight: "200 800",
9551
9575
  display: "swap",
9552
- unicodeRange: U
9576
+ unicodeRange: W
9553
9577
  }
9554
9578
  },
9555
9579
  {
@@ -9569,7 +9593,7 @@ const U = [
9569
9593
  style: "normal",
9570
9594
  weight: "100 900",
9571
9595
  display: "swap",
9572
- unicodeRange: U
9596
+ unicodeRange: W
9573
9597
  }
9574
9598
  },
9575
9599
  {
@@ -9589,7 +9613,7 @@ const U = [
9589
9613
  style: "normal",
9590
9614
  weight: "400",
9591
9615
  display: "swap",
9592
- unicodeRange: U
9616
+ unicodeRange: W
9593
9617
  }
9594
9618
  },
9595
9619
  {
@@ -9609,7 +9633,7 @@ const U = [
9609
9633
  style: "normal",
9610
9634
  weight: "100 900",
9611
9635
  display: "swap",
9612
- unicodeRange: U
9636
+ unicodeRange: W
9613
9637
  }
9614
9638
  },
9615
9639
  {
@@ -9629,7 +9653,7 @@ const U = [
9629
9653
  style: "normal",
9630
9654
  weight: "300 800",
9631
9655
  display: "swap",
9632
- unicodeRange: U
9656
+ unicodeRange: W
9633
9657
  }
9634
9658
  },
9635
9659
  {
@@ -9649,7 +9673,7 @@ const U = [
9649
9673
  style: "normal",
9650
9674
  weight: "400",
9651
9675
  display: "swap",
9652
- unicodeRange: U
9676
+ unicodeRange: W
9653
9677
  }
9654
9678
  },
9655
9679
  {
@@ -9669,7 +9693,7 @@ const U = [
9669
9693
  style: "normal",
9670
9694
  weight: "700",
9671
9695
  display: "swap",
9672
- unicodeRange: U
9696
+ unicodeRange: W
9673
9697
  }
9674
9698
  },
9675
9699
  {
@@ -9689,7 +9713,7 @@ const U = [
9689
9713
  style: "normal",
9690
9714
  weight: "300 900",
9691
9715
  display: "swap",
9692
- unicodeRange: U
9716
+ unicodeRange: W
9693
9717
  }
9694
9718
  },
9695
9719
  {
@@ -9709,7 +9733,7 @@ const U = [
9709
9733
  style: "normal",
9710
9734
  weight: "400",
9711
9735
  display: "swap",
9712
- unicodeRange: U
9736
+ unicodeRange: W
9713
9737
  }
9714
9738
  },
9715
9739
  {
@@ -9729,7 +9753,7 @@ const U = [
9729
9753
  style: "normal",
9730
9754
  weight: "100 900",
9731
9755
  display: "swap",
9732
- unicodeRange: U
9756
+ unicodeRange: W
9733
9757
  }
9734
9758
  },
9735
9759
  {
@@ -9749,7 +9773,7 @@ const U = [
9749
9773
  style: "normal",
9750
9774
  weight: "100 900",
9751
9775
  display: "swap",
9752
- unicodeRange: U
9776
+ unicodeRange: W
9753
9777
  }
9754
9778
  }
9755
9779
  ], ti = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anu3ev/fabric-image-editor",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "JavaScript image editor built on FabricJS, allowing you to create instances with an integrated montage area and providing an API to modify and manage state.",
5
5
  "module": "dist/main.js",
6
6
  "files": [