FitTrackee/fittrackee/dist/static/js/main.8ecc731b.js

2 lines
63 KiB
JavaScript
Raw Normal View History

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["main"],{"00b4":function(e,t,c){"use strict";c("ac1f");var n=c("23e7"),r=c("da84"),a=c("c65b"),o=c("e330"),l=c("1626"),u=c("861d"),s=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),i=r.Error,d=o(/./.test);n({target:"RegExp",proto:!0,forced:!s},{test:function(e){var t=this.exec;if(!l(t))return d(this,e);var c=a(t,this,e);if(null!==c&&!u(c))throw new i("RegExp exec method returned something other than an Object or null");return!!c}})},"0126":function(e,t,c){},"0395":function(e,t,c){"use strict";var n=c("1da1"),r=(c("caad"),c("96cf"),c("7a23")),a=c("6c02"),o=c("dad5"),l=c("2906"),u={id:"user-auth-form"},s={id:"user-form"},i={class:"form-items"},d=["disabled","placeholder"],b=["disabled","placeholder"],O=["disabled","placeholder"],j=["disabled","placeholder"],f=["disabled"],p={key:1},m=Object(r["createTextVNode"])(" - "),k={key:2},v={class:"account"},y=Object(r["defineComponent"])({props:{action:null,token:{default:""}},setup:function(e){var t=e,c=Object(a["c"])(),y=Object(l["a"])(),h=Object(r["toRefs"])(t),E=h.action,w=Object(r["reactive"])({username:"",email:"",password:"",password_conf:""}),N=Object(r["computed"])((function(){return V(t.action)})),g=Object(r["computed"])((function(){return y.getters[o["b"].GETTERS.ERROR_MESSAGES]})),S=Object(r["computed"])((function(){return y.getters[o["b"].GETTERS.APP_CONFIG]})),B=Object(r["computed"])((function(){return"register"===t.action&&!S.value.is_registration_enabled})),_=Object(r["ref"])(!1);function V(e){switch(e){case"reset-request":case"reset":return"buttons.SUBMIT";default:return"buttons.".concat(t.action.toUpperCase())}}function C(){_.value=!0}function D(e){switch(e){case"reset":return t.token?y.dispatch(o["a"].ACTIONS.RESET_USER_PASSWORD,{password:w.password,password_conf:w.password_conf,token:t.token}):y.commit(o["b"].MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return y.dispatch(o["a"].ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:w.email});default:y.dispatch(o["a"].ACTIONS.LOGIN_OR_REGISTER,{actionType:e,formData:w,redirectUrl:c.query.from})}}function T(){w.username="",w.email="",w.password="",w.password_conf=""}return Object(r["watch"])((function(){return c.path}),Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:y.commit(o["b"].MUTATIONS.EMPTY_ERROR_MESSAGES),_.value=!1,T();case 3:case"end":return e.stop()}}),e)})))),function(e,t){var c=Object(r["resolveComponent"])("AlertMessage"),n=Object(r["resolveComponent"])("router-link"),a=Object(r["resolveComponent"])("ErrorMessage");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",u,[Object(r["createElementVNode"])("div",s,[Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["form-box",{disabled:Object(r["unref"])(B)}])},[Object(r["unref"])(B)?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,message:"user.REGISTER_DISABLED"})):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("form",{class:Object(r["normalizeClass"])({errors:_.value}),onSubmit:t[4]||(t[4]=Object(r["withModifiers"])((function(e){return D(Object(r["unref"])(E))}),["prevent"]))},[Object(r["createElementVNode"])("div",i,["register"===Object(r["unref"])(E)?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("input",{key:0,id:"username",disabled:Object(r["unref"])(B),required:"",onInvalid:C,"onUpdate:modelValue":t[0]||(t[0]=function(e){return Object(r["unref"])(w).username=e}),placeholder:e.$t("user.USERNAME")},null,40,d)),[[r["vModelText"],Object(r["unref"])(w).username]]):Object(r["createCommentVNode"])("",!0),"reset"!==Object(r["unref"])(E)?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("input",{key:1,id:"email",disabled:Object(r["unref"])(B),required:"",onInvalid:C,type:"email","onUpdate:modelValue":t[1]||(t[1]=function(e){return Object(r["unref"])(w).email=e}),placeholder:"res
//# sourceMappingURL=main.8ecc731b.js.map