12345678export const decodeOrEmpty = (segment: string): string => { try { return decodeURIComponent(segment); } catch { return ""; }};