if (!window.__msgLog) { window.__msgLog = []; window.addEventListener('message', e => { try { const d = e.data; const s = typeof d === 'string' ? d : JSON.stringify(d); if (s && /Route|route|dsn|DSN|Dsn/.test(s)) window.__msgLog.push(s.slice(0, 900)); } catch(err){} }, true); const f = document.querySelector('iframe.editframe'); f.contentWindow.addEventListener('message', e => { try { const d = e.data; const s = typeof d === 'string' ? d : JSON.stringify(d); if (s && /Route|route|dsn|DSN|Dsn/.test(s)) window.__msgLog.push('IF< '+s.slice(0, 900)); } catch(err){} }, true); } window.__msgLog.length = 0; const r = await eda.pcb_ManufactureData.getAutoRouteJsonFile('Z'); await new Promise(r2=>setTimeout(r2, 2500)); return {r: String(r), msgs: window.__msgLog.slice(0, 8)};