Gauss–Bonnet–Chern theorem on moduli space