text: /*! Buefy v0.9.3 | MIT License | github.com/buefy/buefy */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Autocomplete={})}(this,function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach(function(e){i(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function s(t){return function(t){if(Array.isArray(t))return t}(t)||a(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function l(t,e){return e.split(".").reduce(function(t,e){return t?t[e]:null},t)}var c=function(t){return"object"===e(t)&&!Array.isArray(t)},u=function t(e,n){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(s||!Object.assign){var r=Object.getOwnPropertyNames(n).map(function(o){return i({},o,function(t){return c(n[t])&&null!==e&&e.hasOwnProperty(t)&&c(e[t])}(o)?t(e[o],n[o],s):n[o])}).reduce(function(t,e){return o({},t,{},e)},{});return o({},e,{},r)}return Object.assign(e,n)};var d={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultButtonRounded:!1,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,customIconPacks:null},h={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return d.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return d.defaultLocale}},statusIcon:{type:Boolean,default:function(){return d.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||d.defaultIconPack}},computed:{parentField:function(){for(var t=this.$parent,e=0;e<3;e++)t&&!t.$data._isField&&(t=t.$parent);return t},statusType:function(){var t=(this.parentField||{}).newType;if(t){if("string"==typeof t)return t;for(var e in t)if(t[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var t=this.getElement();void 0!==t&&this.$nextTick(function(){t&&t.focus()})},onBlur:function(t){this.isFocused=!1,this.$emit("blur",t),this.checkHtml5Validity()},onFocus:function(t){this.isFocused=!0,this.$emit("focus",t)},getElement:function(){for(var t,e=this.$refs[this.$data._elementRef];(t=e)&&t._isVue;)e=e.$refs[e.$data._elementRef];return e},setInvalid:function(){var t=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",t)},setValidity:function(t,e){var i=this;this.$nextTick(function(){i.parentField&&(i.parentField.type||(i.parentField.newType=t),i.parentField.message||(i.parentField.newMessage=e))})},checkHtml5Validity:function(){if(this.useHtml5Validation){var t=this.getElement();if(void 0!==t)return t.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid}}}},f={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},p=function(){var t=d&&d.defaultIconComponent?"":"fa-";return{sizes:{default:null,"is-small":null,"is-medium":t+"lg","is-large":t+"2x"},iconPrefix:t,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var m=function(t,e,i,n,o,s,r,a,l,c){"boolean"!=typeof r&&(l=a,a=r,r=!1);var u,d="function"==typeof i?i.options:i;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),s?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(s)},d._ssrRegister=u):e&&(u=r?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),u)if(d.functional){var h=d.render;d.render=function(t,e){return u.call(e),h(t,e)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,u):[u]}return i};var v=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"icon",class:[t.newType,t.size]},[t.useIconComponent?i(t.useIconComponent,{tag:"component",class:[t.customClass],attrs:{icon:[t.newPack,t.newIcon],size:t.newCustomSize}}):i("i",{class:[t.newPack,t.newIcon,t.newCustomSize,t.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig:function(){var t;return(t={mdi:f,fa:p(),fas:p(),far:p(),fad:p(),fab:p(),fal:p()},d&&d.customIconPacks&&(t=u(t,d.customIconPacks,!0)),t)[this.newPack]},iconPrefix:function(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon:function(){return"".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||d.defaultIconPack},newType:function(){if(this.type){var t=[];if("string"==typeof this.type)t=this.type.split("-");else for(var e in this.type)if(this.type[e]){t=e.split("-");break}if(!(t.length<=1)){var i=s(t).slice(1);return"has-text-".concat(i.join("-"))}}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent:function(){return this.component||d.defaultIconComponent}},methods:{getEquivalentIconOf:function(t){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[t]?this.iconConfig.internalIcons[t]:t}}},void 0,!1,void 0,void 0,void 0);var g=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"control",class:t.rootClasses},["textarea"!==t.type?i("input",t._b({ref:"input",staticClass:"input",class:[t.inputClasses,t.customClass],attrs:{type:t.newType,autocomplete:t.newAutocomplete,maxlength:t.maxlength},domProps:{value:t.computedValue},on:{input:t.onInput,change:t.onChange,blur:t.onBlur,focus:t.onFocus}},"input",t.$attrs,!1)):i("textarea",t._b({ref:"textarea",staticClass:"textarea",class:[t.inputClasses,t.customClass],attrs:{maxlength:t.maxlength},domProps:{value:t.computedValue},on:{input:t.onInput,change:t.onChange,blur:t.onBlur,focus:t.onFocus}},"textarea",t.$attrs,!1)),t.icon?i("b-icon",{staticClass:"is-left",class:{"is-clickable":t.iconClickable},attrs:{icon:t.icon,pack:t.iconPack,size:t.iconSize},nativeOn:{click:function(e){return t.iconClick("icon-click",e)}}}):t._e(),!t.loading&&t.hasIconRight?i("b-icon",{staticClass:"is-right",class:{"is-clickable":t.passwordReveal||t.iconRightClickable},attrs:{icon:t.rightIcon,pack:t.iconPack,size:t.iconSize,type:t.rightIconType,both:""},nativeOn:{click:function(e){return t.rightIconClick(e)}}}):t._e(),t.maxlength&&t.hasCounter&&"number"!==t.type?i("small",{staticClass:"help counter",class:{"is-invisible":!t.isFocused}},[t._v(" "+t._s(t.valueLength)+" / "+t._s(t.maxlength)+" ")]):t._e()],1)},staticRenderFns:[]},void 0,{name:"BInput",components:i({},v.name,v),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:function(){return d.defaultInputHasCounter}},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||d.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(t){this.newValue=t,this.$emit("input",t)}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon:function(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType:function(){return this.passwordReveal?"is-primary":this.iconRight?null:this.statusType},iconPosition:function(){var t="";return this.icon&&(t+="has-icons-left "),this.hasIconRight&&(t+="has-icons-right"),t},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(t){this.newValue=t}},methods:{togglePasswordVisibility:function(){var t=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick(function(){t.focus()})},iconClick:function(t,e){var i=this;this.$emit(t,e),this.$nextTick(function(){i.focus()})},rightIconClick:function(t){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",t)},onInput:function(t){if(!this.lazy){var e=t.target.value;this.updateValue(e)}},onChange:function(t){if(this.lazy){var e=t.target.value;this.updateValue(e)}},updateValue:function(t){this.computedValue=t,!this.isValid&&this.checkHtml5Validity()}}},void 0,!1,void 0,void 0,void 0);var y,w=m({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"autocomplete control",class:{"is-expanded":t.expanded}},[i("b-input",t._b({ref:"input",attrs:{type:"text",size:t.size,loading:t.loading,rounded:t.rounded,icon:t.icon,"icon-right":t.newIconRight,"icon-right-clickable":t.newIconRightClickable,"icon-pack":t.iconPack,maxlength:t.maxlength,autocomplete:t.newAutocomplete,"use-html5-validation":!1},on:{input:t.onInput,focus:t.focused,blur:t.onBlur,"icon-right-click":t.rightIconClick,"icon-click":function(e){return t.$emit("icon-click",e)}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.preventDefault(),t.isActive=!1},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.tabPressed(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.enterPressed(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.keyArrows("up"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.keyArrows("down"))}]},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"b-input",t.$attrs,!1)),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive&&(!t.isEmpty||t.hasEmptySlot||t.hasHeaderSlot),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":t.isOpenedTop&&!t.appendToBody},style:t.style},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:t.contentStyle},[t.hasHeaderSlot?i("div",{staticClass:"dropdown-item"},[t._t("header")],2):t._e(),t._l(t.computedData,function(e,n){return[e.group?i("div",{key:n+"group",staticClass:"dropdown-item"},[t.hasGroupSlot?t._t("group",null,{group:e.group,index:n}):i("span",{staticClass:"has-text-weight-bold"},[t._v(" "+t._s(e.group)+" ")])],2):t._e(),t._l(e.items,function(e,o){return i("a",{key:n+":"+o,staticClass:"dropdown-item",class:{"is-hovered":e===t.hovered},on:{click:function(i){return t.setSelected(e,void 0,i)}}},[t.hasDefaultSlot?t._t("default",null,{option:e,index:o}):i("span",[t._v(" "+t._s(t.getValue(e,!0))+" ")])],2)})]}),t.isEmpty&&t.hasEmptySlot?i("div",{staticClass:"dropdown-item is-disabled"},[t._t("empty")],2):t._e(),t.hasFooterSlot?i("div",{staticClass:"dropdown-item"},[t._t("footer")],2):t._e()],2)])])],1)},staticRenderFns:[]},void 0,{name:"BAutocomplete",components:i({},g.name,g),mixins:[h],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},groupField:String,groupOptions:String,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean},data:function(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{computedData:function(){var t=this;if(this.groupField){if(this.groupOptions){var e=[];return this.data.forEach(function(i){var n=l(i,t.groupField),o=l(i,t.groupOptions);e.push({group:n,items:o})}),e}var i={};this.data.forEach(function(e){var n=l(e,t.groupField);i[n]||(i[n]=[]),i[n].push(e)});var n=[];return Object.keys(i).forEach(function(t){n.push({group:t,items:i[t]})}),n}return[{items:this.data}]},isEmpty:function(){return!this.computedData||!this.computedData.some(function(t){return t.items&&t.items.length})},whiteList:function(){var t=[];if(t.push(this.$refs.input.$el.querySelector("input")),t.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var e=this.$refs.dropdown.querySelectorAll("*"),i=!0,n=!1,o=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done);i=!0){var a=s.value;t.push(a)}}catch(t){n=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(n)throw o}}}if(this.$parent.$data._isTaginput){t.push(this.$parent.$el);var l=this.$parent.$el.querySelectorAll("*"),c=!0,u=!1,d=void 0;try{for(var h,f=l[Symbol.iterator]();!(c=(h=f.next()).done);c=!0){var p=h.value;t.push(p)}}catch(t){u=!0,d=t}finally{try{c||null==f.return||f.return()}finally{if(u)throw d}}}return t},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasGroupSlot:function(){return!!this.$scopedSlots.group},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},isOpenedTop:function(){return"top"===this.dropdownPosition||"auto"===this.dropdownPosition&&!this.isListInViewportVertically},newIconRight:function(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable:function(){return!!this.clearable||this.iconRightClickable},contentStyle:function(){return{maxHeight:(t=this.maxHeight,void 0===t?null:isNaN(t)?t:t+"px")};var t}},watch:{isActive:function(t){var e=this;"auto"===this.dropdownPosition&&(t?this.calcDropdownInViewportVertical():setTimeout(function(){e.calcDropdownInViewportVertical()},100))},newValue:function(t){this.$emit("input",t);var e=this.getValue(this.selected);e&&e!==t&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!t||(this.isActive=!!t)},value:function(t){this.newValue=t},data:function(t){this.keepFirst&&this.selectFirstOption(this.computedData)}},methods:{setHovered:function(t){void 0!==t&&(this.hovered=t)},setSelected:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==t&&(this.selected=t,this.$emit("select",this.selected,n),null!==this.selected&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected),this.setHovered(null)),i&&this.$nextTick(function(){e.isActive=!1}),this.checkValidity())},selectFirstOption:function(t){var e=this;this.$nextTick(function(){if(t.length){var i=t[0].items[0];(e.openOnFocus||""!==e.newValue&&e.hovered!==i)&&e.setHovered(i)}else e.setHovered(null)})},enterPressed:function(t){null!==this.hovered&&this.setSelected(this.hovered,!this.keepOpen,t)},tabPressed:function(t){null!==this.hovered?this.setSelected(this.hovered,!this.keepOpen,t):this.isActive=!1},clickedOutside:function(t){var e="shadowRoot"in this.$root.$options?t.composedPath()[0]:t.target;!this.hasFocus&&this.whiteList.indexOf(e)<0&&(this.isActive=!1)},getValue:function(t){if(null!==t)return void 0!==this.customFormatter?this.customFormatter(t):"object"===e(t)?l(t,this.field):t},checkIfReachedTheEndOfScroll:function(t){t.clientHeight!==t.scrollHeight&&t.scrollTop+t.clientHeight>=t.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical:function(){var t=this;this.$nextTick(function(){if(void 0!==t.$refs.dropdown){var e=t.$refs.dropdown.getBoundingClientRect();t.isListInViewportVertically=e.top>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight),t.appendToBody&&t.updateAppendToBody()}})},keyArrows:function(t){var e="down"===t?1:-1;if(this.isActive){var i=this.computedData.map(function(t){return t.items}).reduce(function(t,e){return[].concat(r(t),r(e))},[]),n=i.indexOf(this.hovered)+e;n=(n=n>i.length-1?i.length-1:n)<0?0:n,this.setHovered(i[n]);var o=this.$refs.dropdown.querySelector(".dropdown-content"),s=o.querySelectorAll("a.dropdown-item:not(.is-disabled)")[n];if(!s)return;var a=o.scrollTop,l=o.scrollTop+o.clientHeight-s.clientHeight;s.offsetTop<a?o.scrollTop=s.offsetTop:s.offsetTop>=l&&(o.scrollTop=s.offsetTop-o.clientHeight+s.clientHeight)}else this.isActive=!0},focused:function(t){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",t)},onBlur:function(t){this.hasFocus=!1,this.$emit("blur",t)},onInput:function(t){var e=this.getValue(this.selected);e&&e===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick:function(t){this.clearable?(this.newValue="",this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",t)},checkValidity:function(){var t=this;this.useHtml5Validation&&this.$nextTick(function(){t.checkHtml5Validity()})},updateAppendToBody:function(){var t=this.$refs.dropdown,e=this.$refs.input.$el;if(t&&e){var i=this.$data._bodyEl;i.classList.forEach(function(t){return i.classList.remove(t)}),i.classList.add("autocomplete"),i.classList.add("control"),this.expandend&&i.classList.add("is-expandend");var n=e.getBoundingClientRect(),o=n.top+window.scrollY,s=n.left+window.scrollX;this.isOpenedTop?o-=t.clientHeight:o+=e.clientHeight,this.style={position:"absolute",top:"".concat(o,"px"),left:"".concat(s,"px"),width:"".concat(e.clientWidth,"px"),maxWidth:"".concat(e.clientWidth,"px"),zIndex:"99"}}}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted:function(){var t=this;if(this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")){var e=this.$refs.dropdown.querySelector(".dropdown-content");e.addEventListener("scroll",function(){return t.checkIfReachedTheEndOfScroll(e)})}this.appendToBody&&(this.$data._bodyEl=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.left="0px",e.style.top="0px";var i=document.createElement("div");return e.appendChild(i),i.appendChild(t),document.body.appendChild(e),e}(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy:function(){var t;("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&(void 0!==(t=this.$data._bodyEl).remove?t.remove():void 0!==t.parentNode&&null!==t.parentNode&&t.parentNode.removeChild(t))}},void 0,!1,void 0,void 0,void 0),k={install:function(t){!function(t,e){t.component(e.name,e)}(t,w)}};y=k,"undefined"!=typeof window&&window.Vue&&window.Vue.use(y),t.BAutocomplete=w,t.default=k,Object.defineProperty(t,"__esModule",{value:!0})});
  