···88 locales.value.map(l => (typeof l === 'string' ? { code: l, name: l } : l)),
99)
10101111-/**
1212- * Check if it's safe to navigate back.
1313- * Uses the router's history state to verify there's a previous page in the SPA navigation history.
1414- */
1515-function canGoBack(): boolean {
1616- if (import.meta.server) return false
1717- if (window.history.length <= 1) return false
1818-1919- // Check if we have a valid position in the history state
2020- // This works correctly with client-side SPA navigation (unlike document.referrer)
2121- const state = window.history.state as { position?: number } | null
2222- return state?.position != null && state.position > 0
2323-}
2424-2511function goBack() {
2626- if (canGoBack()) {
2727- router.back()
2828- } else {
2929- router.push('/')
3030- }
1212+ router.back()
3113}
32143315onKeyStroke('Escape', e => {