Yikes!
@PoweredbyMSG so sorry to hear about this. Unfortunately, there are going to be more thefts. It has become unaffordable to live here and people with nothing better to do are going to take from others.
If you are alone, do not be isolated at least be near some people so that thiefs will not be so brazen. I am never glued to my phone when I am in a public place. Even on Bart, I don't have my phone out when the door is open and only check it briefly after looking around to see everyone is seated.
These are just some general tips to be vigilant. But in your situation, with five people there was not much you can do. I hope all the criminals are identified and you get all your stuff back.