Using https://gerrit.wikimedia.org/r/286031 as a foundation we should refactor ext.popups.settings as a Mustache template.
Warning:
This will bring in mediawiki.template and mediawiki.template.mustache (1.5 KiB + 8.1KiB) into the page (obtained via mw.loader.inspect so note these are uncompressed). Please consider implications of this when implementing.