mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-03 08:39:34 +09:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1497d19df | ||
|
|
928e222c3d | ||
|
|
b0d5c18147 |
No files matched your search
@@ -1,12 +1,7 @@
|
||||
# Makefile for karaoke-gen project
|
||||
# Run `make help` to see available commands
|
||||
|
||||
.PHONY: help install install-backend install-frontend build-frontend dev-install test test-unit test-backend test-e2e test-frontend test-all lint clean emulators-start emulators-stop
|
||||
|
||||
# Per-stage timeout in seconds (default: 10 minutes)
|
||||
# Prevents hangs from stale dev servers, broken emulators, etc.
|
||||
# Override with: make test TEST_TIMEOUT=300
|
||||
TEST_TIMEOUT ?= 600
|
||||
.PHONY: help install install-backend install-frontend build-frontend test test-unit test-backend test-e2e test-frontend test-all lint clean emulators-start emulators-stop
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -17,8 +12,7 @@ help:
|
||||
@echo " make test-unit - Run unit tests only (karaoke_gen package)"
|
||||
@echo " make test-e2e - Run emulator tests with auto-start/stop"
|
||||
@echo " make install - Install all dependencies (backend + frontend)"
|
||||
@echo " make build-frontend - Build frontend and copy to Python package"
|
||||
@echo " make dev-install - Build frontend + pip install -e . (for local CLI testing)"
|
||||
@echo " make build-frontend - Build frontend and copy to Python package (for local testing)"
|
||||
@echo " make lint - Run linter checks"
|
||||
@echo " make emulators-start - Start GCP emulators for local development"
|
||||
@echo " make emulators-stop - Stop GCP emulators"
|
||||
@@ -40,34 +34,23 @@ install-frontend:
|
||||
|
||||
install: install-backend install-frontend
|
||||
|
||||
# Build frontend and copy to Python package
|
||||
# Build frontend and copy to Python package (for local CLI testing)
|
||||
build-frontend: install-frontend
|
||||
@echo "=== Building frontend ==="
|
||||
cd frontend && npm run build
|
||||
@echo "=== Copying build to Python package ==="
|
||||
rm -rf karaoke_gen/nextjs_frontend/out
|
||||
mkdir -p karaoke_gen/nextjs_frontend/out
|
||||
cp -r frontend/out/* karaoke_gen/nextjs_frontend/out/
|
||||
@echo "✅ Frontend built and copied to karaoke_gen/nextjs_frontend/out/"
|
||||
|
||||
# Build frontend + install package in editable mode for local CLI testing
|
||||
# After running this, `karaoke-gen` CLI will use the freshly built frontend.
|
||||
dev-install: build-frontend
|
||||
@echo "=== Installing package in editable mode ==="
|
||||
pip install -e .
|
||||
@echo ""
|
||||
@echo "✅ Ready! You can now run karaoke-gen with the updated frontend."
|
||||
@echo " Example: karaoke-gen input.flac \"Artist\" \"Title\""
|
||||
@echo "✅ Frontend built and ready for local testing"
|
||||
|
||||
# Run unit tests for karaoke_gen package
|
||||
test-unit: install-backend
|
||||
@echo "=== Running karaoke_gen unit tests ==="
|
||||
timeout $(TEST_TIMEOUT) poetry run pytest tests/unit/ -v --cov=karaoke_gen --cov-report=term-missing --cov-fail-under=69
|
||||
poetry run pytest tests/unit/ -v --cov=karaoke_gen --cov-report=term-missing --cov-fail-under=69
|
||||
|
||||
# Run backend unit tests (excludes emulator tests)
|
||||
test-backend-unit: install-backend
|
||||
@echo "=== Running backend unit tests ==="
|
||||
timeout $(TEST_TIMEOUT) poetry run pytest backend/tests/ --ignore=backend/tests/emulator -v
|
||||
poetry run pytest backend/tests/ --ignore=backend/tests/emulator -v
|
||||
|
||||
# Run E2E integration tests with emulators
|
||||
test-e2e: install-backend
|
||||
@@ -79,7 +62,7 @@ test-e2e: install-backend
|
||||
export GCS_BUCKET_NAME=test-bucket && \
|
||||
export ADMIN_TOKENS=test-admin-token && \
|
||||
export ENVIRONMENT=test && \
|
||||
timeout $(TEST_TIMEOUT) poetry run pytest backend/tests/emulator/ -v; \
|
||||
poetry run pytest backend/tests/emulator/ -v; \
|
||||
TEST_RESULT=$$?; \
|
||||
./scripts/stop-emulators.sh; \
|
||||
exit $$TEST_RESULT
|
||||
@@ -92,7 +75,7 @@ test-backend: test-unit test-backend-unit test-e2e
|
||||
# Run frontend tests (unit + E2E)
|
||||
test-frontend: install-frontend
|
||||
@echo "=== Running frontend tests ==="
|
||||
cd frontend && timeout $(TEST_TIMEOUT) npm run test:all
|
||||
cd frontend && npm run test:all
|
||||
|
||||
# Run ALL tests (backend + frontend) - use this before committing!
|
||||
test: test-backend test-frontend
|
||||
|
||||
@@ -240,3 +240,4 @@ python3 backend/validate.py
|
||||
4. **Deploy:** Use `./scripts/deploy.sh`
|
||||
|
||||
**The import error would have been caught if you ran validation in a venv!** ✅
|
||||
# Test comment for CI
|
||||
@@ -1327,69 +1327,6 @@ async def trigger_worker(
|
||||
)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Prepare Review Audio Endpoint
|
||||
# =============================================================================
|
||||
|
||||
class PrepareReviewAudioResponse(BaseModel):
|
||||
"""Response from prepare-review-audio endpoint."""
|
||||
status: str
|
||||
job_id: str
|
||||
transcoded_files: List[str]
|
||||
message: str
|
||||
|
||||
|
||||
@router.post("/jobs/{job_id}/prepare-review-audio", response_model=PrepareReviewAudioResponse)
|
||||
async def prepare_review_audio(
|
||||
job_id: str,
|
||||
auth_data: AuthResult = Depends(require_admin),
|
||||
):
|
||||
"""
|
||||
Transcode review audio to OGG Opus for a job (admin only).
|
||||
|
||||
Use this to backfill transcoded audio for existing jobs that were
|
||||
created before eager transcoding was deployed. Transcodes the main
|
||||
input audio and all stem files to OGG Opus 128kbps.
|
||||
|
||||
Idempotent: skips files that are already transcoded.
|
||||
"""
|
||||
admin_email = auth_data.user_email or "unknown"
|
||||
|
||||
job_manager = JobManager()
|
||||
job = job_manager.get_job(job_id)
|
||||
|
||||
if not job:
|
||||
raise HTTPException(status_code=404, detail=f"Job {job_id} not found")
|
||||
|
||||
try:
|
||||
import asyncio
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
transcoding = AudioTranscodingService()
|
||||
transcoded = await asyncio.to_thread(transcoding.prepare_review_audio_for_job, job)
|
||||
|
||||
logger.info(
|
||||
f"Admin {admin_email} prepared review audio for job {job_id}: "
|
||||
f"{len(transcoded)} files transcoded"
|
||||
)
|
||||
|
||||
return PrepareReviewAudioResponse(
|
||||
status="success",
|
||||
job_id=job_id,
|
||||
transcoded_files=transcoded,
|
||||
message=f"Transcoded {len(transcoded)} files to OGG Opus",
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
f"Admin {admin_email} failed to prepare review audio for job {job_id}: {e}",
|
||||
exc_info=True,
|
||||
)
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail=f"Failed to prepare review audio: {str(e)}",
|
||||
)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Clear Worker State Endpoint
|
||||
# =============================================================================
|
||||
|
||||
@@ -254,20 +254,27 @@ def _extract_gcs_path(filepath: str) -> str:
|
||||
return filepath
|
||||
|
||||
|
||||
def _validate_and_prepare_selection(
|
||||
async def _download_and_start_processing(
|
||||
job_id: str,
|
||||
selection_index: int,
|
||||
audio_search_service,
|
||||
background_tasks: BackgroundTasks,
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Validate selection and transition job to DOWNLOADING_AUDIO state.
|
||||
|
||||
Returns selection info dict with the selected result details.
|
||||
Raises HTTPException on validation errors.
|
||||
Download selected audio and start job processing.
|
||||
|
||||
This is called either:
|
||||
- Immediately after search if auto_download=True
|
||||
- When user calls the select endpoint
|
||||
|
||||
For remote flacfetch downloads (torrent sources), the file is downloaded
|
||||
on the flacfetch VM and uploaded directly to GCS. For local downloads
|
||||
(YouTube), the file is downloaded locally and then uploaded to GCS.
|
||||
"""
|
||||
job = job_manager.get_job(job_id)
|
||||
if not job:
|
||||
raise HTTPException(status_code=404, detail=f"Job {job_id} not found")
|
||||
|
||||
|
||||
# Get search results from state_data
|
||||
search_results = job.state_data.get('audio_search_results', [])
|
||||
if not search_results:
|
||||
@@ -281,6 +288,9 @@ def _validate_and_prepare_selection(
|
||||
|
||||
selected = search_results[selection_index]
|
||||
|
||||
# Get remote_search_id from state_data (stored during initial search)
|
||||
remote_search_id = job.state_data.get('remote_search_id')
|
||||
|
||||
# Transition to downloading state
|
||||
job_manager.transition_to_state(
|
||||
job_id=job_id,
|
||||
@@ -292,65 +302,28 @@ def _validate_and_prepare_selection(
|
||||
'selected_audio_provider': selected['provider'],
|
||||
}
|
||||
)
|
||||
|
||||
# Save download params to job BEFORE attempting download
|
||||
# This enables retry even if download fails
|
||||
source_name = selected.get('provider')
|
||||
source_id = selected.get('source_id')
|
||||
target_file = selected.get('target_file')
|
||||
download_url = selected.get('url')
|
||||
|
||||
job_manager.update_job(job_id, {
|
||||
'audio_source_type': 'audio_search',
|
||||
'source_name': source_name,
|
||||
'source_id': source_id,
|
||||
'target_file': target_file,
|
||||
'download_url': download_url,
|
||||
})
|
||||
logger.info(
|
||||
f"Job {job_id}: Saved download params before attempt: "
|
||||
f"source_name={source_name}, source_id={source_id}"
|
||||
)
|
||||
|
||||
return {
|
||||
'selected_index': selection_index,
|
||||
'selected_title': selected['title'],
|
||||
'selected_artist': selected['artist'],
|
||||
'selected_provider': selected['provider'],
|
||||
}
|
||||
|
||||
|
||||
async def _download_audio_and_trigger_workers(
|
||||
job_id: str,
|
||||
selection_index: int,
|
||||
audio_search_service,
|
||||
) -> None:
|
||||
"""
|
||||
Download audio and trigger processing workers.
|
||||
|
||||
This runs as a background task after the select endpoint returns.
|
||||
Also called synchronously from the auto_download path during search.
|
||||
|
||||
For remote flacfetch downloads (torrent sources), the file is downloaded
|
||||
on the flacfetch VM and uploaded directly to GCS. For local downloads
|
||||
(YouTube), the file is downloaded locally and then uploaded to GCS.
|
||||
"""
|
||||
|
||||
try:
|
||||
job = job_manager.get_job(job_id)
|
||||
if not job:
|
||||
logger.error(f"Job {job_id} not found during background download")
|
||||
return
|
||||
|
||||
search_results = job.state_data.get('audio_search_results', [])
|
||||
selected = search_results[selection_index]
|
||||
remote_search_id = job.state_data.get('remote_search_id')
|
||||
|
||||
# Get source info from selected result
|
||||
source_name = selected.get('provider')
|
||||
source_id = selected.get('source_id')
|
||||
target_file = selected.get('target_file')
|
||||
download_url = selected.get('url')
|
||||
|
||||
# Save download params to job BEFORE attempting download
|
||||
# This enables retry even if download fails
|
||||
job_manager.update_job(job_id, {
|
||||
'audio_source_type': 'audio_search',
|
||||
'source_name': source_name,
|
||||
'source_id': source_id,
|
||||
'target_file': target_file,
|
||||
'download_url': download_url,
|
||||
})
|
||||
logger.info(
|
||||
f"Job {job_id}: Saved download params before attempt: "
|
||||
f"source_name={source_name}, source_id={source_id}"
|
||||
)
|
||||
|
||||
# Route to appropriate download handler based on source type
|
||||
if source_name == 'YouTube':
|
||||
# Use YouTubeDownloadService for all YouTube downloads
|
||||
@@ -466,7 +439,7 @@ async def _download_audio_and_trigger_workers(
|
||||
shutil.rmtree(temp_dir)
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to clean up temp files: {e}")
|
||||
|
||||
|
||||
# Update job with GCS path
|
||||
job_manager.update_job(job_id, {
|
||||
'input_media_gcs_path': audio_gcs_path,
|
||||
@@ -483,19 +456,29 @@ async def _download_audio_and_trigger_workers(
|
||||
message="Audio downloaded, starting processing"
|
||||
)
|
||||
|
||||
# Trigger workers directly
|
||||
worker_service = get_worker_service()
|
||||
await asyncio.gather(
|
||||
worker_service.trigger_audio_worker(job_id),
|
||||
worker_service.trigger_lyrics_worker(job_id)
|
||||
)
|
||||
# Trigger workers in background
|
||||
async def trigger_workers():
|
||||
worker_service = get_worker_service()
|
||||
await asyncio.gather(
|
||||
worker_service.trigger_audio_worker(job_id),
|
||||
worker_service.trigger_lyrics_worker(job_id)
|
||||
)
|
||||
|
||||
background_tasks.add_task(trigger_workers)
|
||||
|
||||
return {
|
||||
'selected_index': selection_index,
|
||||
'selected_title': selected['title'],
|
||||
'selected_artist': selected['artist'],
|
||||
'selected_provider': selected['provider'],
|
||||
}
|
||||
|
||||
except DownloadError as e:
|
||||
logger.error(f"Download failed for job {job_id}: {e}")
|
||||
job_manager.fail_job(job_id, f"Audio download failed: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Download failed: {e}")
|
||||
except Exception as e:
|
||||
logger.error(f"Download failed for job {job_id}: {e}", exc_info=True)
|
||||
job_manager.fail_job(job_id, f"Audio download failed: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Download failed: {e}")
|
||||
|
||||
|
||||
@router.post("/audio-search/search", response_model=AudioSearchResponse)
|
||||
@@ -760,22 +743,16 @@ async def search_audio(
|
||||
# If auto_download, select best and start processing
|
||||
if body.auto_download:
|
||||
best_index = audio_search_service.select_best(search_results)
|
||||
|
||||
|
||||
logger.info(f"Auto-download enabled, selecting result {best_index}")
|
||||
|
||||
selection_info = _validate_and_prepare_selection(
|
||||
|
||||
selection_info = await _download_and_start_processing(
|
||||
job_id=job_id,
|
||||
selection_index=best_index,
|
||||
audio_search_service=audio_search_service,
|
||||
background_tasks=background_tasks,
|
||||
)
|
||||
|
||||
# For auto_download, run download in background so this endpoint returns quickly
|
||||
background_tasks.add_task(
|
||||
_download_audio_and_trigger_workers,
|
||||
job_id,
|
||||
best_index,
|
||||
audio_search_service,
|
||||
)
|
||||
|
||||
|
||||
return AudioSearchResponse(
|
||||
status="success",
|
||||
job_id=job_id,
|
||||
@@ -909,23 +886,24 @@ async def select_audio_source(
|
||||
):
|
||||
"""
|
||||
Select an audio source and start job processing.
|
||||
|
||||
This endpoint returns immediately after validating the selection and
|
||||
transitioning the job to DOWNLOADING_AUDIO state. The actual download
|
||||
runs as a background task so the UI can close the selection dialog
|
||||
without waiting for the download to complete.
|
||||
|
||||
This endpoint:
|
||||
1. Validates the job is awaiting selection
|
||||
2. Downloads the selected audio
|
||||
3. Uploads to GCS
|
||||
4. Triggers audio and lyrics workers
|
||||
"""
|
||||
job = job_manager.get_job(job_id)
|
||||
if not job:
|
||||
raise HTTPException(status_code=404, detail=f"Job {job_id} not found")
|
||||
|
||||
|
||||
# Verify job is awaiting selection
|
||||
if job.status != JobStatus.AWAITING_AUDIO_SELECTION:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"Job is not awaiting audio selection (status: {job.status})"
|
||||
)
|
||||
|
||||
|
||||
# Get search service instance
|
||||
# Note: With download_by_id, we no longer need to re-search to populate the cache.
|
||||
# The source_id stored in job.state_data['audio_search_results'] is sufficient.
|
||||
@@ -935,25 +913,18 @@ async def select_audio_source(
|
||||
search_results = job.state_data.get('audio_search_results', [])
|
||||
if not search_results:
|
||||
raise HTTPException(status_code=400, detail="No search results cached for this job")
|
||||
|
||||
# Validate selection and transition to DOWNLOADING_AUDIO (returns immediately)
|
||||
selection_info = _validate_and_prepare_selection(
|
||||
|
||||
selection_info = await _download_and_start_processing(
|
||||
job_id=job_id,
|
||||
selection_index=body.selection_index,
|
||||
audio_search_service=audio_search_service,
|
||||
background_tasks=background_tasks,
|
||||
)
|
||||
|
||||
# Schedule the actual download as a background task
|
||||
background_tasks.add_task(
|
||||
_download_audio_and_trigger_workers,
|
||||
job_id,
|
||||
body.selection_index,
|
||||
audio_search_service,
|
||||
)
|
||||
|
||||
|
||||
return AudioSelectResponse(
|
||||
status="success",
|
||||
job_id=job_id,
|
||||
message="Audio selected, download starting",
|
||||
message="Audio selected and download started",
|
||||
selected_index=selection_info['selected_index'],
|
||||
selected_title=selection_info['selected_title'],
|
||||
selected_artist=selection_info['selected_artist'],
|
||||
|
||||
@@ -188,33 +188,7 @@ def _check_job_ownership(job: Job, auth_result: AuthResult) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
_SUMMARY_STATE_DATA_KEYS = {
|
||||
'brand_code', 'youtube_url', 'dropbox_link',
|
||||
'audio_progress', 'lyrics_progress',
|
||||
'audio_complete', 'lyrics_complete',
|
||||
'backing_vocals_analysis',
|
||||
}
|
||||
_SUMMARY_FILE_URLS_KEYS = {'finals', 'videos', 'packages'}
|
||||
_HIDE_COMPLETED_STATUSES = ['complete', 'prep_complete', 'failed', 'cancelled']
|
||||
|
||||
|
||||
def _prune_state_data(data: Dict[str, Any]) -> Dict[str, Any]:
|
||||
"""Strip state_data down to dashboard-required keys."""
|
||||
sd = data.get('state_data')
|
||||
if isinstance(sd, dict):
|
||||
data['state_data'] = {k: v for k, v in sd.items() if k in _SUMMARY_STATE_DATA_KEYS}
|
||||
return data
|
||||
|
||||
|
||||
def _prune_file_urls(data: Dict[str, Any]) -> Dict[str, Any]:
|
||||
"""Strip file_urls down to dashboard-required keys."""
|
||||
fu = data.get('file_urls')
|
||||
if isinstance(fu, dict):
|
||||
data['file_urls'] = {k: v for k, v in fu.items() if k in _SUMMARY_FILE_URLS_KEYS}
|
||||
return data
|
||||
|
||||
|
||||
@router.get("", response_model=None)
|
||||
@router.get("", response_model=List[Job])
|
||||
async def list_jobs(
|
||||
request: Request,
|
||||
status: Optional[JobStatus] = None,
|
||||
@@ -224,10 +198,8 @@ async def list_jobs(
|
||||
created_before: Optional[str] = None,
|
||||
exclude_test: bool = True,
|
||||
limit: int = 100,
|
||||
fields: Optional[str] = None,
|
||||
hide_completed: bool = False,
|
||||
auth_result: AuthResult = Depends(require_auth)
|
||||
):
|
||||
) -> List[Job]:
|
||||
"""
|
||||
List jobs with optional filters.
|
||||
|
||||
@@ -242,13 +214,9 @@ async def list_jobs(
|
||||
created_before: Filter jobs created before this ISO datetime
|
||||
exclude_test: If True (default), exclude jobs from test users (admin only)
|
||||
limit: Maximum number of jobs to return (default 100)
|
||||
fields: Set to "summary" for reduced payload with only dashboard-required fields
|
||||
hide_completed: If True, exclude terminal-status jobs (complete, prep_complete, failed, cancelled)
|
||||
|
||||
Returns:
|
||||
List of jobs matching filters, ordered by created_at descending.
|
||||
When fields=summary, returns List[dict] (pruned).
|
||||
Otherwise returns List[Job] (full model).
|
||||
List of jobs matching filters, ordered by created_at descending
|
||||
"""
|
||||
from datetime import datetime
|
||||
|
||||
@@ -285,32 +253,6 @@ async def list_jobs(
|
||||
# Tenant users only see jobs from their tenant
|
||||
tenant_id = get_tenant_from_request(request)
|
||||
|
||||
# --- Summary mode: field-projected query returning dicts ---
|
||||
if fields == "summary":
|
||||
exclude_statuses = _HIDE_COMPLETED_STATUSES if hide_completed else None
|
||||
jobs_dicts = job_manager.list_jobs_summary(
|
||||
status=status,
|
||||
exclude_statuses=exclude_statuses,
|
||||
environment=environment,
|
||||
client_id=client_id,
|
||||
created_after=created_after_dt,
|
||||
created_before=created_before_dt,
|
||||
user_email=user_email_filter,
|
||||
tenant_id=tenant_id,
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
# Exclude test user jobs (Python-side, same as full mode)
|
||||
if exclude_test and auth_result.is_admin:
|
||||
jobs_dicts = [j for j in jobs_dicts if not is_test_email(j.get('user_email') or "")]
|
||||
|
||||
# Safety-net pruning (in case Firestore returned extra nested keys)
|
||||
jobs_dicts = [_prune_file_urls(_prune_state_data(j)) for j in jobs_dicts]
|
||||
|
||||
logger.debug(f"Listed {len(jobs_dicts)} summary jobs for user={auth_result.user_email}")
|
||||
return jobs_dicts
|
||||
|
||||
# --- Full mode: existing behaviour (List[Job]) ---
|
||||
jobs = job_manager.list_jobs(
|
||||
status=status,
|
||||
environment=environment,
|
||||
|
||||
@@ -22,7 +22,7 @@ from pathlib import Path
|
||||
from typing import Dict, Any, Set, Tuple
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Request, Depends
|
||||
from fastapi.responses import FileResponse, RedirectResponse, StreamingResponse
|
||||
from fastapi.responses import FileResponse, StreamingResponse
|
||||
from starlette.background import BackgroundTask
|
||||
|
||||
from backend.models.job import JobStatus
|
||||
@@ -138,40 +138,27 @@ async def get_correction_data(
|
||||
}
|
||||
|
||||
# === Add instrumental data for combined review ===
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
transcoding = AudioTranscodingService(storage_service=storage)
|
||||
|
||||
# Get instrumental stem URLs
|
||||
stems = job.file_urls.get('stems', {})
|
||||
clean_url = stems.get('instrumental_clean')
|
||||
backing_url = stems.get('instrumental_with_backing')
|
||||
|
||||
# Build instrumental options with transcoded signed URLs (OGG Opus)
|
||||
# Build instrumental options with signed URLs
|
||||
instrumental_options = []
|
||||
url_tasks = {}
|
||||
if clean_url:
|
||||
url_tasks['clean'] = transcoding.get_review_audio_url_async(clean_url, expiration_minutes=120)
|
||||
if backing_url:
|
||||
url_tasks['with_backing'] = transcoding.get_review_audio_url_async(backing_url, expiration_minutes=120)
|
||||
|
||||
signed_urls = {}
|
||||
if url_tasks:
|
||||
results = await asyncio.gather(*url_tasks.values())
|
||||
signed_urls = dict(zip(url_tasks.keys(), results))
|
||||
|
||||
if clean_url:
|
||||
instrumental_options.append({
|
||||
"id": "clean",
|
||||
"label": "Clean Instrumental",
|
||||
"description": "No backing vocals - just the music",
|
||||
"audio_url": signed_urls['clean'],
|
||||
"audio_url": storage.generate_signed_url(clean_url, expiration_minutes=120),
|
||||
})
|
||||
if backing_url:
|
||||
instrumental_options.append({
|
||||
"id": "with_backing",
|
||||
"label": "Instrumental with Backing Vocals",
|
||||
"description": "Includes harmonies and background vocals",
|
||||
"audio_url": signed_urls['with_backing'],
|
||||
"audio_url": storage.generate_signed_url(backing_url, expiration_minutes=120),
|
||||
})
|
||||
|
||||
corrections_data['instrumental_options'] = instrumental_options
|
||||
@@ -226,32 +213,49 @@ async def get_audio_no_hash(
|
||||
|
||||
async def _stream_audio(job_id: str):
|
||||
"""
|
||||
Redirect to a signed GCS URL for audio playback in the review interface.
|
||||
|
||||
Serves transcoded OGG Opus (~3 MB) instead of raw FLAC (~35 MB).
|
||||
Falls back to FLAC if transcoded version is not available.
|
||||
Stream the audio file for playback in the review interface.
|
||||
"""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
job_manager = JobManager()
|
||||
|
||||
storage = StorageService()
|
||||
|
||||
job = job_manager.get_job(job_id)
|
||||
if not job:
|
||||
raise HTTPException(status_code=404, detail="Job not found")
|
||||
|
||||
|
||||
audio_gcs_path = job.input_media_gcs_path
|
||||
if not audio_gcs_path:
|
||||
raise HTTPException(status_code=404, detail="Audio file not found")
|
||||
|
||||
|
||||
# Download to temp file and stream
|
||||
try:
|
||||
transcoding = AudioTranscodingService()
|
||||
signed_url = await transcoding.get_review_audio_url_async(audio_gcs_path, expiration_minutes=120)
|
||||
logger.info(f"Job {job_id}: Redirecting to signed URL for audio review")
|
||||
return RedirectResponse(url=signed_url, status_code=302)
|
||||
|
||||
# Create temp file
|
||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".flac") as tmp:
|
||||
tmp_path = tmp.name
|
||||
|
||||
storage.download_file(audio_gcs_path, tmp_path)
|
||||
|
||||
# Determine content type
|
||||
if audio_gcs_path.endswith('.flac'):
|
||||
media_type = "audio/flac"
|
||||
elif audio_gcs_path.endswith('.wav'):
|
||||
media_type = "audio/wav"
|
||||
elif audio_gcs_path.endswith('.mp3'):
|
||||
media_type = "audio/mpeg"
|
||||
else:
|
||||
media_type = "audio/mpeg"
|
||||
|
||||
logger.info(f"Job {job_id}: Streaming audio for review")
|
||||
|
||||
return FileResponse(
|
||||
tmp_path,
|
||||
media_type=media_type,
|
||||
filename=os.path.basename(audio_gcs_path),
|
||||
background=BackgroundTask(os.unlink, tmp_path),
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Job {job_id}: Error generating audio signed URL: {e}", exc_info=True)
|
||||
raise HTTPException(status_code=500, detail=f"Error serving audio: {str(e)}")
|
||||
logger.error(f"Job {job_id}: Error streaming audio: {e}", exc_info=True)
|
||||
raise HTTPException(status_code=500, detail=f"Error streaming audio: {str(e)}")
|
||||
|
||||
|
||||
@router.post("/{job_id}/complete")
|
||||
@@ -781,29 +785,23 @@ async def get_instrumental_analysis(
|
||||
backing_analysis = job.state_data.get('backing_vocals_analysis', {})
|
||||
|
||||
# Get stem URLs
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
transcoding = AudioTranscodingService(storage_service=storage)
|
||||
|
||||
stems = job.file_urls.get('stems', {})
|
||||
clean_url = stems.get('instrumental_clean')
|
||||
backing_url = stems.get('instrumental_with_backing')
|
||||
backing_vocals_path = stems.get('backing_vocals')
|
||||
|
||||
# Build audio URLs with transcoded signed access (OGG Opus, parallel)
|
||||
url_tasks = {}
|
||||
if clean_url:
|
||||
url_tasks['clean'] = transcoding.get_review_audio_url_async(clean_url, expiration_minutes=120)
|
||||
if backing_url:
|
||||
url_tasks['with_backing'] = transcoding.get_review_audio_url_async(backing_url, expiration_minutes=120)
|
||||
if job.input_media_gcs_path:
|
||||
url_tasks['original'] = transcoding.get_review_audio_url_async(job.input_media_gcs_path, expiration_minutes=120)
|
||||
if backing_vocals_path:
|
||||
url_tasks['backing_vocals'] = transcoding.get_review_audio_url_async(backing_vocals_path, expiration_minutes=120)
|
||||
|
||||
# Build audio URLs with signed access
|
||||
audio_urls = {}
|
||||
if url_tasks:
|
||||
results = await asyncio.gather(*url_tasks.values())
|
||||
audio_urls = dict(zip(url_tasks.keys(), results))
|
||||
if clean_url:
|
||||
audio_urls['clean'] = storage.generate_signed_url(clean_url, expiration_minutes=120)
|
||||
if backing_url:
|
||||
audio_urls['with_backing'] = storage.generate_signed_url(backing_url, expiration_minutes=120)
|
||||
if job.input_media_gcs_path:
|
||||
audio_urls['original'] = storage.generate_signed_url(job.input_media_gcs_path, expiration_minutes=120)
|
||||
|
||||
# Check for backing vocals stem for playback
|
||||
backing_vocals_path = stems.get('backing_vocals')
|
||||
if backing_vocals_path:
|
||||
audio_urls['backing_vocals'] = storage.generate_signed_url(backing_vocals_path, expiration_minutes=120)
|
||||
|
||||
# Format response to match InstrumentalAnalysis type
|
||||
return {
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
"""
|
||||
Audio transcoding service for review UI optimization.
|
||||
|
||||
Transcodes FLAC audio files to OGG Opus for efficient browser playback.
|
||||
Original FLAC files are never modified — transcoded versions are cached
|
||||
in GCS at jobs/{job_id}/review-audio/{filename}.ogg.
|
||||
|
||||
Eager transcoding: called from screens_worker before AWAITING_REVIEW
|
||||
so all files are cached before the user opens the review UI.
|
||||
Falls back to original FLAC signed URLs if transcoded version is missing.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from backend.services.storage_service import StorageService
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AudioTranscodingService:
|
||||
"""
|
||||
Transcodes audio files to OGG Opus and caches them in GCS.
|
||||
|
||||
Used by the review UI to serve ~3 MB OGG files instead of 35+ MB FLACs.
|
||||
"""
|
||||
|
||||
def __init__(self, storage_service: Optional[StorageService] = None):
|
||||
self.storage = storage_service or StorageService()
|
||||
|
||||
def _get_cache_path(self, source_gcs_path: str) -> str:
|
||||
"""
|
||||
Derive the cache path for a transcoded file.
|
||||
|
||||
Examples:
|
||||
jobs/abc123/input/song.flac -> jobs/abc123/review-audio/song.ogg
|
||||
jobs/abc123/stems/instrumental_clean.flac -> jobs/abc123/review-audio/instrumental_clean.ogg
|
||||
"""
|
||||
parts = Path(source_gcs_path).parts
|
||||
# Find "jobs/{job_id}" prefix
|
||||
try:
|
||||
jobs_idx = list(parts).index("jobs")
|
||||
job_id = parts[jobs_idx + 1]
|
||||
except (ValueError, IndexError):
|
||||
# Fallback: use a hash of the full path to avoid collisions
|
||||
job_id = "_" + hashlib.sha256(source_gcs_path.encode()).hexdigest()[:12]
|
||||
|
||||
filename = Path(source_gcs_path).stem + ".ogg"
|
||||
return f"jobs/{job_id}/review-audio/{filename}"
|
||||
|
||||
def _transcode_and_upload(self, source_gcs_path: str, cache_path: str) -> str:
|
||||
"""
|
||||
Download FLAC from GCS, transcode to OGG Opus, upload to cache path.
|
||||
|
||||
Returns the cache GCS path on success.
|
||||
Raises on failure.
|
||||
"""
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
local_input = os.path.join(temp_dir, "input.flac")
|
||||
local_output = os.path.join(temp_dir, "output.ogg")
|
||||
|
||||
# Download source
|
||||
self.storage.download_file(source_gcs_path, local_input)
|
||||
|
||||
# Transcode: FLAC -> OGG Opus 128kbps
|
||||
cmd = [
|
||||
"ffmpeg", "-hide_banner", "-loglevel", "error",
|
||||
"-y",
|
||||
"-i", local_input,
|
||||
"-c:a", "libopus",
|
||||
"-b:a", "128k",
|
||||
"-vn",
|
||||
local_output,
|
||||
]
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(
|
||||
f"ffmpeg transcoding failed (exit {result.returncode}): {result.stderr}"
|
||||
)
|
||||
|
||||
# Upload transcoded file
|
||||
self.storage.upload_file(local_output, cache_path)
|
||||
|
||||
return cache_path
|
||||
|
||||
def transcode_if_needed(self, source_gcs_path: str) -> str:
|
||||
"""
|
||||
Return the GCS path of the transcoded OGG file, transcoding if not cached.
|
||||
|
||||
Returns the cache path (always an OGG file in review-audio/).
|
||||
Raises if transcoding fails.
|
||||
"""
|
||||
cache_path = self._get_cache_path(source_gcs_path)
|
||||
|
||||
if self.storage.file_exists(cache_path):
|
||||
logger.debug(f"Cache hit: {cache_path}")
|
||||
return cache_path
|
||||
|
||||
logger.info(f"Cache miss, transcoding: {source_gcs_path} -> {cache_path}")
|
||||
return self._transcode_and_upload(source_gcs_path, cache_path)
|
||||
|
||||
def get_review_audio_url(
|
||||
self, source_gcs_path: str, expiration_minutes: int = 120
|
||||
) -> str:
|
||||
"""
|
||||
Get a signed URL for the transcoded audio, falling back to original FLAC.
|
||||
"""
|
||||
try:
|
||||
cache_path = self.transcode_if_needed(source_gcs_path)
|
||||
return self.storage.generate_signed_url(cache_path, expiration_minutes)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"Transcoding failed for {source_gcs_path}, falling back to FLAC: {e}"
|
||||
)
|
||||
return self.storage.generate_signed_url(source_gcs_path, expiration_minutes)
|
||||
|
||||
async def get_review_audio_url_async(
|
||||
self, source_gcs_path: str, expiration_minutes: int = 120
|
||||
) -> str:
|
||||
"""Async wrapper around get_review_audio_url via asyncio.to_thread."""
|
||||
return await asyncio.to_thread(
|
||||
self.get_review_audio_url, source_gcs_path, expiration_minutes
|
||||
)
|
||||
|
||||
def prepare_review_audio_for_job(self, job) -> list[str]:
|
||||
"""
|
||||
Transcode all review audio files for a job (eager transcoding).
|
||||
|
||||
Called from screens_worker before AWAITING_REVIEW transition
|
||||
and from the admin backfill endpoint.
|
||||
|
||||
Returns list of cache paths that were transcoded.
|
||||
"""
|
||||
job_id = job.job_id
|
||||
transcoded = []
|
||||
|
||||
# Collect all audio paths to transcode
|
||||
paths_to_transcode = []
|
||||
|
||||
# Main input audio
|
||||
if job.input_media_gcs_path:
|
||||
paths_to_transcode.append(("input", job.input_media_gcs_path))
|
||||
|
||||
# Stems
|
||||
stems = job.file_urls.get("stems", {})
|
||||
for stem_key in ["instrumental_clean", "instrumental_with_backing", "backing_vocals"]:
|
||||
path = stems.get(stem_key)
|
||||
if path:
|
||||
paths_to_transcode.append((stem_key, path))
|
||||
|
||||
for label, source_path in paths_to_transcode:
|
||||
try:
|
||||
cache_path = self.transcode_if_needed(source_path)
|
||||
transcoded.append(cache_path)
|
||||
logger.info(f"[{job_id}] Transcoded {label}: {cache_path}")
|
||||
except Exception as e:
|
||||
# Non-fatal: review UI will fall back to FLAC
|
||||
logger.warning(
|
||||
f"[{job_id}] Failed to transcode {label} ({source_path}): {e}"
|
||||
)
|
||||
|
||||
logger.info(
|
||||
f"[{job_id}] Review audio preparation complete: "
|
||||
f"{len(transcoded)}/{len(paths_to_transcode)} files transcoded"
|
||||
)
|
||||
return transcoded
|
||||
@@ -173,82 +173,6 @@ class FirestoreService:
|
||||
logger.error(f"Error listing jobs: {e}")
|
||||
raise
|
||||
|
||||
# Fields needed by the dashboard summary view
|
||||
SUMMARY_FIELD_PATHS = [
|
||||
'job_id', 'status', 'progress', 'created_at', 'artist', 'title',
|
||||
'error_message', 'non_interactive', 'outputs_deleted_at', 'user_email',
|
||||
'state_data.brand_code', 'state_data.youtube_url', 'state_data.dropbox_link',
|
||||
'state_data.audio_progress', 'state_data.lyrics_progress',
|
||||
'state_data.audio_complete', 'state_data.lyrics_complete',
|
||||
'state_data.backing_vocals_analysis',
|
||||
'file_urls.finals', 'file_urls.videos', 'file_urls.packages',
|
||||
]
|
||||
|
||||
def list_jobs_summary(
|
||||
self,
|
||||
status: Optional[JobStatus] = None,
|
||||
exclude_statuses: Optional[List[str]] = None,
|
||||
environment: Optional[str] = None,
|
||||
client_id: Optional[str] = None,
|
||||
created_after: Optional[datetime] = None,
|
||||
created_before: Optional[datetime] = None,
|
||||
user_email: Optional[str] = None,
|
||||
tenant_id: Optional[str] = None,
|
||||
limit: int = 100,
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
List jobs with Firestore field projection for reduced payload.
|
||||
|
||||
Uses ``query.select()`` so Firestore only reads the requested fields,
|
||||
drastically cutting bandwidth and deserialization cost.
|
||||
|
||||
Returns raw dicts (not Job models) because projected documents would
|
||||
fail Pydantic validation for missing required fields.
|
||||
"""
|
||||
try:
|
||||
query = self.db.collection(self.collection)
|
||||
|
||||
if status:
|
||||
query = query.where(filter=FieldFilter('status', '==', status.value))
|
||||
|
||||
# NOTE: exclude_statuses is filtered in Python after the query
|
||||
# because Firestore's not-in filter combined with order_by(created_at)
|
||||
# requires a composite index. Since documents are tiny after select(),
|
||||
# Python filtering is fast and avoids the index requirement.
|
||||
|
||||
if environment:
|
||||
query = query.where(filter=FieldFilter('request_metadata.environment', '==', environment))
|
||||
|
||||
if client_id:
|
||||
query = query.where(filter=FieldFilter('request_metadata.client_id', '==', client_id))
|
||||
|
||||
if user_email:
|
||||
query = query.where(filter=FieldFilter('user_email', '==', user_email.lower()))
|
||||
|
||||
if tenant_id:
|
||||
query = query.where(filter=FieldFilter('tenant_id', '==', tenant_id))
|
||||
|
||||
if created_after:
|
||||
query = query.where(filter=FieldFilter('created_at', '>=', created_after))
|
||||
|
||||
if created_before:
|
||||
query = query.where(filter=FieldFilter('created_at', '<=', created_before))
|
||||
|
||||
query = query.order_by('created_at', direction=firestore.Query.DESCENDING).limit(limit)
|
||||
query = query.select(self.SUMMARY_FIELD_PATHS)
|
||||
|
||||
docs = query.stream()
|
||||
results = [doc.to_dict() for doc in docs]
|
||||
|
||||
# Apply exclude_statuses filter in Python (see note above)
|
||||
if exclude_statuses:
|
||||
results = [r for r in results if r.get('status') not in exclude_statuses]
|
||||
|
||||
return results
|
||||
except Exception as e:
|
||||
logger.error(f"Error listing jobs summary: {e}")
|
||||
raise
|
||||
|
||||
def delete_jobs_by_filter(
|
||||
self,
|
||||
environment: Optional[str] = None,
|
||||
|
||||
@@ -3,7 +3,6 @@ import glob as glob_module
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
@@ -14,7 +13,6 @@ from typing import Optional
|
||||
|
||||
from fastapi import FastAPI, BackgroundTasks, HTTPException, Header, Depends
|
||||
from google.cloud import storage
|
||||
from packaging.version import Version
|
||||
from pydantic import BaseModel
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
@@ -256,23 +254,12 @@ def ensure_latest_wheel():
|
||||
|
||||
# Find the downloaded wheel (get the latest by version sorting)
|
||||
wheels = glob_module.glob("/tmp/karaoke_gen-*.whl")
|
||||
# Filter out karaoke_gen-current.whl (not a valid PEP 427 wheel name)
|
||||
wheels = [w for w in wheels if '-current' not in w]
|
||||
|
||||
if not wheels:
|
||||
logger.warning("No wheel found in GCS, using fallback encoding logic")
|
||||
return False
|
||||
|
||||
# Sort to get latest version (by semantic version, not alphabetically)
|
||||
def extract_version(wheel_path):
|
||||
"""Extract version from wheel filename like karaoke_gen-0.116.1-py3-none-any.whl"""
|
||||
match = re.search(r'karaoke_gen-([0-9.]+)-', wheel_path)
|
||||
if match:
|
||||
return Version(match.group(1))
|
||||
return Version("0.0.0") # Fallback for unparseable filenames
|
||||
|
||||
wheels.sort(key=extract_version, reverse=True)
|
||||
wheel_path = wheels[0]
|
||||
# Sort to get latest version
|
||||
wheel_path = sorted(wheels)[-1]
|
||||
logger.info(f"Installing wheel: {wheel_path}")
|
||||
|
||||
# Install (or upgrade) the wheel
|
||||
|
||||
@@ -210,31 +210,6 @@ class JobManager:
|
||||
limit=limit
|
||||
)
|
||||
|
||||
def list_jobs_summary(
|
||||
self,
|
||||
status: Optional[JobStatus] = None,
|
||||
exclude_statuses: Optional[List[str]] = None,
|
||||
environment: Optional[str] = None,
|
||||
client_id: Optional[str] = None,
|
||||
created_after: Optional[datetime] = None,
|
||||
created_before: Optional[datetime] = None,
|
||||
user_email: Optional[str] = None,
|
||||
tenant_id: Optional[str] = None,
|
||||
limit: int = 100,
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""List jobs with field projection (summary mode)."""
|
||||
return self.firestore.list_jobs_summary(
|
||||
status=status,
|
||||
exclude_statuses=exclude_statuses,
|
||||
environment=environment,
|
||||
client_id=client_id,
|
||||
created_after=created_after,
|
||||
created_before=created_before,
|
||||
user_email=user_email,
|
||||
tenant_id=tenant_id,
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
def delete_jobs_by_filter(
|
||||
self,
|
||||
environment: Optional[str] = None,
|
||||
|
||||
@@ -75,7 +75,7 @@ class TestAudioSearchYouTubeFlow:
|
||||
}
|
||||
|
||||
# Import the route function
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
|
||||
# Patch dependencies
|
||||
with patch(
|
||||
@@ -87,19 +87,20 @@ class TestAudioSearchYouTubeFlow:
|
||||
), patch(
|
||||
'backend.api.routes.audio_search.storage_service',
|
||||
mock_services['storage_service']
|
||||
), patch(
|
||||
'backend.api.routes.audio_search.worker_service',
|
||||
mock_services['worker_service']
|
||||
):
|
||||
# Create a mock audio_search_service
|
||||
mock_audio_search_service = MagicMock()
|
||||
mock_audio_search_service.is_remote_enabled = MagicMock(return_value=True)
|
||||
|
||||
# Call the download function (now runs as background task, returns None)
|
||||
await _download_audio_and_trigger_workers(
|
||||
# Create a mock background_tasks
|
||||
mock_background_tasks = MagicMock()
|
||||
|
||||
# Call the download function
|
||||
result = await _download_and_start_processing(
|
||||
job_id="test_job_123",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_search_service,
|
||||
background_tasks=mock_background_tasks,
|
||||
)
|
||||
|
||||
# Verify YouTubeDownloadService was used
|
||||
@@ -130,7 +131,7 @@ class TestAudioSearchYouTubeFlow:
|
||||
'audio_search_count': 1,
|
||||
}
|
||||
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
|
||||
# Mock audio_search_service for torrent download
|
||||
mock_audio_search_service = MagicMock()
|
||||
@@ -148,15 +149,14 @@ class TestAudioSearchYouTubeFlow:
|
||||
), patch(
|
||||
'backend.api.routes.audio_search.storage_service',
|
||||
mock_services['storage_service']
|
||||
), patch(
|
||||
'backend.api.routes.audio_search.worker_service',
|
||||
mock_services['worker_service']
|
||||
):
|
||||
# Call the download function (now runs as background task, returns None)
|
||||
await _download_audio_and_trigger_workers(
|
||||
mock_background_tasks = MagicMock()
|
||||
|
||||
result = await _download_and_start_processing(
|
||||
job_id="test_job_123",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_search_service,
|
||||
background_tasks=mock_background_tasks,
|
||||
)
|
||||
|
||||
# YouTubeDownloadService should NOT be called for torrent
|
||||
|
||||
@@ -1140,48 +1140,37 @@ class TestFlacfetchIntegration:
|
||||
|
||||
class TestAudioSearchApiRouteDownload:
|
||||
"""
|
||||
Tests for audio search download functions in audio_search routes.
|
||||
|
||||
Tests for _download_and_start_processing function in audio_search routes.
|
||||
|
||||
This tests the API layer's handling of the download flow, including:
|
||||
- Correct routing between local and remote downloads
|
||||
- GCS path handling for remote downloads
|
||||
- Error handling
|
||||
- Background task scheduling (select endpoint returns immediately)
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_job_manager(self):
|
||||
"""Mock the job manager singleton."""
|
||||
with patch('backend.api.routes.audio_search.job_manager') as mock:
|
||||
yield mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_storage_service(self):
|
||||
"""Mock the storage service singleton."""
|
||||
with patch('backend.api.routes.audio_search.storage_service') as mock:
|
||||
yield mock
|
||||
|
||||
@pytest.fixture
|
||||
def mock_worker_service(self):
|
||||
"""Mock the worker service."""
|
||||
with patch('backend.api.routes.audio_search.get_worker_service') as mock:
|
||||
worker = Mock()
|
||||
worker.trigger_audio_worker = AsyncMock()
|
||||
worker.trigger_lyrics_worker = AsyncMock()
|
||||
mock.return_value = worker
|
||||
yield worker
|
||||
|
||||
def test_remote_download_passes_gcs_path(self, mock_job_manager, mock_storage_service, mock_worker_service):
|
||||
|
||||
def test_remote_download_passes_gcs_path(self, mock_job_manager, mock_storage_service):
|
||||
"""
|
||||
Test that remote torrent downloads include GCS path for direct upload.
|
||||
|
||||
|
||||
This was the bug: we were calling download() without gcs_path for
|
||||
torrent sources, causing flacfetch VM to return a local path that
|
||||
Cloud Run couldn't access.
|
||||
"""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
import asyncio
|
||||
|
||||
|
||||
# Setup mock job with RED search result
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
@@ -1195,45 +1184,49 @@ class TestAudioSearchApiRouteDownload:
|
||||
mock_job.audio_search_artist = 'Avril Lavigne'
|
||||
mock_job.audio_search_title = 'Unwanted'
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
|
||||
# Create mock audio search service with remote client
|
||||
mock_audio_service = Mock()
|
||||
mock_audio_service.is_remote_enabled.return_value = True
|
||||
|
||||
|
||||
# Mock download to return GCS path
|
||||
mock_download_result = Mock()
|
||||
mock_download_result.filepath = "gs://bucket/uploads/job123/audio/Avril Lavigne - Unwanted.flac"
|
||||
mock_audio_service.download.return_value = mock_download_result
|
||||
|
||||
|
||||
# Create mock background tasks
|
||||
mock_bg_tasks = Mock()
|
||||
|
||||
# Run the async function
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
result = loop.run_until_complete(
|
||||
_download_and_start_processing(
|
||||
job_id="job123",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
background_tasks=mock_bg_tasks,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
|
||||
# CRITICAL: Verify download was called with gcs_path for remote torrent source
|
||||
mock_audio_service.download.assert_called_once()
|
||||
call_kwargs = mock_audio_service.download.call_args.kwargs
|
||||
|
||||
|
||||
# The gcs_path should be set for remote torrent downloads
|
||||
assert 'gcs_path' in call_kwargs
|
||||
assert call_kwargs['gcs_path'] == "uploads/job123/audio/"
|
||||
|
||||
def test_youtube_remote_download_uses_youtube_service(self, mock_job_manager, mock_storage_service, mock_worker_service):
|
||||
|
||||
def test_youtube_remote_download_uses_youtube_service(self, mock_job_manager, mock_storage_service):
|
||||
"""
|
||||
Test that YouTube downloads use YouTubeDownloadService.
|
||||
|
||||
After the consolidation refactor, all YouTube downloads go through
|
||||
YouTubeDownloadService instead of audio_search_service.download_by_id().
|
||||
"""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
import asyncio
|
||||
|
||||
# Setup mock job with YouTube search result that has source_id
|
||||
@@ -1244,7 +1237,7 @@ class TestAudioSearchApiRouteDownload:
|
||||
'artist': 'Kenny Chesney',
|
||||
'provider': 'YouTube',
|
||||
'quality': 'Opus 128kbps',
|
||||
'source_id': 'qmTjyGH9ro4',
|
||||
'source_id': 'qmTjyGH9ro4', # YouTube video ID (11 chars)
|
||||
'url': 'https://www.youtube.com/watch?v=qmTjyGH9ro4',
|
||||
}]
|
||||
}
|
||||
@@ -1263,15 +1256,20 @@ class TestAudioSearchApiRouteDownload:
|
||||
)
|
||||
mock_youtube_service._extract_video_id = Mock(return_value="qmTjyGH9ro4")
|
||||
|
||||
# Create mock background tasks
|
||||
mock_bg_tasks = Mock()
|
||||
|
||||
# Patch get_youtube_download_service to return our mock
|
||||
with patch('backend.api.routes.audio_search.get_youtube_download_service', return_value=mock_youtube_service):
|
||||
# Run the async function
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
result = loop.run_until_complete(
|
||||
_download_and_start_processing(
|
||||
job_id="job456",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
background_tasks=mock_bg_tasks,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
@@ -1290,12 +1288,12 @@ class TestAudioSearchApiRouteDownload:
|
||||
# audio_search_service.download_by_id should NOT be called for YouTube
|
||||
mock_audio_service.download_by_id.assert_not_called()
|
||||
|
||||
def test_youtube_download_always_uses_youtube_service(self, mock_job_manager, mock_storage_service, mock_worker_service):
|
||||
def test_youtube_download_always_uses_youtube_service(self, mock_job_manager, mock_storage_service):
|
||||
"""
|
||||
Test that YouTube downloads always use YouTubeDownloadService,
|
||||
regardless of remote enabled status. The service handles fallback internally.
|
||||
"""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
import asyncio
|
||||
|
||||
# Setup mock job with YouTube search result (use valid 11-char video ID)
|
||||
@@ -1306,7 +1304,7 @@ class TestAudioSearchApiRouteDownload:
|
||||
'artist': 'Avril Lavigne',
|
||||
'provider': 'YouTube',
|
||||
'quality': 'Opus 128kbps',
|
||||
'source_id': 'abc123xyz45',
|
||||
'source_id': 'abc123xyz45', # Valid 11-char ID
|
||||
'url': 'https://www.youtube.com/watch?v=abc123xyz45',
|
||||
}]
|
||||
}
|
||||
@@ -1325,15 +1323,20 @@ class TestAudioSearchApiRouteDownload:
|
||||
)
|
||||
mock_youtube_service._extract_video_id = Mock(return_value="abc123xyz45")
|
||||
|
||||
# Create mock background tasks
|
||||
mock_bg_tasks = Mock()
|
||||
|
||||
# Patch get_youtube_download_service to return our mock
|
||||
with patch('backend.api.routes.audio_search.get_youtube_download_service', return_value=mock_youtube_service):
|
||||
# Run the async function
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
result = loop.run_until_complete(
|
||||
_download_and_start_processing(
|
||||
job_id="job789",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
background_tasks=mock_bg_tasks,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
@@ -1341,12 +1344,12 @@ class TestAudioSearchApiRouteDownload:
|
||||
|
||||
# YouTubeDownloadService.download_by_id should always be called for YouTube
|
||||
mock_youtube_service.download_by_id.assert_called_once()
|
||||
|
||||
def test_handles_gcs_path_response_correctly(self, mock_job_manager, mock_storage_service, mock_worker_service):
|
||||
|
||||
def test_handles_gcs_path_response_correctly(self, mock_job_manager, mock_storage_service):
|
||||
"""Test that GCS path responses are parsed correctly."""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
import asyncio
|
||||
|
||||
|
||||
# Setup mock job with RED search result
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
@@ -1358,32 +1361,33 @@ class TestAudioSearchApiRouteDownload:
|
||||
}]
|
||||
}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
|
||||
# Create mock audio search service
|
||||
mock_audio_service = Mock()
|
||||
mock_audio_service.is_remote_enabled.return_value = True
|
||||
|
||||
|
||||
# Mock download to return full GCS path
|
||||
mock_download_result = Mock()
|
||||
mock_download_result.filepath = "gs://karaoke-gen-bucket/uploads/job789/audio/test.flac"
|
||||
mock_audio_service.download.return_value = mock_download_result
|
||||
|
||||
|
||||
# Run the async function
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
result = loop.run_until_complete(
|
||||
_download_and_start_processing(
|
||||
job_id="job789",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
background_tasks=Mock(),
|
||||
)
|
||||
)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
|
||||
# Verify job was updated with correct GCS path (without gs://bucket/ prefix)
|
||||
update_calls = mock_job_manager.update_job.call_args_list
|
||||
|
||||
|
||||
# Find the call that sets input_media_gcs_path
|
||||
gcs_path_set = False
|
||||
for call in update_calls:
|
||||
@@ -1393,17 +1397,24 @@ class TestAudioSearchApiRouteDownload:
|
||||
assert gcs_path == "uploads/job789/audio/test.flac"
|
||||
gcs_path_set = True
|
||||
break
|
||||
|
||||
|
||||
assert gcs_path_set, "input_media_gcs_path was not set in job update"
|
||||
|
||||
|
||||
def test_torrent_download_requires_remote(self, mock_job_manager, mock_storage_service):
|
||||
"""
|
||||
Test that torrent sources (RED/OPS) require remote flacfetch.
|
||||
|
||||
When running as a background task, the error is caught and the job is failed.
|
||||
Torrent downloads can only happen on the flacfetch VM which has:
|
||||
- BitTorrent peer connectivity
|
||||
- Private tracker credentials
|
||||
- Long-running seeding capability
|
||||
|
||||
Cloud Run cannot download torrents, so remote must be enabled.
|
||||
"""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
from backend.api.routes.audio_search import _download_and_start_processing
|
||||
from backend.services.audio_search_service import DownloadError
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
# Setup mock job with RED search result
|
||||
mock_job = Mock()
|
||||
@@ -1411,7 +1422,7 @@ class TestAudioSearchApiRouteDownload:
|
||||
'audio_search_results': [{
|
||||
'title': 'Test',
|
||||
'artist': 'Test',
|
||||
'provider': 'RED',
|
||||
'provider': 'RED', # Torrent source requires remote
|
||||
'quality': 'FLAC',
|
||||
}]
|
||||
}
|
||||
@@ -1419,220 +1430,21 @@ class TestAudioSearchApiRouteDownload:
|
||||
|
||||
# Create mock audio search service WITHOUT remote client
|
||||
mock_audio_service = Mock()
|
||||
mock_audio_service.is_remote_enabled.return_value = False
|
||||
mock_audio_service.is_remote_enabled.return_value = False # REMOTE DISABLED
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
# The background task catches exceptions and fails the job
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
job_id="job_no_remote",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
# Should raise an error because RED requires remote
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
loop.run_until_complete(
|
||||
_download_and_start_processing(
|
||||
job_id="job_no_remote",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
background_tasks=Mock(),
|
||||
)
|
||||
)
|
||||
)
|
||||
# Verify the error message mentions remote flacfetch
|
||||
assert "remote flacfetch" in str(exc_info.value).lower() or "flacfetch" in str(exc_info.value).lower()
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
# Verify the job was failed with an appropriate error message
|
||||
mock_job_manager.fail_job.assert_called_once()
|
||||
fail_args = mock_job_manager.fail_job.call_args
|
||||
assert fail_args.args[0] == "job_no_remote"
|
||||
assert "remote flacfetch" in fail_args.args[1].lower() or "flacfetch" in fail_args.args[1].lower()
|
||||
|
||||
def test_validate_and_prepare_selection(self, mock_job_manager, mock_storage_service):
|
||||
"""
|
||||
Test that _validate_and_prepare_selection transitions job state and returns
|
||||
selection info without performing the download.
|
||||
"""
|
||||
from backend.api.routes.audio_search import _validate_and_prepare_selection
|
||||
|
||||
# Setup mock job
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
'audio_search_results': [{
|
||||
'title': 'Waterloo',
|
||||
'artist': 'ABBA',
|
||||
'provider': 'RED',
|
||||
'quality': 'FLAC',
|
||||
'source_id': 'abc123',
|
||||
'target_file': 'Waterloo.flac',
|
||||
'url': '',
|
||||
}]
|
||||
}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
result = _validate_and_prepare_selection(
|
||||
job_id="job_test",
|
||||
selection_index=0,
|
||||
)
|
||||
|
||||
# Should return selection info
|
||||
assert result['selected_index'] == 0
|
||||
assert result['selected_title'] == 'Waterloo'
|
||||
assert result['selected_artist'] == 'ABBA'
|
||||
assert result['selected_provider'] == 'RED'
|
||||
|
||||
# Should transition to DOWNLOADING_AUDIO
|
||||
mock_job_manager.transition_to_state.assert_called_once()
|
||||
call_kwargs = mock_job_manager.transition_to_state.call_args.kwargs
|
||||
assert call_kwargs['new_status'] == JobStatus.DOWNLOADING_AUDIO
|
||||
|
||||
# Should save download params
|
||||
mock_job_manager.update_job.assert_called_once()
|
||||
update_data = mock_job_manager.update_job.call_args.args[1]
|
||||
assert update_data['audio_source_type'] == 'audio_search'
|
||||
assert update_data['source_name'] == 'RED'
|
||||
|
||||
def test_validate_and_prepare_selection_invalid_index(self, mock_job_manager, mock_storage_service):
|
||||
"""Test _validate_and_prepare_selection raises HTTPException for invalid index."""
|
||||
from backend.api.routes.audio_search import _validate_and_prepare_selection
|
||||
from fastapi import HTTPException
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
'audio_search_results': [{'title': 'Song', 'artist': 'Artist', 'provider': 'RED'}]
|
||||
}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
with pytest.raises(HTTPException) as exc_info:
|
||||
_validate_and_prepare_selection(job_id="job_test", selection_index=99)
|
||||
|
||||
assert exc_info.value.status_code == 400
|
||||
assert "Invalid selection index" in exc_info.value.detail
|
||||
|
||||
def test_validate_and_prepare_selection_job_not_found(self, mock_job_manager, mock_storage_service):
|
||||
"""Test _validate_and_prepare_selection raises HTTPException when job not found."""
|
||||
from backend.api.routes.audio_search import _validate_and_prepare_selection
|
||||
from fastapi import HTTPException
|
||||
|
||||
mock_job_manager.get_job.return_value = None
|
||||
|
||||
with pytest.raises(HTTPException) as exc_info:
|
||||
_validate_and_prepare_selection(job_id="nonexistent", selection_index=0)
|
||||
|
||||
assert exc_info.value.status_code == 404
|
||||
|
||||
def test_validate_and_prepare_selection_no_results(self, mock_job_manager, mock_storage_service):
|
||||
"""Test _validate_and_prepare_selection raises HTTPException when no search results."""
|
||||
from backend.api.routes.audio_search import _validate_and_prepare_selection
|
||||
from fastapi import HTTPException
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {'audio_search_results': []}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
with pytest.raises(HTTPException) as exc_info:
|
||||
_validate_and_prepare_selection(job_id="job_test", selection_index=0)
|
||||
|
||||
assert exc_info.value.status_code == 400
|
||||
assert "No search results" in exc_info.value.detail
|
||||
|
||||
def test_download_background_job_not_found(self, mock_job_manager, mock_storage_service):
|
||||
"""Test _download_audio_and_trigger_workers handles missing job gracefully."""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
import asyncio
|
||||
|
||||
mock_job_manager.get_job.return_value = None
|
||||
mock_audio_service = Mock()
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
# Should not raise - background tasks must handle errors gracefully
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
job_id="gone",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
# Should not try to fail a non-existent job
|
||||
mock_job_manager.fail_job.assert_not_called()
|
||||
|
||||
def test_download_triggers_workers_on_success(self, mock_job_manager, mock_storage_service, mock_worker_service):
|
||||
"""Test that _download_audio_and_trigger_workers triggers both workers after download."""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
import asyncio
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
'audio_search_results': [{
|
||||
'title': 'Test',
|
||||
'artist': 'Artist',
|
||||
'provider': 'RED',
|
||||
'quality': 'FLAC',
|
||||
}]
|
||||
}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
mock_audio_service = Mock()
|
||||
mock_audio_service.is_remote_enabled.return_value = True
|
||||
mock_download_result = Mock()
|
||||
mock_download_result.filepath = "gs://bucket/uploads/job_w/audio/test.flac"
|
||||
mock_audio_service.download.return_value = mock_download_result
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
job_id="job_w",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
# Both workers should be triggered
|
||||
mock_worker_service.trigger_audio_worker.assert_called_once_with("job_w")
|
||||
mock_worker_service.trigger_lyrics_worker.assert_called_once_with("job_w")
|
||||
|
||||
# Job should transition to DOWNLOADING
|
||||
transition_calls = mock_job_manager.transition_to_state.call_args_list
|
||||
assert any(
|
||||
c.kwargs.get('new_status') == JobStatus.DOWNLOADING
|
||||
for c in transition_calls
|
||||
), "Job should transition to DOWNLOADING status"
|
||||
|
||||
def test_download_generic_exception_fails_job(self, mock_job_manager, mock_storage_service):
|
||||
"""Test that generic exceptions in background download fail the job gracefully."""
|
||||
from backend.api.routes.audio_search import _download_audio_and_trigger_workers
|
||||
import asyncio
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.state_data = {
|
||||
'audio_search_results': [{
|
||||
'title': 'Test',
|
||||
'artist': 'Artist',
|
||||
'provider': 'RED',
|
||||
'quality': 'FLAC',
|
||||
}]
|
||||
}
|
||||
mock_job_manager.get_job.return_value = mock_job
|
||||
|
||||
mock_audio_service = Mock()
|
||||
mock_audio_service.is_remote_enabled.return_value = True
|
||||
mock_audio_service.download.side_effect = RuntimeError("Unexpected connection error")
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
# Should not raise - background tasks catch all exceptions
|
||||
loop.run_until_complete(
|
||||
_download_audio_and_trigger_workers(
|
||||
job_id="job_err",
|
||||
selection_index=0,
|
||||
audio_search_service=mock_audio_service,
|
||||
)
|
||||
)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
# Job should be failed with error message
|
||||
mock_job_manager.fail_job.assert_called_once()
|
||||
fail_args = mock_job_manager.fail_job.call_args
|
||||
assert fail_args.args[0] == "job_err"
|
||||
assert "Unexpected connection error" in fail_args.args[1]
|
||||
|
||||
@@ -1,353 +0,0 @@
|
||||
"""
|
||||
Tests for audio_transcoding_service.py - Review audio transcoding to OGG Opus.
|
||||
|
||||
These tests mock StorageService and subprocess to verify:
|
||||
- Cache path derivation for various GCS paths
|
||||
- Cache hit path (no ffmpeg call)
|
||||
- Cache miss with successful transcode
|
||||
- Fallback to FLAC on transcoding failure
|
||||
- Bulk prepare_review_audio_for_job transcodes all expected files
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch, call, ANY
|
||||
|
||||
|
||||
class TestGetCachePath:
|
||||
"""Test _get_cache_path() derivation logic."""
|
||||
|
||||
def _make_service(self):
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
return AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
def test_input_audio_path(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("jobs/abc123/input/song.flac")
|
||||
assert result == "jobs/abc123/review-audio/song.ogg"
|
||||
|
||||
def test_stem_path(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("jobs/abc123/stems/instrumental_clean.flac")
|
||||
assert result == "jobs/abc123/review-audio/instrumental_clean.ogg"
|
||||
|
||||
def test_backing_vocals_path(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("jobs/abc123/stems/backing_vocals.flac")
|
||||
assert result == "jobs/abc123/review-audio/backing_vocals.ogg"
|
||||
|
||||
def test_nested_job_path(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("jobs/4bed6f80/stems/instrumental_with_backing.flac")
|
||||
assert result == "jobs/4bed6f80/review-audio/instrumental_with_backing.ogg"
|
||||
|
||||
def test_wav_extension(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("jobs/abc123/input/song.wav")
|
||||
assert result == "jobs/abc123/review-audio/song.ogg"
|
||||
|
||||
def test_no_jobs_prefix_fallback_uses_hash(self):
|
||||
service = self._make_service()
|
||||
result = service._get_cache_path("other/path/audio.flac")
|
||||
# Should use a hash-based fallback, not a literal "_unknown"
|
||||
assert result.startswith("jobs/_")
|
||||
assert result.endswith("/review-audio/audio.ogg")
|
||||
assert len(result.split("/")[1]) == 13 # "_" + 12-char hash
|
||||
|
||||
def test_no_jobs_prefix_different_paths_different_hashes(self):
|
||||
service = self._make_service()
|
||||
result1 = service._get_cache_path("other/path/audio.flac")
|
||||
result2 = service._get_cache_path("another/path/audio.flac")
|
||||
# Different source paths should produce different cache paths
|
||||
assert result1 != result2
|
||||
|
||||
|
||||
class TestTranscodeIfNeeded:
|
||||
"""Test transcode_if_needed() cache hit/miss logic."""
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_cache_hit_skips_transcode(self, mock_subprocess):
|
||||
"""When cached file exists, return it without transcoding."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = service.transcode_if_needed("jobs/abc/input/song.flac")
|
||||
|
||||
assert result == "jobs/abc/review-audio/song.ogg"
|
||||
mock_storage.file_exists.assert_called_once_with("jobs/abc/review-audio/song.ogg")
|
||||
mock_subprocess.run.assert_not_called()
|
||||
mock_storage.download_file.assert_not_called()
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_cache_miss_transcodes_and_uploads(self, mock_subprocess):
|
||||
"""When cached file is missing, download + transcode + upload."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = False
|
||||
mock_subprocess.run.return_value = Mock(returncode=0, stderr="")
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = service.transcode_if_needed("jobs/abc/input/song.flac")
|
||||
|
||||
assert result == "jobs/abc/review-audio/song.ogg"
|
||||
|
||||
# Verify download from correct source path
|
||||
download_args = mock_storage.download_file.call_args[0]
|
||||
assert download_args[0] == "jobs/abc/input/song.flac"
|
||||
|
||||
# Verify ffmpeg command
|
||||
mock_subprocess.run.assert_called_once()
|
||||
ffmpeg_call = mock_subprocess.run.call_args
|
||||
ffmpeg_cmd = ffmpeg_call[0][0]
|
||||
assert "ffmpeg" in ffmpeg_cmd[0]
|
||||
assert "libopus" in ffmpeg_cmd
|
||||
assert "128k" in ffmpeg_cmd
|
||||
assert "-vn" in ffmpeg_cmd
|
||||
# Verify timeout is set
|
||||
assert ffmpeg_call[1]["timeout"] == 120
|
||||
|
||||
# Verify upload to correct cache path
|
||||
upload_args = mock_storage.upload_file.call_args[0]
|
||||
assert upload_args[1] == "jobs/abc/review-audio/song.ogg"
|
||||
|
||||
|
||||
class TestGetReviewAudioUrl:
|
||||
"""Test get_review_audio_url() with fallback behavior."""
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_returns_transcoded_url_on_success(self, mock_subprocess):
|
||||
"""On success, return signed URL for transcoded file."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
mock_storage.generate_signed_url.return_value = "https://signed-url/song.ogg"
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = service.get_review_audio_url("jobs/abc/input/song.flac")
|
||||
|
||||
assert result == "https://signed-url/song.ogg"
|
||||
mock_storage.generate_signed_url.assert_called_once_with(
|
||||
"jobs/abc/review-audio/song.ogg", 120
|
||||
)
|
||||
|
||||
def test_falls_back_to_flac_on_error(self):
|
||||
"""On transcoding error, fall back to original FLAC signed URL."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = False
|
||||
mock_storage.download_file.side_effect = Exception("GCS download failed")
|
||||
mock_storage.generate_signed_url.return_value = "https://signed-url/song.flac"
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = service.get_review_audio_url("jobs/abc/input/song.flac")
|
||||
|
||||
assert result == "https://signed-url/song.flac"
|
||||
mock_storage.generate_signed_url.assert_called_once_with(
|
||||
"jobs/abc/input/song.flac", 120
|
||||
)
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_custom_expiration_minutes(self, mock_subprocess):
|
||||
"""Custom expiration_minutes is passed through to generate_signed_url."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
mock_storage.generate_signed_url.return_value = "https://signed-url/song.ogg"
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
service.get_review_audio_url("jobs/abc/input/song.flac", expiration_minutes=60)
|
||||
|
||||
mock_storage.generate_signed_url.assert_called_once_with(
|
||||
"jobs/abc/review-audio/song.ogg", 60
|
||||
)
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_falls_back_on_ffmpeg_failure(self, mock_subprocess):
|
||||
"""On ffmpeg failure, fall back to original FLAC signed URL."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = False
|
||||
mock_subprocess.run.return_value = Mock(returncode=1, stderr="codec error")
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = service.get_review_audio_url("jobs/abc/input/song.flac")
|
||||
|
||||
# Should fall back to FLAC URL
|
||||
mock_storage.generate_signed_url.assert_called_once_with(
|
||||
"jobs/abc/input/song.flac", 120
|
||||
)
|
||||
|
||||
|
||||
class TestPrepareReviewAudioForJob:
|
||||
"""Test prepare_review_audio_for_job() bulk transcoding."""
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_transcodes_all_expected_files(self, mock_subprocess):
|
||||
"""Should transcode input + all stems and return correct cache paths."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True # All cache hits
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.job_id = "abc123"
|
||||
mock_job.input_media_gcs_path = "jobs/abc123/input/song.flac"
|
||||
mock_job.file_urls = {
|
||||
"stems": {
|
||||
"instrumental_clean": "jobs/abc123/stems/instrumental_clean.flac",
|
||||
"instrumental_with_backing": "jobs/abc123/stems/instrumental_with_backing.flac",
|
||||
"backing_vocals": "jobs/abc123/stems/backing_vocals.flac",
|
||||
}
|
||||
}
|
||||
|
||||
result = service.prepare_review_audio_for_job(mock_job)
|
||||
|
||||
assert len(result) == 4
|
||||
assert "jobs/abc123/review-audio/song.ogg" in result
|
||||
assert "jobs/abc123/review-audio/instrumental_clean.ogg" in result
|
||||
assert "jobs/abc123/review-audio/instrumental_with_backing.ogg" in result
|
||||
assert "jobs/abc123/review-audio/backing_vocals.ogg" in result
|
||||
assert mock_storage.file_exists.call_count == 4
|
||||
# No ffmpeg calls since all are cache hits
|
||||
mock_subprocess.run.assert_not_called()
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_continues_on_individual_failure(self, mock_subprocess):
|
||||
"""If one file fails to transcode, others should still succeed."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
# First call (input): cache miss + download fails
|
||||
# Subsequent calls: cache hits
|
||||
mock_storage.file_exists.side_effect = [False, True, True, True]
|
||||
mock_storage.download_file.side_effect = Exception("download failed")
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.job_id = "abc123"
|
||||
mock_job.input_media_gcs_path = "jobs/abc123/input/song.flac"
|
||||
mock_job.file_urls = {
|
||||
"stems": {
|
||||
"instrumental_clean": "jobs/abc123/stems/instrumental_clean.flac",
|
||||
"instrumental_with_backing": "jobs/abc123/stems/instrumental_with_backing.flac",
|
||||
"backing_vocals": "jobs/abc123/stems/backing_vocals.flac",
|
||||
}
|
||||
}
|
||||
|
||||
result = service.prepare_review_audio_for_job(mock_job)
|
||||
|
||||
# 3 out of 4 succeeded (the 3 cache hits)
|
||||
assert len(result) == 3
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_handles_missing_stems(self, mock_subprocess):
|
||||
"""Should handle jobs with missing stem paths gracefully."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.job_id = "abc123"
|
||||
mock_job.input_media_gcs_path = "jobs/abc123/input/song.flac"
|
||||
mock_job.file_urls = {"stems": {}} # No stems
|
||||
|
||||
result = service.prepare_review_audio_for_job(mock_job)
|
||||
|
||||
# Only the input audio
|
||||
assert len(result) == 1
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_handles_no_input_audio(self, mock_subprocess):
|
||||
"""Should handle jobs with no input_media_gcs_path."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.job_id = "abc123"
|
||||
mock_job.input_media_gcs_path = None
|
||||
mock_job.file_urls = {
|
||||
"stems": {
|
||||
"instrumental_clean": "jobs/abc123/stems/instrumental_clean.flac",
|
||||
}
|
||||
}
|
||||
|
||||
result = service.prepare_review_audio_for_job(mock_job)
|
||||
|
||||
assert len(result) == 1
|
||||
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
def test_handles_no_stems_key(self, mock_subprocess):
|
||||
"""Should handle jobs where file_urls has no stems key at all."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
mock_job = Mock()
|
||||
mock_job.job_id = "abc123"
|
||||
mock_job.input_media_gcs_path = "jobs/abc123/input/song.flac"
|
||||
mock_job.file_urls = {} # No stems key
|
||||
|
||||
result = service.prepare_review_audio_for_job(mock_job)
|
||||
|
||||
assert len(result) == 1
|
||||
assert result[0] == "jobs/abc123/review-audio/song.ogg"
|
||||
|
||||
|
||||
class TestInit:
|
||||
"""Test AudioTranscodingService initialization."""
|
||||
|
||||
@patch("backend.services.audio_transcoding_service.StorageService")
|
||||
def test_creates_default_storage_service(self, mock_storage_class):
|
||||
"""Creates a StorageService when none is provided."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
service = AudioTranscodingService()
|
||||
|
||||
mock_storage_class.assert_called_once()
|
||||
assert service.storage is mock_storage_class.return_value
|
||||
|
||||
def test_uses_provided_storage_service(self):
|
||||
"""Uses the provided storage service instead of creating one."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
assert service.storage is mock_storage
|
||||
|
||||
|
||||
class TestGetReviewAudioUrlAsync:
|
||||
"""Test async wrapper."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@patch("backend.services.audio_transcoding_service.subprocess")
|
||||
async def test_async_wrapper_delegates(self, mock_subprocess):
|
||||
"""Async wrapper should call sync method via to_thread."""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
mock_storage = Mock()
|
||||
mock_storage.file_exists.return_value = True
|
||||
mock_storage.generate_signed_url.return_value = "https://signed/url"
|
||||
service = AudioTranscodingService(storage_service=mock_storage)
|
||||
|
||||
result = await service.get_review_audio_url_async("jobs/abc/input/song.flac")
|
||||
|
||||
assert result == "https://signed/url"
|
||||
@@ -9,9 +9,7 @@ to avoid dependency issues in CI/CD environments.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import re
|
||||
from pathlib import Path
|
||||
from packaging.version import Version
|
||||
|
||||
|
||||
# Copy the find_file function here to test it in isolation
|
||||
@@ -229,230 +227,3 @@ class TestInstrumentalSelectionRegression:
|
||||
assert result is not None
|
||||
name = result.name.lower()
|
||||
assert "clean" in name, f"Expected clean instrumental but found: {result.name}"
|
||||
|
||||
|
||||
class TestWheelFilenameFiltering:
|
||||
"""Test wheel filename filtering to prevent installation of invalid wheels.
|
||||
|
||||
Bug: The ensure_latest_wheel() function downloads all wheels including
|
||||
karaoke_gen-current.whl, which is not a valid PEP 427 wheel filename
|
||||
(missing version and platform tags). When pip tries to install it,
|
||||
it fails with: "Invalid wheel filename (wrong number of parts)"
|
||||
|
||||
Fix: Filter out wheels containing '-current' before selecting which to install.
|
||||
"""
|
||||
|
||||
def filter_wheels(self, wheels):
|
||||
"""Replicate the filtering logic from ensure_latest_wheel()."""
|
||||
return [w for w in wheels if '-current' not in w]
|
||||
|
||||
def test_filters_out_current_wheel(self):
|
||||
"""Test that karaoke_gen-current.whl is filtered out."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-current.whl",
|
||||
"/tmp/karaoke_gen-0.115.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
filtered = self.filter_wheels(wheels)
|
||||
|
||||
assert len(filtered) == 2
|
||||
assert "/tmp/karaoke_gen-current.whl" not in filtered
|
||||
assert "/tmp/karaoke_gen-0.116.0-py3-none-any.whl" in filtered
|
||||
assert "/tmp/karaoke_gen-0.115.0-py3-none-any.whl" in filtered
|
||||
|
||||
def test_returns_empty_when_only_current_wheel(self):
|
||||
"""Test that filtering returns empty list when only current wheel exists."""
|
||||
wheels = ["/tmp/karaoke_gen-current.whl"]
|
||||
|
||||
filtered = self.filter_wheels(wheels)
|
||||
|
||||
assert filtered == []
|
||||
|
||||
def test_selects_latest_version_after_filtering(self):
|
||||
"""Test that the latest version is selected after filtering out current.
|
||||
|
||||
Note: This test verifies filtering but uses simple sorting.
|
||||
See TestWheelVersionSorting for comprehensive semantic version sorting tests.
|
||||
"""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.114.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-current.whl",
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.115.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
filtered = self.filter_wheels(wheels)
|
||||
|
||||
# Verify current wheel was filtered out
|
||||
assert len(filtered) == 3
|
||||
assert all("-current" not in w for w in filtered)
|
||||
|
||||
def test_no_filtering_when_no_current_wheel(self):
|
||||
"""Test that valid wheels pass through when no current wheel exists."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.115.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
filtered = self.filter_wheels(wheels)
|
||||
|
||||
assert len(filtered) == 2
|
||||
assert filtered == wheels
|
||||
|
||||
def test_filters_current_in_different_paths(self):
|
||||
"""Test that current wheel is filtered regardless of path."""
|
||||
wheels = [
|
||||
"/different/path/karaoke_gen-current.whl",
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
filtered = self.filter_wheels(wheels)
|
||||
|
||||
assert len(filtered) == 1
|
||||
assert "/tmp/karaoke_gen-0.116.0-py3-none-any.whl" in filtered
|
||||
|
||||
|
||||
class TestWheelVersionSorting:
|
||||
"""Test semantic version sorting for wheel selection.
|
||||
|
||||
Bug: The ensure_latest_wheel() function uses sorted(wheels)[-1] which does
|
||||
alphabetical sorting, not semantic version sorting. This causes version 0.99.9
|
||||
to be selected over 0.116.1 because string comparison puts '9' > '1'.
|
||||
|
||||
Fix: Extract version from filename using regex and sort by packaging.version.Version
|
||||
"""
|
||||
|
||||
def extract_version(self, wheel_path):
|
||||
"""Replicate the version extraction logic from ensure_latest_wheel()."""
|
||||
match = re.search(r'karaoke_gen-([0-9.]+)-', wheel_path)
|
||||
if match:
|
||||
return Version(match.group(1))
|
||||
return Version("0.0.0") # Fallback for unparseable filenames
|
||||
|
||||
def select_latest_wheel(self, wheels):
|
||||
"""Replicate the full selection logic from ensure_latest_wheel()."""
|
||||
# Filter out -current wheels
|
||||
filtered = [w for w in wheels if '-current' not in w]
|
||||
if not filtered:
|
||||
return None
|
||||
# Sort by semantic version
|
||||
filtered.sort(key=self.extract_version, reverse=True)
|
||||
return filtered[0]
|
||||
|
||||
def test_semantic_version_sorting_regression(self):
|
||||
"""Test the exact bug: 0.99.9 should NOT be selected over 0.116.1"""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.99.9-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.1-py3-none-any.whl",
|
||||
]
|
||||
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
|
||||
# Semantic version: 0.116.1 > 0.99.9
|
||||
assert "0.116.1" in latest
|
||||
assert "0.99.9" not in latest
|
||||
|
||||
def test_alphabetical_would_fail(self):
|
||||
"""Demonstrate that alphabetical sorting gives wrong result."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.99.9-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.1-py3-none-any.whl",
|
||||
]
|
||||
|
||||
# This is the OLD buggy behavior (alphabetical)
|
||||
alphabetical_latest = sorted(wheels)[-1]
|
||||
|
||||
# Alphabetical puts 0.99.9 last (WRONG!)
|
||||
assert "0.99.9" in alphabetical_latest
|
||||
|
||||
def test_version_extraction(self):
|
||||
"""Test that version is correctly extracted from wheel filename."""
|
||||
test_cases = [
|
||||
("/tmp/karaoke_gen-0.116.1-py3-none-any.whl", "0.116.1"),
|
||||
("/tmp/karaoke_gen-0.99.9-py3-none-any.whl", "0.99.9"),
|
||||
("/tmp/karaoke_gen-1.0.0-py3-none-any.whl", "1.0.0"),
|
||||
("/tmp/karaoke_gen-0.1.2-py3-none-any.whl", "0.1.2"),
|
||||
]
|
||||
|
||||
for wheel_path, expected_version in test_cases:
|
||||
version = self.extract_version(wheel_path)
|
||||
assert str(version) == expected_version
|
||||
|
||||
def test_version_extraction_fallback(self):
|
||||
"""Test that unparseable filenames get fallback version."""
|
||||
invalid_wheels = [
|
||||
"/tmp/karaoke_gen-current.whl",
|
||||
"/tmp/karaoke_gen-latest.whl",
|
||||
"/tmp/invalid-filename.whl",
|
||||
]
|
||||
|
||||
for wheel in invalid_wheels:
|
||||
version = self.extract_version(wheel)
|
||||
assert version == Version("0.0.0")
|
||||
|
||||
def test_complex_version_sorting(self):
|
||||
"""Test sorting with multiple versions including patch, minor, major."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.99.9-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.1-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-1.0.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.115.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.1.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
|
||||
# 1.0.0 is the highest version
|
||||
assert "1.0.0" in latest
|
||||
|
||||
def test_version_sorting_with_current_wheel(self):
|
||||
"""Test that current wheel is filtered before version sorting."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.99.9-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-current.whl",
|
||||
"/tmp/karaoke_gen-0.116.1-py3-none-any.whl",
|
||||
]
|
||||
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
|
||||
# Current is filtered out, 0.116.1 is selected
|
||||
assert "0.116.1" in latest
|
||||
assert "current" not in latest
|
||||
|
||||
def test_patch_version_comparison(self):
|
||||
"""Test that patch versions are compared correctly."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.1-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.2-py3-none-any.whl",
|
||||
]
|
||||
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
|
||||
assert "0.116.2" in latest
|
||||
|
||||
def test_minor_version_comparison(self):
|
||||
"""Test that minor versions are compared correctly."""
|
||||
wheels = [
|
||||
"/tmp/karaoke_gen-0.115.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.116.0-py3-none-any.whl",
|
||||
"/tmp/karaoke_gen-0.200.0-py3-none-any.whl",
|
||||
]
|
||||
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
|
||||
assert "0.200.0" in latest
|
||||
|
||||
def test_empty_wheels_list(self):
|
||||
"""Test that empty list returns None."""
|
||||
wheels = []
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
assert latest is None
|
||||
|
||||
def test_only_current_wheel_returns_none(self):
|
||||
"""Test that list with only current wheel returns None."""
|
||||
wheels = ["/tmp/karaoke_gen-current.whl"]
|
||||
latest = self.select_latest_wheel(wheels)
|
||||
assert latest is None
|
||||
@@ -381,7 +381,7 @@ class TestAudioSearchCacheIndependence:
|
||||
|
||||
def test_download_code_uses_youtube_download_service(self):
|
||||
"""
|
||||
Verify that _download_audio_and_trigger_workers uses YouTubeDownloadService.
|
||||
Verify that _download_and_start_processing uses YouTubeDownloadService.
|
||||
|
||||
After the consolidation refactor (2025-01), all YouTube downloads go through
|
||||
YouTubeDownloadService instead of using download_from_url directly. This
|
||||
@@ -390,14 +390,14 @@ class TestAudioSearchCacheIndependence:
|
||||
from backend.api.routes import audio_search
|
||||
import inspect
|
||||
|
||||
# Get the source of _download_audio_and_trigger_workers
|
||||
source = inspect.getsource(audio_search._download_audio_and_trigger_workers)
|
||||
# Get the source of _download_and_start_processing
|
||||
source = inspect.getsource(audio_search._download_and_start_processing)
|
||||
|
||||
# Verify YouTubeDownloadService is used for YouTube
|
||||
assert "source_name == 'YouTube'" in source, \
|
||||
"_download_audio_and_trigger_workers must check for YouTube source"
|
||||
"_download_and_start_processing must check for YouTube source"
|
||||
assert 'youtube_service' in source or 'get_youtube_download_service' in source, \
|
||||
"_download_audio_and_trigger_workers must use YouTubeDownloadService for YouTube"
|
||||
"_download_and_start_processing must use YouTubeDownloadService for YouTube"
|
||||
|
||||
def test_youtube_download_service_import_exists(self):
|
||||
"""
|
||||
|
||||
@@ -374,168 +374,6 @@ class TestCompleteReviewWithInstrumentalSelection:
|
||||
assert selection in ['clean', 'with_backing', 'custom']
|
||||
|
||||
|
||||
class TestSummaryEndpoint:
|
||||
"""Tests for the fields=summary query parameter on list_jobs.
|
||||
|
||||
When fields=summary, the endpoint uses Firestore field projection and
|
||||
returns pruned dicts instead of full Job models. This dramatically
|
||||
reduces payload size for the dashboard polling use case.
|
||||
"""
|
||||
|
||||
def test_prune_state_data_keeps_allowed_keys(self):
|
||||
"""Verify _prune_state_data keeps only dashboard-required keys."""
|
||||
from backend.api.routes.jobs import _prune_state_data
|
||||
|
||||
data = {
|
||||
'state_data': {
|
||||
'brand_code': 'NKP',
|
||||
'youtube_url': 'https://youtu.be/abc',
|
||||
'audio_progress': {'stage': 'separating'},
|
||||
'lyrics_progress': {'stage': 'transcribing'},
|
||||
'audio_complete': True,
|
||||
'lyrics_complete': True,
|
||||
'backing_vocals_analysis': {'recommended_selection': 'clean'},
|
||||
'dropbox_link': 'https://dropbox.com/s/...',
|
||||
# These should be stripped
|
||||
'corrected_lyrics': {'lines': [1, 2, 3]},
|
||||
'render_progress': {'stage': 'done'},
|
||||
'blocking_state_entered_at': '2026-01-01',
|
||||
}
|
||||
}
|
||||
|
||||
result = _prune_state_data(data)
|
||||
sd = result['state_data']
|
||||
assert 'brand_code' in sd
|
||||
assert 'youtube_url' in sd
|
||||
assert 'audio_progress' in sd
|
||||
assert 'lyrics_progress' in sd
|
||||
assert 'audio_complete' in sd
|
||||
assert 'lyrics_complete' in sd
|
||||
assert 'backing_vocals_analysis' in sd
|
||||
assert 'dropbox_link' in sd
|
||||
# Stripped keys
|
||||
assert 'corrected_lyrics' not in sd
|
||||
assert 'render_progress' not in sd
|
||||
assert 'blocking_state_entered_at' not in sd
|
||||
|
||||
def test_prune_state_data_handles_missing(self):
|
||||
"""Verify _prune_state_data is safe when state_data is absent."""
|
||||
from backend.api.routes.jobs import _prune_state_data
|
||||
|
||||
assert _prune_state_data({}) == {}
|
||||
assert _prune_state_data({'state_data': None}) == {'state_data': None}
|
||||
|
||||
def test_prune_file_urls_keeps_allowed_keys(self):
|
||||
"""Verify _prune_file_urls keeps only dashboard-required keys."""
|
||||
from backend.api.routes.jobs import _prune_file_urls
|
||||
|
||||
data = {
|
||||
'file_urls': {
|
||||
'finals': {'lossless_4k_mp4': 'gs://bucket/finals/4k.mp4'},
|
||||
'videos': {'with_vocals': 'gs://bucket/videos/wv.mkv'},
|
||||
'packages': {'cdg_zip': 'gs://bucket/packages/cdg.zip'},
|
||||
# These should be stripped
|
||||
'stems': {'clean': 'gs://bucket/stems/clean.flac'},
|
||||
'lyrics': {'corrections': 'gs://bucket/lyrics/c.json'},
|
||||
'screens': {'title': 'gs://bucket/screens/title.mov'},
|
||||
}
|
||||
}
|
||||
|
||||
result = _prune_file_urls(data)
|
||||
fu = result['file_urls']
|
||||
assert 'finals' in fu
|
||||
assert 'videos' in fu
|
||||
assert 'packages' in fu
|
||||
assert 'stems' not in fu
|
||||
assert 'lyrics' not in fu
|
||||
assert 'screens' not in fu
|
||||
|
||||
def test_prune_file_urls_handles_missing(self):
|
||||
"""Verify _prune_file_urls is safe when file_urls is absent."""
|
||||
from backend.api.routes.jobs import _prune_file_urls
|
||||
|
||||
assert _prune_file_urls({}) == {}
|
||||
assert _prune_file_urls({'file_urls': None}) == {'file_urls': None}
|
||||
|
||||
def test_summary_returns_only_expected_fields(self):
|
||||
"""Verify a pruned summary dict only contains dashboard fields."""
|
||||
from backend.api.routes.jobs import _prune_state_data, _prune_file_urls
|
||||
|
||||
raw = {
|
||||
'job_id': 'abc123',
|
||||
'status': 'pending',
|
||||
'progress': 0,
|
||||
'created_at': '2026-01-01T00:00:00',
|
||||
'artist': 'Test',
|
||||
'title': 'Song',
|
||||
'error_message': None,
|
||||
'non_interactive': False,
|
||||
'outputs_deleted_at': None,
|
||||
'user_email': 'test@example.com',
|
||||
'state_data': {
|
||||
'brand_code': 'NKP',
|
||||
'corrected_lyrics': 'should be removed',
|
||||
},
|
||||
'file_urls': {
|
||||
'finals': {'lossless_4k_mp4': 'gs://...'},
|
||||
'stems': {'clean': 'gs://...'},
|
||||
},
|
||||
}
|
||||
|
||||
result = _prune_file_urls(_prune_state_data(raw))
|
||||
|
||||
# state_data should only have brand_code
|
||||
assert list(result['state_data'].keys()) == ['brand_code']
|
||||
# file_urls should only have finals
|
||||
assert list(result['file_urls'].keys()) == ['finals']
|
||||
|
||||
def test_hide_completed_statuses(self):
|
||||
"""Verify _HIDE_COMPLETED_STATUSES includes the expected terminal statuses."""
|
||||
from backend.api.routes.jobs import _HIDE_COMPLETED_STATUSES
|
||||
|
||||
assert 'complete' in _HIDE_COMPLETED_STATUSES
|
||||
assert 'prep_complete' in _HIDE_COMPLETED_STATUSES
|
||||
assert 'failed' in _HIDE_COMPLETED_STATUSES
|
||||
assert 'cancelled' in _HIDE_COMPLETED_STATUSES
|
||||
# Active statuses should NOT be in the list
|
||||
assert 'pending' not in _HIDE_COMPLETED_STATUSES
|
||||
assert 'downloading' not in _HIDE_COMPLETED_STATUSES
|
||||
|
||||
def test_exclude_test_works_with_summary_dicts(self):
|
||||
"""Verify test email filtering works on raw dicts (not Job models)."""
|
||||
from backend.utils.test_data import is_test_email
|
||||
|
||||
# Summary mode returns dicts, so exclude_test filters using dict access
|
||||
job_dicts = [
|
||||
{'job_id': '1', 'user_email': 'real@example.com'},
|
||||
{'job_id': '2', 'user_email': 'test@inbox.testmail.app'},
|
||||
{'job_id': '3', 'user_email': None},
|
||||
]
|
||||
|
||||
filtered = [j for j in job_dicts if not is_test_email(j.get('user_email') or "")]
|
||||
assert len(filtered) == 2
|
||||
assert filtered[0]['job_id'] == '1'
|
||||
assert filtered[1]['job_id'] == '3'
|
||||
|
||||
def test_full_response_unchanged_without_fields_param(self):
|
||||
"""Verify the endpoint returns full Job models when fields is not set.
|
||||
|
||||
This is a backward-compatibility test: the admin jobs page (adminApi.listAllJobs)
|
||||
does NOT send fields=summary, so it must continue receiving full Job objects.
|
||||
"""
|
||||
# When fields is None, the route falls through to the full Job path.
|
||||
# We verify this by checking that the route accepts fields=None gracefully.
|
||||
# (The actual HTTP test would require a TestClient, so here we verify
|
||||
# the route function signature accepts None.)
|
||||
import inspect
|
||||
from backend.api.routes.jobs import list_jobs
|
||||
|
||||
sig = inspect.signature(list_jobs)
|
||||
fields_param = sig.parameters.get('fields')
|
||||
assert fields_param is not None
|
||||
assert fields_param.default is None # Default should be None (full mode)
|
||||
|
||||
|
||||
class TestScreensWorkerBackingVocalsAnalysis:
|
||||
"""Tests documenting that backing vocals analysis now runs in screens_worker.
|
||||
|
||||
|
||||
@@ -184,12 +184,7 @@ class TestWorkerService:
|
||||
mock_run_v2.RunJobRequest.Overrides = MagicMock()
|
||||
mock_run_v2.RunJobRequest.Overrides.ContainerOverride = MagicMock()
|
||||
|
||||
# Patch both sys.modules and the parent package attribute to ensure
|
||||
# 'from google.cloud import run_v2' resolves to our mock regardless
|
||||
# of whether the real package is installed (namespace package resolution)
|
||||
import google.cloud
|
||||
with patch.dict('sys.modules', {'google.cloud.run_v2': mock_run_v2}), \
|
||||
patch.object(google.cloud, 'run_v2', mock_run_v2, create=True):
|
||||
with patch.dict('sys.modules', {'google.cloud.run_v2': mock_run_v2}):
|
||||
service = WorkerService()
|
||||
result = await service.trigger_audio_worker("test123")
|
||||
|
||||
@@ -227,12 +222,7 @@ class TestWorkerService:
|
||||
mock_run_v2.RunJobRequest.Overrides = MagicMock()
|
||||
mock_run_v2.RunJobRequest.Overrides.ContainerOverride = MagicMock()
|
||||
|
||||
# Patch both sys.modules and the parent package attribute to ensure
|
||||
# 'from google.cloud import run_v2' resolves to our mock regardless
|
||||
# of whether the real package is installed (namespace package resolution)
|
||||
import google.cloud
|
||||
with patch.dict('sys.modules', {'google.cloud.run_v2': mock_run_v2}), \
|
||||
patch.object(google.cloud, 'run_v2', mock_run_v2, create=True):
|
||||
with patch.dict('sys.modules', {'google.cloud.run_v2': mock_run_v2}):
|
||||
service = WorkerService()
|
||||
result = await service.trigger_lyrics_worker("test123")
|
||||
|
||||
|
||||
@@ -184,12 +184,6 @@ async def generate_screens(job_id: str) -> bool:
|
||||
job_log.info("Analyzing backing vocals for instrumental selection...")
|
||||
await _analyze_backing_vocals(job_id, job_manager, storage, job_log)
|
||||
|
||||
# Transcode review audio to OGG Opus for fast browser playback
|
||||
# This runs BEFORE review so all files are cached when the user opens the UI
|
||||
with job_span("transcode-review-audio", job_id):
|
||||
job_log.info("Transcoding review audio to OGG Opus...")
|
||||
await _transcode_review_audio(job_id, job_manager, job_log)
|
||||
|
||||
# Transition to AWAITING_REVIEW (combined lyrics + instrumental review)
|
||||
# Human must review lyrics AND select instrumental before video can be rendered
|
||||
logger.info(f"[job:{job_id}] Screens generated, awaiting combined review")
|
||||
@@ -621,37 +615,6 @@ async def _analyze_backing_vocals(
|
||||
})
|
||||
|
||||
|
||||
async def _transcode_review_audio(
|
||||
job_id: str,
|
||||
job_manager: JobManager,
|
||||
job_log: logging.Logger,
|
||||
) -> None:
|
||||
"""
|
||||
Transcode all review audio files to OGG Opus for fast browser playback.
|
||||
|
||||
This eagerly transcodes input audio + stems so the review UI serves
|
||||
~3 MB OGG files instead of 35+ MB FLACs. Non-fatal: if transcoding
|
||||
fails, the review UI falls back to original FLAC signed URLs.
|
||||
"""
|
||||
from backend.services.audio_transcoding_service import AudioTranscodingService
|
||||
|
||||
try:
|
||||
job = job_manager.get_job(job_id)
|
||||
if not job:
|
||||
job_log.warning(f"Could not get job {job_id} for review audio transcoding")
|
||||
return
|
||||
|
||||
transcoding = AudioTranscodingService()
|
||||
transcoded = transcoding.prepare_review_audio_for_job(job)
|
||||
|
||||
job_log.info(f"Review audio transcoding complete: {len(transcoded)} files")
|
||||
|
||||
except Exception as e:
|
||||
# Non-fatal: review UI will fall back to FLAC signed URLs
|
||||
job_log.warning(f"Review audio transcoding failed (non-fatal): {e}")
|
||||
logger.warning(f"Job {job_id}: Review audio transcoding failed: {e}")
|
||||
|
||||
|
||||
async def _apply_countdown_padding_if_needed(
|
||||
job_id: str,
|
||||
job_manager: JobManager,
|
||||
|
||||
+1
-28
@@ -100,15 +100,12 @@ GET /api/jobs
|
||||
GET /api/jobs?status=complete
|
||||
GET /api/jobs?limit=10&offset=0
|
||||
GET /api/jobs?exclude_test=false
|
||||
GET /api/jobs?fields=summary&hide_completed=true
|
||||
```
|
||||
|
||||
Query parameters:
|
||||
- `exclude_test` (bool, default: true) - Admin only: filter out jobs from test users
|
||||
- `status` - Filter by job status
|
||||
- `limit` / `offset` - Pagination
|
||||
- `fields` (string, optional) - Set to `summary` to return only dashboard-required fields using Firestore field projection. Reduces payload from ~16MB to <500KB for large job lists.
|
||||
- `hide_completed` (bool, default: false) - Exclude terminal statuses (complete, prep_complete, failed, cancelled) server-side
|
||||
|
||||
#### Delete Job
|
||||
|
||||
@@ -169,7 +166,7 @@ Generates preview video during review. The `use_background_image` option control
|
||||
GET /api/review/{job_id}/audio/{stem_type}
|
||||
```
|
||||
|
||||
Redirects to a signed GCS URL for review playback. Audio is served as OGG Opus (~3 MB) transcoded from the original FLAC (~35 MB). Transcoding happens eagerly during screen generation; if the transcoded file is missing, falls back to the original FLAC.
|
||||
Streams audio for review playback.
|
||||
|
||||
### Instrumental Selection (Finalise-Only Jobs)
|
||||
|
||||
@@ -993,30 +990,6 @@ Response:
|
||||
|
||||
Screen generation takes 30-60 seconds. Monitor progress via job timeline or logs.
|
||||
|
||||
#### Prepare Review Audio
|
||||
|
||||
```http
|
||||
POST /api/admin/jobs/{job_id}/prepare-review-audio
|
||||
Authorization: Bearer ADMIN_TOKEN
|
||||
```
|
||||
|
||||
Transcodes all review audio files (input + stems) to OGG Opus 128kbps for fast browser playback. Idempotent — skips files already transcoded.
|
||||
|
||||
Use this to backfill existing jobs created before eager transcoding was deployed, or to re-transcode after stems are regenerated.
|
||||
|
||||
Response:
|
||||
```json
|
||||
{
|
||||
"status": "success",
|
||||
"job_id": "abc123",
|
||||
"transcoded_files": [
|
||||
"jobs/abc123/review-audio/song.ogg",
|
||||
"jobs/abc123/review-audio/instrumental_clean.ogg"
|
||||
],
|
||||
"message": "Transcoded 2 files to OGG Opus"
|
||||
}
|
||||
```
|
||||
|
||||
#### Restart Job
|
||||
|
||||
```http
|
||||
|
||||
@@ -55,11 +55,10 @@
|
||||
└────────┬────────┘ └────────┬────────┘
|
||||
└──────────┬───────────┘
|
||||
▼
|
||||
3. SCREENS GENERATION + BACKING VOCALS ANALYSIS + AUDIO TRANSCODING
|
||||
3. SCREENS GENERATION + BACKING VOCALS ANALYSIS
|
||||
• Title screen (5s video)
|
||||
• End screen (5s video)
|
||||
• Analyze backing vocals track (for instrumental selection)
|
||||
• Transcode audio to OGG Opus for review UI (~3 MB vs 35 MB FLAC)
|
||||
▼
|
||||
4. COMBINED HUMAN REVIEW (AWAITING_REVIEW)
|
||||
• React UI for lyrics correction
|
||||
@@ -229,7 +228,6 @@ The Video Worker uses an orchestrator pattern to ensure all features work regard
|
||||
| `email_service.py` | SendGrid email delivery with CC support |
|
||||
| `template_service.py` | GCS-backed email templates |
|
||||
| `job_notification_service.py` | Email orchestration (completion, reminders) |
|
||||
| `audio_transcoding_service.py` | Transcode FLAC → OGG Opus for review UI playback |
|
||||
|
||||
## Audio Source Download Flow
|
||||
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
# GCP Cost Optimization Analysis
|
||||
|
||||
**Date:** February 10, 2026
|
||||
**Current Spend:** ~$6,000/month (~$200/day)
|
||||
**Target:** Sustainable burn rate
|
||||
|
||||
## Executive Summary
|
||||
|
||||
Analyzed GCP billing data and identified $1,440+/month in immediate savings through GitHub runner auto-scaling (implemented). Additional opportunities identified for Cloud Run optimization (~$3,200/month potential savings).
|
||||
|
||||
## Cost Breakdown (Before Optimization)
|
||||
|
||||
| Service | Monthly Cost | % of Total | Notes |
|
||||
|---------|--------------|------------|-------|
|
||||
| **Cloud Run (karaoke-backend)** | ~$3,200 | 53% | concurrency=1, 4 min instances, 8 CPU, 16GB RAM |
|
||||
| **GitHub Actions Runners** | ~$1,440 | 24% | 20 VMs running 24/7 |
|
||||
| **GCE Encoding Worker** | ~$700 | 12% | c4d-highcpu-32 running 24/7 |
|
||||
| **Cloud Storage** | ~$400 | 7% | 2.3TB storage |
|
||||
| **Artifact Registry** | ~$78 | 1% | 390GB Docker images |
|
||||
| **Other Services** | ~$182 | 3% | NAT, Load Balancers, etc. |
|
||||
| **Total** | **~$6,000** | 100% | |
|
||||
|
||||
## Implemented Optimizations
|
||||
|
||||
### ✅ GitHub Actions Runners Auto-Scaling
|
||||
|
||||
**Status:** Deployed and operational (February 10, 2026)
|
||||
|
||||
**Changes Made:**
|
||||
- Reduced from 20 VMs to 3 Spot/Preemptible instances
|
||||
- Implemented auto-start on CI job queue (via GitHub webhook)
|
||||
- Implemented auto-stop after 1 hour idle (via Cloud Scheduler)
|
||||
- Removed external IPs (using Cloud NAT instead)
|
||||
|
||||
**Cost Impact:**
|
||||
- **Before:** 20 VMs × $72/month = $1,440/month
|
||||
- **After:** 3 Spot VMs × $25/month × ~20% utilization = $50-100/month
|
||||
- **Savings:** ~$1,340-1,390/month (93% reduction)
|
||||
|
||||
**Implementation:**
|
||||
- PRs: [#376](https://github.com/nomadkaraoke/karaoke-gen/pull/376), [#383](https://github.com/nomadkaraoke/karaoke-gen/pull/383), [#385](https://github.com/nomadkaraoke/karaoke-gen/pull/385)
|
||||
- Infrastructure: `infrastructure/modules/runner_manager.py`, `infrastructure/compute/github_runners.py`
|
||||
- Webhook: Configured at org level for all repos
|
||||
- Monitoring: Cloud Function logs, Cloud Scheduler jobs
|
||||
|
||||
**Technical Details:**
|
||||
```
|
||||
Function: github-runner-manager
|
||||
Memory: 512M
|
||||
Idle Timeout: 1 hour
|
||||
Check Frequency: Every 15 minutes
|
||||
Webhook URL: https://us-central1-nomadkaraoke.cloudfunctions.net/github-runner-manager
|
||||
```
|
||||
|
||||
## Pending Optimization Opportunities
|
||||
|
||||
### 🔍 Cloud Run Configuration (High Priority)
|
||||
|
||||
**Current Issue:**
|
||||
- `concurrency=1` forces one request per instance
|
||||
- `min-instances=4` keeps 4 instances always running
|
||||
- High CPU/RAM allocation (8 CPU, 16GB) per instance
|
||||
|
||||
**Analysis Required:**
|
||||
The `concurrency=1` setting may have been added deliberately for performance reasons. Investigation needed to determine:
|
||||
1. Why was `concurrency=1` set? (performance issue, or unnecessary?)
|
||||
2. Does `render_video_worker` run FFmpeg locally in Cloud Run? (CPU-intensive)
|
||||
3. Can we increase concurrency without causing OOM or CPU contention?
|
||||
|
||||
**Potential Savings:** ~$2,400-3,000/month (if we can increase concurrency and reduce min-instances)
|
||||
|
||||
**Next Steps:**
|
||||
1. Review git history for when `concurrency=1` was added and why
|
||||
2. Profile render_video_worker memory/CPU usage during FFmpeg operations
|
||||
3. Test with `concurrency=2-4` in staging environment
|
||||
4. Monitor for OOM errors or performance degradation
|
||||
|
||||
### 🔍 GCE Encoding Worker
|
||||
|
||||
**Current State:**
|
||||
- c4d-highcpu-32 VM running 24/7
|
||||
- Cost: ~$700/month
|
||||
|
||||
**Opportunities:**
|
||||
1. **Spot Instance:** Could save 60-91% (~$420-630/month savings)
|
||||
- Risk: May be preempted during video encoding jobs
|
||||
- Mitigation: Implement job restart logic
|
||||
2. **Auto-scaling:** Start/stop based on video queue depth
|
||||
- Could scale to zero when no jobs queued
|
||||
- Startup time: ~2-3 minutes (acceptable for async processing)
|
||||
|
||||
**Recommendation:** Test Spot instance first (lower risk), then consider auto-scaling
|
||||
|
||||
### 🔧 Artifact Registry Cleanup (Quick Win)
|
||||
|
||||
**Current State:**
|
||||
- 390GB of Docker images
|
||||
- Cost: ~$78/month
|
||||
- Many old images likely unused
|
||||
|
||||
**Action Items:**
|
||||
```bash
|
||||
# List images and their sizes
|
||||
gcloud artifacts docker images list \
|
||||
us-central1-docker.pkg.dev/nomadkaraoke/karaoke-repo/karaoke-backend \
|
||||
--include-tags --format="table(package,version,create_time,size)"
|
||||
|
||||
# Set lifecycle policy to delete images older than 30 days (keep 10 most recent)
|
||||
gcloud artifacts repositories update karaoke-repo \
|
||||
--location=us-central1 \
|
||||
--cleanup-policy-dry-run \
|
||||
--cleanup-policies='tagState=tagged,olderThan=30d,keep=10'
|
||||
```
|
||||
|
||||
**Potential Savings:** ~$40-60/month
|
||||
|
||||
### 🔧 Billing Alerts (Risk Management)
|
||||
|
||||
**Status:** No billing alerts configured
|
||||
|
||||
**Recommendation:** Set up budget alerts
|
||||
```bash
|
||||
# Alert at 50%, 80%, 100% of $5,000/month budget
|
||||
gcloud billing budgets create \
|
||||
--billing-account=BILLING_ACCOUNT_ID \
|
||||
--display-name="Monthly Budget Alert" \
|
||||
--budget-amount=5000 \
|
||||
--threshold-rule=percent=50 \
|
||||
--threshold-rule=percent=80 \
|
||||
--threshold-rule=percent=100
|
||||
```
|
||||
|
||||
## Summary
|
||||
|
||||
### Immediate Results (Implemented)
|
||||
- **$1,390/month saved** through GitHub runner auto-scaling
|
||||
- **New monthly spend:** ~$4,600/month (24% reduction)
|
||||
|
||||
### Potential Additional Savings
|
||||
- Cloud Run optimization: $2,400-3,000/month (requires investigation)
|
||||
- Encoding Worker Spot: $420-630/month (moderate risk)
|
||||
- Artifact Registry cleanup: $40-60/month (quick win)
|
||||
- **Total potential:** $2,860-3,690/month additional savings
|
||||
|
||||
### Target State
|
||||
If all optimizations implemented:
|
||||
- **Current:** $6,000/month
|
||||
- **After runner optimization:** $4,600/month
|
||||
- **After all optimizations:** $1,200-1,800/month
|
||||
- **Total reduction:** 70-80%
|
||||
|
||||
## References
|
||||
|
||||
- [GCP Pricing Calculator](https://cloud.google.com/products/calculator)
|
||||
- [Cloud Run Pricing](https://cloud.google.com/run/pricing)
|
||||
- [Spot VM Pricing](https://cloud.google.com/compute/docs/instances/spot)
|
||||
- [GitHub Self-Hosted Runners](https://docs.github.com/en/actions/hosting-your-own-runners)
|
||||
|
||||
## Change Log
|
||||
|
||||
- **2026-02-10:** Initial analysis and GitHub runner optimization implemented
|
||||
- **2026-02-10:** Runners reduced from 20 → 3 with auto-scaling, saving $1,390/month
|
||||
@@ -98,47 +98,6 @@ await run_video_worker(job_id, job_manager, storage)
|
||||
### Worker Idempotency Must Complete the Lifecycle
|
||||
When implementing idempotency checks that set `stage='running'` at start, workers MUST also set `stage='complete'` on success. Without the completion update, retries or reprocessing attempts will be blocked because the stage is permanently stuck at `'running'`. The fix in v0.108.14 added completion markers to render_video, video, and screens workers.
|
||||
|
||||
### pip Wheel Filename Validation (Feb 2026)
|
||||
**What happened**: Job 749141f8 failed with "Cannot connect to host 136.119.50.148:8080" during encoding. Investigation revealed the GCE encoding worker service had crashed and was restarting. The crash was caused by pip rejecting `karaoke_gen-current.whl` with "Invalid wheel filename (wrong number of parts)".
|
||||
|
||||
**Root cause**: The `ensure_latest_wheel()` function in `backend/services/gce_encoding/main.py` downloaded all wheels from GCS using a wildcard pattern (`karaoke_gen-*.whl`), which included `karaoke_gen-current.whl`. This file is a convenience symlink/copy for CI deployment but lacks the version and platform tags required by PEP 427 wheel naming standard (`{distribution}-{version}-{python}-{abi}-{platform}.whl`). When pip tried to install it, it failed, causing the worker to crash.
|
||||
|
||||
**Why it was confusing**: The actual error ("Cannot connect") masked the real problem (wheel installation failure). The service was healthy but kept restarting due to the pip error, making it temporarily unavailable when Cloud Run tried to connect.
|
||||
|
||||
**Fix**: Filter out wheels containing '-current' before selecting which to install:
|
||||
```python
|
||||
wheels = glob.glob("/tmp/karaoke_gen-*.whl")
|
||||
# Filter out karaoke_gen-current.whl (not a valid PEP 427 wheel name)
|
||||
wheels = [w for w in wheels if '-current' not in w]
|
||||
```
|
||||
|
||||
**Pattern**: When downloading artifacts with wildcards, filter results to exclude non-standard naming patterns before processing. CI convenience files (symlinks, "latest", "current") often don't follow the same naming conventions as versioned releases. Always validate artifact names match expected patterns before attempting to use them.
|
||||
|
||||
### Semantic Version Sorting (Feb 2026)
|
||||
**What happened**: PR #384 fixed the invalid wheel filename crash but exposed a version sorting bug. Production encoder started showing "Encoder: v0.99.9" instead of the latest v0.116.1. The GCE encoding worker was running an extremely old version from months ago.
|
||||
|
||||
**Root cause**: After filtering out invalid wheels, the code used `sorted(wheels)[-1]` to select the "latest" wheel. This does **alphabetical sorting**, not semantic version sorting. String comparison puts "karaoke_gen-0.99.9-..." AFTER "karaoke_gen-0.116.1-..." because '9' > '1' in the second character position.
|
||||
|
||||
**Why it's tricky**: For some version ranges, alphabetical sorting happens to work correctly (0.100.0 > 0.99.0), but fails for others (0.99.9 > 0.116.1). This makes the bug intermittent and hard to notice until a specific version combination triggers it.
|
||||
|
||||
**Fix**: Extract version numbers from filenames and sort using `packaging.version.Version`:
|
||||
```python
|
||||
from packaging.version import Version
|
||||
import re
|
||||
|
||||
def extract_version(wheel_path):
|
||||
"""Extract version from wheel filename like karaoke_gen-0.116.1-py3-none-any.whl"""
|
||||
match = re.search(r'karaoke_gen-([0-9.]+)-', wheel_path)
|
||||
if match:
|
||||
return Version(match.group(1))
|
||||
return Version("0.0.0") # Fallback for unparseable filenames
|
||||
|
||||
wheels.sort(key=extract_version, reverse=True)
|
||||
latest_wheel = wheels[0]
|
||||
```
|
||||
|
||||
**Pattern**: When selecting "latest" from a list of versioned artifacts (wheels, releases, tags), always use semantic version comparison, not string/alphabetical sorting. The `packaging` library is part of Python's standard packaging infrastructure and handles all semantic versioning edge cases (major.minor.patch, pre-releases, etc.). String sorting only works accidentally for some version ranges.
|
||||
|
||||
### Clear Worker Progress Keys When Reprocessing
|
||||
When resetting a job or re-reviewing a completed job, all worker progress keys (`*_progress`) must be cleared from `state_data`. Workers check `state_data.{worker}_progress.stage == 'complete'` for idempotency - if stale keys exist from a previous run, workers will skip execution even though the job needs reprocessing. **Pattern**: Any operation that intends to re-run workers (admin reset, review resubmission) must explicitly clear progress keys using `job_manager.delete_state_data_keys()`. See `backend/api/routes/review.py:complete_review()` and `backend/api/routes/admin.py:clear_worker_state()`.
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
|
||||
## Recent Changes
|
||||
|
||||
- **GCE Encoding Worker Version Sorting Fix** (2026-02-11): Fixed critical regression from PR #384 where alphabetical sorting caused encoder to use v0.99.9 instead of v0.116.1. **Root cause**: `sorted(wheels)[-1]` uses string comparison, not semantic versioning. String comparison puts "0.99.9" > "0.116.1" (because '9' > '1' in second position). **Impact**: Production encoder was running an extremely old version (v0.99.9 from months ago) instead of the latest (v0.116.1). **Fix**: Extract version from wheel filename using regex, sort by `packaging.version.Version` objects instead of strings. Added 10 comprehensive unit tests covering the exact regression case (0.99.9 vs 0.116.1), edge cases (empty list, invalid filenames), and complex version comparisons (major/minor/patch). Production now correctly selects the latest semantic version. See [LESSONS-LEARNED.md](LESSONS-LEARNED.md#semantic-version-sorting-feb-2026).
|
||||
|
||||
- **GCE Encoding Worker Wheel Fix** (2026-02-10): Fixed encoding worker crash caused by attempting to install `karaoke_gen-current.whl`, which is not a valid PEP 427 wheel filename (missing version and platform tags). **Root cause**: The `ensure_latest_wheel()` function downloaded all wheels including `karaoke_gen-current.whl`, then tried to install it. pip rejected it with "Invalid wheel filename (wrong number of parts)", causing encoding to fail and the service to restart, resulting in "Cannot connect" errors from Cloud Run. **Fix**: Filter out wheels containing '-current' before selecting which wheel to install. Only properly versioned wheels (e.g., `karaoke_gen-0.116.0-py3-none-any.whl`) are now considered. Added 5 comprehensive unit tests covering current wheel exclusion, empty results, version sorting, and path-agnostic filtering. Fixes job 749141f8 and prevents future encoding failures. See [LESSONS-LEARNED.md](LESSONS-LEARNED.md#pip-wheel-filename-validation-feb-2026).
|
||||
|
||||
- **Flacfetch Retry Logic & Audio Search Recovery** (2026-02-10): Added comprehensive retry logic for flacfetch download failures to handle transient network issues and service restarts. Jobs now retry downloads up to 9 times over ~6 minutes with exponential backoff (10s → 20s → 40s → 60s capped), significantly reducing failures from temporary network hiccups. **Key improvements**: (1) Retry logic with selective error handling (retries on connection errors and 5xx, immediate fail on 4xx), (2) State persistence - download parameters (source_name, source_id, target_file, download_url) now saved BEFORE download attempt, enabling retry even if download fails, (3) Enhanced retry endpoint - `/api/jobs/{id}/retry` now handles audio search jobs by re-downloading using saved params, (4) User feedback - retry button now shows error toast with actual API error message instead of silent failures. Added 5 comprehensive retry tests covering network errors, 4xx/5xx responses, max retries, and exponential backoff timing. Job 749141f8 investigation revealed the root cause: no source info was saved when flacfetch calls failed, making retry impossible. See [LESSONS-LEARNED.md](LESSONS-LEARNED.md#retry-transient-failures-feb-2026) for retry implementation patterns.
|
||||
|
||||
- **CDG Sync Fix for Countdown-Padded Songs** (2026-02-05): Fixed CDG files being 3 seconds out of sync with audio when songs have countdown padding applied. **Root cause**: Video rendering adds 3s countdown padding to audio AND shifts LRC timestamps by +3s. CDG generation was using these countdown-shifted LRC timestamps but with instrumental audio (which has no countdown padding), causing lyrics to appear 3s late. **Fix**: CDG generator now receives `lrc_has_countdown_padding` flag; when True, it strips the countdown segment and shifts timestamps back before generating the CDG. Added 11 unit tests and updated orchestrator/packaging pipeline. See [LESSONS-LEARNED.md](LESSONS-LEARNED.md#fix-both-sides-of-dual-code-paths).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Unit tests for job-status.ts utility functions
|
||||
*/
|
||||
|
||||
import { getJobStep, formatStepIndicator, isBlockingStatus, getJobProgressPercent, getJobPriority, sortJobsByPriority, getDisplayJobs, JobStep } from '../lib/job-status';
|
||||
import { getJobStep, formatStepIndicator, isBlockingStatus, getJobProgressPercent, getJobPriority, sortJobsByPriority, JobStep } from '../lib/job-status';
|
||||
import type { Job } from '../lib/api';
|
||||
|
||||
// Helper to create a minimal Job object for testing
|
||||
@@ -595,138 +595,3 @@ describe('sortJobsByPriority', () => {
|
||||
expect(sorted[4].status).toBe('failed'); // failed
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDisplayJobs', () => {
|
||||
// Helper: pre-sorted jobs (blocking, processing, complete, failed)
|
||||
function createSortedJobs(counts: { blocking?: number; processing?: number; complete?: number; failed?: number }): Job[] {
|
||||
const jobs: Job[] = [];
|
||||
let t = 20; // descending timestamp within each priority group
|
||||
for (let i = 0; i < (counts.blocking ?? 0); i++) {
|
||||
jobs.push({ job_id: `blocking-${i}`, status: 'awaiting_review', progress: 0, created_at: `2024-01-01T${t--}:00:00Z`, updated_at: '2024-01-01T00:00:00Z' });
|
||||
}
|
||||
for (let i = 0; i < (counts.processing ?? 0); i++) {
|
||||
jobs.push({ job_id: `processing-${i}`, status: 'rendering_video', progress: 0, created_at: `2024-01-01T${t--}:00:00Z`, updated_at: '2024-01-01T00:00:00Z' });
|
||||
}
|
||||
for (let i = 0; i < (counts.complete ?? 0); i++) {
|
||||
jobs.push({ job_id: `complete-${i}`, status: 'complete', progress: 100, created_at: `2024-01-01T${t--}:00:00Z`, updated_at: '2024-01-01T00:00:00Z' });
|
||||
}
|
||||
for (let i = 0; i < (counts.failed ?? 0); i++) {
|
||||
jobs.push({ job_id: `failed-${i}`, status: 'failed', progress: 0, created_at: `2024-01-01T${t--}:00:00Z`, updated_at: '2024-01-01T00:00:00Z' });
|
||||
}
|
||||
return jobs;
|
||||
}
|
||||
|
||||
it('returns all jobs when fewer than display limit', () => {
|
||||
const jobs = createSortedJobs({ complete: 3 });
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs(jobs, 5);
|
||||
expect(displayedJobs).toHaveLength(3);
|
||||
expect(totalFetched).toBe(3);
|
||||
});
|
||||
|
||||
it('returns empty array for empty input', () => {
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs([], 5);
|
||||
expect(displayedJobs).toHaveLength(0);
|
||||
expect(totalFetched).toBe(0);
|
||||
});
|
||||
|
||||
it('limits to displayLimit when no incomplete jobs', () => {
|
||||
const jobs = createSortedJobs({ complete: 10 });
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs(jobs, 5);
|
||||
expect(displayedJobs).toHaveLength(5);
|
||||
expect(totalFetched).toBe(10);
|
||||
});
|
||||
|
||||
it('expands beyond limit when more incomplete than limit', () => {
|
||||
const jobs = createSortedJobs({ blocking: 3, processing: 4, complete: 5 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, 5);
|
||||
// 7 incomplete > limit of 5, so show all 7
|
||||
expect(displayedJobs).toHaveLength(7);
|
||||
expect(displayedJobs.filter(j => j.status === 'awaiting_review')).toHaveLength(3);
|
||||
expect(displayedJobs.filter(j => j.status === 'rendering_video')).toHaveLength(4);
|
||||
});
|
||||
|
||||
it('fills remaining slots with completed when fewer incomplete than limit', () => {
|
||||
const jobs = createSortedJobs({ blocking: 1, processing: 1, complete: 10 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, 5);
|
||||
// 2 incomplete < 5 limit, so show 5 total (2 incomplete + 3 completed)
|
||||
expect(displayedJobs).toHaveLength(5);
|
||||
expect(displayedJobs[0].status).toBe('awaiting_review');
|
||||
expect(displayedJobs[1].status).toBe('rendering_video');
|
||||
expect(displayedJobs[2].status).toBe('complete');
|
||||
});
|
||||
|
||||
it('returns all jobs when displayLimit is -1 (All mode)', () => {
|
||||
const jobs = createSortedJobs({ blocking: 2, complete: 20 });
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs(jobs, -1);
|
||||
expect(displayedJobs).toHaveLength(22);
|
||||
expect(totalFetched).toBe(22);
|
||||
});
|
||||
|
||||
it('preserves sort order from input', () => {
|
||||
const jobs = createSortedJobs({ blocking: 1, processing: 1, complete: 3 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, 5);
|
||||
expect(displayedJobs[0].status).toBe('awaiting_review');
|
||||
expect(displayedJobs[1].status).toBe('rendering_video');
|
||||
expect(displayedJobs[2].status).toBe('complete');
|
||||
expect(displayedJobs[3].status).toBe('complete');
|
||||
expect(displayedJobs[4].status).toBe('complete');
|
||||
});
|
||||
|
||||
describe('hideCompleted filter', () => {
|
||||
it('filters out complete and failed jobs when hideCompleted is true', () => {
|
||||
const jobs = createSortedJobs({ blocking: 1, processing: 2, complete: 5, failed: 3 });
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs(jobs, -1, true);
|
||||
expect(totalFetched).toBe(11);
|
||||
expect(displayedJobs).toHaveLength(3);
|
||||
expect(displayedJobs.every(j => j.status === 'awaiting_review' || j.status === 'rendering_video')).toBe(true);
|
||||
});
|
||||
|
||||
it('respects display limit after filtering', () => {
|
||||
const jobs = createSortedJobs({ blocking: 2, processing: 5, complete: 10 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, 5, true);
|
||||
// 7 incomplete jobs, all visible since incomplete count (7) > limit (5)
|
||||
expect(displayedJobs).toHaveLength(7);
|
||||
});
|
||||
|
||||
it('returns empty when all jobs are complete and hideCompleted is true', () => {
|
||||
const jobs = createSortedJobs({ complete: 10 });
|
||||
const { displayedJobs, totalFetched } = getDisplayJobs(jobs, 5, true);
|
||||
expect(displayedJobs).toHaveLength(0);
|
||||
expect(totalFetched).toBe(10);
|
||||
});
|
||||
|
||||
it('does not filter when hideCompleted is false', () => {
|
||||
const jobs = createSortedJobs({ blocking: 1, complete: 5, failed: 2 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, -1, false);
|
||||
expect(displayedJobs).toHaveLength(8);
|
||||
});
|
||||
|
||||
it('defaults to showing all when hideCompleted is omitted', () => {
|
||||
const jobs = createSortedJobs({ complete: 5, failed: 2 });
|
||||
const { displayedJobs } = getDisplayJobs(jobs, -1);
|
||||
expect(displayedJobs).toHaveLength(7);
|
||||
});
|
||||
});
|
||||
|
||||
it('core bug: old incomplete job visible even when recent jobs are all completed', () => {
|
||||
// Simulate the bug scenario: 5 recent completed jobs + 1 older blocking job
|
||||
// With old behavior (LIMIT 5 at query), the blocking job would never be fetched.
|
||||
// With new behavior, all 6 are fetched and display limit of 5 expands to show blocking.
|
||||
const jobs = sortJobsByPriority([
|
||||
{ job_id: 'old-blocking', status: 'awaiting_review', progress: 0, created_at: '2024-01-01T01:00:00Z', updated_at: '2024-01-01T01:00:00Z' },
|
||||
{ job_id: 'new-1', status: 'complete', progress: 100, created_at: '2024-01-10T01:00:00Z', updated_at: '2024-01-10T01:00:00Z' },
|
||||
{ job_id: 'new-2', status: 'complete', progress: 100, created_at: '2024-01-09T01:00:00Z', updated_at: '2024-01-09T01:00:00Z' },
|
||||
{ job_id: 'new-3', status: 'complete', progress: 100, created_at: '2024-01-08T01:00:00Z', updated_at: '2024-01-08T01:00:00Z' },
|
||||
{ job_id: 'new-4', status: 'complete', progress: 100, created_at: '2024-01-07T01:00:00Z', updated_at: '2024-01-07T01:00:00Z' },
|
||||
{ job_id: 'new-5', status: 'complete', progress: 100, created_at: '2024-01-06T01:00:00Z', updated_at: '2024-01-06T01:00:00Z' },
|
||||
]);
|
||||
|
||||
const { displayedJobs } = getDisplayJobs(jobs, 5);
|
||||
// The blocking job must be visible
|
||||
const blockingJobs = displayedJobs.filter(j => j.status === 'awaiting_review');
|
||||
expect(blockingJobs).toHaveLength(1);
|
||||
expect(blockingJobs[0].job_id).toBe('old-blocking');
|
||||
// Should show 5 total (1 incomplete + 4 completed, since limit is 5 and max(5, 1) = 5)
|
||||
expect(displayedJobs).toHaveLength(5);
|
||||
});
|
||||
});
|
||||
+14
-60
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useState, useEffect, useCallback, useMemo, Suspense, useRef } from "react"
|
||||
import { useState, useEffect, useCallback, Suspense, useRef } from "react"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import { api, Job, getAccessToken } from "@/lib/api"
|
||||
import { useAuth } from "@/lib/auth"
|
||||
@@ -15,8 +15,8 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select"
|
||||
import { Music2, RefreshCw, Loader2, Moon, Sun, Eye, EyeOff } from "lucide-react"
|
||||
import { sortJobsByPriority, getDisplayJobs } from "@/lib/job-status"
|
||||
import { Music2, RefreshCw, Loader2, Moon, Sun } from "lucide-react"
|
||||
import { sortJobsByPriority } from "@/lib/job-status"
|
||||
import { WarmingUpLoader } from "@/components/WarmingUpLoader"
|
||||
import { JobCard } from "@/components/job"
|
||||
import { JobSubmission } from "@/components/job/JobSubmission"
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
function AppPageContent() {
|
||||
const router = useRouter()
|
||||
const searchParams = useSearchParams()
|
||||
const [allJobs, setAllJobs] = useState<Job[]>([])
|
||||
const [jobs, setJobs] = useState<Job[]>([])
|
||||
const [isLoadingJobs, setIsLoadingJobs] = useState(true)
|
||||
const [isInitialLoad, setIsInitialLoad] = useState(true)
|
||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null)
|
||||
@@ -44,25 +44,11 @@ function AppPageContent() {
|
||||
const { isDarkMode, toggleTheme, mounted } = useTheme()
|
||||
const { user, fetchUser, verifyMagicLink } = useAuth()
|
||||
const { showTestData } = useAdminSettings()
|
||||
const [jobLimit, setJobLimit] = useState<number>(() => {
|
||||
if (typeof window === "undefined") return 10
|
||||
const saved = localStorage.getItem("nomad-karaoke-job-limit")
|
||||
return saved ? Number(saved) : 10
|
||||
})
|
||||
const [hideCompleted, setHideCompleted] = useState<boolean>(() => {
|
||||
if (typeof window === "undefined") return false
|
||||
return localStorage.getItem("nomad-karaoke-hide-completed") === "true"
|
||||
})
|
||||
const [jobLimit, setJobLimit] = useState<number>(5)
|
||||
|
||||
// Check if user is admin (for exclude_test parameter)
|
||||
const isAdmin = user?.role === "admin" || user?.email?.endsWith("@nomadkaraoke.com")
|
||||
|
||||
// Derive displayed jobs from allJobs + display limit + filter (instant, no re-fetch)
|
||||
const { displayedJobs: jobs, totalFetched } = useMemo(
|
||||
() => getDisplayJobs(allJobs, jobLimit, hideCompleted),
|
||||
[allJobs, jobLimit, hideCompleted]
|
||||
)
|
||||
|
||||
// Memoize loadJobs for use with visibility refresh
|
||||
const loadJobs = useCallback(async () => {
|
||||
if (!getAccessToken()) {
|
||||
@@ -71,15 +57,13 @@ function AppPageContent() {
|
||||
return
|
||||
}
|
||||
try {
|
||||
// Use summary mode for reduced payload (~12 fields instead of 50+)
|
||||
// Only admins can filter test jobs, and by default we hide them
|
||||
const data = await api.listJobs({
|
||||
limit: 100,
|
||||
exclude_test: isAdmin ? !showTestData : undefined,
|
||||
fields: 'summary',
|
||||
hide_completed: hideCompleted,
|
||||
limit: jobLimit === -1 ? 100 : jobLimit,
|
||||
exclude_test: isAdmin ? !showTestData : undefined
|
||||
})
|
||||
// Sort: blocking jobs first, then processing, then completed
|
||||
setAllJobs(sortJobsByPriority(data))
|
||||
setJobs(sortJobsByPriority(data))
|
||||
} catch (err: any) {
|
||||
// Don't log auth errors - user just needs to authenticate
|
||||
if (err?.status !== 401) {
|
||||
@@ -89,10 +73,10 @@ function AppPageContent() {
|
||||
setIsLoadingJobs(false)
|
||||
setIsInitialLoad(false)
|
||||
}
|
||||
}, [isAdmin, showTestData, hideCompleted])
|
||||
}, [isAdmin, showTestData, jobLimit])
|
||||
|
||||
// Enable notifications for job status changes (sound + title animation)
|
||||
useJobNotifications(allJobs)
|
||||
useJobNotifications(jobs)
|
||||
|
||||
// Refresh jobs immediately when tab becomes visible (after returning from review UIs)
|
||||
useVisibilityRefresh(loadJobs, isAuthenticated === true)
|
||||
@@ -174,7 +158,7 @@ function AppPageContent() {
|
||||
return (
|
||||
<div className="min-h-screen animated-gradient">
|
||||
{/* AutoProcessor - handles non-interactive mode for jobs with that flag */}
|
||||
<AutoProcessor jobs={allJobs} onJobsChanged={loadJobs} />
|
||||
<AutoProcessor jobs={jobs} onJobsChanged={loadJobs} />
|
||||
|
||||
{/* Header */}
|
||||
<header className="fixed top-0 left-0 right-0 z-50 bg-dark-900/80 backdrop-blur-md border-b border-dark-700">
|
||||
@@ -251,33 +235,7 @@ function AppPageContent() {
|
||||
<CardTitle style={{ color: 'var(--text)' }}>Recent Jobs</CardTitle>
|
||||
<div className="flex items-center gap-2">
|
||||
{isLoadingJobs && <Loader2 className="w-4 h-4 animate-spin" style={{ color: 'var(--text-muted)' }} />}
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 w-7 p-0"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
onClick={() => {
|
||||
const next = !hideCompleted
|
||||
setHideCompleted(next)
|
||||
localStorage.setItem("nomad-karaoke-hide-completed", String(next))
|
||||
}}
|
||||
>
|
||||
{hideCompleted ? <EyeOff className="w-3.5 h-3.5" /> : <Eye className="w-3.5 h-3.5" />}
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
<p>{hideCompleted ? "Show all jobs" : "Hide completed jobs"}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
<Select value={String(jobLimit)} onValueChange={(v) => {
|
||||
const val = Number(v)
|
||||
setJobLimit(val)
|
||||
localStorage.setItem("nomad-karaoke-job-limit", String(val))
|
||||
}}>
|
||||
<Select value={String(jobLimit)} onValueChange={(v) => setJobLimit(Number(v))}>
|
||||
<SelectTrigger className="h-7 w-[80px] text-xs">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
@@ -291,11 +249,7 @@ function AppPageContent() {
|
||||
</div>
|
||||
</div>
|
||||
<CardDescription style={{ color: 'var(--text-muted)' }}>
|
||||
{hideCompleted
|
||||
? `${jobs.length} incomplete of ${totalFetched} total`
|
||||
: jobs.length < totalFetched
|
||||
? `Showing ${jobs.length} of ${totalFetched} jobs`
|
||||
: `${jobs.length} job${jobs.length !== 1 ? 's' : ''}`}
|
||||
{jobs.length} job{jobs.length !== 1 ? 's' : ''} shown
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="px-3 sm:px-6">
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip'
|
||||
import { Highlighter, Pencil, Trash2 } from 'lucide-react'
|
||||
import { Highlighter, Edit, Trash2 } from 'lucide-react'
|
||||
import { InteractionMode } from '@/lib/lyrics-review/types'
|
||||
|
||||
interface ModeSelectorProps {
|
||||
@@ -23,16 +23,13 @@ export default function ModeSelector({ effectiveMode, onChange }: ModeSelectorPr
|
||||
<ToggleGroup
|
||||
type="single"
|
||||
value={effectiveMode}
|
||||
onValueChange={(value) => value && onChange(value as InteractionMode)}
|
||||
onValueChange={(value) => value === 'edit' && onChange(value as InteractionMode)}
|
||||
className="h-8"
|
||||
>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<ToggleGroupItem
|
||||
value="edit"
|
||||
className="h-8 px-2.5 text-[0.75rem] !flex-none aria-checked:font-semibold aria-checked:bg-blue-600 aria-checked:text-white dark:aria-checked:bg-blue-500"
|
||||
>
|
||||
<Pencil className="h-3.5 w-3.5 mr-1" />
|
||||
<ToggleGroupItem value="edit" className="h-8 px-2 text-[0.75rem]">
|
||||
<Edit className="h-3.5 w-3.5 mr-1" />
|
||||
Edit
|
||||
</ToggleGroupItem>
|
||||
</TooltipTrigger>
|
||||
@@ -43,10 +40,7 @@ export default function ModeSelector({ effectiveMode, onChange }: ModeSelectorPr
|
||||
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<ToggleGroupItem
|
||||
value="highlight"
|
||||
className="h-8 px-2.5 text-[0.75rem] !flex-none aria-checked:font-semibold aria-checked:bg-blue-600 aria-checked:text-white dark:aria-checked:bg-blue-500"
|
||||
>
|
||||
<ToggleGroupItem value="highlight" className="h-8 px-2 text-[0.75rem]" disabled>
|
||||
<Highlighter className="h-3.5 w-3.5 mr-1" />
|
||||
Highlight
|
||||
</ToggleGroupItem>
|
||||
@@ -58,10 +52,7 @@ export default function ModeSelector({ effectiveMode, onChange }: ModeSelectorPr
|
||||
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<ToggleGroupItem
|
||||
value="delete_word"
|
||||
className="h-8 px-2.5 text-[0.75rem] !flex-none aria-checked:font-semibold aria-checked:bg-blue-600 aria-checked:text-white dark:aria-checked:bg-blue-500"
|
||||
>
|
||||
<ToggleGroupItem value="delete_word" className="h-8 px-2 text-[0.75rem]" disabled>
|
||||
<Trash2 className="h-3.5 w-3.5 mr-1" />
|
||||
Delete
|
||||
</ToggleGroupItem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { useState, useRef, useEffect, useCallback, useId, memo } from 'react'
|
||||
import { useState, useRef, useEffect, useCallback, memo } from 'react'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
|
||||
@@ -19,7 +19,6 @@ const TimeInput = memo(function TimeInput({
|
||||
widthClass = 'w-24',
|
||||
debounceMs = 300
|
||||
}: TimeInputProps) {
|
||||
const inputId = useId()
|
||||
const [localValue, setLocalValue] = useState<string>('')
|
||||
const [isFocused, setIsFocused] = useState(false)
|
||||
const debounceRef = useRef<NodeJS.Timeout | null>(null)
|
||||
@@ -66,9 +65,8 @@ const TimeInput = memo(function TimeInput({
|
||||
|
||||
return (
|
||||
<div className={widthClass}>
|
||||
<Label htmlFor={inputId} className="text-xs text-muted-foreground mb-1">{label}</Label>
|
||||
<Label className="text-xs text-muted-foreground mb-1">{label}</Label>
|
||||
<Input
|
||||
id={inputId}
|
||||
type="number"
|
||||
value={isFocused ? localValue : (value?.toFixed(2) ?? '')}
|
||||
onFocus={handleFocus}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import ModeSelector from '../ModeSelector'
|
||||
import { InteractionMode } from '@/lib/lyrics-review/types'
|
||||
|
||||
describe('ModeSelector', () => {
|
||||
it('renders all three mode buttons', () => {
|
||||
const mockOnChange = jest.fn()
|
||||
render(<ModeSelector effectiveMode="edit" onChange={mockOnChange} />)
|
||||
|
||||
expect(screen.getByRole('radio', { name: /edit/i })).toBeInTheDocument()
|
||||
expect(screen.getByRole('radio', { name: /highlight/i })).toBeInTheDocument()
|
||||
expect(screen.getByRole('radio', { name: /delete/i })).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('all mode buttons are enabled (not disabled)', () => {
|
||||
const mockOnChange = jest.fn()
|
||||
render(<ModeSelector effectiveMode="edit" onChange={mockOnChange} />)
|
||||
|
||||
const editBtn = screen.getByRole('radio', { name: /edit/i })
|
||||
const highlightBtn = screen.getByRole('radio', { name: /highlight/i })
|
||||
const deleteBtn = screen.getByRole('radio', { name: /delete/i })
|
||||
|
||||
// Verify buttons are not disabled
|
||||
expect(editBtn).not.toBeDisabled()
|
||||
expect(highlightBtn).not.toBeDisabled()
|
||||
expect(deleteBtn).not.toBeDisabled()
|
||||
})
|
||||
|
||||
it('calls onChange when clicking highlight button', async () => {
|
||||
const user = userEvent.setup()
|
||||
const mockOnChange = jest.fn()
|
||||
render(<ModeSelector effectiveMode="edit" onChange={mockOnChange} />)
|
||||
|
||||
const highlightBtn = screen.getByRole('radio', { name: /highlight/i })
|
||||
await user.click(highlightBtn)
|
||||
|
||||
expect(mockOnChange).toHaveBeenCalledWith('highlight')
|
||||
})
|
||||
|
||||
it('calls onChange when clicking delete button', async () => {
|
||||
const user = userEvent.setup()
|
||||
const mockOnChange = jest.fn()
|
||||
render(<ModeSelector effectiveMode="edit" onChange={mockOnChange} />)
|
||||
|
||||
const deleteBtn = screen.getByRole('radio', { name: /delete/i })
|
||||
await user.click(deleteBtn)
|
||||
|
||||
expect(mockOnChange).toHaveBeenCalledWith('delete_word')
|
||||
})
|
||||
|
||||
it('shows correct active state for current mode', () => {
|
||||
const mockOnChange = jest.fn()
|
||||
const { rerender } = render(<ModeSelector effectiveMode="highlight" onChange={mockOnChange} />)
|
||||
|
||||
const highlightBtn = screen.getByRole('radio', { name: /highlight/i })
|
||||
expect(highlightBtn).toHaveAttribute('aria-checked', 'true')
|
||||
|
||||
rerender(<ModeSelector effectiveMode="delete_word" onChange={mockOnChange} />)
|
||||
const deleteBtn = screen.getByRole('radio', { name: /delete/i })
|
||||
expect(deleteBtn).toHaveAttribute('aria-checked', 'true')
|
||||
})
|
||||
})
|
||||
@@ -1,313 +0,0 @@
|
||||
import { render, screen, within } from '@testing-library/react'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import ReplaceAllLyricsModal from '../modals/ReplaceAllLyricsModal'
|
||||
import { LyricsSegment } from '@/lib/lyrics-review/types'
|
||||
|
||||
// Mock the LyricsSynchronizer to avoid complex dependencies
|
||||
jest.mock('../synchronizer/LyricsSynchronizer', () => {
|
||||
return function MockLyricsSynchronizer() {
|
||||
return <div data-testid="lyrics-synchronizer">Synchronizer</div>
|
||||
}
|
||||
})
|
||||
|
||||
const mockSegments: LyricsSegment[] = [
|
||||
{
|
||||
id: 'seg1',
|
||||
text: 'Hello world',
|
||||
start_time: 0,
|
||||
end_time: 2,
|
||||
words: [
|
||||
{ id: 'w1', text: 'Hello', start_time: 0, end_time: 1, confidence: 0.9 },
|
||||
{ id: 'w2', text: 'world', start_time: 1, end_time: 2, confidence: 0.95 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg2',
|
||||
text: 'Goodbye moon',
|
||||
start_time: 3,
|
||||
end_time: 5,
|
||||
words: [
|
||||
{ id: 'w3', text: 'Goodbye', start_time: 3, end_time: 4, confidence: 0.88 },
|
||||
{ id: 'w4', text: 'moon', start_time: 4, end_time: 5, confidence: 0.92 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg3',
|
||||
text: 'Third line here',
|
||||
start_time: 6,
|
||||
end_time: 9,
|
||||
words: [
|
||||
{ id: 'w5', text: 'Third', start_time: 6, end_time: 7, confidence: 0.9 },
|
||||
{ id: 'w6', text: 'line', start_time: 7, end_time: 8, confidence: 0.9 },
|
||||
{ id: 'w7', text: 'here', start_time: 8, end_time: 9, confidence: 0.9 },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
const defaultProps = {
|
||||
open: true,
|
||||
onClose: jest.fn(),
|
||||
onSave: jest.fn(),
|
||||
setModalSpacebarHandler: jest.fn(),
|
||||
existingSegments: mockSegments,
|
||||
}
|
||||
|
||||
async function openReplaceSegmentsMode() {
|
||||
const user = userEvent.setup()
|
||||
render(<ReplaceAllLyricsModal {...defaultProps} />)
|
||||
|
||||
// Click "Replace Segment Lyrics" in mode selection
|
||||
const replaceSegmentsCard = screen.getByText('Replace Segment Lyrics')
|
||||
await user.click(replaceSegmentsCard)
|
||||
}
|
||||
|
||||
describe('Replace Segments Mode', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
it('shows Replace Segment Lyrics option in mode selection when existing lyrics exist', () => {
|
||||
render(<ReplaceAllLyricsModal {...defaultProps} />)
|
||||
|
||||
expect(screen.getByText('Replace Segment Lyrics')).toBeInTheDocument()
|
||||
expect(screen.getByText('Recommended for custom lyrics')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('does not show Replace Segment Lyrics when no existing lyrics', () => {
|
||||
render(<ReplaceAllLyricsModal {...defaultProps} existingSegments={[]} />)
|
||||
|
||||
expect(screen.queryByText('Replace Segment Lyrics')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('renders textarea pre-filled with existing segment text', async () => {
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
expect(textarea).toHaveValue('Hello world\nGoodbye moon\nThird line here')
|
||||
})
|
||||
|
||||
it('shows correct matching line count', async () => {
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
expect(screen.getByText('3/3 lines')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('Apply button is enabled when line count matches', async () => {
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
expect(applyButton).not.toBeDisabled()
|
||||
})
|
||||
|
||||
it('disables Apply when line count differs (too many)', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'line 1\nline 2\nline 3\nline 4')
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
expect(applyButton).toBeDisabled()
|
||||
expect(screen.getByText(/1 too many/)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('disables Apply when line count differs (too few)', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'line 1\nline 2')
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
expect(applyButton).toBeDisabled()
|
||||
expect(screen.getByText(/1 too few/)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('shows mismatch error message with correct counts', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'only one line')
|
||||
|
||||
expect(screen.getByText(/expected 3, got 1/)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('calls onSave with unchanged segments when no text is modified', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
expect(defaultProps.onSave).toHaveBeenCalledTimes(1)
|
||||
const savedSegments = defaultProps.onSave.mock.calls[0][0]
|
||||
expect(savedSegments).toHaveLength(3)
|
||||
|
||||
// Unchanged segments should have same words (deep copy)
|
||||
expect(savedSegments[0].text).toBe('Hello world')
|
||||
expect(savedSegments[0].words).toHaveLength(2)
|
||||
expect(savedSegments[0].words[0].text).toBe('Hello')
|
||||
expect(savedSegments[0].words[1].text).toBe('world')
|
||||
// Preserved original timing
|
||||
expect(savedSegments[0].words[0].start_time).toBe(0)
|
||||
expect(savedSegments[0].words[0].end_time).toBe(1)
|
||||
})
|
||||
|
||||
it('creates new words with distributed timing for changed lines', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'Hello world\nNew custom lyrics here\nThird line here')
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
expect(defaultProps.onSave).toHaveBeenCalledTimes(1)
|
||||
const savedSegments = defaultProps.onSave.mock.calls[0][0]
|
||||
|
||||
// First segment unchanged
|
||||
expect(savedSegments[0].words[0].text).toBe('Hello')
|
||||
expect(savedSegments[0].words[0].start_time).toBe(0)
|
||||
|
||||
// Second segment changed — new words with distributed timing over 3-5s
|
||||
expect(savedSegments[1].text).toBe('New custom lyrics here')
|
||||
expect(savedSegments[1].words).toHaveLength(4)
|
||||
expect(savedSegments[1].words[0].text).toBe('New')
|
||||
expect(savedSegments[1].words[0].start_time).toBe(3)
|
||||
expect(savedSegments[1].words[3].text).toBe('here')
|
||||
expect(savedSegments[1].words[3].end_time).toBe(5)
|
||||
|
||||
// Third segment unchanged
|
||||
expect(savedSegments[2].words[0].text).toBe('Third')
|
||||
})
|
||||
|
||||
it('preserves segment id and timing for changed lines', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'Hello world\nCompletely different\nThird line here')
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
const savedSegments = defaultProps.onSave.mock.calls[0][0]
|
||||
|
||||
// Changed segment keeps original id and timing boundaries
|
||||
expect(savedSegments[1].id).toBe('seg2')
|
||||
expect(savedSegments[1].start_time).toBe(3)
|
||||
expect(savedSegments[1].end_time).toBe(5)
|
||||
})
|
||||
|
||||
it('calls onClose after applying', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
expect(defaultProps.onClose).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('back button returns to mode selection', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
// Should be in replace segments mode
|
||||
expect(screen.getByText('Edit lyrics line by line', { exact: false })).toBeInTheDocument()
|
||||
|
||||
// Click back arrow
|
||||
const backButton = screen.getAllByRole('button').find(
|
||||
(btn) => btn.querySelector('svg.lucide-arrow-left')
|
||||
)
|
||||
expect(backButton).toBeTruthy()
|
||||
await user.click(backButton!)
|
||||
|
||||
// Should be back in mode selection
|
||||
expect(screen.getByText('Edit All Lyrics')).toBeInTheDocument()
|
||||
expect(screen.getByText('Re-sync Existing Lyrics')).toBeInTheDocument()
|
||||
expect(screen.getByText('Replace Segment Lyrics')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('cancel button closes the modal', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const cancelButton = screen.getByRole('button', { name: 'Cancel' })
|
||||
await user.click(cancelButton)
|
||||
|
||||
expect(defaultProps.onClose).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('does not show Replace Segment Lyrics when segments have no words', () => {
|
||||
const emptyWordSegments: LyricsSegment[] = [
|
||||
{ id: 's1', text: 'test', start_time: 0, end_time: 1, words: [] },
|
||||
]
|
||||
render(<ReplaceAllLyricsModal {...defaultProps} existingSegments={emptyWordSegments} />)
|
||||
|
||||
expect(screen.queryByText('Replace Segment Lyrics')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('handles changing empty segment text to non-empty', async () => {
|
||||
const user = userEvent.setup()
|
||||
const segmentsWithEmpty: LyricsSegment[] = [
|
||||
{
|
||||
id: 'seg1',
|
||||
text: '',
|
||||
start_time: 0,
|
||||
end_time: 2,
|
||||
words: [{ id: 'w1', text: '', start_time: 0, end_time: 2, confidence: 1 }],
|
||||
},
|
||||
{
|
||||
id: 'seg2',
|
||||
text: 'Hello world',
|
||||
start_time: 3,
|
||||
end_time: 5,
|
||||
words: [
|
||||
{ id: 'w2', text: 'Hello', start_time: 3, end_time: 4, confidence: 1 },
|
||||
{ id: 'w3', text: 'world', start_time: 4, end_time: 5, confidence: 1 },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
render(<ReplaceAllLyricsModal {...defaultProps} existingSegments={segmentsWithEmpty} />)
|
||||
|
||||
const replaceSegmentsCard = screen.getByText('Replace Segment Lyrics')
|
||||
await user.click(replaceSegmentsCard)
|
||||
|
||||
const textarea = screen.getByRole('textbox')
|
||||
await user.clear(textarea)
|
||||
await user.type(textarea, 'New first line\nHello world')
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
const savedSegments = defaultProps.onSave.mock.calls[0][0]
|
||||
expect(savedSegments[0].text).toBe('New first line')
|
||||
expect(savedSegments[0].words).toHaveLength(3)
|
||||
expect(savedSegments[0].words[0].start_time).toBe(0)
|
||||
expect(savedSegments[0].words[2].end_time).toBeCloseTo(2)
|
||||
})
|
||||
|
||||
it('deep copies unchanged segments (no mutation)', async () => {
|
||||
const user = userEvent.setup()
|
||||
await openReplaceSegmentsMode()
|
||||
|
||||
const applyButton = screen.getByRole('button', { name: 'Apply' })
|
||||
await user.click(applyButton)
|
||||
|
||||
const savedSegments = defaultProps.onSave.mock.calls[0][0]
|
||||
|
||||
// Verify deep copy — different object references
|
||||
expect(savedSegments[0]).not.toBe(mockSegments[0])
|
||||
expect(savedSegments[0].words).not.toBe(mockSegments[0].words)
|
||||
expect(savedSegments[0].words[0]).not.toBe(mockSegments[0].words[0])
|
||||
})
|
||||
})
|
||||
@@ -10,7 +10,7 @@ import EditWordList from '../EditWordList'
|
||||
import EditTimelineSection from '../EditTimelineSection'
|
||||
import useManualSync from '@/hooks/useManualSync'
|
||||
import { setModalHandler } from '@/lib/lyrics-review/utils/keyboardHandlers'
|
||||
import { splitWordWithTiming, createWordsWithDistributedTiming } from '@/lib/lyrics-review/utils/wordUtils'
|
||||
import { splitWordWithTiming } from '@/lib/lyrics-review/utils/wordUtils'
|
||||
|
||||
interface EditModalProps {
|
||||
open: boolean
|
||||
@@ -248,12 +248,22 @@ export default function EditModal({
|
||||
const handleReplaceAllWords = useCallback(
|
||||
(replacementText: string) => {
|
||||
if (!editedSegment) return
|
||||
const newWords = createWordsWithDistributedTiming(
|
||||
replacementText,
|
||||
editedSegment.start_time,
|
||||
editedSegment.end_time
|
||||
)
|
||||
if (newWords.length === 0) return
|
||||
const wordTexts = replacementText.trim().split(/\s+/).filter((w) => w.length > 0)
|
||||
if (wordTexts.length === 0) return
|
||||
|
||||
const segStart = editedSegment.start_time ?? 0
|
||||
const segEnd = editedSegment.end_time ?? segStart + 1
|
||||
const totalDuration = segEnd - segStart
|
||||
const wordDuration = totalDuration / wordTexts.length
|
||||
|
||||
const newWords: Word[] = wordTexts.map((text, index) => ({
|
||||
id: nanoid(),
|
||||
text,
|
||||
start_time: segStart + index * wordDuration,
|
||||
end_time: segStart + (index + 1) * wordDuration,
|
||||
confidence: 1.0,
|
||||
}))
|
||||
|
||||
updateSegment(newWords)
|
||||
},
|
||||
[editedSegment, updateSegment]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { RefreshCw, ClipboardPaste, TextCursorInput, X } from 'lucide-react'
|
||||
import { RefreshCw, ClipboardPaste, X } from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
interface ModeSelectionModalProps {
|
||||
@@ -10,7 +10,6 @@ interface ModeSelectionModalProps {
|
||||
onClose: () => void
|
||||
onSelectReplace: () => void
|
||||
onSelectResync: () => void
|
||||
onSelectReplaceSegments: () => void
|
||||
hasExistingLyrics: boolean
|
||||
}
|
||||
|
||||
@@ -19,7 +18,6 @@ export default function ModeSelectionModal({
|
||||
onClose,
|
||||
onSelectReplace,
|
||||
onSelectResync,
|
||||
onSelectReplaceSegments,
|
||||
hasExistingLyrics,
|
||||
}: ModeSelectionModalProps) {
|
||||
return (
|
||||
@@ -61,29 +59,6 @@ export default function ModeSelectionModal({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Replace Segment Lyrics option - only show if there are existing lyrics */}
|
||||
{hasExistingLyrics && (
|
||||
<div
|
||||
className={cn(
|
||||
'p-4 border rounded-lg cursor-pointer',
|
||||
'hover:bg-muted/30 hover:border-muted-foreground transition-colors'
|
||||
)}
|
||||
onClick={onSelectReplaceSegments}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<TextCursorInput className="h-10 w-10 text-muted-foreground mt-0.5" />
|
||||
<div className="flex-1">
|
||||
<h3 className="text-lg font-semibold">Replace Segment Lyrics</h3>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
Edit or paste new lyrics for each line. Timing is preserved — only the words
|
||||
change. Best for custom lyrics, translations, or fixing multiple lines at once.
|
||||
</p>
|
||||
<p className="text-xs text-green-500 mt-2">Recommended for custom lyrics</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Replace All option */}
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
@@ -4,10 +4,9 @@ import { useState, useEffect, useCallback, useMemo } from 'react'
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { X, ArrowLeft, ClipboardPaste, Sparkles, Info, Check, AlertTriangle } from 'lucide-react'
|
||||
import { X, ArrowLeft, ClipboardPaste, Sparkles } from 'lucide-react'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { LyricsSegment, Word } from '@/lib/lyrics-review/types'
|
||||
import { createWordsWithDistributedTiming } from '@/lib/lyrics-review/utils/wordUtils'
|
||||
import ModeSelectionModal from './ModeSelectionModal'
|
||||
import LyricsSynchronizer from '../synchronizer/LyricsSynchronizer'
|
||||
|
||||
@@ -19,7 +18,7 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
type ModalMode = 'selection' | 'replace' | 'resync' | 'replaceSegments'
|
||||
type ModalMode = 'selection' | 'replace' | 'resync'
|
||||
|
||||
interface ReplaceAllLyricsModalProps {
|
||||
open: boolean
|
||||
@@ -68,15 +67,6 @@ export default function ReplaceAllLyricsModal({
|
||||
return { lines: lines.length, words: totalWords }
|
||||
}, [inputText])
|
||||
|
||||
// Line count validation for replaceSegments mode
|
||||
const replaceSegmentsInfo = useMemo(() => {
|
||||
const expectedLineCount = existingSegments.length
|
||||
const lines = inputText.split('\n')
|
||||
const currentLineCount = lines.length
|
||||
const lineDiff = currentLineCount - expectedLineCount
|
||||
return { expectedLineCount, currentLineCount, lineDiff }
|
||||
}, [inputText, existingSegments])
|
||||
|
||||
// Process the input text into segments and words
|
||||
const processLyrics = useCallback(() => {
|
||||
if (!inputText.trim()) return
|
||||
@@ -133,36 +123,6 @@ export default function ReplaceAllLyricsModal({
|
||||
onClose()
|
||||
}, [onClose])
|
||||
|
||||
// Apply replace segments: build updated segments with new words for changed lines
|
||||
const handleApplyReplaceSegments = useCallback(() => {
|
||||
const newLines = inputText.split('\n')
|
||||
const updatedSegments: LyricsSegment[] = existingSegments.map((segment, i) => {
|
||||
const newLineText = newLines[i]?.trim() ?? ''
|
||||
const originalText = segment.text.trim()
|
||||
|
||||
if (newLineText === originalText) {
|
||||
// Unchanged — deep copy to avoid mutation
|
||||
return JSON.parse(JSON.stringify(segment))
|
||||
}
|
||||
|
||||
// Changed — create new words with distributed timing
|
||||
const newWords = createWordsWithDistributedTiming(
|
||||
newLineText,
|
||||
segment.start_time,
|
||||
segment.end_time
|
||||
)
|
||||
|
||||
return {
|
||||
...segment,
|
||||
text: newLineText,
|
||||
words: newWords,
|
||||
}
|
||||
})
|
||||
|
||||
onSave(updatedSegments)
|
||||
handleClose()
|
||||
}, [inputText, existingSegments, onSave, handleClose])
|
||||
|
||||
// Handle save from synchronizer
|
||||
const handleSave = useCallback(
|
||||
(segments: LyricsSegment[]) => {
|
||||
@@ -181,11 +141,6 @@ export default function ReplaceAllLyricsModal({
|
||||
setMode('resync')
|
||||
}, [])
|
||||
|
||||
const handleSelectReplaceSegments = useCallback(() => {
|
||||
setInputText(existingSegments.map((s) => s.text.trim()).join('\n'))
|
||||
setMode('replaceSegments')
|
||||
}, [existingSegments])
|
||||
|
||||
// Handle back to selection
|
||||
const handleBackToSelection = useCallback(() => {
|
||||
setMode('selection')
|
||||
@@ -208,7 +163,6 @@ export default function ReplaceAllLyricsModal({
|
||||
onClose={handleClose}
|
||||
onSelectReplace={handleSelectReplace}
|
||||
onSelectResync={handleSelectResync}
|
||||
onSelectReplaceSegments={handleSelectReplaceSegments}
|
||||
hasExistingLyrics={hasExistingLyrics}
|
||||
/>
|
||||
|
||||
@@ -265,86 +219,6 @@ export default function ReplaceAllLyricsModal({
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* Replace Segment Lyrics Modal */}
|
||||
<Dialog open={open && mode === 'replaceSegments'} onOpenChange={(isOpen) => !isOpen && handleClose()}>
|
||||
<DialogContent className="max-w-2xl h-[80vh] max-h-[80vh] flex flex-col">
|
||||
<DialogHeader>
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Button variant="ghost" size="icon" onClick={handleBackToSelection} className="h-8 w-8">
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
<span className="flex-1">Replace Segment Lyrics</span>
|
||||
<Button variant="ghost" size="icon" onClick={handleClose} className="h-8 w-8">
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-hidden flex flex-col gap-4">
|
||||
<div className="flex items-start gap-2 p-3 rounded-md bg-muted/50 text-sm text-muted-foreground">
|
||||
<Info className="h-4 w-4 mt-0.5 shrink-0" />
|
||||
<p>
|
||||
Edit lyrics line by line. Each line corresponds to a timed segment.
|
||||
The number of lines must stay the same (currently: {replaceSegmentsInfo.expectedLineCount} lines).
|
||||
Changed lines will get new word timing estimated from the segment duration.
|
||||
Unchanged lines are left as-is.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Button variant="outline" size="sm" onClick={handlePasteFromClipboard}>
|
||||
<ClipboardPaste className="h-4 w-4 mr-2" />
|
||||
Paste from Clipboard
|
||||
</Button>
|
||||
<span className={`text-sm font-medium ${replaceSegmentsInfo.lineDiff === 0 ? 'text-green-500' : 'text-destructive'}`}>
|
||||
{replaceSegmentsInfo.lineDiff === 0 ? (
|
||||
<span className="flex items-center gap-1">
|
||||
<Check className="h-4 w-4" />
|
||||
{replaceSegmentsInfo.currentLineCount}/{replaceSegmentsInfo.expectedLineCount} lines
|
||||
</span>
|
||||
) : (
|
||||
<span className="flex items-center gap-1">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
{replaceSegmentsInfo.currentLineCount}/{replaceSegmentsInfo.expectedLineCount} lines
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Textarea
|
||||
value={inputText}
|
||||
onChange={(e) => setInputText(e.target.value)}
|
||||
placeholder="Edit lyrics line by line..."
|
||||
className="flex-1 resize-none font-mono text-sm min-h-[300px]"
|
||||
/>
|
||||
|
||||
{replaceSegmentsInfo.lineDiff !== 0 && (
|
||||
<div className="flex items-start gap-2 p-3 rounded-md bg-destructive/10 text-sm text-destructive">
|
||||
<AlertTriangle className="h-4 w-4 mt-0.5 shrink-0" />
|
||||
<p>
|
||||
You have {Math.abs(replaceSegmentsInfo.lineDiff)} too{' '}
|
||||
{replaceSegmentsInfo.lineDiff > 0 ? 'many' : 'few'} lines (expected{' '}
|
||||
{replaceSegmentsInfo.expectedLineCount}, got {replaceSegmentsInfo.currentLineCount}).
|
||||
Each line maps to a timed segment, so the count must match exactly.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={handleClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleApplyReplaceSegments}
|
||||
disabled={replaceSegmentsInfo.lineDiff !== 0}
|
||||
>
|
||||
Apply
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* Synchronizer Modal */}
|
||||
<Dialog open={open && mode === 'resync'} onOpenChange={(isOpen) => !isOpen && handleClose()}>
|
||||
<DialogContent className="max-w-[calc(100vw-4vw)] w-[calc(100vw-4vw)] h-[90vh] max-h-[90vh] flex flex-col">
|
||||
|
||||
@@ -418,9 +418,10 @@ test.describe('Admin Job Detail Page', () => {
|
||||
// Reset buttons are now in a toolbar (not accordion) labeled "Reset to:"
|
||||
await expect(page.getByText('Reset to:')).toBeVisible();
|
||||
// Check the reset buttons are visible in the toolbar
|
||||
// Note: "Start" and "Inst." were removed; "Lyrics" renamed to "Review"
|
||||
await expect(page.locator('button:has-text("Start")').first()).toBeVisible();
|
||||
await expect(page.locator('button:has-text("Audio")').first()).toBeVisible();
|
||||
await expect(page.locator('button:has-text("Review")').first()).toBeVisible();
|
||||
await expect(page.locator('button:has-text("Lyrics")').first()).toBeVisible();
|
||||
await expect(page.locator('button:has-text("Inst.")').first()).toBeVisible();
|
||||
await expect(page.locator('button:has-text("Reprocess")').first()).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -437,8 +438,8 @@ test.describe('Admin Job Detail Page', () => {
|
||||
await page.goto('/admin/jobs?id=test-job-123');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Click a reset button (Audio = reset to awaiting_audio_selection)
|
||||
await page.locator('button:has-text("Audio")').first().click();
|
||||
// Click a reset button (Start = reset to pending)
|
||||
await page.locator('button:has-text("Start")').first().click();
|
||||
|
||||
// Should show confirmation dialog
|
||||
await expect(page.getByRole('alertdialog')).toBeVisible();
|
||||
@@ -447,7 +448,121 @@ test.describe('Admin Job Detail Page', () => {
|
||||
await expect(page.getByRole('button', { name: 'Reset' })).toBeVisible();
|
||||
});
|
||||
|
||||
// Note: "Clear Workers" tests removed - feature replaced by Full Restart + Regen Screens
|
||||
test('clear workers button is visible in toolbar', async ({ page }) => {
|
||||
// Mock job with complete worker progress (typical state when workers need clearing)
|
||||
const jobWithWorkerProgress = {
|
||||
...mockJob,
|
||||
state_data: {
|
||||
...mockJob.state_data,
|
||||
render_progress: { stage: 'complete' },
|
||||
video_progress: { stage: 'complete' },
|
||||
encoding_progress: { stage: 'complete' },
|
||||
},
|
||||
};
|
||||
|
||||
await setupApiFixtures(page, {
|
||||
mocks: [
|
||||
{ method: 'GET', path: '/api/users/me', response: { body: mockAdminUser } },
|
||||
{ method: 'GET', path: '/api/jobs', response: { body: [] } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123', response: { body: jobWithWorkerProgress } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123/logs', response: { body: mockLogs } },
|
||||
],
|
||||
});
|
||||
|
||||
await page.goto('/admin/jobs?id=test-job-123');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Clear Workers button should be visible in the toolbar (near Del Outputs, Delete Job)
|
||||
await expect(page.locator('button:has-text("Clear Workers")')).toBeVisible();
|
||||
});
|
||||
|
||||
test('clear workers button calls API endpoint', async ({ page }) => {
|
||||
// Mock successful clear workers response
|
||||
const clearWorkersResponse = {
|
||||
status: 'success',
|
||||
job_id: 'test-job-123',
|
||||
message: 'Cleared 3 worker progress keys',
|
||||
cleared_keys: ['render_progress', 'video_progress', 'encoding_progress'],
|
||||
};
|
||||
|
||||
// Track API calls
|
||||
let clearWorkersApiCalled = false;
|
||||
|
||||
await setupApiFixtures(page, {
|
||||
mocks: [
|
||||
{ method: 'GET', path: '/api/users/me', response: { body: mockAdminUser } },
|
||||
{ method: 'GET', path: '/api/jobs', response: { body: [] } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123', response: { body: mockJob } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123/logs', response: { body: mockLogs } },
|
||||
{ method: 'POST', path: '/api/admin/jobs/test-job-123/clear-workers', response: { body: clearWorkersResponse } },
|
||||
],
|
||||
});
|
||||
|
||||
// Also track when the clear-workers endpoint is called
|
||||
await page.route('**/api/admin/jobs/*/clear-workers', async (route) => {
|
||||
clearWorkersApiCalled = true;
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify(clearWorkersResponse),
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto('/admin/jobs?id=test-job-123');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Click Clear Workers button in toolbar
|
||||
await page.locator('button:has-text("Clear Workers")').click();
|
||||
|
||||
// Wait a bit for the API call to complete
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// Verify the API was called
|
||||
expect(clearWorkersApiCalled).toBe(true);
|
||||
});
|
||||
|
||||
test('clear workers button shows loading state while processing', async ({ page }) => {
|
||||
// Mock slow clear workers response
|
||||
const clearWorkersResponse = {
|
||||
status: 'success',
|
||||
job_id: 'test-job-123',
|
||||
message: 'Cleared 3 worker progress keys',
|
||||
cleared_keys: ['render_progress', 'video_progress', 'encoding_progress'],
|
||||
};
|
||||
|
||||
await setupApiFixtures(page, {
|
||||
mocks: [
|
||||
{ method: 'GET', path: '/api/users/me', response: { body: mockAdminUser } },
|
||||
{ method: 'GET', path: '/api/jobs', response: { body: [] } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123', response: { body: mockJob } },
|
||||
{ method: 'GET', path: '/api/jobs/test-job-123/logs', response: { body: mockLogs } },
|
||||
],
|
||||
});
|
||||
|
||||
// Add delayed response for clear-workers
|
||||
await page.route('**/api/admin/jobs/*/clear-workers', async (route) => {
|
||||
// Delay response to test loading state
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify(clearWorkersResponse),
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto('/admin/jobs?id=test-job-123');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Get the Clear Workers button
|
||||
const clearWorkersButton = page.locator('button:has-text("Clear Workers")');
|
||||
|
||||
// Click it and immediately check for disabled state
|
||||
await clearWorkersButton.click();
|
||||
|
||||
// Button should be disabled during processing (has spinning icon)
|
||||
// The button contains a RefreshCw icon that animates when clearingWorkers is true
|
||||
await expect(clearWorkersButton).toBeDisabled({ timeout: 500 });
|
||||
});
|
||||
|
||||
test('delete outputs button shows confirmation dialog', async ({ page }) => {
|
||||
await setupApiFixtures(page, {
|
||||
|
||||
@@ -103,16 +103,9 @@ const mockJobData = {
|
||||
};
|
||||
|
||||
const mockUserData = {
|
||||
user: {
|
||||
email: 'test@example.com',
|
||||
name: 'Test User',
|
||||
role: 'user',
|
||||
credits: 10,
|
||||
display_name: 'Test User',
|
||||
total_jobs_created: 5,
|
||||
total_jobs_completed: 3,
|
||||
},
|
||||
has_session: true,
|
||||
email: 'test@example.com',
|
||||
name: 'Test User',
|
||||
role: 'user',
|
||||
};
|
||||
|
||||
// Setup function to configure mocks for cloud mode
|
||||
@@ -154,45 +147,6 @@ async function setupCloudModeMocks(page: Page) {
|
||||
path: `/api/review/${TEST_JOB_ID}/audio/test_audio_hash_cloud`,
|
||||
response: { status: 200, body: '' },
|
||||
},
|
||||
// Instrumental analysis endpoint (for instrumental route)
|
||||
{
|
||||
method: 'GET',
|
||||
path: `/api/review/${TEST_JOB_ID}/instrumental-analysis`,
|
||||
response: {
|
||||
body: {
|
||||
job_id: TEST_JOB_ID,
|
||||
artist: 'Test Artist',
|
||||
title: 'Test Song',
|
||||
duration_seconds: 180,
|
||||
analysis: {
|
||||
has_audible_content: false,
|
||||
total_duration_seconds: 180,
|
||||
audible_segments: [],
|
||||
recommended_selection: 'clean',
|
||||
total_audible_duration_seconds: 0,
|
||||
audible_percentage: 0,
|
||||
silence_threshold_db: -40,
|
||||
},
|
||||
audio_urls: {
|
||||
clean: 'https://storage.example.com/clean.flac',
|
||||
with_backing: 'https://storage.example.com/with_backing.flac',
|
||||
},
|
||||
has_original: true,
|
||||
has_uploaded_instrumental: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
// Waveform data endpoint (for instrumental route)
|
||||
{
|
||||
method: 'GET',
|
||||
path: `/api/review/${TEST_JOB_ID}/waveform-data`,
|
||||
response: {
|
||||
body: {
|
||||
amplitudes: Array(100).fill(0.5),
|
||||
duration_seconds: 180,
|
||||
},
|
||||
},
|
||||
},
|
||||
// User endpoint (for auth)
|
||||
{
|
||||
method: 'GET',
|
||||
@@ -225,7 +179,7 @@ test.describe('Cloud Mode - Hash Route Parsing', () => {
|
||||
});
|
||||
|
||||
test('parses hash-based instrumental route correctly', async ({ page }) => {
|
||||
// Update mock to include instrumental analysis endpoints
|
||||
// Update mock to include instrumental options for the job in instrumental state
|
||||
await setupApiFixtures(page, {
|
||||
mocks: [
|
||||
{
|
||||
@@ -238,43 +192,6 @@ test.describe('Cloud Mode - Hash Route Parsing', () => {
|
||||
path: `/api/review/${TEST_JOB_ID}/correction-data`,
|
||||
response: { body: mockCorrectionData },
|
||||
},
|
||||
{
|
||||
method: 'GET',
|
||||
path: `/api/review/${TEST_JOB_ID}/instrumental-analysis`,
|
||||
response: {
|
||||
body: {
|
||||
job_id: TEST_JOB_ID,
|
||||
artist: 'Test Artist',
|
||||
title: 'Test Song',
|
||||
duration_seconds: 180,
|
||||
analysis: {
|
||||
has_audible_content: false,
|
||||
total_duration_seconds: 180,
|
||||
audible_segments: [],
|
||||
recommended_selection: 'clean',
|
||||
total_audible_duration_seconds: 0,
|
||||
audible_percentage: 0,
|
||||
silence_threshold_db: -40,
|
||||
},
|
||||
audio_urls: {
|
||||
clean: 'https://storage.example.com/clean.flac',
|
||||
with_backing: 'https://storage.example.com/with_backing.flac',
|
||||
},
|
||||
has_original: true,
|
||||
has_uploaded_instrumental: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
method: 'GET',
|
||||
path: `/api/review/${TEST_JOB_ID}/waveform-data`,
|
||||
response: {
|
||||
body: {
|
||||
amplitudes: Array(100).fill(0.5),
|
||||
duration_seconds: 180,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
method: 'GET',
|
||||
path: '/api/users/me',
|
||||
@@ -293,7 +210,7 @@ test.describe('Cloud Mode - Hash Route Parsing', () => {
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Should show the instrumental selection UI (not "Page not found")
|
||||
await expect(page.getByText('Instrumental Review')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('h1')).toContainText('Instrumental Selection', { timeout: 10000 });
|
||||
});
|
||||
|
||||
test('invalid hash route shows page not found', async ({ page }) => {
|
||||
@@ -380,7 +297,7 @@ test.describe('Cloud Mode - Navigation Flow', () => {
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
// Should now show instrumental UI
|
||||
await expect(page.getByText('Instrumental Review')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('h1')).toContainText('Instrumental Selection', { timeout: 10000 });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -499,7 +416,7 @@ test.describe('Cloud Mode - Instrumental Audio Loading', () => {
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Should show the instrumental selection UI
|
||||
await expect(page.getByText('Instrumental Review')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('h1')).toContainText('Instrumental Selection', { timeout: 10000 });
|
||||
|
||||
// Wait for UI to fully load
|
||||
await page.waitForTimeout(1000);
|
||||
@@ -590,7 +507,7 @@ test.describe('Cloud Mode - Instrumental Audio Loading', () => {
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Should show the instrumental selection UI
|
||||
await expect(page.getByText('Instrumental Review')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('h1')).toContainText('Instrumental Selection', { timeout: 10000 });
|
||||
|
||||
// Find audio tabs
|
||||
const originalTab = page.getByRole('button', { name: /^original$/i });
|
||||
|
||||
@@ -102,16 +102,9 @@ const mockJobData = {
|
||||
};
|
||||
|
||||
const mockUserData = {
|
||||
user: {
|
||||
email: 'test@example.com',
|
||||
name: 'Test User',
|
||||
role: 'user',
|
||||
credits: 10,
|
||||
display_name: 'Test User',
|
||||
total_jobs_created: 5,
|
||||
total_jobs_completed: 3,
|
||||
},
|
||||
has_session: true,
|
||||
email: 'test@example.com',
|
||||
name: 'Test User',
|
||||
role: 'user',
|
||||
};
|
||||
|
||||
const mockInstrumentalAnalysis = {
|
||||
@@ -173,7 +166,7 @@ test.describe('Combined Review Corrections Preservation', () => {
|
||||
}
|
||||
});
|
||||
|
||||
await setAuthToken(page, 'test-token-123');
|
||||
await setAuthToken(page);
|
||||
});
|
||||
|
||||
test.afterEach(async ({ page }) => {
|
||||
@@ -296,7 +289,7 @@ test.describe('Combined Review Corrections Preservation', () => {
|
||||
// Audio endpoint
|
||||
{
|
||||
method: 'GET',
|
||||
path: `/api/review/${TEST_JOB_ID}/audio/:audioHash`,
|
||||
path: new RegExp(`/api/review/${TEST_JOB_ID}/audio`),
|
||||
response: { status: 200, body: '' },
|
||||
},
|
||||
],
|
||||
@@ -388,7 +381,7 @@ test.describe('Combined Review Corrections Preservation', () => {
|
||||
|
||||
test.describe('Regression Prevention', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await setAuthToken(page, 'test-token-123');
|
||||
await setAuthToken(page);
|
||||
});
|
||||
|
||||
test.afterEach(async ({ page }) => {
|
||||
|
||||
@@ -463,8 +463,8 @@ test.describe('Lyrics Review - Edit Operations', () => {
|
||||
const dialog = page.locator('[role="dialog"]');
|
||||
await expect(dialog).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Find the first start time input (labeled "Start") - multiple segments may have one
|
||||
const startInput = dialog.getByLabel('Start').first();
|
||||
// Find the start time input (labeled "Start")
|
||||
const startInput = dialog.getByLabel('Start');
|
||||
await expect(startInput).toBeVisible();
|
||||
|
||||
// Click into the input to focus it
|
||||
@@ -477,7 +477,7 @@ test.describe('Lyrics Review - Edit Operations', () => {
|
||||
await expect(startInput).toHaveValue('12.34');
|
||||
|
||||
// Test end time input as well
|
||||
const endInput = dialog.getByLabel('End').first();
|
||||
const endInput = dialog.getByLabel('End');
|
||||
await expect(endInput).toBeVisible();
|
||||
|
||||
await endInput.click();
|
||||
@@ -566,7 +566,7 @@ test.describe('Lyrics Review - Complete Review Flow', () => {
|
||||
await expect(dialog).toBeVisible({ timeout: 10000 });
|
||||
|
||||
// Look for Complete Review button in modal
|
||||
const completeBtn = dialog.getByRole('button', { name: /proceed to instrumental review/i });
|
||||
const completeBtn = dialog.getByRole('button', { name: /complete review/i });
|
||||
if (await completeBtn.isVisible({ timeout: 5000 }).catch(() => false)) {
|
||||
await completeBtn.click();
|
||||
// Should submit and close
|
||||
@@ -655,11 +655,11 @@ test.describe('Lyrics Review - Submit UX', () => {
|
||||
await setupSubmitFlowMocks(page);
|
||||
});
|
||||
|
||||
test('proceed button navigates to instrumental review in local mode', async ({ page }) => {
|
||||
test('success screen shows after submission in local mode', async ({ page }) => {
|
||||
await page.goto('/app/jobs/local/review');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Open preview modal
|
||||
// Open preview modal and submit
|
||||
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
|
||||
const previewBtn = page.getByRole('button', { name: /preview video/i });
|
||||
await expect(previewBtn).toBeVisible({ timeout: 10000 });
|
||||
@@ -668,14 +668,14 @@ test.describe('Lyrics Review - Submit UX', () => {
|
||||
const dialog = page.locator('[role="dialog"]');
|
||||
await expect(dialog).toBeVisible({ timeout: 10000 });
|
||||
|
||||
await dialog.getByRole('button', { name: /proceed to instrumental review/i }).click();
|
||||
await dialog.getByRole('button', { name: /complete review/i }).click();
|
||||
|
||||
// Should navigate to instrumental review page
|
||||
await page.waitForURL('**/instrumental**', { timeout: 10000 });
|
||||
expect(page.url()).toContain('/instrumental');
|
||||
// Wait for success screen
|
||||
await expect(page.getByText('Review Submitted')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.getByText(/Closing in \d+s/)).toBeVisible();
|
||||
});
|
||||
|
||||
test('proceed button is enabled and clickable in preview modal', async ({ page }) => {
|
||||
test('submit button becomes disabled when clicked', async ({ page }) => {
|
||||
await page.goto('/app/jobs/local/review');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
@@ -688,16 +688,18 @@ test.describe('Lyrics Review - Submit UX', () => {
|
||||
const dialog = page.locator('[role="dialog"]');
|
||||
await expect(dialog).toBeVisible({ timeout: 10000 });
|
||||
|
||||
const proceedBtn = dialog.getByRole('button', { name: /proceed to instrumental review/i });
|
||||
await expect(proceedBtn).toBeVisible({ timeout: 5000 });
|
||||
const completeBtn = dialog.getByRole('button', { name: /complete review/i });
|
||||
await expect(completeBtn).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Verify button is enabled before click
|
||||
await expect(proceedBtn).toBeEnabled();
|
||||
await expect(completeBtn).toBeEnabled();
|
||||
|
||||
// Click navigates to instrumental review
|
||||
await proceedBtn.click();
|
||||
await page.waitForURL('**/instrumental**', { timeout: 10000 });
|
||||
expect(page.url()).toContain('/instrumental');
|
||||
// Click the button
|
||||
await completeBtn.click();
|
||||
|
||||
// Transition should occur - either loading state or success screen
|
||||
// We can verify we reach the success screen
|
||||
await expect(page.getByText('Review Submitted')).toBeVisible({ timeout: 10000 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
import { setupApiFixtures, clearAuthToken } from '../fixtures/test-helper';
|
||||
|
||||
/**
|
||||
* Replace Segment Lyrics E2E Tests
|
||||
*
|
||||
* Tests the "Replace Segment Lyrics" mode in Edit All Lyrics, which lets users
|
||||
* swap in custom lyrics line-by-line while preserving existing segment timing.
|
||||
*
|
||||
* To run these tests:
|
||||
* npx playwright test e2e/regression/replace-segments.spec.ts
|
||||
*/
|
||||
|
||||
const mockCorrectionData = {
|
||||
original_segments: [
|
||||
{
|
||||
id: 'seg_1',
|
||||
text: 'Hello world from the test',
|
||||
start_time: 0.0,
|
||||
end_time: 2.5,
|
||||
words: [
|
||||
{ id: 'word_1', text: 'Hello', start_time: 0.0, end_time: 0.5, confidence: 0.95 },
|
||||
{ id: 'word_2', text: 'world', start_time: 0.5, end_time: 1.0, confidence: 0.92 },
|
||||
{ id: 'word_3', text: 'from', start_time: 1.0, end_time: 1.5, confidence: 0.88 },
|
||||
{ id: 'word_4', text: 'the', start_time: 1.5, end_time: 2.0, confidence: 0.90 },
|
||||
{ id: 'word_5', text: 'test', start_time: 2.0, end_time: 2.5, confidence: 0.94 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg_2',
|
||||
text: 'This is another line',
|
||||
start_time: 3.0,
|
||||
end_time: 5.0,
|
||||
words: [
|
||||
{ id: 'word_6', text: 'This', start_time: 3.0, end_time: 3.5, confidence: 0.96 },
|
||||
{ id: 'word_7', text: 'is', start_time: 3.5, end_time: 4.0, confidence: 0.97 },
|
||||
{ id: 'word_8', text: 'another', start_time: 4.0, end_time: 4.5, confidence: 0.93 },
|
||||
{ id: 'word_9', text: 'line', start_time: 4.5, end_time: 5.0, confidence: 0.91 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg_3',
|
||||
text: 'Final segment here',
|
||||
start_time: 6.0,
|
||||
end_time: 8.0,
|
||||
words: [
|
||||
{ id: 'word_10', text: 'Final', start_time: 6.0, end_time: 6.7, confidence: 0.90 },
|
||||
{ id: 'word_11', text: 'segment', start_time: 6.7, end_time: 7.4, confidence: 0.91 },
|
||||
{ id: 'word_12', text: 'here', start_time: 7.4, end_time: 8.0, confidence: 0.92 },
|
||||
],
|
||||
},
|
||||
],
|
||||
corrected_segments: [
|
||||
{
|
||||
id: 'seg_1',
|
||||
text: 'Hello world from the test',
|
||||
start_time: 0.0,
|
||||
end_time: 2.5,
|
||||
words: [
|
||||
{ id: 'word_1', text: 'Hello', start_time: 0.0, end_time: 0.5, confidence: 0.95 },
|
||||
{ id: 'word_2', text: 'world', start_time: 0.5, end_time: 1.0, confidence: 0.92 },
|
||||
{ id: 'word_3', text: 'from', start_time: 1.0, end_time: 1.5, confidence: 0.88 },
|
||||
{ id: 'word_4', text: 'the', start_time: 1.5, end_time: 2.0, confidence: 0.90 },
|
||||
{ id: 'word_5', text: 'test', start_time: 2.0, end_time: 2.5, confidence: 0.94 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg_2',
|
||||
text: 'This is another line',
|
||||
start_time: 3.0,
|
||||
end_time: 5.0,
|
||||
words: [
|
||||
{ id: 'word_6', text: 'This', start_time: 3.0, end_time: 3.5, confidence: 0.96 },
|
||||
{ id: 'word_7', text: 'is', start_time: 3.5, end_time: 4.0, confidence: 0.97 },
|
||||
{ id: 'word_8', text: 'another', start_time: 4.0, end_time: 4.5, confidence: 0.93 },
|
||||
{ id: 'word_9', text: 'line', start_time: 4.5, end_time: 5.0, confidence: 0.91 },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'seg_3',
|
||||
text: 'Final segment here',
|
||||
start_time: 6.0,
|
||||
end_time: 8.0,
|
||||
words: [
|
||||
{ id: 'word_10', text: 'Final', start_time: 6.0, end_time: 6.7, confidence: 0.90 },
|
||||
{ id: 'word_11', text: 'segment', start_time: 6.7, end_time: 7.4, confidence: 0.91 },
|
||||
{ id: 'word_12', text: 'here', start_time: 7.4, end_time: 8.0, confidence: 0.92 },
|
||||
],
|
||||
},
|
||||
],
|
||||
reference_lyrics: {},
|
||||
anchor_sequences: [],
|
||||
gap_sequences: [],
|
||||
corrections: [],
|
||||
corrections_made: 0,
|
||||
confidence: 0.9,
|
||||
metadata: {
|
||||
anchor_sequences_count: 0,
|
||||
gap_sequences_count: 0,
|
||||
total_words: 12,
|
||||
correction_ratio: 0,
|
||||
audio_hash: 'test_audio_hash_123',
|
||||
artist: 'Test Artist',
|
||||
title: 'Test Song',
|
||||
available_handlers: [],
|
||||
enabled_handlers: [],
|
||||
},
|
||||
correction_steps: [],
|
||||
word_id_map: {},
|
||||
segment_id_map: {},
|
||||
resized_segments: [],
|
||||
};
|
||||
|
||||
const mockJobData = {
|
||||
job_id: 'local',
|
||||
status: 'awaiting_review',
|
||||
progress: 50,
|
||||
created_at: null,
|
||||
updated_at: null,
|
||||
artist: 'Test Artist',
|
||||
title: 'Test Song',
|
||||
user_email: 'local@localhost',
|
||||
audio_hash: 'test_audio_hash_123',
|
||||
};
|
||||
|
||||
async function setupLocalModeMocks(page: Page) {
|
||||
return setupApiFixtures(page, {
|
||||
mocks: [
|
||||
{ method: 'GET', path: '/api/jobs/local', response: { body: mockJobData } },
|
||||
{ method: 'GET', path: '/api/jobs/local/corrections', response: { body: mockCorrectionData } },
|
||||
{ method: 'GET', path: '/api/review/local/correction-data', response: { body: mockCorrectionData } },
|
||||
{ method: 'POST', path: '/api/jobs/local/corrections', response: { body: { status: 'success' } } },
|
||||
{ method: 'GET', path: '/api/audio/test_audio_hash_123', response: { status: 200, body: '' } },
|
||||
{ method: 'GET', path: '/api/review/local/audio/test_audio_hash_123', response: { status: 200, body: '' } },
|
||||
{ method: 'GET', path: '/api/tenant/config', response: { body: { tenant: null, is_default: true } } },
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
async function openReplaceSegmentsMode(page: Page) {
|
||||
await page.goto('/app/jobs/local/review');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Click "Edit All" button
|
||||
const editAllBtn = page.getByRole('button', { name: /edit all/i });
|
||||
await expect(editAllBtn).toBeVisible({ timeout: 10000 });
|
||||
await editAllBtn.click();
|
||||
|
||||
// Mode selection should appear
|
||||
await expect(page.getByText('Edit All Lyrics')).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Click "Replace Segment Lyrics"
|
||||
const replaceSegmentsCard = page.getByText('Replace Segment Lyrics');
|
||||
await expect(replaceSegmentsCard).toBeVisible();
|
||||
await replaceSegmentsCard.click();
|
||||
|
||||
// Wait for replace segments dialog
|
||||
await expect(page.getByText('Edit lyrics line by line')).toBeVisible({ timeout: 5000 });
|
||||
}
|
||||
|
||||
test.describe('Replace Segment Lyrics', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await clearAuthToken(page);
|
||||
await setupLocalModeMocks(page);
|
||||
});
|
||||
|
||||
test('shows Replace Segment Lyrics option in mode selection', async ({ page }) => {
|
||||
await page.goto('/app/jobs/local/review');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
const editAllBtn = page.getByRole('button', { name: /edit all/i });
|
||||
await expect(editAllBtn).toBeVisible({ timeout: 10000 });
|
||||
await editAllBtn.click();
|
||||
|
||||
// Should see all three options
|
||||
await expect(page.getByText('Re-sync Existing Lyrics')).toBeVisible();
|
||||
await expect(page.getByText('Replace Segment Lyrics')).toBeVisible();
|
||||
await expect(page.getByText('Replace All Lyrics')).toBeVisible();
|
||||
await expect(page.getByText('Recommended for custom lyrics')).toBeVisible();
|
||||
});
|
||||
|
||||
test('textarea shows existing lyrics pre-filled', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const textarea = page.getByRole('textbox');
|
||||
await expect(textarea).toHaveValue(
|
||||
'Hello world from the test\nThis is another line\nFinal segment here'
|
||||
);
|
||||
});
|
||||
|
||||
test('shows matching line count when correct', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
await expect(page.getByText('3/3 lines')).toBeVisible();
|
||||
});
|
||||
|
||||
test('Apply is enabled when line count matches', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const applyBtn = page.getByRole('button', { name: 'Apply' });
|
||||
await expect(applyBtn).toBeEnabled();
|
||||
});
|
||||
|
||||
test('disables Apply and shows error when extra line added', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const textarea = page.getByRole('textbox');
|
||||
// Add an extra line
|
||||
await textarea.fill(
|
||||
'Hello world from the test\nThis is another line\nFinal segment here\nExtra line'
|
||||
);
|
||||
|
||||
const applyBtn = page.getByRole('button', { name: 'Apply' });
|
||||
await expect(applyBtn).toBeDisabled();
|
||||
await expect(page.getByText(/1 too many/)).toBeVisible();
|
||||
await expect(page.getByText('4/3 lines')).toBeVisible();
|
||||
});
|
||||
|
||||
test('disables Apply and shows error when line removed', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const textarea = page.getByRole('textbox');
|
||||
await textarea.fill('Hello world from the test\nThis is another line');
|
||||
|
||||
const applyBtn = page.getByRole('button', { name: 'Apply' });
|
||||
await expect(applyBtn).toBeDisabled();
|
||||
await expect(page.getByText(/1 too few/)).toBeVisible();
|
||||
});
|
||||
|
||||
test('Apply updates modified segment lyrics in the UI', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const textarea = page.getByRole('textbox');
|
||||
await textarea.fill(
|
||||
'Hello world from the test\nCustom parody lyrics now\nFinal segment here'
|
||||
);
|
||||
|
||||
const applyBtn = page.getByRole('button', { name: 'Apply' });
|
||||
await expect(applyBtn).toBeEnabled();
|
||||
await applyBtn.click();
|
||||
|
||||
// Dialog should close
|
||||
await expect(page.getByText('Edit lyrics line by line')).not.toBeVisible();
|
||||
|
||||
// The modified line should appear in the lyrics view
|
||||
await expect(page.getByText('Custom')).toBeVisible({ timeout: 5000 });
|
||||
await expect(page.getByText('parody')).toBeVisible();
|
||||
|
||||
// Unchanged lines should still be there
|
||||
await expect(page.getByText('Hello')).toBeVisible();
|
||||
await expect(page.getByText('Final')).toBeVisible();
|
||||
});
|
||||
|
||||
test('re-enables Apply after fixing line count mismatch', async ({ page }) => {
|
||||
await openReplaceSegmentsMode(page);
|
||||
|
||||
const textarea = page.getByRole('textbox');
|
||||
// Add extra line
|
||||
await textarea.fill(
|
||||
'Hello world from the test\nThis is another line\nFinal segment here\nExtra'
|
||||
);
|
||||
await expect(page.getByRole('button', { name: 'Apply' })).toBeDisabled();
|
||||
|
||||
// Fix it back to 3 lines
|
||||
await textarea.fill(
|
||||
'Hello world from the test\nThis is another line\nFinal segment here'
|
||||
);
|
||||
await expect(page.getByRole('button', { name: 'Apply' })).toBeEnabled();
|
||||
});
|
||||
});
|
||||
@@ -11,7 +11,6 @@ const customJestConfig = {
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/$1',
|
||||
'^nanoid$': '<rootDir>/node_modules/nanoid/index.cjs',
|
||||
},
|
||||
testMatch: [
|
||||
'**/__tests__/**/*.test.[jt]s?(x)',
|
||||
|
||||
@@ -27,11 +27,3 @@ global.IntersectionObserver = class IntersectionObserver {
|
||||
unobserve() {}
|
||||
}
|
||||
|
||||
// Mock ResizeObserver
|
||||
global.ResizeObserver = class ResizeObserver {
|
||||
constructor() {}
|
||||
disconnect() {}
|
||||
observe() {}
|
||||
unobserve() {}
|
||||
}
|
||||
|
||||
@@ -52,66 +52,6 @@ describe("API Client", () => {
|
||||
expect(callArgs).toContain("status=complete")
|
||||
expect(callArgs).toContain("limit=10")
|
||||
})
|
||||
|
||||
it("should send fields=summary query param", async () => {
|
||||
;(global.fetch as jest.Mock).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => [],
|
||||
})
|
||||
|
||||
await api.listJobs({ fields: "summary", limit: 100 })
|
||||
const callArgs = (global.fetch as jest.Mock).mock.calls[0][0]
|
||||
expect(callArgs).toContain("fields=summary")
|
||||
})
|
||||
|
||||
it("should send hide_completed=true query param", async () => {
|
||||
;(global.fetch as jest.Mock).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => [],
|
||||
})
|
||||
|
||||
await api.listJobs({ fields: "summary", hide_completed: true })
|
||||
const callArgs = (global.fetch as jest.Mock).mock.calls[0][0]
|
||||
expect(callArgs).toContain("hide_completed=true")
|
||||
})
|
||||
|
||||
it("should not send hide_completed when undefined", async () => {
|
||||
;(global.fetch as jest.Mock).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => [],
|
||||
})
|
||||
|
||||
await api.listJobs({ fields: "summary" })
|
||||
const callArgs = (global.fetch as jest.Mock).mock.calls[0][0]
|
||||
expect(callArgs).not.toContain("hide_completed")
|
||||
})
|
||||
|
||||
it("should handle summary response with partial job data", async () => {
|
||||
const summaryJobs = [
|
||||
{
|
||||
job_id: "abc",
|
||||
status: "pending",
|
||||
progress: 0,
|
||||
created_at: "2026-01-01T00:00:00",
|
||||
artist: "Test",
|
||||
title: "Song",
|
||||
state_data: { brand_code: "NKP" },
|
||||
file_urls: { finals: {} },
|
||||
},
|
||||
]
|
||||
|
||||
;(global.fetch as jest.Mock).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => summaryJobs,
|
||||
})
|
||||
|
||||
const result = await api.listJobs({ fields: "summary" })
|
||||
expect(result).toHaveLength(1)
|
||||
expect(result[0].job_id).toBe("abc")
|
||||
// Summary jobs may have missing optional fields
|
||||
expect(result[0].timeline).toBeUndefined()
|
||||
expect(result[0].review_token).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe("getJob", () => {
|
||||
|
||||
+1
-9
@@ -269,19 +269,11 @@ export const api = {
|
||||
/**
|
||||
* List all jobs
|
||||
*/
|
||||
async listJobs(params?: {
|
||||
status?: string;
|
||||
limit?: number;
|
||||
exclude_test?: boolean;
|
||||
fields?: 'summary';
|
||||
hide_completed?: boolean;
|
||||
}): Promise<Job[]> {
|
||||
async listJobs(params?: { status?: string; limit?: number; exclude_test?: boolean }): Promise<Job[]> {
|
||||
const searchParams = new URLSearchParams();
|
||||
if (params?.status) searchParams.set('status', params.status);
|
||||
if (params?.limit) searchParams.set('limit', String(params.limit));
|
||||
if (params?.exclude_test !== undefined) searchParams.set('exclude_test', String(params.exclude_test));
|
||||
if (params?.fields) searchParams.set('fields', params.fields);
|
||||
if (params?.hide_completed !== undefined) searchParams.set('hide_completed', String(params.hide_completed));
|
||||
|
||||
const url = `${API_BASE_URL}/api/jobs${searchParams.toString() ? '?' + searchParams.toString() : ''}`;
|
||||
const response = await fetch(url, {
|
||||
|
||||
@@ -292,42 +292,3 @@ export function sortJobsByPriority(jobs: Job[]): Job[] {
|
||||
return new Date(b.created_at).getTime() - new Date(a.created_at).getTime();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Select which jobs to display from a sorted list, ensuring all incomplete
|
||||
* jobs (blocking + processing) are always visible even if they exceed the
|
||||
* display limit. Completed/failed jobs fill remaining slots.
|
||||
*
|
||||
* @param sortedJobs - Jobs already sorted by sortJobsByPriority
|
||||
* @param displayLimit - Max jobs to show (-1 = show all)
|
||||
* @returns Object with displayedJobs array and totalFetched count
|
||||
*/
|
||||
export function getDisplayJobs(
|
||||
sortedJobs: Job[],
|
||||
displayLimit: number,
|
||||
hideCompleted: boolean = false
|
||||
): { displayedJobs: Job[]; totalFetched: number } {
|
||||
const totalFetched = sortedJobs.length;
|
||||
|
||||
// Filter out completed/failed jobs when toggle is on
|
||||
const filteredJobs = hideCompleted
|
||||
? sortedJobs.filter((job) => getJobPriority(job) <= 1)
|
||||
: sortedJobs;
|
||||
|
||||
// Show all: -1 or fewer jobs than limit
|
||||
if (displayLimit === -1 || filteredJobs.length <= displayLimit) {
|
||||
return { displayedJobs: filteredJobs, totalFetched };
|
||||
}
|
||||
|
||||
// Count incomplete jobs (priority 0 = blocking, 1 = processing)
|
||||
const incompleteCount = filteredJobs.filter(
|
||||
(job) => getJobPriority(job) <= 1
|
||||
).length;
|
||||
|
||||
// Show at least displayLimit jobs, but expand if there are more incomplete
|
||||
const showCount = Math.max(displayLimit, incompleteCount);
|
||||
return {
|
||||
displayedJobs: filteredJobs.slice(0, showCount),
|
||||
totalFetched,
|
||||
};
|
||||
}
|
||||
@@ -42,8 +42,7 @@ export function isLocalMode(): boolean {
|
||||
|
||||
// If using hash-based routing (cloud mode pattern), it's NOT local mode
|
||||
// Cloud mode uses: /app/jobs/#/{jobId}/review or /app/jobs/#/{jobId}/instrumental
|
||||
// Any hash starting with #/ indicates cloud mode routing (even for invalid routes)
|
||||
if (hash && hash.startsWith('#/')) {
|
||||
if (hash && hash.match(/^#\/?[^/]+\/(review|instrumental)/)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { splitWordWithTiming, createWordsWithDistributedTiming, findWordById, getWordsFromIds } from '../wordUtils'
|
||||
import { splitWordWithTiming, findWordById, getWordsFromIds } from '../wordUtils'
|
||||
import { LyricsSegment } from '../../types'
|
||||
|
||||
describe('splitWordWithTiming', () => {
|
||||
@@ -162,63 +162,6 @@ describe('splitWordWithTiming', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('createWordsWithDistributedTiming', () => {
|
||||
it('distributes timing equally for 3 words across 0-3s', () => {
|
||||
const result = createWordsWithDistributedTiming('one two three', 0, 3)
|
||||
|
||||
expect(result).toHaveLength(3)
|
||||
expect(result[0]).toMatchObject({ text: 'one', start_time: 0, end_time: 1, confidence: 1.0 })
|
||||
expect(result[1]).toMatchObject({ text: 'two', start_time: 1, end_time: 2, confidence: 1.0 })
|
||||
expect(result[2]).toMatchObject({ text: 'three', start_time: 2, end_time: 3, confidence: 1.0 })
|
||||
})
|
||||
|
||||
it('single word fills entire segment', () => {
|
||||
const result = createWordsWithDistributedTiming('hello', 5, 8)
|
||||
|
||||
expect(result).toHaveLength(1)
|
||||
expect(result[0]).toMatchObject({ text: 'hello', start_time: 5, end_time: 8 })
|
||||
})
|
||||
|
||||
it('returns empty array for empty text', () => {
|
||||
const result = createWordsWithDistributedTiming('', 0, 3)
|
||||
expect(result).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('returns empty array for whitespace-only text', () => {
|
||||
const result = createWordsWithDistributedTiming(' \t ', 0, 3)
|
||||
expect(result).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('defaults to 0-1s when timing is null', () => {
|
||||
const result = createWordsWithDistributedTiming('hello world', null, null)
|
||||
|
||||
expect(result).toHaveLength(2)
|
||||
expect(result[0]).toMatchObject({ text: 'hello', start_time: 0, end_time: 0.5 })
|
||||
expect(result[1]).toMatchObject({ text: 'world', start_time: 0.5, end_time: 1 })
|
||||
})
|
||||
|
||||
it('defaults start to 0 and end to 1 when only start is null', () => {
|
||||
const result = createWordsWithDistributedTiming('a b', null, null)
|
||||
|
||||
expect(result[0].start_time).toBe(0)
|
||||
expect(result[1].end_time).toBe(1)
|
||||
})
|
||||
|
||||
it('generates unique IDs for each word', () => {
|
||||
const result = createWordsWithDistributedTiming('a b c', 0, 3)
|
||||
const ids = result.map((w) => w.id)
|
||||
expect(new Set(ids).size).toBe(3)
|
||||
})
|
||||
|
||||
it('handles extra whitespace between words', () => {
|
||||
const result = createWordsWithDistributedTiming(' hello world ', 0, 2)
|
||||
|
||||
expect(result).toHaveLength(2)
|
||||
expect(result[0].text).toBe('hello')
|
||||
expect(result[1].text).toBe('world')
|
||||
})
|
||||
})
|
||||
|
||||
describe('findWordById', () => {
|
||||
const mockSegments: LyricsSegment[] = [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { nanoid } from 'nanoid'
|
||||
import { Word, LyricsSegment } from '../types'
|
||||
|
||||
/**
|
||||
@@ -51,32 +50,6 @@ export function splitWordWithTiming(
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Word objects with evenly distributed timing across a segment's duration.
|
||||
* Used when replacing segment text while preserving the segment's time range.
|
||||
*/
|
||||
export function createWordsWithDistributedTiming(
|
||||
text: string,
|
||||
segStart: number | null,
|
||||
segEnd: number | null
|
||||
): Word[] {
|
||||
const wordTexts = text.trim().split(/\s+/).filter((w) => w.length > 0)
|
||||
if (wordTexts.length === 0) return []
|
||||
|
||||
const start = segStart ?? 0
|
||||
const end = segEnd ?? start + 1
|
||||
const totalDuration = end - start
|
||||
const wordDuration = totalDuration / wordTexts.length
|
||||
|
||||
return wordTexts.map((text, index) => ({
|
||||
id: nanoid(),
|
||||
text,
|
||||
start_time: start + index * wordDuration,
|
||||
end_time: start + (index + 1) * wordDuration,
|
||||
confidence: 1.0,
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an array of word IDs to their corresponding Word objects
|
||||
* Filters out any IDs that don't match to valid words
|
||||
|
||||
@@ -21,10 +21,7 @@ if (fs.existsSync(envLocalPath)) {
|
||||
// Configurable port for dev server (default: 3000)
|
||||
// Use E2E_PORT env var to change, e.g.: E2E_PORT=3001 npx playwright test
|
||||
const PORT = process.env.E2E_PORT || '3000';
|
||||
// Use 127.0.0.1 instead of localhost to avoid IPv6 resolution issues on macOS.
|
||||
// localhost resolves to ::1 (IPv6) first, but Next.js dev server may not accept
|
||||
// IPv6 connections, causing Playwright's webServer health check to hang.
|
||||
const BASE_URL = `http://127.0.0.1:${PORT}`;
|
||||
const BASE_URL = `http://localhost:${PORT}`;
|
||||
|
||||
/**
|
||||
* Playwright configuration for karaoke-gen frontend E2E tests.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 463 KiB After Width: | Height: | Size: 463 KiB |
@@ -27,11 +27,6 @@ class LyricsProviderConfig:
|
||||
class BaseLyricsProvider(ABC):
|
||||
"""Base class for lyrics providers."""
|
||||
|
||||
# Lyrics text beyond this length are almost certainly not real song lyrics
|
||||
# (e.g. screenplays, articles, or other non-lyrics content from web scraping).
|
||||
# Typical songs are 1000-4000 chars; 3000 is a safe truncation point.
|
||||
MAX_LYRICS_LENGTH = 3000
|
||||
|
||||
def __init__(self, config: LyricsProviderConfig, logger: Optional[logging.Logger] = None):
|
||||
self.logger = logger or logging.getLogger(__name__)
|
||||
self.cache_dir = Path(config.cache_dir) if config.cache_dir else None
|
||||
@@ -128,20 +123,6 @@ class BaseLyricsProvider(ABC):
|
||||
Returns:
|
||||
List of LyricsSegment objects with unique IDs and Word objects
|
||||
"""
|
||||
# Guard against abnormally long text (screenplays, articles, etc.)
|
||||
if len(text) > self.MAX_LYRICS_LENGTH:
|
||||
self.logger.warning(
|
||||
f"{self.get_name()}: Lyrics text is {len(text):,} chars, truncating to ~{self.MAX_LYRICS_LENGTH:,} "
|
||||
f"(likely non-lyrics content)"
|
||||
)
|
||||
# Truncate at the last complete line before the limit
|
||||
truncated = text[: self.MAX_LYRICS_LENGTH]
|
||||
last_newline = truncated.rfind("\n")
|
||||
if last_newline > 0:
|
||||
text = truncated[:last_newline]
|
||||
else:
|
||||
text = truncated
|
||||
|
||||
segments = []
|
||||
lines = text.strip().split("\n")
|
||||
|
||||
|
||||
@@ -125,26 +125,26 @@ class AudioShakeAPI:
|
||||
return {"x-api-key": self.config.api_token, "Content-Type": "application/json"}
|
||||
|
||||
def upload_file(self, filepath: str) -> str:
|
||||
"""Upload audio file via Assets API and return asset ID."""
|
||||
"""Upload audio file and return file URL."""
|
||||
self.logger.info(f"Uploading {filepath} to AudioShake")
|
||||
self._validate_config() # Validate before making API call
|
||||
|
||||
url = f"{self.config.base_url}/assets"
|
||||
url = f"{self.config.base_url}/upload/"
|
||||
with open(filepath, "rb") as file:
|
||||
files = {"file": (os.path.basename(filepath), file)}
|
||||
response = requests.post(url, headers={"x-api-key": self.config.api_token}, files=files)
|
||||
|
||||
self.logger.debug(f"Upload response: {response.status_code} - {response.text}")
|
||||
response.raise_for_status()
|
||||
return response.json()["id"]
|
||||
return response.json()["link"]
|
||||
|
||||
def create_task(self, asset_id: str) -> str:
|
||||
def create_task(self, file_url: str) -> str:
|
||||
"""Create transcription task and return task ID."""
|
||||
self.logger.info(f"Creating task for asset {asset_id}")
|
||||
self.logger.info(f"Creating task for file {file_url}")
|
||||
|
||||
url = f"{self.config.base_url}/tasks"
|
||||
data = {
|
||||
"assetId": asset_id,
|
||||
"url": file_url,
|
||||
"targets": [
|
||||
{
|
||||
"model": "alignment",
|
||||
@@ -290,10 +290,10 @@ class AudioShakeTranscriber(BaseTranscriber):
|
||||
|
||||
try:
|
||||
# Upload file and create task
|
||||
asset_id = self.api.upload_file(upload_filepath)
|
||||
self.logger.debug(f"File uploaded successfully. Asset ID: {asset_id}")
|
||||
file_url = self.api.upload_file(upload_filepath)
|
||||
self.logger.debug(f"File uploaded successfully. File URL: {file_url}")
|
||||
|
||||
task_id = self.api.create_task(asset_id)
|
||||
task_id = self.api.create_task(file_url)
|
||||
self.logger.debug(f"Task created successfully. Task ID: {task_id}")
|
||||
|
||||
return task_id
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><!--tSn8ObPJyQkdGHYgdwN6Y--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/981a3bf030d34e95.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/56df4d5ab85b6adb.js"/><script src="/_next/static/chunks/248cba0fcb3874ed.js" async=""></script><script src="/_next/static/chunks/a9ed54eed3e14c92.js" async=""></script><script src="/_next/static/chunks/94bde6376cf279be.js" async=""></script><script src="/_next/static/chunks/5997132b61dec430.js" async=""></script><script src="/_next/static/chunks/turbopack-7ce6493647b9aa23.js" async=""></script><script src="/_next/static/chunks/4dc7efe58b813844.js" async=""></script><script src="/_next/static/chunks/d668512033b1256e.js" async=""></script><script src="/_next/static/chunks/247eb132b7f7b574.js" async=""></script><script src="/_next/static/chunks/d235c7efc1a1df60.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-D0E63LB9FY" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Nomad Karaoke: Generator</title><meta name="description" content="Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"/><link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased" style="background:var(--bg);color:var(--text)"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/56df4d5ab85b6adb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[43316,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"GoogleAnalytics\"]\n3:I[72285,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ServiceWorkerRegistration\"]\n4:I[89554,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ThemeProvider\"]\n5:I[57091,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"TenantProvider\"]\n6:I[48030,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ImpersonationBannerWrapper\"]\n7:I[39756,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"default\"]\n8:I[37457,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"default\"]\n9:I[97367,[\"/_next/static/chunks/4dLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><!--tSn8ObPJyQkdGHYgdwN6Y--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/981a3bf030d34e95.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/56df4d5ab85b6adb.js"/><script src="/_next/static/chunks/248cba0fcb3874ed.js" async=""></script><script src="/_next/static/chunks/a9ed54eed3e14c92.js" async=""></script><script src="/_next/static/chunks/94bde6376cf279be.js" async=""></script><script src="/_next/static/chunks/5997132b61dec430.js" async=""></script><script src="/_next/static/chunks/turbopack-7ce6493647b9aa23.js" async=""></script><script src="/_next/static/chunks/4dc7efe58b813844.js" async=""></script><script src="/_next/static/chunks/d668512033b1256e.js" async=""></script><script src="/_next/static/chunks/247eb132b7f7b574.js" async=""></script><script src="/_next/static/chunks/d235c7efc1a1df60.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-D0E63LB9FY" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Nomad Karaoke: Generator</title><meta name="description" content="Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"/><link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased" style="background:var(--bg);color:var(--text)"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/56df4d5ab85b6adb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[43316,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"GoogleAnalytics\"]\n3:I[72285,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ServiceWorkerRegistration\"]\n4:I[89554,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ThemeProvider\"]\n5:I[57091,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"TenantProvider\"]\n6:I[48030,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"ImpersonationBannerWrapper\"]\n7:I[39756,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"default\"]\n8:I[37457,[\"/_next/static/chunks/4dc7efe58b813844.js\",\"/_next/static/chunks/d668512033b1256e.js\",\"/_next/static/chunks/247eb132b7f7b574.js\",\"/_next/static/chunks/d235c7efc1a1df60.js\"],\"default\"]\n9:I[97367,[\"/_next/static/chunks/4dLine truncated
|
||||
@@ -1,9 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[47257,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"ClientPageRoot"]
|
||||
3:I[31713,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/3fba0305955d13e6.js","/_next/static/chunks/692f5d9e0d700c76.js","/_next/static/chunks/dcde6ed684dacd0e.js"],"default"]
|
||||
6:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"OutletBoundary"]
|
||||
7:"$Sreact.suspense"
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/3fba0305955d13e6.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/692f5d9e0d700c76.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/dcde6ed684dacd0e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
|
||||
4:{}
|
||||
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
||||
8:null
|
||||
@@ -1,23 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[43316,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"GoogleAnalytics"]
|
||||
3:I[72285,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ServiceWorkerRegistration"]
|
||||
4:I[89554,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ThemeProvider"]
|
||||
5:I[57091,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"TenantProvider"]
|
||||
6:I[48030,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ImpersonationBannerWrapper"]
|
||||
7:I[39756,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"default"]
|
||||
8:I[37457,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"default"]
|
||||
9:I[47257,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"ClientPageRoot"]
|
||||
a:I[31713,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/3fba0305955d13e6.js","/_next/static/chunks/692f5d9e0d700c76.js","/_next/static/chunks/dcde6ed684dacd0e.js"],"default"]
|
||||
d:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"OutletBoundary"]
|
||||
e:"$Sreact.suspense"
|
||||
10:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"ViewportBoundary"]
|
||||
12:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"MetadataBoundary"]
|
||||
14:I[68027,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"default"]
|
||||
:HL["/_next/static/chunks/981a3bf030d34e95.css","style"]
|
||||
0:{"P":null,"b":"tSn8ObPJyQkdGHYgdwN6Y","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/981a3bf030d34e95.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/7a7cb38b07cc9f82.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/d235c7efc1a1df60.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/d668512033b1256e.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"font-sans antialiased","style":{"background":"var(--bg)","color":"var(--text)"},"children":[["$","$L2",null,{}],["$","$L3",null,{}],["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":[["$","$L6",null,{}],["$","$L7",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}]}]]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L9",null,{"Component":"$a","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@b","$@c"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/3fba0305955d13e6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/692f5d9e0d700c76.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/dcde6ed684dacd0e.js","async":true,"nonce":"$undefined"}]],["$","$Ld",null,{"children":["$","$e",null,{"name":"Next.MetadataOutlet","children":"$@f"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$L10",null,{"children":"$@11"}],["$","div",null,{"hidden":true,"children":["$","$L12",null,{"children":["$","$e",null,{"name":"Next.Metadata","children":"$@13"}]}]}],null]}],false]],"m":"$undefined","G":["$14",[]],"S":true}
|
||||
b:{}
|
||||
c:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
||||
11:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||
15:I[27201,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"IconMark"]
|
||||
13:[["$","title","0",{"children":"Nomad Karaoke: Generator"}],["$","meta","1",{"name":"description","content":"Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"}],["$","link","2",{"rel":"manifest","href":"/manifest.webmanifest","crossOrigin":"$undefined"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L15","7",{}]]
|
||||
f:null
|
||||
@@ -1,8 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"ViewportBoundary"]
|
||||
4:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"MetadataBoundary"]
|
||||
5:"$Sreact.suspense"
|
||||
7:I[27201,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"IconMark"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
|
||||
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||
6:[["$","title","0",{"children":"Nomad Karaoke: Generator"}],["$","meta","1",{"name":"description","content":"Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"}],["$","link","2",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L7","7",{}]]
|
||||
@@ -1,10 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[43316,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"GoogleAnalytics"]
|
||||
3:I[72285,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ServiceWorkerRegistration"]
|
||||
4:I[89554,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ThemeProvider"]
|
||||
5:I[57091,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"TenantProvider"]
|
||||
6:I[48030,["/_next/static/chunks/7a7cb38b07cc9f82.js","/_next/static/chunks/d235c7efc1a1df60.js","/_next/static/chunks/d668512033b1256e.js"],"ImpersonationBannerWrapper"]
|
||||
7:I[39756,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"default"]
|
||||
8:I[37457,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"default"]
|
||||
:HL["/_next/static/chunks/981a3bf030d34e95.css","style"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/981a3bf030d34e95.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/7a7cb38b07cc9f82.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/d235c7efc1a1df60.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/d668512033b1256e.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"font-sans antialiased","style":{"background":"var(--bg)","color":"var(--text)"},"children":[["$","$L2",null,{}],["$","$L3",null,{}],["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":[["$","$L6",null,{}],["$","$L7",null,{"parallelRouterKey":"children","template":["$","$L8",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]]}]}]]}]}]]}],"loading":null,"isPartial":false}
|
||||
@@ -1,2 +0,0 @@
|
||||
:HL["/_next/static/chunks/981a3bf030d34e95.css","style"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3116,e=>{"use strict";let s=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",()=>s],3116)},61659,e=>{"use strict";let s=(0,e.i(75254).default)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["CreditCard",()=>s],61659)},69638,e=>{"use strict";let s=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>s],69638)},73884,e=>{"use strict";let s=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>s],73884)},63209,e=>{"use strict";let s=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>s],63209)},16715,e=>{"use strict";let s=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>s],16715)},94179,e=>{"use strict";var s=e.i(43476),t=e.i(91918),a=e.i(25913),r=e.i(47163);let i=(0,a.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function d({className:e,variant:a,asChild:d=!1,...l}){let c=d?t.Slot:"span";return(0,s.jsx)(c,{"data-slot":"badge",className:(0,r.cn)(i({variant:a}),e),...l})}e.s(["Badge",()=>d])},70065,e=>{"use strict";var s=e.i(43476),t=e.i(47163);function a({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,t.cn)("bg-card text-card-foreground flex flex-col gap-1 rounded-lg border py-6 shadow-sm",e),...a})}function r({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,t.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a})}function i({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,t.cn)("leading-none font-semibold",e),...a})}function d({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,t.cn)("text-muted-foreground text-sm",e),...a})}function l({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,t.cn)("px-6",e),...a})}e.s(["Card",()=>a,"CardContent",()=>l,"CardDescription",()=>d,"CardHeader",()=>r,"CardTitle",()=>i])},59276,e=>{"use strict";var s=e.i(43476),t=e.i(70065),a=e.i(71428),r=e.i(47163);function i({title:e,value:i,description:d,icon:l,trend:c,loading:n,className:o,valueClassName:x}){return n?(0,s.jsxs)(t.Card,{className:(0,r.cn)("",o),children:[(0,s.jsx)(t.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,s.jsx)(t.CardTitle,{className:"text-sm font-medium",children:(0,s.jsx)(a.Skeleton,{className:"h-4 w-24"})})}),(0,s.jsxs)(t.CardContent,{children:[(0,s.jsx)(a.Skeleton,{className:"h-8 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-3 w-32 mt-2"})]})]}):(0,s.jsxs)(t.Card,{className:(0,r.cn)("",o),children:[(0,s.jsxs)(t.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,s.jsx)(t.CardTitle,{className:"text-sm font-medium text-muted-foreground",children:e}),l&&(0,s.jsx)(l,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsxs)(t.CardContent,{children:[(0,s.jsx)("div",{className:(0,r.cn)("text-2xl font-bold",x),children:i}),d&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:d}),c&&(0,s.jsxs)("p",{className:(0,r.cn)("text-xs mt-1",!0===c.positive?"text-green-500":!1===c.positive?"text-red-500":"text-muted-foreground"),children:[!0===c.Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31278,17521,e=>{"use strict";let s=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>s],17521),e.s(["Loader2",()=>s],31278)},18566,(e,s,r)=>{s.exports=e.r(76562)},69638,e=>{"use strict";let s=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>s],69638)},3116,e=>{"use strict";let s=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",()=>s],3116)},63488,e=>{"use strict";let s=(0,e.i(75254).default)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Mail",()=>s],63488)},31897,e=>{"use strict";var s=e.i(43476),r=e.i(71645),t=e.i(18566),a=e.i(69638),l=e.i(31278),d=e.i(63488),i=e.i(3116),c=e.i(67881);function o(){return(0,t.useSearchParams)().get("session_id"),(0,s.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:[(0,s.jsx)(a.CheckCircle,{className:"w-16 h-16 text-success mx-auto mb-4"}),(0,s.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Order Confirmed!"}),(0,s.jsx)("p",{className:"text-muted-foreground mb-6",children:"Thank you for your order. We're creating your custom karaoke video now."}),(0,s.jsxs)("div",{className:"space-y-4 mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 text-left p-3 bg-secondary rounded-lg",children:[(0,s.jsx)(i.Clock,{className:"w-5 h-5 text-primary flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium text-foreground",children:"Delivery within 24 hours"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Most orders are completed in just a few hours"})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-left p-3 bg-secondary rounded-lg",children:[(0,s.jsx)(d.Mail,{className:"w-5 h-5 text-primary flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium text-foreground",children:"Check your email"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"We'll send your video when it's ready"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(c.Button,{asChild:!0,className:"w-full bg-primary hover:bg-primary/90",children:(0,s.jsx)("a",{href:"https://nomadkaraoke.com",children:"Back to Nomad Karaoke"})}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Questions? Email us at help@nomadkaraoke.com"})]})]})}function n(){return(0,s.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:(0,s.jsx)(r.Suspense,{fallback:(0,s.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:[(0,s.jsx)(l.Loader2,{className:"w-16 h-16 text-primary mx-auto mb-4 animate-spin"}),(0,s.jsx)("p",{className:"text-muted-foreground",children:"Loading..."})]}),children:(0,s.jsx)(o,{})})})}e.s(["default",()=>n])}]);
|
||||
@@ -1,7 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16715,e=>{"use strict";let t=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},94179,e=>{"use strict";var t=e.i(43476),r=e.i(91918),a=e.i(25913),o=e.i(47163);let n=(0,a.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,asChild:i=!1,...l}){let s=i?r.Slot:"span";return(0,t.jsx)(s,{"data-slot":"badge",className:(0,o.cn)(n({variant:a}),e),...l})}e.s(["Badge",()=>i])},70065,e=>{"use strict";var t=e.i(43476),r=e.i(47163);function a({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.cn)("bg-card text-card-foreground flex flex-col gap-1 rounded-lg border py-6 shadow-sm",e),...a})}function o({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a})}function n({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",e),...a})}function i({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-muted-foreground text-sm",e),...a})}function l({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...a})}e.s(["Card",()=>a,"CardContent",()=>l,"CardDescription",()=>i,"CardHeader",()=>o,"CardTitle",()=>n])},47627,e=>{"use strict";var t=e.i(43476),r=e.i(47163);function a({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})}function o({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,r.cn)("[&_tr]:border-b",e),...a})}function n({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,r.cn)("[&_tr:last-child]:border-0",e),...a})}function i({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,r.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...a})}function l({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,r.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}function s({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,r.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}e.s(["Table",()=>a,"TableBody",()=>n,"TableCell",()=>s,"TableHead",()=>l,"TableHeader",()=>o,"TableRow",()=>i])},20682,e=>{"use strict";var t=e.i(71645);let r=0,a=new Map,o=e=>{if(a.has(e))return;let t=setTimeout(()=>{a.delete(e),l({type:"REMOVE_TOAST",toastId:e})},1e6);a.set(e,t)},n=[],i={toasts:[]};function l(e){i=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?o(r):e.toasts.forEach(e=>{o(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(i,e),n.forEach(e=>{e(i)})}function s({...e}){let t=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>l({type:"DISMISS_TOAST",toastId:t});return l({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||a()}}}),{id:t,dismiss:a,update:e=>l({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function c(){let[e,r]=t.useState(i);return t.useEffect(()=>(n.push(r),()=>{leLine truncated
|
||||
|
||||
You can add a description to the \`${h}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${h}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},E=e.i(47163),A=e.i(67881);function N({...e}){return(0,t.jsx)(f,{"data-slot":"alert-dialog",...e})}function k({...e}){return(0,t.jsx)(p,{"data-slot":"alert-dialog-trigger",...e})}function P({...e}){return(0,t.jsx)(v,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...r}){return(0,t.jsx)(m,{"data-slot":"alert-dialog-overlay",className:(0,E.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function L({className:e,...r}){return(0,t.jsxs)(P,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(x,{"data-slot":"alert-dialog-content",className:(0,E.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r})]})}function _({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,E.cn)("flex flex-col gap-2 text-center sm:text-left",e),...r})}function H({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,E.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function M({className:e,...r}){return(0,t.jsx)(y,{"data-slot":"alert-dialog-title",className:(0,E.cn)("text-lg font-semibold",e),...r})}function O({className:e,...r}){return(0,t.jsx)(S,{"data-slot":"alert-dialog-description",className:(0,E.cn)("text-muted-foreground text-sm",e),...r})}function F({className:e,...r}){return(0,t.jsx)(T,{className:(0,E.cn)((0,A.buttonVariants)(),e),...r})}function z({className:e,...r}){return(0,t.jsx)(R,{className:(0,E.cn)((0,A.buttonVariants)({variant:"outline"}),e),...r})}e.s(["AlertDialog",()=>N,"AlertDialogAction",()=>F,"AlertDialogCancel",()=>z,"AlertDialogContent",()=>L,"AlertDialogDescription",()=>O,"AlertDialogFooter",()=>H,"AlertDialogHeader",()=>_,"AlertDialogTitle",()=>M,"AlertDialogTrigger",()=>k],30009)},48256,e=>{"use strict";let t=(0,e.i(75254).default)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],48256)},67240,e=>{"use strict";let t=(0,e.i(75254).default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],67240)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},69074,e=>{"use strict";let t=(0,e.i(75254).default)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);e.s(["Upload",()=>t],69074)},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),a=e.i(75830),o=e.i(20783),n=e.i(30030),i=e.i(10772),l=e.i(48425),s=e.i(30207),c=e.i(69340),d=e.i(86318),u=e.i(43476),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[m,h,g]=(0,a.createCollection)(v),[b,x]=(0,n.createContextScope)(v,[g]),[w,y]=b(v),C=t.forwardRef((e,t)=>(0,u.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(S,{...e,ref:t})})}));C.displayName=v;var S=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:n,orientation:i,loop:v=!1,dir:m,currentTabStopId:g,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:x,onEntryFocus:y,preventScrollOnEntryFocus:C=!1,...S}=e,T=t.useRef(null),j=(0,o.useComposedRefs)(a,T),R=(0,d.useDirection)(m),[E=null,A]=(0,c.useControllableState)({prop:g,defaultProp:b,onChange:x}),[N,k]=t.useState(!1),P=(0,s.useCallbackRef)(y),I=h(n),L=t.useRef(!1),[_,H]=t.useState(0);return t.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(f,P),()=>e.removeEventListener(f,P)},[P]),(0,u.jsx)(w,{scope:n,orientation:i,dir:R,loop:v,currentTabStopId:E,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>k(!0),[]),onFocusableItemAdd:t.useCallback(()=>H(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>H(e=>e-1),[]),children:(0,u.jsx)(l.Primitive.div,{tabIndex:N||0===_?-1:0,"data-orientation":i,...S,ref:j,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91915,(e,r,t)=>{"use strict";function n(e,r={}){if(r.onlyHashChange)return void e();let t=document.documentElement;if("smooth"!==t.dataset.scrollBehavior)return void e();let a=t.style.scrollBehavior;t.style.scrollBehavior="auto",r.dontForceLayout||t.getClientRects(),e(),t.style.scrollBehavior=a}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}}),e.r(33525)},68017,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return i}});let n=e.r(90809),a=e.r(43476),o=n._(e.r(71645)),c=e.r(90373),u=e.r(54394);e.r(33525);let l=e.r(8372);class s extends o.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,u.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,u.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,r){return e.pathname!==r.previousPathname&&r.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:r.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:r,unauthorized:t,children:n}=this.props,{triggeredStatus:o}=this.state,c={[u.HTTPAccessErrorStatus.NOT_FOUND]:e,[u.HTTPAccessErrorStatus.FORBIDDEN]:r,[u.HTTPAccessErrorStatus.UNAUTHORIZED]:t};if(o){let l=o===u.HTTPAccessErrorStatus.NOT_FOUND&&e,s=o===u.HTTPAccessErrorStatus.FORBIDDEN&&r,i=o===u.HTTPAccessErrorStatus.UNAUTHORIZED&&t;return l||s||i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("meta",{name:"robots",content:"noindex"}),!1,c[o]]}):n}return n}}function i({notFound:e,forbidden:r,unauthorized:t,children:n}){let u=(0,c.useUntrackedPathname)(),i=(0,o.useContext)(l.MissingSlotContext);return e||r||t?(0,a.jsx)(s,{pathname:u,notFound:e,forbidden:r,unauthorized:t,missingSlots:i,children:n}):(0,a.jsx)(a.Fragment,{children:n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},91798,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouterBFCache",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,r){let[t,a]=(0,n.useState)(()=>({tree:e,stateKey:r,next:null}));if(t.tree===e)return t;let o={tree:e,stateKey:r,next:null},c=1,u=t,l=o;for(;null!==u&&c<1;){if(u.stateKey===r){l.next=u.next;break}{c++;let e={tree:u.tree,stateKey:u.stateKey,next:null};l.next=e,l=e}u=u.next}return a(o),o}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},39756,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return T}});let n=e.r(55682),a=e.r(90809),o=e.r(43476),c=e.r(88540),u=a._(e.r(71645)),l=n._(e.r(74080)),s=e.r(8372),i=e.r(87288),d=e.r(1244),f=e.r(72383),p=e.r(56019),h=e.r(91915),m=e.r(58442),g=e.r(68017),y=e.r(70725),b=e.r(84356),P=e.r(41538),_=e.r(91798);e.r(74180);let v=e.r(61994),O=e.r(33906),S=l.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=["bottom","height","left","right","top","width","x","y"];function R(e,r){let t=e.getBoundingClientRect();return t.top>=0&&t.top<=r}class j extends u.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:r}=this.props;if(e.apply){if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>r.every((r,t)=>(0,p.matchSegment)(r,e[t]))))return;let t=null,n=e.hashFragment;if(n&&(t="top"===n?document.body:document.getElementById(n)??document.getElementsByName(n)[0]),t||(t="undefined"==typeof window?null:(0,S.findDOMNode)(this)),!(t instanceof Element))return;for(;!(t instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let r=e.getBoundingClientRect();return E.every(e=>0===r[e])}(t);){if(null===t.nextElementSibling)return;t=t.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,h.disableSmoothScrollDuringRouteTransition)(()=>{if(n)return void t.scrollIntoView();let e=document.documentElement,r=e.clientHeight;!R(t,r)&&(e.scrollTop=0,R(t,r)||t.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,t.focus()}}}}function w({segmentPath:e,children:r}){let t=(0,u.useContext)(s.GlobalLayoutRouterContext);if(!t)thLine truncated
|
||||
@@ -1,4 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12718,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"InvariantError",{enumerable:!0,get:function(){return n}});class n extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}},32061,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={BailoutToCSRError:function(){return u},isBailoutToCSRError:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a="BAILOUT_TO_CLIENT_SIDE_RENDERING";class u extends Error{constructor(e){super(`Bail out to client-side rendering: ${e}`),this.reason=e,this.digest=a}}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===a}},54394,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={HTTPAccessErrorStatus:function(){return a},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return i},getAccessFallbackErrorTypeByStatus:function(){return l},getAccessFallbackHTTPStatus:function(){return s},isHTTPAccessFallbackError:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},u=new Set(Object.values(a)),i="NEXT_HTTP_ERROR_FALLBACK";function c(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r]=e.digest.split(";");return t===i&&u.has(Number(r))}function s(e){return Number(e.digest.split(";")[1])}function l(e){switch(e){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},76963,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RedirectStatusCode",{enumerable:!0,get:function(){return o}});var n,o=((n={})[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",n);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68391,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o={REDIRECT_ERROR_CODE:function(){return i},RedirectType:function(){return c},isRedirectError:function(){return s}};for(var a in o)Object.defineProperty(r,a,{enumerable:!0,get:o[a]});let u=e.r(76963),i="NEXT_REDIRECT";var c=((n={}).push="push",n.replace="replace",n);function s(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,n]=t,o=t.slice(2,-2).join(";"),a=Number(t.at(-2));return r===i&&("replace"===n||"push"===n)&&"string"==typeof o&&!isNaN(a)&&a in u.RedirectStatusCode}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},65713,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isNextRouterError",{enumerable:!0,get:function(){return a}});let n=e.r(54394),o=e.r(68391);function a(e){return(0,o.isRedirectError)(e)||(0,n.isHTTPAccessFallbackError)(e)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61994,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={NavigationPromisesContext:function(){return s},PathParamsContext:function(){return c},PathnameContext:function(){return i},SearchParamsContext:function(){return u},createDevToolsInstrumentedPromise:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(71645),u=(0,a.createContext)(null),i=(0,a.createContext)(null),c=(0,a.createContext)(null),s=(0,a.createContext)(null);function l(e,t){let r=Promise.resolve(t);return r.status="fulfilled",r.value=t,r.displayName=`${e} (SSR)`,r}},45955,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},21768,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ACTION_HEADER:function(){return u},FLIGHT_HEADERS:function(){return _},NEXT_ACTION_NOT_FOUND_HEADER:function(){return R},NEXT_DID_POSTPONE_HEADER:function(){return b},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return d},NEXT_HMR_REFRESH_HEADER:function(){return l},NEXT_HTML_REQUELine truncated
|
||||
${t}`))}function $(){let e=new AbortController;return e.abort(Object.defineProperty(new y.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),e.signal}function X(e){switch(e.type){case"prerender":case"prerender-runtime":let t=new AbortController;if(e.cacheSignal)e.cacheSignal.inputReady().then(()=>{t.abort()});else{let r=(0,l.getRuntimeStagePromise)(e);r?r.then(()=>(0,_.scheduleOnNextTick)(()=>t.abort())):(0,_.scheduleOnNextTick)(()=>t.abort())}return t.signal;case"prerender-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return}}function B(e,t){let r=t.dynamicTracking;r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:e})}function F(e){let t=d.workAsyncStorage.getStore(),r=l.workUnitAsyncStorage.getStore();if(t&&r)switch(r.type){case"prerender-client":case"prerender":{let n=r.fallbackRouteParams;n&&n.size>0&&i.default.use((0,f.makeHangingPromise)(r.renderSignal,t.route,e));break}case"prerender-ppr":{let n=r.fallbackRouteParams;if(n&&n.size>0)return x(t.route,e,r.dynamicTracking);break}case"prerender-runtime":throw Object.defineProperty(new m.InvariantError(`\`${e}\` was called during a runtime prerender. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new m.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0})}}function G(e){let t=d.workAsyncStorage.getStore(),r=l.workUnitAsyncStorage.getStore();if(t)switch(!r&&(0,l.throwForMissingRequestStore)(e),r.type){case"prerender-client":i.default.use((0,f.makeHangingPromise)(r.renderSignal,t.route,e));break;case"prerender-legacy":case"prerender-ppr":if(t.forceStatic)return;throw Object.defineProperty(new y.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":throw Object.defineProperty(new m.InvariantError(`\`${e}\` was called from a Server Component. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"cache":case"unstable-cache":case"private-cache":throw Object.defineProperty(new m.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"request":return}}let W=/\n\s+at Suspense \(<anonymous>\)/,q=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${p.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),z=RegExp(`\\n\\s+at ${p.METADATA_BOUNDARY_NAME}[\\n\\s]`),Y=RegExp(`\\n\\s+at ${p.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),K=RegExp(`\\n\\s+at ${p.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function V(e,t,r,n){if(!K.test(t)){if(z.test(t)){r.hasDynamicMetadata=!0;return}if(Y.test(t)){r.hasDynamicViewport=!0;return}if(q.test(t)){r.hasAllowedDynamic=!0,r.hasSuspenseAboveBody=!0;return}else if(W.test(t)){r.hasAllowedDynamic=!0;return}else{var o,a;let u;if(n.syncDynamicErrorWithStack)return void r.dynamicErrors.push(n.syncDynamicErrorWithStack);let i=(o=`Route "${e.route}": Uncached data was accessed outside of <Suspense>. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,a=t,(u=Object.defineProperty(Error(o),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})).stack=u.name+": "+o+a,u);return void r.dynamicErrors.push(i)}}}var Q=((o={})[o.Full=0]="Full",o[o.Empty=1]="Empty",o[o.Errored=2]="Errored",o);function J(e,t){console.error(t),e.dev||(e.hasReadableErrorStacks?console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${e.route}" in your browser to investigate the error.`):console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
||||
- Start the app in development mode by running \`next dev\`, then open "${e.route}" in your browser to investigate the error.
|
||||
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function Z(e,t,r,n){if(n.syncDynamicErrorWithStack)throw J(e,n.syncDynamicErrorWithStack),new s.StaticGenBailoutError;if(0!==t){if(r.hasSuspenseAboveBody)return;let n=r.dynamicErrors;if(n.length>0){for(let t=0;t<n.length;t++)J(e,n[t]);throw new s.StaticGenBailoutError}if(r.hasDynamicViewport)throw console.error(`Route "${e.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new s.StaticGenBailoutError;if(1===t)throw console.error(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new s.StaticGenBailoutError}else if(!1===r.hasAllowedDynamic&&r.hasDynamicMetadata)throw console.error(`Route "${e.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new s.StaticGenBailoutError}function ee(e,t){return e.runtimeStagePromise?e.runtimeStagePromise.then(()=>t):t}},91414,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unstable_rethrow",{enumerable:!0,get:function(){return function e(t){if((0,u.isNextRouterError)(t)||(0,a.isBailoutToCSRError)(t)||(0,c.isDynamicServerError)(t)||(0,i.isDynamicPostpone)(t)||(0,o.isPostpone)(t)||(0,n.isHangingPromiseRejectionError)(t)||(0,i.isPrerenderInterruptedError)(t))throw t;t instanceof Error&&"cause"in t&&e(t.cause)}}});let n=e.r(63138),o=e.r(67287),a=e.r(32061),u=e.r(65713),i=e.r(67673),c=e.r(76353);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},90508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unstable_rethrow",{enumerable:!0,get:function(){return n}});let n="undefined"==typeof window?e.r(91414).unstable_rethrow:e.r(15507).unstable_rethrow;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92805,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return a.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},forbidden:function(){return s.forbidden},notFound:function(){return c.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return f},unstable_rethrow:function(){return d.unstable_rethrow}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(3680),u=e.r(24063),i=e.r(68391),c=e.r(22783),s=e.r(79854),l=e.r(22683),d=e.r(90508);function f(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},76562,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return f.RedirectType},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},forbidden:function(){return f.forbidden},notFound:function(){return f.notFound},permanentRedirect:function(){return f.permanentRedirect},redirect:function(){return f.redirect},unauthorized:function(){return f.unauthorized},unstable_isUnrecognizedActionError:function(){return d.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return f.unstable_rethrow},useParams:function(){return h},usePathname:function(){return m},useRouter:function(){return b},useSearchParams:function(){return y},useSelectedLayoutSegment:function(){return g},useSelectedLayoutSegments:function(){return E},useServerInsertedHTML:function(){return l.useServerInsertedHTML}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(71645)),u=e.r(8372),i=e.r(61994),c=e.r(13258),s=e.r(3680),l=e.r(13957),d=e.r(92838),f=e.r(92805),p="undefined"==typeof window?e.r(67673).useDynamicRouteParams:void 0,_="undefined"==typeof window?e.r(67673).useDynamicSearchParams:void 0;function y(){_?.("useSearchParams()");let e=(0,Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74965,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(54858),l=e.i(54458),i=e.i(67881),n=e.i(23750),d=e.i(94179),o=e.i(70065),c=e.i(47627),m=e.i(62870),x=e.i(30030),u=e.i(75830),h=e.i(20783),g=e.i(81140),p=e.i(69340),j=e.i(48425),f=e.i(34620),b=e.i(96626),v=e.i(10772),N="Collapsible",[w,y]=(0,x.createContextScope)(N),[_,C]=w(N),k=s.forwardRef((e,a)=>{let{__scopeCollapsible:r,open:l,defaultOpen:i,disabled:n,onOpenChange:d,...o}=e,[c=!1,m]=(0,p.useControllableState)({prop:l,defaultProp:i,onChange:d});return(0,t.jsx)(_,{scope:r,disabled:n,contentId:(0,v.useId)(),open:c,onOpenToggle:s.useCallback(()=>m(e=>!e),[m]),children:(0,t.jsx)(j.Primitive.div,{"data-state":F(c),"data-disabled":n?"":void 0,...o,ref:a})})});k.displayName=N;var T="CollapsibleTrigger",A=s.forwardRef((e,s)=>{let{__scopeCollapsible:a,...r}=e,l=C(T,a);return(0,t.jsx)(j.Primitive.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":F(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...r,ref:s,onClick:(0,g.composeEventHandlers)(e.onClick,l.onOpenToggle)})});A.displayName=T;var D="CollapsibleContent",S=s.forwardRef((e,s)=>{let{forceMount:a,...r}=e,l=C(D,e.__scopeCollapsible);return(0,t.jsx)(b.Presence,{present:a||l.open,children:({present:e})=>(0,t.jsx)(R,{...r,ref:s,present:e})})});S.displayName=D;var R=s.forwardRef((e,a)=>{let{__scopeCollapsible:r,present:l,children:i,...n}=e,d=C(D,r),[o,c]=s.useState(l),m=s.useRef(null),x=(0,h.useComposedRefs)(a,m),u=s.useRef(0),g=u.current,p=s.useRef(0),b=p.current,v=d.open||o,N=s.useRef(v),w=s.useRef(void 0);return s.useEffect(()=>{let e=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.useLayoutEffect)(()=>{let e=m.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();u.current=t.height,p.current=t.width,N.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),c(l)}},[d.open,l]),(0,t.jsx)(j.Primitive.div,{"data-state":F(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!v,...n,ref:x,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&i})});function F(e){return e?"open":"closed"}var O=e.i(86318),L="Accordion",$=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[I,P,B]=(0,u.createCollection)(L),[E,J]=(0,x.createContextScope)(L,[B,y]),U=y(),H=s.default.forwardRef((e,s)=>{let{type:a,...r}=e;return(0,t.jsx)(I.Provider,{scope:e.__scopeAccordion,children:"multiple"===a?(0,t.jsx)(G,{...r,ref:s}):(0,t.jsx)(W,{...r,ref:s})})});H.displayName=L;var[z,q]=E(L),[M,V]=E(L,{collapsible:!1}),W=s.default.forwardRef((e,a)=>{let{value:r,defaultValue:l,onValueChange:i=()=>{},collapsible:n=!1,...d}=e,[o,c]=(0,p.useControllableState)({prop:r,defaultProp:l,onChange:i});return(0,t.jsx)(z,{scope:e.__scopeAccordion,value:o?[o]:[],onItemOpen:c,onItemClose:s.default.useCallback(()=>n&&c(""),[n,c]),children:(0,t.jsx)(M,{scope:e.__scopeAccordion,collapsible:n,children:(0,t.jsx)(X,{...d,ref:a})})})}),G=s.default.forwardRef((e,a)=>{let{value:r,defaultValue:l,onValueChange:i=()=>{},...n}=e,[d=[],o]=(0,p.useControllableState)({prop:r,defaultProp:l,onChange:i}),c=s.default.useCallback(e=>o((t=[])=>[...t,e]),[o]),m=s.default.useCallback(e=>o((t=[])=>t.filter(t=>t!==e)),[o]);return(0,t.jsx)(z,{scope:e.__scopeAccordion,value:d,onItemOpen:c,onItemClose:m,children:(0,t.jsx)(M,{scope:e.__scopeAccordion,collapsible:!0,children:(0,t.jsx)(X,{...n,ref:a})})})}),[Y,K]=E(L),X=s.default.forwardRef((e,a)=>{let{__scopeAccordion:r,disabled:l,dir:i,orientation:n="vertical",...d}=e,o=s.default.useRef(null),c=(0,h.useComposedRefs)(o,a),m=P(r),x="ltr"===(0,O.useDirection)(i),u=(0,g.composeEventHandlers)(e.onKeyDown,e=>{if(!$.includes(e.key))return;let t=e.target,s=m().filter(e=>!e.ref.current?.disabled),a=s.findIndex(e=>e.ref.current===t),r=s.length;if(-1===a)return;e.preventDefault();let l=a,i=r-1,d=()=>{(l=a+1)>i&&(l=0)},o=()=>{(l=a-1)<0&&(l=i)};switch(e.key){case"Home":l=0;break;case"End":l=i;break;case"ArrowRight":"horizontal"===n&&(x?d():o());break;case"ArrowDown":"vertical"===n&&d();break;case"ArrowLeft":"horizontal"===n&&(x?o():d());break;case"ArrowUp":"vertical"===n&&o()}let c=l%r;s[c].ref.current?.focus()});return(0,t.jsx)(Y,{scope:r,disabled:l,direction:i,orientation:n,children:(0,t.jsx)(I.Slot,{scope:r,children:(0,t.jsx)(j.Primitive.div,{...d,"data-orientation":n,ref:c,onKeyDown:l?void 0:u})})})}),Z="AccordionItem",[Q,ee]=E(Z),et=s.default.forwardRef((e,s)=>{let{__scopeAccordion:a,value:r,...l}=e,i=K(Z,a),n=q(Z,a),d=U(a),o=(0,v.useId)(),c=r&&n.value.includes(r)||!1,m=i.disabled||e.disabled;return(0,t.jsx)(Q,{scopeLine truncated
|
||||
@@ -1,7 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53339,e=>{"use strict";let t=(0,e.i(75254).default)("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",()=>t],53339)},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>t],73884)},16715,e=>{"use strict";let t=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},94179,e=>{"use strict";var t=e.i(43476),a=e.i(91918),s=e.i(25913),l=e.i(47163);let r=(0,s.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,asChild:i=!1,...n}){let o=i?a.Slot:"span";return(0,t.jsx)(o,{"data-slot":"badge",className:(0,l.cn)(r({variant:s}),e),...n})}e.s(["Badge",()=>i])},20682,e=>{"use strict";var t=e.i(71645);let a=0,s=new Map,l=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),n({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},r=[],i={toasts:[]};function n(e){i=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?l(a):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(i,e),r.forEach(e=>{e(i)})}function o({...e}){let t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>n({type:"DISMISS_TOAST",toastId:t});return n({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||s()}}}),{id:t,dismiss:s,update:e=>n({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function c(){let[e,a]=t.useState(i);return t.useEffect(()=>(r.push(a),()=>{let e=r.indexOf(a);e>-1&&r.splice(e,1)}),[e]),{...e,toast:o,dismiss:e=>n({type:"DISMISS_TOAST",toastId:e})}}e.s(["useToast",()=>c])},47627,e=>{"use strict";var t=e.i(43476),a=e.i(47163);function s({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...s})})}function l({className:e,...s}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...s})}function r({className:e,...s}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...s})}function i({className:e,...s}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...s})}function n({className:e,...s}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s})}function o({className:e,...s}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s})}e.s(["Table",()=>s,"TableBody",()=>r,"TableCell",()=>o,"TableHead",()=>n,"TableHeader",()=>l,"TableRow",()=>i])},27612,e=>{"use strict";let t=(0,e.i(75254).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:Line truncated
|
||||
|
||||
You can add a description to the \`${p}\` by passing a \`${T}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${p}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},S=e.i(47163),k=e.i(67881);function _({...e}){return(0,t.jsx)(h,{"data-slot":"alert-dialog",...e})}function M({...e}){return(0,t.jsx)(x,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(m,{"data-slot":"alert-dialog-portal",...e})}function O({className:e,...a}){return(0,t.jsx)(g,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function E({className:e,...a}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(O,{}),(0,t.jsx)(j,{"data-slot":"alert-dialog-content",className:(0,S.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a})]})}function H({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("flex flex-col gap-2 text-center sm:text-left",e),...a})}function B({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...a})}function F({className:e,...a}){return(0,t.jsx)(y,{"data-slot":"alert-dialog-title",className:(0,S.cn)("text-lg font-semibold",e),...a})}function I({className:e,...a}){return(0,t.jsx)(C,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-muted-foreground text-sm",e),...a})}function z({className:e,...a}){return(0,t.jsx)(w,{className:(0,S.cn)((0,k.buttonVariants)(),e),...a})}function P({className:e,...a}){return(0,t.jsx)(A,{className:(0,S.cn)((0,k.buttonVariants)({variant:"outline"}),e),...a})}e.s(["AlertDialog",()=>_,"AlertDialogAction",()=>z,"AlertDialogCancel",()=>P,"AlertDialogContent",()=>E,"AlertDialogDescription",()=>I,"AlertDialogFooter",()=>B,"AlertDialogHeader",()=>H,"AlertDialogTitle",()=>F,"AlertDialogTrigger",()=>M],30009)},13314,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(54858),l=e.i(54458),r=e.i(67881),i=e.i(94179),n=e.i(47627),o=e.i(62870),c=e.i(30009),d=e.i(28231),u=e.i(16715),h=e.i(31278),x=e.i(27612),m=e.i(53339),g=e.i(69638),p=e.i(73884),f=e.i(75254);let b=(0,f.default)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),j=(0,f.default)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);var v=e.i(20682);let y=[{value:"all",label:"All Statuses"},{value:"awaiting_audio_selection",label:"Awaiting Selection"},{value:"pending",label:"Pending"},{value:"complete",label:"Complete"},{value:"failed",label:"Failed"}];function T(){let{toast:e}=(0,v.useToast)(),{showTestData:f}=(0,l.useAdminSettings)(),[T,C]=(0,a.useState)([]),[w,N]=(0,a.useState)(!0),[A,D]=(0,a.useState)("all"),[S,k]=(0,a.useState)(!1),[_,M]=(0,a.useState)(null),[R,O]=(0,a.useState)(!1),[E,H]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),[I,z]=(0,a.useState)(null),[P,V]=(0,a.useState)(!1),L=(0,a.useCallback)(async()=>{try{N(!0);let e=await s.adminApi.listAudioSearches({limit:100,status_filter:"all"!==A?A:void 0,exclude_test:!f});C(e.jobs)}catch(t){console.error("Failed to load searches:",t),e({title:"Error",description:t.message||"Failed to load audio searches",variant:"destructive"})}finally{N(!1)}},[A,f,e]),$=(0,a.useCallback)(async()=>{try{V(!0);let e=await s.adminApi.getCacheStats();z(e)}catch(e){console.error("Failed to load cache stats:",e),z(null)}finally{V(!1)}},[]);(0,a.useEffect)(()=>{L(),$()},[L,$]);let q=async()=>{if(_)try{O(!0);let t=await s.adminApi.clearAudioSearchCache(_.job_id);e({title:"Cache Cleared",description:t.message}),k(!1),M(null),L(),$()}catch(t){e({title:"Error",description:t.message||"Failed to clear cache",variant:"destructive"})}finally{O(!1)}},U=async()=>{try{F(!0);let t=await s.adminApi.clearAllCache();e({title:"All Cache Cleared",description:t.message}),H(!1),$()}catch(t){e({title:"Error",description:t.message||"Failed to clear all cache",variant:"destructive"})}finally{F(!1)}},X=e=>{if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center ju
Line truncated
|
||||
@@ -1,5 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,30030,e=>{"use strict";function t(e,n,{checkForDefaultPrevented:r=!0}={}){return function(t){if(e?.(t),!1===r||!t.defaultPrevented)return n?.(t)}}e.s(["composeEventHandlers",()=>t],81140);var n=e.i(71645),r=e.i(43476);function o(e,t){let o=n.createContext(t),i=e=>{let{children:t,...i}=e,a=n.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:t})};return i.displayName=e+"Provider",[i,function(r){let i=n.useContext(o);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function i(e,t=[]){let o=[],a=()=>{let t=o.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return a.scopeName=e,[function(t,i){let a=n.createContext(i),u=o.length;o=[...o,i];let c=t=>{let{scope:o,children:i,...c}=t,s=o?.[e]?.[u]||a,l=n.useMemo(()=>c,Object.values(c));return(0,r.jsx)(s.Provider,{value:l,children:i})};return c.displayName=t+"Provider",[c,function(r,o){let c=o?.[e]?.[u]||a,s=n.useContext(c);if(s)return s;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(a,...t)]}e.s(["createContext",()=>o,"createContextScope",()=>i],30030)},48425,e=>{"use strict";var t=e.i(71645),n=e.i(74080),r=e.i(91918),o=e.i(43476),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>{let i=t.forwardRef((e,t)=>{let{asChild:i,...a}=e,u=i?r.Slot:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function a(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>a])},30207,e=>{"use strict";var t=e.i(71645);function n(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}e.s(["useCallbackRef",()=>n])},26330,e=>{"use strict";var t,n=e.i(71645),r=e.i(81140),o=e.i(48425),i=e.i(20783),a=e.i(30207),u=e.i(43476),c="dismissableLayer.update",s=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l=n.forwardRef((e,l)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:y,...E}=e,b=n.useContext(s),[w,C]=n.useState(null),R=w?.ownerDocument??globalThis?.document,[,N]=n.useState({}),S=(0,i.useComposedRefs)(l,e=>C(e)),P=Array.from(b.layers),[x]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),O=P.indexOf(x),D=w?P.indexOf(w):-1,T=b.layersWithOutsidePointerEventsDisabled.size>0,L=D>=O,M=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){f("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...b.branches].some(e=>e.contains(t));L&&!n&&(m?.(e),g?.(e),e.defaultPrevented||y?.())},R),k=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...b.branches].some(e=>e.contains(t))&&(h?.(e),g?.(e),e.defaultPrevented||y?.())},R);return!function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{D===b.layers.size-1&&(v?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},R),n.useEffect(()=>{if(w)return p&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(t=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),d(),()=>{p&&1===b.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=t)}},[w,R,p,b]),n.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersLine truncated
|
||||
|
||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Z=({contentRef:e,descriptionId:n})=>{let r=Y("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null};e.s(["Close",()=>H,"Content",()=>k,"Description",()=>B,"Overlay",()=>T,"Portal",()=>O,"Root",()=>C,"Title",()=>_,"Trigger",()=>N,"WarningProvider",()=>X,"createDialogScope",()=>E])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",()=>t],3116)},61659,e=>{"use strict";let t=(0,e.i(75254).default)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["CreditCard",()=>t],61659)},63488,e=>{"use strict";let t=(0,e.i(75254).default)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Mail",()=>t],63488)},23616,e=>{"use strict";let t=(0,e.i(75254).default)("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);e.s(["Youtube",()=>t],23616)},64659,65261,84123,e=>{"use strict";var t=e.i(31171);e.s(["ChevronDown",()=>t.default],64659);var a=e.i(43476),s=e.i(71645),r=e.i(63488);let l=(0,e.i(75254).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",()=>l],65261);var i=e.i(71689),n=e.i(31278),o=e.i(69638),d=e.i(67881),c=e.i(23750),u=e.i(30374),m=e.i(38036);function x({open:e,onClose:t,onSuccess:x}){let[h,f]=(0,s.useState)("email"),[p,g]=(0,s.useState)(""),[y,k]=(0,s.useState)(""),[j,v]=(0,s.useState)(""),{sendMagicLink:b,loginWithToken:N,isLoading:w,error:C,clearError:M}=(0,m.useAuth)(),D=async e=>{(e.preventDefault(),v(""),p.trim())?p.includes("@")&&p.includes(".")?await b(p.trim().toLowerCase())&&f("sent"):v("Please enter a valid email"):v("Please enter your email")},S=async e=>{(e.preventDefault(),v(""),y.trim())?await N(y.trim())&&(k(""),x()):v("Please enter your access token")},T=()=>{f("email"),g(""),k(""),v(""),M(),t()},A=j||C;return(0,a.jsx)(u.Dialog,{open:e,onOpenChange:e=>!e&&T(),children:(0,a.jsxs)(u.DialogContent,{className:"sm:max-w-md bg-card border-border",children:["email"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(u.DialogHeader,{children:[(0,a.jsxs)(u.DialogTitle,{className:"text-foreground flex items-center gap-2",children:[(0,a.jsx)(r.Mail,{className:"w-5 h-5 text-primary"}),"Sign In"]}),(0,a.jsx)(u.DialogDescription,{className:"text-muted-foreground",children:"Enter your email to receive a sign-in link"})]}),(0,a.jsxs)("form",{onSubmit:D,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Input,{type:"email",placeholder:"you@example.com",value:p,onChange:e=>{g(e.target.value),v(""),M()},className:"bg-secondary border-border text-foreground",autoFocus:!0,disabled:w}),A&&(0,a.jsx)("p",{className:"text-xs text-destructive mt-1",children:A})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(d.Button,{type:"submit",disabled:!p.trim()||w,className:"w-full bg-primary hover:bg-primary/90",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Loader2,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):"Send Sign-In Link"}),(0,a.jsxs)(d.Button,{type:"button",variant:"ghost",onClick:()=>f("token"),className:"text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(l,{className:"w-4 h-4 mr-2"}),"Use Access Token Instead"]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:"No account? Just enter your email to get started."})]})]}),"sent"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.DialogHeader,{children:(0,a.jsxs)(u.DialogTitle,{className:"text-foreground flex items-center gap-2",children:[(0,a.jsx)(o.CheckCircle,{className:"w-5 h-5 text-success"}),"Check Your Email"]})}),(0,a.jsxs)("div",{className:"space-y-4 py-4",children:[(0,a.jsx)("p",{className:"text-foreground",children:"We sent a sign-in link to:"}),(0,a.jsx)("p",{className:"text-foreground font-medium bg-secondary px-4 py-2 rounded-md",children:p}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Click the link in the email to sign in. The link expires in 15 minutes."}),(0,a.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,a.jsxs)(d.Button,{variant:"outline",onClick:()=>f("email"),className:"w-full border-border text-foreground hover:text-forLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20682,e=>{"use strict";var s=e.i(71645);let t=0,a=new Map,r=e=>{if(a.has(e))return;let s=setTimeout(()=>{a.delete(e),n({type:"REMOVE_TOAST",toastId:e})},1e6);a.set(e,s)},d=[],i={toasts:[]};function n(e){i=((e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?r(t):e.toasts.forEach(e=>{r(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}})(i,e),d.forEach(e=>{e(i)})}function l({...e}){let s=(t=(t+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>n({type:"DISMISS_TOAST",toastId:s});return n({type:"ADD_TOAST",toast:{...e,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>n({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function c(){let[e,t]=s.useState(i);return s.useEffect(()=>(d.push(t),()=>{let e=d.indexOf(t);e>-1&&d.splice(e,1)}),[e]),{...e,toast:l,dismiss:e=>n({type:"DISMISS_TOAST",toastId:e})}}e.s(["useToast",()=>c])},86311,e=>{"use strict";let s=(0,e.i(75254).default)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);e.s(["MessageSquare",()=>s],86311)},16715,e=>{"use strict";let s=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>s],16715)},94179,e=>{"use strict";var s=e.i(43476),t=e.i(91918),a=e.i(25913),r=e.i(47163);let d=(0,a.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,asChild:i=!1,...n}){let l=i?t.Slot:"span";return(0,s.jsx)(l,{"data-slot":"badge",className:(0,r.cn)(d({variant:a}),e),...n})}e.s(["Badge",()=>i])},70065,e=>{"use strict";var s=e.i(43476),t=e.i(47163);function a({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,t.cn)("bg-card text-card-foreground flex flex-col gap-1 rounded-lg border py-6 shadow-sm",e),...a})}function r({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,t.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a})}function d({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,t.cn)("leading-none font-semibold",e),...a})}function i({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,t.cn)("text-muted-foreground text-sm",e),...a})}function n({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,t.cn)("px-6",e),...a})}e.s(["Card",()=>a,"CardContent",()=>n,"CardDescription",()=>i,"CardHeader",()=>r,"CardTitle",()=>d])},59276,e=>{"use strict";var s=e.i(43476),t=e.i(70065),a=e.i(71428),r=e.i(47163);function d({title:e,value:d,description:i,icon:n,trend:l,loading:c,className:o,valueClassName:x}){return c?(0,s.jsxs)(t.Card,{className:(0,r.cn)("",o),children:[(0,s.jsx)(t.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,s.jsx)(t.CardTitle,{className:"text-sm font-medium",children:(0,s.jsx)(a.Skeleton,{className:"h-4 w-24"})})}),(0,s.jsxs)(t.CardContent,{children:[(0,s.jsx)(a.Skeleton,{className:"h-8 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-3 w-32 mt-2"})]})]}):(0,s.jsxs)(t.Card,{className:(0,r.cn)("",o),children:[(0,s.jsxs)(t.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,s.jsx)(t.CardTitle,{className:"text-sm font-medium text-muted-foreground",children:e}),n&&(0,s.jsx)(n,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsxs)(t.CardContent,{children:[(0,s.jsx)("div",{className:(0,r.cn)("text-2xl font-bold",Line truncated
|
||||
@@ -1,6 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},41947,e=>{"use strict";let t=(0,e.i(75254).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},37727,e=>{"use strict";var t=e.i(41947);e.s(["X",()=>t.default])},86536,e=>{"use strict";let t=(0,e.i(75254).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],86536)},24672,e=>{"use strict";var t=e.i(68834),n=e.i(54858);let r={logo_url:null,logo_height:40,primary_color:"#ff5bb8",secondary_color:"#8b5cf6",accent_color:"#ffdf6b",background_color:null,favicon_url:null,site_title:"Nomad Karaoke Generator",tagline:null},a={audio_search:!0,file_upload:!0,youtube_url:!0,youtube_upload:!0,dropbox_upload:!0,gdrive_upload:!0,theme_selection:!0,color_overrides:!0,enable_cdg:!0,enable_4k:!0,admin_access:!0},i={theme_id:null,locked_theme:null,distribution_mode:"all"},o=(0,t.create)()((e,t)=>({tenant:null,isDefault:!0,isLoading:!1,error:null,isInitialized:!1,get branding(){let{tenant:e}=t();return e?.branding??r},get features(){let{tenant:e}=t();return e?.features??a},get defaults(){let{tenant:e}=t();return e?.defaults??i},get tenantId(){let{tenant:e}=t();return e?.id??null},fetchTenantConfig:async()=>{if(!t().isLoading){e({isLoading:!0,error:null});try{let t=function(){let e=window.location.hostname.toLowerCase();if("localhost"===e||"127.0.0.1"===e)return new URLSearchParams(window.location.search).get("tenant");if(e.includes("nomadkaraoke.com")){let t=e.split(".");if((3===t.length||4===t.length&&"gen"===t[1])&&!["gen","api","www","buy","admin","app","beta"].includes(t[0]))return t[0]}return null}(),r=`${n.API_BASE_URL}/api/tenant/config`;t&&(r+=`?tenant=${encodeURIComponent(t)}`);let a=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...t?{"X-Tenant-ID":t}:{}}});if(!a.ok)throw Error("Failed to fetch tenant configuration");let i=await a.json();e({tenant:i.tenant,isDefault:i.is_default,isLoading:!1,isInitialized:!0}),i.tenant&&l(i.tenant.branding)}catch(t){console.error("Failed to fetch tenant config:",t),e({tenant:null,isDefault:!0,isLoading:!1,error:t instanceof Error?t.message:"Failed to load tenant configuration",isInitialized:!0})}}},setTenant:(t,n)=>{e({tenant:t,isDefault:n,isInitialized:!0}),t&&l(t.branding)},clearError:()=>e({error:null})}));function l(e){if("undefined"==typeof document)return;let t=document.documentElement;if(t.style.setProperty("--tenant-primary",e.primary_color),t.style.setProperty("--tenant-secondary",e.secondary_color),e.accent_color&&t.style.setProperty("--tenant-accent",e.accent_color),e.background_color&&t.style.setProperty("--tenant-background",e.background_color),e.site_title&&(document.title=e.site_title),e.favicon_url){let t=document.querySelector("link[rel~='icon']");t&&(t.href=e.favicon_url)}}e.s(["useTenant",0,o])},89554,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=(e,t,n,r,a,i,o,l)=>{let s=document.documentElement,c=["light","dark"];function d(t){var n;(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&i?a.map(e=>i[e]||e):a;n?(s.classList.remove(...r),s.classList.add(i&&i[t]?i[t]:t)):s.setAttribute(e,t)}),n=t,l&&c.includes(n)&&(s.style.colorScheme=n)}if(r)d(r);else try{let e=localStorage.getItem(t)||n,r=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(r)}catch(e){}},a=["light","dark"],i="(prefers-color-scheme: dark)",o="undefined"==typeof window,l=n.createContext(void 0),s=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(d,{...e}),c=["light","dark"],d=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:o=!0,storageKey:s="theme",themes:d=c,defaultTheme:h=r?"system":"light",attribute:p="data-theme",value:y,children:b,nonce:v,scriptProps:_})=>{let[w,k]=n.useState(()=>f(s,h)),[S,E]=n.useState(()=>"system"===w?g():w),T=y?Object.values(y):d,x=n.useCallback(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=g());let i=y?y[n]:n,l=t?m(v):null,s=document.documentElement,c=e=>{"class"===e?(s.classList.remove(...T),i&&s.classList.add(i)):e.startsWith("data-")&&(i?s.setAttribute(e,i):s.removeAttribute(e))};if(Array.isArray(p)?p.forEach(c):c(p),o){let e=a.includes(h)?h:null,t=a.includes(n)?n:e;s.style.colorScheme=t}null==l||l()},[v]),I=n.useCallback(e=>{let t="function"==typeof e?e(w):e;k(t);try{localStorage.setItem(s,t)}catch(e){}},[w]),j=n.useCallback(t=>{E(g(t)),"system"===w&&r&&!e&&x("system")},[w,e]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(j),j(e),()=>e.removeListener(j)},[j]),n.useEffect(()=>{let e=e=>{e.key===s&&(e.newValue?k(e.newValue)Line truncated
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${a}');
|
||||
`})]})}e.s(["GoogleAnalytics",()=>i])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7233,e=>{"use strict";let t=(0,e.i(75254).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},30374,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(26999),i=e.i(37727),l=e.i(47163);let r=s.Root,n=s.Trigger,o=s.Portal;s.Close;let d=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Overlay,{ref:i,className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",...a}));d.displayName=s.Overlay.displayName;let c=a.forwardRef(({className:e,children:a,showCloseButton:r=!0,...n},c)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(s.Content,{ref:c,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[a,r&&(0,t.jsxs)(s.Close,{className:"absolute right-3 top-2.5 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=s.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",...a});u.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",...a});m.displayName="DialogFooter";let h=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Title,{ref:i,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...a}));h.displayName=s.Title.displayName;let x=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Description,{ref:i,className:"text-sm text-muted-foreground",...a}));x.displayName=s.Description.displayName,e.s(["Dialog",()=>r,"DialogContent",()=>c,"DialogDescription",()=>x,"DialogFooter",()=>m,"DialogHeader",()=>u,"DialogTitle",()=>h,"DialogTrigger",()=>n])},16715,e=>{"use strict";let t=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},94179,e=>{"use strict";var t=e.i(43476),a=e.i(91918),s=e.i(25913),i=e.i(47163);let l=(0,s.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function r({className:e,variant:s,asChild:r=!1,...n}){let o=r?a.Slot:"span";return(0,t.jsx)(o,{"data-slot":"badge",className:(0,i.cn)(l({variant:s}),e),...n})}e.s(["Badge",()=>r])},20682,e=>{"use strict";var t=e.i(71645);let a=0,s=new Map,i=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),n({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},l=[],r={toasts:[]};function n(e){r=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?i(a):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(r,e),l.forEach(e=>{e(r)})}function o({...e}){let t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>n({type:"DISMISS_TOAST",toastId:t});return n({type:"ADD_TOAST",toast:Line truncated
|
||||
@@ -1,7 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30374,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(26999),r=e.i(37727),i=e.i(47163);let l=s.Root,n=s.Trigger,o=s.Portal;s.Close;let d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Overlay,{ref:r,className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",...a}));d.displayName=s.Overlay.displayName;let c=a.forwardRef(({className:e,children:a,showCloseButton:l=!0,...n},c)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(s.Content,{ref:c,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[a,l&&(0,t.jsxs)(s.Close,{className:"absolute right-3 top-2.5 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=s.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",...a});u.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",...a});m.displayName="DialogFooter";let x=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Title,{ref:r,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",e),...a}));x.displayName=s.Title.displayName;let p=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Description,{ref:r,className:"text-sm text-muted-foreground",...a}));p.displayName=s.Description.displayName,e.s(["Dialog",()=>l,"DialogContent",()=>c,"DialogDescription",()=>p,"DialogFooter",()=>m,"DialogHeader",()=>u,"DialogTitle",()=>x,"DialogTrigger",()=>n])},7233,e=>{"use strict";let t=(0,e.i(75254).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},63488,e=>{"use strict";let t=(0,e.i(75254).default)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Mail",()=>t],63488)},23616,e=>{"use strict";let t=(0,e.i(75254).default)("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);e.s(["Youtube",()=>t],23616)},16715,e=>{"use strict";let t=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},94179,e=>{"use strict";var t=e.i(43476),a=e.i(91918),s=e.i(25913),r=e.i(47163);let i=(0,s.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:s,asChild:l=!1,...n}){let o=l?a.Slot:"span";return(0,t.jsx)(o,{"data-slot":"badge",className:(0,r.cn)(i({variant:s}),e),...n})}e.s(["Badge",()=>l])},70065,e=>{"use strict";var t=e.i(43476),a=e.i(47163);function s({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-1 rounded-lg border py-6 shadow-sm",e),...s})}function r({className:e,...s}){retLine truncated
|
||||
|
||||
You can add a description to the \`${h}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${h}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},S=e.i(47163),A=e.i(67881);function R({...e}){return(0,t.jsx)(m,{"data-slot":"alert-dialog",...e})}function _({...e}){return(0,t.jsx)(x,{"data-slot":"alert-dialog-trigger",...e})}function E({...e}){return(0,t.jsx)(p,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...a}){return(0,t.jsx)(f,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function P({className:e,...a}){return(0,t.jsxs)(E,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(b,{"data-slot":"alert-dialog-content",className:(0,S.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a})]})}function B({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("flex flex-col gap-2 text-center sm:text-left",e),...a})}function M({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...a})}function O({className:e,...a}){return(0,t.jsx)(y,{"data-slot":"alert-dialog-title",className:(0,S.cn)("text-lg font-semibold",e),...a})}function H({className:e,...a}){return(0,t.jsx)(w,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-muted-foreground text-sm",e),...a})}function F({className:e,...a}){return(0,t.jsx)(N,{className:(0,S.cn)((0,A.buttonVariants)(),e),...a})}function L({className:e,...a}){return(0,t.jsx)(D,{className:(0,S.cn)((0,A.buttonVariants)({variant:"outline"}),e),...a})}e.s(["AlertDialog",()=>R,"AlertDialogAction",()=>F,"AlertDialogCancel",()=>L,"AlertDialogContent",()=>P,"AlertDialogDescription",()=>H,"AlertDialogFooter",()=>M,"AlertDialogHeader",()=>B,"AlertDialogTitle",()=>O,"AlertDialogTrigger",()=>_],30009)},27612,e=>{"use strict";let t=(0,e.i(75254).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],27612)},47627,e=>{"use strict";var t=e.i(43476),a=e.i(47163);function s({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...s})})}function r({className:e,...s}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...s})}function i({className:e,...s}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...s})}function l({className:e,...s}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...s})}function n({className:e,...s}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s})}function o({className:e,...s}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s})}e.s(["Table",()=>s,"TableBody",()=>i,"TableCell",()=>o,"TableHead",()=>n,"TableHeader",()=>r,"TableRow",()=>l])},20682,e=>{"use strict";var t=e.i(71645);let a=0,s=new Map,r=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),n({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},i=[],l={toasts:[]};function n(e){l=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?r(a):e.toasts.forEach(e=>{r(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(l,e),i.forEach(e=>{e(l)})}function o({...e}){let t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>n({type:"DISMISS_TOAST",toastId:t});return n({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||s()}}}),{id:t,dismiss:s,update:e=>n({type:"UPDATE_TOAST",toast:{...e,id:
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18800,(e,t,r)=>{"use strict";var n=e.r(71645);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=a(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=a(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=a(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=a(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-52684925-20251110"},74080,(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(18800)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return c},createSnapshot:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class u{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function c(){return s?new s:new u}function a(e){return s?s.bind(e):u.bind(e)}function l(){return s?s.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(42344)},35451,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64893,(e,t,r)=>{"use strict";var n=e.r(74080),u={stream:!0},o=Object.prototype.hasOwnProperty;function a(t){var r=e.r(t);return"function"!=typeof r.then||"fulfilled"===r.status?null:(r.then(function(e){r.status="fulfilled",r.value=e},function(e){r.status="rejected",r.reason=e}),r)}var l=new WeakSet,i=new WeakSet;function s(){}function c(t){for(var r=t[1],n=[],u=0;u<r.length;u++){var o=e.L(r[u]);if(i.has(o)||n.push(o),!l.has(o)){var c=i.add.bind(i,o);o.then(c,s),l.add(o)}}return 4===t.length?0===n.length?a(t[0]):Promise.all(n).then(function(){return a(t[0])}):0<n.length?Promise.all(n):null}function f(t){var r=e.r(t[0]);if(4===t.length&&"function"==typeof r.then)if("fulfilled"===r.status)r=r.value;else throw r.reason;return"*"===t[2]?r:""===t[2]?r.__esModule?r.default:r:o.call(r,t[2])?r[t[2]]:void 0}var d=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,p=Symbol.for("react.transitional.element"),h=Symbol.for("react.lazy"),v=Symbol.iterator,_=Symbol.asyncIterator,y=Array.isArray,b=Object.getPrototypeOf,g=Object.prototype,m=new WeakMap;function E(e,t,r){m.has(e)||m.set(e,{id:t,originalBind:e.bind,bound:r})}function R(e,t,r){this.status=e,this.value=t,this.reason=r}function O(e){switch(e.status){case"resolved_model":C(e);break;case"resolved_module":I(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"halted":throw e;default:throw e.reason}}function S(e,t,r){for(var n=0;n<t.length;n++){var u=t[n];"function"==typeof u?u(r):x(e,u,r)}}function w(e,t,r){for(var n=0;n<t.length;n++){var u=t[n];"function"==typeof u?u(r):L(e,u.handler,r)}}function P(e,t){var r=t.handler.chunk;if(null===r)return null;if(r===e)return t.handler;if(null!==(t=r.value))for(r=0;r<t.length;r++){var n=t[r];if("function"!=typeof n&&null!==(n=P(e,n)))return n}return null}function T(e,t,r,n){switch(t.status){case"fulfilled":S(e,r,t.value);break;case"blocked":for(var u=0;u<r.length;u++){var o=r[u];if("function"!=typeof o){var a=P(t,o);if(null!==a)switch(x(e,o,a.value),r.splice(u,1),u--,null!==n&&-1!==(o=n.indexOf(o))&&n.splice(o,1),t.status){case"fulfilled":S(e,r,t.value);return;case"rejected":null!==n&&w(e,n,t.reason);return}}}case"pending":if(t.value)for(e=0;e<r.length;e++)t.value.push(r[e]);else t.value=r;if(t.reason){if(n)for(r=0;r<n.length;r++)t.reason.push(n[r])}else t.reason=n;break;case"rejected":n&&w(e,n,t.reason)}}function j(e,t,r){if("pending"!==t.status&&"blocked"!==t.status)t.reason.error(r);else{var n=t.reason;t.status="rejected",t.reason=r,null!==n&&w(e,n,r)}}function A(e,t,r){return new R("resolved_model",(r?'{"done":true,"value":':'{"done":false,"value":')+t+"}",e)}function M(e,t,r,n){k(e,t,(n?'{"done":true,"value":':'{"done":false,"value":')+r+"}")}function k(e,t,r){if("pending"!==t.status)t.reason.enqueueModel(r);else{var n=t.value,u=t.reason;t.status="resolved_model",t.value=r,t.reason=e,null!==n&&(C(t),T(e,t,n,u))}}function U(e,t,r){if("pending"===t.status||"blocked"===t.status){var n=t.value,u=t.reason;t.status="resolved_module",t.value=r,null!==n&&(I(t),T(e,t,n,u))}}R.prototype=Object.create(Promise.prototype),R.prototype.then=function(e,t){switch(this.status){case"resolved_model":C(this);break;case"resolved_module":I(this)}switch(this.status){case"fulfilled":"function"==typeof e&&e(this.value);break;case"pending":case"blocked":"function"==typeof e&&(null===this.value&&(this.value=[]),this.value.push(e)),"function"==typeof t&&(null===this.reason&&(this.reason=[]),this.reason.push(t));break;case"halted":break;default:"function"==typeof t&&t(this.reason)}};var N=null;function C(e){var t=N;N=null;var r=e.value,n=e.reason;e.status="blocked",e.value=null,e.reason=null;try{var u=JSON.parse(r,n._fromJSON),o=e.value;if(null!==o)for(e.value=null,e.reason=null,r=0;r<o.length;r++){var a=o[r];"function"==typeof a?a(u):x(n,a,u,e)}if(null!==N){if(N.errored)throw N.reason;if(0<N.deps){N.value=u,N.chunk=e;return}}e.status="fulfilled",e.value=u}catch(t){e.status="rejected",e.reason=t}finally{N=t}}function I(e){try{var t=f(e.value);e.status="fulfilled",e.value=t}catch(t){e.status="rejected",e.reason=t}}function D(e,t){e._closed=!0,e._closedReason=t,e._chunks.forEach(function(r){"pending"===r.status&&j(e,r,t)})}function $(e){return{$$typeof:h,_payload:e,_init:O}}function F(e,t){var r=e._chunks,n=r.get(t);return n||(n=e._closed?new R("rejected",null,e._closedReason):new R("pending",null,null),r.set(t,n)),n}function x(e,t,r){for(var n=t.handler,u=t.parentObject,o=t.key,a=t.map,l=t.path,i=1;i<l.length;i++){for(;"object"==typeof r&&null!==r&&r.$$typeof===h;)if((r=r._payload)===n.chunk)r=n.value;else{switch(r.status){case"resolved_model":C(r);break;case"resolved_module":I(r)}switch(r.status){case"fulfilled":r=r.value;continue;case"blocked":var s=P(r,t);if(null!==s){r=s.value;continue}case"pending":l.splice(0,i-1),null===r.value?r.value=[t]:r.value.push(t),null===r.reason?r.reason=[t]:r.reason.pLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74886,e=>{"use strict";let t=(0,e.i(75254).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},67240,e=>{"use strict";let t=(0,e.i(75254).default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],67240)},69074,e=>{"use strict";let t=(0,e.i(75254).default)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);e.s(["Upload",()=>t],69074)},53339,e=>{"use strict";let t=(0,e.i(75254).default)("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",()=>t],53339)},71689,e=>{"use strict";let t=(0,e.i(75254).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],71689)},31278,17521,e=>{"use strict";let t=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>t],17521),e.s(["Loader2",()=>t],31278)},18566,(e,t,r)=>{t.exports=e.r(76562)},23750,e=>{"use strict";var t=e.i(43476),r=e.i(47163);function o({className:e,type:o,...n}){return(0,t.jsx)("input",{type:o,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}e.s(["Input",()=>o])},30374,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(26999),n=e.i(37727),l=e.i(47163);let i=o.Root,a=o.Trigger,s=o.Portal;o.Close;let c=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Overlay,{ref:n,className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",...r}));c.displayName=o.Overlay.displayName;let d=r.forwardRef(({className:e,children:r,showCloseButton:i=!0,...a},d)=>(0,t.jsxs)(s,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(o.Content,{ref:d,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[r,i&&(0,t.jsxs)(o.Close,{className:"absolute right-3 top-2.5 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(n.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));d.displayName=o.Content.displayName;let u=({className:e,...r})=>(0,t.jsx)("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",...r});u.displayName="DialogHeader";let p=({className:e,...r})=>(0,t.jsx)("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",...r});p.displayName="DialogFooter";let f=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Title,{ref:n,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...r}));f.displayName=o.Title.displayName;let h=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Description,{ref:n,className:"text-sm text-muted-foreground",...r}));h.displayName=o.Description.displayName,e.s(["Dialog",()=>i,"DialogContent",()=>d,"DialogDescription",()=>h,"DialogFooter",()=>p,"DialogHeader",()=>u,"DialogTitle",()=>f,"DialogTrigger",()=>a])},63059,46349,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t],46349),e.s(["ChevronRight",()=>t],63059)},28231,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(81140),n=e.i(20783),l=e.i(30030),i=e.i(26330),a=e.i(10772),s=e.i(53660),c=e.i(74606),d=e.i(Line truncated
|
||||
@@ -1,3 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88143,(e,t,r)=>{"use strict";function s({widthInt:e,heightInt:t,blurWidth:r,blurHeight:s,blurDataURL:a,objectFit:i}){let l=r?40*r:e,o=s?40*s:t,n=l&&o?`viewBox='0 0 ${l} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${n}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${n?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return n}}),e.r(33525);let s=e.r(88143),a=e.r(87690),i=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function n({src:e,sizes:t,unoptimized:r=!1,priority:n=!1,preload:d=!1,loading:c,className:m,quality:u,width:x,height:h,fill:p=!1,style:f,overrideSrc:g,onLoad:b,onLoadingComplete:y,placeholder:v="empty",blurDataURL:j,fetchPriority:w,decoding:N="async",layout:k,objectFit:S,objectPosition:_,lazyBoundary:C,lazyRoot:P,...E},O){var R;let M,I,T,{imgConf:F,showAltText:z,blurComplete:D,defaultLoader:$}=O,A=F||a.imageConfigDefault;if("allSizes"in A)M=A;else{let e=[...A.deviceSizes,...A.imageSizes].sort((e,t)=>e-t),t=A.deviceSizes.sort((e,t)=>e-t),r=A.qualities?.sort((e,t)=>e-t);M={...A,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===$)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let Y=E.loader||$;delete E.loader,delete E.srcSet;let q="__next_img_default"in Y;if(q){if("custom"===M.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
||||
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=Y;Y=t=>{let{config:r,...s}=t;return e(s)}}if(k){"fill"===k&&(p=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[k];e&&(f={...f,...e});let r={responsive:"100vw",fill:"100vw"}[k];r&&!t&&(t=r)}let L="",U=o(x),W=o(h);if((R=e)&&"object"==typeof R&&(l(R)||void 0!==R.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(I=t.blurWidth,T=t.blurHeight,j=j||t.blurDataURL,L=t.src,!p)if(U||W){if(U&&!W){let e=U/t.width;W=Math.round(t.height*e)}else if(!U&&W){let e=W/t.height;U=Math.round(t.width*e)}}else U=t.width,W=t.height}let B=!n&&!d&&("lazy"===c||void 0===c);(!(e="string"==typeof e?e:L)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,B=!1),M.unoptimized&&(r=!0),q&&!M.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let G=o(u),V=Object.assign(p?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:_}:{},z?{}:{color:"transparent"},f),K=D||"empty"===v?null:"blur"===v?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:U,heightInt:W,blurWidth:I,blurHeight:T,blurDataURL:j||"",objectFit:V.objectFit})}")`:`url("${v}")`,H=i.includes(V.objectFit)?"fill"===V.objectFit?"100% 100%":"cover":V.objectFit,J=K?{backgroundSize:H,backgroundPosition:V.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:K}:{},X=function({config:e,src:t,unoptimized:r,width:s,quality:a,sizes:i,loader:l}){if(r)return{src:t,srcSet:void 0,sizes:void 0};let{widths:o,kind:n}=function({deviceSizes:e,allSizes:t},r,s){if(s){let r=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=r.exec(s);)a.push(parseInt(e[2]));if(a.length){let r=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,i),d=o.length-1;return{sizes:i||"w"!==n?i:"100vw",srcSet:o.map((r,s)=>`${l({config:e,src:t,quality:a,width:r})} ${"w"===n?r:s+1}${n}`).join(", "),src:l({config:e,src:t,quality:a,width:o[d]})}}({config:M,src:e,unoptimized:r,width:U,quality:G,sizes:t,loader:Y}),Q=B?"lazy":c;return{props:{...E,loading:Q,fetchPriority:w,width:U,height:W,decoding:N,className:m,style:{...V,...J},sizes:X.sizes,srcSet:X.srcSet,src:g||X.src},meta:{unoptimized:r,preload:d||n,placeholder:v,fill:p}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let s=e.r(71645),a="undefined"==typeof window,i=a?()=>{}:s.useLayoutEffect,l=a?()=>{}:s.useEffect;function o(e){let{headManager:t,reduceComponentsToState:r}=e;function o(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return p},defaultHead:function(){return m}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(55682),l=e.r(90809),o=e.r(43476),n=l._(e.r(71645)),d=i._(e.r(98879)),c=e.r(42732);function m(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function u(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===n.default.Fragment?e.concat(n.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let x=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,s,a;return e.reduce(u,[]).reverse().concat(m().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=x.length;t<r;t++){let r=x[t];if(e.props.hasOwnPro
Line truncated
|
||||
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,s.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${i}${t.startsWith("/_next/static/media/"),""}`}a.__next_img_default=!0;let i=a},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(55682),a=e.r(90809),i=e.r(43476),l=a._(e.r(71645)),o=s._(e.r(74080)),n=s._(e.r(25633)),d=e.r(8927),c=e.r(87690),m=e.r(18556);e.r(33525);let u=e.r(65856),x=s._(e.r(1948)),h=e.r(18581),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function f(e,t,r,s,a,i,l){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function g(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)(({src:e,srcSet:t,sizes:r,height:s,width:a,decoding:o,className:n,style:d,fetchPriority:c,placeholder:m,loading:u,unoptimized:x,fill:p,onLoadRef:b,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:j,sizesInput:w,onLoad:N,onError:k,...S},_)=>{let C=(0,l.useCallback)(e=>{e&&(k&&(e.src=e.src),e.complete&&f(e,m,b,y,v,x,w))},[e,m,b,y,v,k,x,w]),P=(0,h.useMergedRef)(_,C);return(0,i.jsx)("img",{...S,...g(c),loading:u,width:a,height:s,decoding:o,"data-nimg":p?"fill":"1",className:n,style:d,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{f(e.currentTarget,m,b,y,v,x,w)},onError:e=>{j(!0),"empty"!==m&&v(!0),k&&k(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,r),null):(0,i.jsx)(n.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(u.RouterContext),s=(0,l.useContext)(m.ImageConfigContext),a=(0,l.useMemo)(()=>{let e=p||s||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"undefined"==typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:o,onLoadingComplete:n}=e,h=(0,l.useRef)(o);(0,l.useEffect)(()=>{h.current=o},[o]);let f=(0,l.useRef)(n);(0,l.useEffect)(()=>{f.current=n},[n]);let[g,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),{props:N,meta:k}=(0,d.getImgProps)(e,{defaultLoader:x.default,imgConf:a,blurComplete:g,showAltText:j});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...N,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:h,onLoadingCompleteRef:f,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),k.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:N}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return c},getImageProps:function(){return d}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(55682),l=e.r(8927),o=e.r(5500),n=i._(e.r(1948));function d(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=o.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},31713,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(18566),a=e.i(57688),i=e.i(53339),l=e.i(83086),o=e.i(78716),n=e.i(23616),d=e.i(64659),c=e.i(43531),m=e.i(75254);let u=(0,m.default)("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);var x=e.i(86311),h=e.i(63488),p=e.i(31278),f=e.i(55436);let g=(0,m.default)("L
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73884,e=>{"use strict";let t=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>t],73884)},31278,17521,e=>{"use strict";let t=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>t],17521),e.s(["Loader2",()=>t],31278)},18566,(e,t,r)=>{t.exports=e.r(76562)},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},65418,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(18566),a=e.i(31278),i=e.i(69638),l=e.i(73884),c=e.i(67881),n=e.i(38036);function d(){let e=(0,s.useRouter)(),d=(0,s.useSearchParams)(),[o,u]=(0,r.useState)("loading"),[m,x]=(0,r.useState)(""),h=(0,r.useRef)(!1),{verifyMagicLink:p,user:f,error:g}=(0,n.useAuth)();return(0,r.useEffect)(()=>{if(h.current)return;h.current=!0;let t=d.get("token");if(!t){u("error"),x("No verification token provided");return}(async()=>{await p(t)?(u("success"),setTimeout(()=>{e.push("/app")},2e3)):(u("error"),x(n.useAuth.getState().error||"Invalid or expired link"))})()},[d,p,e]),(0,t.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:["loading"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Loader2,{className:"w-12 h-12 text-primary animate-spin mx-auto mb-4"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground mb-2",children:"Verifying your sign-in link..."}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Please wait while we sign you in."})]}),"success"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.CheckCircle,{className:"w-12 h-12 text-success mx-auto mb-4"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground mb-2",children:"Successfully signed in!"}),(0,t.jsxs)("p",{className:"text-muted-foreground mb-4",children:["Welcome back",f?.email?`, ${f.email}`:"","!"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Redirecting you to the app..."})]}),"error"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.XCircle,{className:"w-12 h-12 text-destructive mx-auto mb-4"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground mb-2",children:"Sign-in failed"}),(0,t.jsx)("p",{className:"text-muted-foreground mb-6",children:m||"The link may have expired or already been used."}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(c.Button,{onClick:()=>e.push("/app"),className:"w-full bg-primary hover:bg-primary/90",children:"Go to App"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"You can request a new sign-in link from the app."})]})]})]})}function o(){return(0,t.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:[(0,t.jsx)(a.Loader2,{className:"w-12 h-12 text-primary animate-spin mx-auto mb-4"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground mb-2",children:"Loading..."}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Please wait."})]})}function u(){return(0,t.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)(o,{}),children:(0,t.jsx)(d,{})})})}e.s(["default",()=>u])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78745,e=>{"use strict";let t=(0,e.i(75254).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t])},31171,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},35804,e=>{"use strict";var t=e.i(71645),r=e.i(34620);function n(e){let[n,o]=t.useState(void 0);return(0,r.useLayoutEffect)(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,n;if(!Array.isArray(t)||!t.length)return;let l=t[0];if("borderBoxSize"in l){let e=l.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,n=t.blockSize}else r=e.offsetWidth,n=e.offsetHeight;o({width:r,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}o(void 0)},[e]),n}e.s(["useSize",()=>n])},99682,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},75830,86318,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),o=e.i(91918),l=e.i(43476);function a(e){let a=e+"CollectionProvider",[i,s]=(0,r.createContextScope)(a),[d,c]=i(a,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,l.jsx)(d,{scope:r,itemMap:a,collectionRef:o,children:n})};u.displayName=a;let p=e+"CollectionSlot",f=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,i=c(p,r),s=(0,n.useComposedRefs)(t,i.collectionRef);return(0,l.jsx)(o.Slot,{ref:s,children:a})});f.displayName=p;let v=e+"CollectionItemSlot",m="data-radix-collection-item",h=t.default.forwardRef((e,r)=>{let{scope:a,children:i,...s}=e,d=t.default.useRef(null),u=(0,n.useComposedRefs)(r,d),p=c(v,a);return t.default.useEffect(()=>(p.itemMap.set(d,{ref:d,...s}),()=>void p.itemMap.delete(d))),(0,l.jsx)(o.Slot,{...{[m]:""},ref:u,children:i})});return h.displayName=v,[{Provider:u,Slot:f,ItemSlot:h},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}e.s(["createCollection",()=>a],75830);var i=t.createContext(void 0);function s(e){let r=t.useContext(i);return e||r||"ltr"}e.s(["useDirection",()=>s],86318)},62870,70152,78784,9797,99219,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74080);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>o],70152);var l=e.i(81140),a=e.i(75830),i=e.i(20783),s=e.i(30030),d=e.i(86318),c=e.i(26330),u=e.i(3536),p=e.i(65491),f=e.i(10772),v=e.i(53660),m=e.i(74606),h=e.i(48425),x=e.i(91918),g=e.i(30207),w=e.i(69340),y=e.i(34620),b=e.i(99682),S=e.i(59411),C=e.i(86312),j=e.i(85369),R=[" ","Enter","ArrowUp","ArrowDown"],E=[" ","Enter"],P="Select",[k,T,I]=(0,a.createCollection)(P),[N,H]=(0,s.createContextScope)(P,[I,v.createPopperScope]),M=(0,v.createPopperScope)(),[D,L]=N(P),[A,z]=N(P),_=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:c,onValueChange:u,dir:p,name:m,autoComplete:h,disabled:x,required:g,form:y}=e,b=M(n),[S,C]=r.useState(null),[j,R]=r.useState(null),[E,P]=r.useState(!1),T=(0,d.useDirection)(p),[I=!1,N]=(0,w.useControllableState)({prop:l,defaultProp:a,onChange:i}),[H,L]=(0,w.useControllableState)({prop:s,defaultProp:c,onChange:u}),z=r.useRef(null),_=!S||y||!!S.closest("form"),[B,O]=r.useState(new Set),V=Array.from(B).map(e=>e.props.value).join(";");return(0,t.jsx)(v.Root,{...b,children:(0,t.jsxs)(D,{required:g,scope:n,trigger:S,onTriggerChange:C,valueNode:j,onValueNodeChange:R,valueNodeHasChildren:E,onValueNodeHasChildrenChange:P,contentId:(0,f.useId)(),value:H,onValueChange:L,open:I,onOpenChange:N,dir:T,triggerPointerDownPosRef:z,disabled:x,children:[(0,t.jsx)(k.Provider,{scope:n,children:(0,t.jsx)(A,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{O(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),_?(0,t.jsxs)(eb,{"aria-hidden":!0,required:g,tabIndex:-1,name:m,autoComplete:h,value:H,onChange:e=>L(e.target.value),disabled:x,form:y,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(B)]},V):null]})})};_.displayName=P;var B="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,d=M(o),c=L(B,o),u=c.disabled||a,p=(0,i.useComposedRefs)(n,c.onTriggerChange),f=T(o),m=r.useRef("touch"),[x,g,w]=eS(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===c.value),n=eC(t,e,r);void 0!==n&&c.onValueChange(n.value)}),y=e=>{u||(c.onOpenChange(!0),w()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageYLine truncated
|
||||
@@ -1,6 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41947,e=>{"use strict";let t=(0,e.i(75254).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},37727,e=>{"use strict";var t=e.i(41947);e.s(["X",()=>t.default])},86536,e=>{"use strict";let t=(0,e.i(75254).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],86536)},24672,e=>{"use strict";var t=e.i(68834),n=e.i(54858);let r={logo_url:null,logo_height:40,primary_color:"#ff5bb8",secondary_color:"#8b5cf6",accent_color:"#ffdf6b",background_color:null,favicon_url:null,site_title:"Nomad Karaoke Generator",tagline:null},a={audio_search:!0,file_upload:!0,youtube_url:!0,youtube_upload:!0,dropbox_upload:!0,gdrive_upload:!0,theme_selection:!0,color_overrides:!0,enable_cdg:!0,enable_4k:!0,admin_access:!0},i={theme_id:null,locked_theme:null,distribution_mode:"all"},o=(0,t.create)()((e,t)=>({tenant:null,isDefault:!0,isLoading:!1,error:null,isInitialized:!1,get branding(){let{tenant:e}=t();return e?.branding??r},get features(){let{tenant:e}=t();return e?.features??a},get defaults(){let{tenant:e}=t();return e?.defaults??i},get tenantId(){let{tenant:e}=t();return e?.id??null},fetchTenantConfig:async()=>{if(!t().isLoading){e({isLoading:!0,error:null});try{let t=function(){let e=window.location.hostname.toLowerCase();if("localhost"===e||"127.0.0.1"===e)return new URLSearchParams(window.location.search).get("tenant");if(e.includes("nomadkaraoke.com")){let t=e.split(".");if((3===t.length||4===t.length&&"gen"===t[1])&&!["gen","api","www","buy","admin","app","beta"].includes(t[0]))return t[0]}return null}(),r=`${n.API_BASE_URL}/api/tenant/config`;t&&(r+=`?tenant=${encodeURIComponent(t)}`);let a=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...t?{"X-Tenant-ID":t}:{}}});if(!a.ok)throw Error("Failed to fetch tenant configuration");let i=await a.json();e({tenant:i.tenant,isDefault:i.is_default,isLoading:!1,isInitialized:!0}),i.tenant&&l(i.tenant.branding)}catch(t){console.error("Failed to fetch tenant config:",t),e({tenant:null,isDefault:!0,isLoading:!1,error:t instanceof Error?t.message:"Failed to load tenant configuration",isInitialized:!0})}}},setTenant:(t,n)=>{e({tenant:t,isDefault:n,isInitialized:!0}),t&&l(t.branding)},clearError:()=>e({error:null})}));function l(e){if("undefined"==typeof document)return;let t=document.documentElement;if(t.style.setProperty("--tenant-primary",e.primary_color),t.style.setProperty("--tenant-secondary",e.secondary_color),e.accent_color&&t.style.setProperty("--tenant-accent",e.accent_color),e.background_color&&t.style.setProperty("--tenant-background",e.background_color),e.site_title&&(document.title=e.site_title),e.favicon_url){let t=document.querySelector("link[rel~='icon']");t&&(t.href=e.favicon_url)}}e.s(["useTenant",0,o])},89554,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=(e,t,n,r,a,i,o,l)=>{let s=document.documentElement,c=["light","dark"];function d(t){var n;(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&i?a.map(e=>i[e]||e):a;n?(s.classList.remove(...r),s.classList.add(i&&i[t]?i[t]:t)):s.setAttribute(e,t)}),n=t,l&&c.includes(n)&&(s.style.colorScheme=n)}if(r)d(r);else try{let e=localStorage.getItem(t)||n,r=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(r)}catch(e){}},a=["light","dark"],i="(prefers-color-scheme: dark)",o="undefined"==typeof window,l=n.createContext(void 0),s=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(d,{...e}),c=["light","dark"],d=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:o=!0,storageKey:s="theme",themes:d=c,defaultTheme:h=r?"system":"light",attribute:p="data-theme",value:y,children:b,nonce:v,scriptProps:_})=>{let[w,k]=n.useState(()=>f(s,h)),[S,E]=n.useState(()=>"system"===w?g():w),T=y?Object.values(y):d,x=n.useCallback(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=g());let i=y?y[n]:n,l=t?m(v):null,s=document.documentElement,c=e=>{"class"===e?(s.classList.remove(...T),i&&s.classList.add(i)):e.startsWith("data-")&&(i?s.setAttribute(e,i):s.removeAttribute(e))};if(Array.isArray(p)?p.forEach(c):c(p),o){let e=a.includes(h)?h:null,t=a.includes(n)?n:e;s.style.colorScheme=t}null==l||l()},[v]),I=n.useCallback(e=>{let t="function"==typeof e?e(w):e;k(t);try{localStorage.setItem(s,t)}catch(e){}},[w]),j=n.useCallback(t=>{E(g(t)),"system"===w&&r&&!e&&x("system")},[w,e]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(j),j(e),()=>e.removeListener(j)},[j]),n.useEffect(()=>{let e=e=>{e.key===s&&(e.newValue?k(e.newValue):I(h))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[I]),n.useEffect(()=>{x(null!=e?e:w)},[e,w]);let C=n.useMemo(()=>({themLine truncated
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${a}');
|
||||
`})]})}e.s(["GoogleAnalytics",()=>i])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},54458,e=>{"use strict";var t=e.i(68834),r=e.i(79473);let a=(0,t.create)()((0,r.persist)(e=>({showTestData:!1,setShowTestData:t=>e({showTestData:t})}),{name:"admin-settings"}));e.s(["useAdminSettings",0,a])},39616,e=>{"use strict";let t=(0,e.i(75254).default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>t],39616)},69035,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(48425),n="horizontal",i=["horizontal","vertical"],o=r.forwardRef((e,r)=>{var o;let{decorative:s,orientation:l=n,...d}=e,c=(o=l,i.includes(o))?l:n;return(0,t.jsx)(a.Primitive.div,{"data-orientation":c,...s?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"},...d,ref:r})});o.displayName="Separator";var s=e.i(47163);function l({className:e,orientation:r="horizontal",decorative:a=!0,...n}){return(0,t.jsx)(o,{"data-slot":"separator",decorative:a,orientation:r,className:(0,s.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}e.s(["Separator",()=>l],69035)},63059,46349,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t],46349),e.s(["ChevronRight",()=>t],63059)},35804,e=>{"use strict";var t=e.i(71645),r=e.i(34620);function a(e){let[a,n]=t.useState(void 0);return(0,r.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,a;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;n({width:r,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),a}e.s(["useSize",()=>a])},99682,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},55436,e=>{"use strict";let t=(0,e.i(75254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",()=>t],55436)},31278,17521,e=>{"use strict";let t=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>t],17521),e.s(["Loader2",()=>t],31278)},18566,(e,t,r)=>{t.exports=e.r(76562)},23750,e=>{"use strict";var t=e.i(43476),r=e.i(47163);function a({className:e,type:a,...n}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}e.s(["Input",()=>a])},71689,e=>{"use strict";let t=(0,e.i(75254).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],71689)},28231,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(81140),n=e.i(20783),i=e.i(30030),o=e.i(26330),s=e.i(10772),l=e.i(53660),d=e.i(74606),c=e.i(96626),u=e.i(48425),f=e.i(91918),p=e.i(69340),h=e.i(59411),[b,m]=(0,i.createContextScope)("Tooltip",[l.createPopperScope]),g=(0,l.createPopperScope)(),x="TooltipProvider",v="tooltip.open",[y,w]=b(x),j=e=>{let{__scopeTooltip:a,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:s}=e,[l,d]=r.useState(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,t.jsx)(y,{scope:a,isOpenDelayed:l,delayDuratLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74575,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getAssetPrefix",{enumerable:!0,get:function(){return l}});let r=e.r(12718);function l(){let e=document.currentScript;if(!(e instanceof HTMLScriptElement))throw Object.defineProperty(new r.InvariantError(`Expected document.currentScript to be a <script> element. Received ${e} instead.`),"__NEXT_ERROR_CODE",{value:"E783",enumerable:!1,configurable:!0});let{pathname:t}=new URL(e.src),n=t.indexOf("/_next/");if(-1===n)throw Object.defineProperty(new r.InvariantError(`Expected document.currentScript src to contain '/_next/'. Received ${e.src} instead.`),"__NEXT_ERROR_CODE",{value:"E784",enumerable:!1,configurable:!0});return t.slice(0,n)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},96517,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"appBootstrap",{enumerable:!0,get:function(){return a}});let r=e.r(74575),l=e.r(22737);function a(e){var t,n;let a=(0,r.getAssetPrefix)();t=self.__next_s,n=()=>{e(a)},t&&t.length?t.reduce((e,[t,n])=>e.then(()=>new Promise((e,r)=>{let a=document.createElement("script");n&&(0,l.setAttributesFromProps)(a,n),t?(a.src=t,a.onload=()=>e(),a.onerror=r):n&&(a.innerHTML=n.children,setTimeout(e)),document.head.appendChild(a)})),Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}window.next={version:"16.0.7",appDir:!0},("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},16565,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={getObjectClassLabel:function(){return a},isPlainObject:function(){return o}};for(var l in r)Object.defineProperty(n,l,{enumerable:!0,get:r[l]});function a(e){return Object.prototype.toString.call(e)}function o(e){if("[object Object]"!==a(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}},2023,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return o},getProperError:function(){return i}};for(var l in r)Object.defineProperty(n,l,{enumerable:!0,get:r[l]});let a=e.r(16565);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function i(e){let t;return o(e)?e:Object.defineProperty(Error((0,a.isPlainObject)(e)?(t=new WeakSet,JSON.stringify(e,(e,n)=>{if("object"==typeof n&&null!==n){if(t.has(n))return"[Circular]";t.add(n)}return n})):e+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},28279,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"reportGlobalError",{enumerable:!0,get:function(){return r}});let r="function"==typeof reportError?reportError:e=>{globalThis.console.error(e)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},97238,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={isRecoverableError:function(){return c},onRecoverableError:function(){return f}};for(var l in r)Object.defineProperty(n,l,{enumerable:!0,get:r[l]});let a=e.r(55682),o=e.r(32061),i=a._(e.r(2023)),u=e.r(28279),s=new WeakSet;function c(e){return s.has(e)}let f=e=>{let t=(0,i.default)(e)&&"cause"in e?e.cause:e;(0,o.isBailoutToCSRError)(t)||(0,u.reportGlobalError)(t)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},5526,(e,t,n)=>{"use strict";t.exports={}},66849,(e,t,n)=>{"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntrLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:forwards;--tw-animation-iteration-count:1;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-red-50:#fef2f2;--color-red-100:#ffe2e2;--color-red-200:#ffcaca;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-red-800:#9f0712;--color-red-900:#82181a;--color-red-950:#460809;--color-orange-50:#fff7ed;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-950:#441306;--color-amber-50:#fffbeb;--color-amber-100:#fef3c6;--color-amber-200:#fee685;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-950:#461901;--color-yellow-50:#fefce8;--color-yellow-400:#fac800;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-yellow-700:#a36100;--color-yellow-950:#432004;--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-300:#7bf1a8;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-green-700:#008138;--color-green-900:#0d542b;--color-green-950:#032e15;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-400:#00d3bd;--color-teal-500:#00baa7;--color-cyan-400:#00d2ef;--color-cyan-500:#00b7d7;--color-blue-50:#eff6ff;--color-blue-300:#90c5ff;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-blue-950:#162456;--color-indigo-400:#7d87ff;--color-violet-400:#a685ff;--color-purple-50:#faf5ff;--color-purple-300:#d9b3ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-purple-700:#8200da;--color-purple-950:#3c0366;--color-pink-400:#fb64b6;--color-pink-500:#f6339a;--color-slate-700:#314158;--color-slate-800:#1d293d;--color-gray-300:#d1d5dc;--color-gray-400:#99a1af;--color-zinc-400:#9f9fa9;--color-zinc-500:#71717b;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r,n,o=function(t){return t&&t.Math===Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),s=!a(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),c=Function.prototype.call,f=s?c.bind(c):function(){return c.apply(c,arguments)},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l,v={f:p},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g=Function.prototype,y=g.call,m=s&&g.bind.bind(y,y),b=s?m:function(t){return function(){return y.apply(t,arguments)}},w=b({}.toString),S=b("".slice),E=function(t){return S(w(t),8,-1)},O=Object,x=b("".split),R=a(function(){return!O("z").propertyIsEnumerable(0)})?function(t){return"String"===E(t)?x(t,""):O(t)}:O,P=function(t){return null==t},A=TypeError,j=function(t){if(P(t))throw new A("Can't call method on "+t);return t},k=function(t){return R(j(t))},I="object"==typeof document&&document.all,T=void 0===I&&void 0!==I?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},M=function(t){return"object"==typeof t?null!==t:T(t)},L=function(t,e){return arguments.length<2?T(r=i[t])?r:void 0:i[t]&&i[t][e];var r},U=b({}.isPrototypeOf),N=i.navigator,C=N&&N.userAgent,_=C?String(C):"",F=i.process,B=i.Deno,D=F&&F.versions||B&&B.version,z=D&&D.v8;z&&(n=(r=z.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&_&&(!(r=_.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=_.match(/Chrome\/(\d+)/))&&(n=+r[1]);var W=n,q=i.String,H=!!Object.getOwnPropertySymbols&&!a(function(){var t=Symbol("symbol detection");return!q(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41}),$=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,K=Object,G=$?function(t){return"symbol"==typeof t}:function(t){var e=L("Symbol");return T(e)&&U(e.prototype,K(t))},V=String,Y=function(t){try{return V(t)}catch(t){return"Object"}},X=TypeError,J=function(t){if(T(t))return t;throw new X(Y(t)+" is not a function")},Q=function(t,e){var r=t[e];return P(r)?void 0:J(r)},Z=TypeError,tt=Object.defineProperty,et=function(t,e){try{tt(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},rt=e(function(t){var e="__core-js_shared__",r=t.exports=i[e]||et(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),nt=function(t,e){return rt[t]||(rt[t]=e||{})},ot=Object,it=function(t){return ot(j(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},st=0,ct=Math.random(),ft=b(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++st+ct,36)},ht=i.Symbol,pt=nt("wks"),vt=$?ht.for||ht:ht&&ht.withoutSetter||lt,dt=function(t){return ut(pt,t)||(pt[t]=H&&ut(ht,t)?ht[t]:vt("Symbol."+t)),pt[t]},gt=TypeError,yt=dt("toPrimitive"),mt=function(t,e){if(!M(t)||G(t))return t;var r,n=Q(t,yt);if(n){if(void 0===e&&(e="default"),r=f(n,t,e),!M(r)||G(r))return r;throw new gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!M(n=f(r,t)))return n;if(T(r=t.valueOf)&&!M(n=f(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!M(n=f(r,t)))return n;throw new Z("Can't convert object to primitive value")}(t,e)},bt=function(t){var e=mt(t,"string");return G(e)?e:e+""},wt=i.document,St=M(wt)&&M(wt.createElement),Et=function(t){return St?wt.createElement(t):{}},Ot=!u&&!a(function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),xt=Object.getOwnPropertyDescriptor,Rt={f:u?xt:function(t,e){if(t=k(t),e=bt(e),Ot)try{return xt(t,e)}catch(t){}if(ut(t,e))return d(!f(v.f,t,e),t[e])}},Pt=u&&a(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),At=String,jt=TypeError,kt=function(t){if(M(t))return t;throw new jt(At(t)+" is not an object")},It=TypeError,Tt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Lt="enumerable",Ut="configurable",Nt="writable",Ct={f:u?Pt?function(t,e,r){if(kt(t),e=bt(e),kt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Nt in r&&!r[Nt]){var n=Mt(t,e);n&&n[Nt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Lt in r?r[Lt]:n[Lt],writable:!1})}return Tt(t,e,r)}:Tt:function(t,e,r){if(kt(t),e=bt(e),kt(r),Ot)try{return Tt(t,e,r)}catch(tLine truncated
|
||||
@@ -1,3 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27627,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(18566),s=e.i(54858),n=e.i(38036),o=e.i(54458);let i={pending:{step:1,label:"Setting up",isBlocking:!1,color:"text-muted-foreground"},searching_audio:{step:2,label:"Searching for audio",isBlocking:!1,color:"text-blue-400"},awaiting_audio_selection:{step:2,label:"Select audio source",isBlocking:!0,color:"text-amber-400"},downloading_audio:{step:3,label:"Downloading audio",isBlocking:!1,color:"text-blue-400"},downloading:{step:3,label:"Downloading",isBlocking:!1,color:"text-blue-400"},separating_stage1:{step:4,label:"Separating audio (1/2)",isBlocking:!1,color:"text-purple-400"},separating_stage2:{step:4,label:"Separating audio (2/2)",isBlocking:!1,color:"text-purple-400"},audio_complete:{step:4,label:"Audio ready, processing lyrics",isBlocking:!1,color:"text-purple-400"},transcribing:{step:4,label:"Transcribing lyrics",isBlocking:!1,color:"text-blue-400"},correcting:{step:4,label:"Correcting lyrics",isBlocking:!1,color:"text-blue-400"},lyrics_complete:{step:4,label:"Lyrics ready, processing audio",isBlocking:!1,color:"text-teal-400"},generating_screens:{step:5,label:"Generating screens",isBlocking:!1,color:"text-cyan-400"},applying_padding:{step:5,label:"Syncing countdown",isBlocking:!1,color:"text-cyan-400"},awaiting_review:{step:6,label:"Review lyrics",isBlocking:!0,color:"text-amber-400"},in_review:{step:6,label:"In review",isBlocking:!0,color:"text-blue-400"},review_complete:{step:7,label:"Starting render",isBlocking:!1,color:"text-teal-400"},rendering_video:{step:7,label:"Rendering video",isBlocking:!1,color:"text-indigo-400"},awaiting_instrumental_selection:{step:8,label:"Select instrumental",isBlocking:!0,color:"text-amber-400"},instrumental_selected:{step:9,label:"Starting final encode",isBlocking:!1,color:"text-pink-400"},generating_video:{step:9,label:"Generating final video",isBlocking:!1,color:"text-violet-400"},encoding:{step:9,label:"Encoding video",isBlocking:!1,color:"text-violet-400"},packaging:{step:9,label:"Packaging files",isBlocking:!1,color:"text-violet-400"},uploading:{step:10,label:"Uploading",isBlocking:!1,color:"text-green-400"},notifying:{step:10,label:"Sending notifications",isBlocking:!1,color:"text-green-400"},complete:{step:10,label:"Complete",isBlocking:!1,color:"text-green-400"},prep_complete:{step:10,label:"Prep complete",isBlocking:!1,color:"text-green-400"},failed:{step:0,label:"Failed",isBlocking:!1,color:"text-red-400"},cancelled:{step:0,label:"Cancelled",isBlocking:!1,color:"text-muted-foreground"}};function l(e){let t=e.status?.toLowerCase()||"pending",r=i[t];if(!r)return{step:0,total:10,label:t.replace(/_/g," "),isBlocking:!1,color:"text-muted-foreground"};if("downloading"===t&&function(e){if(!e.state_data)return!1;let t=e.state_data.audio_progress,r=e.state_data.lyrics_progress;return!!(t?.stage||r?.stage)}(e))return{step:4,total:10,label:c(e,"Processing"),isBlocking:!1,color:"text-purple-400"};if(4===r.step&&e.state_data){let t=c(e,r.label);return{step:r.step,total:10,label:t,isBlocking:r.isBlocking,color:r.color}}return{step:r.step,total:10,label:r.label,isBlocking:r.isBlocking,color:r.color}}function c(e,t){let r=e.state_data?.audio_progress,a=e.state_data?.lyrics_progress;if(r&&a){let t=r.stage||"",s=a.stage||"",n="audio_complete"===t||e.state_data?.audio_complete,o="lyrics_complete"===s||e.state_data?.lyrics_complete;if(n&&o)return"Processing complete";let i=[];if(n||i.push(function(e){switch(e){case"separating_stage1":return"Audio 1/2";case"separating_stage2":return"Audio 2/2";case"audio_complete":return"Audio done";default:return"Audio"}}(t)),o||i.push(function(e){switch(e){case"transcribing":return"Transcribing";case"correcting":return"Correcting";case"lyrics_complete":return"Lyrics done";default:return"Lyrics"}}(s)),i.length>0)return i.join(" + ")}return t}function d(e){let t=i[e?.toLowerCase()];return t?.isBlocking??!1}function u(e){let t=e.status?.toLowerCase()||"",r=i[t];return r?.isBlocking?0:"complete"===t||"prep_complete"===t?2:"failed"===t||"cancelled"===t?3:1}let p="Karaoke Generator";var m=e.i(67881),x=e.i(70065),h=e.i(62870),g=e.i(75254);let f=(0,g.default)("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);var b=e.i(16715),v=e.i(31278),y=e.i(91799),j=e.i(97250),w=e.i(5833);let N=(0,g.default)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var k=e.i(20682),C=e.i(67240),_=e.i(73884);function S({job:e,onRefresh:a}){let[n,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),{toast:c}=(0,k.useToast)(),d="failed"===e.status||"cancelled"===e.status,u=!["complete","failed","cancelled"].includes(e.status);async function p(){o(!0);try{await s.api.retryJob(e.job_id),c({title:"Job retry started",descriptioLine truncated
|
||||
${u?"border-green-500/30":""}
|
||||
${p?"border-red-500/30":""}`,style:{borderColor:u||p?void 0:"var(--card-border)",backgroundColor:"var(--card)"},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("p",{className:"font-medium truncate min-w-0",style:{color:"var(--text)"},children:[e.state_data?.brand_code&&`${e.state_data.brand_code}: `,e.artist||"Unknown"," - ",e.title||"Unknown"]}),e.non_interactive&&(0,t.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-400 font-medium",children:[(0,t.jsx)(N,{className:"w-2.5 h-2.5"}),"Auto"]})]}),(0,t.jsxs)("p",{className:"text-xs mt-1 flex flex-wrap gap-x-1.5 gap-y-0.5",style:{color:"var(--text-muted)"},children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{style:{opacity:.7},children:"ID:"})," ",e.job_id.slice(0,8)]}),(0,t.jsx)("span",{style:{opacity:.7},children:"•"}),(0,t.jsx)("span",{children:c}),(0,t.jsx)("span",{style:{opacity:.7},children:"•"}),(0,t.jsx)(z,{job:e})]}),(0,t.jsx)(G,{job:e}),e.error_message&&(0,t.jsx)("div",{className:"mt-2 text-xs text-red-400 bg-red-500/10 rounded p-2 break-words",children:e.error_message}),(u||l)&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(B,{job:e})}),(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-between",children:[(0,t.jsx)(S,{job:e,onRefresh:a}),e.non_interactive&&d?(0,t.jsxs)("div",{className:"flex items-center gap-1 text-xs text-amber-400",children:[(0,t.jsx)(N,{className:"w-3 h-3"}),"Will auto-","awaiting_review"===e.status||"in_review"===e.status?"accept":"awaiting_instrumental_selection"===e.status?"select":"select first"]}):"awaiting_review"===e.status||"in_review"===e.status?(0,t.jsx)("a",{href:`/app/jobs#/${e.job_id}/review`,className:"inline-flex items-center gap-1 text-xs px-3 py-1.5 rounded bg-primary-500 hover:bg-primary-600 text-white",children:"Review Lyrics"}):"awaiting_audio_selection"===e.status?(0,t.jsx)(m.Button,{size:"sm",onClick:()=>o(!0),className:"text-xs h-7 px-3 bg-primary-500 hover:bg-primary-600",children:"Select Audio"}):"awaiting_instrumental_selection"===e.status?(0,t.jsx)("a",{href:`/app/jobs#/${e.job_id}/instrumental`,className:"inline-flex items-center gap-1 text-xs px-3 py-1.5 rounded bg-primary-500 hover:bg-primary-600 text-white",children:"Select Instrumental"}):null]}),(0,t.jsx)(K,{jobId:e.job_id,open:s,onClose:()=>o(!1),onSelect:a})]})}e.i(63209);var W=e.i(27341),q=e.i(69074),J=e.i(23616),X=e.i(53339),Z=e.i(63059);function Q({onJobCreated:e}){let{user:a}=(0,n.useAuth)(),{features:o,isDefault:i,tenant:l}=(0,R.useTenant)(),c=a?.role==="admin",d=(0,r.useMemo)(()=>{let e=[];return o.audio_search&&e.push("search"),o.file_upload&&e.push("upload"),o.youtube_url&&e.push("url"),0===e.length&&e.push("upload"),e},[o]),[u,p]=(0,r.useState)(d[0]);(0,r.useEffect)(()=>{d.includes(u)||p(d[0])},[d,u]);let[x,h]=(0,r.useState)(""),[g,f]=(0,r.useState)(!1),[b,y]=(0,r.useState)(null),[j,w]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[C,_]=(0,r.useState)(""),[S,E]=(0,r.useState)(""),[D,T]=(0,r.useState)(""),[I,L]=(0,r.useState)(""),[A,P]=(0,r.useState)(""),[B,U]=(0,r.useState)(""),[$,H]=(0,r.useState)(""),[V,K]=(0,r.useState)(!1),[z,G]=(0,r.useState)(!1);async function Y(t){if(t.preventDefault(),h(""),!b)return void h("Please select an audio file");if(!j.trim()||!N.trim())return void h("Please enter both artist and title");f(!0);try{await s.api.uploadJob(b,j.trim(),N.trim(),{non_interactive:z}),y(null),w(""),k(""),e()}catch(e){e instanceof s.ApiError?h(e.message):h("Failed to create job")}finally{f(!1)}}async function Q(t){if(t.preventDefault(),h(""),!C.trim())return void h("Please enter a URL");if(!S.trim()||!D.trim())return void h("Please enter both artist and title");f(!0);try{await s.api.createJobFromUrl(C.trim(),S.trim(),D.trim(),{non_interactive:z}),_(""),E(""),T(""),e()}catch(e){e instanceof s.ApiError?h(e.message):h("Failed to create job")}finally{f(!1)}}async function ee(t){if(t.preventDefault(),h(""),!I.trim()||!A.trim())return void h("Please enter both artist and title");f(!0);try{await s.api.searchAudio(I.trim(),A.trim(),!1,{non_interactive:z,display_artist:B.trim()||void 0,display_title:$.trim()||void 0}),L(""),P(""),U(""),H(""),e()}catch(e){e instanceof s.ApiError?h(e.message):h("Failed to search for audio")}finally{f(!1)}}return(0,t.jsxs)(W.Tabs,{value:u,onValueChange:p,children:[d.length>1&&(0,t.jsxs)(W.TabsList,{className:`grid w-full h-auto rounded-lg p-1 ${2===d.length?"grid-cols-2":"grid-cols-3"}`,style:{backgroundColor:"var(--secondary)"},children:[d.includes("search")&&(0,t.jsxs)(W.TabsTrigger,{value:"search",className:"gap-1.5 sm:gap-2 py-3 min-h-[44px] text-xs sm:text-sm rounded-md data-[state=active]:!bg-[var(--brand-pink)] data-[state=active]:!text-white data-[state=active]:shadow-md data-[state=inactive]:hover:bg-[var(--brand-pink)]/10",style:{color:"search"===u?"white":"var(--text-muted)"},children:[(0,t.jsx)(X.Music,{className:"w-4 h-4 shrink-0"}),(0,t.js
Line truncated
|
||||
@@ -1,2 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34727,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={computeChangedPath:function(){return d},extractPathFromFlightRouterState:function(){return s},getSelectedParams:function(){return function e(t,r={}){for(let n of Object.values(t[1])){let t=n[0],l=Array.isArray(t),a=l?t[1]:t;!a||a.startsWith(u.PAGE_SEGMENT_KEY)||(l&&("c"===t[2]||"oc"===t[2])?r[t[0]]=t[1].split("/"):l&&(r[t[0]]=t[1]),r=e(n,r))}return r}}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(91463),u=e.r(13258),o=e.r(56019),i=e=>"string"==typeof e?"children"===e?"":e:e[1];function c(e){return e.reduce((e,t)=>{let r;return""===(t="/"===(r=t)[0]?r.slice(1):r)||(0,u.isGroupSegment)(t)?e:`${e}/${t}`},"")||"/"}function s(e){let t=Array.isArray(e[0])?e[0][1]:e[0];if(t===u.DEFAULT_SEGMENT_KEY||a.INTERCEPTION_ROUTE_MARKERS.some(e=>t.startsWith(e)))return;if(t.startsWith(u.PAGE_SEGMENT_KEY))return"";let r=[i(t)],n=e[1]??{},l=n.children?s(n.children):void 0;if(void 0!==l)r.push(l);else for(let[e,t]of Object.entries(n)){if("children"===e)continue;let n=s(t);void 0!==n&&r.push(n)}return c(r)}function d(e,t){let r=function e(t,r){let[n,l]=t,[u,c]=r,d=i(n),f=i(u);if(a.INTERCEPTION_ROUTE_MARKERS.some(e=>d.startsWith(e)||f.startsWith(e)))return"";if(!(0,o.matchSegment)(n,u))return s(r)??"";for(let t in l)if(c[t]){let r=e(l[t],c[t]);if(null!==r)return`${i(u)}/${r}`}return null}(e,t);return null==r||"/"===r?r:c(r.split("/"))}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},47442,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"handleMutable",{enumerable:!0,get:function(){return a}});let n=e.r(34727);function l(e){return void 0!==e}function a(e,t){let r=t.shouldScroll??!0,a=e.previousNextUrl,u=e.nextUrl;if(l(t.patchedTree)){let r=(0,n.computeChangedPath)(e.tree,t.patchedTree);r?(a=u,u=r):u||(u=e.canonicalUrl)}return{canonicalUrl:t.canonicalUrl??e.canonicalUrl,renderedSearch:t.renderedSearch??e.renderedSearch,pushRef:{pendingPush:l(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:l(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:l(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!r&&(!!l(t?.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:t.onlyHashChange||!1,hashFragment:r?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:r?t?.scrollableSegments??e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,tree:l(t.patchedTree)?t.patchedTree:e.tree,nextUrl:u,previousNextUrl:a,debugInfo:t.collectedDebugInfo??null}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},48919,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,r){let n=t[0],l=r[0];if(Array.isArray(n)&&Array.isArray(l)){if(n[0]!==l[0]||n[2]!==l[2])return!0}else if(n!==l)return!0;if(t[4])return!r[4];if(r[4])return!0;let a=Object.values(t[1])[0],u=Object.values(r[1])[0];return!a||!u||e(a,u)}}}),("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95871,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={abortTask:function(){return R},listenForDynamicRequest:function(){return g},startPPRNavigation:function(){return f},updateCacheNodeOnPopstateRestoration:function(){return function e(t,r){let n=r[1],l=t.parallelRoutes,a=new Map(l);for(let t in n){let r=n[t],u=r[0],o=(0,i.createRouterCacheKey)(u),c=l.get(t);if(void 0!==c){let n=c.get(o);if(void 0!==n){let l=e(n,r),u=new Map(c);u.set(o,l),a.set(t,u)}}}let u=t.rsc,o=v(u)&&"pending"===u.status;return{lazyData:null,rsc:u,head:t.head,prefetchHead:o?t.prefetchHead:[null,null],prefetchRsc:o?t.prefetchRsc:null,loading:t.loading,parallelRoutes:a,navigatedAt:t.navigatedAt}}}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(13258),u=e.r(56019),o=e.r(51191),i=e.r(70725),c=e.r(48919),s=e.r(54069),d={route:null,node:null,dynamicRequestTree:null,children:null};function f(e,t,r,n,l,c,s,f,y,g){return function e(t,r,n,l,c,s,f,y,g,R,P,_){let v=l[1],m=c[1],E=null!==f?f[1]:null;s||!0===c[4]&&(s=!0);let b=n.parallelRoutes,S=new Map(b),T={},O=null,j=!1,w={};for(let n in m){let l,c=Line truncated
|
||||
Read more: https://nextjs.org/docs/messages/failed-to-find-server-action`),"__NEXT_ERROR_CODE",{value:"E715",enumerable:!1,configurable:!0});let b=m.headers.get("x-action-redirect"),[S,O]=b?.split(";")||[];switch(O){case"push":d=E.RedirectType.push;break;case"replace":d=E.RedirectType.replace;break;default:d=void 0}let w=!!m.headers.get(u.NEXT_IS_PRERENDER_HEADER);try{let e=JSON.parse(m.headers.get("x-action-revalidated")||"[[],0,0]");f={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){f=M}let C=S?(0,c.assignLocation)(S,new URL(e.canonicalUrl,window.location.href)):void 0,A=m.headers.get("content-type"),N=!!(A&&A.startsWith(u.RSC_CONTENT_TYPE_HEADER));if(!N&&!C)throw Object.defineProperty(Error(m.status>=400&&"text/plain"===A?await m.text():"An unexpected response was received from the server."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});if(N){let e=await j(Promise.resolve(m),{callServer:l.callServer,findSourceMapURL:a.findSourceMapURL,temporaryReferences:y,debugChannel:n&&n(_)});h=C?void 0:e.a,p=(0,v.normalizeFlightData)(e.f)}else h=void 0,p=void 0;return{actionResult:h,actionFlightData:p,redirectLocation:C,redirectType:d,revalidatedParts:f,isPrerender:w}}let M={paths:[],tag:!1,cookie:!1};function C(e,t){let{resolve:r,reject:n}=t,l={},a=e.tree;l.preserveCustomHistoryState=!1;let u=(e.previousNextUrl||e.nextUrl)&&(0,R.hasInterceptionRouteInCurrentTree)(e.tree)?e.previousNextUrl||e.nextUrl:null,o=Date.now();return w(e,u,t).then(async({actionResult:i,actionFlightData:c,redirectLocation:R,redirectType:v,revalidatedParts:T})=>{let j;if(R&&(v===E.RedirectType.replace?(e.pushRef.pendingPush=!1,l.pendingPush=!1):(e.pushRef.pendingPush=!0,l.pendingPush=!0),l.canonicalUrl=j=(0,s.createHrefFromUrl)(R,!1)),!c)return(r(i),R)?(0,d.handleExternalUrl)(e,l,R.href,e.pushRef.pendingPush):e;if("string"==typeof c)return r(i),(0,d.handleExternalUrl)(e,l,c,e.pushRef.pendingPush);let w=T.paths.length>0||T.tag||T.cookie;for(let n of(w&&(t.didRevalidate=!0),c)){let{tree:c,seedData:s,head:p,isRootRender:R}=n;if(!R)return console.log("SERVER ACTION APPLY FAILED"),r(i),e;let v=(0,f.applyRouterStatePatchToTree)([""],a,c,j||e.canonicalUrl);if(null===v)return r(i),(0,P.handleSegmentMismatch)(e,t,c);if((0,h.isNavigatingToNewRootLayout)(a,v))return r(i),(0,d.handleExternalUrl)(e,l,j||e.canonicalUrl,e.pushRef.pendingPush);if(null!==s){let t=s[0],r=(0,g.createEmptyCacheNode)();r.rsc=t,r.prefetchRsc=null,r.loading=s[2],(0,y.fillLazyItemsTillLeafWithHead)(o,r,void 0,c,s,p),l.cache=r,(0,O.revalidateEntireCache)(e.nextUrl,v),w&&await (0,_.refreshInactiveParallelSegments)({navigatedAt:o,state:e,updatedTree:v,updatedCache:r,includeNextUrl:!!u,canonicalUrl:l.canonicalUrl||e.canonicalUrl})}l.patchedTree=v,a=v}if(R&&j){let e=(0,m.getRedirectError)((0,S.hasBasePath)(j)?(0,b.removeBasePath)(j):j,v||E.RedirectType.push);e.handled=!0,n(e)}else r(i);return(0,p.handleMutable)(e,l)},t=>(n(t),e))}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},4924,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"reducer",{enumerable:!0,get:function(){return s}});let n=e.r(88540),l=e.r(54069),a=e.r(91668),u=e.r(73790),o=e.r(69845),i=e.r(86720),c=e.r(45794),s="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,l.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,a.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,u.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,o.refreshReducer)(e,t);case n.ACTION_HMR_REFRESH:return(0,i.hmrRefreshReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,c.serverActionReducer)(e,t);default:throw Object.defineProperty(Error("Unknown action"),"__NEXT_ERROR_CODE",{value:"E295",enumerable:!1,configurable:!0})}};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},1411,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"prefetch",{enumerable:!0,get:function(){return o}});let n=e.r(57630),l=e.r(77048),a=e.r(77709),u=e.r(9396);function o(e,t,r,o,i){let c=(0,n.createPrefetchURL)(e);if(null===c)return;let s=(0,l.createCacheKey)(c.href,t);(0,a.schedulePrefetchTask)(s,r,o,u.PrefetchPriority.Default,i)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},99781,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createMutableActionQueue:function(){return P},dispatchNavigateAction:function(){return m},dispatchTraverseAction:function(){return E},getCurrentAppRoute
Line truncated
|
||||
@@ -1,5 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,30030,e=>{"use strict";function t(e,n,{checkForDefaultPrevented:r=!0}={}){return function(t){if(e?.(t),!1===r||!t.defaultPrevented)return n?.(t)}}e.s(["composeEventHandlers",()=>t],81140);var n=e.i(71645),r=e.i(43476);function o(e,t){let o=n.createContext(t),i=e=>{let{children:t,...i}=e,a=n.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:t})};return i.displayName=e+"Provider",[i,function(r){let i=n.useContext(o);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function i(e,t=[]){let o=[],a=()=>{let t=o.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return a.scopeName=e,[function(t,i){let a=n.createContext(i),u=o.length;o=[...o,i];let c=t=>{let{scope:o,children:i,...c}=t,s=o?.[e]?.[u]||a,l=n.useMemo(()=>c,Object.values(c));return(0,r.jsx)(s.Provider,{value:l,children:i})};return c.displayName=t+"Provider",[c,function(r,o){let c=o?.[e]?.[u]||a,s=n.useContext(c);if(s)return s;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(a,...t)]}e.s(["createContext",()=>o,"createContextScope",()=>i],30030)},48425,e=>{"use strict";var t=e.i(71645),n=e.i(74080),r=e.i(91918),o=e.i(43476),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>{let i=t.forwardRef((e,t)=>{let{asChild:i,...a}=e,u=i?r.Slot:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function a(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>a])},30207,e=>{"use strict";var t=e.i(71645);function n(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}e.s(["useCallbackRef",()=>n])},26330,e=>{"use strict";var t,n=e.i(71645),r=e.i(81140),o=e.i(48425),i=e.i(20783),a=e.i(30207),u=e.i(43476),c="dismissableLayer.update",s=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l=n.forwardRef((e,l)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:y,...E}=e,b=n.useContext(s),[w,C]=n.useState(null),R=w?.ownerDocument??globalThis?.document,[,N]=n.useState({}),S=(0,i.useComposedRefs)(l,e=>C(e)),P=Array.from(b.layers),[x]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),O=P.indexOf(x),D=w?P.indexOf(w):-1,T=b.layersWithOutsidePointerEventsDisabled.size>0,L=D>=O,M=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){f("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...b.branches].some(e=>e.contains(t));L&&!n&&(m?.(e),g?.(e),e.defaultPrevented||y?.())},R),k=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...b.branches].some(e=>e.contains(t))&&(h?.(e),g?.(e),e.defaultPrevented||y?.())},R);return!function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{D===b.layers.size-1&&(v?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},R),n.useEffect(()=>{if(w)return p&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(t=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),d(),()=>{p&&1===b.layersWithOutsidePointerEventsDisabled.size&&(R.body.style.pointerEvents=t)}},[w,R,p,b]),n.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersLine truncated
|
||||
|
||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Z=({contentRef:e,descriptionId:n})=>{let r=Y("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null};e.s(["Close",()=>H,"Content",()=>k,"Description",()=>B,"Overlay",()=>T,"Portal",()=>O,"Root",()=>C,"Title",()=>_,"Trigger",()=>N,"WarningProvider",()=>X,"createDialogScope",()=>E])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31278,17521,e=>{"use strict";let s=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>s],17521),e.s(["Loader2",()=>s],31278)},18566,(e,s,t)=>{s.exports=e.r(76562)},69638,e=>{"use strict";let s=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>s],69638)},75822,e=>{"use strict";let s=(0,e.i(75254).default)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);e.s(["Coins",()=>s],75822)},20178,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(18566),r=e.i(69638),c=e.i(31278),d=e.i(75822),i=e.i(67881),l=e.i(38036);function n(){let e=(0,a.useRouter)(),n=(0,a.useSearchParams)(),[o,u]=(0,t.useState)(!0),{user:m,fetchUser:x}=(0,l.useAuth)();return(0,t.useEffect)(()=>{(async()=>{await x(),u(!1)})()},[x]),n.get("session_id"),(0,s.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:[(0,s.jsx)(r.CheckCircle,{className:"w-16 h-16 text-success mx-auto mb-4"}),(0,s.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Payment Successful!"}),(0,s.jsx)("p",{className:"text-muted-foreground mb-6",children:"Thank you for your purchase. Your credits have been added to your account."}),o?(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-muted-foreground mb-6",children:[(0,s.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading your balance..."]}):m?(0,s.jsx)("div",{className:"bg-secondary rounded-lg p-4 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-warning",children:[(0,s.jsx)(d.Coins,{className:"w-5 h-5"}),(0,s.jsx)("span",{className:"text-2xl font-bold",children:m.credits}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"credits available"})]})}):null,(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(i.Button,{onClick:()=>e.push("/app"),className:"w-full bg-primary hover:bg-primary/90",children:"Start Creating Karaoke"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"A confirmation email has been sent to your email address."})]})]})}function o(){return(0,s.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:(0,s.jsx)(t.Suspense,{fallback:(0,s.jsxs)("div",{className:"max-w-md w-full bg-card border border-border rounded-xl p-8 text-center",children:[(0,s.jsx)(c.Loader2,{className:"w-16 h-16 text-primary mx-auto mb-4 animate-spin"}),(0,s.jsx)("p",{className:"text-muted-foreground",children:"Loading..."})]}),children:(0,s.jsx)(n,{})})})}e.s(["default",()=>o])}]);
|
||||
@@ -1,5 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48425,e=>{"use strict";var t=e.i(71645),n=e.i(74080),r=e.i(91918),o=e.i(43476),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>{let i=t.forwardRef((e,t)=>{let{asChild:i,...a}=e,u=i?r.Slot:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function a(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>a])},81140,30030,e=>{"use strict";function t(e,n,{checkForDefaultPrevented:r=!0}={}){return function(t){if(e?.(t),!1===r||!t.defaultPrevented)return n?.(t)}}e.s(["composeEventHandlers",()=>t],81140);var n=e.i(71645),r=e.i(43476);function o(e,t){let o=n.createContext(t),i=e=>{let{children:t,...i}=e,a=n.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:t})};return i.displayName=e+"Provider",[i,function(r){let i=n.useContext(o);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function i(e,t=[]){let o=[],a=()=>{let t=o.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return a.scopeName=e,[function(t,i){let a=n.createContext(i),u=o.length;o=[...o,i];let c=t=>{let{scope:o,children:i,...c}=t,s=o?.[e]?.[u]||a,l=n.useMemo(()=>c,Object.values(c));return(0,r.jsx)(s.Provider,{value:l,children:i})};return c.displayName=t+"Provider",[c,function(r,o){let c=o?.[e]?.[u]||a,s=n.useContext(c);if(s)return s;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(a,...t)]}e.s(["createContext",()=>o,"createContextScope",()=>i],30030)},10772,34620,e=>{"use strict";var t=e.i(71645),n=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>n],34620);var r=t["useId".toString()]||(()=>void 0),o=0;function i(e){let[i,a]=t.useState(r());return n(()=>{e||a(e=>e??String(o++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i],10772)},30207,e=>{"use strict";var t=e.i(71645);function n(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}e.s(["useCallbackRef",()=>n])},69340,e=>{"use strict";var t=e.i(71645),n=e.i(30207);function r({prop:e,defaultProp:r,onChange:o=()=>{}}){let[i,a]=function({defaultProp:e,onChange:r}){let o=t.useState(e),[i]=o,a=t.useRef(i),u=(0,n.useCallbackRef)(r);return t.useEffect(()=>{a.current!==i&&(u(i),a.current=i)},[i,a,u]),o}({defaultProp:r,onChange:o}),u=void 0!==e,c=u?e:i,s=(0,n.useCallbackRef)(o);return[c,t.useCallback(t=>{if(u){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[u,e,a,s])]}e.s(["useControllableState",()=>r])},26330,e=>{"use strict";var t,n=e.i(71645),r=e.i(81140),o=e.i(48425),i=e.i(20783),a=e.i(30207),u=e.i(43476),c="dismissableLayer.update",s=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l=n.forwardRef((e,l)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:y,...E}=e,b=n.useContext(s),[w,C]=n.useState(null),R=w?.ownerDocument??globalThis?.document,[,N]=n.useState({}),S=(0,i.useComposedRefs)(l,e=>C(e)),P=Array.from(b.layers),[x]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),O=P.indexOf(x),D=w?P.indexOf(w):-1,T=b.layersWithOutsidePointerEventsDisabled.size>0,L=D>=O,M=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){f("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...b.branches].some(e=>e.contains(t));L&&!n&&(m?.(e),g?.(e),e.defaultPrevented||y?.())},R),k=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.cLine truncated
|
||||
|
||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Z=({contentRef:e,descriptionId:n})=>{let r=Y("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null};e.s(["Close",()=>H,"Content",()=>k,"Description",()=>B,"Overlay",()=>T,"Portal",()=>O,"Root",()=>C,"Title",()=>_,"Trigger",()=>N,"WarningProvider",()=>X,"createDialogScope",()=>E])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91918,20783,e=>{"use strict";var r=e.i(71645);function t(e,r){if("function"==typeof e)return e(r);null!=e&&(e.current=r)}function o(...e){return r=>{let o=!1,n=e.map(e=>{let n=t(e,r);return o||"function"!=typeof n||(o=!0),n});if(o)return()=>{for(let r=0;r<n.length;r++){let o=n[r];"function"==typeof o?o():t(e[r],null)}}}}function n(...e){return r.useCallback(o(...e),e)}e.s(["composeRefs",()=>o,"useComposedRefs",()=>n],20783);var l=e.i(43476),s=r.forwardRef((e,t)=>{let{children:o,...n}=e,s=r.Children.toArray(o),a=s.find(d);if(a){let e=a.props.children,o=s.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,l.jsx)(i,{...n,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,o):null})}return(0,l.jsx)(i,{...n,ref:t,children:o})});s.displayName="Slot";var i=r.forwardRef((e,t)=>{let{children:n,...l}=e;if(r.isValidElement(n)){var s;let e,i,a=(s=n,(i=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(i=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref);return r.cloneElement(n,{...function(e,r){let t={...r};for(let o in r){let n=e[o],l=r[o];/^on[A-Z]/.test(o)?n&&l?t[o]=(...e)=>{l(...e),n(...e)}:n&&(t[o]=n):"style"===o?t[o]={...n,...l}:"className"===o&&(t[o]=[n,l].filter(Boolean).join(" "))}return{...e,...t}}(l,n.props),ref:t?o(t,a):a})}return r.Children.count(n)>1?r.Children.only(null):null});i.displayName="SlotClone";var a=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});function d(e){return r.isValidElement(e)&&e.type===a}e.s(["Slot",()=>s,"Slottable",()=>a],91918)},7670,e=>{"use strict";function r(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=function e(r){var t,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var l=r.length;for(t=0;t<l;t++)r[t]&&(o=e(r[t]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}(e))&&(o&&(o+=" "),o+=r);return o}e.s(["clsx",()=>r])},25913,e=>{"use strict";var r=e.i(7670);let t=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=r.clsx;e.s(["cva",0,(e,r)=>n=>{var l;if((null==r?void 0:r.variants)==null)return o(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:s,defaultVariants:i}=r,a=Object.keys(s).map(e=>{let r=null==n?void 0:n[e],o=null==i?void 0:i[e];if(null===r)return null;let l=t(r)||t(o);return s[e][l]}),d=n&&Object.entries(n).reduce((e,r)=>{let[t,o]=r;return void 0===o||(e[t]=o),e},{});return o(e,a,null==r||null==(l=r.compoundVariants)?void 0:l.reduce((e,r)=>{let{class:t,className:o,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):({...i,...d})[r]===t})?[...e,t,o]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},47163,e=>{"use strict";var r=e.i(7670);let t=(e,r)=>{if(0===e.length)return r.classGroupId;let o=e[0],n=r.nextPart.get(o),l=n?t(e.slice(1),n):void 0;if(l)return l;if(0===r.validators.length)return;let s=e.join("-");return r.validators.find(({validator:e})=>e(s))?.classGroupId},o=/^\[(.+)\]$/,n=(e,r,t,o)=>{e.forEach(e=>{if("string"==typeof e){(""===e?r:l(r,e)).classGroupId=t;return}"function"==typeof e?s(e)?n(e(o),r,t,o):r.validators.push({validator:e,classGroupId:t}):Object.entries(e).forEach(([e,s])=>{n(s,l(r,e),t,o)})})},l=(e,r)=>{let t=e;return r.split("-").forEach(e=>{t.nextPart.has(e)||t.nextPart.set(e,{nextPart:new Map,validators:[]}),t=t.nextPart.get(e)}),t},s=e=>e.isThemeGetter,i=(e,r)=>r?e.map(([e,t])=>[e,t.map(e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[r+e,t])):e)]):e,a=e=>{if(e.length<=1)return e;let r=[],t=[];return e.forEach(e=>{"["===e[0]?(r.push(...t.sort(),e),t=[]):t.push(e)}),r.push(...t.sort()),r},d=/\s+/;function c(){let e,r,t=0,o="";for(;t<arguments.length;)(e=arguments[t++])&&(r=u(e))&&(o&&(o+=" "),o+=r);return o}let u=e=>{let r;if("string"==typeof e)return e;let t="";for(let o=0;o<e.length;o++)e[o]&&(r=u(e[o]))&&(t&&(t+=" "),t+=r);return t},p=e=>{let r=r=>r[e]||[];return r.isThemeGetter=!0,r},b=/^\[(?:([a-z-]+):)?(.+)\]$/i,f=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),g=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,v=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,y=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,w=e=>z(e)||m.has(e)||f.test(e),k=e=>M(e,"length",V),z=e=>!!e&&!Number.isNaN(Number(e)),j=e=>M(e,"number",z),C=e=>!!e&&Number.isInteger(Number(e)),N=e=>e.endsWith("%")&&z(e.slice(0,-1)),S=e=>b.test(e),R=e=>g.test(e),E=new Set(["length","size","percentage"]),O=e=>M(e,E,I),P=e=>M(e,"position",I),$=Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54858,e=>{"use strict";var t=e.i(47167);let a="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?"":t.default.env.NEXT_PUBLIC_API_URL||"https://api.nomadkaraoke.com";function i(e){localStorage.setItem("karaoke_access_token",e)}function s(){return localStorage.getItem("karaoke_access_token")}function r(){localStorage.removeItem("karaoke_access_token")}function n(){let e={},t=s();return t&&(e.Authorization=`Bearer ${t}`),e}class o extends Error{status;data;constructor(e,t,a){super(e),this.name="ApiError",this.status=t,this.data=a}}async function c(e){if(!e.ok){let t;try{t=await e.json()}catch{t={detail:e.statusText}}throw new o(function(e,t){if("string"==typeof e?.detail)return e.detail;if("string"==typeof e?.message)return e.message;if("string"==typeof e?.error)return e.error;if(e?.detail?.message)return String(e.detail.message);if(e?.detail?.error)return String(e.detail.error);if(e?.detail&&"object"==typeof e.detail)try{return JSON.stringify(e.detail)}catch{}return t}(t,`Request failed with status ${e.status}`),e.status,t)}return e.json()}function d(e){return{async submitCorrections(t){let i={corrections:{...t,lines:t.corrected_segments}},s=await fetch(`${a}/api/jobs/${e}/corrections`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify(i)});await c(s)},async submitAnnotations(t){let i=await fetch(`${a}/api/jobs/${e}/annotations`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify({annotations:t})});await c(i)},updateHandlers:async t=>c(await fetch(`${a}/api/review/${e}/handlers`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify({enabled_handlers:t})})),async addLyrics(t,i){let s=await fetch(`${a}/api/review/${e}/add-lyrics`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify({source:t,lyrics:i})});return(await c(s)).data},getAudioUrl(t){let i=s(),r=`${a}/api/review/${e}/audio/${t}`;return i?`${r}?token=${encodeURIComponent(i)}`:r},generatePreviewVideo:async t=>c(await fetch(`${a}/api/review/${e}/preview-video`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify(t)})),getPreviewVideoUrl(t){let i=s(),r=`${a}/api/review/${e}/preview-video/${t}`;return i?`${r}?token=${encodeURIComponent(i)}`:r},completeReview:async()=>c(await fetch(`${a}/api/jobs/${e}/complete-review`,{method:"POST",headers:n()}))}}e.s(["API_BASE_URL",0,a,"ApiError",()=>o,"adminApi",0,{async getStats(e){let t=new URLSearchParams;e?.exclude_test!==void 0&&t.set("exclude_test",String(e.exclude_test));let i=`${a}/api/admin/stats/overview${t.toString()?"?"+t.toString():""}`;return c(await fetch(i,{headers:n()}))},async listUsers(e){let t=new URLSearchParams;e?.limit&&t.set("limit",String(e.limit)),e?.offset&&t.set("offset",String(e.offset)),e?.search&&t.set("search",e.search),e?.sort_by&&t.set("sort_by",e.sort_by),e?.sort_order&&t.set("sort_order",e.sort_order),e?.include_inactive&&t.set("include_inactive","true"),e?.exclude_test!==void 0&&t.set("exclude_test",String(e.exclude_test));let i=`${a}/api/users/admin/users${t.toString()?"?"+t.toString():""}`;return c(await fetch(i,{headers:n()}))},getUserDetail:async e=>c(await fetch(`${a}/api/users/admin/users/${encodeURIComponent(e)}/detail`,{headers:n()})),addCredits:async(e,t,i)=>c(await fetch(`${a}/api/users/admin/credits`,{method:"POST",headers:{"Content-Type":"application/json",...n()},body:JSON.stringify({email:e,amount:t,reason:i})})),impersonateUser:async e=>c(await fetch(`${a}/api/admin/users/${encodeURIComponent(e)}/impersonate`,{method:"POST",headers:n()})),enableUser:async e=>c(await fetch(`${a}/api/users/admin/users/${encodeURIComponent(e)}/enable`,{method:"POST",headers:n()})),disableUser:async e=>c(await fetch(`${a}/api/users/admin/users/${encodeURIComponent(e)}/disable`,{method:"POST",headers:n()})),async listAllJobs(e){let t=new URLSearchParams;e?.status&&t.set("status",e.status),e?.user_email&&t.set("user_email",e.user_email),e?.environment&&t.set("environment",e.environment),e?.created_after&&t.set("created_after",e.created_after),e?.created_before&&t.set("created_before",e.created_before),e?.limit&&t.set("limit",String(e.limit)),e?.exclude_test!==void 0&&t.set("exclude_test",String(e.exclude_test));let i=`${a}/api/jobs${t.toString()?"?"+t.toString():""}`;return c(await fetch(i,{headers:n()}))},async getBetaStats(e){let t=new URLSearchParams;e?.exclude_test!==void 0&&t.set("exclude_test",String(e.exclude_test));let i=`${a}/api/users/admin/beta/stats${t.toString()?"?"+t.toString():""}`;return c(await fetch(i,{headers:n()}))},getBetaFeedback:async(e=50)=>c(await fetch(`${a}/api/users/admin/beta/feedback?limit=${e}`,{headers:n()})),deleteJob:async(e,t=!0)=>c(await fetch(`${a}/api/jobs/${e}?delete_files=${t}`,{method:"DELETE",headers:n()})),async listAudioSearches(e){let t=new URLLine truncated
|
||||
@@ -1,5 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,30030,e=>{"use strict";function t(e,n,{checkForDefaultPrevented:r=!0}={}){return function(t){if(e?.(t),!1===r||!t.defaultPrevented)return n?.(t)}}e.s(["composeEventHandlers",()=>t],81140);var n=e.i(71645),r=e.i(43476);function o(e,t){let o=n.createContext(t),i=e=>{let{children:t,...i}=e,a=n.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:t})};return i.displayName=e+"Provider",[i,function(r){let i=n.useContext(o);if(i)return i;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function i(e,t=[]){let o=[],a=()=>{let t=o.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return a.scopeName=e,[function(t,i){let a=n.createContext(i),u=o.length;o=[...o,i];let c=t=>{let{scope:o,children:i,...c}=t,s=o?.[e]?.[u]||a,l=n.useMemo(()=>c,Object.values(c));return(0,r.jsx)(s.Provider,{value:l,children:i})};return c.displayName=t+"Provider",[c,function(r,o){let c=o?.[e]?.[u]||a,s=n.useContext(c);if(s)return s;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(a,...t)]}e.s(["createContext",()=>o,"createContextScope",()=>i],30030)},10772,34620,e=>{"use strict";var t=e.i(71645),n=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>n],34620);var r=t["useId".toString()]||(()=>void 0),o=0;function i(e){let[i,a]=t.useState(r());return n(()=>{e||a(e=>e??String(o++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i],10772)},30207,e=>{"use strict";var t=e.i(71645);function n(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}e.s(["useCallbackRef",()=>n])},69340,e=>{"use strict";var t=e.i(71645),n=e.i(30207);function r({prop:e,defaultProp:r,onChange:o=()=>{}}){let[i,a]=function({defaultProp:e,onChange:r}){let o=t.useState(e),[i]=o,a=t.useRef(i),u=(0,n.useCallbackRef)(r);return t.useEffect(()=>{a.current!==i&&(u(i),a.current=i)},[i,a,u]),o}({defaultProp:r,onChange:o}),u=void 0!==e,c=u?e:i,s=(0,n.useCallbackRef)(o);return[c,t.useCallback(t=>{if(u){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[u,e,a,s])]}e.s(["useControllableState",()=>r])},48425,e=>{"use strict";var t=e.i(71645),n=e.i(74080),r=e.i(91918),o=e.i(43476),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>{let i=t.forwardRef((e,t)=>{let{asChild:i,...a}=e,u=i?r.Slot:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function a(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>i,"dispatchDiscreteCustomEvent",()=>a])},26330,e=>{"use strict";var t,n=e.i(71645),r=e.i(81140),o=e.i(48425),i=e.i(20783),a=e.i(30207),u=e.i(43476),c="dismissableLayer.update",s=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l=n.forwardRef((e,l)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:y,...E}=e,b=n.useContext(s),[w,C]=n.useState(null),R=w?.ownerDocument??globalThis?.document,[,N]=n.useState({}),S=(0,i.useComposedRefs)(l,e=>C(e)),P=Array.from(b.layers),[x]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),O=P.indexOf(x),D=w?P.indexOf(w):-1,T=b.layersWithOutsidePointerEventsDisabled.size>0,L=D>=O,M=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){f("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...b.branches].some(e=>e.contains(t));L&&!n&&(m?.(e),g?.(e),e.defaultPrevented||y?.())},R),k=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.cLine truncated
|
||||
|
||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Z=({contentRef:e,descriptionId:n})=>{let r=Y("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null};e.s(["Close",()=>H,"Content",()=>k,"Description",()=>B,"Overlay",()=>T,"Portal",()=>O,"Root",()=>C,"Title",()=>_,"Trigger",()=>N,"WarningProvider",()=>X,"createDialogScope",()=>E])}]);
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},54458,e=>{"use strict";var t=e.i(68834),r=e.i(79473);let n=(0,t.create)()((0,r.persist)(e=>({showTestData:!1,setShowTestData:t=>e({showTestData:t})}),{name:"admin-settings"}));e.s(["useAdminSettings",0,n])},16715,e=>{"use strict";let t=(0,e.i(75254).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],16715)},20682,e=>{"use strict";var t=e.i(71645);let r=0,n=new Map,a=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),s({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},o=[],i={toasts:[]};function s(e){i=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?a(r):e.toasts.forEach(e=>{a(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(i,e),o.forEach(e=>{e(i)})}function l({...e}){let t=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>s({type:"DISMISS_TOAST",toastId:t});return s({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||n()}}}),{id:t,dismiss:n,update:e=>s({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function c(){let[e,r]=t.useState(i);return t.useEffect(()=>(o.push(r),()=>{let e=o.indexOf(r);e>-1&&o.splice(e,1)}),[e]),{...e,toast:l,dismiss:e=>s({type:"DISMISS_TOAST",toastId:e})}}e.s(["useToast",()=>c])},61659,e=>{"use strict";let t=(0,e.i(75254).default)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["CreditCard",()=>t],61659)},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>t],73884)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},10708,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(48425),a=r.forwardRef((e,r)=>(0,t.jsx)(n.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var o=e.i(47163);function i({className:e,...r}){return(0,t.jsx)(a,{"data-slot":"label",className:(0,o.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}e.s(["Label",()=>i],10708)},19036,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(81140),a=e.i(20783),o=e.i(30030),i=e.i(69340),s=e.i(99682),l=e.i(35804),c=e.i(48425),u="Switch",[d,f]=(0,o.createContextScope)(u),[p,m]=d(u),h=r.forwardRef((e,o)=>{let{__scopeSwitch:s,name:l,checked:u,defaultChecked:d,required:f,disabled:m,value:h="on",onCheckedChange:g,form:x,...b}=e,[w,k]=r.useState(null),j=(0,a.useComposedRefs)(o,e=>k(e)),C=r.useRef(!1),T=!w||x||!!w.closest("form"),[E=!1,N]=(0,i.useControllableState)({prop:u,defaultProp:d,onChange:g});return(0,t.jsxs)(p,{scope:s,checked:E,disabled:m,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":E,"aria-required":f,"data-sLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53660,59411,e=>{"use strict";var t=e.i(71645);let n=["top","right","bottom","left"],r=Math.min,i=Math.max,o=Math.round,l=Math.floor,a=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function c(e,t){return"function"==typeof e?e(t):e}function u(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}let m=new Set(["top","bottom"]);function g(e){return m.has(u(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>f[e])}let w=["left","right"],x=["right","left"],v=["top","bottom"],b=["bottom","top"];function R(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function A(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function S(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function C(e,t,n){let r,{reference:i,floating:o}=e,l=g(t),a=p(g(t)),s=h(a),f=u(t),c="y"===l,m=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,w=i[s]/2-o[s]/2;switch(f){case"top":r={x:m,y:i.y-o.height};break;case"bottom":r={x:m,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:y};break;case"left":r={x:i.x-o.width,y:y};break;default:r={x:i.x,y:i.y}}switch(d(t)){case"start":r[a]-=w*(n&&c?-1:1);break;case"end":r[a]+=w*(n&&c?-1:1)}return r}let T=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),s=await (null==l.isRTL?void 0:l.isRTL(t)),f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:u}=C(f,r,s),d=r,p={},h=0;for(let n=0;n<a.length;n++){let{name:o,fn:m}=a[n],{x:g,y:y,data:w,reset:x}=await m({x:c,y:u,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:f,platform:l,elements:{reference:e,floating:t}});c=null!=g?g:c,u=null!=y?y:u,p={...p,[o]:{...p[o],...w}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(f=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:u}=C(f,d,s)),n=-1)}return{x:c,y:u,placement:d,strategy:i,middlewareData:p}};async function L(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=c(t,e),m=A(h),g=a[p?"floating"===d?"reference":"floating":d],y=S(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:f,rootBoundary:u,strategy:s})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),v=await (null==o.isElement?void 0:o.isElement(x))&&await (null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},b=S(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:s}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function E(e){return n.some(t=>e[t]>=0)}let O=new Set(["left","top"]);async function H(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=u(n),a=d(n),s="y"===g(n),f=O.has(l)?-1:1,p=o&&s?-1:1,h=c(t,e),{mainAxis:m,crossAxis:y,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(y="end"===a?-1*w:w),s?{x:y*p,y:m*f}:{x:m*f,y:y*p}}function D(){return"undefined"!=typeof window}function k(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!D()&&(e instanceof Node||e instanceof F(e).Node)}function W(e){return!!D()&&(e instanceof Element||e instanceof F(e).Element)}function $(e){return!!D()&&(e instanceof HTMLElement||e instanceof F(e).HTMLElement)}function B(e){return!!D()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof F(e).ShadowRoot)}let N=new Set(["inline","contents"]);function V(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N.has(i)}let z=new Set(["table","td","th"]),I=[":popover-open",":modal"];function Y(e){return I.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let _=["transform","translate","scale","rotate","perspeLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",()=>t],3116)},10708,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(48425),o=r.forwardRef((e,r)=>(0,t.jsx)(n.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label";var a=e.i(47163);function i({className:e,...r}){return(0,t.jsx)(o,{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}e.s(["Label",()=>i],10708)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>t],73884)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},19036,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(81140),o=e.i(20783),a=e.i(30030),i=e.i(69340),s=e.i(99682),u=e.i(35804),l=e.i(48425),c="Switch",[d,f]=(0,a.createContextScope)(c),[p,h]=d(c),g=r.forwardRef((e,a)=>{let{__scopeSwitch:s,name:u,checked:c,defaultChecked:d,required:f,disabled:h,value:g="on",onCheckedChange:y,form:m,...x}=e,[k,w]=r.useState(null),j=(0,o.useComposedRefs)(a,e=>w(e)),C=r.useRef(!1),P=!k||m||!!k.closest("form"),[S=!1,E]=(0,i.useControllableState)({prop:c,defaultProp:d,onChange:y});return(0,t.jsxs)(p,{scope:s,checked:S,disabled:h,children:[(0,t.jsx)(l.Primitive.button,{type:"button",role:"switch","aria-checked":S,"aria-required":f,"data-state":b(S),"data-disabled":h?"":void 0,disabled:h,value:g,...x,ref:j,onClick:(0,n.composeEventHandlers)(e.onClick,e=>{E(e=>!e),P&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())})}),P&&(0,t.jsx)(v,{control:k,bubbles:!C.current,name:u,value:g,checked:S,required:f,disabled:h,form:m,style:{transform:"translateX(-100%)"}})]})});g.displayName=c;var y="SwitchThumb",m=r.forwardRef((e,r)=>{let{__scopeSwitch:n,...o}=e,a=h(y,n);return(0,t.jsx)(l.Primitive.span,{"data-state":b(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:r})});m.displayName=y;var v=e=>{let{control:n,checked:o,bubbles:a=!0,...i}=e,l=r.useRef(null),c=(0,s.usePrevious)(o),d=(0,u.useSize)(n);return r.useEffect(()=>{let e=l.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(c!==o&&t){let r=new Event("click",{bubbles:a});t.call(e,o),e.dispatchEvent(r)}},[c,o,a]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:l,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function b(e){return e?"checked":"unchecked"}var x=e.i(47163);function k({className:e,...r}){return(0,t.jsx)(g,{"data-slot":"switch",className:(0,x.cn)("peer cursor-pointer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursorLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78745,e=>{"use strict";let t=(0,e.i(75254).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t])},31171,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},75830,86318,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),o=e.i(91918),l=e.i(43476);function a(e){let a=e+"CollectionProvider",[i,s]=(0,r.createContextScope)(a),[d,c]=i(a,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,l.jsx)(d,{scope:r,itemMap:a,collectionRef:o,children:n})};u.displayName=a;let p=e+"CollectionSlot",f=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,i=c(p,r),s=(0,n.useComposedRefs)(t,i.collectionRef);return(0,l.jsx)(o.Slot,{ref:s,children:a})});f.displayName=p;let m=e+"CollectionItemSlot",v="data-radix-collection-item",h=t.default.forwardRef((e,r)=>{let{scope:a,children:i,...s}=e,d=t.default.useRef(null),u=(0,n.useComposedRefs)(r,d),p=c(m,a);return t.default.useEffect(()=>(p.itemMap.set(d,{ref:d,...s}),()=>void p.itemMap.delete(d))),(0,l.jsx)(o.Slot,{...{[v]:""},ref:u,children:i})});return h.displayName=m,[{Provider:u,Slot:f,ItemSlot:h},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}e.s(["createCollection",()=>a],75830);var i=t.createContext(void 0);function s(e){let r=t.useContext(i);return e||r||"ltr"}e.s(["useDirection",()=>s],86318)},62870,70152,78784,9797,99219,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74080);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>o],70152);var l=e.i(81140),a=e.i(75830),i=e.i(20783),s=e.i(30030),d=e.i(86318),c=e.i(26330),u=e.i(3536),p=e.i(65491),f=e.i(10772),m=e.i(53660),v=e.i(74606),h=e.i(48425),x=e.i(91918),g=e.i(30207),w=e.i(69340),y=e.i(34620),b=e.i(99682),C=e.i(59411),S=e.i(86312),j=e.i(85369),R=[" ","Enter","ArrowUp","ArrowDown"],E=[" ","Enter"],P="Select",[k,T,I]=(0,a.createCollection)(P),[N,H]=(0,s.createContextScope)(P,[I,m.createPopperScope]),D=(0,m.createPopperScope)(),[M,L]=N(P),[A,_]=N(P),z=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:c,onValueChange:u,dir:p,name:v,autoComplete:h,disabled:x,required:g,form:y}=e,b=D(n),[C,S]=r.useState(null),[j,R]=r.useState(null),[E,P]=r.useState(!1),T=(0,d.useDirection)(p),[I=!1,N]=(0,w.useControllableState)({prop:l,defaultProp:a,onChange:i}),[H,L]=(0,w.useControllableState)({prop:s,defaultProp:c,onChange:u}),_=r.useRef(null),z=!C||y||!!C.closest("form"),[B,O]=r.useState(new Set),V=Array.from(B).map(e=>e.props.value).join(";");return(0,t.jsx)(m.Root,{...b,children:(0,t.jsxs)(M,{required:g,scope:n,trigger:C,onTriggerChange:S,valueNode:j,onValueNodeChange:R,valueNodeHasChildren:E,onValueNodeHasChildrenChange:P,contentId:(0,f.useId)(),value:H,onValueChange:L,open:I,onOpenChange:N,dir:T,triggerPointerDownPosRef:_,disabled:x,children:[(0,t.jsx)(k.Provider,{scope:n,children:(0,t.jsx)(A,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{O(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),z?(0,t.jsxs)(eb,{"aria-hidden":!0,required:g,tabIndex:-1,name:v,autoComplete:h,value:H,onChange:e=>L(e.target.value),disabled:x,form:y,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(B)]},V):null]})})};z.displayName=P;var B="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,d=D(o),c=L(B,o),u=c.disabled||a,p=(0,i.useComposedRefs)(n,c.onTriggerChange),f=T(o),v=r.useRef("touch"),[x,g,w]=eC(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===c.value),n=eS(t,e,r);void 0!==n&&c.onValueChange(n.value)}),y=e=>{u||(c.onOpenChange(!0),w()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(m.Anchor,{asChild:!0,...d,children:(0,t.jsx)(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":ey(c.value)?"":void 0,...s,ref:p,onClick:(0,l.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==v.current&&y(e)}),onPointerDown:(0,l.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,l.composeEventHandlers)(s.onKeyDown,e=>{let t="Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}}]);
|
||||
@@ -1,3 +0,0 @@
|
||||
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/56df4d5ab85b6adb.js","static/chunks/248cba0fcb3874ed.js","static/chunks/a9ed54eed3e14c92.js","static/chunks/94bde6376cf279be.js","static/chunks/5997132b61dec430.js"],runtimeModuleIds:[94553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/_next/",r=new WeakMap;function n(e,t){this.m=e,this.e=t}let o=n.prototype,l=Object.prototype.hasOwnProperty,i="undefined"!=typeof Symbol&&Symbol.toStringTag;function s(e,t,r){l.call(e,t)||Object.defineProperty(e,t,r)}function u(e,t){let r=e[t];return r||(r=a(t),e[t]=r),r}function a(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function c(e,t){s(e,"__esModule",{value:!0}),i&&s(e,i,{value:"Module"});let r=0;for(;r<t.length;){let n=t[r++],o=t[r++];if("number"==typeof o)if(0===o)s(e,n,{value:t[r++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[r]?s(e,n,{get:o,set:t[r++],enumerable:!0}):s(e,n,{get:o,enumerable:!0})}Object.seal(e)}o.s=function(e,t){let r,n;null!=t?n=(r=u(this.c,t)).exports:(r=this.m,n=this.e),r.namespaceObject=n,c(n,e)},o.j=function(e,t){var n,o;let i,s,a;null!=t?s=(i=u(this.c,t)).exports:(i=this.m,s=this.e);let c=(n=i,o=s,(a=r.get(n))||(r.set(n,a=[]),n.exports=n.namespaceObject=new Proxy(o,{get(e,t){if(l.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);for(let e of a){let r=Reflect.get(e,t);if(void 0!==r)return r}},ownKeys(e){let t=Reflect.ownKeys(e);for(let e of a)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t}})),a);"object"==typeof e&&null!==e&&c.push(e)},o.v=function(e,t){(null!=t?u(this.c,t):this.m).exports=e},o.n=function(e,t){let r;(r=null!=t?u(this.c,t):this.m).exports=r.namespaceObject=e};let f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,p=[null,f({}),f([]),f(f)];function h(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!p.includes(t);t=f(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),c(t,n),t}function d(e){let t=N(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=h(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function m(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}o.i=d,o.A=function(e){return this.r(e)(d.bind(this))},o.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},o.r=function(e){return N(e,this.m).exports},o.f=function(e){function t(t){if(l.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(l.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let b=Symbol("turbopack queues"),y=Symbol("turbopack exports"),O=Symbol("turbopack error");function g(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}o.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:l,reject:i,promise:s}=m(),u=Object.assign(s,{[y]:r.exports,[b]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[y]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(b in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[y]:{},[b]:e=>e(t)};return e.then(e=>{r[y]=e,g(t)},e=>{r[O]=e,g(t)}),r}}return{[y]:e,[b]:()=>{}}}),r=()=>t.map(e=>{if(e[O])throw e[O];return e[y]}),{promise:l,resolve:i}=m(),s=Object.assign(()=>i(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[b](u)),s.queueCount?l:r()},function(e){e?i(u[O]=e):l(u[y]),g(n)}),n&&-1===n.status&&(n.status=0)};let w=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function j(e,t){throw Error(`Invariant: ${t(e)}`)}w.prototype=URL.prototype,o.U=w,o.z=function(e){throw Error("dynamic usage of require is not supported")},o.g=globalThis;let R=n.prototype;var C,U=((C=U||{})[C.Runtime=0]="Runtime",C[C.Parent=1]="Parent",C[C.Update=2]="Update",C);let k=new Map;o.M=k;let v=new Map,_=new Map;async function P(e,t,r){let n;if("string"==typeof r)return A(e,t,S(r));let o=r.included||[],l=o.map(e=>!!k.has(e)||v.get(e));if(l.length>0&&l.every(e=>e))return void await Promise.all(l);let i=Line truncated
|
||||
self.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(e.reverse().map(S),null,2)};
|
||||
importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`],{type:"text/javascript"});return URL.createObjectURL(t)};let E=/\.js(?:\?[^#]*)?(?:#.*)?$/,K=/\.css(?:\?[^#]*)?(?:#.*)?$/;function x(e){return K.test(e)}o.w=function(t,r,n){return e.loadWebAssembly(1,this.m.id,t,r,n)},o.u=function(t,r){return e.loadWebAssemblyModule(1,this.m.id,t,r)};let M={};o.c=M;let N=(e,t)=>{let r=M[e];if(r){if(r.error)throw r.error;return r}return L(e,U.Parent,t.id)};function L(e,t,r){let o=k.get(e);if("function"!=typeof o)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:j(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let l=a(e),i=l.exports;M[e]=l;let s=new n(l,i);try{o(s,l,i)}catch(e){throw l.error=e,e}return l.namespaceObject&&l.exports!==l.namespaceObject&&h(l.exports,l.namespaceObject),l}function q(r){let n,o=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(("undefined"!=typeof TURBOPACK_NEXT_CHUNK_URLS?TURBOPACK_NEXT_CHUNK_URLS.pop():e.getAttribute("src")).replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(r[0]);return 2===r.length?n=r[1]:(n=void 0,!function(e,t,r,n){let o=1;for(;o<e.length;){let t=e[o],n=o+1;for(;n<e.length&&"function"!=typeof e[n];)n++;if(n===e.length)throw Error("malformed chunk format, expected a factory function");if(!r.has(t)){let l=e[n];for(Object.defineProperty(l,"name",{value:"module evaluation"});o<n;o++)t=e[o],r.set(t,l)}o=n+1}}(r,0,k)),e.registerChunk(o,n)}let B=new Map;function W(e){let t=B.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},B.set(e,t)}return t}e={async registerChunk(e,t){if(W(S(e)).resolve(),null!=t){for(let e of t.otherChunks)W(S("string"==typeof e?e:e.path));if(await Promise.all(t.otherChunks.map(t=>P(0,e,t))),t.runtimeModuleIds.length>0)for(let r of t.runtimeModuleIds)!function(e,t){let r=M[t];if(r){if(r.error)throw r.error;return}L(t,U.Runtime,e)}(e,r)}},loadChunkCached:(e,t)=>(function(e,t){let r=W(t);if(r.loadingStarted)return r.promise;if(e===U.Runtime)return r.loadingStarted=!0,x(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(x(t));else if(E.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(TURBOPACK_WORKER_LOCATION+t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(x(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(E.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let l=fetch(S(r)),{instance:i}=await WebAssembly.instantiateStreaming(l,o);return i.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(S(r));return await WebAssembly.compileStreaming(o)}};let I=globalThis.TURBOPACK;globalThis.TURBOPACK={push:q},I.forEach(q)})();
|
||||
@@ -1,19 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[43316,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"GoogleAnalytics"]
|
||||
3:I[72285,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ServiceWorkerRegistration"]
|
||||
4:I[89554,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ThemeProvider"]
|
||||
5:I[57091,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"TenantProvider"]
|
||||
6:I[48030,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ImpersonationBannerWrapper"]
|
||||
7:I[39756,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
8:I[37457,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
9:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"OutletBoundary"]
|
||||
a:"$Sreact.suspense"
|
||||
c:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ViewportBoundary"]
|
||||
e:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"MetadataBoundary"]
|
||||
10:I[68027,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
:HL["/_next/static/chunks/981a3bf030d34e95.css","style"]
|
||||
0:{"P":null,"b":"tSn8ObPJyQkdGHYgdwN6Y","c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/981a3bf030d34e95.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/4dc7efe58b813844.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/d668512033b1256e.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/247eb132b7f7b574.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/d235c7efc1a1df60.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"font-sans antialiased","style":{"background":"var(--bg)","color":"var(--text)"},"children":[["$","$L2",null,{}],["$","$L3",null,{}],["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":[["$","$L6",null,{}],["$","$L7",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}]}]]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L7",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:1:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$Lc",null,{"children":"$@d"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$@f"}]}]}],null]}],false]],"m":"$undefined","G":["$10","$undefined"],"S":true}
|
||||
d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||
11:I[27201,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"IconMark"]
|
||||
f:[["$","title","0",{"children":"Nomad Karaoke: Generator"}],["$","meta","1",{"name":"description","content":"Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"}],["$","link","2",{"rel":"manifest","href":"/manifest.webmanifest","crossOrigin":"$undefined"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L11","7",{}]]
|
||||
b:null
|
||||
@@ -1,8 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ViewportBoundary"]
|
||||
4:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"MetadataBoundary"]
|
||||
5:"$Sreact.suspense"
|
||||
7:I[27201,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"IconMark"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
|
||||
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||
6:[["$","title","0",{"children":"Nomad Karaoke: Generator"}],["$","meta","1",{"name":"description","content":"Generate professional karaoke videos with AI-powered vocal separation and synchronized lyrics"}],["$","link","2",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L7","7",{}]]
|
||||
@@ -1,10 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[43316,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"GoogleAnalytics"]
|
||||
3:I[72285,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ServiceWorkerRegistration"]
|
||||
4:I[89554,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ThemeProvider"]
|
||||
5:I[57091,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"TenantProvider"]
|
||||
6:I[48030,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"ImpersonationBannerWrapper"]
|
||||
7:I[39756,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
8:I[37457,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
:HL["/_next/static/chunks/981a3bf030d34e95.css","style"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/981a3bf030d34e95.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/4dc7efe58b813844.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/d668512033b1256e.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/247eb132b7f7b574.js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/d235c7efc1a1df60.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"font-sans antialiased","style":{"background":"var(--bg)","color":"var(--text)"},"children":[["$","$L2",null,{}],["$","$L3",null,{}],["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L5",null,{"children":[["$","$L6",null,{}],["$","$L7",null,{"parallelRouterKey":"children","template":["$","$L8",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]]}]}]]}]}]]}],"loading":null,"isPartial":false}
|
||||
@@ -1,5 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[97367,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"OutletBoundary"]
|
||||
3:"$Sreact.suspense"
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false}
|
||||
4:null
|
||||
@@ -1,4 +0,0 @@
|
||||
1:"$Sreact.fragment"
|
||||
2:I[39756,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
3:I[37457,["/_next/static/chunks/4dc7efe58b813844.js","/_next/static/chunks/d668512033b1256e.js","/_next/static/chunks/247eb132b7f7b574.js","/_next/static/chunks/d235c7efc1a1df60.js"],"default"]
|
||||
0:{"buildId":"tSn8ObPJyQkdGHYgdwN6Y","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
|
||||
Loaded 100 of 496 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user