{"version":3,"sources":["../src/forgotpassword.js"],"names":["bodyClasses","document","body","classList","contains","window","localSide","developmentSide","siteSide","gtag","form","getElementById","versionNumber","getAttribute","version","documentElement","remove","dataLayer","push","arguments","FLPPR_loader","Date","console","warn","Ladda","bind","addEventListener","e","stopAll","focus","querySelector","disabled","$","validate","errorClass","event","rules","EmailAddress","required","email","messages","invalidHandler","validator","numberOfInvalids","groupCollapsed","undefined","Object","keys","errorMap","length","errorCount","i","errorList","element","groupEnd","FLPPR_loadingspinner","init","debug","FLPPR_modal","bootstrapVersion","alignment","pathPrefix","on","load","title","source","script","preventDefault","removeAttribute"],"mappings":"AAAC,aAED;AACA;AACA;AACA;AACA,E,k4BAIA,GAAMA,CAAAA,WAAW,CAAGC,QAAQ,CAACC,IAAT,CAAcC,SAAlC,CACA,GAAIH,WAAW,CAACI,QAAZ,CAAqB,OAArB,CAAJ,CAAmC,CAC/BC,MAAM,CAACC,SAAP,CAAmB,IAAnB,CACAD,MAAM,CAACE,eAAP,CAAyB,IAC5B,CAHD,IAGO,CACNF,MAAM,CAACC,SAAP,CAAmB,KAAnB,CACAD,MAAM,CAACE,eAAP,CAAyB,KACzB,CACDF,MAAM,CAACG,QAAP,CAAkBR,WAAW,CAACI,QAAZ,CAAqB,OAArB,EAAgC,OAAhC,CAA0C,UAA5D,CAEA,0CAAC,0CAoBWK,IApBX,gHAEMC,IAFN,CAEaT,QAAQ,CAACU,cAAT,CAAwB,mBAAxB,CAFb,CAMSC,aANT,CAMyBX,QAAQ,CAACC,IAAT,CAAcW,YAAd,CAA2B,cAA3B,CANzB,CAOGR,MAAM,CAACS,OAAP,CAAiBF,aAAjB,CAIHX,QAAQ,CAACc,eAAT,CAAyBZ,SAAzB,CAAmCa,MAAnC,CAA0C,OAA1C,EAXA,KAgBIX,MAAM,CAACC,SAAP,GAAqB,KAArB,EAA8BD,MAAM,CAACG,QAAP,GAAoB,UAhBtD,0CAoBWC,IApBX,iBAoBiB,CAACQ,SAAS,CAACC,IAAV,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AT,CAAuB,iBAAvB,EAA0CsC,eAA1C,CAA0D,UAA1D,EACAnE,QAAQ,CAAC6B,aAAT,CAAuB,YAAvB,EAAqCsC,eAArC,CAAqD,UAArD,EAnJA,oEAAD","sourcesContent":["\"use strict\";\r\n\r\n/* @preserve\r\n// ------------------------------------------\r\n// Forgot Password JS\r\n// ------------------------------------------\r\n*/\r\n\r\n// Global Variables\r\n// ------------------------------------------\r\nconst bodyClasses = document.body.classList;\r\nif (bodyClasses.contains(\"local\")) {\r\n window.localSide = true;\r\n window.developmentSide = true;\r\n} else {\r\n\twindow.localSide = false;\r\n\twindow.developmentSide = false;\r\n}\r\nwindow.siteSide = bodyClasses.contains(\"admin\") ? \"admin\" : \"frontend\";\r\n\r\n(async () => { \r\n\t// Cached Variables\r\n\tconst form = document.getElementById(\"frmForgotPassword\");\r\n\r\n // Get the version number.\r\n // ------------------------------------------\r\n const versionNumber = document.body.getAttribute(\"data-version\");\r\n window.version = versionNumber;\r\n\r\n\t// Remove the \"no-js\" class from the HTML document.\r\n\t// ------------------------------------------\r\n\tdocument.documentElement.classList.remove(\"no-js\");\r\n\r\n\t// Google Analytics\r\n\t// This is not loaded locally or on the \"Admin\" side.\r\n // ------------------------------------------\r\n\tif (window.localSide === false && window.siteSide === \"frontend\") {\r\n\t\ttry {\r\n\t\t\tawait FLPPR_loader(\"https://www.googletagmanager.com/gtag/js?id=G-LVVLE17TCD\",null,false,\"js\");\r\n\t\t\twindow.dataLayer = window.dataLayer || [];\r\n\t\t\tfunction gtag(){dataLayer.push(arguments);}\r\n\t\t\tgtag('js', new Date());\r\n\t\t\tgtag('config', 'G-LVVLE17TCD');\r\n\t\t} catch (error) {\r\n\t\t\tconsole.warn(\"Google Analytics has been blocked:\", error);\r\n\t\t}\r\n\t} else {\r\n\t\tconsole.warn(\"Google Analytics was not loaded.\");\r\n\t}\r\n\t\r\n\t// Ladda\r\n\t// Stop Ladda when leaving the page - used to make sure it's not still running when users hit the back button.\r\n\t// ------------------------------------------\r\n await FLPPR_loader(`/node_modules/ladda/dist/spin.min.js?version=${window.version}`);\r\n await FLPPR_loader(`/node_modules/ladda/dist/ladda.min.js?version=${window.version}`);\r\n\tLadda.bind(\"button.btn.ladda-button\");\r\n\twindow.addEventListener(\"pagehide\", e => { if (typeof Ladda === \"object\") { Ladda.stopAll(); } });\r\n\r\n\t// Initial focus\r\n\t// ------------------------------------------\r\n\tif (form !== null) {\r\n\t\tdocument.getElementById(\"EmailAddress\").focus();\r\n\t}\r\n\t\r\n\t// Reenable the submit button.\r\n\t// ------------------------------------------\r\n\tif (form !== null) {\r\n\t\tform.querySelector('button[type=\"submit\"]').disabled = false;\r\n\t}\r\n\r\n\t// Validation\r\n\t// ------------------------------------------\r\n\tif (form !== null) {\r\n\t\t$(form).validate({\r\n\t\t\terrorClass: \"invalid\",\r\n\t\t\tevent: \"submit\",\r\n\t\t\trules: {\r\n\t\t\t\tEmailAddress: {\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\temail: true\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tmessages: {\r\n\t\t\t\tEmailAddress: {\r\n\t\t\t\t\trequired: \"Please enter an email address.\",\r\n\t\t\t\t\temail: \"Please enter a valid email address.\"\r\n\t\t\t\t} \r\n\t\t\t},\r\n\t\t\tinvalidHandler: (form, validator) => {\r\n\t\t\t\tif (validator.numberOfInvalids()) {\r\n\t\t\t\t\tif (console.groupCollapsed !== undefined) {\r\n\t\t\t\t\t\tconsole.groupCollapsed(\"[Validation] Errors: [\", Object.keys(validator.errorMap).length, \"]\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.warn(\"[Validation] Errors: [\", Object.keys(validator.errorMap).length, \"]\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet errorCount = 1;\r\n\t\t\t\t\tfor (let i in validator.errorMap) { \r\n\t\t\t\t\t\tconsole.warn(\"#\" + errorCount + \" - \", i, \":\", validator.errorMap[i], \"Element: \", validator.errorList[0].element); \r\n\t\t\t\t\t\t++errorCount; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (console.groupCollapsed !== undefined) { console.groupEnd(); }\r\n\t\t\t\t\tLadda.stopAll();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t// Load the modal plugin and all associated files.\r\n\t// This is so we can display the privacy policy/terms of use buttons.\r\n\t// ------------------------------------------\r\n\tif (window.localSide === true) {\r\n\t\tawait FLPPR_loader(\"/SharedResources/js/src/FLPPR/js/FLPPR-utilities.js\");\r\n\t\tawait FLPPR_loader(\"/SharedResources/js/src/FLPPR/js/FLPPR-loadingspinner.js\");\r\n\t\tawait FLPPR_loader(\"/SharedResources/js/src/FLPPR/js/FLPPR-modal.js\");\r\n\t} else {\r\n await FLPPR_loader(`/SharedResources/js/dist/FLPPR/js/FLPPR-utilities.min.js?version=1.0?version=${window.version}`);\r\n await FLPPR_loader(`/SharedResources/js/dist/FLPPR/js/FLPPR-loadingspinner.min.js?version=${window.version}`);\r\n await FLPPR_loader(`/SharedResources/js/dist/FLPPR/js/FLPPR-modal.min.js?version=${window.version}`);\r\n\t}\r\n\t// Loading Spinner\r\n FLPPR_loadingspinner.init({ \r\n debug: window.localSide \r\n });\r\n\t// Modals\r\n\tawait FLPPR_modal.init({\r\n\t\tdebug: false,\r\n\t\tbootstrapVersion: 4,\r\n\t\talignment: \"center\",\r\n\t\tpathPrefix: \"\"\r\n\t});\r\n\r\n\t// Open the \"Privacy Policy\" modal.\r\n\t// ------------------------------------------\r\n\t$(document).on(\"click\",\".btn-privacypolicy\",e => {\r\n\t\tFLPPR_modal.load({\r\n\t\t\ttitle: \"Privacy Policy\",\r\n\t\t\tsource: \"login/modals/modal-privacypolicy\",\r\n\t\t\tscript: false\r\n\t\t});\r\n\t\te.preventDefault();\r\n\t});\r\n\r\n\t// Open the \"Terms of Use\" modal.\r\n\t// ------------------------------------------\r\n\t$(document).on(\"click\",\".btn-termsofuse\",e => {\r\n\t\tFLPPR_modal.load({\r\n\t\t\ttitle: \"Terms of Use\",\r\n\t\t\tsource: \"login/modals/modal-termsofuse\",\r\n\t\t\tscript: false\r\n\t\t});\r\n\t\te.preventDefault();\r\n\t});\r\n\r\n\t// Open the \"About\" modal.\r\n\t// ------------------------------------------\r\n\t$(document).on(\"click\",\".btn-about\",e => {\r\n\t\tFLPPR_modal.load({\r\n\t\t\ttitle: \"About\",\r\n\t\t\tsource: \"about/about\"\r\n\t\t});\r\n\t\te.preventDefault();\r\n\t});\r\n\r\n\t// Un-disable the buttons.\r\n\t// ------------------------------------------\r\n\tdocument.querySelector(\".btn-privacypolicy\").removeAttribute(\"disabled\");\r\n\tdocument.querySelector(\".btn-termsofuse\").removeAttribute(\"disabled\");\r\n\tdocument.querySelector(\".btn-about\").removeAttribute(\"disabled\");\r\n})();"],"file":"forgotpassword.min.js"}