{"version":3,"sources":["js/Credentials.js"],"names":["Credentials","this","id","password","birthdate","setData","getData","injectIntoObject","obj","data","key","pullFromLoginForm","$form","find","val","pwd","$pwd","attr"],"mappings":"AAAA,SAASA,cAILC,KAAKC,GAAK,GACVD,KAAKE,SAAW,GAChBF,KAAKG,UAAY,GAKjBH,KAAKI,QAAU,SAASH,EAAIC,EAAUC,GAClCH,KAAKC,GAAKA,EACVD,KAAKE,SAAWA,EAChBF,KAAKG,UAAYA,GAErBH,KAAKK,QAAU,WACX,MAAO,CACHJ,GAAID,KAAKC,GACTC,SAAUF,KAAKE,SACfC,UAAWH,KAAKG,YASxBH,KAAKM,iBAAmB,SAASC,GAC7B,IAAIC,EAAOR,KAAKK,UAChB,IAAK,IAAII,KAAOD,EAAMD,EAAIE,GAAOD,EAAKC,IAI1CT,KAAKU,kBAAoB,SAASC,GAE9B,IAAIV,EAAKU,EAAMC,KAAK,eAAeC,MAE/BV,EAAY,GACZW,EAAM,GACNC,EAAOJ,EAAMC,KAAK,eACG,QAArBG,EAAKC,KAAK,QAAmBb,EAAYY,EAAKF,MAC7CC,EAAMC,EAAKF,MAChBb,KAAKI,QAAQH,EAAIa,EAAKX","file":"Credentials.js","sourcesContent":["function Credentials() {\r\n //\r\n // Properties\r\n //\r\n this.id = '';\r\n this.password = '';\r\n this.birthdate = '';\r\n\r\n //\r\n // Getters/Setters\r\n //\r\n this.setData = function(id, password, birthdate) {\r\n this.id = id;\r\n this.password = password;\r\n this.birthdate = birthdate;\r\n };\r\n this.getData = function() {\r\n return {\r\n id: this.id,\r\n password: this.password,\r\n birthdate: this.birthdate\r\n };\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n // Receives an object and injects the credentials into it.\r\n this.injectIntoObject = function(obj) {\r\n var data = this.getData();\r\n for (var key in data) obj[key] = data[key];\r\n };\r\n\r\n // Receives a form and grabs the credentials from it, regardless of which login form it is.\r\n this.pullFromLoginForm = function($form) {\r\n // ID is always first input\r\n var id = $form.find('input:first').val();\r\n // Pull second input, and assign correspondingly based on whether it's the password field or not\r\n var birthdate = '';\r\n var pwd = '';\r\n var $pwd = $form.find('input:eq(1)');\r\n if ($pwd.attr('type') == 'text') birthdate = $pwd.val();\r\n else pwd = $pwd.val();\r\n this.setData(id, pwd, birthdate);\r\n };\r\n}\r\n"]}