vue-audio-ui 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/composables/useMetering.d.ts +5 -4
- package/dist/src/lib/v-a-analog-meter.vue.d.ts +1 -1
- package/dist/src/lib/v-a-audio-file-visualizer.vue.d.ts +43 -15
- package/dist/src/lib/v-a-digital-meter-stereo.vue.d.ts +1 -7
- package/dist/src/lib/v-a-digital-meter.vue.d.ts +2 -13
- package/dist/src/lib/v-a-envelope-adsr.vue.d.ts +111 -0
- package/dist/src/lib/v-a-mod-matrix.vue.d.ts +47 -0
- package/dist/src/lib/v-a-num-box.vue.d.ts +72 -0
- package/dist/src/lib/{v-a-analog-meter-stereo.vue.d.ts → v-a-oscilloscope.vue.d.ts} +25 -32
- package/dist/src/lib/v-a-piano.vue.d.ts +71 -0
- package/dist/src/lib/v-a-spectrum-analyzer.vue.d.ts +30 -24
- package/dist/src/theme.d.ts +18 -0
- package/dist/src/util/SignalScaler.d.ts +18 -0
- package/dist/src/util/SignalToRatio.d.ts +16 -0
- package/dist/src/util/math-helpers.d.ts +5 -2
- package/dist/vue-audio-ui.cjs +17 -0
- package/dist/vue-audio-ui.css +1 -0
- package/dist/{v-audio-ui.d.ts → vue-audio-ui.d.ts} +7 -2
- package/dist/vue-audio-ui.js +1948 -0
- package/dist/vue-audio-ui.umd.cjs +17 -0
- package/package.json +15 -10
- package/README.md +0 -42
- package/dist/src/composables/useMeteringSSR.d.ts +0 -7
- package/dist/v-audio-ui.cjs +0 -5
- package/dist/v-audio-ui.css +0 -1
- package/dist/v-audio-ui.js +0 -1189
- package/dist/v-audio-ui.umd.cjs +0 -5
- /package/dist/src/types/{v-audio-ui-types.d.ts → vue-audio-ui-types.d.ts} +0 -0
package/dist/v-audio-ui.js
DELETED
|
@@ -1,1189 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, resolveComponent as G, createElementBlock as p, openBlock as c, createVNode as k, ref as y, watch as W, computed as H, onMounted as I, onUnmounted as R, createStaticVNode as V, createElementVNode as n, Fragment as O, normalizeStyle as S, toDisplayString as m, renderSlot as U, reactive as F, normalizeClass as L } from "vue";
|
|
2
|
-
const N = w({
|
|
3
|
-
name: "VAAnalogMeterStereo",
|
|
4
|
-
props: {
|
|
5
|
-
leftInput: {
|
|
6
|
-
required: !1,
|
|
7
|
-
type: AudioNode
|
|
8
|
-
},
|
|
9
|
-
rightInput: {
|
|
10
|
-
required: !1,
|
|
11
|
-
type: AudioNode
|
|
12
|
-
},
|
|
13
|
-
type: {
|
|
14
|
-
required: !1,
|
|
15
|
-
type: String,
|
|
16
|
-
default: "peak"
|
|
17
|
-
},
|
|
18
|
-
fftSize: {
|
|
19
|
-
required: !1,
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 2048
|
|
22
|
-
},
|
|
23
|
-
width: {
|
|
24
|
-
required: !1,
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 300
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}), u = (t, e) => {
|
|
30
|
-
const a = t.__vccOpts || t;
|
|
31
|
-
for (const [r, i] of e)
|
|
32
|
-
a[r] = i;
|
|
33
|
-
return a;
|
|
34
|
-
}, E = { class: "stereo-meter-container" };
|
|
35
|
-
function B(t, e, a, r, i, s) {
|
|
36
|
-
const o = G("v-a-analog-meter");
|
|
37
|
-
return c(), p("div", E, [
|
|
38
|
-
k(o, {
|
|
39
|
-
class: "meter-channel",
|
|
40
|
-
input: t.leftInput,
|
|
41
|
-
fftSize: t.fftSize,
|
|
42
|
-
type: t.type,
|
|
43
|
-
width: t.width
|
|
44
|
-
}, null, 8, ["input", "fftSize", "type", "width"]),
|
|
45
|
-
k(o, {
|
|
46
|
-
class: "meter-channel",
|
|
47
|
-
input: t.rightInput,
|
|
48
|
-
fftSize: t.fftSize,
|
|
49
|
-
type: t.type,
|
|
50
|
-
width: t.width
|
|
51
|
-
}, null, 8, ["input", "fftSize", "type", "width"])
|
|
52
|
-
]);
|
|
53
|
-
}
|
|
54
|
-
const _ = /* @__PURE__ */ u(N, [["render", B], ["__scopeId", "data-v-b2b883c7"]]);
|
|
55
|
-
function T(t, e) {
|
|
56
|
-
let a, r;
|
|
57
|
-
e && i(e);
|
|
58
|
-
function i(l) {
|
|
59
|
-
a = l.context.createAnalyser(), a.fftSize = t, r = new Float32Array(a.frequencyBinCount), l.connect(a);
|
|
60
|
-
}
|
|
61
|
-
function s(l, d) {
|
|
62
|
-
l && i(l);
|
|
63
|
-
}
|
|
64
|
-
function o() {
|
|
65
|
-
return a?.getFloatTimeDomainData(r), r;
|
|
66
|
-
}
|
|
67
|
-
function h() {
|
|
68
|
-
return a?.getFloatFrequencyData(r), r;
|
|
69
|
-
}
|
|
70
|
-
function g(l) {
|
|
71
|
-
let d = 0, f;
|
|
72
|
-
for (let x = 0; x < l.length; x++)
|
|
73
|
-
f = Math.abs(l[x]), f > d && (d = f);
|
|
74
|
-
return 20 * Math.log10(d);
|
|
75
|
-
}
|
|
76
|
-
function D(l) {
|
|
77
|
-
let d = 0, f;
|
|
78
|
-
for (let x = 0; x < l.length; x++)
|
|
79
|
-
f = Math.abs(l[x]), d += f * f;
|
|
80
|
-
return 20 * Math.log10(Math.sqrt(d / l.length));
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
getPeakDb: g,
|
|
84
|
-
getRmsDb: D,
|
|
85
|
-
getFloatTimeDomainData: o,
|
|
86
|
-
getFloatFrequencyData: h,
|
|
87
|
-
onInputChanged: s
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function P() {
|
|
91
|
-
const t = y(!1);
|
|
92
|
-
function e(i) {
|
|
93
|
-
try {
|
|
94
|
-
i();
|
|
95
|
-
} catch (s) {
|
|
96
|
-
t.value = !1, console.log(`error in render callback - ${s}`);
|
|
97
|
-
}
|
|
98
|
-
t.value && window.requestAnimationFrame(() => e(i));
|
|
99
|
-
}
|
|
100
|
-
function a(i) {
|
|
101
|
-
t.value = !0, e(i);
|
|
102
|
-
}
|
|
103
|
-
function r() {
|
|
104
|
-
t.value = !1;
|
|
105
|
-
}
|
|
106
|
-
return { startRendering: a, stopRendering: r };
|
|
107
|
-
}
|
|
108
|
-
const Y = w({
|
|
109
|
-
name: "VAAnalogMeter",
|
|
110
|
-
props: {
|
|
111
|
-
input: {
|
|
112
|
-
required: !1,
|
|
113
|
-
type: AudioNode,
|
|
114
|
-
default: void 0
|
|
115
|
-
},
|
|
116
|
-
type: {
|
|
117
|
-
required: !1,
|
|
118
|
-
type: String,
|
|
119
|
-
default: "peak"
|
|
120
|
-
},
|
|
121
|
-
fftSize: {
|
|
122
|
-
required: !1,
|
|
123
|
-
type: Number,
|
|
124
|
-
default: 2048
|
|
125
|
-
},
|
|
126
|
-
width: {
|
|
127
|
-
required: !1,
|
|
128
|
-
type: Number,
|
|
129
|
-
default: 300
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
setup(t) {
|
|
133
|
-
const { getPeakDb: e, getRmsDb: a, getFloatTimeDomainData: r, onInputChanged: i } = T(t.fftSize, t.input);
|
|
134
|
-
W(() => t.input, i);
|
|
135
|
-
const { startRendering: s, stopRendering: o } = P(), h = y(-1), g = y("black"), D = H(() => isNaN(h.value) ? "rotate(0 160 150)" : `rotate(${50 * h.value} 160 150)`);
|
|
136
|
-
return I(() => {
|
|
137
|
-
s(() => {
|
|
138
|
-
const l = r();
|
|
139
|
-
let d = 0;
|
|
140
|
-
t.type === "peak" && l ? d = e(l) : t.type === "rms" && l && (d = a(l));
|
|
141
|
-
const f = 80;
|
|
142
|
-
d = d < -f ? -f : d;
|
|
143
|
-
const x = (f + d) / f;
|
|
144
|
-
h.value = x * 2 - 1;
|
|
145
|
-
});
|
|
146
|
-
}), R(() => {
|
|
147
|
-
o();
|
|
148
|
-
}), {
|
|
149
|
-
color: g,
|
|
150
|
-
rotation: D,
|
|
151
|
-
value: h
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}), K = { class: "meter-container" }, X = ["width"], Z = ["transform"];
|
|
155
|
-
function j(t, e, a, r, i, s) {
|
|
156
|
-
return c(), p("div", K, [
|
|
157
|
-
(c(), p("svg", {
|
|
158
|
-
width: `${t.width}px`,
|
|
159
|
-
viewBox: "0 0 320 220",
|
|
160
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
161
|
-
}, [
|
|
162
|
-
e[1] || (e[1] = V('<defs data-v-a00b48f0><linearGradient id="frameGrad" x1="0" y1="0" x2="0" y2="1" data-v-a00b48f0><stop offset="0%" stop-color="#f0f0f0" data-v-a00b48f0></stop><stop offset="50%" stop-color="#b5b5b5" data-v-a00b48f0></stop><stop offset="100%" stop-color="#8a8a8a" data-v-a00b48f0></stop></linearGradient><linearGradient id="faceGrad" x1="0" y1="0" x2="0" y2="1" data-v-a00b48f0><stop offset="0%" stop-color="#fffdf7" data-v-a00b48f0></stop><stop offset="100%" stop-color="#e9e2d3" data-v-a00b48f0></stop></linearGradient><radialGradient id="glassGrad" cx="50%" cy="0%" r="80%" data-v-a00b48f0><stop offset="0%" stop-color="white" stop-opacity="0.7" data-v-a00b48f0></stop><stop offset="60%" stop-color="white" stop-opacity="0.15" data-v-a00b48f0></stop><stop offset="100%" stop-color="white" stop-opacity="0" data-v-a00b48f0></stop></radialGradient><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%" data-v-a00b48f0><feDropShadow dx="0" dy="3" stdDeviation="4" flood-opacity="0.4" data-v-a00b48f0></feDropShadow></filter><filter id="needleShadow" data-v-a00b48f0><feDropShadow dx="1" dy="1" stdDeviation="1" flood-opacity="0.5" data-v-a00b48f0></feDropShadow></filter></defs><rect x="10" y="10" rx="18" ry="18" width="300" height="200" fill="url(#frameGrad)" filter="url(#shadow)" data-v-a00b48f0></rect><rect x="24" y="24" rx="12" ry="12" width="272" height="172" fill="url(#faceGrad)" stroke="#777" stroke-width="1" data-v-a00b48f0></rect><path d="M 60 90 A 130 70 0 0 1 260 90" fill="none" stroke="#222" stroke-width="2" data-v-a00b48f0></path><g stroke="#222" stroke-width="2" data-v-a00b48f0><line x1="100" y1="120" x2="105" y2="130" data-v-a00b48f0></line><line x1="160" y1="110" x2="160" y2="122" data-v-a00b48f0></line><line x1="220" y1="120" x2="215" y2="130" data-v-a00b48f0></line></g>', 5)),
|
|
163
|
-
n("g", {
|
|
164
|
-
id: "needle",
|
|
165
|
-
transform: t.rotation
|
|
166
|
-
}, [...e[0] || (e[0] = [
|
|
167
|
-
n("polygon", {
|
|
168
|
-
points: "160,70 158,150 162,150",
|
|
169
|
-
fill: "#c62828"
|
|
170
|
-
}, null, -1),
|
|
171
|
-
n("circle", {
|
|
172
|
-
cx: "160",
|
|
173
|
-
cy: "150",
|
|
174
|
-
r: "6",
|
|
175
|
-
fill: "#333"
|
|
176
|
-
}, null, -1),
|
|
177
|
-
n("circle", {
|
|
178
|
-
cx: "160",
|
|
179
|
-
cy: "150",
|
|
180
|
-
r: "3",
|
|
181
|
-
fill: "#777"
|
|
182
|
-
}, null, -1)
|
|
183
|
-
])], 8, Z),
|
|
184
|
-
e[2] || (e[2] = n("rect", {
|
|
185
|
-
x: "24",
|
|
186
|
-
y: "24",
|
|
187
|
-
rx: "12",
|
|
188
|
-
ry: "12",
|
|
189
|
-
width: "272",
|
|
190
|
-
height: "172",
|
|
191
|
-
fill: "url(#glassGrad)"
|
|
192
|
-
}, null, -1)),
|
|
193
|
-
e[3] || (e[3] = n("text", {
|
|
194
|
-
x: "160",
|
|
195
|
-
y: "185",
|
|
196
|
-
"text-anchor": "middle",
|
|
197
|
-
"font-size": "16",
|
|
198
|
-
"font-weight": "bold",
|
|
199
|
-
"font-family": "Arial, Helvetica, sans-serif",
|
|
200
|
-
fill: "#333"
|
|
201
|
-
}, null, -1))
|
|
202
|
-
], 8, X))
|
|
203
|
-
]);
|
|
204
|
-
}
|
|
205
|
-
const J = /* @__PURE__ */ u(Y, [["render", j], ["__scopeId", "data-v-a00b48f0"]]);
|
|
206
|
-
function z(t, e, a) {
|
|
207
|
-
return t < e ? e : t > a ? a : t;
|
|
208
|
-
}
|
|
209
|
-
class A {
|
|
210
|
-
min;
|
|
211
|
-
max;
|
|
212
|
-
constructor(e, a) {
|
|
213
|
-
this.min = e, this.max = a;
|
|
214
|
-
}
|
|
215
|
-
getCurvedValue(e) {
|
|
216
|
-
throw "getCurvedValue must be overriden in child class";
|
|
217
|
-
}
|
|
218
|
-
getLinearValue(e) {
|
|
219
|
-
throw "getLinearValue must be overriden in child class";
|
|
220
|
-
}
|
|
221
|
-
validateInput(e) {
|
|
222
|
-
if (e < this.min)
|
|
223
|
-
throw `given value ${e} is less than min value ${this.min}`;
|
|
224
|
-
if (e > this.max)
|
|
225
|
-
throw `given value ${e} is greater than max value ${this.max}`;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function $(t) {
|
|
229
|
-
return Math.pow(Math.E, t);
|
|
230
|
-
}
|
|
231
|
-
function Q(t, e, a, r, i, s) {
|
|
232
|
-
return ($(((t - e) / (a - e) - 1) * s) - 1) / ($(-s) - 1) * (r - i) + i;
|
|
233
|
-
}
|
|
234
|
-
function tt(t, e, a, r, i, s) {
|
|
235
|
-
return (Math.log((t - i) * ($(-s) - 1) / (r - i) + 1) / s + 1) * (a - e) + e;
|
|
236
|
-
}
|
|
237
|
-
class q extends A {
|
|
238
|
-
curveAmount;
|
|
239
|
-
constructor(e, a, r) {
|
|
240
|
-
super(e, a), this.curveAmount = r;
|
|
241
|
-
}
|
|
242
|
-
getCurvedValue(e) {
|
|
243
|
-
return this.validateInput(e), Q(e, this.min, this.max, this.min, this.max, this.curveAmount);
|
|
244
|
-
}
|
|
245
|
-
getLinearValue(e) {
|
|
246
|
-
return this.validateInput(e), tt(e, this.min, this.max, this.min, this.max, this.curveAmount);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
class M extends A {
|
|
250
|
-
constructor(e, a) {
|
|
251
|
-
super(e, a);
|
|
252
|
-
}
|
|
253
|
-
getCurvedValue(e) {
|
|
254
|
-
return this.validateInput(e), e;
|
|
255
|
-
}
|
|
256
|
-
getLinearValue(e) {
|
|
257
|
-
return this.validateInput(e), e;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
const et = 3, at = 300, rt = w({
|
|
261
|
-
name: "VAAudioFileVisualizer",
|
|
262
|
-
data() {
|
|
263
|
-
return {
|
|
264
|
-
canvas: null,
|
|
265
|
-
canvasContext: null,
|
|
266
|
-
amplitudeData: new Float32Array(),
|
|
267
|
-
markerPosition: 0,
|
|
268
|
-
markerIndex: 0,
|
|
269
|
-
zoomWindowStartIndex: 0,
|
|
270
|
-
zoomWindowEndIndex: 0,
|
|
271
|
-
zoom: 1,
|
|
272
|
-
prevY: -1,
|
|
273
|
-
prevX: -1,
|
|
274
|
-
curedRange: new q(0, 1, 8)
|
|
275
|
-
// todo: adjust curve based on sample length?,
|
|
276
|
-
};
|
|
277
|
-
},
|
|
278
|
-
props: {
|
|
279
|
-
lineColor: {
|
|
280
|
-
required: !1,
|
|
281
|
-
type: String,
|
|
282
|
-
default: "white"
|
|
283
|
-
},
|
|
284
|
-
backgroundColor: {
|
|
285
|
-
required: !1,
|
|
286
|
-
type: String,
|
|
287
|
-
default: "black"
|
|
288
|
-
},
|
|
289
|
-
width: {
|
|
290
|
-
required: !1,
|
|
291
|
-
type: Number,
|
|
292
|
-
default: 800
|
|
293
|
-
},
|
|
294
|
-
height: {
|
|
295
|
-
required: !1,
|
|
296
|
-
type: Number,
|
|
297
|
-
default: -1
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
computed: {
|
|
301
|
-
cssVars() {
|
|
302
|
-
return {
|
|
303
|
-
"--line-color": `${this.lineColor}`,
|
|
304
|
-
"--background-color": `${this.backgroundColor}`
|
|
305
|
-
};
|
|
306
|
-
},
|
|
307
|
-
graphWidth() {
|
|
308
|
-
return this.width;
|
|
309
|
-
},
|
|
310
|
-
graphHeight() {
|
|
311
|
-
return this.width / et;
|
|
312
|
-
},
|
|
313
|
-
zoomMult() {
|
|
314
|
-
const t = this.curedRange.getCurvedValue(this.zoom);
|
|
315
|
-
return Math.max(t, 16 / this.amplitudeData.length);
|
|
316
|
-
},
|
|
317
|
-
zoomWindowLength() {
|
|
318
|
-
return this.zoomWindowEndIndex - this.zoomWindowStartIndex;
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
mounted() {
|
|
322
|
-
this.canvas = this.$refs.visualizer, this.canvasContext = this.canvas.getContext("2d");
|
|
323
|
-
},
|
|
324
|
-
methods: {
|
|
325
|
-
loadAudioFromAmplitudeData(t) {
|
|
326
|
-
this.amplitudeData = t, window.requestAnimationFrame(this.drawZoom);
|
|
327
|
-
},
|
|
328
|
-
shiftZoomWindow(t) {
|
|
329
|
-
this.zoomWindowStartIndex += t, this.zoomWindowEndIndex += t;
|
|
330
|
-
},
|
|
331
|
-
setZoomWindow() {
|
|
332
|
-
this.zoomWindowStartIndex = this.markerIndex - Math.round(this.amplitudeData.length * this.zoomMult / 2), this.zoomWindowEndIndex = this.markerIndex + Math.round(this.amplitudeData.length * this.zoomMult / 2);
|
|
333
|
-
const e = (this.graphWidth / 2 - this.markerPosition) / this.graphWidth, a = Math.round(
|
|
334
|
-
e * this.zoomWindowLength
|
|
335
|
-
);
|
|
336
|
-
this.shiftZoomWindow(a);
|
|
337
|
-
let r = 0;
|
|
338
|
-
r += this.zoomWindowStartIndex < 0 ? -this.zoomWindowStartIndex : 0, r += this.zoomWindowEndIndex > this.amplitudeData.length ? this.amplitudeData.length - this.zoomWindowEndIndex : 0, this.shiftZoomWindow(r);
|
|
339
|
-
},
|
|
340
|
-
drawZoom() {
|
|
341
|
-
this.setZoomWindow(), this.drawAmplitude();
|
|
342
|
-
},
|
|
343
|
-
getMaxSampleValue(t, e, a) {
|
|
344
|
-
let r = Number.MIN_VALUE;
|
|
345
|
-
for (let i = e; i < a; i++)
|
|
346
|
-
r = Math.max(r, t[i]);
|
|
347
|
-
return r;
|
|
348
|
-
},
|
|
349
|
-
getMinSampleValue(t, e, a) {
|
|
350
|
-
let r = Number.MAX_VALUE;
|
|
351
|
-
for (let i = e; i < a; i++)
|
|
352
|
-
r = Math.min(r, t[i]);
|
|
353
|
-
return r;
|
|
354
|
-
},
|
|
355
|
-
getAvgSampleValue(t, e, a) {
|
|
356
|
-
let r = 0;
|
|
357
|
-
for (let i = e; i < a; i++)
|
|
358
|
-
r += Math.abs(t[i]);
|
|
359
|
-
return r / (a - e);
|
|
360
|
-
},
|
|
361
|
-
drawAmplitudeSamples() {
|
|
362
|
-
const t = Math.max(
|
|
363
|
-
Math.ceil(this.zoomWindowLength / this.graphWidth),
|
|
364
|
-
1
|
|
365
|
-
), e = this.graphWidth / (this.zoomWindowEndIndex - this.zoomWindowStartIndex);
|
|
366
|
-
this.canvasContext?.clearRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.fillStyle = this.backgroundColor, this.canvasContext?.fillRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.strokeStyle = this.lineColor, this.canvasContext?.beginPath();
|
|
367
|
-
let a = 0, r = 0, i = 0;
|
|
368
|
-
for (let s = this.zoomWindowStartIndex; s < this.zoomWindowEndIndex; s += t)
|
|
369
|
-
i = this.amplitudeData[s], a = (s - this.zoomWindowStartIndex) * e, r = this.graphHeight - (this.graphHeight / 2 + i * this.graphHeight / 2), this.canvasContext?.lineTo(a, r);
|
|
370
|
-
this.canvasContext?.lineTo(this.graphWidth, this.graphHeight / 2), this.canvasContext?.stroke(), this.canvasContext?.beginPath(), this.canvasContext.strokeStyle = "red", this.canvasContext?.moveTo(this.markerPosition, 0), this.canvasContext?.lineTo(this.markerPosition, this.graphHeight), this.canvasContext?.stroke();
|
|
371
|
-
},
|
|
372
|
-
drawAmplitudeAvg() {
|
|
373
|
-
const t = Math.max(
|
|
374
|
-
Math.floor(this.zoomWindowLength / this.graphWidth),
|
|
375
|
-
1
|
|
376
|
-
);
|
|
377
|
-
this.canvasContext?.clearRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.fillStyle = this.backgroundColor, this.canvasContext?.fillRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.strokeStyle = this.lineColor, this.canvasContext?.beginPath();
|
|
378
|
-
let e = 0, a = 0, r = 0;
|
|
379
|
-
for (let i = 0; i < this.graphWidth; i++)
|
|
380
|
-
e = i, r = this.getAvgSampleValue(
|
|
381
|
-
this.amplitudeData,
|
|
382
|
-
this.zoomWindowStartIndex + i * t,
|
|
383
|
-
this.zoomWindowStartIndex + (i + 1) * t
|
|
384
|
-
), a = this.graphHeight - (this.graphHeight / 2 + r * this.graphHeight / 2), this.canvasContext?.moveTo(e, a), a = this.graphHeight - (this.graphHeight / 2 + -r * this.graphHeight / 2), this.canvasContext?.lineTo(e, a);
|
|
385
|
-
this.canvasContext?.lineTo(this.graphWidth, this.graphHeight / 2), this.canvasContext?.stroke(), this.canvasContext?.beginPath(), this.canvasContext.strokeStyle = "red", this.canvasContext?.moveTo(this.markerPosition, 0), this.canvasContext?.lineTo(this.markerPosition, this.graphHeight), this.canvasContext?.stroke();
|
|
386
|
-
},
|
|
387
|
-
drawAmplitudeMinMax() {
|
|
388
|
-
const t = Math.max(
|
|
389
|
-
Math.floor(this.zoomWindowLength / this.graphWidth),
|
|
390
|
-
1
|
|
391
|
-
);
|
|
392
|
-
this.canvasContext?.clearRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.fillStyle = this.backgroundColor, this.canvasContext?.fillRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.strokeStyle = this.lineColor, this.canvasContext?.beginPath();
|
|
393
|
-
let e = 0, a = 0, r = 0, i = 0;
|
|
394
|
-
for (let s = 0; s < this.graphWidth; s++)
|
|
395
|
-
e = s, r = this.getMinSampleValue(
|
|
396
|
-
this.amplitudeData,
|
|
397
|
-
this.zoomWindowStartIndex + s * t,
|
|
398
|
-
this.zoomWindowStartIndex + (s + 1) * t
|
|
399
|
-
), i = this.getMaxSampleValue(
|
|
400
|
-
this.amplitudeData,
|
|
401
|
-
this.zoomWindowStartIndex + s * t,
|
|
402
|
-
this.zoomWindowStartIndex + (s + 1) * t
|
|
403
|
-
), a = this.graphHeight - (this.graphHeight / 2 + r * this.graphHeight / 2), this.canvasContext?.moveTo(e, a), a = this.graphHeight - (this.graphHeight / 2 + i * this.graphHeight / 2), this.canvasContext?.lineTo(e, a);
|
|
404
|
-
this.canvasContext?.lineTo(this.graphWidth, this.graphHeight / 2), this.canvasContext?.stroke(), this.canvasContext?.beginPath(), this.canvasContext.strokeStyle = "red", this.canvasContext?.moveTo(this.markerPosition, 0), this.canvasContext?.lineTo(this.markerPosition, this.graphHeight), this.canvasContext?.stroke();
|
|
405
|
-
},
|
|
406
|
-
drawAmplitude() {
|
|
407
|
-
this.zoomWindowLength > this.graphWidth ? this.drawAmplitudeAvg() : this.drawAmplitudeSamples();
|
|
408
|
-
},
|
|
409
|
-
onCanvasDoubleClick() {
|
|
410
|
-
this.markerIndex = 0, this.markerPosition = 0, this.zoom = 1, this.zoomWindowStartIndex = 0, this.zoomWindowEndIndex = this.amplitudeData.length;
|
|
411
|
-
},
|
|
412
|
-
onCanvasMouseDown(t) {
|
|
413
|
-
document.getElementsByTagName("body")[0].classList.add("--no-text-select");
|
|
414
|
-
const e = this.canvas?.getBoundingClientRect()?.x, a = t.clientX - e;
|
|
415
|
-
this.markerIndex = Math.round(a / this.graphWidth * this.zoomWindowLength) + this.zoomWindowStartIndex, this.markerPosition = a, window.requestAnimationFrame(this.drawAmplitude), window.addEventListener("mousemove", this.onClickDrag), window.addEventListener("mouseup", this.endDrag);
|
|
416
|
-
},
|
|
417
|
-
endDrag() {
|
|
418
|
-
window.removeEventListener("mousemove", this.onClickDrag), this.prevY = -1, this.prevX = -1, document.getElementsByTagName("body")[0].classList.remove("--no-text-select");
|
|
419
|
-
},
|
|
420
|
-
onClickDrag(t) {
|
|
421
|
-
const e = t.pageY, a = t.pageX, r = a - this.prevX, i = e - this.prevY;
|
|
422
|
-
if (Math.abs(r) >= Math.abs(i)) {
|
|
423
|
-
if (this.prevX >= 0) {
|
|
424
|
-
let s = Math.round(
|
|
425
|
-
r / this.graphWidth * this.zoomWindowLength
|
|
426
|
-
);
|
|
427
|
-
const o = -this.zoomWindowStartIndex, h = this.amplitudeData.length - this.zoomWindowEndIndex;
|
|
428
|
-
s = z(s, o, h), this.shiftZoomWindow(-s), this.markerIndex -= s;
|
|
429
|
-
}
|
|
430
|
-
} else
|
|
431
|
-
this.prevY >= 0 && (this.zoom = z(this.zoom - i / at * 1, 0, 1), this.setZoomWindow());
|
|
432
|
-
this.markerPosition = Math.round(
|
|
433
|
-
(this.markerIndex - this.zoomWindowStartIndex) / this.zoomWindowLength * this.graphWidth
|
|
434
|
-
), window.requestAnimationFrame(this.drawAmplitude), this.prevY = e, this.prevX = a;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}), it = ["width", "height"];
|
|
438
|
-
function st(t, e, a, r, i, s) {
|
|
439
|
-
return c(), p(O, null, [
|
|
440
|
-
n("canvas", {
|
|
441
|
-
width: t.graphWidth,
|
|
442
|
-
height: t.graphHeight,
|
|
443
|
-
ref: "visualizer",
|
|
444
|
-
class: "visualizer-canvas",
|
|
445
|
-
style: S(t.cssVars),
|
|
446
|
-
onMousedown: e[0] || (e[0] = (...o) => t.onCanvasMouseDown && t.onCanvasMouseDown(...o)),
|
|
447
|
-
onDblclick: e[1] || (e[1] = (...o) => t.onCanvasDoubleClick && t.onCanvasDoubleClick(...o))
|
|
448
|
-
}, null, 44, it),
|
|
449
|
-
n("p", null, "zoom: " + m(t.zoom), 1),
|
|
450
|
-
n("p", null, "zoomWindowStartIndex: " + m(t.zoomWindowStartIndex), 1),
|
|
451
|
-
n("p", null, "zoomWindowEndIndex: " + m(t.zoomWindowEndIndex), 1),
|
|
452
|
-
n("p", null, "zoomWindowLength: " + m(t.zoomWindowLength), 1),
|
|
453
|
-
n("p", null, "totalSamples: " + m(t.amplitudeData.length), 1),
|
|
454
|
-
n("p", null, "markerIndex: " + m(t.markerIndex), 1),
|
|
455
|
-
n("p", null, "markerPosition: " + m(t.markerPosition), 1),
|
|
456
|
-
n("p", null, "graphWidth: " + m(t.graphWidth), 1),
|
|
457
|
-
n("p", null, " binSize: " + m(Math.max(Math.floor(t.zoomWindowLength / t.graphWidth), 1)), 1),
|
|
458
|
-
n("p", null, " binSize (raw): " + m(Math.max(t.zoomWindowLength / t.graphWidth, 1)), 1)
|
|
459
|
-
], 64);
|
|
460
|
-
}
|
|
461
|
-
const ot = /* @__PURE__ */ u(rt, [["render", st], ["__scopeId", "data-v-41d0c9ce"]]), nt = w({
|
|
462
|
-
name: "VADigitalMeterStereo",
|
|
463
|
-
props: {
|
|
464
|
-
leftInput: {
|
|
465
|
-
required: !1,
|
|
466
|
-
type: AudioNode
|
|
467
|
-
},
|
|
468
|
-
rightInput: {
|
|
469
|
-
required: !1,
|
|
470
|
-
type: AudioNode
|
|
471
|
-
},
|
|
472
|
-
type: {
|
|
473
|
-
required: !1,
|
|
474
|
-
type: String,
|
|
475
|
-
default: "peak"
|
|
476
|
-
},
|
|
477
|
-
fftSize: {
|
|
478
|
-
required: !1,
|
|
479
|
-
type: Number,
|
|
480
|
-
default: 2048
|
|
481
|
-
},
|
|
482
|
-
clippingColor: {
|
|
483
|
-
required: !1,
|
|
484
|
-
type: String,
|
|
485
|
-
default: "#e64a19"
|
|
486
|
-
},
|
|
487
|
-
barColor: {
|
|
488
|
-
required: !1,
|
|
489
|
-
type: String,
|
|
490
|
-
default: "#4caf50"
|
|
491
|
-
},
|
|
492
|
-
backgroundColor: {
|
|
493
|
-
required: !1,
|
|
494
|
-
type: String,
|
|
495
|
-
default: "#e0e0e0"
|
|
496
|
-
},
|
|
497
|
-
markerColor: {
|
|
498
|
-
required: !1,
|
|
499
|
-
type: String,
|
|
500
|
-
default: "gray"
|
|
501
|
-
},
|
|
502
|
-
drawMarkers: {
|
|
503
|
-
required: !1,
|
|
504
|
-
type: Boolean,
|
|
505
|
-
default: !1
|
|
506
|
-
},
|
|
507
|
-
height: {
|
|
508
|
-
required: !1,
|
|
509
|
-
type: Number,
|
|
510
|
-
default: 200
|
|
511
|
-
},
|
|
512
|
-
width: {
|
|
513
|
-
required: !1,
|
|
514
|
-
type: Number,
|
|
515
|
-
default: 20
|
|
516
|
-
},
|
|
517
|
-
font: {
|
|
518
|
-
required: !1,
|
|
519
|
-
type: String,
|
|
520
|
-
default: "Helvetica, sans-serif"
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}), ht = { class: "stereo-meter-container" };
|
|
524
|
-
function lt(t, e, a, r, i, s) {
|
|
525
|
-
const o = G("v-a-digital-meter");
|
|
526
|
-
return c(), p("div", ht, [
|
|
527
|
-
k(o, {
|
|
528
|
-
class: "meter-channel",
|
|
529
|
-
input: t.leftInput,
|
|
530
|
-
fftSize: t.fftSize,
|
|
531
|
-
type: t.type,
|
|
532
|
-
height: t.height,
|
|
533
|
-
width: t.width,
|
|
534
|
-
barColor: t.barColor,
|
|
535
|
-
backgroundColor: t.backgroundColor,
|
|
536
|
-
markerColor: t.markerColor,
|
|
537
|
-
font: t.font,
|
|
538
|
-
clippingColor: t.clippingColor,
|
|
539
|
-
drawMarkers: !1
|
|
540
|
-
}, null, 8, ["input", "fftSize", "type", "height", "width", "barColor", "backgroundColor", "markerColor", "font", "clippingColor"]),
|
|
541
|
-
k(o, {
|
|
542
|
-
class: "meter-channel",
|
|
543
|
-
input: t.rightInput,
|
|
544
|
-
fftSize: t.fftSize,
|
|
545
|
-
type: t.type,
|
|
546
|
-
height: t.height,
|
|
547
|
-
width: t.width,
|
|
548
|
-
barColor: t.barColor,
|
|
549
|
-
backgroundColor: t.backgroundColor,
|
|
550
|
-
markerColor: t.markerColor,
|
|
551
|
-
font: t.font,
|
|
552
|
-
clippingColor: t.clippingColor,
|
|
553
|
-
drawMarkers: t.drawMarkers
|
|
554
|
-
}, null, 8, ["input", "fftSize", "type", "height", "width", "barColor", "backgroundColor", "markerColor", "font", "clippingColor", "drawMarkers"])
|
|
555
|
-
]);
|
|
556
|
-
}
|
|
557
|
-
const dt = /* @__PURE__ */ u(nt, [["render", lt], ["__scopeId", "data-v-0ed3d04a"]]), v = 90, pt = new q(0, v, 2), ct = w({
|
|
558
|
-
name: "VADigitalMeter",
|
|
559
|
-
props: {
|
|
560
|
-
input: {
|
|
561
|
-
required: !1,
|
|
562
|
-
type: AudioNode,
|
|
563
|
-
default: void 0
|
|
564
|
-
},
|
|
565
|
-
type: {
|
|
566
|
-
required: !1,
|
|
567
|
-
type: String,
|
|
568
|
-
default: "peak"
|
|
569
|
-
},
|
|
570
|
-
fftSize: {
|
|
571
|
-
required: !1,
|
|
572
|
-
type: Number,
|
|
573
|
-
default: 2048
|
|
574
|
-
},
|
|
575
|
-
clippingColor: {
|
|
576
|
-
required: !1,
|
|
577
|
-
type: String,
|
|
578
|
-
default: "#e64a19"
|
|
579
|
-
},
|
|
580
|
-
barColor: {
|
|
581
|
-
required: !1,
|
|
582
|
-
type: String,
|
|
583
|
-
default: "#4caf50"
|
|
584
|
-
},
|
|
585
|
-
backgroundColor: {
|
|
586
|
-
required: !1,
|
|
587
|
-
type: String,
|
|
588
|
-
default: "#e0e0e0"
|
|
589
|
-
},
|
|
590
|
-
markerColor: {
|
|
591
|
-
required: !1,
|
|
592
|
-
type: String,
|
|
593
|
-
default: "gray"
|
|
594
|
-
},
|
|
595
|
-
drawMarkers: {
|
|
596
|
-
required: !1,
|
|
597
|
-
type: Boolean,
|
|
598
|
-
default: !1
|
|
599
|
-
},
|
|
600
|
-
height: {
|
|
601
|
-
required: !1,
|
|
602
|
-
type: Number,
|
|
603
|
-
default: 200
|
|
604
|
-
},
|
|
605
|
-
width: {
|
|
606
|
-
required: !1,
|
|
607
|
-
type: Number,
|
|
608
|
-
default: 20
|
|
609
|
-
},
|
|
610
|
-
font: {
|
|
611
|
-
required: !1,
|
|
612
|
-
type: String,
|
|
613
|
-
default: "Helvetica, sans-serif"
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
computed: {
|
|
617
|
-
canvasWidth() {
|
|
618
|
-
return this.width + (this.drawMarkers ? 30 : 0);
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
setup(t) {
|
|
622
|
-
const e = T(t.fftSize, t.input);
|
|
623
|
-
return W(() => t.input, e.onInputChanged), {
|
|
624
|
-
...e,
|
|
625
|
-
...P()
|
|
626
|
-
};
|
|
627
|
-
},
|
|
628
|
-
data() {
|
|
629
|
-
return {
|
|
630
|
-
canvasCxt: null
|
|
631
|
-
};
|
|
632
|
-
},
|
|
633
|
-
mounted() {
|
|
634
|
-
const t = this.$refs.meterCanvas;
|
|
635
|
-
this.canvasCxt = t.getContext("2d"), this.startRendering(this.draw);
|
|
636
|
-
},
|
|
637
|
-
methods: {
|
|
638
|
-
getMeterHeight(t) {
|
|
639
|
-
return this.height * ((v + t) / v) * (v / (v + 10));
|
|
640
|
-
},
|
|
641
|
-
scaleY(t) {
|
|
642
|
-
return pt.getCurvedValue(t + v) - v;
|
|
643
|
-
},
|
|
644
|
-
draw() {
|
|
645
|
-
if (this.canvasCxt) {
|
|
646
|
-
const t = this.getFloatTimeDomainData();
|
|
647
|
-
let e = -v;
|
|
648
|
-
this.type === "peak" && t ? e = this.getPeakDb(t) : this.type === "rms" && t && (e = this.getRmsDb(t));
|
|
649
|
-
const a = e > 0;
|
|
650
|
-
e = z(e, -v, 0);
|
|
651
|
-
const r = this.getMeterHeight(this.scaleY(e));
|
|
652
|
-
this.canvasCxt.clearRect(0, 0, this.canvasWidth, this.height), this.canvasCxt.fillStyle = this.backgroundColor, this.canvasCxt.beginPath(), this.canvasCxt.fillRect(0, 0, this.width, this.height), this.canvasCxt.stroke(), this.canvasCxt.fillStyle = a ? this.clippingColor : this.barColor, this.canvasCxt.beginPath(), this.canvasCxt.fillRect(
|
|
653
|
-
0,
|
|
654
|
-
this.height - r,
|
|
655
|
-
this.width,
|
|
656
|
-
r
|
|
657
|
-
), this.canvasCxt.stroke(), this.drawMarkers && this.drawDbMarkers();
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
|
-
drawDbMarkers() {
|
|
661
|
-
this.drawDbMarker(0), this.drawDbMarker(-10), this.drawDbMarker(-20), this.drawDbMarker(-30), this.drawDbMarker(-40), this.drawDbMarker(-60);
|
|
662
|
-
},
|
|
663
|
-
drawDbMarker(t) {
|
|
664
|
-
const e = this.height - this.getMeterHeight(this.scaleY(t)), a = this.width + 4;
|
|
665
|
-
this.canvasCxt.lineWidth = 1, this.canvasCxt.strokeStyle = this.markerColor, this.canvasCxt?.beginPath(), this.canvasCxt?.moveTo(a, e), this.canvasCxt?.lineTo(a + 4, e), this.canvasCxt?.stroke(), this.canvasCxt.font = `10px ${this.font}`, this.canvasCxt.fillStyle = this.markerColor, this.canvasCxt.fillText(`${Math.abs(t)}`, a + 8, e + 3);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}), ft = ["height", "width"];
|
|
669
|
-
function ut(t, e, a, r, i, s) {
|
|
670
|
-
return c(), p("canvas", {
|
|
671
|
-
class: "meter",
|
|
672
|
-
ref: "meterCanvas",
|
|
673
|
-
height: t.height,
|
|
674
|
-
width: t.canvasWidth
|
|
675
|
-
}, null, 8, ft);
|
|
676
|
-
}
|
|
677
|
-
const mt = /* @__PURE__ */ u(ct, [["render", ut]]), gt = {}, yt = {
|
|
678
|
-
version: "1.1",
|
|
679
|
-
viewBox: "0 0 62.143 129.29",
|
|
680
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
681
|
-
width: "27"
|
|
682
|
-
};
|
|
683
|
-
function xt(t, e) {
|
|
684
|
-
return c(), p("svg", yt, [...e[0] || (e[0] = [
|
|
685
|
-
V('<defs><filter id="filter4165" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-1" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-4" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><linearGradient id="linearGradient7341" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(406.7,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7468" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(203.35,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7595" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(0,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7698" x1="87.866" x2="87.866" y1="516.83" y2="528.75" gradientTransform="matrix(1.0278,0,0,1,582.85,121.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#999" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7700" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0235,0,0,1,37.712,-1157.9)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7702" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .50643 51.792 414.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7704" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .42746 51.792 466.71)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7706" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .26952 51.792 554.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7708" x1="87.866" x2="87.866" y1="516.83" y2="521.42" gradientTransform="matrix(1.0364 0 0 .96441 581.97 -1263.8)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#333" offset="1"></stop></linearGradient><linearGradient id="linearGradient7710" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0364 0 0 .96441 29.714 -1226.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7712" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0274 0 0 .48841 35.581 -982.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7714" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0213 0 0 .41225 39.183 -932.97)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7716" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0122 0 0 .25993 44.587 -848)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient></defs><g transform="translate(-642.36 -637.36)"><rect x="642.36" y="637.36" width="62.143" height="129.29" rx="3" ry="3" fill="#4d4d4d"></rect><rect x="643.3" y="701.75" width="60.419" height="3.5355" fill="#e6e6e6"></rect><rect x="643.05" y="638.08" width="60.613" height="21.071" rx="2.1483" ry="2" fill="url(#linearGradient7698)"></rect><rect x="643.25" y="689.59" width="58.811" height="10.119" fill="#333"></rect><rect x="642.36" y="680.23" width="61.133" height="8.7929" fill="#333"></rect><rect x="642.36" y="661.81" width="61.133" height="4.5457" fill="#1a1a1a"></rect><rect x="642.36" y="667.58" width="61.133" height="11.364" fill="#1a1a1a"></rect><rect transform="scale(1,-1)" x="643.05" y="-661.09" width="60.012" height="2.2612" rx="1.0235" ry=".63958" fill="url(#linearGradient7700)"></rect><rect x="643.22" y="666.37" width="58.633" height="1.1452" rx="1" ry=".3239" fill="url(#linearGradient7702)"></rect><rect x="643.22" y="679.09" width="58.633" height=".9666" rx="1" ry=".2734" fill="url(#linearGradient7704)"></rect><rect x="643.22" y="688.34" width="58.633" height=".60946" rx="1" ry=".17238" fill="url(#linearGradient7706)"></rect><rect transform="scale(1,-1)" x="642.67" y="-765.57" width="61.118" height="20.321" rx="2.1662" ry="1.9288" fill="url(#linearGradient7708)"></rect><rect transform="scale(1,-1)" x="643.25" y="-717.26" width="58.811" height="9.7593" fill="#333"></rect><rect transform="scale(1,-1)" x="642.36" y="-726.3" width="61.133" height="8.4799" fill="#666"></rect><rect transform="scale(1,-1)" x="642.36" y="-744.06" width="61.133" height="4.3839" fill="#808080"></rect><rect transform="scale(1,-1)" x="642.36" y="-738.49" width="61.133" height="10.96" fill="#808080"></rect><rect transform="scale(1,-1)" x="642.67" y="-746.93" width="60.767" height="2.1808" rx="1.0364" ry=".61681" fill="url(#linearGradient7710)"></rect><rect transform="scale(1,-1)" x="643.22" y="-740.17" width="60.24" height="1.1044" rx="1.0274" ry=".31237" fill="url(#linearGradient7712)"></rect><rect transform="scale(1,-1)" x="643.22" y="-728.15" width="59.883" height=".9322" rx="1.0213" ry=".26366" fill="url(#linearGradient7714)"></rect><rect transform="scale(1,-1)" x="643.22" y="-718.85" width="59.347" height=".58776" rx="1.0122" ry=".16624" fill="url(#linearGradient7716)"></rect></g>', 2)
|
|
686
|
-
])]);
|
|
687
|
-
}
|
|
688
|
-
const vt = /* @__PURE__ */ u(gt, [["render", xt]]), wt = {}, kt = {
|
|
689
|
-
version: "1.1",
|
|
690
|
-
viewBox: "0 0 104 460",
|
|
691
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
692
|
-
};
|
|
693
|
-
function bt(t, e) {
|
|
694
|
-
return c(), p("svg", kt, [...e[0] || (e[0] = [
|
|
695
|
-
V('<defs><filter id="filter4165" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-1" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-4" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><linearGradient id="linearGradient7341" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(406.7,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7468" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(203.35,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7595" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(0,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7698" x1="87.866" x2="87.866" y1="516.83" y2="528.75" gradientTransform="matrix(1.0278,0,0,1,582.85,121.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#999" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7700" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0235,0,0,1,37.712,-1157.9)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7702" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .50643 51.792 414.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7704" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .42746 51.792 466.71)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7706" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .26952 51.792 554.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7708" x1="87.866" x2="87.866" y1="516.83" y2="521.42" gradientTransform="matrix(1.0364 0 0 .96441 581.97 -1263.8)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#333" offset="1"></stop></linearGradient><linearGradient id="linearGradient7710" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0364 0 0 .96441 29.714 -1226.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7712" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0274 0 0 .48841 35.581 -982.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7714" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0213 0 0 .41225 39.183 -932.97)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7716" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0122 0 0 .25993 44.587 -848)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7718" x1="87.866" x2="87.866" y1="516.83" y2="528.75" gradientTransform="matrix(1.0278,0,0,1,787.52,-27.904)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#999" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7720" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0235,0,0,1,242.38,-1008.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7722" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .50643 256.46 265.42)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7724" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .42746 256.46 317.38)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7726" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .26952 256.46 405.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7728" x1="87.866" x2="87.866" y1="516.83" y2="521.42" gradientTransform="matrix(1.0364 0 0 .96441 786.64 -1114.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#333" offset="1"></stop></linearGradient><linearGradient id="linearGradient7730" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0364 0 0 .96441 234.39 -1076.7)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7732" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0274 0 0 .48841 240.25 -833.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7734" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0213 0 0 .41225 243.85 -783.64)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7736" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0122 0 0 .25993 249.26 -698.66)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7738" x1="87.866" x2="87.866" y1="516.83" y2="528.75" gradientTransform="matrix(1.0278,0,0,1,989.55,-112.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#999" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7740" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0235,0,0,1,444.41,-923.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7742" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .50643 458.49 180.57)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7744" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .42746 458.49 232.53)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7746" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .26952 458.49 320.25)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7748" x1="87.866" x2="87.866" y1="516.83" y2="521.42" gradientTransform="matrix(1.0364 0 0 .96441 988.67 -1029.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#333" offset="1"></stop></linearGradient><linearGradient id="linearGradient7750" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0364 0 0 .96441 436.42 -991.9)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7752" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0274 0 0 .48841 442.28 -748.65)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7754" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0213 0 0 .41225 445.88 -698.79)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7756" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0122 0 0 .25993 451.29 -613.82)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><clipPath id="clipPath1318"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1322"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1326"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1330"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1334"><rect x="211.98" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1338"><rect x="620" y="321.05" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1342"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1346"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1350"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1354"><rect x="415.33" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1358"><rect x="415.33" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1362"><rect x="618.68" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1366"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1370"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1374"><rect x="618.68" y="336.2" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1378"><rect x="618.68" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath><clipPath id="clipPath1382"><rect x="618.68" y="350.38" width="107.89" height="491.49" rx="1" ry="112.86" fill="#0d0000" fill-opacity=".14859" stroke-opacity="0" style="paint-order:fill markers stroke;"></rect></clipPath></defs><g transform="translate(-621.34 -349.25)"><g transform="translate(0,-14.18)" clip-path="url(#clipPath1382)" fill="#b3b3b3"><g stroke="#b4b4b4" stroke-linecap="round"><g stroke-width="2.2535"><path d="m686.4 383.13h34.461"></path><path d="m686.4 434.78h34.461"></path><path d="m686.4 602.64h34.461"></path><path d="m686.4 654.29h34.461"></path><path d="m686.4 705.94h34.461"></path><path d="m686.4 757.59h34.461"></path><path d="m686.4 809.24h34.461"></path></g><g stroke-width="1.4468"><path d="m707.72 396.04h13.549"></path><path d="m707.72 408.95h13.549"></path><path d="m707.72 421.86h13.549"></path><path d="m707.72 447.69h13.549"></path><path d="m707.72 460.6h13.549"></path><path d="m707.72 473.51h13.549"></path><path d="m707.72 615.55h13.549"></path><path d="m707.72 628.46h13.549"></path><path d="m707.72 641.38h13.549"></path><path d="m707.72 667.2h13.549"></path><path d="m707.72 680.11h13.549"></path><path d="m707.72 693.03h13.549"></path><path d="m707.72 718.85h13.549"></path><path d="m707.72 731.76h13.549"></path><path d="m707.72 744.68h13.549"></path><path d="m707.72 770.5h13.549"></path><path d="m707.72 783.41h13.549"></path></g><path d="m686.4 538.08h34.461" stroke-width="2.2535"></path><g stroke-width="1.4468"><path d="m707.72 563.9h13.549"></path><path d="m707.72 576.81h13.549"></path><path d="m707.72 589.73h13.549"></path><path d="m707.72 499.34h13.549"></path><path d="m707.72 512.25h13.549"></path><path d="m707.72 525.16h13.549"></path></g></g><g font-family="Sawasdee" font-size="20px" letter-spacing="0px" word-spacing="0px"><text x="732.51788" y="816.73883" style="line-height:125%;" xml:space="preserve"><tspan x="732.51788" y="816.73883">60</tspan></text><text x="732.48859" y="764.85846" style="line-height:125%;" xml:space="preserve"><tspan x="732.48859" y="764.85846">50</tspan></text><text x="732.9671" y="713.24292" style="line-height:125%;" xml:space="preserve"><tspan x="732.9671" y="713.24292">40</tspan></text><text x="732.29816" y="661.56879" style="line-height:125%;" xml:space="preserve"><tspan x="732.29816" y="661.56879">30</tspan></text><text x="732.47394" y="609.91901" style="line-height:125%;" xml:space="preserve"><tspan x="732.47394" y="609.91901">20</tspan></text><text x="731.29718" y="545.35681" style="line-height:125%;" xml:space="preserve"><tspan x="731.29718" y="545.35681">10</tspan></text><text x="738.29425" y="493.71683" style="line-height:125%;" xml:space="preserve"><tspan x="738.29425" y="493.71683">0</tspan></text><text x="738.29913" y="441.98407" style="line-height:125%;" xml:space="preserve"><tspan x="738.29913" y="441.98407">5</tspan></text><text x="731.29718" y="390.41727" style="line-height:125%;" xml:space="preserve"><tspan x="731.29718" y="390.41727">10</tspan></text></g><path d="m708.23 796.33h13.549" stroke="#b4b4b4" stroke-linecap="round" stroke-width="1.4468"></path><g transform="translate(0,3.0785)" stroke="#b4b4b4" stroke-linecap="round"><path d="m657.43 380.16h-34.461" stroke-width="2.2535"></path><path d="m657.43 431.81h-34.461" stroke-width="2.2535"></path><path d="m658.06 483.46h-34.461" stroke-width="3.5"></path><g stroke-width="2.2535"><path d="m657.43 599.68h-34.461"></path><path d="m657.43 651.33h-34.461"></path><path d="m657.43 702.98h-34.461"></path><path d="m657.43 754.62h-34.461"></path><path d="m657.43 806.27h-34.461"></path></g><g stroke-width="1.4468"><path d="m636.12 393.08h-13.549"></path><path d="m636.12 405.99h-13.549"></path><path d="m636.12 418.9h-13.549"></path><path d="m636.12 444.73h-13.549"></path><path d="m636.12 457.64h-13.549"></path><path d="m636.12 470.55h-13.549"></path><path d="m636.12 612.59h-13.549"></path><path d="m636.12 625.5h-13.549"></path><path d="m636.12 638.41h-13.549"></path><path d="m636.12 664.24h-13.549"></path><path d="m636.12 677.15h-13.549"></path><path d="m636.12 690.06h-13.549"></path><path d="m636.12 715.89h-13.549"></path><path d="m636.12 728.8h-13.549"></path><path d="m636.12 741.71h-13.549"></path><path d="m636.12 767.54h-13.549"></path><path d="m636.12 780.45h-13.549"></path></g><path d="m657.43 535.11h-34.461" stroke-width="2.2535"></path><g stroke-width="1.4468"><path d="m636.12 560.94h-13.549"></path><path d="m636.12 573.85h-13.549"></path><path d="m636.12 586.76h-13.549"></path><path d="m636.12 496.38h-13.549"></path><path d="m636.12 509.29h-13.549"></path><path d="m636.12 522.2h-13.549"></path><path d="m635.61 793.36h-13.549"></path></g></g></g><g transform="translate(0,-14.18)" clip-path="url(#clipPath1378)" stroke-linecap="round"><path d="m673.43 370.93v445.71" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m673.43 370.93v445.71" fill="#454545" stroke="#494949" stroke-width="14.545"></path><path d="m673.43 370.93v445.71" fill="#585858" stroke="#515151" stroke-width="14.091"></path><path d="m673.43 370.93v445.71" fill="#6a6a6a" stroke="#595959" stroke-width="13.636"></path><path d="m673.43 370.93v445.71" fill="#7d7d7d" stroke="#616161" stroke-width="13.182"></path><path d="m673.43 370.93v445.71" fill="#8f8f8f" stroke="#696969" stroke-width="12.727"></path><path d="m673.43 370.93v445.71" fill="#a2a2a2" stroke="#717171" stroke-width="12.273"></path><path d="m673.43 370.93v445.71" fill="#b4b4b4" stroke="#797979" stroke-width="11.818"></path><path d="m673.43 370.93v445.71" fill="#c7c7c7" stroke="#818181" stroke-width="11.364"></path><path d="m673.43 370.93v445.71" fill="#d9d9d9" stroke="#898989" stroke-width="10.909"></path><path d="m673.43 370.93v445.71" fill="#ececec" stroke="#919191" stroke-width="10.455"></path><path d="m673.43 370.93v445.71" fill="#fff" stroke="#9a9a9a" stroke-width="10"></path></g><g stroke-linecap="round"><path d="m673.43 356.75v445.71" clip-path="url(#clipPath1374)" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m679.64 802.47v-445.18" clip-path="url(#clipPath1370)" fill="#999" stroke="#b1b1b1" stroke-width=".6"></path><path d="m673.43 356.75v445.71" clip-path="url(#clipPath1366)" fill="#fff" opacity=".50896" stroke="url(#linearGradient7595)" stroke-width="12"></path></g><g transform="translate(203.35,-14.18)" clip-path="url(#clipPath1358)" fill="#b3b3b3"><g stroke="#b4b4b4" stroke-linecap="round"><g stroke-width="2.2535"><path d="m686.4 383.13h34.461"></path><path d="m686.4 434.78h34.461"></path><path d="m686.4 602.64h34.461"></path><path d="m686.4 654.29h34.461"></path><path d="m686.4 705.94h34.461"></path><path d="m686.4 757.59h34.461"></path><path d="m686.4 809.24h34.461"></path></g><g stroke-width="1.4468"><path d="m707.72 396.04h13.549"></path><path d="m707.72 408.95h13.549"></path><path d="m707.72 421.86h13.549"></path><path d="m707.72 447.69h13.549"></path><path d="m707.72 460.6h13.549"></path><path d="m707.72 473.51h13.549"></path><path d="m707.72 615.55h13.549"></path><path d="m707.72 628.46h13.549"></path><path d="m707.72 641.38h13.549"></path><path d="m707.72 667.2h13.549"></path><path d="m707.72 680.11h13.549"></path><path d="m707.72 693.03h13.549"></path><path d="m707.72 718.85h13.549"></path><path d="m707.72 731.76h13.549"></path><path d="m707.72 744.68h13.549"></path><path d="m707.72 770.5h13.549"></path><path d="m707.72 783.41h13.549"></path></g><path d="m686.4 538.08h34.461" stroke-width="2.2535"></path><g stroke-width="1.4468"><path d="m707.72 563.9h13.549"></path><path d="m707.72 576.81h13.549"></path><path d="m707.72 589.73h13.549"></path><path d="m707.72 499.34h13.549"></path><path d="m707.72 512.25h13.549"></path><path d="m707.72 525.16h13.549"></path></g></g><g font-family="Sawasdee" font-size="20px" letter-spacing="0px" word-spacing="0px"><text x="732.51788" y="816.73883" style="line-height:125%;" xml:space="preserve"><tspan x="732.51788" y="816.73883">60</tspan></text><text x="732.48859" y="764.85846" style="line-height:125%;" xml:space="preserve"><tspan x="732.48859" y="764.85846">50</tspan></text><text x="732.9671" y="713.24292" style="line-height:125%;" xml:space="preserve"><tspan x="732.9671" y="713.24292">40</tspan></text><text x="732.29816" y="661.56879" style="line-height:125%;" xml:space="preserve"><tspan x="732.29816" y="661.56879">30</tspan></text><text x="732.47394" y="609.91901" style="line-height:125%;" xml:space="preserve"><tspan x="732.47394" y="609.91901">20</tspan></text><text x="731.29718" y="545.35681" style="line-height:125%;" xml:space="preserve"><tspan x="731.29718" y="545.35681">10</tspan></text><text x="738.29425" y="493.71683" style="line-height:125%;" xml:space="preserve"><tspan x="738.29425" y="493.71683">0</tspan></text><text x="738.29913" y="441.98407" style="line-height:125%;" xml:space="preserve"><tspan x="738.29913" y="441.98407">5</tspan></text><text x="731.29718" y="390.41727" style="line-height:125%;" xml:space="preserve"><tspan x="731.29718" y="390.41727">10</tspan></text></g><path d="m708.23 796.33h13.549" stroke="#b4b4b4" stroke-linecap="round" stroke-width="1.4468"></path><g transform="translate(0,3.0785)" stroke="#b4b4b4" stroke-linecap="round"><path d="m657.43 380.16h-34.461" stroke-width="2.2535"></path><path d="m657.43 431.81h-34.461" stroke-width="2.2535"></path><path d="m658.06 483.46h-34.461" stroke-width="3.5"></path><g stroke-width="2.2535"><path d="m657.43 599.68h-34.461"></path><path d="m657.43 651.33h-34.461"></path><path d="m657.43 702.98h-34.461"></path><path d="m657.43 754.62h-34.461"></path><path d="m657.43 806.27h-34.461"></path></g><g stroke-width="1.4468"><path d="m636.12 393.08h-13.549"></path><path d="m636.12 405.99h-13.549"></path><path d="m636.12 418.9h-13.549"></path><path d="m636.12 444.73h-13.549"></path><path d="m636.12 457.64h-13.549"></path><path d="m636.12 470.55h-13.549"></path><path d="m636.12 612.59h-13.549"></path><path d="m636.12 625.5h-13.549"></path><path d="m636.12 638.41h-13.549"></path><path d="m636.12 664.24h-13.549"></path><path d="m636.12 677.15h-13.549"></path><path d="m636.12 690.06h-13.549"></path><path d="m636.12 715.89h-13.549"></path><path d="m636.12 728.8h-13.549"></path><path d="m636.12 741.71h-13.549"></path><path d="m636.12 767.54h-13.549"></path><path d="m636.12 780.45h-13.549"></path></g><path d="m657.43 535.11h-34.461" stroke-width="2.2535"></path><g stroke-width="1.4468"><path d="m636.12 560.94h-13.549"></path><path d="m636.12 573.85h-13.549"></path><path d="m636.12 586.76h-13.549"></path><path d="m636.12 496.38h-13.549"></path><path d="m636.12 509.29h-13.549"></path><path d="m636.12 522.2h-13.549"></path><path d="m635.61 793.36h-13.549"></path></g></g></g><g transform="translate(203.35,-14.18)" clip-path="url(#clipPath1354)" stroke-linecap="round"><path d="m673.43 370.93v445.71" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m673.43 370.93v445.71" fill="#454545" stroke="#494949" stroke-width="14.545"></path><path d="m673.43 370.93v445.71" fill="#585858" stroke="#515151" stroke-width="14.091"></path><path d="m673.43 370.93v445.71" fill="#6a6a6a" stroke="#595959" stroke-width="13.636"></path><path d="m673.43 370.93v445.71" fill="#7d7d7d" stroke="#616161" stroke-width="13.182"></path><path d="m673.43 370.93v445.71" fill="#8f8f8f" stroke="#696969" stroke-width="12.727"></path><path d="m673.43 370.93v445.71" fill="#a2a2a2" stroke="#717171" stroke-width="12.273"></path><path d="m673.43 370.93v445.71" fill="#b4b4b4" stroke="#797979" stroke-width="11.818"></path><path d="m673.43 370.93v445.71" fill="#c7c7c7" stroke="#818181" stroke-width="11.364"></path><path d="m673.43 370.93v445.71" fill="#d9d9d9" stroke="#898989" stroke-width="10.909"></path><path d="m673.43 370.93v445.71" fill="#ececec" stroke="#919191" stroke-width="10.455"></path><path d="m673.43 370.93v445.71" fill="#fff" stroke="#9a9a9a" stroke-width="10"></path></g><g stroke-linecap="round"><path d="m876.78 356.75v445.71" clip-path="url(#clipPath1350)" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m882.99 802.47v-445.18" clip-path="url(#clipPath1346)" fill="#999" stroke="#b1b1b1" stroke-width=".6"></path><path d="m876.78 356.75v445.71" clip-path="url(#clipPath1342)" fill="#fff" opacity=".50896" stroke="url(#linearGradient7468)" stroke-width="12"></path></g><g transform="translate(-1.3202,15.152)" clip-path="url(#clipPath1338)"><path transform="matrix(.53231 0 0 .99811 560.96 12.701)" d="m649.84 478.85v126.27l31.315-18.94s-35.355-47.982 0-83.338c-27.779-21.466-31.315-23.991-31.315-23.991z" fill="#a1a1a1" filter="url(#filter4165-1)"></path><path d="m890.45 497.09h34.461" fill="#e6e6e6" stroke="#b4b4b4" stroke-linecap="round" stroke-width="3.5"></path><rect x="847.03" y="488.03" width="62.143" height="129.29" rx="3" ry="3" fill="#4d4d4d"></rect><rect x="847.97" y="552.42" width="60.419" height="3.5355" fill="#e6e6e6"></rect><rect x="847.72" y="488.74" width="60.613" height="21.071" rx="2.1483" ry="2" fill="url(#linearGradient7718)"></rect><rect x="847.92" y="540.26" width="58.811" height="10.119" fill="#333"></rect><rect x="847.03" y="530.89" width="61.133" height="8.7929" fill="#333"></rect><rect x="847.03" y="512.48" width="61.133" height="4.5457" fill="#1a1a1a"></rect><rect x="847.03" y="518.25" width="61.133" height="11.364" fill="#1a1a1a"></rect><rect transform="scale(1,-1)" x="847.72" y="-511.76" width="60.012" height="2.2612" rx="1.0235" ry=".63958" fill="url(#linearGradient7720)"></rect><rect x="847.89" y="517.03" width="58.633" height="1.1452" rx="1" ry=".3239" fill="url(#linearGradient7722)"></rect><rect x="847.89" y="529.76" width="58.633" height=".9666" rx="1" ry=".2734" fill="url(#linearGradient7724)"></rect><rect x="847.89" y="539.01" width="58.633" height=".60946" rx="1" ry=".17238" fill="url(#linearGradient7726)"></rect><rect transform="scale(1,-1)" x="847.34" y="-616.24" width="61.118" height="20.321" rx="2.1662" ry="1.9288" fill="url(#linearGradient7728)"></rect><rect transform="scale(1,-1)" x="847.92" y="-567.93" width="58.811" height="9.7593" fill="#333"></rect><rect transform="scale(1,-1)" x="847.03" y="-576.96" width="61.133" height="8.4799" fill="#666"></rect><rect transform="scale(1,-1)" x="847.03" y="-594.72" width="61.133" height="4.3839" fill="#808080"></rect><rect transform="scale(1,-1)" x="847.03" y="-589.16" width="61.133" height="10.96" fill="#808080"></rect><rect transform="scale(1,-1)" x="847.34" y="-597.6" width="60.767" height="2.1808" rx="1.0364" ry=".61681" fill="url(#linearGradient7730)"></rect><rect transform="scale(1,-1)" x="847.89" y="-590.84" width="60.24" height="1.1044" rx="1.0274" ry=".31237" fill="url(#linearGradient7732)"></rect><rect transform="scale(1,-1)" x="847.89" y="-578.82" width="59.883" height=".9322" rx="1.0213" ry=".26366" fill="url(#linearGradient7734)"></rect><rect transform="scale(1,-1)" x="847.89" y="-569.52" width="59.347" height=".58776" rx="1.0122" ry=".16624" fill="url(#linearGradient7736)"></rect></g><g transform="translate(406.7,-14.18)" clip-path="url(#clipPath1334)" stroke-linecap="round"><path d="m673.43 370.93v445.71" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m673.43 370.93v445.71" fill="#454545" stroke="#494949" stroke-width="14.545"></path><path d="m673.43 370.93v445.71" fill="#585858" stroke="#515151" stroke-width="14.091"></path><path d="m673.43 370.93v445.71" fill="#6a6a6a" stroke="#595959" stroke-width="13.636"></path><path d="m673.43 370.93v445.71" fill="#7d7d7d" stroke="#616161" stroke-width="13.182"></path><path d="m673.43 370.93v445.71" fill="#8f8f8f" stroke="#696969" stroke-width="12.727"></path><path d="m673.43 370.93v445.71" fill="#a2a2a2" stroke="#717171" stroke-width="12.273"></path><path d="m673.43 370.93v445.71" fill="#b4b4b4" stroke="#797979" stroke-width="11.818"></path><path d="m673.43 370.93v445.71" fill="#c7c7c7" stroke="#818181" stroke-width="11.364"></path><path d="m673.43 370.93v445.71" fill="#d9d9d9" stroke="#898989" stroke-width="10.909"></path><path d="m673.43 370.93v445.71" fill="#ececec" stroke="#919191" stroke-width="10.455"></path><path d="m673.43 370.93v445.71" fill="#fff" stroke="#9a9a9a" stroke-width="10"></path></g><g stroke-linecap="round"><path d="m1080.1 356.75v445.71" clip-path="url(#clipPath1330)" fill="#333" stroke="#414141" stroke-width="15"></path><path d="m1086.3 802.47v-445.18" clip-path="url(#clipPath1326)" fill="#999" stroke="#b1b1b1" stroke-width=".6"></path><path d="m1080.1 356.75v445.71" clip-path="url(#clipPath1322)" fill="#fff" opacity=".50896" stroke="url(#linearGradient7341)" stroke-width="12"></path></g><g clip-path="url(#clipPath1318)"><path transform="matrix(.53231 0 0 .99811 762.99 -72.147)" d="m649.84 478.85v126.27l31.315-18.94s-35.355-47.982 0-83.338c-27.779-21.466-31.315-23.991-31.315-23.991z" fill="#a1a1a1" filter="url(#filter4165-4)"></path><path d="m1092.5 412.25h34.461" fill="#e6e6e6" stroke="#b4b4b4" stroke-linecap="round" stroke-width="3.5"></path><rect x="1049.1" y="403.18" width="62.143" height="129.29" rx="3" ry="3" fill="#4d4d4d"></rect><rect x="1050" y="467.57" width="60.419" height="3.5355" fill="#e6e6e6"></rect><rect x="1049.8" y="403.9" width="60.613" height="21.071" rx="2.1483" ry="2" fill="url(#linearGradient7738)"></rect><rect x="1050" y="455.41" width="58.811" height="10.119" fill="#333"></rect><rect x="1049.1" y="446.05" width="61.133" height="8.7929" fill="#333"></rect><rect x="1049.1" y="427.63" width="61.133" height="4.5457" fill="#1a1a1a"></rect><rect x="1049.1" y="433.4" width="61.133" height="11.364" fill="#1a1a1a"></rect><rect transform="scale(1,-1)" x="1049.8" y="-426.91" width="60.012" height="2.2612" rx="1.0235" ry=".63958" fill="url(#linearGradient7740)"></rect><rect x="1049.9" y="432.19" width="58.633" height="1.1452" rx="1" ry=".3239" fill="url(#linearGradient7742)"></rect><rect x="1049.9" y="444.91" width="58.633" height=".9666" rx="1" ry=".2734" fill="url(#linearGradient7744)"></rect><rect x="1049.9" y="454.16" width="58.633" height=".60946" rx="1" ry=".17238" fill="url(#linearGradient7746)"></rect><rect transform="scale(1,-1)" x="1049.4" y="-531.39" width="61.118" height="20.321" rx="2.1662" ry="1.9288" fill="url(#linearGradient7748)"></rect><rect transform="scale(1,-1)" x="1050" y="-483.08" width="58.811" height="9.7593" fill="#333"></rect><rect transform="scale(1,-1)" x="1049.1" y="-492.12" width="61.133" height="8.4799" fill="#666"></rect><rect transform="scale(1,-1)" x="1049.1" y="-509.88" width="61.133" height="4.3839" fill="#808080"></rect><rect transform="scale(1,-1)" x="1049.1" y="-504.31" width="61.133" height="10.96" fill="#808080"></rect><rect transform="scale(1,-1)" x="1049.4" y="-512.75" width="60.767" height="2.1808" rx="1.0364" ry=".61681" fill="url(#linearGradient7750)"></rect><rect transform="scale(1,-1)" x="1049.9" y="-505.99" width="60.24" height="1.1044" rx="1.0274" ry=".31237" fill="url(#linearGradient7752)"></rect><rect transform="scale(1,-1)" x="1049.9" y="-493.97" width="59.883" height=".9322" rx="1.0213" ry=".26366" fill="url(#linearGradient7754)"></rect><rect transform="scale(1,-1)" x="1049.9" y="-484.67" width="59.347" height=".58776" rx="1.0122" ry=".16624" fill="url(#linearGradient7756)"></rect></g></g>', 2)
|
|
696
|
-
])]);
|
|
697
|
-
}
|
|
698
|
-
const Ct = /* @__PURE__ */ u(wt, [["render", bt]]), Gt = w({
|
|
699
|
-
name: "VAFader",
|
|
700
|
-
components: {
|
|
701
|
-
defaultFaderHead: vt,
|
|
702
|
-
defaultFaderBackground: Ct
|
|
703
|
-
},
|
|
704
|
-
emits: ["update:modelValue"],
|
|
705
|
-
setup(t) {
|
|
706
|
-
const e = y(new M(t.minValue, t.maxValue)), a = y(0), r = y(t.modelValue), i = y(e.value.getCurvedValue(t.modelValue)), s = y(0), o = y(void 0);
|
|
707
|
-
return {
|
|
708
|
-
valueCurve: e,
|
|
709
|
-
faderContainerY: a,
|
|
710
|
-
linearValue: r,
|
|
711
|
-
curvedValue: i,
|
|
712
|
-
// faderContainer,
|
|
713
|
-
// faderBackground,
|
|
714
|
-
// faderHead,
|
|
715
|
-
faderHeadHeight: s,
|
|
716
|
-
resizeObserver: o
|
|
717
|
-
};
|
|
718
|
-
},
|
|
719
|
-
props: {
|
|
720
|
-
modelValue: {
|
|
721
|
-
required: !0,
|
|
722
|
-
type: Number
|
|
723
|
-
},
|
|
724
|
-
minValue: {
|
|
725
|
-
required: !0,
|
|
726
|
-
type: Number
|
|
727
|
-
},
|
|
728
|
-
maxValue: {
|
|
729
|
-
required: !0,
|
|
730
|
-
type: Number
|
|
731
|
-
},
|
|
732
|
-
height: {
|
|
733
|
-
required: !1,
|
|
734
|
-
type: Number,
|
|
735
|
-
default: 200
|
|
736
|
-
},
|
|
737
|
-
width: {
|
|
738
|
-
required: !1,
|
|
739
|
-
type: Number,
|
|
740
|
-
default: 46
|
|
741
|
-
},
|
|
742
|
-
default: {
|
|
743
|
-
required: !1,
|
|
744
|
-
type: Number
|
|
745
|
-
}
|
|
746
|
-
},
|
|
747
|
-
computed: {
|
|
748
|
-
midValue() {
|
|
749
|
-
return this.minValue + this.valueRange / 2;
|
|
750
|
-
},
|
|
751
|
-
valueRange() {
|
|
752
|
-
return this.maxValue - this.minValue;
|
|
753
|
-
},
|
|
754
|
-
faderDragRange() {
|
|
755
|
-
return Math.abs(this.height - this.faderHeadHeight);
|
|
756
|
-
},
|
|
757
|
-
faderHeadTop() {
|
|
758
|
-
const t = (this.linearValue - this.minValue) / (this.maxValue - this.minValue);
|
|
759
|
-
return this.faderDragRange - t * this.faderDragRange;
|
|
760
|
-
},
|
|
761
|
-
cssVars() {
|
|
762
|
-
return {
|
|
763
|
-
"--fader-height": `${this.height}px`,
|
|
764
|
-
"--fader-width": `${this.width}px`,
|
|
765
|
-
"--fader-head-top": `${this.faderHeadTop}px`
|
|
766
|
-
};
|
|
767
|
-
}
|
|
768
|
-
},
|
|
769
|
-
mounted() {
|
|
770
|
-
this.resizeObserver = new ResizeObserver((t, e) => {
|
|
771
|
-
this.faderHeadHeight = this.getFaderHeadHeight();
|
|
772
|
-
}), this.resizeObserver.observe(this.$refs.faderHead);
|
|
773
|
-
},
|
|
774
|
-
unmounted() {
|
|
775
|
-
this.resizeObserver?.disconnect();
|
|
776
|
-
},
|
|
777
|
-
methods: {
|
|
778
|
-
getContainedImgOrSvg(t) {
|
|
779
|
-
if (t.children.length == 1) {
|
|
780
|
-
if (t.children.item(0) instanceof SVGElement)
|
|
781
|
-
return t.children.item(0);
|
|
782
|
-
if (t.children.item(0) instanceof HTMLImageElement)
|
|
783
|
-
return t.children.item(0);
|
|
784
|
-
}
|
|
785
|
-
},
|
|
786
|
-
getFaderHeadHeight() {
|
|
787
|
-
const t = this.$refs.faderHead, e = this.getContainedImgOrSvg(t);
|
|
788
|
-
return e ? e.getBoundingClientRect().height : t.getBoundingClientRect().height;
|
|
789
|
-
},
|
|
790
|
-
onHeadMouseDown(t) {
|
|
791
|
-
t.preventDefault(), this.faderContainerY = this.$refs.faderContainer.getBoundingClientRect().y, this.faderHeadHeight = this.getFaderHeadHeight(), document.addEventListener("mousemove", this.onHeadMouseDrag), document.addEventListener("touchmove", this.onHeadTouchDrag), document.addEventListener("mouseup", this.onDocumentMouseUp), document.addEventListener("touchend", this.onDocumentMouseUp);
|
|
792
|
-
},
|
|
793
|
-
onDocumentMouseUp() {
|
|
794
|
-
document.removeEventListener("mousemove", this.onHeadMouseDrag), document.removeEventListener("touchmove", this.onHeadTouchDrag), document.removeEventListener("mouseup", this.onDocumentMouseUp), document.removeEventListener("touchend", this.onDocumentMouseUp);
|
|
795
|
-
},
|
|
796
|
-
onHeadDblClick() {
|
|
797
|
-
const t = typeof this.default > "u" ? this.midValue : this.default;
|
|
798
|
-
this.$emit("update:modelValue", this.valueCurve.getCurvedValue(t));
|
|
799
|
-
},
|
|
800
|
-
onHeadDrag(t) {
|
|
801
|
-
let e = t - this.faderContainerY;
|
|
802
|
-
e > this.height ? e = this.height : e < 0 && (e = 0);
|
|
803
|
-
const r = (this.height - e) / this.height * this.valueRange + this.minValue;
|
|
804
|
-
this.$emit(
|
|
805
|
-
"update:modelValue",
|
|
806
|
-
this.valueCurve.getCurvedValue(r)
|
|
807
|
-
);
|
|
808
|
-
},
|
|
809
|
-
onHeadTouchDrag(t) {
|
|
810
|
-
t.touches[0] && this.onHeadDrag(t.touches[0].clientY);
|
|
811
|
-
},
|
|
812
|
-
onHeadMouseDrag(t) {
|
|
813
|
-
this.onHeadDrag(t.clientY);
|
|
814
|
-
}
|
|
815
|
-
},
|
|
816
|
-
watch: {
|
|
817
|
-
modelValue(t) {
|
|
818
|
-
this.curvedValue = t, this.linearValue = this.valueCurve.getLinearValue(this.curvedValue);
|
|
819
|
-
},
|
|
820
|
-
minValue(t) {
|
|
821
|
-
this.valueCurve = new M(t, this.maxValue);
|
|
822
|
-
},
|
|
823
|
-
maxValue(t) {
|
|
824
|
-
this.valueCurve = new M(this.minValue, t);
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
}), St = {
|
|
828
|
-
ref: "faderBackground",
|
|
829
|
-
class: "fader-background"
|
|
830
|
-
};
|
|
831
|
-
function Mt(t, e, a, r, i, s) {
|
|
832
|
-
const o = G("defaultFaderBackground"), h = G("defaultFaderHead");
|
|
833
|
-
return c(), p("div", {
|
|
834
|
-
ref: "faderContainer",
|
|
835
|
-
class: "fader-container",
|
|
836
|
-
style: S(t.cssVars)
|
|
837
|
-
}, [
|
|
838
|
-
n("div", St, [
|
|
839
|
-
U(t.$slots, "faderBackground", {}, () => [
|
|
840
|
-
k(o)
|
|
841
|
-
], !0)
|
|
842
|
-
], 512),
|
|
843
|
-
n("div", {
|
|
844
|
-
ref: "faderHead",
|
|
845
|
-
class: "fader-head",
|
|
846
|
-
onMousedown: e[0] || (e[0] = (...g) => t.onHeadMouseDown && t.onHeadMouseDown(...g)),
|
|
847
|
-
onTouchstart: e[1] || (e[1] = (...g) => t.onHeadMouseDown && t.onHeadMouseDown(...g)),
|
|
848
|
-
onDblclick: e[2] || (e[2] = (...g) => t.onHeadDblClick && t.onHeadDblClick(...g))
|
|
849
|
-
}, [
|
|
850
|
-
U(t.$slots, "faderHead", {}, () => [
|
|
851
|
-
k(h)
|
|
852
|
-
], !0)
|
|
853
|
-
], 544)
|
|
854
|
-
], 4);
|
|
855
|
-
}
|
|
856
|
-
const Vt = /* @__PURE__ */ u(Gt, [["render", Mt], ["__scopeId", "data-v-9d74edfd"]]), Dt = {}, Ut = {
|
|
857
|
-
width: "50",
|
|
858
|
-
height: "50",
|
|
859
|
-
viewBox: "0 0 100 100"
|
|
860
|
-
};
|
|
861
|
-
function zt(t, e) {
|
|
862
|
-
return c(), p("svg", Ut, [...e[0] || (e[0] = [
|
|
863
|
-
V(`<g data-v-3cef4f4a><g data-v-3cef4f4a><circle class="st0" cx="50%" cy="50%" r="50%" data-v-3cef4f4a></circle><g transform="translate(-20 -20)" data-v-3cef4f4a><g transform="translate(0 -6)" data-v-3cef4f4a><path d="M109.4,78.2c-2.3-2.5-4-5.6-4.6-9c-0.7-3.5-0.5-6.9,0.6-10.2c-2.2-4.6-5.3-8.6-9.2-11.9c-3.3,0.2-6.8-0.4-10-2
|
|
864
|
-
s-5.8-4-7.7-6.7c-5.1-1-10.2-1.1-15-0.2c-1.9,2.8-4.6,5.1-7.8,6.6s-6.7,2.1-10.1,1.7c-3.8,3.1-7.1,7.1-9.5,11.6
|
|
865
|
-
c0.9,3.2,1.1,6.7,0.4,10.2c-0.9,3.5-2.6,6.5-5,8.9c0.1,5.1,1.1,10.1,3.1,14.6c3.1,1.2,5.9,3.2,8.2,6.2c2.2,2.8,3.5,6.2,4,9.4
|
|
866
|
-
c4,3,8.4,5.3,13.5,6.7c2.9-1.6,6.3-2.6,9.9-2.6s6.9,1,9.9,2.8c4.8-1.1,9.5-3.3,13.6-6.4c0.6-3.3,1.9-6.5,4.2-9.3
|
|
867
|
-
c2.3-2.8,5.2-4.7,8.4-5.9c1-2.2,1.9-4.6,2.5-7.1C109.1,83.4,109.3,80.7,109.4,78.2z" data-v-3cef4f4a></path></g><ellipse class="st1" cx="70.4" cy="70.4" rx="26.7" ry="26.7" data-v-3cef4f4a></ellipse><g transform="translate(0 -8)" data-v-3cef4f4a><path class="st2" d="M71.5,28.5c-0.4,0-0.9,0-1.1,0c-0.3,0-0.9,0-1.1,0v31h2.5v-31H71.5z" data-v-3cef4f4a></path></g></g></g></g>`, 1)
|
|
868
|
-
])]);
|
|
869
|
-
}
|
|
870
|
-
const $t = /* @__PURE__ */ u(Dt, [["render", zt], ["__scopeId", "data-v-3cef4f4a"]]), Wt = w({
|
|
871
|
-
components: {
|
|
872
|
-
defaultKnob: $t
|
|
873
|
-
},
|
|
874
|
-
setup(t) {
|
|
875
|
-
const e = {
|
|
876
|
-
curvedValue: 0,
|
|
877
|
-
linearValue: 0,
|
|
878
|
-
unsteppedValue: 0,
|
|
879
|
-
rotationMax: 3 * Math.PI / 4,
|
|
880
|
-
dragRange: 70,
|
|
881
|
-
prevY: -1,
|
|
882
|
-
valueCurve: new M(t.minValue, t.maxValue)
|
|
883
|
-
// audioParamValue: null as AudioParam | null
|
|
884
|
-
};
|
|
885
|
-
return t.modelValue instanceof Number && (e.linearValue = t.modelValue, e.curvedValue = e.valueCurve.getCurvedValue(t.modelValue), e.unsteppedValue = e.curvedValue), F(e);
|
|
886
|
-
},
|
|
887
|
-
props: {
|
|
888
|
-
modelValue: {
|
|
889
|
-
required: !0,
|
|
890
|
-
type: Number
|
|
891
|
-
},
|
|
892
|
-
minValue: {
|
|
893
|
-
required: !0,
|
|
894
|
-
type: Number
|
|
895
|
-
},
|
|
896
|
-
maxValue: {
|
|
897
|
-
required: !0,
|
|
898
|
-
type: Number
|
|
899
|
-
},
|
|
900
|
-
step: {
|
|
901
|
-
required: !1,
|
|
902
|
-
type: Number,
|
|
903
|
-
default: 0
|
|
904
|
-
},
|
|
905
|
-
size: {
|
|
906
|
-
required: !1,
|
|
907
|
-
type: Number,
|
|
908
|
-
default: 60
|
|
909
|
-
},
|
|
910
|
-
default: {
|
|
911
|
-
required: !1,
|
|
912
|
-
type: Number
|
|
913
|
-
}
|
|
914
|
-
},
|
|
915
|
-
computed: {
|
|
916
|
-
knobRotation() {
|
|
917
|
-
return (this.linearValue - this.midValue) / (this.valueRange / 2) * this.rotationMax;
|
|
918
|
-
},
|
|
919
|
-
midValue() {
|
|
920
|
-
return this.minValue + this.valueRange / 2;
|
|
921
|
-
},
|
|
922
|
-
valueRange() {
|
|
923
|
-
return this.maxValue - this.minValue;
|
|
924
|
-
}
|
|
925
|
-
},
|
|
926
|
-
methods: {
|
|
927
|
-
onKnobMouseDown(t) {
|
|
928
|
-
t.preventDefault(), document.addEventListener("mousemove", this.onKnobMouseDrag), document.addEventListener("touchmove", this.onKnobTouchDrag), document.addEventListener("mouseup", this.onDocumentMouseUp), document.addEventListener("touchend", this.onDocumentMouseUp);
|
|
929
|
-
},
|
|
930
|
-
onDocumentMouseUp() {
|
|
931
|
-
document.removeEventListener("mousemove", this.onKnobMouseDrag), document.removeEventListener("touchmove", this.onKnobTouchDrag), document.removeEventListener("mouseup", this.onDocumentMouseUp), document.removeEventListener("touchend", this.onDocumentMouseUp), this.prevY = -1;
|
|
932
|
-
},
|
|
933
|
-
onKnobDblClick() {
|
|
934
|
-
const t = typeof this.default > "u" ? this.midValue : this.default;
|
|
935
|
-
this.unsteppedValue = t, this.$emit("update:modelValue", this.valueCurve.getCurvedValue(t));
|
|
936
|
-
},
|
|
937
|
-
roundToStep(t) {
|
|
938
|
-
if (this.step === 0)
|
|
939
|
-
throw "step is zero or undefined";
|
|
940
|
-
const e = Math.round(t / this.step) * this.step;
|
|
941
|
-
return e < this.minValue ? this.minValue : e > this.maxValue ? this.maxValue : e;
|
|
942
|
-
},
|
|
943
|
-
onKnobDrag(t) {
|
|
944
|
-
if (this.prevY >= 0) {
|
|
945
|
-
const e = this.prevY - t;
|
|
946
|
-
let a = this.unsteppedValue + e / this.dragRange * (this.valueRange / 2);
|
|
947
|
-
a = a > this.maxValue ? this.maxValue : a < this.minValue ? this.minValue : a, this.unsteppedValue = a;
|
|
948
|
-
const r = this.step === 0 ? this.unsteppedValue : this.roundToStep(this.unsteppedValue);
|
|
949
|
-
this.$emit(
|
|
950
|
-
"update:modelValue",
|
|
951
|
-
this.valueCurve.getCurvedValue(r)
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
},
|
|
955
|
-
onKnobTouchDrag(t) {
|
|
956
|
-
t.touches[0] && (this.onKnobDrag(t.touches[0].pageY), this.prevY = t.touches[0].pageY);
|
|
957
|
-
},
|
|
958
|
-
onKnobMouseDrag(t) {
|
|
959
|
-
this.onKnobDrag(t.pageY), this.prevY = t.pageY;
|
|
960
|
-
}
|
|
961
|
-
},
|
|
962
|
-
watch: {
|
|
963
|
-
modelValue(t) {
|
|
964
|
-
this.curvedValue = t, this.unsteppedValue = this.valueCurve.getLinearValue(this.curvedValue), this.linearValue = this.step === 0 ? this.unsteppedValue : this.roundToStep(this.unsteppedValue);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
}), Tt = { class: "control-container" }, Pt = { class: "knob-row" };
|
|
968
|
-
function Ht(t, e, a, r, i, s) {
|
|
969
|
-
const o = G("default-knob");
|
|
970
|
-
return c(), p("div", Tt, [
|
|
971
|
-
n("div", Pt, [
|
|
972
|
-
n("span", {
|
|
973
|
-
onMousedown: e[0] || (e[0] = (...h) => t.onKnobMouseDown && t.onKnobMouseDown(...h)),
|
|
974
|
-
onTouchstart: e[1] || (e[1] = (...h) => t.onKnobMouseDown && t.onKnobMouseDown(...h)),
|
|
975
|
-
onDblclick: e[2] || (e[2] = (...h) => t.onKnobDblClick && t.onKnobDblClick(...h)),
|
|
976
|
-
class: "knob-container",
|
|
977
|
-
style: S(`transform: rotate(${t.knobRotation}rad); width: ${t.size}px; height: ${t.size}px;`)
|
|
978
|
-
}, [
|
|
979
|
-
U(t.$slots, "default", {}, () => [
|
|
980
|
-
k(o)
|
|
981
|
-
], !0)
|
|
982
|
-
], 36)
|
|
983
|
-
])
|
|
984
|
-
]);
|
|
985
|
-
}
|
|
986
|
-
const At = /* @__PURE__ */ u(Wt, [["render", Ht], ["__scopeId", "data-v-775457f1"]]), b = 20, C = -120, qt = 3, It = w({
|
|
987
|
-
name: "VASpectrumAnalyzer",
|
|
988
|
-
data() {
|
|
989
|
-
return {
|
|
990
|
-
continueDrawing: !1,
|
|
991
|
-
canvas: null,
|
|
992
|
-
canvasContext: null
|
|
993
|
-
};
|
|
994
|
-
},
|
|
995
|
-
props: {
|
|
996
|
-
input: {
|
|
997
|
-
required: !1,
|
|
998
|
-
type: AudioNode
|
|
999
|
-
},
|
|
1000
|
-
fftSize: {
|
|
1001
|
-
type: Number,
|
|
1002
|
-
required: !1,
|
|
1003
|
-
default: 1024
|
|
1004
|
-
},
|
|
1005
|
-
fillStyle: {
|
|
1006
|
-
type: String,
|
|
1007
|
-
required: !1,
|
|
1008
|
-
default: "none"
|
|
1009
|
-
},
|
|
1010
|
-
lineColor: {
|
|
1011
|
-
type: String,
|
|
1012
|
-
required: !1,
|
|
1013
|
-
default: "black"
|
|
1014
|
-
},
|
|
1015
|
-
backgroundColor: {
|
|
1016
|
-
type: String,
|
|
1017
|
-
required: !1,
|
|
1018
|
-
default: "white"
|
|
1019
|
-
},
|
|
1020
|
-
gridColor: {
|
|
1021
|
-
type: String,
|
|
1022
|
-
required: !1,
|
|
1023
|
-
default: "gray"
|
|
1024
|
-
},
|
|
1025
|
-
borderColor: {
|
|
1026
|
-
type: String,
|
|
1027
|
-
required: !1,
|
|
1028
|
-
default: "black"
|
|
1029
|
-
},
|
|
1030
|
-
height: {
|
|
1031
|
-
type: Number,
|
|
1032
|
-
required: !1,
|
|
1033
|
-
default: -1
|
|
1034
|
-
},
|
|
1035
|
-
width: {
|
|
1036
|
-
type: Number,
|
|
1037
|
-
required: !1,
|
|
1038
|
-
default: 1200
|
|
1039
|
-
},
|
|
1040
|
-
font: {
|
|
1041
|
-
required: !1,
|
|
1042
|
-
type: String,
|
|
1043
|
-
default: "Helvetica, sans-serif"
|
|
1044
|
-
}
|
|
1045
|
-
},
|
|
1046
|
-
setup(t) {
|
|
1047
|
-
const e = T(t.fftSize, t.input);
|
|
1048
|
-
return W(() => t.input, e.onInputChanged), {
|
|
1049
|
-
...e,
|
|
1050
|
-
...P()
|
|
1051
|
-
};
|
|
1052
|
-
},
|
|
1053
|
-
computed: {
|
|
1054
|
-
graphWidth() {
|
|
1055
|
-
return this.width;
|
|
1056
|
-
},
|
|
1057
|
-
graphHeight() {
|
|
1058
|
-
return this.height < 0 ? this.width / qt : this.height;
|
|
1059
|
-
},
|
|
1060
|
-
cssVars() {
|
|
1061
|
-
return {
|
|
1062
|
-
"--border-color": `${this.borderColor}`
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
|
-
},
|
|
1066
|
-
mounted() {
|
|
1067
|
-
this.canvasContext = this.$refs.analyserCanvas.getContext("2d"), this.startRendering(this.drawFrequencyDomain);
|
|
1068
|
-
},
|
|
1069
|
-
methods: {
|
|
1070
|
-
scaleX(t, e, a, r) {
|
|
1071
|
-
const i = 0.30111412225233364;
|
|
1072
|
-
let s = (a - e) / a;
|
|
1073
|
-
s *= 1 - i, s = 1 - s;
|
|
1074
|
-
let o = (t - e) / (a - e);
|
|
1075
|
-
return o = Math.pow(o, s), o < 1 && (o *= r), o;
|
|
1076
|
-
},
|
|
1077
|
-
scaleXLegacy(t, e, a, r) {
|
|
1078
|
-
return Math.floor(
|
|
1079
|
-
Math.log2(t - e) / Math.log2(a - e) * r
|
|
1080
|
-
);
|
|
1081
|
-
},
|
|
1082
|
-
drawFrequencyDomain() {
|
|
1083
|
-
if (this.canvasContext) {
|
|
1084
|
-
const t = 0 - C, e = this.input ? this.input.context.sampleRate / 2 : 24e3, a = this.getFloatFrequencyData();
|
|
1085
|
-
if (this.canvasContext.clearRect(0, 0, this.graphWidth, this.graphHeight), this.canvasContext.fillStyle = this.backgroundColor, this.canvasContext.fillRect(0, 0, this.graphWidth, this.graphHeight), a) {
|
|
1086
|
-
this.canvasContext.beginPath(), this.canvasContext.lineWidth = 1, this.canvasContext.strokeStyle = this.lineColor, this.canvasContext.fillStyle = this.lineColor, this.canvasContext.moveTo(0, this.graphHeight);
|
|
1087
|
-
let r = 0, i = this.graphHeight - (a[0] - C) / t * this.graphHeight;
|
|
1088
|
-
for (let s = 0; s < a.length; s++) {
|
|
1089
|
-
const o = (a[s] - C) / t * this.graphHeight, h = s * (e / a.length);
|
|
1090
|
-
this.canvasContext.lineTo(r, i), h >= b && (r = this.scaleX(h, b, e, this.graphWidth), i = this.graphHeight - o, this.fillStyle === "lines" && this.canvasContext.fillRect(r, i, 1, o)), this.canvasContext.lineTo(r, i);
|
|
1091
|
-
}
|
|
1092
|
-
this.canvasContext.lineTo(this.graphWidth, this.graphHeight), this.canvasContext.closePath(), this.canvasContext.stroke(), this.fillStyle === "solid" && this.canvasContext.fill();
|
|
1093
|
-
}
|
|
1094
|
-
this.drawDbMarkers(), this.drawFrequencyMarkers(e);
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
|
-
drawDbMarkers() {
|
|
1098
|
-
this.drawDbMarker(-20), this.drawDbMarker(-40), this.drawDbMarker(-60), this.drawDbMarker(-80), this.drawDbMarker(-100);
|
|
1099
|
-
},
|
|
1100
|
-
drawDbMarker(t) {
|
|
1101
|
-
if (this.canvasContext) {
|
|
1102
|
-
const e = this.graphHeight - (C - t) / C * this.graphHeight;
|
|
1103
|
-
this.canvasContext.strokeStyle = this.gridColor, this.canvasContext.beginPath(), this.canvasContext.moveTo(0, e), this.canvasContext.lineTo(this.graphWidth, e), this.canvasContext.stroke(), this.canvasContext.font = `12px ${this.font}`, this.canvasContext.fillStyle = this.gridColor, this.canvasContext.fillText(`${t}db`, 10, e);
|
|
1104
|
-
}
|
|
1105
|
-
},
|
|
1106
|
-
drawFrequencyMarkers(t) {
|
|
1107
|
-
this.drawFrequencyMarker(
|
|
1108
|
-
b,
|
|
1109
|
-
t,
|
|
1110
|
-
this.graphWidth > 300,
|
|
1111
|
-
!1
|
|
1112
|
-
), this.drawFrequencyMarker(25, t), this.drawFrequencyMarker(50, t, !0), this.drawFrequencyMarker(100, t), this.drawFrequencyMarker(200, t, this.graphWidth > 600), this.drawFrequencyMarker(500, t, this.graphWidth > 300), this.drawFrequencyMarker(1e3, t, this.graphWidth > 600), this.drawFrequencyMarker(1500, t), this.drawFrequencyMarker(2e3, t, !0), this.drawFrequencyMarker(3e3, t, this.graphWidth > 600), this.drawFrequencyMarker(5e3, t, this.graphWidth > 300), this.drawFrequencyMarker(7e3, t, this.graphWidth > 600), this.drawFrequencyMarker(1e4, t, !0), this.drawFrequencyMarker(15e3, t, this.graphWidth > 600), this.drawFrequencyMarker(2e4, t, this.graphWidth > 800);
|
|
1113
|
-
},
|
|
1114
|
-
drawFrequencyMarker(t, e, a = !1, r = !0) {
|
|
1115
|
-
if (this.canvasContext && t >= b) {
|
|
1116
|
-
const i = this.scaleX(t, b, e, this.graphWidth);
|
|
1117
|
-
r && (this.canvasContext.strokeStyle = this.gridColor, this.canvasContext.beginPath(), this.canvasContext.moveTo(i, 0), this.canvasContext.lineTo(i, this.graphWidth), this.canvasContext.stroke()), a && (this.canvasContext.font = `14px ${this.font}`, this.canvasContext.fillStyle = this.lineColor, t < 1e3 ? this.canvasContext.fillText(`${t}hz`, i, 50) : this.canvasContext.fillText(`${t / 1e3}khz`, i, 50));
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
}), Rt = ["width", "height"];
|
|
1122
|
-
function Ot(t, e, a, r, i, s) {
|
|
1123
|
-
return c(), p("canvas", {
|
|
1124
|
-
width: t.graphWidth,
|
|
1125
|
-
height: t.graphHeight,
|
|
1126
|
-
ref: "analyserCanvas",
|
|
1127
|
-
class: "analyser-canvas",
|
|
1128
|
-
style: S(t.cssVars)
|
|
1129
|
-
}, null, 12, Rt);
|
|
1130
|
-
}
|
|
1131
|
-
const Ft = /* @__PURE__ */ u(It, [["render", Ot], ["__scopeId", "data-v-8be4064b"]]), Lt = w({
|
|
1132
|
-
Name: "VAToggleButton",
|
|
1133
|
-
props: {
|
|
1134
|
-
color: {
|
|
1135
|
-
required: !1,
|
|
1136
|
-
type: String,
|
|
1137
|
-
default: "red"
|
|
1138
|
-
},
|
|
1139
|
-
label: {
|
|
1140
|
-
require: !1,
|
|
1141
|
-
type: String,
|
|
1142
|
-
default: ""
|
|
1143
|
-
}
|
|
1144
|
-
},
|
|
1145
|
-
setup(t) {
|
|
1146
|
-
const e = y(!1), a = H(() => ({
|
|
1147
|
-
"--on-color": `${t.color}`
|
|
1148
|
-
}));
|
|
1149
|
-
function r() {
|
|
1150
|
-
e.value = !e.value;
|
|
1151
|
-
}
|
|
1152
|
-
return { on: e, cssVars: a, onButtonClick: r };
|
|
1153
|
-
}
|
|
1154
|
-
});
|
|
1155
|
-
function Nt(t, e, a, r, i, s) {
|
|
1156
|
-
return c(), p("button", {
|
|
1157
|
-
onClick: e[0] || (e[0] = (...o) => t.onButtonClick && t.onButtonClick(...o)),
|
|
1158
|
-
class: L([t.on ? "button-on" : "button-off", "button"]),
|
|
1159
|
-
style: S(t.cssVars)
|
|
1160
|
-
}, m(t.label), 7);
|
|
1161
|
-
}
|
|
1162
|
-
const Et = /* @__PURE__ */ u(Lt, [["render", Nt], ["__scopeId", "data-v-87a8a5ae"]]), Bt = {
|
|
1163
|
-
// test,
|
|
1164
|
-
VAAnalogMeterStereo: _,
|
|
1165
|
-
VAAnalogMeter: J,
|
|
1166
|
-
VAAudioFileVisualizer: ot,
|
|
1167
|
-
VADigitalMeterStereo: dt,
|
|
1168
|
-
VADigitalMeter: mt,
|
|
1169
|
-
VAFader: Vt,
|
|
1170
|
-
VAKnob: At,
|
|
1171
|
-
VASpectrumAnalyzer: Ft,
|
|
1172
|
-
VAToggleButton: Et
|
|
1173
|
-
}, Yt = function(e) {
|
|
1174
|
-
Object.entries(Bt).forEach(([a, r]) => {
|
|
1175
|
-
e.component(a, r);
|
|
1176
|
-
});
|
|
1177
|
-
};
|
|
1178
|
-
export {
|
|
1179
|
-
J as VAAnalogMeter,
|
|
1180
|
-
_ as VAAnalogMeterStereo,
|
|
1181
|
-
ot as VAAudioFileVisualizer,
|
|
1182
|
-
mt as VADigitalMeter,
|
|
1183
|
-
dt as VADigitalMeterStereo,
|
|
1184
|
-
Vt as VAFader,
|
|
1185
|
-
At as VAKnob,
|
|
1186
|
-
Ft as VASpectrumAnalyzer,
|
|
1187
|
-
Et as VAToggleButton,
|
|
1188
|
-
Yt as default
|
|
1189
|
-
};
|