const ddWaveCss = ` .dd-wave { display: inline-flex; align-items: center; gap: 3px; } .dd-wave i { display: block; width: 3px; border-radius: 2px; background: currentColor; } .dd-wave--active i { animation: dd-wave-bounce 0.9s var(--ease-in-out) infinite alternate; } @keyframes dd-wave-bounce { from { transform: scaleY(0.35); } to { transform: scaleY(1); } } @media (prefers-reduced-motion: reduce) { .dd-wave--active i { animation: none; } } `; if (typeof document !== 'undefined' && !document.getElementById('dd-wave-css')) { const s = document.createElement('style'); s.id = 'dd-wave-css'; s.textContent = ddWaveCss; document.head.appendChild(s); } const DD_WAVE_PATTERN = [0.3, 0.55, 0.85, 0.45, 0.7, 1, 0.4, 0.6, 0.25, 0.8, 0.5, 0.35]; export function Waveform({ bars = 12, active = false, height = 26, color = 'var(--accent)', style }) { const items = []; for (let i = 0; i < bars; i++) { const h = Math.round(DD_WAVE_PATTERN[i % DD_WAVE_PATTERN.length] * height); items.push(); } return ( ); }