/* AI Pro Suite shared UI controls: font sizing + close-safe history persistence */ (function () { const STORAGE_KEY = 'aiProFontScale'; const FONT_OPTIONS = [ { label: 'Small', value: '0.95' }, { label: 'Normal', value: '1' }, { label: 'Large', value: '1.12' }, { label: 'XL', value: '1.25' }, { label: 'MAX', value: '1.4' } ]; function getSavedScale() { const saved = localStorage.getItem(STORAGE_KEY) || '1'; return FONT_OPTIONS.some(option => option.value === saved) ? saved : '1'; } function applyFontScale(value) { document.documentElement.style.setProperty('--app-font-scale', value); document.documentElement.dataset.fontScale = value; localStorage.setItem(STORAGE_KEY, value); document.querySelectorAll('.font-size-option').forEach(button => { button.classList.toggle('active', button.dataset.scale === value); }); } // 🚨 12:30 PACIFIC TIME RESET ANIMATION ENGINE 🚨 setInterval(() => { // Get current time in Los Angeles (Pacific Time) const ptDate = new Date(new Date().toLocaleString("en-US", { timeZone: "America/Los_Angeles" })); const hours = ptDate.getHours(); const minutes = ptDate.getMinutes(); const seconds = ptDate.getSeconds(); const tracker = document.querySelector('.apiTracker'); if (!tracker) return; // Trigger exactly at 12:30 AM (or PM) for 30 seconds if ((hours === 0 || hours === 12) && minutes === 30 && seconds < 30) { if (!tracker.classList.contains('resetting')) { tracker.classList.add('resetting'); // Hide the normal text so the sweeping animation can take over Array.from(tracker.children).forEach(child => child.style.display = 'none'); } } else { if (tracker.classList.contains('resetting')) { tracker.classList.remove('resetting'); // Bring the normal counters back Array.from(tracker.children).forEach(child => child.style.display = ''); } } }, 1000); function injectFontDock() { if (document.getElementById('fontSizeDock')) return; const dock = document.createElement('div'); dock.id = 'fontSizeDock'; dock.className = 'font-size-dock'; dock.innerHTML = `