/** * Inline script that runs in before hydration. * * Reads the persisted theme id from localStorage and applies it to * so the user never sees a flash of the default theme. * * MUST stay dependency-free — it's bundled as a string and inlined. */ export function ThemeBootstrapScript() { const code = ` (function() { try { var themeId = localStorage.getItem('wfdash-theme') || 'wfdash'; var root = document.documentElement; root.setAttribute('data-theme', themeId); } catch (e) { // localStorage may be blocked — fall back to the SSR-rendered theme } })(); `; return