{"version":3,"sources":["llms.js"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"../../js/llms.js","sourcesContent":["/**\n * Main LLMS Namespace\n *\n * @since 1.0.0\n * @version 5.3.3\n */\n\nvar LLMS = window.LLMS || {};\n( function( $ ){\n\n\t'use strict';\n\n\t/**\n\t * Load all app modules\n\t */\n\t/**\n\t * Front End Achievements\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.14.0\n\t * @version 6.10.2\n\t */\n\t\n\tLLMS.Achievements = {\n\t\n\t\t/**\n\t\t * Init\n\t\t *\n\t\t * @since 3.14.0\n\t\t * @since 4.5.1 Fix conditional loading check.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tif ( $( '.llms-achievement' ).length ) {\n\t\n\t\t\t\tvar self = this;\n\t\n\t\t\t\t$( function() {\n\t\t\t\t\tself.bind();\n\t\t\t\t\tself.maybe_open();\n\t\t\t\t} );\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events\n\t\t *\n\t\t * @since 3.14.0\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\t$( '.llms-achievement' ).each( function() {\n\t\n\t\t\t\tself.create_modal( $( this ) );\n\t\n\t\t\t} );\n\t\n\t\t\t$( '.llms-achievement' ).on( 'click', function() {\n\t\n\t\t\t\tvar $this = $( this ),\n\t\t\t\t\tid = 'achievement-' + $this.attr( 'data-id' ),\n\t\t\t\t\t$modal = $( '#' + id );\n\t\n\t\t\t\tif ( ! $modal.length ) {\n\t\t\t\t\tself.create_modal( $this );\n\t\t\t\t}\n\t\n\t\t\t\t$modal.iziModal( 'open' );\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Creates modal a modal for an achievement\n\t\t *\n\t\t * @since 3.14.0\n\t\t *\n\t\t * @param obj $el The jQuery selector for the modal card.\n\t\t * @return {void}\n\t\t */\n\t\tcreate_modal: function( $el ) {\n\t\n\t\t\tvar id = 'achievement-' + $el.attr( 'data-id' ),\n\t\t\t\t$modal = $( '#' + id );\n\t\n\t\t\tif ( ! $modal.length ) {\n\t\t\t\t$modal = $( '
' );\n\t\t\t\t$( 'body' ).append( $modal );\n\t\t\t}\n\t\n\t\t\t$modal.iziModal( {\n\t\t\t\theaderColor: '#3a3a3a',\n\t\t\t\tgroup: 'achievements',\n\t\t\t\thistory: true,\n\t\t\t\tloop: true,\n\t\t\t\toverlayColor: 'rgba( 0, 0, 0, 0.6 )',\n\t\t\t\ttransitionIn: 'fadeInDown',\n\t\t\t\ttransitionOut: 'fadeOutDown',\n\t\t\t\twidth: 340,\n\t\t\t\tonOpening: function( modal ) {\n\t\n\t\t\t\t\tmodal.setTitle( $el.find( '.llms-achievement-title' ).html() );\n\t\t\t\t\tmodal.setSubtitle( $el.find( '.llms-achievement-date' ).html() );\n\t\t\t\t\tmodal.setContent( '
' + $el.html() + '
' );\n\t\n\t\t\t\t},\n\t\n\t\t\t\tonClosing: function() {\n\t\t\t\t\twindow.history.pushState( '', document.title, window.location.pathname + window.location.search );\n\t\t\t\t},\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * On page load, opens a modal if the URL contains an achievement in the location hash\n\t\t *\n\t\t * @since 3.14.0\n\t\t * @since 6.10.2 Sanitize achievement IDs before using window.location.hash to trigger the modal open.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tmaybe_open: function() {\n\t\n\t\t\tlet hash = window.location.hash.split( '-' );\n\t\t\tif ( 2 !== hash.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\thash[1] = parseInt( hash[1] );\n\t\t\tif ( '#achievement-' !== hash[0] || ! Number.isInteger( hash[1] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tconst a = document.querySelector( `a[href=\"${ hash.join( '-' ) }\"]` )\n\t\t\tif ( ! a ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\ta.click();\n\t\n\t\t}\n\t\n\t};\n\t\n\t\t/**\n\t * Main Ajax class\n\t * Handles Primary Ajax connection\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown\n\t * @version Unknown\n\t */\n\t\n\tLLMS.Ajax = {\n\t\n\t\t/**\n\t\t * Url\n\t\t *\n\t\t * @type {String}\n\t\t */\n\t\turl: window.ajaxurl || window.llms.ajaxurl,\n\t\n\t\t/**\n\t\t * Type\n\t\t *\n\t\t * @type {[type]}\n\t\t */\n\t\ttype: 'post',\n\t\n\t\t/**\n\t\t * Data\n\t\t *\n\t\t * @type {[type]}\n\t\t */\n\t\tdata: [],\n\t\n\t\t/**\n\t\t * Cache\n\t\t *\n\t\t * @type {[type]}\n\t\t */\n\t\tcache: false,\n\t\n\t\t/**\n\t\t * DataType\n\t\t * defaulted to json\n\t\t *\n\t\t * @type {String}\n\t\t */\n\t\tdataType: 'json',\n\t\n\t\t/**\n\t\t * Async\n\t\t * default to false\n\t\t *\n\t\t * @type {Boolean}\n\t\t */\n\t\tasync: true,\n\t\n\t\tresponse:[],\n\t\n\t\t/**\n\t\t * Initialize Ajax methods\n\t\t *\n\t\t * @since Unknown\n\t\t * @since 4.4.0 Update ajax nonce source.\n\t\t *\n\t\t * @param {Object} obj Options object.\n\t\t * @return {Object}\n\t\t */\n\t\tinit: function( obj ) {\n\t\n\t\t\t// If obj is not of type object or null return false.\n\t\t\tif ( obj === null || typeof obj !== 'object' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t// set object defaults if values are not supplied\n\t\t\tobj.url = 'url' in obj ? obj.url : this.url;\n\t\t\tobj.type = 'type' \t\tin obj ? obj.type : this.type;\n\t\t\tobj.data = 'data' \t\tin obj ? obj.data : this.data;\n\t\t\tobj.cache = 'cache' \t\tin obj ? obj.cache : this.cache;\n\t\t\tobj.dataType = 'dataType'\tin obj ? obj.dataType : this.dataType;\n\t\t\tobj.async = 'async'\t\tin obj ? obj.async : this.async;\n\t\n\t\t\t// Add nonce to data object.\n\t\t\tobj.data._ajax_nonce = window.llms.ajax_nonce || wp_ajax_data.nonce;\n\t\n\t\t\t// Add post id to data object.\n\t\t\tvar $R = LLMS.Rest,\n\t\t\tquery_vars = $R.get_query_vars();\n\t\t\tobj.data.post_id = 'post' in query_vars ? query_vars.post : null;\n\t\t\tif ( ! obj.data.post_id && $( 'input#post_ID' ).length ) {\n\t\t\t\tobj.data.post_id = $( 'input#post_ID' ).val();\n\t\t\t}\n\t\n\t\t\treturn obj;\n\t\t},\n\t\n\t\t/**\n\t\t * Call\n\t\t * Called by external classes\n\t\t * Sets up jQuery Ajax object\n\t\t *\n\t\t * @param {[object]} [object of ajax settings]\n\t\t * @return {[mixed]} [false if not object or this]\n\t\t */\n\t\tcall: function(obj) {\n\t\n\t\t\t// get default variables if not included in call\n\t\t\tvar settings = this.init( obj );\n\t\n\t\t\t// if init return a response of false\n\t\t\tif ( ! settings) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tthis.request( settings );\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Calls jQuery Ajax on settings object\n\t\t *\n\t\t * @return {[object]} [this]\n\t\t */\n\t\trequest: function(settings) {\n\t\n\t\t\t$.ajax( settings );\n\t\n\t\t\treturn this;\n\t\n\t\t}\n\t\n\t};\n\t\n\t\t/**\n\t * Create a Donut Chart\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.9.0\n\t * @version 4.15.0\n\t *\n\t * @link https://gist.github.com/joeyinbox/8205962\n\t *\n\t * @param {Object} $el jQuery element to draw a chart within.\n\t */\n\t\n\tLLMS.Donut = function( $el ) {\n\t\n\t\t/**\n\t\t * Constructor\n\t\t *\n\t\t * @since 3.9.0\n\t\t * @since 4.15.0 Flip animation in RTL.\n\t\t *\n\t\t * @param {Object} options Donut options.\n\t\t * @return {Void}\n\t\t */\n\t\tfunction Donut(options) {\n\t\n\t\t\tthis.settings = $.extend( {\n\t\t\t\telement: options.element,\n\t\t\t\tpercent: 100\n\t\t\t}, options );\n\t\n\t\t\tthis.circle = this.settings.element.find( 'path' );\n\t\t\tthis.settings.stroke_width = parseInt( this.circle.css( 'stroke-width' ) );\n\t\t\tthis.radius = ( parseInt( this.settings.element.css( 'width' ) ) - this.settings.stroke_width ) / 2;\n\t\t\tthis.angle = $( 'body' ).hasClass( 'rtl' ) ? 82.5 : 97.5; // Origin of the draw at the top of the circle\n\t\t\tthis.i = Math.round( 0.75 * this.settings.percent );\n\t\t\tthis.first = true;\n\t\t\tthis.increment = $( 'body' ).hasClass( 'rtl' ) ? -5 : 5;\n\t\n\t\t\tthis.animate = function() {\n\t\t\t\tthis.timer = setInterval( this.loop.bind( this ), 10 );\n\t\t\t};\n\t\n\t\t\tthis.loop = function() {\n\t\t\t\tthis.angle += this.increment;\n\t\t\t\tthis.angle %= 360;\n\t\t\t\tvar radians = ( this.angle / 180 ) * Math.PI,\n\t\t\t\t\tx = this.radius + this.settings.stroke_width / 2 + Math.cos( radians ) * this.radius,\n\t\t\t\t\ty = this.radius + this.settings.stroke_width / 2 + Math.sin( radians ) * this.radius,\n\t\t\t\t\td;\n\t\t\t\tif (this.first === true) {\n\t\t\t\t\td = this.circle.attr( 'd' ) + ' M ' + x + ' ' + y;\n\t\t\t\t\tthis.first = false;\n\t\t\t\t} else {\n\t\t\t\t\td = this.circle.attr( 'd' ) + ' L ' + x + ' ' + y;\n\t\t\t\t}\n\t\t\t\tthis.circle.attr( 'd', d );\n\t\t\t\tthis.i--;\n\t\n\t\t\t\tif (this.i <= 0) {\n\t\t\t\t\tclearInterval( this.timer );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\n\t\t/**\n\t\t * Draw donut element\n\t\t *\n\t\t * @since 3.9.0\n\t\t *\n\t\t * @param {Object} $el jQuery element to draw a chart within.\n\t\t * @return {Void}\n\t\t */\n\t\tfunction draw( $el ) {\n\t\t\tvar path = '';\n\t\t\t$el.append( '' + path + '' );\n\t\t\tvar donut = new Donut( {\n\t\t\t\telement: $el,\n\t\t\t\tpercent: $el.attr( 'data-perc' )\n\t\t\t} );\n\t\t\tdonut.animate();\n\t\t}\n\t\n\t\tdraw( $el );\n\t\n\t};\n\t\n\t\t/**\n\t * Forms\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 5.0.0\n\t * @version 7.0.0\n\t */\n\t\n\tLLMS.Forms = {\n\t\n\t\t/**\n\t\t * Stores locale information.\n\t\t *\n\t\t * Added via PHP.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\taddress_info: {},\n\t\n\t\t/**\n\t\t * jQuery ref. to the city text field.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$cities: null,\n\t\n\t\t/**\n\t\t * jQuery ref. to the countries select field.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$countries: null,\n\t\n\t\t/**\n\t\t * jQuery ref. to the states select field.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$states: null,\n\t\n\t\t/**\n\t\t * jQuery ref. to the hidden states holder field.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$states_holder: null,\n\t\n\t\t/**\n\t\t * Init\n\t\t *\n\t \t * @since 5.0.0\n\t \t * @since 5.3.3 Move select2 dependency check into the `bind_l10_selects()` method.\n\t \t *\n\t \t * @return {void}\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tif ( $( 'body' ).hasClass( 'wp-admin' ) ) {\n\t\t\t\tif ( ! ( $( 'body' ).hasClass( 'profile-php' ) || $( 'body' ).hasClass( 'user-edit-php' ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tself.bind_matching_fields();\n\t\t\tself.bind_voucher_field();\n\t\t\tself.bind_edit_account();\n\t\t\tself.bind_l10n_selects();\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events for the edit account screen.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tbind_edit_account: function() {\n\t\n\t\t\t// Not an edit account form.\n\t\t\tif ( ! $( 'form.llms-person-form.edit-account' ).length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t$( '.llms-toggle-fields' ).on( 'click', this.handle_toggle_click );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM Events fields with dynamic localization values and language.\n\t\t *\n\t\t * @since 5.0.0\n\t\t * @since 5.3.3 Bind select2-related events after ensuring select2 is available.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tbind_l10n_selects: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tself.$cities = $( '#llms_billing_city' );\n\t\t\tself.$countries = $( '.llms-l10n-country-select select' );\n\t\t\tself.$states = $( '.llms-l10n-state-select select' );\n\t\t\tself.$zips = $( '#llms_billing_zip' );\n\t\n\t\t\tif ( ! self.$countries.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar isSelect2Available = function() {\n\t\t\t\treturn ( undefined !== $.fn.llmsSelect2 );\n\t\t\t};\n\t\n\t\t\tLLMS.wait_for( isSelect2Available, function() {\n\t\n\t\t\t\tif ( self.$states.length ) {\n\t\t\t\t\tself.prep_state_field();\n\t\t\t\t}\n\t\n\t\t\t\tself.$countries.add( self.$states ).llmsSelect2( { width: '100%' } );\n\t\n\t\t\t\tif ( window.llms.address_info ) {\n\t\t\t\t\tself.address_info = JSON.parse( window.llms.address_info );\n\t\t\t\t}\n\t\n\t\t\t\tself.$countries.on( 'change', function() {\n\t\n\t\t\t\t\tvar val = $( this ).val();\n\t\t\t\t\tself.update_locale_info( val );\n\t\n\t\t\t\t} ).trigger( 'change' );\n\t\n\t\t\t}, 'llmsSelect2' );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Ensure \"matching\" fields match.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return {Void}\n\t\t */\n\t\tbind_matching_fields: function() {\n\t\n\t\t\tvar $fields = $( 'input[data-match]' ).not( '[type=\"password\"]' );\n\t\n\t\t\t$fields.each( function() {\n\t\n\t\t\t\tvar $field = $( this ),\n\t\t\t\t\t$match = $( '#' + $field.attr( 'data-match' ) ),\n\t\t\t\t\t$parents;\n\t\n\t\t\t\tif ( $match.length ) {\n\t\n\t\t\t\t\t$parents = $field.closest( '.llms-form-field' ).add( $match.closest( '.llms-form-field' ) );\n\t\n\t\t\t\t\t$field.on( 'input change', function() {\n\t\n\t\t\t\t\t\tvar val_1 = $field.val(),\n\t\t\t\t\t\t\tval_2 = $match.val();\n\t\n\t\t\t\t\t\tif ( val_1 && val_2 && val_1 !== val_2 ) {\n\t\t\t\t\t\t\t$parents.addClass( 'invalid' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$parents.removeClass( 'invalid' );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t} );\n\t\n\t\t\t\t}\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events for voucher toggles UX.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tbind_voucher_field: function() {\n\t\n\t\t\t$( '#llms-voucher-toggle' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( '#llms_voucher' ).toggle();\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Retrieve the parent element for a given field.\n\t\t *\n\t\t * The parent element is hidden when the field isn't required.\n\t\t *\n\t\t * @since 5.0.0\n\t\t * @since 7.0.0 Do not look for a WP column wrapper anymore, always return the field's wrapper div.\n\t\t *\n\t\t * @param {Object} $field jQuery dom object.\n\t\t * @return {Object}\n\t\t */\n\t\tget_field_parent: function( $field ) {\n\t\n\t\t\treturn $field.closest( '.llms-form-field' );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Retrieve the text of a label\n\t\t *\n\t\t * Removes any children HTML elements (eg: required span elements) and returns only the labels text.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @param {Object} $label jQuery object for a label element.\n\t\t * @return {String}\n\t\t */\n\t\tget_label_text: function( $label ) {\n\t\n\t\t\tvar $clone = $label.clone();\n\t\t\t$clone.find( '*' ).remove();\n\t\t\treturn $clone.text().trim();\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Callback function to handle the \"toggle\" button links for changing email address and password on account edit forms\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @param {Object} event Native JS event object.\n\t\t * @return {void}\n\t\t */\n\t\thandle_toggle_click: function( event ) {\n\t\n\t\t\tevent.preventDefault();\n\t\n\t\t\tvar $this = $( this ),\n\t\t\t\t$fields = $( $( this ).attr( 'data-fields' ) ),\n\t\t\t\tisShowing = $this.attr( 'data-is-showing' ) || 'no',\n\t\t\t\tdisplayFunc = 'yes' === isShowing ? 'hide' : 'show',\n\t\t\t\tdisabled = 'yes' === isShowing ? 'disabled' : null,\n\t\t\t\ttextAttr = 'yes' === isShowing ? 'data-change-text' : 'data-cancel-text';\n\t\n\t\t\t$fields.each( function() {\n\t\n\t\t\t\t$( this ).closest( '.llms-form-field' )[ displayFunc ]();\n\t\t\t\t$( this ).attr( 'disabled', disabled );\n\t\n\t\t\t} );\n\t\n\t\t\t$this.text( $this.attr( textAttr ) );\n\t\t\t$this.attr( 'data-is-showing', 'yes' === isShowing ? 'no' : 'yes' );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Prepares the state select field.\n\t\t *\n\t\t * Moves All optgroup elements into a hidden & disabled select element.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tprep_state_field: function() {\n\t\n\t\t\tvar $parent = this.$states.closest( '.llms-form-field' );\n\t\n\t\t\tthis.$holder = $( '',\n\t\t\t\t{ name: $field.attr('name'), class: $field.attr( 'class' ) + ' hidden', type: 'hidden' }\n\t\t\t).insertAfter( $field );\n\t\t\t$field.attr( 'disabled', 'disabled' );\n\t\t\tthis.get_field_parent( $field ).hide();\n\t\t},\n\t\n\t\t/**\n\t\t * Enable a given field\n\t\t *\n\t\t * It also shows the parent element, and removes the empty hidden input field\n\t\t * previously added by disable_field().\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @param {Object} $field The jQuery object for the field.\n\t\t */\n\t\tenable_field: function( $field ) {\n\t\t\t$field.removeAttr( 'disabled' );\n\t\t\t$field.next( '.hidden[name='+$field.attr('name')+']' ).detach();\n\t\t\tthis.get_field_parent( $field ).show();\n\t\t}\n\t\n\t};\n\t\n\t\t/**\n\t * Instructors List\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown\n\t * @version Unknown\n\t */\n\t\n\tLLMS.Instructors = {\n\t\n\t\t/**\n\t\t * Init\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tif ( $( 'body' ).hasClass( 'wp-admin' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( $( '.llms-instructors' ).length ) {\n\t\n\t\t\t\tLLMS.wait_for_matchHeight( function() {\n\t\t\t\t\tself.bind();\n\t\t\t\t} );\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind Method\n\t\t * Handles dom binding on load\n\t\t *\n\t\t * @return {[type]} [description]\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\t$( '.llms-instructors .llms-author' ).matchHeight();\n\t\n\t\t},\n\t\n\t};\n\t\n\t\t/**\n\t * Localization functions for LifterLMS Javascript\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 2.7.3\n\t * @version 2.7.3\n\t *\n\t * @todo we need more robust translation functions to handle sprintf and pluralization\n\t * at this moment we don't need those and haven't stubbed them out\n\t * those will be added when they're needed\n\t */\n\t\n\tLLMS.l10n = LLMS.l10n || {};\n\t\n\tLLMS.l10n.translate = function ( string ) {\n\t\n\t\tvar self = this;\n\t\n\t\tif ( self.strings[string] ) {\n\t\n\t\t\treturn self.strings[string];\n\t\n\t\t} else {\n\t\n\t\t\treturn string;\n\t\n\t\t}\n\t\n\t};\n\t\n\t/**\n\t * Translate and replace placeholders in a string\n\t *\n\t * @example LLMS.l10n.replace( 'This is a %2$s %1$s String', {\n\t * \t'%1$s': 'cool',\n\t * \t\t\t'%2$s': 'very'\n\t * \t\t} );\n\t * \t\tOutput: \"This is a very cool String\"\n\t *\n\t * @param string string text string\n\t * @param object replacements object containing token => replacement pairs\n\t * @return string\n\t * @since 3.16.0\n\t * @version 3.16.0\n\t */\n\tLLMS.l10n.replace = function( string, replacements ) {\n\t\n\t\tvar str = this.translate( string );\n\t\n\t\t$.each( replacements, function( token, value ) {\n\t\n\t\t\tif ( -1 !== token.indexOf( 's' ) ) {\n\t\t\t\tvalue = value.toString();\n\t\t\t} else if ( -1 !== token.indexOf( 'd' ) ) {\n\t\t\t\tvalue = value * 1;\n\t\t\t}\n\t\n\t\t\tstr = str.replace( token, value );\n\t\n\t\t} );\n\t\n\t\treturn str;\n\t\n\t};\n\t\n\t\t/**\n\t * Handle Lesson Preview Elements\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.0.0\n\t * @version 3.16.12\n\t */\n\t\n\tLLMS.LessonPreview = {\n\t\n\t\t/**\n\t\t * A jQuery object of all outlines present on the current screen\n\t\t *\n\t\t * @type obj\n\t\t */\n\t\t$els: null,\n\t\n\t\t/**\n\t\t * Initialize\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tthis.$locked = $( '.llms-lesson-locked' );\n\t\n\t\t\tif ( this.$locked.length ) {\n\t\n\t\t\t\tself.bind();\n\t\n\t\t\t}\n\t\n\t\t\tif ( $( '.llms-course-navigation' ).length ) {\n\t\n\t\t\t\tLLMS.wait_for_matchHeight( function() {\n\t\n\t\t\t\t\tself.match_height();\n\t\n\t\t\t\t} );\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events\n\t\t *\n\t\t * @return void\n\t\t * @since 3.0.0\n\t\t * @version 3.16.12\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tthis.$locked.on( 'mouseenter', function() {\n\t\n\t\t\t\tvar $tip = $( this ).find( '.llms-tooltip' );\n\t\t\t\tif ( ! $tip.length ) {\n\t\t\t\t\tvar msg = $( this ).attr( 'data-tooltip-msg' );\n\t\t\t\t\tif ( ! msg ) {\n\t\t\t\t\t\tmsg = LLMS.l10n.translate( 'You do not have permission to access this content' );\n\t\t\t\t\t}\n\t\t\t\t\t$tip = self.get_tooltip( msg );\n\t\t\t\t\t$( this ).append( $tip );\n\t\t\t\t}\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$tip.addClass( 'show' );\n\t\t\t\t}, 10 );\n\t\n\t\t\t} );\n\t\n\t\t\tthis.$locked.on( 'mouseleave', function() {\n\t\n\t\t\t\tvar $tip = $( this ).find( '.llms-tooltip' );\n\t\t\t\t$tip.removeClass( 'show' );\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Match the height of lesson preview items in course navigation blocks\n\t\t *\n\t\t * @return void\n\t\t * @since 3.0.0\n\t\t * @version 3.0.0\n\t\t */\n\t\tmatch_height: function() {\n\t\n\t\t\t$( '.llms-course-navigation .llms-lesson-link' ).matchHeight();\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Get a tooltip element\n\t\t *\n\t\t * @param string msg message to display inside the tooltip\n\t\t * @return obj\n\t\t * @since 3.0.0\n\t\t * @version 3.2.4\n\t\t */\n\t\tget_tooltip: function( msg ) {\n\t\t\tvar $el = $( '
' );\n\t\t\t$el.append(\n\t\t\t\t$('
', {\n\t\t\t\t\t'class': 'llms-tooltip-content',\n\t\t\t\t\t'aria-hidden': 'true'\n\t\t\t\t}).text( msg )\n\t\t\t);\n\t\t\treturn $el;\n\t\t},\n\t\n\t};\n\t\n\t\t/**\n\t * LifterLMS Loops JS\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.0.0\n\t * @version 3.14.0\n\t */\n\t\n\tLLMS.Loops = {\n\t\n\t\t/**\n\t\t * Initialize\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tif ( $( '.llms-loop' ).length ) {\n\t\n\t\t\t\tLLMS.wait_for_matchHeight( function() {\n\t\n\t\t\t\t\tself.match_height();\n\t\n\t\t\t\t} );\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Match the height of .llms-loop-item\n\t\t *\n\t\t * @return void\n\t\t * @since 3.0.0\n\t\t * @version 3.14.0\n\t\t */\n\t\tmatch_height: function() {\n\t\n\t\t\t$( '.llms-loop-item .llms-loop-item-content' ).matchHeight();\n\t\t\t$( '.llms-achievement-loop-item .llms-achievement' ).matchHeight();\n\t\t\t$( '.llms-certificate-loop-item .llms-certificate' ).matchHeight();\n\t\n\t\t},\n\t\n\t};\n\t\n\t\t/**\n\t * Handle the Collapsible Syllabus Widget / Shortcode\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown\n\t * @version Unknown\n\t */\n\t\n\tLLMS.OutlineCollapse = {\n\t\n\t\t/**\n\t\t * A jQuery object of all outlines present on the current screen\n\t\t *\n\t\t * @type obj\n\t\t */\n\t\t$outlines: null,\n\t\n\t\t/**\n\t\t * Initialize\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tthis.$outlines = $( '.llms-widget-syllabus--collapsible' );\n\t\n\t\t\tif ( this.$outlines.length ) {\n\t\n\t\t\t\tthis.bind();\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tthis.$outlines.each( function() {\n\t\n\t\t\t\tvar $outline = $( this ),\n\t\t\t\t\t$headers = $outline.find( '.llms-section .section-header' );\n\t\n\t\t\t\t// bind header clicks\n\t\t\t\t$headers.on( 'click', function( e ) {\n\t\n\t\t\t\t\te.preventDefault();\n\t\n\t\t\t\t\tvar $toggle = $( this ),\n\t\t\t\t\t\t$section = $toggle.closest( '.llms-section' ),\n\t\t\t\t\t\tstate = self.get_section_state( $section );\n\t\n\t\t\t\t\tswitch ( state ) {\n\t\n\t\t\t\t\t\tcase 'closed':\n\t\t\t\t\t\t\tself.open_section( $section );\n\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\tcase 'opened':\n\t\t\t\t\t\t\tself.close_section( $section );\n\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t} );\n\t\n\t\t\t\t// bind optional toggle \"buttons\"\n\t\t\t\t$outline.find( '.llms-collapse-toggle' ).on( 'click', function( e ) {\n\t\n\t\t\t\t\te.preventDefault();\n\t\n\t\t\t\t\tvar $btn = $( this ),\n\t\t\t\t\t\taction = $btn.attr( 'data-action' ),\n\t\t\t\t\t\topposite_action = ( 'close' === action ) ? 'opened' : 'closed';\n\t\n\t\t\t\t\t$headers.each( function() {\n\t\n\t\t\t\t\t\tvar $section = $( this ).closest( '.llms-section' ),\n\t\t\t\t\t\t\tstate = self.get_section_state( $section );\n\t\n\t\t\t\t\t\tif ( opposite_action !== state ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tswitch ( state ) {\n\t\n\t\t\t\t\t\t\tcase 'closed':\n\t\t\t\t\t\t\t\tself.close_section( $section );\n\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\tcase 'opened':\n\t\t\t\t\t\t\t\tself.open_section( $section );\n\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t$( this ).trigger( 'click' );\n\t\n\t\t\t\t\t} );\n\t\n\t\t\t\t} );\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Close an outline section\n\t\t *\n\t\t * @param obj $section jQuery selector of a '.llms-section'\n\t\t * @return void\n\t\t */\n\t\tclose_section: function( $section ) {\n\t\n\t\t\t$section.removeClass( 'llms-section--opened' ).addClass( 'llms-section--closed' );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Open an outline section\n\t\t *\n\t\t * @param obj $section jQuery selector of a '.llms-section'\n\t\t * @return void\n\t\t */\n\t\topen_section: function( $section ) {\n\t\n\t\t\t$section.removeClass( 'llms-section--closed' ).addClass( 'llms-section--opened' );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Get the current state (open or closed) of an outline section\n\t\t *\n\t\t * @param obj $section jQuery selector of a '.llms-section'\n\t\t * @return string 'opened' or 'closed'\n\t\t */\n\t\tget_section_state: function( $section ) {\n\t\n\t\t\treturn $section.hasClass( 'llms-section--opened' ) ? 'opened' : 'closed';\n\t\n\t\t}\n\t\n\t};\n\t\n\t\t/**\n\t * Handle Password Strength Meter for registration and password update fields\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.0.0\n\t * @version 5.0.0\n\t */\n\t\n\t$.extend( LLMS.PasswordStrength, {\n\t\n\t\t/**\n\t\t * jQuery ref for the password strength meter object.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$meter: $( '.llms-password-strength-meter' ),\n\t\n\t\t/**\n\t\t * jQuery ref for the password field.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$pass: null,\n\t\n\t\t/**\n\t\t * jQuery ref for the password confirmation field\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$conf: null,\n\t\n\t\t/**\n\t\t * jQuery ref for form element.\n\t\t *\n\t\t * @type {Object}\n\t\t */\n\t\t$form: null,\n\t\n\t\t/**\n\t\t * Init\n\t\t * loads class methods\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @since 3.7.0 Unknown\n\t\t * @since 5.0.0 Move reference setup to `setup_references()`.\n\t\t * Use `LLMS.wait_for()` for dependency waiting.\n\t\t *\n\t\t * @return {Void}\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tif ( $( 'body' ).hasClass( 'wp-admin' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( ! this.setup_references() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tLLMS.wait_for( function() {\n\t\t\t\treturn ( 'undefined' !== typeof wp && 'undefined' !== typeof wp.passwordStrength );\n\t\t\t}, function() {\n\t\t\t\tself.bind();\n\t\t\t\tself.$form.trigger( 'llms-password-strength-ready' );\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM Events\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\t// add submission event handlers when not on a checkout form\n\t\t\tif ( ! this.$form.hasClass( 'llms-checkout' ) ) {\n\t\t\t\tself.$form.on( 'submit', self, self.submit );\n\t\t\t}\n\t\n\t\t\t// check password strength on keyup\n\t\t\tself.$pass.add( self.$conf ).on( 'keyup', function() {\n\t\t\t\tself.check_strength();\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Check the strength of a user entered password\n\t\t * and update elements depending on the current strength\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @since 5.0.0 Allow password confirmation to be optional when checking strength.\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tcheck_strength: function() {\n\t\n\t\t\tvar $pass_field = this.$pass.closest( '.llms-form-field' ),\n\t\t\t\t$conf_field = this.$conf && this.$conf.length ? this.$conf.closest( '.llms-form-field' ) : null,\n\t\t\t\tpass_length = this.$pass.val().length,\n\t\t\t\tconf_length = this.$conf && this.$conf.length ? this.$conf.val().length : 0;\n\t\n\t\t\t// hide the meter if both fields are empty\n\t\t\tif ( ! pass_length && ! conf_length ) {\n\t\t\t\t$pass_field.removeClass( 'valid invalid' );\n\t\t\t\tif ( $conf_field ) {\n\t\t\t\t\t$conf_field.removeClass( 'valid invalid' );\n\t\t\t\t}\n\t\t\t\tthis.$meter.hide();\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( this.get_current_strength_status() ) {\n\t\t\t\t$pass_field.removeClass( 'invalid' ).addClass( 'valid' );\n\t\t\t\tif ( conf_length ) {\n\t\t\t\t\t$conf_field.removeClass( 'invalid' ).addClass( 'valid' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$pass_field.removeClass( 'valid' ).addClass( 'invalid' );\n\t\t\t\tif ( conf_length ) {\n\t\t\t\t\t$conf_field.removeClass( 'valid' ).addClass( 'invalid' );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis.$meter.removeClass( 'too-short very-weak weak medium strong mismatch' );\n\t\t\tthis.$meter.show().addClass( this.get_current_strength( 'slug' ) );\n\t\t\tthis.$meter.html( this.get_current_strength( 'text' ) );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Form submission action called during registration on checkout screen\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param obj self instance of this class\n\t\t * @param Function callback callback function, passes error message or success back to checkout handler\n\t\t * @return void\n\t\t */\n\t\tcheckout: function( self, callback ) {\n\t\n\t\t\tif ( self.get_current_strength_status() ) {\n\t\n\t\t\t\tcallback( true );\n\t\n\t\t\t} else {\n\t\n\t\t\t\tcallback( LLMS.l10n.translate( 'There is an issue with your chosen password.' ) );\n\t\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Get the list of blocklisted strings\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return array\n\t\t */\n\t\tget_blocklist: function() {\n\t\n\t\t\t// Default values from WP Core + any values added via settings filter..\n\t\t\tvar blocklist = wp.passwordStrength.userInputDisallowedList().concat( this.get_setting( 'blocklist', [] ) );\n\t\n\t\t\t// Add values from all text fields in the form.\n\t\t\tthis.$form.find( 'input[type=\"text\"], input[type=\"email\"], input[type=\"tel\"], input[type=\"number\"]' ).each( function() {\n\t\t\t\tvar val = $( this ).val();\n\t\t\t\tif ( val ) {\n\t\t\t\t\tblocklist.push( val );\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\treturn blocklist;\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Retrieve current strength as a number, a slug, or a translated text string\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @since 5.0.0 Allow password confirmation to be optional when checking strength.\n\t\t *\n\t\t * @param {String} format Derived return format [int|slug|text] defaults to int.\n\t\t * @return mixed\n\t\t */\n\t\tget_current_strength: function( format ) {\n\t\n\t\t\tformat = format || 'int';\n\t\t\tvar pass = this.$pass.val(),\n\t\t\t\tconf = this.$conf && this.$conf.length ? this.$conf.val() : '',\n\t\t\t\tval;\n\t\n\t\t\t// enforce custom length requirement\n\t\t\tif ( pass.length < this.get_setting( 'min_length', 6 ) ) {\n\t\t\t\tval = -1;\n\t\t\t} else {\n\t\t\t\tval = wp.passwordStrength.meter( pass, this.get_blocklist(), conf );\n\t\t\t\t// 0 & 1 are both very-weak\n\t\t\t\tif ( 0 === val ) {\n\t\t\t\t\tval = 1;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( 'slug' === format ) {\n\t\t\t\treturn this.get_strength_slug( val );\n\t\t\t} else if ( 'text' === format ) {\n\t\t\t\treturn this.get_strength_text( val );\n\t\t\t} else {\n\t\t\t\treturn val;\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Determines if the current password strength meets the user-defined\n\t\t * minimum password strength requirements\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @return boolean\n\t\t */\n\t\tget_current_strength_status: function() {\n\t\t\tvar curr = this.get_current_strength(),\n\t\t\t\tmin = this.get_strength_value( this.get_minimum_strength() );\n\t\t\treturn ( 5 === curr ) ? false : ( curr >= min );\n\t\t},\n\t\n\t\t/**\n\t\t * Retrieve the minimum password strength for the current form.\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @since 5.0.0 Replaces the version output via an inline PHP script in favor of utilizing values configured in the settings object.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tget_minimum_strength: function() {\n\t\t\treturn this.get_setting( 'min_strength', 'strong' );\n\t\t},\n\t\n\t\t/**\n\t\t * Get a setting and fallback to a default value.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @param {String} key Setting key.\n\t\t * @param {mixed} default_val Default value when the requested setting cannot be located.\n\t\t * @return {mixed}\n\t\t */\n\t\tget_setting: function( key, default_val ) {\n\t\t\tvar settings = this.get_settings();\n\t\t\treturn settings[ key ] ? settings[ key ] : default_val;\n\t\t},\n\t\n\t\t/**\n\t\t * Get the slug associated with a strength value\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param int strength_val Strength value number.\n\t\t * @return string\n\t\t */\n\t\tget_strength_slug: function( strength_val ) {\n\t\n\t\t\tvar slugs = {\n\t\t\t\t'-1': 'too-short',\n\t\t\t\t1: 'very-weak',\n\t\t\t\t2: 'weak',\n\t\t\t\t3: 'medium',\n\t\t\t\t4: 'strong',\n\t\t\t\t5: 'mismatch',\n\t\t\t};\n\t\n\t\t\treturn ( slugs[ strength_val ] ) ? slugs[ strength_val ] : slugs[5];\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Gets the translated text associated with a strength value\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param {Integer} strength_val Strength value\n\t\t * @return {String}\n\t\t */\n\t\tget_strength_text: function( strength_val ) {\n\t\n\t\t\tvar texts = {\n\t\t\t\t'-1': LLMS.l10n.translate( 'Too Short' ),\n\t\t\t\t1: LLMS.l10n.translate( 'Very Weak' ),\n\t\t\t\t2: LLMS.l10n.translate( 'Weak' ),\n\t\t\t\t3: LLMS.l10n.translate( 'Medium' ),\n\t\t\t\t4: LLMS.l10n.translate( 'Strong' ),\n\t\t\t\t5: LLMS.l10n.translate( 'Mismatch' ),\n\t\t\t};\n\t\n\t\t\treturn ( texts[ strength_val ] ) ? texts[ strength_val ] : texts[5];\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Get the value associated with a strength slug\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param string strength_slug A strength slug.\n\t\t * @return {Integer}\n\t\t */\n\t\tget_strength_value: function( strength_slug ) {\n\t\n\t\t\tvar values = {\n\t\t\t\t'too-short': -1,\n\t\t\t\t'very-weak': 1,\n\t\t\t\tweak: 2,\n\t\t\t\tmedium: 3,\n\t\t\t\tstrong: 4,\n\t\t\t\tmismatch: 5,\n\t\t\t};\n\t\n\t\t\treturn ( values[ strength_slug ] ) ? values[ strength_slug ] : values.mismatch;\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Setup jQuery references to DOM elements needed to power the password meter.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @return {Boolean} Returns `true` if a meter element and password field are found, otherwise returns `false`.\n\t\t */\n\t\tsetup_references: function() {\n\t\n\t\t\tif ( ! this.$meter.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tthis.$form = this.$meter.closest( 'form' );\n\t\t\tthis.$pass = this.$form.find( 'input#password' );\n\t\n\t\t\tif ( this.$pass.length && this.$pass.attr( 'data-match' ) ) {\n\t\t\t\tthis.$conf = this.$form.find( '#' + this.$pass.attr( 'data-match' ) );\n\t\t\t}\n\t\n\t\t\treturn ( this.$pass.length > 0 );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Form submission handler for registration and update forms\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @since 5.0.0 Allow the account edit for to bypass strength checking when the password field is disabled (not being submitted).\n\t\t *\n\t\t * @param obj e Event data.\n\t\t * @return void\n\t\t */\n\t\tsubmit: function( e ) {\n\t\n\t\t\tvar self = e.data;\n\t\t\te.preventDefault();\n\t\t\tself.$pass.trigger( 'keyup' );\n\t\n\t\t\t// Meets the status requirements OR we're on the account edit form and the password field is disabled.\n\t\t\tif ( self.get_current_strength_status() || ( self.$form.hasClass( 'edit-account' ) && 'disabled' === self.$pass.attr( 'disabled' ) ) ) {\n\t\t\t\tself.$form.off( 'submit', self.submit );\n\t\t\t\tself.$form.trigger( 'submit' );\n\t\t\t} else {\n\t\t\t\t$( 'html, body' ).animate( {\n\t\t\t\t\tscrollTop: self.$meter.offset().top - 100,\n\t\t\t\t}, 200 );\n\t\t\t\tself.$meter.hide();\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tself.$meter.fadeIn( 400 );\n\t\t\t\t}, 220 );\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Get the list of blocklist strings\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @deprecated 5.0.0 `LLMS.PasswordStrength.get_blacklist()` is deprecated in favor of `LLMS.PasswordStrength.get_blocklist()`.\n\t\t *\n\t\t * @return array\n\t\t */\n\t\tget_blacklist: function() {\n\t\t\tconsole.log( 'Method `get_blacklist()` is deprecated in favor of `get_blocklist()`.' );\n\t\t\treturn this.get_blacklist();\n\t\t},\n\t\n\t} );\n\t\n\t\t/**\n\t * Pricing Table UI\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown.\n\t * @version Unknown.\n\t */\n\t\n\tLLMS.Pricing_Tables = {\n\t\n\t\t/**\n\t\t * Init\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tvar self = this;\n\t\n\t\t\tif ( $( 'body' ).hasClass( 'wp-admin' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( $( '.llms-access-plans' ).length ) {\n\t\n\t\t\t\tLLMS.wait_for_matchHeight( function() {\n\t\t\t\t\tself.bind();\n\t\t\t\t} );\n\t\n\t\t\t\tthis.$locked = $( 'a[href=\"#llms-plan-locked\"]' );\n\t\n\t\t\t\tif ( this.$locked.length ) {\n\t\n\t\t\t\t\tLLMS.wait_for_popover( function() {\n\t\t\t\t\t\tself.bind_locked();\n\t\t\t\t\t} );\n\t\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind Method\n\t\t * Handles dom binding on load\n\t\t *\n\t\t * @return {[type]} [description]\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\t$( '.llms-access-plan-content' ).matchHeight();\n\t\t\t$( '.llms-access-plan-pricing.trial' ).matchHeight();\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Setup a popover for members-only restricted plans\n\t\t *\n\t\t * @return void\n\t\t * @since 3.0.0\n\t\t * @version 3.9.1\n\t\t */\n\t\tbind_locked: function() {\n\t\n\t\t\tthis.$locked.each( function() {\n\t\n\t\t\t\t$( this ).webuiPopover( {\n\t\t\t\t\tanimation: 'pop',\n\t\t\t\t\tcloseable: true,\n\t\t\t\t\tcontent: function( e ) {\n\t\t\t\t\t\tvar $content = $( '
' );\n\t\t\t\t\t\t$content.append( e.$element.closest( '.llms-access-plan' ).find( '.llms-access-plan-restrictions ul' ).clone() );\n\t\t\t\t\t\treturn $content;\n\t\t\t\t\t},\n\t\t\t\t\tplacement: 'top',\n\t\t\t\t\tstyle: 'inverse',\n\t\t\t\t\ttitle: LLMS.l10n.translate( 'Members Only Pricing' ),\n\t\t\t\t\twidth: '280px',\n\t\t\t\t} );\n\t\n\t\t\t} );\n\t\n\t\t},\n\t\n\t};\n\t\n\t\t/**\n\t * Quiz Attempt\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 7.3.0\n\t * @version 7.3.0\n\t */\n\t\n\tLLMS.Quiz_Attempt = {\n\t\t/**\n\t\t * Initialize\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\t$( '.llms-quiz-attempt-question-header a.toggle-answer' ).on( 'click', function( e ) {\n\t\n\t\t\t\te.preventDefault();\n\t\n\t\t\t\tvar $curr = $( this ).closest( 'header' ).next( '.llms-quiz-attempt-question-main' );\n\t\n\t\t\t\t$( this ).closest( 'li' ).siblings().find( '.llms-quiz-attempt-question-main' ).slideUp( 200 );\n\t\n\t\t\t\tif ( $curr.is( ':visible' ) ) {\n\t\t\t\t\t$curr.slideUp( 200 );\n\t\t\t\t} else {\n\t\t\t\t\t$curr.slideDown( 200 );\n\t\t\t\t}\n\t\n\t\t\t} );\n\t\t}\n\t\n\t}\n\t\n\t\t/**\n\t * LifterLMS Reviews JS\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown\n\t * @version Unknown\n\t */\n\t\n\tLLMS.Review = {\n\t\t/**\n\t\t * Init\n\t\t * loads class methods\n\t\t */\n\t\tinit: function() {\n\t\t\t// console.log('Initializing Review ');\n\t\t\tthis.bind();\n\t\t},\n\t\n\t\t/**\n\t\t * This function binds actions to the appropriate hooks\n\t\t */\n\t\tbind: function() {\n\t\t\t$( '#llms_review_submit_button' ).click(function()\n\t\t\t\t{\n\t\t\t\tif ($( '#review_title' ).val() !== '' && $( '#review_text' ).val() !== '') {\n\t\t\t\t\tjQuery.ajax({\n\t\t\t\t\t\ttype : 'post',\n\t\t\t\t\t\tdataType : 'json',\n\t\t\t\t\t\turl : window.llms.ajaxurl,\n\t\t\t\t\t\tdata : {\n\t\t\t\t\t\t\taction : 'LLMSSubmitReview',\n\t\t\t\t\t\t\treview_title: $( '#review_title' ).val(),\n\t\t\t\t\t\t\treview_text: $( '#review_text' ).val(),\n\t\t\t\t\t\t\tpageID : $( '#post_ID' ).val(),\n\t\t\t\t\t\t\tllms_review_nonce: $( '#llms_review_nonce' ).val()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconsole.log( 'Review success' );\n\t\t\t\t\t\t\t$( '#review_box' ).hide( 'swing' );\n\t\t\t\t\t\t\t$( '#thank_you_box' ).show( 'swing' );\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(jqXHR, textStatus, errorThrown )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconsole.log( jqXHR );\n\t\t\t\t\t\t\tconsole.log( textStatus );\n\t\t\t\t\t\t\tconsole.log( errorThrown );\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tif ($( '#review_title' ).val() === '') {\n\t\t\t\t\t\t$( '#review_title_error' ).show( 'swing' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( '#review_title_error' ).hide( 'swing' );\n\t\t\t\t\t}\n\t\t\t\t\tif ($( '#review_text' ).val() === '') {\n\t\t\t\t\t\t$( '#review_text_error' ).show( 'swing' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( '#review_text_error' ).hide( 'swing' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif ( $( '#_llms_display_reviews' ).attr( 'checked' ) ) {\n\t\t\t\t$( '.llms-num-reviews-top' ).addClass( 'top' );\n\t\t\t\t$( '.llms-num-reviews-bottom' ).show();\n\t\n\t\t\t} else {\n\t\t\t\t$( '.llms-num-reviews-bottom' ).hide();\n\t\t\t}\n\t\t\t$( '#_llms_display_reviews' ).change(function() {\n\t\t\t\tif ( $( '#_llms_display_reviews' ).attr( 'checked' ) ) {\n\t\t\t\t\t$( '.llms-num-reviews-top' ).addClass( 'top' );\n\t\t\t\t\t$( '.llms-num-reviews-bottom' ).show();\n\t\t\t\t} else {\n\t\t\t\t\t$( '.llms-num-reviews-top' ).removeClass( 'top' );\n\t\t\t\t\t$( '.llms-num-reviews-bottom' ).hide();\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t};\n\t\n\t\t/* global LLMS, $ */\n\t\n\t/*!\n\t * JavaScript Cookie v2.2.1\n\t * https://github.com/js-cookie/js-cookie\n\t *\n\t * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n\t * Released under the MIT license\n\t */\n\t;(function (factory) {\n\t\tvar registeredInModuleLoader;\n\t\tif (typeof define === 'function' && define.amd) {\n\t\t\tdefine(factory);\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (typeof exports === 'object') {\n\t\t\tmodule.exports = factory();\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (!registeredInModuleLoader) {\n\t\t\tvar OldCookies = window.Cookies;\n\t\t\tvar api = window.Cookies = factory();\n\t\t\tapi.noConflict = function () {\n\t\t\t\twindow.Cookies = OldCookies;\n\t\t\t\treturn api;\n\t\t\t};\n\t\t}\n\t}(function () {\n\t\tfunction extend () {\n\t\t\tvar i = 0;\n\t\t\tvar result = {};\n\t\t\tfor (; i < arguments.length; i++) {\n\t\t\t\tvar attributes = arguments[ i ];\n\t\t\t\tfor (var key in attributes) {\n\t\t\t\t\tresult[key] = attributes[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\tfunction decode (s) {\n\t\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t\t}\n\t\n\t\tfunction init (converter) {\n\t\t\tfunction api() {}\n\t\n\t\t\tfunction set (key, value, attributes) {\n\t\t\t\tif (typeof document === 'undefined') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\t\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t\t}\n\t\n\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\t\n\t\t\t\ttry {\n\t\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\n\t\t\t\tvalue = converter.write ?\n\t\t\t\t\tconverter.write(value, key) :\n\t\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\n\t\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\t\n\t\t\t\tvar stringifiedAttributes = '';\n\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t\t// ...\n\t\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t\t// character:\n\t\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t\t// ...\n\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t\t}\n\t\n\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t}\n\t\n\t\t\tfunction get (key, json) {\n\t\t\t\tif (typeof document === 'undefined') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tvar jar = {};\n\t\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t\t// in case there are no cookies at all.\n\t\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\t\tvar i = 0;\n\t\n\t\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\t\tvar cookie = parts.slice(1).join('=');\n\t\n\t\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t\t}\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\t\tdecode(cookie);\n\t\n\t\t\t\t\t\tif (json) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tjar[name] = cookie;\n\t\n\t\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t}\n\t\n\t\t\t\treturn key ? jar[key] : jar;\n\t\t\t}\n\t\n\t\t\tapi.set = set;\n\t\t\tapi.get = function (key) {\n\t\t\t\treturn get(key, false /* read as raw */);\n\t\t\t};\n\t\t\tapi.getJSON = function (key) {\n\t\t\t\treturn get(key, true /* read as json */);\n\t\t\t};\n\t\t\tapi.remove = function (key, attributes) {\n\t\t\t\tset(key, '', extend(attributes, {\n\t\t\t\t\texpires: -1\n\t\t\t\t}));\n\t\t\t};\n\t\n\t\t\tapi.defaults = {};\n\t\n\t\t\tapi.withConverter = init;\n\t\n\t\t\treturn api;\n\t\t}\n\t\n\t\treturn init(function () {});\n\t}));\n\t\n\t/**\n\t * Create a no conflict reference to JS Cookies.\n\t *\n\t * @type {Object}\n\t */\n\tLLMS.CookieStore = Cookies.noConflict();\n\t\n\t/**\n\t * Store information in Local Storage by group.\n\t *\n\t * @since 3.36.0\n\t * @since 3.37.14 Use persistent reference to JS Cookies.\n\t * @since 4.2.0 Set sameSite to `strict` for cookies.\n\t *\n\t * @param string group Storage group id/name.\n\t */\n\tLLMS.Storage = function( group ) {\n\t\n\t\tvar self = this,\n\t\t\tstore = LLMS.CookieStore;\n\t\n\t\t/**\n\t\t * Clear all data for the group.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tthis.clearAll = function() {\n\t\t\tstore.remove( group );\n\t\t};\n\t\n\t\t/**\n\t\t * Clear a single item from the group by key.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @return obj\n\t\t */\n\t\tthis.clear = function( key ) {\n\t\t\tvar data = self.getAll();\n\t\t\tdelete data[ key ];\n\t\t\treturn store.set( group, data );\n\t\t};\n\t\n\t\t/**\n\t\t * Retrieve (and parse) all data stored for the group.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @return obj\n\t\t */\n\t\tthis.getAll = function() {\n\t\t\treturn store.getJSON( group ) || {};\n\t\t}\n\t\n\t\t/**\n\t\t * Retrieve an item from the group by key.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @param string key Item key/name.\n\t\t * @param mixed default_val Item default value to be returned when item not found in the group.\n\t\t * @return mixed\n\t\t */\n\t\tthis.get = function( key, default_val ) {\n\t\t\tvar data = self.getAll();\n\t\t\treturn data[ key ] ? data[ key ] : default_val;\n\t\t}\n\t\n\t\t/**\n\t\t * Store an item in the group by key.\n\t\t *\n\t\t * @since 3.36.0\n\t\t * @since 4.2.0 Set sameSite to `strict` for cookies.\n\t\t *\n\t\t * @param string key Item key name.\n\t\t * @param mixed val Item value\n\t\t * @return obj\n\t\t */\n\t\tthis.set = function( key, val ) {\n\t\t\tvar data = self.getAll();\n\t\t\tdata[ key ] = val;\n\t\t\treturn store.set( group, data, { sameSite: 'strict' } );\n\t\t};\n\t\n\t}\n\t\n\t\t/**\n\t * Student Dashboard related JS\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since 3.7.0\n\t * @since 3.10.0 Bind events on the orders screen.\n\t * @since 5.0.0 Removed redundant password toggle logic for edit account screen.\n\t * @version 5.0.0\n\t */\n\tLLMS.StudentDashboard = {\n\t\n\t\t/**\n\t\t * Slug for the current screen/endpoint\n\t\t *\n\t\t * @type {String}\n\t\t */\n\t\tscreen: '',\n\t\n\t\t/**\n\t\t * Init\n\t\t *\n\t\t * @since 3.7.0\n\t\t * @since 3.10.0 Unknown\n\t\t * @since 5.0.0 Removed password toggle logic.\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\n\t\t\tif ( $( '.llms-student-dashboard' ).length ) {\n\t\t\t\tthis.bind();\n\t\t\t\tif ( 'orders' === this.get_screen() ) {\n\t\t\t\t\tthis.bind_orders();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events\n\t\t *\n\t\t * @since 3.7.0\n\t\t * @since 3.7.4 Unknown.\n\t\t * @since 5.0.0 Removed password toggle logic.\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tbind: function() {\n\t\n\t\t\t$( '.llms-donut' ).each( function() {\n\t\t\t\tLLMS.Donut( $( this ) );\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Bind events related to the orders screen on the dashboard\n\t\t *\n\t\t * @since 3.10.0\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tbind_orders: function() {\n\t\n\t\t\t$( '#llms-cancel-subscription-form' ).on( 'submit', this.order_cancel_warning );\n\t\t\t$( '#llms_update_payment_method' ).on( 'click', function() {\n\t\t\t\t$( 'input[name=\"llms_payment_gateway\"]:checked' ).trigger( 'change' );\n\t\t\t\t$( this ).closest( 'form' ).find( '.llms-switch-payment-source-main' ).slideToggle( '200' );\n\t\t\t} );\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Get the current dashboard endpoint/tab slug\n\t\t *\n\t\t * @since 3.10.0\n\t\t *\n\t\t * @return void\n\t\t */\n\t\tget_screen: function() {\n\t\t\tif ( ! this.screen ) {\n\t\t\t\tthis.screen = $( '.llms-student-dashboard' ).attr( 'data-current' );\n\t\t\t}\n\t\t\treturn this.screen;\n\t\t},\n\t\n\t\t/**\n\t\t * Show a confirmation warning when Cancel Subscription form is submitted\n\t\t *\n\t\t * @since 3.10.0\n\t\t *\n\t\t * @param obj e JS event data.\n\t\t * @return void\n\t\t */\n\t\torder_cancel_warning: function( e ) {\n\t\t\te.preventDefault();\n\t\t\tvar msg = LLMS.l10n.translate( 'Are you sure you want to cancel your subscription?' );\n\t\t\tif ( window.confirm( LLMS.l10n.translate( msg ) ) ) {\n\t\t\t\t$( this ).off( 'submit', this.order_cancel_warning );\n\t\t\t\t$( this ).submit();\n\t\t\t}\n\t\t},\n\t\n\t};\n\t\n\t\t/* global LLMS, $ */\n\t\n\t/**\n\t * User event/interaction tracking.\n\t *\n\t * @since 3.36.0\n\t * @since 3.36.2 Fix JS error when settings aren't loaded.\n\t * @since 3.37.2 When adding an event to the storae also make sure the nonce is set for server-side verification.\n\t * @since 3.37.9 Fix IE compatibility issue related to usage of `Object.assign()`.\n\t * @since 3.37.14 Persist the tracking events via ajax when reaching the cookie size limit.\n\t * @since 5.0.0 Set `settings` as an empty object when no settings supplied.\n\t * @since 7.1.0 Only attempt to add a nonce to the datastore when a nonce exists in the settings object.\n\t */\n\tLLMS.Tracking = function( settings ) {\n\t\n\t\tsettings = settings || {};\n\t\n\t\tvar self = this,\n\t\t\tstore = new LLMS.Storage( 'llms-tracking' );\n\t\n\t\tsettings = 'string' === typeof settings ? JSON.parse( settings ) : settings;\n\t\n\t\t/**\n\t\t * Initialize / Bind all tracking event listeners.\n\t\t *\n\t\t * @since 3.36.0\n\t\t * @since 5.0.0 Only attempt to add a nonce to the datastore when a nonce exists in the settings object.\n\t\t * @since 7.1.0 Do not add a nonce to the datastore by default, will be added/updated\n\t\t * when storing an event to track.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tfunction init() {\n\t\n\t\t\tself.addEvent( 'page.load' );\n\t\n\t\t\twindow.addEventListener( 'beforeunload', onBeforeUnload );\n\t\t\twindow.addEventListener( 'pagehide', onUnload );\n\t\n\t\t\tdocument.addEventListener( 'visibilitychange', onVisibilityChange );\n\t\n\t\t};\n\t\n\t\t/**\n\t\t * Add an event.\n\t\t *\n\t\t * @since 3.36.0\n\t\t * @since 3.36.2 Fix error when settings aren't loaded.\n\t\t * @since 3.37.2 Always make sure the nonce is set for server-side verification.\n\t\t * @since 3.37.14 Persist the tracking events via ajax when reaching the cookie size limit.\n\t\t * @since 7.1.0 Only attempt to add a nonce to the datastore when a nonce exists in the settings object.\n\t\t *\n\t\t * @param string|obj event Event Id (type.event) or a full event object from `this.makeEventObj()`.\n\t\t * @param int args Optional additional arguments to pass to `this.makeEventObj()`.\n\t\t * @return {void}\n\t\t */\n\t\tthis.addEvent = function( event, args ) {\n\t\n\t\t\targs = args || {};\n\t\t\tif ( 'string' === typeof event ) {\n\t\t\t\targs.event = event;\n\t\t\t}\n\t\n\t\t\t// If the event isn't registered in the settings don't proceed.\n\t\t\tif ( !settings.events || -1 === settings.events.indexOf( args.event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// Make sure the nonce is set for server-side verification.\n\t\t\tif ( settings.nonce ) {\n\t\t\t\tstore.set( 'nonce', settings.nonce );\n\t\t\t}\n\t\n\t\t\tevent = self.makeEventObj( args );\n\t\n\t\t\tvar all = store.get( 'events', [] );\n\t\t\tall.push( event );\n\t\t\tstore.set( 'events', all );\n\t\n\t\t\t// If couldn't store the latest event because of size limits.\n\t\t\tif ( settings.saving_frequency === 'always' || all.length > store.get( 'events', [] ).length ) {\n\t\n\t\t\t\t// Copy the cookie in a temporary variable.\n\t\t\t\tvar _temp = store.getAll();\n\t\t\t\t// Clear the events from the cookie.\n\t\t\t\tstore.clear('events');\n\t\n\t\t\t\t// Add the latest event to the temporary variable.\n\t\t\t\t_temp['events'].push( event );\n\t\n\t\t\t\t// Send the temporary variable as string via ajax.\n\t\t\t\tLLMS.Ajax.call( {\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'persist_tracking_events',\n\t\t\t\t\t\t'llms-tracking': JSON.stringify(_temp)\n\t\t\t\t\t},\n\t\n\t\t\t\t\terror: function( xhr, status, error ) {\n\t\n\t\t\t\t\t\tconsole.log( xhr, status, error );\n\t\n\t\t\t\t\t},\n\t\t\t\t\tsuccess: function( r ) {\n\t\n\t\t\t\t\t\tif ( 'error' === r.code ) {\n\t\t\t\t\t\t\tconsole.log(r.code, r.message);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t} );\n\t\n\t\t\t}\n\t\n\t\t}\n\t\n\t\t/**\n\t\t * Retrieve initialization settings.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @return obj\n\t\t */\n\t\tthis.getSettings = function() {\n\t\t\treturn settings;\n\t\t}\n\t\n\t\t/**\n\t\t * Create an event object suitable to save as an event.\n\t\t *\n\t\t * @since 3.36.0\n\t\t * @since 3.37.9 Use `$.extend()` in favor of `Object.assign()`.\n\t\t *\n\t\t * @param obj event {\n\t\t * Event hash\n\t\t *\n\t\t * @param {string} event (Required) Event ID, eg: \"page.load\".\n\t\t * @param {url} url Event URL. (Optional, added automatically) Stored as metadata and used to infer an object_id for post events.\n\t\t * @param {time} float (Optional, added automatically) Timestamp (in milliseconds). Used for the event creation date.\n\t\t * @param {int} obj_id (Optional). The object ID. Inferred automatically via `url` if not provided.\n\t\t * @param {obj} meta (Optional) Hash of metadata to store with the event.\n\t\t * }\n\t\t * @return obj\n\t\t */\n\t\tthis.makeEventObj = function( event ) {\n\t\t\treturn $.extend( event, {\n\t\t\t\turl: window.location.href,\n\t\t\t\ttime: Math.round( new Date().getTime() / 1000 ),\n\t\t\t} );\n\t\t}\n\t\n\t\n\t\t/**\n\t\t * Remove the visibility change event listener on window.beforeunload\n\t\t *\n\t\t * Prevents actual unloading from recording a blur event from the visibility change listener\n\t\t *\n\t\t * @param obj e JS event object.\n\t\t * @return void\n\t\t */\n\t\tfunction onBeforeUnload( e ) {\n\t\t\tdocument.removeEventListener( 'visibilitychange', onVisibilityChange );\n\t\t}\n\t\n\t\t/**\n\t\t * Record a `page.exit` event on window.unload.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @param obj e JS event object.\n\t\t * @return void\n\t\t */\n\t\tfunction onUnload( e ) {\n\t\t\tself.addEvent( 'page.exit' );\n\t\t}\n\t\n\t\t/**\n\t\t * Record `page.blur` and `page.focus` events via document.visilibitychange events.\n\t\t *\n\t\t * @since 3.36.0\n\t\t *\n\t\t * @param obj e JS event object.\n\t\t * @return void\n\t\t */\n\t\tfunction onVisibilityChange( e ) {\n\t\n\t\t\tvar event = document.hidden ? 'page.blur' : 'page.focus';\n\t\t\tself.addEvent( event );\n\t\n\t\t}\n\t\n\t\t// Initialize on the frontend only.\n\t\tif ( ! $( 'body' ).hasClass( 'wp-admin' ) ) {\n\t\t\tinit();\n\t\t}\n\t\n\t};\n\t\n\tllms.tracking = new LLMS.Tracking( llms.tracking );\n\t\n\t\t/**\n\t * Handle Password Visibility Toggle for LifterLMS Forms\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since TBD\n\t */\n\t\n\tLLMS.PasswordVisibility = {\n\t\n\t\t/**\n\t\t * Initialize references and setup event binding\n\t\t *\n\t\t * @since TBD\n\t\t * @return void\n\t\t */\n\t\tinit: function() {\n\t\t\tthis.$toggleButtons = $( '.llms-visibility-toggle button' );\n\t\n\t\t\tif ( this.$toggleButtons.length ) {\n\t\t\t\tthis.$toggleButtons.removeClass( 'hide-if-no-js' );\n\t\t\t\tthis.bind();\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Bind DOM events for toggle buttons\n\t\t *\n\t\t * @since TBD\n\t\t * @return void\n\t\t */\n\t\tbind: function() {\n\t\t\tvar self = this;\n\t\n\t\t\t// Remove any previous click events and bind the new click event\n\t\t\tthis.$toggleButtons.off('click').on('click', function(event) {\n\t\t\t\tself.toggleVisibility( $(this) );\n\t\t\t});\n\t\t},\n\t\n\t\t/**\n\t\t * Toggle visibility of password fields\n\t\t *\n\t\t * @since TBD\n\t\t * @param {Object} $button The jQuery object of the clicked button\n\t\t * @return void\n\t\t */\n\t\ttoggleVisibility: function( $button ) {\n\t\t\tvar isVisible = parseInt( $button.attr('data-toggle'), 10 );\n\t\t\tvar $form = $button.closest( '.llms-form-fields' );\n\t\t\tvar $passwordFields = $form.find( 'input.llms-field-input' );\n\t\t\tvar $icon = $button.find( 'i' );\n\t\t\tvar $stateText = $button.find( '.llms-visibility-toggle-state' );\n\t\n\t\t\t// Toggle the visibility state\n\t\t\tif ( isVisible === 1 ) {\n\t\t\t\t// Show password\n\t\t\t\t$passwordFields.filter('[type=\"password\"]').attr('type', 'text');\n\t\t\t\t$button.attr('data-toggle', 0);\n\t\t\t\t$icon.removeClass('fa-eye').addClass('fa-eye-slash');\n\t\t\t\t$stateText.text(LLMS.l10n.translate('Hide Password'));\n\t\t\t} else {\n\t\t\t\t// Hide password\n\t\t\t\t$passwordFields.filter('[type=\"text\"]').attr('type', 'password');\n\t\t\t\t$button.attr('data-toggle', 1);\n\t\t\t\t$icon.removeClass('fa-eye-slash').addClass('fa-eye');\n\t\t\t\t$stateText.text(LLMS.l10n.translate('Show Password'));\n\t\t\t}\n\t\t}\n\t\n\t};\n\t\n\t// Initialize the Password Visibility module on document ready\n\tjQuery(document).ready(function($) {\n\t\tLLMS.PasswordVisibility.init();\n\t});\n\t\n\t\t/**\n\t * Rest Methods\n\t * Manages URL and Rest object parsing\n\t *\n\t * @package LifterLMS/Scripts\n\t *\n\t * @since Unknown\n\t * @version Unknown\n\t */\n\t\n\tLLMS.Rest = {\n\t\n\t\t/**\n\t\t * Init\n\t\t * loads class methods\n\t\t */\n\t\tinit: function() {\n\t\t\tthis.bind();\n\t\t},\n\t\n\t\t/**\n\t\t * Bind Method\n\t\t * Handles dom binding on load\n\t\t *\n\t\t * @return {[type]} [description]\n\t\t */\n\t\tbind: function() {\n\t\t},\n\t\n\t\t/**\n\t\t * Searches for string matches in url path\n\t\t *\n\t\t * @param {Array} strings [Array of strings to search for matches]\n\t\t * @return {Boolean} [Was a match found?]\n\t\t */\n\t\tis_path: function( strings ) {\n\t\n\t\t\tvar path_exists = false,\n\t\t\t\turl = window.location.href;\n\t\n\t\t\tfor ( var i = 0; i < strings.length; i++ ) {\n\t\n\t\t\t\tif ( url.search( strings[i] ) > 0 && ! path_exists ) {\n\t\n\t\t\t\t\tpath_exists = true;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn path_exists;\n\t\t},\n\t\n\t\t/**\n\t\t * Retrieves query variables\n\t\t *\n\t\t * @return {[Array]} [array object of query variable key=>value pairs]\n\t\t */\n\t\tget_query_vars: function() {\n\t\n\t\t\tvar vars = [], hash,\n\t\t\t\thashes = window.location.href.slice( window.location.href.indexOf( '?' ) + 1 ).split( '&' );\n\t\n\t\t\tfor (var i = 0; i < hashes.length; i++) {\n\t\t\t\thash = hashes[i].split( '=' );\n\t\t\t\tvars.push( hash[0] );\n\t\t\t\tvars[hash[0]] = hash[1];\n\t\t\t}\n\t\n\t\t\treturn vars;\n\t\t}\n\t\n\t};\n\t\n\n\t(()=>{\"use strict\";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})}},n={};t.r(n),t.d(n,{get:()=>d,start:()=>p,stop:()=>c});const e=\"llms-spinning\",r=\"default\",o=window.wp.i18n;function i(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;const i=document.createElement(\"div\"),l=(0,o.__)(\"Loading…\",\"lifterlms\");return i.innerHTML=`${l}`,i.classList.add(e),t.appendChild(i),i}function l(t){if((t=\"string\"==typeof t?document.querySelectorAll(t):t)instanceof NodeList)return Array.from(t);const n=[];return t instanceof Element?n.push(t):\"undefined\"!=typeof jQuery&&t instanceof jQuery&&t.toArray().forEach((t=>n.push(t))),n}function s(t){const n=t.querySelectorAll(\".llms-spinning\");return n.length?Array.from(n).find((n=>t===n.parentNode)):null}function a(){const t=\"llms-spinner-styles\";if(!document.getElementById(t)){const n=document.createElement(\"style\");n.textContent=\"\\n\\t.llms-spinning {\\n\\t\\tbackground: rgba( 250, 250, 250, 0.7 );\\n\\t\\tbottom: 0;\\n\\t\\tdisplay: none;\\n\\t\\tleft: 0;\\n\\t\\tposition: absolute;\\n\\t\\tright: 0;\\n\\t\\ttop: 0;\\n\\t\\tz-index: 2;\\n\\t}\\n\\n\\t.llms-spinner {\\n\\t\\tanimation: llms-spinning 1.5s linear infinite;\\n\\t\\tbox-sizing: border-box;\\n\\t\\tborder: 4px solid #313131;\\n\\t\\tborder-radius: 50%;\\n\\t\\theight: 40px;\\n\\t\\tleft: 50%;\\n\\t\\tmargin-left: -20px;\\n\\t\\tmargin-top: -20px;\\n\\t\\tposition: absolute;\\n\\t\\ttop: 50%;\\n\\t\\twidth: 40px;\\n\\n\\t}\\n\\n\\t.llms-spinner.small {\\n\\t\\tborder-width: 2px;\\n\\t\\theight: 20px;\\n\\t\\tmargin-left: -10px;\\n\\t\\tmargin-top: -10px;\\n\\t\\twidth: 20px;\\n\\t}\\n\\n\\t@keyframes llms-spinning {\\n\\t\\t0% {\\n\\t\\t\\ttransform: rotate( 0deg )\\n\\t\\t}\\n\\t\\t50% {\\n\\t\\t\\tborder-radius: 5%;\\n\\t\\t}\\n\\t\\t100% {\\n\\t\\t\\ttransform: rotate( 220deg) \\n\\t\\t}\\n\\t}\\n\".replace(/\\n/g,\"\").replace(/\\t/g,\" \").replace(/\\s\\s+/g,\" \"),n.id=t,document.head.appendChild(n)}}function d(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a();const o=l(t);if(!o.length)return null;const d=o[0],p=s(d)||i(d,n);return e&&\"undefined\"!=typeof jQuery?jQuery(p):p}function p(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;l(t).forEach((t=>{const e=d(t,n,!1);e&&(e.style.display=\"block\")}))}function c(t){l(t).forEach((t=>{const n=d(t,r,!1);n&&(n.style.display=\"none\")}))}window.LLMS=window.LLMS||{},window.LLMS.Spinner=n})();\n\n\t/**\n\t * Initializes all classes within the LLMS Namespace\n\t *\n\t * @since Unknown\n\t *\n\t * @return {void}\n\t */\n\tLLMS.init = function() {\n\n\t\tfor (var func in LLMS) {\n\n\t\t\tif ( typeof LLMS[func] === 'object' && LLMS[func] !== null ) {\n\n\t\t\t\tif ( LLMS[func].init !== undefined ) {\n\n\t\t\t\t\tif ( typeof LLMS[func].init === 'function') {\n\t\t\t\t\t\tLLMS[func].init();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Determine if the current device is touch-enabled\n\t *\n\t * @since 3.24.3\n\t *\n\t * @see {@link https://stackoverflow.com/a/4819886/400568}\n\t *\n\t * @return {Boolean} Whether or not the device is touch-enabled.\n\t */\n\tLLMS.is_touch_device = function() {\n\n\t\tvar prefixes = ' -webkit- -moz- -o- -ms- '.split( ' ' );\n\t\tvar mq = function( query ) {\n\t\t\treturn window.matchMedia( query ).matches;\n\t\t}\n\n\t\tif ( ( 'ontouchstart' in window ) || window.DocumentTouch && document instanceof DocumentTouch ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * Include the 'heartz' as a way to have a non matching MQ to help terminate the join.\n\t\t *\n\t\t * @see {@link https://git.io/vznFH}\n\t\t */\n\t\tvar query = ['(', prefixes.join( 'touch-enabled),(' ), 'heartz', ')'].join( '' );\n\t\treturn mq( query );\n\n\t};\n\n\t/**\n\t * Wait for matchHeight to load\n\t *\n\t * @since 3.0.0\n\t * @since 3.16.6 Unknown.\n\t * @since 5.3.3 Pass a dependency name to `wait_for()`.\n\t *\n\t * @param {Function} cb Callback function to run when matchheight is ready.\n\t * @return {void}\n\t */\n\tLLMS.wait_for_matchHeight = function( cb ) {\n\t\tthis.wait_for( function() {\n\t\t\treturn ( undefined !== $.fn.matchHeight );\n\t\t}, cb, 'matchHeight' );\n\t}\n\n\t/**\n\t * Wait for webuiPopover to load\n\t *\n\t * @since 3.9.1\n\t * @since 3.16.6 Unknown.\n\t *\n\t * @param {Function} cb Callback function to run when matchheight is ready.\n\t * @return {void}\n\t */\n\tLLMS.wait_for_popover = function( cb ) {\n\t\tthis.wait_for( function() {\n\t\t\treturn ( undefined !== $.fn.webuiPopover );\n\t\t}, cb, 'webuiPopover' );\n\t}\n\n\t/**\n\t * Wait for a dependency to load and then run a callback once it has\n\t *\n\t * Temporary fix for a less-than-optimal assets loading function on the PHP side of things.\n\t *\n\t * @since 3.9.1\n\t * @since 5.3.3 Added optional `name` parameter.\n\t *\n\t * @param {Function} test A function that returns a truthy if the dependency is loaded.\n\t * @param {Function} cb A callback function executed once the dependency is loaded.\n\t * @param {string} name The dependency name.\n\t * @return {void}\n\t */\n\tLLMS.wait_for = function( test, cb, name ) {\n\n\t\tvar counter = 0,\n\t\t\tinterval;\n\n\t\tname = name ? name : 'unnamed';\n\n\t\tinterval = setInterval( function() {\n\n\t\t\t// If we get to 30 seconds log an error message.\n\t\t\tif ( counter >= 300 ) {\n\n\t\t\t\tconsole.log( 'Unable to load dependency: ' + name );\n\n\t\t\t\t// If we can't access yet, increment and wait...\n\t\t\t} else {\n\n\t\t\t\t// Bind the events, we're good!\n\t\t\t\tif ( test() ) {\n\t\t\t\t\tcb();\n\t\t\t\t} else {\n\t\t\t\t\t// console.log( 'Waiting for dependency: ' + name );\n\t\t\t\t\tcounter++;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tclearInterval( interval );\n\n\t\t}, 100 );\n\n\t};\n\n\tLLMS.init( $ );\n\n} )( jQuery );\n"],"sourceRoot":"../../js/private"}