(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77565238"],{"095c":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"d-flex justify-content-between align-items-center pt-50 mb-2"},[n("h2",{staticClass:"font-weight-bolder m-0"},[n("span",{on:{click:function(t){return e.$router.go(-1)}}},[n("b-button",{staticClass:"btn-icon rounded-circle mr-50 text-primary bg-white",attrs:{variant:"white"}},[n("feather-icon",{attrs:{icon:"ChevronLeftIcon"}})],1)],1),e._v(" Editar usuario ")])]),n("b-card",[n("validation-observer",{ref:"editUser"},[n("b-form",{staticClass:"mt-2",on:{submit:function(t){return t.preventDefault(),e.handleSubmit.apply(null,arguments)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit.apply(null,arguments)}}},[n("h4",{staticClass:"mb-2 mt-1"},[e._v(" Imagen de perfil ")]),n("b-row",[n("b-col",{staticClass:"mb-2 auth-create-form d-flex justify-content-center",attrs:{cols:"12"}},[e.userPrepare?n("ImageDropzone",{ref:"images",attrs:{files:e.files}}):e._e()],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[e._v(" Datos de acceso ")]),n("b-row",[n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Usuario",rules:{required:e.required,usernameUnique:e.id}},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.errors;return[n("b-form-group",{attrs:{label:"Usuario","label-for":"account-e-username"}},[n("b-form-input",{attrs:{name:"username",placeholder:"Usuario"},model:{value:e.user.username,callback:function(t){e.$set(e.user,"username",t)},expression:"user.username"}}),n("small",{staticClass:"form-text text-muted"},[e._v(" Este campo servirá para iniciar sesión. Debe ser único por usuario ")])],1),n("small",{staticClass:"text-danger"},[e._v(e._s(i[0]))])]}}])})],1),n("b-col",{staticClass:"d-flex align-items-center",attrs:{sm:"6"}},[n("b-form-checkbox",{staticClass:"d-inline-block mb-2 mt-1",attrs:{value:1,switch:"",inline:""},model:{value:e.user.active,callback:function(t){e.$set(e.user,"active",t)},expression:"user.active"}},[e._v(" Estado usuario "),1==e.user.active?n("span",[e._v(" (Activado) ")]):n("span",[e._v(" (Desactivado) ")])])],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",[n("b-form-checkbox",{attrs:{value:"true",plain:""},model:{value:e.changePassword,callback:function(t){e.changePassword=t},expression:"changePassword"}},[n("strong",[e._v("¿Desea cambiar la contraseña?")])])],1),e.changePassword?n("b-form-group",{attrs:{"label-for":"account-password"}},[n("b-form-input",{attrs:{name:"password",placeholder:e.Contraseña},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1):e._e()],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[e._v(" Información personal ")]),n("b-row",[n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Nombre","label-for":"account-name"}},[n("b-form-input",{attrs:{name:"name",placeholder:"Nombre"},model:{value:e.user.name,callback:function(t){e.$set(e.user,"name",t)},expression:"user.name"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Apellidos","label-for":"account-username"}},[n("b-form-input",{attrs:{placeholder:"Apellidos",name:"surname"},model:{value:e.user.surname,callback:function(t){e.$set(e.user,"surname",t)},expression:"user.surname"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"DNI","label-for":"account-dni"}},[n("b-form-input",{attrs:{name:"dni",placeholder:"DNI"},model:{value:e.user.dni,callback:function(t){e.$set(e.user,"dni",t)},expression:"user.dni"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Puesto de trabajo","label-for":"account-job"}},[n("b-form-input",{attrs:{name:"job",placeholder:"Puesto de trabajo"},model:{value:e.user.job,callback:function(t){e.$set(e.user,"job",t)},expression:"user.job"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Rol",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.errors;return[n("b-form-group",{attrs:{label:"Rol","label-for":"account-rols"}},[n("v-select",{attrs:{label:"display_name",filterable:!1,searchable:!1,options:e.selectRoles,placeholder:"Selecciona un rol"},model:{value:e.role,callback:function(t){e.role=t},expression:"role"}}),n("small",{staticClass:"text-danger"},[e._v(e._s(i[0]))])],1)]}}])})],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[e._v(" Departamentos ")]),n("b-row",[n("b-col",{attrs:{sm:"12"}},[n("b-form-group",{attrs:{label:"Selecciona el departamento que pertenece el usuario","label-for":"account-departments"}},[n("b-row",e._l(e.filteredDepartments,(function(t){return n("b-col",{key:t.id,attrs:{sm:"3"}},[n("b-form-checkbox",{attrs:{value:t.id},model:{value:e.departments,callback:function(t){e.departments=t},expression:"departments"}},[e._v(" "+e._s(t.name)+" ")])],1)})),1)],1)],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[e._v(" Notificaciones ")]),n("b-row",[n("b-col",{attrs:{sm:"12"}},[e.role&&"super_admin"===e.role.name?n("b-form-checkbox",{staticClass:"d-inline-block mb-2 mt-1",attrs:{value:!0},model:{value:e.user.notifications,callback:function(t){e.$set(e.user,"notifications",t)},expression:"user.notifications"}},[e._v(" Recibir notificaciones del sistema ")]):e._e()],1),n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Email",rules:{email:e.email,emailUnique:e.id}},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.errors;return[n("b-form-group",{attrs:{label:"Email","label-for":"account-e-mail"}},[n("b-form-input",{attrs:{name:"email",placeholder:"Email"},model:{value:e.user.email,callback:function(t){e.$set(e.user,"email",t)},expression:"user.email"}}),n("small",{staticClass:"form-text text-muted"},[e._v(" Introduce un correo para recibir notificaciones por email. ")])],1),n("small",{staticClass:"text-danger"},[e._v(e._s(i[0]))])]}}])})],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Telefono","label-for":"account-phone"}},[n("b-form-input",{attrs:{name:"phone",placeholder:"+34666666666"},model:{value:e.user.phone,callback:function(t){e.$set(e.user,"phone",t)},expression:"user.phone"}}),n("small",{staticClass:"form-text text-muted"},[e._v(" Introduce un teléfono para recibir notificaciones por SMS. Recuerda añadir el prefijo. ")])],1)],1)],1),n("div",{staticClass:"text-right"},[n("b-button",{staticClass:"mt-2 mr-1",attrs:{type:"submit",variant:"primary"}},[e._v(" "+e._s("Guardar")+" ")])],1)],1)],1)],1)],1)},o=[],s=n("1da1"),r=n("5530"),a=(n("96cf"),n("4de4"),n("d3b7"),n("159b"),n("b0c0"),n("2f62")),c=n("1947"),l=n("11de"),u=n("8226"),p=n("4797"),d=n("a15b"),h=n("b28b"),f=n("205f"),b=n("c3e6"),m=n("7bb1"),v=n("8f03"),g=n("e009"),y=n("7189"),O=n("4a7a"),_=n.n(O),w={components:{BButton:c["a"],BForm:l["a"],BFormGroup:u["a"],BFormInput:p["a"],BRow:d["a"],BCol:h["a"],BCard:f["a"],ImageDropzone:y["a"],ValidationProvider:m["b"],ValidationObserver:m["a"],vSelect:_.a,BFormCheckbox:b["a"]},directives:{Ripple:g["a"]},data:function(){return{id:this.$route.params.id,role:{},companies:"",departments:[],files:[],profileFile:null,required:v["b"],email:v["a"],userPrepare:!1,changePassword:!1,password:""}},computed:Object(r["a"])(Object(r["a"])({},Object(a["c"])({selectRoles:"users/getRoles",user:"users/getUser",selectCompanies:"companies/getListCompanies",departmentsSelect:"departments/getSelectDepartments",currentClient:"clients/getCurrentClient"})),{},{filteredDepartments:function(){return this.departmentsSelect.filter((function(e){return e.active}))}}),methods:Object(r["a"])(Object(r["a"])(Object(r["a"])({},Object(a["b"])({edit:"users/edit",getUser:"users/getUser",selectDepartments:"departments/selectDepartments",getRoles:"users/getRoles"})),Object(a["d"])({setSelectDepartments:"departments/setSelectDepartments"})),{},{setData:function(){if(void 0!==this.user.avatar&&null!==this.user.avatar&&this.user.avatar){var e={name:"Avatar",url:this.user.avatar,urlDelete:"/users/delete_image/".concat(this.user.id)};this.files=[e]}this.user.roles&&(this.role=this.user.roles[0]),this.userPrepare=!0},setClients:function(){this.user.clients&&(this.clients=this.user.clients)},setDepartments:function(){var e=this;this.user.departments[0]&&this.user.departments.forEach((function(t){e.departments.push(t.id)}))},handleSubmit:function(){var e=this;this.$refs.editUser.validate().then((function(t){if(t){var n=e.user.id,i=e.createFormData();i&&e.edit({id:n,user:i})}}))},createFormData:function(){var e=this.$refs.images.getFormData();return this.departments.length>0?this.departments.forEach((function(t){t&&null!==t&&e.append("departments[]",t)})):e.append("departments",""),this.role&&(e.append("role",this.role.name),"super_admin"!==this.role.name?e.append("notifications",!1):e.append("notifications",this.user.notifications)),e.append("name",this.user.name),e.append("surname",this.user.surname),e.append("job",this.user.job),e.append("email",this.user.email),e.append("phone",this.user.phone),e.append("dni",this.user.dni),e.append("active",this.user.active),e.append("username",this.user.username),e.append("client_id",this.currentClient.id),"true"===this.changePassword&&e.append("password",this.password),e}}),created:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getUser(e.$route.params.id);case 2:return t.next=4,e.setData();case 4:return t.next=6,e.selectDepartments({client_id:e.currentClient.id});case 6:return t.next=8,e.setDepartments();case 8:return t.next=10,e.getRoles();case 10:case"end":return t.stop()}}),t)})))()}},C=w,S=(n("af7c"),n("2877")),j=Object(S["a"])(C,i,o,!1,null,null,null);t["default"]=j.exports},"4a7a":function(e,t,n){!function(t,n){e.exports=n()}("undefined"!=typeof self&&self,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=8)}([function(e,t,n){var i=n(4),o=n(5),s=n(6);e.exports=function(e){return i(e)||o(e)||s()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);tn.bottom)return this.$refs.dropdownMenu.scrollTop=t.offsetTop-(n.height-r)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},u={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){for(var e=0;e=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown:function(){for(var e=this.typeAheadPointer+1;e0&&void 0!==arguments[0]?arguments[0]:null;return this.mutableLoading=null==e?!this.mutableLoading:e}}};function d(e,t,n,i,o,s,r,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),r?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}var h={Deselect:d({},(function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[t("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])}),[],!1,null,null,null).exports,OpenIndicator:d({},(function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[t("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])}),[],!1,null,null,null).exports},f={inserted:function(e,t,n){var i=n.context;if(i.appendToBody){var o=i.$refs.toggle.getBoundingClientRect(),s=o.height,r=o.top,a=o.left,c=o.width,l=window.scrollX||window.pageXOffset,u=window.scrollY||window.pageYOffset;e.unbindPosition=i.calculatePosition(e,i,{width:c+"px",left:l+a+"px",top:u+r+s+"px"}),document.body.appendChild(e)}},unbind:function(e,t,n){n.context.appendToBody&&(e.unbindPosition&&"function"==typeof e.unbindPosition&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}},b=function(e){var t={};return Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),JSON.stringify(t)},m=0,v=function(){return++m};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t-1}},filter:{type:Function,default:function(e,t){var n=this;return e.filter((function(e){var i=n.getOptionLabel(e);return"number"==typeof i&&(i=i.toString()),n.filterBy(e,i,t)}))}},createOption:{type:Function,default:function(e){return"object"===r()(this.optionList[0])?c()({},this.label,e):e}},resetOnOptionsChange:{default:!1,validator:function(e){return["function","boolean"].includes(r()(e))}},clearSearchOnBlur:{type:Function,default:function(e){var t=e.clearSearchOnSelect,n=e.multiple;return t&&!n}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(e,t){return e}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(e,t,n){var i=n.width,o=n.top,s=n.left;e.style.top=o,e.style.left=s,e.style.width=i}}},data:function(){return{uid:v(),search:"",open:!1,isComposing:!1,pushedTags:[],_value:[]}},watch:{options:function(e,t){var n=this;!this.taggable&&("function"==typeof n.resetOnOptionsChange?n.resetOnOptionsChange(e,t,n.selectedValue):n.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:function(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)},multiple:function(){this.clearSelection()},open:function(e){this.$emit(e?"open":"close")}},created:function(){this.mutableLoading=this.loading,void 0!==this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value),this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(e){var t=this;Array.isArray(e)?this.$data._value=e.map((function(e){return t.findOptionFromReducedValue(e)})):this.$data._value=this.findOptionFromReducedValue(e)},select:function(e){this.$emit("option:selecting",e),this.isOptionSelected(e)||(this.taggable&&!this.optionExists(e)&&this.$emit("option:created",e),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect:function(e){var t=this;this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter((function(n){return!t.optionComparator(n,e)}))),this.$emit("option:deselected",e)},clearSelection:function(){this.updateValue(this.multiple?[]:null)},onAfterSelect:function(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue:function(e){var t=this;void 0===this.value&&(this.$data._value=e),null!==e&&(e=Array.isArray(e)?e.map((function(e){return t.reduce(e)})):this.reduce(e)),this.$emit("input",e)},toggleDropdown:function(e){var t=e.target!==this.searchEl;t&&e.preventDefault();var n=[].concat(o()(this.$refs.deselectButtons||[]),o()([this.$refs.clearButton]||!1));void 0===this.searchEl||n.filter(Boolean).some((function(t){return t.contains(e.target)||t===e.target}))?e.preventDefault():this.open&&t?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(e){var t=this;return this.selectedValue.some((function(n){return t.optionComparator(n,e)}))},optionComparator:function(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue:function(e){var t=this,n=[].concat(o()(this.options),o()(this.pushedTags)).filter((function(n){return JSON.stringify(t.reduce(n))===JSON.stringify(e)}));return 1===n.length?n[0]:n.find((function(e){return t.optionComparator(e,t.$data._value)}))||e},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var e=null;this.multiple&&(e=o()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(e)}},optionExists:function(e){var t=this;return this.optionList.some((function(n){return t.optionComparator(n,e)}))},normalizeOptionForSlot:function(e){return"object"===r()(e)?e:c()({},this.label,e)},pushTag:function(e){this.pushedTags.push(e)},onEscape:function(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur:function(){if(!this.mousedown||this.searching){var e=this.clearSearchOnSelect,t=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:t})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,0!==this.search.length||0!==this.options.length||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onSearchKeyDown:function(e){var t=this,n=function(e){return e.preventDefault(),!t.isComposing&&t.typeAheadSelect()},i={8:function(e){return t.maybeDeleteValue()},9:function(e){return t.onTab()},27:function(e){return t.onEscape()},38:function(e){return e.preventDefault(),t.typeAheadUp()},40:function(e){return e.preventDefault(),t.typeAheadDown()}};this.selectOnKeyCodes.forEach((function(e){return i[e]=n}));var o=this.mapKeydown(i,this);if("function"==typeof o[e.keyCode])return o[e.keyCode](e)}},computed:{isTrackingValues:function(){return void 0===this.value||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var e=this.value;return this.isTrackingValues&&(e=this.$data._value),e?[].concat(e):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var e=this,t={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:y({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":"vs".concat(this.uid,"__combobox"),"aria-controls":"vs".concat(this.uid,"__listbox"),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return e.isComposing=!0},compositionend:function(){return e.isComposing=!1},keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(t){return e.search=t.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.loading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:t,listFooter:t,header:y({},t,{deselect:this.deselect}),footer:y({},t,{deselect:this.deselect})}},childComponents:function(){return y({},h,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return!this.noDrop&&this.open&&!this.mutableLoading},searchPlaceholder:function(){if(this.isValueEmpty&&this.placeholder)return this.placeholder},filteredOptions:function(){var e=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;var t=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){var n=this.createOption(this.search);this.optionExists(n)||t.unshift(n)}return t},isValueEmpty:function(){return 0===this.selectedValue.length},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}}},_=(n(7),d(O,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-select",class:e.stateClasses,attrs:{dir:e.dir}},[e._t("header",null,null,e.scope.header),e._v(" "),n("div",{ref:"toggle",staticClass:"vs__dropdown-toggle",attrs:{id:"vs"+e.uid+"__combobox",role:"combobox","aria-expanded":e.dropdownOpen.toString(),"aria-owns":"vs"+e.uid+"__listbox","aria-label":"Search for option"},on:{mousedown:function(t){return e.toggleDropdown(t)}}},[n("div",{ref:"selectedOptions",staticClass:"vs__selected-options"},[e._l(e.selectedValue,(function(t){return e._t("selected-option-container",[n("span",{key:e.getOptionKey(t),staticClass:"vs__selected"},[e._t("selected-option",[e._v("\n "+e._s(e.getOptionLabel(t))+"\n ")],null,e.normalizeOptionForSlot(t)),e._v(" "),e.multiple?n("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:e.disabled,type:"button",title:"Deselect "+e.getOptionLabel(t),"aria-label":"Deselect "+e.getOptionLabel(t)},on:{click:function(n){return e.deselect(t)}}},[n(e.childComponents.Deselect,{tag:"component"})],1):e._e()],2)],{option:e.normalizeOptionForSlot(t),deselect:e.deselect,multiple:e.multiple,disabled:e.disabled})})),e._v(" "),e._t("search",[n("input",e._g(e._b({staticClass:"vs__search"},"input",e.scope.search.attributes,!1),e.scope.search.events))],null,e.scope.search)],2),e._v(" "),n("div",{ref:"actions",staticClass:"vs__actions"},[n("button",{directives:[{name:"show",rawName:"v-show",value:e.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:e.disabled,type:"button",title:"Clear Selected","aria-label":"Clear Selected"},on:{click:e.clearSelection}},[n(e.childComponents.Deselect,{tag:"component"})],1),e._v(" "),e._t("open-indicator",[e.noDrop?e._e():n(e.childComponents.OpenIndicator,e._b({tag:"component"},"component",e.scope.openIndicator.attributes,!1))],null,e.scope.openIndicator),e._v(" "),e._t("spinner",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[e._v("Loading...")])],null,e.scope.spinner)],2)]),e._v(" "),n("transition",{attrs:{name:e.transition}},[e.dropdownOpen?n("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs"+e.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs"+e.uid+"__listbox",role:"listbox",tabindex:"-1"},on:{mousedown:function(t){return t.preventDefault(),e.onMousedown(t)},mouseup:e.onMouseUp}},[e._t("list-header",null,null,e.scope.listHeader),e._v(" "),e._l(e.filteredOptions,(function(t,i){return n("li",{key:e.getOptionKey(t),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--selected":e.isOptionSelected(t),"vs__dropdown-option--highlight":i===e.typeAheadPointer,"vs__dropdown-option--disabled":!e.selectable(t)},attrs:{role:"option",id:"vs"+e.uid+"__option-"+i,"aria-selected":i===e.typeAheadPointer||null},on:{mouseover:function(n){e.selectable(t)&&(e.typeAheadPointer=i)},mousedown:function(n){n.preventDefault(),n.stopPropagation(),e.selectable(t)&&e.select(t)}}},[e._t("option",[e._v("\n "+e._s(e.getOptionLabel(t))+"\n ")],null,e.normalizeOptionForSlot(t))],2)})),e._v(" "),0===e.filteredOptions.length?n("li",{staticClass:"vs__no-options"},[e._t("no-options",[e._v("Sorry, no matching options.")],null,e.scope.noOptions)],2):e._e(),e._v(" "),e._t("list-footer",null,null,e.scope.listFooter)],2):n("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs"+e.uid+"__listbox",role:"listbox"}})]),e._v(" "),e._t("footer",null,null,e.scope.footer)],2)}),[],!1,null,null,null).exports),w={ajax:p,pointer:u,pointerScroll:l};n.d(t,"VueSelect",(function(){return _})),n.d(t,"mixins",(function(){return w})),t.default=_}])}))},"6abb":function(e,t,n){},a953:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var i=n("2b0e"),o=n("a723"),s=n("cf75"),r=Object(s["d"])({plain:Object(s["c"])(o["g"],!1)},"formControls"),a=i["default"].extend({props:r,computed:{custom:function(){return!this.plain}}})},af7c:function(e,t,n){"use strict";n("6abb")},c3e6:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var i,o,s=n("2b0e"),r=n("c637"),a=n("0056"),c=n("a723"),l=n("7b1e"),u=n("3c21"),p=function(e,t){for(var n=0;n-1:Object(u["a"])(t,e)},isRadio:function(){return!1}},watch:E({},G,(function(e,t){Object(u["a"])(e,t)||this.setIndeterminate(e)})),mounted:function(){this.setIndeterminate(this[G])},methods:{computedLocalCheckedWatcher:function(e,t){if(!Object(u["a"])(e,t)){this.$emit(L,e);var n=this.$refs.input;n&&this.$emit(T,n.indeterminate)}},handleChange:function(e){var t=this,n=e.target,i=n.checked,o=n.indeterminate,s=this.value,r=this.uncheckedValue,c=this.computedLocalChecked;if(Object(l["a"])(c)){var u=p(c,s);i&&u<0?c=c.concat(s):!i&&u>-1&&(c=c.slice(0,u).concat(c.slice(u+1)))}else c=i?s:r;this.computedLocalChecked=c,this.$nextTick((function(){t.$emit(a["d"],c),t.isGroup&&t.bvGroup.$emit(a["d"],c),t.$emit(T,o)}))},setIndeterminate:function(e){Object(l["a"])(this.computedLocalChecked)&&(e=!1);var t=this.$refs.input;t&&(t.indeterminate=e,this.$emit(T,e))}}})}}]); //# sourceMappingURL=chunk-77565238.edba60a6.js.map