/*! Buefy v0.8.19 | MIT License | github.com/buefy/buefy */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Navbar={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function(e,t,n,i,a,s,o,r,d,c){"boolean"!=typeof o&&(d=r,r=o,o=!1);var l,v="function"==typeof n?n.options:n;if(e&&e.render&&(v.render=e.render,v.staticRenderFns=e.staticRenderFns,v._compiled=!0,a&&(v.functional=!0)),i&&(v._scopeId=i),s?(l=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__),t&&t.call(this,d(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},v._ssrRegister=l):t&&(l=o?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),l)if(v.functional){var u=v.render;v.render=function(e,t){return l.call(t),u(e,t)}}else{var h=v.beforeCreate;v.beforeCreate=h?[].concat(h,l):[l]}return n};var a=i({render:function(){var e=this.$createElement,t=this._self._c||e;return t("a",this._g({staticClass:"navbar-burger burger",class:{"is-active":this.isOpened},attrs:{role:"button","aria-label":"menu","aria-expanded":this.isOpened}},this.$listeners),[t("span",{attrs:{"aria-hidden":"true"}}),this._v(" "),t("span",{attrs:{"aria-hidden":"true"}}),this._v(" "),t("span",{attrs:{"aria-hidden":"true"}})])},staticRenderFns:[]},void 0,{name:"NavbarBurger",props:{isOpened:{type:Boolean,default:!1}}},void 0,!1,void 0,void 0,void 0),s="undefined"!=typeof window&&("ontouchstart"in window||navigator.msMaxTouchPoints>0)?["touchstart","click"]:["click"],o=[];function r(e){var n="function"==typeof e;if(!n&&"object"!==t(e))throw new Error("v-click-outside: Binding value should be a function or an object, typeof ".concat(e," given"));return{handler:n?e:e.handler,middleware:e.middleware||function(e){return e},events:e.events||s}}function d(e){var t=e.el,n=e.event,i=e.handler,a=e.middleware;n.target!==t&&!t.contains(n.target)&&a(n,t)&&i(n,t)}var c={bind:function(e,t){var n=r(t.value),i=n.handler,a=n.middleware,s=n.events,c={el:e,eventHandlers:s.map(function(t){return{event:t,handler:function(t){return d({event:t,el:e,handler:i,middleware:a})}}})};c.eventHandlers.forEach(function(e){var t=e.event,n=e.handler;return document.addEventListener(t,n)}),o.push(c)},update:function(e,t){var n=r(t.value),i=n.handler,a=n.middleware,s=n.events,c=o.filter(function(t){return t.el===e})[0];c.eventHandlers.forEach(function(e){var t=e.event,n=e.handler;return document.removeEventListener(t,n)}),c.eventHandlers=s.map(function(t){return{event:t,handler:function(t){return d({event:t,el:e,handler:i,middleware:a})}}}),c.eventHandlers.forEach(function(e){var t=e.event,n=e.handler;return document.addEventListener(t,n)})},unbind:function(e){o.filter(function(t){return t.el===e})[0].eventHandlers.forEach(function(e){var t=e.event,n=e.handler;return document.removeEventListener(t,n)})},instances:o};var l=i({},void 0,{name:"BNavbar",components:{NavbarBurger:a},directives:{clickOutside:c},props:{type:[String,Object],transparent:{type:Boolean,default:!1},fixedTop:{type:Boolean,default:!1},fixedBottom:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},wrapperClass:{type:String},closeOnClick:{type:Boolean,default:!0},mobileBurger:{type:Boolean,default:!0},spaced:Boolean,shadow:Boolean},data:function(){return{internalIsActive:this.isActive,_isNavBar:!0}},computed:{isOpened:function(){return this.internalIsActive},computedClasses:function(){var e;return[this.type,(e={},n(e,"is-fixed-top",this.fixedTop),n(e,"is-fixed-bottom",this.fixedBottom),n(e,"is-spaced",this.spaced),n(e,"has-shadow",this.shadow),n(e,"is-transparent",this.transparent),e)]}},watch:{isActive:{handler:function(e){this.internalIsActive=e},immediate:!0},fixedTop:{handler:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass("has-navbar-fixed-top"),this.spaced&&this.setBodyClass("has-spaced-navbar-fixed-top")):(this.removeBodyClass("has-navbar-fixed-top"),this.removeBodyClass("has-spaced-navbar-fixed-top"))},immediate:!0},fixedBottom:{handler:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass("has-navbar-fixed-bottom"),this.spaced&&this.setBodyClass("has-spaced-navbar-fixed-bottom")):(this.removeBodyClass("has-navbar-fixed-bottom"),this.removeBodyClass("has-spaced-navbar-fixed-bottom"))},immediate:!0}},methods:{toggleActive:function(){this.internalIsActive=!this.internalIsActive,this.emitUpdateParentEvent()},closeMenu:function(){this.closeOnClick&&(this.internalIsActive=!1,this.emitUpdateParentEvent())},emitUpdateParentEvent:function(){this.$emit("update:isActive",this.internalIsActive)},setBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.add(e)},removeBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.remove(e)},checkIfFixedPropertiesAreColliding:function(){if(this.fixedTop&&this.fixedBottom)throw new Error("You should choose if the BNavbar is fixed bottom or fixed top, but not both")},genNavbar:function(e){var t=[this.genNavbarBrandNode(e),this.genNavbarSlotsNode(e)];if(!this.wrapperClass)return this.genNavbarSlots(e,t);var n=e("div",{class:this.wrapperClass},t);return this.genNavbarSlots(e,[n])},genNavbarSlots:function(e,t){return e("nav",{staticClass:"navbar",class:this.computedClasses,attrs:{role:"navigation","aria-label":"main navigation"},directives:[{name:"click-outside",value:this.closeMenu}]},t)},genNavbarBrandNode:function(e){return e("div",{class:"navbar-brand"},[this.$slots.brand,this.genBurgerNode(e)])},genBurgerNode:function(e){if(this.mobileBurger){var t=e("navbar-burger",{props:{isOpened:this.isOpened},on:{click:this.toggleActive}});return!!this.$scopedSlots.burger?this.$scopedSlots.burger({isOpened:this.isOpened,toggleActive:this.toggleActive}):t}},genNavbarSlotsNode:function(e){return e("div",{staticClass:"navbar-menu",class:{"is-active":this.isOpened}},[this.genMenuPosition(e,"start"),this.genMenuPosition(e,"end")])},genMenuPosition:function(e,t){return e("div",{staticClass:"navbar-".concat(t)},this.$slots[t])}},beforeDestroy:function(){if(this.fixedTop){var e=this.spaced?"has-spaced-navbar-fixed-top":"has-navbar-fixed-top";this.removeBodyClass(e)}else if(this.fixedBottom){var t=this.spaced?"has-spaced-navbar-fixed-bottom":"has-navbar-fixed-bottom";this.removeBodyClass(t)}},render:function(e,t){return this.genNavbar(e)}},void 0,void 0,void 0,void 0,void 0),v=["div","span"];var u=i({render:function(){var e=this.$createElement;return(this._self._c||e)(this.tag,this._g(this._b({tag:"component",staticClass:"navbar-item",class:{"is-active":this.active}},"component",this.$attrs,!1),this.$listeners),[this._t("default")],2)},staticRenderFns:[]},void 0,{name:"BNavbarItem",inheritAttrs:!1,props:{tag:{type:String,default:"a"},active:Boolean},methods:{keyPress:function(e){27===e.keyCode&&this.closeMenuRecursive(this,["NavBar"])},handleClickEvent:function(e){if(!v.some(function(t){return t===e.target.localName})){var t=this.closeMenuRecursive(this,["NavbarDropdown","NavBar"]);t.$data._isNavbarDropdown&&this.closeMenuRecursive(t,["NavBar"])}},closeMenuRecursive:function(e,t){return e.$parent?t.reduce(function(t,n){return e.$parent.$data["_is".concat(n)]?(e.$parent.closeMenu(),e.$parent):t},null)||this.closeMenuRecursive(e.$parent,t):null}},mounted:function(){"undefined"!=typeof window&&(this.$el.addEventListener("click",this.handleClickEvent),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(this.$el.removeEventListener("click",this.handleClickEvent),document.removeEventListener("keyup",this.keyPress))}},void 0,!1,void 0,void 0,void 0);var h,f=i({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],staticClass:"navbar-item has-dropdown",class:{"is-hoverable":e.isHoverable,"is-active":e.newActive},on:{mouseenter:e.checkHoverable}},[n("a",{staticClass:"navbar-link",class:{"is-arrowless":e.arrowless,"is-active":e.newActive&&e.collapsible},attrs:{role:"menuitem","aria-haspopup":"true",href:"#"},on:{click:function(t){t.preventDefault(),e.newActive=!e.newActive}}},[e.label?[e._v(e._s(e.label))]:e._t("label")],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsible||e.collapsible&&e.newActive,expression:"!collapsible || (collapsible && newActive)"}],staticClass:"navbar-dropdown",class:{"is-right":e.right,"is-boxed":e.boxed}},[e._t("default")],2)])},staticRenderFns:[]},void 0,{name:"BNavbarDropdown",directives:{clickOutside:c},props:{label:String,hoverable:Boolean,active:Boolean,right:Boolean,arrowless:Boolean,boxed:Boolean,closeOnClick:{type:Boolean,default:!0},collapsible:Boolean},data:function(){return{newActive:this.active,isHoverable:this.hoverable,_isNavbarDropdown:!0}},watch:{active:function(e){this.newActive=e}},methods:{showMenu:function(){this.newActive=!0},closeMenu:function(){this.newActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1)},checkHoverable:function(){this.hoverable&&(this.isHoverable=!0)}}},void 0,!1,void 0,void 0,void 0),p=function(e,t){e.component(t.name,t)},b={install:function(e){p(e,l),p(e,u),p(e,f)}};h=b,"undefined"!=typeof window&&window.Vue&&window.Vue.use(h),e.BNavbar=l,e.BNavbarDropdown=f,e.BNavbarItem=u,e.default=b,Object.defineProperty(e,"__esModule",{value:!0})});
