ecplayer 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ecp-full-width{width:100%}.ecp-h-full{height:100%}.ecp-relative{position:relative}.ecp-absolute{position:absolute}.ecp-inset-0{top:0;right:0;bottom:0;left:0}.ecp-z-10{z-index:10}.ecp-flex{display:flex}.ecp-inline-flex{display:inline-flex}.ecp-flex-col{flex-direction:column}.ecp-flex-wrap{flex-wrap:wrap}.ecp-flex-1{flex:1 1 0%}.ecp-flex-shrink-0{flex-shrink:0}.ecp-grid{display:grid}.ecp-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ecp-hidden{display:none}.ecp-items-center{align-items:center}.ecp-items-end{align-items:flex-end}.ecp-items-start{align-items:flex-start}.ecp-justify-center{justify-content:center}.ecp-justify-between{justify-content:space-between}.ecp-justify-end{justify-content:flex-end}.ecp-justify-start{justify-content:flex-start}.ecp-text-center{text-align:center}.ecp-text-right{text-align:right}.ecp-self-center{align-self:center}.ecp-gap-1{gap:.25rem}.ecp-gap-2{gap:.5rem}.ecp-gap-3{gap:.75rem}.ecp-gap-px{gap:1px}.ecp-gap-05{gap:2px}.ecp-mb-1{margin-bottom:.25rem}.ecp-mb-2{margin-bottom:.5rem}.ecp-mb-4{margin-bottom:1rem}.ecp-mb-6{margin-bottom:1.5rem}.ecp-mr-2{margin-right:.5rem}.ecp-mt-4{margin-top:1rem}.ecp-mt-6{margin-top:1.5rem}.ecp-ml-auto{margin-left:auto}.ecp-p-1{padding:.25rem}.ecp-p-1-5{padding:.375rem}.ecp-p-2{padding:.5rem}.ecp-p-3{padding:.75rem}.ecp-p-4{padding:1rem}.ecp-p-6{padding:1.5rem}.ecp-p-8{padding:2rem}.ecp-px-2{padding-left:.5rem;padding-right:.5rem}.ecp-px-3{padding-left:.75rem;padding-right:.75rem}.ecp-px-4{padding-left:1rem;padding-right:1rem}.ecp-px-6{padding-left:1.5rem;padding-right:1.5rem}.ecp-py-1{padding-top:.25rem;padding-bottom:.25rem}.ecp-py-2{padding-top:.5rem;padding-bottom:.5rem}.ecp-py-3{padding-top:.75rem;padding-bottom:.75rem}.ecp-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.ecp-pb-2{padding-bottom:.5rem}.ecp-pt-2{padding-top:.5rem}.ecp-w-1{width:.25rem}.ecp-w-3{width:.75rem}.ecp-w-4{width:1rem}.ecp-w-10{width:2.5rem}.ecp-w-12{width:3rem}.ecp-w-20{width:5rem}.ecp-w-24{width:6rem}.ecp-w-px{width:1px}.ecp-w-full{width:100%}.ecp-max-w-xs{max-width:20rem}.ecp-max-w-lg{max-width:32rem}.ecp-max-w-4xl{max-width:56rem}.ecp-h-0-5{height:.125rem}.ecp-h-1{height:.25rem}.ecp-h-1-5{height:.375rem}.ecp-h-2{height:.5rem}.ecp-h-3{height:.75rem}.ecp-h-4{height:1rem}.ecp-h-6{height:1.5rem}.ecp-h-8{height:2rem}.ecp-h-10{height:2.5rem}.ecp-h-12{height:3rem}.ecp-h-20{height:5rem}.ecp-h-40{width:10rem;height:40px}.ecp-h-64{height:16rem}.ecp-h-screen{height:100vh}.ecp-min-h-screen{min-height:100vh}.ecp-min-h-0{min-height:0}.ecp-min-w-12{min-width:3rem}.ecp-min-w-0{min-width:0}.ecp-aspect-square{aspect-ratio:1 / 1}.ecp-text-xs{font-size:.75rem;line-height:1rem}.ecp-text-sm{font-size:.875rem;line-height:1.25rem}.ecp-text-lg{font-size:1.125rem;line-height:1.75rem}.ecp-text-2xl{font-size:1.5rem;line-height:2rem}.ecp-font-medium{font-weight:500}.ecp-font-semibold{font-weight:600}.ecp-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-text-white{color:#fff}.ecp-text-transparent{color:transparent}.ecp-text-gray-400{color:#9ca3af}.ecp-text-gray-500{color:#6b7280}.ecp-text-gray-600{color:#4b5563}.ecp-text-gray-700{color:#374151}.ecp-text-gray-800{color:#1f2937}.ecp-text-gray-100{color:#f3f4f6}.ecp-text-gray-200{color:#e5e7eb}.ecp-text-gray-300{color:#d1d5db}.ecp-text-red-500{color:#ef4444}.ecp-dark .ecp-text-dark-100{color:#f3f4f6}.ecp-dark .ecp-text-dark-200{color:#e5e7eb}.ecp-dark .ecp-text-dark-300{color:#d1d5db}.ecp-bg-white{background-color:#fff}.ecp-bg-black-20{background-color:#0003}.ecp-bg-black-30{background-color:#0000004d}.ecp-bg-black-40{background-color:#0006}.ecp-bg-black-50{background-color:#00000080}.ecp-bg-gray-100{background-color:#f3f4f6}.ecp-bg-gray-200{background-color:#e5e7eb}.ecp-bg-gray-300{background-color:#d1d5db}.ecp-bg-gray-700{background-color:#374151}.ecp-bg-gray-800{background-color:#1f2937}.ecp-bg-red-50{background-color:#fef2f2}.ecp-bg-transparent{background-color:transparent}.ecp-border{border-width:1px}.ecp-border-2{border-width:2px}.ecp-border-r{border-right-width:1px}.ecp-border-transparent{border-color:transparent}.ecp-border-gray-300{border-color:#d1d5db}.ecp-border-red-300{border-color:#fca5a5}.ecp-border-current{border-color:currentColor}.ecp-border-none{border:none}.ecp-outline-none{outline:none}.ecp-rounded{border-radius:.25rem}.ecp-rounded-lg{border-radius:.5rem}.ecp-rounded-xl{border-radius:.75rem}.ecp-rounded-2xl{border-radius:1rem}.ecp-rounded-full{border-radius:9999px}.ecp-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ecp-shadow-sm{box-shadow:0 1px 2px #0000000d}.ecp-shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.ecp-shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.ecp-opacity-20{opacity:.2}.ecp-opacity-40{opacity:.4}.ecp-opacity-70{opacity:.7}.ecp-opacity-80{opacity:.8}.ecp-cursor-pointer{cursor:pointer}.ecp-cursor-not-allowed{cursor:not-allowed}.ecp-pointer-events-none{pointer-events:none}.ecp-transition{transition-property:color,background-color,border-color,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ecp-transition-all{transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-duration-75{transition-duration:75ms}.ecp-duration-100{transition-duration:.1s}.ecp-duration-150{transition-duration:.15s}.ecp-duration-300{transition-duration:.3s}.ecp-scale-0{transform:scale(0)}.ecp-translate-y-10{transform:translateY(2.5rem)}.ecp--translate-y-10{transform:translateY(-2.5rem)}.ecp-rotate-180{transform:rotate(180deg)}.ecp-hover-scale-105:hover{transform:scale(1.05)}.ecp-hover-scale-110:hover{transform:scale(1.1)}@keyframes ecp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ecp-animation-spin{animation:ecp-spin 15s infinite linear}.ecp-object-contain{-o-object-fit:contain;object-fit:contain}.ecp-backdrop-blur-xl{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-overflow-hidden{overflow:hidden}.ecp-top-0{top:0}.ecp-left-0{left:0}.ecp-fixed{position:fixed}.ecp-z-9999{z-index:9999}.ecp-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.ecp-page-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}@media (min-width: 768px){.ecp-page-wrapper{padding:2rem}}.ecp-demo-container{width:100%;height:100%}@media (min-width: 768px){.ecp-demo-container{height:auto;max-width:56rem}}.ecp-container-glass{border-radius:.75rem;padding:2rem}.ecp-demo-header{margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:flex-start}.ecp-demo-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin-bottom:.25rem}.ecp-demo-title--dark{color:#e5e7eb}.ecp-demo-subtitle{font-size:.875rem;color:#6b7280}.ecp-theme-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-theme-btn:hover{background:#f9fafb}.ecp-demo-actions{margin-top:1.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-action-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1.5rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-action-btn:hover{background:#f9fafb}.ecp-file-input-hidden{display:none}.ecp-theme-selector-panel{border-radius:.75rem;padding:1.5rem;margin-bottom:1.5rem}.ecp-theme-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.ecp-theme-selector-title{font-size:1.125rem;font-weight:600;color:#1f2937}.ecp-theme-selector-close{color:#6b7280;font-size:.875rem;font-weight:500;background:none;border:none;cursor:pointer}.ecp-theme-selector-close:hover{color:#374151}.ecp-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media (min-width: 640px){.ecp-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.ecp-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.ecp-theme-card{background:#fff;padding:1rem;border-radius:.5rem;cursor:pointer;border:2px solid transparent;transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-theme-card--active{border-color:currentColor;box-shadow:0 10px 15px -3px #0000001a}.ecp-theme-color-preview{height:2.5rem;border-radius:.25rem;margin-bottom:.5rem}.ecp-theme-name{font-size:.875rem;font-weight:500;color:#374151}.ecp-vp-wrapper{width:100%;border-radius:.75rem;overflow:hidden}.ecp-vp-bg{padding:1rem}.ecp-vp-vu-outer{position:relative}.ecp-vp-vu-bg{border-radius:.5rem;margin-bottom:1.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d}.ecp-vp-vu-bg--light{background:#ffffffb3}.ecp-vp-vu-bg--dark{background:#0006}.ecp-vp-vu-bg--transparent{background:transparent!important;padding:0!important;box-shadow:none!important}.ecp-vp-vu-bg--dimmed{opacity:.3}.ecp-vp-vu-bg--no-margin{margin-bottom:0}.ecp-vp-vu-bars{display:flex;justify-content:center;align-items:flex-end;gap:.25rem;height:16rem}.ecp-vp-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-vp-eq-overlay--light{background:#fffc}.ecp-vp-eq-overlay--dark{background:#00000080}.ecp-vp-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-vp-eq-title--light{color:#374151}.ecp-vp-eq-title--dark{color:#e5e7eb}.ecp-vp-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-vp-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-vp-eq-band-label{font-size:.75rem}.ecp-vp-eq-band-label--light{color:#4b5563}.ecp-vp-eq-band-label--dark{color:#d1d5db}.ecp-vp-eq-band-range{display:flex;align-items:center;gap:.75rem}.ecp-vp-eq-range-bound{font-size:.75rem}.ecp-vp-eq-range-bound--light{color:#6b7280}.ecp-vp-eq-range-bound--dark{color:#9ca3af}.ecp-vp-eq-slider{flex:1;height:2rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-footer{display:flex;justify-content:flex-end;margin-top:1rem}.ecp-vp-eq-reset{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;transition:all .15s;border:none}.ecp-vp-eq-reset--light{background:#e5e7eb;color:#374151}.ecp-vp-eq-reset--light:hover{background:#d1d5db}.ecp-vp-eq-reset--dark{background:#374151;color:#e5e7eb}.ecp-vp-eq-reset--dark:hover{background:#4b5563}.ecp-vp-track{margin-bottom:1.5rem;display:flex;align-items:center}.ecp-vp-thumbnail-wrap{margin-right:.5rem;width:3rem;flex-shrink:0}.ecp-vp-thumbnail{height:3rem;width:3rem;border-radius:9999px}.ecp-vp-track-info{width:100%;min-width:0}.ecp-vp-track-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-vp-track-name--light{color:#374151}.ecp-vp-track-name--dark{color:#f3f4f6}.ecp-vp-track-author{font-size:.75rem}.ecp-vp-track-author--light{color:#6b7280}.ecp-vp-track-author--dark{color:#d1d5db}.ecp-vp-seekbar{margin-bottom:1.5rem}.ecp-vp-seekbar-row{display:flex;align-items:center;gap:.25rem}.ecp-vp-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-vp-time--right{text-align:right}.ecp-vp-time--light{color:#4b5563}.ecp-vp-time--dark{color:#f3f4f6}.ecp-vp-seek-input{flex:1;height:.5rem;background:#e5e7eb;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-seek-input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-vp-controls--sm{gap:.5rem}.ecp-vp-play-btn{padding:.5rem 1rem;min-width:6rem;border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s}.ecp-vp-play-btn:hover{opacity:.9}.ecp-vp-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-play-btn--compact{padding:1.25rem .75rem;min-width:unset}.ecp-vp-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-vp-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-stop-btn--light{background:#374151;color:#fff}.ecp-vp-stop-btn--light:hover{background:#1f2937}.ecp-vp-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-vp-stop-btn--dark:hover{background:#d1d5db}.ecp-vp-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-stop-btn--wide{padding:.5rem 1rem}.ecp-vp-eq-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-eq-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-eq-btn--off:hover{background:#d1d5db}.ecp-vp-eq-btn--on{color:#fff}.ecp-vp-eq-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-eq-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-loop-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-loop-btn--off:hover{background:#d1d5db}.ecp-vp-loop-btn--on{color:#fff}.ecp-vp-loop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-loop-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-icon--active{transform:rotate(180deg)}.ecp-vp-speed-wrap{display:flex;align-items:center}.ecp-vp-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;transition:all .15s;background:transparent}.ecp-vp-speed-select--light{color:#1f2937}.ecp-vp-speed-select--dark{color:#e5e7eb}.ecp-vp-speed-option--light{background:#fff;color:#1f2937}.ecp-vp-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-vp-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-vp-volume{gap:.75rem}}.ecp-vp-mute-btn{padding:.5rem;border-radius:9999px;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-vp-mute-btn:hover{background:#f3f4f680}.ecp-vp-mute-icon--light{color:#4b5563}.ecp-vp-mute-icon--dark{color:#f3f4f6}.ecp-vp-volume-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-volume-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-vp-volume-slider{display:none}}.ecp-vp-volume-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-vp-volume-pct--light{color:#374151}.ecp-vp-volume-pct--dark{color:#f3f4f6}.ecp-vp-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-wave-outer{width:100%;max-width:32rem;position:relative}.ecp-wave-audio-el{display:none}.ecp-wave-card{border-radius:1rem;box-shadow:0 25px 50px -12px #00000040}.ecp-wave-card-inner{border-radius:1rem;padding:1.5rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-wave-thumbnail-wrap{width:100%;padding:1rem}.ecp-wave-thumbnail{width:100%;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-wave-seek{position:relative;height:5rem;margin-bottom:1.5rem;cursor:pointer}.ecp-wave-bars{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;height:100%;width:100%;gap:1px}.ecp-wave-bar{width:.25rem;border-radius:.25rem .25rem 0 0;transition:all .15s}.ecp-wave-progress-line{position:absolute;top:0;height:100%;width:.25rem;background:#fff;border-right:1px solid black;border-radius:9999px;transition:all .15s;transform:translate(-50%)}.ecp-wave-times{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:1.5rem}.ecp-wave-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;justify-content:space-between;margin-bottom:1rem}.ecp-wave-left-controls{display:flex;align-items:center;gap:.5rem}.ecp-wave-vol-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-vol-slider{width:5rem;height:.375rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 3px #0003}.ecp-wave-vol-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none}.ecp-wave-center-controls{display:flex;justify-content:center}.ecp-wave-play-btn{padding:1rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s;box-shadow:0 10px 15px -3px #0000001a}.ecp-wave-play-btn:hover{transform:scale(1.05)}.ecp-wave-right-controls{display:flex;align-items:center;gap:.75rem}.ecp-wave-speed-select{padding:.25rem .5rem;border-radius:.5rem;font-size:.875rem;border:none;cursor:pointer}.ecp-wave-speed-select--light{background:#f3f4f6;color:#374151}.ecp-wave-speed-select--dark{background:#1f2937;color:#f3f4f6}.ecp-wave-eq-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:1rem;padding:1rem}.ecp-wave-eq-panel{max-width:20rem;width:100%;padding:.5rem 1rem 1rem;border-radius:.75rem}.ecp-wave-eq-panel--light{background:#fff}.ecp-wave-eq-panel--dark{background:#1f2937}.ecp-wave-eq-title{font-size:1.125rem;font-weight:500;margin-bottom:.5rem}.ecp-wave-eq-title--light{color:#374151}.ecp-wave-eq-title--dark{color:#e5e7eb}.ecp-wave-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-wave-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-wave-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-wave-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-wave-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-wave-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-wave-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-wave-eq-slider{flex:1;height:1rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-wave-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-wave-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-wave-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-wave-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-wave-eq-footer-btn--light:hover{background:#d1d5db}.ecp-wave-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-wave-eq-footer-btn--dark:hover{background:#4b5563}.ecp-wave-error{padding:1.5rem;border-radius:.75rem;text-align:center}.ecp-wave-error-title{font-weight:500}.ecp-wave-error-msg{font-size:.875rem}.ecp-wave-error--light{color:#dc2626}.ecp-wave-error--dark{color:#fca5a5}.ecp-nano-wrapper{position:relative;overflow:hidden;display:inline-flex;flex-direction:column;padding:.5rem .75rem;box-shadow:0 10px 15px -3px #0000001a}.ecp-nano-wrapper--pill{border-radius:9999px;width:110px;height:40px}.ecp-nano-wrapper--card{border-radius:1rem;width:120px;height:150px}.ecp-nano-progress-bg{position:absolute;top:0;left:0;height:100%;opacity:.2}.ecp-nano-content{position:absolute;display:flex;flex-direction:column}.ecp-nano-thumbnail-wrap{width:6rem;padding-bottom:.5rem}.ecp-nano-thumbnail{width:6rem;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-nano-row{display:flex;align-items:center;gap:.5rem}.ecp-nano-play-btn{padding:.375rem;border-radius:9999px;border:none;cursor:pointer;flex-shrink:0;transition:transform .15s}.ecp-nano-play-btn:hover{transform:scale(1.1)}.ecp-nano-waveform{display:flex;width:100%;min-width:3rem;align-items:center;gap:2px;height:1.5rem}.ecp-nano-wave-bar{border-radius:9999px;width:100%;transition:height .2s}.ecp-video-wrapper{border-radius:.75rem;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-video-wrapper--fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;height:100vh;width:100vw;background:#000}.ecp-video-inner{height:auto}.ecp-video-inner--fullscreen{display:flex;flex-direction:column;flex:1;min-height:0}.ecp-video-inner--padded{padding:1rem}.ecp-video-name{margin-bottom:1rem;font-weight:500}.ecp-video-name--light{color:#374151}.ecp-video-name--dark{color:#f3f4f6}.ecp-video-layout{position:relative;margin-bottom:1rem}.ecp-video-layout--row{display:flex;gap:.75rem}.ecp-video-layout--col{display:flex;flex-direction:column;gap:.75rem}.ecp-video-layout--fullscreen{flex:1;min-height:0}.ecp-video-vu-top,.ecp-video-vu-bottom{width:100%;height:3rem}.ecp-video-vu-side{width:3rem;background:#00000080;border-radius:.5rem;padding:.25rem}.ecp-video-el-wrap{flex:1;border-radius:.5rem;overflow:hidden;position:relative}.ecp-video-el-wrap--light{background:#ffffffb3}.ecp-video-el-wrap--dark{background:#000000b3}.ecp-video-el{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ecp-video-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel{max-width:600px;width:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:center;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel--light{background:#fffc}.ecp-video-eq-panel--dark{background:#000000b3}.ecp-video-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-video-eq-title--light{color:#374151}.ecp-video-eq-title--dark{color:#e5e7eb}.ecp-video-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-video-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-video-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-video-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-video-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-video-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-video-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-video-eq-slider{flex:1;height:1.5rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-video-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-video-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-video-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-video-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-video-eq-footer-btn--light:hover{background:#d1d5db}.ecp-video-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-video-eq-footer-btn--dark:hover{background:#4b5563}.ecp-video-seekbar{margin-bottom:1rem}.ecp-video-seekbar--fullscreen{margin-top:.75rem}.ecp-video-seekbar-row{display:flex;align-items:center;gap:.75rem}.ecp-video-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-video-time--right{text-align:right}.ecp-video-time--light{color:#4b5563}.ecp-video-time--dark{color:#f3f4f6}.ecp-video-seek-input{flex:1;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-video-seek-input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-video-play-btn{border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s;padding:.5rem 1rem}.ecp-video-play-btn:hover{opacity:.9}.ecp-video-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-play-btn--compact{padding:1.25rem .75rem}.ecp-video-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-video-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-stop-btn--light{background:#374151;color:#fff}.ecp-video-stop-btn--light:hover{background:#1f2937}.ecp-video-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-video-stop-btn--dark:hover{background:#d1d5db}.ecp-video-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-fullscreen-btn{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s;padding:.75rem}.ecp-video-fullscreen-btn--light{background:#374151;color:#fff}.ecp-video-fullscreen-btn--light:hover{background:#1f2937}.ecp-video-fullscreen-btn--dark{background:#f3f4f6;color:#000}.ecp-video-fullscreen-btn--dark:hover{background:#d1d5db}.ecp-video-fullscreen-btn--wide{padding:.5rem 1rem}.ecp-video-eq-toggle-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-eq-toggle-btn--off{background:#f3f4f6;color:#374151}.ecp-video-eq-toggle-btn--off:hover{background:#d1d5db}.ecp-video-eq-toggle-btn--on{color:#fff}.ecp-video-eq-toggle-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-eq-toggle-btn--wide{padding:.5rem 1rem}.ecp-video-speed-wrap{display:flex;align-items:center}.ecp-video-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;background:transparent;transition:all .15s}.ecp-video-speed-select--light{color:#1f2937}.ecp-video-speed-select--dark{color:#e5e7eb}.ecp-video-speed-option--light{background:#f3f4f6;color:#1f2937}.ecp-video-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-video-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-video-volume{gap:.75rem}}.ecp-video-mute-btn{padding:.5rem;border-radius:.5rem;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-video-mute-btn:hover{background:#f3f4f6}.ecp-video-mute-icon--light{color:#4b5563}.ecp-video-mute-icon--dark{color:#f3f4f6}.ecp-video-vol-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-vol-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-video-vol-slider{display:none}}.ecp-video-vol-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-video-vol-pct--light{color:#374151}.ecp-video-vol-pct--dark{color:#f3f4f6}.ecp-video-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-vu-bar-wrap{flex:1;height:100%;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.ecp-vu-bar-fill{border-radius:.25rem .25rem 0 0;transition:height 75ms}.ecp-vu-peak-line{position:absolute;width:100%;height:2px;transition:top .1s}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { jsx as e, Fragment as Ve, jsxs as c } from "react/jsx-runtime";
3
- import { forwardRef as Qe, createElement as Ie, useState as m, useRef as b, useEffect as $ } from "react";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ecp-full-width{width:100%}.ecp-h-full{height:100%}.ecp-relative{position:relative}.ecp-absolute{position:absolute}.ecp-inset-0{top:0;right:0;bottom:0;left:0}.ecp-z-10{z-index:10}.ecp-flex{display:flex}.ecp-inline-flex{display:inline-flex}.ecp-flex-col{flex-direction:column}.ecp-flex-wrap{flex-wrap:wrap}.ecp-flex-1{flex:1 1 0%}.ecp-flex-shrink-0{flex-shrink:0}.ecp-grid{display:grid}.ecp-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ecp-hidden{display:none}.ecp-items-center{align-items:center}.ecp-items-end{align-items:flex-end}.ecp-items-start{align-items:flex-start}.ecp-justify-center{justify-content:center}.ecp-justify-between{justify-content:space-between}.ecp-justify-end{justify-content:flex-end}.ecp-justify-start{justify-content:flex-start}.ecp-text-center{text-align:center}.ecp-text-right{text-align:right}.ecp-self-center{align-self:center}.ecp-gap-1{gap:.25rem}.ecp-gap-2{gap:.5rem}.ecp-gap-3{gap:.75rem}.ecp-gap-px{gap:1px}.ecp-gap-05{gap:2px}.ecp-mb-1{margin-bottom:.25rem}.ecp-mb-2{margin-bottom:.5rem}.ecp-mb-4{margin-bottom:1rem}.ecp-mb-6{margin-bottom:1.5rem}.ecp-mr-2{margin-right:.5rem}.ecp-mt-4{margin-top:1rem}.ecp-mt-6{margin-top:1.5rem}.ecp-ml-auto{margin-left:auto}.ecp-p-1{padding:.25rem}.ecp-p-1-5{padding:.375rem}.ecp-p-2{padding:.5rem}.ecp-p-3{padding:.75rem}.ecp-p-4{padding:1rem}.ecp-p-6{padding:1.5rem}.ecp-p-8{padding:2rem}.ecp-px-2{padding-left:.5rem;padding-right:.5rem}.ecp-px-3{padding-left:.75rem;padding-right:.75rem}.ecp-px-4{padding-left:1rem;padding-right:1rem}.ecp-px-6{padding-left:1.5rem;padding-right:1.5rem}.ecp-py-1{padding-top:.25rem;padding-bottom:.25rem}.ecp-py-2{padding-top:.5rem;padding-bottom:.5rem}.ecp-py-3{padding-top:.75rem;padding-bottom:.75rem}.ecp-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.ecp-pb-2{padding-bottom:.5rem}.ecp-pt-2{padding-top:.5rem}.ecp-w-1{width:.25rem}.ecp-w-3{width:.75rem}.ecp-w-4{width:1rem}.ecp-w-10{width:2.5rem}.ecp-w-12{width:3rem}.ecp-w-20{width:5rem}.ecp-w-24{width:6rem}.ecp-w-px{width:1px}.ecp-w-full{width:100%}.ecp-max-w-xs{max-width:20rem}.ecp-max-w-lg{max-width:32rem}.ecp-max-w-4xl{max-width:56rem}.ecp-h-0-5{height:.125rem}.ecp-h-1{height:.25rem}.ecp-h-1-5{height:.375rem}.ecp-h-2{height:.5rem}.ecp-h-3{height:.75rem}.ecp-h-4{height:1rem}.ecp-h-6{height:1.5rem}.ecp-h-8{height:2rem}.ecp-h-10{height:2.5rem}.ecp-h-12{height:3rem}.ecp-h-20{height:5rem}.ecp-h-40{width:10rem;height:40px}.ecp-h-64{height:16rem}.ecp-h-screen{height:100vh}.ecp-min-h-screen{min-height:100vh}.ecp-min-h-0{min-height:0}.ecp-min-w-12{min-width:3rem}.ecp-min-w-0{min-width:0}.ecp-aspect-square{aspect-ratio:1 / 1}.ecp-text-xs{font-size:.75rem;line-height:1rem}.ecp-text-sm{font-size:.875rem;line-height:1.25rem}.ecp-text-lg{font-size:1.125rem;line-height:1.75rem}.ecp-text-2xl{font-size:1.5rem;line-height:2rem}.ecp-font-medium{font-weight:500}.ecp-font-semibold{font-weight:600}.ecp-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-text-white{color:#fff}.ecp-text-transparent{color:transparent}.ecp-text-gray-400{color:#9ca3af}.ecp-text-gray-500{color:#6b7280}.ecp-text-gray-600{color:#4b5563}.ecp-text-gray-700{color:#374151}.ecp-text-gray-800{color:#1f2937}.ecp-text-gray-100{color:#f3f4f6}.ecp-text-gray-200{color:#e5e7eb}.ecp-text-gray-300{color:#d1d5db}.ecp-text-red-500{color:#ef4444}.ecp-dark .ecp-text-dark-100{color:#f3f4f6}.ecp-dark .ecp-text-dark-200{color:#e5e7eb}.ecp-dark .ecp-text-dark-300{color:#d1d5db}.ecp-bg-white{background-color:#fff}.ecp-bg-black-20{background-color:#0003}.ecp-bg-black-30{background-color:#0000004d}.ecp-bg-black-40{background-color:#0006}.ecp-bg-black-50{background-color:#00000080}.ecp-bg-gray-100{background-color:#f3f4f6}.ecp-bg-gray-200{background-color:#e5e7eb}.ecp-bg-gray-300{background-color:#d1d5db}.ecp-bg-gray-700{background-color:#374151}.ecp-bg-gray-800{background-color:#1f2937}.ecp-bg-red-50{background-color:#fef2f2}.ecp-bg-transparent{background-color:transparent}.ecp-border{border-width:1px}.ecp-border-2{border-width:2px}.ecp-border-r{border-right-width:1px}.ecp-border-transparent{border-color:transparent}.ecp-border-gray-300{border-color:#d1d5db}.ecp-border-red-300{border-color:#fca5a5}.ecp-border-current{border-color:currentColor}.ecp-border-none{border:none}.ecp-outline-none{outline:none}.ecp-rounded{border-radius:.25rem}.ecp-rounded-lg{border-radius:.5rem}.ecp-rounded-xl{border-radius:.75rem}.ecp-rounded-2xl{border-radius:1rem}.ecp-rounded-full{border-radius:9999px}.ecp-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ecp-shadow-sm{box-shadow:0 1px 2px #0000000d}.ecp-shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.ecp-shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.ecp-opacity-20{opacity:.2}.ecp-opacity-40{opacity:.4}.ecp-opacity-70{opacity:.7}.ecp-opacity-80{opacity:.8}.ecp-cursor-pointer{cursor:pointer}.ecp-cursor-not-allowed{cursor:not-allowed}.ecp-pointer-events-none{pointer-events:none}.ecp-transition{transition-property:color,background-color,border-color,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ecp-transition-all{transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-duration-75{transition-duration:75ms}.ecp-duration-100{transition-duration:.1s}.ecp-duration-150{transition-duration:.15s}.ecp-duration-300{transition-duration:.3s}.ecp-scale-0{transform:scale(0)}.ecp-translate-y-10{transform:translateY(2.5rem)}.ecp--translate-y-10{transform:translateY(-2.5rem)}.ecp-rotate-180{transform:rotate(180deg)}.ecp-hover-scale-105:hover{transform:scale(1.05)}.ecp-hover-scale-110:hover{transform:scale(1.1)}@keyframes ecp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ecp-animation-spin{animation:ecp-spin 15s infinite linear}.ecp-object-contain{-o-object-fit:contain;object-fit:contain}.ecp-backdrop-blur-xl{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-overflow-hidden{overflow:hidden}.ecp-top-0{top:0}.ecp-left-0{left:0}.ecp-fixed{position:fixed}.ecp-z-9999{z-index:9999}.ecp-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.ecp-page-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}@media (min-width: 768px){.ecp-page-wrapper{padding:2rem}}.ecp-demo-container{width:100%;height:100%}@media (min-width: 768px){.ecp-demo-container{height:auto;max-width:56rem}}.ecp-container-glass{border-radius:.75rem;padding:2rem}.ecp-demo-header{margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:flex-start}.ecp-demo-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin-bottom:.25rem}.ecp-demo-title--dark{color:#e5e7eb}.ecp-demo-subtitle{font-size:.875rem;color:#6b7280}.ecp-theme-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-theme-btn:hover{background:#f9fafb}.ecp-demo-actions{margin-top:1.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-action-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1.5rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-action-btn:hover{background:#f9fafb}.ecp-file-input-hidden{display:none}.ecp-theme-selector-panel{border-radius:.75rem;padding:1.5rem;margin-bottom:1.5rem}.ecp-theme-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.ecp-theme-selector-title{font-size:1.125rem;font-weight:600;color:#1f2937}.ecp-theme-selector-close{color:#6b7280;font-size:.875rem;font-weight:500;background:none;border:none;cursor:pointer}.ecp-theme-selector-close:hover{color:#374151}.ecp-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media (min-width: 640px){.ecp-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.ecp-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.ecp-theme-card{background:#fff;padding:1rem;border-radius:.5rem;cursor:pointer;border:2px solid transparent;transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-theme-card--active{border-color:currentColor;box-shadow:0 10px 15px -3px #0000001a}.ecp-theme-color-preview{height:2.5rem;border-radius:.25rem;margin-bottom:.5rem}.ecp-theme-name{font-size:.875rem;font-weight:500;color:#374151}.ecp-vp-wrapper{width:100%;border-radius:.75rem;overflow:hidden}.ecp-vp-bg{padding:1rem}.ecp-vp-vu-outer{position:relative}.ecp-vp-vu-bg{border-radius:.5rem;margin-bottom:1.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d}.ecp-vp-vu-bg--light{background:#ffffffb3}.ecp-vp-vu-bg--dark{background:#0006}.ecp-vp-vu-bg--transparent{background:transparent!important;padding:0!important;box-shadow:none!important}.ecp-vp-vu-bg--dimmed{opacity:.3}.ecp-vp-vu-bg--no-margin{margin-bottom:0}.ecp-vp-vu-bars{display:flex;justify-content:center;align-items:flex-end;gap:.25rem;height:16rem}.ecp-vp-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-vp-eq-overlay--light{background:#ffffffe6}.ecp-vp-eq-overlay--dark{background:#000000b3}.ecp-vp-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-vp-eq-title--light{color:#374151}.ecp-vp-eq-title--dark{color:#e5e7eb}.ecp-vp-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-vp-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-vp-eq-band-label{font-size:.75rem}.ecp-vp-eq-band-label--light{color:#4b5563}.ecp-vp-eq-band-label--dark{color:#d1d5db}.ecp-vp-eq-band-range{display:flex;align-items:center;gap:.75rem}.ecp-vp-eq-range-bound{font-size:.75rem}.ecp-vp-eq-range-bound--light{color:#6b7280}.ecp-vp-eq-range-bound--dark{color:#9ca3af}.ecp-vp-eq-slider{flex:1;height:2rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-footer{display:flex;justify-content:flex-end;margin-top:1rem}.ecp-vp-eq-reset{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;transition:all .15s;border:none}.ecp-vp-eq-reset--light{background:#e5e7eb;color:#374151}.ecp-vp-eq-reset--light:hover{background:#d1d5db}.ecp-vp-eq-reset--dark{background:#374151;color:#e5e7eb}.ecp-vp-eq-reset--dark:hover{background:#4b5563}.ecp-vp-8d-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.ecp-vp-8d-title-group,.ecp-vp-8d-toggle-wrap{display:flex;align-items:center;gap:.5rem}.ecp-vp-8d-toggle-label{font-size:.75rem;font-weight:500}.ecp-vp-8d-toggle-label--light{color:#4b5563}.ecp-vp-8d-toggle-label--dark{color:#d1d5db}.ecp-vp-8d-toggle{position:relative;width:2.75rem;height:1.5rem;border-radius:9999px;background:#d1d5db;cursor:pointer;border:none;transition:background .2s}.ecp-vp-8d-toggle--on{background:var(--theme-slider, #8b5cf6)}.ecp-vp-8d-toggle-thumb{position:absolute;top:.125rem;left:.125rem;width:1.25rem;height:1.25rem;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px #0000004d}.ecp-vp-8d-toggle--on .ecp-vp-8d-toggle-thumb{transform:translate(1.25rem)}.ecp-vp-8d-visualizer{position:relative;height:4.5rem;margin-bottom:.75rem;border-radius:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.ecp-vp-8d-visualizer--light{background:#0000000a}.ecp-vp-8d-visualizer--dark{background:#ffffff0f}.ecp-vp-8d-orbit-ring{position:absolute;width:6rem;height:3rem;border:1.5px dashed var(--theme-slider-alpha, rgba(139, 92, 246, .4));border-radius:50%}.ecp-vp-8d-head-icon{position:relative;z-index:2;color:var(--theme-slider, #8b5cf6)}.ecp-vp-8d-orbit-dot{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--theme-slider, #8b5cf6);box-shadow:0 0 10px var(--theme-slider, #8b5cf6),0 0 15px var(--theme-slider, #8b5cf6);z-index:3}.ecp-vp-8d-live-overlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5;display:flex;flex-direction:column;align-items:center;gap:.3rem;pointer-events:none;animation:ecp-8d-badge-blink 2s ease-in-out infinite}.ecp-vp-8d-live-visualizer{position:relative;width:14rem;height:9.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:visible}.ecp-vp-8d-live-visualizer--light{background:#fffd;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);box-shadow:inset 0 0 20px #0000000d,0 8px 24px #0000000f}.ecp-vp-8d-live-visualizer--dark{background:#0c0c10d8;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);box-shadow:inset 0 0 30px #0006,0 8px 24px #00000040}.ecp-vp-8d-live-glow{position:absolute;width:14rem;height:9.5rem;border-radius:50%;animation:ecp-8d-pulse 2.5s ease-in-out infinite;pointer-events:none;z-index:0}@keyframes ecp-8d-pulse{0%,to{opacity:.3;transform:scale(.92)}50%{opacity:.75;transform:scale(1.08)}}.ecp-vp-8d-live-svg{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none}.ecp-vp-8d-radar-border{fill:none;stroke:var(--theme-slider, #8b5cf6);stroke-opacity:.25;stroke-width:1.5}.ecp-vp-8d-live-head-icon{position:absolute;z-index:3;filter:drop-shadow(0 0 5px currentColor)}.ecp-vp-8d-live-dot{position:absolute;left:50%;top:50%;width:18px;height:18px;margin-left:-9px;margin-top:-9px;border-radius:50%;z-index:4;display:flex;align-items:center;justify-content:center}.ecp-vp-8d-live-dot-inner{width:5px;height:5px;border-radius:50%;background:#000000bf}@keyframes ecp-8d-badge-blink{0%,to{opacity:1}50%{opacity:.8}}.ecp-vp-8d-tabs{display:flex;gap:.25rem;margin-bottom:.75rem;border-bottom:1px solid rgba(156,163,175,.2);padding-bottom:.25rem}.ecp-vp-8d-tab{padding:.25rem .6rem;font-size:.75rem;font-weight:500;border-radius:.375rem;border:1px solid transparent;background:transparent;cursor:pointer;transition:all .15s}.ecp-vp-8d-tab--light{color:#6b7280}.ecp-vp-8d-tab--light:hover{color:#1f2937;background:#0000000d}.ecp-vp-8d-tab--dark{color:#9ca3af}.ecp-vp-8d-tab--dark:hover{color:#f3f4f6;background:#ffffff14}.ecp-vp-8d-tab--active{background:var(--theme-slider-alpha, rgba(139, 92, 246, .15))!important;color:var(--theme-slider, #8b5cf6)!important;border-color:var(--theme-slider, #8b5cf6)!important}.ecp-vp-8d-controls-grid{display:flex;flex-direction:column;gap:.75rem;padding-top:.25rem}.ecp-vp-eq-bands--horizontal{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:.75rem;width:100%}.ecp-vp-eq-band-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:.35rem;min-width:0}.ecp-vp-eq-band-col .ecp-vp-eq-slider{height:.5rem;border-radius:9999px}.ecp-vp-eq-band-col .ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 4px #0000004d;cursor:pointer}.ecp-vp-eq-band-col .ecp-vp-eq-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 4px #0000004d;cursor:pointer}.ecp-vp-eq-val{font-size:.75rem;font-weight:600;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-vp-eq-val--light{color:#374151}.ecp-vp-eq-val--dark{color:#f3f4f6}.ecp-vp-eq-label{font-size:.7rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase}.ecp-vp-eq-label--light{color:#6b7280}.ecp-vp-eq-label--dark{color:#9ca3af}.ecp-vp-eq-bar-wrap{width:100%;display:flex;align-items:center}@media (max-width: 640px){.ecp-vp-eq-bands--horizontal{flex-direction:column;gap:.6rem}.ecp-vp-eq-band-col{flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:.6rem}.ecp-vp-eq-label{order:1;width:3.5rem;text-align:left;flex-shrink:0}.ecp-vp-eq-bar-wrap{order:2;flex:1}.ecp-vp-eq-val{order:3;width:3.5rem;text-align:right;flex-shrink:0}}.ecp-vp-track{margin-bottom:1.5rem;display:flex;align-items:center}.ecp-vp-thumbnail-wrap{margin-right:.5rem;width:3rem;flex-shrink:0}.ecp-vp-thumbnail{height:3rem;width:3rem;border-radius:9999px}.ecp-vp-track-info{width:100%;min-width:0}.ecp-vp-track-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-vp-track-name--light{color:#374151}.ecp-vp-track-name--dark{color:#f3f4f6}.ecp-vp-track-author{font-size:.75rem}.ecp-vp-track-author--light{color:#6b7280}.ecp-vp-track-author--dark{color:#d1d5db}.ecp-vp-seekbar{margin-bottom:1.5rem}.ecp-vp-seekbar-row{display:flex;align-items:center;gap:.25rem}.ecp-vp-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-vp-time--right{text-align:right}.ecp-vp-time--light{color:#4b5563}.ecp-vp-time--dark{color:#f3f4f6}.ecp-vp-seek-input{flex:1;height:.5rem;background:#e5e7eb;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-seek-input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-vp-controls--sm{gap:.5rem}.ecp-vp-play-btn{padding:.5rem 1rem;min-width:6rem;border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s}.ecp-vp-play-btn:hover{opacity:.9}.ecp-vp-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-play-btn--compact{padding:1.25rem .75rem;min-width:unset}.ecp-vp-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-vp-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-stop-btn--light{background:#374151;color:#fff}.ecp-vp-stop-btn--light:hover{background:#1f2937}.ecp-vp-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-vp-stop-btn--dark:hover{background:#d1d5db}.ecp-vp-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-stop-btn--wide{padding:.5rem 1rem}.ecp-vp-eq-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-eq-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-eq-btn--off:hover{background:#d1d5db}.ecp-vp-eq-btn--on{color:#fff}.ecp-vp-eq-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-eq-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-loop-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-loop-btn--off:hover{background:#d1d5db}.ecp-vp-loop-btn--on{color:#fff}.ecp-vp-loop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-loop-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-icon--active{transform:rotate(180deg)}.ecp-vp-speed-wrap{display:flex;align-items:center}.ecp-vp-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;transition:all .15s;background:transparent}.ecp-vp-speed-select--light{color:#1f2937}.ecp-vp-speed-select--dark{color:#e5e7eb}.ecp-vp-speed-option--light{background:#fff;color:#1f2937}.ecp-vp-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-vp-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-vp-volume{gap:.75rem}}.ecp-vp-mute-btn{padding:.5rem;border-radius:9999px;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-vp-mute-btn:hover{background:#f3f4f680}.ecp-vp-mute-icon--light{color:#4b5563}.ecp-vp-mute-icon--dark{color:#f3f4f6}.ecp-vp-volume-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-volume-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-vp-volume-slider{display:none}}.ecp-vp-volume-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-vp-volume-pct--light{color:#374151}.ecp-vp-volume-pct--dark{color:#f3f4f6}.ecp-vp-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-wave-outer{width:100%;max-width:32rem;position:relative}.ecp-wave-audio-el{display:none}.ecp-wave-card{border-radius:1rem;box-shadow:0 25px 50px -12px #00000040}.ecp-wave-card-inner{border-radius:1rem;padding:1.5rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-wave-thumbnail-wrap{width:100%;padding:1rem}.ecp-wave-thumbnail{width:100%;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-wave-seek{position:relative;height:5rem;margin-bottom:1.5rem;cursor:pointer}.ecp-wave-bars{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;height:100%;width:100%;gap:1px}.ecp-wave-bar{width:.25rem;border-radius:.25rem .25rem 0 0;transition:all .15s}.ecp-wave-progress-line{position:absolute;top:0;height:100%;width:.25rem;background:#fff;border-right:1px solid black;border-radius:9999px;transition:all .15s;transform:translate(-50%)}.ecp-wave-times{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:1.5rem}.ecp-wave-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;justify-content:space-between;margin-bottom:1rem}.ecp-wave-left-controls{display:flex;align-items:center;gap:.5rem}.ecp-wave-vol-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-vol-slider{width:5rem;height:.375rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 3px #0003}.ecp-wave-vol-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none}.ecp-wave-center-controls{display:flex;justify-content:center}.ecp-wave-play-btn{padding:1rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s;box-shadow:0 10px 15px -3px #0000001a}.ecp-wave-play-btn:hover{transform:scale(1.05)}.ecp-wave-right-controls{display:flex;align-items:center;gap:.75rem}.ecp-wave-speed-select{padding:.25rem .5rem;border-radius:.5rem;font-size:.875rem;border:none;cursor:pointer}.ecp-wave-speed-select--light{background:#f3f4f6;color:#374151}.ecp-wave-speed-select--dark{background:#1f2937;color:#f3f4f6}.ecp-wave-eq-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:1rem;padding:1rem}.ecp-wave-eq-panel{max-width:20rem;width:100%;padding:.5rem 1rem 1rem;border-radius:.75rem}.ecp-wave-eq-panel--light{background:#fff}.ecp-wave-eq-panel--dark{background:#1f2937}.ecp-wave-eq-title{font-size:1.125rem;font-weight:500;margin-bottom:.5rem}.ecp-wave-eq-title--light{color:#374151}.ecp-wave-eq-title--dark{color:#e5e7eb}.ecp-wave-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-wave-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-wave-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-wave-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-wave-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-wave-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-wave-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-wave-eq-slider{flex:1;height:1rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-wave-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-wave-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-wave-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-wave-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-wave-eq-footer-btn--light:hover{background:#d1d5db}.ecp-wave-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-wave-eq-footer-btn--dark:hover{background:#4b5563}.ecp-wave-error{padding:1.5rem;border-radius:.75rem;text-align:center}.ecp-wave-error-title{font-weight:500}.ecp-wave-error-msg{font-size:.875rem}.ecp-wave-error--light{color:#dc2626}.ecp-wave-error--dark{color:#fca5a5}.ecp-nano-wrapper{position:relative;overflow:hidden;display:inline-flex;flex-direction:column;padding:.5rem .75rem;box-shadow:0 10px 15px -3px #0000001a}.ecp-nano-wrapper--pill{border-radius:9999px;width:110px;height:40px}.ecp-nano-wrapper--card{border-radius:1rem;width:120px;height:150px}.ecp-nano-progress-bg{position:absolute;top:0;left:0;height:100%;opacity:.2}.ecp-nano-content{position:absolute;display:flex;flex-direction:column}.ecp-nano-thumbnail-wrap{width:6rem;padding-bottom:.5rem}.ecp-nano-thumbnail{width:6rem;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-nano-row{display:flex;align-items:center;gap:.5rem}.ecp-nano-play-btn{padding:.375rem;border-radius:9999px;border:none;cursor:pointer;flex-shrink:0;transition:transform .15s}.ecp-nano-play-btn:hover{transform:scale(1.1)}.ecp-nano-waveform{display:flex;width:100%;min-width:3rem;align-items:center;gap:2px;height:1.5rem}.ecp-nano-wave-bar{border-radius:9999px;width:100%;transition:height .2s}.ecp-video-wrapper{border-radius:.75rem;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-video-wrapper--fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;height:100vh;width:100vw;background:#000}.ecp-video-inner{height:auto}.ecp-video-inner--fullscreen{display:flex;flex-direction:column;flex:1;min-height:0}.ecp-video-inner--padded{padding:1rem}.ecp-video-name{margin-bottom:1rem;font-weight:500}.ecp-video-name--light{color:#374151}.ecp-video-name--dark{color:#f3f4f6}.ecp-video-layout{position:relative;margin-bottom:1rem}.ecp-video-layout--row{display:flex;gap:.75rem}.ecp-video-layout--col{display:flex;flex-direction:column;gap:.75rem}.ecp-video-layout--fullscreen{flex:1;min-height:0}.ecp-video-vu-top,.ecp-video-vu-bottom{width:100%;height:3rem}.ecp-video-vu-side{width:3rem;background:#00000080;border-radius:.5rem;padding:.25rem}.ecp-video-el-wrap{flex:1;border-radius:.5rem;overflow:hidden;position:relative}.ecp-video-el-wrap--light{background:#ffffffb3}.ecp-video-el-wrap--dark{background:#000000b3}.ecp-video-el{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ecp-video-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel{max-width:600px;width:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:center;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel--light{background:#fffc}.ecp-video-eq-panel--dark{background:#000000b3}.ecp-video-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-video-eq-title--light{color:#374151}.ecp-video-eq-title--dark{color:#e5e7eb}.ecp-video-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-video-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-video-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-video-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-video-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-video-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-video-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-video-eq-slider{flex:1;height:1.5rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-video-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-video-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-video-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-video-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-video-eq-footer-btn--light:hover{background:#d1d5db}.ecp-video-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-video-eq-footer-btn--dark:hover{background:#4b5563}.ecp-video-seekbar{margin-bottom:1rem}.ecp-video-seekbar--fullscreen{margin-top:.75rem}.ecp-video-seekbar-row{display:flex;align-items:center;gap:.75rem}.ecp-video-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-video-time--right{text-align:right}.ecp-video-time--light{color:#4b5563}.ecp-video-time--dark{color:#f3f4f6}.ecp-video-seek-input{flex:1;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-video-seek-input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-video-play-btn{border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s;padding:.5rem 1rem}.ecp-video-play-btn:hover{opacity:.9}.ecp-video-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-play-btn--compact{padding:1.25rem .75rem}.ecp-video-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-video-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-stop-btn--light{background:#374151;color:#fff}.ecp-video-stop-btn--light:hover{background:#1f2937}.ecp-video-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-video-stop-btn--dark:hover{background:#d1d5db}.ecp-video-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-fullscreen-btn{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s;padding:.75rem}.ecp-video-fullscreen-btn--light{background:#374151;color:#fff}.ecp-video-fullscreen-btn--light:hover{background:#1f2937}.ecp-video-fullscreen-btn--dark{background:#f3f4f6;color:#000}.ecp-video-fullscreen-btn--dark:hover{background:#d1d5db}.ecp-video-fullscreen-btn--wide{padding:.5rem 1rem}.ecp-video-eq-toggle-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-eq-toggle-btn--off{background:#f3f4f6;color:#374151}.ecp-video-eq-toggle-btn--off:hover{background:#d1d5db}.ecp-video-eq-toggle-btn--on{color:#fff}.ecp-video-eq-toggle-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-eq-toggle-btn--wide{padding:.5rem 1rem}.ecp-video-speed-wrap{display:flex;align-items:center}.ecp-video-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;background:transparent;transition:all .15s}.ecp-video-speed-select--light{color:#1f2937}.ecp-video-speed-select--dark{color:#e5e7eb}.ecp-video-speed-option--light{background:#f3f4f6;color:#1f2937}.ecp-video-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-video-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-video-volume{gap:.75rem}}.ecp-video-mute-btn{padding:.5rem;border-radius:.5rem;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-video-mute-btn:hover{background:#f3f4f6}.ecp-video-mute-icon--light{color:#4b5563}.ecp-video-mute-icon--dark{color:#f3f4f6}.ecp-video-vol-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-vol-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-video-vol-slider{display:none}}.ecp-video-vol-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-video-vol-pct--light{color:#374151}.ecp-video-vol-pct--dark{color:#f3f4f6}.ecp-video-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-vu-bar-wrap{flex:1;height:100%;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.ecp-vu-bar-fill{border-radius:.25rem .25rem 0 0;transition:height 75ms}.ecp-vu-peak-line{position:absolute;width:100%;height:2px;transition:top .1s}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ import { jsx as e, Fragment as Ft, jsxs as r } from "react/jsx-runtime";
3
+ import { forwardRef as zt, createElement as st, useState as b, useEffect as E, useRef as u } from "react";
4
4
  /**
5
5
  * @license lucide-react v0.540.0 - ISC
6
6
  *
7
7
  * This source code is licensed under the ISC license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
9
  */
10
- const Ke = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xe = (s) => s.replace(
10
+ const Vt = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Yt = (s) => s.replace(
11
11
  /^([A-Z])|[\s-_]+(\w)/g,
12
- (l, u, v) => v ? v.toUpperCase() : u.toLowerCase()
13
- ), We = (s) => {
14
- const l = Xe(s);
15
- return l.charAt(0).toUpperCase() + l.slice(1);
16
- }, Ye = (...s) => s.filter((l, u, v) => !!l && l.trim() !== "" && v.indexOf(l) === u).join(" ").trim(), Ze = (s) => {
17
- for (const l in s)
18
- if (l.startsWith("aria-") || l === "role" || l === "title")
12
+ (p, v, y) => y ? y.toUpperCase() : v.toLowerCase()
13
+ ), Pt = (s) => {
14
+ const p = Yt(s);
15
+ return p.charAt(0).toUpperCase() + p.slice(1);
16
+ }, Lt = (...s) => s.filter((p, v, y) => !!p && p.trim() !== "" && y.indexOf(p) === v).join(" ").trim(), Zt = (s) => {
17
+ for (const p in s)
18
+ if (p.startsWith("aria-") || p === "role" || p === "title")
19
19
  return !0;
20
20
  };
21
21
  /**
@@ -24,7 +24,7 @@ const Ke = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xe = (
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
26
  */
27
- var Je = {
27
+ var Kt = {
28
28
  xmlns: "http://www.w3.org/2000/svg",
29
29
  width: 24,
30
30
  height: 24,
@@ -41,32 +41,32 @@ var Je = {
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
43
  */
44
- const et = Qe(
44
+ const Qt = zt(
45
45
  ({
46
46
  color: s = "currentColor",
47
- size: l = 24,
48
- strokeWidth: u = 2,
49
- absoluteStrokeWidth: v,
50
- className: C = "",
51
- children: f,
52
- iconNode: y,
53
- ...O
54
- }, x) => Ie(
47
+ size: p = 24,
48
+ strokeWidth: v = 2,
49
+ absoluteStrokeWidth: y,
50
+ className: T = "",
51
+ children: h,
52
+ iconNode: q,
53
+ ...te
54
+ }, R) => st(
55
55
  "svg",
56
56
  {
57
- ref: x,
58
- ...Je,
59
- width: l,
60
- height: l,
57
+ ref: R,
58
+ ...Kt,
59
+ width: p,
60
+ height: p,
61
61
  stroke: s,
62
- strokeWidth: v ? Number(u) * 24 / Number(l) : u,
63
- className: Ye("lucide", C),
64
- ...!f && !Ze(O) && { "aria-hidden": "true" },
65
- ...O
62
+ strokeWidth: y ? Number(v) * 24 / Number(p) : v,
63
+ className: Lt("lucide", T),
64
+ ...!h && !Zt(te) && { "aria-hidden": "true" },
65
+ ...te
66
66
  },
67
67
  [
68
- ...y.map(([F, I]) => Ie(F, I)),
69
- ...Array.isArray(f) ? f : [f]
68
+ ...q.map(([S, V]) => st(S, V)),
69
+ ...Array.isArray(h) ? h : [h]
70
70
  ]
71
71
  )
72
72
  );
@@ -76,20 +76,20 @@ const et = Qe(
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
78
  */
79
- const le = (s, l) => {
80
- const u = Qe(
81
- ({ className: v, ...C }, f) => Ie(et, {
82
- ref: f,
83
- iconNode: l,
84
- className: Ye(
85
- `lucide-${Ke(We(s))}`,
79
+ const ge = (s, p) => {
80
+ const v = zt(
81
+ ({ className: y, ...T }, h) => st(Qt, {
82
+ ref: h,
83
+ iconNode: p,
84
+ className: Lt(
85
+ `lucide-${Vt(Pt(s))}`,
86
86
  `lucide-${s}`,
87
- v
87
+ y
88
88
  ),
89
- ...C
89
+ ...T
90
90
  })
91
91
  );
92
- return u.displayName = We(s), u;
92
+ return v.displayName = Pt(s), v;
93
93
  };
94
94
  /**
95
95
  * @license lucide-react v0.540.0 - ISC
@@ -97,41 +97,56 @@ const le = (s, l) => {
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
99
  */
100
- const tt = [
100
+ const Jt = [
101
+ [
102
+ "path",
103
+ {
104
+ d: "M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",
105
+ key: "1xhozi"
106
+ }
107
+ ]
108
+ ], it = ge("headphones", Jt);
109
+ /**
110
+ * @license lucide-react v0.540.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */
115
+ const er = [
101
116
  ["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
102
117
  ["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
103
118
  ["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
104
119
  ["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
105
- ], rt = le("maximize", tt);
120
+ ], tr = ge("maximize", er);
106
121
  /**
107
122
  * @license lucide-react v0.540.0 - ISC
108
123
  *
109
124
  * This source code is licensed under the ISC license.
110
125
  * See the LICENSE file in the root directory of this source tree.
111
126
  */
112
- const nt = [
127
+ const rr = [
113
128
  ["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
114
129
  ["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
115
130
  ["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
116
131
  ["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
117
- ], at = le("minimize", nt);
132
+ ], nr = ge("minimize", rr);
118
133
  /**
119
134
  * @license lucide-react v0.540.0 - ISC
120
135
  *
121
136
  * This source code is licensed under the ISC license.
122
137
  * See the LICENSE file in the root directory of this source tree.
123
138
  */
124
- const ct = [
139
+ const ar = [
125
140
  ["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
126
141
  ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
127
- ], Pe = le("pause", ct);
142
+ ], et = ge("pause", ar);
128
143
  /**
129
144
  * @license lucide-react v0.540.0 - ISC
130
145
  *
131
146
  * This source code is licensed under the ISC license.
132
147
  * See the LICENSE file in the root directory of this source tree.
133
148
  */
134
- const st = [
149
+ const cr = [
135
150
  [
136
151
  "path",
137
152
  {
@@ -139,26 +154,26 @@ const st = [
139
154
  key: "10ikf1"
140
155
  }
141
156
  ]
142
- ], Me = le("play", st);
157
+ ], tt = ge("play", cr);
143
158
  /**
144
159
  * @license lucide-react v0.540.0 - ISC
145
160
  *
146
161
  * This source code is licensed under the ISC license.
147
162
  * See the LICENSE file in the root directory of this source tree.
148
163
  */
149
- const it = [
164
+ const ir = [
150
165
  ["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
151
166
  ["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
152
167
  ["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
153
168
  ["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
154
- ], ot = le("repeat", it);
169
+ ], sr = ge("repeat", ir);
155
170
  /**
156
171
  * @license lucide-react v0.540.0 - ISC
157
172
  *
158
173
  * This source code is licensed under the ISC license.
159
174
  * See the LICENSE file in the root directory of this source tree.
160
175
  */
161
- const lt = [
176
+ const lr = [
162
177
  ["line", { x1: "4", x2: "4", y1: "21", y2: "14", key: "1p332r" }],
163
178
  ["line", { x1: "4", x2: "4", y1: "10", y2: "3", key: "gb41h5" }],
164
179
  ["line", { x1: "12", x2: "12", y1: "21", y2: "12", key: "hf2csr" }],
@@ -168,34 +183,34 @@ const lt = [
168
183
  ["line", { x1: "2", x2: "6", y1: "14", y2: "14", key: "1uebub" }],
169
184
  ["line", { x1: "10", x2: "14", y1: "8", y2: "8", key: "1yglbp" }],
170
185
  ["line", { x1: "18", x2: "22", y1: "16", y2: "16", key: "1jxqpz" }]
171
- ], Fe = le("sliders-vertical", lt);
186
+ ], Je = ge("sliders-vertical", lr);
172
187
  /**
173
188
  * @license lucide-react v0.540.0 - ISC
174
189
  *
175
190
  * This source code is licensed under the ISC license.
176
191
  * See the LICENSE file in the root directory of this source tree.
177
192
  */
178
- const dt = [
193
+ const or = [
179
194
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
180
- ], Ge = le("square", dt);
195
+ ], St = ge("square", or);
181
196
  /**
182
197
  * @license lucide-react v0.540.0 - ISC
183
198
  *
184
199
  * This source code is licensed under the ISC license.
185
200
  * See the LICENSE file in the root directory of this source tree.
186
201
  */
187
- const ut = [
202
+ const pr = [
188
203
  ["path", { d: "M12 3v12", key: "1x0j5s" }],
189
204
  ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
190
205
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
191
- ], pt = le("upload", ut);
206
+ ], dr = ge("upload", pr);
192
207
  /**
193
208
  * @license lucide-react v0.540.0 - ISC
194
209
  *
195
210
  * This source code is licensed under the ISC license.
196
211
  * See the LICENSE file in the root directory of this source tree.
197
212
  */
198
- const mt = [
213
+ const ur = [
199
214
  [
200
215
  "path",
201
216
  {
@@ -205,14 +220,14 @@ const mt = [
205
220
  ],
206
221
  ["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
207
222
  ["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
208
- ], De = le("volume-2", mt);
223
+ ], lt = ge("volume-2", ur);
209
224
  /**
210
225
  * @license lucide-react v0.540.0 - ISC
211
226
  *
212
227
  * This source code is licensed under the ISC license.
213
228
  * See the LICENSE file in the root directory of this source tree.
214
229
  */
215
- const ft = [
230
+ const vr = [
216
231
  [
217
232
  "path",
218
233
  {
@@ -222,7 +237,7 @@ const ft = [
222
237
  ],
223
238
  ["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
224
239
  ["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
225
- ], _e = le("volume-x", ft), ge = {
240
+ ], ot = ge("volume-x", vr), Ae = {
226
241
  rainbow: {
227
242
  name: "Rainbow",
228
243
  bg: "linear-gradient(135deg, #ef444422 0%, #f9731622 15%, #f59e0b22 30%, #10b98122 45%, #06b6d422 60%, #3b82f622 75%, #6366f122 85%, #a855f722 92%, #ec489922 100%)",
@@ -322,45 +337,63 @@ const ft = [
322
337
  slider: "#ec4899"
323
338
  }
324
339
  };
325
- function ht({ theme: s, setTheme: l, close: u }) {
326
- const v = Object.keys(ge).map((C) => ({
327
- key: C,
328
- name: ge[C].name,
329
- colors: ge[C].bars
340
+ function hr({ theme: s, setTheme: p, close: v }) {
341
+ const y = Object.keys(Ae).map((T) => ({
342
+ key: T,
343
+ name: Ae[T].name,
344
+ colors: Ae[T].bars
330
345
  }));
331
- return /* @__PURE__ */ c("div", { className: "ecp-theme-selector-panel", children: [
332
- /* @__PURE__ */ c("div", { className: "ecp-theme-selector-header", children: [
346
+ return /* @__PURE__ */ r("div", { className: "ecp-theme-selector-panel", children: [
347
+ /* @__PURE__ */ r("div", { className: "ecp-theme-selector-header", children: [
333
348
  /* @__PURE__ */ e("h2", { className: "ecp-theme-selector-title", children: "Choose Color Palette" }),
334
- /* @__PURE__ */ e("button", { onClick: () => u(), className: "ecp-theme-selector-close", children: "Close" })
349
+ /* @__PURE__ */ e("button", { onClick: () => v(), className: "ecp-theme-selector-close", children: "Close" })
335
350
  ] }),
336
- /* @__PURE__ */ e("div", { className: "ecp-theme-grid", children: v.map((C) => /* @__PURE__ */ c(
351
+ /* @__PURE__ */ e("div", { className: "ecp-theme-grid", children: y.map((T) => /* @__PURE__ */ r(
337
352
  "div",
338
353
  {
339
- className: `ecp-theme-card${s === C.key ? " ecp-theme-card--active" : ""}`,
340
- onClick: () => l(C.key),
354
+ className: `ecp-theme-card${s === T.key ? " ecp-theme-card--active" : ""}`,
355
+ onClick: () => p(T.key),
341
356
  children: [
342
357
  /* @__PURE__ */ e(
343
358
  "div",
344
359
  {
345
360
  className: "ecp-theme-color-preview",
346
- style: { background: `linear-gradient(to right, ${C.colors.join(", ")})` }
361
+ style: { background: `linear-gradient(to right, ${T.colors.join(", ")})` }
347
362
  }
348
363
  ),
349
- /* @__PURE__ */ e("div", { className: "ecp-theme-name", children: C.name })
364
+ /* @__PURE__ */ e("div", { className: "ecp-theme-name", children: T.name })
350
365
  ]
351
366
  },
352
- C.key
367
+ T.key
353
368
  )) })
354
369
  ] });
355
370
  }
356
- function vt({
371
+ const At = (s, p) => {
372
+ const v = s.sampleRate, y = Math.max(1, Math.floor(v * Math.max(0.1, p))), T = s.createBuffer(2, y, v), h = T.getChannelData(0), q = T.getChannelData(1), te = 3 / p;
373
+ for (let R = 0; R < y; R++) {
374
+ const S = R / v, V = Math.exp(-S * te);
375
+ h[R] = (Math.random() * 2 - 1) * V, q[R] = (Math.random() * 2 - 1) * V;
376
+ }
377
+ return T;
378
+ }, Mt = (s) => {
379
+ const p = Math.max(0, s), v = 44100, y = new Float32Array(v), T = Math.PI / 180;
380
+ if (p === 0)
381
+ for (let h = 0; h < v; ++h) y[h] = h * 2 / v - 1;
382
+ else
383
+ for (let h = 0; h < v; ++h) {
384
+ const q = h * 2 / v - 1;
385
+ y[h] = (3 + p) * q * 20 * T / (Math.PI + p * Math.abs(q));
386
+ }
387
+ return y;
388
+ };
389
+ function mr({
357
390
  audio: s,
358
- name: l = "No track loaded",
359
- author: u,
360
- theme: v = "rainbow",
361
- volume: C = 100,
362
- thumbnail: f = null,
363
- controls: y = {
391
+ name: p = "No track loaded",
392
+ author: v,
393
+ theme: y = "rainbow",
394
+ volume: T = 100,
395
+ thumbnail: h = null,
396
+ controls: q = {
364
397
  play: !0,
365
398
  pause: !0,
366
399
  stop: !0,
@@ -369,41 +402,124 @@ function vt({
369
402
  loop: !0,
370
403
  trackName: !0,
371
404
  equalizer: !0,
372
- speed: !0
405
+ speed: !0,
406
+ dolby8d: !1
373
407
  },
374
- mode: O = "light",
375
- bands: x = null,
376
- transparent: F = !1,
377
- autoPlay: I = !1,
378
- equalizer: z = { bass: 0, mid: 0, treble: 0 }
408
+ mode: te = "light",
409
+ bands: R = null,
410
+ transparent: S = !1,
411
+ autoPlay: V = !1,
412
+ equalizer: U = { bass: 0, mid: 0, treble: 0 },
413
+ dolby8d: a = null
379
414
  }) {
380
- const [E, H] = m(!1), [j, P] = m(0), [M, D] = m(0), [k, S] = m(C || 100), [ae, me] = m(!1), [V, ee] = m(!1), [se, ie] = m(!1), [ce, de] = m([]), [R, Q] = m(!1), [Y, oe] = m({
381
- bass: z.bass || 0,
382
- mid: z.mid || 0,
383
- treble: z.treble || 0
384
- }), [ue, te] = m(1), [G, w] = m(0), p = b(null), L = b(null), K = b(null), fe = b(null), W = b(null), re = b(null), X = b(null), N = b(null), T = b(null), Z = b(null);
385
- $(() => {
386
- const t = Z.current;
415
+ var bt, yt, kt, qt, Nt, wt, $t, xt, Ct, Et, Tt;
416
+ const [G, D] = b(!1), [H, Y] = b(0), [O, z] = b(0), [M, Me] = b(T || 100), [fe, Ce] = b(!1), [_, Fe] = b(!1), [me, be] = b(!1), [ye, X] = b([]), [Q, ze] = b(!1), [Z, Ee] = b({
417
+ bass: U.bass || 0,
418
+ mid: U.mid || 0,
419
+ treble: U.treble || 0
420
+ }), [ae, _e] = b(1), [N, Te] = b(0), [ce, Ne] = b(!1), [o, pe] = b({
421
+ enable: q.dolby8d && (a == null ? void 0 : a.enable) !== void 0 ? a.enable : !1,
422
+ spatial: {
423
+ rate: ((bt = a == null ? void 0 : a.spatial) == null ? void 0 : bt.rate) !== void 0 ? a.spatial.rate : 0.11,
424
+ width: ((yt = a == null ? void 0 : a.spatial) == null ? void 0 : yt.width) !== void 0 ? a.spatial.width : 135,
425
+ focus: ((kt = a == null ? void 0 : a.spatial) == null ? void 0 : kt.focus) !== void 0 ? a.spatial.focus : 65
426
+ },
427
+ reverb: {
428
+ size: ((qt = a == null ? void 0 : a.reverb) == null ? void 0 : qt.size) !== void 0 ? a.reverb.size : 2.4,
429
+ tone: ((Nt = a == null ? void 0 : a.reverb) == null ? void 0 : Nt.tone) !== void 0 ? a.reverb.tone : 62,
430
+ mix: ((wt = a == null ? void 0 : a.reverb) == null ? void 0 : wt.mix) !== void 0 ? a.reverb.mix : 30
431
+ },
432
+ echo: {
433
+ time: (($t = a == null ? void 0 : a.echo) == null ? void 0 : $t.time) !== void 0 ? a.echo.time : 500,
434
+ feedback: ((xt = a == null ? void 0 : a.echo) == null ? void 0 : xt.feedback) !== void 0 ? a.echo.feedback : 45,
435
+ mix: ((Ct = a == null ? void 0 : a.echo) == null ? void 0 : Ct.mix) !== void 0 ? a.echo.mix : 5
436
+ },
437
+ tape: {
438
+ speed: typeof (a == null ? void 0 : a.tape) == "number" ? a.tape : ((Et = a == null ? void 0 : a.tape) == null ? void 0 : Et.speed) !== void 0 ? a.tape.speed : 1,
439
+ drive: typeof (a == null ? void 0 : a.tape) == "object" && ((Tt = a.tape) == null ? void 0 : Tt.drive) !== void 0 ? a.tape.drive : 0
440
+ }
441
+ });
442
+ E(() => {
443
+ var t, i, g, m, x, K, le, re, ne, j, oe;
444
+ a && pe({
445
+ enable: a.enable !== void 0 ? a.enable : !0,
446
+ spatial: {
447
+ rate: ((t = a.spatial) == null ? void 0 : t.rate) !== void 0 ? a.spatial.rate : 0.2,
448
+ width: ((i = a.spatial) == null ? void 0 : i.width) !== void 0 ? a.spatial.width : 80,
449
+ focus: ((g = a.spatial) == null ? void 0 : g.focus) !== void 0 ? a.spatial.focus : 20
450
+ },
451
+ reverb: {
452
+ size: ((m = a.reverb) == null ? void 0 : m.size) !== void 0 ? a.reverb.size : 3,
453
+ tone: ((x = a.reverb) == null ? void 0 : x.tone) !== void 0 ? a.reverb.tone : 40,
454
+ mix: ((K = a.reverb) == null ? void 0 : K.mix) !== void 0 ? a.reverb.mix : 30
455
+ },
456
+ echo: {
457
+ time: ((le = a.echo) == null ? void 0 : le.time) !== void 0 ? a.echo.time : 50,
458
+ feedback: ((re = a.echo) == null ? void 0 : re.feedback) !== void 0 ? a.echo.feedback : 20,
459
+ mix: ((ne = a.echo) == null ? void 0 : ne.mix) !== void 0 ? a.echo.mix : 10
460
+ },
461
+ tape: {
462
+ speed: typeof a.tape == "number" ? a.tape : ((j = a.tape) == null ? void 0 : j.speed) !== void 0 ? a.tape.speed : 1,
463
+ drive: typeof a.tape == "object" && ((oe = a.tape) == null ? void 0 : oe.drive) !== void 0 ? a.tape.drive : 0
464
+ }
465
+ });
466
+ }, [a]);
467
+ const [de, ke] = b("spatial"), P = u(o), B = u(ae);
468
+ E(() => {
469
+ P.current = o;
470
+ }, [o]), E(() => {
471
+ B.current = ae;
472
+ }, [ae]);
473
+ const ie = () => {
474
+ if (d.current) {
475
+ const t = P.current.enable, i = t ? P.current.tape.speed : 1, m = !(t && i !== 1);
476
+ "preservesPitch" in d.current && (d.current.preservesPitch = m), "webkitPreservesPitch" in d.current && (d.current.webkitPreservesPitch = m), "mozPreservesPitch" in d.current && (d.current.mozPreservesPitch = m), d.current.playbackRate = B.current * i;
477
+ }
478
+ }, c = (t, i, g) => {
479
+ pe((m) => ({
480
+ ...m,
481
+ enable: !0,
482
+ [t]: {
483
+ ...m[t],
484
+ [i]: g
485
+ }
486
+ }));
487
+ }, w = () => {
488
+ pe((t) => ({
489
+ ...t,
490
+ enable: !t.enable
491
+ }));
492
+ }, F = () => {
493
+ pe({
494
+ enable: !0,
495
+ spatial: { rate: 0.11, width: 135, focus: 65 },
496
+ reverb: { size: 2.4, tone: 62, mix: 30 },
497
+ echo: { time: 500, feedback: 45, mix: 5 },
498
+ tape: { speed: 1, drive: 0 }
499
+ });
500
+ }, d = u(null), C = u(null), J = u(null), A = u(null), ue = u(null), Re = u(null), we = u(null), I = u(null), ve = u(null), De = u(null), We = u(null), Ue = u(null), Be = u(null), je = u(null), Ge = u(null), Xe = u(null), rt = u(null), Ve = u(0), Le = u(null), $e = u(null), ee = u(null), he = u(null), Se = u(0), Ze = u(null), nt = u(null);
501
+ E(() => {
502
+ const t = nt.current;
387
503
  if (!t) return;
388
- const a = new ResizeObserver((o) => {
389
- for (let i of o) w(i.contentRect.width);
504
+ const i = new ResizeObserver((g) => {
505
+ for (let m of g) Te(m.contentRect.width);
390
506
  });
391
- return a.observe(t), () => a.disconnect();
392
- }, []), $(() => {
507
+ return i.observe(t), () => i.disconnect();
508
+ }, []), E(() => {
393
509
  const t = [];
394
- if (s && typeof s != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]), l && typeof l != "string" && t.push(["TypeError", "name must be a string"]), v && typeof v != "string" && typeof v != "object") t.push(["TypeError", "theme must be a string or a valid theme object"]);
395
- else if (typeof v == "object") {
396
- const a = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
397
- for (const o of a)
398
- o in v || t.push(["ThemeError", `theme object missing key: ${o}`]);
510
+ if (s && typeof s != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]), p && typeof p != "string" && t.push(["TypeError", "name must be a string"]), y && typeof y != "string" && typeof y != "object") t.push(["TypeError", "theme must be a string or a valid theme object"]);
511
+ else if (typeof y == "object") {
512
+ const i = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
513
+ for (const g of i)
514
+ g in y || t.push(["ThemeError", `theme object missing key: ${g}`]);
399
515
  }
400
- (typeof C != "number" || C < 0 || C > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), typeof y != "object" || Array.isArray(y) ? t.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((o) => {
401
- y && o in y && typeof y[o] != "boolean" && t.push(["TypeError", `controls.${o} must be a boolean`]);
402
- }), x && (Array.isArray(x) ? x.length === 0 ? t.push(["ValueError", "bands array cannot be empty"]) : x.forEach((a, o) => {
403
- typeof a.freq != "number" && t.push(["TypeError", `bands[${o}].freq must be a number`]);
404
- }) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (de(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((a) => console.error(`${a[0]}: ${a[1]}`)), console.groupEnd()) : de([]);
405
- }, [s, l, v, C, y, O, x]);
406
- const r = x || [
516
+ (typeof T != "number" || T < 0 || T > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), typeof q != "object" || Array.isArray(q) ? t.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((g) => {
517
+ q && g in q && typeof q[g] != "boolean" && t.push(["TypeError", `controls.${g} must be a boolean`]);
518
+ }), R && (Array.isArray(R) ? R.length === 0 ? t.push(["ValueError", "bands array cannot be empty"]) : R.forEach((i, g) => {
519
+ typeof i.freq != "number" && t.push(["TypeError", `bands[${g}].freq must be a number`]);
520
+ }) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (X(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((i) => console.error(`${i[0]}: ${i[1]}`)), console.groupEnd()) : X([]);
521
+ }, [s, p, y, T, q, te, R]);
522
+ const n = R || [
407
523
  { freq: 0 },
408
524
  { freq: 10 },
409
525
  { freq: 20 },
@@ -435,325 +551,787 @@ function vt({
435
551
  { freq: 8e3 },
436
552
  { freq: 1e4 },
437
553
  { freq: 12500 }
438
- ], d = b(r.map(() => 0)), g = b(r.map(() => 0)), B = b(r.map(() => 0)), _ = b(!1), J = b(typeof v == "string" ? v : "purple"), h = typeof v == "string" ? ge[v] || ge.purple : typeof v == "object" ? v : ge.purple, A = O === "dark", ke = typeof y == "object" && Object.keys(y).length === 0;
439
- $(() => {
440
- typeof v == "string" ? J.current = v : J.current = "purple", ve();
441
- }, [v]), $(() => {
442
- p.current || (p.current = new Audio());
443
- const t = p.current, a = () => {
444
- se || P(t.currentTime);
445
- }, o = () => D(t.duration), i = () => {
446
- V || (H(!1), N.current && cancelAnimationFrame(N.current));
447
- }, q = () => H(!0), U = () => H(!1);
448
- return t.addEventListener("timeupdate", a), t.addEventListener("loadedmetadata", o), t.addEventListener("ended", i), t.addEventListener("play", q), t.addEventListener("pause", U), () => {
449
- t.removeEventListener("timeupdate", a), t.removeEventListener("loadedmetadata", o), t.removeEventListener("ended", i), t.removeEventListener("play", q), t.removeEventListener("pause", U);
554
+ ], f = u(n.map(() => 0)), $ = u(n.map(() => 0)), L = u(n.map(() => 0)), W = u(!1), se = u(typeof y == "string" ? y : "purple"), l = typeof y == "string" ? Ae[y] || Ae.purple : typeof y == "object" ? y : Ae.purple, k = te === "dark", at = typeof q == "object" && Object.keys(q).length === 0;
555
+ E(() => {
556
+ typeof y == "string" ? se.current = y : se.current = "purple", He();
557
+ }, [y]), E(() => {
558
+ d.current || (d.current = new Audio());
559
+ const t = d.current, i = () => {
560
+ me || Y(t.currentTime);
561
+ }, g = () => z(t.duration), m = () => {
562
+ _ || (D(!1), ee.current && cancelAnimationFrame(ee.current));
563
+ }, x = () => {
564
+ D(!0), ie();
565
+ }, K = () => D(!1);
566
+ return t.addEventListener("timeupdate", i), t.addEventListener("loadedmetadata", g), t.addEventListener("ended", m), t.addEventListener("play", x), t.addEventListener("pause", K), () => {
567
+ t.removeEventListener("timeupdate", i), t.removeEventListener("loadedmetadata", g), t.removeEventListener("ended", m), t.removeEventListener("play", x), t.removeEventListener("pause", K);
450
568
  };
451
- }, [se, V]), $(() => () => {
452
- p.current && (p.current.pause(), p.current.src = "", p.current.load()), L.current && L.current.close().catch((t) => console.warn("AudioContext cleanup error:", t)), N.current && cancelAnimationFrame(N.current);
453
- }, []), $(() => {
569
+ }, [me, _]), E(() => () => {
570
+ he.current && clearInterval(he.current), d.current && (d.current.pause(), d.current.src = "", d.current.load()), C.current && C.current.close().catch((t) => console.warn("AudioContext cleanup error:", t)), ee.current && cancelAnimationFrame(ee.current);
571
+ }, []), E(() => {
454
572
  if (s) {
455
- const t = E, a = k, o = V;
456
- if (N.current && (cancelAnimationFrame(N.current), N.current = null), fe.current) {
573
+ const t = G, i = M, g = _;
574
+ if (ee.current && (cancelAnimationFrame(ee.current), ee.current = null), A.current) {
457
575
  try {
458
- fe.current.disconnect();
576
+ A.current.disconnect();
459
577
  } catch {
460
578
  }
461
- fe.current = null;
579
+ A.current = null;
462
580
  }
463
- if (K.current) {
581
+ if (J.current) {
464
582
  try {
465
- K.current.disconnect();
583
+ J.current.disconnect();
466
584
  } catch {
467
585
  }
468
- K.current = null;
586
+ J.current = null;
469
587
  }
470
- if (W.current) {
588
+ if (ue.current) {
471
589
  try {
472
- W.current.disconnect();
590
+ ue.current.disconnect();
473
591
  } catch {
474
592
  }
475
- W.current = null;
593
+ ue.current = null;
476
594
  }
477
- if (re.current) {
595
+ if (Re.current) {
478
596
  try {
479
- re.current.disconnect();
597
+ Re.current.disconnect();
480
598
  } catch {
481
599
  }
482
- re.current = null;
600
+ Re.current = null;
483
601
  }
484
- if (X.current) {
602
+ if (we.current) {
485
603
  try {
486
- X.current.disconnect();
604
+ we.current.disconnect();
487
605
  } catch {
488
606
  }
489
- X.current = null;
607
+ we.current = null;
490
608
  }
491
- L.current && (L.current.close().catch((ne) => console.warn("AudioContext close error:", ne)), L.current = null), p.current && (p.current.pause(), p.current.src = "", p.current.load()), p.current = new Audio();
609
+ C.current && (C.current.close().catch((j) => console.warn("AudioContext close error:", j)), C.current = null), d.current && (d.current.pause(), d.current.src = "", d.current.load()), d.current = new Audio();
492
610
  try {
493
- p.current.crossOrigin = "anonymous";
611
+ d.current.crossOrigin = "anonymous";
494
612
  } catch {
495
613
  }
496
- p.current.src = s, p.current.preload = "auto", p.current.muted = !1, p.current.volume = ae ? 0 : a / 100, p.current.loop = o, p.current.load();
497
- const i = p.current, q = () => {
498
- se || P(i.currentTime);
499
- }, U = () => D(i.duration), pe = () => {
500
- V || (H(!1), N.current && cancelAnimationFrame(N.current));
501
- }, ye = () => H(!0), $e = () => H(!1);
502
- i.addEventListener("timeupdate", q), i.addEventListener("loadedmetadata", U), i.addEventListener("ended", pe), i.addEventListener("play", ye), i.addEventListener("pause", $e), P(0), H(!1), d.current = r.map(() => 0), g.current = r.map(() => 0), B.current = r.map(() => 0), ve(), t && p.current.play().catch((ne) => console.error("Play failed:", ne));
614
+ d.current.src = s, d.current.preload = "auto", d.current.muted = !1, d.current.volume = fe ? 0 : i / 100, d.current.loop = g, d.current.load();
615
+ const m = d.current, x = () => {
616
+ me || Y(m.currentTime);
617
+ }, K = () => z(m.duration), le = () => {
618
+ _ || (D(!1), ee.current && cancelAnimationFrame(ee.current));
619
+ }, re = () => {
620
+ D(!0), ie();
621
+ }, ne = () => D(!1);
622
+ m.addEventListener("timeupdate", x), m.addEventListener("loadedmetadata", K), m.addEventListener("ended", le), m.addEventListener("play", re), m.addEventListener("pause", ne), Y(0), D(!1), f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He(), t && d.current.play().catch((j) => console.error("Play failed:", j));
623
+ }
624
+ }, [s]), E(() => {
625
+ d.current && (d.current.volume = fe ? 0 : M / 100);
626
+ }, [M, fe]), E(() => {
627
+ d.current && (d.current.loop = _);
628
+ }, [_]), E(() => {
629
+ ie();
630
+ }, [ae, o.tape.speed, o.enable]), E(() => {
631
+ C.current && (ue.current && (ue.current.gain.value = Z.bass), Re.current && (Re.current.gain.value = Z.mid), we.current && (we.current.gain.value = Z.treble));
632
+ }, [Z]), E(() => {
633
+ if (C.current) {
634
+ const t = o.enable;
635
+ if (Xe.current && (Xe.current.curve = Mt(t ? o.tape.drive : 0)), We.current && (We.current.frequency.value = o.reverb.tone / 100 * 8e3 + 500), Ue.current && (Ue.current.gain.value = t ? o.reverb.mix / 100 : 0), De.current && C.current)
636
+ try {
637
+ De.current.buffer = At(C.current, o.reverb.size);
638
+ } catch {
639
+ }
640
+ if (Be.current && (Be.current.delayTime.value = Math.max(0.01, o.echo.time / 1e3)), je.current && (je.current.gain.value = t ? Math.min(0.85, o.echo.feedback / 100) : 0), Ge.current && (Ge.current.gain.value = t ? o.echo.mix / 100 : 0), !t && (ve.current && (ve.current.pan.value = 0), I.current && C.current)) {
641
+ const i = C.current.currentTime;
642
+ I.current.positionX ? (I.current.positionX.setTargetAtTime(0, i, 0.01), I.current.positionY.setTargetAtTime(0, i, 0.01), I.current.positionZ.setTargetAtTime(-1.4, i, 0.01)) : I.current.setPosition && I.current.setPosition(0, 0, -1.4);
643
+ }
503
644
  }
504
- }, [s]), $(() => {
505
- p.current && (p.current.volume = ae ? 0 : k / 100);
506
- }, [k, ae]), $(() => {
507
- p.current && (p.current.loop = V);
508
- }, [V]), $(() => {
509
- p.current && (p.current.playbackRate = ue);
510
- }, [ue]), $(() => {
511
- L.current && (W.current && (W.current.gain.value = Y.bass), re.current && (re.current.gain.value = Y.mid), X.current && (X.current.gain.value = Y.treble));
512
- }, [Y]), $(() => {
513
- _.current = E, N.current && (cancelAnimationFrame(N.current), N.current = null), E ? (L.current || Ce(), Ne()) : he();
514
- }, [E]);
515
- const Ce = () => {
516
- if (!L.current && p.current)
645
+ }, [o]);
646
+ const pt = () => {
647
+ if (!C.current || !W.current) return;
648
+ const t = P.current;
649
+ if (!t.enable) return;
650
+ const i = performance.now(), g = Se.current ? Math.min(0.1, (i - Se.current) / 1e3) : 0.016;
651
+ Se.current = i;
652
+ const m = t.spatial.rate;
653
+ Ve.current += m * 5 * g;
654
+ const x = Ve.current, le = 2.3 * (t.spatial.width / 135), re = Math.sin(x) * le, ne = -Math.cos(x) * le, j = Math.sin(x * 2) * 0.4, oe = C.current.currentTime;
655
+ if (I.current && (I.current.positionX ? (I.current.positionX.setTargetAtTime(re, oe, 0.04), I.current.positionY.setTargetAtTime(j, oe, 0.04), I.current.positionZ.setTargetAtTime(ne, oe, 0.04)) : I.current.setPosition && I.current.setPosition(re, j, ne)), ve.current) {
656
+ const qe = Math.sin(x) * (t.spatial.width / 180), Pe = (t.spatial.focus - 50) / 100, Oe = Math.max(-1, Math.min(1, qe + Pe));
657
+ ve.current.pan.setTargetAtTime(Oe, oe, 0.04);
658
+ }
659
+ };
660
+ E(() => {
661
+ W.current = G, ee.current && (cancelAnimationFrame(ee.current), ee.current = null), he.current && (clearInterval(he.current), he.current = null), G ? (C.current || It(), Se.current = performance.now(), he.current = window.setInterval(pt, 30), vt()) : ut();
662
+ }, [G]);
663
+ const It = () => {
664
+ if (!C.current && d.current)
517
665
  try {
518
666
  const t = window.AudioContext || window.webkitAudioContext;
519
667
  if (t) {
520
- const a = new t();
521
- L.current = a;
522
- const o = a.createBiquadFilter();
523
- o.type = "lowshelf", o.frequency.value = 320, o.gain.value = Y.bass;
524
- const i = a.createBiquadFilter();
525
- i.type = "peaking", i.frequency.value = 1e3, i.Q.value = 0.5, i.gain.value = Y.mid;
526
- const q = a.createBiquadFilter();
527
- q.type = "highshelf", q.frequency.value = 3200, q.gain.value = Y.treble;
528
- const U = a.createAnalyser();
529
- U.fftSize = 8192, U.smoothingTimeConstant = 0.7;
530
- const pe = a.createMediaElementSource(p.current);
531
- pe.connect(o), o.connect(i), i.connect(q), q.connect(U), U.connect(a.destination), W.current = o, re.current = i, X.current = q, K.current = U, fe.current = pe;
668
+ const i = new t();
669
+ C.current = i;
670
+ const g = i.createBiquadFilter();
671
+ g.type = "lowshelf", g.frequency.value = 320, g.gain.value = Z.bass;
672
+ const m = i.createBiquadFilter();
673
+ m.type = "peaking", m.frequency.value = 1e3, m.Q.value = 0.5, m.gain.value = Z.mid;
674
+ const x = i.createBiquadFilter();
675
+ x.type = "highshelf", x.frequency.value = 3200, x.gain.value = Z.treble;
676
+ const K = i.createWaveShaper();
677
+ K.curve = Mt(P.current.enable ? P.current.tape.drive : 0), ie();
678
+ let le = null;
679
+ try {
680
+ const xe = i.createPanner();
681
+ xe.panningModel = "HRTF", xe.distanceModel = "inverse", xe.refDistance = 1.4, xe.rolloffFactor = 0.55, le = xe;
682
+ } catch {
683
+ }
684
+ let re = null;
685
+ if (i.createStereoPanner) {
686
+ const xe = i.createStereoPanner();
687
+ xe.pan.value = 0, re = xe;
688
+ }
689
+ const ne = i.createGain();
690
+ ne.gain.value = 1;
691
+ const j = i.createConvolver();
692
+ j.buffer = At(i, P.current.reverb.size);
693
+ const oe = i.createBiquadFilter();
694
+ oe.type = "lowpass", oe.frequency.value = P.current.reverb.tone / 100 * 8e3 + 500;
695
+ const qe = i.createGain();
696
+ qe.gain.value = P.current.enable ? P.current.reverb.mix / 100 : 0;
697
+ const Pe = i.createDelay(2);
698
+ Pe.delayTime.value = P.current.echo.time / 1e3;
699
+ const Oe = i.createGain();
700
+ Oe.gain.value = Math.min(0.85, P.current.echo.feedback / 100);
701
+ const Ke = i.createGain();
702
+ Ke.gain.value = P.current.enable ? P.current.echo.mix / 100 : 0, Pe.connect(Oe), Oe.connect(Pe);
703
+ const Ie = i.createAnalyser();
704
+ Ie.fftSize = 8192, Ie.smoothingTimeConstant = 0.7;
705
+ const Rt = i.createMediaElementSource(d.current);
706
+ Rt.connect(g), g.connect(m), m.connect(x), x.connect(K);
707
+ const Qe = le, Ye = re, ct = Qe || Ye || K;
708
+ Qe ? (K.connect(Qe), Ye && Qe.connect(Ye)) : Ye && K.connect(Ye), ct.connect(ne), ne.connect(Ie), ct.connect(j), j.connect(oe), oe.connect(qe), qe.connect(Ie), ct.connect(Pe), Pe.connect(Ke), Ke.connect(Ie), Ie.connect(i.destination), ue.current = g, Re.current = m, we.current = x, Xe.current = K, I.current = le, ve.current = re, rt.current = ne, De.current = j, We.current = oe, Ue.current = qe, Be.current = Pe, je.current = Oe, Ge.current = Ke, J.current = Ie, A.current = Rt;
532
709
  }
533
710
  } catch (t) {
534
711
  console.error("Failed to setup audio context:", t);
535
712
  }
536
- }, we = (t) => {
537
- const a = L.current, o = K.current;
538
- if (!a || !o) return 0;
539
- const i = a.sampleRate / 2, q = Math.round(t / i * o.frequencyBinCount);
540
- return Math.min(q, o.frequencyBinCount - 1);
541
- }, he = () => {
542
- if (_.current) return;
543
- d.current = d.current.map((i) => i * 0.7);
713
+ }, dt = (t) => {
714
+ const i = C.current, g = J.current;
715
+ if (!i || !g) return 0;
716
+ const m = i.sampleRate / 2, x = Math.round(t / m * g.frequencyBinCount);
717
+ return Math.min(x, g.frequencyBinCount - 1);
718
+ }, ut = () => {
719
+ if (W.current) return;
720
+ f.current = f.current.map((m) => m * 0.7);
544
721
  const t = Date.now();
545
- g.current = g.current.map((i, q) => t - B.current[q] > 1500 ? i * 0.95 : i), ve();
546
- const a = Math.max(...d.current), o = Math.max(...g.current);
547
- a > 0.01 || o > 0.01 ? N.current = requestAnimationFrame(he) : (_.current || (d.current = r.map(() => 0), g.current = r.map(() => 0), B.current = r.map(() => 0), ve()), N.current && cancelAnimationFrame(N.current), N.current = null);
548
- }, Ne = () => {
549
- if (!K.current || !_.current) return;
550
- const t = K.current.frequencyBinCount, a = new Uint8Array(t);
551
- K.current.getByteFrequencyData(a), r.forEach((o, i) => {
552
- const q = we(o.freq), U = i < r.length - 1 ? we(r[i + 1].freq) : a.length;
553
- let pe = 0, ye = 0;
554
- for (let He = q; He < U; He++)
555
- pe += a[He], ye++;
556
- let $e = ye > 0 ? pe / ye / 255 : 0;
557
- $e = Math.pow($e, 0.6), d.current[i] = d.current[i] * 0.8 + $e * 0.2;
558
- const ne = Date.now();
559
- d.current[i] > g.current[i] ? (g.current[i] = d.current[i], B.current[i] = ne) : ne - B.current[i] > 1500 && (g.current[i] *= 0.95);
560
- }), ve(), N.current = requestAnimationFrame(Ne);
561
- }, ve = () => {
562
- if (!T.current) return;
563
- const t = ge[J.current] || ge.rainbow;
564
- let a = "";
565
- r.forEach((o, i) => {
566
- const q = d.current[i] * 100, U = 100 - g.current[i] * 100, pe = Math.floor(i / r.length * t.bars.length), ye = t.bars[Math.min(pe, t.bars.length - 1)];
567
- a += `
722
+ $.current = $.current.map((m, x) => t - L.current[x] > 1500 ? m * 0.95 : m), He();
723
+ const i = Math.max(...f.current), g = Math.max(...$.current);
724
+ i > 0.01 || g > 0.01 ? ee.current = requestAnimationFrame(ut) : (W.current || (f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He()), ee.current && cancelAnimationFrame(ee.current), ee.current = null);
725
+ }, vt = () => {
726
+ if (!J.current || !W.current) return;
727
+ const t = P.current;
728
+ if (t.enable && C.current) {
729
+ pt();
730
+ const m = Ve.current, x = t.spatial.width / 135;
731
+ if (Le.current) {
732
+ const K = 85 * (x > 0 ? 1 : 0), le = 55 * (x > 0 ? 1 : 0), re = Math.sin(m) * K, ne = -Math.cos(m) * le;
733
+ Le.current.style.transform = `translate(${re}px, ${ne}px)`, $e.current && ($e.current.setAttribute("x2", `${110 + re}`), $e.current.setAttribute("y2", `${75 + ne}`));
734
+ }
735
+ } else if (C.current) {
736
+ const m = C.current.currentTime;
737
+ I.current && (I.current.positionX ? (I.current.positionX.setTargetAtTime(0, m, 0.04), I.current.positionY.setTargetAtTime(0, m, 0.04), I.current.positionZ.setTargetAtTime(-1.4, m, 0.04)) : I.current.setPosition && I.current.setPosition(0, 0, -1.4)), ve.current && ve.current.pan.setTargetAtTime(0, m, 0.04), Le.current && (Le.current.style.transform = "translate(0px, 0px)"), $e.current && ($e.current.setAttribute("x2", "110"), $e.current.setAttribute("y2", "20"));
738
+ }
739
+ const i = J.current.frequencyBinCount, g = new Uint8Array(i);
740
+ J.current.getByteFrequencyData(g), n.forEach((m, x) => {
741
+ const K = dt(m.freq), le = x < n.length - 1 ? dt(n[x + 1].freq) : g.length;
742
+ let re = 0, ne = 0;
743
+ for (let qe = K; qe < le; qe++)
744
+ re += g[qe], ne++;
745
+ let j = ne > 0 ? re / ne / 255 : 0;
746
+ j = Math.pow(j, 0.6), f.current[x] = f.current[x] * 0.8 + j * 0.2;
747
+ const oe = Date.now();
748
+ f.current[x] > $.current[x] ? ($.current[x] = f.current[x], L.current[x] = oe) : oe - L.current[x] > 1500 && ($.current[x] *= 0.95);
749
+ }), He(), ee.current = requestAnimationFrame(vt);
750
+ }, He = () => {
751
+ if (!Ze.current) return;
752
+ const t = Ae[se.current] || Ae.rainbow;
753
+ let i = "";
754
+ n.forEach((g, m) => {
755
+ const x = f.current[m] * 100, K = 100 - $.current[m] * 100, le = Math.floor(m / n.length * t.bars.length), re = t.bars[Math.min(le, t.bars.length - 1)];
756
+ i += `
568
757
  <div class="ecp-vu-bar-wrap">
569
- <div class="ecp-vu-bar-fill" style="height: ${q}%; background: ${ye};">
570
- ${g.current[i] > 0.1 ? `<div class="ecp-vu-peak-line" style="top: ${U}%; background: ${t.peak};"></div>` : ""}
758
+ <div class="ecp-vu-bar-fill" style="height: ${x}%; background: ${re};">
759
+ ${$.current[m] > 0.1 ? `<div class="ecp-vu-peak-line" style="top: ${K}%; background: ${t.peak};"></div>` : ""}
571
760
  </div>
572
761
  </div>
573
762
  `;
574
- }), T.current.innerHTML = a;
575
- }, xe = () => {
576
- !p.current || !s || (E ? p.current.pause() : (L.current && L.current.state === "suspended" && L.current.resume(), p.current.play().catch((t) => console.error("Play failed:", t))));
577
- }, Ee = () => {
578
- p.current && (p.current.pause(), p.current.currentTime = 0, H(!1), P(0), d.current = r.map(() => 0), g.current = r.map(() => 0), B.current = r.map(() => 0), ve());
579
- }, Le = (t) => {
580
- const o = parseFloat(t.target.value) / 100 * M;
581
- P(o), p.current && !se && (p.current.currentTime = o);
582
- }, Ae = () => ie(!0), Re = () => {
583
- p.current && (p.current.currentTime = j), ie(!1);
584
- }, ze = (t) => {
585
- const a = parseInt(t.target.value);
586
- S(a), me(a === 0);
587
- }, Se = () => me(!ae), Be = (t) => te(parseFloat(t.target.value)), je = () => ee(!V), Te = (t, a) => oe((o) => ({ ...o, [t]: a })), be = () => oe({ bass: 0, mid: 0, treble: 0 });
588
- $(() => {
589
- ((typeof y == "object" && Object.keys(y).length === 0 || !y) && !E || I) && xe();
590
- }, [y]);
591
- const qe = (t) => {
763
+ }), Ze.current.innerHTML = i;
764
+ }, ht = () => {
765
+ !d.current || !s || (G ? d.current.pause() : (C.current && C.current.state === "suspended" && C.current.resume(), d.current.play().catch((t) => console.error("Play failed:", t))));
766
+ }, Dt = () => {
767
+ d.current && (d.current.pause(), d.current.currentTime = 0, D(!1), Y(0), f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He());
768
+ }, Bt = (t) => {
769
+ const g = parseFloat(t.target.value) / 100 * O;
770
+ Y(g), d.current && !me && (d.current.currentTime = g);
771
+ }, mt = () => be(!0), ft = () => {
772
+ d.current && (d.current.currentTime = H), be(!1);
773
+ }, jt = (t) => {
774
+ const i = parseInt(t.target.value);
775
+ Me(i), Ce(i === 0);
776
+ }, Ht = () => Ce(!fe), Ot = (t) => _e(parseFloat(t.target.value)), _t = () => Fe(!_), Wt = (t, i) => Ee((g) => ({ ...g, [t]: i })), Ut = () => Ee({ bass: 0, mid: 0, treble: 0 });
777
+ E(() => {
778
+ ((typeof q == "object" && Object.keys(q).length === 0 || !q) && !G || V) && ht();
779
+ }, [q]);
780
+ const gt = (t) => {
592
781
  if (isNaN(t)) return "0:00";
593
- const a = Math.floor(t / 60), o = Math.floor(t % 60);
594
- return `${a}:${o.toString().padStart(2, "0")}`;
782
+ const i = Math.floor(t / 60), g = Math.floor(t % 60);
783
+ return `${i}:${g.toString().padStart(2, "0")}`;
595
784
  };
596
- if (ce && ce.length > 0)
597
- return /* @__PURE__ */ e(Ve, { children: ce.map((t, a) => /* @__PURE__ */ c("div", { className: "ecp-vp-error", children: [
598
- /* @__PURE__ */ c("strong", { children: [
785
+ if (ye && ye.length > 0)
786
+ return /* @__PURE__ */ e(Ft, { children: ye.map((t, i) => /* @__PURE__ */ r("div", { className: "ecp-vp-error", children: [
787
+ /* @__PURE__ */ r("strong", { children: [
599
788
  t[0],
600
789
  ":"
601
790
  ] }),
602
791
  " ",
603
792
  t[1]
604
- ] }, a)) });
605
- const Ue = ke || F ? void 0 : A ? "#6060606a" : "#ffffffab", Oe = ke || F ? void 0 : h.bg;
606
- return /* @__PURE__ */ e("div", { ref: Z, className: "ecp-vp-wrapper", style: { backgroundColor: Ue }, children: /* @__PURE__ */ c("div", { className: "ecp-vp-bg", style: { background: Oe }, children: [
607
- /* @__PURE__ */ c("div", { className: "ecp-vp-vu-outer", children: [
608
- /* @__PURE__ */ e("div", { className: `ecp-vp-vu-bg ${F ? " ecp-vp-vu-bg--transparent" : A ? " ecp-vp-vu-bg--dark" : " ecp-vp-vu-bg--light"}${R && F ? " ecp-vp-vu-bg--dimmed" : ""}${ke ? " ecp-vp-vu-bg--no-margin" : ""}`, children: /* @__PURE__ */ e("div", { className: "ecp-vp-vu-bars", ref: T }) }),
609
- R && /* @__PURE__ */ c("div", { className: `ecp-vp-eq-overlay${A ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`, children: [
610
- /* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${A ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, children: "Equalizer" }),
611
- /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bands", children: ["bass", "mid", "treble"].map((t) => /* @__PURE__ */ c("div", { className: "ecp-vp-eq-band", children: [
612
- /* @__PURE__ */ c("div", { className: "ecp-vp-eq-band-header", children: [
613
- /* @__PURE__ */ e("span", { className: `ecp-vp-eq-band-label${A ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: t.charAt(0).toUpperCase() + t.slice(1) }),
614
- /* @__PURE__ */ c("span", { className: `ecp-vp-eq-band-label${A ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: [
615
- Y[t],
793
+ ] }, i)) });
794
+ const Gt = at || S ? void 0 : k ? "#6060606a" : "#ffffffab", Xt = at || S ? void 0 : l.bg;
795
+ return /* @__PURE__ */ e("div", { ref: nt, className: "ecp-vp-wrapper", style: { backgroundColor: Gt }, children: /* @__PURE__ */ r("div", { className: "ecp-vp-bg", style: { background: Xt }, children: [
796
+ /* @__PURE__ */ r("div", { className: "ecp-vp-vu-outer", children: [
797
+ /* @__PURE__ */ e("div", { className: `ecp-vp-vu-bg ${S ? " ecp-vp-vu-bg--transparent" : k ? " ecp-vp-vu-bg--dark" : " ecp-vp-vu-bg--light"}${Q && S ? " ecp-vp-vu-bg--dimmed" : ""}${at ? " ecp-vp-vu-bg--no-margin" : ""}`, children: /* @__PURE__ */ e("div", { className: "ecp-vp-vu-bars", ref: Ze }) }),
798
+ o.enable && G && /* @__PURE__ */ e("div", { className: "ecp-vp-8d-live-overlay", children: /* @__PURE__ */ r(
799
+ "div",
800
+ {
801
+ className: `ecp-vp-8d-live-visualizer${k ? " ecp-vp-8d-live-visualizer--dark" : " ecp-vp-8d-live-visualizer--light"}`,
802
+ style: { "--theme-slider": l.slider, "--theme-slider-alpha": `${l.slider}33` },
803
+ children: [
804
+ /* @__PURE__ */ e("div", { className: "ecp-vp-8d-live-glow", style: { background: `radial-gradient(circle, ${l.slider}35 0%, transparent 70%)` } }),
805
+ /* @__PURE__ */ r("svg", { className: "ecp-vp-8d-live-svg", viewBox: "0 0 220 150", children: [
806
+ /* @__PURE__ */ e("circle", { cx: "110", cy: "75", r: "35", stroke: l.slider, strokeOpacity: "0.2", strokeWidth: "1", fill: "none" }),
807
+ /* @__PURE__ */ e(
808
+ "ellipse",
809
+ {
810
+ cx: "110",
811
+ cy: "75",
812
+ rx: "85",
813
+ ry: "55",
814
+ fill: "none",
815
+ stroke: l.slider,
816
+ strokeOpacity: "0.5",
817
+ strokeWidth: "2",
818
+ strokeDasharray: "2 7",
819
+ strokeLinecap: "round"
820
+ }
821
+ ),
822
+ /* @__PURE__ */ e(
823
+ "line",
824
+ {
825
+ ref: $e,
826
+ x1: "110",
827
+ y1: "75",
828
+ x2: "110",
829
+ y2: "20",
830
+ stroke: l.slider,
831
+ strokeOpacity: "0.75",
832
+ strokeWidth: "1.5"
833
+ }
834
+ ),
835
+ /* @__PURE__ */ r("g", { transform: "translate(110, 75)", children: [
836
+ /* @__PURE__ */ e("circle", { cx: "0", cy: "0", r: "14", fill: "none", stroke: l.slider, strokeOpacity: "0.8", strokeWidth: "1.5" }),
837
+ /* @__PURE__ */ e("line", { x1: "0", y1: "14", x2: "0", y2: "19", stroke: l.slider, strokeOpacity: "0.8", strokeWidth: "1.5" }),
838
+ /* @__PURE__ */ e(
839
+ "text",
840
+ {
841
+ x: "0",
842
+ y: "29",
843
+ textAnchor: "middle",
844
+ fill: l.slider,
845
+ fillOpacity: "0.75",
846
+ fontSize: "8",
847
+ fontWeight: "700",
848
+ letterSpacing: "0.5px",
849
+ fontFamily: "monospace",
850
+ children: "FRONT"
851
+ }
852
+ )
853
+ ] })
854
+ ] }),
855
+ /* @__PURE__ */ e(it, { size: 14, className: "ecp-vp-8d-live-head-icon", style: { color: l.slider } }),
856
+ /* @__PURE__ */ e(
857
+ "div",
858
+ {
859
+ ref: Le,
860
+ className: "ecp-vp-8d-live-dot",
861
+ style: {
862
+ background: l.slider,
863
+ boxShadow: `0 0 12px ${l.slider}`
864
+ },
865
+ children: /* @__PURE__ */ e("span", { className: "ecp-vp-8d-live-dot-inner" })
866
+ }
867
+ )
868
+ ]
869
+ }
870
+ ) }),
871
+ Q && /* @__PURE__ */ r("div", { className: `ecp-vp-eq-overlay${k ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`, children: [
872
+ /* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${k ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, children: "Equalizer" }),
873
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bands", children: ["bass", "mid", "treble"].map((t) => /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band", children: [
874
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-header", children: [
875
+ /* @__PURE__ */ e("span", { className: `ecp-vp-eq-band-label${k ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: t.charAt(0).toUpperCase() + t.slice(1) }),
876
+ /* @__PURE__ */ r("span", { className: `ecp-vp-eq-band-label${k ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: [
877
+ Z[t] > 0 ? `+${Z[t]}` : Z[t],
616
878
  " dB"
617
879
  ] })
618
880
  ] }),
619
- /* @__PURE__ */ c("div", { className: "ecp-vp-eq-band-range", children: [
620
- /* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${A ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "-20" }),
881
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-range", children: [
882
+ /* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${k ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "-20" }),
621
883
  /* @__PURE__ */ e(
622
884
  "input",
623
885
  {
624
886
  type: "range",
625
887
  min: "-20",
626
888
  max: "20",
627
- value: Y[t],
628
- onChange: (a) => Te(t, parseInt(a.target.value)),
889
+ value: Z[t],
890
+ onChange: (i) => Wt(t, parseInt(i.target.value)),
629
891
  className: "ecp-vp-eq-slider",
630
892
  style: {
631
- background: `linear-gradient(to right, ${h.slider} ${(Y[t] + 20) / 40 * 100}%, ${h.slider + "30"} ${(Y[t] + 20) / 40 * 100}%)`,
632
- "--thumb-color": h.slider
893
+ background: `linear-gradient(to right, ${l.slider} ${(Z[t] + 20) / 40 * 100}%, ${l.slider + "30"} ${(Z[t] + 20) / 40 * 100}%)`,
894
+ "--thumb-color": l.slider
633
895
  }
634
896
  }
635
897
  ),
636
- /* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${A ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "+20" })
898
+ /* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${k ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "+20" })
637
899
  ] })
638
900
  ] }, t)) }),
639
- /* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: be, className: `ecp-vp-eq-reset${A ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset" }) })
640
- ] })
901
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: Ut, className: `ecp-vp-eq-reset${k ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset" }) })
902
+ ] }),
903
+ ce && /* @__PURE__ */ r(
904
+ "div",
905
+ {
906
+ className: `ecp-vp-eq-overlay${k ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`,
907
+ style: {
908
+ "--theme-slider": l.slider,
909
+ "--theme-slider-alpha": `${l.slider}33`
910
+ },
911
+ children: [
912
+ /* @__PURE__ */ r("div", { className: "ecp-vp-8d-header", children: [
913
+ /* @__PURE__ */ r("div", { className: "ecp-vp-8d-title-group", children: [
914
+ /* @__PURE__ */ e(it, { size: 18, style: { color: l.slider } }),
915
+ /* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${k ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, style: { margin: 0 }, children: "8D Spatial Engine" })
916
+ ] }),
917
+ /* @__PURE__ */ r("div", { className: "ecp-vp-8d-toggle-wrap", children: [
918
+ /* @__PURE__ */ e("span", { className: `ecp-vp-8d-toggle-label${k ? " ecp-vp-8d-toggle-label--dark" : " ecp-vp-8d-toggle-label--light"}`, children: o.enable ? "On" : "Off" }),
919
+ /* @__PURE__ */ e(
920
+ "button",
921
+ {
922
+ onClick: w,
923
+ className: `ecp-vp-8d-toggle${o.enable ? " ecp-vp-8d-toggle--on" : ""}`,
924
+ children: /* @__PURE__ */ e("div", { className: "ecp-vp-8d-toggle-thumb" })
925
+ }
926
+ )
927
+ ] })
928
+ ] }),
929
+ /* @__PURE__ */ e("div", { className: "ecp-vp-8d-tabs", children: ["spatial", "reverb", "echo", "tape"].map((t) => /* @__PURE__ */ e(
930
+ "button",
931
+ {
932
+ onClick: () => ke(t),
933
+ className: `ecp-vp-8d-tab${k ? " ecp-vp-8d-tab--dark" : " ecp-vp-8d-tab--light"}${de === t ? " ecp-vp-8d-tab--active" : ""}`,
934
+ children: t.charAt(0).toUpperCase() + t.slice(1)
935
+ },
936
+ t
937
+ )) }),
938
+ /* @__PURE__ */ r("div", { className: "ecp-vp-8d-controls-grid", children: [
939
+ de === "spatial" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
940
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
941
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
942
+ o.spatial.rate.toFixed(2),
943
+ "x"
944
+ ] }),
945
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
946
+ "input",
947
+ {
948
+ type: "range",
949
+ min: "0.01",
950
+ max: "1.00",
951
+ step: "0.01",
952
+ value: o.spatial.rate,
953
+ onChange: (t) => c("spatial", "rate", parseFloat(t.target.value)),
954
+ className: "ecp-vp-eq-slider",
955
+ style: {
956
+ background: `linear-gradient(to right, ${l.slider} ${(o.spatial.rate - 0.01) / 0.99 * 100}%, ${l.slider + "30"} ${(o.spatial.rate - 0.01) / 0.99 * 100}%)`,
957
+ "--thumb-color": l.slider
958
+ }
959
+ }
960
+ ) }),
961
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "RATE" })
962
+ ] }),
963
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
964
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
965
+ o.spatial.width,
966
+ "°"
967
+ ] }),
968
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
969
+ "input",
970
+ {
971
+ type: "range",
972
+ min: "0",
973
+ max: "180",
974
+ step: "5",
975
+ value: o.spatial.width,
976
+ onChange: (t) => c("spatial", "width", parseInt(t.target.value)),
977
+ className: "ecp-vp-eq-slider",
978
+ style: {
979
+ background: `linear-gradient(to right, ${l.slider} ${o.spatial.width / 180 * 100}%, ${l.slider + "30"} ${o.spatial.width / 180 * 100}%)`,
980
+ "--thumb-color": l.slider
981
+ }
982
+ }
983
+ ) }),
984
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "WIDTH" })
985
+ ] }),
986
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
987
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
988
+ o.spatial.focus,
989
+ "%"
990
+ ] }),
991
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
992
+ "input",
993
+ {
994
+ type: "range",
995
+ min: "0",
996
+ max: "100",
997
+ step: "1",
998
+ value: o.spatial.focus,
999
+ onChange: (t) => c("spatial", "focus", parseInt(t.target.value)),
1000
+ className: "ecp-vp-eq-slider",
1001
+ style: {
1002
+ background: `linear-gradient(to right, ${l.slider} ${o.spatial.focus}%, ${l.slider + "30"} ${o.spatial.focus}%)`,
1003
+ "--thumb-color": l.slider
1004
+ }
1005
+ }
1006
+ ) }),
1007
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "FOCUS" })
1008
+ ] })
1009
+ ] }),
1010
+ de === "reverb" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
1011
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1012
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1013
+ o.reverb.size.toFixed(1),
1014
+ "s"
1015
+ ] }),
1016
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1017
+ "input",
1018
+ {
1019
+ type: "range",
1020
+ min: "0.2",
1021
+ max: "5.0",
1022
+ step: "0.1",
1023
+ value: o.reverb.size,
1024
+ onChange: (t) => c("reverb", "size", parseFloat(t.target.value)),
1025
+ className: "ecp-vp-eq-slider",
1026
+ style: {
1027
+ background: `linear-gradient(to right, ${l.slider} ${(o.reverb.size - 0.2) / 4.8 * 100}%, ${l.slider + "30"} ${(o.reverb.size - 0.2) / 4.8 * 100}%)`,
1028
+ "--thumb-color": l.slider
1029
+ }
1030
+ }
1031
+ ) }),
1032
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "SIZE" })
1033
+ ] }),
1034
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1035
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1036
+ o.reverb.tone,
1037
+ "%"
1038
+ ] }),
1039
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1040
+ "input",
1041
+ {
1042
+ type: "range",
1043
+ min: "0",
1044
+ max: "100",
1045
+ step: "1",
1046
+ value: o.reverb.tone,
1047
+ onChange: (t) => c("reverb", "tone", parseInt(t.target.value)),
1048
+ className: "ecp-vp-eq-slider",
1049
+ style: {
1050
+ background: `linear-gradient(to right, ${l.slider} ${o.reverb.tone}%, ${l.slider + "30"} ${o.reverb.tone}%)`,
1051
+ "--thumb-color": l.slider
1052
+ }
1053
+ }
1054
+ ) }),
1055
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TONE" })
1056
+ ] }),
1057
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1058
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1059
+ o.reverb.mix,
1060
+ "%"
1061
+ ] }),
1062
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1063
+ "input",
1064
+ {
1065
+ type: "range",
1066
+ min: "0",
1067
+ max: "100",
1068
+ step: "1",
1069
+ value: o.reverb.mix,
1070
+ onChange: (t) => c("reverb", "mix", parseInt(t.target.value)),
1071
+ className: "ecp-vp-eq-slider",
1072
+ style: {
1073
+ background: `linear-gradient(to right, ${l.slider} ${o.reverb.mix}%, ${l.slider + "30"} ${o.reverb.mix}%)`,
1074
+ "--thumb-color": l.slider
1075
+ }
1076
+ }
1077
+ ) }),
1078
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "MIX" })
1079
+ ] })
1080
+ ] }),
1081
+ de === "echo" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
1082
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1083
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1084
+ o.echo.time,
1085
+ "ms"
1086
+ ] }),
1087
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1088
+ "input",
1089
+ {
1090
+ type: "range",
1091
+ min: "50",
1092
+ max: "1000",
1093
+ step: "10",
1094
+ value: o.echo.time,
1095
+ onChange: (t) => c("echo", "time", parseInt(t.target.value)),
1096
+ className: "ecp-vp-eq-slider",
1097
+ style: {
1098
+ background: `linear-gradient(to right, ${l.slider} ${(o.echo.time - 50) / 950 * 100}%, ${l.slider + "30"} ${(o.echo.time - 50) / 950 * 100}%)`,
1099
+ "--thumb-color": l.slider
1100
+ }
1101
+ }
1102
+ ) }),
1103
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TIME" })
1104
+ ] }),
1105
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1106
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1107
+ o.echo.feedback,
1108
+ "%"
1109
+ ] }),
1110
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1111
+ "input",
1112
+ {
1113
+ type: "range",
1114
+ min: "0",
1115
+ max: "85",
1116
+ step: "1",
1117
+ value: o.echo.feedback,
1118
+ onChange: (t) => c("echo", "feedback", parseInt(t.target.value)),
1119
+ className: "ecp-vp-eq-slider",
1120
+ style: {
1121
+ background: `linear-gradient(to right, ${l.slider} ${o.echo.feedback / 85 * 100}%, ${l.slider + "30"} ${o.echo.feedback / 85 * 100}%)`,
1122
+ "--thumb-color": l.slider
1123
+ }
1124
+ }
1125
+ ) }),
1126
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "FEEDBACK" })
1127
+ ] }),
1128
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1129
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1130
+ o.echo.mix,
1131
+ "%"
1132
+ ] }),
1133
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1134
+ "input",
1135
+ {
1136
+ type: "range",
1137
+ min: "0",
1138
+ max: "100",
1139
+ step: "1",
1140
+ value: o.echo.mix,
1141
+ onChange: (t) => c("echo", "mix", parseInt(t.target.value)),
1142
+ className: "ecp-vp-eq-slider",
1143
+ style: {
1144
+ background: `linear-gradient(to right, ${l.slider} ${o.echo.mix}%, ${l.slider + "30"} ${o.echo.mix}%)`,
1145
+ "--thumb-color": l.slider
1146
+ }
1147
+ }
1148
+ ) }),
1149
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "MIX" })
1150
+ ] })
1151
+ ] }),
1152
+ de === "tape" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
1153
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1154
+ /* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
1155
+ o.tape.speed.toFixed(2),
1156
+ "x"
1157
+ ] }),
1158
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1159
+ "input",
1160
+ {
1161
+ type: "range",
1162
+ min: "0.50",
1163
+ max: "2.00",
1164
+ step: "0.05",
1165
+ value: o.tape.speed,
1166
+ onChange: (t) => c("tape", "speed", parseFloat(t.target.value)),
1167
+ className: "ecp-vp-eq-slider",
1168
+ style: {
1169
+ background: `linear-gradient(to right, ${l.slider} ${(o.tape.speed - 0.5) / 1.5 * 100}%, ${l.slider + "30"} ${(o.tape.speed - 0.5) / 1.5 * 100}%)`,
1170
+ "--thumb-color": l.slider
1171
+ }
1172
+ }
1173
+ ) }),
1174
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TAPE" })
1175
+ ] }),
1176
+ /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
1177
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: o.tape.drive }),
1178
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
1179
+ "input",
1180
+ {
1181
+ type: "range",
1182
+ min: "0",
1183
+ max: "50",
1184
+ step: "1",
1185
+ value: o.tape.drive,
1186
+ onChange: (t) => c("tape", "drive", parseFloat(t.target.value)),
1187
+ className: "ecp-vp-eq-slider",
1188
+ style: {
1189
+ background: `linear-gradient(to right, ${l.slider} ${o.tape.drive / 50 * 100}%, ${l.slider + "30"} ${o.tape.drive / 50 * 100}%)`,
1190
+ "--thumb-color": l.slider
1191
+ }
1192
+ }
1193
+ ) }),
1194
+ /* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "DRIVE" })
1195
+ ] })
1196
+ ] })
1197
+ ] }),
1198
+ /* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: F, className: `ecp-vp-eq-reset${k ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset Defaults" }) })
1199
+ ]
1200
+ }
1201
+ )
641
1202
  ] }),
642
- y.trackName && /* @__PURE__ */ c("div", { className: "ecp-vp-track", children: [
643
- f && /* @__PURE__ */ e("div", { className: "ecp-vp-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: f, alt: "", className: `ecp-vp-thumbnail${E ? " ecp-animation-spin" : ""}` }) }),
644
- /* @__PURE__ */ c("div", { className: "ecp-vp-track-info", children: [
645
- /* @__PURE__ */ e("div", { className: `ecp-vp-track-name${A ? " ecp-vp-track-name--dark" : " ecp-vp-track-name--light"}`, children: l }),
646
- u && typeof u == "string" && /* @__PURE__ */ e("div", { className: `ecp-vp-track-author${A ? " ecp-vp-track-author--dark" : " ecp-vp-track-author--light"}`, children: u })
1203
+ q.trackName && /* @__PURE__ */ r("div", { className: "ecp-vp-track", children: [
1204
+ h && /* @__PURE__ */ e("div", { className: "ecp-vp-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: h, alt: "", className: `ecp-vp-thumbnail${G ? " ecp-animation-spin" : ""}` }) }),
1205
+ /* @__PURE__ */ r("div", { className: "ecp-vp-track-info", children: [
1206
+ /* @__PURE__ */ e("div", { className: `ecp-vp-track-name${k ? " ecp-vp-track-name--dark" : " ecp-vp-track-name--light"}`, children: p }),
1207
+ v && typeof v == "string" && /* @__PURE__ */ e("div", { className: `ecp-vp-track-author${k ? " ecp-vp-track-author--dark" : " ecp-vp-track-author--light"}`, children: v })
647
1208
  ] })
648
1209
  ] }),
649
- y.seekbar && /* @__PURE__ */ e("div", { className: "ecp-vp-seekbar", children: /* @__PURE__ */ c("div", { className: "ecp-vp-seekbar-row", children: [
650
- /* @__PURE__ */ e("span", { className: `ecp-vp-time${A ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: qe(j) }),
1210
+ q.seekbar && /* @__PURE__ */ e("div", { className: "ecp-vp-seekbar", children: /* @__PURE__ */ r("div", { className: "ecp-vp-seekbar-row", children: [
1211
+ /* @__PURE__ */ e("span", { className: `ecp-vp-time${k ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: gt(H) }),
651
1212
  /* @__PURE__ */ e(
652
1213
  "input",
653
1214
  {
654
1215
  type: "range",
655
1216
  min: "0",
656
1217
  max: "100",
657
- value: M > 0 ? j / M * 100 : 0,
658
- onChange: Le,
659
- onMouseDown: Ae,
660
- onMouseUp: Re,
661
- onTouchStart: Ae,
662
- onTouchEnd: Re,
1218
+ value: O > 0 ? H / O * 100 : 0,
1219
+ onChange: Bt,
1220
+ onMouseDown: mt,
1221
+ onMouseUp: ft,
1222
+ onTouchStart: mt,
1223
+ onTouchEnd: ft,
663
1224
  disabled: !s,
664
1225
  className: "ecp-vp-seek-input",
665
1226
  style: {
666
- background: s && M > 0 ? `linear-gradient(to right, ${h.slider} ${j / M * 100}%, ${h.slider + "30"} ${j / M * 100}%)` : h.slider + "30",
667
- "--thumb-color": h.slider
1227
+ background: s && O > 0 ? `linear-gradient(to right, ${l.slider} ${H / O * 100}%, ${l.slider + "30"} ${H / O * 100}%)` : l.slider + "30",
1228
+ "--thumb-color": l.slider
668
1229
  }
669
1230
  }
670
1231
  ),
671
- /* @__PURE__ */ e("span", { className: `ecp-vp-time ecp-vp-time--right${A ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: qe(M) })
1232
+ /* @__PURE__ */ e("span", { className: `ecp-vp-time ecp-vp-time--right${k ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: gt(O) })
672
1233
  ] }) }),
673
- /* @__PURE__ */ c("div", { className: `ecp-vp-controls${G < 330 ? " ecp-vp-controls--sm" : ""}`, children: [
674
- y.play && /* @__PURE__ */ c(
1234
+ /* @__PURE__ */ r("div", { className: `ecp-vp-controls${N < 330 ? " ecp-vp-controls--sm" : ""}`, children: [
1235
+ q.play && /* @__PURE__ */ r(
675
1236
  "button",
676
1237
  {
677
- onClick: xe,
1238
+ onClick: ht,
678
1239
  disabled: !s,
679
- className: `ecp-vp-play-btn${G < 350 ? " ecp-vp-play-btn--compact" : ""}`,
680
- style: { backgroundColor: h.button },
1240
+ className: `ecp-vp-play-btn${N < 350 ? " ecp-vp-play-btn--compact" : ""}`,
1241
+ style: { backgroundColor: l.button },
681
1242
  children: [
682
- /* @__PURE__ */ c("div", { className: "ecp-vp-play-icon-wrap", children: [
683
- /* @__PURE__ */ e(Pe, { size: 16, style: { position: "absolute", transform: E ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
684
- /* @__PURE__ */ e(Me, { size: 16, style: { position: "absolute", transform: E ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
1243
+ /* @__PURE__ */ r("div", { className: "ecp-vp-play-icon-wrap", children: [
1244
+ /* @__PURE__ */ e(et, { size: 16, style: { position: "absolute", transform: G ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
1245
+ /* @__PURE__ */ e(tt, { size: 16, style: { position: "absolute", transform: G ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
685
1246
  ] }),
686
- /* @__PURE__ */ e("span", { style: { display: G < 350 ? "none" : "block" }, children: E ? "Pause" : "Play" })
1247
+ /* @__PURE__ */ e("span", { style: { display: N < 350 ? "none" : "block" }, children: G ? "Pause" : "Play" })
687
1248
  ]
688
1249
  }
689
1250
  ),
690
- y.stop && /* @__PURE__ */ c(
1251
+ q.stop && /* @__PURE__ */ r(
691
1252
  "button",
692
1253
  {
693
- onClick: Ee,
1254
+ onClick: Dt,
694
1255
  disabled: !s,
695
- className: `ecp-vp-stop-btn${A ? " ecp-vp-stop-btn--dark" : " ecp-vp-stop-btn--light"}${G >= 600 ? " ecp-vp-stop-btn--wide" : ""}`,
1256
+ className: `ecp-vp-stop-btn${k ? " ecp-vp-stop-btn--dark" : " ecp-vp-stop-btn--light"}${N >= 600 ? " ecp-vp-stop-btn--wide" : ""}`,
696
1257
  children: [
697
- /* @__PURE__ */ e(Ge, { size: 16 }),
698
- /* @__PURE__ */ e("span", { style: { display: G < 600 ? "none" : "block" }, children: "Stop" })
1258
+ /* @__PURE__ */ e(St, { size: 16 }),
1259
+ /* @__PURE__ */ e("span", { style: { display: N < 600 ? "none" : "block" }, children: "Stop" })
699
1260
  ]
700
1261
  }
701
1262
  ),
702
- y.equalizer && /* @__PURE__ */ c(
1263
+ q.equalizer && /* @__PURE__ */ r(
703
1264
  "button",
704
1265
  {
705
- onClick: () => Q(!R),
1266
+ onClick: () => {
1267
+ ze(!Q), Ne(!1);
1268
+ },
706
1269
  disabled: !s,
707
- className: `ecp-vp-eq-btn${R ? " ecp-vp-eq-btn--on" : " ecp-vp-eq-btn--off"}${G >= 600 ? " ecp-vp-eq-btn--wide" : ""}`,
708
- style: R ? { backgroundColor: h.button } : {},
1270
+ className: `ecp-vp-eq-btn${Q ? " ecp-vp-eq-btn--on" : " ecp-vp-eq-btn--off"}${N >= 600 ? " ecp-vp-eq-btn--wide" : ""}`,
1271
+ style: Q ? { backgroundColor: l.button } : {},
709
1272
  children: [
710
- /* @__PURE__ */ e(Fe, { size: 16 }),
711
- /* @__PURE__ */ e("span", { style: { display: G < 600 ? "none" : "block" }, children: "EQ" })
1273
+ /* @__PURE__ */ e(Je, { size: 16 }),
1274
+ /* @__PURE__ */ e("span", { style: { display: N < 600 ? "none" : "block" }, children: "EQ" })
712
1275
  ]
713
1276
  }
714
1277
  ),
715
- y.loop && /* @__PURE__ */ c(
1278
+ q.loop && /* @__PURE__ */ r(
716
1279
  "button",
717
1280
  {
718
- onClick: je,
1281
+ onClick: _t,
719
1282
  disabled: !s,
720
- className: `ecp-vp-loop-btn${V ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${G >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
721
- style: V ? { backgroundColor: h.button } : {},
1283
+ className: `ecp-vp-loop-btn${_ ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${N >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
1284
+ style: _ ? { backgroundColor: l.button } : {},
722
1285
  children: [
723
- /* @__PURE__ */ e(ot, { size: 16, className: V ? "ecp-vp-loop-icon--active" : "" }),
724
- /* @__PURE__ */ e("span", { style: { display: G < 700 ? "none" : "block" }, children: "Loop" })
1286
+ /* @__PURE__ */ e(sr, { size: 16, className: _ ? "ecp-vp-loop-icon--active" : "" }),
1287
+ /* @__PURE__ */ e("span", { style: { display: N < 700 ? "none" : "block" }, children: "Loop" })
725
1288
  ]
726
1289
  }
727
1290
  ),
728
- y.speed && /* @__PURE__ */ e("div", { className: "ecp-vp-speed-wrap", children: /* @__PURE__ */ e("select", { value: ue, onChange: Be, className: `ecp-vp-speed-select${A ? " ecp-vp-speed-select--dark" : " ecp-vp-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((t) => /* @__PURE__ */ c("option", { value: t, className: A ? "ecp-vp-speed-option--dark" : "ecp-vp-speed-option--light", children: [
1291
+ q.speed && !q.dolby8d && /* @__PURE__ */ e("div", { className: "ecp-vp-speed-wrap", children: /* @__PURE__ */ e("select", { value: ae, onChange: Ot, className: `ecp-vp-speed-select${k ? " ecp-vp-speed-select--dark" : " ecp-vp-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((t) => /* @__PURE__ */ r("option", { value: t, className: k ? "ecp-vp-speed-option--dark" : "ecp-vp-speed-option--light", children: [
729
1292
  t,
730
1293
  "x"
731
1294
  ] }, t)) }) }),
732
- y.volume && /* @__PURE__ */ c("div", { className: "ecp-vp-volume", children: [
733
- /* @__PURE__ */ e("button", { onClick: Se, className: "ecp-vp-mute-btn", children: ae || k === 0 ? /* @__PURE__ */ e(_e, { size: 20, className: A ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) : /* @__PURE__ */ e(De, { size: 20, className: A ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) }),
1295
+ q.dolby8d && /* @__PURE__ */ r(
1296
+ "button",
1297
+ {
1298
+ onClick: () => {
1299
+ Ne(!ce), ze(!1);
1300
+ },
1301
+ disabled: !s,
1302
+ className: `ecp-vp-loop-btn${ce ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${N >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
1303
+ style: ce ? { backgroundColor: l.button } : {},
1304
+ children: [
1305
+ /* @__PURE__ */ e(it, { size: 16, className: "" }),
1306
+ /* @__PURE__ */ e("span", { style: { display: N < 700 ? "none" : "block" }, children: "Dolby" })
1307
+ ]
1308
+ }
1309
+ ),
1310
+ q.volume && /* @__PURE__ */ r("div", { className: "ecp-vp-volume", children: [
1311
+ /* @__PURE__ */ e("button", { onClick: Ht, className: "ecp-vp-mute-btn", children: fe || M === 0 ? /* @__PURE__ */ e(ot, { size: 20, className: k ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) : /* @__PURE__ */ e(lt, { size: 20, className: k ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) }),
734
1312
  /* @__PURE__ */ e(
735
1313
  "input",
736
1314
  {
737
1315
  type: "range",
738
1316
  min: "0",
739
1317
  max: "100",
740
- value: k,
741
- onChange: ze,
1318
+ value: M,
1319
+ onChange: jt,
742
1320
  className: "ecp-vp-volume-slider",
743
1321
  style: {
744
- background: `linear-gradient(to right, ${h.slider} ${k}%, ${h.slider + "30"} ${k}%)`,
745
- "--thumb-color": h.slider,
746
- display: G < 460 ? "none" : "block"
1322
+ background: `linear-gradient(to right, ${l.slider} ${M}%, ${l.slider + "30"} ${M}%)`,
1323
+ "--thumb-color": l.slider,
1324
+ display: N < 460 ? "none" : "block"
747
1325
  }
748
1326
  }
749
1327
  ),
750
- /* @__PURE__ */ c(
1328
+ /* @__PURE__ */ r(
751
1329
  "span",
752
1330
  {
753
- className: `ecp-vp-volume-pct${A ? " ecp-vp-volume-pct--dark" : " ecp-vp-volume-pct--light"}`,
754
- style: { display: G < 800 ? "none" : "block" },
1331
+ className: `ecp-vp-volume-pct${k ? " ecp-vp-volume-pct--dark" : " ecp-vp-volume-pct--light"}`,
1332
+ style: { display: N < 800 ? "none" : "block" },
755
1333
  children: [
756
- k,
1334
+ M,
757
1335
  "%"
758
1336
  ]
759
1337
  }
@@ -762,121 +1340,121 @@ function vt({
762
1340
  ] })
763
1341
  ] }) });
764
1342
  }
765
- function bt({
1343
+ function fr({
766
1344
  audio: s,
767
- gradient: l = ["#cd7eff", "#ff00f2"],
768
- background: u = "#f4e4ffff",
769
- autoPlay: v = !1,
770
- thumbnail: C = null,
771
- width: f,
772
- equalizer: y = { bass: 0, mid: 0, treble: 0 },
773
- mode: O = "light"
1345
+ gradient: p = ["#cd7eff", "#ff00f2"],
1346
+ background: v = "#f4e4ffff",
1347
+ autoPlay: y = !1,
1348
+ thumbnail: T = null,
1349
+ width: h,
1350
+ equalizer: q = { bass: 0, mid: 0, treble: 0 },
1351
+ mode: te = "light"
774
1352
  }) {
775
- const [x, F] = m(!1), [I, z] = m(0), [E, H] = m(0), [j, P] = m(!1), [M, D] = m(80), [k, S] = m(1), [ae, me] = m([]), [V, ee] = m(null), [se, ie] = m(!1), [ce, de] = m({ bass: y.bass || 0, mid: y.mid || 0, treble: y.treble || 0 }), R = b(null), Q = b(null), Y = b(null), oe = b(null), ue = b(null), te = b(null), G = () => {
776
- const r = [];
777
- for (let d = 0; d < 100; d++) r.push(20 + Math.random() * 60);
778
- return r;
1353
+ const [R, S] = b(!1), [V, U] = b(0), [a, G] = b(0), [D, H] = b(!1), [Y, O] = b(80), [z, M] = b(1), [Me, fe] = b([]), [Ce, _] = b(null), [Fe, me] = b(!1), [be, ye] = b({ bass: q.bass || 0, mid: q.mid || 0, treble: q.treble || 0 }), X = u(null), Q = u(null), ze = u(null), Z = u(null), Ee = u(null), ae = u(null), _e = () => {
1354
+ const c = [];
1355
+ for (let w = 0; w < 100; w++) c.push(20 + Math.random() * 60);
1356
+ return c;
779
1357
  };
780
- $(() => {
1358
+ E(() => {
781
1359
  if (!s) return;
782
- if (!Array.isArray(l) || l.length < 2) {
783
- ee("Gradient must be an array with at least 2 colors");
1360
+ if (!Array.isArray(p) || p.length < 2) {
1361
+ _("Gradient must be an array with at least 2 colors");
784
1362
  return;
785
1363
  }
786
- const r = R.current;
787
- if (!r) return;
788
- const d = () => z(r.currentTime), g = () => {
789
- H(r.duration), me(G());
790
- }, B = () => F(!1), _ = (J) => {
791
- var h, A;
792
- return ee(`Audio error: ${((A = (h = J.target) == null ? void 0 : h.error) == null ? void 0 : A.message) || "Failed to load audio"}`);
1364
+ const c = X.current;
1365
+ if (!c) return;
1366
+ const w = () => U(c.currentTime), F = () => {
1367
+ G(c.duration), fe(_e());
1368
+ }, d = () => S(!1), C = (J) => {
1369
+ var A, ue;
1370
+ return _(`Audio error: ${((ue = (A = J.target) == null ? void 0 : A.error) == null ? void 0 : ue.message) || "Failed to load audio"}`);
793
1371
  };
794
- return r.addEventListener("timeupdate", d), r.addEventListener("loadedmetadata", g), r.addEventListener("ended", B), r.addEventListener("error", _), () => {
795
- r.removeEventListener("timeupdate", d), r.removeEventListener("loadedmetadata", g), r.removeEventListener("ended", B), r.removeEventListener("error", _);
1372
+ return c.addEventListener("timeupdate", w), c.addEventListener("loadedmetadata", F), c.addEventListener("ended", d), c.addEventListener("error", C), () => {
1373
+ c.removeEventListener("timeupdate", w), c.removeEventListener("loadedmetadata", F), c.removeEventListener("ended", d), c.removeEventListener("error", C);
796
1374
  };
797
- }, [s, l, O]), $(() => {
798
- s && R.current && v && (R.current.play().catch((r) => {
799
- console.error("Play failed:", r), F(!1);
800
- }), F(!0));
801
- }, [s]), $(() => {
802
- if (R.current && !Q.current && R.current) {
803
- const r = window.AudioContext || window.webkitAudioContext;
804
- if (r) {
805
- const d = new r();
806
- Q.current = d;
807
- const g = d.createMediaElementSource(R.current);
808
- Y.current = g;
809
- const B = d.createBiquadFilter();
810
- B.type = "lowshelf", B.frequency.value = 200, oe.current = B;
811
- const _ = d.createBiquadFilter();
812
- _.type = "peaking", _.frequency.value = 1e3, _.Q.value = 1, ue.current = _;
813
- const J = d.createBiquadFilter();
814
- J.type = "highshelf", J.frequency.value = 3e3, te.current = J, g.connect(B).connect(_).connect(J).connect(d.destination);
1375
+ }, [s, p, te]), E(() => {
1376
+ s && X.current && y && (X.current.play().catch((c) => {
1377
+ console.error("Play failed:", c), S(!1);
1378
+ }), S(!0));
1379
+ }, [s]), E(() => {
1380
+ if (X.current && !Q.current && X.current) {
1381
+ const c = window.AudioContext || window.webkitAudioContext;
1382
+ if (c) {
1383
+ const w = new c();
1384
+ Q.current = w;
1385
+ const F = w.createMediaElementSource(X.current);
1386
+ ze.current = F;
1387
+ const d = w.createBiquadFilter();
1388
+ d.type = "lowshelf", d.frequency.value = 200, Z.current = d;
1389
+ const C = w.createBiquadFilter();
1390
+ C.type = "peaking", C.frequency.value = 1e3, C.Q.value = 1, Ee.current = C;
1391
+ const J = w.createBiquadFilter();
1392
+ J.type = "highshelf", J.frequency.value = 3e3, ae.current = J, F.connect(d).connect(C).connect(J).connect(w.destination);
815
1393
  }
816
1394
  }
817
- }, [s]), $(() => {
818
- R.current && (R.current.volume = j ? 0 : M / 100);
819
- }, [M, j]), $(() => {
820
- R.current && (R.current.playbackRate = k);
821
- }, [k]);
822
- const w = () => {
823
- R.current && (x ? R.current.pause() : R.current.play().catch((r) => ee(`Playback failed: ${r instanceof Error ? r.message : String(r)}`)), F(!x));
824
- }, p = () => P(!j), L = (r) => {
825
- D(parseInt(r.target.value)), j && parseInt(r.target.value) > 0 && P(!1);
826
- }, K = (r) => S(parseFloat(r.target.value)), fe = (r) => {
827
- const d = r.currentTarget.getBoundingClientRect(), B = (r.clientX - d.left) / d.width * E;
828
- R.current && (R.current.currentTime = B, z(B));
829
- }, W = (r, d) => {
830
- de((g) => ({ ...g, [r]: d })), r === "bass" && oe.current && (oe.current.gain.value = d), r === "mid" && ue.current && (ue.current.gain.value = d), r === "treble" && te.current && (te.current.gain.value = d);
831
- }, re = () => {
832
- W("bass", 0), W("mid", 0), W("treble", 0);
833
- }, X = (r) => {
834
- if (isNaN(r)) return "0:00";
835
- const d = Math.floor(r / 60), g = Math.floor(r % 60);
836
- return `${d}:${g.toString().padStart(2, "0")}`;
837
- }, N = E > 0 ? I / E * 100 : 0, T = O === "dark";
838
- if (V)
839
- return /* @__PURE__ */ c("div", { className: "ecp-wave-error", style: { background: u }, children: [
840
- /* @__PURE__ */ e("p", { className: `ecp-wave-error-title${T ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: "Error" }),
841
- /* @__PURE__ */ e("p", { className: `ecp-wave-error-msg${T ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: V })
1395
+ }, [s]), E(() => {
1396
+ X.current && (X.current.volume = D ? 0 : Y / 100);
1397
+ }, [Y, D]), E(() => {
1398
+ X.current && (X.current.playbackRate = z);
1399
+ }, [z]);
1400
+ const N = () => {
1401
+ X.current && (R ? X.current.pause() : X.current.play().catch((c) => _(`Playback failed: ${c instanceof Error ? c.message : String(c)}`)), S(!R));
1402
+ }, Te = () => H(!D), ce = (c) => {
1403
+ O(parseInt(c.target.value)), D && parseInt(c.target.value) > 0 && H(!1);
1404
+ }, Ne = (c) => M(parseFloat(c.target.value)), o = (c) => {
1405
+ const w = c.currentTarget.getBoundingClientRect(), d = (c.clientX - w.left) / w.width * a;
1406
+ X.current && (X.current.currentTime = d, U(d));
1407
+ }, pe = (c, w) => {
1408
+ ye((F) => ({ ...F, [c]: w })), c === "bass" && Z.current && (Z.current.gain.value = w), c === "mid" && Ee.current && (Ee.current.gain.value = w), c === "treble" && ae.current && (ae.current.gain.value = w);
1409
+ }, de = () => {
1410
+ pe("bass", 0), pe("mid", 0), pe("treble", 0);
1411
+ }, ke = (c) => {
1412
+ if (isNaN(c)) return "0:00";
1413
+ const w = Math.floor(c / 60), F = Math.floor(c % 60);
1414
+ return `${w}:${F.toString().padStart(2, "0")}`;
1415
+ }, P = a > 0 ? V / a * 100 : 0, B = te === "dark";
1416
+ if (Ce)
1417
+ return /* @__PURE__ */ r("div", { className: "ecp-wave-error", style: { background: v }, children: [
1418
+ /* @__PURE__ */ e("p", { className: `ecp-wave-error-title${B ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: "Error" }),
1419
+ /* @__PURE__ */ e("p", { className: `ecp-wave-error-msg${B ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: Ce })
842
1420
  ] });
843
1421
  if (!s) return null;
844
- const Z = T ? "#9ca3af" : "#6b7280";
845
- return /* @__PURE__ */ c("div", { className: "ecp-wave-outer", style: { width: f ? `${f}px` : void 0 }, children: [
846
- /* @__PURE__ */ e("audio", { ref: R, src: s, className: "ecp-wave-audio-el" }),
847
- /* @__PURE__ */ e("div", { className: "ecp-wave-card", children: /* @__PURE__ */ c("div", { className: "ecp-wave-card-inner", style: { background: u }, children: [
848
- C && /* @__PURE__ */ e("div", { className: "ecp-wave-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: C, alt: "", className: "ecp-wave-thumbnail" }) }),
849
- /* @__PURE__ */ c("div", { className: "ecp-wave-seek", onClick: fe, children: [
850
- /* @__PURE__ */ e("div", { className: "ecp-wave-bars", children: ae.map((r, d) => {
851
- const g = d / ae.length * 100 <= N;
1422
+ const ie = B ? "#9ca3af" : "#6b7280";
1423
+ return /* @__PURE__ */ r("div", { className: "ecp-wave-outer", style: { width: h ? `${h}px` : void 0 }, children: [
1424
+ /* @__PURE__ */ e("audio", { ref: X, src: s, className: "ecp-wave-audio-el" }),
1425
+ /* @__PURE__ */ e("div", { className: "ecp-wave-card", children: /* @__PURE__ */ r("div", { className: "ecp-wave-card-inner", style: { background: v }, children: [
1426
+ T && /* @__PURE__ */ e("div", { className: "ecp-wave-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: T, alt: "", className: "ecp-wave-thumbnail" }) }),
1427
+ /* @__PURE__ */ r("div", { className: "ecp-wave-seek", onClick: o, children: [
1428
+ /* @__PURE__ */ e("div", { className: "ecp-wave-bars", children: Me.map((c, w) => {
1429
+ const F = w / Me.length * 100 <= P;
852
1430
  return /* @__PURE__ */ e(
853
1431
  "div",
854
1432
  {
855
1433
  className: "ecp-wave-bar",
856
1434
  style: {
857
- height: `${r}%`,
858
- background: g ? l[0] : l[1],
859
- opacity: g ? 1 : 0.4
1435
+ height: `${c}%`,
1436
+ background: F ? p[0] : p[1],
1437
+ opacity: F ? 1 : 0.4
860
1438
  }
861
1439
  },
862
- d
1440
+ w
863
1441
  );
864
1442
  }) }),
865
- /* @__PURE__ */ e("div", { className: "ecp-wave-progress-line", style: { left: `${N}%` } })
1443
+ /* @__PURE__ */ e("div", { className: "ecp-wave-progress-line", style: { left: `${P}%` } })
866
1444
  ] }),
867
- /* @__PURE__ */ c("div", { className: "ecp-wave-times", style: { color: Z }, children: [
868
- /* @__PURE__ */ e("span", { children: X(I) }),
869
- /* @__PURE__ */ e("span", { children: X(E) })
1445
+ /* @__PURE__ */ r("div", { className: "ecp-wave-times", style: { color: ie }, children: [
1446
+ /* @__PURE__ */ e("span", { children: ke(V) }),
1447
+ /* @__PURE__ */ e("span", { children: ke(a) })
870
1448
  ] }),
871
- /* @__PURE__ */ c("div", { className: "ecp-wave-controls", children: [
872
- /* @__PURE__ */ c("div", { className: "ecp-wave-left-controls", children: [
1449
+ /* @__PURE__ */ r("div", { className: "ecp-wave-controls", children: [
1450
+ /* @__PURE__ */ r("div", { className: "ecp-wave-left-controls", children: [
873
1451
  /* @__PURE__ */ e(
874
1452
  "button",
875
1453
  {
876
- onClick: p,
1454
+ onClick: Te,
877
1455
  className: "ecp-wave-vol-btn",
878
- style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
879
- children: j || M === 0 ? /* @__PURE__ */ e(_e, { style: { width: "1rem", height: "1rem", color: "white" } }) : /* @__PURE__ */ e(De, { style: { width: "1rem", height: "1rem", color: "white" } })
1456
+ style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
1457
+ children: D || Y === 0 ? /* @__PURE__ */ e(ot, { style: { width: "1rem", height: "1rem", color: "white" } }) : /* @__PURE__ */ e(lt, { style: { width: "1rem", height: "1rem", color: "white" } })
880
1458
  }
881
1459
  ),
882
1460
  /* @__PURE__ */ e(
@@ -885,160 +1463,160 @@ function bt({
885
1463
  type: "range",
886
1464
  min: "0",
887
1465
  max: "100",
888
- value: M,
889
- onChange: L,
1466
+ value: Y,
1467
+ onChange: ce,
890
1468
  className: "ecp-wave-vol-slider",
891
1469
  style: {
892
- background: `linear-gradient(to right, ${l[0]} ${M}%, ${T ? "#374151" : "#d1d5db"} ${M}%)`,
893
- "--thumb-color": l[0],
894
- display: f && f < 400 ? "none" : void 0
1470
+ background: `linear-gradient(to right, ${p[0]} ${Y}%, ${B ? "#374151" : "#d1d5db"} ${Y}%)`,
1471
+ "--thumb-color": p[0],
1472
+ display: h && h < 400 ? "none" : void 0
895
1473
  }
896
1474
  }
897
1475
  ),
898
- f && f < 400 && /* @__PURE__ */ e(
1476
+ h && h < 400 && /* @__PURE__ */ e(
899
1477
  "button",
900
1478
  {
901
- onClick: () => ie(!se),
1479
+ onClick: () => me(!Fe),
902
1480
  className: "ecp-wave-eq-btn",
903
- style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
904
- children: /* @__PURE__ */ e(Fe, { style: { width: "1rem", height: "1rem", color: "white" } })
1481
+ style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
1482
+ children: /* @__PURE__ */ e(Je, { style: { width: "1rem", height: "1rem", color: "white" } })
905
1483
  }
906
1484
  )
907
1485
  ] }),
908
1486
  /* @__PURE__ */ e("div", { className: "ecp-wave-center-controls", children: /* @__PURE__ */ e(
909
1487
  "button",
910
1488
  {
911
- onClick: w,
1489
+ onClick: N,
912
1490
  className: "ecp-wave-play-btn",
913
- style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
914
- children: x ? /* @__PURE__ */ e(Pe, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } }) : /* @__PURE__ */ e(Me, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } })
1491
+ style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
1492
+ children: R ? /* @__PURE__ */ e(et, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } }) : /* @__PURE__ */ e(tt, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } })
915
1493
  }
916
1494
  ) }),
917
- /* @__PURE__ */ c("div", { className: "ecp-wave-right-controls", children: [
1495
+ /* @__PURE__ */ r("div", { className: "ecp-wave-right-controls", children: [
918
1496
  /* @__PURE__ */ e(
919
1497
  "select",
920
1498
  {
921
- value: k,
922
- onChange: K,
923
- className: `ecp-wave-speed-select${T ? " ecp-wave-speed-select--dark" : " ecp-wave-speed-select--light"}`,
924
- style: { background: u, color: l[0] },
925
- children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((r) => /* @__PURE__ */ c("option", { value: r, children: [
926
- r,
1499
+ value: z,
1500
+ onChange: Ne,
1501
+ className: `ecp-wave-speed-select${B ? " ecp-wave-speed-select--dark" : " ecp-wave-speed-select--light"}`,
1502
+ style: { background: v, color: p[0] },
1503
+ children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((c) => /* @__PURE__ */ r("option", { value: c, children: [
1504
+ c,
927
1505
  "x"
928
- ] }, r))
1506
+ ] }, c))
929
1507
  }
930
1508
  ),
931
- !(f && f < 400) && /* @__PURE__ */ e(
1509
+ !(h && h < 400) && /* @__PURE__ */ e(
932
1510
  "button",
933
1511
  {
934
- onClick: () => ie(!se),
1512
+ onClick: () => me(!Fe),
935
1513
  className: "ecp-wave-eq-btn",
936
- style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
937
- children: /* @__PURE__ */ e(Fe, { style: { width: "1rem", height: "1rem", color: "white" } })
1514
+ style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
1515
+ children: /* @__PURE__ */ e(Je, { style: { width: "1rem", height: "1rem", color: "white" } })
938
1516
  }
939
1517
  )
940
1518
  ] })
941
1519
  ] })
942
1520
  ] }) }),
943
- se && /* @__PURE__ */ e("div", { className: "ecp-wave-eq-overlay", children: /* @__PURE__ */ c("div", { className: `ecp-wave-eq-panel${T ? " ecp-wave-eq-panel--dark" : " ecp-wave-eq-panel--light"}`, children: [
944
- /* @__PURE__ */ e("h3", { className: `ecp-wave-eq-title${T ? " ecp-wave-eq-title--dark" : " ecp-wave-eq-title--light"}`, children: "Equalizer" }),
945
- /* @__PURE__ */ e("div", { className: "ecp-wave-eq-bands", children: ["bass", "mid", "treble"].map((r) => /* @__PURE__ */ c("div", { children: [
946
- /* @__PURE__ */ c("div", { className: "ecp-wave-eq-band-header", children: [
947
- /* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: r.charAt(0).toUpperCase() + r.slice(1) }),
948
- /* @__PURE__ */ c("span", { className: T ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: [
949
- ce[r],
1521
+ Fe && /* @__PURE__ */ e("div", { className: "ecp-wave-eq-overlay", children: /* @__PURE__ */ r("div", { className: `ecp-wave-eq-panel${B ? " ecp-wave-eq-panel--dark" : " ecp-wave-eq-panel--light"}`, children: [
1522
+ /* @__PURE__ */ e("h3", { className: `ecp-wave-eq-title${B ? " ecp-wave-eq-title--dark" : " ecp-wave-eq-title--light"}`, children: "Equalizer" }),
1523
+ /* @__PURE__ */ e("div", { className: "ecp-wave-eq-bands", children: ["bass", "mid", "treble"].map((c) => /* @__PURE__ */ r("div", { children: [
1524
+ /* @__PURE__ */ r("div", { className: "ecp-wave-eq-band-header", children: [
1525
+ /* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: c.charAt(0).toUpperCase() + c.slice(1) }),
1526
+ /* @__PURE__ */ r("span", { className: B ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: [
1527
+ be[c],
950
1528
  " dB"
951
1529
  ] })
952
1530
  ] }),
953
- /* @__PURE__ */ c("div", { className: "ecp-wave-eq-range-row", children: [
954
- /* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "-20" }),
1531
+ /* @__PURE__ */ r("div", { className: "ecp-wave-eq-range-row", children: [
1532
+ /* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "-20" }),
955
1533
  /* @__PURE__ */ e(
956
1534
  "input",
957
1535
  {
958
1536
  type: "range",
959
1537
  min: "-20",
960
1538
  max: "20",
961
- value: ce[r],
962
- onChange: (d) => W(r, parseInt(d.target.value)),
1539
+ value: be[c],
1540
+ onChange: (w) => pe(c, parseInt(w.target.value)),
963
1541
  className: "ecp-wave-eq-slider",
964
1542
  style: {
965
- background: `linear-gradient(to right, ${l[0]} ${(ce[r] + 20) / 40 * 100}%, ${l[1] + "30"} ${(ce[r] + 20) / 40 * 100}%)`,
966
- "--thumb-color": l[0]
1543
+ background: `linear-gradient(to right, ${p[0]} ${(be[c] + 20) / 40 * 100}%, ${p[1] + "30"} ${(be[c] + 20) / 40 * 100}%)`,
1544
+ "--thumb-color": p[0]
967
1545
  }
968
1546
  }
969
1547
  ),
970
- /* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "+20" })
1548
+ /* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "+20" })
971
1549
  ] })
972
- ] }, r)) }),
973
- /* @__PURE__ */ c("div", { className: "ecp-wave-eq-footer", children: [
974
- /* @__PURE__ */ e("button", { onClick: re, className: `ecp-wave-eq-footer-btn${T ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Reset" }),
975
- /* @__PURE__ */ e("button", { onClick: () => ie(!1), className: `ecp-wave-eq-footer-btn${T ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Close" })
1550
+ ] }, c)) }),
1551
+ /* @__PURE__ */ r("div", { className: "ecp-wave-eq-footer", children: [
1552
+ /* @__PURE__ */ e("button", { onClick: de, className: `ecp-wave-eq-footer-btn${B ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Reset" }),
1553
+ /* @__PURE__ */ e("button", { onClick: () => me(!1), className: `ecp-wave-eq-footer-btn${B ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Close" })
976
1554
  ] })
977
1555
  ] }) })
978
1556
  ] });
979
1557
  }
980
- function gt({ audio: s, thumbnail: l, gradient: u = ["#cd7eff", "#fe59f6"], background: v = "#1f273a", autoPlay: C = !1 }) {
981
- const [f, y] = m(!1), [, O] = m(0), x = b(null), [F, I] = m(0), [z, E] = m(0), [H, j] = m(0);
982
- $(() => {
983
- const k = x.current;
984
- if (!k) return;
985
- const S = () => O(k.currentTime);
986
- return k.addEventListener("timeupdate", S), () => k.removeEventListener("timeupdate", S);
987
- }, []), $(() => {
988
- const k = setInterval(() => {
989
- f && I((S) => S + 0.1);
1558
+ function gr({ audio: s, thumbnail: p, gradient: v = ["#cd7eff", "#fe59f6"], background: y = "#1f273a", autoPlay: T = !1 }) {
1559
+ const [h, q] = b(!1), [, te] = b(0), R = u(null), [S, V] = b(0), [U, a] = b(0), [G, D] = b(0);
1560
+ E(() => {
1561
+ const z = R.current;
1562
+ if (!z) return;
1563
+ const M = () => te(z.currentTime);
1564
+ return z.addEventListener("timeupdate", M), () => z.removeEventListener("timeupdate", M);
1565
+ }, []), E(() => {
1566
+ const z = setInterval(() => {
1567
+ h && V((M) => M + 0.1);
990
1568
  }, 100);
991
- return () => clearInterval(k);
992
- }, [f]), $(() => {
993
- const k = setInterval(() => {
994
- f && j((S) => S + 0.1);
1569
+ return () => clearInterval(z);
1570
+ }, [h]), E(() => {
1571
+ const z = setInterval(() => {
1572
+ h && D((M) => M + 0.1);
995
1573
  }, 100);
996
- return () => clearInterval(k);
997
- }, [f]), $(() => {
998
- s && x.current && C && (x.current.play().catch(() => y(!1)), y(!0));
999
- }, [s]), $(() => {
1000
- const k = x.current;
1001
- if (!k) return;
1002
- const S = () => E(k.duration);
1003
- return j(0), k.addEventListener("loadedmetadata", S), () => k.removeEventListener("loadedmetadata", S);
1574
+ return () => clearInterval(z);
1575
+ }, [h]), E(() => {
1576
+ s && R.current && T && (R.current.play().catch(() => q(!1)), q(!0));
1577
+ }, [s]), E(() => {
1578
+ const z = R.current;
1579
+ if (!z) return;
1580
+ const M = () => a(z.duration);
1581
+ return D(0), z.addEventListener("loadedmetadata", M), () => z.removeEventListener("loadedmetadata", M);
1004
1582
  }, [s]);
1005
- const P = () => {
1006
- x.current && (f ? x.current.pause() : x.current.play().catch((k) => console.error("NanoPlayer play failed:", k)), y(!f));
1583
+ const H = () => {
1584
+ R.current && (h ? R.current.pause() : R.current.play().catch((z) => console.error("NanoPlayer play failed:", z)), q(!h));
1007
1585
  };
1008
1586
  if (!s) return null;
1009
- const M = `linear-gradient(135deg, ${u[0]}, ${u[1]})`, D = `${(z > 0 ? H / z : 0) * 100}%`;
1010
- return /* @__PURE__ */ c(
1587
+ const Y = `linear-gradient(135deg, ${v[0]}, ${v[1]})`, O = `${(U > 0 ? G / U : 0) * 100}%`;
1588
+ return /* @__PURE__ */ r(
1011
1589
  "div",
1012
1590
  {
1013
- className: `ecp-nano-wrapper${l ? " ecp-nano-wrapper--card" : " ecp-nano-wrapper--pill"}`,
1014
- style: { backgroundColor: v },
1591
+ className: `ecp-nano-wrapper${p ? " ecp-nano-wrapper--card" : " ecp-nano-wrapper--pill"}`,
1592
+ style: { backgroundColor: y },
1015
1593
  children: [
1016
1594
  /* @__PURE__ */ e(
1017
1595
  "audio",
1018
1596
  {
1019
- ref: x,
1597
+ ref: R,
1020
1598
  src: s,
1021
1599
  onEnded: () => {
1022
- y(!1), j(0);
1600
+ q(!1), D(0);
1023
1601
  }
1024
1602
  }
1025
1603
  ),
1026
- /* @__PURE__ */ e("div", { className: "ecp-nano-progress-bg", style: { width: D, backgroundImage: M } }),
1027
- /* @__PURE__ */ c("div", { className: "ecp-nano-content", children: [
1028
- l && /* @__PURE__ */ e("div", { className: "ecp-nano-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: l, alt: "", className: "ecp-nano-thumbnail" }) }),
1029
- /* @__PURE__ */ c("div", { className: "ecp-nano-row", children: [
1030
- /* @__PURE__ */ e("button", { onClick: P, className: "ecp-nano-play-btn", style: { background: M }, children: f ? /* @__PURE__ */ e(Pe, { fill: v, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) : /* @__PURE__ */ e(Me, { fill: v, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) }),
1031
- /* @__PURE__ */ e("div", { className: "ecp-nano-waveform", children: [...Array(12)].map((k, S) => /* @__PURE__ */ e(
1604
+ /* @__PURE__ */ e("div", { className: "ecp-nano-progress-bg", style: { width: O, backgroundImage: Y } }),
1605
+ /* @__PURE__ */ r("div", { className: "ecp-nano-content", children: [
1606
+ p && /* @__PURE__ */ e("div", { className: "ecp-nano-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: p, alt: "", className: "ecp-nano-thumbnail" }) }),
1607
+ /* @__PURE__ */ r("div", { className: "ecp-nano-row", children: [
1608
+ /* @__PURE__ */ e("button", { onClick: H, className: "ecp-nano-play-btn", style: { background: Y }, children: h ? /* @__PURE__ */ e(et, { fill: y, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) : /* @__PURE__ */ e(tt, { fill: y, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) }),
1609
+ /* @__PURE__ */ e("div", { className: "ecp-nano-waveform", children: [...Array(12)].map((z, M) => /* @__PURE__ */ e(
1032
1610
  "div",
1033
1611
  {
1034
1612
  className: "ecp-nano-wave-bar",
1035
1613
  style: {
1036
- background: `linear-gradient(to top, ${u[0]}, ${u[1]})`,
1037
- height: f ? `${8 + Math.sin((F * 8 + S) * 0.6) * 10}px` : "8px",
1038
- opacity: f ? 0.8 : 0.4
1614
+ background: `linear-gradient(to top, ${v[0]}, ${v[1]})`,
1615
+ height: h ? `${8 + Math.sin((S * 8 + M) * 0.6) * 10}px` : "8px",
1616
+ opacity: h ? 0.8 : 0.4
1039
1617
  }
1040
1618
  },
1041
- S
1619
+ M
1042
1620
  )) })
1043
1621
  ] })
1044
1622
  ] })
@@ -1046,13 +1624,13 @@ function gt({ audio: s, thumbnail: l, gradient: u = ["#cd7eff", "#fe59f6"], back
1046
1624
  }
1047
1625
  );
1048
1626
  }
1049
- function wt({
1627
+ function qr({
1050
1628
  video: s,
1051
- name: l = "No video loaded",
1052
- audioVisual: u = null,
1053
- volume: v = 100,
1054
- thumbnail: C = null,
1055
- controls: f = {
1629
+ name: p = "No video loaded",
1630
+ audioVisual: v = null,
1631
+ volume: y = 100,
1632
+ thumbnail: T = null,
1633
+ controls: h = {
1056
1634
  play: !0,
1057
1635
  pause: !0,
1058
1636
  stop: !0,
@@ -1063,203 +1641,203 @@ function wt({
1063
1641
  equalizer: !0,
1064
1642
  speed: !0
1065
1643
  },
1066
- mode: y = "light",
1067
- transparent: O = !1,
1068
- autoPlay: x = !1,
1069
- color: F = "#3b82f6",
1070
- equalizer: I = { bass: 0, mid: 0, treble: 0 }
1644
+ mode: q = "light",
1645
+ transparent: te = !1,
1646
+ autoPlay: R = !1,
1647
+ color: S = "#3b82f6",
1648
+ equalizer: V = { bass: 0, mid: 0, treble: 0 }
1071
1649
  }) {
1072
- const [z, E] = m(!1), [H, j] = m(0), [P, M] = m(0), [D, k] = m(v || 100), [S, ae] = m(!1), [me, V] = m(!1), [ee, se] = m(!1), [ie, ce] = m([]), [de, R] = m(!1), [Q, Y] = m({ bass: I.bass || 0, mid: I.mid || 0, treble: I.treble || 0 }), [oe, ue] = m(1), [te, G] = m(0), w = b(null), p = b(null), L = b(null), K = b(null), fe = b(null), W = b(null), re = b(null), X = b(null), N = b(null), T = b(null), Z = b(0), r = b(0), d = b(0), g = b(0), B = b(0), _ = b(0), J = b(!1), h = y === "dark" || ee, A = typeof f == "object" && Object.keys(f).length === 0;
1073
- $(() => {
1074
- const n = p.current;
1650
+ const [U, a] = b(!1), [G, D] = b(0), [H, Y] = b(0), [O, z] = b(y || 100), [M, Me] = b(!1), [fe, Ce] = b(!1), [_, Fe] = b(!1), [me, be] = b([]), [ye, X] = b(!1), [Q, ze] = b({ bass: V.bass || 0, mid: V.mid || 0, treble: V.treble || 0 }), [Z, Ee] = b(1), [ae, _e] = b(0), N = u(null), Te = u(null), ce = u(null), Ne = u(null), o = u(null), pe = u(null), de = u(null), ke = u(null), P = u(null), B = u(null), ie = u(0), c = u(0), w = u(0), F = u(0), d = u(0), C = u(0), J = u(!1), A = q === "dark" || _, ue = typeof h == "object" && Object.keys(h).length === 0;
1651
+ E(() => {
1652
+ const n = Te.current;
1075
1653
  if (!n) return;
1076
- const t = new ResizeObserver((a) => {
1077
- for (let o of a) G(o.contentRect.width);
1654
+ const f = new ResizeObserver(($) => {
1655
+ for (let L of $) _e(L.contentRect.width);
1078
1656
  });
1079
- return t.observe(n), () => t.disconnect();
1080
- }, []), $(() => {
1657
+ return f.observe(n), () => f.disconnect();
1658
+ }, []), E(() => {
1081
1659
  const n = [];
1082
- s && typeof s != "string" && n.push(["TypeError", "video must be a string (URL or path)"]), l && typeof l != "string" && n.push(["TypeError", "name must be a string"]), (typeof v != "number" || v < 0 || v > 100) && n.push(["TypeError", "volume must be a number between 0 and 100"]), u && typeof u != "object" ? n.push(["TypeError", "audioVisual must be an object"]) : u && !["left", "right", "top", "bottom"].includes(u.side) && n.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"]), n.length > 0 ? ce(n) : ce([]);
1083
- }, [s, l, v, u, f, y]), $(() => {
1084
- if (!w.current) return;
1085
- const n = w.current, t = () => {
1086
- me || j(n.currentTime);
1087
- }, a = () => M(n.duration), o = () => {
1088
- E(!1), N.current && cancelAnimationFrame(N.current);
1089
- }, i = () => E(!0), q = () => E(!1);
1090
- return n.addEventListener("timeupdate", t), n.addEventListener("loadedmetadata", a), n.addEventListener("ended", o), n.addEventListener("play", i), n.addEventListener("pause", q), () => {
1091
- n.removeEventListener("timeupdate", t), n.removeEventListener("loadedmetadata", a), n.removeEventListener("ended", o), n.removeEventListener("play", i), n.removeEventListener("pause", q);
1660
+ s && typeof s != "string" && n.push(["TypeError", "video must be a string (URL or path)"]), p && typeof p != "string" && n.push(["TypeError", "name must be a string"]), (typeof y != "number" || y < 0 || y > 100) && n.push(["TypeError", "volume must be a number between 0 and 100"]), v && typeof v != "object" ? n.push(["TypeError", "audioVisual must be an object"]) : v && !["left", "right", "top", "bottom"].includes(v.side) && n.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"]), n.length > 0 ? be(n) : be([]);
1661
+ }, [s, p, y, v, h, q]), E(() => {
1662
+ if (!N.current) return;
1663
+ const n = N.current, f = () => {
1664
+ fe || D(n.currentTime);
1665
+ }, $ = () => Y(n.duration), L = () => {
1666
+ a(!1), P.current && cancelAnimationFrame(P.current);
1667
+ }, W = () => a(!0), se = () => a(!1);
1668
+ return n.addEventListener("timeupdate", f), n.addEventListener("loadedmetadata", $), n.addEventListener("ended", L), n.addEventListener("play", W), n.addEventListener("pause", se), () => {
1669
+ n.removeEventListener("timeupdate", f), n.removeEventListener("loadedmetadata", $), n.removeEventListener("ended", L), n.removeEventListener("play", W), n.removeEventListener("pause", se);
1092
1670
  };
1093
- }, [me]), $(() => {
1671
+ }, [fe]), E(() => {
1094
1672
  if (s) {
1095
- const n = z, t = D;
1096
- if (w.current) {
1097
- w.current.pause(), w.current.src = s, w.current.volume = S ? 0 : t / 100;
1098
- const a = () => {
1099
- n && w.current && w.current.play().catch((o) => console.error("Play failed:", o)), w.current && w.current.removeEventListener("canplay", a);
1673
+ const n = U, f = O;
1674
+ if (N.current) {
1675
+ N.current.pause(), N.current.src = s, N.current.volume = M ? 0 : f / 100;
1676
+ const $ = () => {
1677
+ n && N.current && N.current.play().catch((L) => console.error("Play failed:", L)), N.current && N.current.removeEventListener("canplay", $);
1100
1678
  };
1101
- w.current.addEventListener("canplay", a), w.current.load();
1679
+ N.current.addEventListener("canplay", $), N.current.load();
1102
1680
  }
1103
- j(0), E(!1), Z.current = 0, r.current = 0, d.current = 0, g.current = 0, B.current = 0, _.current = 0, he();
1681
+ D(0), a(!1), ie.current = 0, c.current = 0, w.current = 0, F.current = 0, d.current = 0, C.current = 0, ve();
1104
1682
  }
1105
- }, [s]), $(() => {
1106
- w.current && (w.current.volume = S ? 0 : D / 100);
1107
- }, [D, S]), $(() => {
1108
- w.current && (w.current.playbackRate = oe);
1109
- }, [oe]), $(() => {
1110
- L.current && (W.current && (W.current.gain.value = Q.bass), re.current && (re.current.gain.value = Q.mid), X.current && (X.current.gain.value = Q.treble));
1111
- }, [Q]), $(() => {
1112
- J.current = z, N.current && (cancelAnimationFrame(N.current), N.current = null), z && u ? (L.current || ke(), we()) : !z && u && Ce();
1113
- }, [z, u]), $(() => {
1114
- const n = () => se(!!document.fullscreenElement);
1683
+ }, [s]), E(() => {
1684
+ N.current && (N.current.volume = M ? 0 : O / 100);
1685
+ }, [O, M]), E(() => {
1686
+ N.current && (N.current.playbackRate = Z);
1687
+ }, [Z]), E(() => {
1688
+ ce.current && (pe.current && (pe.current.gain.value = Q.bass), de.current && (de.current.gain.value = Q.mid), ke.current && (ke.current.gain.value = Q.treble));
1689
+ }, [Q]), E(() => {
1690
+ J.current = U, P.current && (cancelAnimationFrame(P.current), P.current = null), U && v ? (ce.current || Re(), I()) : !U && v && we();
1691
+ }, [U, v]), E(() => {
1692
+ const n = () => Fe(!!document.fullscreenElement);
1115
1693
  return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
1116
- }, []), $(() => () => {
1117
- N.current && cancelAnimationFrame(N.current), L.current && L.current.close().catch((n) => console.warn("AudioContext cleanup error:", n));
1694
+ }, []), E(() => () => {
1695
+ P.current && cancelAnimationFrame(P.current), ce.current && ce.current.close().catch((n) => console.warn("AudioContext cleanup error:", n));
1118
1696
  }, []);
1119
- const ke = () => {
1120
- if (!L.current && w.current)
1697
+ const Re = () => {
1698
+ if (!ce.current && N.current)
1121
1699
  try {
1122
1700
  const n = window.AudioContext || window.webkitAudioContext;
1123
1701
  if (n) {
1124
- const t = new n();
1125
- L.current = t;
1126
- const a = t.createBiquadFilter();
1127
- a.type = "lowshelf", a.frequency.value = 320, a.gain.value = Q.bass;
1128
- const o = t.createBiquadFilter();
1129
- o.type = "peaking", o.frequency.value = 1e3, o.Q.value = 0.5, o.gain.value = Q.mid;
1130
- const i = t.createBiquadFilter();
1131
- i.type = "highshelf", i.frequency.value = 3200, i.gain.value = Q.treble;
1132
- const q = t.createAnalyser();
1133
- q.fftSize = 2048, q.smoothingTimeConstant = 0.8;
1134
- const U = t.createMediaElementSource(w.current);
1135
- U.connect(a), a.connect(o), o.connect(i), i.connect(q), i.connect(t.destination), W.current = a, re.current = o, X.current = i, K.current = q, fe.current = U;
1702
+ const f = new n();
1703
+ ce.current = f;
1704
+ const $ = f.createBiquadFilter();
1705
+ $.type = "lowshelf", $.frequency.value = 320, $.gain.value = Q.bass;
1706
+ const L = f.createBiquadFilter();
1707
+ L.type = "peaking", L.frequency.value = 1e3, L.Q.value = 0.5, L.gain.value = Q.mid;
1708
+ const W = f.createBiquadFilter();
1709
+ W.type = "highshelf", W.frequency.value = 3200, W.gain.value = Q.treble;
1710
+ const se = f.createAnalyser();
1711
+ se.fftSize = 2048, se.smoothingTimeConstant = 0.8;
1712
+ const l = f.createMediaElementSource(N.current);
1713
+ l.connect($), $.connect(L), L.connect(W), W.connect(se), W.connect(f.destination), pe.current = $, de.current = L, ke.current = W, Ne.current = se, o.current = l;
1136
1714
  }
1137
1715
  } catch (n) {
1138
1716
  console.error("Failed to setup audio context:", n);
1139
1717
  }
1140
- }, Ce = () => {
1718
+ }, we = () => {
1141
1719
  if (J.current) return;
1142
- Z.current *= 0.7, r.current *= 0.7;
1720
+ ie.current *= 0.7, c.current *= 0.7;
1143
1721
  const n = Date.now();
1144
- n - B.current > 1500 && (d.current *= 0.95), n - _.current > 1500 && (g.current *= 0.95), he();
1145
- const t = Math.max(Z.current, r.current), a = Math.max(d.current, g.current);
1146
- t > 0.01 || a > 0.01 ? N.current = requestAnimationFrame(Ce) : (J.current || (Z.current = 0, r.current = 0, d.current = 0, g.current = 0, he()), N.current && cancelAnimationFrame(N.current), N.current = null);
1147
- }, we = () => {
1148
- if (!K.current || !J.current) return;
1149
- const n = K.current.frequencyBinCount, t = new Uint8Array(n);
1150
- K.current.getByteFrequencyData(t);
1151
- let a = 0;
1152
- for (let q = 0; q < n; q++) a += t[q];
1153
- let o = Math.pow(a / n / 255, 0.5);
1154
- Z.current = Z.current * 0.7 + o * 0.3, r.current = r.current * 0.7 + o * 0.3;
1155
- const i = Date.now();
1156
- Z.current > d.current ? (d.current = Z.current, B.current = i) : i - B.current > 1500 && (d.current *= 0.95), r.current > g.current ? (g.current = r.current, _.current = i) : i - _.current > 1500 && (g.current *= 0.95), he(), N.current = requestAnimationFrame(we);
1157
- }, he = () => {
1158
- if (!T.current || !u) return;
1159
- const n = u.color || "#00ff00", t = u.peak || "#ff0000", a = Z.current * 100, o = r.current * 100, i = 100 - d.current * 100, q = 100 - g.current * 100;
1160
- u.side === "top" || u.side === "bottom" ? T.current.innerHTML = `
1722
+ n - d.current > 1500 && (w.current *= 0.95), n - C.current > 1500 && (F.current *= 0.95), ve();
1723
+ const f = Math.max(ie.current, c.current), $ = Math.max(w.current, F.current);
1724
+ f > 0.01 || $ > 0.01 ? P.current = requestAnimationFrame(we) : (J.current || (ie.current = 0, c.current = 0, w.current = 0, F.current = 0, ve()), P.current && cancelAnimationFrame(P.current), P.current = null);
1725
+ }, I = () => {
1726
+ if (!Ne.current || !J.current) return;
1727
+ const n = Ne.current.frequencyBinCount, f = new Uint8Array(n);
1728
+ Ne.current.getByteFrequencyData(f);
1729
+ let $ = 0;
1730
+ for (let se = 0; se < n; se++) $ += f[se];
1731
+ let L = Math.pow($ / n / 255, 0.5);
1732
+ ie.current = ie.current * 0.7 + L * 0.3, c.current = c.current * 0.7 + L * 0.3;
1733
+ const W = Date.now();
1734
+ ie.current > w.current ? (w.current = ie.current, d.current = W) : W - d.current > 1500 && (w.current *= 0.95), c.current > F.current ? (F.current = c.current, C.current = W) : W - C.current > 1500 && (F.current *= 0.95), ve(), P.current = requestAnimationFrame(I);
1735
+ }, ve = () => {
1736
+ if (!B.current || !v) return;
1737
+ const n = v.color || "#00ff00", f = v.peak || "#ff0000", $ = ie.current * 100, L = c.current * 100, W = 100 - w.current * 100, se = 100 - F.current * 100;
1738
+ v.side === "top" || v.side === "bottom" ? B.current.innerHTML = `
1161
1739
  <div style="display:flex;flex-direction:column;gap:0.25rem;height:100%;justify-content:center;">
1162
1740
  <div style="display:flex;align-items:center;justify-content:center;gap:0.5rem;">
1163
- <div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${h ? "#f3f4f6" : "#111827"}">L</div>
1741
+ <div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${A ? "#f3f4f6" : "#111827"}">L</div>
1164
1742
  <div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-end;">
1165
- <div style="height:100%;border-radius:9999px 0 0 9999px;transition:width 75ms;width:${a}%;background:${n};"></div>
1166
- ${d.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:right 100ms;right:${d.current * 100}%;background:${t};"></div>` : ""}
1743
+ <div style="height:100%;border-radius:9999px 0 0 9999px;transition:width 75ms;width:${$}%;background:${n};"></div>
1744
+ ${w.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:right 100ms;right:${w.current * 100}%;background:${f};"></div>` : ""}
1167
1745
  </div>
1168
1746
  <div style="width:1px;height:1rem;background:rgba(255,255,255,0.2)"></div>
1169
1747
  <div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-start;">
1170
- <div style="height:100%;border-radius:0 9999px 9999px 0;transition:width 75ms;width:${o}%;background:${n};"></div>
1171
- ${g.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:left 100ms;left:${g.current * 100}%;background:${t};"></div>` : ""}
1748
+ <div style="height:100%;border-radius:0 9999px 9999px 0;transition:width 75ms;width:${L}%;background:${n};"></div>
1749
+ ${F.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:left 100ms;left:${F.current * 100}%;background:${f};"></div>` : ""}
1172
1750
  </div>
1173
- <div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${h ? "#f3f4f6" : "#111827"}">R</div>
1751
+ <div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${A ? "#f3f4f6" : "#111827"}">R</div>
1174
1752
  </div>
1175
1753
  </div>
1176
- ` : T.current.innerHTML = `
1754
+ ` : B.current.innerHTML = `
1177
1755
  <div style="display:flex;gap:0.5rem;height:100%;">
1178
1756
  <div style="flex:1;display:flex;flex-direction:column;">
1179
1757
  <div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">L</div>
1180
1758
  <div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
1181
- <div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${a}%;background:${n};">
1182
- ${d.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${i}%;background:${t};"></div>` : ""}
1759
+ <div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${$}%;background:${n};">
1760
+ ${w.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${W}%;background:${f};"></div>` : ""}
1183
1761
  </div>
1184
1762
  </div>
1185
1763
  </div>
1186
1764
  <div style="flex:1;display:flex;flex-direction:column;">
1187
1765
  <div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">R</div>
1188
1766
  <div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
1189
- <div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${o}%;background:${n};">
1190
- ${g.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${q}%;background:${t};"></div>` : ""}
1767
+ <div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${L}%;background:${n};">
1768
+ ${F.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${se}%;background:${f};"></div>` : ""}
1191
1769
  </div>
1192
1770
  </div>
1193
1771
  </div>
1194
1772
  </div>
1195
1773
  `;
1196
- }, Ne = () => {
1197
- !w.current || !s || (z ? w.current.pause() : (L.current && L.current.state === "suspended" && L.current.resume(), w.current.play().catch((n) => console.error("Play failed:", n))));
1198
- }, ve = () => {
1199
- w.current && (w.current.pause(), w.current.currentTime = 0, E(!1), j(0), Z.current = 0, r.current = 0, d.current = 0, g.current = 0, he());
1200
- }, xe = (n) => {
1201
- const a = parseFloat(n.target.value) / 100 * P;
1202
- j(a), w.current && !me && (w.current.currentTime = a);
1203
- }, Ee = () => V(!0), Le = () => {
1204
- w.current && (w.current.currentTime = H), V(!1);
1205
- }, Ae = (n) => {
1206
- const t = parseInt(n.target.value);
1207
- k(t), ae(t === 0);
1208
- }, Re = (n) => ue(parseFloat(n.target.value)), ze = () => ae(!S), Se = () => {
1209
- p.current && (document.fullscreenElement ? document.exitFullscreen() : p.current.requestFullscreen().catch((n) => console.error("Fullscreen failed:", n)));
1210
- }, Be = (n, t) => {
1211
- Y((a) => ({ ...a, [n]: t })), L.current && (n === "bass" && W.current && (W.current.gain.value = t), n === "mid" && re.current && (re.current.gain.value = t), n === "treble" && X.current && (X.current.gain.value = t));
1212
- }, je = () => Y({ bass: 0, mid: 0, treble: 0 }), Te = (n) => {
1774
+ }, De = () => {
1775
+ !N.current || !s || (U ? N.current.pause() : (ce.current && ce.current.state === "suspended" && ce.current.resume(), N.current.play().catch((n) => console.error("Play failed:", n))));
1776
+ }, We = () => {
1777
+ N.current && (N.current.pause(), N.current.currentTime = 0, a(!1), D(0), ie.current = 0, c.current = 0, w.current = 0, F.current = 0, ve());
1778
+ }, Ue = (n) => {
1779
+ const $ = parseFloat(n.target.value) / 100 * H;
1780
+ D($), N.current && !fe && (N.current.currentTime = $);
1781
+ }, Be = () => Ce(!0), je = () => {
1782
+ N.current && (N.current.currentTime = G), Ce(!1);
1783
+ }, Ge = (n) => {
1784
+ const f = parseInt(n.target.value);
1785
+ z(f), Me(f === 0);
1786
+ }, Xe = (n) => Ee(parseFloat(n.target.value)), rt = () => Me(!M), Ve = () => {
1787
+ Te.current && (document.fullscreenElement ? document.exitFullscreen() : Te.current.requestFullscreen().catch((n) => console.error("Fullscreen failed:", n)));
1788
+ }, Le = (n, f) => {
1789
+ ze(($) => ({ ...$, [n]: f })), ce.current && (n === "bass" && pe.current && (pe.current.gain.value = f), n === "mid" && de.current && (de.current.gain.value = f), n === "treble" && ke.current && (ke.current.gain.value = f));
1790
+ }, $e = () => ze({ bass: 0, mid: 0, treble: 0 }), ee = (n) => {
1213
1791
  if (isNaN(n)) return "0:00";
1214
- const t = Math.floor(n / 60), a = Math.floor(n % 60);
1215
- return `${t}:${a.toString().padStart(2, "0")}`;
1792
+ const f = Math.floor(n / 60), $ = Math.floor(n % 60);
1793
+ return `${f}:${$.toString().padStart(2, "0")}`;
1216
1794
  };
1217
- if ($(() => {
1218
- (A && !z || x) && Ne();
1219
- }, [f]), ie && ie.length > 0)
1220
- return /* @__PURE__ */ e(Ve, { children: ie.map((n, t) => /* @__PURE__ */ c("div", { className: "ecp-video-error", children: [
1221
- /* @__PURE__ */ c("strong", { children: [
1795
+ if (E(() => {
1796
+ (ue && !U || R) && De();
1797
+ }, [h]), me && me.length > 0)
1798
+ return /* @__PURE__ */ e(Ft, { children: me.map((n, f) => /* @__PURE__ */ r("div", { className: "ecp-video-error", children: [
1799
+ /* @__PURE__ */ r("strong", { children: [
1222
1800
  n[0],
1223
1801
  ":"
1224
1802
  ] }),
1225
1803
  " ",
1226
1804
  n[1]
1227
- ] }, t)) });
1228
- const be = u ? u.side : null, qe = be === "top" || be === "bottom";
1805
+ ] }, f)) });
1806
+ const he = v ? v.side : null, Se = he === "top" || he === "bottom";
1229
1807
  return /* @__PURE__ */ e(
1230
1808
  "div",
1231
1809
  {
1232
- ref: p,
1233
- className: `ecp-video-wrapper${ee ? " ecp-video-wrapper--fullscreen" : ""}`,
1234
- style: { backgroundColor: A || O ? void 0 : h ? "#49494937" : "white" },
1235
- children: /* @__PURE__ */ c(
1810
+ ref: Te,
1811
+ className: `ecp-video-wrapper${_ ? " ecp-video-wrapper--fullscreen" : ""}`,
1812
+ style: { backgroundColor: ue || te ? void 0 : A ? "#49494937" : "white" },
1813
+ children: /* @__PURE__ */ r(
1236
1814
  "div",
1237
1815
  {
1238
- className: `ecp-video-inner${ee ? " ecp-video-inner--fullscreen" : ""}${O ? "" : " ecp-video-inner--padded"}`,
1239
- style: { background: A || O ? void 0 : h ? "#1a1a1ab0" : "#f5f5f5" },
1816
+ className: `ecp-video-inner${_ ? " ecp-video-inner--fullscreen" : ""}${te ? "" : " ecp-video-inner--padded"}`,
1817
+ style: { background: ue || te ? void 0 : A ? "#1a1a1ab0" : "#f5f5f5" },
1240
1818
  children: [
1241
- f.videoName && !ee && /* @__PURE__ */ e("div", { className: `ecp-video-name${h ? " ecp-video-name--dark" : " ecp-video-name--light"}`, children: l }),
1242
- /* @__PURE__ */ c("div", { className: `ecp-video-layout${qe ? " ecp-video-layout--col" : " ecp-video-layout--row"}${ee ? " ecp-video-layout--fullscreen" : ""}`, children: [
1243
- u && be === "top" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-top", ref: T }),
1244
- /* @__PURE__ */ c("div", { style: { display: "flex", flex: qe ? void 0 : 1, gap: "0.75rem" }, children: [
1245
- u && be === "left" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: T }),
1246
- /* @__PURE__ */ c("div", { className: `ecp-video-el-wrap${h ? " ecp-video-el-wrap--dark" : " ecp-video-el-wrap--light"}`, children: [
1247
- /* @__PURE__ */ c("video", { ref: w, className: "ecp-video-el", poster: C || void 0, children: [
1819
+ h.videoName && !_ && /* @__PURE__ */ e("div", { className: `ecp-video-name${A ? " ecp-video-name--dark" : " ecp-video-name--light"}`, children: p }),
1820
+ /* @__PURE__ */ r("div", { className: `ecp-video-layout${Se ? " ecp-video-layout--col" : " ecp-video-layout--row"}${_ ? " ecp-video-layout--fullscreen" : ""}`, children: [
1821
+ v && he === "top" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-top", ref: B }),
1822
+ /* @__PURE__ */ r("div", { style: { display: "flex", flex: Se ? void 0 : 1, gap: "0.75rem" }, children: [
1823
+ v && he === "left" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: B }),
1824
+ /* @__PURE__ */ r("div", { className: `ecp-video-el-wrap${A ? " ecp-video-el-wrap--dark" : " ecp-video-el-wrap--light"}`, children: [
1825
+ /* @__PURE__ */ r("video", { ref: N, className: "ecp-video-el", poster: T || void 0, children: [
1248
1826
  s && /* @__PURE__ */ e("source", { src: s }),
1249
1827
  "Your browser does not support the video tag."
1250
1828
  ] }),
1251
- de && /* @__PURE__ */ e("div", { className: "ecp-video-eq-overlay", children: /* @__PURE__ */ c("div", { className: `ecp-video-eq-panel${h ? " ecp-video-eq-panel--dark" : " ecp-video-eq-panel--light"}`, children: [
1252
- /* @__PURE__ */ e("h3", { className: `ecp-video-eq-title${h ? " ecp-video-eq-title--dark" : " ecp-video-eq-title--light"}`, children: "Equalizer" }),
1253
- /* @__PURE__ */ e("div", { className: "ecp-video-eq-bands", children: ["bass", "mid", "treble"].map((n) => /* @__PURE__ */ c("div", { children: [
1254
- /* @__PURE__ */ c("div", { className: "ecp-video-eq-band-header", children: [
1255
- /* @__PURE__ */ e("span", { className: h ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: n.charAt(0).toUpperCase() + n.slice(1) }),
1256
- /* @__PURE__ */ c("span", { className: h ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: [
1829
+ ye && /* @__PURE__ */ e("div", { className: "ecp-video-eq-overlay", children: /* @__PURE__ */ r("div", { className: `ecp-video-eq-panel${A ? " ecp-video-eq-panel--dark" : " ecp-video-eq-panel--light"}`, children: [
1830
+ /* @__PURE__ */ e("h3", { className: `ecp-video-eq-title${A ? " ecp-video-eq-title--dark" : " ecp-video-eq-title--light"}`, children: "Equalizer" }),
1831
+ /* @__PURE__ */ e("div", { className: "ecp-video-eq-bands", children: ["bass", "mid", "treble"].map((n) => /* @__PURE__ */ r("div", { children: [
1832
+ /* @__PURE__ */ r("div", { className: "ecp-video-eq-band-header", children: [
1833
+ /* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: n.charAt(0).toUpperCase() + n.slice(1) }),
1834
+ /* @__PURE__ */ r("span", { className: A ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: [
1257
1835
  Q[n],
1258
1836
  " dB"
1259
1837
  ] })
1260
1838
  ] }),
1261
- /* @__PURE__ */ c("div", { className: "ecp-video-eq-range-row", children: [
1262
- /* @__PURE__ */ e("span", { className: h ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "-20" }),
1839
+ /* @__PURE__ */ r("div", { className: "ecp-video-eq-range-row", children: [
1840
+ /* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "-20" }),
1263
1841
  /* @__PURE__ */ e(
1264
1842
  "input",
1265
1843
  {
@@ -1267,122 +1845,122 @@ function wt({
1267
1845
  min: "-20",
1268
1846
  max: "20",
1269
1847
  value: Q[n],
1270
- onChange: (t) => Be(n, parseInt(t.target.value)),
1848
+ onChange: (f) => Le(n, parseInt(f.target.value)),
1271
1849
  className: "ecp-video-eq-slider",
1272
1850
  style: {
1273
- background: `linear-gradient(to right, ${F} ${(Q[n] + 20) / 40 * 100}%, #e5e7eb ${(Q[n] + 20) / 40 * 100}%)`,
1274
- "--thumb-color": F
1851
+ background: `linear-gradient(to right, ${S} ${(Q[n] + 20) / 40 * 100}%, #e5e7eb ${(Q[n] + 20) / 40 * 100}%)`,
1852
+ "--thumb-color": S
1275
1853
  }
1276
1854
  }
1277
1855
  ),
1278
- /* @__PURE__ */ e("span", { className: h ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "+20" })
1856
+ /* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "+20" })
1279
1857
  ] })
1280
1858
  ] }, n)) }),
1281
- /* @__PURE__ */ c("div", { className: "ecp-video-eq-footer", children: [
1282
- /* @__PURE__ */ e("button", { onClick: je, className: `ecp-video-eq-footer-btn${h ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, children: "Reset" }),
1283
- /* @__PURE__ */ e("button", { onClick: () => R(!1), className: `ecp-video-eq-footer-btn${h ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, style: { marginLeft: "0.5rem" }, children: "Close" })
1859
+ /* @__PURE__ */ r("div", { className: "ecp-video-eq-footer", children: [
1860
+ /* @__PURE__ */ e("button", { onClick: $e, className: `ecp-video-eq-footer-btn${A ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, children: "Reset" }),
1861
+ /* @__PURE__ */ e("button", { onClick: () => X(!1), className: `ecp-video-eq-footer-btn${A ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, style: { marginLeft: "0.5rem" }, children: "Close" })
1284
1862
  ] })
1285
1863
  ] }) })
1286
1864
  ] }),
1287
- u && be === "right" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: T })
1865
+ v && he === "right" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: B })
1288
1866
  ] }),
1289
- u && be === "bottom" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-bottom", ref: T })
1867
+ v && he === "bottom" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-bottom", ref: B })
1290
1868
  ] }),
1291
- f.seekbar && /* @__PURE__ */ e("div", { className: `ecp-video-seekbar${ee ? " ecp-video-seekbar--fullscreen" : ""}`, children: /* @__PURE__ */ c("div", { className: "ecp-video-seekbar-row", children: [
1292
- /* @__PURE__ */ e("span", { className: `ecp-video-time${h ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: Te(H) }),
1869
+ h.seekbar && /* @__PURE__ */ e("div", { className: `ecp-video-seekbar${_ ? " ecp-video-seekbar--fullscreen" : ""}`, children: /* @__PURE__ */ r("div", { className: "ecp-video-seekbar-row", children: [
1870
+ /* @__PURE__ */ e("span", { className: `ecp-video-time${A ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: ee(G) }),
1293
1871
  /* @__PURE__ */ e(
1294
1872
  "input",
1295
1873
  {
1296
1874
  type: "range",
1297
1875
  min: "0",
1298
1876
  max: "100",
1299
- value: P > 0 ? H / P * 100 : 0,
1300
- onChange: xe,
1301
- onMouseDown: Ee,
1302
- onMouseUp: Le,
1303
- onTouchStart: Ee,
1304
- onTouchEnd: Le,
1877
+ value: H > 0 ? G / H * 100 : 0,
1878
+ onChange: Ue,
1879
+ onMouseDown: Be,
1880
+ onMouseUp: je,
1881
+ onTouchStart: Be,
1882
+ onTouchEnd: je,
1305
1883
  disabled: !s,
1306
1884
  className: "ecp-video-seek-input",
1307
1885
  style: {
1308
- background: s && P > 0 ? `linear-gradient(to right, ${F} ${H / P * 100}%, #e5e7eb ${H / P * 100}%)` : "#e5e7eb",
1309
- "--thumb-color": F
1886
+ background: s && H > 0 ? `linear-gradient(to right, ${S} ${G / H * 100}%, #e5e7eb ${G / H * 100}%)` : "#e5e7eb",
1887
+ "--thumb-color": S
1310
1888
  }
1311
1889
  }
1312
1890
  ),
1313
- /* @__PURE__ */ e("span", { className: `ecp-video-time ecp-video-time--right${h ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: Te(P) })
1891
+ /* @__PURE__ */ e("span", { className: `ecp-video-time ecp-video-time--right${A ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: ee(H) })
1314
1892
  ] }) }),
1315
- /* @__PURE__ */ c("div", { className: "ecp-video-controls", children: [
1316
- f.play && /* @__PURE__ */ c(
1893
+ /* @__PURE__ */ r("div", { className: "ecp-video-controls", children: [
1894
+ h.play && /* @__PURE__ */ r(
1317
1895
  "button",
1318
1896
  {
1319
- onClick: Ne,
1897
+ onClick: De,
1320
1898
  disabled: !s,
1321
- className: `ecp-video-play-btn${te <= 400 ? " ecp-video-play-btn--compact" : ""}`,
1322
- style: { backgroundColor: F },
1899
+ className: `ecp-video-play-btn${ae <= 400 ? " ecp-video-play-btn--compact" : ""}`,
1900
+ style: { backgroundColor: S },
1323
1901
  children: [
1324
- /* @__PURE__ */ c("div", { className: "ecp-video-play-icon-wrap", children: [
1325
- /* @__PURE__ */ e(Pe, { size: 16, style: { position: "absolute", transform: z ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
1326
- /* @__PURE__ */ e(Me, { size: 16, style: { position: "absolute", transform: z ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
1902
+ /* @__PURE__ */ r("div", { className: "ecp-video-play-icon-wrap", children: [
1903
+ /* @__PURE__ */ e(et, { size: 16, style: { position: "absolute", transform: U ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
1904
+ /* @__PURE__ */ e(tt, { size: 16, style: { position: "absolute", transform: U ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
1327
1905
  ] }),
1328
- te > 400 && (z ? "Pause" : "Play")
1906
+ ae > 400 && (U ? "Pause" : "Play")
1329
1907
  ]
1330
1908
  }
1331
1909
  ),
1332
- f.stop && /* @__PURE__ */ e("button", { onClick: ve, disabled: !s, className: `ecp-video-stop-btn${h ? " ecp-video-stop-btn--dark" : " ecp-video-stop-btn--light"}`, children: /* @__PURE__ */ e(Ge, { size: 16 }) }),
1333
- f.fullscreen && /* @__PURE__ */ c(
1910
+ h.stop && /* @__PURE__ */ e("button", { onClick: We, disabled: !s, className: `ecp-video-stop-btn${A ? " ecp-video-stop-btn--dark" : " ecp-video-stop-btn--light"}`, children: /* @__PURE__ */ e(St, { size: 16 }) }),
1911
+ h.fullscreen && /* @__PURE__ */ r(
1334
1912
  "button",
1335
1913
  {
1336
- onClick: Se,
1337
- className: `ecp-video-fullscreen-btn${h ? " ecp-video-fullscreen-btn--dark" : " ecp-video-fullscreen-btn--light"}${te >= 800 ? " ecp-video-fullscreen-btn--wide" : ""}`,
1914
+ onClick: Ve,
1915
+ className: `ecp-video-fullscreen-btn${A ? " ecp-video-fullscreen-btn--dark" : " ecp-video-fullscreen-btn--light"}${ae >= 800 ? " ecp-video-fullscreen-btn--wide" : ""}`,
1338
1916
  children: [
1339
- ee ? /* @__PURE__ */ e(at, { size: 16 }) : /* @__PURE__ */ e(rt, { size: 16 }),
1340
- /* @__PURE__ */ e("span", { style: { display: te < 800 ? "none" : "block" }, children: ee ? "Exit" : "Full" })
1917
+ _ ? /* @__PURE__ */ e(nr, { size: 16 }) : /* @__PURE__ */ e(tr, { size: 16 }),
1918
+ /* @__PURE__ */ e("span", { style: { display: ae < 800 ? "none" : "block" }, children: _ ? "Exit" : "Full" })
1341
1919
  ]
1342
1920
  }
1343
1921
  ),
1344
- f.equalizer && /* @__PURE__ */ c(
1922
+ h.equalizer && /* @__PURE__ */ r(
1345
1923
  "button",
1346
1924
  {
1347
- onClick: () => R(!de),
1925
+ onClick: () => X(!ye),
1348
1926
  disabled: !s,
1349
- className: `ecp-video-eq-toggle-btn${de ? " ecp-video-eq-toggle-btn--on" : " ecp-video-eq-toggle-btn--off"}${te >= 700 ? " ecp-video-eq-toggle-btn--wide" : ""}`,
1350
- style: de ? { backgroundColor: F } : {},
1927
+ className: `ecp-video-eq-toggle-btn${ye ? " ecp-video-eq-toggle-btn--on" : " ecp-video-eq-toggle-btn--off"}${ae >= 700 ? " ecp-video-eq-toggle-btn--wide" : ""}`,
1928
+ style: ye ? { backgroundColor: S } : {},
1351
1929
  children: [
1352
- /* @__PURE__ */ e(Fe, { size: 16 }),
1353
- /* @__PURE__ */ e("span", { style: { display: te < 700 ? "none" : "block" }, children: "EQ" })
1930
+ /* @__PURE__ */ e(Je, { size: 16 }),
1931
+ /* @__PURE__ */ e("span", { style: { display: ae < 700 ? "none" : "block" }, children: "EQ" })
1354
1932
  ]
1355
1933
  }
1356
1934
  ),
1357
- f.speed && /* @__PURE__ */ e("div", { className: "ecp-video-speed-wrap", children: /* @__PURE__ */ e("select", { value: oe, onChange: Re, className: `ecp-video-speed-select${h ? " ecp-video-speed-select--dark" : " ecp-video-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((n) => /* @__PURE__ */ c("option", { value: n, className: h ? "ecp-video-speed-option--dark" : "ecp-video-speed-option--light", children: [
1935
+ h.speed && /* @__PURE__ */ e("div", { className: "ecp-video-speed-wrap", children: /* @__PURE__ */ e("select", { value: Z, onChange: Xe, className: `ecp-video-speed-select${A ? " ecp-video-speed-select--dark" : " ecp-video-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((n) => /* @__PURE__ */ r("option", { value: n, className: A ? "ecp-video-speed-option--dark" : "ecp-video-speed-option--light", children: [
1358
1936
  n,
1359
1937
  "x"
1360
1938
  ] }, n)) }) }),
1361
- f.volume && /* @__PURE__ */ c("div", { className: "ecp-video-volume", children: [
1362
- /* @__PURE__ */ e("button", { onClick: ze, className: "ecp-video-mute-btn", children: S || D === 0 ? /* @__PURE__ */ e(_e, { size: 20, className: h ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) : /* @__PURE__ */ e(De, { size: 20, className: h ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) }),
1939
+ h.volume && /* @__PURE__ */ r("div", { className: "ecp-video-volume", children: [
1940
+ /* @__PURE__ */ e("button", { onClick: rt, className: "ecp-video-mute-btn", children: M || O === 0 ? /* @__PURE__ */ e(ot, { size: 20, className: A ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) : /* @__PURE__ */ e(lt, { size: 20, className: A ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) }),
1363
1941
  /* @__PURE__ */ e(
1364
1942
  "input",
1365
1943
  {
1366
1944
  type: "range",
1367
1945
  min: "0",
1368
1946
  max: "100",
1369
- value: D,
1370
- onChange: Ae,
1947
+ value: O,
1948
+ onChange: Ge,
1371
1949
  className: "ecp-video-vol-slider",
1372
1950
  style: {
1373
- background: `linear-gradient(to right, ${F} ${D}%, #e5e7eb ${D}%)`,
1374
- "--thumb-color": F,
1375
- display: te < 460 ? "none" : "block"
1951
+ background: `linear-gradient(to right, ${S} ${O}%, #e5e7eb ${O}%)`,
1952
+ "--thumb-color": S,
1953
+ display: ae < 460 ? "none" : "block"
1376
1954
  }
1377
1955
  }
1378
1956
  ),
1379
- /* @__PURE__ */ c(
1957
+ /* @__PURE__ */ r(
1380
1958
  "span",
1381
1959
  {
1382
- className: `ecp-video-vol-pct${h ? " ecp-video-vol-pct--dark" : " ecp-video-vol-pct--light"}`,
1383
- style: { display: te < 800 ? "none" : "block" },
1960
+ className: `ecp-video-vol-pct${A ? " ecp-video-vol-pct--dark" : " ecp-video-vol-pct--light"}`,
1961
+ style: { display: ae < 800 ? "none" : "block" },
1384
1962
  children: [
1385
- D,
1963
+ O,
1386
1964
  "%"
1387
1965
  ]
1388
1966
  }
@@ -1395,32 +1973,32 @@ function wt({
1395
1973
  }
1396
1974
  );
1397
1975
  }
1398
- function Nt() {
1399
- const [s, l] = m(null), [u, v] = m("No track loaded"), [C, f] = m("purple"), [y, O] = m(!1), [x, F] = m(!1), [I, z] = m("light"), E = b(null);
1400
- return /* @__PURE__ */ e("div", { className: "ecp-page-wrapper", style: { backgroundColor: I === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ c("div", { className: "ecp-demo-container", children: [
1401
- y && /* @__PURE__ */ e(ht, { theme: C, setTheme: f, close: () => O(!1) }),
1402
- /* @__PURE__ */ c("div", { className: "ecp-container-glass", children: [
1403
- /* @__PURE__ */ c("div", { className: "ecp-demo-header", children: [
1404
- /* @__PURE__ */ c("div", { children: [
1405
- /* @__PURE__ */ e("h1", { className: `ecp-demo-title${I === "dark" ? " ecp-demo-title--dark" : ""}`, children: "Audio Visualizer" }),
1976
+ function Nr() {
1977
+ const [s, p] = b(null), [v, y] = b("No track loaded"), [T, h] = b("purple"), [q, te] = b(!1), [R, S] = b(!1), [V, U] = b("light"), a = u(null);
1978
+ return /* @__PURE__ */ e("div", { className: "ecp-page-wrapper", style: { backgroundColor: V === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ r("div", { className: "ecp-demo-container", children: [
1979
+ q && /* @__PURE__ */ e(hr, { theme: T, setTheme: h, close: () => te(!1) }),
1980
+ /* @__PURE__ */ r("div", { className: "ecp-container-glass", children: [
1981
+ /* @__PURE__ */ r("div", { className: "ecp-demo-header", children: [
1982
+ /* @__PURE__ */ r("div", { children: [
1983
+ /* @__PURE__ */ e("h1", { className: `ecp-demo-title${V === "dark" ? " ecp-demo-title--dark" : ""}`, children: "Audio Visualizer" }),
1406
1984
  /* @__PURE__ */ e("p", { className: "ecp-demo-subtitle", children: "Professional frequency analyzer" })
1407
1985
  ] }),
1408
- /* @__PURE__ */ c("button", { onClick: () => O(!y), className: "ecp-theme-btn", children: [
1986
+ /* @__PURE__ */ r("button", { onClick: () => te(!q), className: "ecp-theme-btn", children: [
1409
1987
  /* @__PURE__ */ e("span", { children: "🎨" }),
1410
1988
  " Themes"
1411
1989
  ] })
1412
1990
  ] }),
1413
1991
  /* @__PURE__ */ e(
1414
- vt,
1992
+ mr,
1415
1993
  {
1416
1994
  audio: s || void 0,
1417
- name: u || void 0,
1995
+ name: v || void 0,
1418
1996
  author: "K.Prabhasha",
1419
- theme: C,
1997
+ theme: T,
1420
1998
  autoPlay: !1,
1421
1999
  thumbnail: "https://cdn-icons-png.flaticon.com/512/3845/3845874.png",
1422
- mode: I,
1423
- transparent: x,
2000
+ mode: V,
2001
+ transparent: R,
1424
2002
  volume: 70,
1425
2003
  controls: {
1426
2004
  play: !0,
@@ -1434,7 +2012,7 @@ function Nt() {
1434
2012
  }
1435
2013
  ),
1436
2014
  /* @__PURE__ */ e(
1437
- bt,
2015
+ fr,
1438
2016
  {
1439
2017
  audio: s || "",
1440
2018
  width: 400,
@@ -1445,7 +2023,7 @@ function Nt() {
1445
2023
  }
1446
2024
  ),
1447
2025
  /* @__PURE__ */ e(
1448
- gt,
2026
+ gr,
1449
2027
  {
1450
2028
  audio: s || "",
1451
2029
  thumbnail: "https://cdn-icons-png.flaticon.com/512/17524/17524837.png",
@@ -1454,37 +2032,37 @@ function Nt() {
1454
2032
  background: "#c0ffefff"
1455
2033
  }
1456
2034
  ),
1457
- /* @__PURE__ */ c("div", { className: "ecp-demo-actions", children: [
1458
- /* @__PURE__ */ e("input", { type: "file", ref: E, onChange: (P) => {
1459
- var D;
1460
- const M = (D = P.target.files) == null ? void 0 : D[0];
1461
- if (M) {
1462
- const k = URL.createObjectURL(M);
1463
- l(k), v(M.name);
2035
+ /* @__PURE__ */ r("div", { className: "ecp-demo-actions", children: [
2036
+ /* @__PURE__ */ e("input", { type: "file", ref: a, onChange: (H) => {
2037
+ var O;
2038
+ const Y = (O = H.target.files) == null ? void 0 : O[0];
2039
+ if (Y) {
2040
+ const z = URL.createObjectURL(Y);
2041
+ p(z), y(Y.name);
1464
2042
  }
1465
2043
  }, accept: "audio/*", className: "ecp-file-input-hidden" }),
1466
- /* @__PURE__ */ c("button", { onClick: () => {
1467
- var P;
1468
- return (P = E.current) == null ? void 0 : P.click();
2044
+ /* @__PURE__ */ r("button", { onClick: () => {
2045
+ var H;
2046
+ return (H = a.current) == null ? void 0 : H.click();
1469
2047
  }, className: "ecp-action-btn", children: [
1470
- /* @__PURE__ */ e(pt, { size: 16 }),
2048
+ /* @__PURE__ */ e(dr, { size: 16 }),
1471
2049
  "Load Audio"
1472
2050
  ] }),
1473
- /* @__PURE__ */ e("button", { onClick: () => z(I === "dark" ? "light" : "dark"), className: "ecp-action-btn", children: I === "dark" ? "Light" : "Dark" }),
1474
- /* @__PURE__ */ c("button", { onClick: () => F(!x), className: "ecp-action-btn", children: [
2051
+ /* @__PURE__ */ e("button", { onClick: () => U(V === "dark" ? "light" : "dark"), className: "ecp-action-btn", children: V === "dark" ? "Light" : "Dark" }),
2052
+ /* @__PURE__ */ r("button", { onClick: () => S(!R), className: "ecp-action-btn", children: [
1475
2053
  "Transparent: ",
1476
- String(x)
2054
+ String(R)
1477
2055
  ] })
1478
2056
  ] })
1479
2057
  ] })
1480
2058
  ] }) });
1481
2059
  }
1482
2060
  export {
1483
- Nt as DemoVisualizePlayer,
1484
- gt as NanoAudioPlayer,
1485
- ht as ThemeSelector,
1486
- wt as VideoPlayer,
1487
- vt as VisualizePlayer,
1488
- bt as WaveAudioPlayer,
1489
- ge as themes
2061
+ Nr as DemoVisualizePlayer,
2062
+ gr as NanoAudioPlayer,
2063
+ hr as ThemeSelector,
2064
+ qr as VideoPlayer,
2065
+ mr as VisualizePlayer,
2066
+ fr as WaveAudioPlayer,
2067
+ Ae as themes
1490
2068
  };