@cliquify.me/timeline 6.0.0 → 6.0.1

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.
package/dist/index.es.js CHANGED
@@ -103,7 +103,7 @@ class Ma extends Wt {
103
103
  }
104
104
  class jl {
105
105
  }
106
- class El extends jl {
106
+ class Il extends jl {
107
107
  testPrecision(t, e) {
108
108
  const s = "precision ".concat(e, ` float;
109
109
  void main(){}`), r = t.createShader(t.FRAGMENT_SHADER);
@@ -117,13 +117,13 @@ void main(){}`), r = t.createShader(t.FRAGMENT_SHADER);
117
117
  return !!this.maxTextureSize && this.maxTextureSize >= t;
118
118
  }
119
119
  }
120
- const Il = {};
120
+ const El = {};
121
121
  let ro;
122
- const Ht = () => ro || (ro = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new El(), dispose() {
123
- }, copyPasteData: Il }), ms = () => Ht().document, Ks = () => Ht().window, Da = () => {
122
+ const Ht = () => ro || (ro = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new Il(), dispose() {
123
+ }, copyPasteData: El }), ms = () => Ht().document, Ks = () => Ht().window, Da = () => {
124
124
  var i;
125
125
  return Math.max((i = P.devicePixelRatio) !== null && i !== void 0 ? i : Ks().devicePixelRatio, 1);
126
- }, Es = new class {
126
+ }, Is = new class {
127
127
  constructor() {
128
128
  b(this, "boundsOfCurveCache", {}), this.charWidthsCache = /* @__PURE__ */ new Map();
129
129
  }
@@ -142,10 +142,10 @@ const Ht = () => ro || (ro = { document, window, isTouchSupported: "ontouchstart
142
142
  const { perfLimitSizeTotal: t } = P, e = Math.sqrt(t * i);
143
143
  return [Math.floor(e), Math.floor(t / e)];
144
144
  }
145
- }(), Gi = "6.9.0";
145
+ }(), Gi = "6.9.1";
146
146
  function Le() {
147
147
  }
148
- const Te = Math.PI / 2, he = 2 * Math.PI, _n = Math.PI / 180, gt = Object.freeze([1, 0, 0, 1, 0, 0]), Tn = 16, me = 0.4477152502, j = "center", L = "left", pt = "top", Ni = "bottom", q = "right", mt = "none", xn = /\r?\n/, ja = "moving", ri = "scaling", Ea = "rotating", Sn = "rotate", Ia = "skewing", Xs = "resizing", Pa = "modifyPoly", Pl = "modifyPath", Wr = "changed", ii = "scale", ft = "scaleX", _t = "scaleY", vs = "skewX", ys = "skewY", et = "fill", vt = "stroke", Xr = "modified", Ke = "json", Ci = "svg", k = new class {
148
+ const Te = Math.PI / 2, he = 2 * Math.PI, _n = Math.PI / 180, gt = Object.freeze([1, 0, 0, 1, 0, 0]), Tn = 16, me = 0.4477152502, j = "center", L = "left", pt = "top", Ni = "bottom", q = "right", mt = "none", xn = /\r?\n/, ja = "moving", ri = "scaling", Ia = "rotating", Sn = "rotate", Ea = "skewing", Xs = "resizing", Pa = "modifyPoly", Pl = "modifyPath", Wr = "changed", ii = "scale", ft = "scaleX", _t = "scaleY", vs = "skewX", ys = "skewY", st = "fill", vt = "stroke", Xr = "modified", Ke = "json", Ci = "svg", k = new class {
149
149
  constructor() {
150
150
  this[Ke] = /* @__PURE__ */ new Map(), this[Ci] = /* @__PURE__ */ new Map();
151
151
  }
@@ -512,7 +512,7 @@ class La extends Al {
512
512
  return this[t];
513
513
  }
514
514
  }
515
- function Is(i) {
515
+ function Es(i) {
516
516
  return Ks().requestAnimationFrame(i);
517
517
  }
518
518
  function Fa(i) {
@@ -781,7 +781,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
781
781
  this.nextRenderHandle = 0, this.renderAll();
782
782
  }
783
783
  requestRenderAll() {
784
- this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = Is(() => this.renderAndReset()));
784
+ this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = Es(() => this.renderAndReset()));
785
785
  }
786
786
  calcViewportBoundaries() {
787
787
  const t = this.width, e = this.height, s = bt(this.viewportTransform), r = lt({ x: 0, y: 0 }, s), n = lt({ x: t, y: e }, s), o = r.min(n), a = r.max(n);
@@ -1054,7 +1054,7 @@ const Bl = ["touchstart", "touchmove", "touchend"], Na = (i) => {
1054
1054
  }, $i = (i, t, e) => {
1055
1055
  const s = tr(t, e);
1056
1056
  return fs(i, $(s, i.calcOwnMatrix())), s;
1057
- }, En = (i, t) => {
1057
+ }, In = (i, t) => {
1058
1058
  var e;
1059
1059
  const { transform: { target: s } } = t;
1060
1060
  (e = s.canvas) === null || e === void 0 || e.fire("object:".concat(i), v(v({}, t), {}, { target: s })), s.fire(i, t);
@@ -1065,7 +1065,7 @@ function Ka(i) {
1065
1065
  function co(i) {
1066
1066
  return 0.5 - Z(i);
1067
1067
  }
1068
- const Pt = (i, t) => i[t], In = (i, t, e, s) => ({ e: i, transform: t, pointer: new _(e, s) });
1068
+ const Pt = (i, t) => i[t], En = (i, t, e, s) => ({ e: i, transform: t, pointer: new _(e, s) });
1069
1069
  function Ja(i, t) {
1070
1070
  const e = i.getTotalAngle() + Vt(Math.atan2(t.y, t.x)) + 360;
1071
1071
  return Math.round(e % 360 / 45);
@@ -1081,7 +1081,7 @@ function ci(i, t, e, s, r) {
1081
1081
  }
1082
1082
  const Za = (i, t, e, s) => {
1083
1083
  const { target: r, offsetX: n, offsetY: o } = t, a = e - n, c = s - o, h = !Pt(r, "lockMovementX") && r.left !== a, l = !Pt(r, "lockMovementY") && r.top !== c;
1084
- return h && r.set(L, a), l && r.set(pt, c), (h || l) && En(ja, In(i, t, e, s)), h || l;
1084
+ return h && r.set(L, a), l && r.set(pt, c), (h || l) && In(ja, En(i, t, e, s)), h || l;
1085
1085
  }, Vr = (i) => i.replace(/\s+/g, " "), ho = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#0FF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000", blanchedalmond: "#FFEBCD", blue: "#00F", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#0FF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgrey: "#A9A9A9", darkgreen: "#006400", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#F0F", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", grey: "#808080", green: "#008000", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgray: "#D3D3D3", lightgrey: "#D3D3D3", lightgreen: "#90EE90", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#0F0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#F0F", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", rebeccapurple: "#639", red: "#F00", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFF", whitesmoke: "#F5F5F5", yellow: "#FF0", yellowgreen: "#9ACD32" }, Oi = (i, t, e) => (e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? i + 6 * (t - i) * e : e < 0.5 ? t : e < 2 / 3 ? i + (t - i) * (2 / 3 - e) * 6 : i), lo = (i, t, e, s) => {
1086
1086
  i /= 255, t /= 255, e /= 255;
1087
1087
  const r = Math.max(i, t, e), n = Math.min(i, t, e);
@@ -1255,7 +1255,7 @@ const Fe = function(i) {
1255
1255
  };
1256
1256
  class tc {
1257
1257
  getSvgStyles(t) {
1258
- const e = this.fillRule ? this.fillRule : "nonzero", s = this.strokeWidth ? this.strokeWidth : "0", r = this.strokeDashArray ? this.strokeDashArray.join(" ") : mt, n = this.strokeDashOffset ? this.strokeDashOffset : "0", o = this.strokeLineCap ? this.strokeLineCap : "butt", a = this.strokeLineJoin ? this.strokeLineJoin : "miter", c = this.strokeMiterLimit ? this.strokeMiterLimit : "4", h = this.opacity !== void 0 ? this.opacity : "1", l = this.visible ? "" : " visibility: hidden;", u = t ? "" : this.getSvgFilter(), d = zs(et, this.fill);
1258
+ const e = this.fillRule ? this.fillRule : "nonzero", s = this.strokeWidth ? this.strokeWidth : "0", r = this.strokeDashArray ? this.strokeDashArray.join(" ") : mt, n = this.strokeDashOffset ? this.strokeDashOffset : "0", o = this.strokeLineCap ? this.strokeLineCap : "butt", a = this.strokeLineJoin ? this.strokeLineJoin : "miter", c = this.strokeMiterLimit ? this.strokeMiterLimit : "4", h = this.opacity !== void 0 ? this.opacity : "1", l = this.visible ? "" : " visibility: hidden;", u = t ? "" : this.getSvgFilter(), d = zs(st, this.fill);
1259
1259
  return [zs(vt, this.stroke), "stroke-width: ", s, "; ", "stroke-dasharray: ", r, "; ", "stroke-linecap: ", o, "; ", "stroke-dashoffset: ", n, "; ", "stroke-linejoin: ", a, "; ", "stroke-miterlimit: ", c, "; ", d, "fill-rule: ", e, "; ", "opacity: ", h, ";", u, l].join("");
1260
1260
  }
1261
1261
  getSvgFilter() {
@@ -1298,19 +1298,19 @@ class tc {
1298
1298
  `), s ? s(f.join("")) : f.join("");
1299
1299
  }
1300
1300
  addPaintOrder() {
1301
- return this.paintFirst !== et ? ' paint-order="'.concat(this.paintFirst, '" ') : "";
1301
+ return this.paintFirst !== st ? ' paint-order="'.concat(this.paintFirst, '" ') : "";
1302
1302
  }
1303
1303
  }
1304
1304
  function hi(i) {
1305
1305
  return new RegExp("^(" + i.join("|") + ")\\b", "i");
1306
1306
  }
1307
- const We = "textDecorationThickness", ec = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], sc = ["underline", "overline", "linethrough"], rc = [...ec, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], ic = [...rc, ...sc, "textBackgroundColor", "direction", We], zl = [...ec, ...sc, vt, "strokeWidth", et, "deltaY", "textBackgroundColor", We], Hl = { _reNewline: xn, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: "normal", fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: L, fontStyle: "normal", lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: L, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [We]: 66.667 }, Bt = "justify", Gr = "justify-left", As = "justify-right", Ls = "justify-center";
1307
+ const We = "textDecorationThickness", ec = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], sc = ["underline", "overline", "linethrough"], rc = [...ec, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], ic = [...rc, ...sc, "textBackgroundColor", "direction", We], zl = [...ec, ...sc, vt, "strokeWidth", st, "deltaY", "textBackgroundColor", We], Hl = { _reNewline: xn, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: "normal", fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: L, fontStyle: "normal", lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: L, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [We]: 66.667 }, Bt = "justify", Gr = "justify-left", As = "justify-right", Ls = "justify-center";
1308
1308
  var fo, po, mo;
1309
- const Et = String.raw(fo || (fo = Jt(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), ki = String.raw(po || (po = Jt(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), Yl = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + Et + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + Et + "))?\\s+(.*)"), Vl = { cx: L, x: L, r: "radius", cy: pt, y: pt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": We }, Mi = "font-size", Di = "clip-path";
1309
+ const It = String.raw(fo || (fo = Jt(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), ki = String.raw(po || (po = Jt(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), Yl = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + It + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + It + "))?\\s+(.*)"), Vl = { cx: L, x: L, r: "radius", cy: pt, y: pt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": We }, Mi = "font-size", Di = "clip-path";
1310
1310
  hi(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]);
1311
1311
  hi(["symbol", "image", "marker", "pattern", "view", "svg"]);
1312
1312
  const vo = hi(["symbol", "g", "a", "svg", "clipPath", "defs"]);
1313
- new RegExp(String.raw(mo || (mo = Jt(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), Et, ki, Et, ki, Et, ki, Et));
1313
+ new RegExp(String.raw(mo || (mo = Jt(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), It, ki, It, ki, It, ki, It));
1314
1314
  const Gl = new _(1, 0), nc = new _(), Pn = (i, t) => i.rotate(t), Nr = (i, t) => new _(t).subtract(i), Ur = (i) => i.distanceFrom(nc), $r = (i, t) => Math.atan2(cs(i, t), ac(i, t)), oc = (i) => $r(Gl, i), li = (i) => i.eq(nc) ? i : i.scalarDivide(Ur(i)), An = function(i) {
1315
1315
  let t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
1316
1316
  return li(new _(-i.y, i.x).scalarMultiply(t ? 1 : -1));
@@ -1318,7 +1318,7 @@ const Gl = new _(1, 0), nc = new _(), Pn = (i, t) => i.rotate(t), Nr = (i, t) =>
1318
1318
  if (i.eq(t) || i.eq(e)) return !0;
1319
1319
  const s = cs(t, e), r = cs(t, i), n = cs(e, i);
1320
1320
  return s >= 0 ? r >= 0 && n <= 0 : !(r <= 0 && n >= 0);
1321
- }, yo = "(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?", bo = new RegExp("(?:\\s|^)" + yo + yo + "(" + Et + "?(?:px)?)?(?:\\s?|$)(?:$|\\s)");
1321
+ }, yo = "(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?", bo = new RegExp("(?:\\s|^)" + yo + yo + "(" + It + "?(?:px)?)?(?:\\s?|$)(?:$|\\s)");
1322
1322
  class ae {
1323
1323
  constructor(t) {
1324
1324
  const e = typeof t == "string" ? ae.parseShadow(t) : t;
@@ -1355,7 +1355,7 @@ class ae {
1355
1355
  }
1356
1356
  }
1357
1357
  b(ae, "ownDefaults", { color: "rgb(0,0,0)", blur: 0, offsetX: 0, offsetY: 0, affectStroke: !1, includeDefaultValues: !0, nonScaling: !1 }), b(ae, "type", "shadow"), k.setClass(ae, "shadow");
1358
- const Xe = (i, t, e) => Math.max(i, Math.min(t, e)), Nl = [pt, L, ft, _t, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", vs, ys], le = [et, vt, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], Ul = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: L, originY: pt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: et, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, ji = (i, t, e, s) => (i < Math.abs(t) ? (i = t, s = e / 4) : s = t === 0 && i === 0 ? e / he * Math.asin(1) : e / he * Math.asin(t / i), { a: i, c: t, p: e, s }), _o = (i, t, e, s, r) => i * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * r - t) * he / e), cc = (i, t, e, s) => -e * Math.cos(i / s * Te) + e + t, Ki = (i, t, e, s) => (i /= s) < 1 / 2.75 ? e * (7.5625 * i * i) + t : i < 2 / 2.75 ? e * (7.5625 * (i -= 1.5 / 2.75) * i + 0.75) + t : i < 2.5 / 2.75 ? e * (7.5625 * (i -= 2.25 / 2.75) * i + 0.9375) + t : e * (7.5625 * (i -= 2.625 / 2.75) * i + 0.984375) + t, To = (i, t, e, s) => e - Ki(s - i, 0, e, s) + t;
1358
+ const Xe = (i, t, e) => Math.max(i, Math.min(t, e)), Nl = [pt, L, ft, _t, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", vs, ys], le = [st, vt, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], Ul = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: L, originY: pt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: st, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, ji = (i, t, e, s) => (i < Math.abs(t) ? (i = t, s = e / 4) : s = t === 0 && i === 0 ? e / he * Math.asin(1) : e / he * Math.asin(t / i), { a: i, c: t, p: e, s }), _o = (i, t, e, s, r) => i * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * r - t) * he / e), cc = (i, t, e, s) => -e * Math.cos(i / s * Te) + e + t, Ki = (i, t, e, s) => (i /= s) < 1 / 2.75 ? e * (7.5625 * i * i) + t : i < 2 / 2.75 ? e * (7.5625 * (i -= 1.5 / 2.75) * i + 0.75) + t : i < 2.5 / 2.75 ? e * (7.5625 * (i -= 2.25 / 2.75) * i + 0.9375) + t : e * (7.5625 * (i -= 2.625 / 2.75) * i + 0.984375) + t, To = (i, t, e, s) => e - Ki(s - i, 0, e, s) + t;
1359
1359
  var $l = Object.freeze({ __proto__: null, defaultEasing: cc, easeInBack: function(i, t, e, s) {
1360
1360
  let r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1.70158;
1361
1361
  return e * (i /= s) * i * ((r + 1) * i - r) + t;
@@ -1406,13 +1406,13 @@ class Ln {
1406
1406
  const t = (e) => {
1407
1407
  this._state === "pending" && (this.startTime = e || +/* @__PURE__ */ new Date(), this._state = "running", this._onStart(), this.tick(this.startTime));
1408
1408
  };
1409
- this.register(), this.delay > 0 ? setTimeout(() => Is(t), this.delay) : Is(t);
1409
+ this.register(), this.delay > 0 ? setTimeout(() => Es(t), this.delay) : Es(t);
1410
1410
  }
1411
1411
  tick(t) {
1412
1412
  const e = (t || +/* @__PURE__ */ new Date()) - this.startTime, s = Math.min(e, this.duration);
1413
1413
  this.durationProgress = s / this.duration;
1414
1414
  const { value: r, valueProgress: n } = this.calculate(s);
1415
- this.value = Object.freeze(r), this.valueProgress = n, this._state !== "aborted" && (this._abort(this.value, this.valueProgress, this.durationProgress) ? (this._state = "aborted", this.unregister()) : e >= this.duration ? (this.durationProgress = this.valueProgress = 1, this._onChange(this.endValue, this.valueProgress, this.durationProgress), this._state = "completed", this._onComplete(this.endValue, this.valueProgress, this.durationProgress), this.unregister()) : (this._onChange(this.value, this.valueProgress, this.durationProgress), Is(this.tick)));
1415
+ this.value = Object.freeze(r), this.valueProgress = n, this._state !== "aborted" && (this._abort(this.value, this.valueProgress, this.durationProgress) ? (this._state = "aborted", this.unregister()) : e >= this.duration ? (this.durationProgress = this.valueProgress = 1, this._onChange(this.endValue, this.valueProgress, this.durationProgress), this._state = "completed", this._onComplete(this.endValue, this.valueProgress, this.durationProgress), this.unregister()) : (this._onChange(this.value, this.valueProgress, this.durationProgress), Es(this.tick)));
1416
1416
  }
1417
1417
  register() {
1418
1418
  zr.push(this);
@@ -1446,12 +1446,12 @@ class Ql extends Ln {
1446
1446
  return { value: e, valueProgress: Math.abs((e[0] - this.startValue[0]) / this.byValue[0]) };
1447
1447
  }
1448
1448
  }
1449
- const tu = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], eu = (i, t, e, s) => t + e * (1 - Math.cos(i / s * Te)), Ei = (i) => i && ((t, e, s) => i(new F(t).toRgba(), e, s));
1449
+ const tu = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], eu = (i, t, e, s) => t + e * (1 - Math.cos(i / s * Te)), Ii = (i) => i && ((t, e, s) => i(new F(t).toRgba(), e, s));
1450
1450
  class su extends Ln {
1451
1451
  constructor(t) {
1452
1452
  let { startValue: e, endValue: s, easing: r = eu, onChange: n, onComplete: o, abort: a } = t, c = V(t, tu);
1453
1453
  const h = new F(e).getSource(), l = new F(s).getSource();
1454
- super(v(v({}, c), {}, { startValue: h, byValue: l.map((u, d) => u - h[d]), easing: r, onChange: Ei(n), onComplete: Ei(o), abort: Ei(a) }));
1454
+ super(v(v({}, c), {}, { startValue: h, byValue: l.map((u, d) => u - h[d]), easing: r, onChange: Ii(n), onComplete: Ii(o), abort: Ii(a) }));
1455
1455
  }
1456
1456
  calculate(t) {
1457
1457
  const [e, s, r, n] = this.startValue.map((a, c) => this.easing(t, a, this.byValue[c], this.duration, c)), o = [...[e, s, r].map(Math.round), Xe(0, n, 1)];
@@ -1747,7 +1747,7 @@ let Qt = class Fr extends ru {
1747
1747
  _limitCacheSize(t) {
1748
1748
  const e = t.width, s = t.height, r = P.maxCacheSideLimit, n = P.minCacheSideLimit;
1749
1749
  if (e <= r && s <= r && e * s <= P.perfLimitSizeTotal) return e < n && (t.width = n), s < n && (t.height = n), t;
1750
- const o = e / s, [a, c] = Es.limitDimsByArea(o), h = Xe(n, a, r), l = Xe(n, c, r);
1750
+ const o = e / s, [a, c] = Is.limitDimsByArea(o), h = Xe(n, a, r), l = Xe(n, c, r);
1751
1751
  return e > h && (t.zoomX /= e / h, t.width = h, t.capped = !0), s > l && (t.zoomY /= s / l, t.height = l, t.capped = !0), t;
1752
1752
  }
1753
1753
  _getCacheCanvasDimensions() {
@@ -2041,9 +2041,9 @@ let Qt = class Fr extends ru {
2041
2041
  toObject() {
2042
2042
  const t = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).concat(Fr.customProperties, this.constructor.customProperties || []);
2043
2043
  let e;
2044
- const s = P.NUM_FRACTION_DIGITS, { clipPath: r, fill: n, stroke: o, shadow: a, strokeDashArray: c, left: h, top: l, originX: u, originY: d, width: g, height: f, strokeWidth: p, strokeLineCap: m, strokeDashOffset: y, strokeLineJoin: T, strokeUniform: S, strokeMiterLimit: w, scaleX: C, scaleY: O, angle: D, flipX: M, flipY: I, opacity: tt, visible: rt, backgroundColor: X, fillRule: B, paintFirst: A, globalCompositeOperation: at, skewX: it, skewY: ct } = this;
2044
+ const s = P.NUM_FRACTION_DIGITS, { clipPath: r, fill: n, stroke: o, shadow: a, strokeDashArray: c, left: h, top: l, originX: u, originY: d, width: g, height: f, strokeWidth: p, strokeLineCap: m, strokeDashOffset: y, strokeLineJoin: T, strokeUniform: S, strokeMiterLimit: w, scaleX: C, scaleY: O, angle: D, flipX: M, flipY: E, opacity: tt, visible: it, backgroundColor: X, fillRule: B, paintFirst: A, globalCompositeOperation: at, skewX: nt, skewY: ct } = this;
2045
2045
  r && !r.excludeFromExport && (e = r.toObject(t.concat("inverted", "absolutePositioned")));
2046
- const z = (Zt) => W(Zt, s), Rt = v(v({}, Ve(this, t)), {}, { type: this.constructor.type, version: Gi, originX: u, originY: d, left: z(h), top: z(l), width: z(g), height: z(f), fill: io(n) ? n.toObject() : n, stroke: io(o) ? o.toObject() : o, strokeWidth: z(p), strokeDashArray: c && c.concat(), strokeLineCap: m, strokeDashOffset: y, strokeLineJoin: T, strokeUniform: S, strokeMiterLimit: z(w), scaleX: z(C), scaleY: z(O), angle: z(D), flipX: M, flipY: I, opacity: z(tt), shadow: a && a.toObject(), visible: rt, backgroundColor: X, fillRule: B, paintFirst: A, globalCompositeOperation: at, skewX: z(it), skewY: z(ct) }, e ? { clipPath: e } : null);
2046
+ const z = (Zt) => W(Zt, s), Rt = v(v({}, Ve(this, t)), {}, { type: this.constructor.type, version: Gi, originX: u, originY: d, left: z(h), top: z(l), width: z(g), height: z(f), fill: io(n) ? n.toObject() : n, stroke: io(o) ? o.toObject() : o, strokeWidth: z(p), strokeDashArray: c && c.concat(), strokeLineCap: m, strokeDashOffset: y, strokeLineJoin: T, strokeUniform: S, strokeMiterLimit: z(w), scaleX: z(C), scaleY: z(O), angle: z(D), flipX: M, flipY: E, opacity: z(tt), shadow: a && a.toObject(), visible: it, backgroundColor: X, fillRule: B, paintFirst: A, globalCompositeOperation: at, skewX: z(nt), skewY: z(ct) }, e ? { clipPath: e } : null);
2047
2047
  return this.includeDefaultValues ? Rt : this._removeDefaultValues(Rt);
2048
2048
  }
2049
2049
  toDatalessObject(t) {
@@ -2068,10 +2068,10 @@ let Qt = class Fr extends ru {
2068
2068
  return this._fromObject(t, e);
2069
2069
  }
2070
2070
  };
2071
- b(Qt, "stateProperties", Nl), b(Qt, "cacheProperties", le), b(Qt, "ownDefaults", Ul), b(Qt, "type", "FabricObject"), b(Qt, "colorProperties", [et, vt, "backgroundColor"]), b(Qt, "customProperties", []), k.setClass(Qt), k.setClass(Qt, "object");
2071
+ b(Qt, "stateProperties", Nl), b(Qt, "cacheProperties", le), b(Qt, "ownDefaults", Ul), b(Qt, "type", "FabricObject"), b(Qt, "colorProperties", [st, vt, "backgroundColor"]), b(Qt, "customProperties", []), k.setClass(Qt), k.setClass(Qt, "object");
2072
2072
  const Oe = (i, t, e) => (s, r, n, o) => {
2073
2073
  const a = t(s, r, n, o);
2074
- return a && En(i, v(v({}, In(s, r, n, o)), e)), a;
2074
+ return a && In(i, v(v({}, En(s, r, n, o)), e)), a;
2075
2075
  };
2076
2076
  function Ge(i) {
2077
2077
  return (t, e, s, r) => {
@@ -2089,13 +2089,13 @@ const Ji = Oe(Xs, Ge((i, t, e, s) => {
2089
2089
  }));
2090
2090
  function lc(i, t, e, s, r) {
2091
2091
  s = s || {};
2092
- const n = this.sizeX || s.cornerSize || r.cornerSize, o = this.sizeY || s.cornerSize || r.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : r.transparentCorners, c = a ? vt : et, h = !a && (s.cornerStrokeColor || r.cornerStrokeColor);
2092
+ const n = this.sizeX || s.cornerSize || r.cornerSize, o = this.sizeY || s.cornerSize || r.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : r.transparentCorners, c = a ? vt : st, h = !a && (s.cornerStrokeColor || r.cornerStrokeColor);
2093
2093
  let l, u = t, d = e;
2094
2094
  i.save(), i.fillStyle = s.cornerColor || r.cornerColor || "", i.strokeStyle = s.cornerStrokeColor || r.cornerStrokeColor || "", n > o ? (l = n, i.scale(1, o / n), d = e * n / o) : o > n ? (l = o, i.scale(n / o, 1), u = t * o / n) : l = n, i.beginPath(), i.arc(u, d, l / 2, 0, he, !1), i[c](), h && i.stroke(), i.restore();
2095
2095
  }
2096
2096
  function uc(i, t, e, s, r) {
2097
2097
  s = s || {};
2098
- const n = this.sizeX || s.cornerSize || r.cornerSize, o = this.sizeY || s.cornerSize || r.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : r.transparentCorners, c = a ? vt : et, h = !a && (s.cornerStrokeColor || r.cornerStrokeColor), l = n / 2, u = o / 2;
2098
+ const n = this.sizeX || s.cornerSize || r.cornerSize, o = this.sizeY || s.cornerSize || r.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : r.transparentCorners, c = a ? vt : st, h = !a && (s.cornerStrokeColor || r.cornerStrokeColor), l = n / 2, u = o / 2;
2099
2099
  i.save(), i.fillStyle = s.cornerColor || r.cornerColor || "", i.strokeStyle = s.cornerStrokeColor || r.cornerStrokeColor || "", i.translate(t, e);
2100
2100
  const d = r.getTotalAngle();
2101
2101
  i.rotate(U(d)), i["".concat(c, "Rect")](-l, -u, n, o), h && i.strokeRect(-l, -u, n, o), i.restore();
@@ -2142,7 +2142,7 @@ class N {
2142
2142
  ((r = r || {}).cornerStyle || n.cornerStyle) === "circle" ? lc.call(this, t, e, s, r, n) : uc.call(this, t, e, s, r, n);
2143
2143
  }
2144
2144
  }
2145
- const dc = (i, t, e) => e.lockRotation ? Yr : t.cursorStyle, gc = Oe(Ea, Ge((i, t, e, s) => {
2145
+ const dc = (i, t, e) => e.lockRotation ? Yr : t.cursorStyle, gc = Oe(Ia, Ge((i, t, e, s) => {
2146
2146
  let { target: r, ex: n, ey: o, theta: a, originX: c, originY: h } = t;
2147
2147
  const l = r.translateToOriginPoint(r.getRelativeCenterPoint(), c, h);
2148
2148
  if (Pt(r, "lockRotation")) return !1;
@@ -2189,18 +2189,18 @@ function Rn(i, t, e, s) {
2189
2189
  const f = n.scaleX, p = n.scaleY;
2190
2190
  return o ? (o === "x" && n.set(ft, h), o === "y" && n.set(_t, l)) : (!Pt(n, "lockScalingX") && n.set(ft, h), !Pt(n, "lockScalingY") && n.set(_t, l)), f !== n.scaleX || p !== n.scaleY;
2191
2191
  }
2192
- const ks = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s))), mc = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s, { by: "x" }))), vc = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s, { by: "y" }))), au = ["target", "ex", "ey", "skewingSide"], Ii = { x: { counterAxis: "y", scale: ft, skew: vs, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: _t, skew: ys, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, cu = ["ns", "nesw", "ew", "nwse"], yc = (i, t, e) => {
2192
+ const ks = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s))), mc = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s, { by: "x" }))), vc = Oe(ri, Ge((i, t, e, s) => Rn(i, t, e, s, { by: "y" }))), au = ["target", "ex", "ey", "skewingSide"], Ei = { x: { counterAxis: "y", scale: ft, skew: vs, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: _t, skew: ys, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, cu = ["ns", "nesw", "ew", "nwse"], yc = (i, t, e) => {
2193
2193
  if (t.x !== 0 && Pt(e, "lockSkewingY") || t.y !== 0 && Pt(e, "lockSkewingX")) return Yr;
2194
2194
  const s = Ja(e, t) % 4;
2195
2195
  return "".concat(cu[s], "-resize");
2196
2196
  };
2197
2197
  function bc(i, t, e, s, r) {
2198
- const { target: n } = e, { counterAxis: o, origin: a, lockSkewing: c, skew: h, flip: l } = Ii[i];
2198
+ const { target: n } = e, { counterAxis: o, origin: a, lockSkewing: c, skew: h, flip: l } = Ei[i];
2199
2199
  if (Pt(n, c)) return !1;
2200
- const { origin: u, flip: d } = Ii[o], g = Z(e[u]) * (n[d] ? -1 : 1), f = -Math.sign(g) * (n[l] ? -1 : 1), p = 0.5 * -((n[h] === 0 && ci(e, j, j, s, r)[i] > 0 || n[h] > 0 ? 1 : -1) * f) + 0.5;
2201
- return Oe(Ia, Ge((y, T, S, w) => function(C, O, D) {
2202
- let { target: M, ex: I, ey: tt, skewingSide: rt } = O, X = V(O, au);
2203
- const { skew: B } = Ii[C], A = D.subtract(new _(I, tt)).divide(new _(M.scaleX, M.scaleY))[C], at = M[B], it = X[B], ct = Math.tan(U(it)), z = C === "y" ? M._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : M._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, Rt = 2 * A * rt / Math.max(z, 1) + ct, Zt = Vt(Math.atan(Rt));
2200
+ const { origin: u, flip: d } = Ei[o], g = Z(e[u]) * (n[d] ? -1 : 1), f = -Math.sign(g) * (n[l] ? -1 : 1), p = 0.5 * -((n[h] === 0 && ci(e, j, j, s, r)[i] > 0 || n[h] > 0 ? 1 : -1) * f) + 0.5;
2201
+ return Oe(Ea, Ge((y, T, S, w) => function(C, O, D) {
2202
+ let { target: M, ex: E, ey: tt, skewingSide: it } = O, X = V(O, au);
2203
+ const { skew: B } = Ei[C], A = D.subtract(new _(E, tt)).divide(new _(M.scaleX, M.scaleY))[C], at = M[B], nt = X[B], ct = Math.tan(U(nt)), z = C === "y" ? M._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : M._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, Rt = 2 * A * it / Math.max(z, 1) + ct, Zt = Vt(Math.atan(Rt));
2204
2204
  M.set(B, Zt);
2205
2205
  const or = at !== M[B];
2206
2206
  if (or && C === "y") {
@@ -2217,7 +2217,7 @@ function ui(i, t) {
2217
2217
  const Ms = (i, t, e) => {
2218
2218
  const s = ui(i, e);
2219
2219
  return t.x === 0 ? s ? vs : _t : t.y === 0 ? s ? ys : ft : "";
2220
- }, Ie = (i, t, e) => ui(i, e) ? yc(0, t, e) : Ze(i, t, e), Zi = (i, t, e, s) => ui(i, t.target) ? Tc(i, t, e, s) : mc(i, t, e, s), Qi = (i, t, e, s) => ui(i, t.target) ? _c(i, t, e, s) : vc(i, t, e, s), Bn = () => ({ ml: new N({ x: -0.5, y: 0, cursorStyleHandler: Ie, actionHandler: Zi, getActionName: Ms }), mr: new N({ x: 0.5, y: 0, cursorStyleHandler: Ie, actionHandler: Zi, getActionName: Ms }), mb: new N({ x: 0, y: 0.5, cursorStyleHandler: Ie, actionHandler: Qi, getActionName: Ms }), mt: new N({ x: 0, y: -0.5, cursorStyleHandler: Ie, actionHandler: Qi, getActionName: Ms }), tl: new N({ x: -0.5, y: -0.5, cursorStyleHandler: Ze, actionHandler: ks }), tr: new N({ x: 0.5, y: -0.5, cursorStyleHandler: Ze, actionHandler: ks }), bl: new N({ x: -0.5, y: 0.5, cursorStyleHandler: Ze, actionHandler: ks }), br: new N({ x: 0.5, y: 0.5, cursorStyleHandler: Ze, actionHandler: ks }), mtr: new N({ x: 0, y: -0.5, actionHandler: gc, cursorStyleHandler: dc, offsetY: -40, withConnection: !0, actionName: Sn }) }), xc = () => ({ mr: new N({ x: 0.5, y: 0, actionHandler: Ji, cursorStyleHandler: Ie, actionName: Xs }), ml: new N({ x: -0.5, y: 0, actionHandler: Ji, cursorStyleHandler: Ie, actionName: Xs }) }), Sc = () => v(v({}, Bn()), xc());
2220
+ }, Ee = (i, t, e) => ui(i, e) ? yc(0, t, e) : Ze(i, t, e), Zi = (i, t, e, s) => ui(i, t.target) ? Tc(i, t, e, s) : mc(i, t, e, s), Qi = (i, t, e, s) => ui(i, t.target) ? _c(i, t, e, s) : vc(i, t, e, s), Bn = () => ({ ml: new N({ x: -0.5, y: 0, cursorStyleHandler: Ee, actionHandler: Zi, getActionName: Ms }), mr: new N({ x: 0.5, y: 0, cursorStyleHandler: Ee, actionHandler: Zi, getActionName: Ms }), mb: new N({ x: 0, y: 0.5, cursorStyleHandler: Ee, actionHandler: Qi, getActionName: Ms }), mt: new N({ x: 0, y: -0.5, cursorStyleHandler: Ee, actionHandler: Qi, getActionName: Ms }), tl: new N({ x: -0.5, y: -0.5, cursorStyleHandler: Ze, actionHandler: ks }), tr: new N({ x: 0.5, y: -0.5, cursorStyleHandler: Ze, actionHandler: ks }), bl: new N({ x: -0.5, y: 0.5, cursorStyleHandler: Ze, actionHandler: ks }), br: new N({ x: 0.5, y: 0.5, cursorStyleHandler: Ze, actionHandler: ks }), mtr: new N({ x: 0, y: -0.5, actionHandler: gc, cursorStyleHandler: dc, offsetY: -40, withConnection: !0, actionName: Sn }) }), xc = () => ({ mr: new N({ x: 0.5, y: 0, actionHandler: Ji, cursorStyleHandler: Ee, actionName: Xs }), ml: new N({ x: -0.5, y: 0, actionHandler: Ji, cursorStyleHandler: Ee, actionName: Xs }) }), Sc = () => v(v({}, Bn()), xc());
2221
2221
  class Hs extends Qt {
2222
2222
  static getDefaults() {
2223
2223
  return v(v({}, super.getDefaults()), Hs.ownDefaults);
@@ -2580,7 +2580,7 @@ const gi = function(i, t) {
2580
2580
  for (let c = 0; c < a.length; c++) r++, i[n] && i[n].start <= r && r < i[n].end && (s[o] = s[o] || {}, s[o][c] = v({}, i[n].style), r === i[n].end - 1 && n++);
2581
2581
  }
2582
2582
  return s;
2583
- }, ke = ["display", "transform", et, "fill-opacity", "fill-rule", "opacity", vt, "stroke-dasharray", "stroke-linecap", "stroke-dashoffset", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "id", "paint-order", "vector-effect", "instantiated_by_use", "clip-path"];
2583
+ }, ke = ["display", "transform", st, "fill-opacity", "fill-rule", "opacity", vt, "stroke-dasharray", "stroke-linecap", "stroke-dashoffset", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "id", "paint-order", "vector-effect", "instantiated_by_use", "clip-path"];
2584
2584
  function So(i, t) {
2585
2585
  const e = i.nodeName, s = i.getAttribute("class"), r = i.getAttribute("id"), n = "(?![a-zA-Z\\-]+)";
2586
2586
  let o;
@@ -2602,9 +2602,9 @@ function gu(i, t) {
2602
2602
  const fu = (i) => {
2603
2603
  var t;
2604
2604
  return (t = Vl[i]) !== null && t !== void 0 ? t : i;
2605
- }, pu = new RegExp("(".concat(Et, ")"), "gi"), mu = (i) => Vr(i.replace(pu, " $1 ").replace(/,/gi, " "));
2605
+ }, pu = new RegExp("(".concat(It, ")"), "gi"), mu = (i) => Vr(i.replace(pu, " $1 ").replace(/,/gi, " "));
2606
2606
  var wo, Co, Oo, ko, Mo, Do, jo;
2607
- const dt = "(".concat(Et, ")"), vu = String.raw(wo || (wo = Jt(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), dt), yu = String.raw(Co || (Co = Jt(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), dt), bu = String.raw(Oo || (Oo = Jt(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), dt, dt, dt), _u = String.raw(ko || (ko = Jt(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), dt, dt), Tu = String.raw(Mo || (Mo = Jt(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), dt, dt), xu = String.raw(Do || (Do = Jt(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), dt, dt, dt, dt, dt, dt), Xn = "(?:".concat(xu, "|").concat(Tu, "|").concat(bu, "|").concat(_u, "|").concat(vu, "|").concat(yu, ")"), Su = "(?:".concat(Xn, "*)"), wu = String.raw(jo || (jo = Jt(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), Su), Cu = new RegExp(wu), Ou = new RegExp(Xn), ku = new RegExp(Xn, "g");
2607
+ const dt = "(".concat(It, ")"), vu = String.raw(wo || (wo = Jt(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), dt), yu = String.raw(Co || (Co = Jt(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), dt), bu = String.raw(Oo || (Oo = Jt(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), dt, dt, dt), _u = String.raw(ko || (ko = Jt(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), dt, dt), Tu = String.raw(Mo || (Mo = Jt(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), dt, dt), xu = String.raw(Do || (Do = Jt(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), dt, dt, dt, dt, dt, dt), Xn = "(?:".concat(xu, "|").concat(Tu, "|").concat(bu, "|").concat(_u, "|").concat(vu, "|").concat(yu, ")"), Su = "(?:".concat(Xn, "*)"), wu = String.raw(jo || (jo = Jt(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), Su), Cu = new RegExp(wu), Ou = new RegExp(Xn), ku = new RegExp(Xn, "g");
2608
2608
  function tn(i) {
2609
2609
  const t = [];
2610
2610
  if (!(i = mu(i).replace(/\s*([()])\s*/gi, "$1")) || i && !Cu.test(i)) return [...gt];
@@ -2639,7 +2639,7 @@ function tn(i) {
2639
2639
  function Mu(i, t, e, s) {
2640
2640
  const r = Array.isArray(t);
2641
2641
  let n, o = t;
2642
- if (i !== et && i !== vt || t !== mt) {
2642
+ if (i !== st && i !== vt || t !== mt) {
2643
2643
  if (i === "strokeUniform") return t === "non-scaling-stroke";
2644
2644
  if (i === "strokeDashArray") o = t === mt ? null : t.replace(/,/g, " ").split(/\s+/).map(parseFloat);
2645
2645
  else if (i === "transformMatrix") o = e && e.transformMatrix ? $(e.transformMatrix, tn(t)) : tn(t);
@@ -2648,8 +2648,8 @@ function Mu(i, t, e, s) {
2648
2648
  else if (i === "textAnchor") o = t === "start" ? L : t === "end" ? q : j;
2649
2649
  else if (i === "charSpacing" || i === We) n = Fe(t, s) / s * 1e3;
2650
2650
  else if (i === "paintFirst") {
2651
- const a = t.indexOf(et), c = t.indexOf(vt);
2652
- o = et, (a > -1 && c > -1 && c < a || a === -1 && c > -1) && (o = vt);
2651
+ const a = t.indexOf(st), c = t.indexOf(vt);
2652
+ o = st, (a > -1 && c > -1 && c < a || a === -1 && c > -1) && (o = vt);
2653
2653
  } else {
2654
2654
  if (i === "href" || i === "xlink:href" || i === "font" || i === "id") return t;
2655
2655
  if (i === "imageSmoothing") return t === "optimizeQuality";
@@ -2671,7 +2671,7 @@ function ju(i, t) {
2671
2671
  t[s.trim().toLowerCase()] = r.trim();
2672
2672
  });
2673
2673
  }
2674
- function Eu(i) {
2674
+ function Iu(i) {
2675
2675
  const t = {}, e = i.getAttribute("style");
2676
2676
  return e && (typeof e == "string" ? ju(e, t) : function(s, r) {
2677
2677
  Object.entries(s).forEach((n) => {
@@ -2680,7 +2680,7 @@ function Eu(i) {
2680
2680
  });
2681
2681
  }(e, t)), t;
2682
2682
  }
2683
- const Iu = { stroke: "strokeOpacity", fill: "fillOpacity" };
2683
+ const Eu = { stroke: "strokeOpacity", fill: "fillOpacity" };
2684
2684
  function ue(i, t, e) {
2685
2685
  if (!i) return {};
2686
2686
  let s, r = {}, n = Tn;
@@ -2692,7 +2692,7 @@ function ue(i, t, e) {
2692
2692
  let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = {};
2693
2693
  for (const d in l) gu(h, d.split(" ")) && (u = v(v({}, u), l[d]));
2694
2694
  return u;
2695
- }(i, e)), Eu(i));
2695
+ }(i, e)), Iu(i));
2696
2696
  o[Di] && i.setAttribute(Di, o[Di]), o[Mi] && (s = Fe(o[Mi], n), o[Mi] = "".concat(s));
2697
2697
  const a = {};
2698
2698
  for (const h in o) {
@@ -2703,7 +2703,7 @@ function ue(i, t, e) {
2703
2703
  const c = v(v({}, r), a);
2704
2704
  return vo.test(i.nodeName) ? c : function(h) {
2705
2705
  const l = ht.getDefaults();
2706
- return Object.entries(Iu).forEach((u) => {
2706
+ return Object.entries(Eu).forEach((u) => {
2707
2707
  let [d, g] = u;
2708
2708
  if (h[g] === void 0 || h[d] === "") return;
2709
2709
  if (h[d] === void 0) {
@@ -2716,7 +2716,7 @@ function ue(i, t, e) {
2716
2716
  }), h;
2717
2717
  }(c);
2718
2718
  }
2719
- const Pu = ["left", "top", "width", "height", "visible"], Ec = ["rx", "ry"];
2719
+ const Pu = ["left", "top", "width", "height", "visible"], Ic = ["rx", "ry"];
2720
2720
  class Q extends ht {
2721
2721
  static getDefaults() {
2722
2722
  return v(v({}, super.getDefaults()), Q.ownDefaults);
@@ -2734,7 +2734,7 @@ class Q extends ht {
2734
2734
  }
2735
2735
  toObject() {
2736
2736
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
2737
- return super.toObject([...Ec, ...t]);
2737
+ return super.toObject([...Ic, ...t]);
2738
2738
  }
2739
2739
  _toSVG() {
2740
2740
  const { width: t, height: e, rx: s, ry: r } = this;
@@ -2746,8 +2746,8 @@ class Q extends ht {
2746
2746
  return new this(v(v(v({}, e), l), {}, { left: n, top: o, width: a, height: c, visible: !!(h && a && c) }));
2747
2747
  }
2748
2748
  }
2749
- b(Q, "type", "Rect"), b(Q, "cacheProperties", [...le, ...Ec]), b(Q, "ownDefaults", { rx: 0, ry: 0 }), b(Q, "ATTRIBUTE_NAMES", [...ke, "x", "y", "rx", "ry", "width", "height"]), k.setClass(Q), k.setSVGClass(Q);
2750
- const re = "initialization", qr = "added", zn = "removed", Kr = "imperative", Ic = (i, t) => {
2749
+ b(Q, "type", "Rect"), b(Q, "cacheProperties", [...le, ...Ic]), b(Q, "ownDefaults", { rx: 0, ry: 0 }), b(Q, "ATTRIBUTE_NAMES", [...ke, "x", "y", "rx", "ry", "width", "height"]), k.setClass(Q), k.setSVGClass(Q);
2750
+ const re = "initialization", qr = "added", zn = "removed", Kr = "imperative", Ec = (i, t) => {
2751
2751
  const { strokeUniform: e, strokeWidth: s, width: r, height: n, group: o } = t, a = o && o !== i ? tr(o.calcTransformMatrix(), i.calcTransformMatrix()) : null, c = a ? t.getRelativeCenterPoint().transform(a) : t.getRelativeCenterPoint(), h = !t.isStrokeAccountedForInDimensions(), l = e && h ? qa(new _(s, s), void 0, i.calcTransformMatrix()) : wn, u = !e && h ? s : 0, d = ai(r + u, n + u, ni([a, t.calcOwnMatrix()], !0)).add(l).scalarDivide(2);
2752
2752
  return [c.subtract(d), c.add(d)];
2753
2753
  };
@@ -2770,7 +2770,7 @@ class fi {
2770
2770
  const { type: s, target: r } = e;
2771
2771
  if (s === Kr && e.overrides) return e.overrides;
2772
2772
  if (t.length === 0) return;
2773
- const { left: n, top: o, width: a, height: c } = Xt(t.map((u) => Ic(r, u)).reduce((u, d) => u.concat(d), [])), h = new _(a, c), l = new _(n, o).add(h.scalarDivide(2));
2773
+ const { left: n, top: o, width: a, height: c } = Xt(t.map((u) => Ec(r, u)).reduce((u, d) => u.concat(d), [])), h = new _(a, c), l = new _(n, o).add(h.scalarDivide(2));
2774
2774
  if (s === re) {
2775
2775
  const u = this.getInitialSize(e, { size: h, center: l });
2776
2776
  return { center: l, relativeCorrection: new _(0, 0), size: u };
@@ -2801,7 +2801,7 @@ class Ys {
2801
2801
  }
2802
2802
  attachHandlers(t, e) {
2803
2803
  const { target: s } = e;
2804
- return [Xr, ja, Xs, Ea, ri, Ia, Wr, Pa, Pl].map((r) => t.on(r, (n) => this.performLayout(r === Xr ? { type: "object_modified", trigger: r, e: n, target: s } : { type: "object_modifying", trigger: r, e: n, target: s })));
2804
+ return [Xr, ja, Xs, Ia, ri, Ea, Wr, Pa, Pl].map((r) => t.on(r, (n) => this.performLayout(r === Xr ? { type: "object_modified", trigger: r, e: n, target: s } : { type: "object_modifying", trigger: r, e: n, target: s })));
2805
2805
  }
2806
2806
  subscribe(t, e) {
2807
2807
  this.unsubscribe(t, e);
@@ -3051,23 +3051,23 @@ class zt extends Aa(ht) {
3051
3051
  }
3052
3052
  }
3053
3053
  b(zt, "type", "Group"), b(zt, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), k.setClass(zt);
3054
- const Ac = (i, t) => Math.min(t.width / i.width, t.height / i.height), Lc = (i, t) => Math.max(t.width / i.width, t.height / i.height), sn = "\\s*,?\\s*", Cs = "".concat(sn, "(").concat(Et, ")"), Bu = "".concat(Cs).concat(Cs).concat(Cs).concat(sn, "([01])").concat(sn, "([01])").concat(Cs).concat(Cs), Wu = { m: "l", M: "L" }, Xu = (i, t, e, s, r, n, o, a, c, h, l) => {
3054
+ const Ac = (i, t) => Math.min(t.width / i.width, t.height / i.height), Lc = (i, t) => Math.max(t.width / i.width, t.height / i.height), sn = "\\s*,?\\s*", Cs = "".concat(sn, "(").concat(It, ")"), Bu = "".concat(Cs).concat(Cs).concat(Cs).concat(sn, "([01])").concat(sn, "([01])").concat(Cs).concat(Cs), Wu = { m: "l", M: "L" }, Xu = (i, t, e, s, r, n, o, a, c, h, l) => {
3055
3055
  const u = At(i), d = Lt(i), g = At(t), f = Lt(t), p = e * r * g - s * n * f + o, m = s * r * g + e * n * f + a;
3056
3056
  return ["C", h + c * (-e * r * d - s * n * u), l + c * (-s * r * d + e * n * u), p + c * (e * r * f + s * n * g), m + c * (s * r * f - e * n * g), p, m];
3057
- }, Eo = (i, t, e, s) => {
3057
+ }, Io = (i, t, e, s) => {
3058
3058
  const r = Math.atan2(t, i), n = Math.atan2(s, e);
3059
3059
  return n >= r ? n - r : 2 * Math.PI - (r - n);
3060
3060
  };
3061
3061
  function rn(i, t, e, s, r, n, o, a) {
3062
3062
  let c;
3063
- if (P.cachesBoundsOfCurve && (c = [...arguments].join(), Es.boundsOfCurveCache[c])) return Es.boundsOfCurveCache[c];
3063
+ if (P.cachesBoundsOfCurve && (c = [...arguments].join(), Is.boundsOfCurveCache[c])) return Is.boundsOfCurveCache[c];
3064
3064
  const h = Math.sqrt, l = Math.abs, u = [], d = [[0, 0], [0, 0]];
3065
3065
  let g = 6 * i - 12 * e + 6 * r, f = -3 * i + 9 * e - 9 * r + 3 * o, p = 3 * e - 3 * i;
3066
3066
  for (let w = 0; w < 2; ++w) {
3067
3067
  if (w > 0 && (g = 6 * t - 12 * s + 6 * n, f = -3 * t + 9 * s - 9 * n + 3 * a, p = 3 * s - 3 * t), l(f) < 1e-12) {
3068
3068
  if (l(g) < 1e-12) continue;
3069
- const I = -p / g;
3070
- 0 < I && I < 1 && u.push(I);
3069
+ const E = -p / g;
3070
+ 0 < E && E < 1 && u.push(E);
3071
3071
  continue;
3072
3072
  }
3073
3073
  const C = g * g - 4 * p * f;
@@ -3085,25 +3085,25 @@ function rn(i, t, e, s, r, n, o, a) {
3085
3085
  }
3086
3086
  d[0][y] = i, d[1][y] = t, d[0][y + 1] = o, d[1][y + 1] = a;
3087
3087
  const S = [new _(Math.min(...d[0]), Math.min(...d[1])), new _(Math.max(...d[0]), Math.max(...d[1]))];
3088
- return P.cachesBoundsOfCurve && (Es.boundsOfCurveCache[c] = S), S;
3088
+ return P.cachesBoundsOfCurve && (Is.boundsOfCurveCache[c] = S), S;
3089
3089
  }
3090
3090
  const zu = (i, t, e) => {
3091
3091
  let [s, r, n, o, a, c, h, l] = e;
3092
3092
  const u = ((d, g, f, p, m, y, T) => {
3093
3093
  if (f === 0 || p === 0) return [];
3094
3094
  let S = 0, w = 0, C = 0;
3095
- const O = Math.PI, D = T * _n, M = Lt(D), I = At(D), tt = 0.5 * (-I * d - M * g), rt = 0.5 * (-I * g + M * d), X = f ** 2, B = p ** 2, A = rt ** 2, at = tt ** 2, it = X * B - X * A - B * at;
3095
+ const O = Math.PI, D = T * _n, M = Lt(D), E = At(D), tt = 0.5 * (-E * d - M * g), it = 0.5 * (-E * g + M * d), X = f ** 2, B = p ** 2, A = it ** 2, at = tt ** 2, nt = X * B - X * A - B * at;
3096
3096
  let ct = Math.abs(f), z = Math.abs(p);
3097
- if (it < 0) {
3098
- const pe = Math.sqrt(1 - it / (X * B));
3097
+ if (nt < 0) {
3098
+ const pe = Math.sqrt(1 - nt / (X * B));
3099
3099
  ct *= pe, z *= pe;
3100
- } else C = (m === y ? -1 : 1) * Math.sqrt(it / (X * A + B * at));
3101
- const Rt = C * ct * rt / z, Zt = -C * z * tt / ct, or = I * Rt - M * Zt + 0.5 * d, Si = M * Rt + I * Zt + 0.5 * g;
3102
- let xs = Eo(1, 0, (tt - Rt) / ct, (rt - Zt) / z), fe = Eo((tt - Rt) / ct, (rt - Zt) / z, (-tt - Rt) / ct, (-rt - Zt) / z);
3100
+ } else C = (m === y ? -1 : 1) * Math.sqrt(nt / (X * A + B * at));
3101
+ const Rt = C * ct * it / z, Zt = -C * z * tt / ct, or = E * Rt - M * Zt + 0.5 * d, Si = M * Rt + E * Zt + 0.5 * g;
3102
+ let xs = Io(1, 0, (tt - Rt) / ct, (it - Zt) / z), fe = Io((tt - Rt) / ct, (it - Zt) / z, (-tt - Rt) / ct, (-it - Zt) / z);
3103
3103
  y === 0 && fe > 0 ? fe -= 2 * O : y === 1 && fe < 0 && (fe += 2 * O);
3104
3104
  const ar = Math.ceil(Math.abs(fe / O * 2)), Me = [], Ss = fe / ar, kl = 8 / 3 * Math.sin(Ss / 4) * Math.sin(Ss / 4) / Math.sin(Ss / 2);
3105
3105
  let wi = xs + Ss;
3106
- for (let pe = 0; pe < ar; pe++) Me[pe] = Xu(xs, wi, I, M, ct, z, or, Si, kl, S, w), S = Me[pe][5], w = Me[pe][6], xs = wi, wi += Ss;
3106
+ for (let pe = 0; pe < ar; pe++) Me[pe] = Xu(xs, wi, E, M, ct, z, or, Si, kl, S, w), S = Me[pe][5], w = Me[pe][6], xs = wi, wi += Ss;
3107
3107
  return Me;
3108
3108
  })(h - i, l - t, r, n, a, c, o);
3109
3109
  for (let d = 0, g = u.length; d < g; d++) u[d][1] += i, u[d][2] += t, u[d][3] += i, u[d][4] += t, u[d][5] += i, u[d][6] += t;
@@ -3180,7 +3180,7 @@ const zu = (i, t, e) => {
3180
3180
  }, Vu = (i, t, e, s, r, n) => (o) => {
3181
3181
  const a = 1 - o, c = 2 * (a * (e - i) + o * (r - e)), h = 2 * (a * (s - t) + o * (n - s));
3182
3182
  return Math.atan2(h, c);
3183
- }, Io = (i, t, e) => {
3183
+ }, Eo = (i, t, e) => {
3184
3184
  let s = new _(t, e), r = 0;
3185
3185
  for (let n = 1; n <= 100; n += 1) {
3186
3186
  const o = i(n / 100);
@@ -3205,10 +3205,10 @@ const zu = (i, t, e) => {
3205
3205
  e = l, e.length = Jr(r, n, h[1], h[2]), r = h[1], n = h[2];
3206
3206
  break;
3207
3207
  case "C":
3208
- t = Rc(r, n, h[1], h[2], h[3], h[4], h[5], h[6]), e = l, e.iterator = t, e.angleFinder = Hu(r, n, h[1], h[2], h[3], h[4], h[5], h[6]), e.length = Io(t, r, n), r = h[5], n = h[6];
3208
+ t = Rc(r, n, h[1], h[2], h[3], h[4], h[5], h[6]), e = l, e.iterator = t, e.angleFinder = Hu(r, n, h[1], h[2], h[3], h[4], h[5], h[6]), e.length = Eo(t, r, n), r = h[5], n = h[6];
3209
3209
  break;
3210
3210
  case "Q":
3211
- t = Yu(r, n, h[1], h[2], h[3], h[4]), e = l, e.iterator = t, e.angleFinder = Vu(r, n, h[1], h[2], h[3], h[4]), e.length = Io(t, r, n), r = h[3], n = h[4];
3211
+ t = Yu(r, n, h[1], h[2], h[3], h[4]), e = l, e.iterator = t, e.angleFinder = Vu(r, n, h[1], h[2], h[3], h[4]), e.length = Eo(t, r, n), r = h[3], n = h[4];
3212
3212
  break;
3213
3213
  case "Z":
3214
3214
  e = l, e.destX = o, e.destY = a, e.length = Jr(r, n, o, a), r = o, n = a;
@@ -3231,7 +3231,7 @@ const zu = (i, t, e) => {
3231
3231
  case "Q":
3232
3232
  return Gu(r, t);
3233
3233
  }
3234
- }, Nu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), Po = new RegExp(Bu, "g"), Uu = new RegExp(Et, "gi"), $u = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7 }, Hc = (i) => {
3234
+ }, Nu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), Po = new RegExp(Bu, "g"), Uu = new RegExp(It, "gi"), $u = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7 }, Hc = (i) => {
3235
3235
  var t;
3236
3236
  const e = [], s = (t = i.match(Nu)) !== null && t !== void 0 ? t : [];
3237
3237
  for (const r of s) {
@@ -3330,7 +3330,7 @@ var Yn = Object.freeze({ __proto__: null, addTransformToObject: Ua, animate: Fn,
3330
3330
  }, multiplyTransformMatrices: $, multiplyTransformMatrixArray: ni, parsePath: Hc, parsePreserveAspectRatioAttribute: Qa, parseUnit: Fe, pick: Ve, projectStrokeOnPoints: kc, qrDecompose: us, radiansToDegrees: Vt, removeFromArray: De, removeTransformFromObject: (i, t) => {
3331
3331
  const e = bt(t), s = $(e, i.calcOwnMatrix());
3332
3332
  fs(i, s);
3333
- }, removeTransformMatrixForSvgParsing: Zu, request: Ju, requestAnimFrame: Is, resetObjectTransform: $a, rotatePoint: (i, t, e) => i.rotate(e, t), rotateVector: Pn, saveObjectTransform: jn, sendObjectToPlane: $i, sendPointToPlane: oe, sendVectorToPlane: qa, setStyle: Zr, sin: Lt, sizeAfterTransform: ai, string: du, stylesFromArray: jc, stylesToArray: Dc, toBlob: On, toDataURL: Cn, toFixed: W, transformPath: (i, t, e) => (e && (t = $(t, [1, 0, 0, 1, -e.x, -e.y])), i.map((s) => {
3333
+ }, removeTransformMatrixForSvgParsing: Zu, request: Ju, requestAnimFrame: Es, resetObjectTransform: $a, rotatePoint: (i, t, e) => i.rotate(e, t), rotateVector: Pn, saveObjectTransform: jn, sendObjectToPlane: $i, sendPointToPlane: oe, sendVectorToPlane: qa, setStyle: Zr, sin: Lt, sizeAfterTransform: ai, string: du, stylesFromArray: jc, stylesToArray: Dc, toBlob: On, toDataURL: Cn, toFixed: W, transformPath: (i, t, e) => (e && (t = $(t, [1, 0, 0, 1, -e.x, -e.y])), i.map((s) => {
3334
3334
  const r = [...s];
3335
3335
  for (let n = 1; n < s.length - 1; n += 2) {
3336
3336
  const { x: o, y: a } = lt({ x: s[n], y: s[n + 1] }, t);
@@ -3982,6 +3982,13 @@ class nn extends pi {
3982
3982
  }
3983
3983
  return this._groupSelector = null, !0;
3984
3984
  }
3985
+ toCanvasElement() {
3986
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, e = arguments.length > 1 ? arguments[1] : void 0;
3987
+ const { upper: s } = this.elements;
3988
+ s.ctx = void 0;
3989
+ const r = super.toCanvasElement(t, e);
3990
+ return s.ctx = s.el.getContext("2d"), r;
3991
+ }
3985
3992
  clear() {
3986
3993
  this.textEditingManager.clear(), super.clear();
3987
3994
  }
@@ -4151,10 +4158,10 @@ class Pi {
4151
4158
  }
4152
4159
  b(Pi, "type", "Pattern"), k.setClass(Pi), k.setClass(Pi, "pattern");
4153
4160
  const ld = ["path", "left", "top"], ud = ["d"];
4154
- class Ee extends ht {
4161
+ class Ie extends ht {
4155
4162
  constructor(t) {
4156
4163
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: r, top: n } = e, o = V(e, ld);
4157
- super(), Object.assign(this, Ee.ownDefaults), this.setOptions(o), this._setPath(t || [], !0), typeof r == "number" && this.set(L, r), typeof n == "number" && this.set(pt, n);
4164
+ super(), Object.assign(this, Ie.ownDefaults), this.setOptions(o), this._setPath(t || [], !0), typeof r == "number" && this.set(L, r), typeof n == "number" && this.set(pt, n);
4158
4165
  }
4159
4166
  _setPath(t, e) {
4160
4167
  this.path = Fc(Array.isArray(t) ? t : Hc(t)), this.setBoundingBox(e);
@@ -4258,7 +4265,7 @@ class Ee extends ht {
4258
4265
  return new this(n, v(v(v({}, V(r, ud)), e), {}, { left: void 0, top: void 0 }));
4259
4266
  }
4260
4267
  }
4261
- b(Ee, "type", "Path"), b(Ee, "cacheProperties", [...le, "path", "fillRule"]), b(Ee, "ATTRIBUTE_NAMES", [...ke, "d"]), k.setClass(Ee), k.setSVGClass(Ee);
4268
+ b(Ie, "type", "Path"), b(Ie, "cacheProperties", [...le, "path", "fillRule"]), b(Ie, "ATTRIBUTE_NAMES", [...ke, "d"]), k.setClass(Ie), k.setSVGClass(Ie);
4262
4269
  const dd = ["left", "top", "radius"], qc = ["radius", "startAngle", "endAngle", "counterClockwise"];
4263
4270
  class te extends ht {
4264
4271
  static getDefaults() {
@@ -4612,7 +4619,7 @@ const vd = / +/g, yd = /"/g;
4612
4619
  function Ai(i, t, e, s, r) {
4613
4620
  return " ".concat(function(n, o) {
4614
4621
  let { left: a, top: c, width: h, height: l } = o, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : P.NUM_FRACTION_DIGITS;
4615
- const d = zs(et, n, !1), [g, f, p, m] = [a, c, h, l].map((y) => W(y, u));
4622
+ const d = zs(st, n, !1), [g, f, p, m] = [a, c, h, l].map((y) => W(y, u));
4616
4623
  return "<rect ".concat(d, ' x="').concat(g, '" y="').concat(f, '" width="').concat(p, '" height="').concat(m, '"></rect>');
4617
4624
  }(i, { left: t, top: e, width: s, height: r }), `
4618
4625
  `);
@@ -4719,7 +4726,7 @@ class ut extends Zc {
4719
4726
  t.fillStyle = e, this._removeShadow(t);
4720
4727
  }
4721
4728
  _measureChar(t, e, s, r) {
4722
- const n = Es.getFontCache(e), o = this._getFontDeclaration(e), a = s + t, c = s && o === this._getFontDeclaration(r), h = e.fontSize / this.CACHE_FONT_SIZE;
4729
+ const n = Is.getFontCache(e), o = this._getFontDeclaration(e), a = s ? s + t : t, c = s && o === this._getFontDeclaration(r), h = e.fontSize / this.CACHE_FONT_SIZE;
4723
4730
  let l, u, d, g;
4724
4731
  if (s && n.has(s) && (d = n.get(s)), n.has(t) && (g = l = n.get(t)), c && n.has(a) && (u = n.get(a), g = u - d), l === void 0 || d === void 0 || u === void 0) {
4725
4732
  const f = function() {
@@ -4806,7 +4813,7 @@ class ut extends Zc {
4806
4813
  t.restore();
4807
4814
  }
4808
4815
  _renderTextFill(t) {
4809
- (this.fill || this.styleHas(et)) && this._renderTextCommon(t, "fillText");
4816
+ (this.fill || this.styleHas(st)) && this._renderTextCommon(t, "fillText");
4810
4817
  }
4811
4818
  _renderTextStroke(t) {
4812
4819
  (this.stroke && this.strokeWidth !== 0 || !this.isEmptyStyles()) && (this.shadow && !this.shadow.affectStroke && this._removeShadow(t), t.save(), this._setLineDash(t, this.strokeDashArray), t.beginPath(), this._renderTextCommon(t, "strokeText"), t.closePath(), t.restore());
@@ -4889,26 +4896,26 @@ class ut extends Zc {
4889
4896
  continue;
4890
4897
  }
4891
4898
  const d = this._textLines[h], g = u / this.lineHeight, f = this._getLineLeftOffset(h);
4892
- let p = 0, m = 0, y = this.getValueOfPropertyAt(h, 0, e), T = this.getValueOfPropertyAt(h, 0, et), S = this.getValueOfPropertyAt(h, 0, We), w = y, C = T, O = S;
4899
+ let p = 0, m = 0, y = this.getValueOfPropertyAt(h, 0, e), T = this.getValueOfPropertyAt(h, 0, st), S = this.getValueOfPropertyAt(h, 0, We), w = y, C = T, O = S;
4893
4900
  const D = s + g * (1 - this._fontSizeFraction);
4894
- let M = this.getHeightOfChar(h, 0), I = this.getValueOfPropertyAt(h, 0, "deltaY");
4901
+ let M = this.getHeightOfChar(h, 0), E = this.getValueOfPropertyAt(h, 0, "deltaY");
4895
4902
  for (let X = 0, B = d.length; X < B; X++) {
4896
4903
  const A = this.__charBounds[h][X];
4897
- w = this.getValueOfPropertyAt(h, X, e), C = this.getValueOfPropertyAt(h, X, et), O = this.getValueOfPropertyAt(h, X, We);
4898
- const at = this.getHeightOfChar(h, X), it = this.getValueOfPropertyAt(h, X, "deltaY");
4904
+ w = this.getValueOfPropertyAt(h, X, e), C = this.getValueOfPropertyAt(h, X, st), O = this.getValueOfPropertyAt(h, X, We);
4905
+ const at = this.getHeightOfChar(h, X), nt = this.getValueOfPropertyAt(h, X, "deltaY");
4899
4906
  if (n && w && C) {
4900
4907
  const ct = this.fontSize * O / 1e3;
4901
- t.save(), t.fillStyle = T, t.translate(A.renderLeft, A.renderTop), t.rotate(A.angle), t.fillRect(-A.kernedWidth / 2, c * at + it - a * ct, A.kernedWidth, ct), t.restore();
4902
- } else if ((w !== y || C !== T || at !== M || O !== S || it !== I) && m > 0) {
4908
+ t.save(), t.fillStyle = T, t.translate(A.renderLeft, A.renderTop), t.rotate(A.angle), t.fillRect(-A.kernedWidth / 2, c * at + nt - a * ct, A.kernedWidth, ct), t.restore();
4909
+ } else if ((w !== y || C !== T || at !== M || O !== S || nt !== E) && m > 0) {
4903
4910
  const ct = this.fontSize * S / 1e3;
4904
4911
  let z = r + f + p;
4905
- this.direction === "rtl" && (z = this.width - z - m), y && T && S && (t.fillStyle = T, t.fillRect(z, D + c * M + I - a * ct, m, ct)), p = A.left, m = A.width, y = w, S = O, T = C, M = at, I = it;
4912
+ this.direction === "rtl" && (z = this.width - z - m), y && T && S && (t.fillStyle = T, t.fillRect(z, D + c * M + E - a * ct, m, ct)), p = A.left, m = A.width, y = w, S = O, T = C, M = at, E = nt;
4906
4913
  } else m += A.kernedWidth;
4907
4914
  }
4908
4915
  let tt = r + f + p;
4909
4916
  this.direction === "rtl" && (tt = this.width - tt - m), t.fillStyle = C;
4910
- const rt = this.fontSize * O / 1e3;
4911
- w && C && O && t.fillRect(tt, D + c * M + I - a * rt, m - o, rt), s += u;
4917
+ const it = this.fontSize * O / 1e3;
4918
+ w && C && O && t.fillRect(tt, D + c * M + E - a * it, m - o, it), s += u;
4912
4919
  }
4913
4920
  this._removeShadow(t);
4914
4921
  }
@@ -5018,7 +5025,7 @@ b(ut, "textLayoutProperties", rc), b(ut, "cacheProperties", [...le, ...ic]), b(u
5018
5025
  }
5019
5026
  getSvgSpanStyles(i, t) {
5020
5027
  const { fontFamily: e, strokeWidth: s, stroke: r, fill: n, fontSize: o, fontStyle: a, fontWeight: c, deltaY: h, textDecorationThickness: l, linethrough: u, overline: d, underline: g } = i, f = this.getSvgTextDecoration({ underline: g ?? this.underline, overline: d ?? this.overline, linethrough: u ?? this.linethrough }), p = l || this.textDecorationThickness;
5021
- return [r ? zs(vt, r) : "", s ? "stroke-width: ".concat(s, "; ") : "", e ? "font-family: ".concat(e.includes("'") || e.includes('"') ? e : "'".concat(e, "'"), "; ") : "", o ? "font-size: ".concat(o, "px; ") : "", a ? "font-style: ".concat(a, "; ") : "", c ? "font-weight: ".concat(c, "; ") : "", f ? "text-decoration: ".concat(f, "; text-decoration-thickness: ").concat(W(p * this.getObjectScaling().y / 10, P.NUM_FRACTION_DIGITS), "%; ") : "", n ? zs(et, n) : "", h ? "baseline-shift: ".concat(-h, "; ") : "", t ? "white-space: pre; " : ""].join("");
5028
+ return [r ? zs(vt, r) : "", s ? "stroke-width: ".concat(s, "; ") : "", e ? "font-family: ".concat(e.includes("'") || e.includes('"') ? e : "'".concat(e, "'"), "; ") : "", o ? "font-size: ".concat(o, "px; ") : "", a ? "font-style: ".concat(a, "; ") : "", c ? "font-weight: ".concat(c, "; ") : "", f ? "text-decoration: ".concat(f, "; text-decoration-thickness: ").concat(W(p * this.getObjectScaling().y / 10, P.NUM_FRACTION_DIGITS), "%; ") : "", n ? zs(st, n) : "", h ? "baseline-shift: ".concat(-h, "; ") : "", t ? "white-space: pre; " : ""].join("");
5022
5029
  }
5023
5030
  getSvgTextDecoration(i) {
5024
5031
  return ["overline", "underline", "line-through"].filter((t) => i[t.replace("-", "")]).join(" ");
@@ -5724,7 +5731,7 @@ class ie extends Sd {
5724
5731
  }
5725
5732
  getCurrentCharColor() {
5726
5733
  const t = this._getCurrentCharIndex();
5727
- return this.getValueOfPropertyAt(t.l, t.c, et);
5734
+ return this.getValueOfPropertyAt(t.l, t.c, st);
5728
5735
  }
5729
5736
  _getCurrentCharIndex() {
5730
5737
  const t = this.get2DCursorLocation(this.selectionStart, !0), e = t.charIndex > 0 ? t.charIndex - 1 : 0;
@@ -5879,7 +5886,7 @@ class Ro extends fi {
5879
5886
  calcLayoutResult(t, e) {
5880
5887
  const { target: s } = t, { clipPath: r, group: n } = s;
5881
5888
  if (!r || !this.shouldPerformLayout(t)) return;
5882
- const { width: o, height: a } = Xt(Ic(s, r)), c = new _(o, a);
5889
+ const { width: o, height: a } = Xt(Ec(s, r)), c = new _(o, a);
5883
5890
  if (r.absolutePositioned)
5884
5891
  return { center: oe(r.getRelativeCenterPoint(), void 0, n ? n.calcTransformMatrix() : void 0), size: c };
5885
5892
  {
@@ -6139,7 +6146,7 @@ class St extends ht {
6139
6146
  this.fill = null, o = [' <rect x="'.concat(s, '" y="').concat(r, '" width="').concat(this.width, '" height="').concat(this.height, '" style="').concat(this.getSvgStyles(), `" />
6140
6147
  `)], this.fill = h;
6141
6148
  }
6142
- return n = this.paintFirst !== et ? n.concat(o, t) : n.concat(t, o), n;
6149
+ return n = this.paintFirst !== st ? n.concat(o, t) : n.concat(t, o), n;
6143
6150
  }
6144
6151
  getSrc(t) {
6145
6152
  const e = t ? this._element : this._originalElement;
@@ -6248,7 +6255,7 @@ function jd(i, t, e, s) {
6248
6255
  const S = m.subtract(c.pathOffset).transform(c.calcOwnMatrix()).subtract(y);
6249
6256
  return c.left -= S.x, c.top -= S.y, c.set("dirty", !0), !0;
6250
6257
  })(r, e, s, n, o);
6251
- return En(this.actionName, v(v({}, In(i, t, e, s)), {}, { commandIndex: n, pointIndex: o })), a;
6258
+ return In(this.actionName, v(v({}, En(i, t, e, s)), {}, { commandIndex: n, pointIndex: o })), a;
6252
6259
  }
6253
6260
  class ih extends N {
6254
6261
  constructor(t) {
@@ -6259,7 +6266,7 @@ class ih extends N {
6259
6266
  super.render(t, e, s, o, n);
6260
6267
  }
6261
6268
  }
6262
- class Ed extends ih {
6269
+ class Id extends ih {
6263
6270
  constructor(t) {
6264
6271
  super(t);
6265
6272
  }
@@ -6274,7 +6281,7 @@ class Ed extends ih {
6274
6281
  t.lineTo(d.x, d.y), t.stroke(), t.restore(), super.render(t, e, s, r, n);
6275
6282
  }
6276
6283
  }
6277
- const mr = (i, t, e, s, r, n) => new (e ? Ed : ih)(v(v({ commandIndex: i, pointIndex: t, actionName: "modifyPath", positionHandler: Dd, actionHandler: jd, connectToCommandIndex: r, connectToPointIndex: n }, s), e ? s.controlPointStyle : s.pointStyle));
6284
+ const mr = (i, t, e, s, r, n) => new (e ? Id : ih)(v(v({ commandIndex: i, pointIndex: t, actionName: "modifyPath", positionHandler: Dd, actionHandler: jd, connectToCommandIndex: r, connectToPointIndex: n }, s), e ? s.controlPointStyle : s.pointStyle));
6278
6285
  var _s = Object.freeze({ __proto__: null, changeWidth: Ji, createObjectDefaultControls: Bn, createPathControls: function(i) {
6279
6286
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6280
6287
  const e = {};
@@ -6295,15 +6302,15 @@ var _s = Object.freeze({ __proto__: null, changeWidth: Ji, createObjectDefaultCo
6295
6302
  const e = {};
6296
6303
  for (let s = 0; s < (typeof i == "number" ? i : i.points.length); s++) e["p".concat(s)] = new N(v({ actionName: eh, positionHandler: Wo(s), actionHandler: Xo(s) }, t));
6297
6304
  return e;
6298
- }, createPolyPositionHandler: Wo, createResizeControls: xc, createTextboxDefaultControls: Sc, dragHandler: Za, factoryPolyActionHandler: rh, getLocalPoint: ci, polyActionHandler: sh, renderCircleControl: lc, renderSquareControl: uc, rotationStyleHandler: dc, rotationWithSnapping: gc, scaleCursorStyleHandler: Ze, scaleOrSkewActionName: Ms, scaleSkewCursorStyleHandler: Ie, scalingEqually: ks, scalingX: mc, scalingXOrSkewingY: Zi, scalingY: vc, scalingYOrSkewingX: Qi, skewCursorStyleHandler: yc, skewHandlerX: _c, skewHandlerY: Tc, wrapWithFireEvent: Oe, wrapWithFixedAnchor: Ge });
6299
- const mi = (i) => i.webgl !== void 0, Vn = "precision highp float", Id = `
6305
+ }, createPolyPositionHandler: Wo, createResizeControls: xc, createTextboxDefaultControls: Sc, dragHandler: Za, factoryPolyActionHandler: rh, getLocalPoint: ci, polyActionHandler: sh, renderCircleControl: lc, renderSquareControl: uc, rotationStyleHandler: dc, rotationWithSnapping: gc, scaleCursorStyleHandler: Ze, scaleOrSkewActionName: Ms, scaleSkewCursorStyleHandler: Ee, scalingEqually: ks, scalingX: mc, scalingXOrSkewingY: Zi, scalingY: vc, scalingYOrSkewingX: Qi, skewCursorStyleHandler: yc, skewHandlerX: _c, skewHandlerY: Tc, wrapWithFireEvent: Oe, wrapWithFixedAnchor: Ge });
6306
+ const mi = (i) => i.webgl !== void 0, Vn = "precision highp float", Ed = `
6300
6307
  `.concat(Vn, `;
6301
6308
  varying vec2 vTexCoord;
6302
6309
  uniform sampler2D uTexture;
6303
6310
  void main() {
6304
6311
  gl_FragColor = texture2D(uTexture, vTexCoord);
6305
6312
  }`), Pd = ["type"], Ad = ["type"], Ld = new RegExp(Vn, "g");
6306
- class st {
6313
+ class rt {
6307
6314
  get type() {
6308
6315
  return this.constructor.type;
6309
6316
  }
@@ -6312,7 +6319,7 @@ class st {
6312
6319
  Object.assign(this, this.constructor.defaults, t);
6313
6320
  }
6314
6321
  getFragmentSource() {
6315
- return Id;
6322
+ return Ed;
6316
6323
  }
6317
6324
  getVertexSource() {
6318
6325
  return `
@@ -6403,7 +6410,7 @@ class st {
6403
6410
  return new this(V(t, Ad));
6404
6411
  }
6405
6412
  }
6406
- b(st, "type", "BaseFilter"), b(st, "uniformLocations", []);
6413
+ b(rt, "type", "BaseFilter"), b(rt, "uniformLocations", []);
6407
6414
  const Fd = { multiply: `gl_FragColor.rgb *= uColor.rgb;
6408
6415
  `, screen: `gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);
6409
6416
  `, add: `gl_FragColor.rgb += uColor.rgb;
@@ -6432,7 +6439,7 @@ const Fd = { multiply: `gl_FragColor.rgb *= uColor.rgb;
6432
6439
  gl_FragColor.rgb *= (1.0 - uColor.a);
6433
6440
  gl_FragColor.rgb += uColor.rgb;
6434
6441
  ` };
6435
- class vr extends st {
6442
+ class vr extends rt {
6436
6443
  getCacheKey() {
6437
6444
  return "".concat(this.type, "_").concat(this.mode);
6438
6445
  }
@@ -6524,7 +6531,7 @@ const Rd = { multiply: `
6524
6531
  gl_FragColor = color;
6525
6532
  }
6526
6533
  ` }, Bd = ["type", "image"];
6527
- class yr extends st {
6534
+ class yr extends rt {
6528
6535
  getCacheKey() {
6529
6536
  return "".concat(this.type, "_").concat(this.mode);
6530
6537
  }
@@ -6586,7 +6593,7 @@ class yr extends st {
6586
6593
  }
6587
6594
  }
6588
6595
  b(yr, "type", "BlendImage"), b(yr, "defaults", { mode: "multiply", alpha: 1 }), b(yr, "uniformLocations", ["uTransformMatrix", "uImage"]), k.setClass(yr);
6589
- class br extends st {
6596
+ class br extends rt {
6590
6597
  getFragmentSource() {
6591
6598
  return `
6592
6599
  precision highp float;
@@ -6671,7 +6678,7 @@ class br extends st {
6671
6678
  }
6672
6679
  }
6673
6680
  b(br, "type", "Blur"), b(br, "defaults", { blur: 0 }), b(br, "uniformLocations", ["uDelta"]), k.setClass(br);
6674
- class _r extends st {
6681
+ class _r extends rt {
6675
6682
  getFragmentSource() {
6676
6683
  return `
6677
6684
  precision highp float;
@@ -6699,7 +6706,7 @@ class _r extends st {
6699
6706
  }
6700
6707
  b(_r, "type", "Brightness"), b(_r, "defaults", { brightness: 0 }), b(_r, "uniformLocations", ["uBrightness"]), k.setClass(_r);
6701
6708
  const nh = { matrix: [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], colorsOnly: !0 };
6702
- class ts extends st {
6709
+ class ts extends rt {
6703
6710
  getFragmentSource() {
6704
6711
  return `
6705
6712
  precision highp float;
@@ -6749,7 +6756,7 @@ Ne("Technicolor", [1.91252, -0.85453, -0.09155, 0, 0.04624, -0.30878, 1.76589, -
6749
6756
  Ne("Polaroid", [1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0]);
6750
6757
  Ne("Sepia", [0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534, 0.131, 0, 0, 0, 0, 0, 1, 0]);
6751
6758
  Ne("BlackWhite", [1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 0, 0, 0, 1, 0]);
6752
- class zo extends st {
6759
+ class zo extends rt {
6753
6760
  constructor() {
6754
6761
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6755
6762
  super(t), this.subFilters = t.subFilters || [];
@@ -6770,7 +6777,7 @@ class zo extends st {
6770
6777
  }
6771
6778
  }
6772
6779
  b(zo, "type", "Composed"), k.setClass(zo);
6773
- class Tr extends st {
6780
+ class Tr extends rt {
6774
6781
  getFragmentSource() {
6775
6782
  return `
6776
6783
  precision highp float;
@@ -6942,7 +6949,7 @@ const Wd = { Convolute_3_1: `
6942
6949
  gl_FragColor.a = alpha;
6943
6950
  }
6944
6951
  ` };
6945
- class xr extends st {
6952
+ class xr extends rt {
6946
6953
  getCacheKey() {
6947
6954
  return "".concat(this.type, "_").concat(Math.sqrt(this.matrix.length), "_").concat(this.opaque ? 1 : 0);
6948
6955
  }
@@ -6967,7 +6974,7 @@ class xr extends st {
6967
6974
  }
6968
6975
  b(xr, "type", "Convolute"), b(xr, "defaults", { opaque: !1, matrix: [0, 0, 0, 0, 1, 0, 0, 0, 0] }), b(xr, "uniformLocations", ["uMatrix", "uOpaque", "uHalfSize", "uSize"]), k.setClass(xr);
6969
6976
  const oh = "Gamma";
6970
- class Sr extends st {
6977
+ class Sr extends rt {
6971
6978
  getFragmentSource() {
6972
6979
  return `
6973
6980
  precision highp float;
@@ -7039,7 +7046,7 @@ const Xd = { average: `
7039
7046
  gl_FragColor = vec4(average, average, average, col.a);
7040
7047
  }
7041
7048
  ` };
7042
- class wr extends st {
7049
+ class wr extends rt {
7043
7050
  applyTo2d(t) {
7044
7051
  let { imageData: { data: e } } = t;
7045
7052
  for (let s, r = 0; r < e.length; r += 4) {
@@ -7088,7 +7095,7 @@ class Bi extends ts {
7088
7095
  }
7089
7096
  }
7090
7097
  b(Bi, "type", "HueRotation"), b(Bi, "defaults", zd), k.setClass(Bi);
7091
- class Cr extends st {
7098
+ class Cr extends rt {
7092
7099
  applyTo2d(t) {
7093
7100
  let { imageData: { data: e } } = t;
7094
7101
  for (let s = 0; s < e.length; s += 4) e[s] = 255 - e[s], e[s + 1] = 255 - e[s + 1], e[s + 2] = 255 - e[s + 2], this.alpha && (e[s + 3] = 255 - e[s + 3]);
@@ -7122,7 +7129,7 @@ class Cr extends st {
7122
7129
  }
7123
7130
  }
7124
7131
  b(Cr, "type", "Invert"), b(Cr, "defaults", { alpha: !1, invert: !0 }), b(Cr, "uniformLocations", ["uInvert", "uAlpha"]), k.setClass(Cr);
7125
- class Or extends st {
7132
+ class Or extends rt {
7126
7133
  getFragmentSource() {
7127
7134
  return `
7128
7135
  precision highp float;
@@ -7157,7 +7164,7 @@ class Or extends st {
7157
7164
  }
7158
7165
  }
7159
7166
  b(Or, "type", "Noise"), b(Or, "defaults", { noise: 0 }), b(Or, "uniformLocations", ["uNoise", "uSeed"]), k.setClass(Or);
7160
- class kr extends st {
7167
+ class kr extends rt {
7161
7168
  applyTo2d(t) {
7162
7169
  let { imageData: { data: e, width: s, height: r } } = t;
7163
7170
  for (let n = 0; n < r; n += this.blocksize) for (let o = 0; o < s; o += this.blocksize) {
@@ -7197,7 +7204,7 @@ class kr extends st {
7197
7204
  }
7198
7205
  }
7199
7206
  b(kr, "type", "Pixelate"), b(kr, "defaults", { blocksize: 4 }), b(kr, "uniformLocations", ["uBlocksize"]), k.setClass(kr);
7200
- class Mr extends st {
7207
+ class Mr extends rt {
7201
7208
  getFragmentSource() {
7202
7209
  return `
7203
7210
  precision highp float;
@@ -7227,7 +7234,7 @@ void main() {
7227
7234
  }
7228
7235
  }
7229
7236
  b(Mr, "type", "RemoveColor"), b(Mr, "defaults", { color: "#FFFFFF", distance: 0.02, useAlpha: !1 }), b(Mr, "uniformLocations", ["uLow", "uHigh"]), k.setClass(Mr);
7230
- class Dr extends st {
7237
+ class Dr extends rt {
7231
7238
  sendUniformData(t, e) {
7232
7239
  t.uniform2fv(e.uDelta, this.horizontal ? [1 / this.width, 0] : [0, 1 / this.height]), t.uniform1fv(e.uTaps, this.taps);
7233
7240
  }
@@ -7310,21 +7317,21 @@ class Dr extends st {
7310
7317
  lanczosResize(t, e, s, r, n) {
7311
7318
  const o = t.imageData.data, a = t.ctx.createImageData(r, n), c = a.data, h = this.lanczosCreate(this.lanczosLobes), l = this.rcpScaleX, u = this.rcpScaleY, d = 2 / this.rcpScaleX, g = 2 / this.rcpScaleY, f = Math.ceil(l * this.lanczosLobes / 2), p = Math.ceil(u * this.lanczosLobes / 2), m = {}, y = { x: 0, y: 0 }, T = { x: 0, y: 0 };
7312
7319
  return function S(w) {
7313
- let C, O, D, M, I, tt, rt, X, B, A, at;
7320
+ let C, O, D, M, E, tt, it, X, B, A, at;
7314
7321
  for (y.x = (w + 0.5) * l, T.x = Math.floor(y.x), C = 0; C < n; C++) {
7315
- for (y.y = (C + 0.5) * u, T.y = Math.floor(y.y), I = 0, tt = 0, rt = 0, X = 0, B = 0, O = T.x - f; O <= T.x + f; O++) if (!(O < 0 || O >= e)) {
7322
+ for (y.y = (C + 0.5) * u, T.y = Math.floor(y.y), E = 0, tt = 0, it = 0, X = 0, B = 0, O = T.x - f; O <= T.x + f; O++) if (!(O < 0 || O >= e)) {
7316
7323
  A = Math.floor(1e3 * Math.abs(O - y.x)), m[A] || (m[A] = {});
7317
- for (let it = T.y - p; it <= T.y + p; it++) it < 0 || it >= s || (at = Math.floor(1e3 * Math.abs(it - y.y)), m[A][at] || (m[A][at] = h(Math.sqrt(Math.pow(A * d, 2) + Math.pow(at * g, 2)) / 1e3)), D = m[A][at], D > 0 && (M = 4 * (it * e + O), I += D, tt += D * o[M], rt += D * o[M + 1], X += D * o[M + 2], B += D * o[M + 3]));
7324
+ for (let nt = T.y - p; nt <= T.y + p; nt++) nt < 0 || nt >= s || (at = Math.floor(1e3 * Math.abs(nt - y.y)), m[A][at] || (m[A][at] = h(Math.sqrt(Math.pow(A * d, 2) + Math.pow(at * g, 2)) / 1e3)), D = m[A][at], D > 0 && (M = 4 * (nt * e + O), E += D, tt += D * o[M], it += D * o[M + 1], X += D * o[M + 2], B += D * o[M + 3]));
7318
7325
  }
7319
- M = 4 * (C * r + w), c[M] = tt / I, c[M + 1] = rt / I, c[M + 2] = X / I, c[M + 3] = B / I;
7326
+ M = 4 * (C * r + w), c[M] = tt / E, c[M + 1] = it / E, c[M + 2] = X / E, c[M + 3] = B / E;
7320
7327
  }
7321
7328
  return ++w < r ? S(w) : a;
7322
7329
  }(0);
7323
7330
  }
7324
7331
  bilinearFiltering(t, e, s, r, n) {
7325
7332
  let o, a, c, h, l, u, d, g, f, p, m, y, T, S = 0;
7326
- const w = this.rcpScaleX, C = this.rcpScaleY, O = 4 * (e - 1), D = t.imageData.data, M = t.ctx.createImageData(r, n), I = M.data;
7327
- for (d = 0; d < n; d++) for (g = 0; g < r; g++) for (l = Math.floor(w * g), u = Math.floor(C * d), f = w * g - l, p = C * d - u, T = 4 * (u * e + l), m = 0; m < 4; m++) o = D[T + m], a = D[T + 4 + m], c = D[T + O + m], h = D[T + O + 4 + m], y = o * (1 - f) * (1 - p) + a * f * (1 - p) + c * p * (1 - f) + h * f * p, I[S++] = y;
7333
+ const w = this.rcpScaleX, C = this.rcpScaleY, O = 4 * (e - 1), D = t.imageData.data, M = t.ctx.createImageData(r, n), E = M.data;
7334
+ for (d = 0; d < n; d++) for (g = 0; g < r; g++) for (l = Math.floor(w * g), u = Math.floor(C * d), f = w * g - l, p = C * d - u, T = 4 * (u * e + l), m = 0; m < 4; m++) o = D[T + m], a = D[T + 4 + m], c = D[T + O + m], h = D[T + O + 4 + m], y = o * (1 - f) * (1 - p) + a * f * (1 - p) + c * p * (1 - f) + h * f * p, E[S++] = y;
7328
7335
  return M;
7329
7336
  }
7330
7337
  hermiteFastResize(t, e, s, r, n) {
@@ -7334,10 +7341,10 @@ class Dr extends st {
7334
7341
  let m = 0, y = 0, T = 0, S = 0, w = 0, C = 0, O = 0;
7335
7342
  const D = (g + 0.5) * a;
7336
7343
  for (let M = Math.floor(g * a); M < (g + 1) * a; M++) {
7337
- const I = Math.abs(D - (M + 0.5)) / h, tt = (f + 0.5) * o, rt = I * I;
7344
+ const E = Math.abs(D - (M + 0.5)) / h, tt = (f + 0.5) * o, it = E * E;
7338
7345
  for (let X = Math.floor(f * o); X < (f + 1) * o; X++) {
7339
7346
  let B = Math.abs(tt - (X + 0.5)) / c;
7340
- const A = Math.sqrt(rt + B * B);
7347
+ const A = Math.sqrt(it + B * B);
7341
7348
  A > 1 && A < -1 || (m = 2 * A * A * A - 3 * A * A + 1, m > 0 && (B = 4 * (X + M * e), O += m * l[B + 3], T += m, l[B + 3] < 255 && (m = m * l[B + 3] / 250), S += m * l[B], w += m * l[B + 1], C += m * l[B + 2], y += m));
7342
7349
  }
7343
7350
  }
@@ -7347,7 +7354,7 @@ class Dr extends st {
7347
7354
  }
7348
7355
  }
7349
7356
  b(Dr, "type", "Resize"), b(Dr, "defaults", { resizeType: "hermite", scaleX: 1, scaleY: 1, lanczosLobes: 3 }), b(Dr, "uniformLocations", ["uDelta", "uTaps"]), k.setClass(Dr);
7350
- class jr extends st {
7357
+ class jr extends rt {
7351
7358
  getFragmentSource() {
7352
7359
  return `
7353
7360
  precision highp float;
@@ -7381,7 +7388,7 @@ class jr extends st {
7381
7388
  }
7382
7389
  }
7383
7390
  b(jr, "type", "Saturation"), b(jr, "defaults", { saturation: 0 }), b(jr, "uniformLocations", ["uSaturation"]), k.setClass(jr);
7384
- class Er extends st {
7391
+ class Ir extends rt {
7385
7392
  getFragmentSource() {
7386
7393
  return `
7387
7394
  precision highp float;
@@ -7415,7 +7422,7 @@ class Er extends st {
7415
7422
  return this.vibrance === 0;
7416
7423
  }
7417
7424
  }
7418
- b(Er, "type", "Vibrance"), b(Er, "defaults", { vibrance: 0 }), b(Er, "uniformLocations", ["uVibrance"]), k.setClass(Er);
7425
+ b(Ir, "type", "Vibrance"), b(Ir, "defaults", { vibrance: 0 }), b(Ir, "uniformLocations", ["uVibrance"]), k.setClass(Ir);
7419
7426
  function Gt(i, t, e, s, r) {
7420
7427
  const a = r.canvas;
7421
7428
  if (!a) return;
@@ -7608,9 +7615,9 @@ const Nd = {
7608
7615
  center: 0,
7609
7616
  bottom: 0.5,
7610
7617
  right: 0.5
7611
- }, E = (i) => typeof i == "string" ? Nd[i] : i - 0.5, ze = "center", sr = "left", Ay = "top", Ly = "bottom", rr = "right", Fy = "none";
7618
+ }, I = (i) => typeof i == "string" ? Nd[i] : i - 0.5, ze = "center", sr = "left", Ay = "top", Ly = "bottom", rr = "right", Fy = "none";
7612
7619
  function ir(i) {
7613
- return E(i.originX) === E(ze) && E(i.originY) === E(ze);
7620
+ return I(i.originX) === I(ze) && I(i.originY) === I(ze);
7614
7621
  }
7615
7622
  function vi(i) {
7616
7623
  return (t, e, s, r) => {
@@ -7623,7 +7630,7 @@ function vi(i) {
7623
7630
  };
7624
7631
  }
7625
7632
  const Ho = 3, Ud = 4, ah = 187, $d = 60, qd = 1e3 / $d;
7626
- function ot(i, t = 1, e = 1) {
7633
+ function et(i, t = 1, e = 1) {
7627
7634
  const s = ah * t;
7628
7635
  return i * (60 / 1e3) * s / e;
7629
7636
  }
@@ -7632,11 +7639,13 @@ function R(i, t = 1, e = 1) {
7632
7639
  return i / s * qd * e;
7633
7640
  }
7634
7641
  function Ry(i, t = 1) {
7635
- return ot(i, t);
7642
+ return et(i, t);
7636
7643
  }
7637
- const Rr = (i) => Object.keys(i).reduce((t, e) => {
7638
- const { display: s } = i[e];
7639
- return Math.max(t, s.to);
7644
+ const Rr = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7645
+ const n = i[r];
7646
+ if (!n) return s;
7647
+ const { display: o } = n;
7648
+ return Math.max(s, o.to);
7640
7649
  }, 0), { wrapWithFireEvent: Kd, getLocalPoint: Jd } = _s, Zd = (i, t, e, s) => {
7641
7650
  const r = Jd(
7642
7651
  t,
@@ -7645,7 +7654,7 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7645
7654
  e,
7646
7655
  s
7647
7656
  );
7648
- if (E(t.originX) === E(ze) || E(t.originX) === E(rr) && r.x < 0 || E(t.originX) === E(sr) && r.x > 0) {
7657
+ if (I(t.originX) === I(ze) || I(t.originX) === I(rr) && r.x < 0 || I(t.originX) === I(sr) && r.x > 0) {
7649
7658
  let { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7650
7659
  Math.abs(r.x * a / n.scaleX) - o
7651
7660
  );
@@ -7661,7 +7670,7 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7661
7670
  if (n.left < 0) return !1;
7662
7671
  const u = c - h;
7663
7672
  if (n.left + u < 0) {
7664
- const y = ot(
7673
+ const y = et(
7665
7674
  n.duration,
7666
7675
  n.tScale,
7667
7676
  n.playbackRate
@@ -7699,7 +7708,7 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7699
7708
  e,
7700
7709
  s
7701
7710
  );
7702
- if (E(t.originX) === E(ze) || E(t.originX) === E(rr) && r.x < 0 || E(t.originX) === E(sr) && r.x > 0) {
7711
+ if (I(t.originX) === I(ze) || I(t.originX) === I(rr) && r.x < 0 || I(t.originX) === I(sr) && r.x > 0) {
7703
7712
  const { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7704
7713
  Math.abs(r.x * a / n.scaleX) - o
7705
7714
  ), l = t.corner === "ml";
@@ -7728,7 +7737,7 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7728
7737
  e,
7729
7738
  s
7730
7739
  );
7731
- if (E(t.originX) === E(ze) || E(t.originX) === E(rr) && r.x < 0 || E(t.originX) === E(sr) && r.x > 0) {
7740
+ if (I(t.originX) === I(ze) || I(t.originX) === I(rr) && r.x < 0 || I(t.originX) === I(sr) && r.x > 0) {
7732
7741
  const { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7733
7742
  Math.abs(r.x * a / n.scaleX) - o
7734
7743
  ), l = R(
@@ -7750,7 +7759,7 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7750
7759
  e,
7751
7760
  s
7752
7761
  );
7753
- if (E(t.originX) === E(ze) || E(t.originX) === E(rr) && r.x < 0 || E(t.originX) === E(sr) && r.x > 0) {
7762
+ if (I(t.originX) === I(ze) || I(t.originX) === I(rr) && r.x < 0 || I(t.originX) === I(sr) && r.x > 0) {
7754
7763
  let { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7755
7764
  Math.abs(r.x * a / n.scaleX) - o
7756
7765
  );
@@ -7875,8 +7884,8 @@ const Rr = (i) => Object.keys(i).reduce((t, e) => {
7875
7884
  render: Gt,
7876
7885
  controlOrientation: "left"
7877
7886
  })
7878
- }), ug = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
7879
- let nr = (i = 21) => {
7887
+ });
7888
+ let ug = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", nr = (i = 21) => {
7880
7889
  let t = "", e = crypto.getRandomValues(new Uint8Array(i |= 0));
7881
7890
  for (; i--; )
7882
7891
  t += ug[e[i] & 63];
@@ -7895,7 +7904,7 @@ const { wrapWithFireEvent: dg, getLocalPoint: gg } = _s, fg = (i, t, e, s) => {
7895
7904
  e,
7896
7905
  s
7897
7906
  );
7898
- if (E(t.originX) === E(ze) || E(t.originX) === E(rr) && r.x < 0 || E(t.originX) === E(sr) && r.x > 0) {
7907
+ if (I(t.originX) === I(ze) || I(t.originX) === I(rr) && r.x < 0 || I(t.originX) === I(sr) && r.x > 0) {
7899
7908
  let { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7900
7909
  Math.abs(r.x * a / n.scaleX) - o
7901
7910
  );
@@ -7918,7 +7927,7 @@ const { wrapWithFireEvent: dg, getLocalPoint: gg } = _s, fg = (i, t, e, s) => {
7918
7927
  if (n.left < 0) return !1;
7919
7928
  const d = c - h;
7920
7929
  if (n.left + d < 0) {
7921
- const S = ot(
7930
+ const S = et(
7922
7931
  n.duration,
7923
7932
  n.tScale,
7924
7933
  n.playbackRate
@@ -8211,7 +8220,7 @@ function Gs(i, t) {
8211
8220
  }
8212
8221
  const vg = (i, t) => {
8213
8222
  var h, l, u, d, g, f, p, m;
8214
- const e = i.display, s = ot(e.from, t.tScale), r = ot(
8223
+ const e = i.display, s = et(e.from, t.tScale), r = et(
8215
8224
  e.to - e.from,
8216
8225
  t.tScale,
8217
8226
  i.playbackRate
@@ -8283,9 +8292,9 @@ function jg(i) {
8283
8292
  ;
8284
8293
  return t;
8285
8294
  }
8286
- var Eg = /^\s+/;
8287
- function Ig(i) {
8288
- return i && i.slice(0, jg(i) + 1).replace(Eg, "");
8295
+ var Ig = /^\s+/;
8296
+ function Eg(i) {
8297
+ return i && i.slice(0, jg(i) + 1).replace(Ig, "");
8289
8298
  }
8290
8299
  function Kt(i) {
8291
8300
  var t = typeof i;
@@ -8303,7 +8312,7 @@ function $o(i) {
8303
8312
  }
8304
8313
  if (typeof i != "string")
8305
8314
  return i === 0 ? i : +i;
8306
- i = Ig(i);
8315
+ i = Eg(i);
8307
8316
  var e = Ag.test(i);
8308
8317
  return e || Lg.test(i) ? Fg(i.slice(2), e ? 2 : 8) : Pg.test(i) ? Uo : +i;
8309
8318
  }
@@ -8478,9 +8487,9 @@ var ph = Object.prototype, xf = ph.hasOwnProperty, Sf = ph.propertyIsEnumerable,
8478
8487
  function wf() {
8479
8488
  return !1;
8480
8489
  }
8481
- var mh = typeof exports == "object" && exports && !exports.nodeType && exports, Qo = mh && typeof module == "object" && module && !module.nodeType && module, Cf = Qo && Qo.exports === mh, ta = Cf ? Ft.Buffer : void 0, Of = ta ? ta.isBuffer : void 0, ti = Of || wf, kf = "[object Arguments]", Mf = "[object Array]", Df = "[object Boolean]", jf = "[object Date]", Ef = "[object Error]", If = "[object Function]", Pf = "[object Map]", Af = "[object Number]", Lf = "[object Object]", Ff = "[object RegExp]", Rf = "[object Set]", Bf = "[object String]", Wf = "[object WeakMap]", Xf = "[object ArrayBuffer]", zf = "[object DataView]", Hf = "[object Float32Array]", Yf = "[object Float64Array]", Vf = "[object Int8Array]", Gf = "[object Int16Array]", Nf = "[object Int32Array]", Uf = "[object Uint8Array]", $f = "[object Uint8ClampedArray]", qf = "[object Uint16Array]", Kf = "[object Uint32Array]", Y = {};
8490
+ var mh = typeof exports == "object" && exports && !exports.nodeType && exports, Qo = mh && typeof module == "object" && module && !module.nodeType && module, Cf = Qo && Qo.exports === mh, ta = Cf ? Ft.Buffer : void 0, Of = ta ? ta.isBuffer : void 0, ti = Of || wf, kf = "[object Arguments]", Mf = "[object Array]", Df = "[object Boolean]", jf = "[object Date]", If = "[object Error]", Ef = "[object Function]", Pf = "[object Map]", Af = "[object Number]", Lf = "[object Object]", Ff = "[object RegExp]", Rf = "[object Set]", Bf = "[object String]", Wf = "[object WeakMap]", Xf = "[object ArrayBuffer]", zf = "[object DataView]", Hf = "[object Float32Array]", Yf = "[object Float64Array]", Vf = "[object Int8Array]", Gf = "[object Int16Array]", Nf = "[object Int32Array]", Uf = "[object Uint8Array]", $f = "[object Uint8ClampedArray]", qf = "[object Uint16Array]", Kf = "[object Uint32Array]", Y = {};
8482
8491
  Y[Hf] = Y[Yf] = Y[Vf] = Y[Gf] = Y[Nf] = Y[Uf] = Y[$f] = Y[qf] = Y[Kf] = !0;
8483
- Y[kf] = Y[Mf] = Y[Xf] = Y[Df] = Y[zf] = Y[jf] = Y[Ef] = Y[If] = Y[Pf] = Y[Af] = Y[Lf] = Y[Ff] = Y[Rf] = Y[Bf] = Y[Wf] = !1;
8492
+ Y[kf] = Y[Mf] = Y[Xf] = Y[Df] = Y[zf] = Y[jf] = Y[If] = Y[Ef] = Y[Pf] = Y[Af] = Y[Lf] = Y[Ff] = Y[Rf] = Y[Bf] = Y[Wf] = !1;
8484
8493
  function Jf(i) {
8485
8494
  return Ce(i) && Un(i.length) && !!Y[Ts(i)];
8486
8495
  }
@@ -8629,10 +8638,10 @@ function jp(i) {
8629
8638
  var t = _i(this, i).delete(i);
8630
8639
  return this.size -= t ? 1 : 0, t;
8631
8640
  }
8632
- function Ep(i) {
8641
+ function Ip(i) {
8633
8642
  return _i(this, i).get(i);
8634
8643
  }
8635
- function Ip(i) {
8644
+ function Ep(i) {
8636
8645
  return _i(this, i).has(i);
8637
8646
  }
8638
8647
  function Pp(i, t) {
@@ -8648,8 +8657,8 @@ function ge(i) {
8648
8657
  }
8649
8658
  ge.prototype.clear = Mp;
8650
8659
  ge.prototype.delete = jp;
8651
- ge.prototype.get = Ep;
8652
- ge.prototype.has = Ip;
8660
+ ge.prototype.get = Ip;
8661
+ ge.prototype.has = Ep;
8653
8662
  ge.prototype.set = Pp;
8654
8663
  var Ap = "Expected a function";
8655
8664
  function Kn(i, t) {
@@ -8826,7 +8835,7 @@ function bm(i, t) {
8826
8835
  var e = Qn(i.buffer);
8827
8836
  return new i.constructor(e, i.byteOffset, i.length);
8828
8837
  }
8829
- var _m = "[object Boolean]", Tm = "[object Date]", xm = "[object Map]", Sm = "[object Number]", wm = "[object RegExp]", Cm = "[object Set]", Om = "[object String]", km = "[object Symbol]", Mm = "[object ArrayBuffer]", Dm = "[object DataView]", jm = "[object Float32Array]", Em = "[object Float64Array]", Im = "[object Int8Array]", Pm = "[object Int16Array]", Am = "[object Int32Array]", Lm = "[object Uint8Array]", Fm = "[object Uint8ClampedArray]", Rm = "[object Uint16Array]", Bm = "[object Uint32Array]";
8838
+ var _m = "[object Boolean]", Tm = "[object Date]", xm = "[object Map]", Sm = "[object Number]", wm = "[object RegExp]", Cm = "[object Set]", Om = "[object String]", km = "[object Symbol]", Mm = "[object ArrayBuffer]", Dm = "[object DataView]", jm = "[object Float32Array]", Im = "[object Float64Array]", Em = "[object Int8Array]", Pm = "[object Int16Array]", Am = "[object Int32Array]", Lm = "[object Uint8Array]", Fm = "[object Uint8ClampedArray]", Rm = "[object Uint16Array]", Bm = "[object Uint32Array]";
8830
8839
  function Wm(i, t, e) {
8831
8840
  var s = i.constructor;
8832
8841
  switch (t) {
@@ -8838,8 +8847,8 @@ function Wm(i, t, e) {
8838
8847
  case Dm:
8839
8848
  return pm(i);
8840
8849
  case jm:
8841
- case Em:
8842
8850
  case Im:
8851
+ case Em:
8843
8852
  case Pm:
8844
8853
  case Am:
8845
8854
  case Lm:
@@ -8982,7 +8991,7 @@ function Ov(i) {
8982
8991
  e[++t] = s;
8983
8992
  }), e;
8984
8993
  }
8985
- var kv = 1, Mv = 2, Dv = "[object Boolean]", jv = "[object Date]", Ev = "[object Error]", Iv = "[object Map]", Pv = "[object Number]", Av = "[object RegExp]", Lv = "[object Set]", Fv = "[object String]", Rv = "[object Symbol]", Bv = "[object ArrayBuffer]", Wv = "[object DataView]", pa = Ot ? Ot.prototype : void 0, zi = pa ? pa.valueOf : void 0;
8994
+ var kv = 1, Mv = 2, Dv = "[object Boolean]", jv = "[object Date]", Iv = "[object Error]", Ev = "[object Map]", Pv = "[object Number]", Av = "[object RegExp]", Lv = "[object Set]", Fv = "[object String]", Rv = "[object Symbol]", Bv = "[object ArrayBuffer]", Wv = "[object DataView]", pa = Ot ? Ot.prototype : void 0, zi = pa ? pa.valueOf : void 0;
8986
8995
  function Xv(i, t, e, s, r, n, o) {
8987
8996
  switch (e) {
8988
8997
  case Wv:
@@ -8995,12 +9004,12 @@ function Xv(i, t, e, s, r, n, o) {
8995
9004
  case jv:
8996
9005
  case Pv:
8997
9006
  return Nn(+i, +t);
8998
- case Ev:
9007
+ case Iv:
8999
9008
  return i.name == t.name && i.message == t.message;
9000
9009
  case Av:
9001
9010
  case Fv:
9002
9011
  return i == t + "";
9003
- case Iv:
9012
+ case Ev:
9004
9013
  var a = Cv;
9005
9014
  case Lv:
9006
9015
  var c = s & kv;
@@ -9050,11 +9059,11 @@ function Vv(i, t, e, s, r, n) {
9050
9059
  }
9051
9060
  return n.delete(i), n.delete(t), p;
9052
9061
  }
9053
- var Gv = 1, ma = "[object Arguments]", va = "[object Array]", Ir = "[object Object]", Nv = Object.prototype, ya = Nv.hasOwnProperty;
9062
+ var Gv = 1, ma = "[object Arguments]", va = "[object Array]", Er = "[object Object]", Nv = Object.prototype, ya = Nv.hasOwnProperty;
9054
9063
  function Uv(i, t, e, s, r, n) {
9055
9064
  var o = qt(i), a = qt(t), c = o ? va : Dt(i), h = a ? va : Dt(t);
9056
- c = c == ma ? Ir : c, h = h == ma ? Ir : h;
9057
- var l = c == Ir, u = h == Ir, d = c == h;
9065
+ c = c == ma ? Er : c, h = h == ma ? Er : h;
9066
+ var l = c == Er, u = h == Er, d = c == h;
9058
9067
  if (d && ti(i)) {
9059
9068
  if (!ti(t))
9060
9069
  return !1;
@@ -9106,8 +9115,8 @@ function t0(i, t, e) {
9106
9115
  return h = O, a = setTimeout(y, t), l ? g(O) : o;
9107
9116
  }
9108
9117
  function p(O) {
9109
- var D = O - c, M = O - h, I = t - D;
9110
- return u ? Qv(I, n - M) : I;
9118
+ var D = O - c, M = O - h, E = t - D;
9119
+ return u ? Qv(E, n - M) : E;
9111
9120
  }
9112
9121
  function m(O) {
9113
9122
  var D = O - c, M = O - h;
@@ -9213,7 +9222,7 @@ class c0 {
9213
9222
  }
9214
9223
  updateTrackItemsToHistory() {
9215
9224
  this.pauseEventListeners(), this.trackItemIds.forEach((t) => {
9216
- const e = this.tracks.find((c) => c.items.includes(t)), s = this.getObjects().find((c) => c.id === (e == null ? void 0 : e.id)).top, r = this.trackItemsMap[t], n = this.getObjects().find((c) => c.id === t), o = ot(r.display.from, this.tScale), a = ot(
9225
+ const e = this.tracks.find((c) => c.items.includes(t)), s = this.getObjects().find((c) => c.id === (e == null ? void 0 : e.id)).top, r = this.trackItemsMap[t], n = this.getObjects().find((c) => c.id === t), o = et(r.display.from, this.tScale), a = et(
9217
9226
  r.display.to - r.display.from,
9218
9227
  this.tScale,
9219
9228
  r.playbackRate
@@ -9296,7 +9305,7 @@ class c0 {
9296
9305
  const e = t ? this.getActiveObjects().map((s) => s.id) : [];
9297
9306
  !t && this.pauseEventListeners(), this.trackItemIds.forEach((s) => {
9298
9307
  if (e.includes(s)) return;
9299
- const r = this.getObjects().find((c) => c.id === s), n = this.trackItemsMap[s], o = ot(n.display.from, this.tScale), a = ot(
9308
+ const r = this.getObjects().find((c) => c.id === s), n = this.trackItemsMap[s], o = et(n.display.from, this.tScale), a = et(
9300
9309
  n.display.to - n.display.from,
9301
9310
  this.tScale
9302
9311
  );
@@ -9594,7 +9603,7 @@ function v0(i) {
9594
9603
  function y0(i) {
9595
9604
  i.off("object:modified", jh);
9596
9605
  }
9597
- const Eh = {
9606
+ const Ih = {
9598
9607
  canvas: null,
9599
9608
  enableGuideRedraw: !0,
9600
9609
  isPointerOverHelperTrack: !1,
@@ -9615,11 +9624,11 @@ const Eh = {
9615
9624
  initialTrackPoints: [],
9616
9625
  updateItemsInTrack: null,
9617
9626
  orderNormalTrack: !1
9618
- }, K = () => Eh, nt = (i) => {
9619
- Object.assign(Eh, i);
9627
+ }, K = () => Ih, ot = (i) => {
9628
+ Object.assign(Ih, i);
9620
9629
  }, xa = 10, xi = (i, t) => {
9621
9630
  t.forEach((e) => e.isAlignmentAuxiliary && i.remove(e));
9622
- }, Ih = (i, t) => {
9631
+ }, Eh = (i, t) => {
9623
9632
  const e = [], s = [];
9624
9633
  return t.getObjects().filter((r) => r.visible).forEach((r) => {
9625
9634
  if (i.find((o) => o.id === r.id) || r.isAlignmentAuxiliary)
@@ -9756,23 +9765,23 @@ function Bh(i) {
9756
9765
  const p = f.getBoundingRect();
9757
9766
  return r.x >= p.left && r.x <= p.left + p.width && r.y >= p.top && r.y <= p.top + p.height;
9758
9767
  });
9759
- nt({ draggingOverTrack: o }), n.forEach((f) => {
9768
+ ot({ draggingOverTrack: o }), n.forEach((f) => {
9760
9769
  Ca(f) && (f === o ? f.setSelected(!0) : f.setSelected(!1));
9761
- }), Ca(o) ? nt({ isPointerOverHelperTrack: !0 }) : nt({ isPointerOverHelperTrack: !1 });
9770
+ }), Ca(o) ? ot({ isPointerOverHelperTrack: !0 }) : ot({ isPointerOverHelperTrack: !1 });
9762
9771
  const a = t.getObjects(), c = i.target, h = c.getBoundingRect();
9763
9772
  c.setCoords();
9764
9773
  const l = [
9765
9774
  c,
9766
9775
  ...t.getActiveObjects(),
9767
9776
  ...t.getObjects("Track", "Helper", "Transition", "Placeholder")
9768
- ], u = Ih(l, t), d = Lh(c), g = Ph(u, d);
9769
- s && (xi(t, a), g.length && Ah(g, h, t), nt({ enableGuideRedraw: !1 }), setTimeout(() => nt({ enableGuideRedraw: !0 }), 50)), g.forEach((f) => {
9777
+ ], u = Eh(l, t), d = Lh(c), g = Ph(u, d);
9778
+ s && (xi(t, a), g.length && Ah(g, h, t), ot({ enableGuideRedraw: !1 }), setTimeout(() => ot({ enableGuideRedraw: !0 }), 50)), g.forEach((f) => {
9770
9779
  f.orientation === "V" ? c.left = f.lineGuide + f.offset : c.top = f.lineGuide + f.offset;
9771
9780
  });
9772
9781
  }
9773
9782
  function Wh(i) {
9774
9783
  const t = i.target.canvas;
9775
- t && (xi(t, t.getObjects()), Rh(t.getObjects("Helper")), nt({ draggingOverTrack: null, isPointerOverHelperTrack: !1 }));
9784
+ t && (xi(t, t.getObjects()), Rh(t.getObjects("Helper")), ot({ draggingOverTrack: null, isPointerOverHelperTrack: !1 }));
9776
9785
  }
9777
9786
  function Xh(i) {
9778
9787
  var a;
@@ -9782,7 +9791,7 @@ function Xh(i) {
9782
9791
  s,
9783
9792
  ...t.getActiveObjects(),
9784
9793
  ...t.getObjects("Track", "Helper", "Transition", "Placeholder")
9785
- ], h = Ih(c, t), l = h.vertical.filter(
9794
+ ], h = Eh(c, t), l = h.vertical.filter(
9786
9795
  (g) => {
9787
9796
  const f = g.val;
9788
9797
  if (n === "ml")
@@ -9817,7 +9826,7 @@ function zh(i, t) {
9817
9826
  }
9818
9827
  function Hh(i) {
9819
9828
  const t = K(), e = t.canvas;
9820
- nt({
9829
+ ot({
9821
9830
  activeTrackToItemsMap: {},
9822
9831
  primaryTracks: {},
9823
9832
  secondaryTracks: {},
@@ -9830,7 +9839,7 @@ function Hh(i) {
9830
9839
  updateItemsInTrack: null
9831
9840
  }), e.trackIdAfterTransform = "", e.positionAfterTransform = {};
9832
9841
  const s = e.getActiveObject(), r = s instanceof Ct ? s.getObjects() : [s];
9833
- nt({ activeObjects: r });
9842
+ ot({ activeObjects: r });
9834
9843
  const n = e.getScenePoint(i.e), o = e.getObjects("Track"), a = e.getActiveObjects().map((u) => u.id);
9835
9844
  let h = o.filter((u) => {
9836
9845
  const d = u.items;
@@ -9839,7 +9848,7 @@ function Hh(i) {
9839
9848
  const d = u.getBoundingRect();
9840
9849
  return n.x >= d.left && n.x <= d.left + d.width && n.y >= d.top && n.y <= d.top + d.height;
9841
9850
  });
9842
- nt({ originTrack: h });
9851
+ ot({ originTrack: h });
9843
9852
  const l = e.getObjects(...this.itemTypes);
9844
9853
  o.forEach((u) => {
9845
9854
  const d = l.filter((g) => u.items.includes(g.id));
@@ -9935,7 +9944,7 @@ const as = class as extends Q {
9935
9944
  if (!e) return;
9936
9945
  const s = e.getObjects().find((o) => o.id === this.fromId);
9937
9946
  if (!s) return;
9938
- const r = ot(this.duration, this.tScale), n = s.left + s.width - r / 2;
9947
+ const r = et(this.duration, this.tScale), n = s.left + s.width - r / 2;
9939
9948
  this.set({
9940
9949
  width: r,
9941
9950
  left: n
@@ -10038,7 +10047,7 @@ function j0(i, t) {
10038
10047
  const s = i.canvas.getActiveObject(), r = s.left + s.width / 2, n = t.left + t.width / 2;
10039
10048
  return r < n ? t.left - s.width : (r > n, t.left + t.width);
10040
10049
  }
10041
- const E0 = (i, t, e) => !(e < 0 || Vh(i, {
10050
+ const I0 = (i, t, e) => !(e < 0 || Vh(i, {
10042
10051
  ...t.getBoundingRect(),
10043
10052
  left: e
10044
10053
  })), Gh = (i) => {
@@ -10047,7 +10056,7 @@ const E0 = (i, t, e) => !(e < 0 || Vh(i, {
10047
10056
  ), r = i.type.toLowerCase();
10048
10057
  return i instanceof we, e && (s == null ? void 0 : s.includes(r));
10049
10058
  };
10050
- function I0(i) {
10059
+ function E0(i) {
10051
10060
  K().isPointerOverHelperTrack ? i.opacity = 0 : i.opacity = 1;
10052
10061
  }
10053
10062
  function P0() {
@@ -10074,7 +10083,7 @@ function A0(i) {
10074
10083
  function L0(i, t, e, s) {
10075
10084
  const n = i.canvas.getActiveObjects().map((l) => l.id), o = j0(i, t), a = e.filter(
10076
10085
  (l) => !n.includes(l.id)
10077
- ), c = E0(
10086
+ ), c = I0(
10078
10087
  a,
10079
10088
  i,
10080
10089
  o
@@ -10166,7 +10175,7 @@ const F0 = (i, t) => {
10166
10175
  d.visible = !1;
10167
10176
  return;
10168
10177
  }
10169
- f.setCoords(), I0(d);
10178
+ f.setCoords(), E0(d);
10170
10179
  let p = z0(
10171
10180
  f,
10172
10181
  n,
@@ -10234,7 +10243,7 @@ function B0(i, t, e) {
10234
10243
  d !== -1 && e.splice(
10235
10244
  d,
10236
10245
  0,
10237
- ot(l.display.from, r.tScale)
10246
+ et(l.display.from, r.tScale)
10238
10247
  );
10239
10248
  }
10240
10249
  }
@@ -10481,7 +10490,7 @@ function Zh(i) {
10481
10490
  if (!iy.includes(s)) return;
10482
10491
  const r = e.duration || 5e3, n = this;
10483
10492
  n.discardActiveObject(), n.setActiveIds([]);
10484
- const o = ot(r, this.tScale), a = n.getItemSize(s), c = n.getTrackItems();
10493
+ const o = et(r, this.tScale), a = n.getItemSize(s), c = n.getTrackItems();
10485
10494
  if (J = oy({
10486
10495
  width: o,
10487
10496
  height: a,
@@ -10509,7 +10518,7 @@ function Zh(i) {
10509
10518
  const h = K();
10510
10519
  n.trackIdAfterTransform = "", n.positionAfterTransform = {};
10511
10520
  const l = J, u = [J];
10512
- nt({
10521
+ ot({
10513
10522
  activeTrackToItemsMap: {},
10514
10523
  primaryTracks: {},
10515
10524
  secondaryTracks: {},
@@ -10518,7 +10527,7 @@ function Zh(i) {
10518
10527
  activeObjects: [],
10519
10528
  trackTopToIdMap: {},
10520
10529
  isDragOver: !1
10521
- }), nt({ activeObjects: u });
10530
+ }), ot({ activeObjects: u });
10522
10531
  const d = n.getObjects("Track"), g = n.getTrackItems();
10523
10532
  d.forEach((p) => {
10524
10533
  const m = g.filter((y) => p.items.includes(y.id));
@@ -10549,7 +10558,7 @@ const Qh = (i) => {
10549
10558
  Fh(i, t.placeholderMovingObjects), i && (xi(i, i.getObjects()), Rh(i.getObjects("Helper")));
10550
10559
  };
10551
10560
  function tl() {
10552
- if (qs = "", Qh(this), nt({ draggingOverTrack: null, isPointerOverHelperTrack: !1 }), !J) return;
10561
+ if (qs = "", Qh(this), ot({ draggingOverTrack: null, isPointerOverHelperTrack: !1 }), !J) return;
10553
10562
  se(Kh);
10554
10563
  const i = this;
10555
10564
  Be.forEach((t) => {
@@ -10573,7 +10582,7 @@ function el(i) {
10573
10582
  );
10574
10583
  n && (js = n, n.strokeDashArray = [5, 1], n.setSelected(!0)), Be.forEach((c) => {
10575
10584
  c !== n && c.setSelected(!1);
10576
- }), nt({ isDragOver: !0 }), J.setCoords();
10585
+ }), ot({ isDragOver: !0 }), J.setCoords();
10577
10586
  const o = {
10578
10587
  target: J,
10579
10588
  action: "drag",
@@ -10591,7 +10600,7 @@ function el(i) {
10591
10600
  transform: o
10592
10601
  }), this.itemTypes.includes(qs))
10593
10602
  if (t.draggingOverTrack instanceof Nt) {
10594
- nt({ isPointerOverHelperTrack: !1 });
10603
+ ot({ isPointerOverHelperTrack: !1 });
10595
10604
  const c = t.activeObjects[0].left, h = t.activeObjects[0].left + t.activeObjects[0].width;
10596
10605
  let l = !1;
10597
10606
  const u = t.draggingOverTrack.items;
@@ -10602,7 +10611,7 @@ function el(i) {
10602
10611
  })) : t.placeholderMovingObjects.forEach((d) => {
10603
10612
  d.opacity = 0;
10604
10613
  });
10605
- } else t.draggingOverTrack instanceof Se && (nt({ isPointerOverHelperTrack: !0 }), t.draggingOverTrack.setSelected(!0));
10614
+ } else t.draggingOverTrack instanceof Se && (ot({ isPointerOverHelperTrack: !0 }), t.draggingOverTrack.setSelected(!0));
10606
10615
  s.requestRenderAll();
10607
10616
  }
10608
10617
  function sl(i) {
@@ -10611,7 +10620,7 @@ function sl(i) {
10611
10620
  const t = this;
10612
10621
  Qh(t);
10613
10622
  const e = K(), s = e.draggingOverTrack;
10614
- nt({ draggingOverTrack: null, isPointerOverHelperTrack: !1 });
10623
+ ot({ draggingOverTrack: null, isPointerOverHelperTrack: !1 });
10615
10624
  const r = (o = i.e.dataTransfer) == null ? void 0 : o.types[0], n = JSON.parse(i.e.dataTransfer.getData(r));
10616
10625
  if (n.type !== "transition") {
10617
10626
  const a = e.activeObjects[0], c = R(a.left, t.tScale);
@@ -10810,7 +10819,7 @@ const uy = (i) => {
10810
10819
  if (h.left + d > (g == null ? void 0 : g.left)) {
10811
10820
  const p = d - (g.left - h.left);
10812
10821
  f.forEach((m) => {
10813
- const y = ot(m.display.from, t.tScale);
10822
+ const y = et(m.display.from, t.tScale);
10814
10823
  m.left = y + p;
10815
10824
  });
10816
10825
  }
@@ -10823,27 +10832,27 @@ function gy(i) {
10823
10832
  function fy(i) {
10824
10833
  i.off("object:moving", al);
10825
10834
  }
10826
- let It, to = !1;
10835
+ let Et, to = !1;
10827
10836
  function py(i, t) {
10828
10837
  const e = i.canvas;
10829
10838
  if (e.objectTypes.includes(i.type)) {
10830
- It || (It = i);
10839
+ Et || (Et = i);
10831
10840
  const r = i.top, n = i.height, o = i.left, a = i.width, c = t.x, h = t.y, l = Math.abs(h - (r + n / 2)) <= Ud;
10832
10841
  Math.abs(c - o) <= Ho && l || Math.abs(c - o - a) <= Ho && l ? (e.hoverCornerItem = !0, i.hoverCursor = "ew-resize") : (e.hoverCornerItem = !1, i.hoverCursor = "move"), e.requestRenderAll();
10833
10842
  }
10834
10843
  }
10835
10844
  function cl(i) {
10836
10845
  const t = this, e = t.findTarget(i.e), s = t.getScenePoint(i.e);
10837
- e && (e.isSelected && It && (e.hoverCursor = "default"), py(e, s));
10846
+ e && (e.isSelected && Et && (e.hoverCursor = "default"), py(e, s));
10838
10847
  }
10839
10848
  function hl() {
10840
- It && (It.lockMovementX = !1, It.lockMovementY = !1, It = void 0);
10849
+ Et && (Et.lockMovementX = !1, Et.lockMovementY = !1, Et = void 0);
10841
10850
  }
10842
10851
  function ll(i) {
10843
- It && (to || It._renderControls(i.ctx));
10852
+ Et && (to || Et._renderControls(i.ctx));
10844
10853
  }
10845
10854
  function ul() {
10846
- It && (It = void 0, this.requestRenderAll());
10855
+ Et && (Et = void 0, this.requestRenderAll());
10847
10856
  }
10848
10857
  function dl() {
10849
10858
  to = !0;
@@ -10858,9 +10867,9 @@ function vy(i) {
10858
10867
  i.off("mouse:out", ul.bind(i)), i.off("mouse:up", hl.bind(i)), i.off("mouse:move", cl.bind(i)), i.off("after:render", ll.bind(i)), i.off("object:resizing", dl.bind(i)), i.off("object:modified", gl.bind(i));
10859
10868
  }
10860
10869
  const yy = (i) => {
10861
- nt({ canvas: i }), p0(i), l0(i), v0(i), S0(i), C0(i), H0(i), $0(i), hy(i), uy(i), gy(i), my(i);
10870
+ ot({ canvas: i }), p0(i), l0(i), v0(i), S0(i), C0(i), H0(i), $0(i), hy(i), uy(i), gy(i), my(i);
10862
10871
  }, by = (i) => {
10863
- nt({ canvas: null }), m0(i), u0(i), y0(i), w0(i), O0(i), Y0(i), q0(i), ly(i), dy(i), fy(i), vy(i);
10872
+ ot({ canvas: null }), m0(i), u0(i), y0(i), w0(i), O0(i), Y0(i), q0(i), ly(i), dy(i), fy(i), vy(i);
10864
10873
  };
10865
10874
  class _y {
10866
10875
  removeTransitions() {
@@ -10872,7 +10881,7 @@ class _y {
10872
10881
  const e = this.transitionsMap[t], s = e.fromId, r = e.toId, n = this.getObjects(), o = n.find((d) => d.id === s), a = n.find((d) => d.id === r);
10873
10882
  if (!o || !a)
10874
10883
  return;
10875
- const c = ot(e.duration, this.tScale), h = o.left + o.width - c / 2, l = o.height, u = new $t({
10884
+ const c = et(e.duration, this.tScale), h = o.left + o.width - c / 2, l = o.height, u = new $t({
10876
10885
  id: e.id,
10877
10886
  left: h,
10878
10887
  top: o.top,
@@ -10903,7 +10912,7 @@ class _y {
10903
10912
  (c) => c.id === r.fromId && !e.includes(c.id)
10904
10913
  );
10905
10914
  if (!n) return;
10906
- const o = ot(r.duration, this.tScale), a = n.left + n.width - o / 2;
10915
+ const o = et(r.duration, this.tScale), a = n.left + n.width - o / 2;
10907
10916
  r.set({
10908
10917
  left: a,
10909
10918
  top: n.top
@@ -11182,7 +11191,7 @@ const Cy = (i) => {
11182
11191
  if (o.hasSrc) {
11183
11192
  const l = n[o.id];
11184
11193
  if (o.src !== a.details.src && o.setSrc && o.setSrc(a.details.src), a.type === "video" || a.type === "audio") {
11185
- const d = (((c = l.trim) == null ? void 0 : c.to) || 0) - (((h = l.trim) == null ? void 0 : h.from) || 0), g = ot(
11194
+ const d = (((c = l.trim) == null ? void 0 : c.to) || 0) - (((h = l.trim) == null ? void 0 : h.from) || 0), g = et(
11186
11195
  d,
11187
11196
  i.scale.zoom,
11188
11197
  l.playbackRate
@@ -11197,7 +11206,10 @@ const Cy = (i) => {
11197
11206
  } else (a.type === "text" || a.type === "caption") && (a.type === "text" || a.type === "caption") && o.set({ text: a.details.text });
11198
11207
  }), i.requestRenderAll();
11199
11208
  }), _l = i.state.subscribeToHistory((t) => {
11200
- i.tracks = t.tracks, i.trackItemsMap = t.trackItemsMap, i.trackItemIds = t.trackItemIds, i.transitionIds = t.transitionIds, i.transitionsMap = t.transitionsMap, i.renderTracks(), i.refreshTrackLayout(), i.updateTrackItemCoords(), i.alignItemsToTrack(), i.alignTransitionsToTrack(), i.adjustMagneticTrack(), i.updateTransitions(), i.calcBounding(), i.duration = Rr(i.trackItemsMap);
11209
+ i.tracks = t.tracks, i.trackItemsMap = t.trackItemsMap, i.trackItemIds = t.trackItemIds, i.transitionIds = t.transitionIds, i.transitionsMap = t.transitionsMap, i.renderTracks(), i.refreshTrackLayout(), i.updateTrackItemCoords(), i.alignItemsToTrack(), i.alignTransitionsToTrack(), i.adjustMagneticTrack(), i.updateTransitions(), i.calcBounding(), i.duration = Rr(
11210
+ i.trackItemsMap,
11211
+ i.trackItemIds
11212
+ );
11201
11213
  }), bl = i.state.subscribeToAddOrRemoveItems(() => {
11202
11214
  const t = i.getTrackItems().map((n) => n.id), e = i.state.getState(), s = e.trackItemIds, r = [];
11203
11215
  t.forEach((n) => {
@@ -11289,18 +11301,20 @@ class My {
11289
11301
  right: r.right + this.extraMarginX,
11290
11302
  bottom: r.bottom + this.extraMarginY
11291
11303
  };
11292
- if (n.left > s.left && (n.left = s.left), n.top > s.top && (n.top = s.top), n.bottom < s.bottom && (n.bottom = s.bottom), n.right < s.right && (n.right = s.right), this.render(this.canvas.contextTop, s, n), this.onViewportChange) {
11293
- const o = t.x;
11294
- this.onViewportChange(o);
11304
+ n.left > s.left && (n.left = s.left), n.top > s.top && (n.top = s.top), n.bottom < s.bottom && (n.bottom = s.bottom), n.right < s.right && (n.right = s.right);
11305
+ const o = this.canvas.bounding;
11306
+ if (this.hideX = o.width <= this.canvas.width, this.hideY = o.height <= this.canvas.height, this.render(this.canvas.contextTop, s, n), this.onViewportChange) {
11307
+ const a = t.x;
11308
+ this.onViewportChange(a);
11295
11309
  }
11296
11310
  }
11297
11311
  render(t, e, s) {
11298
- this.hideX || t.clearRect(
11312
+ t.clearRect(
11299
11313
  0,
11300
11314
  this.canvas.height - this.scrollbarSize - this.scrollSpace - this.lineWidth,
11301
11315
  this.canvas.width,
11302
11316
  this.scrollbarSize + this.scrollSpace + this.lineWidth
11303
- ), this.hideY || t.clearRect(
11317
+ ), t.clearRect(
11304
11318
  this.canvas.width - this.scrollbarSize - this.scrollSpace - this.lineWidth,
11305
11319
  0,
11306
11320
  this.scrollbarSize + this.scrollSpace + this.lineWidth,
@@ -11398,7 +11412,7 @@ const Dy = (i) => {
11398
11412
  y < 0 && t[5] < y && (t[5] = y);
11399
11413
  }
11400
11414
  return t;
11401
- }, Ey = (i, t = {}) => (e) => {
11415
+ }, Iy = (i, t = {}) => (e) => {
11402
11416
  const s = e.e;
11403
11417
  s.target == i.upperCanvasEl && s.preventDefault();
11404
11418
  const r = Math.floor(s.deltaY) != Math.ceil(s.deltaY);
@@ -11473,7 +11487,7 @@ const Dy = (i) => {
11473
11487
  },
11474
11488
  scrollSpace: e.scrollSpace ?? 0
11475
11489
  };
11476
- this._mouseWheelHandler = Ey(this, s), this.on("mouse:wheel", this._mouseWheelHandler), this._scrollbars = new My(this, s);
11490
+ this._mouseWheelHandler = Iy(this, s), this.on("mouse:wheel", this._mouseWheelHandler), this._scrollbars = new My(this, s);
11477
11491
  const r = e.offsetX ?? 0, n = e.offsetY ?? 0;
11478
11492
  if (r !== 0 || n !== 0) {
11479
11493
  const o = this.viewportTransform.slice(0);
@@ -11599,12 +11613,12 @@ const Dy = (i) => {
11599
11613
  );
11600
11614
  }
11601
11615
  updateState(e = { updateHistory: !1 }) {
11602
- this.filterEmptyTracks(), this.synchronizeTrackItemsState(), this.requestRenderAll(), this.duration = Rr(this.trackItemsMap), this.calcBounding(), this.refreshTrackLayout(), this.setTrackItemCoords();
11616
+ this.filterEmptyTracks(), this.synchronizeTrackItemsState(), this.requestRenderAll(), this.duration = Rr(this.trackItemsMap, this.trackItemIds), this.calcBounding(), this.refreshTrackLayout(), this.setTrackItemCoords();
11603
11617
  const s = this.getUpdatedState();
11604
11618
  this.state.updateState(s, e);
11605
11619
  }
11606
11620
  getUpdatedState() {
11607
- const e = Rr(this.trackItemsMap);
11621
+ const e = Rr(this.trackItemsMap, this.trackItemIds);
11608
11622
  return {
11609
11623
  tracks: this.tracks,
11610
11624
  trackItemIds: this.trackItemIds,
@@ -11624,7 +11638,7 @@ const Dy = (i) => {
11624
11638
  this.state.updateState(s, e);
11625
11639
  }
11626
11640
  getState() {
11627
- const e = Rr(this.trackItemsMap);
11641
+ const e = Rr(this.trackItemsMap, this.trackItemIds);
11628
11642
  return {
11629
11643
  tracks: this.tracks,
11630
11644
  trackItemIds: this.trackItemIds,
@@ -11719,14 +11733,20 @@ const Dy = (i) => {
11719
11733
  return { x: c, y: u };
11720
11734
  }
11721
11735
  setScale(e) {
11722
- this.pauseEventListeners(), this.tScale = e.zoom, this.scale = e, this.getTrackItems().forEach((r) => {
11723
- const n = ot(r.display.from, this.tScale), o = ot(
11724
- r.display.to - r.display.from,
11736
+ this.pauseEventListeners();
11737
+ const r = -(this.viewportTransform[4] - this.spacing.left), n = R(r, this.tScale);
11738
+ this.tScale = e.zoom, this.scale = e, this.getTrackItems().forEach((l) => {
11739
+ const u = et(l.display.from, this.tScale), d = et(
11740
+ l.display.to - l.display.from,
11725
11741
  this.tScale,
11726
- r.playbackRate
11742
+ l.playbackRate
11727
11743
  );
11728
- r.set({ left: n, width: o, tScale: e.zoom }), r.onScale && r.onScale(), r.setCoords();
11729
- }), this.requestRenderAll(), this.calcBounding(), this.refreshTrackLayout(), this.updateTransitions(!1), this.resumeEventListeners();
11744
+ l.set({ left: u, width: d, tScale: e.zoom }), l.onScale && l.onScale(), l.setCoords();
11745
+ }), this.requestRenderAll(), this.calcBounding(), this.refreshTrackLayout(), this.updateTransitions(!1);
11746
+ const a = et(n, this.tScale), c = this.viewportTransform.slice(0);
11747
+ c[4] = -a + this.spacing.left;
11748
+ const h = this.getViewportPos(c[4], c[5]);
11749
+ c[4] = h.x, c[5] = h.y, this.setViewportTransform(c), this.requestRenderAll(), this.resumeEventListeners();
11730
11750
  }
11731
11751
  };
11732
11752
  x(Ws, "objectTypes", []);
@@ -11782,8 +11802,8 @@ export {
11782
11802
  Rr as getDuration,
11783
11803
  ir as isTransformCentered,
11784
11804
  Xy as resize,
11785
- E as resolveOrigin,
11786
- ot as timeMsToUnits,
11805
+ I as resolveOrigin,
11806
+ et as timeMsToUnits,
11787
11807
  R as unitsToTimeMs,
11788
11808
  Yn as util,
11789
11809
  vi as wrapWithFixedAnchor