{#each visible as a, i (i)}
{@const isAttempt = a.text === 'no_such_piece' || a.text === 'no_legal_moves' || a.text === 'wont_help' || a.text === 'illegal_move'}
{@const actor = a.ply % 2 === 0 ? 'White' : 'Black'}
{a.ply > 0 ? `#${a.ply}` : ''}
{isAttempt ? `${actor} — ` : ''}{moderatorText(a.text, a.payload)}
{:else}
The moderator is silent.
{/each}