Coupled-channels extension of the closed formalism for heavy-ion collisions