export function normalizeStoredDrawingData(value) {
    if (!value) return null;
    let normalized = value;
    for (let pass = 0; pass < 2 && typeof normalized === 'string'; pass += 1) {
        try {
            normalized = JSON.parse(normalized);
        } catch (error) {
            return value;
        }
    }
    return typeof normalized === 'string' ? normalized : JSON.stringify(normalized);
}
