The first stage of a power supply is surge protection and AC filtering. There are several different components that go into this, but the main one here is the AC line filters. They are differential mode and common mode. In addition to that is the use of the varistors for transient protection. The XY safety capacitors are also used to go along with the filters.