@linker-design-plus/timeline-track 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -42,7 +42,7 @@ const ks = {
42
42
  scrollbarBorder: "#555555",
43
43
  scrollbarThumb: "#444444"
44
44
  };
45
- function We(r) {
45
+ function Ve(r) {
46
46
  return r ? {
47
47
  ...hi,
48
48
  ...r
@@ -52,7 +52,7 @@ const vt = {
52
52
  mode: "auto-first-added-video",
53
53
  width: 16,
54
54
  height: 9
55
- }, xl = [
55
+ }, El = [
56
56
  {
57
57
  key: "default",
58
58
  label: "默认",
@@ -92,7 +92,7 @@ function Ht(r) {
92
92
  height: typeof (r == null ? void 0 : r.height) == "number" && r.height > 0 ? r.height : vt.height
93
93
  };
94
94
  }
95
- const El = {
95
+ const Al = {
96
96
  DEFAULT: 1,
97
97
  // 默认层级
98
98
  ACTIVE: 2
@@ -108,12 +108,12 @@ const El = {
108
108
  // 动画持续时间(毫秒)
109
109
  EASING: "easeOutCubic"
110
110
  // 缓动函数
111
- }, Al = {
111
+ }, Ll = {
112
112
  DEFAULT_HEIGHT: 40,
113
113
  // 默认时间刻度高度
114
114
  MIN_HEIGHT: 20,
115
115
  MAX_HEIGHT: 80
116
- }, at = 15, Ve = 6, At = {
116
+ }, at = 15, We = 6, At = {
117
117
  VIDEO: 64,
118
118
  // 视频轨道高度
119
119
  AUDIO: 48
@@ -309,7 +309,7 @@ const zt = typeof global < "u" ? global : typeof window < "u" ? window : typeof
309
309
  _injectGlobal(r) {
310
310
  typeof zt.Konva < "u" && console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."), zt.Konva = r;
311
311
  }
312
- }, Q = (r) => {
312
+ }, tt = (r) => {
313
313
  E[r.prototype.getClassName()] = r;
314
314
  };
315
315
  E._injectGlobal(E);
@@ -924,7 +924,7 @@ const Fs = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
924
924
  }
925
925
  }
926
926
  };
927
- function Ws(r) {
927
+ function Vs(r) {
928
928
  const t = [], e = r.length, i = C;
929
929
  for (let n = 0; n < e; n++) {
930
930
  let s = r[n];
@@ -932,7 +932,7 @@ function Ws(r) {
932
932
  }
933
933
  return t;
934
934
  }
935
- const Gi = ",", Vs = "(", Ys = ")", Xs = "([", Us = "])", $s = ";", qs = "()", Ks = "=", Oi = [
935
+ const Gi = ",", Ws = "(", Ys = ")", Xs = "([", Us = "])", $s = ";", qs = "()", Ks = "=", Oi = [
936
936
  "arc",
937
937
  "arcTo",
938
938
  "beginPath",
@@ -1018,7 +1018,7 @@ class Xe {
1018
1018
  getTrace(t, e) {
1019
1019
  let i = this.traceArr, n = i.length, s = "", a, o, l, h;
1020
1020
  for (a = 0; a < n; a++)
1021
- o = i[a], l = o.method, l ? (h = o.args, s += l, t ? s += qs : C._isArray(h[0]) ? s += Xs + h.join(Gi) + Us : (e && (h = h.map((c) => typeof c == "number" ? Math.floor(c) : c)), s += Vs + h.join(Gi) + Ys)) : (s += o.property, t || (s += Ks + o.val)), s += $s;
1021
+ o = i[a], l = o.method, l ? (h = o.args, s += l, t ? s += qs : C._isArray(h[0]) ? s += Xs + h.join(Gi) + Us : (e && (h = h.map((c) => typeof c == "number" ? Math.floor(c) : c)), s += Ws + h.join(Gi) + Ys)) : (s += o.property, t || (s += Ks + o.val)), s += $s;
1022
1022
  return s;
1023
1023
  }
1024
1024
  clearTrace() {
@@ -1179,7 +1179,7 @@ class Xe {
1179
1179
  const a = function(o) {
1180
1180
  let l = t[o], h;
1181
1181
  t[o] = function() {
1182
- return s = Ws(Array.prototype.slice.call(arguments, 0)), h = l.apply(t, arguments), t._trace({
1182
+ return s = Vs(Array.prototype.slice.call(arguments, 0)), h = l.apply(t, arguments), t._trace({
1183
1183
  method: o,
1184
1184
  args: s
1185
1185
  }), h;
@@ -1465,7 +1465,7 @@ function xi() {
1465
1465
  return C._isNumber(r) || r === "auto" || C.warn(Mt(r) + ' is a not valid value for "' + t + '" attribute. The value should be a number or "auto".'), r;
1466
1466
  };
1467
1467
  }
1468
- function Wt() {
1468
+ function Vt() {
1469
1469
  if (E.isUnminified)
1470
1470
  return function(r, t) {
1471
1471
  return C._isString(r) || C.warn(Mt(r) + ' is a not valid value for "' + t + '" attribute. The value should be a string.'), r;
@@ -1625,7 +1625,7 @@ function nr(r) {
1625
1625
  return () => {
1626
1626
  };
1627
1627
  }
1628
- const ze = "absoluteOpacity", Hi = "allEventListeners", Tt = "absoluteTransform", zi = "absoluteScale", Gt = "canvas", sr = "Change", rr = "children", ar = "konva", ci = "listening", or = "mouseenter", lr = "mouseleave", hr = "pointerenter", cr = "pointerleave", dr = "touchenter", ur = "touchleave", Ni = "set", Fi = "Shape", Ne = " ", Wi = "stage", Pt = "transform", fr = "Stage", di = "visible", gr = [
1628
+ const ze = "absoluteOpacity", Hi = "allEventListeners", Tt = "absoluteTransform", zi = "absoluteScale", Gt = "canvas", sr = "Change", rr = "children", ar = "konva", ci = "listening", or = "mouseenter", lr = "mouseleave", hr = "pointerenter", cr = "pointerleave", dr = "touchenter", ur = "touchleave", Ni = "set", Fi = "Shape", Ne = " ", Vi = "stage", Pt = "transform", fr = "Stage", di = "visible", gr = [
1629
1629
  "xChange.konva",
1630
1630
  "yChange.konva",
1631
1631
  "scaleXChange.konva",
@@ -1826,7 +1826,7 @@ class _ {
1826
1826
  return this.isDragging() && this.stopDrag(), Y._dragElements.delete(this._id), this._remove(), this;
1827
1827
  }
1828
1828
  _clearCaches() {
1829
- this._clearSelfAndDescendantCache(Tt), this._clearSelfAndDescendantCache(ze), this._clearSelfAndDescendantCache(zi), this._clearSelfAndDescendantCache(Wi), this._clearSelfAndDescendantCache(di), this._clearSelfAndDescendantCache(ci);
1829
+ this._clearSelfAndDescendantCache(Tt), this._clearSelfAndDescendantCache(ze), this._clearSelfAndDescendantCache(zi), this._clearSelfAndDescendantCache(Vi), this._clearSelfAndDescendantCache(di), this._clearSelfAndDescendantCache(ci);
1830
1830
  }
1831
1831
  _remove() {
1832
1832
  this._clearCaches();
@@ -2090,7 +2090,7 @@ class _ {
2090
2090
  return t ? t.getLayer() : null;
2091
2091
  }
2092
2092
  getStage() {
2093
- return this._getCache(Wi, this._getStage);
2093
+ return this._getCache(Vi, this._getStage);
2094
2094
  }
2095
2095
  _getStage() {
2096
2096
  const t = this.getParent();
@@ -2433,39 +2433,39 @@ _.prototype.on.call(_.prototype, "listeningChange.konva", function() {
2433
2433
  _.prototype.on.call(_.prototype, "opacityChange.konva", function() {
2434
2434
  this._clearSelfAndDescendantCache(ze);
2435
2435
  });
2436
- const q = m.addGetterSetter;
2437
- q(_, "zIndex");
2438
- q(_, "absolutePosition");
2439
- q(_, "position");
2440
- q(_, "x", 0, x());
2441
- q(_, "y", 0, x());
2442
- q(_, "globalCompositeOperation", "source-over", Wt());
2443
- q(_, "opacity", 1, x());
2444
- q(_, "name", "", Wt());
2445
- q(_, "id", "", Wt());
2446
- q(_, "rotation", 0, x());
2436
+ const K = m.addGetterSetter;
2437
+ K(_, "zIndex");
2438
+ K(_, "absolutePosition");
2439
+ K(_, "position");
2440
+ K(_, "x", 0, x());
2441
+ K(_, "y", 0, x());
2442
+ K(_, "globalCompositeOperation", "source-over", Vt());
2443
+ K(_, "opacity", 1, x());
2444
+ K(_, "name", "", Vt());
2445
+ K(_, "id", "", Vt());
2446
+ K(_, "rotation", 0, x());
2447
2447
  m.addComponentsGetterSetter(_, "scale", ["x", "y"]);
2448
- q(_, "scaleX", 1, x());
2449
- q(_, "scaleY", 1, x());
2448
+ K(_, "scaleX", 1, x());
2449
+ K(_, "scaleY", 1, x());
2450
2450
  m.addComponentsGetterSetter(_, "skew", ["x", "y"]);
2451
- q(_, "skewX", 0, x());
2452
- q(_, "skewY", 0, x());
2451
+ K(_, "skewX", 0, x());
2452
+ K(_, "skewY", 0, x());
2453
2453
  m.addComponentsGetterSetter(_, "offset", ["x", "y"]);
2454
- q(_, "offsetX", 0, x());
2455
- q(_, "offsetY", 0, x());
2456
- q(_, "dragDistance", void 0, x());
2457
- q(_, "width", 0, x());
2458
- q(_, "height", 0, x());
2459
- q(_, "listening", !0, ft());
2460
- q(_, "preventDefault", !0, ft());
2461
- q(_, "filters", void 0, function(r) {
2454
+ K(_, "offsetX", 0, x());
2455
+ K(_, "offsetY", 0, x());
2456
+ K(_, "dragDistance", void 0, x());
2457
+ K(_, "width", 0, x());
2458
+ K(_, "height", 0, x());
2459
+ K(_, "listening", !0, ft());
2460
+ K(_, "preventDefault", !0, ft());
2461
+ K(_, "filters", void 0, function(r) {
2462
2462
  return this._filterUpToDate = !1, r;
2463
2463
  });
2464
- q(_, "visible", !0, ft());
2465
- q(_, "transformsEnabled", "all", Wt());
2466
- q(_, "size");
2467
- q(_, "dragBoundFunc");
2468
- q(_, "draggable", !1, ft());
2464
+ K(_, "visible", !0, ft());
2465
+ K(_, "transformsEnabled", "all", Vt());
2466
+ K(_, "size");
2467
+ K(_, "dragBoundFunc");
2468
+ K(_, "draggable", !1, ft());
2469
2469
  m.backCompat(_, {
2470
2470
  rotateDeg: "rotate",
2471
2471
  setRotationDeg: "setRotation",
@@ -2692,13 +2692,13 @@ function pe(r, t) {
2692
2692
  const i = e.getStage();
2693
2693
  i && i.content, ve.delete(r), Dn && e._fire("lostpointercapture", Ei(new PointerEvent("lostpointercapture")));
2694
2694
  }
2695
- const mr = "Stage", yr = "string", Vi = "px", Sr = "mouseout", Bn = "mouseleave", Hn = "mouseover", zn = "mouseenter", Nn = "mousemove", Fn = "mousedown", Wn = "mouseup", le = "pointermove", he = "pointerdown", Zt = "pointerup", ce = "pointercancel", Cr = "lostpointercapture", Ee = "pointerout", de = "pointerleave", Ae = "pointerover", Le = "pointerenter", ui = "contextmenu", Vn = "touchstart", Yn = "touchend", Xn = "touchmove", Un = "touchcancel", fi = "wheel", Tr = 5, vr = [
2695
+ const mr = "Stage", yr = "string", Wi = "px", Sr = "mouseout", Bn = "mouseleave", Hn = "mouseover", zn = "mouseenter", Nn = "mousemove", Fn = "mousedown", Vn = "mouseup", le = "pointermove", he = "pointerdown", Zt = "pointerup", ce = "pointercancel", Cr = "lostpointercapture", Ee = "pointerout", de = "pointerleave", Ae = "pointerover", Le = "pointerenter", ui = "contextmenu", Wn = "touchstart", Yn = "touchend", Xn = "touchmove", Un = "touchcancel", fi = "wheel", Tr = 5, vr = [
2696
2696
  [zn, "_pointerenter"],
2697
2697
  [Fn, "_pointerdown"],
2698
2698
  [Nn, "_pointermove"],
2699
- [Wn, "_pointerup"],
2699
+ [Vn, "_pointerup"],
2700
2700
  [Bn, "_pointerleave"],
2701
- [Vn, "_pointerdown"],
2701
+ [Wn, "_pointerdown"],
2702
2702
  [Xn, "_pointermove"],
2703
2703
  [Yn, "_pointerup"],
2704
2704
  [Un, "_pointercancel"],
@@ -2719,7 +2719,7 @@ const mr = "Stage", yr = "string", Vi = "px", Sr = "mouseout", Bn = "mouseleave"
2719
2719
  [Le]: zn,
2720
2720
  [le]: Nn,
2721
2721
  [he]: Fn,
2722
- [Zt]: Wn,
2722
+ [Zt]: Vn,
2723
2723
  [ce]: "mousecancel",
2724
2724
  pointerclick: "click",
2725
2725
  pointerdblclick: "dblclick"
@@ -2730,7 +2730,7 @@ const mr = "Stage", yr = "string", Vi = "px", Sr = "mouseout", Bn = "mouseleave"
2730
2730
  [Ae]: "touchover",
2731
2731
  [Le]: "touchenter",
2732
2732
  [le]: Xn,
2733
- [he]: Vn,
2733
+ [he]: Wn,
2734
2734
  [Zt]: Yn,
2735
2735
  [ce]: Un,
2736
2736
  pointerclick: "tap",
@@ -2855,7 +2855,7 @@ class $e extends ht {
2855
2855
  }
2856
2856
  _resizeDOM() {
2857
2857
  const t = this.width(), e = this.height();
2858
- this.content && (this.content.style.width = t + Vi, this.content.style.height = e + Vi), this.bufferCanvas.setSize(t, e), this.bufferHitCanvas.setSize(t, e), this.children.forEach((i) => {
2858
+ this.content && (this.content.style.width = t + Wi, this.content.style.height = e + Wi), this.bufferCanvas.setSize(t, e), this.bufferHitCanvas.setSize(t, e), this.children.forEach((i) => {
2859
2859
  i.setSize({ width: t, height: e }), i.draw();
2860
2860
  });
2861
2861
  }
@@ -3127,7 +3127,7 @@ class $e extends ht {
3127
3127
  }
3128
3128
  }
3129
3129
  $e.prototype.nodeType = mr;
3130
- Q($e);
3130
+ tt($e);
3131
3131
  m.addGetterSetter($e, "container");
3132
3132
  E.isBrowser && document.addEventListener("visibilitychange", () => {
3133
3133
  me.forEach((r) => {
@@ -3403,7 +3403,7 @@ k.prototype._fillFuncHit = _r;
3403
3403
  k.prototype._strokeFuncHit = Pr;
3404
3404
  k.prototype._centroid = !1;
3405
3405
  k.prototype.nodeType = "Shape";
3406
- Q(k);
3406
+ tt(k);
3407
3407
  k.prototype.eventListeners = {};
3408
3408
  k.prototype.on.call(k.prototype, "shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", xr);
3409
3409
  k.prototype.on.call(k.prototype, "shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", Er);
@@ -3424,7 +3424,7 @@ m.addGetterSetter(k, "sceneFunc");
3424
3424
  m.addGetterSetter(k, "hitFunc");
3425
3425
  m.addGetterSetter(k, "dash");
3426
3426
  m.addGetterSetter(k, "dashOffset", 0, x());
3427
- m.addGetterSetter(k, "shadowColor", void 0, Wt());
3427
+ m.addGetterSetter(k, "shadowColor", void 0, Vt());
3428
3428
  m.addGetterSetter(k, "shadowBlur", 0, x());
3429
3429
  m.addGetterSetter(k, "shadowOpacity", 1, x());
3430
3430
  m.addComponentsGetterSetter(k, "shadowOffset", ["x", "y"]);
@@ -3489,7 +3489,7 @@ m.addComponentsGetterSetter(k, "fillRadialGradientEndPoint", [
3489
3489
  m.addGetterSetter(k, "fillRadialGradientEndPointX", 0);
3490
3490
  m.addGetterSetter(k, "fillRadialGradientEndPointY", 0);
3491
3491
  m.addGetterSetter(k, "fillPatternRotation", 0);
3492
- m.addGetterSetter(k, "fillRule", void 0, Wt());
3492
+ m.addGetterSetter(k, "fillRule", void 0, Vt());
3493
3493
  m.backCompat(k, {
3494
3494
  dashArray: "dash",
3495
3495
  getDashArray: "getDash",
@@ -3508,7 +3508,7 @@ const Rr = "beforeDraw", Ir = "draw", Jn = [
3508
3508
  { x: 1, y: 1 },
3509
3509
  { x: -1, y: 1 }
3510
3510
  ], Dr = Jn.length;
3511
- class Vt extends ht {
3511
+ class Wt extends ht {
3512
3512
  constructor(t) {
3513
3513
  super(t), this.canvas = new Et(), this.hitCanvas = new Pi({
3514
3514
  pixelRatio: 1
@@ -3685,18 +3685,18 @@ class Vt extends ht {
3685
3685
  return C.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas), super.destroy();
3686
3686
  }
3687
3687
  }
3688
- Vt.prototype.nodeType = "Layer";
3689
- Q(Vt);
3690
- m.addGetterSetter(Vt, "imageSmoothingEnabled", !0);
3691
- m.addGetterSetter(Vt, "clearBeforeDraw", !0);
3692
- m.addGetterSetter(Vt, "hitGraphEnabled", !0, ft());
3693
- class Ai extends Vt {
3688
+ Wt.prototype.nodeType = "Layer";
3689
+ tt(Wt);
3690
+ m.addGetterSetter(Wt, "imageSmoothingEnabled", !0);
3691
+ m.addGetterSetter(Wt, "clearBeforeDraw", !0);
3692
+ m.addGetterSetter(Wt, "hitGraphEnabled", !0, ft());
3693
+ class Ai extends Wt {
3694
3694
  constructor(t) {
3695
3695
  super(t), this.listening(!1), C.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.');
3696
3696
  }
3697
3697
  }
3698
3698
  Ai.prototype.nodeType = "FastLayer";
3699
- Q(Ai);
3699
+ tt(Ai);
3700
3700
  class Jt extends ht {
3701
3701
  _validateAdd(t) {
3702
3702
  const e = t.getType();
@@ -3704,7 +3704,7 @@ class Jt extends ht {
3704
3704
  }
3705
3705
  }
3706
3706
  Jt.prototype.nodeType = "Group";
3707
- Q(Jt);
3707
+ tt(Jt);
3708
3708
  const Je = function() {
3709
3709
  return zt.performance && zt.performance.now ? function() {
3710
3710
  return zt.performance.now();
@@ -3846,7 +3846,7 @@ class Hr {
3846
3846
  return (/* @__PURE__ */ new Date()).getTime();
3847
3847
  }
3848
3848
  }
3849
- class j {
3849
+ class Z {
3850
3850
  constructor(t) {
3851
3851
  const e = this, i = t.node, n = i._id, s = t.easing || Se.Linear, a = !!t.yoyo;
3852
3852
  let o, l;
@@ -3856,7 +3856,7 @@ class j {
3856
3856
  e.tween.onEnterFrame();
3857
3857
  }, h), this.tween = new Hr(l, function(c) {
3858
3858
  e._tweenFunc(c);
3859
- }, s, 0, 1, o * 1e3, a), this._addListeners(), j.attrs[n] || (j.attrs[n] = {}), j.attrs[n][this._id] || (j.attrs[n][this._id] = {}), j.tweens[n] || (j.tweens[n] = {});
3859
+ }, s, 0, 1, o * 1e3, a), this._addListeners(), Z.attrs[n] || (Z.attrs[n] = {}), Z.attrs[n][this._id] || (Z.attrs[n][this._id] = {}), Z.tweens[n] || (Z.tweens[n] = {});
3860
3860
  for (l in t)
3861
3861
  Gr[l] === void 0 && this._addAttr(l, t[l]);
3862
3862
  this.reset(), this.onFinish = t.onFinish, this.onReset = t.onReset, this.onUpdate = t.onUpdate;
@@ -3864,8 +3864,8 @@ class j {
3864
3864
  _addAttr(t, e) {
3865
3865
  const i = this.node, n = i._id;
3866
3866
  let s, a, o, l, h;
3867
- const c = j.tweens[n][t];
3868
- c && delete j.attrs[n][c][t];
3867
+ const c = Z.tweens[n][t];
3868
+ c && delete Z.attrs[n][c][t];
3869
3869
  let d = i.getAttr(t);
3870
3870
  if (C._isArray(e))
3871
3871
  if (s = [], a = Math.max(e.length, d.length), t === "points" && e.length !== d.length && (e.length > d.length ? (l = d, d = C._prepareArrayForTween(d, e, i.closed())) : (o = e, e = C._prepareArrayForTween(e, d, i.closed()))), t.indexOf("fill") === 0)
@@ -3890,16 +3890,16 @@ class j {
3890
3890
  b: h.b - d.b,
3891
3891
  a: h.a - d.a
3892
3892
  }) : s = e - d;
3893
- j.attrs[n][this._id][t] = {
3893
+ Z.attrs[n][this._id][t] = {
3894
3894
  start: d,
3895
3895
  diff: s,
3896
3896
  end: e,
3897
3897
  trueEnd: o,
3898
3898
  trueStart: l
3899
- }, j.tweens[n][t] = this._id;
3899
+ }, Z.tweens[n][t] = this._id;
3900
3900
  }
3901
3901
  _tweenFunc(t) {
3902
- const e = this.node, i = j.attrs[e._id][this._id];
3902
+ const e = this.node, i = Z.attrs[e._id][this._id];
3903
3903
  let n, s, a, o, l, h, c, d;
3904
3904
  for (n in i) {
3905
3905
  if (s = i[n], a = s.start, o = s.diff, d = s.end, C._isArray(a))
@@ -3921,10 +3921,10 @@ class j {
3921
3921
  }, this.tween.onPause = () => {
3922
3922
  this.anim.stop();
3923
3923
  }, this.tween.onFinish = () => {
3924
- const t = this.node, e = j.attrs[t._id][this._id];
3924
+ const t = this.node, e = Z.attrs[t._id][this._id];
3925
3925
  e.points && e.points.trueEnd && t.setAttr("points", e.points.trueEnd), this.onFinish && this.onFinish.call(this);
3926
3926
  }, this.tween.onReset = () => {
3927
- const t = this.node, e = j.attrs[t._id][this._id];
3927
+ const t = this.node, e = Z.attrs[t._id][this._id];
3928
3928
  e.points && e.points.trueStart && t.points(e.points.trueStart), this.onReset && this.onReset();
3929
3929
  }, this.tween.onUpdate = () => {
3930
3930
  this.onUpdate && this.onUpdate.call(this);
@@ -3949,20 +3949,20 @@ class j {
3949
3949
  return this.tween.finish(), this;
3950
3950
  }
3951
3951
  destroy() {
3952
- const t = this.node._id, e = this._id, i = j.tweens[t];
3952
+ const t = this.node._id, e = this._id, i = Z.tweens[t];
3953
3953
  this.pause(), this.anim && this.anim.stop();
3954
3954
  for (const n in i)
3955
- delete j.tweens[t][n];
3956
- delete j.attrs[t][e], j.tweens[t] && (Object.keys(j.tweens[t]).length === 0 && delete j.tweens[t], Object.keys(j.attrs[t]).length === 0 && delete j.attrs[t]);
3955
+ delete Z.tweens[t][n];
3956
+ delete Z.attrs[t][e], Z.tweens[t] && (Object.keys(Z.tweens[t]).length === 0 && delete Z.tweens[t], Object.keys(Z.attrs[t]).length === 0 && delete Z.attrs[t]);
3957
3957
  }
3958
3958
  }
3959
- j.attrs = {};
3960
- j.tweens = {};
3959
+ Z.attrs = {};
3960
+ Z.tweens = {};
3961
3961
  _.prototype.to = function(r) {
3962
3962
  const t = r.onFinish;
3963
3963
  r.node = this, r.onFinish = function() {
3964
3964
  this.destroy(), t && t();
3965
- }, new j(r).play();
3965
+ }, new Z(r).play();
3966
3966
  };
3967
3967
  const Se = {
3968
3968
  BackEaseIn(r, t, e, i) {
@@ -4024,14 +4024,14 @@ const Se = {
4024
4024
  Container: ht,
4025
4025
  Stage: $e,
4026
4026
  stages: me,
4027
- Layer: Vt,
4027
+ Layer: Wt,
4028
4028
  FastLayer: Ai,
4029
4029
  Group: Jt,
4030
4030
  DD: Y,
4031
4031
  Shape: k,
4032
4032
  shapes: ye,
4033
4033
  Animation: dt,
4034
- Tween: j,
4034
+ Tween: Z,
4035
4035
  Easings: Se,
4036
4036
  Context: Xe,
4037
4037
  Canvas: _i
@@ -4071,7 +4071,7 @@ wt.prototype._attrsAffectingSize = [
4071
4071
  "angle",
4072
4072
  "clockwise"
4073
4073
  ];
4074
- Q(wt);
4074
+ tt(wt);
4075
4075
  m.addGetterSetter(wt, "innerRadius", 0, x());
4076
4076
  m.addGetterSetter(wt, "outerRadius", 0, x());
4077
4077
  m.addGetterSetter(wt, "angle", 0, x());
@@ -4194,7 +4194,7 @@ class kt extends k {
4194
4194
  }
4195
4195
  kt.prototype.className = "Line";
4196
4196
  kt.prototype._attrsAffectingSize = ["points", "bezier", "tension"];
4197
- Q(kt);
4197
+ tt(kt);
4198
4198
  m.addGetterSetter(kt, "closed", !1);
4199
4199
  m.addGetterSetter(kt, "bezier", !1);
4200
4200
  m.addGetterSetter(kt, "tension", 0, x());
@@ -4892,12 +4892,12 @@ const Nr = [
4892
4892
  0.0123412297999872,
4893
4893
  0.0123412297999872
4894
4894
  ]
4895
- ], Wr = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], ji = (r, t, e) => {
4895
+ ], Vr = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], ji = (r, t, e) => {
4896
4896
  let i, n;
4897
4897
  const a = e / 2;
4898
4898
  i = 0;
4899
4899
  for (let o = 0; o < 20; o++)
4900
- n = a * Nr[20][o] + a, i += Fr[20][o] * Vr(r, t, n);
4900
+ n = a * Nr[20][o] + a, i += Fr[20][o] * Wr(r, t, n);
4901
4901
  return a * i;
4902
4902
  }, Zi = (r, t, e) => {
4903
4903
  e === void 0 && (e = 1);
@@ -4907,7 +4907,7 @@ const Nr = [
4907
4907
  const c = l / (2 * o), d = h / o, u = e + c, p = d - c * c, g = u * u + p > 0 ? Math.sqrt(u * u + p) : 0, y = c * c + p > 0 ? Math.sqrt(c * c + p) : 0, T = c + Math.sqrt(c * c + p) !== 0 ? p * Math.log(Math.abs((u + g) / (c + y))) : 0;
4908
4908
  return Math.sqrt(o) / 2 * (u * g - c * y + T);
4909
4909
  };
4910
- function Vr(r, t, e) {
4910
+ function Wr(r, t, e) {
4911
4911
  const i = pi(1, e, r), n = pi(1, e, t), s = i * i + n * n;
4912
4912
  return Math.sqrt(s);
4913
4913
  }
@@ -4919,7 +4919,7 @@ const pi = (r, t, e) => {
4919
4919
  if (r === 0) {
4920
4920
  s = 0;
4921
4921
  for (let a = 0; a <= i; a++)
4922
- s += Wr[i][a] * Math.pow(1 - t, i - a) * Math.pow(t, a) * e[a];
4922
+ s += Vr[i][a] * Math.pow(1 - t, i - a) * Math.pow(t, a) * e[a];
4923
4923
  return s;
4924
4924
  } else {
4925
4925
  n = new Array(i);
@@ -4942,14 +4942,14 @@ const pi = (r, t, e) => {
4942
4942
  }
4943
4943
  return n;
4944
4944
  };
4945
- class Z extends k {
4945
+ class J extends k {
4946
4946
  constructor(t) {
4947
4947
  super(t), this.dataArray = [], this.pathLength = 0, this._readDataAttribute(), this.on("dataChange.konva", function() {
4948
4948
  this._readDataAttribute();
4949
4949
  });
4950
4950
  }
4951
4951
  _readDataAttribute() {
4952
- this.dataArray = Z.parsePathData(this.data()), this.pathLength = Z.getPathLength(this.dataArray);
4952
+ this.dataArray = J.parsePathData(this.data()), this.pathLength = J.getPathLength(this.dataArray);
4953
4953
  }
4954
4954
  _sceneFunc(t) {
4955
4955
  const e = this.dataArray;
@@ -4989,17 +4989,17 @@ class Z extends k {
4989
4989
  let u = Math.PI / 180;
4990
4990
  if (Math.abs(h - d) < u && (u = Math.abs(h - d)), c < 0)
4991
4991
  for (let p = h - u; p > d; p -= u) {
4992
- const g = Z.getPointOnEllipticalArc(l.points[0], l.points[1], l.points[2], l.points[3], p, 0);
4992
+ const g = J.getPointOnEllipticalArc(l.points[0], l.points[1], l.points[2], l.points[3], p, 0);
4993
4993
  t.push(g.x, g.y);
4994
4994
  }
4995
4995
  else
4996
4996
  for (let p = h + u; p < d; p += u) {
4997
- const g = Z.getPointOnEllipticalArc(l.points[0], l.points[1], l.points[2], l.points[3], p, 0);
4997
+ const g = J.getPointOnEllipticalArc(l.points[0], l.points[1], l.points[2], l.points[3], p, 0);
4998
4998
  t.push(g.x, g.y);
4999
4999
  }
5000
5000
  } else if (l.command === "C")
5001
5001
  for (let h = 0; h <= 1; h += 0.01) {
5002
- const c = Z.getPointOnCubicBezier(h, l.start.x, l.start.y, l.points[0], l.points[1], l.points[2], l.points[3], l.points[4], l.points[5]);
5002
+ const c = J.getPointOnCubicBezier(h, l.start.x, l.start.y, l.points[0], l.points[1], l.points[2], l.points[3], l.points[4], l.points[5]);
5003
5003
  t.push(c.x, c.y);
5004
5004
  }
5005
5005
  else
@@ -5019,7 +5019,7 @@ class Z extends k {
5019
5019
  return this.pathLength;
5020
5020
  }
5021
5021
  getPointAtLength(t) {
5022
- return Z.getPointAtLengthOfDataArray(t, this.dataArray);
5022
+ return J.getPointAtLengthOfDataArray(t, this.dataArray);
5023
5023
  }
5024
5024
  static getLineLength(t, e, i, n) {
5025
5025
  return Math.sqrt((i - t) * (i - t) + (n - e) * (n - e));
@@ -5052,15 +5052,15 @@ class Z extends k {
5052
5052
  const a = e[n], o = a.points;
5053
5053
  switch (a.command) {
5054
5054
  case "L":
5055
- return Z.getPointOnLine(t, a.start.x, a.start.y, o[0], o[1]);
5055
+ return J.getPointOnLine(t, a.start.x, a.start.y, o[0], o[1]);
5056
5056
  case "C":
5057
- return Z.getPointOnCubicBezier(Ji(t, Z.getPathLength(e), (y) => ji([a.start.x, o[0], o[2], o[4]], [a.start.y, o[1], o[3], o[5]], y)), a.start.x, a.start.y, o[0], o[1], o[2], o[3], o[4], o[5]);
5057
+ return J.getPointOnCubicBezier(Ji(t, J.getPathLength(e), (y) => ji([a.start.x, o[0], o[2], o[4]], [a.start.y, o[1], o[3], o[5]], y)), a.start.x, a.start.y, o[0], o[1], o[2], o[3], o[4], o[5]);
5058
5058
  case "Q":
5059
- return Z.getPointOnQuadraticBezier(Ji(t, Z.getPathLength(e), (y) => Zi([a.start.x, o[0], o[2]], [a.start.y, o[1], o[3]], y)), a.start.x, a.start.y, o[0], o[1], o[2], o[3]);
5059
+ return J.getPointOnQuadraticBezier(Ji(t, J.getPathLength(e), (y) => Zi([a.start.x, o[0], o[2]], [a.start.y, o[1], o[3]], y)), a.start.x, a.start.y, o[0], o[1], o[2], o[3]);
5060
5060
  case "A":
5061
5061
  const l = o[0], h = o[1], c = o[2], d = o[3], u = o[5], p = o[6];
5062
5062
  let g = o[4];
5063
- return g += u * t / a.pathLength, Z.getPointOnEllipticalArc(l, h, c, d, g, p);
5063
+ return g += u * t / a.pathLength, J.getPointOnEllipticalArc(l, h, c, d, g, p);
5064
5064
  }
5065
5065
  return null;
5066
5066
  }
@@ -5194,7 +5194,7 @@ class Z extends k {
5194
5194
  for (; g.length > 0 && !isNaN(g[0]); ) {
5195
5195
  let T = "", S = [];
5196
5196
  const v = o, b = l;
5197
- let w, L, P, I, A, D, z, W, B, V;
5197
+ let w, L, P, I, A, D, z, V, B, W;
5198
5198
  switch (p) {
5199
5199
  case "l":
5200
5200
  o += g.shift(), l += g.shift(), T = "L", S.push(o, l);
@@ -5253,10 +5253,10 @@ class Z extends k {
5253
5253
  L = o, P = l, w = s[s.length - 1], w.command === "Q" && (L = o + (o - w.points[0]), P = l + (l - w.points[1])), o += g.shift(), l += g.shift(), T = "Q", S.push(L, P, o, l);
5254
5254
  break;
5255
5255
  case "A":
5256
- I = g.shift(), A = g.shift(), D = g.shift(), z = g.shift(), W = g.shift(), B = o, V = l, o = g.shift(), l = g.shift(), T = "A", S = this.convertEndpointToCenterParameterization(B, V, o, l, z, W, I, A, D);
5256
+ I = g.shift(), A = g.shift(), D = g.shift(), z = g.shift(), V = g.shift(), B = o, W = l, o = g.shift(), l = g.shift(), T = "A", S = this.convertEndpointToCenterParameterization(B, W, o, l, z, V, I, A, D);
5257
5257
  break;
5258
5258
  case "a":
5259
- I = g.shift(), A = g.shift(), D = g.shift(), z = g.shift(), W = g.shift(), B = o, V = l, o += g.shift(), l += g.shift(), T = "A", S = this.convertEndpointToCenterParameterization(B, V, o, l, z, W, I, A, D);
5259
+ I = g.shift(), A = g.shift(), D = g.shift(), z = g.shift(), V = g.shift(), B = o, W = l, o += g.shift(), l += g.shift(), T = "A", S = this.convertEndpointToCenterParameterization(B, W, o, l, z, V, I, A, D);
5260
5260
  break;
5261
5261
  }
5262
5262
  s.push({
@@ -5280,7 +5280,7 @@ class Z extends k {
5280
5280
  }
5281
5281
  static calcLength(t, e, i, n) {
5282
5282
  let s, a, o, l;
5283
- const h = Z;
5283
+ const h = J;
5284
5284
  switch (i) {
5285
5285
  case "L":
5286
5286
  return h.getLineLength(t, e, n[0], n[1]);
@@ -5309,19 +5309,19 @@ class Z extends k {
5309
5309
  s === a && (g *= -1), isNaN(g) && (g = 0);
5310
5310
  const y = g * o * u / l, T = g * -l * d / o, S = (t + i) / 2 + Math.cos(c) * y - Math.sin(c) * T, v = (e + n) / 2 + Math.sin(c) * y + Math.cos(c) * T, b = function(z) {
5311
5311
  return Math.sqrt(z[0] * z[0] + z[1] * z[1]);
5312
- }, w = function(z, W) {
5313
- return (z[0] * W[0] + z[1] * W[1]) / (b(z) * b(W));
5314
- }, L = function(z, W) {
5315
- return (z[0] * W[1] < z[1] * W[0] ? -1 : 1) * Math.acos(w(z, W));
5312
+ }, w = function(z, V) {
5313
+ return (z[0] * V[0] + z[1] * V[1]) / (b(z) * b(V));
5314
+ }, L = function(z, V) {
5315
+ return (z[0] * V[1] < z[1] * V[0] ? -1 : 1) * Math.acos(w(z, V));
5316
5316
  }, P = L([1, 0], [(d - y) / o, (u - T) / l]), I = [(d - y) / o, (u - T) / l], A = [(-1 * d - y) / o, (-1 * u - T) / l];
5317
5317
  let D = L(I, A);
5318
5318
  return w(I, A) <= -1 && (D = Math.PI), w(I, A) >= 1 && (D = 0), a === 0 && D > 0 && (D = D - 2 * Math.PI), a === 1 && D < 0 && (D = D + 2 * Math.PI), [S, v, o, l, P, D, c, a];
5319
5319
  }
5320
5320
  }
5321
- Z.prototype.className = "Path";
5322
- Z.prototype._attrsAffectingSize = ["data"];
5323
- Q(Z);
5324
- m.addGetterSetter(Z, "data");
5321
+ J.prototype.className = "Path";
5322
+ J.prototype._attrsAffectingSize = ["data"];
5323
+ tt(J);
5324
+ m.addGetterSetter(J, "data");
5325
5325
  class Yt extends kt {
5326
5326
  _sceneFunc(t) {
5327
5327
  super._sceneFunc(t);
@@ -5339,7 +5339,7 @@ class Yt extends kt {
5339
5339
  n[n.length - 1],
5340
5340
  i[o - 2],
5341
5341
  i[o - 1]
5342
- ], p = Z.calcLength(n[n.length - 4], n[n.length - 3], "C", u), g = Z.getPointOnQuadraticBezier(Math.min(1, 1 - a / p), u[0], u[1], u[2], u[3], u[4], u[5]);
5342
+ ], p = J.calcLength(n[n.length - 4], n[n.length - 3], "C", u), g = J.getPointOnQuadraticBezier(Math.min(1, 1 - a / p), u[0], u[1], u[2], u[3], u[4], u[5]);
5343
5343
  l = i[o - 2] - g.x, h = i[o - 1] - g.y;
5344
5344
  } else
5345
5345
  l = i[o - 2] - i[o - 4], h = i[o - 1] - i[o - 3];
@@ -5361,7 +5361,7 @@ class Yt extends kt {
5361
5361
  }
5362
5362
  }
5363
5363
  Yt.prototype.className = "Arrow";
5364
- Q(Yt);
5364
+ tt(Yt);
5365
5365
  m.addGetterSetter(Yt, "pointerLength", 10, x());
5366
5366
  m.addGetterSetter(Yt, "pointerWidth", 10, x());
5367
5367
  m.addGetterSetter(Yt, "pointerAtBeginning", !1);
@@ -5386,7 +5386,7 @@ class Qt extends k {
5386
5386
  Qt.prototype._centroid = !0;
5387
5387
  Qt.prototype.className = "Circle";
5388
5388
  Qt.prototype._attrsAffectingSize = ["radius"];
5389
- Q(Qt);
5389
+ tt(Qt);
5390
5390
  m.addGetterSetter(Qt, "radius", 0, x());
5391
5391
  class Rt extends k {
5392
5392
  _sceneFunc(t) {
@@ -5409,7 +5409,7 @@ class Rt extends k {
5409
5409
  Rt.prototype.className = "Ellipse";
5410
5410
  Rt.prototype._centroid = !0;
5411
5411
  Rt.prototype._attrsAffectingSize = ["radiusX", "radiusY"];
5412
- Q(Rt);
5412
+ tt(Rt);
5413
5413
  m.addComponentsGetterSetter(Rt, "radius", ["x", "y"]);
5414
5414
  m.addGetterSetter(Rt, "radiusX", 0, x());
5415
5415
  m.addGetterSetter(Rt, "radiusY", 0, x());
@@ -5478,7 +5478,7 @@ let gt = class Qn extends k {
5478
5478
  };
5479
5479
  gt.prototype.className = "Image";
5480
5480
  gt.prototype._attrsAffectingSize = ["image"];
5481
- Q(gt);
5481
+ tt(gt);
5482
5482
  m.addGetterSetter(gt, "cornerRadius", 0, Ue(4));
5483
5483
  m.addGetterSetter(gt, "image");
5484
5484
  m.addComponentsGetterSetter(gt, "crop", ["x", "y", "width", "height"]);
@@ -5555,7 +5555,7 @@ class Li extends Jt {
5555
5555
  }
5556
5556
  }
5557
5557
  Li.prototype.className = "Label";
5558
- Q(Li);
5558
+ tt(Li);
5559
5559
  class Xt extends k {
5560
5560
  _sceneFunc(t) {
5561
5561
  const e = this.width(), i = this.height(), n = this.pointerDirection(), s = this.pointerWidth(), a = this.pointerHeight(), o = this.cornerRadius();
@@ -5573,7 +5573,7 @@ class Xt extends k {
5573
5573
  }
5574
5574
  }
5575
5575
  Xt.prototype.className = "Tag";
5576
- Q(Xt);
5576
+ tt(Xt);
5577
5577
  m.addGetterSetter(Xt, "pointerDirection", Xr);
5578
5578
  m.addGetterSetter(Xt, "pointerWidth", 0, x());
5579
5579
  m.addGetterSetter(Xt, "pointerHeight", 0, x());
@@ -5585,7 +5585,7 @@ class be extends k {
5585
5585
  }
5586
5586
  }
5587
5587
  be.prototype.className = "Rect";
5588
- Q(be);
5588
+ tt(be);
5589
5589
  m.addGetterSetter(be, "cornerRadius", 0, Ue(4));
5590
5590
  class It extends k {
5591
5591
  _sceneFunc(t) {
@@ -5636,7 +5636,7 @@ class It extends k {
5636
5636
  It.prototype.className = "RegularPolygon";
5637
5637
  It.prototype._centroid = !0;
5638
5638
  It.prototype._attrsAffectingSize = ["radius"];
5639
- Q(It);
5639
+ tt(It);
5640
5640
  m.addGetterSetter(It, "radius", 0, x());
5641
5641
  m.addGetterSetter(It, "sides", 0, x());
5642
5642
  m.addGetterSetter(It, "cornerRadius", 0, Ue(4));
@@ -5661,7 +5661,7 @@ class Ut extends k {
5661
5661
  Ut.prototype.className = "Ring";
5662
5662
  Ut.prototype._centroid = !0;
5663
5663
  Ut.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
5664
- Q(Ut);
5664
+ tt(Ut);
5665
5665
  m.addGetterSetter(Ut, "innerRadius", 0, x());
5666
5666
  m.addGetterSetter(Ut, "outerRadius", 0, x());
5667
5667
  class St extends k {
@@ -5722,7 +5722,7 @@ class St extends k {
5722
5722
  }
5723
5723
  }
5724
5724
  St.prototype.className = "Sprite";
5725
- Q(St);
5725
+ tt(St);
5726
5726
  m.addGetterSetter(St, "animation");
5727
5727
  m.addGetterSetter(St, "animations");
5728
5728
  m.addGetterSetter(St, "frameOffsets");
@@ -5760,7 +5760,7 @@ class Dt extends k {
5760
5760
  Dt.prototype.className = "Star";
5761
5761
  Dt.prototype._centroid = !0;
5762
5762
  Dt.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
5763
- Q(Dt);
5763
+ tt(Dt);
5764
5764
  m.addGetterSetter(Dt, "numPoints", 5, x());
5765
5765
  m.addGetterSetter(Dt, "innerRadius", 0, x());
5766
5766
  m.addGetterSetter(Dt, "outerRadius", 0, x());
@@ -5810,7 +5810,7 @@ function oa(r) {
5810
5810
  function la(r) {
5811
5811
  return r = r || {}, !r.fillLinearGradientColorStops && !r.fillRadialGradientColorStops && !r.fillPatternImage && (r.fill = r.fill || "black"), r;
5812
5812
  }
5813
- class J extends k {
5813
+ class Q extends k {
5814
5814
  constructor(t) {
5815
5815
  super(la(t)), this._partialTextX = 0, this._partialTextY = 0;
5816
5816
  for (let e = 0; e < sa; e++)
@@ -5833,32 +5833,32 @@ class J extends k {
5833
5833
  }
5834
5834
  for (c === nn && t.setAttr("direction", c), t.setAttr("font", this._getContextFont()), t.setAttr("textBaseline", I), t.setAttr("textAlign", is), h === en ? d = (this.getHeight() - s * l - a * 2) / 2 : h === Qr && (d = this.getHeight() - s * l - a * 2), t.translate(a, d + a), L = 0; L < s; L++) {
5835
5835
  let A = 0, D = 0;
5836
- const z = n[L], W = z.text, B = z.width, V = z.lastInParagraph;
5836
+ const z = n[L], V = z.text, B = z.width, W = z.lastInParagraph;
5837
5837
  if (t.save(), u === ea ? A += p - B - a * 2 : u === $r && (A += (p - B - a * 2) / 2), b) {
5838
5838
  t.save(), t.beginPath();
5839
- const H = v ?? (E.legacyTextRendering ? Math.round(o / 2) : Math.round(o / 4)), M = A, K = P + D + H;
5840
- t.moveTo(M, K);
5841
- const G = u === se && !V ? p - a * 2 : B;
5842
- t.lineTo(M + Math.round(G), K), t.lineWidth = o / 15;
5843
- const $ = this._getLinearGradient();
5844
- t.strokeStyle = $ || T, t.stroke(), t.restore();
5839
+ const H = v ?? (E.legacyTextRendering ? Math.round(o / 2) : Math.round(o / 4)), M = A, j = P + D + H;
5840
+ t.moveTo(M, j);
5841
+ const G = u === se && !W ? p - a * 2 : B;
5842
+ t.lineTo(M + Math.round(G), j), t.lineWidth = o / 15;
5843
+ const q = this._getLinearGradient();
5844
+ t.strokeStyle = q || T, t.stroke(), t.restore();
5845
5845
  }
5846
5846
  const N = A;
5847
5847
  if (c !== nn && (g !== 0 || u === se || y)) {
5848
- const H = W.split(" ").length - 1, M = xt(W);
5849
- for (let K = 0; K < M.length; K++) {
5850
- const G = M[K];
5851
- if (G === " " && !V && u === se && (A += (p - a * 2 - B) / H), this._partialTextX = A, this._partialTextY = P + D, this._partialText = G, y) {
5848
+ const H = V.split(" ").length - 1, M = xt(V);
5849
+ for (let j = 0; j < M.length; j++) {
5850
+ const G = M[j];
5851
+ if (G === " " && !W && u === se && (A += (p - a * 2 - B) / H), this._partialTextX = A, this._partialTextY = P + D, this._partialText = G, y) {
5852
5852
  t.save();
5853
- const it = n.slice(0, L).reduce((tt, ot) => tt + xt(ot.text).length, 0), U = K + it;
5853
+ const nt = n.slice(0, L).reduce((et, ot) => et + xt(ot.text).length, 0), U = j + nt;
5854
5854
  y({
5855
5855
  char: G,
5856
5856
  index: U,
5857
5857
  x: A,
5858
5858
  y: P + D,
5859
5859
  lineIndex: L,
5860
- column: K,
5861
- isLastInLine: V,
5860
+ column: j,
5861
+ isLastInLine: W,
5862
5862
  width: this.measureSize(G).width,
5863
5863
  context: t
5864
5864
  });
@@ -5866,13 +5866,13 @@ class J extends k {
5866
5866
  t.fillStrokeShape(this), y && t.restore(), A += this.measureSize(G).width + g;
5867
5867
  }
5868
5868
  } else
5869
- g !== 0 && t.setAttr("letterSpacing", `${g}px`), this._partialTextX = A, this._partialTextY = P + D, this._partialText = W, t.fillStrokeShape(this);
5869
+ g !== 0 && t.setAttr("letterSpacing", `${g}px`), this._partialTextX = A, this._partialTextY = P + D, this._partialText = V, t.fillStrokeShape(this);
5870
5870
  if (w) {
5871
5871
  t.save(), t.beginPath();
5872
5872
  const H = E.legacyTextRendering ? 0 : -Math.round(o / 4), M = N;
5873
5873
  t.moveTo(M, P + D + H);
5874
- const K = u === se && !V ? p - a * 2 : B;
5875
- t.lineTo(M + Math.round(K), P + D + H), t.lineWidth = o / 15;
5874
+ const j = u === se && !W ? p - a * 2 : B;
5875
+ t.lineTo(M + Math.round(j), P + D + H), t.lineWidth = o / 15;
5876
5876
  const G = this._getLinearGradient();
5877
5877
  t.strokeStyle = G || T, t.stroke(), t.restore();
5878
5878
  }
@@ -5947,18 +5947,18 @@ class J extends k {
5947
5947
  for (; w.length > 0; ) {
5948
5948
  let P = 0, I = xt(w).length, A = "", D = 0;
5949
5949
  for (; P < I; ) {
5950
- const z = P + I >>> 1, W = xt(w), B = W.slice(0, z + 1).join(""), V = this._getTextWidth(B);
5951
- (T && l && u + n > d ? V + S : V) <= c ? (P = z + 1, A = B, D = V) : I = z;
5950
+ const z = P + I >>> 1, V = xt(w), B = V.slice(0, z + 1).join(""), W = this._getTextWidth(B);
5951
+ (T && l && u + n > d ? W + S : W) <= c ? (P = z + 1, A = B, D = W) : I = z;
5952
5952
  }
5953
5953
  if (A) {
5954
5954
  if (y) {
5955
- const B = xt(w), V = xt(A), N = B[V.length], H = N === Re || N === tn;
5955
+ const B = xt(w), W = xt(A), N = B[W.length], H = N === Re || N === tn;
5956
5956
  let M;
5957
5957
  if (H && D <= c)
5958
- M = V.length;
5958
+ M = W.length;
5959
5959
  else {
5960
- const K = V.lastIndexOf(Re), G = V.lastIndexOf(tn);
5961
- M = Math.max(K, G) + 1;
5960
+ const j = W.lastIndexOf(Re), G = W.lastIndexOf(tn);
5961
+ M = Math.max(j, G) + 1;
5962
5962
  }
5963
5963
  M > 0 && (P = M, A = B.slice(0, P).join(""), D = this._getTextWidth(A));
5964
5964
  }
@@ -5996,10 +5996,10 @@ class J extends k {
5996
5996
  return t && e ? !0 : super._useBufferCanvas();
5997
5997
  }
5998
5998
  }
5999
- J.prototype._fillFunc = aa;
6000
- J.prototype._strokeFunc = oa;
6001
- J.prototype.className = Zr;
6002
- J.prototype._attrsAffectingSize = [
5999
+ Q.prototype._fillFunc = aa;
6000
+ Q.prototype._strokeFunc = oa;
6001
+ Q.prototype.className = Zr;
6002
+ Q.prototype._attrsAffectingSize = [
6003
6003
  "text",
6004
6004
  "fontSize",
6005
6005
  "padding",
@@ -6007,25 +6007,25 @@ J.prototype._attrsAffectingSize = [
6007
6007
  "lineHeight",
6008
6008
  "letterSpacing"
6009
6009
  ];
6010
- Q(J);
6011
- m.overWriteSetter(J, "width", xi());
6012
- m.overWriteSetter(J, "height", xi());
6013
- m.addGetterSetter(J, "direction", es);
6014
- m.addGetterSetter(J, "fontFamily", "Arial");
6015
- m.addGetterSetter(J, "fontSize", 12, x());
6016
- m.addGetterSetter(J, "fontStyle", ns);
6017
- m.addGetterSetter(J, "fontVariant", ns);
6018
- m.addGetterSetter(J, "padding", 0, x());
6019
- m.addGetterSetter(J, "align", is);
6020
- m.addGetterSetter(J, "verticalAlign", Jr);
6021
- m.addGetterSetter(J, "lineHeight", 1, x());
6022
- m.addGetterSetter(J, "wrap", ia);
6023
- m.addGetterSetter(J, "ellipsis", !1, ft());
6024
- m.addGetterSetter(J, "letterSpacing", 0, x());
6025
- m.addGetterSetter(J, "text", "", Wt());
6026
- m.addGetterSetter(J, "textDecoration", "");
6027
- m.addGetterSetter(J, "underlineOffset", void 0, x());
6028
- m.addGetterSetter(J, "charRenderFunc", void 0);
6010
+ tt(Q);
6011
+ m.overWriteSetter(Q, "width", xi());
6012
+ m.overWriteSetter(Q, "height", xi());
6013
+ m.addGetterSetter(Q, "direction", es);
6014
+ m.addGetterSetter(Q, "fontFamily", "Arial");
6015
+ m.addGetterSetter(Q, "fontSize", 12, x());
6016
+ m.addGetterSetter(Q, "fontStyle", ns);
6017
+ m.addGetterSetter(Q, "fontVariant", ns);
6018
+ m.addGetterSetter(Q, "padding", 0, x());
6019
+ m.addGetterSetter(Q, "align", is);
6020
+ m.addGetterSetter(Q, "verticalAlign", Jr);
6021
+ m.addGetterSetter(Q, "lineHeight", 1, x());
6022
+ m.addGetterSetter(Q, "wrap", ia);
6023
+ m.addGetterSetter(Q, "ellipsis", !1, ft());
6024
+ m.addGetterSetter(Q, "letterSpacing", 0, x());
6025
+ m.addGetterSetter(Q, "text", "", Vt());
6026
+ m.addGetterSetter(Q, "textDecoration", "");
6027
+ m.addGetterSetter(Q, "underlineOffset", void 0, x());
6028
+ m.addGetterSetter(Q, "charRenderFunc", void 0);
6029
6029
  const ha = "", rs = "normal";
6030
6030
  function as(r) {
6031
6031
  r.fillText(this.partialText, 0, 0);
@@ -6033,23 +6033,23 @@ function as(r) {
6033
6033
  function os(r) {
6034
6034
  r.strokeText(this.partialText, 0, 0);
6035
6035
  }
6036
- class nt extends k {
6036
+ class st extends k {
6037
6037
  constructor(t) {
6038
6038
  super(t), this.dummyCanvas = C.createCanvasElement(), this.dataArray = [], this._readDataAttribute(), this.on("dataChange.konva", function() {
6039
6039
  this._readDataAttribute(), this._setTextData();
6040
6040
  }), this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva", this._setTextData), this._setTextData();
6041
6041
  }
6042
6042
  _getTextPathLength() {
6043
- return Z.getPathLength(this.dataArray);
6043
+ return J.getPathLength(this.dataArray);
6044
6044
  }
6045
6045
  _getPointAtLength(t) {
6046
6046
  if (!this.attrs.data)
6047
6047
  return null;
6048
6048
  const e = this.pathLength;
6049
- return t > e ? null : Z.getPointAtLengthOfDataArray(t, this.dataArray);
6049
+ return t > e ? null : J.getPointAtLengthOfDataArray(t, this.dataArray);
6050
6050
  }
6051
6051
  _readDataAttribute() {
6052
- this.dataArray = Z.parsePathData(this.attrs.data), this.pathLength = this._getTextPathLength();
6052
+ this.dataArray = J.parsePathData(this.attrs.data), this.pathLength = this._getTextPathLength();
6053
6053
  }
6054
6054
  _sceneFunc(t) {
6055
6055
  t.setAttr("font", this._getContextFont()), t.setAttr("textBaseline", this.textBaseline()), t.setAttr("textAlign", "left"), t.save();
@@ -6091,10 +6091,10 @@ class nt extends k {
6091
6091
  return C.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."), this.textHeight;
6092
6092
  }
6093
6093
  setText(t) {
6094
- return J.prototype.setText.call(this, t);
6094
+ return Q.prototype.setText.call(this, t);
6095
6095
  }
6096
6096
  _getContextFont() {
6097
- return J.prototype._getContextFont.call(this);
6097
+ return Q.prototype._getContextFont.call(this);
6098
6098
  }
6099
6099
  _getTextSize(t) {
6100
6100
  const i = this.dummyCanvas.getContext("2d");
@@ -6133,7 +6133,7 @@ class nt extends k {
6133
6133
  const y = this._getPointAtLength(c + g);
6134
6134
  if (!y)
6135
6135
  return;
6136
- const T = Z.getLineLength(u.x, u.y, y.x, y.y);
6136
+ const T = J.getLineLength(u.x, u.y, y.x, y.y);
6137
6137
  let S = 0;
6138
6138
  if (o)
6139
6139
  try {
@@ -6142,7 +6142,7 @@ class nt extends k {
6142
6142
  S = 0;
6143
6143
  }
6144
6144
  u.x += S, y.x += S, this.textWidth += S;
6145
- const v = Z.getPointOnLine(S + T / 2, u.x, u.y, y.x, y.y), b = Math.atan2(y.y - u.y, y.x - u.x);
6145
+ const v = J.getPointOnLine(S + T / 2, u.x, u.y, y.x, y.y), b = Math.atan2(y.y - u.y, y.x - u.x);
6146
6146
  this.glyphInfo.push({
6147
6147
  transposeX: v.x,
6148
6148
  transposeY: v.y,
@@ -6181,24 +6181,24 @@ class nt extends k {
6181
6181
  return C.releaseCanvas(this.dummyCanvas), super.destroy();
6182
6182
  }
6183
6183
  }
6184
- nt.prototype._fillFunc = as;
6185
- nt.prototype._strokeFunc = os;
6186
- nt.prototype._fillFuncHit = as;
6187
- nt.prototype._strokeFuncHit = os;
6188
- nt.prototype.className = "TextPath";
6189
- nt.prototype._attrsAffectingSize = ["text", "fontSize", "data"];
6190
- Q(nt);
6191
- m.addGetterSetter(nt, "data");
6192
- m.addGetterSetter(nt, "fontFamily", "Arial");
6193
- m.addGetterSetter(nt, "fontSize", 12, x());
6194
- m.addGetterSetter(nt, "fontStyle", rs);
6195
- m.addGetterSetter(nt, "align", "left");
6196
- m.addGetterSetter(nt, "letterSpacing", 0, x());
6197
- m.addGetterSetter(nt, "textBaseline", "middle");
6198
- m.addGetterSetter(nt, "fontVariant", rs);
6199
- m.addGetterSetter(nt, "text", ha);
6200
- m.addGetterSetter(nt, "textDecoration", "");
6201
- m.addGetterSetter(nt, "kerningFunc", void 0);
6184
+ st.prototype._fillFunc = as;
6185
+ st.prototype._strokeFunc = os;
6186
+ st.prototype._fillFuncHit = as;
6187
+ st.prototype._strokeFuncHit = os;
6188
+ st.prototype.className = "TextPath";
6189
+ st.prototype._attrsAffectingSize = ["text", "fontSize", "data"];
6190
+ tt(st);
6191
+ m.addGetterSetter(st, "data");
6192
+ m.addGetterSetter(st, "fontFamily", "Arial");
6193
+ m.addGetterSetter(st, "fontSize", 12, x());
6194
+ m.addGetterSetter(st, "fontStyle", rs);
6195
+ m.addGetterSetter(st, "align", "left");
6196
+ m.addGetterSetter(st, "letterSpacing", 0, x());
6197
+ m.addGetterSetter(st, "textBaseline", "middle");
6198
+ m.addGetterSetter(st, "fontVariant", rs);
6199
+ m.addGetterSetter(st, "text", ha);
6200
+ m.addGetterSetter(st, "textDecoration", "");
6201
+ m.addGetterSetter(st, "kerningFunc", void 0);
6202
6202
  const ls = "tr-konva", ca = [
6203
6203
  "resizeEnabledChange",
6204
6204
  "rotateAnchorOffsetChange",
@@ -6808,7 +6808,7 @@ function Sa(r) {
6808
6808
  }), r || [];
6809
6809
  }
6810
6810
  F.prototype.className = "Transformer";
6811
- Q(F);
6811
+ tt(F);
6812
6812
  m.addGetterSetter(F, "enabledAnchors", Ye, Sa);
6813
6813
  m.addGetterSetter(F, "flipEnabled", !0, ft());
6814
6814
  m.addGetterSetter(F, "resizeEnabled", !0);
@@ -6865,7 +6865,7 @@ class _t extends k {
6865
6865
  _t.prototype.className = "Wedge";
6866
6866
  _t.prototype._centroid = !0;
6867
6867
  _t.prototype._attrsAffectingSize = ["radius"];
6868
- Q(_t);
6868
+ tt(_t);
6869
6869
  m.addGetterSetter(_t, "radius", 0, x());
6870
6870
  m.addGetterSetter(_t, "angle", 0, x());
6871
6871
  m.addGetterSetter(_t, "clockwise", !1);
@@ -7393,32 +7393,32 @@ const Ca = [
7393
7393
  function va(r, t) {
7394
7394
  const e = r.data, i = r.width, n = r.height;
7395
7395
  let s, a, o, l, h, c, d, u, p, g, y, T, S, v, b, w, L, P, I, A;
7396
- const D = t + t + 1, z = i - 1, W = n - 1, B = t + 1, V = B * (B + 1) / 2, N = new an(), H = Ca[t], M = Ta[t];
7397
- let K = null, G = N, $ = null, it = null;
7396
+ const D = t + t + 1, z = i - 1, V = n - 1, B = t + 1, W = B * (B + 1) / 2, N = new an(), H = Ca[t], M = Ta[t];
7397
+ let j = null, G = N, q = null, nt = null;
7398
7398
  for (let U = 1; U < D; U++)
7399
- G = G.next = new an(), U === B && (K = G);
7399
+ G = G.next = new an(), U === B && (j = G);
7400
7400
  G.next = N, o = a = 0;
7401
7401
  for (let U = 0; U < n; U++) {
7402
- T = S = v = b = l = h = c = d = 0, u = B * (w = e[a]), p = B * (L = e[a + 1]), g = B * (P = e[a + 2]), y = B * (I = e[a + 3]), l += V * w, h += V * L, c += V * P, d += V * I, G = N;
7403
- for (let tt = 0; tt < B; tt++)
7402
+ T = S = v = b = l = h = c = d = 0, u = B * (w = e[a]), p = B * (L = e[a + 1]), g = B * (P = e[a + 2]), y = B * (I = e[a + 3]), l += W * w, h += W * L, c += W * P, d += W * I, G = N;
7403
+ for (let et = 0; et < B; et++)
7404
7404
  G.r = w, G.g = L, G.b = P, G.a = I, G = G.next;
7405
- for (let tt = 1; tt < B; tt++)
7406
- s = a + ((z < tt ? z : tt) << 2), l += (G.r = w = e[s]) * (A = B - tt), h += (G.g = L = e[s + 1]) * A, c += (G.b = P = e[s + 2]) * A, d += (G.a = I = e[s + 3]) * A, T += w, S += L, v += P, b += I, G = G.next;
7407
- $ = N, it = K;
7408
- for (let tt = 0; tt < i; tt++)
7409
- e[a + 3] = I = d * H >> M, I !== 0 ? (I = 255 / I, e[a] = (l * H >> M) * I, e[a + 1] = (h * H >> M) * I, e[a + 2] = (c * H >> M) * I) : e[a] = e[a + 1] = e[a + 2] = 0, l -= u, h -= p, c -= g, d -= y, u -= $.r, p -= $.g, g -= $.b, y -= $.a, s = o + ((s = tt + t + 1) < z ? s : z) << 2, T += $.r = e[s], S += $.g = e[s + 1], v += $.b = e[s + 2], b += $.a = e[s + 3], l += T, h += S, c += v, d += b, $ = $.next, u += w = it.r, p += L = it.g, g += P = it.b, y += I = it.a, T -= w, S -= L, v -= P, b -= I, it = it.next, a += 4;
7405
+ for (let et = 1; et < B; et++)
7406
+ s = a + ((z < et ? z : et) << 2), l += (G.r = w = e[s]) * (A = B - et), h += (G.g = L = e[s + 1]) * A, c += (G.b = P = e[s + 2]) * A, d += (G.a = I = e[s + 3]) * A, T += w, S += L, v += P, b += I, G = G.next;
7407
+ q = N, nt = j;
7408
+ for (let et = 0; et < i; et++)
7409
+ e[a + 3] = I = d * H >> M, I !== 0 ? (I = 255 / I, e[a] = (l * H >> M) * I, e[a + 1] = (h * H >> M) * I, e[a + 2] = (c * H >> M) * I) : e[a] = e[a + 1] = e[a + 2] = 0, l -= u, h -= p, c -= g, d -= y, u -= q.r, p -= q.g, g -= q.b, y -= q.a, s = o + ((s = et + t + 1) < z ? s : z) << 2, T += q.r = e[s], S += q.g = e[s + 1], v += q.b = e[s + 2], b += q.a = e[s + 3], l += T, h += S, c += v, d += b, q = q.next, u += w = nt.r, p += L = nt.g, g += P = nt.b, y += I = nt.a, T -= w, S -= L, v -= P, b -= I, nt = nt.next, a += 4;
7410
7410
  o += i;
7411
7411
  }
7412
7412
  for (let U = 0; U < i; U++) {
7413
- S = v = b = T = h = c = d = l = 0, a = U << 2, u = B * (w = e[a]), p = B * (L = e[a + 1]), g = B * (P = e[a + 2]), y = B * (I = e[a + 3]), l += V * w, h += V * L, c += V * P, d += V * I, G = N;
7413
+ S = v = b = T = h = c = d = l = 0, a = U << 2, u = B * (w = e[a]), p = B * (L = e[a + 1]), g = B * (P = e[a + 2]), y = B * (I = e[a + 3]), l += W * w, h += W * L, c += W * P, d += W * I, G = N;
7414
7414
  for (let ot = 0; ot < B; ot++)
7415
7415
  G.r = w, G.g = L, G.b = P, G.a = I, G = G.next;
7416
- let tt = i;
7416
+ let et = i;
7417
7417
  for (let ot = 1; ot <= t; ot++)
7418
- a = tt + U << 2, l += (G.r = w = e[a]) * (A = B - ot), h += (G.g = L = e[a + 1]) * A, c += (G.b = P = e[a + 2]) * A, d += (G.a = I = e[a + 3]) * A, T += w, S += L, v += P, b += I, G = G.next, ot < W && (tt += i);
7419
- a = U, $ = N, it = K;
7418
+ a = et + U << 2, l += (G.r = w = e[a]) * (A = B - ot), h += (G.g = L = e[a + 1]) * A, c += (G.b = P = e[a + 2]) * A, d += (G.a = I = e[a + 3]) * A, T += w, S += L, v += P, b += I, G = G.next, ot < V && (et += i);
7419
+ a = U, q = N, nt = j;
7420
7420
  for (let ot = 0; ot < n; ot++)
7421
- s = a << 2, e[s + 3] = I = d * H >> M, I > 0 ? (I = 255 / I, e[s] = (l * H >> M) * I, e[s + 1] = (h * H >> M) * I, e[s + 2] = (c * H >> M) * I) : e[s] = e[s + 1] = e[s + 2] = 0, l -= u, h -= p, c -= g, d -= y, u -= $.r, p -= $.g, g -= $.b, y -= $.a, s = U + ((s = ot + B) < W ? s : W) * i << 2, l += T += $.r = e[s], h += S += $.g = e[s + 1], c += v += $.b = e[s + 2], d += b += $.a = e[s + 3], $ = $.next, u += w = it.r, p += L = it.g, g += P = it.b, y += I = it.a, T -= w, S -= L, v -= P, b -= I, it = it.next, a += i;
7421
+ s = a << 2, e[s + 3] = I = d * H >> M, I > 0 ? (I = 255 / I, e[s] = (l * H >> M) * I, e[s + 1] = (h * H >> M) * I, e[s + 2] = (c * H >> M) * I) : e[s] = e[s + 1] = e[s + 2] = 0, l -= u, h -= p, c -= g, d -= y, u -= q.r, p -= q.g, g -= q.b, y -= q.a, s = U + ((s = ot + B) < V ? s : V) * i << 2, l += T += q.r = e[s], h += S += q.g = e[s + 1], c += v += q.b = e[s + 2], d += b += q.a = e[s + 3], q = q.next, u += w = nt.r, p += L = nt.g, g += P = nt.b, y += I = nt.a, T -= w, S -= L, v -= P, b -= I, nt = nt.next, a += i;
7422
7422
  }
7423
7423
  }
7424
7424
  const ba = function(t) {
@@ -7457,18 +7457,18 @@ const Pa = function(r) {
7457
7457
  }[(a = (s = this.embossDirection) === null || s === void 0 ? void 0 : s.call(this)) !== null && a !== void 0 ? a : "top-left"]) !== null && o !== void 0 ? o : 315, S = !!((h = (l = this.embossBlend) === null || l === void 0 ? void 0 : l.call(this)) !== null && h !== void 0 && h), v = p * 10, b = g * 255, w = T * Math.PI / 180, L = Math.cos(w), P = Math.sin(w), I = 128 / 1020 * v, A = new Uint8ClampedArray(c), D = new Float32Array(d * u);
7458
7458
  for (let N = 0, H = 0; H < c.length; H += 4, N++)
7459
7459
  D[N] = 0.2126 * A[H] + 0.7152 * A[H + 1] + 0.0722 * A[H + 2];
7460
- const z = [-1, 0, 1, -2, 0, 2, -1, 0, 1], W = [-1, -2, -1, 0, 0, 0, 1, 2, 1], B = [-d - 1, -d, -d + 1, -1, 0, 1, d - 1, d, d + 1], V = (N) => N < 0 ? 0 : N > 255 ? 255 : N;
7460
+ const z = [-1, 0, 1, -2, 0, 2, -1, 0, 1], V = [-1, -2, -1, 0, 0, 0, 1, 2, 1], B = [-d - 1, -d, -d + 1, -1, 0, 1, d - 1, d, d + 1], W = (N) => N < 0 ? 0 : N > 255 ? 255 : N;
7461
7461
  for (let N = 1; N < u - 1; N++)
7462
7462
  for (let H = 1; H < d - 1; H++) {
7463
7463
  const M = N * d + H;
7464
- let K = 0, G = 0;
7465
- K += D[M + B[0]] * z[0], G += D[M + B[0]] * W[0], K += D[M + B[1]] * z[1], G += D[M + B[1]] * W[1], K += D[M + B[2]] * z[2], G += D[M + B[2]] * W[2], K += D[M + B[3]] * z[3], G += D[M + B[3]] * W[3], K += D[M + B[5]] * z[5], G += D[M + B[5]] * W[5], K += D[M + B[6]] * z[6], G += D[M + B[6]] * W[6], K += D[M + B[7]] * z[7], G += D[M + B[7]] * W[7], K += D[M + B[8]] * z[8], G += D[M + B[8]] * W[8];
7466
- const $ = L * K + P * G, it = V(b + $ * I), U = M * 4;
7464
+ let j = 0, G = 0;
7465
+ j += D[M + B[0]] * z[0], G += D[M + B[0]] * V[0], j += D[M + B[1]] * z[1], G += D[M + B[1]] * V[1], j += D[M + B[2]] * z[2], G += D[M + B[2]] * V[2], j += D[M + B[3]] * z[3], G += D[M + B[3]] * V[3], j += D[M + B[5]] * z[5], G += D[M + B[5]] * V[5], j += D[M + B[6]] * z[6], G += D[M + B[6]] * V[6], j += D[M + B[7]] * z[7], G += D[M + B[7]] * V[7], j += D[M + B[8]] * z[8], G += D[M + B[8]] * V[8];
7466
+ const q = L * j + P * G, nt = W(b + q * I), U = M * 4;
7467
7467
  if (S) {
7468
- const tt = it - b;
7469
- c[U] = V(A[U] + tt), c[U + 1] = V(A[U + 1] + tt), c[U + 2] = V(A[U + 2] + tt), c[U + 3] = A[U + 3];
7468
+ const et = nt - b;
7469
+ c[U] = W(A[U] + et), c[U + 1] = W(A[U + 1] + et), c[U + 2] = W(A[U + 2] + et), c[U + 3] = A[U + 3];
7470
7470
  } else
7471
- c[U] = c[U + 1] = c[U + 2] = it, c[U + 3] = A[U + 3];
7471
+ c[U] = c[U + 1] = c[U + 2] = nt, c[U + 3] = A[U + 3];
7472
7472
  }
7473
7473
  for (let N = 0; N < d; N++) {
7474
7474
  let H = N * 4, M = ((u - 1) * d + N) * 4;
@@ -7711,13 +7711,13 @@ const Fa = function(r) {
7711
7711
  return e && (e = Ha(e, r.width, r.height), e = za(e, r.width, r.height), e = Na(e, r.width, r.height), Ba(r, e)), r;
7712
7712
  };
7713
7713
  m.addGetterSetter(_, "threshold", 0, x(), m.afterSetFilter);
7714
- const Wa = function(r) {
7714
+ const Va = function(r) {
7715
7715
  const t = this.noise() * 255, e = r.data, i = e.length, n = t / 2;
7716
7716
  for (let s = 0; s < i; s += 4)
7717
7717
  e[s + 0] += n - 2 * n * Math.random(), e[s + 1] += n - 2 * n * Math.random(), e[s + 2] += n - 2 * n * Math.random();
7718
7718
  };
7719
7719
  m.addGetterSetter(_, "noise", 0.2, x(), m.afterSetFilter);
7720
- const Va = function(r) {
7720
+ const Wa = function(r) {
7721
7721
  let t = Math.ceil(this.pixelSize()), e = r.width, i = r.height, n = Math.ceil(e / t), s = Math.ceil(i / t), a = r.data;
7722
7722
  if (t <= 0) {
7723
7723
  C.error("pixelSize value can not be <= 0");
@@ -7813,14 +7813,14 @@ const X = qi.Util._assign(qi, {
7813
7813
  Label: Li,
7814
7814
  Tag: Xt,
7815
7815
  Line: kt,
7816
- Path: Z,
7816
+ Path: J,
7817
7817
  Rect: be,
7818
7818
  RegularPolygon: It,
7819
7819
  Ring: Ut,
7820
7820
  Sprite: St,
7821
7821
  Star: Dt,
7822
- Text: J,
7823
- TextPath: nt,
7822
+ Text: Q,
7823
+ TextPath: st,
7824
7824
  Transformer: F,
7825
7825
  Wedge: _t,
7826
7826
  Filters: {
@@ -7836,8 +7836,8 @@ const X = qi.Util._assign(qi, {
7836
7836
  Invert: Ma,
7837
7837
  Kaleidoscope: Da,
7838
7838
  Mask: Fa,
7839
- Noise: Wa,
7840
- Pixelate: Va,
7839
+ Noise: Va,
7840
+ Pixelate: Wa,
7841
7841
  Posterize: Ya,
7842
7842
  RGB: Xa,
7843
7843
  RGBA: Ua,
@@ -8326,7 +8326,7 @@ function ho(r, t, e) {
8326
8326
  p.ellipsis(!0), p.width(s), p.height(dn), p.name("clip-label"), r.add(p);
8327
8327
  }
8328
8328
  function gs(r, t) {
8329
- const e = t.width <= Ve, i = us(t.theme, t.isSelected, t.clipType);
8329
+ const e = t.width <= We, i = us(t.theme, t.isSelected, t.clipType);
8330
8330
  if (r.destroyChildren(), e) {
8331
8331
  ao(r, t.width, t.height, i);
8332
8332
  return;
@@ -8338,7 +8338,7 @@ function gs(r, t) {
8338
8338
  oo(r, t, i);
8339
8339
  }
8340
8340
  function co(r, t) {
8341
- if (t.width <= Ve || t.clipType !== "video")
8341
+ if (t.width <= We || t.clipType !== "video")
8342
8342
  return !1;
8343
8343
  const i = us(t.theme, t.isSelected, t.clipType);
8344
8344
  return lo(r, t, i);
@@ -8439,7 +8439,7 @@ function So(r, t, e, i, n, s) {
8439
8439
  a.add(bi([0, o, i, o], "#E0E0E0", 0.5));
8440
8440
  r.add(a);
8441
8441
  }
8442
- class et {
8442
+ class it {
8443
8443
  /**
8444
8444
  * 创建舞台
8445
8445
  */
@@ -8602,7 +8602,7 @@ class et {
8602
8602
  }
8603
8603
  }
8604
8604
  // 定义拉伸交互区域宽度常量
8605
- f(et, "RESIZE_AREA_WIDTH", 3);
8605
+ f(it, "RESIZE_AREA_WIDTH", 3);
8606
8606
  function we(r) {
8607
8607
  let t = !1;
8608
8608
  return typeof window < "u" && (window.addEventListener("mousemove", r.onPointerMove), window.addEventListener("mouseup", r.onPointerEnd), window.addEventListener("blur", r.onWindowBlur || r.onPointerEnd), t = !0), typeof document < "u" && (document.addEventListener("visibilitychange", r.onVisibilityChange), t = !0), t;
@@ -8610,7 +8610,7 @@ function we(r) {
8610
8610
  function ke(r) {
8611
8611
  typeof window < "u" && (window.removeEventListener("mousemove", r.onPointerMove), window.removeEventListener("mouseup", r.onPointerEnd), window.removeEventListener("blur", r.onWindowBlur || r.onPointerEnd)), typeof document < "u" && document.removeEventListener("visibilitychange", r.onVisibilityChange);
8612
8612
  }
8613
- class Ll {
8613
+ class Ml {
8614
8614
  constructor(t, e, i, n, s, a) {
8615
8615
  f(this, "stage");
8616
8616
  f(this, "gridLayer");
@@ -8649,7 +8649,7 @@ class Ll {
8649
8649
  currentTime: i.currentTime || 0,
8650
8650
  playState: i.playState || "paused",
8651
8651
  container: i.container,
8652
- theme: We(i.theme),
8652
+ theme: Ve(i.theme),
8653
8653
  timeScaleHeight: i.timeScaleHeight
8654
8654
  }, this.theme = this.config.theme, i.timeScaleHeight && (this.timeScaleHeight = i.timeScaleHeight), this.initEventListeners(), this.render();
8655
8655
  }
@@ -8780,7 +8780,7 @@ class Ll {
8780
8780
  if (i)
8781
8781
  i.width(t), i.height(e), i.fill(this.theme.background), i.stroke(this.theme.border);
8782
8782
  else {
8783
- const n = et.createRect(0, 0, t, e, this.theme.background, this.theme.border, 1);
8783
+ const n = it.createRect(0, 0, t, e, this.theme.background, this.theme.border, 1);
8784
8784
  n.name("timeline-background"), this.gridLayer.add(n);
8785
8785
  }
8786
8786
  this.gridLayer.find(".grid-line").forEach((n) => n.remove()), this.gridLayer.find(".time-tick-line").forEach((n) => n.remove()), this.gridLayer.find(".time-tick-text").forEach((n) => n.remove()), this.renderTimeTicks(), this.renderScrollbar(), this.gridLayer.batchDraw();
@@ -8790,7 +8790,7 @@ class Ll {
8790
8790
  if (a)
8791
8791
  a.x(0), a.y(i), a.width(t), a.height(this.scrollbarHeight), a.fill(this.theme.scrollbarBackground || "#333333"), a.stroke(this.theme.scrollbarBorder || "#555555"), a.visible(!0);
8792
8792
  else {
8793
- const l = et.createRect(
8793
+ const l = it.createRect(
8794
8794
  0,
8795
8795
  i,
8796
8796
  t,
@@ -8805,7 +8805,7 @@ class Ll {
8805
8805
  if (o)
8806
8806
  o.x(s), o.y(i), o.width(n), o.height(this.scrollbarHeight), o.fill(this.theme.scrollbarThumb || "#444444"), o.stroke(this.theme.scrollbarThumbBorder || this.theme.scrollbarBorder || "#555555"), o.visible(n < t);
8807
8807
  else {
8808
- const l = et.createRect(
8808
+ const l = it.createRect(
8809
8809
  s,
8810
8810
  i,
8811
8811
  n,
@@ -8823,7 +8823,7 @@ class Ll {
8823
8823
  const y = 20;
8824
8824
  for (const T of p) {
8825
8825
  const S = this.timeToPixel(T.time);
8826
- S >= -y && S <= t + y && (et.drawTimeTick(
8826
+ S >= -y && S <= t + y && (it.drawTimeTick(
8827
8827
  this.gridLayer,
8828
8828
  S,
8829
8829
  0,
@@ -8923,11 +8923,11 @@ class Ll {
8923
8923
  }
8924
8924
  const fe = 8;
8925
8925
  function Lt(r, t, e) {
8926
- return et.timeToPixels(r, t) - e + at;
8926
+ return it.timeToPixels(r, t) - e + at;
8927
8927
  }
8928
8928
  function Nt(r, t) {
8929
- const e = et.timeToPixels(r, t);
8930
- return r <= 1e3 || e <= Ve ? Ve : e;
8929
+ const e = it.timeToPixels(r, t);
8930
+ return r <= 1e3 || e <= We ? We : e;
8931
8931
  }
8932
8932
  function fn(r, t) {
8933
8933
  const e = Lt(r.startTime, r.zoom, r.scrollLeft), i = Nt(r.duration, r.zoom);
@@ -9205,7 +9205,7 @@ const pt = class pt {
9205
9205
  }
9206
9206
  this.startEdgeAutoScroll();
9207
9207
  });
9208
- this.layer = t, this.config = e, this.theme = o, this.trackType = i, this.zoom = n, this.trackY = s, this.trackHeight = a, this.onClipUpdate = l, this.onClipAdd = h, this.onClipRemove = c, this.onClipSplit = d, this.onClipSelect = u, this.onTimeJump = p, this.onHorizontalDragAutoScroll = g, this.onClipOverlap = y, this.onClipCrossTrackPreview = T, this.onClipCrossTrack = S, this.onClearDropPreview = v, this.onClearSelection = b, this.onSnapGuideChange = w, this.dragActivationThreshold = Math.max(0, L), this.enableClipSnap = P, this.clipSnapThreshold = Math.max(0, I), this.trackGroup = et.createGroup(0, s), this.layer.add(this.trackGroup), this.initClips(), this.initEventListeners(), this.render();
9208
+ this.layer = t, this.config = e, this.theme = o, this.trackType = i, this.zoom = n, this.trackY = s, this.trackHeight = a, this.onClipUpdate = l, this.onClipAdd = h, this.onClipRemove = c, this.onClipSplit = d, this.onClipSelect = u, this.onTimeJump = p, this.onHorizontalDragAutoScroll = g, this.onClipOverlap = y, this.onClipCrossTrackPreview = T, this.onClipCrossTrack = S, this.onClearDropPreview = v, this.onClearSelection = b, this.onSnapGuideChange = w, this.dragActivationThreshold = Math.max(0, L), this.enableClipSnap = P, this.clipSnapThreshold = Math.max(0, I), this.trackGroup = it.createGroup(0, s), this.layer.add(this.trackGroup), this.initClips(), this.initEventListeners(), this.render();
9209
9209
  }
9210
9210
  initClips() {
9211
9211
  this.clips = this.config.clips.map((t) => {
@@ -9220,9 +9220,9 @@ const pt = class pt {
9220
9220
  ensureDropPreviewGroup() {
9221
9221
  if (this.dropPreviewGroup)
9222
9222
  return this.dropPreviewGroup;
9223
- const t = et.createGroup(0, 0);
9223
+ const t = it.createGroup(0, 0);
9224
9224
  t.name("clip-drop-preview"), t.visible(!1), t.listening(!1);
9225
- const e = this.trackType === "video" ? "rgba(80, 227, 194, 0.18)" : "rgba(181, 186, 255, 0.18)", i = this.trackType === "video" ? "#50e3c2" : "#b5baff", n = et.createRect(0, 0, 0, 0, e, i, 1);
9225
+ const e = this.trackType === "video" ? "rgba(80, 227, 194, 0.18)" : "rgba(181, 186, 255, 0.18)", i = this.trackType === "video" ? "#50e3c2" : "#b5baff", n = it.createRect(0, 0, 0, 0, e, i, 1);
9226
9226
  return n.dash([6, 4]), n.cornerRadius(4), n.listening(!1), t.add(n), this.trackGroup.add(t), this.dropPreviewGroup = t, t;
9227
9227
  }
9228
9228
  showDropPreview(t) {
@@ -9267,7 +9267,7 @@ const pt = class pt {
9267
9267
  this.onTimeJump(a), this.onClearSelection && this.onClearSelection();
9268
9268
  }
9269
9269
  createClipGroup(t) {
9270
- const e = Lt(t.startTime, this.zoom, this.scrollLeft), i = Nt(t.duration, this.zoom), n = 2, s = this.trackHeight - 4, a = et.createClipGroup(
9270
+ const e = Lt(t.startTime, this.zoom, this.scrollLeft), i = Nt(t.duration, this.zoom), n = 2, s = this.trackHeight - 4, a = it.createClipGroup(
9271
9271
  e,
9272
9272
  n,
9273
9273
  i,
@@ -9529,7 +9529,7 @@ const pt = class pt {
9529
9529
  scrollLeft: this.scrollLeft
9530
9530
  }, this.layer.width()));
9531
9531
  const a = t.isSelected;
9532
- (t.isDragging || a) && i.moveToTop(), i.opacity(t.opacity), et.updateClipGroup(
9532
+ (t.isDragging || a) && i.moveToTop(), i.opacity(t.opacity), it.updateClipGroup(
9533
9533
  i,
9534
9534
  s,
9535
9535
  this.trackHeight - 4,
@@ -9647,7 +9647,7 @@ const pt = class pt {
9647
9647
  render(t = !0) {
9648
9648
  const e = this.getTrackBackgroundFill();
9649
9649
  if (this.trackGroup.children.length === 0) {
9650
- const i = et.createRect(0, 0, this.layer.width(), this.trackHeight, e, this.theme.trackBorder, 1);
9650
+ const i = it.createRect(0, 0, this.layer.width(), this.trackHeight, e, this.theme.trackBorder, 1);
9651
9651
  i.name("track-background"), i.on("click", (n) => {
9652
9652
  this.handleTrackBackgroundClick(n.evt);
9653
9653
  }), i.on("mousemove", () => {
@@ -9985,7 +9985,7 @@ const pt = class pt {
9985
9985
  };
9986
9986
  f(pt, "DEFAULT_DRAG_ACTIVATION_THRESHOLD", 4), f(pt, "DEFAULT_CLIP_SNAP_THRESHOLD", 8), f(pt, "AUTO_SCROLL_EDGE_THRESHOLD", 48), f(pt, "AUTO_SCROLL_MAX_SPEED", 18);
9987
9987
  let ki = pt;
9988
- class Ml {
9988
+ class Rl {
9989
9989
  constructor(t, e, i, n, s, a) {
9990
9990
  f(this, "layer");
9991
9991
  f(this, "playheadGroup");
@@ -9997,7 +9997,7 @@ class Ml {
9997
9997
  f(this, "scrollLeft", 0);
9998
9998
  f(this, "onTimeChange");
9999
9999
  f(this, "isDragging", !1);
10000
- this.layer = t, this.currentTime = e, this.zoom = i, this.theme = s, this.onTimeChange = a, this.playheadGroup = et.createGroup(), this.layer.add(this.playheadGroup), this.playheadLine = et.createLine(
10000
+ this.layer = t, this.currentTime = e, this.zoom = i, this.theme = s, this.onTimeChange = a, this.playheadGroup = it.createGroup(), this.layer.add(this.playheadGroup), this.playheadLine = it.createLine(
10001
10001
  [0, 0, 0, n],
10002
10002
  this.theme.playhead,
10003
10003
  1
@@ -10140,8 +10140,14 @@ const _o = {
10140
10140
  buttonActiveBackground: "#409eff",
10141
10141
  buttonActiveBorder: "#409eff",
10142
10142
  buttonActiveText: "#fff"
10143
- }, st = {
10143
+ }, $ = {
10144
10144
  container: "clip-config-panel",
10145
+ tabBar: "clip-config-tab-bar",
10146
+ tabButton: "clip-config-tab-button",
10147
+ content: "clip-config-content",
10148
+ visualPanel: "clip-config-visual-panel",
10149
+ audioPanel: "clip-config-audio-panel",
10150
+ actionBar: "clip-config-action-bar",
10145
10151
  section: "clip-config-section",
10146
10152
  sectionTitle: "clip-config-section-title",
10147
10153
  row: "clip-config-row",
@@ -10152,70 +10158,125 @@ const _o = {
10152
10158
  presetButton: "clip-config-preset-button",
10153
10159
  resetButton: "clip-config-reset-button",
10154
10160
  emptyState: "clip-config-empty-state"
10161
+ }, Po = {
10162
+ visual: "画面",
10163
+ audio: "音频"
10155
10164
  };
10156
- class Po {
10165
+ class xo {
10157
10166
  constructor(t) {
10158
10167
  f(this, "container");
10159
10168
  f(this, "rootElement", null);
10160
10169
  f(this, "theme");
10161
10170
  f(this, "onClipUpdate");
10162
10171
  f(this, "currentClip", null);
10163
- // UI 控件引用,用于实时更新
10172
+ f(this, "activeTab", "visual");
10173
+ f(this, "tabBar", null);
10174
+ f(this, "contentArea", null);
10175
+ f(this, "visualPanel", null);
10176
+ f(this, "audioPanel", null);
10164
10177
  f(this, "xSlider", null);
10165
10178
  f(this, "xInput", null);
10166
10179
  f(this, "ySlider", null);
10167
10180
  f(this, "yInput", null);
10168
10181
  f(this, "scaleSlider", null);
10169
10182
  f(this, "scaleInput", null);
10183
+ f(this, "volumeSlider", null);
10184
+ f(this, "volumeInput", null);
10170
10185
  this.container = t.container, this.theme = t.theme ?? _o, this.onClipUpdate = t.onClipUpdate, this.render();
10171
10186
  }
10172
10187
  setClip(t) {
10173
- this.currentClip = t, this.render();
10188
+ this.currentClip = t, (t == null ? void 0 : t.type) === "video" ? this.activeTab = "visual" : (t == null ? void 0 : t.type) === "audio" && (this.activeTab = "audio"), this.render();
10174
10189
  }
10175
10190
  destroy() {
10176
10191
  this.rootElement && (this.rootElement.remove(), this.rootElement = null);
10177
10192
  }
10193
+ getAvailableTabs() {
10194
+ return this.currentClip ? this.currentClip.type === "audio" ? ["audio"] : ["visual", "audio"] : [];
10195
+ }
10178
10196
  render() {
10179
- this.rootElement && this.rootElement.remove(), this.rootElement = document.createElement("div"), this.rootElement.className = st.container, this.applyTheme(), this.currentClip ? this.renderConfigPanel() : this.renderEmptyState(), this.container.appendChild(this.rootElement);
10197
+ this.rootElement && this.rootElement.remove(), this.rootElement = document.createElement("div"), this.rootElement.className = $.container, this.applyBaseTheme(), this.currentClip ? this.renderPanel() : this.renderEmptyState(), this.container.appendChild(this.rootElement);
10198
+ }
10199
+ applyBaseTheme() {
10200
+ this.rootElement && (this.rootElement.style.backgroundColor = this.theme.backgroundColor, this.rootElement.style.border = `1px solid ${this.theme.borderColor}`, this.rootElement.style.borderRadius = "4px", this.rootElement.style.color = this.theme.textColor, this.rootElement.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', this.rootElement.style.fontSize = "13px", this.rootElement.style.display = "flex", this.rootElement.style.flexDirection = "column", this.rootElement.style.overflow = "hidden", this.rootElement.style.height = "100%");
10180
10201
  }
10181
10202
  renderEmptyState() {
10182
10203
  const t = document.createElement("div");
10183
- t.className = st.emptyState, t.style.textAlign = "center", t.style.padding = "20px", t.style.color = this.theme.labelColor;
10204
+ t.className = $.emptyState, t.style.textAlign = "center", t.style.padding = "40px 20px", t.style.color = this.theme.labelColor;
10184
10205
  const e = document.createElement("div");
10185
10206
  e.style.fontSize = "24px", e.style.marginBottom = "8px", e.textContent = "🎬";
10186
10207
  const i = document.createElement("div");
10187
10208
  i.style.fontSize = "13px", i.textContent = "请选择一个片段", t.appendChild(e), t.appendChild(i), this.rootElement.appendChild(t);
10188
10209
  }
10189
- renderConfigPanel() {
10210
+ renderPanel() {
10211
+ this.renderTabBar(), this.renderContentArea(), this.renderActionBar();
10212
+ }
10213
+ renderTabBar() {
10214
+ const t = this.getAvailableTabs();
10215
+ this.tabBar = document.createElement("div"), this.tabBar.className = $.tabBar, this.tabBar.style.display = "flex", this.tabBar.style.gap = "12px", this.tabBar.style.padding = "4px", this.tabBar.style.backgroundColor = "#2a2a2a", this.tabBar.style.borderRadius = "4px 4px 0 0", t.forEach((e) => {
10216
+ const i = document.createElement("button");
10217
+ i.className = $.tabButton, i.textContent = Po[e], i.style.lineHeight = "22px", i.style.padding = "0 6px", i.style.border = "none", i.style.cursor = "pointer", i.style.fontSize = "13px", i.style.fontFamily = "inherit", i.style.transition = "background-color 0.15s, color 0.15s";
10218
+ const n = this.activeTab === e;
10219
+ i.style.backgroundColor = n ? "#595A5D" : "transparent", i.style.color = n ? "#fff" : "#b5b6bf", i.style.borderRadius = "4px", i.addEventListener("click", () => {
10220
+ this.activeTab = e, this.updateTabBarState(), this.updateContentVisibility();
10221
+ }), this.tabBar.appendChild(i);
10222
+ }), this.rootElement.appendChild(this.tabBar);
10223
+ }
10224
+ updateTabBarState() {
10225
+ if (!this.tabBar) return;
10226
+ const t = this.tabBar.querySelectorAll(`.${$.tabButton}`), e = this.getAvailableTabs();
10227
+ t.forEach((i, n) => {
10228
+ const a = e[n] === this.activeTab, o = i;
10229
+ o.style.backgroundColor = a ? "#595A5D" : "transparent", o.style.color = a ? "#fff" : "#b5b6bf";
10230
+ });
10231
+ }
10232
+ renderContentArea() {
10233
+ this.contentArea = document.createElement("div"), this.contentArea.className = $.content, this.contentArea.style.padding = "12px", this.contentArea.style.flex = "1", this.contentArea.style.overflowY = "auto", this.contentArea.style.minHeight = "0", this.renderVisualPanel(), this.renderAudioPanel(), this.updateContentVisibility(), this.rootElement.appendChild(this.contentArea);
10234
+ }
10235
+ updateContentVisibility() {
10236
+ this.visualPanel && (this.visualPanel.style.display = this.activeTab === "visual" ? "block" : "none"), this.audioPanel && (this.audioPanel.style.display = this.activeTab === "audio" ? "block" : "none");
10237
+ }
10238
+ renderVisualPanel() {
10239
+ this.visualPanel = document.createElement("div"), this.visualPanel.className = $.visualPanel;
10190
10240
  const t = document.createElement("div");
10191
- t.className = st.section, t.style.marginBottom = "16px";
10241
+ t.className = $.section, t.style.marginBottom = "16px";
10192
10242
  const e = document.createElement("div");
10193
- e.className = st.sectionTitle, e.style.fontSize = "12px", e.style.color = this.theme.labelColor, e.style.marginBottom = "8px", e.style.textTransform = "uppercase", e.textContent = "位置", t.appendChild(e), this.renderPositionControl(t, "X", "x"), this.renderPositionControl(t, "Y", "y"), this.renderPresetGrid(t), this.rootElement.appendChild(t);
10243
+ e.className = $.sectionTitle, e.style.fontSize = "12px", e.style.color = this.theme.labelColor, e.style.marginBottom = "8px", e.style.textTransform = "uppercase", e.textContent = "位置", t.appendChild(e), this.renderPositionControl(t, "X", "x"), this.renderPositionControl(t, "Y", "y"), this.renderPresetGrid(t), this.visualPanel.appendChild(t);
10194
10244
  const i = document.createElement("div");
10195
- i.className = st.section, i.style.borderTop = `1px solid ${this.theme.borderColor}`, i.style.paddingTop = "16px";
10245
+ i.className = $.section, i.style.borderTop = `1px solid ${this.theme.borderColor}`, i.style.paddingTop = "16px";
10196
10246
  const n = document.createElement("div");
10197
- n.className = st.sectionTitle, n.style.fontSize = "12px", n.style.color = this.theme.labelColor, n.style.marginBottom = "8px", n.style.textTransform = "uppercase", n.textContent = "缩放", i.appendChild(n), this.renderScaleControl(i), this.rootElement.appendChild(i);
10247
+ n.className = $.sectionTitle, n.style.fontSize = "12px", n.style.color = this.theme.labelColor, n.style.marginBottom = "8px", n.style.textTransform = "uppercase", n.textContent = "缩放", i.appendChild(n), this.renderScaleControl(i), this.visualPanel.appendChild(i), this.contentArea.appendChild(this.visualPanel);
10248
+ }
10249
+ renderAudioPanel() {
10250
+ this.audioPanel = document.createElement("div"), this.audioPanel.className = $.audioPanel;
10251
+ const t = document.createElement("div");
10252
+ t.className = $.section;
10253
+ const e = document.createElement("div");
10254
+ e.className = $.sectionTitle, e.style.fontSize = "12px", e.style.color = this.theme.labelColor, e.style.marginBottom = "8px", e.style.textTransform = "uppercase", e.textContent = "音量", t.appendChild(e), this.renderVolumeControl(t), this.audioPanel.appendChild(t), this.contentArea.appendChild(this.audioPanel);
10255
+ }
10256
+ renderActionBar() {
10257
+ const t = document.createElement("div");
10258
+ t.className = $.actionBar, t.style.borderTop = `1px solid ${this.theme.borderColor}`, t.style.borderRadius = "0 0 4px 4px", t.style.minHeight = "36px", t.style.backgroundColor = "#2a2a2a", this.rootElement.appendChild(t);
10198
10259
  }
10199
10260
  renderPositionControl(t, e, i) {
10200
10261
  var u, p, g, y, T, S;
10201
10262
  const n = document.createElement("div");
10202
- n.className = st.row, n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "8px", n.style.marginBottom = "8px";
10263
+ n.className = $.row, n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "8px", n.style.marginBottom = "8px";
10203
10264
  const s = document.createElement("label");
10204
- s.className = st.label, s.style.width = "16px", s.style.fontSize = "13px", s.style.color = this.theme.labelColor, s.textContent = e, n.appendChild(s);
10265
+ s.className = $.label, s.style.width = "16px", s.style.fontSize = "13px", s.style.color = this.theme.labelColor, s.textContent = e, n.appendChild(s);
10205
10266
  const o = (((p = (u = this.currentClip) == null ? void 0 : u.visualTransform) == null ? void 0 : p.scale) ?? 1) / 2, l = -o, h = 1 + o, c = document.createElement("input");
10206
- c.type = "range", c.className = st.slider, c.min = String(l), c.max = String(h), c.step = "0.01", c.value = String(((y = (g = this.currentClip) == null ? void 0 : g.visualTransform) == null ? void 0 : y[i]) ?? 0.5), c.style.flex = "1", c.style.height = "4px", c.addEventListener("input", (v) => {
10267
+ c.type = "range", c.className = $.slider, c.min = String(l), c.max = String(h), c.step = "0.01", c.value = String(((y = (g = this.currentClip) == null ? void 0 : g.visualTransform) == null ? void 0 : y[i]) ?? 0.5), c.style.flex = "1", c.style.height = "4px", c.addEventListener("input", (v) => {
10207
10268
  const b = parseFloat(v.target.value);
10208
10269
  this.handleTransformChange(i, b);
10209
10270
  }), n.appendChild(c);
10210
10271
  const d = document.createElement("input");
10211
- d.type = "number", d.className = st.input, d.min = String(l), d.max = String(h), d.step = "0.01", d.value = String(((S = (T = this.currentClip) == null ? void 0 : T.visualTransform) == null ? void 0 : S[i]) ?? 0.5), d.style.width = "60px", d.style.padding = "4px 6px", d.style.border = `1px solid ${this.theme.inputBorder}`, d.style.borderRadius = "4px", d.style.fontSize = "12px", d.style.backgroundColor = this.theme.inputBackground, d.style.color = this.theme.textColor, d.addEventListener("change", (v) => {
10272
+ d.type = "number", d.className = $.input, d.min = String(l), d.max = String(h), d.step = "0.01", d.value = String(((S = (T = this.currentClip) == null ? void 0 : T.visualTransform) == null ? void 0 : S[i]) ?? 0.5), d.style.width = "60px", d.style.padding = "4px 6px", d.style.border = `1px solid ${this.theme.inputBorder}`, d.style.borderRadius = "4px", d.style.fontSize = "12px", d.style.backgroundColor = this.theme.inputBackground, d.style.color = this.theme.textColor, d.addEventListener("change", (v) => {
10212
10273
  const b = parseFloat(v.target.value);
10213
10274
  this.handleTransformChange(i, b);
10214
10275
  }), n.appendChild(d), i === "x" ? (this.xSlider = c, this.xInput = d) : (this.ySlider = c, this.yInput = d), t.appendChild(n);
10215
10276
  }
10216
10277
  renderPresetGrid(t) {
10217
10278
  const e = document.createElement("div");
10218
- e.className = st.presetGrid, e.style.display = "grid", e.style.gridTemplateColumns = "repeat(3, 1fr)", e.style.gap = "4px", [
10279
+ e.className = $.presetGrid, e.style.display = "grid", e.style.gridTemplateColumns = "repeat(3, 1fr)", e.style.gap = "4px", [
10219
10280
  { label: "↖ 左上", x: "left", y: "top" },
10220
10281
  { label: "↑ 上中", x: "center", y: "top" },
10221
10282
  { label: "↗ 右上", x: "right", y: "top" },
@@ -10227,7 +10288,7 @@ class Po {
10227
10288
  { label: "↘ 右下", x: "right", y: "bottom" }
10228
10289
  ].forEach((n) => {
10229
10290
  const s = document.createElement("button");
10230
- s.className = st.presetButton, s.textContent = n.label, s.style.padding = "6px", s.style.border = `1px solid ${this.theme.buttonBorder}`, s.style.borderRadius = "4px", s.style.background = this.theme.buttonBackground, s.style.fontSize = "11px", s.style.cursor = "pointer", s.style.color = this.theme.textColor, s.addEventListener("click", () => {
10291
+ s.className = $.presetButton, s.textContent = n.label, s.style.padding = "6px", s.style.border = `1px solid ${this.theme.buttonBorder}`, s.style.borderRadius = "4px", s.style.background = this.theme.buttonBackground, s.style.fontSize = "11px", s.style.cursor = "pointer", s.style.color = this.theme.textColor, s.addEventListener("click", () => {
10231
10292
  const { x: a, y: o } = this.calculatePresetPosition(
10232
10293
  n.x,
10233
10294
  n.y
@@ -10244,22 +10305,49 @@ class Po {
10244
10305
  renderScaleControl(t) {
10245
10306
  var a, o, l, h;
10246
10307
  const e = document.createElement("div");
10247
- e.className = st.row, e.style.display = "flex", e.style.alignItems = "center", e.style.gap = "8px";
10308
+ e.className = $.row, e.style.display = "flex", e.style.alignItems = "center", e.style.gap = "8px";
10248
10309
  const i = document.createElement("input");
10249
- i.type = "range", i.className = st.slider, i.min = "0.1", i.max = "8", i.step = "0.1", i.value = String(((o = (a = this.currentClip) == null ? void 0 : a.visualTransform) == null ? void 0 : o.scale) ?? 1), i.style.flex = "1", i.style.height = "4px", i.addEventListener("input", (c) => {
10310
+ i.type = "range", i.className = $.slider, i.min = "0.1", i.max = "8", i.step = "0.1", i.value = String(((o = (a = this.currentClip) == null ? void 0 : a.visualTransform) == null ? void 0 : o.scale) ?? 1), i.style.flex = "1", i.style.height = "4px", i.addEventListener("input", (c) => {
10250
10311
  const d = parseFloat(c.target.value);
10251
10312
  this.handleTransformChange("scale", d);
10252
10313
  }), e.appendChild(i);
10253
10314
  const n = document.createElement("input");
10254
- n.type = "number", n.className = st.input, n.min = "0.1", n.max = "8", n.step = "0.1", n.value = String(((h = (l = this.currentClip) == null ? void 0 : l.visualTransform) == null ? void 0 : h.scale) ?? 1), n.style.width = "60px", n.style.padding = "4px 6px", n.style.border = `1px solid ${this.theme.inputBorder}`, n.style.borderRadius = "4px", n.style.fontSize = "12px", n.style.backgroundColor = this.theme.inputBackground, n.style.color = this.theme.textColor, n.addEventListener("change", (c) => {
10315
+ n.type = "number", n.className = $.input, n.min = "0.1", n.max = "8", n.step = "0.1", n.value = String(((h = (l = this.currentClip) == null ? void 0 : l.visualTransform) == null ? void 0 : h.scale) ?? 1), n.style.width = "60px", n.style.padding = "4px 6px", n.style.border = `1px solid ${this.theme.inputBorder}`, n.style.borderRadius = "4px", n.style.fontSize = "12px", n.style.backgroundColor = this.theme.inputBackground, n.style.color = this.theme.textColor, n.addEventListener("change", (c) => {
10255
10316
  const d = parseFloat(c.target.value);
10256
10317
  this.handleTransformChange("scale", d);
10257
10318
  }), e.appendChild(n);
10258
10319
  const s = document.createElement("button");
10259
- s.className = st.resetButton, s.textContent = "重置", s.style.padding = "4px 8px", s.style.border = `1px solid ${this.theme.buttonBorder}`, s.style.borderRadius = "4px", s.style.background = this.theme.buttonBackground, s.style.fontSize = "11px", s.style.cursor = "pointer", s.style.color = this.theme.textColor, s.addEventListener("click", () => {
10320
+ s.className = $.resetButton, s.textContent = "重置", s.style.padding = "4px 8px", s.style.border = `1px solid ${this.theme.buttonBorder}`, s.style.borderRadius = "4px", s.style.background = this.theme.buttonBackground, s.style.fontSize = "11px", s.style.cursor = "pointer", s.style.color = this.theme.textColor, s.addEventListener("click", () => {
10260
10321
  this.handleTransformChange("scale", 1);
10261
10322
  }), e.appendChild(s), this.scaleSlider = i, this.scaleInput = n, t.appendChild(e);
10262
10323
  }
10324
+ renderVolumeControl(t) {
10325
+ var a, o;
10326
+ const e = document.createElement("div");
10327
+ e.className = $.row, e.style.display = "flex", e.style.alignItems = "center", e.style.gap = "8px";
10328
+ const i = document.createElement("input");
10329
+ i.type = "range", i.className = $.slider, i.min = "0", i.max = "1", i.step = "0.01", i.value = String(((a = this.currentClip) == null ? void 0 : a.volume) ?? 1), i.style.flex = "1", i.style.height = "4px", i.addEventListener("input", (l) => {
10330
+ const h = parseFloat(l.target.value);
10331
+ this.handleVolumeChange(h);
10332
+ }), e.appendChild(i);
10333
+ const n = document.createElement("input");
10334
+ n.type = "number", n.className = $.input, n.min = "0", n.max = "100", n.step = "1", n.value = String(Math.round((((o = this.currentClip) == null ? void 0 : o.volume) ?? 1) * 100)), n.style.width = "60px", n.style.padding = "4px 6px", n.style.border = `1px solid ${this.theme.inputBorder}`, n.style.borderRadius = "4px", n.style.fontSize = "12px", n.style.backgroundColor = this.theme.inputBackground, n.style.color = this.theme.textColor, n.addEventListener("change", (l) => {
10335
+ const h = parseFloat(l.target.value) / 100;
10336
+ this.handleVolumeChange(Math.max(0, Math.min(1, h)));
10337
+ }), e.appendChild(n);
10338
+ const s = document.createElement("span");
10339
+ s.style.fontSize = "12px", s.style.color = this.theme.labelColor, s.textContent = "%", e.appendChild(s), this.volumeSlider = i, this.volumeInput = n, t.appendChild(e);
10340
+ }
10341
+ handleVolumeChange(t) {
10342
+ if (!this.currentClip || !this.onClipUpdate) return;
10343
+ const e = Math.max(0, Math.min(1, t));
10344
+ this.currentClip = { ...this.currentClip, volume: e }, this.updateVolumeControls(), this.onClipUpdate(this.currentClip.id, { volume: e });
10345
+ }
10346
+ updateVolumeControls() {
10347
+ var e;
10348
+ const t = ((e = this.currentClip) == null ? void 0 : e.volume) ?? 1;
10349
+ this.volumeSlider && (this.volumeSlider.value = String(t)), this.volumeInput && (this.volumeInput.value = String(Math.round(t * 100)));
10350
+ }
10263
10351
  clampValue(t, e) {
10264
10352
  return t === "scale" ? Math.max(0.1, Math.min(8, e)) : e;
10265
10353
  }
@@ -10281,9 +10369,6 @@ class Po {
10281
10369
  const i = { ...this.currentClip.visualTransform ?? { x: 0.5, y: 0.5, scale: 1 } };
10282
10370
  t.x !== void 0 && (i.x = this.clampValue("x", t.x)), t.y !== void 0 && (i.y = this.clampValue("y", t.y)), t.scale !== void 0 && (i.scale = this.clampValue("scale", t.scale)), this.currentClip = { ...this.currentClip, visualTransform: i }, this.updateUIControls(), this.onClipUpdate(this.currentClip.id, { visualTransform: i });
10283
10371
  }
10284
- applyTheme() {
10285
- this.rootElement && (this.rootElement.style.backgroundColor = this.theme.backgroundColor, this.rootElement.style.border = `1px solid ${this.theme.borderColor}`, this.rootElement.style.borderRadius = "4px", this.rootElement.style.padding = "12px", this.rootElement.style.color = this.theme.textColor, this.rootElement.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', this.rootElement.style.fontSize = "13px");
10286
- }
10287
10372
  }
10288
10373
  class gn {
10289
10374
  constructor(t) {
@@ -10880,7 +10965,7 @@ class mn {
10880
10965
  e && (n = this.target.ensureTrackFromHistorySnapshot(e)), n && this.target.moveClipToTrack(t, n), this.target.updateClip(t, i);
10881
10966
  }
10882
10967
  }
10883
- const xo = [
10968
+ const Eo = [
10884
10969
  "type",
10885
10970
  "externalId",
10886
10971
  "src",
@@ -10897,8 +10982,8 @@ const xo = [
10897
10982
  "visualTransform",
10898
10983
  "separatedAudioClipId",
10899
10984
  "separatedFromVideoClipId"
10900
- ], Eo = /* @__PURE__ */ new Set(["thumbnails"]);
10901
- function Ao(r, t) {
10985
+ ], Ao = /* @__PURE__ */ new Set(["thumbnails"]);
10986
+ function Lo(r, t) {
10902
10987
  return Object.is(r, t) ? !0 : r === void 0 || t === void 0 ? !1 : typeof r == "object" && typeof t == "object" ? JSON.stringify(r) === JSON.stringify(t) : !1;
10903
10988
  }
10904
10989
  class yn {
@@ -10969,34 +11054,34 @@ class yn {
10969
11054
  e.startTime
10970
11055
  );
10971
11056
  const a = {}, o = {};
10972
- return xo.forEach((h) => {
10973
- Ao(t[h], e[h]) || (a[h] = t[h], o[h] = e[h]);
10974
- }), Object.keys(a).length === 0 || Object.keys(a).every((h) => Eo.has(h)) ? null : this.history.createUpdateClipAction(t.id, a, o);
11057
+ return Eo.forEach((h) => {
11058
+ Lo(t[h], e[h]) || (a[h] = t[h], o[h] = e[h]);
11059
+ }), Object.keys(a).length === 0 || Object.keys(a).every((h) => Ao.has(h)) ? null : this.history.createUpdateClipAction(t.id, a, o);
10975
11060
  }
10976
11061
  }
10977
11062
  function ri(r) {
10978
11063
  r.notifySelectionChange(), r.emitSelectedClipChangeIfNeeded(), r.handleClipChange();
10979
11064
  }
10980
- function Lo(r) {
11065
+ function Mo(r) {
10981
11066
  var t, e;
10982
11067
  r.notifySelectionChange(), (t = r.reloadClipThumbnailsIfNeeded) == null || t.call(r), (e = r.checkTrackDurationChange) == null || e.call(r), r.emitSelectedClipChangeIfNeeded(), r.handleClipChange();
10983
11068
  }
10984
- function Mo(r, t, e = !1) {
11069
+ function Ro(r, t, e = !1) {
10985
11070
  if (!t || !e || r.type === "audio")
10986
11071
  return !1;
10987
11072
  const i = t.duration !== r.duration, n = t.startTimeAtSource !== r.startTimeAtSource || t.endTimeAtSource !== r.endTimeAtSource;
10988
11073
  return i || n;
10989
11074
  }
10990
- function Ro(r, t) {
11075
+ function Io(r, t) {
10991
11076
  if (r.length === 0)
10992
11077
  return !1;
10993
11078
  const e = Math.max(...r.map((i) => i.endTime));
10994
11079
  return t < e;
10995
11080
  }
10996
- function Io(r) {
11081
+ function Do(r) {
10997
11082
  return r.currentCanPlay === r.nextCanPlay ? r.currentCanPlay : (r.setCanPlay(r.nextCanPlay), r.currentCanPlay && !r.nextCanPlay && r.playState === "playing" && (r.pauseTimeline(), r.setCurrentTime(r.clipEndTime || 1)), r.emitCanPlayChange(r.nextCanPlay), r.nextCanPlay);
10998
11083
  }
10999
- function Do(r) {
11084
+ function Go(r) {
11000
11085
  const t = !r.id && r.startTime > 0;
11001
11086
  return {
11002
11087
  shouldJumpToTime: t,
@@ -11008,7 +11093,7 @@ function Fe(r) {
11008
11093
  var t;
11009
11094
  return r.applied ? (r.isExecutingHistoryAction || (t = r.recordHistory) == null || t.call(r), r.applyEffects(), !0) : !1;
11010
11095
  }
11011
- function Go(r) {
11096
+ function Oo(r) {
11012
11097
  return Fe({
11013
11098
  applied: r.applied,
11014
11099
  isExecutingHistoryAction: r.isExecutingHistoryAction,
@@ -11028,7 +11113,7 @@ function Go(r) {
11028
11113
  applyEffects: r.applyEffects
11029
11114
  });
11030
11115
  }
11031
- function Oo(r) {
11116
+ function Bo(r) {
11032
11117
  var t;
11033
11118
  r.isExecutingHistoryAction || (t = r.recordSplitClip) == null || t.call(r, r.clip1, r.clip2), r.emitClipUpdated(r.clip1), r.emitClipAdded(r.clip2), r.applyEffects();
11034
11119
  }
@@ -11036,18 +11121,18 @@ const ai = {
11036
11121
  x: 0.5,
11037
11122
  y: 0.5,
11038
11123
  scale: 1
11039
- }, Bo = 0.1, Ho = 8;
11124
+ }, Ho = 0.1, zo = 8;
11040
11125
  function oi(r, t) {
11041
11126
  return typeof r == "number" && Number.isFinite(r) ? r : t;
11042
11127
  }
11043
- function zo(r) {
11044
- return Math.min(Ho, Math.max(Bo, r));
11128
+ function No(r) {
11129
+ return Math.min(zo, Math.max(Ho, r));
11045
11130
  }
11046
11131
  function ut(r) {
11047
11132
  return {
11048
11133
  x: oi(r == null ? void 0 : r.x, ai.x),
11049
11134
  y: oi(r == null ? void 0 : r.y, ai.y),
11050
- scale: zo(oi(r == null ? void 0 : r.scale, ai.scale))
11135
+ scale: No(oi(r == null ? void 0 : r.scale, ai.scale))
11051
11136
  };
11052
11137
  }
11053
11138
  function ps(r, t, e = 1e-4) {
@@ -11088,7 +11173,7 @@ function Sn(r, t, e) {
11088
11173
  centerY: l
11089
11174
  };
11090
11175
  }
11091
- function No(r, t, e, i) {
11176
+ function Fo(r, t, e, i) {
11092
11177
  const n = ut(r), s = i.width > 0 ? i.width : 1, a = i.height > 0 ? i.height : 1;
11093
11178
  return ut({
11094
11179
  x: n.x + t / s,
@@ -11096,7 +11181,7 @@ function No(r, t, e, i) {
11096
11181
  scale: n.scale
11097
11182
  });
11098
11183
  }
11099
- function Fo(r, t, e, i, n, s) {
11184
+ function Vo(r, t, e, i, n, s) {
11100
11185
  const a = ut(s), o = Math.max(n.width / 2, 1), l = Math.max(n.height / 2, 1), h = Math.abs(e - r) / o, c = Math.abs(i - t) / l;
11101
11186
  return ut({
11102
11187
  x: a.x,
@@ -11223,7 +11308,7 @@ class Wo {
11223
11308
  const i = this.toLocalPoint(e);
11224
11309
  let n = this.interaction.startTransform;
11225
11310
  if (this.interaction.mode === "move")
11226
- n = No(
11311
+ n = Fo(
11227
11312
  this.interaction.startTransform,
11228
11313
  i.x - this.interaction.pointerStart.x,
11229
11314
  i.y - this.interaction.pointerStart.y,
@@ -11231,7 +11316,7 @@ class Wo {
11231
11316
  );
11232
11317
  else {
11233
11318
  const l = this.interaction.startTransform.x * this.interaction.frameSize.width, h = this.interaction.startTransform.y * this.interaction.frameSize.height;
11234
- n = Fo(
11319
+ n = Vo(
11235
11320
  l,
11236
11321
  h,
11237
11322
  i.x,
@@ -11297,14 +11382,14 @@ class Wo {
11297
11382
  e && (e.style.cursor = t || "");
11298
11383
  }
11299
11384
  }
11300
- function Vo(r, t) {
11385
+ function Yo(r, t) {
11301
11386
  return !ge(r.mode) || !t ? r : {
11302
11387
  mode: vt.mode,
11303
11388
  width: t.width,
11304
11389
  height: t.height
11305
11390
  };
11306
11391
  }
11307
- function Yo(r) {
11392
+ function Xo(r) {
11308
11393
  return r.getAttribute("src") || r.currentSrc || r.src || "";
11309
11394
  }
11310
11395
  function Tn(r) {
@@ -11322,7 +11407,7 @@ function jt(r) {
11322
11407
  } catch {
11323
11408
  }
11324
11409
  }
11325
- function Xo(r) {
11410
+ function Uo(r) {
11326
11411
  var t;
11327
11412
  try {
11328
11413
  const e = r.play();
@@ -11348,7 +11433,7 @@ function bn(r) {
11348
11433
  const t = Number.parseFloat(r);
11349
11434
  return Number.isFinite(t) ? t : 0;
11350
11435
  }
11351
- class Uo {
11436
+ class $o {
11352
11437
  constructor(t = {}, e = {}) {
11353
11438
  f(this, "container", null);
11354
11439
  f(this, "rootElement", null);
@@ -11437,7 +11522,7 @@ class Uo {
11437
11522
  this.requestedAspectRatio = Ht(t), this.updateFrameLayout();
11438
11523
  }
11439
11524
  getAspectRatio() {
11440
- return Vo(this.requestedAspectRatio, this.resolvedAutoAspectRatio);
11525
+ return Yo(this.requestedAspectRatio, this.resolvedAutoAspectRatio);
11441
11526
  }
11442
11527
  createMediaElement(t, e) {
11443
11528
  const i = this.dependencies.createMediaElement, n = i ? i(t, e) : document.createElement(t === "video" ? "video" : "audio");
@@ -11515,7 +11600,7 @@ class Uo {
11515
11600
  }
11516
11601
  assignClipToSlot(t, e) {
11517
11602
  t.entry = e, t.isActive = t.role === "current";
11518
- const i = e.clip.src, n = t.attachedSrc || Yo(t.element);
11603
+ const i = e.clip.src, n = t.attachedSrc || Xo(t.element);
11519
11604
  (t.attachedClipId !== e.clip.id || n !== i) && (t.attachedClipId = e.clip.id, t.attachedSrc = i, t.isLoading = !0, t.isBuffering = !1, t.element.setAttribute("src", i), ae(t.element)), this.configureAudioRouting(t, e);
11520
11605
  }
11521
11606
  configureAudioRouting(t, e) {
@@ -11540,13 +11625,7 @@ class Uo {
11540
11625
  syncCurrentSlot(t, e, i, n) {
11541
11626
  t.isActive = !0, t.entry = e, t.element.playbackRate = i;
11542
11627
  const s = e.mediaTime / 1e3, a = Math.max(0.1, i * 0.15);
11543
- if (Math.abs(t.element.currentTime - s) > a)
11544
- t.isSeeking = !0, t.isBuffering = !0, vn(t.element, s);
11545
- else {
11546
- const l = t.element.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA;
11547
- t.isBuffering = !l;
11548
- }
11549
- this.refreshBufferingState(), n === "playing" ? (this.resumeAudioContext(), Xo(t.element)) : jt(t.element), this.setSlotVisible(t, e.hasVisual, 1e3 - e.trackOrder);
11628
+ Math.abs(t.element.currentTime - s) > a && (t.isSeeking = !0, t.isBuffering = !0, vn(t.element, s), this.refreshBufferingState()), n === "playing" ? (this.resumeAudioContext(), Uo(t.element)) : jt(t.element), this.setSlotVisible(t, e.hasVisual, 1e3 - e.trackOrder);
11550
11629
  }
11551
11630
  preparePreloadSlot(t, e) {
11552
11631
  if (t.isActive = !1, t.isBuffering = !1, t.isSeeking = !1, !e) {
@@ -11733,22 +11812,22 @@ class Uo {
11733
11812
  return ((e = this.transientVisualTransform) == null ? void 0 : e.clipId) === t.clip.id ? this.transientVisualTransform.transform : ut(t.clip.visualTransform);
11734
11813
  }
11735
11814
  }
11736
- class $o extends Uo {
11815
+ class qo extends $o {
11737
11816
  destroy() {
11738
11817
  this.detach();
11739
11818
  }
11740
11819
  }
11741
- function qo(r) {
11820
+ function Ko(r) {
11742
11821
  return "dom";
11743
11822
  }
11744
- const Ko = 36e5, jo = 3e5;
11823
+ const jo = 36e5, Zo = 3e5;
11745
11824
  function ys(r) {
11746
11825
  return r.length === 0 ? 0 : r.reduce((t, e) => Math.max(t, e.startTime + e.duration), 0);
11747
11826
  }
11748
11827
  function Ss(r) {
11749
- return Math.max(r + jo, Ko);
11828
+ return Math.max(r + Zo, jo);
11750
11829
  }
11751
- function Zo(r) {
11830
+ function Jo(r) {
11752
11831
  const t = ys(r.clips);
11753
11832
  return t === r.lastTrackDuration ? r.lastTrackDuration : (r.setLastTrackDuration(t), r.setTimelineDuration(Ss(t)), r.emitTrackDurationChange(t), t);
11754
11833
  }
@@ -11778,10 +11857,10 @@ class wn {
11778
11857
  this.listeners.clear();
11779
11858
  }
11780
11859
  }
11781
- function Jo(r) {
11860
+ function Qo(r) {
11782
11861
  return [...r].sort((t, e) => t.order - e.order);
11783
11862
  }
11784
- function Qo(r) {
11863
+ function tl(r) {
11785
11864
  return [...r].sort((t, e) => t.startTime - e.startTime);
11786
11865
  }
11787
11866
  function li(r, t, e) {
@@ -11797,15 +11876,15 @@ function li(r, t, e) {
11797
11876
  hasAudio: !0
11798
11877
  };
11799
11878
  }
11800
- class tl {
11879
+ class el {
11801
11880
  resolveActiveClipsAtTime(t, e) {
11802
11881
  return this.resolvePlaybackPlan(t, e).activeClips;
11803
11882
  }
11804
11883
  resolvePlaybackPlan(t, e) {
11805
- const i = Jo(t), n = [], s = [];
11884
+ const i = Qo(t), n = [], s = [];
11806
11885
  let a = null;
11807
11886
  for (const o of i) {
11808
- const l = Qo(o.clips), h = l.find((d) => e >= d.startTime && e < d.endTime);
11887
+ const l = tl(o.clips), h = l.find((d) => e >= d.startTime && e < d.endTime);
11809
11888
  if (h) {
11810
11889
  const d = h.startTimeAtSource + (e - h.startTime);
11811
11890
  n.push(li(o, h, d));
@@ -11823,7 +11902,7 @@ class tl {
11823
11902
  };
11824
11903
  }
11825
11904
  }
11826
- function el(r) {
11905
+ function il(r) {
11827
11906
  var e;
11828
11907
  const t = r.getSelectedClip() || ((e = r.findFallbackSelectedClip) == null ? void 0 : e.call(r)) || null;
11829
11908
  return {
@@ -11831,7 +11910,7 @@ function el(r) {
11831
11910
  hasSelectedClip: !!t
11832
11911
  };
11833
11912
  }
11834
- function il(r) {
11913
+ function nl(r) {
11835
11914
  var i;
11836
11915
  const t = r.resolveSelectedClip(), e = ((i = t.clip) == null ? void 0 : i.id) || null;
11837
11916
  return e === r.lastSelectedClipId ? r.lastSelectedClipId : (r.emitSelectedClipChange(t), e);
@@ -11840,23 +11919,23 @@ function Cs(r, t) {
11840
11919
  var e, i, n, s;
11841
11920
  return ((i = (e = r.findById(t)) == null ? void 0 : e.getId) == null ? void 0 : i.call(e)) || ((s = (n = r.getLastTrack()) == null ? void 0 : n.getId) == null ? void 0 : s.call(n)) || t;
11842
11921
  }
11843
- function nl(r) {
11922
+ function sl(r) {
11844
11923
  if (r.placement.status === "use_existing_track")
11845
11924
  return r.trackCollection.addClipToTrack(r.placement.trackId, r.clip);
11846
11925
  const t = r.createTrack(r.placement.trackType, r.placement.suggestedTrackName), e = Cs(r.trackCollection, t);
11847
11926
  return e ? r.trackCollection.addClipToTrack(e, r.clip) : !1;
11848
11927
  }
11849
- function sl(r, t, e) {
11928
+ function rl(r, t, e) {
11850
11929
  return t.trackId ? r.removeClipFromTrack(t.trackId, e) : !1;
11851
11930
  }
11852
- function rl(r) {
11931
+ function al(r) {
11853
11932
  return r.trackCollection.moveClipToTrack(
11854
11933
  r.command.clip,
11855
11934
  r.command.sourceTrackId,
11856
11935
  r.command.targetTrackId
11857
11936
  );
11858
11937
  }
11859
- function al(r) {
11938
+ function ol(r) {
11860
11939
  const t = r.createTrack(r.trackType, r.trackName), e = Cs(r.trackCollection, t);
11861
11940
  return e ? r.trackCollection.moveClipToTrack(r.clip, r.currentTrackId, e) : !1;
11862
11941
  }
@@ -11864,11 +11943,11 @@ function Bt(r) {
11864
11943
  var t, e, i, n;
11865
11944
  (t = r.checkTrackDurationChange) == null || t.call(r), (e = r.updateCanPlayState) == null || e.call(r), (i = r.updateTrackInfoPanel) == null || i.call(r), (n = r.handleClipChange) == null || n.call(r);
11866
11945
  }
11867
- function ol(r) {
11946
+ function ll(r) {
11868
11947
  var t, e;
11869
11948
  r.notifySelectionChange(), (t = r.cleanupEmptyTracks) == null || t.call(r), r.updateTrackInfoPanel(), (e = r.batchDraw) == null || e.call(r), r.syncPreviewSession();
11870
11949
  }
11871
- class ll {
11950
+ class hl {
11872
11951
  constructor() {
11873
11952
  f(this, "panel", null);
11874
11953
  }
@@ -11987,7 +12066,7 @@ class _n {
11987
12066
  );
11988
12067
  }
11989
12068
  }
11990
- class hl {
12069
+ class cl {
11991
12070
  constructor(t) {
11992
12071
  this.tracks = t;
11993
12072
  }
@@ -12109,7 +12188,7 @@ class hl {
12109
12188
  return typeof t.getId == "function" ? t.getId() : typeof t.id == "string" ? t.id : null;
12110
12189
  }
12111
12190
  }
12112
- class cl {
12191
+ class dl {
12113
12192
  constructor(t = []) {
12114
12193
  f(this, "tracks", []);
12115
12194
  f(this, "trackCounter", 0);
@@ -12212,7 +12291,7 @@ function oe(r, t, e) {
12212
12291
  function Pn(r, t) {
12213
12292
  return r.reduce((e, i) => e + Ft(i.type), t);
12214
12293
  }
12215
- function dl(r, t) {
12294
+ function ul(r, t) {
12216
12295
  let e = t;
12217
12296
  return r.map((i) => {
12218
12297
  const n = Ft(i.type), s = {
@@ -12224,7 +12303,7 @@ function dl(r, t) {
12224
12303
  });
12225
12304
  }
12226
12305
  const Ts = 200, vs = 8, xn = "timeline-manager-managed-layout-styles";
12227
- function ul() {
12306
+ function fl() {
12228
12307
  if (typeof document > "u" || document.getElementById(xn))
12229
12308
  return;
12230
12309
  const r = document.createElement("style");
@@ -12256,8 +12335,8 @@ function ul() {
12256
12335
  }
12257
12336
  `, document.head.appendChild(r);
12258
12337
  }
12259
- function fl(r, t) {
12260
- ul();
12338
+ function gl(r, t) {
12339
+ fl();
12261
12340
  const e = t.leftPanelWidth ?? Ts, i = t.scrollbarSize ?? vs;
12262
12341
  r.innerHTML = "", r.classList.add("timeline-manager-root"), r.style.gridTemplateColumns = `${e}px minmax(0, 1fr)`, r.style.gridTemplateRows = `${t.timeScaleHeight}px minmax(0, 1fr)`, r.style.background = t.theme.background;
12263
12342
  const n = Ct("div");
@@ -12295,7 +12374,7 @@ function Ct(r) {
12295
12374
  function He(r, t) {
12296
12375
  r.style.position = "relative", r.style.minWidth = "0", r.style.minHeight = "0", r.style.maxWidth = "100%", r.style.boxSizing = "border-box", r.style.background = t.background, r.style.color = t.clipName;
12297
12376
  }
12298
- class gl {
12377
+ class pl {
12299
12378
  constructor(t) {
12300
12379
  f(this, "currentTime");
12301
12380
  f(this, "playState");
@@ -12321,7 +12400,7 @@ class gl {
12321
12400
  this.speed = t;
12322
12401
  }
12323
12402
  }
12324
- class pl {
12403
+ class ml {
12325
12404
  constructor() {
12326
12405
  f(this, "selectedClipId", null);
12327
12406
  }
@@ -12338,7 +12417,7 @@ class pl {
12338
12417
  return this.selectedClipId !== null;
12339
12418
  }
12340
12419
  }
12341
- class ml {
12420
+ class yl {
12342
12421
  constructor(t) {
12343
12422
  f(this, "zoom");
12344
12423
  f(this, "duration");
@@ -12397,11 +12476,11 @@ class En {
12397
12476
  f(this, "selectionStore");
12398
12477
  f(this, "playbackStore");
12399
12478
  f(this, "viewportStore");
12400
- this.selectionStore = new pl(), this.playbackStore = new gl({
12479
+ this.selectionStore = new ml(), this.playbackStore = new pl({
12401
12480
  currentTime: t.currentTime,
12402
12481
  playState: t.playState,
12403
12482
  speed: t.speed
12404
- }), this.viewportStore = new ml({
12483
+ }), this.viewportStore = new yl({
12405
12484
  zoom: t.zoom,
12406
12485
  duration: t.duration,
12407
12486
  scrollLeft: t.scrollLeft,
@@ -12484,7 +12563,7 @@ class En {
12484
12563
  this.viewportStore.setContentHeight(t);
12485
12564
  }
12486
12565
  }
12487
- class yl {
12566
+ class Sl {
12488
12567
  constructor(t, e, i, n, s) {
12489
12568
  f(this, "stage");
12490
12569
  f(this, "layer");
@@ -12514,7 +12593,7 @@ class yl {
12514
12593
  currentTime: i.currentTime || 0,
12515
12594
  playState: i.playState || "paused",
12516
12595
  container: i.container,
12517
- theme: We(i.theme),
12596
+ theme: Ve(i.theme),
12518
12597
  timeScaleHeight: i.timeScaleHeight
12519
12598
  }, this.theme = this.config.theme, this.timeScaleHeight = i.timeScaleHeight || 40, this.initEventListeners(), this.render();
12520
12599
  }
@@ -12554,7 +12633,7 @@ class yl {
12554
12633
  }
12555
12634
  initEventListeners() {
12556
12635
  this.stage.on("click", (t) => {
12557
- t.target.getLayer() === this.layer && this.onTimeChange(this.pixelToTime(t.evt.offsetX));
12636
+ t.target.getLayer() === this.layer && this.onTimeChange(this.pixelToTime(t.evt.offsetX), "seek");
12558
12637
  }), this.stage.on("mousedown", (t) => {
12559
12638
  t.target.getLayer() === this.layer && (this.updatePointerPosition(t.evt.offsetX), this.isPointerInsideTimeline = !0, this.isDragging = !0, this.dragStartX = t.evt.clientX, this.bindGlobalPointerListenersForDrag());
12560
12639
  }), this.stage.on("mousemove", (t) => {
@@ -12599,7 +12678,7 @@ class yl {
12599
12678
  if (i)
12600
12679
  i.width(t), i.height(e), i.fill(this.theme.background), i.stroke(this.theme.border);
12601
12680
  else {
12602
- const n = et.createRect(0, 0, t, e, this.theme.background, this.theme.border, 1);
12681
+ const n = it.createRect(0, 0, t, e, this.theme.background, this.theme.border, 1);
12603
12682
  n.name("timeline-header-background"), this.layer.add(n);
12604
12683
  }
12605
12684
  this.layer.find(".time-tick-line").forEach((n) => n.remove()), this.layer.find(".time-tick-text").forEach((n) => n.remove()), this.renderTimeTicks(), this.layer.batchDraw();
@@ -12608,7 +12687,7 @@ class yl {
12608
12687
  const t = this.stage.width(), e = this.scrollLeft, i = this.scrollLeft + t, n = O.pixelsToTime(e, this.config.zoom), s = O.pixelsToTime(i, this.config.zoom), a = O.msToSeconds(n), o = O.msToSeconds(s), { majorStep: l, minorStep: h } = O.getTickConfig(this.config.zoom), c = O.generateVisibleTicks(a - 10, o + 10, l, h);
12609
12688
  for (const d of c) {
12610
12689
  const u = this.timeToPixel(d.time);
12611
- u >= -20 && u <= t + 20 && et.drawTimeTick(
12690
+ u >= -20 && u <= t + 20 && it.drawTimeTick(
12612
12691
  this.layer,
12613
12692
  u,
12614
12693
  0,
@@ -12628,7 +12707,7 @@ class yl {
12628
12707
  return Math.max(0, Math.min(e, t));
12629
12708
  }
12630
12709
  }
12631
- class Sl {
12710
+ class Cl {
12632
12711
  constructor(t, e, i, n, s, a) {
12633
12712
  f(this, "container");
12634
12713
  f(this, "lineElement");
@@ -12653,7 +12732,10 @@ class Sl {
12653
12732
  f(this, "handleMouseDown", (t) => {
12654
12733
  t.preventDefault(), t.stopPropagation(), this.isDragging = !0, this.bindGlobalPointerListeners();
12655
12734
  });
12656
- this.container = t, this.currentTime = e, this.zoom = i, this.height = n, this.theme = s, this.onTimeChange = a, this.container.innerHTML = "", this.container.style.position = "absolute", this.container.style.pointerEvents = "none", this.lineElement = document.createElement("div"), this.lineElement.className = "timeline-manager-playhead-line", this.lineElement.style.position = "absolute", this.lineElement.style.top = "0", this.lineElement.style.width = "1px", this.lineElement.style.background = this.theme.playhead, this.lineElement.style.pointerEvents = "none", this.handleElement = document.createElement("div"), this.handleElement.className = "timeline-manager-playhead-handle", this.handleElement.style.position = "absolute", this.handleElement.style.top = "0", this.handleElement.style.width = "18px", this.handleElement.style.height = "12px", this.handleElement.style.marginLeft = "-9px", this.handleElement.style.background = this.theme.playhead, this.handleElement.style.clipPath = "polygon(50% 100%, 0 0, 100% 0)", this.handleElement.style.cursor = "ew-resize", this.handleElement.style.pointerEvents = "auto", this.container.appendChild(this.lineElement), this.container.appendChild(this.handleElement), this.handleElement.addEventListener("mousedown", this.handleMouseDown), this.render();
12735
+ f(this, "handleHandleClick", (t) => {
12736
+ t.preventDefault(), t.stopPropagation();
12737
+ });
12738
+ this.container = t, this.currentTime = e, this.zoom = i, this.height = n, this.theme = s, this.onTimeChange = a, this.container.innerHTML = "", this.container.style.position = "absolute", this.container.style.pointerEvents = "none", this.lineElement = document.createElement("div"), this.lineElement.className = "timeline-manager-playhead-line", this.lineElement.style.position = "absolute", this.lineElement.style.top = "0", this.lineElement.style.width = "1px", this.lineElement.style.background = this.theme.playhead, this.lineElement.style.pointerEvents = "none", this.handleElement = document.createElement("div"), this.handleElement.className = "timeline-manager-playhead-handle", this.handleElement.style.position = "absolute", this.handleElement.style.top = "0", this.handleElement.style.width = "18px", this.handleElement.style.height = "12px", this.handleElement.style.marginLeft = "-9px", this.handleElement.style.background = this.theme.playhead, this.handleElement.style.clipPath = "polygon(50% 100%, 0 0, 100% 0)", this.handleElement.style.cursor = "ew-resize", this.handleElement.style.pointerEvents = "auto", this.container.appendChild(this.lineElement), this.container.appendChild(this.handleElement), this.handleElement.addEventListener("mousedown", this.handleMouseDown), this.handleElement.addEventListener("click", this.handleHandleClick), this.render();
12657
12739
  }
12658
12740
  setCurrentTime(t) {
12659
12741
  this.currentTime = Math.max(0, t), this.render();
@@ -12671,7 +12753,7 @@ class Sl {
12671
12753
  this.height = Math.max(0, t), this.render();
12672
12754
  }
12673
12755
  destroy() {
12674
- this.handleElement.removeEventListener("mousedown", this.handleMouseDown), this.unbindGlobalPointerListeners(), this.container.innerHTML = "";
12756
+ this.handleElement.removeEventListener("mousedown", this.handleMouseDown), this.handleElement.removeEventListener("click", this.handleHandleClick), this.unbindGlobalPointerListeners(), this.container.innerHTML = "";
12675
12757
  }
12676
12758
  bindGlobalPointerListeners() {
12677
12759
  this.hasBoundGlobalPointerListeners || (this.hasBoundGlobalPointerListeners = we({
@@ -12689,7 +12771,7 @@ class Sl {
12689
12771
  }
12690
12772
  updateTimeFromClientX(t) {
12691
12773
  const e = this.container.getBoundingClientRect(), i = t - e.left, n = O.pixelsToTime(i - at + this.scrollLeft, this.zoom);
12692
- this.onTimeChange(Math.max(0, n));
12774
+ this.onTimeChange(Math.max(0, n), "scrub");
12693
12775
  }
12694
12776
  render() {
12695
12777
  const t = O.timeToPixels(this.currentTime, this.zoom) - this.scrollLeft + at, e = t >= 0 && t <= this.container.clientWidth;
@@ -12746,7 +12828,7 @@ class An {
12746
12828
  container: this.container,
12747
12829
  width: this.container.clientWidth,
12748
12830
  height: this.container.clientHeight
12749
- }), this.layer = new X.Layer(), this.layer.name("scrollbar-layer"), this.stage.add(this.layer), this.hitAreaRect = et.createRect(0, 0, 0, 0, "rgba(0, 0, 0, 0.001)", "transparent", 0), this.hitAreaRect.name("scrollbar-hit-area"), this.thumbRect = et.createRect(0, 0, 0, 0, this.theme.scrollbarThumb || "#444444", this.theme.scrollbarThumbBorder || this.theme.scrollbarBorder || "#555555", 1), this.thumbRect.name("scrollbar-thumb"), this.thumbRect.cornerRadius(999), this.layer.add(this.hitAreaRect), this.layer.add(this.thumbRect), this.stage.on("mousedown", this.handleStageMouseDown), this.stage.on("mouseup", this.handleStageMouseUp), this.stage.on("mouseenter", this.handleStageMouseEnter), this.stage.on("mousemove", this.handleStageMouseMove), this.stage.on("mouseleave", this.handleStageMouseLeave), this.render();
12831
+ }), this.layer = new X.Layer(), this.layer.name("scrollbar-layer"), this.stage.add(this.layer), this.hitAreaRect = it.createRect(0, 0, 0, 0, "rgba(0, 0, 0, 0.001)", "transparent", 0), this.hitAreaRect.name("scrollbar-hit-area"), this.thumbRect = it.createRect(0, 0, 0, 0, this.theme.scrollbarThumb || "#444444", this.theme.scrollbarThumbBorder || this.theme.scrollbarBorder || "#555555", 1), this.thumbRect.name("scrollbar-thumb"), this.thumbRect.cornerRadius(999), this.layer.add(this.hitAreaRect), this.layer.add(this.thumbRect), this.stage.on("mousedown", this.handleStageMouseDown), this.stage.on("mouseup", this.handleStageMouseUp), this.stage.on("mouseenter", this.handleStageMouseEnter), this.stage.on("mousemove", this.handleStageMouseMove), this.stage.on("mouseleave", this.handleStageMouseLeave), this.render();
12750
12832
  }
12751
12833
  setViewportMetrics(t, e) {
12752
12834
  this.viewportSize = Math.max(0, t), this.contentSize = Math.max(0, e), this.scrollOffset = this.clampScrollOffset(this.scrollOffset), this.render();
@@ -12833,7 +12915,7 @@ class An {
12833
12915
  return this.scrollOffset / i * n;
12834
12916
  }
12835
12917
  }
12836
- class Cl {
12918
+ class Tl {
12837
12919
  constructor() {
12838
12920
  f(this, "entries", /* @__PURE__ */ new Map());
12839
12921
  }
@@ -12849,7 +12931,7 @@ class Cl {
12849
12931
  this.entries.clear();
12850
12932
  }
12851
12933
  }
12852
- class Tl {
12934
+ class vl {
12853
12935
  constructor() {
12854
12936
  f(this, "panel", null);
12855
12937
  f(this, "config", null);
@@ -12858,7 +12940,7 @@ class Tl {
12858
12940
  init(t) {
12859
12941
  this.config = t;
12860
12942
  const e = this.convertTheme(t.theme);
12861
- this.panel = new Po({
12943
+ this.panel = new xo({
12862
12944
  container: t.container,
12863
12945
  theme: e,
12864
12946
  onClipUpdate: (i, n) => {
@@ -12896,10 +12978,10 @@ class Tl {
12896
12978
  };
12897
12979
  }
12898
12980
  }
12899
- const vl = "2.0.0", bl = {
12900
- version: vl
12901
- }, wl = 1, kl = 2, _l = 8e3;
12902
- class Rl {
12981
+ const bl = "2.0.1", wl = {
12982
+ version: bl
12983
+ }, kl = 1, _l = 2, Pl = 8e3;
12984
+ class Il {
12903
12985
  constructor(t = {}) {
12904
12986
  f(this, "timeline", null);
12905
12987
  f(this, "tracks", []);
@@ -12960,7 +13042,7 @@ class Rl {
12960
13042
  f(this, "rootWheelListener", (t) => {
12961
13043
  this.handleUnifiedWheel(t);
12962
13044
  });
12963
- f(this, "mountManager", new Cl());
13045
+ f(this, "mountManager", new Tl());
12964
13046
  f(this, "pendingDraftData", null);
12965
13047
  this.config = {
12966
13048
  duration: t.duration || 36e5,
@@ -12968,7 +13050,7 @@ class Rl {
12968
13050
  currentTime: t.currentTime || 0,
12969
13051
  playState: t.playState || "paused",
12970
13052
  container: t.container,
12971
- theme: We(t.theme),
13053
+ theme: Ve(t.theme),
12972
13054
  timeScaleHeight: t.timeScaleHeight,
12973
13055
  logConfig: t.logConfig,
12974
13056
  speed: t.speed || 1,
@@ -12978,7 +13060,7 @@ class Rl {
12978
13060
  thumbnailProvider: t.thumbnailProvider,
12979
13061
  previewBackend: t.previewBackend ?? "dom",
12980
13062
  previewSourceResolver: t.previewSourceResolver
12981
- }, R.setConfig(this.config.logConfig), R.debug("TimelineManager", "日志系统初始化完成", { logConfig: this.config.logConfig }), this.thumbnailProvider = t.thumbnailProvider || null, this.trackInfoPanelController = new ll(), this.eventDispatcher = new wn({
13063
+ }, R.setConfig(this.config.logConfig), R.debug("TimelineManager", "日志系统初始化完成", { logConfig: this.config.logConfig }), this.thumbnailProvider = t.thumbnailProvider || null, this.trackInfoPanelController = new hl(), this.eventDispatcher = new wn({
12982
13064
  can_play_change: () => ({ canPlay: this.canPlay }),
12983
13065
  selected_clip_change: () => this.resolveSelectedClipSnapshot(),
12984
13066
  source_loading_change: () => this.getSourceLoadingState(),
@@ -13003,7 +13085,7 @@ class Rl {
13003
13085
  findTrackByClipId: this.findTrackByClipId.bind(this),
13004
13086
  getDefaultTrack: () => this.getDefaultTrackForHistory(),
13005
13087
  loadClipThumbnails: this.loadClipThumbnails.bind(this)
13006
- }), this.trackManager = new cl(), this.timelineStore = new En({
13088
+ }), this.trackManager = new dl(), this.timelineStore = new En({
13007
13089
  currentTime: this.config.currentTime,
13008
13090
  playState: this.config.playState,
13009
13091
  speed: this.config.speed || 1,
@@ -13043,7 +13125,7 @@ class Rl {
13043
13125
  return this.timelineCommands || (this.timelineCommands = new gn(this.getTimelineStore())), this.timelineCommands;
13044
13126
  }
13045
13127
  getTrackCollection() {
13046
- return new hl(this.tracks);
13128
+ return new cl(this.tracks);
13047
13129
  }
13048
13130
  getTimelinePresentationAdapter() {
13049
13131
  return this.timelinePresentationAdapter || (this.timelinePresentationAdapter = new kn()), this.timelinePresentationAdapter;
@@ -13066,10 +13148,10 @@ class Rl {
13066
13148
  })), this.timelineTrackBridge;
13067
13149
  }
13068
13150
  getTimelinePlaybackResolver() {
13069
- return this.timelinePlaybackResolver || (this.timelinePlaybackResolver = new tl()), this.timelinePlaybackResolver;
13151
+ return this.timelinePlaybackResolver || (this.timelinePlaybackResolver = new el()), this.timelinePlaybackResolver;
13070
13152
  }
13071
13153
  resolveConfiguredPreviewBackend() {
13072
- return this.runtimePreviewBackendOverride ? (this.resolvedPreviewBackend = this.runtimePreviewBackendOverride, this.resolvedPreviewBackend) : (this.resolvedPreviewBackend = qo(this.config.previewBackend), this.resolvedPreviewBackend);
13154
+ return this.runtimePreviewBackendOverride ? (this.resolvedPreviewBackend = this.runtimePreviewBackendOverride, this.resolvedPreviewBackend) : (this.resolvedPreviewBackend = Ko(this.config.previewBackend), this.resolvedPreviewBackend);
13073
13155
  }
13074
13156
  createPreviewBackendCallbacks(t = this.activePreviewCallbackToken) {
13075
13157
  return {
@@ -13098,7 +13180,7 @@ class Rl {
13098
13180
  }
13099
13181
  createPreviewBackend(t = this.resolveConfiguredPreviewBackend()) {
13100
13182
  const e = this.createPreviewBackendCallbacks(++this.activePreviewCallbackToken);
13101
- return new $o(e);
13183
+ return new qo(e);
13102
13184
  }
13103
13185
  isActivePreviewCallbackToken(t) {
13104
13186
  return t === this.activePreviewCallbackToken;
@@ -13148,7 +13230,7 @@ class Rl {
13148
13230
  zoom: ct.MEDIUM,
13149
13231
  currentTime: 0,
13150
13232
  playState: "paused",
13151
- theme: We(),
13233
+ theme: Ve(),
13152
13234
  speed: 1,
13153
13235
  dragActivationThreshold: 4,
13154
13236
  enableClipSnap: !1,
@@ -13376,22 +13458,22 @@ class Rl {
13376
13458
  this.clearPendingPreviewState(), e && this.play();
13377
13459
  }
13378
13460
  buildPreviewPendingState() {
13379
- return this.pendingPreviewState ? {
13461
+ return !this.pendingPreviewState || this.pendingPreviewState.mode === "scrub" ? null : {
13380
13462
  mode: this.pendingPreviewState.mode,
13381
13463
  targetTime: this.pendingPreviewState.targetTime,
13382
13464
  loadingPending: this.previewSourceLoadingCount,
13383
13465
  isBuffering: this.previewBuffering,
13384
13466
  errorMessage: this.pendingPreviewState.errorMessage
13385
- } : null;
13467
+ };
13386
13468
  }
13387
13469
  ensurePendingPreviewTimeout() {
13388
- if (!this.pendingPreviewState || this.pendingPreviewState.timeoutId !== null)
13470
+ if (!this.pendingPreviewState || this.pendingPreviewState.mode === "scrub" || this.pendingPreviewState.timeoutId !== null)
13389
13471
  return;
13390
13472
  const t = this.pendingPreviewState.syncRequestId;
13391
13473
  this.pendingPreviewState.timeoutId = setTimeout(() => {
13392
13474
  var e, i;
13393
13475
  !this.pendingPreviewState || this.pendingPreviewState.syncRequestId !== t || (this.pendingPreviewState.errorMessage = "资源加载异常,请刷新重试", this.clearPendingPreviewTimeout(), (i = (e = this.previewSession) == null ? void 0 : e.setPendingState) == null || i.call(e, this.buildPreviewPendingState()));
13394
- }, _l);
13476
+ }, Pl);
13395
13477
  }
13396
13478
  clearPendingPreviewTimeout() {
13397
13479
  var t;
@@ -13431,7 +13513,7 @@ class Rl {
13431
13513
  R.warn("TimelineManager", "TimelineManager has already been initialized");
13432
13514
  return;
13433
13515
  }
13434
- if (this.rootContainer = t, this.layout = fl(t, {
13516
+ if (this.rootContainer = t, this.layout = gl(t, {
13435
13517
  theme: this.config.theme,
13436
13518
  timeScaleHeight: this.getTimeScaleHeight(),
13437
13519
  leftPanelWidth: Ts,
@@ -13444,13 +13526,13 @@ class Rl {
13444
13526
  container: this.layout.bodyCanvasHost,
13445
13527
  width: this.layout.bodyViewport.clientWidth,
13446
13528
  height: 0
13447
- }), this.backgroundLayer = new X.Layer({ name: "trackBackgroundLayer" }), this.trackLayer = new X.Layer({ name: "trackLayer" }), this.snapGuideLayer = new X.Layer({ name: "trackSnapGuideLayer", listening: !1 }), this.stage.add(this.backgroundLayer), this.stage.add(this.trackLayer), this.stage.add(this.snapGuideLayer), this.timeline = new yl(
13529
+ }), this.backgroundLayer = new X.Layer({ name: "trackBackgroundLayer" }), this.trackLayer = new X.Layer({ name: "trackLayer" }), this.snapGuideLayer = new X.Layer({ name: "trackSnapGuideLayer", listening: !1 }), this.stage.add(this.backgroundLayer), this.stage.add(this.trackLayer), this.stage.add(this.snapGuideLayer), this.timeline = new Sl(
13448
13530
  this.headerStage,
13449
13531
  this.headerLayer,
13450
13532
  this.config,
13451
13533
  this.handleTimeChange.bind(this),
13452
13534
  this.handleScrollChange.bind(this)
13453
- ), this.playhead = new Sl(
13535
+ ), this.playhead = new Cl(
13454
13536
  this.layout.playheadOverlay,
13455
13537
  this.getCurrentTimeState(),
13456
13538
  this.getZoomState(),
@@ -13550,7 +13632,7 @@ class Rl {
13550
13632
  }
13551
13633
  updateAllTrackPositions() {
13552
13634
  var e, i;
13553
- const t = dl(this.trackManager.getTracks(), this.getTrackContentTopOffset());
13635
+ const t = ul(this.trackManager.getTracks(), this.getTrackContentTopOffset());
13554
13636
  for (const n of t) {
13555
13637
  const s = this.getTrackCollection().findById(n.trackId);
13556
13638
  s && ((e = s.setTrackY) == null || e.call(s, n.y), (i = s.setTrackHeight) == null || i.call(s, n.height));
@@ -13590,7 +13672,7 @@ class Rl {
13590
13672
  if (!this.snapGuideLayer)
13591
13673
  return null;
13592
13674
  if (!this.trackInsertionPreviewLine) {
13593
- const t = et.createLine(
13675
+ const t = it.createLine(
13594
13676
  [0, 0, 0, 0],
13595
13677
  this.config.theme.clipSelectedBorder,
13596
13678
  2
@@ -13682,7 +13764,7 @@ class Rl {
13682
13764
  return null;
13683
13765
  if (!this.snapGuideLine) {
13684
13766
  const t = this.config.theme;
13685
- this.snapGuideLine = et.createLine(
13767
+ this.snapGuideLine = it.createLine(
13686
13768
  [0, 0, 0, this.calculateTotalHeight()],
13687
13769
  t.snapGuideLineColor || t.clipSelectedBorder,
13688
13770
  t.snapGuideLineWidth ?? 1
@@ -13739,9 +13821,9 @@ class Rl {
13739
13821
  normalizeWheelDelta(t, e, i) {
13740
13822
  if (!Number.isFinite(t) || t === 0)
13741
13823
  return 0;
13742
- if (e === wl)
13824
+ if (e === kl)
13743
13825
  return t * 16;
13744
- if (e === kl) {
13826
+ if (e === _l) {
13745
13827
  const n = i === "x" ? this.getViewportWidth() : this.getViewportHeight();
13746
13828
  return t * (n || 1);
13747
13829
  }
@@ -14047,7 +14129,7 @@ class Rl {
14047
14129
  return c.id;
14048
14130
  }
14049
14131
  }
14050
- const u = this.getTimelineCommands().planTrackPlacement(c, this.tracks), p = this.getTrackCollection(), g = nl({
14132
+ const u = this.getTimelineCommands().planTrackPlacement(c, this.tracks), p = this.getTrackCollection(), g = sl({
14051
14133
  clip: c,
14052
14134
  placement: u,
14053
14135
  trackCollection: p,
@@ -14078,7 +14160,7 @@ class Rl {
14078
14160
  removeClip(t) {
14079
14161
  const e = this.getTimelineCommands().prepareRemoveClip(t, this.tracks);
14080
14162
  e.exists && (e.shouldClearSelection && this.clearSelection(), Fe({
14081
- applied: sl(this.getTrackCollection(), e, t),
14163
+ applied: rl(this.getTrackCollection(), e, t),
14082
14164
  isExecutingHistoryAction: this.isExecutingHistoryAction,
14083
14165
  recordHistory: () => {
14084
14166
  this.getTimelineHistoryRecorder().recordRemoveClip(e.clip);
@@ -14224,7 +14306,7 @@ class Rl {
14224
14306
  * 获取插件版本号
14225
14307
  */
14226
14308
  getVersion() {
14227
- return bl.version;
14309
+ return wl.version;
14228
14310
  }
14229
14311
  undo() {
14230
14312
  return this.history.undo();
@@ -14253,14 +14335,14 @@ class Rl {
14253
14335
  const t = this.getClips().map((e) => ({ ...e }));
14254
14336
  this.getTrackCollection().removeClipGaps(), t.length > 0 && this.getTimelineHistoryRecorder().recordRemoveGaps(t), this.checkTrackDurationChange();
14255
14337
  }
14256
- handleTimeChange(t) {
14257
- this.beginPendingPreview(t, "seek"), this.setCurrentTime(t);
14338
+ handleTimeChange(t, e = "seek") {
14339
+ this.beginPendingPreview(t, e), this.setCurrentTime(t);
14258
14340
  }
14259
14341
  handleScrollChange(t) {
14260
14342
  this.syncScrollLeft(t);
14261
14343
  }
14262
14344
  handleClipUpdate(t, e, i) {
14263
- this.isExecutingHistoryAction || this.getTimelineHistoryRecorder().recordClipUpdate(t, e, i), this.emitEvent("clip_updated", { clip: t }), Lo({
14345
+ this.isExecutingHistoryAction || this.getTimelineHistoryRecorder().recordClipUpdate(t, e, i), this.emitEvent("clip_updated", { clip: t }), Mo({
14264
14346
  notifySelectionChange: this.notifySelectionChange.bind(this),
14265
14347
  reloadClipThumbnailsIfNeeded: () => this.reloadClipThumbnailsIfNeeded(t, e),
14266
14348
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
@@ -14288,7 +14370,7 @@ class Rl {
14288
14370
  * @param originalClip 原始片段
14289
14371
  */
14290
14372
  reloadClipThumbnailsIfNeeded(t, e) {
14291
- Mo(t, e, !!this.thumbnailProvider) && this.loadClipThumbnails(t).catch((i) => {
14373
+ Ro(t, e, !!this.thumbnailProvider) && this.loadClipThumbnails(t).catch((i) => {
14292
14374
  R.warn("TimelineManager", "Error reloading clip thumbnails during update:", { error: i, clipId: t.id });
14293
14375
  });
14294
14376
  }
@@ -14297,8 +14379,8 @@ class Rl {
14297
14379
  */
14298
14380
  updateCanPlayState() {
14299
14381
  var s;
14300
- const t = this.getClips(), e = this.getCurrentTime(), i = Ro(t, e), n = this.canPlay;
14301
- this.canPlay = Io({
14382
+ const t = this.getClips(), e = this.getCurrentTime(), i = Io(t, e), n = this.canPlay;
14383
+ this.canPlay = Do({
14302
14384
  currentCanPlay: this.canPlay,
14303
14385
  nextCanPlay: i,
14304
14386
  playState: this.getPlayStateState(),
@@ -14314,7 +14396,7 @@ class Rl {
14314
14396
  }), n !== this.canPlay && R.debugLazy("TimelineManager", () => "Can play state changed", () => ({ oldState: n, newState: this.canPlay }));
14315
14397
  }
14316
14398
  handleClipSplit(t, e) {
14317
- Oo({
14399
+ Bo({
14318
14400
  clip1: t,
14319
14401
  clip2: e,
14320
14402
  isExecutingHistoryAction: this.isExecutingHistoryAction,
@@ -14333,7 +14415,7 @@ class Rl {
14333
14415
  });
14334
14416
  }
14335
14417
  handleClipSelect(t) {
14336
- const e = Do(t);
14418
+ const e = Go(t);
14337
14419
  e.shouldJumpToTime && e.jumpTime !== null ? (this.setCurrentTime(e.jumpTime), this.emitEvent("clip_selected", { clip: t }), R.debugLazy("TimelineManager", () => "Empty track clicked, jumping to time", () => ({ time: t.startTime }))) : e.shouldSelectClip && this.selectClip(t.id, t);
14338
14420
  }
14339
14421
  handleActionUndo(t) {
@@ -14352,7 +14434,7 @@ class Rl {
14352
14434
  this.getEventDispatcher().emit(t, e);
14353
14435
  }
14354
14436
  emitSelectedClipChangeIfNeeded() {
14355
- this.lastSelectedClipId = il({
14437
+ this.lastSelectedClipId = nl({
14356
14438
  lastSelectedClipId: this.lastSelectedClipId,
14357
14439
  resolveSelectedClip: () => this.resolveSelectedClipSnapshot(),
14358
14440
  emitSelectedClipChange: (t) => this.emitEvent("selected_clip_change", t)
@@ -14375,7 +14457,7 @@ class Rl {
14375
14457
  const i = this.getTrackCollection();
14376
14458
  if (!i.findById(e)) return;
14377
14459
  const n = t.type, s = this.trackManager.getTracksByType(n).length + 1, a = n === "video" ? `视频轨道 ${s}` : `音频轨道 ${s}`;
14378
- al({
14460
+ ol({
14379
14461
  clip: t,
14380
14462
  currentTrackId: e,
14381
14463
  trackType: n,
@@ -14514,7 +14596,7 @@ class Rl {
14514
14596
  (t = this.previewSession) != null && t.hasPreview() && (this.clearPendingPreviewState(), this.destroyPreviewSession(), this.recreateDetachedPreviewSession(), this.previewMountContainer = null, R.debugLazy("TimelineManager", () => "TimelineManager detached from preview container"));
14515
14597
  }
14516
14598
  attachClipConfig(t) {
14517
- const e = new Tl();
14599
+ const e = new vl();
14518
14600
  e.init({
14519
14601
  container: t,
14520
14602
  theme: this.config.theme,
@@ -14657,11 +14739,11 @@ class Rl {
14657
14739
  }), !1;
14658
14740
  if (n.status !== "ready")
14659
14741
  return !1;
14660
- const { sourceTrackId: s, targetTrackId: a } = n, o = i ? { ...i } : { ...n.clip }, l = this.cloneTrackSnapshot(s), h = this.cloneTrackSnapshot(a), c = rl({
14742
+ const { sourceTrackId: s, targetTrackId: a } = n, o = i ? { ...i } : { ...n.clip }, l = this.cloneTrackSnapshot(s), h = this.cloneTrackSnapshot(a), c = al({
14661
14743
  command: n,
14662
14744
  trackCollection: this.getTrackCollection()
14663
14745
  }), d = this.getClips().find((u) => u.id === t) ?? null;
14664
- return Go({
14746
+ return Oo({
14665
14747
  applied: c,
14666
14748
  clipId: t,
14667
14749
  sourceTrackId: s,
@@ -14672,7 +14754,7 @@ class Rl {
14672
14754
  targetTrackSnapshot: h,
14673
14755
  isExecutingHistoryAction: this.isExecutingHistoryAction,
14674
14756
  recordMoveClipBetweenTracks: this.getTimelineHistoryRecorder().recordMoveClipBetweenTracks.bind(this.getTimelineHistoryRecorder()),
14675
- applyEffects: () => ol({
14757
+ applyEffects: () => ll({
14676
14758
  notifySelectionChange: this.notifySelectionChange.bind(this),
14677
14759
  cleanupEmptyTracks: this.cleanupEmptyTracks.bind(this),
14678
14760
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -14740,7 +14822,7 @@ class Rl {
14740
14822
  * 检查轨道总时长是否变化,如果变化则触发事件并更新时间轴时长
14741
14823
  */
14742
14824
  checkTrackDurationChange() {
14743
- const t = this.lastTrackDuration, e = Zo({
14825
+ const t = this.lastTrackDuration, e = Jo({
14744
14826
  clips: this.getClips(),
14745
14827
  lastTrackDuration: this.lastTrackDuration,
14746
14828
  setLastTrackDuration: (i) => {
@@ -14760,7 +14842,7 @@ class Rl {
14760
14842
  );
14761
14843
  }
14762
14844
  resolveSelectedClipSnapshot() {
14763
- return el({
14845
+ return il({
14764
14846
  getSelectedClip: () => {
14765
14847
  var t;
14766
14848
  return ((t = this.getSelectedClip) == null ? void 0 : t.call(this)) || null;
@@ -14798,24 +14880,24 @@ class Rl {
14798
14880
  }
14799
14881
  }
14800
14882
  export {
14801
- El as CLIP_LAYER,
14883
+ Al as CLIP_LAYER,
14802
14884
  ni as Clip,
14803
- Po as ClipConfigPanel,
14885
+ xo as ClipConfigPanel,
14804
14886
  ks as DEFAULT_CLIP_VIEW_STATE,
14805
14887
  vt as DEFAULT_PREVIEW_ASPECT_RATIO,
14806
14888
  pn as HistoryManager,
14807
- Ve as MIN_CLIP_LINE_WIDTH,
14808
- xl as PREVIEW_ASPECT_RATIO_PRESETS,
14809
- Ml as Playhead,
14889
+ We as MIN_CLIP_LINE_WIDTH,
14890
+ El as PREVIEW_ASPECT_RATIO_PRESETS,
14891
+ Rl as Playhead,
14810
14892
  at as TIMELINE_LEFT_PADDING,
14811
- Al as TIME_SCALE,
14893
+ Ll as TIME_SCALE,
14812
14894
  At as TRACK_HEIGHT,
14813
14895
  O as TimeUtils,
14814
- Ll as Timeline,
14815
- Rl as TimelineManager,
14896
+ Ml as Timeline,
14897
+ Il as TimelineManager,
14816
14898
  ki as Track,
14817
14899
  ko as TrackInfoPanel,
14818
- cl as TrackManager,
14900
+ dl as TrackManager,
14819
14901
  _s as ZOOM_ANIMATION,
14820
14902
  ct as ZOOM_PRESETS,
14821
14903
  Ps as createClipViewState,
@@ -14824,5 +14906,5 @@ export {
14824
14906
  ge as isAutoPreviewAspectRatioMode,
14825
14907
  Ht as normalizePreviewAspectRatio,
14826
14908
  Ln as normalizePreviewAspectRatioMode,
14827
- We as resolveTheme
14909
+ Ve as resolveTheme
14828
14910
  };