audio-mixer-ui 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { ref as _, watch as R, unref as I, onScopeDispose as ee, readonly as Ct, mergeModels as wt, useCssVars as tt, computed as M, useTemplateRef as j, useModel as X, createElementBlock as w, openBlock as P, normalizeClass as L, createElementVNode as m, createCommentVNode as q, Fragment as ct, renderList as Et, normalizeStyle as Rt, watchEffect as Mt, renderSlot as rt, toDisplayString as K, onUnmounted as vt, onMounted as gt, createVNode as N, withCtx as W, createTextVNode as bt, withDirectives as Tt, withKeys as ae, vModelText as Ot, withModifiers as St, createBlock as ht, nextTick as se, createStaticVNode as ne, vModelCheckbox as ie } from "vue";
2
- import { defineStore as yt } from "pinia";
1
+ import { ref as _, watch as R, unref as L, onScopeDispose as ee, readonly as Dt, mergeModels as Lt, useCssVars as at, computed as k, useTemplateRef as Y, useModel as tt, createElementBlock as T, openBlock as w, normalizeClass as I, createElementVNode as m, createCommentVNode as F, Fragment as pt, renderList as At, normalizeStyle as Gt, watchEffect as Tt, renderSlot as ut, toDisplayString as K, onUnmounted as kt, onMounted as Mt, createVNode as D, withCtx as Z, createTextVNode as St, withDirectives as It, withKeys as ae, vModelText as qt, withModifiers as Ct, createBlock as vt, nextTick as se, createStaticVNode as ne, vModelCheckbox as ie } from "vue";
2
+ import { defineStore as Pt } from "pinia";
3
3
  import { LightweightAudioEngine as re, SpessaSynthAudioEngine as oe, PlaybackManager as le } from "audio-mixer-engine";
4
- var $t = function() {
4
+ var Ht = function() {
5
5
  if (typeof Map < "u")
6
6
  return Map;
7
7
  function e(t, a) {
@@ -47,10 +47,10 @@ var $t = function() {
47
47
  }, t;
48
48
  }()
49
49
  );
50
- }(), xt = typeof window < "u" && typeof document < "u" && window.document === document, mt = function() {
50
+ }(), Bt = typeof window < "u" && typeof document < "u" && window.document === document, gt = function() {
51
51
  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")();
52
52
  }(), ue = function() {
53
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(mt) : function(e) {
53
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(gt) : function(e) {
54
54
  return setTimeout(function() {
55
55
  return e(Date.now());
56
56
  }, 1e3 / 60);
@@ -59,24 +59,24 @@ var $t = function() {
59
59
  function ce(e, t) {
60
60
  var a = !1, s = !1, n = 0;
61
61
  function i() {
62
- a && (a = !1, e()), s && d();
62
+ a && (a = !1, e()), s && h();
63
63
  }
64
64
  function r() {
65
65
  ue(i);
66
66
  }
67
- function d() {
68
- var f = Date.now();
67
+ function h() {
68
+ var b = Date.now();
69
69
  if (a) {
70
- if (f - n < de)
70
+ if (b - n < de)
71
71
  return;
72
72
  s = !0;
73
73
  } else
74
74
  a = !0, s = !1, setTimeout(r, t);
75
- n = f;
75
+ n = b;
76
76
  }
77
- return d;
77
+ return h;
78
78
  }
79
- var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], pe = typeof MutationObserver < "u", fe = (
79
+ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], fe = typeof MutationObserver < "u", pe = (
80
80
  /** @class */
81
81
  function() {
82
82
  function e() {
@@ -98,14 +98,14 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
98
98
  return a.broadcastActive();
99
99
  }), t.length > 0;
100
100
  }, e.prototype.connect_ = function() {
101
- !xt || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), pe ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
101
+ !Bt || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), fe ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
102
102
  attributes: !0,
103
103
  childList: !0,
104
104
  characterData: !0,
105
105
  subtree: !0
106
106
  })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
107
107
  }, e.prototype.disconnect_ = function() {
108
- !xt || !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
+ !Bt || !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);
109
109
  }, e.prototype.onTransitionEnd_ = function(t) {
110
110
  var a = t.propertyName, s = a === void 0 ? "" : a, n = me.some(function(i) {
111
111
  return !!~s.indexOf(i);
@@ -115,7 +115,7 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
115
115
  return this.instance_ || (this.instance_ = new e()), this.instance_;
116
116
  }, e.instance_ = null, e;
117
117
  }()
118
- ), Ft = function(e, t) {
118
+ ), Wt = function(e, t) {
119
119
  for (var a = 0, s = Object.keys(t); a < s.length; a++) {
120
120
  var n = s[a];
121
121
  Object.defineProperty(e, n, {
@@ -126,59 +126,59 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
126
126
  });
127
127
  }
128
128
  return e;
129
- }, it = function(e) {
129
+ }, ot = function(e) {
130
130
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
131
- return t || mt;
132
- }, Ut = kt(0, 0, 0, 0);
133
- function pt(e) {
131
+ return t || gt;
132
+ }, jt = xt(0, 0, 0, 0);
133
+ function bt(e) {
134
134
  return parseFloat(e) || 0;
135
135
  }
136
- function _t(e) {
136
+ function Vt(e) {
137
137
  for (var t = [], a = 1; a < arguments.length; a++)
138
138
  t[a - 1] = arguments[a];
139
139
  return t.reduce(function(s, n) {
140
140
  var i = e["border-" + n + "-width"];
141
- return s + pt(i);
141
+ return s + bt(i);
142
142
  }, 0);
143
143
  }
144
144
  function ve(e) {
145
145
  for (var t = ["top", "right", "bottom", "left"], a = {}, s = 0, n = t; s < n.length; s++) {
146
146
  var i = n[s], r = e["padding-" + i];
147
- a[i] = pt(r);
147
+ a[i] = bt(r);
148
148
  }
149
149
  return a;
150
150
  }
151
151
  function ge(e) {
152
152
  var t = e.getBBox();
153
- return kt(0, 0, t.width, t.height);
153
+ return xt(0, 0, t.width, t.height);
154
154
  }
155
155
  function be(e) {
156
156
  var t = e.clientWidth, a = e.clientHeight;
157
157
  if (!t && !a)
158
- return Ut;
159
- var s = it(e).getComputedStyle(e), n = ve(s), i = n.left + n.right, r = n.top + n.bottom, d = pt(s.width), f = pt(s.height);
160
- if (s.boxSizing === "border-box" && (Math.round(d + i) !== t && (d -= _t(s, "left", "right") + i), Math.round(f + r) !== a && (f -= _t(s, "top", "bottom") + r)), !ke(e)) {
161
- var l = Math.round(d + i) - t, g = Math.round(f + r) - a;
162
- Math.abs(l) !== 1 && (d -= l), Math.abs(g) !== 1 && (f -= g);
158
+ return jt;
159
+ var s = ot(e).getComputedStyle(e), n = ve(s), i = n.left + n.right, r = n.top + n.bottom, h = bt(s.width), b = bt(s.height);
160
+ if (s.boxSizing === "border-box" && (Math.round(h + i) !== t && (h -= Vt(s, "left", "right") + i), Math.round(b + r) !== a && (b -= Vt(s, "top", "bottom") + r)), !ke(e)) {
161
+ var l = Math.round(h + i) - t, v = Math.round(b + r) - a;
162
+ Math.abs(l) !== 1 && (h -= l), Math.abs(v) !== 1 && (b -= v);
163
163
  }
164
- return kt(n.left, n.top, d, f);
164
+ return xt(n.left, n.top, h, b);
165
165
  }
166
166
  var ye = /* @__PURE__ */ function() {
167
167
  return typeof SVGGraphicsElement < "u" ? function(e) {
168
- return e instanceof it(e).SVGGraphicsElement;
168
+ return e instanceof ot(e).SVGGraphicsElement;
169
169
  } : function(e) {
170
- return e instanceof it(e).SVGElement && typeof e.getBBox == "function";
170
+ return e instanceof ot(e).SVGElement && typeof e.getBBox == "function";
171
171
  };
172
172
  }();
173
173
  function ke(e) {
174
- return e === it(e).document.documentElement;
174
+ return e === ot(e).document.documentElement;
175
175
  }
176
176
  function Me(e) {
177
- return xt ? ye(e) ? ge(e) : be(e) : Ut;
177
+ return Bt ? ye(e) ? ge(e) : be(e) : jt;
178
178
  }
179
179
  function Se(e) {
180
180
  var t = e.x, a = e.y, s = e.width, n = e.height, i = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, r = Object.create(i.prototype);
181
- return Ft(r, {
181
+ return Wt(r, {
182
182
  x: t,
183
183
  y: a,
184
184
  width: s,
@@ -189,14 +189,14 @@ function Se(e) {
189
189
  left: t
190
190
  }), r;
191
191
  }
192
- function kt(e, t, a, s) {
192
+ function xt(e, t, a, s) {
193
193
  return { x: e, y: t, width: a, height: s };
194
194
  }
195
- var xe = (
195
+ var Pe = (
196
196
  /** @class */
197
197
  function() {
198
198
  function e(t) {
199
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = kt(0, 0, 0, 0), this.target = t;
199
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = xt(0, 0, 0, 0), this.target = t;
200
200
  }
201
201
  return e.prototype.isActive = function() {
202
202
  var t = Me(this.target);
@@ -206,12 +206,12 @@ var xe = (
206
206
  return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
207
207
  }, e;
208
208
  }()
209
- ), Pe = (
209
+ ), xe = (
210
210
  /** @class */
211
211
  /* @__PURE__ */ function() {
212
212
  function e(t, a) {
213
213
  var s = Se(a);
214
- Ft(this, { target: t, contentRect: s });
214
+ Wt(this, { target: t, contentRect: s });
215
215
  }
216
216
  return e;
217
217
  }()
@@ -219,7 +219,7 @@ var xe = (
219
219
  /** @class */
220
220
  function() {
221
221
  function e(t, a, s) {
222
- if (this.activeObservations_ = [], this.observations_ = new $t(), typeof t != "function")
222
+ if (this.activeObservations_ = [], this.observations_ = new Ht(), typeof t != "function")
223
223
  throw new TypeError("The callback provided as parameter 1 is not a function.");
224
224
  this.callback_ = t, this.controller_ = a, this.callbackCtx_ = s;
225
225
  }
@@ -227,16 +227,16 @@ var xe = (
227
227
  if (!arguments.length)
228
228
  throw new TypeError("1 argument required, but only 0 present.");
229
229
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
230
- if (!(t instanceof it(t).Element))
230
+ if (!(t instanceof ot(t).Element))
231
231
  throw new TypeError('parameter 1 is not of type "Element".');
232
232
  var a = this.observations_;
233
- a.has(t) || (a.set(t, new xe(t)), this.controller_.addObserver(this), this.controller_.refresh());
233
+ a.has(t) || (a.set(t, new Pe(t)), this.controller_.addObserver(this), this.controller_.refresh());
234
234
  }
235
235
  }, e.prototype.unobserve = function(t) {
236
236
  if (!arguments.length)
237
237
  throw new TypeError("1 argument required, but only 0 present.");
238
238
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
239
- if (!(t instanceof it(t).Element))
239
+ if (!(t instanceof ot(t).Element))
240
240
  throw new TypeError('parameter 1 is not of type "Element".');
241
241
  var a = this.observations_;
242
242
  a.has(t) && (a.delete(t), a.size || this.controller_.removeObserver(this));
@@ -251,7 +251,7 @@ var xe = (
251
251
  }, e.prototype.broadcastActive = function() {
252
252
  if (this.hasActive()) {
253
253
  var t = this.callbackCtx_, a = this.activeObservations_.map(function(s) {
254
- return new Pe(s.target, s.broadcastRect());
254
+ return new xe(s.target, s.broadcastRect());
255
255
  });
256
256
  this.callback_.call(t, a, t), this.clearActive();
257
257
  }
@@ -261,7 +261,7 @@ var xe = (
261
261
  return this.activeObservations_.length > 0;
262
262
  }, e;
263
263
  }()
264
- ), Gt = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new $t(), Kt = (
264
+ ), Zt = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Ht(), Yt = (
265
265
  /** @class */
266
266
  /* @__PURE__ */ function() {
267
267
  function e(t) {
@@ -269,8 +269,8 @@ var xe = (
269
269
  throw new TypeError("Cannot call a class as a function.");
270
270
  if (!arguments.length)
271
271
  throw new TypeError("1 argument required, but only 0 present.");
272
- var a = fe.getInstance(), s = new we(t, a, this);
273
- Gt.set(this, s);
272
+ var a = pe.getInstance(), s = new we(t, a, this);
273
+ Zt.set(this, s);
274
274
  }
275
275
  return e;
276
276
  }()
@@ -280,46 +280,46 @@ var xe = (
280
280
  "unobserve",
281
281
  "disconnect"
282
282
  ].forEach(function(e) {
283
- Kt.prototype[e] = function() {
283
+ Yt.prototype[e] = function() {
284
284
  var t;
285
- return (t = Gt.get(this))[e].apply(t, arguments);
285
+ return (t = Zt.get(this))[e].apply(t, arguments);
286
286
  };
287
287
  });
288
288
  var Ee = function() {
289
- return typeof mt.ResizeObserver < "u" ? mt.ResizeObserver : Kt;
289
+ return typeof gt.ResizeObserver < "u" ? gt.ResizeObserver : Yt;
290
290
  }();
291
- function et(e) {
291
+ function st(e) {
292
292
  const t = _(0), a = _(0);
293
293
  let s = null;
294
294
  const n = () => {
295
295
  s && (s.disconnect(), s = null);
296
296
  };
297
- return R(() => I(e), () => {
297
+ return R(() => L(e), () => {
298
298
  n();
299
- const r = I(e);
299
+ const r = L(e);
300
300
  if (!r) return;
301
- s = new Ee((f) => {
302
- const l = f[0];
301
+ s = new Ee((b) => {
302
+ const l = b[0];
303
303
  l && (t.value = l.contentRect.width, a.value = l.contentRect.height);
304
304
  }), s.observe(r);
305
- const d = r.getBoundingClientRect();
306
- t.value = d.width, a.value = d.height;
305
+ const h = r.getBoundingClientRect();
306
+ t.value = h.width, a.value = h.height;
307
307
  }, { immediate: !0 }), ee(n), {
308
- width: Ct(t),
309
- height: Ct(a)
308
+ width: Dt(t),
309
+ height: Dt(a)
310
310
  };
311
311
  }
312
- const $ = (e, t) => {
312
+ const U = (e, t) => {
313
313
  const a = e.__vccOpts || e;
314
314
  for (const [s, n] of t)
315
315
  a[s] = n;
316
316
  return a;
317
- }, Te = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-label", "aria-orientation", "tabindex"], Be = {
317
+ }, Te = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-label", "aria-orientation", "tabindex"], Ce = {
318
318
  key: 0,
319
319
  class: "level"
320
- }, Ce = {
320
+ }, Be = {
321
321
  __name: "AudioSlider",
322
- props: /* @__PURE__ */ wt({
322
+ props: /* @__PURE__ */ Lt({
323
323
  min: { type: Number, default: 0 },
324
324
  max: { type: Number, default: 1 },
325
325
  step: { type: Number, default: 0.01 },
@@ -338,62 +338,62 @@ const $ = (e, t) => {
338
338
  }),
339
339
  emits: ["update:value"],
340
340
  setup(e) {
341
- tt((h) => ({
342
- "2096b4c3": B.value,
343
- "757f26aa": T.value,
344
- "744b71b7": E.value,
345
- d898db12: v.value,
346
- "3a8d2f7c": S.value
341
+ at((p) => ({
342
+ "2096b4c3": V.value,
343
+ "757f26aa": C.value,
344
+ "744b71b7": S.value,
345
+ d898db12: f.value,
346
+ "3a8d2f7c": P.value
347
347
  }));
348
- const t = e, a = j("root"), { width: s, height: n } = et(a), i = M(() => Math.min(s.value, n.value)), r = M(() => Math.max(s.value, n.value)), d = M(() => s.value > n.value), f = M(() => d.value ? "h-slide" : "v-slide"), l = X(e, "value");
349
- M(() => Math.pow(1 - l.value, 0.5) * 180 + 20), M(() => Math.pow(l.value, 0.5) * 180 + 20);
350
- const g = M(() => i.value * 0.8), y = M(() => i.value * t.thumbLength * 0.8), T = M(() => (d.value ? y : g).value + "px"), B = M(() => (d.value ? g : y).value + "px"), v = M(() => i.value * 0.1 + "px"), S = M(() => (r.value - y.value) * (l.value - t.min) / (t.max - t.min) + "px"), E = M(() => d.value ? "90deg" : "0deg"), D = _(!1), V = _(0), O = (h) => {
348
+ const t = e, a = Y("root"), { width: s, height: n } = st(a), i = k(() => Math.min(s.value, n.value)), r = k(() => Math.max(s.value, n.value)), h = k(() => s.value > n.value), b = k(() => h.value ? "h-slide" : "v-slide"), l = tt(e, "value");
349
+ k(() => Math.pow(1 - l.value, 0.5) * 180 + 20), k(() => Math.pow(l.value, 0.5) * 180 + 20);
350
+ const v = k(() => i.value * 0.8), E = k(() => i.value * t.thumbLength * 0.8), C = k(() => (h.value ? E : v).value + "px"), V = k(() => (h.value ? v : E).value + "px"), f = k(() => i.value * 0.1 + "px"), P = k(() => (r.value - E.value) * (l.value - t.min) / (t.max - t.min) + "px"), S = k(() => h.value ? "90deg" : "0deg"), B = _(!1), N = _(0), z = (p) => {
351
351
  if (!a.value) return l.value;
352
- const b = a.value.getBoundingClientRect(), A = h.clientX, st = h.clientY;
352
+ const g = a.value.getBoundingClientRect(), A = p.clientX, lt = p.clientY;
353
353
  let Q;
354
- if (d.value) {
355
- const p = A - b.left - g.value / 2, k = b.width - g.value;
356
- Q = Math.max(0, Math.min(1, p / k));
354
+ if (h.value) {
355
+ const X = A - g.left - v.value / 2, J = g.width - v.value;
356
+ Q = Math.max(0, Math.min(1, X / J));
357
357
  } else {
358
- const p = b.bottom - st - g.value / 2, k = b.height - g.value;
359
- Q = Math.max(0, Math.min(1, p / k));
358
+ const X = g.bottom - lt - v.value / 2, J = g.height - v.value;
359
+ Q = Math.max(0, Math.min(1, X / J));
360
360
  }
361
- const Y = t.min + Q * (t.max - t.min);
362
- return t.step > 0 ? Math.round(Y / t.step) * t.step : Y;
363
- }, F = (h) => {
364
- h.preventDefault(), D.value = !0, V.value = l.value, a.value && a.value.focus(), l.value = O(h), a.value && a.value.setPointerCapture && a.value.setPointerCapture(h.pointerId), document.addEventListener("pointermove", U), document.addEventListener("pointerup", z), document.addEventListener("pointercancel", z);
365
- }, U = (h) => {
366
- D.value && (h.preventDefault(), l.value = O(h));
367
- }, z = (h) => {
368
- if (D.value) {
369
- if (h.preventDefault(), D.value = !1, a.value && a.value.releasePointerCapture)
361
+ const W = t.min + Q * (t.max - t.min);
362
+ return t.step > 0 ? Math.round(W / t.step) * t.step : W;
363
+ }, q = (p) => {
364
+ p.preventDefault(), B.value = !0, N.value = l.value, a.value && a.value.focus(), l.value = z(p), a.value && a.value.setPointerCapture && a.value.setPointerCapture(p.pointerId), document.addEventListener("pointermove", G), document.addEventListener("pointerup", $), document.addEventListener("pointercancel", $);
365
+ }, G = (p) => {
366
+ B.value && (p.preventDefault(), l.value = z(p));
367
+ }, $ = (p) => {
368
+ if (B.value) {
369
+ if (p.preventDefault(), B.value = !1, a.value && a.value.releasePointerCapture)
370
370
  try {
371
- a.value.releasePointerCapture(h.pointerId);
371
+ a.value.releasePointerCapture(p.pointerId);
372
372
  } catch {
373
373
  }
374
- document.removeEventListener("pointermove", U), document.removeEventListener("pointerup", z), document.removeEventListener("pointercancel", z);
374
+ document.removeEventListener("pointermove", G), document.removeEventListener("pointerup", $), document.removeEventListener("pointercancel", $);
375
375
  }
376
- }, Z = (h) => {
376
+ }, H = (p) => {
377
377
  if (a.value && a.value.getAttribute("tabindex") === "-1")
378
378
  return;
379
- const b = t.keystep !== null ? t.keystep : t.step || 0.01;
379
+ const g = t.keystep !== null ? t.keystep : t.step || 0.01;
380
380
  let A = l.value;
381
- switch (h.key) {
381
+ switch (p.key) {
382
382
  case "ArrowLeft":
383
383
  case "ArrowDown":
384
- h.preventDefault(), A = Math.max(t.min, l.value - b);
384
+ p.preventDefault(), A = Math.max(t.min, l.value - g);
385
385
  break;
386
386
  case "ArrowRight":
387
387
  case "ArrowUp":
388
- h.preventDefault(), A = Math.min(t.max, l.value + b);
388
+ p.preventDefault(), A = Math.min(t.max, l.value + g);
389
389
  break;
390
390
  default:
391
391
  return;
392
392
  }
393
393
  l.value = A;
394
- }, u = (h) => Math.min(1, Math.max(0, t.level * 10 - h + 1));
395
- return (h, b) => (P(), w("div", {
396
- class: L(f.value),
394
+ }, d = (p) => Math.min(1, Math.max(0, t.level * 10 - p + 1));
395
+ return (p, g) => (w(), T("div", {
396
+ class: I(b.value),
397
397
  ref_key: "root",
398
398
  ref: a,
399
399
  role: "slider",
@@ -401,29 +401,29 @@ const $ = (e, t) => {
401
401
  "aria-valuemax": e.max,
402
402
  "aria-valuenow": l.value,
403
403
  "aria-label": `${e.style} control`,
404
- "aria-orientation": d.value ? "horizontal" : "vertical",
404
+ "aria-orientation": h.value ? "horizontal" : "vertical",
405
405
  tabindex: e.tabindex,
406
- onPointerdown: F,
407
- onKeydown: Z,
406
+ onPointerdown: q,
407
+ onKeydown: H,
408
408
  style: { userSelect: "none", touchAction: "none" }
409
409
  }, [
410
- b[0] || (b[0] = m("div", { class: "track" }, null, -1)),
411
- e.showLevel ? (P(), w("div", Be, [
412
- (P(), w(ct, null, Et(10, (A) => m("div", {
413
- class: L(["focus", "led" + A])
410
+ g[0] || (g[0] = m("div", { class: "track" }, null, -1)),
411
+ e.showLevel ? (w(), T("div", Ce, [
412
+ (w(), T(pt, null, At(10, (A) => m("div", {
413
+ class: I(["focus", "led" + A])
414
414
  }, [
415
415
  m("div", {
416
416
  class: "on",
417
- style: Rt({ opacity: u(A) })
417
+ style: Gt({ opacity: d(A) })
418
418
  }, null, 4)
419
419
  ], 2)), 64))
420
- ])) : q("", !0),
420
+ ])) : F("", !0),
421
421
  m("div", {
422
- class: L(["thumb", { dragging: D.value, [e.colour]: !0, [e.style]: !0 }])
422
+ class: I(["thumb", { dragging: B.value, [e.colour]: !0, [e.style]: !0 }])
423
423
  }, null, 2)
424
424
  ], 42, Te));
425
425
  }
426
- }, ft = /* @__PURE__ */ $(Ce, [["__scopeId", "data-v-42160c3a"]]), _e = {
426
+ }, yt = /* @__PURE__ */ U(Be, [["__scopeId", "data-v-42160c3a"]]), _e = {
427
427
  __name: "TitleText",
428
428
  props: {
429
429
  align: {
@@ -437,19 +437,19 @@ const $ = (e, t) => {
437
437
  }
438
438
  },
439
439
  setup(e) {
440
- tt((y) => ({
441
- "9d94564a": f.value,
440
+ at((E) => ({
441
+ "9d94564a": b.value,
442
442
  "6241cf7e": l.value + "px"
443
443
  }));
444
- const t = e, a = j("el"), s = j("textEl"), { width: n, height: i } = et(a), r = M(() => Math.min(n.value, i.value)), d = M(() => n.value > i.value ? "h-text" : "v-text"), f = M(() => r.value * 3 / 4 + "px"), l = _(0), g = _(!1);
445
- return Mt(() => {
444
+ const t = e, a = Y("el"), s = Y("textEl"), { width: n, height: i } = st(a), r = k(() => Math.min(n.value, i.value)), h = k(() => n.value > i.value ? "h-text" : "v-text"), b = k(() => r.value * 3 / 4 + "px"), l = _(0), v = _(!1);
445
+ return Tt(() => {
446
446
  if (!s.value || !a.value || t.overflow !== "scroll") {
447
- g.value = !1, l.value = 0;
447
+ v.value = !1, l.value = 0;
448
448
  return;
449
449
  }
450
- const y = d.value === "h-text" ? n.value : i.value, T = d.value === "h-text" ? s.value.scrollWidth : s.value.scrollHeight, B = y - 20;
451
- T > B ? (g.value = !0, l.value = T - B) : (g.value = !1, l.value = 0);
452
- }), (y, T) => (P(), w("div", {
450
+ const E = h.value === "h-text" ? n.value : i.value, C = h.value === "h-text" ? s.value.scrollWidth : s.value.scrollHeight, V = E - 20;
451
+ C > V ? (v.value = !0, l.value = C - V) : (v.value = !1, l.value = 0);
452
+ }), (E, C) => (w(), T("div", {
453
453
  ref_key: "el",
454
454
  ref: a,
455
455
  class: "outer"
@@ -457,13 +457,13 @@ const $ = (e, t) => {
457
457
  m("div", {
458
458
  ref_key: "textEl",
459
459
  ref: s,
460
- class: L({ [d.value]: !0, [e.align]: !0, scrolling: g.value })
460
+ class: I({ [h.value]: !0, [e.align]: !0, scrolling: v.value })
461
461
  }, [
462
- rt(y.$slots, "default", {}, void 0, !0)
462
+ ut(E.$slots, "default", {}, void 0, !0)
463
463
  ], 2)
464
464
  ], 512));
465
465
  }
466
- }, qt = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-8efcf3aa"]]), Ie = { class: "s-label" }, Ae = { class: "m-label" }, Le = {
466
+ }, Qt = /* @__PURE__ */ U(_e, [["__scopeId", "data-v-8efcf3aa"]]), Le = { class: "s-label" }, Ae = { class: "m-label" }, Ie = {
467
467
  __name: "TriState",
468
468
  props: {
469
469
  mute: { default: !1 },
@@ -473,33 +473,33 @@ const $ = (e, t) => {
473
473
  },
474
474
  emits: ["update:mute", "update:solo"],
475
475
  setup(e) {
476
- const t = X(e, "mute"), a = X(e, "solo"), s = j("outer"), { width: n, height: i } = et(s), r = M(() => n.value > i.value * 1.9);
477
- function d() {
476
+ const t = tt(e, "mute"), a = tt(e, "solo"), s = Y("outer"), { width: n, height: i } = st(s), r = k(() => n.value > i.value * 1.9);
477
+ function h() {
478
478
  t.value = !t.value, a.value = !1;
479
479
  }
480
- function f() {
480
+ function b() {
481
481
  a.value = !a.value, t.value = !1;
482
482
  }
483
- return (l, g) => (P(), w("div", {
483
+ return (l, v) => (w(), T("div", {
484
484
  class: "outer",
485
485
  ref_key: "outer",
486
486
  ref: s
487
487
  }, [
488
488
  m("div", {
489
489
  title: "Solo",
490
- class: L(["solo", { on: a.value }]),
491
- onClick: f
490
+ class: I(["solo", { on: a.value }]),
491
+ onClick: b
492
492
  }, null, 2),
493
- m("div", Ie, K(r.value ? "SOLO" : "S"), 1),
493
+ m("div", Le, K(r.value ? "SOLO" : "S"), 1),
494
494
  m("div", {
495
495
  title: "Mute",
496
- class: L(["mute", { on: t.value }]),
497
- onClick: d
496
+ class: I(["mute", { on: t.value }]),
497
+ onClick: h
498
498
  }, null, 2),
499
499
  m("div", Ae, K(r.value ? "MUTE" : "M"), 1)
500
500
  ], 512));
501
501
  }
502
- }, Ne = /* @__PURE__ */ $(Le, [["__scopeId", "data-v-7e3c1495"]]), Pt = {
502
+ }, Ne = /* @__PURE__ */ U(Ie, [["__scopeId", "data-v-7e3c1495"]]), _t = {
503
503
  // Enable development UI features (animations, random data, etc.)
504
504
  enabled: !1,
505
505
  // Specific feature flags
@@ -511,7 +511,7 @@ const $ = (e, t) => {
511
511
  // Enable other debug/dev features as needed
512
512
  debugMode: !1
513
513
  }
514
- }, Ra = () => Pt.enabled, Ht = (e) => Pt.enabled && Pt.features[e], at = yt("audioState", {
514
+ }, Oa = () => _t.enabled, Xt = (e) => _t.enabled && _t.features[e], nt = Pt("audioState", {
515
515
  state: () => ({
516
516
  // Playback state
517
517
  isPlaying: !1,
@@ -615,11 +615,13 @@ const $ = (e, t) => {
615
615
  this.isLoaded = e;
616
616
  }
617
617
  }
618
- }), J = yt("musicData", {
618
+ }), et = Pt("musicData", {
619
619
  state: () => ({
620
620
  // Musical structure
621
621
  beats: [],
622
622
  practiceMarks: {},
623
+ customPracticeMarks: {},
624
+ // User-added marks { letter: barNumber }
623
625
  parts: [],
624
626
  title: "",
625
627
  // Timing calculations
@@ -649,6 +651,32 @@ const $ = (e, t) => {
649
651
  return e.beats.forEach((s) => {
650
652
  s.bar === t && a.add(s.repeat);
651
653
  }), a.size;
654
+ },
655
+ // All marks (predefined + custom) as object
656
+ allPracticeMarks: (e) => ({ ...e.practiceMarks, ...e.customPracticeMarks }),
657
+ // All marks sorted by bar number (returns array of letters)
658
+ allPracticeMarksSorted: (e) => {
659
+ const t = { ...e.practiceMarks, ...e.customPracticeMarks };
660
+ return Object.entries(t).sort(([, a], [, s]) => a - s).map(([a]) => a);
661
+ },
662
+ // Check if a bar has any mark (predefined or custom)
663
+ barHasMark: (e) => (t) => {
664
+ const a = { ...e.practiceMarks, ...e.customPracticeMarks };
665
+ return Object.values(a).includes(t);
666
+ },
667
+ // Check if a letter is a custom mark
668
+ isCustomMark: (e) => (t) => t in e.customPracticeMarks,
669
+ // Get next available letter (A-Z)
670
+ nextAvailableLetter: (e) => {
671
+ const t = /* @__PURE__ */ new Set([
672
+ ...Object.keys(e.practiceMarks),
673
+ ...Object.keys(e.customPracticeMarks)
674
+ ]);
675
+ for (let a = 0; a < 26; a++) {
676
+ const s = String.fromCharCode(65 + a);
677
+ if (!t.has(s)) return s;
678
+ }
679
+ return null;
652
680
  }
653
681
  },
654
682
  actions: {
@@ -658,7 +686,7 @@ const $ = (e, t) => {
658
686
  ...t,
659
687
  solo: t.solo || !1,
660
688
  mute: t.mute || !1
661
- })), this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature();
689
+ })), this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature(), this.loadCustomMarksFromStorage();
662
690
  },
663
691
  // Calculate total duration from beats
664
692
  calculateDuration() {
@@ -679,6 +707,37 @@ const $ = (e, t) => {
679
707
  removePracticeMark(e) {
680
708
  delete this.practiceMarks[e];
681
709
  },
710
+ // Add custom practice mark at bar number
711
+ addCustomMark(e) {
712
+ const t = this.nextAvailableLetter;
713
+ return t && !this.barHasMark(e) ? (this.customPracticeMarks[t] = e, this.saveCustomMarksToStorage(), t) : null;
714
+ },
715
+ // Remove custom practice mark
716
+ removeCustomMark(e) {
717
+ e in this.customPracticeMarks && (delete this.customPracticeMarks[e], this.saveCustomMarksToStorage());
718
+ },
719
+ // Get localStorage key for current song
720
+ getStorageKey() {
721
+ return `customPracticeMarks_${this.title}`;
722
+ },
723
+ // Save custom marks to localStorage
724
+ saveCustomMarksToStorage() {
725
+ this.title && localStorage.setItem(this.getStorageKey(), JSON.stringify(this.customPracticeMarks));
726
+ },
727
+ // Load custom marks from localStorage
728
+ loadCustomMarksFromStorage() {
729
+ if (this.title) {
730
+ const e = localStorage.getItem(this.getStorageKey());
731
+ if (e)
732
+ try {
733
+ this.customPracticeMarks = JSON.parse(e);
734
+ } catch {
735
+ this.customPracticeMarks = {};
736
+ }
737
+ else
738
+ this.customPracticeMarks = {};
739
+ }
740
+ },
682
741
  // Update beats data (for when MIDI parser provides new beat information)
683
742
  updateBeats(e) {
684
743
  console.log("Updating beats in music data store"), this.beats = e, this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature();
@@ -702,10 +761,10 @@ const $ = (e, t) => {
702
761
  },
703
762
  // Clear all music data (reset to initial state)
704
763
  clear() {
705
- this.beats = [], this.practiceMarks = {}, this.parts = [], this.title = "", this.totalDuration = 0, this.maxBar = 0, this.timeSignature = 4, this.baseTempo = 80;
764
+ this.beats = [], this.practiceMarks = {}, this.customPracticeMarks = {}, this.parts = [], this.title = "", this.totalDuration = 0, this.maxBar = 0, this.timeSignature = 4, this.baseTempo = 80;
706
765
  }
707
766
  }
708
- }), Wt = yt("playbackState", {
767
+ }), Nt = Pt("playbackState", {
709
768
  state: () => ({
710
769
  // Transport state
711
770
  transportState: "stopped",
@@ -823,10 +882,10 @@ const $ = (e, t) => {
823
882
  },
824
883
  // Navigation points management
825
884
  buildFixedNavigationPoints() {
826
- const e = [], t = J();
885
+ const e = [], t = et();
827
886
  e.push({ time: 0, bar: 1, repeat: 1, label: "Start" });
828
887
  const a = t.beats.filter((s) => s.beat === 1);
829
- for (const [s, n] of Object.entries(t.practiceMarks))
888
+ for (const [s, n] of Object.entries(t.allPracticeMarks))
830
889
  a.filter((i) => i.bar === n).forEach((i) => {
831
890
  e.push({
832
891
  time: i.time,
@@ -843,7 +902,7 @@ const $ = (e, t) => {
843
902
  },
844
903
  rebuildNavigationPoints() {
845
904
  setTimeout(() => {
846
- const e = J(), t = [...this.fixedNavigationPoints];
905
+ const e = et(), t = [...this.fixedNavigationPoints];
847
906
  this.lastPlayStartBar !== null && e.beats.filter((n) => n.beat === 1 && n.bar === this.lastPlayStartBar).forEach((n) => {
848
907
  t.push({
849
908
  time: n.time,
@@ -870,7 +929,7 @@ const $ = (e, t) => {
870
929
  }
871
930
  }
872
931
  });
873
- function jt(e) {
932
+ function Jt(e) {
874
933
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
875
934
  var s = e.get(t);
876
935
  s ? s.push(a) : e.set(t, [a]);
@@ -886,7 +945,7 @@ function jt(e) {
886
945
  });
887
946
  } };
888
947
  }
889
- const It = ["spessasynth", "lightweight"];
948
+ const zt = ["spessasynth", "lightweight"];
890
949
  class De {
891
950
  constructor() {
892
951
  this._engineType = "spessasynth";
@@ -897,9 +956,9 @@ class De {
897
956
  * @throws {Error} If engine type is invalid
898
957
  */
899
958
  setEngineType(t) {
900
- if (!It.includes(t))
959
+ if (!zt.includes(t))
901
960
  throw new Error(
902
- `Invalid audio engine type: "${t}". Must be one of: ${It.join(", ")}`
961
+ `Invalid audio engine type: "${t}". Must be one of: ${zt.join(", ")}`
903
962
  );
904
963
  this._engineType = t;
905
964
  }
@@ -920,7 +979,7 @@ class De {
920
979
  const Ve = new De();
921
980
  class ze {
922
981
  constructor() {
923
- this.eventBus = jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.metronomeVolume = 0.7, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0, this.audioContext = null, this.audioEngine = null, this.playbackManager = null, this.musicData = null, this.beats = [], this.practiceMarks = {}, this.songDuration = 0, this.maxBar = 0, this.masterGain = null, this.metronomeGain = null, this.partGainNodes = /* @__PURE__ */ new Map(), this.partAnalyserNodes = /* @__PURE__ */ new Map(), this.isInitialized = !1;
982
+ this.eventBus = Jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.metronomeVolume = 0.7, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0, this.audioContext = null, this.audioEngine = null, this.playbackManager = null, this.musicData = null, this.beats = [], this.practiceMarks = {}, this.songDuration = 0, this.maxBar = 0, this.masterGain = null, this.metronomeGain = null, this.partGainNodes = /* @__PURE__ */ new Map(), this.partAnalyserNodes = /* @__PURE__ */ new Map(), this.isInitialized = !1;
924
983
  }
925
984
  // Sanitize part names to ensure consistent lookup
926
985
  // Remove non-printable characters, convert to lowercase, trim whitespace
@@ -945,8 +1004,8 @@ class ze {
945
1004
  try {
946
1005
  await this.audioEngine.initialize(r), console.log(`Loaded soundfont: ${r}`), n = !0;
947
1006
  break;
948
- } catch (d) {
949
- console.warn(`Failed to load soundfont ${r}:`, d.message), i = d;
1007
+ } catch (h) {
1008
+ console.warn(`Failed to load soundfont ${r}:`, h.message), i = h;
950
1009
  }
951
1010
  if (!n) {
952
1011
  const r = "No soundfont could be loaded";
@@ -1250,12 +1309,12 @@ class ze {
1250
1309
  const n = s.frequencyBinCount, i = new Uint8Array(n);
1251
1310
  s.getByteFrequencyData(i);
1252
1311
  let r = 0;
1253
- for (let f = 0; f < n; f++) {
1254
- const l = i[f] / 255;
1312
+ for (let b = 0; b < n; b++) {
1313
+ const l = i[b] / 255;
1255
1314
  r += l * l;
1256
1315
  }
1257
- const d = Math.sqrt(r / n);
1258
- return Math.min(1, Math.pow(d * 2, 0.7));
1316
+ const h = Math.sqrt(r / n);
1317
+ return Math.min(1, Math.pow(h * 2, 0.7));
1259
1318
  } catch (n) {
1260
1319
  return console.warn(`Failed to get level for part ${t}:`, n), 0;
1261
1320
  }
@@ -1341,150 +1400,154 @@ class ze {
1341
1400
  }
1342
1401
  }
1343
1402
  const c = new ze();
1344
- function ot(e = {}) {
1345
- const t = at(), a = J(), s = Wt(), n = {
1403
+ function dt(e = {}) {
1404
+ const t = nt(), a = et(), s = Nt(), n = {
1346
1405
  soundfontUrl: e.soundfontUrl
1347
1406
  }, i = ({ currentTime: o }) => {
1348
1407
  t.setCurrentTime(o);
1349
1408
  }, r = ({ isPlaying: o }) => {
1350
1409
  t.setPlaybackState(o), s.setTransportState(o ? "playing" : "stopped"), !o && t.isLeadInActive && (t.setLeadInActive(!1), c.emitTimeAndBarUpdates(t.currentTime));
1351
- }, d = (o) => {
1410
+ }, h = (o) => {
1352
1411
  o && (t.isLeadInActive ? o.isLeadIn && o.beat !== void 0 && t.setCurrentBar(null, o.beat, null) : (t.setCurrentBar(o.bar, o.beat, o.repeat), s.updateLastBarPosition(o.bar)));
1353
- }, f = ({ speed: o }) => {
1412
+ }, b = ({ speed: o }) => {
1354
1413
  t.setPlaybackSpeed(o);
1355
1414
  }, l = ({ volume: o }) => {
1356
1415
  t.setMasterVolume(o);
1357
- }, g = ({ partName: o, volume: x }) => {
1358
- t.setPartVolume(o, x);
1359
- }, y = ({ partName: o, muted: x }) => {
1360
- t.setPartMuted(o, x);
1361
- }, T = ({ partName: o, solo: x }) => {
1362
- t.setPartSolo(o, x);
1363
- }, B = ({ bars: o }) => {
1416
+ }, v = ({ partName: o, volume: M }) => {
1417
+ t.setPartVolume(o, M);
1418
+ }, E = ({ partName: o, muted: M }) => {
1419
+ t.setPartMuted(o, M);
1420
+ }, C = ({ partName: o, solo: M }) => {
1421
+ t.setPartSolo(o, M);
1422
+ }, V = ({ bars: o }) => {
1364
1423
  t.setLeadInActive(!0, o);
1365
- }, v = () => {
1424
+ }, f = () => {
1366
1425
  t.setLeadInActive(!1);
1367
- }, S = () => {
1426
+ }, P = () => {
1368
1427
  t.setStartingNotesActive(!0);
1369
- }, E = () => {
1428
+ }, S = () => {
1370
1429
  t.setStartingNotesActive(!1);
1371
- }, D = ({ mark: o }) => {
1430
+ }, B = ({ mark: o }) => {
1372
1431
  s.updateLastPracticeMarkUsed(o);
1373
- }, V = ({ parts: o }) => {
1432
+ }, N = ({ parts: o }) => {
1374
1433
  t.initializeParts(o), a.setParts(o);
1375
- }, O = ({ finalTime: o }) => {
1376
- t.setPlaybackState(!1), s.setTransportState("stopped"), console.log(`Song ended at time: ${o}`);
1377
- }, F = ({ duration: o }) => {
1434
+ }, z = ({ finalTime: o }) => {
1435
+ t.setPlaybackState(!1), s.setTransportState("stopped"), s.setNavigationAction("ended"), console.log(`Song ended at time: ${o}`);
1436
+ }, q = ({ duration: o }) => {
1378
1437
  console.log("Updating total duration in store to:", o), a.setTotalDuration(o);
1379
- }, U = ({ beats: o, practiceMarks: x, maxBar: H }) => {
1380
- console.log(`Updating music data store with ${o.length} beats and ${Object.keys(x).length} practice marks`), a.updateBeats(o), a.practiceMarks = x, a.maxBar = H;
1381
- }, z = () => {
1382
- c.on("timeChanged", i), c.on("playbackStateChanged", r), c.on("barChanged", d), c.on("speedChanged", f), c.on("masterVolumeChanged", l), c.on("partVolumeChanged", g), c.on("partMutedChanged", y), c.on("partSoloChanged", T), c.on("leadInStarted", B), c.on("leadInCompleted", v), c.on("startingNotesStarted", S), c.on("startingNotesCompleted", E), c.on("practiceMarkChanged", D), c.on("initialized", V), c.on("songEnded", O), c.on("durationUpdated", F), c.on("musicDataExtracted", U);
1383
- }, Z = () => {
1384
- c.off("timeChanged", i), c.off("playbackStateChanged", r), c.off("barChanged", d), c.off("speedChanged", f), c.off("masterVolumeChanged", l), c.off("partVolumeChanged", g), c.off("partMutedChanged", y), c.off("partSoloChanged", T), c.off("leadInStarted", B), c.off("leadInCompleted", v), c.off("startingNotesStarted", S), c.off("startingNotesCompleted", E), c.off("practiceMarkChanged", D), c.off("initialized", V), c.off("songEnded", O), c.off("durationUpdated", F), c.off("musicDataExtracted", U);
1438
+ }, G = ({ beats: o, practiceMarks: M, maxBar: j }) => {
1439
+ console.log(`Updating music data store with ${o.length} beats and ${Object.keys(M).length} practice marks`), a.updateBeats(o), a.practiceMarks = M, a.maxBar = j;
1440
+ }, $ = () => {
1441
+ c.on("timeChanged", i), c.on("playbackStateChanged", r), c.on("barChanged", h), c.on("speedChanged", b), c.on("masterVolumeChanged", l), c.on("partVolumeChanged", v), c.on("partMutedChanged", E), c.on("partSoloChanged", C), c.on("leadInStarted", V), c.on("leadInCompleted", f), c.on("startingNotesStarted", P), c.on("startingNotesCompleted", S), c.on("practiceMarkChanged", B), c.on("initialized", N), c.on("songEnded", z), c.on("durationUpdated", q), c.on("musicDataExtracted", G);
1442
+ }, H = () => {
1443
+ c.off("timeChanged", i), c.off("playbackStateChanged", r), c.off("barChanged", h), c.off("speedChanged", b), c.off("masterVolumeChanged", l), c.off("partVolumeChanged", v), c.off("partMutedChanged", E), c.off("partSoloChanged", C), c.off("leadInStarted", V), c.off("leadInCompleted", f), c.off("startingNotesStarted", P), c.off("startingNotesCompleted", S), c.off("practiceMarkChanged", B), c.off("initialized", N), c.off("songEnded", z), c.off("durationUpdated", q), c.off("musicDataExtracted", G);
1385
1444
  };
1386
1445
  (() => {
1387
- Mt(() => {
1446
+ Tt(() => {
1388
1447
  const o = t.masterVolume;
1389
1448
  try {
1390
1449
  c.getMasterVolume() !== o && c.setMasterVolume(o);
1391
- } catch (x) {
1392
- console.warn("Master volume sync skipped during initialization:", x.message);
1450
+ } catch (M) {
1451
+ console.warn("Master volume sync skipped during initialization:", M.message);
1393
1452
  }
1394
- }), Mt(() => {
1453
+ }), Tt(() => {
1395
1454
  const o = t.metronomeVolume;
1396
1455
  try {
1397
1456
  c.getMetronomeVolume() !== o && c.setMetronomeVolume(o);
1398
- } catch (x) {
1399
- console.warn("Metronome volume sync skipped during initialization:", x.message);
1457
+ } catch (M) {
1458
+ console.warn("Metronome volume sync skipped during initialization:", M.message);
1400
1459
  }
1401
1460
  });
1402
1461
  })();
1403
- const h = async (o) => {
1462
+ const p = async (o) => {
1404
1463
  try {
1405
- if (t.setLoaded(!1), z(), a.loadMusicData(o), await c.initialize(o, n), s.buildFixedNavigationPoints(), !o.midiData && o.beats && o.beats.length > 0) {
1406
- const x = o.beats[0];
1407
- t.setCurrentBar(x.bar, x.beat, x.repeat), c.setTime(x.time);
1464
+ if (t.setLoaded(!1), $(), a.loadMusicData(o), await c.initialize(o, n), s.buildFixedNavigationPoints(), !o.midiData && o.beats && o.beats.length > 0) {
1465
+ const M = o.beats[0];
1466
+ t.setCurrentBar(M.bar, M.beat, M.repeat), c.setTime(M.time);
1408
1467
  }
1409
1468
  c.updateToggleStates(t.metronomeEnabled, t.leadInEnabled), t.setLoaded(!0);
1410
- } catch (x) {
1411
- throw console.error("Failed to initialize audio engine:", x), t.setLoaded(!1), x;
1469
+ } catch (M) {
1470
+ throw console.error("Failed to initialize audio engine:", M), t.setLoaded(!1), M;
1412
1471
  }
1413
- }, b = () => {
1414
- const o = t.currentBar, x = t.currentRepeat, H = t.currentTime;
1415
- s.setLastPlayStart(o, x, H), s.setNavigationAction("play"), c.play();
1472
+ }, g = () => {
1473
+ const o = t.currentBar, M = t.currentRepeat, j = t.currentTime;
1474
+ s.setLastPlayStart(o, M, j), s.setNavigationAction("play"), c.play();
1416
1475
  }, A = () => {
1417
1476
  s.setNavigationAction("pause"), c.stop();
1418
- }, st = () => {
1477
+ }, lt = () => {
1419
1478
  s.setNavigationAction("pause"), c.pause();
1420
1479
  }, Q = (o) => {
1421
1480
  s.setNavigationAction("manual"), c.setTime(o);
1422
- }, Y = (o, x = 0) => {
1423
- s.setNavigationAction("manual"), c.setBar(o, x);
1424
- }, p = (o) => {
1425
- c.goToPracticeMark(o);
1426
- }, k = (o) => {
1481
+ }, W = (o, M = 0) => {
1482
+ s.setNavigationAction("manual"), c.setBar(o, M);
1483
+ }, X = (o) => {
1484
+ if (a.isCustomMark(o)) {
1485
+ const M = a.customPracticeMarks[o];
1486
+ M !== void 0 && c.setBar(M);
1487
+ } else
1488
+ c.goToPracticeMark(o);
1489
+ }, J = (o) => {
1427
1490
  c.setPlaybackSpeed(o);
1428
- }, C = (o) => {
1491
+ }, ct = (o) => {
1429
1492
  c.setMasterVolume(o);
1430
- }, G = (o, x) => {
1431
- c.setPartVolume(o, x);
1432
- }, lt = (o, x) => {
1433
- c.setPartMuted(o, x);
1434
- }, ut = (o, x) => {
1435
- c.setPartSolo(o, x);
1436
- }, dt = (o = 1) => {
1493
+ }, ht = (o, M) => {
1494
+ c.setPartVolume(o, M);
1495
+ }, wt = (o, M) => {
1496
+ c.setPartMuted(o, M);
1497
+ }, mt = (o, M) => {
1498
+ c.setPartSolo(o, M);
1499
+ }, ft = (o = 1) => {
1437
1500
  c.playLeadIn(o);
1438
- }, Yt = () => {
1501
+ }, Et = () => {
1439
1502
  c.playStartingNotes();
1440
- }, Bt = (o, x = !0, H = 0) => {
1441
- x && s.leadInEnabled ? (Y(o, H), dt(s.leadInBars)) : (Y(o, H), b());
1442
- }, Qt = (o, x = !0) => {
1443
- const H = a.getBarForMark(o);
1444
- H && Bt(H, x);
1445
- }, Xt = () => {
1503
+ }, u = (o, M = !0, j = 0) => {
1504
+ M && s.leadInEnabled ? (W(o, j), ft(s.leadInBars)) : (W(o, j), g());
1505
+ }, y = (o, M = !0) => {
1506
+ const j = a.getBarForMark(o);
1507
+ j && u(j, M);
1508
+ }, x = () => {
1446
1509
  const o = !t.metronomeEnabled;
1447
1510
  return t.setMetronomeEnabled(o), c.setMetronomeEnabled(o), o;
1448
- }, Jt = () => {
1511
+ }, O = () => {
1449
1512
  const o = !t.leadInEnabled;
1450
1513
  return t.setLeadInEnabled(o), c.updateToggleStates(t.metronomeEnabled, o), o;
1451
- }, te = () => {
1514
+ }, it = () => {
1452
1515
  c.stop(), t.setLoaded(!1), a.clear(), console.log("Audio mixer reset - ready for new score");
1453
1516
  };
1454
- return vt(() => {
1455
- Z();
1517
+ return kt(() => {
1518
+ H();
1456
1519
  }), {
1457
1520
  // Initialization
1458
- initialize: h,
1459
- reset: te,
1521
+ initialize: p,
1522
+ reset: it,
1460
1523
  // Transport controls
1461
- play: b,
1524
+ play: g,
1462
1525
  stop: A,
1463
- pause: st,
1526
+ pause: lt,
1464
1527
  // Time controls
1465
1528
  setTime: Q,
1466
- setBar: Y,
1529
+ setBar: W,
1467
1530
  // Navigation
1468
- goToPracticeMark: p,
1469
- setPlaybackSpeed: k,
1531
+ goToPracticeMark: X,
1532
+ setPlaybackSpeed: J,
1470
1533
  // Volume controls
1471
- setMasterVolume: C,
1472
- setPartVolume: G,
1473
- setPartMuted: lt,
1474
- setPartSolo: ut,
1534
+ setMasterVolume: ct,
1535
+ setPartVolume: ht,
1536
+ setPartMuted: wt,
1537
+ setPartSolo: mt,
1475
1538
  getPartLevel: (o) => c.getPartLevel(o),
1476
1539
  // Special features
1477
- playLeadIn: dt,
1478
- playStartingNotes: Yt,
1540
+ playLeadIn: ft,
1541
+ playStartingNotes: Et,
1479
1542
  // Feature toggles
1480
- toggleMetronome: Xt,
1481
- toggleLeadIn: Jt,
1543
+ toggleMetronome: x,
1544
+ toggleLeadIn: O,
1482
1545
  setMetronomeEnabled: (o) => {
1483
1546
  t.setMetronomeEnabled(o), c.setMetronomeEnabled(o);
1484
1547
  },
1485
1548
  // Complex operations
1486
- playFromBar: Bt,
1487
- playFromMark: Qt,
1549
+ playFromBar: u,
1550
+ playFromMark: y,
1488
1551
  // Access to stores for components
1489
1552
  audioState: t,
1490
1553
  musicData: a,
@@ -1493,9 +1556,9 @@ function ot(e = {}) {
1493
1556
  audioEngine: c
1494
1557
  };
1495
1558
  }
1496
- const Re = ["aria-label"], Oe = {
1559
+ const Oe = ["aria-label"], Re = {
1497
1560
  __name: "PartControl",
1498
- props: /* @__PURE__ */ wt({
1561
+ props: /* @__PURE__ */ Lt({
1499
1562
  name: {
1500
1563
  type: String,
1501
1564
  required: !0
@@ -1515,247 +1578,295 @@ const Re = ["aria-label"], Oe = {
1515
1578
  }),
1516
1579
  emits: ["update:volume", "update:mute", "update:solo"],
1517
1580
  setup(e) {
1518
- tt((v) => ({
1581
+ at((f) => ({
1519
1582
  "03f87250": l.value
1520
1583
  }));
1521
1584
  const t = e;
1522
- at();
1523
- const a = ot(), s = X(e, "volume"), n = X(e, "mute"), i = X(e, "solo");
1524
- R(s, (v) => {
1525
- a.setPartVolume(t.name, v);
1526
- }), R(n, (v) => {
1527
- a.setPartMuted(t.name, v), v && (i.value = !1);
1528
- }), R(i, (v) => {
1529
- a.setPartSolo(t.name, v), v && (n.value = !1);
1585
+ nt();
1586
+ const a = dt(), s = tt(e, "volume"), n = tt(e, "mute"), i = tt(e, "solo");
1587
+ R(s, (f) => {
1588
+ a.setPartVolume(t.name, f);
1589
+ }), R(n, (f) => {
1590
+ a.setPartMuted(t.name, f), f && (i.value = !1);
1591
+ }), R(i, (f) => {
1592
+ a.setPartSolo(t.name, f), f && (n.value = !1);
1530
1593
  });
1531
- const r = j("el"), { width: d, height: f } = et(r), l = M(() => Math.min(d.value, f.value) + "px"), g = M(
1532
- () => d.value > f.value ? "mobile" : d.value < 60 ? "tablet" : "desktop"
1594
+ const r = Y("el"), { width: h, height: b } = st(r), l = k(() => Math.min(h.value, b.value) + "px"), v = k(
1595
+ () => h.value > b.value ? "mobile" : h.value < 60 ? "tablet" : "desktop"
1533
1596
  );
1534
- let y = null;
1535
- const T = _(0);
1536
- gt(() => {
1537
- y = setInterval(() => {
1597
+ let E = null;
1598
+ const C = _(0);
1599
+ Mt(() => {
1600
+ E = setInterval(() => {
1538
1601
  if (n.value)
1539
- T.value = 0;
1602
+ C.value = 0;
1540
1603
  else
1541
1604
  try {
1542
- T.value = a.getPartLevel(t.name);
1605
+ C.value = a.getPartLevel(t.name);
1543
1606
  } catch {
1544
- Ht("randomLevelIndicators") ? T.value = Math.random() * s.value : T.value = 0;
1607
+ Xt("randomLevelIndicators") ? C.value = Math.random() * s.value : C.value = 0;
1545
1608
  }
1546
1609
  }, 16);
1547
- }), vt(() => {
1548
- y && (clearInterval(y), y = null);
1610
+ }), kt(() => {
1611
+ E && (clearInterval(E), E = null);
1549
1612
  });
1550
- const B = (v) => {
1551
- if (["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(v.key)) {
1552
- v.preventDefault(), v.stopPropagation();
1553
- const S = v.key === "ArrowUp" || v.key === "ArrowRight" ? 0.1 : -0.1;
1554
- s.value = Math.max(0, Math.min(1, s.value + S));
1555
- } else v.key === "m" && !v.shiftKey ? (v.preventDefault(), v.stopPropagation(), n.value = !n.value) : v.key === "s" && !v.shiftKey && (v.preventDefault(), v.stopPropagation(), i.value = !i.value);
1613
+ const V = (f) => {
1614
+ if (["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(f.key)) {
1615
+ f.preventDefault(), f.stopPropagation();
1616
+ const P = f.key === "ArrowUp" || f.key === "ArrowRight" ? 0.1 : -0.1;
1617
+ s.value = Math.max(0, Math.min(1, s.value + P));
1618
+ } else f.key === "m" && !f.shiftKey ? (f.preventDefault(), f.stopPropagation(), n.value = !n.value) : f.key === "s" && !f.shiftKey && (f.preventDefault(), f.stopPropagation(), i.value = !i.value);
1556
1619
  };
1557
- return (v, S) => (P(), w("div", {
1620
+ return (f, P) => (w(), T("div", {
1558
1621
  ref_key: "el",
1559
1622
  ref: r,
1560
- class: L([g.value, "part"]),
1623
+ class: I([v.value, "part"]),
1561
1624
  tabindex: "0",
1562
1625
  role: "group",
1563
1626
  "aria-label": `${e.name} part controls`,
1564
- onKeydown: B
1627
+ onKeydown: V
1565
1628
  }, [
1566
- S[3] || (S[3] = m("div", { class: "focus" }, null, -1)),
1567
- N(Ne, {
1629
+ P[3] || (P[3] = m("div", { class: "focus" }, null, -1)),
1630
+ D(Ne, {
1568
1631
  class: "tri",
1569
1632
  mute: n.value,
1570
- "onUpdate:mute": S[0] || (S[0] = (E) => n.value = E),
1633
+ "onUpdate:mute": P[0] || (P[0] = (S) => n.value = S),
1571
1634
  solo: i.value,
1572
- "onUpdate:solo": S[1] || (S[1] = (E) => i.value = E),
1635
+ "onUpdate:solo": P[1] || (P[1] = (S) => i.value = S),
1573
1636
  tabindex: "-1"
1574
1637
  }, null, 8, ["mute", "solo"]),
1575
- N(qt, {
1638
+ D(Qt, {
1576
1639
  align: "left",
1577
1640
  class: "name"
1578
1641
  }, {
1579
- default: W(() => [
1580
- bt(K(e.name), 1)
1642
+ default: Z(() => [
1643
+ St(K(e.name), 1)
1581
1644
  ]),
1582
1645
  _: 1
1583
1646
  }),
1584
- N(ft, {
1585
- level: T.value,
1647
+ D(yt, {
1648
+ level: C.value,
1586
1649
  "show-level": !0,
1587
1650
  class: "vol",
1588
1651
  value: s.value,
1589
- "onUpdate:value": S[2] || (S[2] = (E) => s.value = E),
1652
+ "onUpdate:value": P[2] || (P[2] = (S) => s.value = S),
1590
1653
  step: 0.01,
1591
1654
  tabindex: "-1"
1592
1655
  }, null, 8, ["level", "value"])
1593
- ], 42, Re));
1656
+ ], 42, Oe));
1594
1657
  }
1595
- }, $e = /* @__PURE__ */ $(Oe, [["__scopeId", "data-v-67bb489c"]]), Fe = { class: "mark" }, Ue = { class: "rpt" }, Ge = { class: "beat-ind" }, Ke = { class: "beat" }, qe = {
1658
+ }, $e = /* @__PURE__ */ U(Re, [["__scopeId", "data-v-67bb489c"]]), Fe = { class: "mark" }, Ue = { class: "rpt" }, Ke = { class: "beat-ind" }, Ge = { class: "beat" }, qe = {
1596
1659
  key: 1,
1597
1660
  class: "mark-grid-container"
1598
1661
  }, He = { class: "mark-grid" }, We = ["onClick"], je = {
1599
1662
  __name: "BarInput",
1600
1663
  setup(e) {
1601
- tt((p) => ({
1602
- 77574882: D.value,
1603
- "188cd0ae": V.value
1664
+ at((u) => ({
1665
+ aa78c0c8: q.value,
1666
+ "286643ea": G.value
1604
1667
  }));
1605
- const t = j("el"), a = j("rpt"), { width: s, height: n } = et(t), i = J(), r = at(), d = ot(), f = _("1"), l = _("A"), g = _(0), y = _(2), T = _(!1), B = _(!1), v = _(!1), S = _(!0);
1606
- let E = null;
1668
+ const t = Y("el"), a = Y("rpt"), { width: s, height: n } = st(t), i = et(), r = nt(), h = Nt(), b = dt(), l = _("1"), v = _("A"), E = _(0), C = _(2), V = _(!1), f = _(!1), P = _(!1), S = _(!1), B = _(/* @__PURE__ */ new Set()), N = _(!0);
1669
+ let z = null;
1607
1670
  R(() => {
1608
- var p;
1609
- return ((p = i.beats) == null ? void 0 : p.length) > 0;
1610
- }, (p) => {
1611
- console.log(p), p && !T.value && (f.value = r.currentBar.toString(), g.value = r.currentRepeat, y.value = i.getRepeatCountForBar(r.currentBar), U(r.currentBar), T.value = !0);
1612
- }), R(() => r.currentBar, (p) => {
1613
- y.value = i.getRepeatCountForBar(p);
1614
- }), R(f, () => {
1615
- f.value = f.value.replace(/\D/g, ""), f.value.length > 3 && (f.value = f.value.slice(0, 3));
1616
- }), R(() => r.currentBar, (p) => {
1617
- f.value = p.toString(), U(p);
1671
+ var u;
1672
+ return ((u = i.beats) == null ? void 0 : u.length) > 0;
1673
+ }, (u) => {
1674
+ console.log(u), u && !V.value && (l.value = r.currentBar.toString(), E.value = r.currentRepeat, C.value = i.getRepeatCountForBar(r.currentBar), g(r.currentBar), V.value = !0);
1675
+ }), R(() => r.currentBar, (u) => {
1676
+ C.value = i.getRepeatCountForBar(u);
1677
+ }), R(l, () => {
1678
+ l.value = l.value.replace(/\D/g, ""), l.value.length > 3 && (l.value = l.value.slice(0, 3));
1679
+ }), R(() => r.currentBar, (u) => {
1680
+ l.value = u.toString(), g(u);
1618
1681
  }), R(() => r.currentBeat, () => {
1619
- S.value = !0, setTimeout(() => {
1620
- S.value = !1;
1682
+ N.value = !0, setTimeout(() => {
1683
+ N.value = !1;
1621
1684
  }, 50);
1622
- }), R(B, () => {
1623
- B.value && Q();
1685
+ }), R(f, () => {
1686
+ f.value && ft();
1624
1687
  });
1625
- const D = M(() => Math.min(n.value / 2.25, s.value / 4.5) + "px"), V = M(() => Math.min(s.value / 15, n.value / 6.4) + "px"), O = M(() => Object.keys(i.practiceMarks).sort()), F = M(() => O.value.length > 0);
1626
- function U(p) {
1627
- const k = Object.keys(i.practiceMarks).filter((C) => i.practiceMarks[C] <= p).sort((C, G) => i.practiceMarks[G] - i.practiceMarks[C]);
1628
- k.length > 0 && (l.value = k[0]);
1688
+ const q = k(() => Math.min(n.value / 2.25, s.value / 4.5) + "px"), G = k(() => Math.min(s.value / 15, n.value / 6.4) + "px"), $ = k(() => i.allPracticeMarksSorted), H = k(() => !i.barHasMark(r.currentBar) && i.nextAvailableLetter !== null), d = k(() => !0), p = k(() => Object.keys(i.customPracticeMarks).length > 0);
1689
+ function g(u) {
1690
+ const y = i.allPracticeMarks, x = Object.keys(y).filter((O) => y[O] <= u).sort((O, it) => y[it] - y[O]);
1691
+ x.length > 0 ? v.value = x[0] : v.value = "";
1629
1692
  }
1630
- function z() {
1631
- var k;
1632
- const p = parseInt(f.value);
1633
- if (~isNaN(p)) {
1634
- Z(p);
1635
- const C = (k = t.value) == null ? void 0 : k.querySelector(".bar-input");
1636
- C && C.blur(), t.value && t.value.focus();
1693
+ function A() {
1694
+ var y;
1695
+ const u = parseInt(l.value);
1696
+ if (~isNaN(u)) {
1697
+ lt(u);
1698
+ const x = (y = t.value) == null ? void 0 : y.querySelector(".bar-input");
1699
+ x && x.blur(), t.value && t.value.focus();
1637
1700
  }
1638
1701
  }
1639
- function Z(p) {
1640
- d.setBar(p, 0);
1702
+ function lt(u) {
1703
+ b.setBar(u, 0);
1641
1704
  }
1642
- function u(p, k) {
1643
- k && k.stopPropagation(), l.value = p, B.value = !1, d.goToPracticeMark(p), t.value && t.value.blur();
1705
+ function Q(u, y) {
1706
+ if (y && y.stopPropagation(), S.value) {
1707
+ i.isCustomMark(u) && J(u);
1708
+ return;
1709
+ }
1710
+ v.value = u, f.value = !1, b.goToPracticeMark(u), t.value && t.value.blur();
1644
1711
  }
1645
- function h() {
1646
- y.value > 1 && (v.value = !0), r.currentRepeat < y.value && d.setBar(r.currentBar, r.currentRepeat + 1);
1712
+ function W(u) {
1713
+ u && u.stopPropagation();
1714
+ const y = i.addCustomMark(r.currentBar);
1715
+ y && (v.value = y, f.value = !1, h.buildFixedNavigationPoints());
1647
1716
  }
1648
- function b() {
1649
- y.value > 1 && (v.value = !0), r.currentRepeat > 1 && d.setBar(r.currentBar, r.currentRepeat - 1);
1717
+ function X(u) {
1718
+ if (u && u.stopPropagation(), S.value) {
1719
+ const y = B.value.size > 0;
1720
+ B.value.forEach((x) => {
1721
+ i.removeCustomMark(x);
1722
+ }), B.value = /* @__PURE__ */ new Set(), S.value = !1, g(r.currentBar), y && h.buildFixedNavigationPoints();
1723
+ } else
1724
+ S.value = !0, B.value = /* @__PURE__ */ new Set();
1725
+ }
1726
+ function J(u, y) {
1727
+ const x = new Set(B.value);
1728
+ x.has(u) ? x.delete(u) : x.add(u), B.value = x;
1729
+ }
1730
+ function ct() {
1731
+ C.value > 1 && (P.value = !0), r.currentRepeat < C.value && b.setBar(r.currentBar, r.currentRepeat + 1);
1650
1732
  }
1651
- function A(p) {
1652
- F.value && (p.stopPropagation(), v.value = !1, B.value = !B.value);
1733
+ function ht() {
1734
+ C.value > 1 && (P.value = !0), r.currentRepeat > 1 && b.setBar(r.currentBar, r.currentRepeat - 1);
1653
1735
  }
1654
- function st(p) {
1655
- var k, C;
1656
- (k = t.value) != null && k.contains(p.target) || (B.value = !1), (C = a.value) != null && C.contains(p.target) || (v.value = !1);
1736
+ function wt(u) {
1737
+ u.stopPropagation(), P.value = !1, f.value = !f.value, !f.value && S.value && (S.value = !1, B.value = /* @__PURE__ */ new Set());
1657
1738
  }
1658
- function Q() {
1659
- B.value && setTimeout(() => {
1660
- var C, G;
1661
- const p = (C = t.value) == null ? void 0 : C.querySelector(".mark-grid"), k = (G = t.value) == null ? void 0 : G.querySelector(".mark-option.selected");
1662
- if (k && p) {
1663
- const lt = p.getBoundingClientRect(), ut = k.getBoundingClientRect(), dt = ut.left - lt.left - lt.width / 2 + ut.width / 2;
1664
- p.scrollLeft = Math.max(0, p.scrollLeft + dt);
1739
+ function mt(u) {
1740
+ var y, x;
1741
+ (y = t.value) != null && y.contains(u.target) || (f.value = !1, S.value && (S.value = !1, B.value = /* @__PURE__ */ new Set())), (x = a.value) != null && x.contains(u.target) || (P.value = !1);
1742
+ }
1743
+ function ft() {
1744
+ f.value && setTimeout(() => {
1745
+ var x, O;
1746
+ const u = (x = t.value) == null ? void 0 : x.querySelector(".mark-grid"), y = (O = t.value) == null ? void 0 : O.querySelector(".mark-option.selected");
1747
+ if (y && u) {
1748
+ const it = u.getBoundingClientRect(), o = y.getBoundingClientRect(), M = o.left - it.left - it.width / 2 + o.width / 2;
1749
+ u.scrollLeft = Math.max(0, u.scrollLeft + M);
1665
1750
  }
1666
1751
  }, 50);
1667
1752
  }
1668
- gt(() => {
1669
- document.addEventListener("click", st), Ht("beatAnimation") && (E = setInterval(() => {
1670
- const p = r.currentBeat % i.timeSignature + 1;
1671
- r.setCurrentBar(r.currentBar, p, r.currentRepeat);
1753
+ Mt(() => {
1754
+ document.addEventListener("click", mt), Xt("beatAnimation") && (z = setInterval(() => {
1755
+ const u = r.currentBeat % i.timeSignature + 1;
1756
+ r.setCurrentBar(r.currentBar, u, r.currentRepeat);
1672
1757
  }, 800));
1673
- }), vt(() => {
1674
- document.removeEventListener("click", st), E && (clearInterval(E), E = null);
1758
+ }), kt(() => {
1759
+ document.removeEventListener("click", mt), z && (clearInterval(z), z = null);
1675
1760
  });
1676
- const Y = (p) => {
1677
- var C;
1678
- const k = (C = t.value) == null ? void 0 : C.querySelector(".bar-input");
1679
- if (document.activeElement !== k)
1680
- if (/^[a-z]$/.test(p.key) && !p.ctrlKey && !p.metaKey && !p.shiftKey) {
1681
- p.preventDefault(), p.stopPropagation();
1682
- const G = p.key.toUpperCase();
1683
- O.value.includes(G) && u(G, null);
1684
- } else p.key === "ArrowUp" ? (p.preventDefault(), p.stopPropagation(), h()) : p.key === "ArrowDown" ? (p.preventDefault(), p.stopPropagation(), b()) : p.key === "Enter" && (p.preventDefault(), p.stopPropagation(), z());
1761
+ const Et = (u) => {
1762
+ var x;
1763
+ const y = (x = t.value) == null ? void 0 : x.querySelector(".bar-input");
1764
+ if (document.activeElement !== y)
1765
+ if (/^[a-z]$/.test(u.key) && !u.ctrlKey && !u.metaKey && !u.shiftKey) {
1766
+ u.preventDefault(), u.stopPropagation();
1767
+ const O = u.key.toUpperCase();
1768
+ $.value.includes(O) && Q(O, null);
1769
+ } else u.key === "ArrowUp" ? (u.preventDefault(), u.stopPropagation(), ct()) : u.key === "ArrowDown" ? (u.preventDefault(), u.stopPropagation(), ht()) : u.key === "Enter" ? (u.preventDefault(), u.stopPropagation(), A()) : u.key === "+" && (u.preventDefault(), u.stopPropagation(), H.value && W(null));
1685
1770
  };
1686
- return (p, k) => (P(), w("div", {
1771
+ return (u, y) => (w(), T("div", {
1687
1772
  ref_key: "el",
1688
1773
  ref: t,
1689
- class: L(["outer", { pulse: S.value, "mark-selecting": B.value }]),
1774
+ class: I(["outer", { pulse: N.value, "mark-selecting": f.value }]),
1690
1775
  tabindex: "0",
1691
1776
  role: "group",
1692
1777
  "aria-label": "Musical navigation",
1693
- onKeydown: Y
1778
+ onKeydown: Et
1694
1779
  }, [
1695
- k[6] || (k[6] = m("div", { class: "frame" }, null, -1)),
1780
+ y[9] || (y[9] = m("div", { class: "frame" }, null, -1)),
1696
1781
  m("div", {
1697
- class: L(["mark-input", { empty: !l.value, edit: B.value, disabled: !F.value }]),
1782
+ class: I(["mark-input", { empty: !v.value, edit: f.value, disabled: !d.value }]),
1698
1783
  tabindex: "-1",
1699
- onClick: A
1784
+ onClick: wt
1700
1785
  }, [
1701
- m("div", Fe, K(F.value ? l.value : "-"), 1)
1786
+ m("div", Fe, K(v.value || "-"), 1)
1702
1787
  ], 2),
1703
- k[7] || (k[7] = m("div", { class: "mark-title" }, "Mark", -1)),
1704
- B.value ? q("", !0) : (P(), w(ct, { key: 0 }, [
1705
- Tt(m("input", {
1788
+ y[10] || (y[10] = m("div", { class: "mark-title" }, "Mark", -1)),
1789
+ f.value ? F("", !0) : (w(), T(pt, { key: 0 }, [
1790
+ It(m("input", {
1706
1791
  type: "text",
1707
1792
  class: "bar-input",
1708
- "onUpdate:modelValue": k[0] || (k[0] = (C) => f.value = C),
1793
+ "onUpdate:modelValue": y[0] || (y[0] = (x) => l.value = x),
1709
1794
  inputmode: "decimal",
1710
1795
  pattern: "\\d*",
1711
1796
  tabindex: "-1",
1712
- onChange: z,
1713
- onKeyup: ae(z, ["enter"])
1797
+ onChange: A,
1798
+ onKeyup: ae(A, ["enter"])
1714
1799
  }, null, 544), [
1715
- [Ot, f.value]
1800
+ [qt, l.value]
1716
1801
  ]),
1717
- k[3] || (k[3] = m("div", { class: "bar-title" }, "Bar", -1)),
1802
+ y[5] || (y[5] = m("div", { class: "bar-title" }, "Bar", -1)),
1718
1803
  m("div", {
1719
1804
  ref_key: "rpt",
1720
1805
  ref: a,
1721
- class: L(["rpt-input", { edit: v.value, available: y.value > 1 }])
1806
+ class: I(["rpt-input", { edit: P.value, available: C.value > 1 }])
1722
1807
  }, [
1723
- m("div", Ue, K(I(r).currentRepeat || "-"), 1),
1724
- (P(), w("svg", {
1725
- class: L(["inc", { disabled: I(r).currentRepeat >= y.value }]),
1808
+ m("div", Ue, K(L(r).currentRepeat || "-"), 1),
1809
+ (w(), T("svg", {
1810
+ class: I(["inc", { disabled: L(r).currentRepeat >= C.value }]),
1726
1811
  viewBox: "0 -100 100 100",
1727
- onClick: St(h, ["prevent"])
1728
- }, k[1] || (k[1] = [
1812
+ onClick: Ct(ct, ["prevent"])
1813
+ }, y[3] || (y[3] = [
1729
1814
  m("path", { d: "m10-20 40-60 40 60H10Z" }, null, -1)
1730
1815
  ]), 2)),
1731
- (P(), w("svg", {
1732
- class: L(["dec", { disabled: I(r).currentRepeat <= 1 }]),
1816
+ (w(), T("svg", {
1817
+ class: I(["dec", { disabled: L(r).currentRepeat <= 1 }]),
1733
1818
  viewBox: "0 -100 100 100",
1734
- onClick: St(b, ["prevent"])
1735
- }, k[2] || (k[2] = [
1819
+ onClick: Ct(ht, ["prevent"])
1820
+ }, y[4] || (y[4] = [
1736
1821
  m("path", { d: "m10-80 40 60 40-60H10Z" }, null, -1)
1737
1822
  ]), 2))
1738
1823
  ], 2),
1739
- k[4] || (k[4] = m("div", { class: "rpt-title" }, "Rpt", -1)),
1740
- m("div", Ge, [
1741
- m("div", Ke, K(I(r).currentBeat), 1)
1824
+ y[6] || (y[6] = m("div", { class: "rpt-title" }, "Rpt", -1)),
1825
+ m("div", Ke, [
1826
+ m("div", Ge, K(L(r).currentBeat), 1)
1742
1827
  ]),
1743
- k[5] || (k[5] = m("div", { class: "beat-title" }, "Beat", -1))
1828
+ y[7] || (y[7] = m("div", { class: "beat-title" }, "Beat", -1))
1744
1829
  ], 64)),
1745
- B.value ? (P(), w("div", qe, [
1830
+ f.value ? (w(), T("div", qe, [
1746
1831
  m("div", He, [
1747
- (P(!0), w(ct, null, Et(O.value, (C) => (P(), w("div", {
1748
- key: C,
1749
- class: L(["mark-option", { selected: C === l.value }]),
1750
- onClick: (G) => u(C, G)
1751
- }, K(C), 11, We))), 128))
1832
+ (w(!0), T(pt, null, At($.value, (x) => (w(), T("div", {
1833
+ key: x,
1834
+ class: I(["mark-option", {
1835
+ selected: !S.value && x === v.value,
1836
+ deleting: S.value && B.value.has(x),
1837
+ custom: L(i).isCustomMark(x),
1838
+ greyed: S.value && !L(i).isCustomMark(x)
1839
+ }]),
1840
+ onClick: (O) => Q(x, O)
1841
+ }, K(x), 11, We))), 128)),
1842
+ H.value ? (w(), T("div", {
1843
+ key: 0,
1844
+ class: I(["mark-option add-mark", { greyed: S.value }]),
1845
+ onClick: y[1] || (y[1] = (x) => !S.value && W(x))
1846
+ }, " + ", 2)) : F("", !0),
1847
+ p.value ? (w(), T("div", {
1848
+ key: 1,
1849
+ class: I(["mark-option trash-icon", { active: S.value }]),
1850
+ onClick: y[2] || (y[2] = (x) => X(x))
1851
+ }, y[8] || (y[8] = [
1852
+ m("svg", {
1853
+ viewBox: "0 -960 960 960",
1854
+ fill: "currentColor"
1855
+ }, [
1856
+ m("path", {
1857
+ transform: "rotate(135)",
1858
+ d: "M -831.95532 179.98077 L -751.96387 179.98077 L -751.96387 39.995727 L -611.97882 39.995727 L -611.97882 -39.995727 L -751.96387 -39.995727 L -751.96387 -179.98077 L -831.95532 -179.98077 L -831.95532 -39.995727 L -971.94037 -39.995727 L -971.94037 39.995727 L -831.95532 39.995727 L -831.95532 179.98077 z "
1859
+ }),
1860
+ m("path", { d: "M 280 -840 L 280 -680 L 120 -680 L 120 -120 L 680 -120 L 680 -280 L 840 -280 L 840 -840 L 280 -840 z M 360 -760 L 760 -760 L 760 -360 L 360 -360 L 360 -760 z M 200 -600 L 280 -600 L 280 -280 L 600 -280 L 600 -200 L 200 -200 L 200 -600 z " })
1861
+ ], -1)
1862
+ ]), 2)) : F("", !0)
1752
1863
  ])
1753
- ])) : q("", !0)
1864
+ ])) : F("", !0)
1754
1865
  ], 34));
1755
1866
  }
1756
- }, Ze = /* @__PURE__ */ $(je, [["__scopeId", "data-v-7856f4ec"]]), Ye = { class: "frame" }, Qe = { class: "title" }, Xe = {
1867
+ }, Ze = /* @__PURE__ */ U(je, [["__scopeId", "data-v-e542aa14"]]), Ye = { class: "frame" }, Qe = { class: "title" }, Xe = {
1757
1868
  __name: "BaseNumericInput",
1758
- props: /* @__PURE__ */ wt({
1869
+ props: /* @__PURE__ */ Lt({
1759
1870
  title: {
1760
1871
  type: String,
1761
1872
  required: !0
@@ -1818,48 +1929,48 @@ const Re = ["aria-label"], Oe = {
1818
1929
  }),
1819
1930
  emits: ["update:value"],
1820
1931
  setup(e) {
1821
- tt((g) => ({
1932
+ at((v) => ({
1822
1933
  "391e6684": e.textColor,
1823
1934
  "6eae8f5d": e.backgroundColor,
1824
1935
  "6ee151eb": e.color,
1825
- "29a40ccc": f.value,
1826
- "7366daab": d.value,
1936
+ "29a40ccc": b.value,
1937
+ "7366daab": h.value,
1827
1938
  "0f87383a": e.focusColor
1828
1939
  }));
1829
- const t = e, a = j("el"), { width: s, height: n } = et(a), i = X(e, "value"), r = _(t.formatValue(t.transformSliderToDisplay(i.value)));
1940
+ const t = e, a = Y("el"), { width: s, height: n } = st(a), i = tt(e, "value"), r = _(t.formatValue(t.transformSliderToDisplay(i.value)));
1830
1941
  R(i, () => {
1831
- const g = t.transformSliderToDisplay(i.value);
1832
- r.value = t.formatValue(g);
1942
+ const v = t.transformSliderToDisplay(i.value);
1943
+ r.value = t.formatValue(v);
1833
1944
  }), R(r, () => {
1834
1945
  r.value = t.validateInput(r.value), t.maxChars && r.value.length > t.maxChars && (r.value = r.value.slice(0, t.maxChars));
1835
1946
  });
1836
- const d = M(() => Math.min(n.value / 2.25, s.value / 2.2) + "px"), f = M(() => Math.min(s.value / 3, n.value / 6.4) + "px");
1947
+ const h = k(() => Math.min(n.value / 2.25, s.value / 2.2) + "px"), b = k(() => Math.min(s.value / 3, n.value / 6.4) + "px");
1837
1948
  function l() {
1838
- const g = t.parseValue(r.value), y = t.transformDisplayToSlider(g);
1839
- i.value = Math.min(Math.max(y, t.sliderMin), t.sliderMax);
1949
+ const v = t.parseValue(r.value), E = t.transformDisplayToSlider(v);
1950
+ i.value = Math.min(Math.max(E, t.sliderMin), t.sliderMax);
1840
1951
  }
1841
- return (g, y) => (P(), w("div", {
1952
+ return (v, E) => (w(), T("div", {
1842
1953
  class: "outer",
1843
1954
  ref_key: "el",
1844
1955
  ref: a
1845
1956
  }, [
1846
1957
  m("div", Ye, [
1847
- Tt(m("input", {
1958
+ It(m("input", {
1848
1959
  type: "text",
1849
1960
  class: "input",
1850
- "onUpdate:modelValue": y[0] || (y[0] = (T) => r.value = T),
1961
+ "onUpdate:modelValue": E[0] || (E[0] = (C) => r.value = C),
1851
1962
  inputmode: "decimal",
1852
1963
  pattern: "\\d*",
1853
1964
  onChange: l
1854
1965
  }, null, 544), [
1855
- [Ot, r.value]
1966
+ [qt, r.value]
1856
1967
  ]),
1857
1968
  m("div", Qe, K(e.title), 1)
1858
1969
  ]),
1859
- N(ft, {
1970
+ D(yt, {
1860
1971
  class: "slider",
1861
1972
  value: i.value,
1862
- "onUpdate:value": y[1] || (y[1] = (T) => i.value = T),
1973
+ "onUpdate:value": E[1] || (E[1] = (C) => i.value = C),
1863
1974
  "thumb-length": e.thumbLength,
1864
1975
  max: e.sliderMax,
1865
1976
  min: e.sliderMin,
@@ -1867,30 +1978,30 @@ const Re = ["aria-label"], Oe = {
1867
1978
  }, null, 8, ["value", "thumb-length", "max", "min"])
1868
1979
  ], 512));
1869
1980
  }
1870
- }, Zt = /* @__PURE__ */ $(Xe, [["__scopeId", "data-v-3c97bdb4"]]), Je = {
1981
+ }, te = /* @__PURE__ */ U(Xe, [["__scopeId", "data-v-3c97bdb4"]]), Je = {
1871
1982
  __name: "SpeedInput",
1872
1983
  setup(e) {
1873
- const t = at(), a = ot(), s = M({
1984
+ const t = nt(), a = dt(), s = k({
1874
1985
  get: () => Math.log2(t.playbackSpeed) * 0.5 + 0.5,
1875
1986
  set: (l) => {
1876
- const g = Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 0.05;
1877
- a.setPlaybackSpeed(g);
1987
+ const v = Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 0.05;
1988
+ a.setPlaybackSpeed(v);
1878
1989
  }
1879
- }), n = (l) => Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 5 + "", i = (l) => parseFloat(l), r = (l) => l.replace(/\D/g, ""), d = (l) => l, f = (l) => {
1880
- const g = Math.log2(l / 100) * 0.5 + 0.5;
1881
- return Math.min(Math.max(g, 0), 1);
1990
+ }), n = (l) => Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 5 + "", i = (l) => parseFloat(l), r = (l) => l.replace(/\D/g, ""), h = (l) => l, b = (l) => {
1991
+ const v = Math.log2(l / 100) * 0.5 + 0.5;
1992
+ return Math.min(Math.max(v, 0), 1);
1882
1993
  };
1883
- return (l, g) => (P(), ht(Zt, {
1994
+ return (l, v) => (w(), vt(te, {
1884
1995
  value: s.value,
1885
- "onUpdate:value": g[0] || (g[0] = (y) => s.value = y),
1996
+ "onUpdate:value": v[0] || (v[0] = (E) => s.value = E),
1886
1997
  title: "Speed",
1887
1998
  color: "#336",
1888
1999
  "text-color": "#aad",
1889
2000
  "format-value": n,
1890
2001
  "parse-value": i,
1891
2002
  "validate-input": r,
1892
- "transform-slider-to-display": d,
1893
- "transform-display-to-slider": f,
2003
+ "transform-slider-to-display": h,
2004
+ "transform-display-to-slider": b,
1894
2005
  "thumb-length": 2,
1895
2006
  "max-chars": 3
1896
2007
  }, null, 8, ["value"]));
@@ -1898,25 +2009,25 @@ const Re = ["aria-label"], Oe = {
1898
2009
  }, ta = {
1899
2010
  __name: "TimeInput",
1900
2011
  setup(e) {
1901
- const t = at(), a = J(), s = ot(), n = (l) => l.toFixed(1), i = (l) => parseFloat(l), r = (l) => l.replace(/[^0-9.]/g, ""), d = (l) => l, f = (l) => l;
1902
- return (l, g) => (P(), ht(Zt, {
1903
- value: I(t).currentTime,
2012
+ const t = nt(), a = et(), s = dt(), n = (l) => l.toFixed(1), i = (l) => parseFloat(l), r = (l) => l.replace(/[^0-9.]/g, ""), h = (l) => l, b = (l) => l;
2013
+ return (l, v) => (w(), vt(te, {
2014
+ value: L(t).currentTime,
1904
2015
  "onUpdate:value": [
1905
- g[0] || (g[0] = (y) => I(t).currentTime = y),
1906
- I(s).setTime
2016
+ v[0] || (v[0] = (E) => L(t).currentTime = E),
2017
+ L(s).setTime
1907
2018
  ],
1908
2019
  title: "Time",
1909
2020
  color: "#344",
1910
2021
  "focus-color": "#556868",
1911
2022
  "text-color": "#acc",
1912
2023
  "background-color": "#111117",
1913
- "slider-max": I(a).totalDuration,
2024
+ "slider-max": L(a).totalDuration,
1914
2025
  "slider-min": 0,
1915
2026
  "format-value": n,
1916
2027
  "parse-value": i,
1917
2028
  "validate-input": r,
1918
- "transform-slider-to-display": d,
1919
- "transform-display-to-slider": f,
2029
+ "transform-slider-to-display": h,
2030
+ "transform-display-to-slider": b,
1920
2031
  "thumb-length": 2
1921
2032
  }, null, 8, ["value", "onUpdate:value", "slider-max"]));
1922
2033
  }
@@ -1936,19 +2047,19 @@ const Re = ["aria-label"], Oe = {
1936
2047
  const t = e, a = _(!1), s = () => {
1937
2048
  t.disabled || (a.value = !0);
1938
2049
  }, n = () => a.value = !1;
1939
- return (i, r) => (P(), w("div", {
2050
+ return (i, r) => (w(), T("div", {
1940
2051
  title: e.title,
1941
- class: L(["button-outer", { down: a.value, disabled: e.disabled }]),
2052
+ class: I(["button-outer", { down: a.value, disabled: e.disabled }]),
1942
2053
  onPointerdown: s,
1943
2054
  onPointerup: n,
1944
2055
  onPointerleave: n
1945
2056
  }, [
1946
2057
  m("div", aa, [
1947
- rt(i.$slots, "default", {}, void 0, !0)
2058
+ ut(i.$slots, "default", {}, void 0, !0)
1948
2059
  ])
1949
2060
  ], 42, ea));
1950
2061
  }
1951
- }, nt = /* @__PURE__ */ $(sa, [["__scopeId", "data-v-77d8694a"]]), na = { class: "outer" }, ia = { class: "title" }, ra = {
2062
+ }, rt = /* @__PURE__ */ U(sa, [["__scopeId", "data-v-77d8694a"]]), na = { class: "outer" }, ia = { class: "title" }, ra = {
1952
2063
  class: "buttons",
1953
2064
  role: "toolbar",
1954
2065
  "aria-label": "Transport controls"
@@ -1966,179 +2077,193 @@ const Re = ["aria-label"], Oe = {
1966
2077
  },
1967
2078
  emits: ["menu-click"],
1968
2079
  setup(e, { emit: t }) {
1969
- const a = e, s = t, n = J(), i = at(), r = Wt(), d = ot();
1970
- function f() {
1971
- i.isPlayingOrLeadIn ? d.stop() : d.play();
2080
+ const a = e, s = t, n = et(), i = nt(), r = Nt(), h = dt();
2081
+ function b() {
2082
+ i.isPlayingOrLeadIn ? h.stop() : h.play();
1972
2083
  }
1973
2084
  function l() {
1974
- const u = r.navigationPoints;
1975
- if (r.lastNavigationAction === "pause" && r.lastPlayStartTime !== null) {
1976
- d.setTime(r.lastPlayStartTime), r.setNavigationAction(null);
2085
+ const d = r.navigationPoints;
2086
+ if ((r.lastNavigationAction === "pause" || r.lastNavigationAction === "ended") && r.lastPlayStartTime !== null) {
2087
+ h.setTime(r.lastPlayStartTime), r.setNavigationAction(null);
1977
2088
  return;
1978
2089
  }
1979
- const h = i.currentTime, b = u.filter((A) => A.time < h - 0.01).pop();
1980
- b && d.setTime(b.time);
1981
- }
1982
- function g() {
1983
- const u = r.navigationPoints, h = i.currentTime, b = u.find((A) => A.time > h + 0.01);
1984
- b && d.setTime(b.time);
2090
+ const p = i.currentTime, g = d.filter((A) => A.time < p - 0.01).pop();
2091
+ g && h.setTime(g.time);
1985
2092
  }
1986
- function y() {
1987
- d.playStartingNotes();
2093
+ function v() {
2094
+ const d = r.navigationPoints, p = i.currentTime, g = d.find((A) => A.time > p + 0.01);
2095
+ g && h.setTime(g.time);
1988
2096
  }
1989
- const T = M(() => i.metronomeEnabled), B = M(() => i.leadInEnabled), v = _(!1), S = _(null);
1990
2097
  function E() {
2098
+ h.playStartingNotes();
2099
+ }
2100
+ const C = k(() => i.metronomeEnabled), V = k(() => i.leadInEnabled), f = _(!1), P = _(null);
2101
+ function S() {
1991
2102
  if (a.externalMenuControl) {
1992
- s("menu-click"), d.audioEngine.initializeAudioSystem().catch((u) => {
1993
- console.warn("Audio system pre-initialization failed:", u);
2103
+ s("menu-click"), h.audioEngine.initializeAudioSystem().catch((d) => {
2104
+ console.warn("Audio system pre-initialization failed:", d);
1994
2105
  });
1995
2106
  return;
1996
2107
  }
1997
- v.value = !v.value, v.value && (d.audioEngine.initializeAudioSystem().catch((u) => {
1998
- console.warn("Audio system pre-initialization failed:", u);
2108
+ f.value = !f.value, f.value && (h.audioEngine.initializeAudioSystem().catch((d) => {
2109
+ console.warn("Audio system pre-initialization failed:", d);
1999
2110
  }), setTimeout(() => {
2000
- var h;
2001
- const u = (h = S.value) == null ? void 0 : h.querySelector('button, a, [tabindex="0"]');
2002
- u && u.focus();
2111
+ var p;
2112
+ const d = (p = P.value) == null ? void 0 : p.querySelector('button, a, [tabindex="0"]');
2113
+ d && d.focus();
2003
2114
  }, 0));
2004
2115
  }
2005
- function D() {
2006
- v.value = !1;
2116
+ function B() {
2117
+ f.value = !1;
2007
2118
  }
2008
- function V(u) {
2009
- S.value && !S.value.contains(u.target) && D();
2119
+ function N(d) {
2120
+ P.value && !P.value.contains(d.target) && B();
2010
2121
  }
2011
- gt(() => {
2012
- document.addEventListener("click", V), document.addEventListener("keydown", Z);
2013
- }), vt(() => {
2014
- document.removeEventListener("click", V), document.removeEventListener("keydown", Z);
2122
+ Mt(() => {
2123
+ document.addEventListener("click", N), document.addEventListener("keydown", H);
2124
+ }), kt(() => {
2125
+ document.removeEventListener("click", N), document.removeEventListener("keydown", H);
2015
2126
  });
2016
- function O() {
2017
- d.toggleMetronome();
2127
+ function z() {
2128
+ h.toggleMetronome();
2018
2129
  }
2019
- function F() {
2020
- d.toggleLeadIn();
2130
+ function q() {
2131
+ h.toggleLeadIn();
2021
2132
  }
2022
- const U = M({
2133
+ const G = k({
2023
2134
  get: () => i.masterVolume,
2024
- set: (u) => i.setMasterVolume(u)
2025
- }), z = M({
2135
+ set: (d) => i.setMasterVolume(d)
2136
+ }), $ = k({
2026
2137
  get: () => i.metronomeVolume,
2027
- set: (u) => i.setMetronomeVolume(u)
2028
- }), Z = (u) => {
2029
- const h = u.target;
2030
- if (!(h.matches('input[type="text"]') && (h.closest(".time") || h.closest(".speed")))) {
2031
- if (u.key === "Escape")
2032
- u.preventDefault(), E();
2033
- else if (u.key === "B" && u.shiftKey) {
2034
- u.preventDefault();
2035
- const b = document.querySelector(".bar");
2036
- b && b.focus();
2037
- } else if (u.key === "T" && u.shiftKey) {
2038
- u.preventDefault();
2039
- const b = document.querySelector(".time input");
2040
- b && b.focus();
2041
- } else if (u.key === "S" && u.shiftKey) {
2042
- u.preventDefault();
2043
- const b = document.querySelector(".speed input");
2044
- b && b.focus();
2045
- } else if (u.key === " ")
2046
- u.preventDefault(), f();
2047
- else if (u.key === "PageUp")
2048
- u.preventDefault(), g();
2049
- else if (u.key === "PageDown")
2050
- u.preventDefault(), l();
2051
- else if (u.key === "M" && u.shiftKey)
2052
- u.preventDefault(), O();
2053
- else if (u.key === "L" && u.shiftKey)
2054
- u.preventDefault(), F();
2055
- else if (u.key === "N" && u.shiftKey)
2056
- u.preventDefault(), i.isPlayingOrLeadIn || y();
2057
- else if (/^[0-9]$/.test(u.key) && !u.ctrlKey && !u.metaKey && !u.shiftKey) {
2058
- const b = document.querySelector(".bar .bar-input");
2059
- if (document.activeElement === b)
2138
+ set: (d) => i.setMetronomeVolume(d)
2139
+ }), H = (d) => {
2140
+ const p = d.target;
2141
+ if (!(p.matches('input[type="text"]') && (p.closest(".time") || p.closest(".speed")))) {
2142
+ if (d.key === "Escape")
2143
+ d.preventDefault(), S();
2144
+ else if (d.key === "B" && d.shiftKey) {
2145
+ d.preventDefault();
2146
+ const g = document.querySelector(".bar");
2147
+ g && g.focus();
2148
+ } else if (d.key === "T" && d.shiftKey) {
2149
+ d.preventDefault();
2150
+ const g = document.querySelector(".time input");
2151
+ g && g.focus();
2152
+ } else if (d.key === "S" && d.shiftKey) {
2153
+ d.preventDefault();
2154
+ const g = document.querySelector(".speed input");
2155
+ g && g.focus();
2156
+ } else if (d.key === " ")
2157
+ d.preventDefault(), b();
2158
+ else if (d.key === "PageUp")
2159
+ d.preventDefault(), v();
2160
+ else if (d.key === "PageDown")
2161
+ d.preventDefault(), l();
2162
+ else if (d.key === "M" && d.shiftKey)
2163
+ d.preventDefault(), z();
2164
+ else if (d.key === "L" && d.shiftKey)
2165
+ d.preventDefault(), q();
2166
+ else if (d.key === "N" && d.shiftKey)
2167
+ d.preventDefault(), i.isPlayingOrLeadIn || E();
2168
+ else if (/^[0-9]$/.test(d.key) && !d.ctrlKey && !d.metaKey && !d.shiftKey) {
2169
+ const g = document.querySelector(".bar .bar-input");
2170
+ if (document.activeElement === g)
2060
2171
  return;
2061
- u.preventDefault(), b && (b.value = u.key, b.focus(), b.setSelectionRange(1, 1), b.dispatchEvent(new Event("input", { bubbles: !0 })));
2062
- } else if (/^[a-z]$/.test(u.key) && !u.ctrlKey && !u.metaKey && !u.shiftKey) {
2063
- u.preventDefault();
2064
- const b = document.querySelector(".bar");
2065
- if (b) {
2066
- b.focus();
2172
+ d.preventDefault(), g && (g.value = d.key, g.focus(), g.setSelectionRange(1, 1), g.dispatchEvent(new Event("input", { bubbles: !0 })));
2173
+ } else if (/^[a-z]$/.test(d.key) && !d.ctrlKey && !d.metaKey && !d.shiftKey) {
2174
+ d.preventDefault();
2175
+ const g = document.querySelector(".bar");
2176
+ if (g) {
2177
+ g.focus();
2067
2178
  const A = new KeyboardEvent("keydown", {
2068
- key: u.key,
2069
- code: u.code,
2179
+ key: d.key,
2180
+ code: d.code,
2070
2181
  bubbles: !0,
2071
2182
  cancelable: !0
2072
2183
  });
2073
- b.dispatchEvent(A);
2184
+ g.dispatchEvent(A);
2185
+ }
2186
+ } else if (d.key === "+") {
2187
+ d.preventDefault();
2188
+ const g = document.querySelector(".bar");
2189
+ if (g) {
2190
+ g.focus();
2191
+ const A = new KeyboardEvent("keydown", {
2192
+ key: "+",
2193
+ code: "Equal",
2194
+ shiftKey: !0,
2195
+ bubbles: !0,
2196
+ cancelable: !0
2197
+ });
2198
+ g.dispatchEvent(A);
2074
2199
  }
2075
2200
  }
2076
2201
  }
2077
2202
  };
2078
- return (u, h) => (P(), w("div", na, [
2203
+ return (d, p) => (w(), T("div", na, [
2079
2204
  m("div", ia, [
2080
- N(qt, {
2205
+ D(Qt, {
2081
2206
  class: "text",
2082
2207
  align: "centre",
2083
2208
  overflow: "scroll"
2084
2209
  }, {
2085
- default: W(() => [
2086
- bt(K(I(n).title), 1)
2210
+ default: Z(() => [
2211
+ St(K(L(n).title), 1)
2087
2212
  ]),
2088
2213
  _: 1
2089
2214
  }),
2090
2215
  m("div", {
2091
2216
  class: "menu-container",
2092
2217
  ref_key: "menuRef",
2093
- ref: S
2218
+ ref: P
2094
2219
  }, [
2095
- (P(), w("svg", {
2220
+ (w(), T("svg", {
2096
2221
  class: "menu",
2097
2222
  viewBox: "0 -960 960 960",
2098
- onClick: E
2099
- }, h[2] || (h[2] = [
2223
+ onClick: S
2224
+ }, p[2] || (p[2] = [
2100
2225
  m("path", { d: "M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" }, null, -1)
2101
2226
  ]))),
2102
- !e.externalMenuControl && v.value && u.$slots.menu ? (P(), w("div", {
2227
+ !e.externalMenuControl && f.value && d.$slots.menu ? (w(), T("div", {
2103
2228
  key: 0,
2104
2229
  class: "dropdown-menu",
2105
- onClick: D
2230
+ onClick: B
2106
2231
  }, [
2107
- rt(u.$slots, "menu", {}, void 0, !0)
2108
- ])) : q("", !0)
2232
+ ut(d.$slots, "menu", {}, void 0, !0)
2233
+ ])) : F("", !0)
2109
2234
  ], 512)
2110
2235
  ]),
2111
- N(ft, {
2236
+ D(yt, {
2112
2237
  class: "main",
2113
2238
  colour: "red",
2114
2239
  step: 0.01,
2115
2240
  keystep: 0.1,
2116
- value: U.value,
2117
- "onUpdate:value": h[0] || (h[0] = (b) => U.value = b)
2241
+ value: G.value,
2242
+ "onUpdate:value": p[0] || (p[0] = (g) => G.value = g)
2118
2243
  }, null, 8, ["value"]),
2119
- h[8] || (h[8] = m("div", { class: "main-t" }, "Main", -1)),
2120
- h[9] || (h[9] = m("div", { class: "main-focus" }, null, -1)),
2121
- N(ft, {
2244
+ p[8] || (p[8] = m("div", { class: "main-t" }, "Main", -1)),
2245
+ p[9] || (p[9] = m("div", { class: "main-focus" }, null, -1)),
2246
+ D(yt, {
2122
2247
  class: "tick",
2123
2248
  colour: "blue",
2124
2249
  step: 0.01,
2125
2250
  keystep: 0.1,
2126
- value: z.value,
2127
- "onUpdate:value": h[1] || (h[1] = (b) => z.value = b)
2251
+ value: $.value,
2252
+ "onUpdate:value": p[1] || (p[1] = (g) => $.value = g)
2128
2253
  }, null, 8, ["value"]),
2129
- h[10] || (h[10] = m("div", { class: "tick-t" }, "Tick", -1)),
2130
- h[11] || (h[11] = m("div", { class: "tick-focus" }, null, -1)),
2131
- N(Ze, { class: "bar" }),
2132
- N(ta, { class: "time" }),
2133
- N(Je, { class: "speed" }),
2254
+ p[10] || (p[10] = m("div", { class: "tick-t" }, "Tick", -1)),
2255
+ p[11] || (p[11] = m("div", { class: "tick-focus" }, null, -1)),
2256
+ D(Ze, { class: "bar" }),
2257
+ D(ta, { class: "time" }),
2258
+ D(Je, { class: "speed" }),
2134
2259
  m("div", ra, [
2135
- N(nt, {
2260
+ D(rt, {
2136
2261
  title: "Previous Mark",
2137
2262
  class: "button",
2138
2263
  tabindex: "-1",
2139
2264
  onClick: l
2140
2265
  }, {
2141
- default: W(() => h[3] || (h[3] = [
2266
+ default: Z(() => p[3] || (p[3] = [
2142
2267
  m("svg", {
2143
2268
  class: "icon",
2144
2269
  viewBox: "0 0 48 48"
@@ -2149,28 +2274,28 @@ const Re = ["aria-label"], Oe = {
2149
2274
  _: 1,
2150
2275
  __: [3]
2151
2276
  }),
2152
- N(nt, {
2153
- title: I(i).isPlayingOrLeadIn ? "Pause" : "Play",
2277
+ D(rt, {
2278
+ title: L(i).isPlayingOrLeadIn ? "Pause" : "Play",
2154
2279
  class: "button",
2155
2280
  tabindex: "-1",
2156
- onClick: f
2281
+ onClick: b
2157
2282
  }, {
2158
- default: W(() => [
2159
- (P(), w("svg", oa, [
2283
+ default: Z(() => [
2284
+ (w(), T("svg", oa, [
2160
2285
  m("path", {
2161
- d: I(i).isPlayingOrLeadIn ? "M27.4 35.4V12.6h8v22.8Zm-14.8 0V12.6h8.05v22.8Z" : "M16 37.85v-28l22 14Z"
2286
+ d: L(i).isPlayingOrLeadIn ? "M27.4 35.4V12.6h8v22.8Zm-14.8 0V12.6h8.05v22.8Z" : "M16 37.85v-28l22 14Z"
2162
2287
  }, null, 8, la)
2163
2288
  ]))
2164
2289
  ]),
2165
2290
  _: 1
2166
2291
  }, 8, ["title"]),
2167
- N(nt, {
2292
+ D(rt, {
2168
2293
  title: "Next Mark",
2169
2294
  class: "button",
2170
2295
  tabindex: "-1",
2171
- onClick: g
2296
+ onClick: v
2172
2297
  }, {
2173
- default: W(() => h[4] || (h[4] = [
2298
+ default: Z(() => p[4] || (p[4] = [
2174
2299
  m("svg", {
2175
2300
  class: "icon",
2176
2301
  viewBox: "0 0 48 48"
@@ -2181,46 +2306,46 @@ const Re = ["aria-label"], Oe = {
2181
2306
  _: 1,
2182
2307
  __: [4]
2183
2308
  }),
2184
- N(nt, {
2309
+ D(rt, {
2185
2310
  title: "Toggle Metronome",
2186
2311
  class: "button",
2187
2312
  tabindex: "-1",
2188
- onClick: O
2313
+ onClick: z
2189
2314
  }, {
2190
- default: W(() => [
2191
- (P(), w("svg", {
2192
- class: L(["icon", T.value ? "on" : "off"]),
2315
+ default: Z(() => [
2316
+ (w(), T("svg", {
2317
+ class: I(["icon", C.value ? "on" : "off"]),
2193
2318
  viewBox: "-128 -128 768 768"
2194
- }, h[5] || (h[5] = [
2319
+ }, p[5] || (p[5] = [
2195
2320
  m("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)
2196
2321
  ]), 2))
2197
2322
  ]),
2198
2323
  _: 1
2199
2324
  }),
2200
- N(nt, {
2325
+ D(rt, {
2201
2326
  title: "Toggle Lead-in",
2202
2327
  class: "button",
2203
2328
  tabindex: "-1",
2204
- onClick: F
2329
+ onClick: q
2205
2330
  }, {
2206
- default: W(() => [
2207
- (P(), w("svg", {
2208
- class: L(["icon", B.value ? "on" : "off"]),
2331
+ default: Z(() => [
2332
+ (w(), T("svg", {
2333
+ class: I(["icon", V.value ? "on" : "off"]),
2209
2334
  viewBox: "-2 -2 28 28"
2210
- }, h[6] || (h[6] = [
2335
+ }, p[6] || (p[6] = [
2211
2336
  m("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)
2212
2337
  ]), 2))
2213
2338
  ]),
2214
2339
  _: 1
2215
2340
  }),
2216
- N(nt, {
2341
+ D(rt, {
2217
2342
  title: "Starting Notes",
2218
2343
  class: "button",
2219
2344
  tabindex: "-1",
2220
- disabled: I(i).isPlayingOrLeadIn,
2221
- onClick: y
2345
+ disabled: L(i).isPlayingOrLeadIn,
2346
+ onClick: E
2222
2347
  }, {
2223
- default: W(() => h[7] || (h[7] = [
2348
+ default: Z(() => p[7] || (p[7] = [
2224
2349
  m("svg", {
2225
2350
  class: "icon",
2226
2351
  viewBox: "0 -960 960 960"
@@ -2235,10 +2360,10 @@ const Re = ["aria-label"], Oe = {
2235
2360
  ])
2236
2361
  ]));
2237
2362
  }
2238
- }, da = /* @__PURE__ */ $(ua, [["__scopeId", "data-v-070a1a8f"]]), ca = { class: "init-progress" }, ha = {
2363
+ }, da = /* @__PURE__ */ U(ua, [["__scopeId", "data-v-9470408d"]]), ca = { class: "init-progress" }, ha = {
2239
2364
  key: 0,
2240
2365
  class: "progress-track"
2241
- }, ma = { class: "message-container" }, pa = {
2366
+ }, ma = { class: "message-container" }, fa = {
2242
2367
  __name: "InitializationProgress",
2243
2368
  props: {
2244
2369
  /** Current initialization stage */
@@ -2268,22 +2393,22 @@ const Re = ["aria-label"], Oe = {
2268
2393
  }
2269
2394
  },
2270
2395
  setup(e) {
2271
- const t = e, a = M(() => t.progress !== null), s = M(() => t.progress === null ? 0 : Math.max(0, Math.min(100, t.progress * 100))), n = M(() => t.hasError ? t.errorMessage : t.message);
2272
- return (i, r) => (P(), w("div", ca, [
2273
- a.value ? (P(), w("div", ha, [
2396
+ const t = e, a = k(() => t.progress !== null), s = k(() => t.progress === null ? 0 : Math.max(0, Math.min(100, t.progress * 100))), n = k(() => t.hasError ? t.errorMessage : t.message);
2397
+ return (i, r) => (w(), T("div", ca, [
2398
+ a.value ? (w(), T("div", ha, [
2274
2399
  m("div", {
2275
2400
  class: "progress-fill",
2276
- style: Rt({ width: `${s.value}%` })
2401
+ style: Gt({ width: `${s.value}%` })
2277
2402
  }, null, 4)
2278
- ])) : q("", !0),
2403
+ ])) : F("", !0),
2279
2404
  m("div", ma, [
2280
2405
  m("div", {
2281
- class: L(["message", { error: e.hasError }])
2406
+ class: I(["message", { error: e.hasError }])
2282
2407
  }, K(n.value), 3)
2283
2408
  ])
2284
2409
  ]));
2285
2410
  }
2286
- }, fa = /* @__PURE__ */ $(pa, [["__scopeId", "data-v-a9ed87f2"]]), va = yt("initialization", {
2411
+ }, pa = /* @__PURE__ */ U(fa, [["__scopeId", "data-v-a9ed87f2"]]), va = Pt("initialization", {
2287
2412
  state: () => ({
2288
2413
  // Current initialization stage
2289
2414
  currentStage: null,
@@ -2347,7 +2472,7 @@ const Re = ["aria-label"], Oe = {
2347
2472
  }), ga = { class: "container" }, ba = { class: "panel" }, ya = {
2348
2473
  key: 0,
2349
2474
  class: "blur"
2350
- }, At = 40, Lt = 40, Nt = 100, ka = 50, Dt = 400, Vt = 570, zt = 570, Ma = 350, Sa = 330, xa = 360, Pa = 360, wa = {
2475
+ }, Ot = 40, Rt = 40, $t = 100, ka = 50, Ft = 400, Ut = 570, Kt = 570, Ma = 350, Sa = 330, Pa = 360, xa = 360, wa = {
2351
2476
  __name: "MixerLayout",
2352
2477
  props: {
2353
2478
  /** Whether to show initialization progress (default: true) */
@@ -2363,88 +2488,88 @@ const Re = ["aria-label"], Oe = {
2363
2488
  },
2364
2489
  emits: ["menu-click"],
2365
2490
  setup(e, { emit: t }) {
2366
- tt((v) => ({
2367
- "3e3bf6e6": y.value,
2368
- "3e499cb2": T.value,
2369
- "3a701552": B.value
2491
+ at((f) => ({
2492
+ "3e3bf6e6": E.value,
2493
+ "3e499cb2": C.value,
2494
+ "3a701552": V.value
2370
2495
  }));
2371
- const a = e, s = t, n = J(), i = at(), r = va();
2372
- gt(() => {
2496
+ const a = e, s = t, n = et(), i = nt(), r = va();
2497
+ Mt(() => {
2373
2498
  r.initializeListeners();
2374
2499
  });
2375
- const d = j("container"), { width: f } = et(d), l = M(() => i.isLoaded), g = M(() => {
2376
- const v = f.value, S = n.parts.length;
2377
- return v < 640 || v < At * S + Dt ? 0 : v < Lt * S + Vt ? 1 : v < Nt * S + zt ? 2 : 3;
2378
- }), y = M(() => {
2379
- switch (g.value) {
2500
+ const h = Y("container"), { width: b } = st(h), l = k(() => i.isLoaded), v = k(() => {
2501
+ const f = b.value, P = n.parts.length;
2502
+ return f < 640 || f < Ot * P + Ft ? 0 : f < Rt * P + Ut ? 1 : f < $t * P + Kt ? 2 : 3;
2503
+ }), E = k(() => {
2504
+ switch (v.value) {
2380
2505
  case 0:
2381
2506
  return `${Ma}px ` + `${ka}px `.repeat(n.parts.length);
2382
2507
  case 1:
2383
2508
  return `${Sa}px`;
2384
2509
  case 2:
2385
- return `${xa}px`;
2386
- default:
2387
2510
  return `${Pa}px`;
2511
+ default:
2512
+ return `${xa}px`;
2388
2513
  }
2389
- }), T = M(() => {
2390
- switch (g.value) {
2514
+ }), C = k(() => {
2515
+ switch (v.value) {
2391
2516
  case 0:
2392
2517
  return "100vw";
2393
2518
  case 1:
2394
- return `${At}px `.repeat(n.parts.length) + `${Dt}px`;
2519
+ return `${Ot}px `.repeat(n.parts.length) + `${Ft}px`;
2395
2520
  case 2:
2396
- return `${Lt}px `.repeat(n.parts.length) + `${Vt}px`;
2521
+ return `${Rt}px `.repeat(n.parts.length) + `${Ut}px`;
2397
2522
  default:
2398
- return `${Nt}px `.repeat(n.parts.length) + `${zt}px`;
2523
+ return `${$t}px `.repeat(n.parts.length) + `${Kt}px`;
2399
2524
  }
2400
- }), B = M(() => {
2401
- const v = [...n.parts.keys()];
2402
- return g.value > 0 ? '"' + v.map((S) => "part" + S).join(" ") + ' controls"' : '"controls" ' + v.map((S) => '"part' + S + '"').join(" ");
2525
+ }), V = k(() => {
2526
+ const f = [...n.parts.keys()];
2527
+ return v.value > 0 ? '"' + f.map((P) => "part" + P).join(" ") + ' controls"' : '"controls" ' + f.map((P) => '"part' + P + '"').join(" ");
2403
2528
  });
2404
- return (v, S) => (P(), w("div", {
2529
+ return (f, P) => (w(), T("div", {
2405
2530
  class: "outer",
2406
2531
  ref_key: "container",
2407
- ref: d
2532
+ ref: h
2408
2533
  }, [
2409
2534
  m("div", ga, [
2410
2535
  m("div", ba, [
2411
- (P(!0), w(ct, null, Et(I(n).parts, (E, D) => (P(), ht($e, {
2412
- key: E.name,
2413
- class: L("part" + D),
2414
- name: E.name,
2415
- volume: E.volume,
2416
- "onUpdate:volume": (V) => E.volume = V,
2417
- solo: E.solo,
2418
- "onUpdate:solo": (V) => E.solo = V,
2419
- mute: E.mute,
2420
- "onUpdate:mute": (V) => E.mute = V,
2536
+ (w(!0), T(pt, null, At(L(n).parts, (S, B) => (w(), vt($e, {
2537
+ key: S.name,
2538
+ class: I("part" + B),
2539
+ name: S.name,
2540
+ volume: S.volume,
2541
+ "onUpdate:volume": (N) => S.volume = N,
2542
+ solo: S.solo,
2543
+ "onUpdate:solo": (N) => S.solo = N,
2544
+ mute: S.mute,
2545
+ "onUpdate:mute": (N) => S.mute = N,
2421
2546
  ref_for: !0,
2422
2547
  ref: "parts"
2423
2548
  }, null, 8, ["class", "name", "volume", "onUpdate:volume", "solo", "onUpdate:solo", "mute", "onUpdate:mute"]))), 128)),
2424
- N(da, {
2549
+ D(da, {
2425
2550
  "external-menu-control": a.externalMenuControl,
2426
- onMenuClick: S[0] || (S[0] = (E) => s("menu-click")),
2551
+ onMenuClick: P[0] || (P[0] = (S) => s("menu-click")),
2427
2552
  class: "controls"
2428
2553
  }, {
2429
- menu: W(() => [
2430
- rt(v.$slots, "menu", {}, void 0, !0)
2554
+ menu: Z(() => [
2555
+ ut(f.$slots, "menu", {}, void 0, !0)
2431
2556
  ]),
2432
2557
  _: 3
2433
2558
  }, 8, ["external-menu-control"]),
2434
- l.value ? q("", !0) : (P(), w("div", ya)),
2435
- a.showInitProgress && I(r).shouldShowProgress ? (P(), ht(fa, {
2559
+ l.value ? F("", !0) : (w(), T("div", ya)),
2560
+ a.showInitProgress && L(r).shouldShowProgress ? (w(), vt(pa, {
2436
2561
  key: 1,
2437
- stage: I(r).currentStage,
2438
- message: I(r).message,
2439
- progress: I(r).progress,
2440
- "has-error": I(r).hasError,
2441
- "error-message": I(r).errorMessage
2442
- }, null, 8, ["stage", "message", "progress", "has-error", "error-message"])) : q("", !0)
2562
+ stage: L(r).currentStage,
2563
+ message: L(r).message,
2564
+ progress: L(r).progress,
2565
+ "has-error": L(r).hasError,
2566
+ "error-message": L(r).errorMessage
2567
+ }, null, 8, ["stage", "message", "progress", "has-error", "error-message"])) : F("", !0)
2443
2568
  ])
2444
2569
  ])
2445
2570
  ], 512));
2446
2571
  }
2447
- }, Oa = /* @__PURE__ */ $(wa, [["__scopeId", "data-v-cf29d602"]]), Ea = { class: "outer" }, Ta = { class: "mid" }, Ba = { class: "inner" }, Ca = {
2572
+ }, Ra = /* @__PURE__ */ U(wa, [["__scopeId", "data-v-cf29d602"]]), Ea = { class: "outer" }, Ta = { class: "mid" }, Ca = { class: "inner" }, Ba = {
2448
2573
  key: 0,
2449
2574
  class: "content"
2450
2575
  }, _a = {
@@ -2460,23 +2585,23 @@ const Re = ["aria-label"], Oe = {
2460
2585
  }
2461
2586
  },
2462
2587
  setup(e) {
2463
- return tt((t) => ({
2588
+ return at((t) => ({
2464
2589
  "66bea586": e.colour
2465
- })), (t, a) => (P(), w("div", Ea, [
2590
+ })), (t, a) => (w(), T("div", Ea, [
2466
2591
  m("div", Ta, [
2467
- m("div", Ba, [
2468
- e.text || t.$slots.default ? (P(), w("div", Ca, [
2469
- bt(K(e.text) + " ", 1),
2470
- rt(t.$slots, "default", {}, void 0, !0)
2471
- ])) : q("", !0)
2592
+ m("div", Ca, [
2593
+ e.text || t.$slots.default ? (w(), T("div", Ba, [
2594
+ St(K(e.text) + " ", 1),
2595
+ ut(t.$slots, "default", {}, void 0, !0)
2596
+ ])) : F("", !0)
2472
2597
  ])
2473
2598
  ])
2474
2599
  ]));
2475
2600
  }
2476
- }, $a = /* @__PURE__ */ $(_a, [["__scopeId", "data-v-dff76c48"]]), Ia = { class: "modal-footer" }, Aa = {
2601
+ }, $a = /* @__PURE__ */ U(_a, [["__scopeId", "data-v-dff76c48"]]), La = { class: "modal-footer" }, Aa = {
2477
2602
  key: 0,
2478
2603
  class: "dont-remind"
2479
- }, La = {
2604
+ }, Ia = {
2480
2605
  __name: "KeyboardShortcutsHelp",
2481
2606
  props: {
2482
2607
  /** Controls visibility of the dialog */
@@ -2494,37 +2619,37 @@ const Re = ["aria-label"], Oe = {
2494
2619
  setup(e, { emit: t }) {
2495
2620
  const a = e, s = t, n = _(!1), i = _(null), r = () => {
2496
2621
  n.value && s("dont-remind", !0), s("update:visible", !1);
2497
- }, d = (f) => {
2498
- f.key === "Escape" && (f.preventDefault(), f.stopPropagation(), r());
2622
+ }, h = (b) => {
2623
+ b.key === "Escape" && (b.preventDefault(), b.stopPropagation(), r());
2499
2624
  };
2500
- return R(() => a.visible, async (f) => {
2625
+ return R(() => a.visible, async (b) => {
2501
2626
  var l;
2502
- f && (await se(), (l = i.value) == null || l.focus());
2503
- }), (f, l) => e.visible ? (P(), w("div", {
2627
+ b && (await se(), (l = i.value) == null || l.focus());
2628
+ }), (b, l) => e.visible ? (w(), T("div", {
2504
2629
  key: 0,
2505
2630
  class: "modal-overlay",
2506
2631
  onClick: r,
2507
- onKeydown: d
2632
+ onKeydown: h
2508
2633
  }, [
2509
2634
  m("div", {
2510
2635
  class: "modal-content shortcuts-help",
2511
- onClick: l[1] || (l[1] = St(() => {
2636
+ onClick: l[1] || (l[1] = Ct(() => {
2512
2637
  }, ["stop"])),
2513
2638
  role: "dialog",
2514
2639
  "aria-labelledby": "shortcuts-title",
2515
2640
  "aria-modal": "true"
2516
2641
  }, [
2517
2642
  l[3] || (l[3] = ne('<h2 id="shortcuts-title" data-v-bfa878a3>Keyboard Shortcuts</h2><div class="shortcuts-container" data-v-bfa878a3><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Transport Controls</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>P</kbd></dt><dd data-v-bfa878a3>Play / Pause</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>S</kbd></dt><dd data-v-bfa878a3>Stop</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>B</kbd></dt><dd data-v-bfa878a3>Previous bar</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>F</kbd></dt><dd data-v-bfa878a3>Next bar</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Features</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>M</kbd></dt><dd data-v-bfa878a3>Toggle metronome</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>L</kbd></dt><dd data-v-bfa878a3>Toggle lead-in</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>N</kbd></dt><dd data-v-bfa878a3>Play starting notes</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Sliders &amp; Controls</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>↑</kbd> / <kbd data-v-bfa878a3>→</kbd></dt><dd data-v-bfa878a3>Increase value</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>↓</kbd> / <kbd data-v-bfa878a3>←</kbd></dt><dd data-v-bfa878a3>Decrease value</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Home</kbd></dt><dd data-v-bfa878a3>Set to minimum</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>End</kbd></dt><dd data-v-bfa878a3>Set to maximum</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Page Up</kbd> / <kbd data-v-bfa878a3>Page Down</kbd></dt><dd data-v-bfa878a3>Large adjustment</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Navigation</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Tab</kbd></dt><dd data-v-bfa878a3>Next control</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>Tab</kbd></dt><dd data-v-bfa878a3>Previous control</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Enter</kbd> / <kbd data-v-bfa878a3>Space</kbd></dt><dd data-v-bfa878a3>Activate button</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Escape</kbd></dt><dd data-v-bfa878a3>Close dialog / menu</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Help</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>?</kbd></dt><dd data-v-bfa878a3>Show this help</dd></div></dl></section></div>', 2)),
2518
- m("div", Ia, [
2519
- e.showDontRemind ? (P(), w("label", Aa, [
2520
- Tt(m("input", {
2643
+ m("div", La, [
2644
+ e.showDontRemind ? (w(), T("label", Aa, [
2645
+ It(m("input", {
2521
2646
  type: "checkbox",
2522
- "onUpdate:modelValue": l[0] || (l[0] = (g) => n.value = g)
2647
+ "onUpdate:modelValue": l[0] || (l[0] = (v) => n.value = v)
2523
2648
  }, null, 512), [
2524
2649
  [ie, n.value]
2525
2650
  ]),
2526
- l[2] || (l[2] = bt(" Don't show this again "))
2527
- ])) : q("", !0),
2651
+ l[2] || (l[2] = St(" Don't show this again "))
2652
+ ])) : F("", !0),
2528
2653
  m("button", {
2529
2654
  onClick: r,
2530
2655
  class: "close-button",
@@ -2533,12 +2658,12 @@ const Re = ["aria-label"], Oe = {
2533
2658
  }, "Close", 512)
2534
2659
  ])
2535
2660
  ])
2536
- ], 32)) : q("", !0);
2661
+ ], 32)) : F("", !0);
2537
2662
  }
2538
- }, Fa = /* @__PURE__ */ $(La, [["__scopeId", "data-v-bfa878a3"]]);
2663
+ }, Fa = /* @__PURE__ */ U(Ia, [["__scopeId", "data-v-bfa878a3"]]);
2539
2664
  class Na {
2540
2665
  constructor() {
2541
- this.eventBus = jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0;
2666
+ this.eventBus = Jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0;
2542
2667
  }
2543
2668
  // Initialize with musical data
2544
2669
  initialize(t) {
@@ -2684,29 +2809,29 @@ class Na {
2684
2809
  }
2685
2810
  new Na();
2686
2811
  export {
2687
- nt as AudioButton,
2688
- ft as AudioSlider,
2812
+ rt as AudioButton,
2813
+ yt as AudioSlider,
2689
2814
  Ze as BarInput,
2690
- Zt as BaseNumericInput,
2691
- Pt as DEV_MODE,
2815
+ te as BaseNumericInput,
2816
+ _t as DEV_MODE,
2692
2817
  Na as DummyAudioEngine,
2693
- fa as InitializationProgress,
2818
+ pa as InitializationProgress,
2694
2819
  Fa as KeyboardShortcutsHelp,
2695
2820
  da as MixerControls,
2696
- Oa as MixerLayout,
2821
+ Ra as MixerLayout,
2697
2822
  $e as PartControl,
2698
2823
  $a as Placeholder,
2699
2824
  Je as SpeedInput,
2700
2825
  ta as TimeInput,
2701
- qt as TitleText,
2826
+ Qt as TitleText,
2702
2827
  Ne as TriState,
2703
2828
  Ve as audioEngineConfig,
2704
- Ht as isDevFeature,
2705
- Ra as isDevMode,
2706
- at as useAudioStateStore,
2707
- et as useElementSize,
2829
+ Xt as isDevFeature,
2830
+ Oa as isDevMode,
2831
+ nt as useAudioStateStore,
2832
+ st as useElementSize,
2708
2833
  va as useInitializationState,
2709
- ot as useMasterAudioControl,
2710
- J as useMusicDataStore,
2711
- Wt as usePlaybackStateStore
2834
+ dt as useMasterAudioControl,
2835
+ et as useMusicDataStore,
2836
+ Nt as usePlaybackStateStore
2712
2837
  };