@linker-design-plus/timeline-track 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var la = Object.defineProperty;
2
2
  var ha = (a, e, t) => e in a ? la(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var p = (a, e, t) => ha(a, typeof e != "symbol" ? e + "" : e, t);
4
- const A = {
4
+ const _ = {
5
5
  transparent: "transparent",
6
6
  white: "#ffffff",
7
7
  black: "#000000",
@@ -52,87 +52,87 @@ const A = {
52
52
  sliderThumbInnerShadow: "rgba(255, 255, 255, 0.92)",
53
53
  sliderThumbShadow: "rgba(8, 24, 56, 0.24)"
54
54
  }, Q = {
55
- background: A.black,
56
- border: A.borderStrong,
57
- timeTick: A.textSecondary,
58
- timeText: A.textSubtle,
59
- trackBackground: A.black,
60
- trackSelectedBackground: A.selectedTrackSurface,
61
- trackBorder: A.borderStrong,
62
- clipBackground: A.clipSurface,
63
- clipBorder: A.black,
64
- clipName: A.textPrimary,
65
- clipDuration: A.textMuted,
66
- clipHandle: A.textPrimary,
67
- clipSelectedBorder: A.clipSelectedBorder,
68
- clipCoverBackground: A.borderStrong,
69
- audioClipText: A.textAudio,
70
- audioClipAccent: A.audioClipAccent,
71
- playhead: A.textPrimary,
72
- grid: A.borderStrong,
73
- snapGuideLineColor: A.accentSelectedBorder,
74
- scrollbarBackground: A.borderStrong,
75
- scrollbarBorder: A.borderSubtle,
76
- scrollbarThumb: A.borderMedium
55
+ background: _.black,
56
+ border: _.borderStrong,
57
+ timeTick: _.textSecondary,
58
+ timeText: _.textSubtle,
59
+ trackBackground: _.black,
60
+ trackSelectedBackground: _.selectedTrackSurface,
61
+ trackBorder: _.borderStrong,
62
+ clipBackground: _.clipSurface,
63
+ clipBorder: _.black,
64
+ clipName: _.textPrimary,
65
+ clipDuration: _.textMuted,
66
+ clipHandle: _.textPrimary,
67
+ clipSelectedBorder: _.clipSelectedBorder,
68
+ clipCoverBackground: _.borderStrong,
69
+ audioClipText: _.textAudio,
70
+ audioClipAccent: _.audioClipAccent,
71
+ playhead: _.textPrimary,
72
+ grid: _.borderStrong,
73
+ snapGuideLineColor: _.accentSelectedBorder,
74
+ scrollbarBackground: _.borderStrong,
75
+ scrollbarBorder: _.borderSubtle,
76
+ scrollbarThumb: _.borderMedium
77
77
  }, ge = {
78
78
  backgroundColor: "#0f0f0f",
79
- borderColor: A.borderStrong,
80
- textColor: A.textSecondary,
81
- labelColor: A.textHint,
82
- inputBackground: A.inputSurface,
83
- inputBorder: A.borderMedium,
84
- inputFocusBorder: A.accentFocus,
85
- buttonBackground: A.inputSurface,
86
- buttonBorder: A.borderMedium,
87
- buttonActiveBackground: A.accentFocus,
88
- buttonActiveBorder: A.accentFocus,
89
- buttonActiveText: A.white
90
- }, ve = {
91
- background: A.panelSurface,
92
- border: A.borderStrong,
93
- text: A.textPrimary,
94
- buttonBackground: A.buttonSurface,
79
+ borderColor: _.borderStrong,
80
+ textColor: _.textSecondary,
81
+ labelColor: _.textHint,
82
+ inputBackground: _.inputSurface,
83
+ inputBorder: _.borderMedium,
84
+ inputFocusBorder: _.accentFocus,
85
+ buttonBackground: _.inputSurface,
86
+ buttonBorder: _.borderMedium,
87
+ buttonActiveBackground: _.accentFocus,
88
+ buttonActiveBorder: _.accentFocus,
89
+ buttonActiveText: _.white
90
+ }, Te = {
91
+ background: _.panelSurface,
92
+ border: _.borderStrong,
93
+ text: _.textPrimary,
94
+ buttonBackground: _.buttonSurface,
95
95
  buttonHover: "#3a3a3a",
96
- buttonDanger: A.accentDanger
96
+ buttonDanger: _.accentDanger
97
97
  }, fe = {
98
98
  background: Q.scrollbarBackground,
99
99
  border: Q.scrollbarBorder,
100
100
  thumb: Q.scrollbarThumb,
101
- hitArea: A.overlayHitArea
101
+ hitArea: _.overlayHitArea
102
102
  }, yt = {
103
- fill: A.white,
104
- stroke: A.black,
105
- text: A.black
106
- }, ke = {
107
- tabBarBackground: A.buttonSurface,
108
- actionBarBackground: A.buttonSurface,
109
- activeTabBackground: A.activeTabBackground,
110
- activeTabText: A.white,
111
- inactiveTabText: A.textInactive,
112
- sliderThumbShadow: `0 8px 20px ${A.sliderThumbShadow}`,
113
- sliderThumbInnerShadow: `inset 0 1px 1px ${A.sliderThumbInnerShadow}`
103
+ fill: _.white,
104
+ stroke: _.black,
105
+ text: _.black
106
+ }, Ce = {
107
+ tabBarBackground: _.buttonSurface,
108
+ actionBarBackground: _.buttonSurface,
109
+ activeTabBackground: _.activeTabBackground,
110
+ activeTabText: _.white,
111
+ inactiveTabText: _.textInactive,
112
+ sliderThumbShadow: `0 8px 20px ${_.sliderThumbShadow}`,
113
+ sliderThumbInnerShadow: `inset 0 1px 1px ${_.sliderThumbInnerShadow}`
114
114
  }, _i = {
115
- grip: A.accentPlayheadGrip,
116
- shadow: A.overlayShadow,
117
- marker: A.playheadMarker
115
+ grip: _.accentPlayheadGrip,
116
+ shadow: _.overlayShadow,
117
+ marker: _.playheadMarker
118
118
  }, si = {
119
- background: A.overlayPreview,
120
- text: A.white,
121
- actionBackground: A.accentAction,
122
- actionText: A.white
119
+ background: _.overlayPreview,
120
+ text: _.white,
121
+ actionBackground: _.accentAction,
122
+ actionText: _.white
123
123
  }, $i = {
124
- border: A.overlayTransformHandle,
125
- handleBackground: A.black
124
+ border: _.overlayTransformHandle,
125
+ handleBackground: _.black
126
126
  }, Gr = {
127
- fill: A.overlaySelectionBoxFill,
128
- stroke: A.accentSelectionBox
127
+ fill: _.overlaySelectionBoxFill,
128
+ stroke: _.accentSelectionBox
129
129
  }, ai = {
130
- videoFill: A.overlayVideoDropPreview,
131
- videoStroke: A.accentSelectedBorder,
132
- audioFill: A.overlayAudioDropPreview,
133
- audioStroke: A.accentAudioPreview
130
+ videoFill: _.overlayVideoDropPreview,
131
+ videoStroke: _.accentSelectedBorder,
132
+ audioFill: _.overlayAudioDropPreview,
133
+ audioStroke: _.accentAudioPreview
134
134
  }, Hr = {
135
- line: A.gridLine
135
+ line: _.gridLine
136
136
  }, ca = {
137
137
  fontSize: 65,
138
138
  color: "#C9CBD4",
@@ -248,7 +248,7 @@ const Md = {
248
248
  // 默认层级
249
249
  ACTIVE: 2
250
250
  // 激活层级(拖拽/选中状态)
251
- }, Te = {
251
+ }, be = {
252
252
  MIN: 2,
253
253
  SMALL: 10,
254
254
  MEDIUM: 30,
@@ -1533,24 +1533,24 @@ class Ir extends Ar {
1533
1533
  super(e), this.hitCanvas = !0, this.context = new $a(this), this.setSize(e.width, e.height);
1534
1534
  }
1535
1535
  }
1536
- const K = {
1536
+ const Z = {
1537
1537
  get isDragging() {
1538
1538
  let a = !1;
1539
- return K._dragElements.forEach((e) => {
1539
+ return Z._dragElements.forEach((e) => {
1540
1540
  e.dragStatus === "dragging" && (a = !0);
1541
1541
  }), a;
1542
1542
  },
1543
1543
  justDragged: !1,
1544
1544
  get node() {
1545
1545
  let a;
1546
- return K._dragElements.forEach((e) => {
1546
+ return Z._dragElements.forEach((e) => {
1547
1547
  a = e.node;
1548
1548
  }), a;
1549
1549
  },
1550
1550
  _dragElements: /* @__PURE__ */ new Map(),
1551
1551
  _drag(a) {
1552
1552
  const e = [];
1553
- K._dragElements.forEach((t, i) => {
1553
+ Z._dragElements.forEach((t, i) => {
1554
1554
  const { node: r } = t, n = r.getStage();
1555
1555
  n.setPointersPositions(a), t.pointerId === void 0 && (t.pointerId = S._getFirstPointerId(a));
1556
1556
  const s = n._changedPointerPositions.find((o) => o.id === t.pointerId);
@@ -1572,11 +1572,11 @@ const K = {
1572
1572
  },
1573
1573
  _endDragBefore(a) {
1574
1574
  const e = [];
1575
- K._dragElements.forEach((t) => {
1575
+ Z._dragElements.forEach((t) => {
1576
1576
  const { node: i } = t, r = i.getStage();
1577
1577
  if (a && r.setPointersPositions(a), !r._changedPointerPositions.find((o) => o.id === t.pointerId))
1578
1578
  return;
1579
- (t.dragStatus === "dragging" || t.dragStatus === "stopped") && (K.justDragged = !0, R._mouseListenClick = !1, R._touchListenClick = !1, R._pointerListenClick = !1, t.dragStatus = "stopped");
1579
+ (t.dragStatus === "dragging" || t.dragStatus === "stopped") && (Z.justDragged = !0, R._mouseListenClick = !1, R._touchListenClick = !1, R._pointerListenClick = !1, t.dragStatus = "stopped");
1580
1580
  const s = t.node.getLayer() || t.node instanceof R.Stage && t.node;
1581
1581
  s && e.indexOf(s) === -1 && e.push(s);
1582
1582
  }), e.forEach((t) => {
@@ -1584,16 +1584,16 @@ const K = {
1584
1584
  });
1585
1585
  },
1586
1586
  _endDragAfter(a) {
1587
- K._dragElements.forEach((e, t) => {
1587
+ Z._dragElements.forEach((e, t) => {
1588
1588
  e.dragStatus === "stopped" && e.node.fire("dragend", {
1589
1589
  type: "dragend",
1590
1590
  target: e.node,
1591
1591
  evt: a
1592
- }, !0), e.dragStatus !== "dragging" && K._dragElements.delete(t);
1592
+ }, !0), e.dragStatus !== "dragging" && Z._dragElements.delete(t);
1593
1593
  });
1594
1594
  }
1595
1595
  };
1596
- R.isBrowser && (window.addEventListener("mouseup", K._endDragBefore, !0), window.addEventListener("touchend", K._endDragBefore, !0), window.addEventListener("touchcancel", K._endDragBefore, !0), window.addEventListener("mousemove", K._drag), window.addEventListener("touchmove", K._drag), window.addEventListener("mouseup", K._endDragAfter, !1), window.addEventListener("touchend", K._endDragAfter, !1), window.addEventListener("touchcancel", K._endDragAfter, !1));
1596
+ R.isBrowser && (window.addEventListener("mouseup", Z._endDragBefore, !0), window.addEventListener("touchend", Z._endDragBefore, !0), window.addEventListener("touchcancel", Z._endDragBefore, !0), window.addEventListener("mousemove", Z._drag), window.addEventListener("touchmove", Z._drag), window.addEventListener("mouseup", Z._endDragAfter, !1), window.addEventListener("touchend", Z._endDragAfter, !1), window.addEventListener("touchcancel", Z._endDragAfter, !1));
1597
1597
  function Ve(a) {
1598
1598
  return S._isString(a) ? '"' + a + '"' : Object.prototype.toString.call(a) === "[object Number]" || S._isBoolean(a) ? a : Object.prototype.toString.call(a);
1599
1599
  }
@@ -1792,7 +1792,7 @@ const bi = "absoluteOpacity", Ur = "allEventListeners", Le = "absoluteTransform"
1792
1792
  "transformsEnabledChange.konva"
1793
1793
  ].join(wi);
1794
1794
  let io = 1;
1795
- class _ {
1795
+ class A {
1796
1796
  constructor(e) {
1797
1797
  this._id = io++, this.eventListeners = {}, this.attrs = {}, this.index = 0, this._allEventListeners = null, this.parent = null, this._cache = /* @__PURE__ */ new Map(), this._attachedDepsListeners = /* @__PURE__ */ new Map(), this._lastPos = null, this._batchingTransformChange = !1, this._needClearTransformCache = !1, this._filterUpToDate = !1, this._isUnderCache = !1, this._dragEventId = null, this._shouldFireChangeEvents = !1, this.setAttrs(e), this._shouldFireChangeEvents = !0;
1798
1798
  }
@@ -1977,7 +1977,7 @@ class _ {
1977
1977
  });
1978
1978
  }
1979
1979
  remove() {
1980
- return this.isDragging() && this.stopDrag(), K._dragElements.delete(this._id), this._remove(), this;
1980
+ return this.isDragging() && this.stopDrag(), Z._dragElements.delete(this._id), this._remove(), this;
1981
1981
  }
1982
1982
  _clearCaches() {
1983
1983
  this._clearSelfAndDescendantCache(Le), this._clearSelfAndDescendantCache(bi), this._clearSelfAndDescendantCache(Wr), this._clearSelfAndDescendantCache(qr), this._clearSelfAndDescendantCache(lr), this._clearSelfAndDescendantCache(or);
@@ -2035,7 +2035,7 @@ class _ {
2035
2035
  return this._isVisible(e) && this._isListening(e);
2036
2036
  const i = this.getLayer();
2037
2037
  let r = !1;
2038
- K._dragElements.forEach((s) => {
2038
+ Z._dragElements.forEach((s) => {
2039
2039
  s.dragStatus === "dragging" && (s.node.nodeType === "Stage" || s.node.getLayer() === i) && (r = !0);
2040
2040
  });
2041
2041
  const n = !t && !R.hitOnDragEnabled && (r || R.isTransforming());
@@ -2441,7 +2441,7 @@ class _ {
2441
2441
  }
2442
2442
  _getProtoListeners(e) {
2443
2443
  var t, i;
2444
- const { nodeType: r } = this, n = _.protoListenerMap.get(r) || {};
2444
+ const { nodeType: r } = this, n = A.protoListenerMap.get(r) || {};
2445
2445
  let s = n == null ? void 0 : n[e];
2446
2446
  if (s === void 0) {
2447
2447
  s = [];
@@ -2450,7 +2450,7 @@ class _ {
2450
2450
  const l = (i = (t = o.eventListeners) === null || t === void 0 ? void 0 : t[e]) !== null && i !== void 0 ? i : [];
2451
2451
  s.push(...l), o = Object.getPrototypeOf(o);
2452
2452
  }
2453
- n[e] = s, _.protoListenerMap.set(r, n);
2453
+ n[e] = s, A.protoListenerMap.set(r, n);
2454
2454
  }
2455
2455
  return s;
2456
2456
  }
@@ -2473,7 +2473,7 @@ class _ {
2473
2473
  if (!i)
2474
2474
  return;
2475
2475
  const n = i._getPointerById(t) || i._changedPointerPositions[0] || r;
2476
- K._dragElements.set(this._id, {
2476
+ Z._dragElements.set(this._id, {
2477
2477
  node: this,
2478
2478
  startPointerPos: n,
2479
2479
  offset: {
@@ -2485,8 +2485,8 @@ class _ {
2485
2485
  });
2486
2486
  }
2487
2487
  startDrag(e, t = !0) {
2488
- K._dragElements.has(this._id) || this._createDragElement(e);
2489
- const i = K._dragElements.get(this._id);
2488
+ Z._dragElements.has(this._id) || this._createDragElement(e);
2489
+ const i = Z._dragElements.get(this._id);
2490
2490
  i.dragStatus = "dragging", this.fire("dragstart", {
2491
2491
  type: "dragstart",
2492
2492
  target: this,
@@ -2509,14 +2509,14 @@ class _ {
2509
2509
  (!this._lastPos || this._lastPos.x !== r.x || this._lastPos.y !== r.y) && (this.setAbsolutePosition(r), this._requestDraw()), this._lastPos = r;
2510
2510
  }
2511
2511
  stopDrag(e) {
2512
- const t = K._dragElements.get(this._id);
2513
- t && (t.dragStatus = "stopped"), K._endDragBefore(e), K._endDragAfter(e);
2512
+ const t = Z._dragElements.get(this._id);
2513
+ t && (t.dragStatus = "stopped"), Z._endDragBefore(e), Z._endDragAfter(e);
2514
2514
  }
2515
2515
  setDraggable(e) {
2516
2516
  this._setAttr("draggable", e), this._dragChange();
2517
2517
  }
2518
2518
  isDragging() {
2519
- const e = K._dragElements.get(this._id);
2519
+ const e = Z._dragElements.get(this._id);
2520
2520
  return e ? e.dragStatus === "dragging" : !1;
2521
2521
  }
2522
2522
  _listenDrag() {
@@ -2524,7 +2524,7 @@ class _ {
2524
2524
  if (!(!(e.evt.button !== void 0) || R.dragButtons.indexOf(e.evt.button) >= 0) || this.isDragging())
2525
2525
  return;
2526
2526
  let r = !1;
2527
- K._dragElements.forEach((n) => {
2527
+ Z._dragElements.forEach((n) => {
2528
2528
  this.isAncestorOf(n.node) && (r = !0);
2529
2529
  }), r || this._createDragElement(e);
2530
2530
  });
@@ -2535,8 +2535,8 @@ class _ {
2535
2535
  else {
2536
2536
  if (this._dragCleanup(), !this.getStage())
2537
2537
  return;
2538
- const t = K._dragElements.get(this._id), i = t && t.dragStatus === "dragging", r = t && t.dragStatus === "ready";
2539
- i ? this.stopDrag() : r && K._dragElements.delete(this._id);
2538
+ const t = Z._dragElements.get(this._id), i = t && t.dragStatus === "dragging", r = t && t.dragStatus === "ready";
2539
+ i ? this.stopDrag() : r && Z._dragElements.delete(this._id);
2540
2540
  }
2541
2541
  }
2542
2542
  _dragCleanup() {
@@ -2558,74 +2558,74 @@ class _ {
2558
2558
  return S._isString(e) && (e = JSON.parse(e)), this._createNode(e, t);
2559
2559
  }
2560
2560
  static _createNode(e, t) {
2561
- let i = _.prototype.getClassName.call(e), r = e.children, n, s, o;
2561
+ let i = A.prototype.getClassName.call(e), r = e.children, n, s, o;
2562
2562
  t && (e.attrs.container = t), R[i] || (S.warn('Can not find a node with class name "' + i + '". Fallback to "Shape".'), i = "Shape");
2563
2563
  const l = R[i];
2564
2564
  if (n = new l(e.attrs), r)
2565
2565
  for (s = r.length, o = 0; o < s; o++)
2566
- n.add(_._createNode(r[o]));
2566
+ n.add(A._createNode(r[o]));
2567
2567
  return n;
2568
2568
  }
2569
2569
  }
2570
- _.protoListenerMap = /* @__PURE__ */ new Map();
2571
- _.prototype.nodeType = "Node";
2572
- _.prototype._attrsAffectingSize = [];
2573
- _.prototype.eventListeners = {};
2574
- _.prototype.on.call(_.prototype, to, function() {
2570
+ A.protoListenerMap = /* @__PURE__ */ new Map();
2571
+ A.prototype.nodeType = "Node";
2572
+ A.prototype._attrsAffectingSize = [];
2573
+ A.prototype.eventListeners = {};
2574
+ A.prototype.on.call(A.prototype, to, function() {
2575
2575
  if (this._batchingTransformChange) {
2576
2576
  this._needClearTransformCache = !0;
2577
2577
  return;
2578
2578
  }
2579
2579
  this._clearCache(He), this._clearSelfAndDescendantCache(Le);
2580
2580
  });
2581
- _.prototype.on.call(_.prototype, "visibleChange.konva", function() {
2581
+ A.prototype.on.call(A.prototype, "visibleChange.konva", function() {
2582
2582
  this._clearSelfAndDescendantCache(lr);
2583
2583
  });
2584
- _.prototype.on.call(_.prototype, "listeningChange.konva", function() {
2584
+ A.prototype.on.call(A.prototype, "listeningChange.konva", function() {
2585
2585
  this._clearSelfAndDescendantCache(or);
2586
2586
  });
2587
- _.prototype.on.call(_.prototype, "opacityChange.konva", function() {
2587
+ A.prototype.on.call(A.prototype, "opacityChange.konva", function() {
2588
2588
  this._clearSelfAndDescendantCache(bi);
2589
2589
  });
2590
2590
  const ee = m.addGetterSetter;
2591
- ee(_, "zIndex");
2592
- ee(_, "absolutePosition");
2593
- ee(_, "position");
2594
- ee(_, "x", 0, I());
2595
- ee(_, "y", 0, I());
2596
- ee(_, "globalCompositeOperation", "source-over", st());
2597
- ee(_, "opacity", 1, I());
2598
- ee(_, "name", "", st());
2599
- ee(_, "id", "", st());
2600
- ee(_, "rotation", 0, I());
2601
- m.addComponentsGetterSetter(_, "scale", ["x", "y"]);
2602
- ee(_, "scaleX", 1, I());
2603
- ee(_, "scaleY", 1, I());
2604
- m.addComponentsGetterSetter(_, "skew", ["x", "y"]);
2605
- ee(_, "skewX", 0, I());
2606
- ee(_, "skewY", 0, I());
2607
- m.addComponentsGetterSetter(_, "offset", ["x", "y"]);
2608
- ee(_, "offsetX", 0, I());
2609
- ee(_, "offsetY", 0, I());
2610
- ee(_, "dragDistance", void 0, I());
2611
- ee(_, "width", 0, I());
2612
- ee(_, "height", 0, I());
2613
- ee(_, "listening", !0, xe());
2614
- ee(_, "preventDefault", !0, xe());
2615
- ee(_, "filters", void 0, function(a) {
2591
+ ee(A, "zIndex");
2592
+ ee(A, "absolutePosition");
2593
+ ee(A, "position");
2594
+ ee(A, "x", 0, I());
2595
+ ee(A, "y", 0, I());
2596
+ ee(A, "globalCompositeOperation", "source-over", st());
2597
+ ee(A, "opacity", 1, I());
2598
+ ee(A, "name", "", st());
2599
+ ee(A, "id", "", st());
2600
+ ee(A, "rotation", 0, I());
2601
+ m.addComponentsGetterSetter(A, "scale", ["x", "y"]);
2602
+ ee(A, "scaleX", 1, I());
2603
+ ee(A, "scaleY", 1, I());
2604
+ m.addComponentsGetterSetter(A, "skew", ["x", "y"]);
2605
+ ee(A, "skewX", 0, I());
2606
+ ee(A, "skewY", 0, I());
2607
+ m.addComponentsGetterSetter(A, "offset", ["x", "y"]);
2608
+ ee(A, "offsetX", 0, I());
2609
+ ee(A, "offsetY", 0, I());
2610
+ ee(A, "dragDistance", void 0, I());
2611
+ ee(A, "width", 0, I());
2612
+ ee(A, "height", 0, I());
2613
+ ee(A, "listening", !0, xe());
2614
+ ee(A, "preventDefault", !0, xe());
2615
+ ee(A, "filters", void 0, function(a) {
2616
2616
  return this._filterUpToDate = !1, a;
2617
2617
  });
2618
- ee(_, "visible", !0, xe());
2619
- ee(_, "transformsEnabled", "all", st());
2620
- ee(_, "size");
2621
- ee(_, "dragBoundFunc");
2622
- ee(_, "draggable", !1, xe());
2623
- m.backCompat(_, {
2618
+ ee(A, "visible", !0, xe());
2619
+ ee(A, "transformsEnabled", "all", st());
2620
+ ee(A, "size");
2621
+ ee(A, "dragBoundFunc");
2622
+ ee(A, "draggable", !1, xe());
2623
+ m.backCompat(A, {
2624
2624
  rotateDeg: "rotate",
2625
2625
  setRotationDeg: "setRotation",
2626
2626
  getRotationDeg: "getRotation"
2627
2627
  });
2628
- class Se extends _ {
2628
+ class Se extends A {
2629
2629
  constructor() {
2630
2630
  super(...arguments), this.children = [];
2631
2631
  }
@@ -2688,7 +2688,7 @@ class Se extends _ {
2688
2688
  return !1;
2689
2689
  }
2690
2690
  toObject() {
2691
- const e = _.prototype.toObject.call(this);
2691
+ const e = A.prototype.toObject.call(this);
2692
2692
  return e.children = [], this.getChildren().forEach((t) => {
2693
2693
  e.children.push(t.toObject());
2694
2694
  }), e;
@@ -2703,7 +2703,7 @@ class Se extends _ {
2703
2703
  return !1;
2704
2704
  }
2705
2705
  clone(e) {
2706
- const t = _.prototype.clone.call(this, e);
2706
+ const t = A.prototype.clone.call(this, e);
2707
2707
  return this.getChildren().forEach(function(i) {
2708
2708
  t.add(i.clone());
2709
2709
  }), t;
@@ -3098,7 +3098,7 @@ class Gi extends Se {
3098
3098
  let r = !1;
3099
3099
  this._changedPointerPositions.forEach((n) => {
3100
3100
  const s = this.getIntersection(n);
3101
- if (K.justDragged = !1, R["_" + i + "ListenClick"] = !0, !s || !s.isListening()) {
3101
+ if (Z.justDragged = !1, R["_" + i + "ListenClick"] = !0, !s || !s.isListening()) {
3102
3102
  this[i + "ClickStartShape"] = void 0;
3103
3103
  return;
3104
3104
  }
@@ -3120,7 +3120,7 @@ class Gi extends Se {
3120
3120
  if (!t)
3121
3121
  return;
3122
3122
  const r = e.type.indexOf("touch") >= 0 || e.pointerType === "touch";
3123
- if (R.isDragging() && K.node.preventDefault() && e.cancelable && r && e.preventDefault(), this.setPointersPositions(e), !(!(R.isDragging() || R.isTransforming()) || R.hitOnDragEnabled))
3123
+ if (R.isDragging() && Z.node.preventDefault() && e.cancelable && r && e.preventDefault(), this.setPointersPositions(e), !(!(R.isDragging() || R.isTransforming()) || R.hitOnDragEnabled))
3124
3124
  return;
3125
3125
  const s = {};
3126
3126
  let o = !1;
@@ -3161,7 +3161,7 @@ class Gi extends Se {
3161
3161
  }
3162
3162
  const c = l.id, d = { evt: e, pointerId: c };
3163
3163
  let u = !1;
3164
- R["_" + i + "InDblClickWindow"] ? (u = !0, clearTimeout(this[i + "DblTimeout"])) : K.justDragged || (R["_" + i + "InDblClickWindow"] = !0, clearTimeout(this[i + "DblTimeout"])), this[i + "DblTimeout"] = setTimeout(function() {
3164
+ R["_" + i + "InDblClickWindow"] ? (u = !0, clearTimeout(this[i + "DblTimeout"])) : Z.justDragged || (R["_" + i + "InDblClickWindow"] = !0, clearTimeout(this[i + "DblTimeout"])), this[i + "DblTimeout"] = setTimeout(function() {
3165
3165
  R["_" + i + "InDblClickWindow"] = !1;
3166
3166
  }, R.dblClickWindow), h && h.isListening() ? (o = !0, this[i + "ClickEndShape"] = h, h._fireAndBubble(t.pointerup, { ...d }), R["_" + i + "ListenClick"] && r && r === h && (h._fireAndBubble(t.pointerclick, { ...d }), u && n && n === h && h._fireAndBubble(t.pointerdblclick, { ...d }))) : (this[i + "ClickEndShape"] = null, o || (this._fire(t.pointerup, {
3167
3167
  evt: e,
@@ -3323,7 +3323,7 @@ function So() {
3323
3323
  function Co() {
3324
3324
  this._clearCache(xs);
3325
3325
  }
3326
- class P extends _ {
3326
+ class P extends A {
3327
3327
  constructor(e) {
3328
3328
  super(e);
3329
3329
  let t, i = 0;
@@ -3437,7 +3437,7 @@ class P extends _ {
3437
3437
  return i.getContext().clear(), this.drawHit(i, void 0, !0), i.context.getImageData(Math.round(e.x), Math.round(e.y), 1, 1).data[3] > 0;
3438
3438
  }
3439
3439
  destroy() {
3440
- return _.prototype.destroy.call(this), delete Nt[this.colorKey], delete this.colorKey, this;
3440
+ return A.prototype.destroy.call(this), delete Nt[this.colorKey], delete this.colorKey, this;
3441
3441
  }
3442
3442
  _useBufferCanvas(e) {
3443
3443
  var t;
@@ -3692,18 +3692,18 @@ class at extends Se {
3692
3692
  return t && t.content && (t.content.removeChild(this.getNativeCanvasElement()), e < t.children.length - 1 ? t.content.insertBefore(this.getNativeCanvasElement(), t.children[e + 1].getCanvas()._canvas) : t.content.appendChild(this.getNativeCanvasElement())), this;
3693
3693
  }
3694
3694
  moveToTop() {
3695
- _.prototype.moveToTop.call(this);
3695
+ A.prototype.moveToTop.call(this);
3696
3696
  const e = this.getStage();
3697
3697
  return e && e.content && (e.content.removeChild(this.getNativeCanvasElement()), e.content.appendChild(this.getNativeCanvasElement())), !0;
3698
3698
  }
3699
3699
  moveUp() {
3700
- if (!_.prototype.moveUp.call(this))
3700
+ if (!A.prototype.moveUp.call(this))
3701
3701
  return !1;
3702
3702
  const t = this.getStage();
3703
3703
  return !t || !t.content ? !1 : (t.content.removeChild(this.getNativeCanvasElement()), this.index < t.children.length - 1 ? t.content.insertBefore(this.getNativeCanvasElement(), t.children[this.index + 1].getCanvas()._canvas) : t.content.appendChild(this.getNativeCanvasElement()), !0);
3704
3704
  }
3705
3705
  moveDown() {
3706
- if (_.prototype.moveDown.call(this)) {
3706
+ if (A.prototype.moveDown.call(this)) {
3707
3707
  const e = this.getStage();
3708
3708
  if (e) {
3709
3709
  const t = e.children;
@@ -3714,7 +3714,7 @@ class at extends Se {
3714
3714
  return !1;
3715
3715
  }
3716
3716
  moveToBottom() {
3717
- if (_.prototype.moveToBottom.call(this)) {
3717
+ if (A.prototype.moveToBottom.call(this)) {
3718
3718
  const e = this.getStage();
3719
3719
  if (e) {
3720
3720
  const t = e.children;
@@ -3729,7 +3729,7 @@ class at extends Se {
3729
3729
  }
3730
3730
  remove() {
3731
3731
  const e = this.getNativeCanvasElement();
3732
- return _.prototype.remove.call(this), e && e.parentNode && S._isInDocument(e) && e.parentNode.removeChild(e), this;
3732
+ return A.prototype.remove.call(this), e && e.parentNode && S._isInDocument(e) && e.parentNode.removeChild(e), this;
3733
3733
  }
3734
3734
  getStage() {
3735
3735
  return this.parent;
@@ -3742,7 +3742,7 @@ class at extends Se {
3742
3742
  t !== "Group" && t !== "Shape" && S.throw("You may only add groups and shapes to a layer.");
3743
3743
  }
3744
3744
  _toKonvaCanvas(e) {
3745
- return e = { ...e }, e.width = e.width || this.getWidth(), e.height = e.height || this.getHeight(), e.x = e.x !== void 0 ? e.x : this.x(), e.y = e.y !== void 0 ? e.y : this.y(), _.prototype._toKonvaCanvas.call(this, e);
3745
+ return e = { ...e }, e.width = e.width || this.getWidth(), e.height = e.height || this.getHeight(), e.x = e.x !== void 0 ? e.x : this.x(), e.y = e.y !== void 0 ? e.y : this.y(), A.prototype._toKonvaCanvas.call(this, e);
3746
3746
  }
3747
3747
  _checkVisibility() {
3748
3748
  this.visible() ? this.canvas._canvas.style.display = "block" : this.canvas._canvas.style.display = "none";
@@ -3866,9 +3866,9 @@ const Wi = function() {
3866
3866
  return (/* @__PURE__ */ new Date()).getTime();
3867
3867
  };
3868
3868
  }();
3869
- class be {
3869
+ class we {
3870
3870
  constructor(e, t) {
3871
- this.id = be.animIdCounter++, this.frame = {
3871
+ this.id = we.animIdCounter++, this.frame = {
3872
3872
  time: 0,
3873
3873
  timeDiff: 0,
3874
3874
  lastTime: Wi(),
@@ -3890,17 +3890,17 @@ class be {
3890
3890
  return this.layers.push(e), !0;
3891
3891
  }
3892
3892
  isRunning() {
3893
- const t = be.animations, i = t.length;
3893
+ const t = we.animations, i = t.length;
3894
3894
  for (let r = 0; r < i; r++)
3895
3895
  if (t[r].id === this.id)
3896
3896
  return !0;
3897
3897
  return !1;
3898
3898
  }
3899
3899
  start() {
3900
- return this.stop(), this.frame.timeDiff = 0, this.frame.lastTime = Wi(), be._addAnimation(this), this;
3900
+ return this.stop(), this.frame.timeDiff = 0, this.frame.lastTime = Wi(), we._addAnimation(this), this;
3901
3901
  }
3902
3902
  stop() {
3903
- return be._removeAnimation(this), this;
3903
+ return we._removeAnimation(this), this;
3904
3904
  }
3905
3905
  _updateFrameObject(e) {
3906
3906
  this.frame.timeDiff = e - this.frame.lastTime, this.frame.lastTime = e, this.frame.time += this.frame.timeDiff, this.frame.frameRate = 1e3 / this.frame.timeDiff;
@@ -3933,16 +3933,16 @@ class be {
3933
3933
  e.hasOwnProperty(i) && e[i].batchDraw();
3934
3934
  }
3935
3935
  static _animationLoop() {
3936
- const e = be;
3936
+ const e = we;
3937
3937
  e.animations.length ? (e._runFrames(), S.requestAnimFrame(e._animationLoop)) : e.animRunning = !1;
3938
3938
  }
3939
3939
  static _handleAnimation() {
3940
3940
  this.animRunning || (this.animRunning = !0, S.requestAnimFrame(this._animationLoop));
3941
3941
  }
3942
3942
  }
3943
- be.animations = [];
3944
- be.animIdCounter = 0;
3945
- be.animRunning = !1;
3943
+ we.animations = [];
3944
+ we.animIdCounter = 0;
3945
+ we.animRunning = !1;
3946
3946
  const wo = {
3947
3947
  node: 1,
3948
3948
  duration: 1,
@@ -4006,7 +4006,7 @@ class te {
4006
4006
  let o, l;
4007
4007
  typeof e.duration > "u" ? o = 0.3 : e.duration === 0 ? o = 1e-3 : o = e.duration, this.node = i, this._id = xo++;
4008
4008
  const h = i.getLayer() || (i instanceof R.Stage ? i.getLayers() : null);
4009
- h || S.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."), this.anim = new be(function() {
4009
+ h || S.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."), this.anim = new we(function() {
4010
4010
  t.tween.onEnterFrame();
4011
4011
  }, h), this.tween = new Po(l, function(c) {
4012
4012
  t._tweenFunc(c);
@@ -4112,7 +4112,7 @@ class te {
4112
4112
  }
4113
4113
  te.attrs = {};
4114
4114
  te.tweens = {};
4115
- _.prototype.to = function(a) {
4115
+ A.prototype.to = function(a) {
4116
4116
  const e = a.onFinish;
4117
4117
  a.node = this, a.onFinish = function() {
4118
4118
  this.destroy(), e && e();
@@ -4174,17 +4174,17 @@ const zt = {
4174
4174
  }, en = S._assign(R, {
4175
4175
  Util: S,
4176
4176
  Transform: ye,
4177
- Node: _,
4177
+ Node: A,
4178
4178
  Container: Se,
4179
4179
  Stage: Gi,
4180
4180
  stages: $t,
4181
4181
  Layer: at,
4182
4182
  FastLayer: Rr,
4183
4183
  Group: Ct,
4184
- DD: K,
4184
+ DD: Z,
4185
4185
  Shape: P,
4186
4186
  shapes: Nt,
4187
- Animation: be,
4187
+ Animation: we,
4188
4188
  Tween: te,
4189
4189
  Easings: zt,
4190
4190
  Context: Oi,
@@ -5820,7 +5820,7 @@ m.addGetterSetter(ht, "innerRadius", 0, I());
5820
5820
  m.addGetterSetter(ht, "outerRadius", 0, I());
5821
5821
  class Ee extends P {
5822
5822
  constructor(e) {
5823
- super(e), this._updated = !0, this.anim = new be(() => {
5823
+ super(e), this._updated = !0, this.anim = new we(() => {
5824
5824
  const t = this._updated;
5825
5825
  return this._updated = !1, t;
5826
5826
  }), this.on("animationChange.konva", function() {
@@ -6946,10 +6946,10 @@ class X extends Ct {
6946
6946
  return this.getStage() && this._cursorChange && this.getStage().content && (this.getStage().content.style.cursor = ""), Ct.prototype.destroy.call(this), this.detach(), this._removeEvents(), this;
6947
6947
  }
6948
6948
  toObject() {
6949
- return _.prototype.toObject.call(this);
6949
+ return A.prototype.toObject.call(this);
6950
6950
  }
6951
6951
  clone(e) {
6952
- return _.prototype.clone.call(this, e);
6952
+ return A.prototype.clone.call(this, e);
6953
6953
  }
6954
6954
  getClientRect() {
6955
6955
  return this.nodes().length > 0 ? super.getClientRect() : { x: 0, y: 0, width: 0, height: 0 };
@@ -7579,13 +7579,13 @@ const cl = function(e) {
7579
7579
  const t = Math.round(this.blurRadius());
7580
7580
  t > 0 && hl(e, t);
7581
7581
  };
7582
- m.addGetterSetter(_, "blurRadius", 0, I(), m.afterSetFilter);
7582
+ m.addGetterSetter(A, "blurRadius", 0, I(), m.afterSetFilter);
7583
7583
  const dl = function(a) {
7584
7584
  const e = this.brightness() * 255, t = a.data, i = t.length;
7585
7585
  for (let r = 0; r < i; r += 4)
7586
7586
  t[r] += e, t[r + 1] += e, t[r + 2] += e;
7587
7587
  };
7588
- m.addGetterSetter(_, "brightness", 0, I(), m.afterSetFilter);
7588
+ m.addGetterSetter(A, "brightness", 0, I(), m.afterSetFilter);
7589
7589
  const ul = function(a) {
7590
7590
  const e = this.brightness(), t = a.data, i = t.length;
7591
7591
  for (let r = 0; r < i; r += 4)
@@ -7596,7 +7596,7 @@ const ul = function(a) {
7596
7596
  for (let o = 0; o < i; o += 4)
7597
7597
  r = t[o], n = t[o + 1], s = t[o + 2], r /= 255, r -= 0.5, r *= e, r += 0.5, r *= 255, n /= 255, n -= 0.5, n *= e, n += 0.5, n *= 255, s /= 255, s -= 0.5, s *= e, s += 0.5, s *= 255, r = r < 0 ? 0 : r > 255 ? 255 : r, n = n < 0 ? 0 : n > 255 ? 255 : n, s = s < 0 ? 0 : s > 255 ? 255 : s, t[o] = r, t[o + 1] = n, t[o + 2] = s;
7598
7598
  };
7599
- m.addGetterSetter(_, "contrast", 0, I(), m.afterSetFilter);
7599
+ m.addGetterSetter(A, "contrast", 0, I(), m.afterSetFilter);
7600
7600
  const gl = function(a) {
7601
7601
  var e, t, i, r, n, s, o, l, h;
7602
7602
  const c = a.data, d = a.width, u = a.height, g = Math.min(1, Math.max(0, (t = (e = this.embossStrength) === null || e === void 0 ? void 0 : e.call(this)) !== null && t !== void 0 ? t : 0.5)), f = Math.min(1, Math.max(0, (r = (i = this.embossWhiteLevel) === null || i === void 0 ? void 0 : i.call(this)) !== null && r !== void 0 ? r : 0.5)), v = (o = {
@@ -7634,10 +7634,10 @@ const gl = function(a) {
7634
7634
  }
7635
7635
  return a;
7636
7636
  };
7637
- m.addGetterSetter(_, "embossStrength", 0.5, I(), m.afterSetFilter);
7638
- m.addGetterSetter(_, "embossWhiteLevel", 0.5, I(), m.afterSetFilter);
7639
- m.addGetterSetter(_, "embossDirection", "top-left", void 0, m.afterSetFilter);
7640
- m.addGetterSetter(_, "embossBlend", !1, void 0, m.afterSetFilter);
7637
+ m.addGetterSetter(A, "embossStrength", 0.5, I(), m.afterSetFilter);
7638
+ m.addGetterSetter(A, "embossWhiteLevel", 0.5, I(), m.afterSetFilter);
7639
+ m.addGetterSetter(A, "embossDirection", "top-left", void 0, m.afterSetFilter);
7640
+ m.addGetterSetter(A, "embossBlend", !1, void 0, m.afterSetFilter);
7641
7641
  function qi(a, e, t, i, r) {
7642
7642
  const n = t - e, s = r - i;
7643
7643
  if (n === 0)
@@ -7670,7 +7670,7 @@ const fl = function(a) {
7670
7670
  for (let w = 0; w < t; w += 4)
7671
7671
  e[w + 0] = qi(e[w + 0], i, r, f, g), e[w + 1] = qi(e[w + 1], s, o, v, y), e[w + 2] = qi(e[w + 2], h, c, T, C);
7672
7672
  };
7673
- m.addGetterSetter(_, "enhance", 0, I(), m.afterSetFilter);
7673
+ m.addGetterSetter(A, "enhance", 0, I(), m.afterSetFilter);
7674
7674
  const ml = function(a) {
7675
7675
  const e = a.data, t = e.length;
7676
7676
  for (let i = 0; i < t; i += 4) {
@@ -7678,9 +7678,9 @@ const ml = function(a) {
7678
7678
  e[i] = r, e[i + 1] = r, e[i + 2] = r;
7679
7679
  }
7680
7680
  };
7681
- m.addGetterSetter(_, "hue", 0, I(), m.afterSetFilter);
7682
- m.addGetterSetter(_, "saturation", 0, I(), m.afterSetFilter);
7683
- m.addGetterSetter(_, "luminance", 0, I(), m.afterSetFilter);
7681
+ m.addGetterSetter(A, "hue", 0, I(), m.afterSetFilter);
7682
+ m.addGetterSetter(A, "saturation", 0, I(), m.afterSetFilter);
7683
+ m.addGetterSetter(A, "luminance", 0, I(), m.afterSetFilter);
7684
7684
  const yl = function(a) {
7685
7685
  const e = a.data, t = e.length, i = 1, r = Math.pow(2, this.saturation()), n = Math.abs(this.hue() + 360) % 360, s = this.luminance() * 127, o = i * r * Math.cos(n * Math.PI / 180), l = i * r * Math.sin(n * Math.PI / 180), h = 0.299 * i + 0.701 * o + 0.167 * l, c = 0.587 * i - 0.587 * o + 0.33 * l, d = 0.114 * i - 0.114 * o - 0.497 * l, u = 0.299 * i - 0.299 * o - 0.328 * l, g = 0.587 * i + 0.413 * o + 0.035 * l, f = 0.114 * i - 0.114 * o + 0.293 * l, y = 0.299 * i - 0.3 * o + 1.25 * l, v = 0.587 * i - 0.586 * o - 1.05 * l, C = 0.114 * i + 0.886 * o - 0.2 * l;
7686
7686
  let T, w, b, E;
@@ -7693,9 +7693,9 @@ const yl = function(a) {
7693
7693
  e[C + 0] = l * T + h * w + c * b, e[C + 1] = d * T + u * w + g * b, e[C + 2] = f * T + y * w + v * b, e[C + 3] = E;
7694
7694
  }
7695
7695
  };
7696
- m.addGetterSetter(_, "hue", 0, I(), m.afterSetFilter);
7697
- m.addGetterSetter(_, "saturation", 0, I(), m.afterSetFilter);
7698
- m.addGetterSetter(_, "value", 0, I(), m.afterSetFilter);
7696
+ m.addGetterSetter(A, "hue", 0, I(), m.afterSetFilter);
7697
+ m.addGetterSetter(A, "saturation", 0, I(), m.afterSetFilter);
7698
+ m.addGetterSetter(A, "value", 0, I(), m.afterSetFilter);
7699
7699
  const Cl = function(a) {
7700
7700
  const e = a.data, t = e.length;
7701
7701
  for (let i = 0; i < t; i += 4)
@@ -7760,8 +7760,8 @@ const Cl = function(a) {
7760
7760
  }
7761
7761
  Tl(C, a, {});
7762
7762
  };
7763
- m.addGetterSetter(_, "kaleidoscopePower", 2, I(), m.afterSetFilter);
7764
- m.addGetterSetter(_, "kaleidoscopeAngle", 0, I(), m.afterSetFilter);
7763
+ m.addGetterSetter(A, "kaleidoscopePower", 2, I(), m.afterSetFilter);
7764
+ m.addGetterSetter(A, "kaleidoscopeAngle", 0, I(), m.afterSetFilter);
7765
7765
  function mi(a, e, t) {
7766
7766
  let i = (t * a.width + e) * 4;
7767
7767
  const r = [];
@@ -7864,13 +7864,13 @@ const Il = function(a) {
7864
7864
  let t = kl(a, e);
7865
7865
  return t && (t = Pl(t, a.width, a.height), t = _l(t, a.width, a.height), t = Al(t, a.width, a.height), xl(a, t)), a;
7866
7866
  };
7867
- m.addGetterSetter(_, "threshold", 0, I(), m.afterSetFilter);
7867
+ m.addGetterSetter(A, "threshold", 0, I(), m.afterSetFilter);
7868
7868
  const El = function(a) {
7869
7869
  const e = this.noise() * 255, t = a.data, i = t.length, r = e / 2;
7870
7870
  for (let n = 0; n < i; n += 4)
7871
7871
  t[n + 0] += r - 2 * r * Math.random(), t[n + 1] += r - 2 * r * Math.random(), t[n + 2] += r - 2 * r * Math.random();
7872
7872
  };
7873
- m.addGetterSetter(_, "noise", 0.2, I(), m.afterSetFilter);
7873
+ m.addGetterSetter(A, "noise", 0.2, I(), m.afterSetFilter);
7874
7874
  const Ll = function(a) {
7875
7875
  let e = Math.ceil(this.pixelSize()), t = a.width, i = a.height, r = Math.ceil(t / e), n = Math.ceil(i / e), s = a.data;
7876
7876
  if (e <= 0) {
@@ -7901,13 +7901,13 @@ const Ll = function(a) {
7901
7901
  }
7902
7902
  }
7903
7903
  };
7904
- m.addGetterSetter(_, "pixelSize", 8, I(), m.afterSetFilter);
7904
+ m.addGetterSetter(A, "pixelSize", 8, I(), m.afterSetFilter);
7905
7905
  const Rl = function(a) {
7906
7906
  const e = Math.round(this.levels() * 254) + 1, t = a.data, i = t.length, r = 255 / e;
7907
7907
  for (let n = 0; n < i; n += 1)
7908
7908
  t[n] = Math.floor(t[n] / r) * r;
7909
7909
  };
7910
- m.addGetterSetter(_, "levels", 0.5, I(), m.afterSetFilter);
7910
+ m.addGetterSetter(A, "levels", 0.5, I(), m.afterSetFilter);
7911
7911
  const Ml = function(a) {
7912
7912
  const e = a.data, t = e.length, i = this.red(), r = this.green(), n = this.blue();
7913
7913
  for (let s = 0; s < t; s += 4) {
@@ -7915,13 +7915,13 @@ const Ml = function(a) {
7915
7915
  e[s] = o * i, e[s + 1] = o * r, e[s + 2] = o * n, e[s + 3] = e[s + 3];
7916
7916
  }
7917
7917
  };
7918
- m.addGetterSetter(_, "red", 0, function(a) {
7918
+ m.addGetterSetter(A, "red", 0, function(a) {
7919
7919
  return this._filterUpToDate = !1, a > 255 ? 255 : a < 0 ? 0 : Math.round(a);
7920
7920
  });
7921
- m.addGetterSetter(_, "green", 0, function(a) {
7921
+ m.addGetterSetter(A, "green", 0, function(a) {
7922
7922
  return this._filterUpToDate = !1, a > 255 ? 255 : a < 0 ? 0 : Math.round(a);
7923
7923
  });
7924
- m.addGetterSetter(_, "blue", 0, as, m.afterSetFilter);
7924
+ m.addGetterSetter(A, "blue", 0, as, m.afterSetFilter);
7925
7925
  const Dl = function(a) {
7926
7926
  const e = a.data, t = e.length, i = this.red(), r = this.green(), n = this.blue(), s = this.alpha();
7927
7927
  for (let o = 0; o < t; o += 4) {
@@ -7929,14 +7929,14 @@ const Dl = function(a) {
7929
7929
  e[o] = i * s + e[o] * l, e[o + 1] = r * s + e[o + 1] * l, e[o + 2] = n * s + e[o + 2] * l;
7930
7930
  }
7931
7931
  };
7932
- m.addGetterSetter(_, "red", 0, function(a) {
7932
+ m.addGetterSetter(A, "red", 0, function(a) {
7933
7933
  return this._filterUpToDate = !1, a > 255 ? 255 : a < 0 ? 0 : Math.round(a);
7934
7934
  });
7935
- m.addGetterSetter(_, "green", 0, function(a) {
7935
+ m.addGetterSetter(A, "green", 0, function(a) {
7936
7936
  return this._filterUpToDate = !1, a > 255 ? 255 : a < 0 ? 0 : Math.round(a);
7937
7937
  });
7938
- m.addGetterSetter(_, "blue", 0, as, m.afterSetFilter);
7939
- m.addGetterSetter(_, "alpha", 1, function(a) {
7938
+ m.addGetterSetter(A, "blue", 0, as, m.afterSetFilter);
7939
+ m.addGetterSetter(A, "alpha", 1, function(a) {
7940
7940
  return this._filterUpToDate = !1, a > 1 ? 1 : a < 0 ? 0 : a;
7941
7941
  });
7942
7942
  const Ol = function(a) {
@@ -7957,7 +7957,7 @@ const Ol = function(a) {
7957
7957
  for (let r = 0; r < i; r += 1)
7958
7958
  t[r] = t[r] < e ? 0 : 255;
7959
7959
  };
7960
- m.addGetterSetter(_, "threshold", 0.5, I(), m.afterSetFilter);
7960
+ m.addGetterSetter(A, "threshold", 0.5, I(), m.afterSetFilter);
7961
7961
  const q = en.Util._assign(en, {
7962
7962
  Arc: De,
7963
7963
  Arrow: ot,
@@ -8525,14 +8525,14 @@ const Zl = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.o
8525
8525
  ["clip-audio", ah],
8526
8526
  ["clip-without-audio", oh]
8527
8527
  ]), yn = /* @__PURE__ */ new Map();
8528
- function Ce(a) {
8528
+ function ve(a) {
8529
8529
  return lh.get(a) ?? "";
8530
8530
  }
8531
8531
  function hh(a) {
8532
8532
  const e = yn.get(a);
8533
8533
  if (e)
8534
8534
  return e;
8535
- const t = Ce(a);
8535
+ const t = ve(a);
8536
8536
  if (!t)
8537
8537
  return null;
8538
8538
  const i = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`, r = typeof Image > "u" ? {
@@ -8545,10 +8545,10 @@ function hh(a) {
8545
8545
  return "decoding" in r && (r.decoding = "async"), r.src = i, yn.set(a, r), r;
8546
8546
  }
8547
8547
  const de = 3, Sn = 10, ch = 4, dh = 6, Cn = 8, vn = 14, Cr = 10, uh = 12, Tn = 4, Ns = 1, Li = 28, zs = 8, vr = 19, Tr = 15;
8548
- function Kt(a, e, t, i, r = A.white, n = A.black, s = 1) {
8548
+ function Kt(a, e, t, i, r = _.white, n = _.black, s = 1) {
8549
8549
  return new q.Rect({ x: a, y: e, width: t, height: i, fill: r, stroke: n, strokeWidth: s });
8550
8550
  }
8551
- function Ri(a, e, t, i = 12, r = "Arial", n = A.black, s = "left", o = "top") {
8551
+ function Ri(a, e, t, i = 12, r = "Arial", n = _.black, s = "left", o = "top") {
8552
8552
  return new q.Text({ text: a, x: e, y: t, fontSize: i, fontFamily: r, fill: n, align: s, verticalAlign: o });
8553
8553
  }
8554
8554
  function vt(a = 0, e = 0) {
@@ -8566,26 +8566,26 @@ function ph(a, e, t, i) {
8566
8566
  return !r || !n ? !1 : (r.x(0), r.y(0), r.width(de), r.height(t), n.x(e - de), n.y(0), n.width(de), n.height(t), !0);
8567
8567
  }
8568
8568
  function Vs(a, e, t) {
8569
- const i = e ? a.clipSelectedBorder : A.transparent, r = e ? Ns : 0;
8569
+ const i = e ? a.clipSelectedBorder : _.transparent, r = e ? Ns : 0;
8570
8570
  return t === "audio" ? {
8571
- background: A.audioClipBackground,
8571
+ background: _.audioClipBackground,
8572
8572
  label: a.audioClipText || a.clipName,
8573
8573
  accent: a.audioClipAccent || a.clipHandle,
8574
8574
  coverBackground: a.clipCoverBackground || Q.clipCoverBackground,
8575
8575
  border: i,
8576
8576
  borderWidth: r
8577
8577
  } : t === "text" ? {
8578
- background: A.textClipBackground,
8578
+ background: _.textClipBackground,
8579
8579
  label: a.clipName,
8580
8580
  accent: a.clipHandle,
8581
- coverBackground: a.clipCoverBackground || A.accentCoverFallback,
8581
+ coverBackground: a.clipCoverBackground || _.accentCoverFallback,
8582
8582
  border: i,
8583
8583
  borderWidth: r
8584
8584
  } : {
8585
- background: A.videoClipBackground,
8585
+ background: _.videoClipBackground,
8586
8586
  label: a.clipName,
8587
8587
  accent: a.clipHandle,
8588
- coverBackground: a.clipCoverBackground || A.accentCoverFallback,
8588
+ coverBackground: a.clipCoverBackground || _.accentCoverFallback,
8589
8589
  border: i,
8590
8590
  borderWidth: r
8591
8591
  };
@@ -8779,7 +8779,7 @@ function wh(a, e, t, i) {
8779
8779
  y: e,
8780
8780
  width: t,
8781
8781
  height: i,
8782
- stroke: A.clipSelectedBorder,
8782
+ stroke: _.clipSelectedBorder,
8783
8783
  strokeWidth: Ns,
8784
8784
  fillEnabled: !1
8785
8785
  });
@@ -9043,7 +9043,7 @@ class Od {
9043
9043
  p(this, "leftPadding", ue);
9044
9044
  this.stage = e, this.gridLayer = t, this.onTimeChange = r, this.onZoomChange = n, this.onScrollChange = s, this.config = {
9045
9045
  duration: i.duration || 36e5,
9046
- zoom: i.zoom || Te.MEDIUM,
9046
+ zoom: i.zoom || be.MEDIUM,
9047
9047
  currentTime: i.currentTime || 0,
9048
9048
  playState: i.playState || "paused",
9049
9049
  container: i.container,
@@ -9117,7 +9117,7 @@ class Od {
9117
9117
  handleZoom(e) {
9118
9118
  const t = e.evt.deltaY;
9119
9119
  if (t === 0) return;
9120
- const i = t > 0 ? 0.5 : 1.5, r = Math.max(Te.MIN, Math.min(Te.MAX, this.config.zoom * i));
9120
+ const i = t > 0 ? 0.5 : 1.5, r = Math.max(be.MIN, Math.min(be.MAX, this.config.zoom * i));
9121
9121
  if (r !== this.config.zoom) {
9122
9122
  this.animationFrameId && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
9123
9123
  const n = e.evt.offsetX;
@@ -11204,7 +11204,7 @@ ft.elementStyles = [], ft.shadowRootOptions = { mode: "open" }, ft[Wt("elementPr
11204
11204
  */
11205
11205
  const Yt = globalThis, Pn = (a) => a, Di = Yt.trustedTypes, _n = Di ? Di.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, js = "$lit$", Ne = `lit$${Math.random().toFixed(9).slice(2)}$`, Ks = "?" + Ne, Uh = `<${Ks}>`, rt = document, Zt = () => rt.createComment(""), Jt = (a) => a === null || typeof a != "object" && typeof a != "function", Or = Array.isArray, Wh = (a) => Or(a) || typeof (a == null ? void 0 : a[Symbol.iterator]) == "function", Ji = `[
11206
11206
  \f\r]`, It = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, An = /-->/g, In = />/g, Ke = RegExp(`>|${Ji}(?:([^\\s"'>=/]+)(${Ji}*=${Ji}*(?:[^
11207
- \f\r"'\`<>=]|("|')|))|$)`, "g"), En = /'/g, Ln = /"/g, Zs = /^(?:script|style|textarea|title)$/i, Yh = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), Z = Yh(1), nt = Symbol.for("lit-noChange"), le = Symbol.for("lit-nothing"), Rn = /* @__PURE__ */ new WeakMap(), et = rt.createTreeWalker(rt, 129);
11207
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), En = /'/g, Ln = /"/g, Zs = /^(?:script|style|textarea|title)$/i, Yh = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), K = Yh(1), nt = Symbol.for("lit-noChange"), le = Symbol.for("lit-nothing"), Rn = /* @__PURE__ */ new WeakMap(), et = rt.createTreeWalker(rt, 129);
11208
11208
  function Js(a, e) {
11209
11209
  if (!Or(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
11210
11210
  return _n !== void 0 ? _n.createHTML(e) : e;
@@ -11546,7 +11546,7 @@ class ic extends Qs {
11546
11546
  onMuteTrack: o,
11547
11547
  icons: l
11548
11548
  } = e;
11549
- return Z`
11549
+ return K`
11550
11550
  <style>
11551
11551
  .track-info-item:hover {
11552
11552
  background: ${t.buttonHover};
@@ -11556,7 +11556,7 @@ class ic extends Qs {
11556
11556
  background: ${t.buttonBackground};
11557
11557
  }
11558
11558
  </style>
11559
- ${s ? Z`<div class="track-info-spacer" style=${`height:${n}px;`}></div>` : null}
11559
+ ${s ? K`<div class="track-info-spacer" style=${`height:${n}px;`}></div>` : null}
11560
11560
  <div
11561
11561
  class="track-info-list"
11562
11562
  style=${`will-change:transform;transform:translateY(-${Math.max(0, r)}px);`}
@@ -11567,7 +11567,7 @@ class ic extends Qs {
11567
11567
  }
11568
11568
  renderTrackItem(e, t, i, r, n) {
11569
11569
  const s = e.type === "text" ? Me.TEXT : e.type === "video" ? Me.VIDEO : Me.AUDIO, o = e.type === "text" ? n.textTrack : e.type === "video" ? n.videoTrack : n.audioTrack, l = e.type === "text" ? e.isMuted ? n.hide : n.display : e.isMuted ? n.volumeMuted : n.volume, h = e.type === "text" ? e.isMuted ? "显示文本轨" : "隐藏文本轨" : e.isMuted ? "取消静音" : "静音";
11570
- return Z`
11570
+ return K`
11571
11571
  <div
11572
11572
  class="track-info-item"
11573
11573
  data-index=${String(t)}
@@ -11635,13 +11635,13 @@ class rc {
11635
11635
  p(this, "onMuteTrack");
11636
11636
  var n, s, o, l, h, c;
11637
11637
  this.container = e.container, this.width = e.width || 200, this.timeScaleHeight = e.timeScaleHeight || 40, this.includeTimeScaleSpacer = e.includeTimeScaleSpacer ?? !0, this.theme = {
11638
- background: ((n = e.theme) == null ? void 0 : n.background) || ve.background,
11639
- border: ((s = e.theme) == null ? void 0 : s.border) || ve.border,
11640
- text: ((o = e.theme) == null ? void 0 : o.text) || ve.text,
11641
- buttonBackground: ((l = e.theme) == null ? void 0 : l.buttonBackground) || ve.buttonBackground,
11642
- buttonHover: ((h = e.theme) == null ? void 0 : h.buttonHover) || ve.buttonHover,
11643
- buttonDanger: ((c = e.theme) == null ? void 0 : c.buttonDanger) || ve.buttonDanger
11644
- }, this.onMuteTrack = r, this.iconCache.set("OmAi-camera", Ce("OmAi-camera")), this.iconCache.set("OmAi-display", Ce("OmAi-display")), this.iconCache.set("OmAi-hide", Ce("OmAi-hide")), this.iconCache.set("OmAi-music", Ce("OmAi-music")), this.iconCache.set("OmAi-text", Ce("OmAi-text")), this.iconCache.set("OmAi-volume", Ce("OmAi-volume")), this.iconCache.set("OmAi-volume-mute", Ce("OmAi-volume-mute")), this.init();
11638
+ background: ((n = e.theme) == null ? void 0 : n.background) || Te.background,
11639
+ border: ((s = e.theme) == null ? void 0 : s.border) || Te.border,
11640
+ text: ((o = e.theme) == null ? void 0 : o.text) || Te.text,
11641
+ buttonBackground: ((l = e.theme) == null ? void 0 : l.buttonBackground) || Te.buttonBackground,
11642
+ buttonHover: ((h = e.theme) == null ? void 0 : h.buttonHover) || Te.buttonHover,
11643
+ buttonDanger: ((c = e.theme) == null ? void 0 : c.buttonDanger) || Te.buttonDanger
11644
+ }, this.onMuteTrack = r, this.iconCache.set("OmAi-camera", ve("OmAi-camera")), this.iconCache.set("OmAi-display", ve("OmAi-display")), this.iconCache.set("OmAi-hide", ve("OmAi-hide")), this.iconCache.set("OmAi-music", ve("OmAi-music")), this.iconCache.set("OmAi-text", ve("OmAi-text")), this.iconCache.set("OmAi-volume", ve("OmAi-volume")), this.iconCache.set("OmAi-volume-mute", ve("OmAi-volume-mute")), this.init();
11645
11645
  }
11646
11646
  init() {
11647
11647
  this.container.className = "track-info-panel", this.container.style.position = "relative", this.container.style.overflow = "hidden", this.container.style.width = `${this.width}px`, this.container.style.background = this.theme.background, this.container.style.borderRight = `1px solid ${this.theme.border}`, this.container.style.color = this.theme.text, this.renderer.mount(this.container), this.render();
@@ -11714,6 +11714,7 @@ const nc = {
11714
11714
  voiceCardTitle: "clip-config-voice-title",
11715
11715
  voiceCardSubtitle: "clip-config-voice-subtitle",
11716
11716
  voiceCardCheck: "clip-config-voice-check",
11717
+ voiceCardPreviewBadge: "clip-config-voice-preview-badge",
11717
11718
  voiceCheckbox: "clip-config-voice-checkbox",
11718
11719
  primaryButton: "clip-config-primary-button",
11719
11720
  errorText: "clip-config-error-text",
@@ -11725,7 +11726,7 @@ const nc = {
11725
11726
  class sc extends Qs {
11726
11727
  renderTemplate(e) {
11727
11728
  const { clip: t, theme: i, emptyStateIconSvg: r } = e;
11728
- return Z`
11729
+ return K`
11729
11730
  <style>
11730
11731
  @keyframes clip-config-voice-loading-spin {
11731
11732
  from { transform: rotate(0deg); }
@@ -11785,10 +11786,10 @@ class sc extends Qs {
11785
11786
  border-radius: 50%;
11786
11787
  appearance: none;
11787
11788
  -webkit-appearance: none;
11788
- background: radial-gradient(circle at 32% 30%, ${A.sliderThumbGlowStart} 0%, ${A.sliderThumbGlowEnd} 74%);
11789
+ background: radial-gradient(circle at 32% 30%, ${_.sliderThumbGlowStart} 0%, ${_.sliderThumbGlowEnd} 74%);
11789
11790
  box-shadow:
11790
11791
  var(--clip-slider-thumb-shadow),
11791
- ${ke.sliderThumbInnerShadow};
11792
+ ${Ce.sliderThumbInnerShadow};
11792
11793
  }
11793
11794
 
11794
11795
  .clip-config-panel .clip-config-slider::-moz-range-track {
@@ -11808,10 +11809,10 @@ class sc extends Qs {
11808
11809
  height: 9px;
11809
11810
  border: 1px solid var(--clip-slider-thumb-border);
11810
11811
  border-radius: 50%;
11811
- background: radial-gradient(circle at 32% 30%, ${A.sliderThumbGlowStart} 0%, ${A.sliderThumbGlowEnd} 74%);
11812
+ background: radial-gradient(circle at 32% 30%, ${_.sliderThumbGlowStart} 0%, ${_.sliderThumbGlowEnd} 74%);
11812
11813
  box-shadow:
11813
11814
  var(--clip-slider-thumb-shadow),
11814
- ${ke.sliderThumbInnerShadow};
11815
+ ${Ce.sliderThumbInnerShadow};
11815
11816
  }
11816
11817
  </style>
11817
11818
  <div class=${N.container} style=${this.getContainerStyle(i)}>
@@ -11821,7 +11822,7 @@ class sc extends Qs {
11821
11822
  `;
11822
11823
  }
11823
11824
  renderVoiceLoadingOverlay(e) {
11824
- return e.isVoiceLoadingOverlayVisible ? Z`
11825
+ return e.isVoiceLoadingOverlayVisible ? K`
11825
11826
  <div
11826
11827
  class=${N.voiceLoadingOverlay}
11827
11828
  style=${[
@@ -11870,7 +11871,7 @@ class sc extends Qs {
11870
11871
  ` : null;
11871
11872
  }
11872
11873
  renderEmptyState(e, t) {
11873
- return Z`
11874
+ return K`
11874
11875
  <div
11875
11876
  class=${N.emptyState}
11876
11877
  style=${`text-align:center;padding:40px 20px;color:${e.labelColor};`}
@@ -11884,7 +11885,7 @@ class sc extends Qs {
11884
11885
  }
11885
11886
  renderPanel(e) {
11886
11887
  const t = this.getAvailableTabs(e.clip);
11887
- return Z`
11888
+ return K`
11888
11889
  ${t.length > 1 ? this.renderTabBar(e, t) : null}
11889
11890
  <div
11890
11891
  class=${N.content}
@@ -11899,14 +11900,14 @@ class sc extends Qs {
11899
11900
  `;
11900
11901
  }
11901
11902
  renderTabBar(e, t) {
11902
- return Z`
11903
+ return K`
11903
11904
  <div
11904
11905
  class=${N.tabBar}
11905
- style=${`display:flex;gap:12px;padding:4px;background-color:${ke.tabBarBackground};border-radius:4px 4px 0 0;height:32px;`}
11906
+ style=${`display:flex;gap:12px;padding:4px;background-color:${Ce.tabBarBackground};border-radius:4px 4px 0 0;height:32px;`}
11906
11907
  >
11907
11908
  ${t.map((i) => {
11908
11909
  const r = e.activeTab === i;
11909
- return Z`
11910
+ return K`
11910
11911
  <button
11911
11912
  class=${N.tabButton}
11912
11913
  style=${[
@@ -11917,8 +11918,8 @@ class sc extends Qs {
11917
11918
  "font-size:13px",
11918
11919
  "font-family:inherit",
11919
11920
  "transition:background-color 0.15s, color 0.15s",
11920
- `background-color:${r ? ke.activeTabBackground : A.transparent}`,
11921
- `color:${r ? ke.activeTabText : ke.inactiveTabText}`,
11921
+ `background-color:${r ? Ce.activeTabBackground : _.transparent}`,
11922
+ `color:${r ? Ce.activeTabText : Ce.inactiveTabText}`,
11922
11923
  "border-radius:4px"
11923
11924
  ].join(";")}
11924
11925
  @click=${() => e.callbacks.onTabChange(i)}
@@ -11932,14 +11933,14 @@ class sc extends Qs {
11932
11933
  }
11933
11934
  renderActionBar(e) {
11934
11935
  const t = e.activeTab === "voice" && this.supportsVoicePanel(e.clip);
11935
- return Z`
11936
+ return K`
11936
11937
  <div
11937
11938
  class=${N.actionBar}
11938
11939
  style=${[
11939
11940
  `border-top:1px solid ${e.theme.borderColor}`,
11940
11941
  "border-radius:0 0 4px 4px",
11941
11942
  "min-height:32px",
11942
- `background-color:${ke.actionBarBackground}`,
11943
+ `background-color:${Ce.actionBarBackground}`,
11943
11944
  "padding:8px 10px"
11944
11945
  ].join(";")}
11945
11946
  >
@@ -11949,7 +11950,7 @@ class sc extends Qs {
11949
11950
  }
11950
11951
  renderVoiceActionBar(e) {
11951
11952
  const t = e.clip, i = !e.selectedVoiceId, r = (t == null ? void 0 : t.type) === "audio" ? "配音随文本更新" : "本次生成后随文本更新", n = (t == null ? void 0 : t.type) === "audio" ? "变换音色" : "生成配音";
11952
- return Z`
11953
+ return K`
11953
11954
  <div style="display:flex;align-items:center;justify-content:space-between;gap:12px;">
11954
11955
  <label
11955
11956
  class=${N.voiceCheckbox}
@@ -11971,7 +11972,7 @@ class sc extends Qs {
11971
11972
  "font-size:12px",
11972
11973
  "cursor:pointer",
11973
11974
  "transition:opacity 0.15s",
11974
- `background:${i ? e.theme.buttonBackground : ke.activeTabBackground}`,
11975
+ `background:${i ? e.theme.buttonBackground : Ce.activeTabBackground}`,
11975
11976
  `color:${i ? e.theme.labelColor : e.theme.buttonActiveText}`,
11976
11977
  i ? "opacity:0.7" : "opacity:1"
11977
11978
  ].join(";")}
@@ -11987,7 +11988,7 @@ class sc extends Qs {
11987
11988
  }
11988
11989
  renderVisualPanel(e) {
11989
11990
  const t = e.activeTab === "visual" ? "block" : "none";
11990
- return Z`
11991
+ return K`
11991
11992
  <div class=${N.visualPanel} style=${`display:${t};`}>
11992
11993
  ${this.renderPositionSection(e)}
11993
11994
  ${this.renderScaleSection(e)}
@@ -11995,7 +11996,7 @@ class sc extends Qs {
11995
11996
  `;
11996
11997
  }
11997
11998
  renderPositionSection(e) {
11998
- return Z`
11999
+ return K`
11999
12000
  <div class=${N.section} style="margin-bottom:16px;">
12000
12001
  ${this.renderSectionTitle("位置", e.theme)}
12001
12002
  ${this.renderPositionControl(e, "X", "x")}
@@ -12006,7 +12007,7 @@ class sc extends Qs {
12006
12007
  }
12007
12008
  renderScaleSection(e) {
12008
12009
  const t = this.getTransform(e.clip);
12009
- return Z`
12010
+ return K`
12010
12011
  <div
12011
12012
  class=${N.section}
12012
12013
  style=${`border-top:1px solid ${e.theme.borderColor};padding-top:16px;`}
@@ -12049,7 +12050,7 @@ class sc extends Qs {
12049
12050
  renderAudioPanel(e) {
12050
12051
  var r;
12051
12052
  const t = e.activeTab === "audio" ? "block" : "none", i = ((r = e.clip) == null ? void 0 : r.volume) ?? 1;
12052
- return Z`
12053
+ return K`
12053
12054
  <div class=${N.audioPanel} style=${`display:${t};`}>
12054
12055
  <div class=${N.section}>
12055
12056
  ${this.renderSectionTitle("音量", e.theme)}
@@ -12076,7 +12077,7 @@ class sc extends Qs {
12076
12077
  }
12077
12078
  renderTextPanel(e) {
12078
12079
  const t = e.clip, i = this.getTransform(t), r = qt(t == null ? void 0 : t.textStyle), n = e.activeTab === "text" ? "block" : "none";
12079
- return Z`
12080
+ return K`
12080
12081
  <div class=${N.textPanel} style=${`display:${n};`}>
12081
12082
  <div class=${N.section} style="margin-bottom:16px;">
12082
12083
  ${this.renderSectionTitle("文本", e.theme)}
@@ -12159,7 +12160,7 @@ class sc extends Qs {
12159
12160
  { key: "普通话", label: "普通话" },
12160
12161
  { key: "粤语", label: "粤语" }
12161
12162
  ], r = e.voiceCatalog.filter((n) => !e.activeVoiceFilterTag || n.tags.includes(e.activeVoiceFilterTag));
12162
- return Z`
12163
+ return K`
12163
12164
  <div class=${N.voicePanel} style=${`display:${t};`}>
12164
12165
  <div class=${N.section} style="margin-bottom:16px;">
12165
12166
  <div class=${N.filterGroup} style="display:flex;gap:8px;flex-wrap:wrap;">
@@ -12176,15 +12177,15 @@ class sc extends Qs {
12176
12177
  <div class=${N.voiceCardGrid} style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:8px;">
12177
12178
  ${r.map((n) => this.renderVoiceCard(e, n))}
12178
12179
  </div>
12179
- ${r.length === 0 ? Z`
12180
+ ${r.length === 0 ? K`
12180
12181
  <div style=${`padding:16px 0;font-size:12px;color:${e.theme.labelColor};`}>
12181
12182
  当前筛选下暂无音色
12182
12183
  </div>
12183
12184
  ` : null}
12184
- ${e.voiceErrorMessage ? Z`
12185
+ ${e.voiceErrorMessage ? K`
12185
12186
  <div
12186
12187
  class=${N.errorText}
12187
- style=${`padding-top:12px;font-size:12px;color:${A.accentDanger};`}
12188
+ style=${`padding-top:12px;font-size:12px;color:${_.accentDanger};`}
12188
12189
  >
12189
12190
  ${e.voiceErrorMessage}
12190
12191
  </div>
@@ -12194,7 +12195,7 @@ class sc extends Qs {
12194
12195
  `;
12195
12196
  }
12196
12197
  renderFilterButton(e, t, i, r, n) {
12197
- return Z`
12198
+ return K`
12198
12199
  <button
12199
12200
  class=${N.filterButton}
12200
12201
  style=${[
@@ -12203,7 +12204,7 @@ class sc extends Qs {
12203
12204
  "border-radius:999px",
12204
12205
  "cursor:pointer",
12205
12206
  "font-size:12px",
12206
- `background:${r ? ke.activeTabBackground : e.theme.buttonBackground}`,
12207
+ `background:${r ? Ce.activeTabBackground : e.theme.buttonBackground}`,
12207
12208
  `color:${r ? e.theme.buttonActiveText : e.theme.textColor}`
12208
12209
  ].join(";")}
12209
12210
  data-key=${t}
@@ -12214,8 +12215,8 @@ class sc extends Qs {
12214
12215
  `;
12215
12216
  }
12216
12217
  renderVoiceCard(e, t) {
12217
- const i = e.selectedVoiceId === t.id, r = t.avatar;
12218
- return Z`
12218
+ const i = e.selectedVoiceId === t.id, r = e.previewingVoiceId === t.id, n = t.avatar;
12219
+ return K`
12219
12220
  <button
12220
12221
  class=${N.voiceCard}
12221
12222
  style=${[
@@ -12230,7 +12231,7 @@ class sc extends Qs {
12230
12231
  "cursor:pointer",
12231
12232
  "border:none",
12232
12233
  `outline:${i ? `1px solid ${e.theme.buttonActiveBorder}` : "none"}`,
12233
- `background:${i ? ke.activeTabBackground : e.theme.buttonBackground}`,
12234
+ `background:${i ? Ce.activeTabBackground : e.theme.buttonBackground}`,
12234
12235
  `color:${e.theme.textColor}`
12235
12236
  ].join(";")}
12236
12237
  @click=${() => e.callbacks.onVoiceSelect(t.id)}
@@ -12245,20 +12246,49 @@ class sc extends Qs {
12245
12246
  "display:flex",
12246
12247
  "align-items:center",
12247
12248
  "justify-content:center",
12248
- `background:${r ? `url(${r}) center / cover no-repeat` : "linear-gradient(135deg, #6c7080 0%, #424656 100%)"}`,
12249
- `color:${A.white}`,
12249
+ `background:${n ? `url(${n}) center / cover no-repeat` : "linear-gradient(135deg, #6c7080 0%, #424656 100%)"}`,
12250
+ `color:${_.white}`,
12250
12251
  "font-size:18px",
12251
12252
  "font-weight:600"
12252
12253
  ].join(";")}
12253
12254
  >
12254
- ${r ? "" : t.name.slice(0, 1)}
12255
+ ${n ? "" : t.name.slice(0, 1)}
12255
12256
  </div>
12256
12257
  <div class=${N.voiceCardMeta} style="flex:1;min-width:0;">
12257
12258
  <div
12258
12259
  class=${N.voiceCardTitle}
12259
- style=${`font-size:14px;color:${A.white};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`}
12260
+ style=${[
12261
+ "display:flex",
12262
+ "align-items:center",
12263
+ "gap:6px",
12264
+ "padding-right:24px",
12265
+ "font-size:14px",
12266
+ `color:${_.white}`,
12267
+ "white-space:nowrap",
12268
+ "overflow:hidden",
12269
+ "text-overflow:ellipsis"
12270
+ ].join(";")}
12260
12271
  >
12261
- ${t.name}
12272
+ <span style="overflow:hidden;text-overflow:ellipsis;">${t.name}</span>
12273
+ ${r ? K`
12274
+ <span
12275
+ class=${N.voiceCardPreviewBadge}
12276
+ style=${[
12277
+ "display:inline-flex",
12278
+ "align-items:center",
12279
+ "justify-content:center",
12280
+ "flex-shrink:0",
12281
+ "padding:1px 6px",
12282
+ "border-radius:999px",
12283
+ "font-size:10px",
12284
+ "line-height:16px",
12285
+ `background:${_.white}`,
12286
+ `color:${Ce.activeTabBackground}`
12287
+ ].join(";")}
12288
+ >
12289
+ 试听中
12290
+ </span>
12291
+ ` : null}
12262
12292
  </div>
12263
12293
  <div
12264
12294
  class=${N.voiceCardSubtitle}
@@ -12267,7 +12297,7 @@ class sc extends Qs {
12267
12297
  ${t.lang} · ${t.emotion}
12268
12298
  </div>
12269
12299
  </div>
12270
- ${i ? Z`
12300
+ ${i ? K`
12271
12301
  <div
12272
12302
  class=${N.voiceCardCheck}
12273
12303
  style="position:absolute;top:50%;right:8px;transform:translateY(-42%);"
@@ -12280,7 +12310,7 @@ class sc extends Qs {
12280
12310
  }
12281
12311
  renderPositionControl(e, t, i) {
12282
12312
  const r = this.getTransform(e.clip), n = r.scale / 2, s = -n, o = 1 + n;
12283
- return Z`
12313
+ return K`
12284
12314
  <div
12285
12315
  class=${N.row}
12286
12316
  style="display:flex;align-items:center;gap:8px;margin-bottom:8px;"
@@ -12320,12 +12350,12 @@ class sc extends Qs {
12320
12350
  { label: "↓ 下中", x: "center", y: "bottom" },
12321
12351
  { label: "↘ 右下", x: "right", y: "bottom" }
12322
12352
  ];
12323
- return Z`
12353
+ return K`
12324
12354
  <div
12325
12355
  class=${N.presetGrid}
12326
12356
  style="display:grid;grid-template-columns:repeat(3, 1fr);gap:4px;"
12327
12357
  >
12328
- ${t.map((i) => Z`
12358
+ ${t.map((i) => K`
12329
12359
  <button
12330
12360
  class=${N.presetButton}
12331
12361
  style=${[
@@ -12349,7 +12379,7 @@ class sc extends Qs {
12349
12379
  `;
12350
12380
  }
12351
12381
  renderSectionTitle(e, t) {
12352
- return Z`
12382
+ return K`
12353
12383
  <div
12354
12384
  class=${N.sectionTitle}
12355
12385
  style=${`font-size:12px;color:${t.labelColor};margin-bottom:8px;text-transform:uppercase;`}
@@ -12359,7 +12389,7 @@ class sc extends Qs {
12359
12389
  `;
12360
12390
  }
12361
12391
  renderRangeInput(e) {
12362
- return Z`
12392
+ return K`
12363
12393
  <input
12364
12394
  type="range"
12365
12395
  class=${N.slider}
@@ -12373,7 +12403,7 @@ class sc extends Qs {
12373
12403
  `;
12374
12404
  }
12375
12405
  renderNumberInput(e, t) {
12376
- return Z`
12406
+ return K`
12377
12407
  <input
12378
12408
  type="number"
12379
12409
  class=${N.input}
@@ -12395,7 +12425,7 @@ class sc extends Qs {
12395
12425
  `;
12396
12426
  }
12397
12427
  renderLabeledNumberInput(e, t, i, r, n = "0.01", s = "-9999", o = "9999") {
12398
- return Z`
12428
+ return K`
12399
12429
  <label style="display:flex;align-items:center;gap:8px;">
12400
12430
  <span style=${`min-width:18px;font-size:13px;color:${e.theme.labelColor};`}>${t}</span>
12401
12431
  ${this.renderNumberInput(e.theme, {
@@ -12419,11 +12449,11 @@ class sc extends Qs {
12419
12449
  "flex-direction:column",
12420
12450
  "overflow:hidden",
12421
12451
  "height:100%",
12422
- `--clip-slider-fill-start:${A.sliderFillStart}`,
12423
- `--clip-slider-fill-end:${A.sliderFillEnd}`,
12424
- `--clip-slider-road:${A.sliderRoad}`,
12425
- `--clip-slider-thumb-border:${A.sliderThumbBorder}`,
12426
- `--clip-slider-thumb-shadow:${ke.sliderThumbShadow}`
12452
+ `--clip-slider-fill-start:${_.sliderFillStart}`,
12453
+ `--clip-slider-fill-end:${_.sliderFillEnd}`,
12454
+ `--clip-slider-road:${_.sliderRoad}`,
12455
+ `--clip-slider-thumb-border:${_.sliderThumbBorder}`,
12456
+ `--clip-slider-thumb-shadow:${Ce.sliderThumbShadow}`
12427
12457
  ].join(";");
12428
12458
  }
12429
12459
  getSliderStyle(e, t, i) {
@@ -12475,12 +12505,17 @@ class oc {
12475
12505
  p(this, "isVoiceLoadingOverlayExiting", !1);
12476
12506
  p(this, "voiceLoadingOverlayHideTimer", null);
12477
12507
  p(this, "voiceErrorMessage", null);
12478
- this.container = e.container, this.theme = e.theme ?? ac, this.voiceCatalog = e.voiceCatalog ?? [], this.onClipUpdate = e.onClipUpdate, this.onGenerateVoice = e.onGenerateVoice, this.iconCache.set("OmAi-camera", Ce("OmAi-camera")), this.iconCache.set("OmAi-accept", Ce("OmAi-accept")), this.iconCache.set("OmAi-loading", Ce("OmAi-loading")), this.iconCache.set("OmAi-text", Ce("OmAi-text")), this.renderer.mount(this.container), this.render();
12508
+ p(this, "voicePreviewAudio", null);
12509
+ p(this, "previewingVoiceId", null);
12510
+ p(this, "handleVoicePreviewEnded", () => {
12511
+ this.stopVoicePreview();
12512
+ });
12513
+ this.container = e.container, this.theme = e.theme ?? ac, this.voiceCatalog = e.voiceCatalog ?? [], this.onClipUpdate = e.onClipUpdate, this.onGenerateVoice = e.onGenerateVoice, this.iconCache.set("OmAi-camera", ve("OmAi-camera")), this.iconCache.set("OmAi-accept", ve("OmAi-accept")), this.iconCache.set("OmAi-loading", ve("OmAi-loading")), this.iconCache.set("OmAi-text", ve("OmAi-text")), this.renderer.mount(this.container), this.render();
12479
12514
  }
12480
12515
  setClip(e) {
12481
12516
  var n;
12482
12517
  const t = ((n = this.currentClip) == null ? void 0 : n.id) ?? null, i = (e == null ? void 0 : e.id) ?? null, r = t !== i;
12483
- this.currentClip = e, r ? (this.voiceErrorMessage = null, this.textDraftContent = (e == null ? void 0 : e.textContent) ?? (e == null ? void 0 : e.name) ?? "", this.syncVoiceStateForClip(e)) : (e == null ? void 0 : e.type) === "text" ? this.textDraftContent = e.textContent ?? e.name ?? "" : (e == null ? void 0 : e.type) === "audio" && e.ttsSourceTextClipId ? (this.followTextUpdates = e.ttsFollowTextUpdates ?? !1, e.ttsVoiceId && (this.selectedVoiceId = e.ttsVoiceId), this.ensureVoiceFilters()) : e || this.resetVoiceState(), this.syncActiveTab(e), this.render();
12518
+ r && this.stopVoicePreview(!1), this.currentClip = e, r ? (this.voiceErrorMessage = null, this.textDraftContent = (e == null ? void 0 : e.textContent) ?? (e == null ? void 0 : e.name) ?? "", this.syncVoiceStateForClip(e)) : (e == null ? void 0 : e.type) === "text" ? this.textDraftContent = e.textContent ?? e.name ?? "" : (e == null ? void 0 : e.type) === "audio" && e.ttsSourceTextClipId ? (this.followTextUpdates = e.ttsFollowTextUpdates ?? !1, e.ttsVoiceId && (this.selectedVoiceId = e.ttsVoiceId), this.ensureVoiceFilters()) : e || this.resetVoiceState(), this.syncActiveTab(e), this.render();
12484
12519
  }
12485
12520
  setPreferredTab(e) {
12486
12521
  this.pendingPreferredTab = e;
@@ -12499,7 +12534,7 @@ class oc {
12499
12534
  }, 180), this.render();
12500
12535
  }
12501
12536
  destroy() {
12502
- this.voiceLoadingOverlayHideTimer !== null && (window.clearTimeout(this.voiceLoadingOverlayHideTimer), this.voiceLoadingOverlayHideTimer = null), this.renderer.destroy();
12537
+ this.stopVoicePreview(!1), this.voiceLoadingOverlayHideTimer !== null && (window.clearTimeout(this.voiceLoadingOverlayHideTimer), this.voiceLoadingOverlayHideTimer = null), this.renderer.destroy();
12503
12538
  }
12504
12539
  render() {
12505
12540
  this.renderer.update({
@@ -12512,6 +12547,7 @@ class oc {
12512
12547
  textDraftContent: this.textDraftContent,
12513
12548
  voiceCatalog: this.voiceCatalog,
12514
12549
  selectedVoiceId: this.selectedVoiceId,
12550
+ previewingVoiceId: this.previewingVoiceId,
12515
12551
  activeVoiceFilterTag: this.activeVoiceFilterTag,
12516
12552
  followTextUpdates: this.followTextUpdates,
12517
12553
  isVoiceLoadingOverlayVisible: this.isVoiceLoadingOverlayRendered,
@@ -12558,7 +12594,7 @@ class oc {
12558
12594
  return e ? e.type === "text" ? ["text", "voice"] : e.type === "audio" ? e.ttsSourceTextClipId ? ["audio", "voice"] : ["audio"] : ["visual", "audio"] : [];
12559
12595
  }
12560
12596
  resetVoiceState() {
12561
- this.selectedVoiceId = null, this.activeVoiceFilterTag = null, this.followTextUpdates = !1;
12597
+ this.selectedVoiceId = null, this.activeVoiceFilterTag = null, this.followTextUpdates = !1, this.stopVoicePreview(!1);
12562
12598
  }
12563
12599
  syncVoiceStateForClip(e) {
12564
12600
  if (!e || !this.supportsVoicePanel(e)) {
@@ -12603,8 +12639,17 @@ class oc {
12603
12639
  const t = e === "男" || e === "女" || e === "普通话" || e === "粤语" ? e : null;
12604
12640
  this.activeVoiceFilterTag = this.activeVoiceFilterTag === t ? null : t, this.ensureVoiceFilters(), this.render();
12605
12641
  }
12606
- handleVoiceSelect(e) {
12607
- this.selectedVoiceId = e, this.voiceErrorMessage = null, this.render();
12642
+ async handleVoiceSelect(e) {
12643
+ const t = this.voiceCatalog.find((r) => r.id === e) ?? null, i = this.previewingVoiceId === e;
12644
+ if (this.selectedVoiceId = e, this.voiceErrorMessage = null, this.render(), !(t != null && t.audiofile)) {
12645
+ this.stopVoicePreview();
12646
+ return;
12647
+ }
12648
+ if (i) {
12649
+ this.stopVoicePreview();
12650
+ return;
12651
+ }
12652
+ await this.playVoicePreview(t);
12608
12653
  }
12609
12654
  handleVoiceFollowTextUpdatesChange(e) {
12610
12655
  var t;
@@ -12650,6 +12695,33 @@ class oc {
12650
12695
  const i = { ...this.currentClip.visualTransform ?? { x: 0.5, y: 0.5, scale: 1 } };
12651
12696
  e.x !== void 0 && (i.x = this.clampValue("x", e.x)), e.y !== void 0 && (i.y = this.clampValue("y", e.y)), e.scale !== void 0 && (i.scale = this.clampValue("scale", e.scale)), this.currentClip = { ...this.currentClip, visualTransform: i }, this.render(), this.onClipUpdate(this.currentClip.id, { visualTransform: i });
12652
12697
  }
12698
+ stopVoicePreview(e = !0) {
12699
+ if (this.voicePreviewAudio) {
12700
+ this.voicePreviewAudio.removeEventListener("ended", this.handleVoicePreviewEnded), this.voicePreviewAudio.pause();
12701
+ try {
12702
+ this.voicePreviewAudio.currentTime = 0;
12703
+ } catch {
12704
+ }
12705
+ this.voicePreviewAudio = null;
12706
+ }
12707
+ if (this.previewingVoiceId !== null) {
12708
+ this.previewingVoiceId = null, e && this.render();
12709
+ return;
12710
+ }
12711
+ e && this.render();
12712
+ }
12713
+ async playVoicePreview(e) {
12714
+ if (!e.audiofile)
12715
+ return;
12716
+ this.stopVoicePreview(!1);
12717
+ const t = new Audio(e.audiofile);
12718
+ t.preload = "auto", t.addEventListener("ended", this.handleVoicePreviewEnded), this.voicePreviewAudio = t, this.previewingVoiceId = e.id, this.render();
12719
+ try {
12720
+ await t.play();
12721
+ } catch (i) {
12722
+ this.voicePreviewAudio === t && (this.stopVoicePreview(!1), this.voiceErrorMessage = i instanceof Error ? i.message : "试听播放失败", this.render());
12723
+ }
12724
+ }
12653
12725
  handleTextContentInput(e) {
12654
12726
  this.textDraftContent = e, this.render();
12655
12727
  }
@@ -12911,7 +12983,7 @@ class Dn {
12911
12983
  return this.updateCurrentTime(t);
12912
12984
  }
12913
12985
  setZoom(e) {
12914
- const t = Math.max(Te.MIN, Math.min(Te.MAX, e));
12986
+ const t = Math.max(be.MIN, Math.min(be.MAX, e));
12915
12987
  return this.updateZoom(t);
12916
12988
  }
12917
12989
  setSpeed(e) {
@@ -13601,7 +13673,7 @@ function ir(a, e) {
13601
13673
  function bc(a) {
13602
13674
  return Math.min(Tc, Math.max(vc, a));
13603
13675
  }
13604
- function we(a) {
13676
+ function ke(a) {
13605
13677
  return {
13606
13678
  x: ir(a == null ? void 0 : a.x, tr.x),
13607
13679
  y: ir(a == null ? void 0 : a.y, tr.y),
@@ -13609,7 +13681,7 @@ function we(a) {
13609
13681
  };
13610
13682
  }
13611
13683
  function Br(a, e, t = 1e-4) {
13612
- const i = we(a), r = we(e);
13684
+ const i = ke(a), r = ke(e);
13613
13685
  return Math.abs(i.x - r.x) <= t && Math.abs(i.y - r.y) <= t && Math.abs(i.scale - r.scale) <= t;
13614
13686
  }
13615
13687
  function ea(a, e) {
@@ -13636,7 +13708,7 @@ function ea(a, e) {
13636
13708
  };
13637
13709
  }
13638
13710
  function Hn(a, e, t) {
13639
- const i = ea(a, e), r = we(t), n = i.width * r.scale, s = i.height * r.scale, o = a.width * r.x, l = a.height * r.y;
13711
+ const i = ea(a, e), r = ke(t), n = i.width * r.scale, s = i.height * r.scale, o = a.width * r.x, l = a.height * r.y;
13640
13712
  return {
13641
13713
  left: o - n / 2,
13642
13714
  top: l - s / 2,
@@ -13647,16 +13719,16 @@ function Hn(a, e, t) {
13647
13719
  };
13648
13720
  }
13649
13721
  function ta(a, e, t, i) {
13650
- const r = we(a), n = i.width > 0 ? i.width : 1, s = i.height > 0 ? i.height : 1;
13651
- return we({
13722
+ const r = ke(a), n = i.width > 0 ? i.width : 1, s = i.height > 0 ? i.height : 1;
13723
+ return ke({
13652
13724
  x: r.x + e / n,
13653
13725
  y: r.y + t / s,
13654
13726
  scale: r.scale
13655
13727
  });
13656
13728
  }
13657
13729
  function wc(a, e, t, i, r, n) {
13658
- const s = we(n), o = Math.max(r.width / 2, 1), l = Math.max(r.height / 2, 1), h = Math.abs(t - a) / o, c = Math.abs(i - e) / l;
13659
- return we({
13730
+ const s = ke(n), o = Math.max(r.width / 2, 1), l = Math.max(r.height / 2, 1), h = Math.abs(t - a) / o, c = Math.abs(i - e) / l;
13731
+ return ke({
13660
13732
  x: s.x,
13661
13733
  y: s.y,
13662
13734
  scale: Math.max(h, c)
@@ -14095,7 +14167,7 @@ class Fc {
14095
14167
  const t = document.createElement("div");
14096
14168
  t.className = this.dependencies.rootClassName ?? "timeline-preview-root", t.style.position = "relative", t.style.width = "100%", t.style.height = "100%", t.style.overflow = "hidden";
14097
14169
  const i = document.createElement("div");
14098
- i.className = this.dependencies.frameClassName ?? "timeline-preview-frame", i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.overflow = "hidden", i.style.background = A.black, t.appendChild(i);
14170
+ i.className = this.dependencies.frameClassName ?? "timeline-preview-frame", i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.overflow = "hidden", i.style.background = _.black, t.appendChild(i);
14099
14171
  const r = document.createElement("div");
14100
14172
  r.className = "timeline-preview-text-layer", r.style.position = "absolute", r.style.inset = "0", r.style.pointerEvents = "none", r.style.zIndex = "2000", i.appendChild(r);
14101
14173
  const n = document.createElement("div");
@@ -14159,14 +14231,14 @@ class Fc {
14159
14231
  }
14160
14232
  createMediaElement(e, t) {
14161
14233
  const i = this.dependencies.createMediaElement, r = i ? i(e, t) : document.createElement(e === "video" ? "video" : "audio");
14162
- return r.preload = t === "preload" ? "auto" : "metadata", r.crossOrigin = "anonymous", r.loop = !1, r.controls = !1, Nn(r) ? (r.playsInline = !0, r.disablePictureInPicture = !0, r.style.position = "absolute", r.style.inset = "0", r.style.width = "100%", r.style.height = "100%", r.style.objectFit = "fill", r.style.background = A.black, r.style.pointerEvents = "none") : r.style.display = "none", r;
14234
+ return r.preload = t === "preload" ? "auto" : "metadata", r.crossOrigin = "anonymous", r.loop = !1, r.controls = !1, Nn(r) ? (r.playsInline = !0, r.disablePictureInPicture = !0, r.style.position = "absolute", r.style.inset = "0", r.style.width = "100%", r.style.height = "100%", r.style.objectFit = "fill", r.style.background = _.black, r.style.pointerEvents = "none") : r.style.display = "none", r;
14163
14235
  }
14164
14236
  createSlot(e, t, i) {
14165
14237
  var T, w;
14166
14238
  const r = this.createMediaElement(t, i), n = t === "video" ? document.createElement("div") : null;
14167
14239
  if (n) {
14168
14240
  const b = this.dependencies.slotClassNamePrefix ?? "timeline-preview-slot";
14169
- n.className = `${b} timeline-preview-slot--${e} timeline-preview-slot--${i}`, n.style.position = "absolute", n.style.overflow = "hidden", n.style.background = A.black, n.style.pointerEvents = "none", n.style.display = "none", n.appendChild(r), (T = this.frameElement) == null || T.appendChild(n);
14241
+ n.className = `${b} timeline-preview-slot--${e} timeline-preview-slot--${i}`, n.style.position = "absolute", n.style.overflow = "hidden", n.style.background = _.black, n.style.pointerEvents = "none", n.style.display = "none", n.appendChild(r), (T = this.frameElement) == null || T.appendChild(n);
14170
14242
  }
14171
14243
  const s = {
14172
14244
  role: i,
@@ -14970,7 +15042,7 @@ class Fc {
14970
15042
  }
14971
15043
  getEffectiveVisualTransform(e) {
14972
15044
  var t;
14973
- return ((t = this.transientVisualTransform) == null ? void 0 : t.clipId) === e.clip.id ? this.transientVisualTransform.transform : we(e.clip.visualTransform);
15045
+ return ((t = this.transientVisualTransform) == null ? void 0 : t.clipId) === e.clip.id ? this.transientVisualTransform.transform : ke(e.clip.visualTransform);
14974
15046
  }
14975
15047
  }
14976
15048
  class $c extends Fc {
@@ -15492,17 +15564,17 @@ class ud {
15492
15564
  }
15493
15565
  init(e) {
15494
15566
  var i, r, n, s;
15495
- const t = ((i = e.theme) == null ? void 0 : i.background) || ve.background;
15567
+ const t = ((i = e.theme) == null ? void 0 : i.background) || Te.background;
15496
15568
  this.panel = new rc(
15497
15569
  {
15498
15570
  container: e.container,
15499
15571
  theme: {
15500
15572
  background: t,
15501
- border: ((r = e.theme) == null ? void 0 : r.border) || ve.border,
15502
- text: ((n = e.theme) == null ? void 0 : n.clipName) || ve.text,
15503
- buttonBackground: ((s = e.theme) == null ? void 0 : s.clipBackground) || ve.buttonBackground,
15504
- buttonHover: ve.buttonHover,
15505
- buttonDanger: ve.buttonDanger
15573
+ border: ((r = e.theme) == null ? void 0 : r.border) || Te.border,
15574
+ text: ((n = e.theme) == null ? void 0 : n.clipName) || Te.text,
15575
+ buttonBackground: ((s = e.theme) == null ? void 0 : s.clipBackground) || Te.buttonBackground,
15576
+ buttonHover: Te.buttonHover,
15577
+ buttonDanger: Te.buttonDanger
15506
15578
  },
15507
15579
  width: 200,
15508
15580
  timeScaleHeight: e.timeScaleHeight || 40,
@@ -15983,7 +16055,7 @@ class Sd {
15983
16055
  `background:${t.background}`,
15984
16056
  `color:${t.clipName}`
15985
16057
  ].join(";");
15986
- return Z`
16058
+ return K`
15987
16059
  <div
15988
16060
  class="timeline-manager-header-corner"
15989
16061
  data-layout-role="header-corner"
@@ -16359,7 +16431,7 @@ class wd {
16359
16431
  });
16360
16432
  this.stage = e, this.layer = t, this.onTimeChange = r, this.onScrollChange = n, this.config = {
16361
16433
  duration: i.duration || 36e5,
16362
- zoom: i.zoom || Te.MEDIUM,
16434
+ zoom: i.zoom || be.MEDIUM,
16363
16435
  currentTime: i.currentTime || 0,
16364
16436
  playState: i.playState || "paused",
16365
16437
  container: i.container,
@@ -16938,7 +17010,7 @@ class $d {
16938
17010
  p(this, "splitOperationDepth", 0);
16939
17011
  this.config = {
16940
17012
  duration: e.duration || 36e5,
16941
- zoom: e.zoom || Te.MEDIUM,
17013
+ zoom: e.zoom || be.MEDIUM,
16942
17014
  currentTime: e.currentTime || 0,
16943
17015
  playState: e.playState || "paused",
16944
17016
  container: e.container,
@@ -17010,7 +17082,7 @@ class $d {
17010
17082
  getTimelineStore() {
17011
17083
  var e, t, i, r, n;
17012
17084
  if (!this.timelineStore) {
17013
- const s = ((e = this.config) == null ? void 0 : e.currentTime) ?? 0, o = ((t = this.config) == null ? void 0 : t.playState) ?? "paused", l = ((i = this.config) == null ? void 0 : i.speed) || 1, h = ((r = this.config) == null ? void 0 : r.zoom) || Te.MEDIUM, c = ((n = this.config) == null ? void 0 : n.duration) || 36e5;
17085
+ const s = ((e = this.config) == null ? void 0 : e.currentTime) ?? 0, o = ((t = this.config) == null ? void 0 : t.playState) ?? "paused", l = ((i = this.config) == null ? void 0 : i.speed) || 1, h = ((r = this.config) == null ? void 0 : r.zoom) || be.MEDIUM, c = ((n = this.config) == null ? void 0 : n.duration) || 36e5;
17014
17086
  this.timelineStore = new Jn({
17015
17087
  currentTime: s,
17016
17088
  playState: o,
@@ -17224,7 +17296,7 @@ class $d {
17224
17296
  ensureConfigState() {
17225
17297
  return this.config || (this.config = {
17226
17298
  duration: 36e5,
17227
- zoom: Te.MEDIUM,
17299
+ zoom: be.MEDIUM,
17228
17300
  currentTime: 0,
17229
17301
  playState: "paused",
17230
17302
  theme: Ai(),
@@ -17798,7 +17870,7 @@ class $d {
17798
17870
  return i && Math.abs(t) >= Math.abs(e) ? t : e;
17799
17871
  }
17800
17872
  handleWheelZoom(e, t) {
17801
- const i = this.getZoomState(), r = Math.exp(-e * 2e-3), n = Math.max(Te.MIN, Math.min(Te.MAX, i * r));
17873
+ const i = this.getZoomState(), r = Math.exp(-e * 2e-3), n = Math.max(be.MIN, Math.min(be.MAX, i * r));
17802
17874
  Math.abs(n - i) < 1e-4 || this.setZoomCenteredOnTimelinePointer(n, this.getWheelAnchorPointerX(t));
17803
17875
  }
17804
17876
  getWheelAnchorPointerX(e) {
@@ -18146,7 +18218,7 @@ class $d {
18146
18218
  endTime: t + s,
18147
18219
  thumbnails: d,
18148
18220
  style: e.style,
18149
- visualTransform: r || i === "video" ? we(e.visualTransform) : e.visualTransform,
18221
+ visualTransform: r || i === "video" ? ke(e.visualTransform) : e.visualTransform,
18150
18222
  separatedAudioClipId: e.separatedAudioClipId,
18151
18223
  separatedFromVideoClipId: e.separatedFromVideoClipId,
18152
18224
  volume: e.volume ?? 1,
@@ -18330,7 +18402,7 @@ class $d {
18330
18402
  endTimeAtSource: Math.round(n.endTimeAtSource),
18331
18403
  sourceDuration: Math.round(n.sourceDuration),
18332
18404
  thumbnails: n.thumbnails,
18333
- visualTransform: n.type === "video" || n.type === "text" ? we(n.visualTransform) : void 0,
18405
+ visualTransform: n.type === "video" || n.type === "text" ? ke(n.visualTransform) : void 0,
18334
18406
  separatedAudioClipId: n.separatedAudioClipId,
18335
18407
  separatedFromVideoClipId: n.separatedFromVideoClipId,
18336
18408
  volume: n.volume ?? 1,
@@ -18473,7 +18545,7 @@ class $d {
18473
18545
  if (e.length === 0) return;
18474
18546
  const t = Math.min(...e.map((h) => h.startTime)), r = (Math.max(...e.map((h) => h.endTime)) - t) / 1e3, n = ((l = this.stage) == null ? void 0 : l.width()) || 0, s = n - ue * 2;
18475
18547
  M.debugLazy("TimelineManager", () => "适合缩放", () => ({ duration: r, containerWidth: n, availableWidth: s }));
18476
- const o = Math.min(s / r, Te.MAX);
18548
+ const o = Math.min(s / r, be.MAX);
18477
18549
  if (this.setZoom(o), this.timeline) {
18478
18550
  const h = e.reduce((c, d) => d.startTime < c.startTime ? d : c);
18479
18551
  this.scrollToClip(h.id);
@@ -19981,7 +20053,7 @@ class $d {
19981
20053
  const i = this.getClips().find((s) => s.id === e);
19982
20054
  if (!i || i.type !== "video" && i.type !== "text")
19983
20055
  return;
19984
- const r = we(i.visualTransform), n = we(t);
20056
+ const r = ke(i.visualTransform), n = ke(t);
19985
20057
  Br(r, n) || this.updateClip(e, {
19986
20058
  visualTransform: n
19987
20059
  });
@@ -20026,7 +20098,7 @@ export {
20026
20098
  rc as TrackInfoPanel,
20027
20099
  md as TrackManager,
20028
20100
  ua as ZOOM_ANIMATION,
20029
- Te as ZOOM_PRESETS,
20101
+ be as ZOOM_PRESETS,
20030
20102
  pa as createClipViewState,
20031
20103
  ss as createClipWithViewState,
20032
20104
  ar as defaultDarkTheme,