{ "version": 3, "sources": ["../../../../Views/Account/ResetPassword.ts"], "sourcesContent": ["\uFEFFimport { StatusCodes } from \"http-status-codes\";\r\nimport { get, initForm } from \"@/Utils\";\r\n\r\nfunction initResetPasswordForm() {\r\n const callback = (resp: Response) => resp.text().then(text => {\r\n get(\"reset-password\").innerHTML = text;\r\n initView();\r\n })\r\n initForm(\"reset-password-form\", callback);\r\n}\r\n\r\nfunction initChangePasswordForm() {\r\n const callback = (response: Response) => {\r\n if (response.status === StatusCodes.IM_A_TEAPOT) {\r\n return response.text().then(text => {\r\n if (text) {\r\n window.location.href = text;\r\n }\r\n });\r\n }\r\n else {\r\n return response.text().then(text => {\r\n get(\"change-password\").innerHTML = text;\r\n initView();\r\n });\r\n }\r\n }\r\n initForm(\"change-password-form\", callback);\r\n}\r\n\r\nfunction initView() {\r\n initResetPasswordForm();\r\n initChangePasswordForm();\r\n}\r\n\r\nwindow.addEventListener(\"load\", () => {\r\n initView();\r\n});"], "mappings": "4HAGA,SAASA,GAAwB,CAK/BC,EAAS,sBAJSC,GAAmBA,EAAK,KAAK,EAAE,KAAKC,GAAQ,CAC1DC,EAAI,gBAAgB,EAAE,UAAYD,EAClCE,EAAS,CACb,CAAC,CACuC,CAC1C,CAEA,SAASC,GAAyB,CAgBhCL,EAAS,uBAfSM,GACVA,EAAS,SAAWC,EAAY,YACzBD,EAAS,KAAK,EAAE,KAAKJ,GAAQ,CAC5BA,IACA,OAAO,SAAS,KAAOA,EAE/B,CAAC,EAGMI,EAAS,KAAK,EAAE,KAAKJ,GAAQ,CAChCC,EAAI,iBAAiB,EAAE,UAAYD,EACnCE,EAAS,CACb,CAAC,CAGgC,CAC3C,CAEA,SAASA,GAAW,CAClBL,EAAsB,EACtBM,EAAuB,CACzB,CAEA,OAAO,iBAAiB,OAAQ,IAAM,CACpCD,EAAS,CACX,CAAC", "names": ["initResetPasswordForm", "initForm", "resp", "text", "get", "initView", "initChangePasswordForm", "response", "StatusCodes"] }