@cliquify.me/timeline 6.0.5 → 6.0.7

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
@@ -1,6 +1,6 @@
1
1
  var Dl = Object.defineProperty;
2
2
  var Il = (i, t, e) => t in i ? Dl(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var S = (i, t, e) => Il(i, typeof t != "symbol" ? t + "" : t, e);
3
+ var x = (i, t, e) => Il(i, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { dispatch as se } from "@designcombo/events";
5
5
  function y(i, t, e) {
6
6
  return (t = function(s) {
@@ -1000,7 +1000,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
1000
1000
  }
1001
1001
  toCanvasElement() {
1002
1002
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, { width: e, height: s, left: r, top: n, filter: o } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1003
- const a = (e || this.width) * t, c = (s || this.height) * t, h = this.getZoom(), l = this.width, u = this.height, d = this.skipControlsDrawing, f = h * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (r || 0)) * t, (g[5] - (n || 0)) * t], m = this.enableRetinaScaling, b = Tt({ width: a, height: c }), _ = o ? this._objects.filter((x) => o(x)) : this._objects;
1003
+ const a = (e || this.width) * t, c = (s || this.height) * t, h = this.getZoom(), l = this.width, u = this.height, d = this.skipControlsDrawing, f = h * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (r || 0)) * t, (g[5] - (n || 0)) * t], m = this.enableRetinaScaling, b = Tt({ width: a, height: c }), _ = o ? this._objects.filter((w) => o(w)) : this._objects;
1004
1004
  return this.enableRetinaScaling = !1, this.viewportTransform = p, this.width = a, this.height = c, this.skipControlsDrawing = !0, this.calcViewportBoundaries(), this.renderCanvas(b.getContext("2d"), _), this.viewportTransform = g, this.width = l, this.height = u, this.calcViewportBoundaries(), this.enableRetinaScaling = m, this.skipControlsDrawing = d, b;
1005
1005
  }
1006
1006
  dispose() {
@@ -1935,8 +1935,8 @@ let Qt = class Fr extends iu {
1935
1935
  delete this.group, t.withoutTransform && qa(this), t.withoutShadow && (this.shadow = null), t.viewportTransform && qi(this, this.getViewportTransform()), this.setCoords();
1936
1936
  const h = Yt(), l = this.getBoundingRect(), u = this.shadow, d = new T();
1937
1937
  if (u) {
1938
- const _ = u.blur, x = u.nonScaling ? new T(1, 1) : this.getObjectScaling();
1939
- d.x = 2 * Math.round(n(u.offsetX) + _) * n(x.x), d.y = 2 * Math.round(n(u.offsetY) + _) * n(x.y);
1938
+ const _ = u.blur, w = u.nonScaling ? new T(1, 1) : this.getObjectScaling();
1939
+ d.x = 2 * Math.round(n(u.offsetX) + _) * n(w.x), d.y = 2 * Math.round(n(u.offsetY) + _) * n(w.y);
1940
1940
  }
1941
1941
  const f = l.width + d.x, g = l.height + d.y;
1942
1942
  h.width = Math.ceil(f), h.height = Math.ceil(g);
@@ -2041,9 +2041,9 @@ let Qt = class Fr extends iu {
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 = L.NUM_FRACTION_DIGITS, { clipPath: r, fill: n, stroke: o, shadow: a, strokeDashArray: c, left: h, top: l, originX: u, originY: d, width: f, height: g, strokeWidth: p, strokeLineCap: m, strokeDashOffset: b, strokeLineJoin: _, strokeUniform: x, strokeMiterLimit: w, scaleX: O, scaleY: C, angle: D, flipX: M, flipY: I, opacity: R, visible: z, backgroundColor: E, fillRule: W, paintFirst: F, globalCompositeOperation: at, skewX: nt, skewY: ct } = this;
2044
+ const s = L.NUM_FRACTION_DIGITS, { clipPath: r, fill: n, stroke: o, shadow: a, strokeDashArray: c, left: h, top: l, originX: u, originY: d, width: f, height: g, strokeWidth: p, strokeLineCap: m, strokeDashOffset: b, strokeLineJoin: _, strokeUniform: w, strokeMiterLimit: S, scaleX: C, scaleY: O, angle: D, flipX: M, flipY: I, opacity: R, visible: z, backgroundColor: E, fillRule: W, paintFirst: F, globalCompositeOperation: at, skewX: nt, skewY: ct } = this;
2045
2045
  r && !r.excludeFromExport && (e = r.toObject(t.concat("inverted", "absolutePositioned")));
2046
- const Y = (Zt) => H(Zt, s), Ft = v(v({}, Ve(this, t)), {}, { type: this.constructor.type, version: Ni, originX: u, originY: d, left: Y(h), top: Y(l), width: Y(f), height: Y(g), fill: no(n) ? n.toObject() : n, stroke: no(o) ? o.toObject() : o, strokeWidth: Y(p), strokeDashArray: c && c.concat(), strokeLineCap: m, strokeDashOffset: b, strokeLineJoin: _, strokeUniform: x, strokeMiterLimit: Y(w), scaleX: Y(O), scaleY: Y(C), angle: Y(D), flipX: M, flipY: I, opacity: Y(R), shadow: a && a.toObject(), visible: z, backgroundColor: E, fillRule: W, paintFirst: F, globalCompositeOperation: at, skewX: Y(nt), skewY: Y(ct) }, e ? { clipPath: e } : null);
2046
+ const Y = (Zt) => H(Zt, s), Ft = v(v({}, Ve(this, t)), {}, { type: this.constructor.type, version: Ni, originX: u, originY: d, left: Y(h), top: Y(l), width: Y(f), height: Y(g), fill: no(n) ? n.toObject() : n, stroke: no(o) ? o.toObject() : o, strokeWidth: Y(p), strokeDashArray: c && c.concat(), strokeLineCap: m, strokeDashOffset: b, strokeLineJoin: _, strokeUniform: w, strokeMiterLimit: Y(S), scaleX: Y(C), scaleY: Y(O), angle: Y(D), flipX: M, flipY: I, opacity: Y(R), shadow: a && a.toObject(), visible: z, backgroundColor: E, fillRule: W, paintFirst: F, globalCompositeOperation: at, skewX: Y(nt), skewY: Y(ct) }, e ? { clipPath: e } : null);
2047
2047
  return this.includeDefaultValues ? Ft : this._removeDefaultValues(Ft);
2048
2048
  }
2049
2049
  toDatalessObject(t) {
@@ -2198,17 +2198,17 @@ function _c(i, t, e, s, r) {
2198
2198
  const { target: n } = e, { counterAxis: o, origin: a, lockSkewing: c, skew: h, flip: l } = Pi[i];
2199
2199
  if (Pt(n, c)) return !1;
2200
2200
  const { origin: u, flip: d } = Pi[o], f = et(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[l] ? -1 : 1), p = 0.5 * -((n[h] === 0 && hi(e, j, j, s, r)[i] > 0 || n[h] > 0 ? 1 : -1) * g) + 0.5;
2201
- return Oe(Pa, Ge((b, _, x, w) => function(O, C, D) {
2202
- let { target: M, ex: I, ey: R, skewingSide: z } = C, E = N(C, cu);
2203
- const { skew: W } = Pi[O], F = D.subtract(new T(I, R)).divide(new T(M.scaleX, M.scaleY))[O], at = M[W], nt = E[W], ct = Math.tan(q(nt)), Y = O === "y" ? M._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : M._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, Ft = 2 * F * z / Math.max(Y, 1) + ct, Zt = Vt(Math.atan(Ft));
2201
+ return Oe(Pa, Ge((b, _, w, S) => function(C, O, D) {
2202
+ let { target: M, ex: I, ey: R, skewingSide: z } = O, E = N(O, cu);
2203
+ const { skew: W } = Pi[C], F = D.subtract(new T(I, R)).divide(new T(M.scaleX, M.scaleY))[C], at = M[W], nt = E[W], ct = Math.tan(q(nt)), Y = C === "y" ? M._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : M._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, Ft = 2 * F * z / Math.max(Y, 1) + ct, Zt = Vt(Math.atan(Ft));
2204
2204
  M.set(W, Zt);
2205
2205
  const ar = at !== M[W];
2206
- if (ar && O === "y") {
2206
+ if (ar && C === "y") {
2207
2207
  const { skewX: wi, scaleX: xs } = M, ge = M._getTransformedDimensions({ skewY: at }), cr = M._getTransformedDimensions(), Me = wi !== 0 ? ge.x / cr.x : 1;
2208
2208
  Me !== 1 && M.set(gt, Me * xs);
2209
2209
  }
2210
2210
  return ar;
2211
- }(i, _, new T(x, w))))(t, v(v({}, e), {}, { [a]: p, skewingSide: g }), s, r);
2211
+ }(i, _, new T(w, S))))(t, v(v({}, e), {}, { [a]: p, skewingSide: g }), s, r);
2212
2212
  }
2213
2213
  const Tc = (i, t, e, s) => _c("x", i, t, e, s), xc = (i, t, e, s) => _c("y", i, t, e, s);
2214
2214
  function di(i, t) {
@@ -3063,47 +3063,47 @@ function nn(i, t, e, s, r, n, o, a) {
3063
3063
  if (L.cachesBoundsOfCurve && (c = [...arguments].join(), js.boundsOfCurveCache[c])) return js.boundsOfCurveCache[c];
3064
3064
  const h = Math.sqrt, l = Math.abs, u = [], d = [[0, 0], [0, 0]];
3065
3065
  let f = 6 * i - 12 * e + 6 * r, g = -3 * i + 9 * e - 9 * r + 3 * o, p = 3 * e - 3 * i;
3066
- for (let w = 0; w < 2; ++w) {
3067
- if (w > 0 && (f = 6 * t - 12 * s + 6 * n, g = -3 * t + 9 * s - 9 * n + 3 * a, p = 3 * s - 3 * t), l(g) < 1e-12) {
3066
+ for (let S = 0; S < 2; ++S) {
3067
+ if (S > 0 && (f = 6 * t - 12 * s + 6 * n, g = -3 * t + 9 * s - 9 * n + 3 * a, p = 3 * s - 3 * t), l(g) < 1e-12) {
3068
3068
  if (l(f) < 1e-12) continue;
3069
3069
  const I = -p / f;
3070
3070
  0 < I && I < 1 && u.push(I);
3071
3071
  continue;
3072
3072
  }
3073
- const O = f * f - 4 * p * g;
3074
- if (O < 0) continue;
3075
- const C = h(O), D = (-f + C) / (2 * g);
3073
+ const C = f * f - 4 * p * g;
3074
+ if (C < 0) continue;
3075
+ const O = h(C), D = (-f + O) / (2 * g);
3076
3076
  0 < D && D < 1 && u.push(D);
3077
- const M = (-f - C) / (2 * g);
3077
+ const M = (-f - O) / (2 * g);
3078
3078
  0 < M && M < 1 && u.push(M);
3079
3079
  }
3080
3080
  let m = u.length;
3081
3081
  const b = m, _ = Bc(i, t, e, s, r, n, o, a);
3082
3082
  for (; m--; ) {
3083
- const { x: w, y: O } = _(u[m]);
3084
- d[0][m] = w, d[1][m] = O;
3083
+ const { x: S, y: C } = _(u[m]);
3084
+ d[0][m] = S, d[1][m] = C;
3085
3085
  }
3086
3086
  d[0][b] = i, d[1][b] = t, d[0][b + 1] = o, d[1][b + 1] = a;
3087
- const x = [new T(Math.min(...d[0]), Math.min(...d[1])), new T(Math.max(...d[0]), Math.max(...d[1]))];
3088
- return L.cachesBoundsOfCurve && (js.boundsOfCurveCache[c] = x), x;
3087
+ const w = [new T(Math.min(...d[0]), Math.min(...d[1])), new T(Math.max(...d[0]), Math.max(...d[1]))];
3088
+ return L.cachesBoundsOfCurve && (js.boundsOfCurveCache[c] = w), w;
3089
3089
  }
3090
3090
  const Hu = (i, t, e) => {
3091
3091
  let [s, r, n, o, a, c, h, l] = e;
3092
3092
  const u = ((d, f, g, p, m, b, _) => {
3093
3093
  if (g === 0 || p === 0) return [];
3094
- let x = 0, w = 0, O = 0;
3095
- const C = Math.PI, D = _ * Tn, M = Lt(D), I = At(D), R = 0.5 * (-I * d - M * f), z = 0.5 * (-I * f + M * d), E = g ** 2, W = p ** 2, F = z ** 2, at = R ** 2, nt = E * W - E * F - W * at;
3094
+ let w = 0, S = 0, C = 0;
3095
+ const O = Math.PI, D = _ * Tn, M = Lt(D), I = At(D), R = 0.5 * (-I * d - M * f), z = 0.5 * (-I * f + M * d), E = g ** 2, W = p ** 2, F = z ** 2, at = R ** 2, nt = E * W - E * F - W * at;
3096
3096
  let ct = Math.abs(g), Y = Math.abs(p);
3097
3097
  if (nt < 0) {
3098
3098
  const pe = Math.sqrt(1 - nt / (E * W));
3099
3099
  ct *= pe, Y *= pe;
3100
- } else O = (m === b ? -1 : 1) * Math.sqrt(nt / (E * F + W * at));
3101
- const Ft = O * ct * z / Y, Zt = -O * Y * R / ct, ar = I * Ft - M * Zt + 0.5 * d, wi = M * Ft + I * Zt + 0.5 * f;
3100
+ } else C = (m === b ? -1 : 1) * Math.sqrt(nt / (E * F + W * at));
3101
+ const Ft = C * ct * z / Y, Zt = -C * Y * R / ct, ar = I * Ft - M * Zt + 0.5 * d, wi = M * Ft + I * Zt + 0.5 * f;
3102
3102
  let xs = Eo(1, 0, (R - Ft) / ct, (z - Zt) / Y), ge = Eo((R - Ft) / ct, (z - Zt) / Y, (-R - Ft) / ct, (-z - Zt) / Y);
3103
- b === 0 && ge > 0 ? ge -= 2 * C : b === 1 && ge < 0 && (ge += 2 * C);
3104
- const cr = Math.ceil(Math.abs(ge / C * 2)), Me = [], Ss = ge / cr, Ml = 8 / 3 * Math.sin(Ss / 4) * Math.sin(Ss / 4) / Math.sin(Ss / 2);
3103
+ b === 0 && ge > 0 ? ge -= 2 * O : b === 1 && ge < 0 && (ge += 2 * O);
3104
+ const cr = Math.ceil(Math.abs(ge / O * 2)), Me = [], Ss = ge / cr, Ml = 8 / 3 * Math.sin(Ss / 4) * Math.sin(Ss / 4) / Math.sin(Ss / 2);
3105
3105
  let Ci = xs + Ss;
3106
- for (let pe = 0; pe < cr; pe++) Me[pe] = zu(xs, Ci, I, M, ct, Y, ar, wi, Ml, x, w), x = Me[pe][5], w = Me[pe][6], xs = Ci, Ci += Ss;
3106
+ for (let pe = 0; pe < cr; pe++) Me[pe] = zu(xs, Ci, I, M, ct, Y, ar, wi, Ml, w, S), w = Me[pe][5], S = Me[pe][6], xs = Ci, Ci += Ss;
3107
3107
  return Me;
3108
3108
  })(h - i, l - t, r, n, a, c, o);
3109
3109
  for (let d = 0, f = u.length; d < f; 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;
@@ -4081,14 +4081,14 @@ class lr {
4081
4081
  } else if (this.type === "radial") {
4082
4082
  const { x1: u, y1: d, x2: f, y2: g, r1: p, r2: m } = this.coords, b = p > m;
4083
4083
  s.push("<radialGradient ", l, ' cx="', b ? u : f, '" cy="', b ? d : g, '" r="', b ? p : m, '" fx="', b ? f : u, '" fy="', b ? g : d, `">
4084
- `), b && (o.reverse(), o.forEach((x) => {
4085
- x.offset = 1 - x.offset;
4084
+ `), b && (o.reverse(), o.forEach((w) => {
4085
+ w.offset = 1 - w.offset;
4086
4086
  }));
4087
4087
  const _ = Math.min(p, m);
4088
4088
  if (_ > 0) {
4089
- const x = _ / Math.max(p, m);
4090
- o.forEach((w) => {
4091
- w.offset += x * (1 - w.offset);
4089
+ const w = _ / Math.max(p, m);
4090
+ o.forEach((S) => {
4091
+ S.offset += w * (1 - S.offset);
4092
4092
  });
4093
4093
  }
4094
4094
  }
@@ -4820,9 +4820,9 @@ class ut extends Qc {
4820
4820
  }
4821
4821
  _renderChars(t, e, s, r, n, o) {
4822
4822
  const a = this.textAlign.includes(Bt), c = this.path, h = !a && this.charSpacing === 0 && this.isEmptyStyles(o) && !c, l = this.direction === "ltr", u = this.direction === "ltr" ? 1 : -1, d = e.direction;
4823
- let f, g, p, m, b, _ = "", x = 0;
4823
+ let f, g, p, m, b, _ = "", w = 0;
4824
4824
  if (e.save(), d !== this.direction && (e.canvas.setAttribute("dir", l ? "ltr" : "rtl"), e.direction = l ? "ltr" : "rtl", e.textAlign = l ? B : Z), n -= this.getHeightOfLineImpl(o) * this._fontSizeFraction, h) return this._renderChar(t, e, o, 0, s.join(""), r, n), void e.restore();
4825
- for (let w = 0, O = s.length - 1; w <= O; w++) m = w === O || this.charSpacing || c, _ += s[w], p = this.__charBounds[o][w], x === 0 ? (r += u * (p.kernedWidth - p.width), x += p.width) : x += p.kernedWidth, a && !m && this._reSpaceAndTab.test(s[w]) && (m = !0), m || (f = f || this.getCompleteStyleDeclaration(o, w), g = this.getCompleteStyleDeclaration(o, w + 1), m = gi(f, g, !1)), m && (c ? (e.save(), e.translate(p.renderLeft, p.renderTop), e.rotate(p.angle), this._renderChar(t, e, o, w, _, -x / 2, 0), e.restore()) : (b = r, this._renderChar(t, e, o, w, _, b, n)), _ = "", f = g, r += u * x, x = 0);
4825
+ for (let S = 0, C = s.length - 1; S <= C; S++) m = S === C || this.charSpacing || c, _ += s[S], p = this.__charBounds[o][S], w === 0 ? (r += u * (p.kernedWidth - p.width), w += p.width) : w += p.kernedWidth, a && !m && this._reSpaceAndTab.test(s[S]) && (m = !0), m || (f = f || this.getCompleteStyleDeclaration(o, S), g = this.getCompleteStyleDeclaration(o, S + 1), m = gi(f, g, !1)), m && (c ? (e.save(), e.translate(p.renderLeft, p.renderTop), e.rotate(p.angle), this._renderChar(t, e, o, S, _, -w / 2, 0), e.restore()) : (b = r, this._renderChar(t, e, o, S, _, b, n)), _ = "", f = g, r += u * w, w = 0);
4826
4826
  e.restore();
4827
4827
  }
4828
4828
  _applyPatternGradientTransformText(t) {
@@ -4896,26 +4896,26 @@ class ut extends Qc {
4896
4896
  continue;
4897
4897
  }
4898
4898
  const d = this._textLines[h], f = u / this.lineHeight, g = this._getLineLeftOffset(h);
4899
- let p = 0, m = 0, b = this.getValueOfPropertyAt(h, 0, e), _ = this.getValueOfPropertyAt(h, 0, rt), x = this.getValueOfPropertyAt(h, 0, We), w = b, O = _, C = x;
4899
+ let p = 0, m = 0, b = this.getValueOfPropertyAt(h, 0, e), _ = this.getValueOfPropertyAt(h, 0, rt), w = this.getValueOfPropertyAt(h, 0, We), S = b, C = _, O = w;
4900
4900
  const D = s + f * (1 - this._fontSizeFraction);
4901
4901
  let M = this.getHeightOfChar(h, 0), I = this.getValueOfPropertyAt(h, 0, "deltaY");
4902
4902
  for (let E = 0, W = d.length; E < W; E++) {
4903
4903
  const F = this.__charBounds[h][E];
4904
- w = this.getValueOfPropertyAt(h, E, e), O = this.getValueOfPropertyAt(h, E, rt), C = this.getValueOfPropertyAt(h, E, We);
4904
+ S = this.getValueOfPropertyAt(h, E, e), C = this.getValueOfPropertyAt(h, E, rt), O = this.getValueOfPropertyAt(h, E, We);
4905
4905
  const at = this.getHeightOfChar(h, E), nt = this.getValueOfPropertyAt(h, E, "deltaY");
4906
- if (n && w && O) {
4907
- const ct = this.fontSize * C / 1e3;
4906
+ if (n && S && C) {
4907
+ const ct = this.fontSize * O / 1e3;
4908
4908
  t.save(), t.fillStyle = _, t.translate(F.renderLeft, F.renderTop), t.rotate(F.angle), t.fillRect(-F.kernedWidth / 2, c * at + nt - a * ct, F.kernedWidth, ct), t.restore();
4909
- } else if ((w !== b || O !== _ || at !== M || C !== x || nt !== I) && m > 0) {
4910
- const ct = this.fontSize * x / 1e3;
4909
+ } else if ((S !== b || C !== _ || at !== M || O !== w || nt !== I) && m > 0) {
4910
+ const ct = this.fontSize * w / 1e3;
4911
4911
  let Y = r + g + p;
4912
- this.direction === "rtl" && (Y = this.width - Y - m), b && _ && x && (t.fillStyle = _, t.fillRect(Y, D + c * M + I - a * ct, m, ct)), p = F.left, m = F.width, b = w, x = C, _ = O, M = at, I = nt;
4912
+ this.direction === "rtl" && (Y = this.width - Y - m), b && _ && w && (t.fillStyle = _, t.fillRect(Y, D + c * M + I - a * ct, m, ct)), p = F.left, m = F.width, b = S, w = O, _ = C, M = at, I = nt;
4913
4913
  } else m += F.kernedWidth;
4914
4914
  }
4915
4915
  let R = r + g + p;
4916
- this.direction === "rtl" && (R = this.width - R - m), t.fillStyle = O;
4917
- const z = this.fontSize * C / 1e3;
4918
- w && O && C && t.fillRect(R, D + c * M + I - a * z, m - o, z), s += u;
4916
+ this.direction === "rtl" && (R = this.width - R - m), t.fillStyle = C;
4917
+ const z = this.fontSize * O / 1e3;
4918
+ S && C && O && t.fillRect(R, D + c * M + I - a * z, m - o, z), s += u;
4919
4919
  }
4920
4920
  this._removeShadow(t);
4921
4921
  }
@@ -4954,8 +4954,8 @@ class ut extends Qc {
4954
4954
  }
4955
4955
  static async fromElement(t, e, s) {
4956
4956
  const r = ue(t, ut.ATTRIBUTE_NAMES, s), n = v(v({}, e), r), { textAnchor: o = B, textDecoration: a = "", dx: c = 0, dy: h = 0, top: l = 0, left: u = 0, fontSize: d = xn, strokeWidth: f = 1 } = n, g = N(n, _d), p = new this(Gr(t.textContent || "").trim(), v({ left: u + c, top: l + h, underline: a.includes("underline"), overline: a.includes("overline"), linethrough: a.includes("line-through"), strokeWidth: 0, fontSize: d }, g)), m = p.getScaledHeight() / p.height, b = ((p.height + p.strokeWidth) * p.lineHeight - p.height) * m, _ = p.getScaledHeight() + b;
4957
- let x = 0;
4958
- return o === j && (x = p.getScaledWidth() / 2), o === Z && (x = p.getScaledWidth()), p.set({ left: p.left - x, top: p.top - (_ - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
4957
+ let w = 0;
4958
+ return o === j && (w = p.getScaledWidth() / 2), o === Z && (w = p.getScaledWidth()), p.set({ left: p.left - w, top: p.top - (_ - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
4959
4959
  }
4960
4960
  static fromObject(t) {
4961
4961
  return this._fromObject(v(v({}, t), {}, { styles: jc(t.styles || {}, t.text) }), { extraParam: "text" });
@@ -5061,12 +5061,12 @@ class Td {
5061
5061
  let { selectionStart: r, selectionEnd: n } = e;
5062
5062
  const o = this.target, a = o.canvas, c = new T(o.flipX ? -1 : 1, o.flipY ? -1 : 1), h = o._getCursorBoundaries(r), l = new T(h.left + h.leftOffset, h.top + h.topOffset).multiply(c).transform(o.calcTransformMatrix()), u = a.getScenePoint(t).subtract(l), d = o.getCanvasRetinaScaling(), f = o.getBoundingRect(), g = l.subtract(new T(f.left, f.top)), p = a.viewportTransform, m = g.add(u).transform(p, !0), b = o.backgroundColor, _ = Xn(o.styles);
5063
5063
  o.backgroundColor = "";
5064
- const x = { stroke: "transparent", fill: "transparent", textBackgroundColor: "transparent" };
5065
- o.setSelectionStyles(x, 0, r), o.setSelectionStyles(x, n, o.text.length), o.dirty = !0;
5066
- const w = o.toCanvasElement({ enableRetinaScaling: a.enableRetinaScaling, viewportTransform: !0 });
5067
- o.backgroundColor = b, o.styles = _, o.dirty = !0, Qr(w, { position: "fixed", left: "".concat(-w.width, "px"), border: mt, width: "".concat(w.width / d, "px"), height: "".concat(w.height / d, "px") }), this.__dragImageDisposer && this.__dragImageDisposer(), this.__dragImageDisposer = () => {
5068
- w.remove();
5069
- }, It(t.target || this.target.hiddenTextarea).body.appendChild(w), (s = t.dataTransfer) === null || s === void 0 || s.setDragImage(w, m.x, m.y);
5064
+ const w = { stroke: "transparent", fill: "transparent", textBackgroundColor: "transparent" };
5065
+ o.setSelectionStyles(w, 0, r), o.setSelectionStyles(w, n, o.text.length), o.dirty = !0;
5066
+ const S = o.toCanvasElement({ enableRetinaScaling: a.enableRetinaScaling, viewportTransform: !0 });
5067
+ o.backgroundColor = b, o.styles = _, o.dirty = !0, Qr(S, { position: "fixed", left: "".concat(-S.width, "px"), border: mt, width: "".concat(S.width / d, "px"), height: "".concat(S.height / d, "px") }), this.__dragImageDisposer && this.__dragImageDisposer(), this.__dragImageDisposer = () => {
5068
+ S.remove();
5069
+ }, It(t.target || this.target.hiddenTextarea).body.appendChild(S), (s = t.dataTransfer) === null || s === void 0 || s.setDragImage(S, m.x, m.y);
5070
5070
  }
5071
5071
  onDragStart(t) {
5072
5072
  this.__dragStartFired = !0;
@@ -5405,12 +5405,12 @@ class Sd extends xd {
5405
5405
  if (this.hiddenTextarea.value === "") return this.styles = {}, void o();
5406
5406
  const a = this._splitTextIntoLines(s).graphemeText, c = this._text.length, h = a.length, l = this.selectionStart, u = this.selectionEnd, d = l !== u;
5407
5407
  let f, g, p, m, b = h - c;
5408
- const _ = this.fromStringToGraphemeSelection(r, n, s), x = l > _.selectionStart;
5409
- d ? (g = this._text.slice(l, u), b += u - l) : h < c && (g = x ? this._text.slice(u + b, u) : this._text.slice(l, l - b));
5410
- const w = a.slice(_.selectionEnd - b, _.selectionEnd);
5411
- if (g && g.length && (w.length && (f = this.getSelectionStyles(l, l + 1, !1), f = w.map(() => f[0])), d ? (p = l, m = u) : x ? (p = u - g.length, m = u) : (p = u, m = u + g.length), this.removeStyleFromTo(p, m)), w.length) {
5412
- const { copyPasteData: O } = Ht();
5413
- e && w.join("") === O.copiedText && !L.disableStyleCopyPaste && (f = O.copiedTextStyle), this.insertNewStyleBlock(w, l, f);
5408
+ const _ = this.fromStringToGraphemeSelection(r, n, s), w = l > _.selectionStart;
5409
+ d ? (g = this._text.slice(l, u), b += u - l) : h < c && (g = w ? this._text.slice(u + b, u) : this._text.slice(l, l - b));
5410
+ const S = a.slice(_.selectionEnd - b, _.selectionEnd);
5411
+ if (g && g.length && (S.length && (f = this.getSelectionStyles(l, l + 1, !1), f = S.map(() => f[0])), d ? (p = l, m = u) : w ? (p = u - g.length, m = u) : (p = u, m = u + g.length), this.removeStyleFromTo(p, m)), S.length) {
5412
+ const { copyPasteData: C } = Ht();
5413
+ e && S.join("") === C.copiedText && !L.disableStyleCopyPaste && (f = C.copiedTextStyle), this.insertNewStyleBlock(S, l, f);
5414
5414
  }
5415
5415
  o();
5416
5416
  }
@@ -5720,9 +5720,9 @@ class ie extends wd {
5720
5720
  _ = this.__charBounds[l][d - 1].left + this.__charBounds[l][d - 1].width - D;
5721
5721
  }
5722
5722
  m = p, (this.lineHeight < 1 || f === l && this.lineHeight > 1) && (p /= this.lineHeight);
5723
- let x = s.left + g + b, w = p, O = 0;
5724
- const C = _ - b;
5725
- this.inCompositionMode ? (t.fillStyle = this.compositionColor || "black", w = 1, O = p) : t.fillStyle = this.selectionColor, this.direction === "rtl" && (this.textAlign === Z || this.textAlign === Bt || this.textAlign === As ? x = this.width - x - C : this.textAlign === B || this.textAlign === Nr ? x = s.left + g - _ : this.textAlign !== j && this.textAlign !== Ls || (x = s.left + g - _)), t.fillRect(x, s.top + s.topOffset + O, C, w), s.topOffset += m;
5723
+ let w = s.left + g + b, S = p, C = 0;
5724
+ const O = _ - b;
5725
+ this.inCompositionMode ? (t.fillStyle = this.compositionColor || "black", S = 1, C = p) : t.fillStyle = this.selectionColor, this.direction === "rtl" && (this.textAlign === Z || this.textAlign === Bt || this.textAlign === As ? w = this.width - w - O : this.textAlign === B || this.textAlign === Nr ? w = s.left + g - _ : this.textAlign !== j && this.textAlign !== Ls || (w = s.left + g - _)), t.fillRect(w, s.top + s.topOffset + C, O, S), s.topOffset += m;
5726
5726
  }
5727
5727
  }
5728
5728
  getCurrentCharFontSize() {
@@ -5840,8 +5840,8 @@ class Ae extends ie {
5840
5840
  const m = Math.max(e, r, this.dynamicMinWidth), b = n[t];
5841
5841
  let _;
5842
5842
  for (f = 0, _ = 0; _ < b.length; _++) {
5843
- const { word: x, width: w } = b[_];
5844
- f += x.length, u += g + w - a, u > m && !p ? (h.push(d), d = [], u = w, p = !0) : u += a, p || c || d.push(l), d = d.concat(x), g = c ? 0 : this._measureWord([l], t, f), f++, p = !1;
5843
+ const { word: w, width: S } = b[_];
5844
+ f += w.length, u += g + S - a, u > m && !p ? (h.push(d), d = [], u = S, p = !0) : u += a, p || c || d.push(l), d = d.concat(w), g = c ? 0 : this._measureWord([l], t, f), f++, p = !1;
5845
5845
  }
5846
5846
  return _ && h.push(d), r + o > this.dynamicMinWidth && (this.dynamicMinWidth = r - a + o), h;
5847
5847
  }
@@ -6252,8 +6252,8 @@ function jd(i, t, e, s) {
6252
6252
  const { target: r } = t, { commandIndex: n, pointIndex: o } = this, a = ((c, h, l, u, d) => {
6253
6253
  const { path: f, pathOffset: g } = c, p = f[(u > 0 ? u : f.length) - 1], m = new T(p[d], p[d + 1]), b = m.subtract(g).transform(c.calcOwnMatrix()), _ = oe(new T(h, l), void 0, c.calcOwnMatrix());
6254
6254
  f[u][d] = _.x + g.x, f[u][d + 1] = _.y + g.y, c.setDimensions();
6255
- const x = m.subtract(c.pathOffset).transform(c.calcOwnMatrix()).subtract(b);
6256
- return c.left -= x.x, c.top -= x.y, c.set("dirty", !0), !0;
6255
+ const w = m.subtract(c.pathOffset).transform(c.calcOwnMatrix()).subtract(b);
6256
+ return c.left -= w.x, c.top -= w.y, c.set("dirty", !0), !0;
6257
6257
  })(r, e, s, n, o);
6258
6258
  return En(this.actionName, v(v({}, Pn(i, t, e, s)), {}, { commandIndex: n, pointIndex: o })), a;
6259
6259
  }
@@ -6638,11 +6638,11 @@ class _r extends it {
6638
6638
  let l = 0, u = 0, d = 0, f = 0, g = 0;
6639
6639
  const p = h - h % c, m = p + c;
6640
6640
  for (let b = -14; b < a; b++) {
6641
- const _ = b / a, x = 4 * Math.floor(n * _), w = 1 - Math.abs(_);
6642
- let O = h + x;
6643
- O < p ? O = p : O > m && (O = m);
6644
- const C = e[O + 3] * w;
6645
- l += e[O] * C, u += e[O + 1] * C, d += e[O + 2] * C, f += C, g += w;
6641
+ const _ = b / a, w = 4 * Math.floor(n * _), S = 1 - Math.abs(_);
6642
+ let C = h + w;
6643
+ C < p ? C = p : C > m && (C = m);
6644
+ const O = e[C + 3] * S;
6645
+ l += e[C] * O, u += e[C + 1] * O, d += e[C + 2] * O, f += O, g += S;
6646
6646
  }
6647
6647
  o[h] = l / f, o[h + 1] = u / f, o[h + 2] = d / f, o[h + 3] = f / g;
6648
6648
  }
@@ -6651,11 +6651,11 @@ class _r extends it {
6651
6651
  let l = 0, u = 0, d = 0, f = 0, g = 0;
6652
6652
  const p = h % c, m = o.length - c + p;
6653
6653
  for (let b = -14; b < a; b++) {
6654
- const _ = b / a, x = Math.floor(n * _) * c, w = 1 - Math.abs(_);
6655
- let O = h + x;
6656
- O < p ? O = p : O > m && (O = m);
6657
- const C = o[O + 3] * w;
6658
- l += o[O] * C, u += o[O + 1] * C, d += o[O + 2] * C, f += C, g += w;
6654
+ const _ = b / a, w = Math.floor(n * _) * c, S = 1 - Math.abs(_);
6655
+ let C = h + w;
6656
+ C < p ? C = p : C > m && (C = m);
6657
+ const O = o[C + 3] * S;
6658
+ l += o[C] * O, u += o[C + 1] * O, d += o[C + 2] * O, f += O, g += S;
6659
6659
  }
6660
6660
  e[h] = l / f, e[h + 1] = u / f, e[h + 2] = d / f, e[h + 3] = f / g;
6661
6661
  }
@@ -6958,9 +6958,9 @@ class Sr extends it {
6958
6958
  }
6959
6959
  applyTo2d(t) {
6960
6960
  const e = t.imageData, s = e.data, r = this.matrix, n = Math.round(Math.sqrt(r.length)), o = Math.floor(n / 2), a = e.width, c = e.height, h = t.ctx.createImageData(a, c), l = h.data, u = this.opaque ? 1 : 0;
6961
- let d, f, g, p, m, b, _, x, w, O, C, D, M;
6962
- for (C = 0; C < c; C++) for (O = 0; O < a; O++) {
6963
- for (m = 4 * (C * a + O), d = 0, f = 0, g = 0, p = 0, M = 0; M < n; M++) for (D = 0; D < n; D++) _ = C + M - o, b = O + D - o, _ < 0 || _ >= c || b < 0 || b >= a || (x = 4 * (_ * a + b), w = r[M * n + D], d += s[x] * w, f += s[x + 1] * w, g += s[x + 2] * w, u || (p += s[x + 3] * w));
6961
+ let d, f, g, p, m, b, _, w, S, C, O, D, M;
6962
+ for (O = 0; O < c; O++) for (C = 0; C < a; C++) {
6963
+ for (m = 4 * (O * a + C), d = 0, f = 0, g = 0, p = 0, M = 0; M < n; M++) for (D = 0; D < n; D++) _ = O + M - o, b = C + D - o, _ < 0 || _ >= c || b < 0 || b >= a || (w = 4 * (_ * a + b), S = r[M * n + D], d += s[w] * S, f += s[w + 1] * S, g += s[w + 2] * S, u || (p += s[w + 3] * S));
6964
6964
  l[m] = d, l[m + 1] = f, l[m + 2] = g, l[m + 3] = u ? s[m + 3] : p;
6965
6965
  }
6966
6966
  t.imageData = h;
@@ -7316,39 +7316,39 @@ class Ir extends it {
7316
7316
  }
7317
7317
  lanczosResize(t, e, s, r, n) {
7318
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, f = 2 / this.rcpScaleY, g = Math.ceil(l * this.lanczosLobes / 2), p = Math.ceil(u * this.lanczosLobes / 2), m = {}, b = { x: 0, y: 0 }, _ = { x: 0, y: 0 };
7319
- return function x(w) {
7320
- let O, C, D, M, I, R, z, E, W, F, at;
7321
- for (b.x = (w + 0.5) * l, _.x = Math.floor(b.x), O = 0; O < n; O++) {
7322
- for (b.y = (O + 0.5) * u, _.y = Math.floor(b.y), I = 0, R = 0, z = 0, E = 0, W = 0, C = _.x - g; C <= _.x + g; C++) if (!(C < 0 || C >= e)) {
7323
- F = Math.floor(1e3 * Math.abs(C - b.x)), m[F] || (m[F] = {});
7324
- for (let nt = _.y - p; nt <= _.y + p; nt++) nt < 0 || nt >= s || (at = Math.floor(1e3 * Math.abs(nt - b.y)), m[F][at] || (m[F][at] = h(Math.sqrt(Math.pow(F * d, 2) + Math.pow(at * f, 2)) / 1e3)), D = m[F][at], D > 0 && (M = 4 * (nt * e + C), I += D, R += D * o[M], z += D * o[M + 1], E += D * o[M + 2], W += D * o[M + 3]));
7319
+ return function w(S) {
7320
+ let C, O, D, M, I, R, z, E, W, F, at;
7321
+ for (b.x = (S + 0.5) * l, _.x = Math.floor(b.x), C = 0; C < n; C++) {
7322
+ for (b.y = (C + 0.5) * u, _.y = Math.floor(b.y), I = 0, R = 0, z = 0, E = 0, W = 0, O = _.x - g; O <= _.x + g; O++) if (!(O < 0 || O >= e)) {
7323
+ F = Math.floor(1e3 * Math.abs(O - b.x)), m[F] || (m[F] = {});
7324
+ for (let nt = _.y - p; nt <= _.y + p; nt++) nt < 0 || nt >= s || (at = Math.floor(1e3 * Math.abs(nt - b.y)), m[F][at] || (m[F][at] = h(Math.sqrt(Math.pow(F * d, 2) + Math.pow(at * f, 2)) / 1e3)), D = m[F][at], D > 0 && (M = 4 * (nt * e + O), I += D, R += D * o[M], z += D * o[M + 1], E += D * o[M + 2], W += D * o[M + 3]));
7325
7325
  }
7326
- M = 4 * (O * r + w), c[M] = R / I, c[M + 1] = z / I, c[M + 2] = E / I, c[M + 3] = W / I;
7326
+ M = 4 * (C * r + S), c[M] = R / I, c[M + 1] = z / I, c[M + 2] = E / I, c[M + 3] = W / I;
7327
7327
  }
7328
- return ++w < r ? x(w) : a;
7328
+ return ++S < r ? w(S) : a;
7329
7329
  }(0);
7330
7330
  }
7331
7331
  bilinearFiltering(t, e, s, r, n) {
7332
- let o, a, c, h, l, u, d, f, g, p, m, b, _, x = 0;
7333
- const w = this.rcpScaleX, O = this.rcpScaleY, C = 4 * (e - 1), D = t.imageData.data, M = t.ctx.createImageData(r, n), I = M.data;
7334
- for (d = 0; d < n; d++) for (f = 0; f < r; f++) for (l = Math.floor(w * f), u = Math.floor(O * d), g = w * f - l, p = O * d - u, _ = 4 * (u * e + l), m = 0; m < 4; m++) o = D[_ + m], a = D[_ + 4 + m], c = D[_ + C + m], h = D[_ + C + 4 + m], b = o * (1 - g) * (1 - p) + a * g * (1 - p) + c * p * (1 - g) + h * g * p, I[x++] = b;
7332
+ let o, a, c, h, l, u, d, f, g, p, m, b, _, w = 0;
7333
+ const S = this.rcpScaleX, C = this.rcpScaleY, O = 4 * (e - 1), D = t.imageData.data, M = t.ctx.createImageData(r, n), I = M.data;
7334
+ for (d = 0; d < n; d++) for (f = 0; f < r; f++) for (l = Math.floor(S * f), u = Math.floor(C * d), g = S * f - l, p = C * d - u, _ = 4 * (u * e + l), m = 0; m < 4; m++) o = D[_ + m], a = D[_ + 4 + m], c = D[_ + O + m], h = D[_ + O + 4 + m], b = o * (1 - g) * (1 - p) + a * g * (1 - p) + c * p * (1 - g) + h * g * p, I[w++] = b;
7335
7335
  return M;
7336
7336
  }
7337
7337
  hermiteFastResize(t, e, s, r, n) {
7338
7338
  const o = this.rcpScaleX, a = this.rcpScaleY, c = Math.ceil(o / 2), h = Math.ceil(a / 2), l = t.imageData.data, u = t.ctx.createImageData(r, n), d = u.data;
7339
7339
  for (let f = 0; f < n; f++) for (let g = 0; g < r; g++) {
7340
7340
  const p = 4 * (g + f * r);
7341
- let m = 0, b = 0, _ = 0, x = 0, w = 0, O = 0, C = 0;
7341
+ let m = 0, b = 0, _ = 0, w = 0, S = 0, C = 0, O = 0;
7342
7342
  const D = (f + 0.5) * a;
7343
7343
  for (let M = Math.floor(f * a); M < (f + 1) * a; M++) {
7344
7344
  const I = Math.abs(D - (M + 0.5)) / h, R = (g + 0.5) * o, z = I * I;
7345
7345
  for (let E = Math.floor(g * o); E < (g + 1) * o; E++) {
7346
7346
  let W = Math.abs(R - (E + 0.5)) / c;
7347
7347
  const F = Math.sqrt(z + W * W);
7348
- F > 1 && F < -1 || (m = 2 * F * F * F - 3 * F * F + 1, m > 0 && (W = 4 * (E + M * e), C += m * l[W + 3], _ += m, l[W + 3] < 255 && (m = m * l[W + 3] / 250), x += m * l[W], w += m * l[W + 1], O += m * l[W + 2], b += m));
7348
+ F > 1 && F < -1 || (m = 2 * F * F * F - 3 * F * F + 1, m > 0 && (W = 4 * (E + M * e), O += m * l[W + 3], _ += m, l[W + 3] < 255 && (m = m * l[W + 3] / 250), w += m * l[W], S += m * l[W + 1], C += m * l[W + 2], b += m));
7349
7349
  }
7350
7350
  }
7351
- d[p] = x / b, d[p + 1] = w / b, d[p + 2] = O / b, d[p + 3] = C / _;
7351
+ d[p] = w / b, d[p + 1] = S / b, d[p + 2] = C / b, d[p + 3] = O / _;
7352
7352
  }
7353
7353
  return u;
7354
7354
  }
@@ -7443,8 +7443,8 @@ const Yd = {
7443
7443
  }, es = class es extends st {
7444
7444
  constructor(e) {
7445
7445
  super(e);
7446
- S(this, "id");
7447
- S(this, "accepts", [
7446
+ x(this, "id");
7447
+ x(this, "accepts", [
7448
7448
  "audio",
7449
7449
  "video",
7450
7450
  "image",
@@ -7452,10 +7452,10 @@ const Yd = {
7452
7452
  "caption",
7453
7453
  "template"
7454
7454
  ]);
7455
- S(this, "metadata");
7456
- S(this, "items", []);
7457
- S(this, "magnetic");
7458
- S(this, "static");
7455
+ x(this, "metadata");
7456
+ x(this, "items", []);
7457
+ x(this, "magnetic");
7458
+ x(this, "static");
7459
7459
  Object.assign(this, es.ownDefaults), this.id = e.id, this.accepts = e.accepts || [], this.items = e.items || [], this.magnetic = e.magnetic, this.static = e.static, this.metadata = e.metadata, this.fill = "rgba(34, 34, 37, 0.8)", this.objectCaching = !1;
7460
7460
  }
7461
7461
  static getDefaults() {
@@ -7468,7 +7468,7 @@ const Yd = {
7468
7468
  this.width = e;
7469
7469
  }
7470
7470
  };
7471
- S(es, "ownDefaults", Yd), S(es, "type", "Track");
7471
+ x(es, "ownDefaults", Yd), x(es, "type", "Track");
7472
7472
  let Nt = es;
7473
7473
  k.setClass(Nt, "Track");
7474
7474
  const er = 1, Ue = "rgba(255, 255, 255,1.0)", Vd = [
@@ -7535,13 +7535,13 @@ const er = 1, Ue = "rgba(255, 255, 255,1.0)", Vd = [
7535
7535
  width: e.width
7536
7536
  });
7537
7537
  super([r, n, o], e);
7538
- S(this, "guide");
7539
- S(this, "topGuide");
7540
- S(this, "bottomGuide");
7541
- S(this, "metadata");
7542
- S(this, "accepts", []);
7543
- S(this, "kind");
7544
- S(this, "activeGuideFill");
7538
+ x(this, "guide");
7539
+ x(this, "topGuide");
7540
+ x(this, "bottomGuide");
7541
+ x(this, "metadata");
7542
+ x(this, "accepts", []);
7543
+ x(this, "kind");
7544
+ x(this, "activeGuideFill");
7545
7545
  Object.assign(this, ss.ownDefaults), this.guide = n, this.topGuide = r, this.bottomGuide = o, this.id = e.id, this.metadata = e.metadata, this.tScale = e.tScale, this.kind = e.kind, this.activeGuideFill = e.activeGuideFill || Ue;
7546
7546
  }
7547
7547
  static getDefaults() {
@@ -7557,7 +7557,7 @@ const er = 1, Ue = "rgba(255, 255, 255,1.0)", Vd = [
7557
7557
  e ? this.guide.set("fill", this.activeGuideFill) : this.guide.set("fill", "transparent");
7558
7558
  }
7559
7559
  };
7560
- S(ss, "type", "Helper"), S(ss, "ownDefaults", {
7560
+ x(ss, "type", "Helper"), x(ss, "ownDefaults", {
7561
7561
  selectable: !1,
7562
7562
  evented: !1
7563
7563
  });
@@ -7566,11 +7566,11 @@ k.setClass(Se, "Helper");
7566
7566
  const rs = class rs extends st {
7567
7567
  constructor(e) {
7568
7568
  super(e);
7569
- S(this, "guideItemId");
7570
- S(this, "distXToActCenter");
7571
- S(this, "trackItemType");
7572
- S(this, "defaultPos");
7573
- S(this, "draggedObject");
7569
+ x(this, "guideItemId");
7570
+ x(this, "distXToActCenter");
7571
+ x(this, "trackItemType");
7572
+ x(this, "defaultPos");
7573
+ x(this, "draggedObject");
7574
7574
  Object.assign(this, rs.ownDefaults), this.id = e.id;
7575
7575
  }
7576
7576
  static getDefaults() {
@@ -7593,7 +7593,7 @@ const rs = class rs extends st {
7593
7593
  ), e.lineWidth = er, e.setLineDash(this.strokeDashArray), e.strokeStyle = Ue, e.stroke(), e.restore();
7594
7594
  }
7595
7595
  };
7596
- S(rs, "type", "Placeholder"), S(rs, "ownDefaults", {
7596
+ x(rs, "type", "Placeholder"), x(rs, "ownDefaults", {
7597
7597
  rx: 6,
7598
7598
  ry: 6,
7599
7599
  objectCaching: !1,
@@ -7615,7 +7615,7 @@ const Ud = {
7615
7615
  center: 0,
7616
7616
  bottom: 0.5,
7617
7617
  right: 0.5
7618
- }, A = (i) => typeof i == "string" ? Ud[i] : i - 0.5, ze = "center", sr = "left", Ly = "top", Ry = "bottom", rr = "right", Fy = "none";
7618
+ }, A = (i) => typeof i == "string" ? Ud[i] : i - 0.5, ze = "center", sr = "left", Ry = "top", Fy = "bottom", rr = "right", By = "none";
7619
7619
  function ir(i) {
7620
7620
  return A(i.originX) === A(ze) && A(i.originY) === A(ze);
7621
7621
  }
@@ -7638,7 +7638,7 @@ function P(i, t = 1, e = 1) {
7638
7638
  const s = ch * t;
7639
7639
  return i / s * Kd * e;
7640
7640
  }
7641
- function By(i, t = 1) {
7641
+ function Wy(i, t = 1) {
7642
7642
  return Q(i, t);
7643
7643
  }
7644
7644
  const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
@@ -7677,12 +7677,12 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7677
7677
  ), _ = n.width + n.left;
7678
7678
  if (_ <= b) {
7679
7679
  n.set("width", _);
7680
- const x = P(
7680
+ const w = P(
7681
7681
  b - _,
7682
7682
  n.tScale,
7683
7683
  n.playbackRate
7684
7684
  );
7685
- return n.trim.from = x, !0;
7685
+ return n.trim.from = w, !0;
7686
7686
  }
7687
7687
  return !1;
7688
7688
  }
@@ -7751,8 +7751,22 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7751
7751
  }, un = nf(
7752
7752
  "resizing",
7753
7753
  yi(af)
7754
- ), { wrapWithFireEvent: cf, getLocalPoint: hf } = _s, lf = (i, t, e, s) => {
7755
- const r = hf(
7754
+ ), cf = (i) => {
7755
+ const t = i.canvas;
7756
+ if (!t || !t.state) return null;
7757
+ const e = t.state.getState();
7758
+ if (!e || !e.structure || !e.trackItemsMap) return null;
7759
+ const s = e.structure.find(
7760
+ (o) => o.id === i.id
7761
+ );
7762
+ if (!s || !s.items || s.items.length === 0) return null;
7763
+ let r = 1 / 0, n = -1 / 0;
7764
+ return s.items.forEach((o) => {
7765
+ const a = e.trackItemsMap[o];
7766
+ a && a.display && (a.display.from < r && (r = a.display.from), a.display.to > n && (n = a.display.to));
7767
+ }), r === 1 / 0 || n === -1 / 0 ? null : { minFrom: r, maxTo: n };
7768
+ }, { wrapWithFireEvent: hf, getLocalPoint: lf } = _s, uf = (i, t, e, s) => {
7769
+ const r = lf(
7756
7770
  t,
7757
7771
  t.originX,
7758
7772
  t.originY,
@@ -7760,36 +7774,40 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7760
7774
  s
7761
7775
  );
7762
7776
  if (A(t.originX) === A(ze) || A(t.originX) === A(rr) && r.x < 0 || A(t.originX) === A(sr) && r.x > 0) {
7763
- let { target: n } = t, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7777
+ const n = t.target, o = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), a = ir(t) ? 2 : 1, c = n.width, h = Math.ceil(
7764
7778
  Math.abs(r.x * a / n.scaleX) - o
7765
- );
7766
- if (t.corner === "mr") {
7767
- const u = n.trim.to, d = h - c, f = P(
7768
- d,
7779
+ ), l = t.corner === "mr", u = cf(n);
7780
+ if (l) {
7781
+ const d = n.trim.to, f = h - c, g = P(
7782
+ f,
7769
7783
  n.tScale,
7770
7784
  n.playbackRate
7771
- ), g = u + f;
7772
- if (g > n.duration) return !1;
7773
- n.set("width", Math.max(h, 0)), n.trim.to = g;
7785
+ ), p = d + g;
7786
+ if (u) {
7787
+ if (p > u.maxTo) return !1;
7788
+ } else if (p > n.duration) return !1;
7789
+ n.set("width", Math.max(h, 0)), n.trim.to = p;
7774
7790
  } else {
7775
7791
  if (n.left < 0) return !1;
7776
- const u = c - h;
7777
- if (n.left + u < 0) return !1;
7778
- const f = h - c, g = n.trim.from, p = P(
7779
- f,
7792
+ const d = c - h;
7793
+ if (n.left + d < 0) return !1;
7794
+ const g = h - c, p = n.trim.from, m = P(
7795
+ g,
7780
7796
  n.tScale,
7781
7797
  n.playbackRate
7782
- ), m = g - p;
7783
- if (m < 0) return !1;
7784
- n.set("width", Math.max(h, 0)), n.trim.from = m;
7798
+ ), b = p - m;
7799
+ if (u) {
7800
+ if (b < u.minFrom) return !1;
7801
+ } else if (b < 0) return !1;
7802
+ n.set("width", Math.max(h, 0)), n.trim.from = b;
7785
7803
  }
7786
7804
  return c !== n.width;
7787
7805
  }
7788
7806
  return !1;
7789
- }, Vo = cf(
7807
+ }, Vo = hf(
7790
7808
  "resizing",
7791
- yi(lf)
7792
- ), { scaleSkewCursorStyleHandler: Ut } = _s, uf = () => ({
7809
+ yi(uf)
7810
+ ), { scaleSkewCursorStyleHandler: Ut } = _s, df = () => ({
7793
7811
  mr: new $({
7794
7812
  x: 0.5,
7795
7813
  y: 0,
@@ -7808,7 +7826,7 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7808
7826
  render: Gt,
7809
7827
  controlOrientation: "left"
7810
7828
  })
7811
- }), Wy = () => ({
7829
+ }), Xy = () => ({
7812
7830
  mr: new $({
7813
7831
  x: 0.5,
7814
7832
  y: 0,
@@ -7827,7 +7845,7 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7827
7845
  actionName: "resizing",
7828
7846
  controlOrientation: "left"
7829
7847
  })
7830
- }), Xy = () => ({
7848
+ }), zy = () => ({
7831
7849
  mr: new $({
7832
7850
  x: 0.5,
7833
7851
  y: 0,
@@ -7846,7 +7864,7 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7846
7864
  actionName: "resizing",
7847
7865
  controlOrientation: "left"
7848
7866
  })
7849
- }), df = () => ({
7867
+ }), ff = () => ({
7850
7868
  mr: new $({
7851
7869
  x: 0.5,
7852
7870
  y: 0,
@@ -7885,10 +7903,10 @@ const Br = (i, t) => (t || Object.keys(i)).reduce((s, r) => {
7885
7903
  controlOrientation: "left"
7886
7904
  })
7887
7905
  });
7888
- let ff = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", nr = (i = 21) => {
7906
+ let gf = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", nr = (i = 21) => {
7889
7907
  let t = "", e = crypto.getRandomValues(new Uint8Array(i |= 0));
7890
7908
  for (; i--; )
7891
- t += ff[e[i] & 63];
7909
+ t += gf[e[i] & 63];
7892
7910
  return t;
7893
7911
  };
7894
7912
  function Ds(i = 16) {
@@ -7896,8 +7914,8 @@ function Ds(i = 16) {
7896
7914
  let s = nr(i - 1);
7897
7915
  return s = s.replace(/[^a-zA-Z0-9]/g, "").slice(0, i - 1), e + s;
7898
7916
  }
7899
- const { wrapWithFireEvent: gf, getLocalPoint: pf } = _s, mf = (i, t, e, s) => {
7900
- const r = pf(
7917
+ const { wrapWithFireEvent: pf, getLocalPoint: mf } = _s, vf = (i, t, e, s) => {
7918
+ const r = mf(
7901
7919
  t,
7902
7920
  t.originX,
7903
7921
  t.originY,
@@ -7927,19 +7945,19 @@ const { wrapWithFireEvent: gf, getLocalPoint: pf } = _s, mf = (i, t, e, s) => {
7927
7945
  if (n.left < 0) return !1;
7928
7946
  const d = c - h;
7929
7947
  if (n.left + d < 0) {
7930
- const x = Q(
7948
+ const w = Q(
7931
7949
  n.duration,
7932
7950
  n.tScale,
7933
7951
  n.playbackRate
7934
- ), w = n.width + n.left;
7935
- if (w <= x) {
7936
- n.set("width", w);
7937
- const O = P(
7938
- x - w,
7952
+ ), S = n.width + n.left;
7953
+ if (S <= w) {
7954
+ n.set("width", S);
7955
+ const C = P(
7956
+ w - S,
7939
7957
  n.tScale,
7940
7958
  n.playbackRate
7941
7959
  );
7942
- return n.trim.from = O, !0;
7960
+ return n.trim.from = C, !0;
7943
7961
  }
7944
7962
  return !1;
7945
7963
  }
@@ -7959,18 +7977,18 @@ const { wrapWithFireEvent: gf, getLocalPoint: pf } = _s, mf = (i, t, e, s) => {
7959
7977
  return c !== n.width;
7960
7978
  }
7961
7979
  return !1;
7962
- }, dn = gf(
7980
+ }, dn = pf(
7963
7981
  "resizing",
7964
- yi(mf)
7982
+ yi(vf)
7965
7983
  ), is = class is extends st {
7966
7984
  constructor(e) {
7967
7985
  super(e);
7968
- S(this, "duration");
7969
- S(this, "fromId");
7970
- S(this, "toId");
7971
- S(this, "kind", "none");
7972
- S(this, "isSelected", !1);
7973
- S(this, "availableDrop", !0);
7986
+ x(this, "duration");
7987
+ x(this, "fromId");
7988
+ x(this, "toId");
7989
+ x(this, "kind", "none");
7990
+ x(this, "isSelected", !1);
7991
+ x(this, "availableDrop", !0);
7974
7992
  Object.assign(this, is.ownDefaults), this.id = e.id, this.centeredScaling = !0, this.strokeWidth = 0, this.tScale = e.tScale, this.duration = e.duration, this.fromId = e.fromId, this.toId = e.toId, this.kind = e.kind, this.strokeDashArray = e.strokeDashArray || [];
7975
7993
  }
7976
7994
  static createControls() {
@@ -8002,7 +8020,7 @@ const { wrapWithFireEvent: gf, getLocalPoint: pf } = _s, mf = (i, t, e, s) => {
8002
8020
  ), e.lineWidth = er, e.setLineDash(this.strokeDashArray), e.strokeStyle = s, e.stroke(), e.restore();
8003
8021
  }
8004
8022
  };
8005
- S(is, "type", "Transition"), S(is, "ownDefaults", {
8023
+ x(is, "type", "Transition"), x(is, "ownDefaults", {
8006
8024
  objectCaching: !1,
8007
8025
  borderColor: "transparent",
8008
8026
  stroke: "transparent",
@@ -8021,16 +8039,16 @@ k.setClass($t, "Transition");
8021
8039
  const Bs = class Bs extends st {
8022
8040
  constructor(e) {
8023
8041
  super(e);
8024
- S(this, "id");
8025
- S(this, "resourceId", "");
8026
- S(this, "tScale");
8027
- S(this, "isSelected", !1);
8028
- S(this, "trim");
8029
- S(this, "duration");
8042
+ x(this, "id");
8043
+ x(this, "resourceId", "");
8044
+ x(this, "tScale");
8045
+ x(this, "isSelected", !1);
8046
+ x(this, "trim");
8047
+ x(this, "duration");
8030
8048
  Object.assign(this, Bs.ownDefaults), this.id = e.id, this.tScale = e.tScale, this.objectCaching = !1, this.rx = 8, this.ry = 8;
8031
8049
  }
8032
8050
  static createControls() {
8033
- return { controls: df() };
8051
+ return { controls: ff() };
8034
8052
  }
8035
8053
  // add custom text to the track item
8036
8054
  _render(e) {
@@ -8054,7 +8072,7 @@ const Bs = class Bs extends st {
8054
8072
  this.src = e;
8055
8073
  }
8056
8074
  };
8057
- S(Bs, "type", "Trimmable"), S(Bs, "ownDefaults", {
8075
+ x(Bs, "type", "Trimmable"), x(Bs, "ownDefaults", {
8058
8076
  rx: 6,
8059
8077
  ry: 6,
8060
8078
  objectCaching: !1,
@@ -8070,11 +8088,11 @@ k.setClass(ne, "Trimmable");
8070
8088
  const ns = class ns extends st {
8071
8089
  constructor(e) {
8072
8090
  super(e);
8073
- S(this, "isSelected", !1);
8091
+ x(this, "isSelected", !1);
8074
8092
  Object.assign(this, ns.ownDefaults), this.tScale = e.tScale, this.display = e.display;
8075
8093
  }
8076
8094
  static createControls() {
8077
- return { controls: uf() };
8095
+ return { controls: df() };
8078
8096
  }
8079
8097
  static getDefaults() {
8080
8098
  return {
@@ -8099,7 +8117,7 @@ const ns = class ns extends st {
8099
8117
  ), e.lineWidth = er, e.strokeStyle = Ue, e.stroke(), e.restore());
8100
8118
  }
8101
8119
  };
8102
- S(ns, "type", "Resizable"), S(ns, "ownDefaults", {
8120
+ x(ns, "type", "Resizable"), x(ns, "ownDefaults", {
8103
8121
  rx: 6,
8104
8122
  ry: 6,
8105
8123
  objectCaching: !1,
@@ -8112,21 +8130,21 @@ S(ns, "type", "Resizable"), S(ns, "ownDefaults", {
8112
8130
  });
8113
8131
  let fn = ns;
8114
8132
  k.setClass(fn, "Resizable");
8115
- function vf(i) {
8133
+ function yf(i) {
8116
8134
  const t = Math.floor(i / 1e3), e = Math.floor(t / 60), s = t % 60, r = String(e).padStart(2, "0"), n = String(s).padStart(2, "0");
8117
8135
  return `${r}:${n}`;
8118
8136
  }
8119
8137
  const os = class os extends st {
8120
8138
  constructor(e) {
8121
8139
  super(e);
8122
- S(this, "duration");
8123
- S(this, "fromId");
8124
- S(this, "toId");
8125
- S(this, "isSelected", !1);
8126
- S(this, "name");
8127
- S(this, "durationString");
8128
- S(this, "itemType");
8129
- Object.assign(this, os.ownDefaults), this.id = e.id, this.fill = "#27272a", this.name = e.type.toUpperCase(), this.durationString = vf(e.duration), this.itemType = e.type;
8140
+ x(this, "duration");
8141
+ x(this, "fromId");
8142
+ x(this, "toId");
8143
+ x(this, "isSelected", !1);
8144
+ x(this, "name");
8145
+ x(this, "durationString");
8146
+ x(this, "itemType");
8147
+ Object.assign(this, os.ownDefaults), this.id = e.id, this.fill = "#27272a", this.name = e.type.toUpperCase(), this.durationString = yf(e.duration), this.itemType = e.type;
8130
8148
  }
8131
8149
  static getDefaults() {
8132
8150
  return {
@@ -8162,7 +8180,7 @@ const os = class os extends st {
8162
8180
  e.fillStyle = "rgba(0, 0, 0, 0.5)", e.roundRect ? (e.beginPath(), e.roundRect(s, r, n, o, a), e.fill()) : e.fillRect(s, r, n, o);
8163
8181
  }
8164
8182
  };
8165
- S(os, "type", "PreviewTrackItem"), S(os, "ownDefaults", {
8183
+ x(os, "type", "PreviewTrackItem"), x(os, "ownDefaults", {
8166
8184
  objectCaching: !1,
8167
8185
  borderColor: "transparent",
8168
8186
  stroke: "transparent",
@@ -8174,10 +8192,10 @@ S(os, "type", "PreviewTrackItem"), S(os, "ownDefaults", {
8174
8192
  });
8175
8193
  let we = os;
8176
8194
  k.setClass(we, "PreviewTrackItem");
8177
- class yf {
8195
+ class bf {
8178
8196
  constructor() {
8179
- S(this, "___eventListeners", {});
8180
- S(this, "___activeObjects", []);
8197
+ x(this, "___eventListeners", {});
8198
+ x(this, "___activeObjects", []);
8181
8199
  }
8182
8200
  resize(t, { force: e } = { force: !1 }) {
8183
8201
  var s;
@@ -8218,7 +8236,7 @@ function Gs(i, t) {
8218
8236
  items: e.items.filter((s) => !t.includes(s))
8219
8237
  }));
8220
8238
  }
8221
- const bf = (i, t) => {
8239
+ const _f = (i, t) => {
8222
8240
  var h, l, u, d, f, g, p, m;
8223
8241
  const e = i.display, s = Q(e.from, t.tScale), r = Q(
8224
8242
  e.to - e.from,
@@ -8244,33 +8262,33 @@ const bf = (i, t) => {
8244
8262
  };
8245
8263
  return new a(c);
8246
8264
  };
8247
- var lh = typeof global == "object" && global && global.Object === Object && global, _f = typeof self == "object" && self && self.Object === Object && self, Rt = lh || _f || Function("return this")(), Ot = Rt.Symbol, uh = Object.prototype, Tf = uh.hasOwnProperty, xf = uh.toString, Os = Ot ? Ot.toStringTag : void 0;
8248
- function Sf(i) {
8249
- var t = Tf.call(i, Os), e = i[Os];
8265
+ var lh = typeof global == "object" && global && global.Object === Object && global, Tf = typeof self == "object" && self && self.Object === Object && self, Rt = lh || Tf || Function("return this")(), Ot = Rt.Symbol, uh = Object.prototype, xf = uh.hasOwnProperty, Sf = uh.toString, Os = Ot ? Ot.toStringTag : void 0;
8266
+ function wf(i) {
8267
+ var t = xf.call(i, Os), e = i[Os];
8250
8268
  try {
8251
8269
  i[Os] = void 0;
8252
8270
  var s = !0;
8253
8271
  } catch {
8254
8272
  }
8255
- var r = xf.call(i);
8273
+ var r = Sf.call(i);
8256
8274
  return s && (t ? i[Os] = e : delete i[Os]), r;
8257
8275
  }
8258
- var wf = Object.prototype, Cf = wf.toString;
8259
- function Of(i) {
8260
- return Cf.call(i);
8276
+ var Cf = Object.prototype, Of = Cf.toString;
8277
+ function kf(i) {
8278
+ return Of.call(i);
8261
8279
  }
8262
- var kf = "[object Null]", Mf = "[object Undefined]", Go = Ot ? Ot.toStringTag : void 0;
8280
+ var Mf = "[object Null]", Df = "[object Undefined]", Go = Ot ? Ot.toStringTag : void 0;
8263
8281
  function Ts(i) {
8264
- return i == null ? i === void 0 ? Mf : kf : Go && Go in Object(i) ? Sf(i) : Of(i);
8282
+ return i == null ? i === void 0 ? Df : Mf : Go && Go in Object(i) ? wf(i) : kf(i);
8265
8283
  }
8266
8284
  function Ce(i) {
8267
8285
  return i != null && typeof i == "object";
8268
8286
  }
8269
- var Df = "[object Symbol]";
8287
+ var If = "[object Symbol]";
8270
8288
  function bi(i) {
8271
- return typeof i == "symbol" || Ce(i) && Ts(i) == Df;
8289
+ return typeof i == "symbol" || Ce(i) && Ts(i) == If;
8272
8290
  }
8273
- function If(i, t) {
8291
+ function jf(i, t) {
8274
8292
  for (var e = -1, s = i == null ? 0 : i.length, r = Array(s); ++e < s; )
8275
8293
  r[e] = t(i[e], e, i);
8276
8294
  return r;
@@ -8280,27 +8298,27 @@ function dh(i) {
8280
8298
  if (typeof i == "string")
8281
8299
  return i;
8282
8300
  if (qt(i))
8283
- return If(i, dh) + "";
8301
+ return jf(i, dh) + "";
8284
8302
  if (bi(i))
8285
8303
  return Uo ? Uo.call(i) : "";
8286
8304
  var t = i + "";
8287
8305
  return t == "0" && 1 / i == -1 / 0 ? "-0" : t;
8288
8306
  }
8289
- var jf = /\s/;
8290
- function Ef(i) {
8291
- for (var t = i.length; t-- && jf.test(i.charAt(t)); )
8307
+ var Ef = /\s/;
8308
+ function Pf(i) {
8309
+ for (var t = i.length; t-- && Ef.test(i.charAt(t)); )
8292
8310
  ;
8293
8311
  return t;
8294
8312
  }
8295
- var Pf = /^\s+/;
8296
- function Af(i) {
8297
- return i && i.slice(0, Ef(i) + 1).replace(Pf, "");
8313
+ var Af = /^\s+/;
8314
+ function Lf(i) {
8315
+ return i && i.slice(0, Pf(i) + 1).replace(Af, "");
8298
8316
  }
8299
8317
  function Kt(i) {
8300
8318
  var t = typeof i;
8301
8319
  return i != null && (t == "object" || t == "function");
8302
8320
  }
8303
- var $o = NaN, Lf = /^[-+]0x[0-9a-f]+$/i, Rf = /^0b[01]+$/i, Ff = /^0o[0-7]+$/i, Bf = parseInt;
8321
+ var $o = NaN, Rf = /^[-+]0x[0-9a-f]+$/i, Ff = /^0b[01]+$/i, Bf = /^0o[0-7]+$/i, Wf = parseInt;
8304
8322
  function qo(i) {
8305
8323
  if (typeof i == "number")
8306
8324
  return i;
@@ -8312,32 +8330,32 @@ function qo(i) {
8312
8330
  }
8313
8331
  if (typeof i != "string")
8314
8332
  return i === 0 ? i : +i;
8315
- i = Af(i);
8316
- var e = Rf.test(i);
8317
- return e || Ff.test(i) ? Bf(i.slice(2), e ? 2 : 8) : Lf.test(i) ? $o : +i;
8333
+ i = Lf(i);
8334
+ var e = Ff.test(i);
8335
+ return e || Bf.test(i) ? Wf(i.slice(2), e ? 2 : 8) : Rf.test(i) ? $o : +i;
8318
8336
  }
8319
- function Wf(i) {
8337
+ function Xf(i) {
8320
8338
  return i;
8321
8339
  }
8322
- var Xf = "[object AsyncFunction]", zf = "[object Function]", Hf = "[object GeneratorFunction]", Yf = "[object Proxy]";
8340
+ var zf = "[object AsyncFunction]", Hf = "[object Function]", Yf = "[object GeneratorFunction]", Vf = "[object Proxy]";
8323
8341
  function fh(i) {
8324
8342
  if (!Kt(i))
8325
8343
  return !1;
8326
8344
  var t = Ts(i);
8327
- return t == zf || t == Hf || t == Xf || t == Yf;
8345
+ return t == Hf || t == Yf || t == zf || t == Vf;
8328
8346
  }
8329
8347
  var Xi = Rt["__core-js_shared__"], Ko = function() {
8330
8348
  var i = /[^.]+$/.exec(Xi && Xi.keys && Xi.keys.IE_PROTO || "");
8331
8349
  return i ? "Symbol(src)_1." + i : "";
8332
8350
  }();
8333
- function Vf(i) {
8351
+ function Gf(i) {
8334
8352
  return !!Ko && Ko in i;
8335
8353
  }
8336
- var Gf = Function.prototype, Nf = Gf.toString;
8354
+ var Nf = Function.prototype, Uf = Nf.toString;
8337
8355
  function $e(i) {
8338
8356
  if (i != null) {
8339
8357
  try {
8340
- return Nf.call(i);
8358
+ return Uf.call(i);
8341
8359
  } catch {
8342
8360
  }
8343
8361
  try {
@@ -8347,23 +8365,23 @@ function $e(i) {
8347
8365
  }
8348
8366
  return "";
8349
8367
  }
8350
- var Uf = /[\\^$.*+?()[\]{}|]/g, $f = /^\[object .+?Constructor\]$/, qf = Function.prototype, Kf = Object.prototype, Jf = qf.toString, Zf = Kf.hasOwnProperty, Qf = RegExp(
8351
- "^" + Jf.call(Zf).replace(Uf, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
8368
+ var $f = /[\\^$.*+?()[\]{}|]/g, qf = /^\[object .+?Constructor\]$/, Kf = Function.prototype, Jf = Object.prototype, Zf = Kf.toString, Qf = Jf.hasOwnProperty, tg = RegExp(
8369
+ "^" + Zf.call(Qf).replace($f, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
8352
8370
  );
8353
- function tg(i) {
8354
- if (!Kt(i) || Vf(i))
8371
+ function eg(i) {
8372
+ if (!Kt(i) || Gf(i))
8355
8373
  return !1;
8356
- var t = fh(i) ? Qf : $f;
8374
+ var t = fh(i) ? tg : qf;
8357
8375
  return t.test($e(i));
8358
8376
  }
8359
- function eg(i, t) {
8377
+ function sg(i, t) {
8360
8378
  return i == null ? void 0 : i[t];
8361
8379
  }
8362
8380
  function qe(i, t) {
8363
- var e = eg(i, t);
8364
- return tg(e) ? e : void 0;
8381
+ var e = sg(i, t);
8382
+ return eg(e) ? e : void 0;
8365
8383
  }
8366
- var gn = qe(Rt, "WeakMap"), Jo = Object.create, sg = /* @__PURE__ */ function() {
8384
+ var gn = qe(Rt, "WeakMap"), Jo = Object.create, rg = /* @__PURE__ */ function() {
8367
8385
  function i() {
8368
8386
  }
8369
8387
  return function(t) {
@@ -8376,7 +8394,7 @@ var gn = qe(Rt, "WeakMap"), Jo = Object.create, sg = /* @__PURE__ */ function()
8376
8394
  return i.prototype = void 0, e;
8377
8395
  };
8378
8396
  }();
8379
- function rg(i, t, e) {
8397
+ function ig(i, t, e) {
8380
8398
  switch (e.length) {
8381
8399
  case 0:
8382
8400
  return i.call(t);
@@ -8389,20 +8407,20 @@ function rg(i, t, e) {
8389
8407
  }
8390
8408
  return i.apply(t, e);
8391
8409
  }
8392
- var ig = 800, ng = 16, og = Date.now;
8393
- function ag(i) {
8410
+ var ng = 800, og = 16, ag = Date.now;
8411
+ function cg(i) {
8394
8412
  var t = 0, e = 0;
8395
8413
  return function() {
8396
- var s = og(), r = ng - (s - e);
8414
+ var s = ag(), r = og - (s - e);
8397
8415
  if (e = s, r > 0) {
8398
- if (++t >= ig)
8416
+ if (++t >= ng)
8399
8417
  return arguments[0];
8400
8418
  } else
8401
8419
  t = 0;
8402
8420
  return i.apply(void 0, arguments);
8403
8421
  };
8404
8422
  }
8405
- function cg(i) {
8423
+ function hg(i) {
8406
8424
  return function() {
8407
8425
  return i;
8408
8426
  };
@@ -8413,25 +8431,25 @@ var ti = function() {
8413
8431
  return i({}, "", {}), i;
8414
8432
  } catch {
8415
8433
  }
8416
- }(), hg = ti ? function(i, t) {
8434
+ }(), lg = ti ? function(i, t) {
8417
8435
  return ti(i, "toString", {
8418
8436
  configurable: !0,
8419
8437
  enumerable: !1,
8420
- value: cg(t),
8438
+ value: hg(t),
8421
8439
  writable: !0
8422
8440
  });
8423
- } : Wf, lg = ag(hg);
8424
- function ug(i, t) {
8441
+ } : Xf, ug = cg(lg);
8442
+ function dg(i, t) {
8425
8443
  for (var e = -1, s = i == null ? 0 : i.length; ++e < s && t(i[e], e, i) !== !1; )
8426
8444
  ;
8427
8445
  return i;
8428
8446
  }
8429
- var dg = 9007199254740991, fg = /^(?:0|[1-9]\d*)$/;
8447
+ var fg = 9007199254740991, gg = /^(?:0|[1-9]\d*)$/;
8430
8448
  function Nn(i, t) {
8431
8449
  var e = typeof i;
8432
- return t = t ?? dg, !!t && (e == "number" || e != "symbol" && fg.test(i)) && i > -1 && i % 1 == 0 && i < t;
8450
+ return t = t ?? fg, !!t && (e == "number" || e != "symbol" && gg.test(i)) && i > -1 && i % 1 == 0 && i < t;
8433
8451
  }
8434
- function gg(i, t, e) {
8452
+ function pg(i, t, e) {
8435
8453
  t == "__proto__" && ti ? ti(i, t, {
8436
8454
  configurable: !0,
8437
8455
  enumerable: !0,
@@ -8442,55 +8460,55 @@ function gg(i, t, e) {
8442
8460
  function Un(i, t) {
8443
8461
  return i === t || i !== i && t !== t;
8444
8462
  }
8445
- var pg = Object.prototype, mg = pg.hasOwnProperty;
8463
+ var mg = Object.prototype, vg = mg.hasOwnProperty;
8446
8464
  function gh(i, t, e) {
8447
8465
  var s = i[t];
8448
- (!(mg.call(i, t) && Un(s, e)) || e === void 0 && !(t in i)) && gg(i, t, e);
8466
+ (!(vg.call(i, t) && Un(s, e)) || e === void 0 && !(t in i)) && pg(i, t, e);
8449
8467
  }
8450
8468
  var Zo = Math.max;
8451
- function vg(i, t, e) {
8469
+ function yg(i, t, e) {
8452
8470
  return t = Zo(t === void 0 ? i.length - 1 : t, 0), function() {
8453
8471
  for (var s = arguments, r = -1, n = Zo(s.length - t, 0), o = Array(n); ++r < n; )
8454
8472
  o[r] = s[t + r];
8455
8473
  r = -1;
8456
8474
  for (var a = Array(t + 1); ++r < t; )
8457
8475
  a[r] = s[r];
8458
- return a[t] = e(o), rg(i, this, a);
8476
+ return a[t] = e(o), ig(i, this, a);
8459
8477
  };
8460
8478
  }
8461
- var yg = 9007199254740991;
8479
+ var bg = 9007199254740991;
8462
8480
  function $n(i) {
8463
- return typeof i == "number" && i > -1 && i % 1 == 0 && i <= yg;
8481
+ return typeof i == "number" && i > -1 && i % 1 == 0 && i <= bg;
8464
8482
  }
8465
- function bg(i) {
8483
+ function _g(i) {
8466
8484
  return i != null && $n(i.length) && !fh(i);
8467
8485
  }
8468
- var _g = Object.prototype;
8486
+ var Tg = Object.prototype;
8469
8487
  function ph(i) {
8470
- var t = i && i.constructor, e = typeof t == "function" && t.prototype || _g;
8488
+ var t = i && i.constructor, e = typeof t == "function" && t.prototype || Tg;
8471
8489
  return i === e;
8472
8490
  }
8473
- function Tg(i, t) {
8491
+ function xg(i, t) {
8474
8492
  for (var e = -1, s = Array(i); ++e < i; )
8475
8493
  s[e] = t(e);
8476
8494
  return s;
8477
8495
  }
8478
- var xg = "[object Arguments]";
8496
+ var Sg = "[object Arguments]";
8479
8497
  function Qo(i) {
8480
- return Ce(i) && Ts(i) == xg;
8498
+ return Ce(i) && Ts(i) == Sg;
8481
8499
  }
8482
- var mh = Object.prototype, Sg = mh.hasOwnProperty, wg = mh.propertyIsEnumerable, qn = Qo(/* @__PURE__ */ function() {
8500
+ var mh = Object.prototype, wg = mh.hasOwnProperty, Cg = mh.propertyIsEnumerable, qn = Qo(/* @__PURE__ */ function() {
8483
8501
  return arguments;
8484
8502
  }()) ? Qo : function(i) {
8485
- return Ce(i) && Sg.call(i, "callee") && !wg.call(i, "callee");
8503
+ return Ce(i) && wg.call(i, "callee") && !Cg.call(i, "callee");
8486
8504
  };
8487
- function Cg() {
8505
+ function Og() {
8488
8506
  return !1;
8489
8507
  }
8490
- var vh = typeof exports == "object" && exports && !exports.nodeType && exports, ta = vh && typeof module == "object" && module && !module.nodeType && module, Og = ta && ta.exports === vh, ea = Og ? Rt.Buffer : void 0, kg = ea ? ea.isBuffer : void 0, ei = kg || Cg, Mg = "[object Arguments]", Dg = "[object Array]", Ig = "[object Boolean]", jg = "[object Date]", Eg = "[object Error]", Pg = "[object Function]", Ag = "[object Map]", Lg = "[object Number]", Rg = "[object Object]", Fg = "[object RegExp]", Bg = "[object Set]", Wg = "[object String]", Xg = "[object WeakMap]", zg = "[object ArrayBuffer]", Hg = "[object DataView]", Yg = "[object Float32Array]", Vg = "[object Float64Array]", Gg = "[object Int8Array]", Ng = "[object Int16Array]", Ug = "[object Int32Array]", $g = "[object Uint8Array]", qg = "[object Uint8ClampedArray]", Kg = "[object Uint16Array]", Jg = "[object Uint32Array]", G = {};
8491
- G[Yg] = G[Vg] = G[Gg] = G[Ng] = G[Ug] = G[$g] = G[qg] = G[Kg] = G[Jg] = !0;
8492
- G[Mg] = G[Dg] = G[zg] = G[Ig] = G[Hg] = G[jg] = G[Eg] = G[Pg] = G[Ag] = G[Lg] = G[Rg] = G[Fg] = G[Bg] = G[Wg] = G[Xg] = !1;
8493
- function Zg(i) {
8508
+ var vh = typeof exports == "object" && exports && !exports.nodeType && exports, ta = vh && typeof module == "object" && module && !module.nodeType && module, kg = ta && ta.exports === vh, ea = kg ? Rt.Buffer : void 0, Mg = ea ? ea.isBuffer : void 0, ei = Mg || Og, Dg = "[object Arguments]", Ig = "[object Array]", jg = "[object Boolean]", Eg = "[object Date]", Pg = "[object Error]", Ag = "[object Function]", Lg = "[object Map]", Rg = "[object Number]", Fg = "[object Object]", Bg = "[object RegExp]", Wg = "[object Set]", Xg = "[object String]", zg = "[object WeakMap]", Hg = "[object ArrayBuffer]", Yg = "[object DataView]", Vg = "[object Float32Array]", Gg = "[object Float64Array]", Ng = "[object Int8Array]", Ug = "[object Int16Array]", $g = "[object Int32Array]", qg = "[object Uint8Array]", Kg = "[object Uint8ClampedArray]", Jg = "[object Uint16Array]", Zg = "[object Uint32Array]", G = {};
8509
+ G[Vg] = G[Gg] = G[Ng] = G[Ug] = G[$g] = G[qg] = G[Kg] = G[Jg] = G[Zg] = !0;
8510
+ G[Dg] = G[Ig] = G[Hg] = G[jg] = G[Yg] = G[Eg] = G[Pg] = G[Ag] = G[Lg] = G[Rg] = G[Fg] = G[Bg] = G[Wg] = G[Xg] = G[zg] = !1;
8511
+ function Qg(i) {
8494
8512
  return Ce(i) && $n(i.length) && !!G[Ts(i)];
8495
8513
  }
8496
8514
  function Kn(i) {
@@ -8498,17 +8516,17 @@ function Kn(i) {
8498
8516
  return i(t);
8499
8517
  };
8500
8518
  }
8501
- var yh = typeof exports == "object" && exports && !exports.nodeType && exports, Rs = yh && typeof module == "object" && module && !module.nodeType && module, Qg = Rs && Rs.exports === yh, zi = Qg && lh.process, ps = function() {
8519
+ var yh = typeof exports == "object" && exports && !exports.nodeType && exports, Rs = yh && typeof module == "object" && module && !module.nodeType && module, tp = Rs && Rs.exports === yh, zi = tp && lh.process, ps = function() {
8502
8520
  try {
8503
8521
  var i = Rs && Rs.require && Rs.require("util").types;
8504
8522
  return i || zi && zi.binding && zi.binding("util");
8505
8523
  } catch {
8506
8524
  }
8507
- }(), sa = ps && ps.isTypedArray, bh = sa ? Kn(sa) : Zg, tp = Object.prototype, ep = tp.hasOwnProperty;
8508
- function sp(i, t) {
8509
- var e = qt(i), s = !e && qn(i), r = !e && !s && ei(i), n = !e && !s && !r && bh(i), o = e || s || r || n, a = o ? Tg(i.length, String) : [], c = a.length;
8525
+ }(), sa = ps && ps.isTypedArray, bh = sa ? Kn(sa) : Qg, ep = Object.prototype, sp = ep.hasOwnProperty;
8526
+ function rp(i, t) {
8527
+ var e = qt(i), s = !e && qn(i), r = !e && !s && ei(i), n = !e && !s && !r && bh(i), o = e || s || r || n, a = o ? xg(i.length, String) : [], c = a.length;
8510
8528
  for (var h in i)
8511
- ep.call(i, h) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
8529
+ sp.call(i, h) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
8512
8530
  (h == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
8513
8531
  r && (h == "offset" || h == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
8514
8532
  n && (h == "buffer" || h == "byteLength" || h == "byteOffset") || // Skip index properties.
@@ -8520,51 +8538,51 @@ function _h(i, t) {
8520
8538
  return i(t(e));
8521
8539
  };
8522
8540
  }
8523
- var rp = _h(Object.keys, Object), ip = Object.prototype, np = ip.hasOwnProperty;
8524
- function op(i) {
8541
+ var ip = _h(Object.keys, Object), np = Object.prototype, op = np.hasOwnProperty;
8542
+ function ap(i) {
8525
8543
  if (!ph(i))
8526
- return rp(i);
8544
+ return ip(i);
8527
8545
  var t = [];
8528
8546
  for (var e in Object(i))
8529
- np.call(i, e) && e != "constructor" && t.push(e);
8547
+ op.call(i, e) && e != "constructor" && t.push(e);
8530
8548
  return t;
8531
8549
  }
8532
- function ap(i) {
8533
- return bg(i) ? sp(i) : op(i);
8550
+ function cp(i) {
8551
+ return _g(i) ? rp(i) : ap(i);
8534
8552
  }
8535
- var cp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, hp = /^\w*$/;
8536
- function lp(i, t) {
8553
+ var hp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, lp = /^\w*$/;
8554
+ function up(i, t) {
8537
8555
  if (qt(i))
8538
8556
  return !1;
8539
8557
  var e = typeof i;
8540
- return e == "number" || e == "symbol" || e == "boolean" || i == null || bi(i) ? !0 : hp.test(i) || !cp.test(i) || t != null && i in Object(t);
8558
+ return e == "number" || e == "symbol" || e == "boolean" || i == null || bi(i) ? !0 : lp.test(i) || !hp.test(i) || t != null && i in Object(t);
8541
8559
  }
8542
8560
  var Ns = qe(Object, "create");
8543
- function up() {
8561
+ function dp() {
8544
8562
  this.__data__ = Ns ? Ns(null) : {}, this.size = 0;
8545
8563
  }
8546
- function dp(i) {
8564
+ function fp(i) {
8547
8565
  var t = this.has(i) && delete this.__data__[i];
8548
8566
  return this.size -= t ? 1 : 0, t;
8549
8567
  }
8550
- var fp = "__lodash_hash_undefined__", gp = Object.prototype, pp = gp.hasOwnProperty;
8551
- function mp(i) {
8568
+ var gp = "__lodash_hash_undefined__", pp = Object.prototype, mp = pp.hasOwnProperty;
8569
+ function vp(i) {
8552
8570
  var t = this.__data__;
8553
8571
  if (Ns) {
8554
8572
  var e = t[i];
8555
- return e === fp ? void 0 : e;
8573
+ return e === gp ? void 0 : e;
8556
8574
  }
8557
- return pp.call(t, i) ? t[i] : void 0;
8575
+ return mp.call(t, i) ? t[i] : void 0;
8558
8576
  }
8559
- var vp = Object.prototype, yp = vp.hasOwnProperty;
8560
- function bp(i) {
8577
+ var yp = Object.prototype, bp = yp.hasOwnProperty;
8578
+ function _p(i) {
8561
8579
  var t = this.__data__;
8562
- return Ns ? t[i] !== void 0 : yp.call(t, i);
8580
+ return Ns ? t[i] !== void 0 : bp.call(t, i);
8563
8581
  }
8564
- var _p = "__lodash_hash_undefined__";
8565
- function Tp(i, t) {
8582
+ var Tp = "__lodash_hash_undefined__";
8583
+ function xp(i, t) {
8566
8584
  var e = this.__data__;
8567
- return this.size += this.has(i) ? 0 : 1, e[i] = Ns && t === void 0 ? _p : t, this;
8585
+ return this.size += this.has(i) ? 0 : 1, e[i] = Ns && t === void 0 ? Tp : t, this;
8568
8586
  }
8569
8587
  function He(i) {
8570
8588
  var t = -1, e = i == null ? 0 : i.length;
@@ -8573,12 +8591,12 @@ function He(i) {
8573
8591
  this.set(s[0], s[1]);
8574
8592
  }
8575
8593
  }
8576
- He.prototype.clear = up;
8577
- He.prototype.delete = dp;
8578
- He.prototype.get = mp;
8579
- He.prototype.has = bp;
8580
- He.prototype.set = Tp;
8581
- function xp() {
8594
+ He.prototype.clear = dp;
8595
+ He.prototype.delete = fp;
8596
+ He.prototype.get = vp;
8597
+ He.prototype.has = _p;
8598
+ He.prototype.set = xp;
8599
+ function Sp() {
8582
8600
  this.__data__ = [], this.size = 0;
8583
8601
  }
8584
8602
  function _i(i, t) {
@@ -8587,22 +8605,22 @@ function _i(i, t) {
8587
8605
  return e;
8588
8606
  return -1;
8589
8607
  }
8590
- var Sp = Array.prototype, wp = Sp.splice;
8591
- function Cp(i) {
8608
+ var wp = Array.prototype, Cp = wp.splice;
8609
+ function Op(i) {
8592
8610
  var t = this.__data__, e = _i(t, i);
8593
8611
  if (e < 0)
8594
8612
  return !1;
8595
8613
  var s = t.length - 1;
8596
- return e == s ? t.pop() : wp.call(t, e, 1), --this.size, !0;
8614
+ return e == s ? t.pop() : Cp.call(t, e, 1), --this.size, !0;
8597
8615
  }
8598
- function Op(i) {
8616
+ function kp(i) {
8599
8617
  var t = this.__data__, e = _i(t, i);
8600
8618
  return e < 0 ? void 0 : t[e][1];
8601
8619
  }
8602
- function kp(i) {
8620
+ function Mp(i) {
8603
8621
  return _i(this.__data__, i) > -1;
8604
8622
  }
8605
- function Mp(i, t) {
8623
+ function Dp(i, t) {
8606
8624
  var e = this.__data__, s = _i(e, i);
8607
8625
  return s < 0 ? (++this.size, e.push([i, t])) : e[s][1] = t, this;
8608
8626
  }
@@ -8613,38 +8631,38 @@ function de(i) {
8613
8631
  this.set(s[0], s[1]);
8614
8632
  }
8615
8633
  }
8616
- de.prototype.clear = xp;
8617
- de.prototype.delete = Cp;
8618
- de.prototype.get = Op;
8619
- de.prototype.has = kp;
8620
- de.prototype.set = Mp;
8634
+ de.prototype.clear = Sp;
8635
+ de.prototype.delete = Op;
8636
+ de.prototype.get = kp;
8637
+ de.prototype.has = Mp;
8638
+ de.prototype.set = Dp;
8621
8639
  var Us = qe(Rt, "Map");
8622
- function Dp() {
8640
+ function Ip() {
8623
8641
  this.size = 0, this.__data__ = {
8624
8642
  hash: new He(),
8625
8643
  map: new (Us || de)(),
8626
8644
  string: new He()
8627
8645
  };
8628
8646
  }
8629
- function Ip(i) {
8647
+ function jp(i) {
8630
8648
  var t = typeof i;
8631
8649
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? i !== "__proto__" : i === null;
8632
8650
  }
8633
8651
  function Ti(i, t) {
8634
8652
  var e = i.__data__;
8635
- return Ip(t) ? e[typeof t == "string" ? "string" : "hash"] : e.map;
8653
+ return jp(t) ? e[typeof t == "string" ? "string" : "hash"] : e.map;
8636
8654
  }
8637
- function jp(i) {
8655
+ function Ep(i) {
8638
8656
  var t = Ti(this, i).delete(i);
8639
8657
  return this.size -= t ? 1 : 0, t;
8640
8658
  }
8641
- function Ep(i) {
8659
+ function Pp(i) {
8642
8660
  return Ti(this, i).get(i);
8643
8661
  }
8644
- function Pp(i) {
8662
+ function Ap(i) {
8645
8663
  return Ti(this, i).has(i);
8646
8664
  }
8647
- function Ap(i, t) {
8665
+ function Lp(i, t) {
8648
8666
  var e = Ti(this, i), s = e.size;
8649
8667
  return e.set(i, t), this.size += e.size == s ? 0 : 1, this;
8650
8668
  }
@@ -8655,15 +8673,15 @@ function fe(i) {
8655
8673
  this.set(s[0], s[1]);
8656
8674
  }
8657
8675
  }
8658
- fe.prototype.clear = Dp;
8659
- fe.prototype.delete = jp;
8660
- fe.prototype.get = Ep;
8661
- fe.prototype.has = Pp;
8662
- fe.prototype.set = Ap;
8663
- var Lp = "Expected a function";
8676
+ fe.prototype.clear = Ip;
8677
+ fe.prototype.delete = Ep;
8678
+ fe.prototype.get = Pp;
8679
+ fe.prototype.has = Ap;
8680
+ fe.prototype.set = Lp;
8681
+ var Rp = "Expected a function";
8664
8682
  function Jn(i, t) {
8665
8683
  if (typeof i != "function" || t != null && typeof t != "function")
8666
- throw new TypeError(Lp);
8684
+ throw new TypeError(Rp);
8667
8685
  var e = function() {
8668
8686
  var s = arguments, r = t ? t.apply(this, s) : s[0], n = e.cache;
8669
8687
  if (n.has(r))
@@ -8674,24 +8692,24 @@ function Jn(i, t) {
8674
8692
  return e.cache = new (Jn.Cache || fe)(), e;
8675
8693
  }
8676
8694
  Jn.Cache = fe;
8677
- var Rp = 500;
8678
- function Fp(i) {
8695
+ var Fp = 500;
8696
+ function Bp(i) {
8679
8697
  var t = Jn(i, function(s) {
8680
- return e.size === Rp && e.clear(), s;
8698
+ return e.size === Fp && e.clear(), s;
8681
8699
  }), e = t.cache;
8682
8700
  return t;
8683
8701
  }
8684
- var Bp = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Wp = /\\(\\)?/g, Xp = Fp(function(i) {
8702
+ var Wp = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Xp = /\\(\\)?/g, zp = Bp(function(i) {
8685
8703
  var t = [];
8686
- return i.charCodeAt(0) === 46 && t.push(""), i.replace(Bp, function(e, s, r, n) {
8687
- t.push(r ? n.replace(Wp, "$1") : s || e);
8704
+ return i.charCodeAt(0) === 46 && t.push(""), i.replace(Wp, function(e, s, r, n) {
8705
+ t.push(r ? n.replace(Xp, "$1") : s || e);
8688
8706
  }), t;
8689
8707
  });
8690
- function zp(i) {
8708
+ function Hp(i) {
8691
8709
  return i == null ? "" : dh(i);
8692
8710
  }
8693
8711
  function xi(i, t) {
8694
- return qt(i) ? i : lp(i, t) ? [i] : Xp(zp(i));
8712
+ return qt(i) ? i : up(i, t) ? [i] : zp(Hp(i));
8695
8713
  }
8696
8714
  function Zn(i) {
8697
8715
  if (typeof i == "string" || bi(i))
@@ -8699,7 +8717,7 @@ function Zn(i) {
8699
8717
  var t = i + "";
8700
8718
  return t == "0" && 1 / i == -1 / 0 ? "-0" : t;
8701
8719
  }
8702
- function Hp(i, t) {
8720
+ function Yp(i, t) {
8703
8721
  t = xi(t, i);
8704
8722
  for (var e = 0, s = t.length; i != null && e < s; )
8705
8723
  i = i[Zn(t[e++])];
@@ -8711,12 +8729,12 @@ function Th(i, t) {
8711
8729
  return i;
8712
8730
  }
8713
8731
  var ra = Ot ? Ot.isConcatSpreadable : void 0;
8714
- function Yp(i) {
8732
+ function Vp(i) {
8715
8733
  return qt(i) || qn(i) || !!(ra && i && i[ra]);
8716
8734
  }
8717
- function Vp(i, t, e, s, r) {
8735
+ function Gp(i, t, e, s, r) {
8718
8736
  var n = -1, o = i.length;
8719
- for (e || (e = Yp), r || (r = []); ++n < o; ) {
8737
+ for (e || (e = Vp), r || (r = []); ++n < o; ) {
8720
8738
  var a = i[n];
8721
8739
  e(a) ? Th(r, a) : r[r.length] = a;
8722
8740
  }
@@ -8724,31 +8742,31 @@ function Vp(i, t, e, s, r) {
8724
8742
  }
8725
8743
  function Qn(i) {
8726
8744
  var t = i == null ? 0 : i.length;
8727
- return t ? Vp(i) : [];
8745
+ return t ? Gp(i) : [];
8728
8746
  }
8729
- function Gp(i) {
8730
- return lg(vg(i, void 0, Qn), i + "");
8747
+ function Np(i) {
8748
+ return ug(yg(i, void 0, Qn), i + "");
8731
8749
  }
8732
- var Np = _h(Object.getPrototypeOf, Object);
8733
- function Up() {
8750
+ var Up = _h(Object.getPrototypeOf, Object);
8751
+ function $p() {
8734
8752
  this.__data__ = new de(), this.size = 0;
8735
8753
  }
8736
- function $p(i) {
8754
+ function qp(i) {
8737
8755
  var t = this.__data__, e = t.delete(i);
8738
8756
  return this.size = t.size, e;
8739
8757
  }
8740
- function qp(i) {
8758
+ function Kp(i) {
8741
8759
  return this.__data__.get(i);
8742
8760
  }
8743
- function Kp(i) {
8761
+ function Jp(i) {
8744
8762
  return this.__data__.has(i);
8745
8763
  }
8746
- var Jp = 200;
8747
- function Zp(i, t) {
8764
+ var Zp = 200;
8765
+ function Qp(i, t) {
8748
8766
  var e = this.__data__;
8749
8767
  if (e instanceof de) {
8750
8768
  var s = e.__data__;
8751
- if (!Us || s.length < Jp - 1)
8769
+ if (!Us || s.length < Zp - 1)
8752
8770
  return s.push([i, t]), this.size = ++e.size, this;
8753
8771
  e = this.__data__ = new fe(s);
8754
8772
  }
@@ -8758,95 +8776,94 @@ function ce(i) {
8758
8776
  var t = this.__data__ = new de(i);
8759
8777
  this.size = t.size;
8760
8778
  }
8761
- ce.prototype.clear = Up;
8762
- ce.prototype.delete = $p;
8763
- ce.prototype.get = qp;
8764
- ce.prototype.has = Kp;
8765
- ce.prototype.set = Zp;
8766
- var xh = typeof exports == "object" && exports && !exports.nodeType && exports, ia = xh && typeof module == "object" && module && !module.nodeType && module, Qp = ia && ia.exports === xh, na = Qp ? Rt.Buffer : void 0;
8779
+ ce.prototype.clear = $p;
8780
+ ce.prototype.delete = qp;
8781
+ ce.prototype.get = Kp;
8782
+ ce.prototype.has = Jp;
8783
+ ce.prototype.set = Qp;
8784
+ var xh = typeof exports == "object" && exports && !exports.nodeType && exports, ia = xh && typeof module == "object" && module && !module.nodeType && module, tm = ia && ia.exports === xh, na = tm ? Rt.Buffer : void 0;
8767
8785
  na && na.allocUnsafe;
8768
- function tm(i, t) {
8786
+ function em(i, t) {
8769
8787
  return i.slice();
8770
8788
  }
8771
- function em(i, t) {
8789
+ function sm(i, t) {
8772
8790
  for (var e = -1, s = i == null ? 0 : i.length, r = 0, n = []; ++e < s; ) {
8773
8791
  var o = i[e];
8774
8792
  t(o, e, i) && (n[r++] = o);
8775
8793
  }
8776
8794
  return n;
8777
8795
  }
8778
- function sm() {
8796
+ function rm() {
8779
8797
  return [];
8780
8798
  }
8781
- var rm = Object.prototype, im = rm.propertyIsEnumerable, oa = Object.getOwnPropertySymbols, nm = oa ? function(i) {
8782
- return i == null ? [] : (i = Object(i), em(oa(i), function(t) {
8783
- return im.call(i, t);
8799
+ var im = Object.prototype, nm = im.propertyIsEnumerable, oa = Object.getOwnPropertySymbols, om = oa ? function(i) {
8800
+ return i == null ? [] : (i = Object(i), sm(oa(i), function(t) {
8801
+ return nm.call(i, t);
8784
8802
  }));
8785
- } : sm;
8786
- function om(i, t, e) {
8803
+ } : rm;
8804
+ function am(i, t, e) {
8787
8805
  var s = t(i);
8788
8806
  return qt(i) ? s : Th(s, e(i));
8789
8807
  }
8790
8808
  function pn(i) {
8791
- return om(i, ap, nm);
8809
+ return am(i, cp, om);
8792
8810
  }
8793
- var mn = qe(Rt, "DataView"), vn = qe(Rt, "Promise"), yn = qe(Rt, "Set"), aa = "[object Map]", am = "[object Object]", ca = "[object Promise]", ha = "[object Set]", la = "[object WeakMap]", ua = "[object DataView]", cm = $e(mn), hm = $e(Us), lm = $e(vn), um = $e(yn), dm = $e(gn), Dt = Ts;
8811
+ var mn = qe(Rt, "DataView"), vn = qe(Rt, "Promise"), yn = qe(Rt, "Set"), aa = "[object Map]", cm = "[object Object]", ca = "[object Promise]", ha = "[object Set]", la = "[object WeakMap]", ua = "[object DataView]", hm = $e(mn), lm = $e(Us), um = $e(vn), dm = $e(yn), fm = $e(gn), Dt = Ts;
8794
8812
  (mn && Dt(new mn(new ArrayBuffer(1))) != ua || Us && Dt(new Us()) != aa || vn && Dt(vn.resolve()) != ca || yn && Dt(new yn()) != ha || gn && Dt(new gn()) != la) && (Dt = function(i) {
8795
- var t = Ts(i), e = t == am ? i.constructor : void 0, s = e ? $e(e) : "";
8813
+ var t = Ts(i), e = t == cm ? i.constructor : void 0, s = e ? $e(e) : "";
8796
8814
  if (s)
8797
8815
  switch (s) {
8798
- case cm:
8799
- return ua;
8800
8816
  case hm:
8801
- return aa;
8817
+ return ua;
8802
8818
  case lm:
8803
- return ca;
8819
+ return aa;
8804
8820
  case um:
8805
- return ha;
8821
+ return ca;
8806
8822
  case dm:
8823
+ return ha;
8824
+ case fm:
8807
8825
  return la;
8808
8826
  }
8809
8827
  return t;
8810
8828
  });
8811
- var fm = Object.prototype, gm = fm.hasOwnProperty;
8812
- function pm(i) {
8829
+ var gm = Object.prototype, pm = gm.hasOwnProperty;
8830
+ function mm(i) {
8813
8831
  var t = i.length, e = new i.constructor(t);
8814
- return t && typeof i[0] == "string" && gm.call(i, "index") && (e.index = i.index, e.input = i.input), e;
8832
+ return t && typeof i[0] == "string" && pm.call(i, "index") && (e.index = i.index, e.input = i.input), e;
8815
8833
  }
8816
8834
  var si = Rt.Uint8Array;
8817
8835
  function to(i) {
8818
8836
  var t = new i.constructor(i.byteLength);
8819
8837
  return new si(t).set(new si(i)), t;
8820
8838
  }
8821
- function mm(i, t) {
8839
+ function vm(i, t) {
8822
8840
  var e = to(i.buffer);
8823
8841
  return new i.constructor(e, i.byteOffset, i.byteLength);
8824
8842
  }
8825
- var vm = /\w*$/;
8826
- function ym(i) {
8827
- var t = new i.constructor(i.source, vm.exec(i));
8843
+ var ym = /\w*$/;
8844
+ function bm(i) {
8845
+ var t = new i.constructor(i.source, ym.exec(i));
8828
8846
  return t.lastIndex = i.lastIndex, t;
8829
8847
  }
8830
8848
  var da = Ot ? Ot.prototype : void 0, fa = da ? da.valueOf : void 0;
8831
- function bm(i) {
8849
+ function _m(i) {
8832
8850
  return fa ? Object(fa.call(i)) : {};
8833
8851
  }
8834
- function _m(i, t) {
8852
+ function Tm(i, t) {
8835
8853
  var e = to(i.buffer);
8836
8854
  return new i.constructor(e, i.byteOffset, i.length);
8837
8855
  }
8838
- var Tm = "[object Boolean]", xm = "[object Date]", Sm = "[object Map]", wm = "[object Number]", Cm = "[object RegExp]", Om = "[object Set]", km = "[object String]", Mm = "[object Symbol]", Dm = "[object ArrayBuffer]", Im = "[object DataView]", jm = "[object Float32Array]", Em = "[object Float64Array]", Pm = "[object Int8Array]", Am = "[object Int16Array]", Lm = "[object Int32Array]", Rm = "[object Uint8Array]", Fm = "[object Uint8ClampedArray]", Bm = "[object Uint16Array]", Wm = "[object Uint32Array]";
8839
- function Xm(i, t, e) {
8856
+ var xm = "[object Boolean]", Sm = "[object Date]", wm = "[object Map]", Cm = "[object Number]", Om = "[object RegExp]", km = "[object Set]", Mm = "[object String]", Dm = "[object Symbol]", Im = "[object ArrayBuffer]", jm = "[object DataView]", Em = "[object Float32Array]", Pm = "[object Float64Array]", Am = "[object Int8Array]", Lm = "[object Int16Array]", Rm = "[object Int32Array]", Fm = "[object Uint8Array]", Bm = "[object Uint8ClampedArray]", Wm = "[object Uint16Array]", Xm = "[object Uint32Array]";
8857
+ function zm(i, t, e) {
8840
8858
  var s = i.constructor;
8841
8859
  switch (t) {
8842
- case Dm:
8860
+ case Im:
8843
8861
  return to(i);
8844
- case Tm:
8845
8862
  case xm:
8863
+ case Sm:
8846
8864
  return new s(+i);
8847
- case Im:
8848
- return mm(i);
8849
8865
  case jm:
8866
+ return vm(i);
8850
8867
  case Em:
8851
8868
  case Pm:
8852
8869
  case Am:
@@ -8855,34 +8872,35 @@ function Xm(i, t, e) {
8855
8872
  case Fm:
8856
8873
  case Bm:
8857
8874
  case Wm:
8858
- return _m(i);
8859
- case Sm:
8860
- return new s();
8875
+ case Xm:
8876
+ return Tm(i);
8861
8877
  case wm:
8862
- case km:
8863
- return new s(i);
8864
- case Cm:
8865
- return ym(i);
8866
- case Om:
8867
8878
  return new s();
8879
+ case Cm:
8868
8880
  case Mm:
8881
+ return new s(i);
8882
+ case Om:
8869
8883
  return bm(i);
8884
+ case km:
8885
+ return new s();
8886
+ case Dm:
8887
+ return _m(i);
8870
8888
  }
8871
8889
  }
8872
- function zm(i) {
8873
- return typeof i.constructor == "function" && !ph(i) ? sg(Np(i)) : {};
8890
+ function Hm(i) {
8891
+ return typeof i.constructor == "function" && !ph(i) ? rg(Up(i)) : {};
8874
8892
  }
8875
- var Hm = "[object Map]";
8876
- function Ym(i) {
8877
- return Ce(i) && Dt(i) == Hm;
8893
+ var Ym = "[object Map]";
8894
+ function Vm(i) {
8895
+ return Ce(i) && Dt(i) == Ym;
8878
8896
  }
8879
- var ga = ps && ps.isMap, Vm = ga ? Kn(ga) : Ym, Gm = "[object Set]";
8880
- function Nm(i) {
8881
- return Ce(i) && Dt(i) == Gm;
8897
+ var ga = ps && ps.isMap, Gm = ga ? Kn(ga) : Vm, Nm = "[object Set]";
8898
+ function Um(i) {
8899
+ return Ce(i) && Dt(i) == Nm;
8882
8900
  }
8883
- var pa = ps && ps.isSet, Um = pa ? Kn(pa) : Nm, Sh = "[object Arguments]", $m = "[object Array]", qm = "[object Boolean]", Km = "[object Date]", Jm = "[object Error]", wh = "[object Function]", Zm = "[object GeneratorFunction]", Qm = "[object Map]", tv = "[object Number]", Ch = "[object Object]", ev = "[object RegExp]", sv = "[object Set]", rv = "[object String]", iv = "[object Symbol]", nv = "[object WeakMap]", ov = "[object ArrayBuffer]", av = "[object DataView]", cv = "[object Float32Array]", hv = "[object Float64Array]", lv = "[object Int8Array]", uv = "[object Int16Array]", dv = "[object Int32Array]", fv = "[object Uint8Array]", gv = "[object Uint8ClampedArray]", pv = "[object Uint16Array]", mv = "[object Uint32Array]", V = {};
8884
- V[Sh] = V[$m] = V[ov] = V[av] = V[qm] = V[Km] = V[cv] = V[hv] = V[lv] = V[uv] = V[dv] = V[Qm] = V[tv] = V[Ch] = V[ev] = V[sv] = V[rv] = V[iv] = V[fv] = V[gv] = V[pv] = V[mv] = !0;
8885
- V[Jm] = V[wh] = V[nv] = !1;
8901
+ var pa = ps && ps.isSet, $m = pa ? Kn(pa) : Um, Sh = "[object Arguments]", qm = "[object Array]", Km = "[object Boolean]", Jm = "[object Date]", Zm = "[object Error]", wh = "[object Function]", Qm = "[object GeneratorFunction]", tv = "[object Map]", ev = "[object Number]", Ch = "[object Object]", sv = "[object RegExp]", rv = "[object Set]", iv = "[object String]", nv = "[object Symbol]", ov = "[object WeakMap]", av = "[object ArrayBuffer]", cv = "[object DataView]", hv = "[object Float32Array]", lv = "[object Float64Array]", uv = "[object Int8Array]", dv = "[object Int16Array]", fv = "[object Int32Array]", gv = "[object Uint8Array]", pv = "[object Uint8ClampedArray]", mv = "[object Uint16Array]", vv = "[object Uint32Array]", V = {};
8902
+ V[Sh] = V[qm] = V[av] = V[cv] = V[Km] = V[Jm] = V[hv] = V[lv] = V[uv] = V[dv] = V[fv] = V[tv] = V[ev] = V[Ch] = V[sv] = V[rv] = V[iv] = V[nv] = V[gv] = V[pv] = V[mv] = V[vv] = !0;
8903
+ V[Zm] = V[wh] = V[ov] = !1;
8886
8904
  function Wr(i, t, e, s, r, n) {
8887
8905
  var o;
8888
8906
  if (o !== void 0)
@@ -8891,42 +8909,42 @@ function Wr(i, t, e, s, r, n) {
8891
8909
  return i;
8892
8910
  var a = qt(i);
8893
8911
  if (a)
8894
- o = pm(i);
8912
+ o = mm(i);
8895
8913
  else {
8896
- var c = Dt(i), h = c == wh || c == Zm;
8914
+ var c = Dt(i), h = c == wh || c == Qm;
8897
8915
  if (ei(i))
8898
- return tm(i);
8916
+ return em(i);
8899
8917
  if (c == Ch || c == Sh || h && !r)
8900
- o = h ? {} : zm(i);
8918
+ o = h ? {} : Hm(i);
8901
8919
  else {
8902
8920
  if (!V[c])
8903
8921
  return r ? i : {};
8904
- o = Xm(i, c);
8922
+ o = zm(i, c);
8905
8923
  }
8906
8924
  }
8907
8925
  n || (n = new ce());
8908
8926
  var l = n.get(i);
8909
8927
  if (l)
8910
8928
  return l;
8911
- n.set(i, o), Um(i) ? i.forEach(function(f) {
8929
+ n.set(i, o), $m(i) ? i.forEach(function(f) {
8912
8930
  o.add(Wr(f, t, e, f, i, n));
8913
- }) : Vm(i) && i.forEach(function(f, g) {
8931
+ }) : Gm(i) && i.forEach(function(f, g) {
8914
8932
  o.set(g, Wr(f, t, e, g, i, n));
8915
8933
  });
8916
8934
  var u = pn, d = a ? void 0 : u(i);
8917
- return ug(d || i, function(f, g) {
8935
+ return dg(d || i, function(f, g) {
8918
8936
  d && (g = f, f = i[g]), gh(o, g, Wr(f, t, e, g, i, n));
8919
8937
  }), o;
8920
8938
  }
8921
- var vv = 1, yv = 4;
8939
+ var yv = 1, bv = 4;
8922
8940
  function Fe(i) {
8923
- return Wr(i, vv | yv);
8924
- }
8925
- var bv = "__lodash_hash_undefined__";
8926
- function _v(i) {
8927
- return this.__data__.set(i, bv), this;
8941
+ return Wr(i, yv | bv);
8928
8942
  }
8943
+ var _v = "__lodash_hash_undefined__";
8929
8944
  function Tv(i) {
8945
+ return this.__data__.set(i, _v), this;
8946
+ }
8947
+ function xv(i) {
8930
8948
  return this.__data__.has(i);
8931
8949
  }
8932
8950
  function ri(i) {
@@ -8934,26 +8952,26 @@ function ri(i) {
8934
8952
  for (this.__data__ = new fe(); ++t < e; )
8935
8953
  this.add(i[t]);
8936
8954
  }
8937
- ri.prototype.add = ri.prototype.push = _v;
8938
- ri.prototype.has = Tv;
8939
- function xv(i, t) {
8955
+ ri.prototype.add = ri.prototype.push = Tv;
8956
+ ri.prototype.has = xv;
8957
+ function Sv(i, t) {
8940
8958
  for (var e = -1, s = i == null ? 0 : i.length; ++e < s; )
8941
8959
  if (t(i[e], e, i))
8942
8960
  return !0;
8943
8961
  return !1;
8944
8962
  }
8945
- function Sv(i, t) {
8963
+ function wv(i, t) {
8946
8964
  return i.has(t);
8947
8965
  }
8948
- var wv = 1, Cv = 2;
8966
+ var Cv = 1, Ov = 2;
8949
8967
  function Oh(i, t, e, s, r, n) {
8950
- var o = e & wv, a = i.length, c = t.length;
8968
+ var o = e & Cv, a = i.length, c = t.length;
8951
8969
  if (a != c && !(o && c > a))
8952
8970
  return !1;
8953
8971
  var h = n.get(i), l = n.get(t);
8954
8972
  if (h && l)
8955
8973
  return h == t && l == i;
8956
- var u = -1, d = !0, f = e & Cv ? new ri() : void 0;
8974
+ var u = -1, d = !0, f = e & Ov ? new ri() : void 0;
8957
8975
  for (n.set(i, t), n.set(t, i); ++u < a; ) {
8958
8976
  var g = i[u], p = t[u];
8959
8977
  if (s)
@@ -8965,8 +8983,8 @@ function Oh(i, t, e, s, r, n) {
8965
8983
  break;
8966
8984
  }
8967
8985
  if (f) {
8968
- if (!xv(t, function(b, _) {
8969
- if (!Sv(f, _) && (g === b || r(g, b, e, s, n)))
8986
+ if (!Sv(t, function(b, _) {
8987
+ if (!wv(f, _) && (g === b || r(g, b, e, s, n)))
8970
8988
  return f.push(_);
8971
8989
  })) {
8972
8990
  d = !1;
@@ -8979,62 +8997,62 @@ function Oh(i, t, e, s, r, n) {
8979
8997
  }
8980
8998
  return n.delete(i), n.delete(t), d;
8981
8999
  }
8982
- function Ov(i) {
9000
+ function kv(i) {
8983
9001
  var t = -1, e = Array(i.size);
8984
9002
  return i.forEach(function(s, r) {
8985
9003
  e[++t] = [r, s];
8986
9004
  }), e;
8987
9005
  }
8988
- function kv(i) {
9006
+ function Mv(i) {
8989
9007
  var t = -1, e = Array(i.size);
8990
9008
  return i.forEach(function(s) {
8991
9009
  e[++t] = s;
8992
9010
  }), e;
8993
9011
  }
8994
- var Mv = 1, Dv = 2, Iv = "[object Boolean]", jv = "[object Date]", Ev = "[object Error]", Pv = "[object Map]", Av = "[object Number]", Lv = "[object RegExp]", Rv = "[object Set]", Fv = "[object String]", Bv = "[object Symbol]", Wv = "[object ArrayBuffer]", Xv = "[object DataView]", ma = Ot ? Ot.prototype : void 0, Hi = ma ? ma.valueOf : void 0;
8995
- function zv(i, t, e, s, r, n, o) {
9012
+ var Dv = 1, Iv = 2, jv = "[object Boolean]", Ev = "[object Date]", Pv = "[object Error]", Av = "[object Map]", Lv = "[object Number]", Rv = "[object RegExp]", Fv = "[object Set]", Bv = "[object String]", Wv = "[object Symbol]", Xv = "[object ArrayBuffer]", zv = "[object DataView]", ma = Ot ? Ot.prototype : void 0, Hi = ma ? ma.valueOf : void 0;
9013
+ function Hv(i, t, e, s, r, n, o) {
8996
9014
  switch (e) {
8997
- case Xv:
9015
+ case zv:
8998
9016
  if (i.byteLength != t.byteLength || i.byteOffset != t.byteOffset)
8999
9017
  return !1;
9000
9018
  i = i.buffer, t = t.buffer;
9001
- case Wv:
9019
+ case Xv:
9002
9020
  return !(i.byteLength != t.byteLength || !n(new si(i), new si(t)));
9003
- case Iv:
9004
9021
  case jv:
9005
- case Av:
9006
- return Un(+i, +t);
9007
9022
  case Ev:
9008
- return i.name == t.name && i.message == t.message;
9009
9023
  case Lv:
9010
- case Fv:
9011
- return i == t + "";
9024
+ return Un(+i, +t);
9012
9025
  case Pv:
9013
- var a = Ov;
9026
+ return i.name == t.name && i.message == t.message;
9014
9027
  case Rv:
9015
- var c = s & Mv;
9016
- if (a || (a = kv), i.size != t.size && !c)
9028
+ case Bv:
9029
+ return i == t + "";
9030
+ case Av:
9031
+ var a = kv;
9032
+ case Fv:
9033
+ var c = s & Dv;
9034
+ if (a || (a = Mv), i.size != t.size && !c)
9017
9035
  return !1;
9018
9036
  var h = o.get(i);
9019
9037
  if (h)
9020
9038
  return h == t;
9021
- s |= Dv, o.set(i, t);
9039
+ s |= Iv, o.set(i, t);
9022
9040
  var l = Oh(a(i), a(t), s, r, n, o);
9023
9041
  return o.delete(i), l;
9024
- case Bv:
9042
+ case Wv:
9025
9043
  if (Hi)
9026
9044
  return Hi.call(i) == Hi.call(t);
9027
9045
  }
9028
9046
  return !1;
9029
9047
  }
9030
- var Hv = 1, Yv = Object.prototype, Vv = Yv.hasOwnProperty;
9031
- function Gv(i, t, e, s, r, n) {
9032
- var o = e & Hv, a = pn(i), c = a.length, h = pn(t), l = h.length;
9048
+ var Yv = 1, Vv = Object.prototype, Gv = Vv.hasOwnProperty;
9049
+ function Nv(i, t, e, s, r, n) {
9050
+ var o = e & Yv, a = pn(i), c = a.length, h = pn(t), l = h.length;
9033
9051
  if (c != l && !o)
9034
9052
  return !1;
9035
9053
  for (var u = c; u--; ) {
9036
9054
  var d = a[u];
9037
- if (!(o ? d in t : Vv.call(t, d)))
9055
+ if (!(o ? d in t : Gv.call(t, d)))
9038
9056
  return !1;
9039
9057
  }
9040
9058
  var f = n.get(i), g = n.get(t);
@@ -9046,21 +9064,21 @@ function Gv(i, t, e, s, r, n) {
9046
9064
  d = a[u];
9047
9065
  var b = i[d], _ = t[d];
9048
9066
  if (s)
9049
- var x = o ? s(_, b, d, t, i, n) : s(b, _, d, i, t, n);
9050
- if (!(x === void 0 ? b === _ || r(b, _, e, s, n) : x)) {
9067
+ var w = o ? s(_, b, d, t, i, n) : s(b, _, d, i, t, n);
9068
+ if (!(w === void 0 ? b === _ || r(b, _, e, s, n) : w)) {
9051
9069
  p = !1;
9052
9070
  break;
9053
9071
  }
9054
9072
  m || (m = d == "constructor");
9055
9073
  }
9056
9074
  if (p && !m) {
9057
- var w = i.constructor, O = t.constructor;
9058
- w != O && "constructor" in i && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof O == "function" && O instanceof O) && (p = !1);
9075
+ var S = i.constructor, C = t.constructor;
9076
+ S != C && "constructor" in i && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof C == "function" && C instanceof C) && (p = !1);
9059
9077
  }
9060
9078
  return n.delete(i), n.delete(t), p;
9061
9079
  }
9062
- var Nv = 1, va = "[object Arguments]", ya = "[object Array]", Pr = "[object Object]", Uv = Object.prototype, ba = Uv.hasOwnProperty;
9063
- function $v(i, t, e, s, r, n) {
9080
+ var Uv = 1, va = "[object Arguments]", ya = "[object Array]", Pr = "[object Object]", $v = Object.prototype, ba = $v.hasOwnProperty;
9081
+ function qv(i, t, e, s, r, n) {
9064
9082
  var o = qt(i), a = qt(t), c = o ? ya : Dt(i), h = a ? ya : Dt(t);
9065
9083
  c = c == va ? Pr : c, h = h == va ? Pr : h;
9066
9084
  var l = c == Pr, u = h == Pr, d = c == h;
@@ -9070,23 +9088,23 @@ function $v(i, t, e, s, r, n) {
9070
9088
  o = !0, l = !1;
9071
9089
  }
9072
9090
  if (d && !l)
9073
- return n || (n = new ce()), o || bh(i) ? Oh(i, t, e, s, r, n) : zv(i, t, c, e, s, r, n);
9074
- if (!(e & Nv)) {
9091
+ return n || (n = new ce()), o || bh(i) ? Oh(i, t, e, s, r, n) : Hv(i, t, c, e, s, r, n);
9092
+ if (!(e & Uv)) {
9075
9093
  var f = l && ba.call(i, "__wrapped__"), g = u && ba.call(t, "__wrapped__");
9076
9094
  if (f || g) {
9077
9095
  var p = f ? i.value() : i, m = g ? t.value() : t;
9078
9096
  return n || (n = new ce()), r(p, m, e, s, n);
9079
9097
  }
9080
9098
  }
9081
- return d ? (n || (n = new ce()), Gv(i, t, e, s, r, n)) : !1;
9099
+ return d ? (n || (n = new ce()), Nv(i, t, e, s, r, n)) : !1;
9082
9100
  }
9083
9101
  function kh(i, t, e, s, r) {
9084
- return i === t ? !0 : i == null || t == null || !Ce(i) && !Ce(t) ? i !== i && t !== t : $v(i, t, e, s, kh, r);
9102
+ return i === t ? !0 : i == null || t == null || !Ce(i) && !Ce(t) ? i !== i && t !== t : qv(i, t, e, s, kh, r);
9085
9103
  }
9086
- function qv(i, t) {
9104
+ function Kv(i, t) {
9087
9105
  return i != null && t in Object(i);
9088
9106
  }
9089
- function Kv(i, t, e) {
9107
+ function Jv(i, t, e) {
9090
9108
  t = xi(t, i);
9091
9109
  for (var s = -1, r = t.length, n = !1; ++s < r; ) {
9092
9110
  var o = Zn(t[s]);
@@ -9096,50 +9114,50 @@ function Kv(i, t, e) {
9096
9114
  }
9097
9115
  return n || ++s != r ? n : (r = i == null ? 0 : i.length, !!r && $n(r) && Nn(o, r) && (qt(i) || qn(i)));
9098
9116
  }
9099
- function Jv(i, t) {
9100
- return i != null && Kv(i, t, qv);
9117
+ function Zv(i, t) {
9118
+ return i != null && Jv(i, t, Kv);
9101
9119
  }
9102
9120
  var Yi = function() {
9103
9121
  return Rt.Date.now();
9104
- }, Zv = "Expected a function", Qv = Math.max, t0 = Math.min;
9105
- function e0(i, t, e) {
9122
+ }, Qv = "Expected a function", t0 = Math.max, e0 = Math.min;
9123
+ function s0(i, t, e) {
9106
9124
  var s, r, n, o, a, c, h = 0, l = !1, u = !1, d = !0;
9107
9125
  if (typeof i != "function")
9108
- throw new TypeError(Zv);
9109
- t = qo(t) || 0, Kt(e) && (l = !!e.leading, u = "maxWait" in e, n = u ? Qv(qo(e.maxWait) || 0, t) : n, d = "trailing" in e ? !!e.trailing : d);
9110
- function f(C) {
9126
+ throw new TypeError(Qv);
9127
+ t = qo(t) || 0, Kt(e) && (l = !!e.leading, u = "maxWait" in e, n = u ? t0(qo(e.maxWait) || 0, t) : n, d = "trailing" in e ? !!e.trailing : d);
9128
+ function f(O) {
9111
9129
  var D = s, M = r;
9112
- return s = r = void 0, h = C, o = i.apply(M, D), o;
9130
+ return s = r = void 0, h = O, o = i.apply(M, D), o;
9113
9131
  }
9114
- function g(C) {
9115
- return h = C, a = setTimeout(b, t), l ? f(C) : o;
9132
+ function g(O) {
9133
+ return h = O, a = setTimeout(b, t), l ? f(O) : o;
9116
9134
  }
9117
- function p(C) {
9118
- var D = C - c, M = C - h, I = t - D;
9119
- return u ? t0(I, n - M) : I;
9135
+ function p(O) {
9136
+ var D = O - c, M = O - h, I = t - D;
9137
+ return u ? e0(I, n - M) : I;
9120
9138
  }
9121
- function m(C) {
9122
- var D = C - c, M = C - h;
9139
+ function m(O) {
9140
+ var D = O - c, M = O - h;
9123
9141
  return c === void 0 || D >= t || D < 0 || u && M >= n;
9124
9142
  }
9125
9143
  function b() {
9126
- var C = Yi();
9127
- if (m(C))
9128
- return _(C);
9129
- a = setTimeout(b, p(C));
9144
+ var O = Yi();
9145
+ if (m(O))
9146
+ return _(O);
9147
+ a = setTimeout(b, p(O));
9130
9148
  }
9131
- function _(C) {
9132
- return a = void 0, d && s ? f(C) : (s = r = void 0, o);
9149
+ function _(O) {
9150
+ return a = void 0, d && s ? f(O) : (s = r = void 0, o);
9133
9151
  }
9134
- function x() {
9152
+ function w() {
9135
9153
  a !== void 0 && clearTimeout(a), h = 0, s = c = r = a = void 0;
9136
9154
  }
9137
- function w() {
9155
+ function S() {
9138
9156
  return a === void 0 ? o : _(Yi());
9139
9157
  }
9140
- function O() {
9141
- var C = Yi(), D = m(C);
9142
- if (s = arguments, r = this, c = C, D) {
9158
+ function C() {
9159
+ var O = Yi(), D = m(O);
9160
+ if (s = arguments, r = this, c = O, D) {
9143
9161
  if (a === void 0)
9144
9162
  return g(c);
9145
9163
  if (u)
@@ -9147,12 +9165,12 @@ function e0(i, t, e) {
9147
9165
  }
9148
9166
  return a === void 0 && (a = setTimeout(b, t)), o;
9149
9167
  }
9150
- return O.cancel = x, O.flush = w, O;
9168
+ return C.cancel = w, C.flush = S, C;
9151
9169
  }
9152
- function s0(i, t) {
9170
+ function r0(i, t) {
9153
9171
  return kh(i, t);
9154
9172
  }
9155
- function r0(i, t, e, s) {
9173
+ function i0(i, t, e, s) {
9156
9174
  if (!Kt(i))
9157
9175
  return i;
9158
9176
  t = xi(t, i);
@@ -9168,34 +9186,34 @@ function r0(i, t, e, s) {
9168
9186
  }
9169
9187
  return i;
9170
9188
  }
9171
- function i0(i, t, e) {
9189
+ function n0(i, t, e) {
9172
9190
  for (var s = -1, r = t.length, n = {}; ++s < r; ) {
9173
- var o = t[s], a = Hp(i, o);
9174
- e(a, o) && r0(n, xi(o, i), a);
9191
+ var o = t[s], a = Yp(i, o);
9192
+ e(a, o) && i0(n, xi(o, i), a);
9175
9193
  }
9176
9194
  return n;
9177
9195
  }
9178
- function n0(i, t) {
9179
- return i0(i, t, function(e, s) {
9180
- return Jv(i, s);
9196
+ function o0(i, t) {
9197
+ return n0(i, t, function(e, s) {
9198
+ return Zv(i, s);
9181
9199
  });
9182
9200
  }
9183
- var o0 = Gp(function(i, t) {
9184
- return i == null ? {} : n0(i, t);
9185
- }), a0 = "Expected a function";
9186
- function c0(i, t, e) {
9201
+ var a0 = Np(function(i, t) {
9202
+ return i == null ? {} : o0(i, t);
9203
+ }), c0 = "Expected a function";
9204
+ function h0(i, t, e) {
9187
9205
  var s = !0, r = !0;
9188
9206
  if (typeof i != "function")
9189
- throw new TypeError(a0);
9190
- return Kt(e) && (s = "leading" in e ? !!e.leading : s, r = "trailing" in e ? !!e.trailing : r), e0(i, t, {
9207
+ throw new TypeError(c0);
9208
+ return Kt(e) && (s = "leading" in e ? !!e.leading : s, r = "trailing" in e ? !!e.trailing : r), s0(i, t, {
9191
9209
  leading: s,
9192
9210
  maxWait: t,
9193
9211
  trailing: r
9194
9212
  });
9195
9213
  }
9196
- class h0 {
9214
+ class l0 {
9197
9215
  addTrackItem(t) {
9198
- const e = bf(t, {
9216
+ const e = _f(t, {
9199
9217
  tScale: this.tScale,
9200
9218
  sizesMap: this.sizesMap
9201
9219
  });
@@ -9243,7 +9261,7 @@ class h0 {
9243
9261
  }
9244
9262
  selectTrackItemByIds(t) {
9245
9263
  const e = this.getActiveObjects().map((n) => n.id);
9246
- if (s0(e, t)) return;
9264
+ if (r0(e, t)) return;
9247
9265
  const r = this.getObjects(...be.objectTypes, "Transition").filter((n) => t.includes(n.id));
9248
9266
  if (!r.length)
9249
9267
  this.discardActiveObject();
@@ -9339,7 +9357,7 @@ const _a = (i) => {
9339
9357
  return 1e3;
9340
9358
  }
9341
9359
  };
9342
- class l0 {
9360
+ class u0 {
9343
9361
  findOrCreateTrack(t, { trackId: e, trackIndex: s }) {
9344
9362
  if (e) {
9345
9363
  const o = this.tracks.find((a) => a.id === e);
@@ -9462,16 +9480,16 @@ function Mh(i) {
9462
9480
  const p = Math.abs(c - g), m = Math.abs(c - f), b = P(1, e.tScale);
9463
9481
  if (p < n)
9464
9482
  if (e instanceof ne) {
9465
- const _ = g - e.left, x = _ - a, w = P(
9466
- x,
9483
+ const _ = g - e.left, w = _ - a, S = P(
9484
+ w,
9467
9485
  e.tScale,
9468
9486
  e.playbackRate
9469
- ), O = e.trim.to + w;
9487
+ ), C = e.trim.to + S;
9470
9488
  if (_ < b || _ < b) return;
9471
- O <= e.duration && (e.set({
9489
+ C <= e.duration && (e.set({
9472
9490
  width: _,
9473
9491
  scaleX: 1
9474
- }), e.trim.to = O, e.onResizeSnap && e.onResizeSnap(), h = !0);
9492
+ }), e.trim.to = C, e.onResizeSnap && e.onResizeSnap(), h = !0);
9475
9493
  } else
9476
9494
  e.set({
9477
9495
  width: g - e.left,
@@ -9479,16 +9497,16 @@ function Mh(i) {
9479
9497
  }), e.onResizeSnap && e.onResizeSnap(), h = !0;
9480
9498
  else if (m < n)
9481
9499
  if (e instanceof ne) {
9482
- const _ = f - e.left, x = _ - a, w = P(
9483
- x,
9500
+ const _ = f - e.left, w = _ - a, S = P(
9501
+ w,
9484
9502
  e.tScale,
9485
9503
  e.playbackRate
9486
- ), O = e.trim.to + w;
9504
+ ), C = e.trim.to + S;
9487
9505
  if (_ < b) return;
9488
- O <= e.duration && (e.set({
9506
+ C <= e.duration && (e.set({
9489
9507
  width: _,
9490
9508
  scaleX: 1
9491
- }), e.trim.to = O, e.onResizeSnap && e.onResizeSnap(), h = !0);
9509
+ }), e.trim.to = C, e.onResizeSnap && e.onResizeSnap(), h = !0);
9492
9510
  } else
9493
9511
  e.set({
9494
9512
  width: f - e.left,
@@ -9498,16 +9516,16 @@ function Mh(i) {
9498
9516
  const p = Math.abs(o - f), m = Math.abs(o - g);
9499
9517
  if (p < n)
9500
9518
  if (e instanceof ne) {
9501
- const b = c - f, _ = b - a, x = P(
9519
+ const b = c - f, _ = b - a, w = P(
9502
9520
  _,
9503
9521
  e.tScale,
9504
9522
  e.playbackRate
9505
- ), w = e.trim.from - x;
9506
- w >= 0 && (e.set({
9523
+ ), S = e.trim.from - w;
9524
+ S >= 0 && (e.set({
9507
9525
  left: f,
9508
9526
  width: b,
9509
9527
  scaleX: 1
9510
- }), e.trim.from = w, e.onResizeSnap && e.onResizeSnap(), h = !0);
9528
+ }), e.trim.from = S, e.onResizeSnap && e.onResizeSnap(), h = !0);
9511
9529
  } else
9512
9530
  e.set({
9513
9531
  left: f,
@@ -9516,16 +9534,16 @@ function Mh(i) {
9516
9534
  }), e.onResizeSnap && e.onResizeSnap(), h = !0;
9517
9535
  else if (m < n)
9518
9536
  if (e instanceof ne) {
9519
- const b = c - g, _ = b - a, x = P(
9537
+ const b = c - g, _ = b - a, w = P(
9520
9538
  _,
9521
9539
  e.tScale,
9522
9540
  e.playbackRate
9523
- ), w = e.trim.from - x;
9524
- w >= 0 && (e.set({
9541
+ ), S = e.trim.from - w;
9542
+ S >= 0 && (e.set({
9525
9543
  left: g,
9526
9544
  width: b,
9527
9545
  scaleX: 1
9528
- }), e.trim.from = w, e.onResizeSnap && e.onResizeSnap(), h = !0);
9546
+ }), e.trim.from = S, e.onResizeSnap && e.onResizeSnap(), h = !0);
9529
9547
  } else
9530
9548
  e.set({
9531
9549
  left: g,
@@ -9546,15 +9564,15 @@ function Mh(i) {
9546
9564
  var m;
9547
9565
  const p = t.trackItemsMap[g.id];
9548
9566
  if (p) {
9549
- const b = p.duration || 0, _ = (m = p.metadata) == null ? void 0 : m.userLimitDuration, x = typeof _ == "number" ? _ : b, w = p.display.from || 0, O = Math.max(0, d - w), C = Math.min(O, x);
9567
+ const b = p.duration || 0, _ = (m = p.metadata) == null ? void 0 : m.userLimitDuration, w = typeof _ == "number" ? _ : b, S = p.display.from || 0, C = Math.max(0, d - S), O = Math.min(C, w);
9550
9568
  g.display = {
9551
- from: w,
9552
- to: w + C
9569
+ from: S,
9570
+ to: S + O
9553
9571
  }, g.trim && (g.trim = {
9554
9572
  from: g.trim.from || 0,
9555
- to: (g.trim.from || 0) + C
9573
+ to: (g.trim.from || 0) + O
9556
9574
  });
9557
- const D = Q(C, t.tScale);
9575
+ const D = Q(O, t.tScale);
9558
9576
  g.set({
9559
9577
  width: D,
9560
9578
  scaleX: 1
@@ -9564,20 +9582,20 @@ function Mh(i) {
9564
9582
  }
9565
9583
  }
9566
9584
  }
9567
- function u0(i) {
9585
+ function d0(i) {
9568
9586
  i.on("object:resizing", Mh.bind(i));
9569
9587
  }
9570
- function d0(i) {
9588
+ function f0(i) {
9571
9589
  i.off("object:resizing", Mh.bind(i));
9572
9590
  }
9573
- const Fs = 100, Vi = 0, Ar = 5, Ta = 3, f0 = 25, ls = {
9591
+ const Fs = 100, Vi = 0, Ar = 5, Ta = 3, g0 = 25, ls = {
9574
9592
  scrollInterval: null
9575
9593
  };
9576
9594
  function xa(i) {
9577
- const t = f0 - Ta, e = (Fs - i) / Fs;
9595
+ const t = g0 - Ta, e = (Fs - i) / Fs;
9578
9596
  return Ta + t * e;
9579
9597
  }
9580
- function g0(i, t) {
9598
+ function p0(i, t) {
9581
9599
  ls.scrollInterval && clearInterval(ls.scrollInterval);
9582
9600
  const e = t.target, s = e.getBoundingRect();
9583
9601
  ls.scrollInterval = setInterval(() => {
@@ -9593,19 +9611,19 @@ function g0(i, t) {
9593
9611
  n.y > i.height - Vi && e.top + s.height < i.bounding.height + 80 && (e.set("top", e.top + Ar), i.setViewportPos(r[4], r[5] - Ar)), n.y < Vi && e.top > -80 && -r[5] > Vi && (e.set("top", e.top - Ar), i.setViewportPos(r[4], r[5] + Ar)), e.setCoords(), i.requestRenderAll();
9594
9612
  }, 16);
9595
9613
  }
9596
- function p0() {
9614
+ function m0() {
9597
9615
  ls.scrollInterval && (clearInterval(ls.scrollInterval), ls.scrollInterval = null);
9598
9616
  }
9599
9617
  function Dh() {
9600
- p0();
9618
+ m0();
9601
9619
  }
9602
9620
  function Ih(i) {
9603
- g0(this, i);
9621
+ p0(this, i);
9604
9622
  }
9605
- function m0(i) {
9623
+ function v0(i) {
9606
9624
  i.on("mouse:up", Dh), i.on("object:moving", Ih.bind(i));
9607
9625
  }
9608
- function v0(i) {
9626
+ function y0(i) {
9609
9627
  i.off("mouse:up", Dh), i.off("object:moving", Ih.bind(i));
9610
9628
  }
9611
9629
  function jh(i) {
@@ -9625,10 +9643,10 @@ function jh(i) {
9625
9643
  }
9626
9644
  }
9627
9645
  }
9628
- function y0(i) {
9646
+ function b0(i) {
9629
9647
  i.on("object:modified", jh);
9630
9648
  }
9631
- function b0(i) {
9649
+ function _0(i) {
9632
9650
  i.off("object:modified", jh);
9633
9651
  }
9634
9652
  const Eh = {
@@ -9714,7 +9732,7 @@ const Eh = {
9714
9732
  }), r;
9715
9733
  }, Lh = (i, t, e) => {
9716
9734
  i.forEach((s) => {
9717
- const r = _0(e.getZoom());
9735
+ const r = T0(e.getZoom());
9718
9736
  s.orientation === "H" ? e.add(
9719
9737
  wa(
9720
9738
  [
@@ -9737,7 +9755,7 @@ const Eh = {
9737
9755
  )
9738
9756
  );
9739
9757
  });
9740
- }, _0 = (i) => ({
9758
+ }, T0 = (i) => ({
9741
9759
  strokeWidth: 2 / i
9742
9760
  }), wa = (i, t) => new ye(i, {
9743
9761
  ...t,
@@ -9782,10 +9800,10 @@ const Eh = {
9782
9800
  i.remove(...t), t = [];
9783
9801
  }, Bh = (i) => {
9784
9802
  i.forEach((t) => t.setSelected(!1));
9785
- }, Oa = (i) => i instanceof Se, T0 = (i) => Object.assign({}, {
9803
+ }, Oa = (i) => i instanceof Se, x0 = (i) => Object.assign({}, {
9786
9804
  left: 16,
9787
9805
  right: 80
9788
- }, i), x0 = ["touchstart", "touchmove", "touchend"], S0 = (i) => x0.includes(i.type) || i.pointerType === "touch";
9806
+ }, i), S0 = ["touchstart", "touchmove", "touchend"], w0 = (i) => S0.includes(i.type) || i.pointerType === "touch";
9789
9807
  function Wh(i) {
9790
9808
  const t = this;
9791
9809
  if (!t) return;
@@ -9833,10 +9851,10 @@ function zh(i) {
9833
9851
  Si(t, e), d.length && Lh(d, o, t);
9834
9852
  }
9835
9853
  }
9836
- function w0(i) {
9854
+ function C0(i) {
9837
9855
  i.on("object:moving", Wh.bind(i)), i.on("object:modified", Xh.bind(i)), i.on("object:resizing", zh.bind(i));
9838
9856
  }
9839
- function C0(i) {
9857
+ function O0(i) {
9840
9858
  i.off("object:moving", Wh.bind(i)), i.off("object:modified", Xh.bind(i)), i.off("object:resizing", zh.bind(i));
9841
9859
  }
9842
9860
  function bn(i, t, e) {
@@ -9942,20 +9960,20 @@ function Yh(i) {
9942
9960
  return f.draggedObject = u, f;
9943
9961
  }), e.add(...t.placeholderMovingObjects)));
9944
9962
  }
9945
- function O0(i) {
9963
+ function k0(i) {
9946
9964
  i.on("before:transform", Yh.bind(i));
9947
9965
  }
9948
- function k0(i) {
9966
+ function M0(i) {
9949
9967
  i.off("before:transform", Yh.bind(i));
9950
9968
  }
9951
9969
  const as = class as extends st {
9952
9970
  constructor(e) {
9953
9971
  super(e);
9954
- S(this, "duration");
9955
- S(this, "fromId");
9956
- S(this, "toId");
9957
- S(this, "itemType", "none");
9958
- S(this, "isSelected", !1);
9972
+ x(this, "duration");
9973
+ x(this, "fromId");
9974
+ x(this, "toId");
9975
+ x(this, "itemType", "none");
9976
+ x(this, "isSelected", !1);
9959
9977
  Object.assign(this, as.ownDefaults), this.id = e.id;
9960
9978
  }
9961
9979
  static createControls() {
@@ -10001,7 +10019,7 @@ const as = class as extends st {
10001
10019
  ), e.lineWidth = er, e.strokeStyle = Ue, e.stroke(), e.restore());
10002
10020
  }
10003
10021
  };
10004
- S(as, "type", "TransitionGuide"), S(as, "ownDefaults", {
10022
+ x(as, "type", "TransitionGuide"), x(as, "ownDefaults", {
10005
10023
  objectCaching: !1,
10006
10024
  borderColor: "transparent",
10007
10025
  stroke: "transparent",
@@ -10016,7 +10034,7 @@ S(as, "type", "TransitionGuide"), S(as, "ownDefaults", {
10016
10034
  ry: 8
10017
10035
  });
10018
10036
  let $s = as;
10019
- const M0 = (i) => {
10037
+ const D0 = (i) => {
10020
10038
  const { trackItemIds: t, transitionsMap: e, trackItemsMap: s } = i, r = /* @__PURE__ */ new Map();
10021
10039
  Object.values(e).forEach((h) => {
10022
10040
  var f, g;
@@ -10049,7 +10067,7 @@ const M0 = (i) => {
10049
10067
  return n.forEach((h) => {
10050
10068
  h.sort((l, u) => "display" in l && "display" in u ? l.display.from - u.display.from : 0);
10051
10069
  }), n;
10052
- }, D0 = [
10070
+ }, I0 = [
10053
10071
  "text",
10054
10072
  "image",
10055
10073
  "video",
@@ -10061,7 +10079,7 @@ function Vh() {
10061
10079
  const i = J();
10062
10080
  Fh(this, i.placeholderMovingObjects);
10063
10081
  }
10064
- function I0(i) {
10082
+ function j0(i) {
10065
10083
  const t = i.target.left;
10066
10084
  i.target.left = Math.max(t, 0);
10067
10085
  }
@@ -10071,11 +10089,11 @@ function Gh(i, t) {
10071
10089
  return t.left < r.left + r.width && t.left + t.width - 1 > r.left && t.top < r.top + r.height && t.top + t.height > r.top;
10072
10090
  });
10073
10091
  }
10074
- function j0(i, t) {
10092
+ function E0(i, t) {
10075
10093
  const s = i.canvas.getActiveObject(), r = s.left + s.width / 2, n = t.left + t.width / 2;
10076
10094
  return r < n ? t.left - s.width : (r > n, t.left + t.width);
10077
10095
  }
10078
- const E0 = (i, t, e) => !(e < 0 || Gh(i, {
10096
+ const P0 = (i, t, e) => !(e < 0 || Gh(i, {
10079
10097
  ...t.getBoundingRect(),
10080
10098
  left: e
10081
10099
  })), Nh = (i) => {
@@ -10084,17 +10102,17 @@ const E0 = (i, t, e) => !(e < 0 || Gh(i, {
10084
10102
  ), r = i.type.toLowerCase();
10085
10103
  return i instanceof we, e && (s == null ? void 0 : s.includes(r));
10086
10104
  };
10087
- function P0(i) {
10105
+ function A0(i) {
10088
10106
  J().isPointerOverHelperTrack ? i.opacity = 0 : i.opacity = 1;
10089
10107
  }
10090
- function A0() {
10108
+ function L0() {
10091
10109
  const i = J(), t = i.primaryMovingObjects[0];
10092
10110
  return {
10093
10111
  top: i.objectInitialPositions[t.id].top,
10094
10112
  left: i.objectInitialPositions[t.id].left
10095
10113
  };
10096
10114
  }
10097
- function L0(i) {
10115
+ function R0(i) {
10098
10116
  const t = i.getBoundingRect(), e = J(), s = e.draggingOverTrack;
10099
10117
  if (e.primaryMovingObjects.map((n) => n.id).includes(i.id)) {
10100
10118
  const o = e.primaryMovingObjects[0].getBoundingRect();
@@ -10108,10 +10126,10 @@ function L0(i) {
10108
10126
  left: t.left
10109
10127
  };
10110
10128
  }
10111
- function R0(i, t, e, s) {
10112
- const n = i.canvas.getActiveObjects().map((l) => l.id), o = j0(i, t), a = e.filter(
10129
+ function F0(i, t, e, s) {
10130
+ const n = i.canvas.getActiveObjects().map((l) => l.id), o = E0(i, t), a = e.filter(
10113
10131
  (l) => !n.includes(l.id)
10114
- ), c = E0(
10132
+ ), c = P0(
10115
10133
  a,
10116
10134
  i,
10117
10135
  o
@@ -10130,18 +10148,18 @@ function R0(i, t, e, s) {
10130
10148
  top: t.top
10131
10149
  };
10132
10150
  }
10133
- const F0 = (i, t) => {
10151
+ const B0 = (i, t) => {
10134
10152
  i.forEach((e, s) => {
10135
10153
  e.set({ left: t[s] });
10136
10154
  });
10137
- }, Uh = c0(
10155
+ }, Uh = h0(
10138
10156
  (i) => {
10139
10157
  const t = i.target.canvas;
10140
- I0(i);
10158
+ j0(i);
10141
10159
  const e = J(), s = e.draggingOverTrack;
10142
10160
  if (s) {
10143
10161
  const a = e.primaryMovingObjects[0];
10144
- D0.includes(a.type) && e.placeholderMovingObjects.forEach((c) => {
10162
+ I0.includes(a.type) && e.placeholderMovingObjects.forEach((c) => {
10145
10163
  c.visible = !0;
10146
10164
  });
10147
10165
  } else {
@@ -10183,7 +10201,7 @@ const F0 = (i, t) => {
10183
10201
  } else {
10184
10202
  if (e.orderNormalTrack = !1, e.updateItemsInTrack && e.updateItemsInTrack !== s.id) {
10185
10203
  const d = t.getObjects().find((f) => f.id === e.updateItemsInTrack);
10186
- d != null && d.magnetic ? B0(t, e) : t.updateTrackItemCoords(!0), e.updateItemsInTrack = null, e.initialTrackPoints = [];
10204
+ d != null && d.magnetic ? W0(t, e) : t.updateTrackItemCoords(!0), e.updateItemsInTrack = null, e.initialTrackPoints = [];
10187
10205
  }
10188
10206
  e.initialTrackPoints.length === 0 && s instanceof Nt && (e.updateItemsInTrack = s.id, e.initialTrackPoints = ka(
10189
10207
  e,
@@ -10203,8 +10221,8 @@ const F0 = (i, t) => {
10203
10221
  d.visible = !1;
10204
10222
  return;
10205
10223
  }
10206
- g.setCoords(), P0(d);
10207
- let p = H0(
10224
+ g.setCoords(), A0(d);
10225
+ let p = Y0(
10208
10226
  g,
10209
10227
  n,
10210
10228
  i.pointer,
@@ -10212,7 +10230,7 @@ const F0 = (i, t) => {
10212
10230
  );
10213
10231
  if (e.draggingOverTrack instanceof Se ? d.opacity = 0 : d.opacity = 1, g instanceof we && p.isInvalidDrop && e.draggingOverTrack instanceof Nt) {
10214
10232
  const m = i.pointer, b = [...t.viewportTransform], _ = m.y - b[5];
10215
- z0(t, _);
10233
+ H0(t, _);
10216
10234
  } else e.primaryMovingObjects.length > 1 ? (t.trackIdAfterTransform = e.trackTopToIdMap[p.top], t.positionAfterTransform[g.id] = {
10217
10235
  top: p.top,
10218
10236
  left: p.left + (c[f - 1] || 0)
@@ -10236,9 +10254,9 @@ const F0 = (i, t) => {
10236
10254
  );
10237
10255
  let a = 0;
10238
10256
  const c = [];
10239
- return t.magnetic ? W0(o, a, c) : X0(t, c, e), c;
10257
+ return t.magnetic ? X0(o, a, c) : z0(t, c, e), c;
10240
10258
  };
10241
- function B0(i, t) {
10259
+ function W0(i, t) {
10242
10260
  const e = [];
10243
10261
  i.getObjects().find((a) => a.id === t.updateItemsInTrack).items.forEach((a) => {
10244
10262
  const c = i.getObjects().find((h) => h.id === a);
@@ -10249,9 +10267,9 @@ function B0(i, t) {
10249
10267
  ).sort(
10250
10268
  (a, c) => a.left - c.left
10251
10269
  );
10252
- t.initialTrackPoints.length > o.length && F0(o, t.initialTrackPoints);
10270
+ t.initialTrackPoints.length > o.length && B0(o, t.initialTrackPoints);
10253
10271
  }
10254
- function W0(i, t, e) {
10272
+ function X0(i, t, e) {
10255
10273
  var h;
10256
10274
  const s = J(), r = (h = i[0]) == null ? void 0 : h.canvas, n = s.draggingOverTrack, o = s.primaryMovingObjects.map((l) => l.id);
10257
10275
  if (!r) return;
@@ -10276,7 +10294,7 @@ function W0(i, t, e) {
10276
10294
  }
10277
10295
  }
10278
10296
  }
10279
- function X0(i, t, e) {
10297
+ function z0(i, t, e) {
10280
10298
  const s = i.items, r = {}, n = {}, o = e.getActiveObjects().map((h) => h.id);
10281
10299
  Object.values(e.trackItemsMap).forEach((h) => {
10282
10300
  s.includes(h.id) && (r[h.id] = h);
@@ -10285,7 +10303,7 @@ function X0(i, t, e) {
10285
10303
  Object.values(e.transitionsMap).forEach((h) => {
10286
10304
  a.includes(h.id) && (n[h.id] = h);
10287
10305
  });
10288
- const c = M0({
10306
+ const c = D0({
10289
10307
  trackItemIds: Fe(s),
10290
10308
  transitionsMap: Fe(n),
10291
10309
  trackItemsMap: Fe(r)
@@ -10300,12 +10318,12 @@ function X0(i, t, e) {
10300
10318
  }
10301
10319
  });
10302
10320
  }
10303
- function z0(i, t) {
10321
+ function H0(i, t) {
10304
10322
  i.getObjects("Helper").reduce(
10305
10323
  (r, n) => Math.abs(n.top - t) < Math.abs(r.top - t) ? n : r
10306
10324
  ).setSelected(!0);
10307
10325
  }
10308
- const H0 = (i, t, e, s) => {
10326
+ const Y0 = (i, t, e, s) => {
10309
10327
  const r = Nh(i);
10310
10328
  return !r && i instanceof we ? {
10311
10329
  top: 0,
@@ -10315,22 +10333,22 @@ const H0 = (i, t, e, s) => {
10315
10333
  top: 0,
10316
10334
  left: 0,
10317
10335
  isInvalidDrop: !0
10318
- } : R0(
10336
+ } : F0(
10319
10337
  i,
10320
10338
  s,
10321
10339
  t,
10322
10340
  e
10323
- ) : L0(i) : A0();
10341
+ ) : R0(i) : L0();
10324
10342
  };
10325
- function Y0(i) {
10343
+ function V0(i) {
10326
10344
  i.on("mouse:up", Vh.bind(i)), i.on("object:moving", Uh);
10327
10345
  }
10328
- function V0(i) {
10346
+ function G0(i) {
10329
10347
  i.off("mouse:up", Vh.bind(i)), i.off("object:moving", Uh);
10330
10348
  }
10331
- const G0 = (i) => {
10349
+ const N0 = (i) => {
10332
10350
  J().canvas.fire("track:create", i);
10333
- }, N0 = (i) => {
10351
+ }, U0 = (i) => {
10334
10352
  J().canvas.fire("track-items:moved", i);
10335
10353
  }, $h = (i) => {
10336
10354
  var a, c, h;
@@ -10382,10 +10400,10 @@ const G0 = (i) => {
10382
10400
  positions: t.positionAfterTransform
10383
10401
  }
10384
10402
  };
10385
- G0(u);
10403
+ N0(u);
10386
10404
  } else if (o instanceof Nt) {
10387
10405
  const u = {
10388
- isSecondaryOverlapped: $0(),
10406
+ isSecondaryOverlapped: q0(),
10389
10407
  secondaryTracks: e.secondaryTracks,
10390
10408
  primaryTracks: e.primaryTracks,
10391
10409
  primaryPositions: {
@@ -10393,10 +10411,10 @@ const G0 = (i) => {
10393
10411
  positions: t.positionAfterTransform
10394
10412
  }
10395
10413
  };
10396
- N0(u);
10414
+ U0(u);
10397
10415
  }
10398
10416
  };
10399
- function U0() {
10417
+ function $0() {
10400
10418
  const i = J(), t = i.canvas, [e] = i.primaryMovingObjects, s = e.id, r = t.positionAfterTransform[s], n = e.getBoundingRect().top, o = r.top - n, a = {};
10401
10419
  return i.secondaryMovingObjects.forEach((c) => {
10402
10420
  const h = c.getBoundingRect().top + o, l = i.trackTopToIdMap[h], u = bn(
@@ -10410,8 +10428,8 @@ function U0() {
10410
10428
  };
10411
10429
  }), a;
10412
10430
  }
10413
- function $0() {
10414
- const i = U0(), t = J();
10431
+ function q0() {
10432
+ const i = $0(), t = J();
10415
10433
  return Object.keys(i).some((e) => {
10416
10434
  const s = t.trackToItemsMap[e], r = i[e].objects;
10417
10435
  return !s || !s.length ? !0 : s.filter((n) => !r.includes(n)).some((n) => qh(
@@ -10426,11 +10444,11 @@ function qh(i, t) {
10426
10444
  return t.left < r.left + r.width && t.left + t.width > r.left && t.top < r.top + r.height && t.top + t.height > r.top;
10427
10445
  });
10428
10446
  }
10429
- const q0 = (i) => {
10447
+ const K0 = (i) => {
10430
10448
  i.on("object:modified", $h);
10431
- }, K0 = (i) => {
10449
+ }, J0 = (i) => {
10432
10450
  i.off("object:modified", $h);
10433
- }, Kh = "drag", J0 = `${Kh}:start`, Jh = `${Kh}:end`, Zh = "timeline", Z0 = `${Zh}:boundingChanged`, Q0 = `${Zh}:seek`, ty = (i) => {
10451
+ }, Kh = "drag", Z0 = `${Kh}:start`, Jh = `${Kh}:end`, Zh = "timeline", Q0 = `${Zh}:boundingChanged`, ty = `${Zh}:seek`, ey = (i) => {
10434
10452
  const { trackItemIds: t, transitionsMap: e, trackItemsMap: s } = i, r = /* @__PURE__ */ new Map();
10435
10453
  Object.values(e).forEach((c) => {
10436
10454
  var u, d;
@@ -10463,7 +10481,7 @@ const q0 = (i) => {
10463
10481
  return n.forEach((c) => {
10464
10482
  c.sort((h, l) => "display" in h && "display" in l ? h.display.from - l.display.from : 0);
10465
10483
  }), n;
10466
- }, ey = "add:audio", sy = "add:video", ry = "add:image", iy = "add:text", ny = [
10484
+ }, sy = "add:audio", ry = "add:video", iy = "add:image", ny = "add:text", oy = [
10467
10485
  "transition",
10468
10486
  "image",
10469
10487
  "video",
@@ -10472,7 +10490,7 @@ const q0 = (i) => {
10472
10490
  "text"
10473
10491
  ];
10474
10492
  let tt, Is, Be = [], qs = "";
10475
- function oy(i, t) {
10493
+ function ay(i, t) {
10476
10494
  let e = 1 / 0, s = null;
10477
10495
  const r = new T(i.x, i.y);
10478
10496
  return t.forEach((n) => {
@@ -10482,7 +10500,7 @@ function oy(i, t) {
10482
10500
  o < e && (e = o, s = n);
10483
10501
  }), s;
10484
10502
  }
10485
- const ay = ({
10503
+ const cy = ({
10486
10504
  width: i,
10487
10505
  height: t,
10488
10506
  id: e,
@@ -10511,41 +10529,55 @@ const ay = ({
10511
10529
  });
10512
10530
  };
10513
10531
  function Qh(i) {
10514
- var g;
10515
- const t = (g = i.e.dataTransfer) == null ? void 0 : g.types[0];
10532
+ var f;
10533
+ let t = null;
10534
+ for (const g of ((f = i.e.dataTransfer) == null ? void 0 : f.types) || [])
10535
+ try {
10536
+ t = JSON.parse(g);
10537
+ break;
10538
+ } catch {
10539
+ try {
10540
+ const p = i.e.dataTransfer.getData(g);
10541
+ if (p) {
10542
+ t = JSON.parse(p);
10543
+ break;
10544
+ }
10545
+ } catch {
10546
+ }
10547
+ }
10516
10548
  if (!t) return;
10517
- const e = JSON.parse(t), s = e.type;
10518
- if (!ny.includes(s)) return;
10519
- const r = e.duration || 5e3, n = this;
10520
- n.discardActiveObject(), n.setActiveIds([]);
10521
- const o = Q(r, this.tScale), a = n.getItemSize(s), c = n.getTrackItems();
10522
- if (tt = ay({
10523
- width: o,
10524
- height: a,
10549
+ const e = t.type;
10550
+ if (!oy.includes(e)) return;
10551
+ const s = t.duration || 5e3, r = this;
10552
+ r.discardActiveObject(), r.setActiveIds([]);
10553
+ const n = Q(s, this.tScale), o = r.getItemSize(e), a = r.getTrackItems();
10554
+ if (tt = cy({
10555
+ width: n,
10556
+ height: o,
10525
10557
  id: "TransitionGuide",
10526
10558
  left: 0,
10527
10559
  top: 0,
10528
- type: s,
10529
- duration: r
10530
- }), tt.visible = !1, qs = s, s === "transition") {
10531
- Be = n.getObjects("Transition");
10532
- const p = Be.filter((m) => m.kind !== "none");
10533
- Be.forEach((m) => {
10534
- const b = c.find((C) => C.id === m.toId), _ = c.find((C) => C.id === m.fromId), x = m.width;
10535
- ((b == null ? void 0 : b.width) || 0) >= x / 2 && ((_ == null ? void 0 : _.width) || 0) >= x / 2 || (m.availableDrop = !1);
10536
- const w = p.find(
10537
- (C) => C.fromId === m.toId
10560
+ type: e,
10561
+ duration: s
10562
+ }), tt.visible = !1, qs = e, e === "transition") {
10563
+ Be = r.getObjects("Transition");
10564
+ const g = Be.filter((p) => p.kind !== "none");
10565
+ Be.forEach((p) => {
10566
+ const m = a.find((C) => C.id === p.toId), b = a.find((C) => C.id === p.fromId), _ = p.width;
10567
+ ((m == null ? void 0 : m.width) || 0) >= _ / 2 && ((b == null ? void 0 : b.width) || 0) >= _ / 2 || (p.availableDrop = !1);
10568
+ const w = g.find(
10569
+ (C) => C.fromId === p.toId
10538
10570
  );
10539
- w && w.width + x / 2 >= ((b == null ? void 0 : b.width) || 0) && (m.availableDrop = !1);
10540
- const O = p.find(
10541
- (C) => C.toId === m.fromId
10571
+ w && w.width + _ / 2 >= ((m == null ? void 0 : m.width) || 0) && (p.availableDrop = !1);
10572
+ const S = g.find(
10573
+ (C) => C.toId === p.fromId
10542
10574
  );
10543
- O && O.width + x / 2 >= ((_ == null ? void 0 : _.width) || 0) && (m.availableDrop = !1), m.visible = !0;
10575
+ S && S.width + _ / 2 >= ((b == null ? void 0 : b.width) || 0) && (p.availableDrop = !1), p.visible = !0;
10544
10576
  });
10545
10577
  }
10546
- const h = J();
10547
- n.trackIdAfterTransform = "", n.positionAfterTransform = {};
10548
- const l = tt, u = [tt];
10578
+ const c = J();
10579
+ r.trackIdAfterTransform = "", r.positionAfterTransform = {};
10580
+ const h = tt, l = [tt];
10549
10581
  ot({
10550
10582
  activeTrackToItemsMap: {},
10551
10583
  primaryTracks: {},
@@ -10555,31 +10587,31 @@ function Qh(i) {
10555
10587
  activeObjects: [],
10556
10588
  trackTopToIdMap: {},
10557
10589
  isDragOver: !1
10558
- }), ot({ activeObjects: u });
10559
- const d = n.getObjects("Track"), f = n.getTrackItems();
10560
- d.forEach((p) => {
10561
- const m = f.filter((b) => p.items.includes(b.id));
10562
- h.trackToItemsMap[p.id] = m, h.trackTopToIdMap[p.top] = p.id, h.trackTops.push(p.top);
10563
- }), h.trackTops.sort((p, m) => p - m), h.primaryMovingObjects = u, h.primaryMovingObjects = h.primaryMovingObjects.sort(
10564
- (p, m) => p.left - m.left
10565
- ), l && (n.positionBeforeTransform = {
10566
- top: l.top,
10567
- left: l.left
10568
- }), h.placeholderMovingObjects = h.primaryMovingObjects.map((p) => {
10569
- const m = p.getBoundingRect();
10570
- h.objectInitialPositions[p.id] = {
10571
- top: m.top,
10572
- left: m.left
10590
+ }), ot({ activeObjects: l });
10591
+ const u = r.getObjects("Track"), d = r.getTrackItems();
10592
+ u.forEach((g) => {
10593
+ const p = d.filter((m) => g.items.includes(m.id));
10594
+ c.trackToItemsMap[g.id] = p, c.trackTopToIdMap[g.top] = g.id, c.trackTops.push(g.top);
10595
+ }), c.trackTops.sort((g, p) => g - p), c.primaryMovingObjects = l, c.primaryMovingObjects = c.primaryMovingObjects.sort(
10596
+ (g, p) => g.left - p.left
10597
+ ), h && (r.positionBeforeTransform = {
10598
+ top: h.top,
10599
+ left: h.left
10600
+ }), c.placeholderMovingObjects = c.primaryMovingObjects.map((g) => {
10601
+ const p = g.getBoundingRect();
10602
+ c.objectInitialPositions[g.id] = {
10603
+ top: p.top,
10604
+ left: p.left
10573
10605
  };
10574
- const b = new Vs({
10575
- id: `${p.id}-placeholder`,
10576
- left: m.left,
10577
- top: m.top,
10578
- width: m.width,
10579
- height: m.height
10606
+ const m = new Vs({
10607
+ id: `${g.id}-placeholder`,
10608
+ left: p.left,
10609
+ top: p.top,
10610
+ width: p.width,
10611
+ height: p.height
10580
10612
  });
10581
- return b.visible = !1, b.draggedObject = p, b;
10582
- }), n.add(...h.placeholderMovingObjects), n.add(tt), se(J0);
10613
+ return m.visible = !1, m.draggedObject = g, m;
10614
+ }), r.add(...c.placeholderMovingObjects), r.add(tt), se(Z0);
10583
10615
  }
10584
10616
  const tl = (i) => {
10585
10617
  const t = J();
@@ -10596,15 +10628,17 @@ function el() {
10596
10628
  }), i.remove(tt);
10597
10629
  }
10598
10630
  function sl(i) {
10599
- const t = J(), e = t.placeholderMovingObjects[0];
10600
- if (e.visible || (tt.visible = !0, e.visible = !0), t.activeObjects[0] instanceof $s && (e.visible = !1), !tt) return !1;
10601
- i.e.preventDefault();
10631
+ const t = J();
10632
+ if (!tt || !t.placeholderMovingObjects || !t.placeholderMovingObjects[0])
10633
+ return !1;
10634
+ const e = t.placeholderMovingObjects[0];
10635
+ e.visible || (tt.visible = !0, e.visible = !0), t.activeObjects[0] instanceof $s && (e.visible = !1), i.e.preventDefault();
10602
10636
  const s = this, r = s.getScenePoint(i.e);
10603
10637
  tt.set({
10604
10638
  left: r.x - 16,
10605
10639
  top: r.y - tt.height / 2
10606
10640
  });
10607
- const n = oy(
10641
+ const n = ay(
10608
10642
  r,
10609
10643
  Be.filter((c) => c.availableDrop)
10610
10644
  );
@@ -10643,76 +10677,92 @@ function sl(i) {
10643
10677
  s.requestRenderAll();
10644
10678
  }
10645
10679
  function rl(i) {
10646
- var o;
10680
+ var n;
10647
10681
  qs = "";
10648
10682
  const t = this;
10649
10683
  tl(t);
10650
10684
  const e = J(), s = e.draggingOverTrack;
10651
10685
  ot({ draggingOverTrack: null, isPointerOverHelperTrack: !1 });
10652
- const r = (o = i.e.dataTransfer) == null ? void 0 : o.types[0], n = JSON.parse(i.e.dataTransfer.getData(r));
10653
- if (n.type !== "transition") {
10654
- const a = e.activeObjects[0], c = P(a.left, t.tScale);
10655
- if (s instanceof Nt)
10656
- if (e.placeholderMovingObjects[0].opacity !== 0) {
10657
- const l = Gi(s, this.getObjects("Track"));
10658
- if (s.magnetic) {
10659
- const u = e.initialTrackPoints[e.initialTrackPoints.length - 1], d = P(u, t.tScale) || 0;
10660
- Lr(n, l, d);
10661
- } else Lr(n, l, c);
10662
- } else {
10663
- const l = t.getScenePoint(i.e), u = P(
10664
- l.x,
10686
+ let r = null;
10687
+ for (const o of ((n = i.e.dataTransfer) == null ? void 0 : n.types) || [])
10688
+ try {
10689
+ r = JSON.parse(o);
10690
+ break;
10691
+ } catch {
10692
+ try {
10693
+ const a = i.e.dataTransfer.getData(o);
10694
+ if (a) {
10695
+ r = JSON.parse(a);
10696
+ break;
10697
+ }
10698
+ } catch {
10699
+ }
10700
+ }
10701
+ if (r) {
10702
+ if (r.type !== "transition") {
10703
+ const o = e.activeObjects[0], a = P(o.left, t.tScale);
10704
+ if (s instanceof Nt)
10705
+ if (e.placeholderMovingObjects[0].opacity !== 0) {
10706
+ const h = Gi(s, this.getObjects("Track"));
10707
+ if (s.magnetic) {
10708
+ const l = e.initialTrackPoints[e.initialTrackPoints.length - 1], u = P(l, t.tScale) || 0;
10709
+ Lr(r, h, u);
10710
+ } else Lr(r, h, a);
10711
+ } else {
10712
+ const h = t.getScenePoint(i.e), l = P(
10713
+ h.x,
10714
+ t.tScale
10715
+ ), u = h.y, f = t.getObjects("Helper").reduce(
10716
+ (p, m) => Math.abs(m.top - u) < Math.abs(p.top - u) ? m : p
10717
+ ), g = Gi(f, this.getObjects("Track"));
10718
+ Lr(r, g, l, !0);
10719
+ }
10720
+ else {
10721
+ const c = t.getScenePoint(i.e), h = P(
10722
+ c.x - 16,
10665
10723
  t.tScale
10666
- ), d = l.y, g = t.getObjects("Helper").reduce(
10667
- (m, b) => Math.abs(b.top - d) < Math.abs(m.top - d) ? b : m
10668
- ), p = Gi(g, this.getObjects("Track"));
10669
- Lr(n, p, u, !0);
10724
+ ), l = Gi(
10725
+ s,
10726
+ this.getObjects("Track")
10727
+ );
10728
+ Lr(r, l, h, !0);
10670
10729
  }
10671
- else {
10672
- const h = t.getScenePoint(i.e), l = P(
10673
- h.x - 16,
10674
- t.tScale
10675
- ), u = Gi(
10676
- s,
10677
- this.getObjects("Track")
10678
- );
10679
- Lr(n, u, l, !0);
10730
+ this.remove(o), this.requestRenderAll();
10731
+ return;
10680
10732
  }
10681
- this.remove(a), this.requestRenderAll();
10682
- return;
10683
- }
10684
- if (tt) {
10685
- if (Is) {
10686
- const a = Is.id, c = o0(n, ["kind", "direction"]);
10687
- Object.keys(c).forEach((_) => {
10688
- _ === "kind" ? Is.kind = c[_] : Is[_] = c[_];
10689
- });
10690
- const h = Fe(this.trackItemIds), l = Fe(this.transitionsMap), u = Fe(this.trackItemsMap);
10691
- l[a] = {
10692
- ...l[a],
10693
- ...c
10694
- };
10695
- const d = ty({
10696
- trackItemIds: h,
10697
- transitionsMap: l,
10698
- trackItemsMap: u
10699
- }), g = l[a].fromId, p = d.find((_) => _.find((x) => x.id === g)) || [], m = cy(
10700
- p
10701
- ), b = hy(
10702
- this.trackItemsMap,
10703
- m
10704
- );
10705
- this.trackItemsMap = b, this.transitionsMap[a] = {
10706
- ...this.transitionsMap[a],
10707
- ...c
10708
- }, this.adjustMagneticTrack(), this.calcBounding(), this.updateTransitions(), this.refreshTrackLayout(), this.updateState({ kind: "add:transition", updateHistory: !0 });
10733
+ if (tt) {
10734
+ if (Is) {
10735
+ const o = Is.id, a = a0(r, ["kind", "direction"]);
10736
+ Object.keys(a).forEach((b) => {
10737
+ b === "kind" ? Is.kind = a[b] : Is[b] = a[b];
10738
+ });
10739
+ const c = Fe(this.trackItemIds), h = Fe(this.transitionsMap), l = Fe(this.trackItemsMap);
10740
+ h[o] = {
10741
+ ...h[o],
10742
+ ...a
10743
+ };
10744
+ const u = ey({
10745
+ trackItemIds: c,
10746
+ transitionsMap: h,
10747
+ trackItemsMap: l
10748
+ }), f = h[o].fromId, g = u.find((b) => b.find((_) => _.id === f)) || [], p = hy(
10749
+ g
10750
+ ), m = ly(
10751
+ this.trackItemsMap,
10752
+ p
10753
+ );
10754
+ this.trackItemsMap = m, this.transitionsMap[o] = {
10755
+ ...this.transitionsMap[o],
10756
+ ...a
10757
+ }, this.adjustMagneticTrack(), this.calcBounding(), this.updateTransitions(), this.refreshTrackLayout(), this.updateState({ kind: "add:transition", updateHistory: !0 });
10758
+ }
10759
+ Be.forEach((o) => {
10760
+ o.strokeDashArray = [], o.setSelected(!1), o.kind === "none" && (o.visible = !1);
10761
+ }), t.remove(tt), t.requestRenderAll(), se(Jh);
10709
10762
  }
10710
- Be.forEach((a) => {
10711
- a.strokeDashArray = [], a.setSelected(!1), a.kind === "none" && (a.visible = !1);
10712
- }), t.remove(tt), t.requestRenderAll(), se(Jh);
10713
10763
  }
10714
10764
  }
10715
- const cy = (i) => {
10765
+ const hy = (i) => {
10716
10766
  var r;
10717
10767
  const [t] = i, e = i.filter(
10718
10768
  (n) => n.type !== "transition"
@@ -10728,7 +10778,7 @@ const cy = (i) => {
10728
10778
  display: a
10729
10779
  };
10730
10780
  });
10731
- }, hy = (i, t) => {
10781
+ }, ly = (i, t) => {
10732
10782
  let e = i;
10733
10783
  return t.forEach((s) => {
10734
10784
  e[s.id] = s;
@@ -10746,28 +10796,28 @@ const cy = (i) => {
10746
10796
  return h < l ? c : o;
10747
10797
  }, 0);
10748
10798
  }, Lr = (i, t, e, s) => {
10749
- i.type === "image" ? se(ry, {
10799
+ i.type === "image" ? se(iy, {
10750
10800
  payload: {
10751
10801
  ...i,
10752
10802
  id: Ds(),
10753
10803
  display: { from: e }
10754
10804
  },
10755
10805
  options: { trackIndex: t, isNewTrack: s }
10756
- }) : i.type === "video" ? se(sy, {
10806
+ }) : i.type === "video" ? se(ry, {
10757
10807
  payload: {
10758
10808
  ...i,
10759
10809
  id: Ds(),
10760
10810
  display: { from: e }
10761
10811
  },
10762
10812
  options: { trackIndex: t, isNewTrack: s }
10763
- }) : i.type === "audio" ? se(ey, {
10813
+ }) : i.type === "audio" ? se(sy, {
10764
10814
  payload: {
10765
10815
  ...i,
10766
10816
  id: Ds(),
10767
10817
  display: { from: e }
10768
10818
  },
10769
10819
  options: { trackIndex: t, isNewTrack: s }
10770
- }) : i.type === "text" && se(iy, {
10820
+ }) : i.type === "text" && se(ny, {
10771
10821
  payload: {
10772
10822
  ...i,
10773
10823
  id: Ds(),
@@ -10776,10 +10826,10 @@ const cy = (i) => {
10776
10826
  options: { trackIndex: t, isNewTrack: s }
10777
10827
  });
10778
10828
  };
10779
- function ly(i) {
10829
+ function uy(i) {
10780
10830
  i.on("dragover", sl), i.on("dragenter", Qh), i.on("dragleave", el), i.on("drop", rl);
10781
10831
  }
10782
- function uy(i) {
10832
+ function dy(i) {
10783
10833
  i.off("dragover", sl), i.off("dragenter", Qh), i.off("dragleave", el), i.off("drop", rl);
10784
10834
  }
10785
10835
  function il(i) {
@@ -10818,9 +10868,9 @@ function al(i) {
10818
10868
  t.setSelected(!1);
10819
10869
  });
10820
10870
  }
10821
- const dy = (i) => {
10871
+ const fy = (i) => {
10822
10872
  i.on("selection:created", nl), i.on("selection:updated", ol), i.on("selection:cleared", al), i.on("mouse:wheel", il);
10823
- }, fy = (i) => {
10873
+ }, gy = (i) => {
10824
10874
  i.off("mouse:wheel", il), i.off("selection:created", nl), i.off("selection:updated", ol), i.off("selection:cleared", al);
10825
10875
  }, cl = () => {
10826
10876
  var n;
@@ -10854,14 +10904,14 @@ const dy = (i) => {
10854
10904
  }
10855
10905
  t.alignTransitionsToTrack(!1);
10856
10906
  };
10857
- function gy(i) {
10907
+ function py(i) {
10858
10908
  i.on("object:moving", cl);
10859
10909
  }
10860
- function py(i) {
10910
+ function my(i) {
10861
10911
  i.off("object:moving", cl);
10862
10912
  }
10863
10913
  let Et, eo = !1;
10864
- function my(i, t) {
10914
+ function vy(i, t) {
10865
10915
  const e = i.canvas;
10866
10916
  if (e.objectTypes.includes(i.type)) {
10867
10917
  Et || (Et = i);
@@ -10871,7 +10921,7 @@ function my(i, t) {
10871
10921
  }
10872
10922
  function hl(i) {
10873
10923
  const t = this, e = t.findTarget(i.e), s = t.getScenePoint(i.e);
10874
- e && (e.isSelected && Et && (e.hoverCursor = "default"), my(e, s));
10924
+ e && (e.isSelected && Et && (e.hoverCursor = "default"), vy(e, s));
10875
10925
  }
10876
10926
  function ll() {
10877
10927
  Et && (Et.lockMovementX = !1, Et.lockMovementY = !1, Et = void 0);
@@ -10888,18 +10938,18 @@ function fl() {
10888
10938
  function gl() {
10889
10939
  eo = !1;
10890
10940
  }
10891
- function vy(i) {
10941
+ function yy(i) {
10892
10942
  i.on("mouse:out", dl.bind(i)), i.on("mouse:up", ll.bind(i)), i.on("mouse:move", hl.bind(i)), i.on("after:render", ul.bind(i)), i.on("object:resizing", fl.bind(i)), i.on("object:modified", gl.bind(i));
10893
10943
  }
10894
- function yy(i) {
10944
+ function by(i) {
10895
10945
  i.off("mouse:out", dl.bind(i)), i.off("mouse:up", ll.bind(i)), i.off("mouse:move", hl.bind(i)), i.off("after:render", ul.bind(i)), i.off("object:resizing", fl.bind(i)), i.off("object:modified", gl.bind(i));
10896
10946
  }
10897
- const by = (i) => {
10898
- ot({ canvas: i }), m0(i), u0(i), y0(i), w0(i), O0(i), Y0(i), q0(i), ly(i), dy(i), gy(i), vy(i);
10899
- }, _y = (i) => {
10900
- ot({ canvas: null }), v0(i), d0(i), b0(i), C0(i), k0(i), V0(i), K0(i), uy(i), fy(i), py(i), yy(i);
10947
+ const _y = (i) => {
10948
+ ot({ canvas: i }), v0(i), d0(i), b0(i), C0(i), k0(i), V0(i), K0(i), uy(i), fy(i), py(i), yy(i);
10949
+ }, Ty = (i) => {
10950
+ ot({ canvas: null }), y0(i), f0(i), _0(i), O0(i), M0(i), G0(i), J0(i), dy(i), gy(i), my(i), by(i);
10901
10951
  };
10902
- class Ty {
10952
+ class xy {
10903
10953
  removeTransitions() {
10904
10954
  const t = this.getObjects("Transition");
10905
10955
  this.remove(...t);
@@ -10991,8 +11041,8 @@ function pl(i) {
10991
11041
  if (_.type === "audio")
10992
11042
  if (d) {
10993
11043
  u.push(_.id);
10994
- const x = a.objectInitialPositions[_.id];
10995
- x && (_.set({ top: x.top, left: x.left }), _.setCoords());
11044
+ const w = a.objectInitialPositions[_.id];
11045
+ w && (_.set({ top: w.top, left: w.left }), _.setCoords());
10996
11046
  } else
10997
11047
  d = !0;
10998
11048
  });
@@ -11003,7 +11053,7 @@ function pl(i) {
11003
11053
  accepts: h.accepts,
11004
11054
  muted: h.muted || !1
11005
11055
  }, g = Qn(
11006
- Object.keys(t).map((_) => t[_].objects.filter((x) => !u.includes(x.id)).map((x) => x.id))
11056
+ Object.keys(t).map((_) => t[_].objects.filter((w) => !u.includes(w.id)).map((w) => w.id))
11007
11057
  );
11008
11058
  let p = Gs(this.tracks, [
11009
11059
  ...Object.keys(r).filter((_) => !u.includes(_)),
@@ -11011,17 +11061,17 @@ function pl(i) {
11011
11061
  ]);
11012
11062
  const m = [];
11013
11063
  Object.keys(t).forEach((_) => {
11014
- const { objects: x, index: w } = t[_], O = this.tracks.find(
11064
+ const { objects: w, index: S } = t[_], C = this.tracks.find(
11015
11065
  (M) => M.id === _
11016
- ), C = x.map((M) => M.id).filter(
11066
+ ), O = w.map((M) => M.id).filter(
11017
11067
  (M) => !this.transitionIds.includes(M) && !u.includes(M)
11018
11068
  ), D = {
11019
11069
  id: nr(),
11020
- items: C,
11021
- type: O.type,
11022
- accepts: O.accepts,
11023
- tempIndex: w,
11024
- muted: O.muted || !1
11070
+ items: O,
11071
+ type: C.type,
11072
+ accepts: C.accepts,
11073
+ tempIndex: S,
11074
+ muted: C.muted || !1
11025
11075
  };
11026
11076
  m.push(D);
11027
11077
  });
@@ -11081,11 +11131,11 @@ function ml(i) {
11081
11131
  secondaryTracks: e,
11082
11132
  primaryTracks: s,
11083
11133
  primaryPositions: r
11084
- } = i, { trackId: n, positions: o } = r, a = this.tracks.find((C) => C.id === n), c = J(), l = c.primaryMovingObjects.sort((C, D) => C.left - D.left);
11085
- l.forEach((C, D) => {
11086
- l[D - 1] && C.left - l[D - 1].left;
11134
+ } = i, { trackId: n, positions: o } = r, a = this.tracks.find((O) => O.id === n), c = J(), l = c.primaryMovingObjects.sort((O, D) => O.left - D.left);
11135
+ l.forEach((O, D) => {
11136
+ l[D - 1] && O.left - l[D - 1].left;
11087
11137
  });
11088
- const u = this.tracks.findIndex((C) => C.id === n), d = Object.keys(o), f = this.tracks.find((C) => C.id === n), g = [];
11138
+ const u = this.tracks.findIndex((O) => O.id === n), d = Object.keys(o), f = this.tracks.find((O) => O.id === n), g = [];
11089
11139
  f && f.items.find((D) => {
11090
11140
  const M = this.trackItemsMap[D];
11091
11141
  return M && M.type === "audio" && !d.includes(D);
@@ -11101,19 +11151,19 @@ function ml(i) {
11101
11151
  }
11102
11152
  });
11103
11153
  const p = {};
11104
- d.forEach((C) => {
11105
- g.includes(C) || (p[C] = o[C]);
11154
+ d.forEach((O) => {
11155
+ g.includes(O) || (p[O] = o[O]);
11106
11156
  });
11107
11157
  const m = Object.keys(p), b = Qn(
11108
- Object.keys(e).map((C) => e[C].objects.map((D) => D.id))
11158
+ Object.keys(e).map((O) => e[O].objects.map((D) => D.id))
11109
11159
  );
11110
11160
  let _ = Gs(this.tracks, [
11111
11161
  ...m,
11112
11162
  ...b
11113
11163
  ]);
11114
- Object.keys(s).forEach((C) => {
11164
+ Object.keys(s).forEach((O) => {
11115
11165
  this.pauseEventListeners();
11116
- const { objects: D } = s[C];
11166
+ const { objects: D } = s[O];
11117
11167
  D.forEach((R) => {
11118
11168
  if (R.isMain && (a != null && a.magnetic) || g.includes(R.id)) return;
11119
11169
  const z = p[R.id];
@@ -11122,9 +11172,9 @@ function ml(i) {
11122
11172
  const M = r.trackId, I = _.find((R) => R.id === M);
11123
11173
  I == null || I.items.push(...m), this.tracks = _;
11124
11174
  });
11125
- const x = this.tracks[u], w = [];
11126
- Object.keys(e).forEach((C) => {
11127
- const { objects: D, index: M } = e[C], I = D.filter(
11175
+ const w = this.tracks[u], S = [];
11176
+ Object.keys(e).forEach((O) => {
11177
+ const { objects: D, index: M } = e[O], I = D.filter(
11128
11178
  (E) => E.type !== "transition" && !g.includes(E.id)
11129
11179
  ).map((E) => E.id), [R] = I, z = this.trackItemsMap[R];
11130
11180
  if (t && z) {
@@ -11136,14 +11186,14 @@ function ml(i) {
11136
11186
  tempIndex: M,
11137
11187
  muted: !1
11138
11188
  };
11139
- w.push(W);
11189
+ S.push(W);
11140
11190
  } else {
11141
11191
  const E = _[u + M];
11142
11192
  E == null || E.items.push(...I), this.tracks = _;
11143
11193
  }
11144
11194
  });
11145
- const O = Hh(x, w);
11146
- O.length && _.splice(u, 1, ...O), this.tracks = _, this.renderTracks(), this.alignItemsToTrack(), this.uodateTrackItemIdsOrdering(), this.adjustMagneticTrack(), or(this), this.updateTransitions(!0), this.updateState({ updateHistory: !0, kind: "update" });
11195
+ const C = Hh(w, S);
11196
+ C.length && _.splice(u, 1, ...C), this.tracks = _, this.renderTracks(), this.alignItemsToTrack(), this.uodateTrackItemIdsOrdering(), this.adjustMagneticTrack(), or(this), this.updateTransitions(!0), this.updateState({ updateHistory: !0, kind: "update" });
11147
11197
  }
11148
11198
  function vl({
11149
11199
  trackItemIds: i,
@@ -11214,23 +11264,23 @@ function vl({
11214
11264
  or(this), this.updateTransitions(!0), this.uodateTrackItemIdsOrdering(), this.updateState({ updateHistory: !0, kind: "update" });
11215
11265
  }
11216
11266
  let _n = { x: 0, y: 0 };
11217
- function xy(i) {
11267
+ function Sy(i) {
11218
11268
  _n = i.scenePoint;
11219
11269
  }
11220
11270
  function yl(i) {
11221
11271
  const t = i.scenePoint;
11222
11272
  if ((_n.x === t.x || _n.y === t.y) && !i.target) {
11223
11273
  const s = this.getElement().getBoundingClientRect(), r = this.viewportTransform, n = i.e.clientX - s.left - r[4], o = P(n, this.scale.zoom);
11224
- se(Q0, { payload: { time: o } });
11274
+ se(ty, { payload: { time: o } });
11225
11275
  }
11226
11276
  }
11227
- const Sy = (i) => {
11228
- i.on("track:create", pl.bind(i)), i.on("track-items:resized", vl.bind(i)), i.on("track-items:moved", ml.bind(i)), i.on("mouse:up", yl.bind(i)), i.on("mouse:down", xy.bind(i));
11277
+ const wy = (i) => {
11278
+ i.on("track:create", pl.bind(i)), i.on("track-items:resized", vl.bind(i)), i.on("track-items:moved", ml.bind(i)), i.on("mouse:up", yl.bind(i)), i.on("mouse:down", Sy.bind(i));
11229
11279
  };
11230
- function wy(i) {
11280
+ function Cy(i) {
11231
11281
  i.off("track:create", pl.bind(i)), i.off("track-items:resized", vl.bind(i)), i.off("track-items:moved", ml.bind(i)), i.off("mouse:up", yl.bind(i));
11232
11282
  }
11233
- function Cy(i, t) {
11283
+ function Oy(i, t) {
11234
11284
  return t.forEach((e) => {
11235
11285
  Object.getOwnPropertyNames(e.prototype).forEach((s) => {
11236
11286
  s !== "constructor" && Object.defineProperty(
@@ -11242,7 +11292,7 @@ function Cy(i, t) {
11242
11292
  }), i;
11243
11293
  }
11244
11294
  let bl, _l, Tl, xl, Sl, wl, Cl, Ol, kl;
11245
- const Oy = (i) => {
11295
+ const ky = (i) => {
11246
11296
  bl = i.state.subscribeToActiveIds(
11247
11297
  ({ activeIds: t }) => {
11248
11298
  const e = i.activeIds;
@@ -11348,7 +11398,7 @@ const Oy = (i) => {
11348
11398
  }
11349
11399
  }), i.trackItemIds = e.trackItemIds, i.activeIds = e.activeIds, or(i), i.renderTracks(), i.alignItemsToTrack(), i.updateTrackItemCoords(), i.calcBounding(), i.updateTransitions(), i.refreshTrackLayout(), i.selectTrackItemByIds(e.activeIds), i.updateState({ updateHistory: !1 });
11350
11400
  });
11351
- }, ky = (i) => {
11401
+ }, My = (i) => {
11352
11402
  bl.unsubscribe(), _l.unsubscribe(), Tl.unsubscribe(), xl.unsubscribe(), Sl.unsubscribe(), wl.unsubscribe(), Cl.unsubscribe(), Ol.unsubscribe(), kl.unsubscribe();
11353
11403
  }, Ma = (i, t) => {
11354
11404
  let e = !1;
@@ -11357,30 +11407,30 @@ const Oy = (i) => {
11357
11407
  r.containsPoint(i) && (s.push(r), e = !0);
11358
11408
  }), { isOverObject: e, overObjects: s };
11359
11409
  };
11360
- function My(i) {
11410
+ function Dy(i) {
11361
11411
  return JSON.parse(JSON.stringify(i));
11362
11412
  }
11363
- class Dy {
11413
+ class Iy {
11364
11414
  constructor(t, e = {}) {
11365
- S(this, "canvas");
11366
- S(this, "fill", "rgba(0,0,0,.3)");
11367
- S(this, "stroke", "rgba(255,255,255,.3)");
11368
- S(this, "lineWidth", 1);
11369
- S(this, "hideX", !1);
11370
- S(this, "hideY", !1);
11371
- S(this, "scrollbarMinWidth", 40);
11372
- S(this, "scrollbarSize", 5);
11373
- S(this, "scrollSpace", 0);
11374
- S(this, "padding", 4);
11375
- S(this, "extraMarginX", 200);
11376
- S(this, "extraMarginY", 200);
11377
- S(this, "offsetX", 0);
11378
- S(this, "offsetY", 0);
11379
- S(this, "scrollbarWidth", 5);
11380
- S(this, "scrollbarColor", "rgba(0,0,0,.3)");
11381
- S(this, "onViewportChange");
11382
- S(this, "_bar");
11383
- S(this, "_barViewport", {
11415
+ x(this, "canvas");
11416
+ x(this, "fill", "rgba(0,0,0,.3)");
11417
+ x(this, "stroke", "rgba(255,255,255,.3)");
11418
+ x(this, "lineWidth", 1);
11419
+ x(this, "hideX", !1);
11420
+ x(this, "hideY", !1);
11421
+ x(this, "scrollbarMinWidth", 40);
11422
+ x(this, "scrollbarSize", 5);
11423
+ x(this, "scrollSpace", 0);
11424
+ x(this, "padding", 4);
11425
+ x(this, "extraMarginX", 200);
11426
+ x(this, "extraMarginY", 200);
11427
+ x(this, "offsetX", 0);
11428
+ x(this, "offsetY", 0);
11429
+ x(this, "scrollbarWidth", 5);
11430
+ x(this, "scrollbarColor", "rgba(0,0,0,.3)");
11431
+ x(this, "onViewportChange");
11432
+ x(this, "_bar");
11433
+ x(this, "_barViewport", {
11384
11434
  left: 1,
11385
11435
  right: -1,
11386
11436
  top: 1,
@@ -11388,9 +11438,9 @@ class Dy {
11388
11438
  sx: 1,
11389
11439
  sy: 1
11390
11440
  });
11391
- S(this, "_originalMouseDown");
11392
- S(this, "_originalMouseMove");
11393
- S(this, "_originalMouseUp");
11441
+ x(this, "_originalMouseDown");
11442
+ x(this, "_originalMouseMove");
11443
+ x(this, "_originalMouseUp");
11394
11444
  this.canvas = t, Object.assign(this, e), e.scrollbarWidth !== void 0 && (this.scrollbarSize = e.scrollbarWidth), e.scrollbarColor !== void 0 && (this.fill = e.scrollbarColor), this._originalMouseDown = this.canvas.__onMouseDown, this._originalMouseMove = this.canvas._onMouseMove, this._originalMouseUp = this.canvas._onMouseUp, this.canvas.__onMouseDown = this.mouseDownHandler.bind(this), this.canvas._onMouseMove = this.mouseMoveHandler.bind(this), this.canvas._onMouseUp = this.mouseUpHandler.bind(this), this.beforeRenderHandler = this.beforeRenderHandler.bind(this), this.afterRenderHandler = this.afterRenderHandler.bind(this), this.initBehavior();
11395
11445
  }
11396
11446
  initBehavior() {
@@ -11510,7 +11560,7 @@ class Dy {
11510
11560
  this._originalMouseDown && (this.canvas.__onMouseDown = this._originalMouseDown), this._originalMouseMove && (this.canvas._onMouseMove = this._originalMouseMove), this._originalMouseUp && (this.canvas._onMouseUp = this._originalMouseUp), this.canvas.off("before:render", this.beforeRenderHandler), this.canvas.off("after:render", this.afterRenderHandler);
11511
11561
  }
11512
11562
  }
11513
- const Iy = (i) => {
11563
+ const jy = (i) => {
11514
11564
  const t = i.getTrackItems();
11515
11565
  if (t.length === 0)
11516
11566
  return { left: 0, top: 0, right: 0, bottom: 0 };
@@ -11518,8 +11568,8 @@ const Iy = (i) => {
11518
11568
  t.map((o) => o.getCoords()).flat(1)
11519
11569
  );
11520
11570
  return { left: e, top: s, right: e + r, bottom: s + n };
11521
- }, jy = (i, t, e = 0, s = 0, r = 200, n = 200) => {
11522
- const o = t[0], a = Iy(i), c = Math.min(a.left, -e), h = Math.min(a.top, -s), l = a.right + r, u = a.bottom + n, d = l - c, f = u - h, g = i.width / o, p = i.height / o;
11571
+ }, Ey = (i, t, e = 0, s = 0, r = 200, n = 200) => {
11572
+ const o = t[0], a = jy(i), c = Math.min(a.left, -e), h = Math.min(a.top, -s), l = a.right + r, u = a.bottom + n, d = l - c, f = u - h, g = i.width / o, p = i.height / o;
11523
11573
  if (d <= g)
11524
11574
  t[4] = -c * o;
11525
11575
  else {
@@ -11537,7 +11587,7 @@ const Iy = (i) => {
11537
11587
  b < 0 && t[5] < b && (t[5] = b);
11538
11588
  }
11539
11589
  return t;
11540
- }, Ey = (i, t = {}) => (e) => {
11590
+ }, Py = (i, t = {}) => (e) => {
11541
11591
  const s = e.e;
11542
11592
  s.target == i.upperCanvasEl && s.preventDefault();
11543
11593
  const r = Math.floor(s.deltaY) != Math.ceil(s.deltaY);
@@ -11549,7 +11599,7 @@ const Iy = (i) => {
11549
11599
  }
11550
11600
  const n = i.viewportTransform.slice(0);
11551
11601
  s.shiftKey ? n[4] -= s.deltaY : (n[4] -= s.deltaX, n[5] -= s.deltaY);
11552
- const o = jy(
11602
+ const o = Ey(
11553
11603
  i,
11554
11604
  n,
11555
11605
  t.offsetX ?? 0,
@@ -11562,35 +11612,35 @@ const Iy = (i) => {
11562
11612
  constructor(e, s) {
11563
11613
  var r;
11564
11614
  super(e, s);
11565
- S(this, "itemTypes", []);
11566
- S(this, "acceptsMap");
11567
- S(this, "sizesMap", {});
11568
- S(this, "objectTypes", []);
11615
+ x(this, "itemTypes", []);
11616
+ x(this, "acceptsMap");
11617
+ x(this, "sizesMap", {});
11618
+ x(this, "objectTypes", []);
11569
11619
  // Declare properties from state
11570
- S(this, "tracks", []);
11571
- S(this, "hoverCornerItem", !1);
11572
- S(this, "trackItemsMap", {});
11573
- S(this, "trackItemIds", []);
11574
- S(this, "transitionIds", []);
11575
- S(this, "transitionsMap", {});
11576
- S(this, "scale");
11577
- S(this, "duration");
11578
- S(this, "bounding");
11579
- S(this, "onScroll");
11580
- S(this, "onResizeCanvas");
11581
- S(this, "tScale");
11582
- S(this, "state");
11583
- S(this, "activeIds", []);
11584
- S(this, "spacing");
11585
- S(this, "guideLineColor");
11586
- S(this, "withTransitions", []);
11587
- S(this, "_mouseWheelHandler");
11588
- S(this, "_scrollbars");
11589
- S(this, "_viewportChangeCallback");
11620
+ x(this, "tracks", []);
11621
+ x(this, "hoverCornerItem", !1);
11622
+ x(this, "trackItemsMap", {});
11623
+ x(this, "trackItemIds", []);
11624
+ x(this, "transitionIds", []);
11625
+ x(this, "transitionsMap", {});
11626
+ x(this, "scale");
11627
+ x(this, "duration");
11628
+ x(this, "bounding");
11629
+ x(this, "onScroll");
11630
+ x(this, "onResizeCanvas");
11631
+ x(this, "tScale");
11632
+ x(this, "state");
11633
+ x(this, "activeIds", []);
11634
+ x(this, "spacing");
11635
+ x(this, "guideLineColor");
11636
+ x(this, "withTransitions", []);
11637
+ x(this, "_mouseWheelHandler");
11638
+ x(this, "_scrollbars");
11639
+ x(this, "_viewportChangeCallback");
11590
11640
  this.bounding = s.bounding || {
11591
11641
  width: s.width || 0,
11592
11642
  height: s.height || 0
11593
- }, this.tScale = ((r = s.scale) == null ? void 0 : r.zoom) || 1, this.state = s.state, this.onScroll = s.onScroll, this.onResizeCanvas = s.onResizeCanvas, this.acceptsMap = s.acceptsMap || {}, this.sizesMap = s.sizesMap || {}, this.itemTypes = s.itemTypes || [], this.objectTypes = Ws.objectTypes, this.spacing = T0(s.spacing), this.itemTypes = s.itemTypes || [], this.positionAfterTransform = {}, this.initializeCanvasDefaults(), this.scale = s.scale, this.duration = s.duration, this.guideLineColor = s.guideLineColor || Ue, this.initEventListeners(), this.withTransitions = s.withTransitions || [];
11643
+ }, this.tScale = ((r = s.scale) == null ? void 0 : r.zoom) || 1, this.state = s.state, this.onScroll = s.onScroll, this.onResizeCanvas = s.onResizeCanvas, this.acceptsMap = s.acceptsMap || {}, this.sizesMap = s.sizesMap || {}, this.itemTypes = s.itemTypes || [], this.objectTypes = Ws.objectTypes, this.spacing = x0(s.spacing), this.itemTypes = s.itemTypes || [], this.positionAfterTransform = {}, this.initializeCanvasDefaults(), this.scale = s.scale, this.duration = s.duration, this.guideLineColor = s.guideLineColor || Ue, this.initEventListeners(), this.withTransitions = s.withTransitions || [];
11594
11644
  }
11595
11645
  static registerItems(e) {
11596
11646
  Object.keys(e).forEach((s) => {
@@ -11612,7 +11662,7 @@ const Iy = (i) => {
11612
11662
  },
11613
11663
  scrollSpace: e.scrollSpace ?? 0
11614
11664
  };
11615
- this._mouseWheelHandler = Ey(this, s), this.on("mouse:wheel", this._mouseWheelHandler), this._scrollbars = new Dy(this, s);
11665
+ this._mouseWheelHandler = Py(this, s), this.on("mouse:wheel", this._mouseWheelHandler), this._scrollbars = new Iy(this, s);
11616
11666
  const r = e.offsetX ?? 0, n = e.offsetY ?? 0;
11617
11667
  if (r !== 0 || n !== 0) {
11618
11668
  const o = this.viewportTransform.slice(0);
@@ -11660,7 +11710,7 @@ const Iy = (i) => {
11660
11710
  );
11661
11711
  if (r && (r == null ? void 0 : r.findControl(
11662
11712
  this.getViewportPoint(e),
11663
- S0(e)
11713
+ w0(e)
11664
11714
  ))) {
11665
11715
  super.__onMouseDown(e);
11666
11716
  return;
@@ -11724,12 +11774,12 @@ const Iy = (i) => {
11724
11774
  super._setupCurrentTransform(e, s, r);
11725
11775
  }
11726
11776
  initEventListeners() {
11727
- Sy(this), by(this), Oy(this);
11777
+ wy(this), _y(this), ky(this);
11728
11778
  }
11729
11779
  setActiveIds(e) {
11730
11780
  this.activeIds = e, this.state.updateState(
11731
11781
  {
11732
- activeIds: My(this.activeIds)
11782
+ activeIds: Dy(this.activeIds)
11733
11783
  },
11734
11784
  {
11735
11785
  kind: "layer:selection",
@@ -11775,7 +11825,7 @@ const Iy = (i) => {
11775
11825
  };
11776
11826
  }
11777
11827
  purge() {
11778
- _y(this), wy(this), ky(), this.disposeScrollbars(), this.dispose();
11828
+ Ty(this), Cy(this), My(), this.disposeScrollbars(), this.dispose();
11779
11829
  }
11780
11830
  scrollTo({
11781
11831
  scrollLeft: e,
@@ -11833,7 +11883,7 @@ const Iy = (i) => {
11833
11883
  this.bounding = {
11834
11884
  ...s,
11835
11885
  ...r
11836
- }, se(Z0, {
11886
+ }, se(Q0, {
11837
11887
  payload: {
11838
11888
  bounding: {
11839
11889
  ...s,
@@ -11874,59 +11924,59 @@ const Iy = (i) => {
11874
11924
  c[4] = h.x, c[5] = h.y, this.setViewportTransform(c), this.requestRenderAll(), this.resumeEventListeners();
11875
11925
  }
11876
11926
  };
11877
- S(Ws, "objectTypes", []);
11927
+ x(Ws, "objectTypes", []);
11878
11928
  let be = Ws;
11879
- Cy(be, [
11880
- yf,
11929
+ Oy(be, [
11930
+ bf,
11931
+ u0,
11881
11932
  l0,
11882
- h0,
11883
- Ty
11933
+ xy
11884
11934
  ]);
11885
- const zy = {
11935
+ const Hy = {
11886
11936
  audio: hn,
11887
11937
  media: dn,
11888
11938
  common: ln,
11889
11939
  transition: un
11890
11940
  };
11891
11941
  export {
11892
- Ry as BOTTOM,
11942
+ Fy as BOTTOM,
11893
11943
  ze as CENTER,
11894
11944
  $ as Control,
11895
11945
  Jh as DRAG_END,
11896
11946
  Kh as DRAG_PREFIX,
11897
- J0 as DRAG_START,
11947
+ Z0 as DRAG_START,
11898
11948
  ht as FabricObject,
11899
11949
  Se as Helper,
11900
11950
  sr as LEFT,
11901
- Fy as NONE,
11951
+ By as NONE,
11902
11952
  Ai as Pattern,
11903
11953
  Vs as Placeholder,
11904
11954
  we as PreviewTrackItem,
11905
11955
  rr as RIGHT,
11906
11956
  st as Rect,
11907
11957
  fn as Resizable,
11908
- Z0 as TIMELINE_BOUNDING_CHANGED,
11958
+ Q0 as TIMELINE_BOUNDING_CHANGED,
11909
11959
  Zh as TIMELINE_PREFIX,
11910
- Q0 as TIMELINE_SEEK,
11911
- Ly as TOP,
11960
+ ty as TIMELINE_SEEK,
11961
+ Ry as TOP,
11912
11962
  Nt as Track,
11913
11963
  $t as Transition,
11914
11964
  ne as Trimmable,
11915
- By as calculateTimelineWidth,
11965
+ Wy as calculateTimelineWidth,
11916
11966
  ln as changeWidth,
11917
11967
  k as classRegistry,
11918
11968
  _s as controlsUtils,
11919
- Xy as createAudioControls,
11920
- df as createMediaControls,
11921
- uf as createResizeControls,
11922
- Wy as createTemplateControls,
11969
+ zy as createAudioControls,
11970
+ ff as createMediaControls,
11971
+ df as createResizeControls,
11972
+ Xy as createTemplateControls,
11923
11973
  hh as createTransitionControls,
11924
11974
  be as default,
11925
11975
  Gt as drawVerticalLine,
11926
11976
  Ds as generateId,
11927
11977
  Br as getDuration,
11928
11978
  ir as isTransformCentered,
11929
- zy as resize,
11979
+ Hy as resize,
11930
11980
  A as resolveOrigin,
11931
11981
  Q as timeMsToUnits,
11932
11982
  P as unitsToTimeMs,