Resonant decay of gravitational waves into dark energy