text: /*! Buefy v0.9.7 | MIT License | github.com/buefy/buefy */
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Dropdown={},e.Vue)}(this,(function(e,t){"use strict";var i,n=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n                                     area[href],\n                                     input:not([disabled]),\n                                     select:not([disabled]),\n                                     textarea:not([disabled]),\n                                     button:not([disabled]),\n                                     iframe,\n                                     object,\n                                     embed,\n                                     *[tabindex]:not([tabindex="-1"]),\n                                     *[contenteditable]'):null},o=!0,s=!0;function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){return(e&t)===t}function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const c=["escape","outside"];var u={name:"BDropdown",directives:{trapFocus:{beforeMount:function(e,t){var o=t.value;if(void 0===o||o){var s=n(e),r=n(e,!0);s&&s.length>0&&(i=function(t){s=n(e),r=n(e,!0);var i=s[0],o=s[s.length-1];t.target===i&&t.shiftKey&&"Tab"===t.key?(t.preventDefault(),o.focus()):(t.target===o||Array.from(r).indexOf(t.target)>=0)&&!t.shiftKey&&"Tab"===t.key&&(t.preventDefault(),i.focus())},e.addEventListener("keydown",i))}},unmounted:function(e){e.removeEventListener("keydown",i)}}},mixins:[function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i={provide:function(){return r({},"b"+e,this)}};return l(t,1)&&(i.data=function(){return a({childItems:[]},l(t,3)?{nextIndex:0}:{})},i.methods={_registerItem:function(e){l(t,3)&&(e.dynamicIndex=this.nextIndex,++this.nextIndex),this.childItems.push(e)},_unregisterItem:function(e){this.childItems=this.childItems.filter((function(t){return t.value!==e.value}))}},l(t,3)&&(i.computed={sortedItems:function(){return this.childItems.slice().sort((function(e,t){return e.index-t.index}))}})),i}("dropdown")],props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:e=>["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1},triggers:{type:Array,default:()=>["click"]},mobileModal:{type:Boolean,default:()=>o},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:()=>s},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean},emits:["active-change","change","update:modelValue"],data(){return{selected:this.modelValue,style:{},isActive:!1,isHoverable:!1,_bodyEl:void 0}},computed:{rootClasses(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded}]},isMobileModal(){return this.mobileModal&&!this.inline},cancelOptions(){return"boolean"==typeof this.canClose?this.canClose?c:[]:this.canClose},contentStyle(){return{maxHeight:this.scrollable?(e=this.maxHeight,void 0===e?null:isNaN(e)?e:e+"px"):null,overflow:this.scrollable?"auto":null};var e},hoverable(){return this.triggers.indexOf("hover")>=0}},watch:{modelValue(e){this.selected=e},isActive(e){this.$emit("active-change",e),this.appendToBody&&this.$nextTick((()=>{this.updateAppendToBody()}))}},methods:{selectItem(e){this.multiple?(this.selected?-1===this.selected.indexOf(e)?this.selected=[...this.selected,e]:this.selected=this.selected.filter((t=>t!==e)):this.selected=[e],this.$emit("change",this.selected)):this.selected!==e&&(this.selected=e,this.$emit("change",this.selected)),this.$emit("update:modelValue",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(void 0!==this.$refs.dropdownMenu){const t=this.$refs.dropdownMenu.querySelectorAll("*");for(const i of t)if(e===i)return!0}if(void 0!==this.$refs.trigger){const t=this.$refs.trigger.querySelectorAll("*");for(const i of t)if(e===i)return!0}return!1},clickedOutside(e){if(this.cancelOptions.indexOf("outside")<0)return;if(this.inline)return;const t="shadowRoot"in this.$root.$options?e.composedPath()[0]:e.target;this.isInWhiteList(t)||(this.isActive=!1)},keyPress({key:e}){if(this.isActive&&("Escape"===e||"Esc"===e)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick(){this.triggers.indexOf("click")<0||this.toggle()},onContextMenu(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover(){this.triggers.indexOf("hover")<0||(this.isHoverable=!0)},onFocus(){this.triggers.indexOf("focus")<0||this.toggle()},toggle(){this.disabled||(this.isActive?this.isActive=!this.isActive:setTimeout((()=>{const e=!this.isActive;this.isActive=e})))},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.dropdownMenu,i=this.$refs.trigger;if(t&&i){const n=this.$data._bodyEl.children[0];if(n.classList.forEach((e=>n.classList.remove(e))),n.classList.add("dropdown"),n.classList.add("dropdown-menu-animation"),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&n.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((e=>{if(e&&"object"==typeof e)for(const t in e)e[t]&&n.classList.add(t)})),this.appendToBodyCopyParent){const e=this.$refs.dropdown.parentNode,t=this.$data._bodyEl;t.classList.forEach((e=>t.classList.remove(e))),e.classList.forEach((e=>{t.classList.add(e)}))}const o=i.getBoundingClientRect();let s=o.top+window.scrollY,r=o.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?s+=i.clientHeight:s-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(r-=t.clientWidth-i.clientWidth),this.style={position:"absolute",top:`${s}px`,left:`${r}px`,zIndex:"99",width:this.expanded?`${e.offsetWidth}px`:void 0}}}},mounted(){this.appendToBody&&(this.$data._bodyEl=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";var i=document.createElement("div");return t.appendChild(i),i.appendChild(e),document.body.appendChild(t),t}(this.$refs.dropdownMenu),this.updateAppendToBody())},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeUnmount(){var e;"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&(void 0!==(e=this.$data._bodyEl).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e))}};u.render=function(e,i,n,o,s,r){const l=t.resolveDirective("trap-focus");return t.openBlock(),t.createBlock("div",{class:["dropdown dropdown-menu-animation",r.rootClasses],ref:"dropdown"},[n.inline?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock("div",{key:0,role:"button",ref:"trigger",class:"dropdown-trigger",onClick:i[1]||(i[1]=(...e)=>r.onClick&&r.onClick(...e)),onContextmenu:i[2]||(i[2]=t.withModifiers(((...e)=>r.onContextMenu&&r.onContextMenu(...e)),["prevent"])),onMouseenter:i[3]||(i[3]=(...e)=>r.onHover&&r.onHover(...e)),onFocusCapture:i[4]||(i[4]=(...e)=>r.onFocus&&r.onFocus(...e)),"aria-haspopup":"true"},[t.renderSlot(e.$slots,"trigger",{active:s.isActive})],544)),t.createVNode(t.Transition,{name:n.animation},{default:t.withCtx((()=>[r.isMobileModal?t.withDirectives((t.openBlock(),t.createBlock("div",{key:0,class:"background","aria-hidden":!s.isActive},null,8,["aria-hidden"])),[[t.vShow,s.isActive]]):t.createCommentVNode("v-if",!0)])),_:1},8,["name"]),t.createVNode(t.Transition,{name:n.animation},{default:t.withCtx((()=>[t.withDirectives(t.createVNode("div",{ref:"dropdownMenu",class:"dropdown-menu",style:s.style,"aria-hidden":!s.isActive},[t.createVNode("div",{class:"dropdown-content",role:n.ariaRole,style:r.contentStyle},[t.renderSlot(e.$slots,"default")],12,["role"])],12,["aria-hidden"]),[[t.vShow,!n.disabled&&(s.isActive||s.isHoverable)||n.inline],[l,n.trapFocus]])])),_:3},8,["name"])],2)},u.__file="src/components/dropdown/Dropdown.vue";var h={name:"BDropdownItem",mixins:[function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i={inject:{parent:{from:"b"+e,default:!1}},created:function(){if(this.parent)this.parent._registerItem&&this.parent._registerItem(this);else if(!l(t,2))throw this.$destroy(),new Error("You should wrap "+this.$options.name+" in a "+e)},beforeUnmount:function(){this.parent&&this.parent._unregisterItem&&this.parent._unregisterItem(this)}};return l(t,1)&&(i.props={order:{type:Number,required:!1}},i.data=function(){return{dynamicIndex:null}},i.computed={index:function(){return null!=this.order?this.order:this.dynamicIndex}}),i}("dropdown")],props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},emits:["click"],computed:{anchorClasses(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:null},isClickable(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable(){return!this.hasLink&&this.focusable}},methods:{selectItem(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}};const p={key:0,class:"dropdown-divider"};h.render=function(e,i,n,o,s,r){return n.separator?(t.openBlock(),t.createBlock("hr",p)):n.custom||n.hasLink?(t.openBlock(),t.createBlock("div",{key:2,class:r.itemClasses,onClick:i[2]||(i[2]=(...e)=>r.selectItem&&r.selectItem(...e)),role:r.ariaRoleItem,tabindex:r.isFocusable?0:null},[t.renderSlot(e.$slots,"default")],10,["role","tabindex"])):(t.openBlock(),t.createBlock("a",{key:1,class:["dropdown-item",r.anchorClasses],onClick:i[1]||(i[1]=(...e)=>r.selectItem&&r.selectItem(...e)),role:r.ariaRoleItem,tabindex:r.isFocusable?0:null},[t.renderSlot(e.$slots,"default")],10,["role","tabindex"]))},h.__file="src/components/dropdown/DropdownItem.vue";var f,m=function(e,t){e.component(t.name,t)},v={install:function(e){m(e,u),m(e,h)}};f=v,"undefined"!=typeof window&&window.Vue&&window.Vue.use(f),e.BDropdown=u,e.BDropdownItem=h,e.default=v,Object.defineProperty(e,"__esModule",{value:!0})}));
  