const state = { viewer: null, spot: null }; async function start() { try { [state.viewer, state.spot] = await Promise.all([niho.viewer.get(), niho.spot.get()]); document.querySelector("[data-spot]").textContent = state.spot.displayName; await niho.diag.ready(); } catch (_error) { await niho.diag.error({ code: "INITIALIZE_FAILED", recoverable: true }); } } void start();