jQuery,Craft.TotpForm=Garnish.Base.extend({init:function(t,a,n){var e=t.querySelector("input.auth-totp-code"),o=t.querySelector("button.submit");this.addListener(t,"submit",(function(t){t.preventDefault(),o.classList.contains("loading")||(o.classList.add("loading"),Craft.cp.announce(Craft.t("app","Loading")),Craft.sendActionRequest("POST","auth/verify-totp",{data:{code:e.value}}).then((function(){a()})).catch((function(t){var a;n(null==t||null===(a=t.response)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.message)})).finally((function(){o.classList.remove("loading")})))}))}},{METHOD:"craft\\auth\\methods\\TOTP"}),Craft.registerAuthFormHandler(Craft.TotpForm.METHOD,Craft.TotpForm);
//# sourceMappingURL=totp.js.map