audio-mixer-ui 0.1.1 → 0.1.3
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/audio-mixer-ui.js +564 -521
- package/dist/audio-mixer-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/audio-mixer-ui.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as B, watch as L, unref as P, onScopeDispose as Fe, readonly as _e, mergeModels as pe, useCssVars as W, computed as _, useTemplateRef as H, useModel as q, createElementBlock as k, openBlock as S, normalizeClass as w, createElementVNode as p, createCommentVNode as ie, Fragment as oe, renderList as fe, normalizeStyle as Ue, renderSlot as ve, toDisplayString as R, onUnmounted as ge, watchEffect as Se, onMounted as Pe, createVNode as x, withCtx as F, createTextVNode as be, withDirectives as Ve, withKeys as qe, vModelText as Le, createBlock as ye } from "vue";
|
|
2
2
|
import { defineStore as Me } from "pinia";
|
|
3
|
-
var
|
|
3
|
+
var Oe = function() {
|
|
4
4
|
if (typeof Map < "u")
|
|
5
5
|
return Map;
|
|
6
6
|
function e(t, a) {
|
|
7
7
|
var n = -1;
|
|
8
|
-
return t.some(function(s,
|
|
9
|
-
return s[0] === a ? (n =
|
|
8
|
+
return t.some(function(s, o) {
|
|
9
|
+
return s[0] === a ? (n = o, !0) : !1;
|
|
10
10
|
}), n;
|
|
11
11
|
}
|
|
12
12
|
return (
|
|
@@ -39,47 +39,47 @@ var Ie = function() {
|
|
|
39
39
|
this.__entries__.splice(0);
|
|
40
40
|
}, t.prototype.forEach = function(a, n) {
|
|
41
41
|
n === void 0 && (n = null);
|
|
42
|
-
for (var s = 0,
|
|
43
|
-
var
|
|
44
|
-
a.call(n,
|
|
42
|
+
for (var s = 0, o = this.__entries__; s < o.length; s++) {
|
|
43
|
+
var u = o[s];
|
|
44
|
+
a.call(n, u[1], u[0]);
|
|
45
45
|
}
|
|
46
46
|
}, t;
|
|
47
47
|
}()
|
|
48
48
|
);
|
|
49
|
-
}(),
|
|
49
|
+
}(), he = typeof window < "u" && typeof document < "u" && window.document === document, le = function() {
|
|
50
50
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
51
|
-
}(),
|
|
52
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
51
|
+
}(), We = function() {
|
|
52
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(le) : function(e) {
|
|
53
53
|
return setTimeout(function() {
|
|
54
54
|
return e(Date.now());
|
|
55
55
|
}, 1e3 / 60);
|
|
56
56
|
};
|
|
57
|
-
}(),
|
|
58
|
-
function
|
|
57
|
+
}(), He = 2;
|
|
58
|
+
function je(e, t) {
|
|
59
59
|
var a = !1, n = !1, s = 0;
|
|
60
|
-
function
|
|
61
|
-
a && (a = !1, e()), n &&
|
|
60
|
+
function o() {
|
|
61
|
+
a && (a = !1, e()), n && f();
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function u() {
|
|
64
|
+
We(o);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var
|
|
66
|
+
function f() {
|
|
67
|
+
var d = Date.now();
|
|
68
68
|
if (a) {
|
|
69
|
-
if (
|
|
69
|
+
if (d - s < He)
|
|
70
70
|
return;
|
|
71
71
|
n = !0;
|
|
72
72
|
} else
|
|
73
|
-
a = !0, n = !1, setTimeout(
|
|
74
|
-
s =
|
|
73
|
+
a = !0, n = !1, setTimeout(u, t);
|
|
74
|
+
s = d;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return f;
|
|
77
77
|
}
|
|
78
|
-
var
|
|
78
|
+
var Ge = 20, Ze = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Ke = typeof MutationObserver < "u", Ye = (
|
|
79
79
|
/** @class */
|
|
80
80
|
function() {
|
|
81
81
|
function e() {
|
|
82
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
82
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = je(this.refresh.bind(this), Ge);
|
|
83
83
|
}
|
|
84
84
|
return e.prototype.addObserver = function(t) {
|
|
85
85
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
@@ -97,24 +97,24 @@ var Ze = 20, Ke = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
97
97
|
return a.broadcastActive();
|
|
98
98
|
}), t.length > 0;
|
|
99
99
|
}, e.prototype.connect_ = function() {
|
|
100
|
-
!
|
|
100
|
+
!he || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Ke ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
101
101
|
attributes: !0,
|
|
102
102
|
childList: !0,
|
|
103
103
|
characterData: !0,
|
|
104
104
|
subtree: !0
|
|
105
105
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
106
106
|
}, e.prototype.disconnect_ = function() {
|
|
107
|
-
!
|
|
107
|
+
!he || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
108
108
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
109
|
-
var a = t.propertyName, n = a === void 0 ? "" : a, s =
|
|
110
|
-
return !!~n.indexOf(
|
|
109
|
+
var a = t.propertyName, n = a === void 0 ? "" : a, s = Ze.some(function(o) {
|
|
110
|
+
return !!~n.indexOf(o);
|
|
111
111
|
});
|
|
112
112
|
s && this.refresh();
|
|
113
113
|
}, e.getInstance = function() {
|
|
114
114
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
115
115
|
}, e.instance_ = null, e;
|
|
116
116
|
}()
|
|
117
|
-
),
|
|
117
|
+
), Ie = function(e, t) {
|
|
118
118
|
for (var a = 0, n = Object.keys(t); a < n.length; a++) {
|
|
119
119
|
var s = n[a];
|
|
120
120
|
Object.defineProperty(e, s, {
|
|
@@ -127,57 +127,57 @@ var Ze = 20, Ke = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
127
127
|
return e;
|
|
128
128
|
}, Q = function(e) {
|
|
129
129
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
130
|
-
return t ||
|
|
131
|
-
},
|
|
132
|
-
function
|
|
130
|
+
return t || le;
|
|
131
|
+
}, Re = de(0, 0, 0, 0);
|
|
132
|
+
function ue(e) {
|
|
133
133
|
return parseFloat(e) || 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ke(e) {
|
|
136
136
|
for (var t = [], a = 1; a < arguments.length; a++)
|
|
137
137
|
t[a - 1] = arguments[a];
|
|
138
138
|
return t.reduce(function(n, s) {
|
|
139
|
-
var
|
|
140
|
-
return n +
|
|
139
|
+
var o = e["border-" + s + "-width"];
|
|
140
|
+
return n + ue(o);
|
|
141
141
|
}, 0);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Qe(e) {
|
|
144
144
|
for (var t = ["top", "right", "bottom", "left"], a = {}, n = 0, s = t; n < s.length; n++) {
|
|
145
|
-
var
|
|
146
|
-
a[
|
|
145
|
+
var o = s[n], u = e["padding-" + o];
|
|
146
|
+
a[o] = ue(u);
|
|
147
147
|
}
|
|
148
148
|
return a;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Xe(e) {
|
|
151
151
|
var t = e.getBBox();
|
|
152
|
-
return
|
|
152
|
+
return de(0, 0, t.width, t.height);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Je(e) {
|
|
155
155
|
var t = e.clientWidth, a = e.clientHeight;
|
|
156
156
|
if (!t && !a)
|
|
157
|
-
return
|
|
158
|
-
var n = Q(e).getComputedStyle(e), s =
|
|
159
|
-
if (n.boxSizing === "border-box" && (Math.round(
|
|
160
|
-
var r = Math.round(
|
|
161
|
-
Math.abs(r) !== 1 && (
|
|
157
|
+
return Re;
|
|
158
|
+
var n = Q(e).getComputedStyle(e), s = Qe(n), o = s.left + s.right, u = s.top + s.bottom, f = ue(n.width), d = ue(n.height);
|
|
159
|
+
if (n.boxSizing === "border-box" && (Math.round(f + o) !== t && (f -= ke(n, "left", "right") + o), Math.round(d + u) !== a && (d -= ke(n, "top", "bottom") + u)), !tt(e)) {
|
|
160
|
+
var r = Math.round(f + o) - t, c = Math.round(d + u) - a;
|
|
161
|
+
Math.abs(r) !== 1 && (f -= r), Math.abs(c) !== 1 && (d -= c);
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return de(s.left, s.top, f, d);
|
|
164
164
|
}
|
|
165
|
-
var
|
|
165
|
+
var et = /* @__PURE__ */ function() {
|
|
166
166
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
167
167
|
return e instanceof Q(e).SVGGraphicsElement;
|
|
168
168
|
} : function(e) {
|
|
169
169
|
return e instanceof Q(e).SVGElement && typeof e.getBBox == "function";
|
|
170
170
|
};
|
|
171
171
|
}();
|
|
172
|
-
function
|
|
172
|
+
function tt(e) {
|
|
173
173
|
return e === Q(e).document.documentElement;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function at(e) {
|
|
176
|
+
return he ? et(e) ? Xe(e) : Je(e) : Re;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
var t = e.x, a = e.y, n = e.width, s = e.height,
|
|
180
|
-
return
|
|
178
|
+
function nt(e) {
|
|
179
|
+
var t = e.x, a = e.y, n = e.width, s = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, u = Object.create(o.prototype);
|
|
180
|
+
return Ie(u, {
|
|
181
181
|
x: t,
|
|
182
182
|
y: a,
|
|
183
183
|
width: n,
|
|
@@ -186,39 +186,39 @@ function st(e) {
|
|
|
186
186
|
right: t + n,
|
|
187
187
|
bottom: s + a,
|
|
188
188
|
left: t
|
|
189
|
-
}),
|
|
189
|
+
}), u;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function de(e, t, a, n) {
|
|
192
192
|
return { x: e, y: t, width: a, height: n };
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var st = (
|
|
195
195
|
/** @class */
|
|
196
196
|
function() {
|
|
197
197
|
function e(t) {
|
|
198
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
198
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = de(0, 0, 0, 0), this.target = t;
|
|
199
199
|
}
|
|
200
200
|
return e.prototype.isActive = function() {
|
|
201
|
-
var t =
|
|
201
|
+
var t = at(this.target);
|
|
202
202
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
203
203
|
}, e.prototype.broadcastRect = function() {
|
|
204
204
|
var t = this.contentRect_;
|
|
205
205
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
206
206
|
}, e;
|
|
207
207
|
}()
|
|
208
|
-
),
|
|
208
|
+
), rt = (
|
|
209
209
|
/** @class */
|
|
210
210
|
/* @__PURE__ */ function() {
|
|
211
211
|
function e(t, a) {
|
|
212
|
-
var n =
|
|
213
|
-
|
|
212
|
+
var n = nt(a);
|
|
213
|
+
Ie(this, { target: t, contentRect: n });
|
|
214
214
|
}
|
|
215
215
|
return e;
|
|
216
216
|
}()
|
|
217
|
-
),
|
|
217
|
+
), it = (
|
|
218
218
|
/** @class */
|
|
219
219
|
function() {
|
|
220
220
|
function e(t, a, n) {
|
|
221
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
221
|
+
if (this.activeObservations_ = [], this.observations_ = new Oe(), typeof t != "function")
|
|
222
222
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
223
223
|
this.callback_ = t, this.controller_ = a, this.callbackCtx_ = n;
|
|
224
224
|
}
|
|
@@ -229,7 +229,7 @@ var rt = (
|
|
|
229
229
|
if (!(t instanceof Q(t).Element))
|
|
230
230
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
231
231
|
var a = this.observations_;
|
|
232
|
-
a.has(t) || (a.set(t, new
|
|
232
|
+
a.has(t) || (a.set(t, new st(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
233
233
|
}
|
|
234
234
|
}, e.prototype.unobserve = function(t) {
|
|
235
235
|
if (!arguments.length)
|
|
@@ -250,7 +250,7 @@ var rt = (
|
|
|
250
250
|
}, e.prototype.broadcastActive = function() {
|
|
251
251
|
if (this.hasActive()) {
|
|
252
252
|
var t = this.callbackCtx_, a = this.activeObservations_.map(function(n) {
|
|
253
|
-
return new
|
|
253
|
+
return new rt(n.target, n.broadcastRect());
|
|
254
254
|
});
|
|
255
255
|
this.callback_.call(t, a, t), this.clearActive();
|
|
256
256
|
}
|
|
@@ -260,7 +260,7 @@ var rt = (
|
|
|
260
260
|
return this.activeObservations_.length > 0;
|
|
261
261
|
}, e;
|
|
262
262
|
}()
|
|
263
|
-
),
|
|
263
|
+
), Ae = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Oe(), Ne = (
|
|
264
264
|
/** @class */
|
|
265
265
|
/* @__PURE__ */ function() {
|
|
266
266
|
function e(t) {
|
|
@@ -268,8 +268,8 @@ var rt = (
|
|
|
268
268
|
throw new TypeError("Cannot call a class as a function.");
|
|
269
269
|
if (!arguments.length)
|
|
270
270
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
271
|
-
var a =
|
|
272
|
-
|
|
271
|
+
var a = Ye.getInstance(), n = new it(t, a, this);
|
|
272
|
+
Ae.set(this, n);
|
|
273
273
|
}
|
|
274
274
|
return e;
|
|
275
275
|
}()
|
|
@@ -281,44 +281,44 @@ var rt = (
|
|
|
281
281
|
].forEach(function(e) {
|
|
282
282
|
Ne.prototype[e] = function() {
|
|
283
283
|
var t;
|
|
284
|
-
return (t =
|
|
284
|
+
return (t = Ae.get(this))[e].apply(t, arguments);
|
|
285
285
|
};
|
|
286
286
|
});
|
|
287
|
-
var
|
|
288
|
-
return typeof
|
|
287
|
+
var ot = function() {
|
|
288
|
+
return typeof le.ResizeObserver < "u" ? le.ResizeObserver : Ne;
|
|
289
289
|
}();
|
|
290
|
-
function
|
|
291
|
-
const t =
|
|
290
|
+
function j(e) {
|
|
291
|
+
const t = B(0), a = B(0);
|
|
292
292
|
let n = null;
|
|
293
293
|
const s = () => {
|
|
294
294
|
n && (n.disconnect(), n = null);
|
|
295
295
|
};
|
|
296
|
-
return
|
|
296
|
+
return L(() => P(e), () => {
|
|
297
297
|
s();
|
|
298
|
-
const
|
|
299
|
-
if (!
|
|
300
|
-
n = new
|
|
301
|
-
const r =
|
|
298
|
+
const u = P(e);
|
|
299
|
+
if (!u) return;
|
|
300
|
+
n = new ot((d) => {
|
|
301
|
+
const r = d[0];
|
|
302
302
|
r && (t.value = r.contentRect.width, a.value = r.contentRect.height);
|
|
303
|
-
}), n.observe(
|
|
304
|
-
const
|
|
305
|
-
t.value =
|
|
303
|
+
}), n.observe(u);
|
|
304
|
+
const f = u.getBoundingClientRect();
|
|
305
|
+
t.value = f.width, a.value = f.height;
|
|
306
306
|
}, { immediate: !0 }), Fe(s), {
|
|
307
|
-
width:
|
|
308
|
-
height:
|
|
307
|
+
width: _e(t),
|
|
308
|
+
height: _e(a)
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const A = (e, t) => {
|
|
312
312
|
const a = e.__vccOpts || e;
|
|
313
313
|
for (const [n, s] of t)
|
|
314
314
|
a[n] = s;
|
|
315
315
|
return a;
|
|
316
|
-
},
|
|
316
|
+
}, lt = {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "level"
|
|
319
|
-
},
|
|
319
|
+
}, ut = {
|
|
320
320
|
__name: "AudioSlider",
|
|
321
|
-
props: /* @__PURE__ */
|
|
321
|
+
props: /* @__PURE__ */ pe({
|
|
322
322
|
min: { type: Number, default: 0 },
|
|
323
323
|
max: { type: Number, default: 1 },
|
|
324
324
|
step: { type: Number, default: 0.01 },
|
|
@@ -333,71 +333,71 @@ const L = (e, t) => {
|
|
|
333
333
|
}),
|
|
334
334
|
emits: ["update:value"],
|
|
335
335
|
setup(e) {
|
|
336
|
-
|
|
337
|
-
"3d436468":
|
|
338
|
-
"345b6e65":
|
|
339
|
-
"3327b972":
|
|
340
|
-
"5ae48cf2":
|
|
341
|
-
"01a7bd27":
|
|
336
|
+
W((i) => ({
|
|
337
|
+
"3d436468": h.value,
|
|
338
|
+
"345b6e65": M.value,
|
|
339
|
+
"3327b972": V.value,
|
|
340
|
+
"5ae48cf2": y.value,
|
|
341
|
+
"01a7bd27": g.value
|
|
342
342
|
}));
|
|
343
|
-
const t = e, a =
|
|
343
|
+
const t = e, a = H("root"), { width: n, height: s } = j(a), o = _(() => Math.min(n.value, s.value)), u = _(() => Math.max(n.value, s.value)), f = _(() => n.value > s.value), d = _(() => f.value ? "h-slide" : "v-slide"), r = q(e, "value"), c = _(() => o.value * 0.8), b = _(() => o.value * t.thumbLength * 0.8), M = _(() => (f.value ? b : c).value + "px"), h = _(() => (f.value ? c : b).value + "px"), y = _(() => o.value * 0.1 + "px"), g = _(() => (u.value - b.value) * (r.value - t.min) / (t.max - t.min) + "px"), V = _(() => f.value ? "90deg" : "0deg"), E = B(!1), G = B(0), $ = (i) => {
|
|
344
344
|
if (!a.value) return r.value;
|
|
345
|
-
const
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
348
|
-
const
|
|
349
|
-
|
|
345
|
+
const v = a.value.getBoundingClientRect(), T = i.touches ? i.touches[0].clientX : i.clientX, I = i.touches ? i.touches[0].clientY : i.clientY;
|
|
346
|
+
let N;
|
|
347
|
+
if (f.value) {
|
|
348
|
+
const z = T - v.left - c.value / 2, ae = v.width - c.value;
|
|
349
|
+
N = Math.max(0, Math.min(1, z / ae));
|
|
350
350
|
} else {
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const z = v.bottom - I - c.value / 2, ae = v.height - c.value;
|
|
352
|
+
N = Math.max(0, Math.min(1, z / ae));
|
|
353
353
|
}
|
|
354
|
-
const
|
|
355
|
-
return t.step > 0 ? Math.round(
|
|
356
|
-
}, J = (
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
if (
|
|
362
|
-
if (
|
|
354
|
+
const U = t.min + N * (t.max - t.min);
|
|
355
|
+
return t.step > 0 ? Math.round(U / t.step) * t.step : U;
|
|
356
|
+
}, J = (i) => {
|
|
357
|
+
i.preventDefault(), E.value = !0, G.value = r.value, r.value = $(i), a.value && a.value.setPointerCapture && a.value.setPointerCapture(i.pointerId), document.addEventListener("mousemove", D), document.addEventListener("mouseup", Z);
|
|
358
|
+
}, D = (i) => {
|
|
359
|
+
E.value && (i.preventDefault(), r.value = $(i));
|
|
360
|
+
}, Z = (i) => {
|
|
361
|
+
if (E.value) {
|
|
362
|
+
if (i.preventDefault(), E.value = !1, a.value && a.value.releasePointerCapture)
|
|
363
363
|
try {
|
|
364
|
-
a.value.releasePointerCapture(
|
|
364
|
+
a.value.releasePointerCapture(i.pointerId);
|
|
365
365
|
} catch {
|
|
366
366
|
}
|
|
367
|
-
document.removeEventListener("mousemove",
|
|
367
|
+
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", Z);
|
|
368
368
|
}
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
return (
|
|
377
|
-
class: w(
|
|
369
|
+
}, ee = (i) => {
|
|
370
|
+
i.preventDefault(), i.touches.length === 1 && (E.value = !0, G.value = r.value, r.value = $(i), document.addEventListener("touchmove", K, { passive: !1 }), document.addEventListener("touchend", O), document.addEventListener("touchcancel", O));
|
|
371
|
+
}, K = (i) => {
|
|
372
|
+
E.value && (i.preventDefault(), i.touches.length === 1 && (r.value = $(i)));
|
|
373
|
+
}, O = (i) => {
|
|
374
|
+
E.value && (i.preventDefault(), E.value = !1, document.removeEventListener("touchmove", K), document.removeEventListener("touchend", O), document.removeEventListener("touchcancel", O));
|
|
375
|
+
}, te = (i) => Math.min(1, Math.max(0, t.level * 10 - i + 1));
|
|
376
|
+
return (i, v) => (S(), k("div", {
|
|
377
|
+
class: w(d.value),
|
|
378
378
|
ref_key: "root",
|
|
379
379
|
ref: a,
|
|
380
380
|
onMousedown: J,
|
|
381
|
-
onTouchstart:
|
|
381
|
+
onTouchstart: ee,
|
|
382
382
|
style: { userSelect: "none", touchAction: "none" }
|
|
383
383
|
}, [
|
|
384
|
-
|
|
385
|
-
e.showLevel ? (
|
|
386
|
-
(
|
|
387
|
-
class: w(["led", "led" +
|
|
384
|
+
v[0] || (v[0] = p("div", { class: "track" }, null, -1)),
|
|
385
|
+
e.showLevel ? (S(), k("div", lt, [
|
|
386
|
+
(S(), k(oe, null, fe(10, (T) => p("div", {
|
|
387
|
+
class: w(["led", "led" + T])
|
|
388
388
|
}, [
|
|
389
|
-
|
|
389
|
+
p("div", {
|
|
390
390
|
class: "on",
|
|
391
|
-
style: Ue({ opacity:
|
|
391
|
+
style: Ue({ opacity: te(T) })
|
|
392
392
|
}, null, 4)
|
|
393
393
|
], 2)), 64))
|
|
394
|
-
])) :
|
|
395
|
-
|
|
396
|
-
class: w(["thumb", { dragging:
|
|
394
|
+
])) : ie("", !0),
|
|
395
|
+
p("div", {
|
|
396
|
+
class: w(["thumb", { dragging: E.value, [e.colour]: !0, [e.style]: !0 }])
|
|
397
397
|
}, null, 2)
|
|
398
398
|
], 34));
|
|
399
399
|
}
|
|
400
|
-
},
|
|
400
|
+
}, ce = /* @__PURE__ */ A(ut, [["__scopeId", "data-v-1580ed15"]]), ct = {
|
|
401
401
|
__name: "TitleText",
|
|
402
402
|
props: {
|
|
403
403
|
align: {
|
|
@@ -406,23 +406,23 @@ const L = (e, t) => {
|
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
setup(e) {
|
|
409
|
-
|
|
410
|
-
"5fddb56d":
|
|
409
|
+
W((f) => ({
|
|
410
|
+
"5fddb56d": u.value
|
|
411
411
|
}));
|
|
412
|
-
const t =
|
|
413
|
-
return (
|
|
412
|
+
const t = H("el"), { width: a, height: n } = j(t), s = _(() => Math.min(a.value, n.value)), o = _(() => a.value > n.value ? "h-text" : "v-text"), u = _(() => s.value * 3 / 4 + "px");
|
|
413
|
+
return (f, d) => (S(), k("div", {
|
|
414
414
|
ref_key: "el",
|
|
415
415
|
ref: t,
|
|
416
416
|
class: "outer"
|
|
417
417
|
}, [
|
|
418
|
-
|
|
419
|
-
class: w({ [
|
|
418
|
+
p("div", {
|
|
419
|
+
class: w({ [o.value]: !0, [e.align]: !0 })
|
|
420
420
|
}, [
|
|
421
|
-
|
|
421
|
+
ve(f.$slots, "default", {}, void 0, !0)
|
|
422
422
|
], 2)
|
|
423
423
|
], 512));
|
|
424
424
|
}
|
|
425
|
-
},
|
|
425
|
+
}, $e = /* @__PURE__ */ A(ct, [["__scopeId", "data-v-3ce29e77"]]), dt = {
|
|
426
426
|
__name: "TriState",
|
|
427
427
|
props: {
|
|
428
428
|
mute: { default: !1 },
|
|
@@ -432,37 +432,37 @@ const L = (e, t) => {
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["update:mute", "update:solo"],
|
|
434
434
|
setup(e) {
|
|
435
|
-
const t =
|
|
436
|
-
function
|
|
435
|
+
const t = q(e, "mute"), a = q(e, "solo"), n = H("outer"), { width: s, height: o } = j(n), u = _(() => s.value > o.value * 1.9);
|
|
436
|
+
function f() {
|
|
437
437
|
t.value = !t.value, a.value = !1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function d() {
|
|
440
440
|
a.value = !a.value, t.value = !1;
|
|
441
441
|
}
|
|
442
|
-
return (r, c) => (
|
|
442
|
+
return (r, c) => (S(), k("div", {
|
|
443
443
|
class: "outer",
|
|
444
444
|
ref_key: "outer",
|
|
445
445
|
ref: n
|
|
446
446
|
}, [
|
|
447
|
-
|
|
447
|
+
p("div", {
|
|
448
448
|
class: w(["solo", { on: a.value }]),
|
|
449
|
-
onClick:
|
|
449
|
+
onClick: d
|
|
450
450
|
}, null, 2),
|
|
451
|
-
|
|
451
|
+
p("div", {
|
|
452
452
|
class: "s-label",
|
|
453
|
-
onClick:
|
|
454
|
-
},
|
|
455
|
-
|
|
453
|
+
onClick: d
|
|
454
|
+
}, R(u.value ? "SOLO" : "S"), 1),
|
|
455
|
+
p("div", {
|
|
456
456
|
class: w(["mute", { on: t.value }]),
|
|
457
|
-
onClick:
|
|
457
|
+
onClick: f
|
|
458
458
|
}, null, 2),
|
|
459
|
-
|
|
459
|
+
p("div", {
|
|
460
460
|
class: "m-label",
|
|
461
|
-
onClick:
|
|
462
|
-
},
|
|
461
|
+
onClick: f
|
|
462
|
+
}, R(u.value ? "MUTE" : "M"), 1)
|
|
463
463
|
], 512));
|
|
464
464
|
}
|
|
465
|
-
},
|
|
465
|
+
}, ht = /* @__PURE__ */ A(dt, [["__scopeId", "data-v-143eade0"]]), me = {
|
|
466
466
|
// Enable development UI features (animations, random data, etc.)
|
|
467
467
|
enabled: !1,
|
|
468
468
|
// Specific feature flags
|
|
@@ -474,7 +474,7 @@ const L = (e, t) => {
|
|
|
474
474
|
// Enable other debug/dev features as needed
|
|
475
475
|
debugMode: !1
|
|
476
476
|
}
|
|
477
|
-
}, ea = () =>
|
|
477
|
+
}, ea = () => me.enabled, De = (e) => me.enabled && me.features[e], X = Me("audioState", {
|
|
478
478
|
state: () => ({
|
|
479
479
|
// Playback state
|
|
480
480
|
isPlaying: !1,
|
|
@@ -548,7 +548,7 @@ const L = (e, t) => {
|
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
}),
|
|
551
|
+
}), se = Me("musicData", {
|
|
552
552
|
state: () => ({
|
|
553
553
|
// Musical structure
|
|
554
554
|
beats: [],
|
|
@@ -565,10 +565,12 @@ const L = (e, t) => {
|
|
|
565
565
|
getters: {
|
|
566
566
|
// Get time for a specific bar and repeat
|
|
567
567
|
getTimeFromBar: (e) => (t, a = 0) => {
|
|
568
|
-
|
|
568
|
+
let n = e.beats.find(
|
|
569
569
|
(s) => s.bar === t && s.beat === 1 && s.repeat === a
|
|
570
570
|
);
|
|
571
|
-
return n
|
|
571
|
+
return n || (n = e.beats.find(
|
|
572
|
+
(s) => s.bar === t && s.beat === 1
|
|
573
|
+
)), n ? n.time : null;
|
|
572
574
|
},
|
|
573
575
|
// Get bar info from time
|
|
574
576
|
getBarFromTime: (e) => (t) => {
|
|
@@ -599,7 +601,14 @@ const L = (e, t) => {
|
|
|
599
601
|
}), Array.from(t).sort((a, n) => a - n);
|
|
600
602
|
},
|
|
601
603
|
// Check if a bar has repeats
|
|
602
|
-
hasRepeats: (e) => (t) => e.beats.some((a) => a.bar === t && a.repeat > 0)
|
|
604
|
+
hasRepeats: (e) => (t) => e.beats.some((a) => a.bar === t && a.repeat > 0),
|
|
605
|
+
// Get the number of repeats for a specific bar
|
|
606
|
+
getRepeatCountForBar: (e) => (t) => {
|
|
607
|
+
const a = /* @__PURE__ */ new Set();
|
|
608
|
+
return e.beats.forEach((n) => {
|
|
609
|
+
n.bar === t && a.add(n.repeat);
|
|
610
|
+
}), a.size;
|
|
611
|
+
}
|
|
603
612
|
},
|
|
604
613
|
actions: {
|
|
605
614
|
// Load musical data
|
|
@@ -630,7 +639,7 @@ const L = (e, t) => {
|
|
|
630
639
|
return this.beats.some((a) => a.bar === e && a.repeat === t);
|
|
631
640
|
}
|
|
632
641
|
}
|
|
633
|
-
}),
|
|
642
|
+
}), mt = Me("playbackState", {
|
|
634
643
|
state: () => ({
|
|
635
644
|
// Transport state
|
|
636
645
|
transportState: "stopped",
|
|
@@ -740,7 +749,7 @@ const L = (e, t) => {
|
|
|
740
749
|
}
|
|
741
750
|
}
|
|
742
751
|
});
|
|
743
|
-
function
|
|
752
|
+
function pt(e) {
|
|
744
753
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
|
|
745
754
|
var n = e.get(t);
|
|
746
755
|
n ? n.push(a) : e.set(t, [a]);
|
|
@@ -758,7 +767,7 @@ function vt(e) {
|
|
|
758
767
|
}
|
|
759
768
|
class ft {
|
|
760
769
|
constructor() {
|
|
761
|
-
this.eventBus =
|
|
770
|
+
this.eventBus = pt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0;
|
|
762
771
|
}
|
|
763
772
|
// Initialize with musical data
|
|
764
773
|
initialize(t) {
|
|
@@ -894,7 +903,7 @@ class ft {
|
|
|
894
903
|
let n = this.beats.find(
|
|
895
904
|
(s) => s.bar === t && s.beat === 1 && s.repeat === a
|
|
896
905
|
);
|
|
897
|
-
return
|
|
906
|
+
return n || (n = this.beats.find(
|
|
898
907
|
(s) => s.bar === t && s.beat === 1
|
|
899
908
|
)), n ? n.time : null;
|
|
900
909
|
}
|
|
@@ -902,120 +911,124 @@ class ft {
|
|
|
902
911
|
this.stop(), this.eventBus.all.clear(), this.parts.clear();
|
|
903
912
|
}
|
|
904
913
|
}
|
|
905
|
-
const
|
|
906
|
-
function
|
|
907
|
-
const e = X(), t =
|
|
908
|
-
e.setCurrentTime(
|
|
909
|
-
}, s = ({ isPlaying:
|
|
910
|
-
e.setPlaybackState(
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
e.setPlaybackSpeed(
|
|
915
|
-
},
|
|
916
|
-
e.setMasterVolume(
|
|
917
|
-
},
|
|
918
|
-
e.setPartVolume(
|
|
919
|
-
}, r = ({ partName:
|
|
920
|
-
e.setPartMuted(
|
|
921
|
-
}, c = ({ bars:
|
|
922
|
-
e.setLeadInActive(!0,
|
|
923
|
-
}, p = () => {
|
|
924
|
-
e.setLeadInActive(!1);
|
|
914
|
+
const m = new ft();
|
|
915
|
+
function re() {
|
|
916
|
+
const e = X(), t = se(), a = mt(), n = ({ currentTime: l }) => {
|
|
917
|
+
e.setCurrentTime(l);
|
|
918
|
+
}, s = ({ isPlaying: l }) => {
|
|
919
|
+
e.setPlaybackState(l), a.setTransportState(l ? "playing" : "stopped");
|
|
920
|
+
}, o = (l) => {
|
|
921
|
+
l && (e.setCurrentBar(l.bar, l.beat, l.repeat), a.updateLastBarPosition(l.bar));
|
|
922
|
+
}, u = ({ speed: l }) => {
|
|
923
|
+
e.setPlaybackSpeed(l);
|
|
924
|
+
}, f = ({ volume: l }) => {
|
|
925
|
+
e.setMasterVolume(l);
|
|
926
|
+
}, d = ({ partName: l, volume: C }) => {
|
|
927
|
+
e.setPartVolume(l, C);
|
|
928
|
+
}, r = ({ partName: l, muted: C }) => {
|
|
929
|
+
e.setPartMuted(l, C);
|
|
930
|
+
}, c = ({ bars: l }) => {
|
|
931
|
+
e.setLeadInActive(!0, l);
|
|
925
932
|
}, b = () => {
|
|
933
|
+
e.setLeadInActive(!1);
|
|
934
|
+
}, M = () => {
|
|
926
935
|
e.setStartingNotesActive(!0);
|
|
927
|
-
},
|
|
936
|
+
}, h = () => {
|
|
928
937
|
e.setStartingNotesActive(!1);
|
|
929
|
-
},
|
|
930
|
-
a.updateLastPracticeMarkUsed(
|
|
931
|
-
},
|
|
932
|
-
e.initializeParts(
|
|
933
|
-
},
|
|
934
|
-
e.setPlaybackState(!1), a.setTransportState("stopped"), console.log(`Song ended at time: ${
|
|
935
|
-
},
|
|
936
|
-
|
|
937
|
-
},
|
|
938
|
-
|
|
939
|
-
}, R = () => {
|
|
940
|
-
ke(() => {
|
|
941
|
-
const o = e.masterVolume;
|
|
942
|
-
d.getMasterVolume() !== o && d.setMasterVolume(o);
|
|
943
|
-
}), ke(() => {
|
|
944
|
-
const o = e.playbackSpeed;
|
|
945
|
-
d.getPlaybackSpeed() !== o && d.setPlaybackSpeed(o);
|
|
946
|
-
});
|
|
947
|
-
}, J = (o) => {
|
|
948
|
-
t.loadMusicData(o), d.initialize({
|
|
949
|
-
beats: o.beats,
|
|
950
|
-
practiceMarks: o.marks || o.practiceMarks,
|
|
951
|
-
parts: o.parts
|
|
952
|
-
}), B(), R();
|
|
938
|
+
}, y = ({ mark: l }) => {
|
|
939
|
+
a.updateLastPracticeMarkUsed(l);
|
|
940
|
+
}, g = ({ parts: l }) => {
|
|
941
|
+
e.initializeParts(l);
|
|
942
|
+
}, V = ({ finalTime: l }) => {
|
|
943
|
+
e.setPlaybackState(!1), a.setTransportState("stopped"), console.log(`Song ended at time: ${l}`);
|
|
944
|
+
}, E = () => {
|
|
945
|
+
m.on("timeChanged", n), m.on("playbackStateChanged", s), m.on("barChanged", o), m.on("speedChanged", u), m.on("masterVolumeChanged", f), m.on("partVolumeChanged", d), m.on("partMutedChanged", r), m.on("leadInStarted", c), m.on("leadInCompleted", b), m.on("startingNotesStarted", M), m.on("startingNotesCompleted", h), m.on("practiceMarkChanged", y), m.on("initialized", g), m.on("songEnded", V);
|
|
946
|
+
}, G = () => {
|
|
947
|
+
m.off("timeChanged", n), m.off("playbackStateChanged", s), m.off("barChanged", o), m.off("speedChanged", u), m.off("masterVolumeChanged", f), m.off("partVolumeChanged", d), m.off("partMutedChanged", r), m.off("leadInStarted", c), m.off("leadInCompleted", b), m.off("startingNotesStarted", M), m.off("startingNotesCompleted", h), m.off("practiceMarkChanged", y), m.off("initialized", g), m.off("songEnded", V);
|
|
953
948
|
}, $ = () => {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
},
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
},
|
|
972
|
-
|
|
973
|
-
}, Z = (
|
|
974
|
-
|
|
975
|
-
},
|
|
976
|
-
|
|
977
|
-
}, K = (
|
|
978
|
-
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
|
|
949
|
+
Se(() => {
|
|
950
|
+
const l = e.masterVolume;
|
|
951
|
+
m.getMasterVolume() !== l && m.setMasterVolume(l);
|
|
952
|
+
}), Se(() => {
|
|
953
|
+
const l = e.playbackSpeed;
|
|
954
|
+
m.getPlaybackSpeed() !== l && m.setPlaybackSpeed(l);
|
|
955
|
+
});
|
|
956
|
+
}, J = (l) => {
|
|
957
|
+
if (t.loadMusicData(l), m.initialize({
|
|
958
|
+
beats: l.beats,
|
|
959
|
+
practiceMarks: l.marks || l.practiceMarks,
|
|
960
|
+
parts: l.parts
|
|
961
|
+
}), l.beats && l.beats.length > 0) {
|
|
962
|
+
const C = l.beats[0];
|
|
963
|
+
e.setCurrentBar(C.bar, C.beat, C.repeat), m.setTime(C.time);
|
|
964
|
+
}
|
|
965
|
+
E(), $();
|
|
966
|
+
}, D = () => {
|
|
967
|
+
m.play();
|
|
968
|
+
}, Z = () => {
|
|
969
|
+
m.stop();
|
|
970
|
+
}, ee = () => {
|
|
971
|
+
m.pause();
|
|
972
|
+
}, K = (l) => {
|
|
973
|
+
m.setTime(l);
|
|
974
|
+
}, O = (l, C = 0) => {
|
|
975
|
+
m.setBar(l, C);
|
|
976
|
+
}, te = (l) => {
|
|
977
|
+
m.goToPracticeMark(l);
|
|
978
|
+
}, i = (l) => {
|
|
979
|
+
m.setPlaybackSpeed(l);
|
|
980
|
+
}, v = (l) => {
|
|
981
|
+
m.setMasterVolume(l);
|
|
982
|
+
}, T = (l, C) => {
|
|
983
|
+
m.setPartVolume(l, C);
|
|
984
|
+
}, I = (l, C) => {
|
|
985
|
+
m.setPartMuted(l, C);
|
|
986
|
+
}, N = (l = 1) => {
|
|
987
|
+
m.playLeadIn(l);
|
|
988
|
+
}, U = () => {
|
|
989
|
+
m.playStartingNotes();
|
|
990
|
+
}, z = (l, C = !0, ne = 0) => {
|
|
991
|
+
C && a.leadInEnabled ? (O(l, ne), N(a.leadInBars)) : (O(l, ne), D());
|
|
992
|
+
}, ae = (l, C = !0) => {
|
|
993
|
+
const ne = t.getBarForMark(l);
|
|
994
|
+
ne && z(ne, C);
|
|
982
995
|
};
|
|
983
996
|
return ge(() => {
|
|
984
|
-
|
|
997
|
+
G();
|
|
985
998
|
}), {
|
|
986
999
|
// Initialization
|
|
987
1000
|
initialize: J,
|
|
988
1001
|
// Transport controls
|
|
989
|
-
play:
|
|
990
|
-
stop:
|
|
991
|
-
pause:
|
|
1002
|
+
play: D,
|
|
1003
|
+
stop: Z,
|
|
1004
|
+
pause: ee,
|
|
992
1005
|
// Time controls
|
|
993
|
-
setTime:
|
|
994
|
-
setBar:
|
|
1006
|
+
setTime: K,
|
|
1007
|
+
setBar: O,
|
|
995
1008
|
// Navigation
|
|
996
|
-
goToPracticeMark:
|
|
997
|
-
setPlaybackSpeed:
|
|
1009
|
+
goToPracticeMark: te,
|
|
1010
|
+
setPlaybackSpeed: i,
|
|
998
1011
|
// Volume controls
|
|
999
|
-
setMasterVolume:
|
|
1000
|
-
setPartVolume:
|
|
1001
|
-
setPartMuted:
|
|
1012
|
+
setMasterVolume: v,
|
|
1013
|
+
setPartVolume: T,
|
|
1014
|
+
setPartMuted: I,
|
|
1002
1015
|
// Special features
|
|
1003
|
-
playLeadIn:
|
|
1004
|
-
playStartingNotes:
|
|
1016
|
+
playLeadIn: N,
|
|
1017
|
+
playStartingNotes: U,
|
|
1005
1018
|
// Complex operations
|
|
1006
|
-
playFromBar:
|
|
1007
|
-
playFromMark:
|
|
1019
|
+
playFromBar: z,
|
|
1020
|
+
playFromMark: ae,
|
|
1008
1021
|
// Access to stores for components
|
|
1009
1022
|
audioState: e,
|
|
1010
1023
|
musicData: t,
|
|
1011
1024
|
playbackState: a,
|
|
1012
1025
|
// Direct access to engine for advanced use
|
|
1013
|
-
audioEngine:
|
|
1026
|
+
audioEngine: m
|
|
1014
1027
|
};
|
|
1015
1028
|
}
|
|
1016
|
-
const
|
|
1029
|
+
const vt = {
|
|
1017
1030
|
__name: "PartControl",
|
|
1018
|
-
props: /* @__PURE__ */
|
|
1031
|
+
props: /* @__PURE__ */ pe({
|
|
1019
1032
|
name: {
|
|
1020
1033
|
type: String,
|
|
1021
1034
|
required: !0
|
|
@@ -1035,170 +1048,188 @@ const bt = {
|
|
|
1035
1048
|
}),
|
|
1036
1049
|
emits: ["update:volume", "update:mute", "update:solo"],
|
|
1037
1050
|
setup(e) {
|
|
1038
|
-
|
|
1051
|
+
W((h) => ({
|
|
1039
1052
|
"34cdae44": r.value
|
|
1040
1053
|
}));
|
|
1041
1054
|
const t = e;
|
|
1042
1055
|
X();
|
|
1043
|
-
const a =
|
|
1044
|
-
|
|
1045
|
-
a.setPartVolume(t.name,
|
|
1046
|
-
}),
|
|
1047
|
-
a.setPartMuted(t.name,
|
|
1056
|
+
const a = re(), n = q(e, "volume"), s = q(e, "mute"), o = q(e, "solo");
|
|
1057
|
+
L(n, (h) => {
|
|
1058
|
+
a.setPartVolume(t.name, h);
|
|
1059
|
+
}), L(s, (h) => {
|
|
1060
|
+
a.setPartMuted(t.name, h);
|
|
1048
1061
|
});
|
|
1049
|
-
const
|
|
1050
|
-
() =>
|
|
1062
|
+
const u = H("el"), { width: f, height: d } = j(u), r = _(() => Math.min(f.value, d.value) + "px"), c = _(
|
|
1063
|
+
() => f.value > d.value ? "mobile" : f.value < 60 ? "tablet" : "desktop"
|
|
1051
1064
|
);
|
|
1052
|
-
let
|
|
1053
|
-
const
|
|
1054
|
-
return
|
|
1055
|
-
|
|
1056
|
-
|
|
1065
|
+
let b = null;
|
|
1066
|
+
const M = B(0);
|
|
1067
|
+
return Pe(() => {
|
|
1068
|
+
De("randomLevelIndicators") && (b = setInterval(() => {
|
|
1069
|
+
M.value = s.value ? 0 : Math.random() * n.value;
|
|
1057
1070
|
}, 100));
|
|
1058
1071
|
}), ge(() => {
|
|
1059
|
-
|
|
1060
|
-
}), (
|
|
1072
|
+
b && (clearInterval(b), b = null);
|
|
1073
|
+
}), (h, y) => (S(), k("div", {
|
|
1061
1074
|
ref_key: "el",
|
|
1062
|
-
ref:
|
|
1075
|
+
ref: u,
|
|
1063
1076
|
class: w([c.value, "part"])
|
|
1064
1077
|
}, [
|
|
1065
|
-
|
|
1078
|
+
x(ht, {
|
|
1066
1079
|
class: "tri",
|
|
1067
1080
|
mute: s.value,
|
|
1068
|
-
"onUpdate:mute":
|
|
1069
|
-
solo:
|
|
1070
|
-
"onUpdate:solo":
|
|
1081
|
+
"onUpdate:mute": y[0] || (y[0] = (g) => s.value = g),
|
|
1082
|
+
solo: o.value,
|
|
1083
|
+
"onUpdate:solo": y[1] || (y[1] = (g) => o.value = g)
|
|
1071
1084
|
}, null, 8, ["mute", "solo"]),
|
|
1072
|
-
|
|
1085
|
+
x($e, {
|
|
1073
1086
|
align: "left",
|
|
1074
1087
|
class: "name"
|
|
1075
1088
|
}, {
|
|
1076
|
-
default:
|
|
1077
|
-
|
|
1089
|
+
default: F(() => [
|
|
1090
|
+
be(R(e.name), 1)
|
|
1078
1091
|
]),
|
|
1079
1092
|
_: 1
|
|
1080
1093
|
}),
|
|
1081
|
-
|
|
1082
|
-
level:
|
|
1094
|
+
x(ce, {
|
|
1095
|
+
level: M.value,
|
|
1083
1096
|
"show-level": !0,
|
|
1084
1097
|
class: "vol",
|
|
1085
1098
|
value: n.value,
|
|
1086
|
-
"onUpdate:value":
|
|
1099
|
+
"onUpdate:value": y[2] || (y[2] = (g) => n.value = g)
|
|
1087
1100
|
}, null, 8, ["level", "value"])
|
|
1088
1101
|
], 2));
|
|
1089
1102
|
}
|
|
1090
|
-
}, gt = /* @__PURE__ */
|
|
1091
|
-
key:
|
|
1092
|
-
class: "mark-
|
|
1093
|
-
},
|
|
1103
|
+
}, gt = /* @__PURE__ */ A(vt, [["__scopeId", "data-v-510493b1"]]), bt = { class: "mark" }, yt = { class: "rpt" }, Mt = { class: "beat-ind" }, _t = { class: "beat" }, St = {
|
|
1104
|
+
key: 1,
|
|
1105
|
+
class: "mark-grid-container"
|
|
1106
|
+
}, kt = { class: "mark-grid" }, Tt = ["onClick"], Ct = {
|
|
1094
1107
|
__name: "BarInput",
|
|
1095
1108
|
setup(e) {
|
|
1096
|
-
|
|
1097
|
-
"
|
|
1098
|
-
|
|
1109
|
+
W((i) => ({
|
|
1110
|
+
"21e4bbc2": G.value,
|
|
1111
|
+
77177731: $.value
|
|
1099
1112
|
}));
|
|
1100
|
-
const t =
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1113
|
+
const t = H("el"), { width: a, height: n } = j(t), s = se(), o = X(), u = re(), f = B(!0);
|
|
1114
|
+
L(() => o.currentBeat, () => {
|
|
1115
|
+
f.value = !0, setTimeout(() => {
|
|
1116
|
+
f.value = !1;
|
|
1104
1117
|
}, 50);
|
|
1105
1118
|
});
|
|
1106
|
-
let
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
T(i.currentRepeat);
|
|
1117
|
-
const p = T(!1), b = T(!1);
|
|
1118
|
-
D(r, () => {
|
|
1119
|
+
let d = null;
|
|
1120
|
+
const r = B("1"), c = B("A"), b = B(0), M = B(2), h = B(!1), y = B(!1), g = B(!1);
|
|
1121
|
+
L(() => {
|
|
1122
|
+
var i;
|
|
1123
|
+
return ((i = s.beats) == null ? void 0 : i.length) > 0;
|
|
1124
|
+
}, (i) => {
|
|
1125
|
+
console.log(i), i && !g.value && (r.value = o.currentBar.toString(), b.value = o.currentRepeat, M.value = s.getRepeatCountForBar(o.currentBar), V(o.currentBar), g.value = !0);
|
|
1126
|
+
}), L(() => o.currentBar, (i) => {
|
|
1127
|
+
M.value = s.getRepeatCountForBar(i);
|
|
1128
|
+
}), L(r, () => {
|
|
1119
1129
|
r.value = r.value.replace(/\D/g, ""), r.value.length > 3 && (r.value = r.value.slice(0, 3));
|
|
1120
|
-
}),
|
|
1121
|
-
r.value =
|
|
1130
|
+
}), L(() => o.currentBar, (i) => {
|
|
1131
|
+
r.value = i.toString(), V(i);
|
|
1122
1132
|
});
|
|
1123
|
-
function
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1133
|
+
function V(i) {
|
|
1134
|
+
const v = Object.keys(s.practiceMarks).filter((T) => s.practiceMarks[T] <= i).sort((T, I) => s.practiceMarks[I] - s.practiceMarks[T]);
|
|
1135
|
+
v.length > 0 && (c.value = v[0]);
|
|
1126
1136
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1137
|
+
function E() {
|
|
1138
|
+
const i = parseInt(r.value);
|
|
1139
|
+
i && i > 0 && K(i);
|
|
1130
1140
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1141
|
+
const G = _(() => Math.min(n.value / 2.25, a.value / 4.5) + "px"), $ = _(() => Math.min(a.value / 15, n.value / 6.4) + "px");
|
|
1142
|
+
function J(i) {
|
|
1143
|
+
i.stopPropagation(), h.value = !h.value;
|
|
1133
1144
|
}
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1145
|
+
function D(i) {
|
|
1146
|
+
var v;
|
|
1147
|
+
(v = t.value) != null && v.contains(i.target) || (h.value = !1, y.value = !1);
|
|
1148
|
+
}
|
|
1149
|
+
Pe(() => {
|
|
1150
|
+
document.addEventListener("click", D), De("beatAnimation") && (d = setInterval(() => {
|
|
1151
|
+
const i = o.currentBeat % s.timeSignature + 1;
|
|
1152
|
+
o.setCurrentBar(o.currentBar, i, o.currentRepeat);
|
|
1153
|
+
}, 800));
|
|
1154
|
+
}), ge(() => {
|
|
1155
|
+
document.removeEventListener("click", D), d && (clearInterval(d), d = null);
|
|
1156
|
+
});
|
|
1157
|
+
function Z(i) {
|
|
1158
|
+
i.stopPropagation(), y.value = M.value > 0 && !y.value;
|
|
1136
1159
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1160
|
+
const ee = _(() => Object.keys(s.practiceMarks).sort());
|
|
1161
|
+
function K(i) {
|
|
1162
|
+
u.setBar(i, 0);
|
|
1139
1163
|
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
l.setBar(M, i.currentRepeat);
|
|
1164
|
+
function O(i, v) {
|
|
1165
|
+
v && v.stopPropagation(), c.value = i, h.value = !1, u.goToPracticeMark(i);
|
|
1143
1166
|
}
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1167
|
+
function te() {
|
|
1168
|
+
h.value && setTimeout(() => {
|
|
1169
|
+
var T, I;
|
|
1170
|
+
const i = (T = t.value) == null ? void 0 : T.querySelector(".mark-grid"), v = (I = t.value) == null ? void 0 : I.querySelector(".mark-option.selected");
|
|
1171
|
+
if (v && i) {
|
|
1172
|
+
const N = i.getBoundingClientRect(), U = v.getBoundingClientRect(), z = U.left - N.left - N.width / 2 + U.width / 2;
|
|
1173
|
+
i.scrollLeft = Math.max(0, i.scrollLeft + z);
|
|
1174
|
+
}
|
|
1175
|
+
}, 50);
|
|
1146
1176
|
}
|
|
1147
|
-
return (
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1177
|
+
return L(h, () => {
|
|
1178
|
+
h.value && te();
|
|
1179
|
+
}), (i, v) => (S(), k("div", {
|
|
1180
|
+
ref_key: "el",
|
|
1181
|
+
ref: t,
|
|
1182
|
+
class: w(["outer", { pulse: f.value, "mark-selecting": h.value }])
|
|
1183
|
+
}, [
|
|
1184
|
+
v[6] || (v[6] = p("div", { class: "frame" }, null, -1)),
|
|
1185
|
+
p("div", {
|
|
1186
|
+
class: w(["mark-input", { empty: !c.value, edit: h.value }]),
|
|
1187
|
+
onClick: J
|
|
1153
1188
|
}, [
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
m("div", yt, I(c.value), 1)
|
|
1160
|
-
], 2)), [
|
|
1161
|
-
[V, B]
|
|
1162
|
-
]),
|
|
1163
|
-
p.value ? (y(), _("div", _t, [
|
|
1164
|
-
(y(!0), _(ve, null, fe(J.value, (A) => (y(), _("div", {
|
|
1165
|
-
key: A,
|
|
1166
|
-
class: "mark-option",
|
|
1167
|
-
onClick: (v) => j(A)
|
|
1168
|
-
}, I(A), 9, Mt))), 128))
|
|
1169
|
-
])) : pe("", !0),
|
|
1170
|
-
S[2] || (S[2] = m("div", { class: "mark-title" }, "Mark", -1)),
|
|
1171
|
-
re(m("input", {
|
|
1189
|
+
p("div", bt, R(c.value), 1)
|
|
1190
|
+
], 2),
|
|
1191
|
+
v[7] || (v[7] = p("div", { class: "mark-title" }, "Mark", -1)),
|
|
1192
|
+
h.value ? ie("", !0) : (S(), k(oe, { key: 0 }, [
|
|
1193
|
+
Ve(p("input", {
|
|
1172
1194
|
type: "text",
|
|
1173
1195
|
class: "bar-input",
|
|
1174
|
-
"onUpdate:modelValue":
|
|
1196
|
+
"onUpdate:modelValue": v[0] || (v[0] = (T) => r.value = T),
|
|
1175
1197
|
inputmode: "decimal",
|
|
1176
1198
|
pattern: "\\d*",
|
|
1177
|
-
onChange:
|
|
1178
|
-
onKeyup:
|
|
1199
|
+
onChange: E,
|
|
1200
|
+
onKeyup: qe(E, ["enter"])
|
|
1179
1201
|
}, null, 544), [
|
|
1180
|
-
[
|
|
1202
|
+
[Le, r.value]
|
|
1181
1203
|
]),
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
class: w(["rpt-input", { edit:
|
|
1185
|
-
onClick:
|
|
1204
|
+
v[3] || (v[3] = p("div", { class: "bar-title" }, "Bar", -1)),
|
|
1205
|
+
p("div", {
|
|
1206
|
+
class: w(["rpt-input", { edit: y.value, available: M.value > 0 }]),
|
|
1207
|
+
onClick: Z
|
|
1186
1208
|
}, [
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
[
|
|
1190
|
-
]),
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1209
|
+
p("div", yt, R(P(o).currentRepeat || "-"), 1),
|
|
1210
|
+
v[1] || (v[1] = p("div", { class: "inc" }, null, -1)),
|
|
1211
|
+
v[2] || (v[2] = p("div", { class: "dec" }, null, -1))
|
|
1212
|
+
], 2),
|
|
1213
|
+
v[4] || (v[4] = p("div", { class: "rpt-title" }, "Rpt", -1)),
|
|
1214
|
+
p("div", Mt, [
|
|
1215
|
+
p("div", _t, R(P(o).currentBeat), 1)
|
|
1194
1216
|
]),
|
|
1195
|
-
|
|
1196
|
-
],
|
|
1197
|
-
|
|
1217
|
+
v[5] || (v[5] = p("div", { class: "beat-title" }, "Beat", -1))
|
|
1218
|
+
], 64)),
|
|
1219
|
+
h.value ? (S(), k("div", St, [
|
|
1220
|
+
p("div", kt, [
|
|
1221
|
+
(S(!0), k(oe, null, fe(ee.value, (T) => (S(), k("div", {
|
|
1222
|
+
key: T,
|
|
1223
|
+
class: w(["mark-option", { selected: T === c.value }]),
|
|
1224
|
+
onClick: (I) => O(T, I)
|
|
1225
|
+
}, R(T), 11, Tt))), 128))
|
|
1226
|
+
])
|
|
1227
|
+
])) : ie("", !0)
|
|
1228
|
+
], 2));
|
|
1198
1229
|
}
|
|
1199
|
-
},
|
|
1230
|
+
}, xt = /* @__PURE__ */ A(Ct, [["__scopeId", "data-v-a8c8d1d6"]]), Bt = { class: "title" }, wt = {
|
|
1200
1231
|
__name: "BaseNumericInput",
|
|
1201
|
-
props: /* @__PURE__ */
|
|
1232
|
+
props: /* @__PURE__ */ pe({
|
|
1202
1233
|
title: {
|
|
1203
1234
|
type: String,
|
|
1204
1235
|
required: !0
|
|
@@ -1261,77 +1292,77 @@ const bt = {
|
|
|
1261
1292
|
}),
|
|
1262
1293
|
emits: ["update:value"],
|
|
1263
1294
|
setup(e) {
|
|
1264
|
-
|
|
1295
|
+
W((c) => ({
|
|
1265
1296
|
"0d0963e0": e.textColor,
|
|
1266
1297
|
"4ad34b2f": e.backgroundColor,
|
|
1267
1298
|
"02156786": e.color,
|
|
1268
|
-
"715a9528":
|
|
1269
|
-
"30d64f7d":
|
|
1299
|
+
"715a9528": d.value,
|
|
1300
|
+
"30d64f7d": f.value,
|
|
1270
1301
|
b8fbe65e: e.focusColor
|
|
1271
1302
|
}));
|
|
1272
|
-
const t = e, a =
|
|
1273
|
-
|
|
1274
|
-
const c = t.transformSliderToDisplay(
|
|
1275
|
-
|
|
1276
|
-
}),
|
|
1277
|
-
|
|
1303
|
+
const t = e, a = H("el"), { width: n, height: s } = j(a), o = q(e, "value"), u = B(t.formatValue(t.transformSliderToDisplay(o.value)));
|
|
1304
|
+
L(o, () => {
|
|
1305
|
+
const c = t.transformSliderToDisplay(o.value);
|
|
1306
|
+
u.value = t.formatValue(c);
|
|
1307
|
+
}), L(u, () => {
|
|
1308
|
+
u.value = t.validateInput(u.value), t.maxChars && u.value.length > t.maxChars && (u.value = u.value.slice(0, t.maxChars));
|
|
1278
1309
|
});
|
|
1279
|
-
const
|
|
1310
|
+
const f = _(() => Math.min(s.value / 2.25, n.value / 2.2) + "px"), d = _(() => Math.min(n.value / 3, s.value / 6.4) + "px");
|
|
1280
1311
|
function r() {
|
|
1281
|
-
const c = t.parseValue(
|
|
1282
|
-
|
|
1312
|
+
const c = t.parseValue(u.value), b = t.transformDisplayToSlider(c);
|
|
1313
|
+
o.value = Math.min(Math.max(b, t.sliderMin), t.sliderMax);
|
|
1283
1314
|
}
|
|
1284
|
-
return (c,
|
|
1315
|
+
return (c, b) => (S(), k("div", {
|
|
1285
1316
|
class: "outer",
|
|
1286
1317
|
ref_key: "el",
|
|
1287
1318
|
ref: a
|
|
1288
1319
|
}, [
|
|
1289
|
-
|
|
1290
|
-
|
|
1320
|
+
b[2] || (b[2] = p("div", { class: "frame" }, null, -1)),
|
|
1321
|
+
Ve(p("input", {
|
|
1291
1322
|
type: "text",
|
|
1292
1323
|
class: "input",
|
|
1293
|
-
"onUpdate:modelValue":
|
|
1324
|
+
"onUpdate:modelValue": b[0] || (b[0] = (M) => u.value = M),
|
|
1294
1325
|
inputmode: "decimal",
|
|
1295
1326
|
pattern: "\\d*",
|
|
1296
1327
|
onChange: r
|
|
1297
1328
|
}, null, 544), [
|
|
1298
|
-
[
|
|
1329
|
+
[Le, u.value]
|
|
1299
1330
|
]),
|
|
1300
|
-
|
|
1301
|
-
|
|
1331
|
+
p("div", Bt, R(e.title), 1),
|
|
1332
|
+
x(ce, {
|
|
1302
1333
|
class: "slider",
|
|
1303
|
-
value:
|
|
1304
|
-
"onUpdate:value":
|
|
1334
|
+
value: o.value,
|
|
1335
|
+
"onUpdate:value": b[1] || (b[1] = (M) => o.value = M),
|
|
1305
1336
|
"thumb-length": e.thumbLength,
|
|
1306
1337
|
max: e.sliderMax,
|
|
1307
1338
|
min: e.sliderMin
|
|
1308
1339
|
}, null, 8, ["value", "thumb-length", "max", "min"])
|
|
1309
1340
|
], 512));
|
|
1310
1341
|
}
|
|
1311
|
-
}, ze = /* @__PURE__ */
|
|
1342
|
+
}, ze = /* @__PURE__ */ A(wt, [["__scopeId", "data-v-79c7a539"]]), Et = {
|
|
1312
1343
|
__name: "SpeedInput",
|
|
1313
1344
|
setup(e) {
|
|
1314
|
-
const t = X(), a =
|
|
1345
|
+
const t = X(), a = re(), n = _({
|
|
1315
1346
|
get: () => Math.log2(t.playbackSpeed) * 0.5 + 0.5,
|
|
1316
1347
|
set: (r) => {
|
|
1317
1348
|
const c = Math.pow(2, r * 2 - 1);
|
|
1318
1349
|
a.setPlaybackSpeed(c);
|
|
1319
1350
|
}
|
|
1320
|
-
}), s = (r) => Math.floor(Math.pow(2, r * 2 - 1) * 100 + 0.5) + "",
|
|
1351
|
+
}), s = (r) => Math.floor(Math.pow(2, r * 2 - 1) * 100 + 0.5) + "", o = (r) => parseFloat(r), u = (r) => r.replace(/\D/g, ""), f = (r) => r, d = (r) => {
|
|
1321
1352
|
const c = Math.log2(r / 100) * 0.5 + 0.5;
|
|
1322
1353
|
return Math.min(Math.max(c, 0), 1);
|
|
1323
1354
|
};
|
|
1324
|
-
return (r, c) => (
|
|
1355
|
+
return (r, c) => (S(), ye(ze, {
|
|
1325
1356
|
value: n.value,
|
|
1326
|
-
"onUpdate:value": c[0] || (c[0] = (
|
|
1357
|
+
"onUpdate:value": c[0] || (c[0] = (b) => n.value = b),
|
|
1327
1358
|
title: "Speed",
|
|
1328
1359
|
color: "#336",
|
|
1329
1360
|
"text-color": "#aad",
|
|
1330
1361
|
"format-value": s,
|
|
1331
|
-
"parse-value":
|
|
1332
|
-
"validate-input":
|
|
1333
|
-
"transform-slider-to-display":
|
|
1334
|
-
"transform-display-to-slider":
|
|
1362
|
+
"parse-value": o,
|
|
1363
|
+
"validate-input": u,
|
|
1364
|
+
"transform-slider-to-display": f,
|
|
1365
|
+
"transform-display-to-slider": d,
|
|
1335
1366
|
"thumb-length": 2,
|
|
1336
1367
|
"max-chars": 3
|
|
1337
1368
|
}, null, 8, ["value"]));
|
|
@@ -1339,179 +1370,191 @@ const bt = {
|
|
|
1339
1370
|
}, Pt = {
|
|
1340
1371
|
__name: "TimeInput",
|
|
1341
1372
|
setup(e) {
|
|
1342
|
-
const t = X(), a =
|
|
1343
|
-
return (r, c) => (
|
|
1344
|
-
value:
|
|
1373
|
+
const t = X(), a = se(), n = re(), s = (r) => r.toFixed(1), o = (r) => parseFloat(r), u = (r) => r.replace(/[^0-9.]/g, ""), f = (r) => r, d = (r) => r;
|
|
1374
|
+
return (r, c) => (S(), ye(ze, {
|
|
1375
|
+
value: P(t).currentTime,
|
|
1345
1376
|
"onUpdate:value": [
|
|
1346
|
-
c[0] || (c[0] = (
|
|
1347
|
-
|
|
1377
|
+
c[0] || (c[0] = (b) => P(t).currentTime = b),
|
|
1378
|
+
P(n).setTime
|
|
1348
1379
|
],
|
|
1349
1380
|
title: "Time",
|
|
1350
1381
|
color: "#344",
|
|
1351
1382
|
"focus-color": "#556868",
|
|
1352
1383
|
"text-color": "#acc",
|
|
1353
1384
|
"background-color": "#111117",
|
|
1354
|
-
"slider-max":
|
|
1385
|
+
"slider-max": P(a).totalDuration,
|
|
1355
1386
|
"slider-min": 0,
|
|
1356
1387
|
"format-value": s,
|
|
1357
|
-
"parse-value":
|
|
1358
|
-
"validate-input":
|
|
1359
|
-
"transform-slider-to-display":
|
|
1360
|
-
"transform-display-to-slider":
|
|
1388
|
+
"parse-value": o,
|
|
1389
|
+
"validate-input": u,
|
|
1390
|
+
"transform-slider-to-display": f,
|
|
1391
|
+
"transform-display-to-slider": d,
|
|
1361
1392
|
"thumb-length": 2
|
|
1362
1393
|
}, null, 8, ["value", "onUpdate:value", "slider-max"]));
|
|
1363
1394
|
}
|
|
1364
|
-
}, Vt = { class: "inner" },
|
|
1395
|
+
}, Vt = { class: "inner" }, Lt = {
|
|
1365
1396
|
__name: "AudioButton",
|
|
1366
1397
|
setup(e) {
|
|
1367
|
-
const t =
|
|
1368
|
-
return (s,
|
|
1398
|
+
const t = B(!1), a = () => t.value = !0, n = () => t.value = !1;
|
|
1399
|
+
return (s, o) => (S(), k("div", {
|
|
1369
1400
|
class: w(["button-outer", { down: t.value }]),
|
|
1370
1401
|
onPointerdown: a,
|
|
1371
1402
|
onPointerup: n,
|
|
1372
1403
|
onPointerleave: n
|
|
1373
1404
|
}, [
|
|
1374
|
-
|
|
1375
|
-
|
|
1405
|
+
p("div", Vt, [
|
|
1406
|
+
ve(s.$slots, "default", {}, void 0, !0)
|
|
1376
1407
|
])
|
|
1377
1408
|
], 34));
|
|
1378
1409
|
}
|
|
1379
|
-
}, Y = /* @__PURE__ */
|
|
1410
|
+
}, Y = /* @__PURE__ */ A(Lt, [["__scopeId", "data-v-0d7af06e"]]), Ot = { class: "outer" }, It = { class: "buttons" }, Rt = {
|
|
1380
1411
|
class: "icon",
|
|
1381
1412
|
viewBox: "0 0 48 48"
|
|
1382
|
-
},
|
|
1413
|
+
}, At = ["d"], Nt = {
|
|
1383
1414
|
__name: "MixerControls",
|
|
1384
1415
|
setup(e) {
|
|
1385
|
-
const t =
|
|
1416
|
+
const t = se(), a = X(), n = re();
|
|
1386
1417
|
function s() {
|
|
1387
1418
|
a.isPlaying ? n.stop() : n.play();
|
|
1388
1419
|
}
|
|
1389
|
-
function
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1420
|
+
function o() {
|
|
1421
|
+
const M = a.currentTime, h = t.beats.filter((g) => g.beat === 1).sort((g, V) => g.time - V.time);
|
|
1422
|
+
let y = null;
|
|
1423
|
+
for (let g = h.length - 1; g >= 0; g--)
|
|
1424
|
+
if (h[g].time < M) {
|
|
1425
|
+
y = h[g];
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1428
|
+
y && n.setBar(y.bar, y.repeat);
|
|
1392
1429
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1430
|
+
function u() {
|
|
1431
|
+
const M = a.currentTime, h = t.beats.filter((g) => g.beat === 1).sort((g, V) => g.time - V.time);
|
|
1432
|
+
let y = null;
|
|
1433
|
+
for (let g = 0; g < h.length; g++)
|
|
1434
|
+
if (h[g].time > M) {
|
|
1435
|
+
y = h[g];
|
|
1436
|
+
break;
|
|
1437
|
+
}
|
|
1438
|
+
y && n.setBar(y.bar, y.repeat);
|
|
1396
1439
|
}
|
|
1397
|
-
function
|
|
1440
|
+
function f() {
|
|
1398
1441
|
n.playStartingNotes();
|
|
1399
1442
|
}
|
|
1400
|
-
const
|
|
1443
|
+
const d = B(!1), r = B(!0);
|
|
1401
1444
|
function c() {
|
|
1402
|
-
|
|
1445
|
+
d.value = !d.value;
|
|
1403
1446
|
}
|
|
1404
|
-
function
|
|
1447
|
+
function b() {
|
|
1405
1448
|
r.value = !r.value;
|
|
1406
1449
|
}
|
|
1407
|
-
return (
|
|
1408
|
-
|
|
1450
|
+
return (M, h) => (S(), k("div", Ot, [
|
|
1451
|
+
x($e, {
|
|
1409
1452
|
class: "title",
|
|
1410
1453
|
align: "centre"
|
|
1411
1454
|
}, {
|
|
1412
|
-
default:
|
|
1413
|
-
|
|
1455
|
+
default: F(() => [
|
|
1456
|
+
be(R(P(t).title), 1)
|
|
1414
1457
|
]),
|
|
1415
1458
|
_: 1
|
|
1416
1459
|
}),
|
|
1417
|
-
|
|
1460
|
+
x(ce, {
|
|
1418
1461
|
class: "main",
|
|
1419
1462
|
colour: "red",
|
|
1420
|
-
modelValue:
|
|
1421
|
-
"onUpdate:modelValue":
|
|
1463
|
+
modelValue: P(a).masterVolume,
|
|
1464
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => P(a).masterVolume = y)
|
|
1422
1465
|
}, null, 8, ["modelValue"]),
|
|
1423
|
-
|
|
1466
|
+
x(ce, {
|
|
1424
1467
|
class: "tick",
|
|
1425
1468
|
colour: "blue"
|
|
1426
1469
|
}),
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1470
|
+
h[6] || (h[6] = p("div", { class: "main-t" }, "Main", -1)),
|
|
1471
|
+
h[7] || (h[7] = p("div", { class: "tick-t" }, "Tick", -1)),
|
|
1472
|
+
x(xt, { class: "bar" }),
|
|
1473
|
+
x(Pt, { class: "time" }),
|
|
1474
|
+
x(Et, { class: "speed" }),
|
|
1475
|
+
p("div", It, [
|
|
1476
|
+
x(Y, {
|
|
1434
1477
|
class: "button",
|
|
1435
|
-
onClick:
|
|
1478
|
+
onClick: o
|
|
1436
1479
|
}, {
|
|
1437
|
-
default:
|
|
1438
|
-
|
|
1480
|
+
default: F(() => h[1] || (h[1] = [
|
|
1481
|
+
p("svg", {
|
|
1439
1482
|
class: "icon",
|
|
1440
1483
|
viewBox: "0 0 48 48"
|
|
1441
1484
|
}, [
|
|
1442
|
-
|
|
1485
|
+
p("path", { d: "M11 36V12h3v24Zm26 0L19.7 24 37 12Z" })
|
|
1443
1486
|
], -1)
|
|
1444
1487
|
])),
|
|
1445
1488
|
_: 1,
|
|
1446
1489
|
__: [1]
|
|
1447
1490
|
}),
|
|
1448
|
-
|
|
1491
|
+
x(Y, {
|
|
1449
1492
|
class: "button",
|
|
1450
1493
|
onClick: s
|
|
1451
1494
|
}, {
|
|
1452
|
-
default:
|
|
1453
|
-
(
|
|
1454
|
-
|
|
1455
|
-
d:
|
|
1456
|
-
}, null, 8,
|
|
1495
|
+
default: F(() => [
|
|
1496
|
+
(S(), k("svg", Rt, [
|
|
1497
|
+
p("path", {
|
|
1498
|
+
d: P(a).isPlaying ? "M27.4 35.4V12.6h8v22.8Zm-14.8 0V12.6h8.05v22.8Z" : "M16 37.85v-28l22 14Z"
|
|
1499
|
+
}, null, 8, At)
|
|
1457
1500
|
]))
|
|
1458
1501
|
]),
|
|
1459
1502
|
_: 1
|
|
1460
1503
|
}),
|
|
1461
|
-
|
|
1504
|
+
x(Y, {
|
|
1462
1505
|
class: "button",
|
|
1463
|
-
onClick:
|
|
1506
|
+
onClick: u
|
|
1464
1507
|
}, {
|
|
1465
|
-
default:
|
|
1466
|
-
|
|
1508
|
+
default: F(() => h[2] || (h[2] = [
|
|
1509
|
+
p("svg", {
|
|
1467
1510
|
class: "icon",
|
|
1468
1511
|
viewBox: "0 0 48 48"
|
|
1469
1512
|
}, [
|
|
1470
|
-
|
|
1513
|
+
p("path", { d: "M34 36V12h3v24Zm-23 0V12l17.3 12Z" })
|
|
1471
1514
|
], -1)
|
|
1472
1515
|
])),
|
|
1473
1516
|
_: 1,
|
|
1474
1517
|
__: [2]
|
|
1475
1518
|
}),
|
|
1476
|
-
|
|
1519
|
+
x(Y, {
|
|
1477
1520
|
class: "button",
|
|
1478
1521
|
onClick: c
|
|
1479
1522
|
}, {
|
|
1480
|
-
default:
|
|
1481
|
-
(
|
|
1482
|
-
class: w(["icon",
|
|
1523
|
+
default: F(() => [
|
|
1524
|
+
(S(), k("svg", {
|
|
1525
|
+
class: w(["icon", d.value ? "on" : "off"]),
|
|
1483
1526
|
viewBox: "-128 -128 768 768"
|
|
1484
|
-
},
|
|
1485
|
-
|
|
1527
|
+
}, h[3] || (h[3] = [
|
|
1528
|
+
p("path", { d: "m 463.84136,154.89339 c -6.42,-6.42 -16.83,-6.42 -23.251,0 -71.31197,70.35135 -136.61146,132.25426 -208.741,199.7 h -105.82 c 23.35495,-140.1063 67.13099,-217.59716 120.727,-318.357996 0.86,-0.803 2.209,-0.801 3.067,-10e-4 20.50653,37.383983 48.51152,88.812606 72.26194,147.190756 1.186,9.002 12.2214,17.4338 23.3242,11.71391 9.002,-1.186 11.1594,-12.2324 9.9724,-21.2344 -21.69905,-53.89113 -30.43965,-85.078342 -83.11454,-161.702266 -13.446,-12.55299965 -34.508,-12.55699965 -47.954,10e-4 C 126.80877,149.30021 96.099465,324.74626 77.091365,474.25139 c -2.829,21.473 13.907,40.535 35.543995,40.535 h 271.311 c 21.661,0 38.373,-19.087 35.544,-40.535 -8.26237,-52.34207 -14.88466,-100.7074 -24.7871,-157.02622 -6.40949,-11.78839 -8.3911,-14.9907 -17.4031,-13.8037 -9.002,1.186 -13.59751,8.0528 -12.41051,17.0548 l 5.66371,34.11712 h -83.159 c 64.35441,-63.86663 129.29308,-130.29894 176.448,-176.449 6.42,-6.42 6.42,-16.83 -10e-4,-23.251 z m -88.956,232.582 12.004,91.074 c 0.112,0.846 -0.148,1.701 -0.708,2.341 -0.566,0.645 -1.38,1.014 -2.235,1.014 h -271.311 c -0.855,0 -1.668,-0.369 -2.231,-1.011 -0.564,-0.643 -0.824,-1.499 -0.712,-2.347 l 12.003,-91.072 h 253.19 z" }, null, -1)
|
|
1486
1529
|
]), 2))
|
|
1487
1530
|
]),
|
|
1488
1531
|
_: 1
|
|
1489
1532
|
}),
|
|
1490
|
-
|
|
1533
|
+
x(Y, {
|
|
1491
1534
|
class: "button",
|
|
1492
|
-
onClick:
|
|
1535
|
+
onClick: b
|
|
1493
1536
|
}, {
|
|
1494
|
-
default:
|
|
1495
|
-
(
|
|
1537
|
+
default: F(() => [
|
|
1538
|
+
(S(), k("svg", {
|
|
1496
1539
|
class: w(["icon", r.value ? "on" : "off"]),
|
|
1497
1540
|
viewBox: "-2 -2 28 28"
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1541
|
+
}, h[4] || (h[4] = [
|
|
1542
|
+
p("path", { d: "m 8.9838564,1.5166215 v 2 h 5.9999996 v -2 z m 2.9999996,3 c -4.9699996,0 -8.9999996,4.0299999 -8.9999996,8.9999995 0,4.97 4.02,9 8.9999996,9 4.98,0 9,-4.03 9,-9 0,-2.12 -0.740703,-4.0693745 -1.970703,-5.6093745 l 1.419922,-1.421875 c -0.43,-0.51 -0.900156,-0.9882031 -1.410156,-1.4082031 l -1.419922,1.4199219 c -1.55,-1.24 -3.499141,-1.9804688 -5.619141,-1.9804688 z m -1.789062,4.7480469 6,4.4999996 -6,4.5 z" }, null, -1)
|
|
1500
1543
|
]), 2))
|
|
1501
1544
|
]),
|
|
1502
1545
|
_: 1
|
|
1503
1546
|
}),
|
|
1504
|
-
|
|
1547
|
+
x(Y, {
|
|
1505
1548
|
class: "button",
|
|
1506
|
-
onClick:
|
|
1549
|
+
onClick: f
|
|
1507
1550
|
}, {
|
|
1508
|
-
default:
|
|
1509
|
-
|
|
1551
|
+
default: F(() => h[5] || (h[5] = [
|
|
1552
|
+
p("svg", {
|
|
1510
1553
|
class: "icon",
|
|
1511
1554
|
viewBox: "0 -960 960 960"
|
|
1512
1555
|
}, [
|
|
1513
|
-
|
|
1514
|
-
|
|
1556
|
+
p("path", { d: "m 306.66667,-360 q -44,0 -75.33334,-31.33333 Q 200,-422.66667 200,-466.66667 q 0,-44 31.33333,-75.33333 31.33334,-31.33333 75.33334,-31.33333 15.33333,0 28.33333,3.66666 13,3.66667 25,11 V -840 h 160 v 106.66667 H 413.33333 v 266.66666 q 0,44 -31.33333,75.33334 Q 350.66667,-360 306.66667,-360 Z" }),
|
|
1557
|
+
p("path", { d: "m 546.66667,-120 q -44,0 -75.33334,-31.33333 Q 440,-182.66667 440,-226.66667 q 0,-44 31.33333,-75.33333 31.33334,-31.33333 75.33334,-31.33333 15.33333,0 28.33333,3.66666 13,3.66667 25,11 V -600 h 160 v 106.66667 H 653.33333 v 266.66666 q 0,44 -31.33333,75.33334 Q 590.66667,-120 546.66667,-120 Z" })
|
|
1515
1558
|
], -1)
|
|
1516
1559
|
])),
|
|
1517
1560
|
_: 1,
|
|
@@ -1520,18 +1563,18 @@ const bt = {
|
|
|
1520
1563
|
])
|
|
1521
1564
|
]));
|
|
1522
1565
|
}
|
|
1523
|
-
},
|
|
1566
|
+
}, $t = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-439bd19c"]]), Dt = { class: "container" }, zt = { class: "panel" }, Te = 40, Ce = 40, xe = 100, Ft = 50, Be = 400, we = 570, Ee = 570, Ut = 350, qt = 330, Wt = 360, Ht = 360, jt = {
|
|
1524
1567
|
__name: "MixerLayout",
|
|
1525
1568
|
setup(e) {
|
|
1526
|
-
|
|
1527
|
-
"2540622b":
|
|
1528
|
-
"25398f45":
|
|
1529
|
-
fc452918:
|
|
1569
|
+
W((d) => ({
|
|
1570
|
+
"2540622b": o.value,
|
|
1571
|
+
"25398f45": u.value,
|
|
1572
|
+
fc452918: f.value
|
|
1530
1573
|
}));
|
|
1531
|
-
const t =
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
}),
|
|
1574
|
+
const t = se(), a = H("container"), { width: n } = j(a), s = _(() => {
|
|
1575
|
+
const d = n.value, r = t.parts.length;
|
|
1576
|
+
return d < 640 || d < Te * r + Be ? 0 : d < Ce * r + we ? 1 : d < xe * r + Ee ? 2 : 3;
|
|
1577
|
+
}), o = _(() => {
|
|
1535
1578
|
switch (s.value) {
|
|
1536
1579
|
case 0:
|
|
1537
1580
|
return `${Ut}px ` + `${Ft}px `.repeat(t.parts.length);
|
|
@@ -1542,50 +1585,50 @@ const bt = {
|
|
|
1542
1585
|
default:
|
|
1543
1586
|
return `${Ht}px`;
|
|
1544
1587
|
}
|
|
1545
|
-
}),
|
|
1588
|
+
}), u = _(() => {
|
|
1546
1589
|
switch (s.value) {
|
|
1547
1590
|
case 0:
|
|
1548
1591
|
return "100vw";
|
|
1549
1592
|
case 1:
|
|
1550
1593
|
return `${Te}px `.repeat(t.parts.length) + `${Be}px`;
|
|
1551
1594
|
case 2:
|
|
1552
|
-
return `${Ce}px `.repeat(t.parts.length) + `${
|
|
1595
|
+
return `${Ce}px `.repeat(t.parts.length) + `${we}px`;
|
|
1553
1596
|
default:
|
|
1554
|
-
return `${
|
|
1597
|
+
return `${xe}px `.repeat(t.parts.length) + `${Ee}px`;
|
|
1555
1598
|
}
|
|
1556
|
-
}),
|
|
1557
|
-
const
|
|
1558
|
-
return s.value > 0 ? '"' +
|
|
1599
|
+
}), f = _(() => {
|
|
1600
|
+
const d = [...t.parts.keys()];
|
|
1601
|
+
return s.value > 0 ? '"' + d.map((r) => "part" + r).join(" ") + ' controls"' : '"controls" ' + d.map((r) => '"part' + r + '"').join(" ");
|
|
1559
1602
|
});
|
|
1560
|
-
return (
|
|
1603
|
+
return (d, r) => (S(), k("div", {
|
|
1561
1604
|
class: "outer",
|
|
1562
1605
|
ref_key: "container",
|
|
1563
1606
|
ref: a
|
|
1564
1607
|
}, [
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
(
|
|
1608
|
+
p("div", Dt, [
|
|
1609
|
+
p("div", zt, [
|
|
1610
|
+
(S(!0), k(oe, null, fe(P(t).parts, (c, b) => (S(), ye(gt, {
|
|
1568
1611
|
key: c.name,
|
|
1569
|
-
class: w("part" +
|
|
1612
|
+
class: w("part" + b),
|
|
1570
1613
|
name: c.name,
|
|
1571
1614
|
volume: c.volume,
|
|
1572
|
-
"onUpdate:volume": (
|
|
1615
|
+
"onUpdate:volume": (M) => c.volume = M,
|
|
1573
1616
|
solo: c.solo,
|
|
1574
|
-
"onUpdate:solo": (
|
|
1617
|
+
"onUpdate:solo": (M) => c.solo = M,
|
|
1575
1618
|
mute: c.mute,
|
|
1576
|
-
"onUpdate:mute": (
|
|
1619
|
+
"onUpdate:mute": (M) => c.mute = M,
|
|
1577
1620
|
ref_for: !0,
|
|
1578
1621
|
ref: "parts"
|
|
1579
1622
|
}, null, 8, ["class", "name", "volume", "onUpdate:volume", "solo", "onUpdate:solo", "mute", "onUpdate:mute"]))), 128)),
|
|
1580
|
-
|
|
1581
|
-
title:
|
|
1623
|
+
x($t, {
|
|
1624
|
+
title: P(t).title,
|
|
1582
1625
|
class: "controls"
|
|
1583
1626
|
}, null, 8, ["title"])
|
|
1584
1627
|
])
|
|
1585
1628
|
])
|
|
1586
1629
|
], 512));
|
|
1587
1630
|
}
|
|
1588
|
-
}, ta = /* @__PURE__ */
|
|
1631
|
+
}, ta = /* @__PURE__ */ A(jt, [["__scopeId", "data-v-03258471"]]), Gt = { class: "outer" }, Zt = { class: "mid" }, Kt = { class: "inner" }, Yt = {
|
|
1589
1632
|
key: 0,
|
|
1590
1633
|
class: "content"
|
|
1591
1634
|
}, Qt = {
|
|
@@ -1601,40 +1644,40 @@ const bt = {
|
|
|
1601
1644
|
}
|
|
1602
1645
|
},
|
|
1603
1646
|
setup(e) {
|
|
1604
|
-
return
|
|
1647
|
+
return W((t) => ({
|
|
1605
1648
|
"66bea586": e.colour
|
|
1606
|
-
})), (t, a) => (
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
e.text || t.$slots.default ? (
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
])) :
|
|
1649
|
+
})), (t, a) => (S(), k("div", Gt, [
|
|
1650
|
+
p("div", Zt, [
|
|
1651
|
+
p("div", Kt, [
|
|
1652
|
+
e.text || t.$slots.default ? (S(), k("div", Yt, [
|
|
1653
|
+
be(R(e.text) + " ", 1),
|
|
1654
|
+
ve(t.$slots, "default", {}, void 0, !0)
|
|
1655
|
+
])) : ie("", !0)
|
|
1613
1656
|
])
|
|
1614
1657
|
])
|
|
1615
1658
|
]));
|
|
1616
1659
|
}
|
|
1617
|
-
}, aa = /* @__PURE__ */
|
|
1660
|
+
}, aa = /* @__PURE__ */ A(Qt, [["__scopeId", "data-v-dff76c48"]]);
|
|
1618
1661
|
export {
|
|
1619
1662
|
Y as AudioButton,
|
|
1620
|
-
|
|
1621
|
-
|
|
1663
|
+
ce as AudioSlider,
|
|
1664
|
+
xt as BarInput,
|
|
1622
1665
|
ze as BaseNumericInput,
|
|
1623
|
-
|
|
1666
|
+
me as DEV_MODE,
|
|
1624
1667
|
ft as DummyAudioEngine,
|
|
1625
|
-
|
|
1668
|
+
$t as MixerControls,
|
|
1626
1669
|
ta as MixerLayout,
|
|
1627
1670
|
gt as PartControl,
|
|
1628
1671
|
aa as Placeholder,
|
|
1629
1672
|
Et as SpeedInput,
|
|
1630
1673
|
Pt as TimeInput,
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1674
|
+
$e as TitleText,
|
|
1675
|
+
ht as TriState,
|
|
1676
|
+
De as isDevFeature,
|
|
1634
1677
|
ea as isDevMode,
|
|
1635
1678
|
X as useAudioStateStore,
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1679
|
+
j as useElementSize,
|
|
1680
|
+
re as useMasterAudioControl,
|
|
1681
|
+
se as useMusicDataStore,
|
|
1682
|
+
mt as usePlaybackStateStore
|
|
1640
1683
|
};
|