(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/admin_invite"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js": /*!****************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js ***! \****************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var n=s(/*! jquery */"./node_modules/jquery/dist/jquery.js");const i={props:["code"],data:function(){return{instance:{},inviteConfig:{},tabIndex:0,isProceeding:!1,errors:{username:void 0,email:void 0,password:void 0,password_confirm:void 0},form:{username:void 0,email:void 0,password:void 0,password_confirm:void 0,display_name:void 0}}},mounted:function(){this.fetchInstanceData()},methods:{fetchInstanceData:function(){var e=this;axios.get("/api/v1/instance").then((function(t){e.instance=t.data})).then((function(t){e.verifyToken()})).catch((function(e){console.log(e)}))},verifyToken:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/verify",{token:this.code}).then((function(t){e.tabIndex=1,e.inviteConfig=t.data})).catch((function(t){e.tabIndex="invalid-code"}))},checkUsernameAvailability:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/uc",{token:this.code,username:this.form.username}).then((function(t){t&&t.data?(e.isProceeding=!1,e.tabIndex=2):(e.tabIndex="invalid-code",e.isProceeding=!1)})).catch((function(t){t.response.data&&t.response.data.username?(e.errors.username=t.response.data.username[0],e.isProceeding=!1):(e.tabIndex="invalid-code",e.isProceeding=!1)}))},checkEmailAvailability:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/ec",{token:this.code,email:this.form.email}).then((function(t){t&&t.data?(e.isProceeding=!1,e.tabIndex=3):(e.tabIndex="invalid-code",e.isProceeding=!1)})).catch((function(t){t.response.data&&t.response.data.email?(e.errors.email=t.response.data.email[0],e.isProceeding=!1):(e.tabIndex="invalid-code",e.isProceeding=!1)}))},validateEmail:function(){return!(!this.form.email||!this.form.email.length)&&/^[a-zA-Z]+[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+[a-zA-Z]$/i.test(this.form.email)},handleRegistration:function(){var e=n("