Semi-infinite flags. II: Local and global intersection cohomology of quasimaps spaces Instanton counting via affine Lie algebras. I: Equivariant \(J\)-functions of (affine) flag manifolds and Whittaker vectors 