Opto isolator with the current limited by a capacitor - likely 0.22uF rated 330VAC with a series current-limiting/ protective resistor of about 2k7 - and either a bridge rectifier, or a reverse diode across the isolator LED or an AC isolator with back-to-back LEDs internally.