The dynamics of resonant capture