script.onload = () => { clearTimeout(timer); resolve(); };
script.onerror = () => { clearTimeout(timer); reject(); };
const timer = setTimeout(() => { script.remove(); reject(); }, timeout);
document.body.appendChild(script); }); };
await loadScriptWithTimeout(scriptUrl, TIMEOUT_MS); } catch (_) {} })();