hyperframes 0.8.159 → 0.8.161
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/README.md +10 -0
- package/dist/{add-7UMRT6IJ.js → add-7U5TQGSQ.js} +11 -11
- package/dist/{animatedGifPrep-COFZMEVD.js → animatedGifPrep-YAJTDXB7.js} +6 -6
- package/dist/api.js +16 -16
- package/dist/{asset-N37XIJTB.js → asset-N3JO5LHY.js} +2 -2
- package/dist/{assetCataloger-ZOQ67MGR.js → assetCataloger-BIDQA34M.js} +2 -2
- package/dist/audio-QNPSENQR.js +1131 -0
- package/dist/{auth-GKFS2PL6.js → auth-HINUM4A7.js} +1 -1
- package/dist/{autoUpdate-V4PLREDQ.js → autoUpdate-AAMND4XK.js} +2 -2
- package/dist/{backgroundChecks-TVOKARY2.js → backgroundChecks-FXIEHPND.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-IARQXQHN.js → batchRender-C2JCG5EK.js} +3 -3
- package/dist/beats-UZNREIRU.js +239 -0
- package/dist/{benchmark-ZJYFRFYF.js → benchmark-YM3QXPH6.js} +8 -8
- package/dist/{browser-WRZOH4PD.js → browser-SD3T2XMH.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-SFHKZZAX.js → bundleWithLocalizedFonts-SLBVWQ7O.js} +2 -2
- package/dist/{capture-LLLIHYEF.js → capture-GUO23PVN.js} +2 -2
- package/dist/{capture-KFYPMVTT.js → capture-M5ZAD3BI.js} +10 -10
- package/dist/{catalog-QO762U7V.js → catalog-6PF7KZAZ.js} +11 -11
- package/dist/{catch-up-MELHNTGB.js → catch-up-5LTQTD3X.js} +4 -4
- package/dist/{check-RX3LTKYB.js → check-NE2YXJR2.js} +130 -119
- package/dist/{checkBrowser-EUUMEILI.js → checkBrowser-XDTXDEYO.js} +33 -31
- package/dist/{chunk-YIJMVFEJ.js → chunk-22QHO26F.js} +1 -1
- package/dist/{chunk-7F3B5YYT.js → chunk-2742O5DO.js} +178 -23
- package/dist/{chunk-HEEN6X6O.js → chunk-2ZLYSXZC.js} +8 -8
- package/dist/{chunk-5RSV6DWB.js → chunk-4ID635FL.js} +1 -1
- package/dist/{chunk-ODE7HHNN.js → chunk-5YSHR4XC.js} +11 -9
- package/dist/chunk-6JR2XUEE.js +127 -0
- package/dist/{chunk-DLQQA25O.js → chunk-7ZKEOQ5N.js} +1 -1
- package/dist/{chunk-BB2SFTMY.js → chunk-A2DMF2Q6.js} +6 -5
- package/dist/{chunk-K5BMHQOU.js → chunk-AHNJMWMU.js} +14 -14
- package/dist/{chunk-IJ7JPX4W.js → chunk-AY2FEJDR.js} +3 -3
- package/dist/{chunk-MMYY4KV3.js → chunk-B5FZ2CQM.js} +1 -1
- package/dist/{chunk-IWOEAWIP.js → chunk-B7RUGHBT.js} +1 -1
- package/dist/{chunk-AFYZWHR7.js → chunk-CGOGEA62.js} +2 -2
- package/dist/{chunk-7RTTPSXG.js → chunk-D33YJZOH.js} +1 -1
- package/dist/{chunk-54DMWFQZ.js → chunk-D3ZWBHZP.js} +2 -15
- package/dist/{chunk-WWMFR4SH.js → chunk-DJZEIVAP.js} +3 -3
- package/dist/{chunk-EGJVFPUX.js → chunk-ERTJPFCH.js} +1 -1
- package/dist/{chunk-FEKRMXT6.js → chunk-EVRUR7DW.js} +1 -1
- package/dist/chunk-FFJ5TDRD.js +1181 -0
- package/dist/{chunk-BEW7RCCW.js → chunk-G5AZMSQP.js} +2 -2
- package/dist/{chunk-UK4KRTIX.js → chunk-G642IIVK.js} +2 -2
- package/dist/{chunk-AEQWF7PE.js → chunk-GG37I7B3.js} +1 -1
- package/dist/{chunk-A5RDOXZE.js → chunk-GIPNECWL.js} +17 -129
- package/dist/chunk-GJQHHAAX.js +336 -0
- package/dist/{chunk-4IKI2RYR.js → chunk-H4VXLZ6O.js} +10 -10
- package/dist/{chunk-NCVGBBWC.js → chunk-HM4PLNTX.js} +1 -1
- package/dist/{chunk-24N3BB5M.js → chunk-I6CVW5CA.js} +5 -5
- package/dist/{chunk-KEGTYA7V.js → chunk-IK3SOMZ4.js} +5 -3
- package/dist/{chunk-YITZFHRJ.js → chunk-IL6C7T5X.js} +1 -1
- package/dist/{chunk-6PIGOKTE.js → chunk-JGYHWVXQ.js} +339 -67
- package/dist/{chunk-HO3SITVT.js → chunk-KZPG4DXX.js} +1 -1
- package/dist/{chunk-INNBWSZK.js → chunk-LYIG2GZ5.js} +2 -2
- package/dist/{chunk-ESOAYGIT.js → chunk-MMV6IY6U.js} +2 -2
- package/dist/{chunk-4DEBDQD4.js → chunk-MP676E4B.js} +2 -2
- package/dist/{chunk-3W3MOLRL.js → chunk-N2NDDTYW.js} +2 -2
- package/dist/{chunk-GGDCBVXK.js → chunk-OMJA7JP6.js} +5 -5
- package/dist/{chunk-4D5RBIX6.js → chunk-ON2HYNGB.js} +10 -10
- package/dist/chunk-P47XYVEQ.js +3795 -0
- package/dist/{chunk-NIGOOCVS.js → chunk-P4QE7SSN.js} +1 -1
- package/dist/{chunk-AQXJC64X.js → chunk-PBNV5V5G.js} +1 -1
- package/dist/{chunk-2CEH75X3.js → chunk-PLEMSN3E.js} +2 -2
- package/dist/{chunk-DVAEX52Q.js → chunk-PPF65XAF.js} +1 -1
- package/dist/{chunk-5GPX4X4L.js → chunk-PYMYGIZ4.js} +2 -2
- package/dist/{chunk-7XEVZDKU.js → chunk-PZH7FTRZ.js} +7 -7
- package/dist/{chunk-V5J4XEBG.js → chunk-Q3TFX4OZ.js} +1 -1
- package/dist/{chunk-XSEGMQYA.js → chunk-QABAVWEX.js} +26 -3
- package/dist/{chunk-IKDBT5WT.js → chunk-RGYEL7QD.js} +3 -3
- package/dist/{chunk-76NO4ZRM.js → chunk-RTS7BGEC.js} +1 -1
- package/dist/{chunk-6TDZJ43G.js → chunk-SAS6XBY5.js} +1 -1
- package/dist/{chunk-H6BKVVU4.js → chunk-SB5DX6AD.js} +2 -2
- package/dist/{chunk-JZLFHF2M.js → chunk-TXG6W4X4.js} +3 -3
- package/dist/{chunk-EWAAH7AU.js → chunk-VYTGK5YA.js} +1 -1
- package/dist/{chunk-5HNZQSO4.js → chunk-WDUEIP22.js} +1 -1
- package/dist/{chunk-MTUC2Z32.js → chunk-WNXVPPMV.js} +2 -2
- package/dist/{chunk-SQHWDFTV.js → chunk-X3SCQP2A.js} +1 -1
- package/dist/{chunk-LBT4AMSF.js → chunk-XRKMITSS.js} +1 -1
- package/dist/{chunk-5O6I5ZV7.js → chunk-XTLV6UVP.js} +3 -3
- package/dist/{chunk-5YCFHCD4.js → chunk-XWWYGXJ5.js} +2 -2
- package/dist/{clean-RW7Z4XM6.js → clean-4Y4G3YV3.js} +18 -17
- package/dist/cli.js +54 -53
- package/dist/{cloud-EEOV7JKB.js → cloud-BWXJB2B7.js} +4 -4
- package/dist/{cloudrun-EZAXYVXG.js → cloudrun-BIQXBUDO.js} +3 -3
- package/dist/{compare-5UARQFXX.js → compare-OLLJBVNL.js} +25 -24
- package/dist/{compiler-THI7BXZU.js → compiler-57M6W5WY.js} +3 -3
- package/dist/{component-AYOFPL33.js → component-ULSAC45J.js} +3 -3
- package/dist/{compositions-XJNJBOMG.js → compositions-G2JTQBTJ.js} +10 -10
- package/dist/{delete-653AOR25.js → delete-BONV4XUI.js} +2 -2
- package/dist/{dist-DLR4X3KN.js → dist-4JFB3WAR.js} +2 -2
- package/dist/{dist-2VXSQLXO.js → dist-ROVMAL74.js} +1 -1
- package/dist/{doctor-WA6VRRE7.js → doctor-EMLC4VZ4.js} +12 -12
- package/dist/{events-XXBCP2I4.js → events-LF2J436R.js} +3 -3
- package/dist/{events-U5COLUWT.js → events-ZFGAA5UD.js} +2 -2
- package/dist/{feedback-DX6Q3LN7.js → feedback-WKCUQE6T.js} +6 -6
- package/dist/{ffmpeg-2ROTISBL.js → ffmpeg-7BYARPLM.js} +4 -2
- package/dist/{figma-LCQVLBXF.js → figma-VJKG252Z.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -8
- package/dist/{get-UYNPFMHX.js → get-OINAGI2B.js} +2 -2
- package/dist/{gpuPolicy-YIW3HL3B.js → gpuPolicy-VGE3I5J4.js} +6 -6
- package/dist/{grade-compare-YQEYATJV.js → grade-compare-DY5VFXPK.js} +27 -26
- package/dist/{help-FDURC7WR.js → help-HHB7JRZA.js} +2 -1
- package/dist/{history-EU5UZLHT.js → history-D44JJBBC.js} +8 -7
- package/dist/hyperframe-runtime.js +55 -55
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +55 -55
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-7T6CK6CL.js → info-2WZLISAR.js} +7 -7
- package/dist/{init-KQYSKFVU.js → init-UYZS2WXQ.js} +28 -28
- package/dist/{inspect-HQBV7VHS.js → inspect-IEFCB4PT.js} +26 -25
- package/dist/{installer-OKKPQNKS.js → installer-T3STEB4U.js} +4 -4
- package/dist/{keyframes-SK74JHOA.js → keyframes-FS43QHM2.js} +6 -6
- package/dist/{lambda-S2N4VTRO.js → lambda-RAJA6ZNA.js} +4 -4
- package/dist/{layout-MTE5Y6DE.js → layout-AK2A7Q46.js} +26 -25
- package/dist/{lint-FJGGJYB7.js → lint-JRJUSZO7.js} +7 -7
- package/dist/{lintProject-JGHKRO5L.js → lintProject-BGDYHF3F.js} +1 -1
- package/dist/{list-MBPALK5U.js → list-BKKGPT7E.js} +2 -2
- package/dist/{login-HDN4T5E4.js → login-QJZTUDDO.js} +4 -4
- package/dist/{manager-JNJE54OQ.js → manager-B6MVBM2E.js} +3 -3
- package/dist/{manager-ZLJD3EAY.js → manager-HEUPD2YB.js} +2 -2
- package/dist/{media-treatment-IP34DXWN.js → media-treatment-473OM7G7.js} +12 -11
- package/dist/{models-W5TASRHD.js → models-OA4MXEYG.js} +12 -12
- package/dist/{motionShot-2WYEMOPJ.js → motionShot-C2YDYRNB.js} +16 -16
- package/dist/{normalize-audio-F4NQPXII.js → normalize-audio-M3KVTFTQ.js} +4 -4
- package/dist/{open-DRXNALDE.js → open-363TDMEP.js} +4 -4
- package/dist/{parakeetRunner-VISBF2EA.js → parakeetRunner-DBLHMD5T.js} +13 -13
- package/dist/{pipeline-A2XOVZOM.js → pipeline-FSY65OQ4.js} +8 -8
- package/dist/{play-W2QELQX7.js → play-2UB33EGB.js} +19 -18
- package/dist/{preflight-BH2XUQBS.js → preflight-G5KP7ZKA.js} +4 -4
- package/dist/{present-NHYRS4F4.js → present-F3ASSDJX.js} +15 -14
- package/dist/{preview-SMJVUPXE.js → preview-EF76WIHK.js} +18 -18
- package/dist/{producer-276O3CKW.js → producer-C5V2A3YL.js} +1 -1
- package/dist/{projectConfig-FXFUHFPZ.js → projectConfig-X2IEHCSK.js} +6 -6
- package/dist/{publication-SSQO6ECV.js → publication-JEANCWBW.js} +2 -2
- package/dist/{publish-UHDKDXZI.js → publish-VX5OH4ST.js} +8 -8
- package/dist/{remove-background-IG6U56HC.js → remove-background-IXCISD26.js} +9 -9
- package/dist/{render-6P5RSFS3.js → render-GL72Z2W2.js} +8 -8
- package/dist/{render-ZJPSLTKV.js → render-GUBYSVQD.js} +29 -28
- package/dist/{render-XQONIJEJ.js → render-ISUT7Q3X.js} +3 -3
- package/dist/{render-batch-MH3Z6IPT.js → render-batch-2C6RUP3F.js} +3 -3
- package/dist/renderSetupWorker.js +4 -4
- package/dist/{resolver-JMSGO2JF.js → resolver-KTNKZVIB.js} +4 -4
- package/dist/{sherpa-64JLV4YM.js → sherpa-GFRG3TMM.js} +12 -12
- package/dist/skills/hyperframes-cli/SKILL.md +5 -4
- package/dist/skills/hyperframes-cli/references/beats.md +2 -6
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +8 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +1 -1
- package/dist/{skills-UXOL62PY.js → skills-7XI4DHLN.js} +5 -5
- package/dist/{skillsUpdateCheck-5Y6676K6.js → skillsUpdateCheck-34WOCMHV.js} +3 -3
- package/dist/{snapshot-SQBPCXOV.js → snapshot-SGTO2OQ4.js} +40 -30
- package/dist/{src-N42CT3YR.js → src-GPUDUKY6.js} +5 -5
- package/dist/{src-RQMK5INS.js → src-IMCQRH4P.js} +7 -7
- package/dist/{staticProjectServer-AQXVWMLU.js → staticProjectServer-4CQ3KDQK.js} +15 -14
- package/dist/studio/assets/{hyperframes-player-kqB1psAJ.js → hyperframes-player-C8VFb4NS.js} +1 -1
- package/dist/studio/assets/{index-X_d1b5vz.js → index-J8Bpbg6o.js} +118 -118
- package/dist/studio/assets/{index-BrViH8hj.js → index-RZnZPb-B.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-GY5D7RAP.js → studio-api-RYCDLEOR.js} +13 -8
- package/dist/{studioServer-O3VONODG.js → studioServer-VIIVGFZH.js} +45 -44
- package/dist/{telemetry-V2K5P7CI.js → telemetry-YKVYLJSB.js} +3 -3
- package/dist/{timeline-YU3YPLKB.js → timeline-LDRA7QZ3.js} +42 -347
- package/dist/{tokens-NPSSSG2A.js → tokens-ZAOFRU55.js} +2 -2
- package/dist/{transcribe-FNBDG24U.js → transcribe-CJXUHTAS.js} +17 -17
- package/dist/{transcribe-BXJNS3RZ.js → transcribe-FL6NGWHF.js} +11 -11
- package/dist/{updateCheck-MB3RHSVK.js → updateCheck-TIRFQBSI.js} +2 -2
- package/dist/{upgrade-5VNRUR37.js → upgrade-7R5G3MNO.js} +2 -2
- package/dist/{urlDownloader-WCT7FMLA.js → urlDownloader-KDJGLR2Y.js} +5 -5
- package/dist/{usage-EC3KFUIJ.js → usage-HG4WMM7A.js} +33 -5
- package/dist/{validate-UXSXRCE6.js → validate-VGEPWGQO.js} +20 -19
- package/dist/{video-NRNQBZMV.js → video-AHO4CDCK.js} +6 -6
- package/package.json +2 -3
- package/dist/beat-analyzer.global.js +0 -341
- package/dist/beats-FY4UDXBL.js +0 -322
- package/dist/chunk-TWBTXEDZ.js +0 -3795
- package/dist/lib-TPG2ZMAX.js +0 -128
- package/dist/studio/assets/index-C3AZLr-0.js +0 -1
package/dist/lib-TPG2ZMAX.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
-
var require = __hf_createRequire(import.meta.url);
|
|
5
|
-
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
__commonJS
|
|
9
|
-
} from "./chunk-M2WBOQ2Q.js";
|
|
10
|
-
|
|
11
|
-
// ../../node_modules/.bun/bpm-detective@2.0.5/node_modules/bpm-detective/lib/detect.js
|
|
12
|
-
var require_detect = __commonJS({
|
|
13
|
-
"../../node_modules/.bun/bpm-detective@2.0.5/node_modules/bpm-detective/lib/detect.js"(exports) {
|
|
14
|
-
"use strict";
|
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
});
|
|
18
|
-
exports.default = detect;
|
|
19
|
-
var OfflineContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
|
|
20
|
-
function detect(buffer) {
|
|
21
|
-
var source = getLowPassSource(buffer);
|
|
22
|
-
source.start(0);
|
|
23
|
-
return [findPeaks, identifyIntervals, groupByTempo(buffer.sampleRate), getTopCandidate].reduce(function(state, fn) {
|
|
24
|
-
return fn(state);
|
|
25
|
-
}, source.buffer.getChannelData(0));
|
|
26
|
-
}
|
|
27
|
-
function getTopCandidate(candidates) {
|
|
28
|
-
return candidates.sort(function(a, b) {
|
|
29
|
-
return b.count - a.count;
|
|
30
|
-
}).splice(0, 5)[0].tempo;
|
|
31
|
-
}
|
|
32
|
-
function getLowPassSource(buffer) {
|
|
33
|
-
var length = buffer.length, numberOfChannels = buffer.numberOfChannels, sampleRate = buffer.sampleRate;
|
|
34
|
-
var context = new OfflineContext(numberOfChannels, length, sampleRate);
|
|
35
|
-
var source = context.createBufferSource();
|
|
36
|
-
source.buffer = buffer;
|
|
37
|
-
var filter = context.createBiquadFilter();
|
|
38
|
-
filter.type = "lowpass";
|
|
39
|
-
source.connect(filter);
|
|
40
|
-
filter.connect(context.destination);
|
|
41
|
-
return source;
|
|
42
|
-
}
|
|
43
|
-
function findPeaks(data) {
|
|
44
|
-
var peaks = [];
|
|
45
|
-
var threshold = 0.9;
|
|
46
|
-
var minThresold = 0.3;
|
|
47
|
-
var minPeaks = 15;
|
|
48
|
-
while (peaks.length < minPeaks && threshold >= minThresold) {
|
|
49
|
-
peaks = findPeaksAtThreshold(data, threshold);
|
|
50
|
-
threshold -= 0.05;
|
|
51
|
-
}
|
|
52
|
-
if (peaks.length < minPeaks) {
|
|
53
|
-
throw new Error("Could not find enough samples for a reliable detection.");
|
|
54
|
-
}
|
|
55
|
-
return peaks;
|
|
56
|
-
}
|
|
57
|
-
function findPeaksAtThreshold(data, threshold) {
|
|
58
|
-
var peaks = [];
|
|
59
|
-
for (var i = 0, l = data.length; i < l; i += 1) {
|
|
60
|
-
if (data[i] > threshold) {
|
|
61
|
-
peaks.push(i);
|
|
62
|
-
i += 1e4;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return peaks;
|
|
66
|
-
}
|
|
67
|
-
function identifyIntervals(peaks) {
|
|
68
|
-
var intervals = [];
|
|
69
|
-
peaks.forEach(function(peak, index) {
|
|
70
|
-
var _loop = function _loop2(i2) {
|
|
71
|
-
var interval = peaks[index + i2] - peak;
|
|
72
|
-
var foundInterval = intervals.some(function(intervalCount) {
|
|
73
|
-
if (intervalCount.interval === interval) {
|
|
74
|
-
return intervalCount.count += 1;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
if (!foundInterval) {
|
|
78
|
-
intervals.push({
|
|
79
|
-
interval,
|
|
80
|
-
count: 1
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
for (var i = 0; i < 10; i += 1) {
|
|
85
|
-
_loop(i);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
return intervals;
|
|
89
|
-
}
|
|
90
|
-
function groupByTempo(sampleRate) {
|
|
91
|
-
return function(intervalCounts) {
|
|
92
|
-
var tempoCounts = [];
|
|
93
|
-
intervalCounts.forEach(function(intervalCount) {
|
|
94
|
-
if (intervalCount.interval !== 0) {
|
|
95
|
-
var theoreticalTempo = 60 / (intervalCount.interval / sampleRate);
|
|
96
|
-
while (theoreticalTempo < 90) {
|
|
97
|
-
theoreticalTempo *= 2;
|
|
98
|
-
}
|
|
99
|
-
while (theoreticalTempo > 180) {
|
|
100
|
-
theoreticalTempo /= 2;
|
|
101
|
-
}
|
|
102
|
-
theoreticalTempo = Math.round(theoreticalTempo);
|
|
103
|
-
var foundTempo = tempoCounts.some(function(tempoCount) {
|
|
104
|
-
if (tempoCount.tempo === theoreticalTempo) {
|
|
105
|
-
return tempoCount.count += intervalCount.count;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
if (!foundTempo) {
|
|
109
|
-
tempoCounts.push({
|
|
110
|
-
tempo: theoreticalTempo,
|
|
111
|
-
count: intervalCount.count
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return tempoCounts;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
// ../../node_modules/.bun/bpm-detective@2.0.5/node_modules/bpm-detective/lib/index.js
|
|
123
|
-
var require_lib = __commonJS({
|
|
124
|
-
"../../node_modules/.bun/bpm-detective@2.0.5/node_modules/bpm-detective/lib/index.js"(exports, module) {
|
|
125
|
-
module.exports = require_detect().default;
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
export default require_lib();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as P}from"./index-X_d1b5vz.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var h=e[o+x]-t,_=r.some(function(g){if(g.interval===h)return g.count+=1});_||r.push({interval:h,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|