interface Job { id: string; video_path: string; video_filename: string; status: 'pending' | 'queued' | 'processing' | 'paused' | 'completed' | 'failed' | 'cancelled'; config: string; progress: number; current_index: number; total_units: number; segments: string; last_context: string; current_time_position: number; error: string | null; created_at: string; updated_at: string; completed_at: string | null; output_audio: string | null; output_subtitles_srt: string | null; output_subtitles_vtt: string | null; output_muxed: string | null; output_options: string; } interface AudioSegment { audioFile: string; startTime: number; duration: number; description: string; } interface ProgressData { id: string; status: string; progress: number; currentIndex: number; totalUnits: number; segments: AudioSegment[]; error: string | null; output_audio: string | null; output_subtitles_srt: string | null; output_subtitles_vtt: string | null; output_muxed: string | null; } interface FileInfo { filename: string; filePath: string; size: number; } declare let authToken: string | null; declare let selectedFilePath: string | null; declare const sseMap: Map; declare let pollTimer: number | null; declare const $$: (sel: string) => NodeListOf; declare const el: (id: string) => HTMLElement; declare function apiHeaders(): Record; declare function api(method: string, url: string, body?: unknown): Promise; declare function apiJson(method: string, url: string, body?: unknown): Promise; declare function showLoginScreen(): void; declare function showMainScreen(): void; declare function activateTab(tablistId: string, tabId: string): void; declare function onTabActivated(tablistId: string, panelId: string): void; declare function wireTablist(tablistId: string): void; declare function escapeHtml(str: string | null | undefined): string; declare function formatSize(bytes: number): string; declare function loadBrowseFiles(): Promise; declare const videoUpload: HTMLInputElement; declare const uploadName: HTMLElement; declare let youtubeStream: EventSource | null; declare function loadJobs(): Promise; declare function renderJobs(jobs: Job[]): void; declare function handleJobAction(id: string, action: string): Promise; declare function startPolling(): void; declare function connectSSE(jobId: string): void; declare function updateJobCard(jobId: string, data: ProgressData): void; declare function loadSettings(): Promise; declare let selectedFiles: Set; declare function loadFilesList(): Promise; declare function updateFileSelection(): void; declare function loadConfigDefaults(): Promise; declare function initApp(): void;