The heavy losses suffered by Iran's proxies, especially Hamas and Hezbollah, have put Iran on the back foot and forced it to recalibrate its regional strategy.