(function(t){function e(e){for(var o,n,s=e[0],l=e[1],u=e[2],c=0,f=[];c=50)return this.statusName=!1,void(this.statusNameMessage=this.$root.translation("ID_INVALID_MAX_PERMITTED",[this.$root.translation("ID_ATTRIBUTE_NAME"),"50"]));if(!1===/^[a-zA-Z][-_0-9a-zA-Z\s]+$/.test(this.form.name))return this.statusName=!1,void(this.statusNameMessage=this.$root.translation("ID_USE_ALPHANUMERIC_CHARACTERS_INCLUDING",["- _"]));var e=new FormData;return e.append("id",this.form.id),e.append("name",this.form.name),I.a.post(this.$root.baseUrl()+"userExtendedAttributes/index?option=verifyName",e).then((function(e){!1===e.data.valid?(t.statusName=!1,t.statusNameMessage=e.data.message):t.statusName=!0})).catch((function(t){})).finally((function(){}))},validateAttributeId:function(){var t=this;if(this.statusAttributeId=!0,""===this.form.attributeId.trim())return this.statusAttributeId=!1,void(this.statusAttributeIdMessage=this.$root.translation("ID_IS_REQUIRED"));if(this.form.attributeId.length>=250)return this.statusAttributeId=!1,void(this.statusAttributeIdMessage=this.$root.translation("ID_INVALID_MAX_PERMITTED",[this.$root.translation("ID_ATTRIBUTE_ID"),"250"]));if(!1===/^[a-zA-Z][-_.0-9a-zA-Z]+$/.test(this.form.attributeId))return this.statusAttributeId=!1,void(this.statusAttributeIdMessage=this.$root.translation("ID_USE_ALPHANUMERIC_CHARACTERS_INCLUDING",[". - _"]));var e=new FormData;return e.append("id",this.form.id),e.append("attributeId",this.form.attributeId),I.a.post(this.$root.baseUrl()+"userExtendedAttributes/index?option=verifyAttributeId",e).then((function(e){!1===e.data.valid?(t.statusAttributeId=!1,t.statusAttributeIdMessage=e.data.message):t.statusAttributeId=!0})).catch((function(t){})).finally((function(){}))},saveForm:function(){var t=this;this.statusValidation=!1;var e=this.formToFormData(this.form);return I.a.post(this.$root.baseUrl()+"userExtendedAttributes/index?option=save",e).then((function(e){t.$emit("save"),t.statusValidation=!0})).catch((function(t){})).finally((function(){}))},getRoles:function(){return this.refreshRoles(),this.roles},refreshRoles:function(){var t=this,e=new FormData;e.append("request","allRoles"),I.a.post(this.$root.baseUrl()+"roles/roles_Ajax",e).then((function(e){var r=[{value:"0",text:t.$root.translation("ID_EMPTY_TYPE")}];for(var o in e.data)r.push({value:e.data[o].ROL_CODE,text:e.data[o].ROL_NAME});t.roles=r})).catch((function(t){})).finally((function(){}))},addRole:function(){var t=this;if("0"!==this.form.rol){var e=this.form.selectedRoles.find((function(e){return e===t.form.rol}));void 0===e&&this.form.selectedRoles.push(this.form.rol)}},getTextRol:function(t){var e=this.roles.find((function(e){return e.value===t}));return e.text},deleteRol:function(t,e){this.$bvModal.msgBoxConfirm(this.$root.translation("ID_THE_USER_ROLES_FOR_ATTRIBUTE_HAS_BEEN_DELETED_PLEASE_CONFIRM",[""]),{title:" ",hideHeaderClose:!1,okTitle:this.$root.translation("ID_CONFIRM"),okVariant:"success",cancelTitle:this.$root.translation("ID_CANCEL"),cancelVariant:"danger"}).then((function(t){!1!==t&&e()})).catch((function(t){}))},formToFormData:function(t){var e=new FormData;return e.append("UEA_ID",t.id),e.append("UEA_NAME",t.name.trim()),e.append("UEA_ATTRIBUTE_ID",t.attributeId),e.append("UEA_HIDDEN",t.hidden),e.append("UEA_REQUIRED",t.required),e.append("UEA_PASSWORD",t.password),e.append("UEA_OPTION",t.option),e.append("UEA_ROLES",JSON.stringify(t.selectedRoles)),e},rowToForm:function(t){var e={id:t.id,name:t.name,attributeId:t.attributeId,hidden:t.hidden,required:t.required,password:t.password,option:t.option,selectedRoles:JSON.parse(t.roles)};return e},load:function(t){this.form=this.rowToForm(t)}}},U=N,$=(r("c771"),Object(p["a"])(U,R,g,!1,null,"71984188",null)),x=$.exports,S={name:"app",components:{userExtendedAttributes:w,newUserAttribute:x},data:function(){return{views:{userExtendedAttributes:!0,newUserAttribute:!1}}},methods:{showView:function(t){for(var e in this.views)this.views[e]=!1;this.views[t]=!0},cancel:function(){this.showView("userExtendedAttributes")},newAttribute:function(){this.$refs.newUserAttribute.reset(),this.showView("newUserAttribute")},saveAttribute:function(){this.showView("userExtendedAttributes"),this.$refs.userExtendedAttributes.refresh()},editAttribute:function(t){this.$refs.newUserAttribute.reset(),this.$refs.newUserAttribute.load(t),this.showView("newUserAttribute")}}},O=S,C=(r("034f"),Object(p["a"])(O,s,l,!1,null,null,null)),y=C.exports;o["default"].config.productionTip=!1,o["default"].use(a["a"]),o["default"].use(i["a"]),o["default"].use(n["ClientTable"],{},!1,"bootstrap4",{}),o["default"].use(n["ServerTable"],{},!1,"bootstrap4",{}),new o["default"]({render:function(t){return t(y)},methods:{translation:function(t,e){if("TRANSLATIONS"in window&&t in window.TRANSLATIONS&&(t=window.TRANSLATIONS[t],void 0!=e&&"length"in e))for(var r=0;r