\n\n return h('div', {\n style: this.modalOuterStyle,\n attrs: this.computedAttrs,\n key: \"modal-outer-\".concat(this._uid)\n }, [$modal, $backdrop]);\n }\n },\n render: function render(h) {\n if (this.static) {\n return this.lazy && this.isHidden ? h() : this.makeModal(h);\n } else {\n return this.isHidden ? h() : h(BTransporterSingle, [this.makeModal(h)]);\n }\n }\n});","import { EVENT_OPTIONS_PASSIVE } from '../../constants/events';\nimport { CODE_ENTER, CODE_SPACE } from '../../constants/key-codes';\nimport { getAttr, hasAttr, isDisabled, matches, select, setAttr } from '../../utils/dom';\nimport { eventOn, eventOff } from '../../utils/events';\nimport { isString } from '../../utils/inspect';\nimport { keys } from '../../utils/object'; // Emitted show event for modal\n\nvar EVENT_SHOW = 'bv::show::modal'; // Prop name we use to store info on root element\n\nvar PROPERTY = '__bv_modal_directive__';\n\nvar getTarget = function getTarget(_ref) {\n var _ref$modifiers = _ref.modifiers,\n modifiers = _ref$modifiers === void 0 ? {} : _ref$modifiers,\n arg = _ref.arg,\n value = _ref.value;\n // Try value, then arg, otherwise pick last modifier\n return isString(value) ? value : isString(arg) ? arg : keys(modifiers).reverse()[0];\n};\n\nvar getTriggerElement = function getTriggerElement(el) {\n // If root element is a dropdown-item or nav-item, we\n // need to target the inner link or button instead\n return el && matches(el, '.dropdown-menu > li, li.nav-item') ? select('a, button', el) || el : el;\n};\n\nvar setRole = function setRole(trigger) {\n // Ensure accessibility on non button elements\n if (trigger && trigger.tagName !== 'BUTTON') {\n // Only set a role if the trigger element doesn't have one\n if (!hasAttr(trigger, 'role')) {\n setAttr(trigger, 'role', 'button');\n } // Add a tabindex is not a button or link, and tabindex is not provided\n\n\n if (trigger.tagName !== 'A' && !hasAttr(trigger, 'tabindex')) {\n setAttr(trigger, 'tabindex', '0');\n }\n }\n};\n\nvar bind = function bind(el, binding, vnode) {\n var target = getTarget(binding);\n var trigger = getTriggerElement(el);\n\n if (target && trigger) {\n var handler = function handler(evt) {\n // `currentTarget` is the element with the listener on it\n var currentTarget = evt.currentTarget;\n\n if (!isDisabled(currentTarget)) {\n var type = evt.type;\n var key = evt.keyCode; // Open modal only if trigger is not disabled\n\n if (type === 'click' || type === 'keydown' && (key === CODE_ENTER || key === CODE_SPACE)) {\n vnode.context.$root.$emit(EVENT_SHOW, target, currentTarget);\n }\n }\n };\n\n el[PROPERTY] = {\n handler: handler,\n target: target,\n trigger: trigger\n }; // If element is not a button, we add `role=\"button\"` for accessibility\n\n setRole(trigger); // Listen for click events\n\n eventOn(trigger, 'click', handler, EVENT_OPTIONS_PASSIVE);\n\n if (trigger.tagName !== 'BUTTON' && getAttr(trigger, 'role') === 'button') {\n // If trigger isn't a button but has role button,\n // we also listen for `keydown.space` && `keydown.enter`\n eventOn(trigger, 'keydown', handler, EVENT_OPTIONS_PASSIVE);\n }\n }\n};\n\nvar unbind = function unbind(el) {\n var oldProp = el[PROPERTY] || {};\n var trigger = oldProp.trigger;\n var handler = oldProp.handler;\n\n if (trigger && handler) {\n eventOff(trigger, 'click', handler, EVENT_OPTIONS_PASSIVE);\n eventOff(trigger, 'keydown', handler, EVENT_OPTIONS_PASSIVE);\n eventOff(el, 'click', handler, EVENT_OPTIONS_PASSIVE);\n eventOff(el, 'keydown', handler, EVENT_OPTIONS_PASSIVE);\n }\n\n delete el[PROPERTY];\n};\n\nvar componentUpdated = function componentUpdated(el, binding, vnode) {\n var oldProp = el[PROPERTY] || {};\n var target = getTarget(binding);\n var trigger = getTriggerElement(el);\n\n if (target !== oldProp.target || trigger !== oldProp.trigger) {\n // We bind and rebind if the target or trigger changes\n unbind(el, binding, vnode);\n bind(el, binding, vnode);\n } // If trigger element is not a button, ensure `role=\"button\"`\n // is still set for accessibility\n\n\n setRole(trigger);\n};\n\nvar updated = function updated() {};\n/*\n * Export our directive\n */\n\n\nexport var VBModal = {\n inserted: componentUpdated,\n updated: updated,\n componentUpdated: componentUpdated,\n unbind: unbind\n};","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// Plugin for adding `$bvModal` property to all Vue instances\nimport { NAME_MODAL, NAME_MSG_BOX } from '../../../constants/components';\nimport { concat } from '../../../utils/array';\nimport { getComponentConfig } from '../../../utils/config';\nimport { requestAF } from '../../../utils/dom';\nimport { isUndefined, isFunction } from '../../../utils/inspect';\nimport { assign, defineProperties, defineProperty, hasOwnProperty, keys, omit, readonlyDescriptor } from '../../../utils/object';\nimport { pluginFactory } from '../../../utils/plugins';\nimport { warn, warnNotClient, warnNoPromiseSupport } from '../../../utils/warn';\nimport { BModal, props as modalProps } from '../modal'; // --- Constants ---\n\nvar PROP_NAME = '$bvModal';\nvar PROP_NAME_PRIV = '_bv__modal'; // Base modal props that are allowed\n// Some may be ignored or overridden on some message boxes\n// Prop ID is allowed, but really only should be used for testing\n// We need to add it in explicitly as it comes from the `idMixin`\n\nvar BASE_PROPS = ['id'].concat(_toConsumableArray(keys(omit(modalProps, ['busy', 'lazy', 'noStacking', \"static\", 'visible'])))); // Fallback event resolver (returns undefined)\n\nvar defaultResolver = function defaultResolver() {}; // Map prop names to modal slot names\n\n\nvar propsToSlots = {\n msgBoxContent: 'default',\n title: 'modal-title',\n okTitle: 'modal-ok',\n cancelTitle: 'modal-cancel'\n}; // --- Utility methods ---\n// Method to filter only recognized props that are not undefined\n\nvar filterOptions = function filterOptions(options) {\n return BASE_PROPS.reduce(function (memo, key) {\n if (!isUndefined(options[key])) {\n memo[key] = options[key];\n }\n\n return memo;\n }, {});\n}; // Method to install `$bvModal` VM injection\n\n\nvar plugin = function plugin(Vue) {\n // Create a private sub-component that extends BModal\n // which self-destructs after hidden\n // @vue/component\n var BMsgBox = Vue.extend({\n name: NAME_MSG_BOX,\n extends: BModal,\n destroyed: function destroyed() {\n // Make sure we not in document any more\n if (this.$el && this.$el.parentNode) {\n this.$el.parentNode.removeChild(this.$el);\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n // Self destruct handler\n var handleDestroy = function handleDestroy() {\n _this.$nextTick(function () {\n // In a `requestAF()` to release control back to application\n requestAF(function () {\n _this.$destroy();\n });\n });\n }; // Self destruct if parent destroyed\n\n\n this.$parent.$once('hook:destroyed', handleDestroy); // Self destruct after hidden\n\n this.$once('hidden', handleDestroy); // Self destruct on route change\n\n /* istanbul ignore if */\n\n if (this.$router && this.$route) {\n // Destroy ourselves if route changes\n\n /* istanbul ignore next */\n this.$once('hook:beforeDestroy', this.$watch('$router', handleDestroy));\n } // Show the `BMsgBox`\n\n\n this.show();\n }\n }); // Method to generate the on-demand modal message box\n // Returns a promise that resolves to a value returned by the resolve\n\n var asyncMsgBox = function asyncMsgBox($parent, props) {\n var resolver = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultResolver;\n\n if (warnNotClient(PROP_NAME) || warnNoPromiseSupport(PROP_NAME)) {\n /* istanbul ignore next */\n return;\n } // Create an instance of `BMsgBox` component\n\n\n var msgBox = new BMsgBox({\n // We set parent as the local VM so these modals can emit events on\n // the app `$root`, as needed by things like tooltips and popovers\n // And it helps to ensure `BMsgBox` is destroyed when parent is destroyed\n parent: $parent,\n // Preset the prop values\n propsData: _objectSpread(_objectSpread(_objectSpread({}, filterOptions(getComponentConfig(NAME_MODAL))), {}, {\n // Defaults that user can override\n hideHeaderClose: true,\n hideHeader: !(props.title || props.titleHtml)\n }, omit(props, keys(propsToSlots))), {}, {\n // Props that can't be overridden\n lazy: false,\n busy: false,\n visible: false,\n noStacking: false,\n noEnforceFocus: false\n })\n }); // Convert certain props to scoped slots\n\n keys(propsToSlots).forEach(function (prop) {\n if (!isUndefined(props[prop])) {\n // Can be a string, or array of VNodes.\n // Alternatively, user can use HTML version of prop to pass an HTML string.\n msgBox.$slots[propsToSlots[prop]] = concat(props[prop]);\n }\n }); // Return a promise that resolves when hidden, or rejects on destroyed\n\n return new Promise(function (resolve, reject) {\n var resolved = false;\n msgBox.$once('hook:destroyed', function () {\n if (!resolved) {\n /* istanbul ignore next */\n reject(new Error('BootstrapVue MsgBox destroyed before resolve'));\n }\n });\n msgBox.$on('hide', function (bvModalEvt) {\n if (!bvModalEvt.defaultPrevented) {\n var result = resolver(bvModalEvt); // If resolver didn't cancel hide, we resolve\n\n if (!bvModalEvt.defaultPrevented) {\n resolved = true;\n resolve(result);\n }\n }\n }); // Create a mount point (a DIV) and mount the msgBo which will trigger it to show\n\n var div = document.createElement('div');\n document.body.appendChild(div);\n msgBox.$mount(div);\n });\n }; // Private utility method to open a user defined message box and returns a promise.\n // Not to be used directly by consumers, as this method may change calling syntax\n\n\n var makeMsgBox = function makeMsgBox($parent, content) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var resolver = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n if (!content || warnNoPromiseSupport(PROP_NAME) || warnNotClient(PROP_NAME) || !isFunction(resolver)) {\n /* istanbul ignore next */\n return;\n }\n\n return asyncMsgBox($parent, _objectSpread(_objectSpread({}, filterOptions(options)), {}, {\n msgBoxContent: content\n }), resolver);\n }; // BvModal instance class\n\n\n var BvModal = /*#__PURE__*/function () {\n function BvModal(vm) {\n _classCallCheck(this, BvModal);\n\n // Assign the new properties to this instance\n assign(this, {\n _vm: vm,\n _root: vm.$root\n }); // Set these properties as read-only and non-enumerable\n\n defineProperties(this, {\n _vm: readonlyDescriptor(),\n _root: readonlyDescriptor()\n });\n } // --- Instance methods ---\n // Show modal with the specified ID args are for future use\n\n\n _createClass(BvModal, [{\n key: \"show\",\n value: function show(id) {\n if (id && this._root) {\n var _this$_root;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n (_this$_root = this._root).$emit.apply(_this$_root, ['bv::show::modal', id].concat(args));\n }\n } // Hide modal with the specified ID args are for future use\n\n }, {\n key: \"hide\",\n value: function hide(id) {\n if (id && this._root) {\n var _this$_root2;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n (_this$_root2 = this._root).$emit.apply(_this$_root2, ['bv::hide::modal', id].concat(args));\n }\n } // The following methods require Promise support!\n // IE 11 and others do not support Promise natively, so users\n // should have a Polyfill loaded (which they need anyways for IE 11 support)\n // Open a message box with OK button only and returns a promise\n\n }, {\n key: \"msgBoxOk\",\n value: function msgBoxOk(message) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Pick the modal props we support from options\n var props = _objectSpread(_objectSpread({}, options), {}, {\n // Add in overrides and our content prop\n okOnly: true,\n okDisabled: false,\n hideFooter: false,\n msgBoxContent: message\n });\n\n return makeMsgBox(this._vm, message, props, function () {\n // Always resolve to true for OK\n return true;\n });\n } // Open a message box modal with OK and CANCEL buttons\n // and returns a promise\n\n }, {\n key: \"msgBoxConfirm\",\n value: function msgBoxConfirm(message) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Set the modal props we support from options\n var props = _objectSpread(_objectSpread({}, options), {}, {\n // Add in overrides and our content prop\n okOnly: false,\n okDisabled: false,\n cancelDisabled: false,\n hideFooter: false\n });\n\n return makeMsgBox(this._vm, message, props, function (bvModalEvt) {\n var trigger = bvModalEvt.trigger;\n return trigger === 'ok' ? true : trigger === 'cancel' ? false : null;\n });\n }\n }]);\n\n return BvModal;\n }(); // Add our instance mixin\n\n\n Vue.mixin({\n beforeCreate: function beforeCreate() {\n // Because we need access to `$root` for `$emits`, and VM for parenting,\n // we have to create a fresh instance of `BvModal` for each VM\n this[PROP_NAME_PRIV] = new BvModal(this);\n }\n }); // Define our read-only `$bvModal` instance property\n // Placed in an if just in case in HMR mode\n\n if (!hasOwnProperty(Vue.prototype, PROP_NAME)) {\n defineProperty(Vue.prototype, PROP_NAME, {\n get: function get() {\n /* istanbul ignore next */\n if (!this || !this[PROP_NAME_PRIV]) {\n warn(\"\\\"\".concat(PROP_NAME, \"\\\" must be accessed from a Vue instance \\\"this\\\" context.\"), NAME_MODAL);\n }\n\n return this[PROP_NAME_PRIV];\n }\n });\n }\n};\n\nexport var BVModalPlugin = /*#__PURE__*/pluginFactory({\n plugins: {\n plugin: plugin\n }\n});","import { BModal } from './modal';\nimport { VBModal } from '../../directives/modal/modal';\nimport { BVModalPlugin } from './helpers/bv-modal';\nimport { pluginFactory } from '../../utils/plugins';\nvar ModalPlugin = /*#__PURE__*/pluginFactory({\n components: {\n BModal: BModal\n },\n directives: {\n VBModal: VBModal\n },\n // $bvModal injection\n plugins: {\n BVModalPlugin: BVModalPlugin\n }\n});\nexport { ModalPlugin, BModal };","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_NAV } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config'; // -- Constants --\n\nexport var props = makePropsConfigurable({\n tag: {\n type: String,\n default: 'ul'\n },\n fill: {\n type: Boolean,\n default: false\n },\n justified: {\n type: Boolean,\n default: false\n },\n align: {\n type: String // default: null\n\n },\n tabs: {\n type: Boolean,\n default: false\n },\n pills: {\n type: Boolean,\n default: false\n },\n vertical: {\n type: Boolean,\n default: false\n },\n small: {\n type: Boolean,\n default: false\n },\n cardHeader: {\n // Set to true if placing in a card header\n type: Boolean,\n default: false\n }\n}, NAME_NAV); // -- Utils --\n\nvar computeJustifyContent = function computeJustifyContent(value) {\n // Normalize value\n value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;\n return \"justify-content-\".concat(value);\n}; // @vue/component\n\n\nexport var BNav = /*#__PURE__*/Vue.extend({\n name: NAME_NAV,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var _class;\n\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n return h(props.tag, mergeData(data, {\n staticClass: 'nav',\n class: (_class = {\n 'nav-tabs': props.tabs,\n 'nav-pills': props.pills && !props.tabs,\n 'card-header-tabs': !props.vertical && props.cardHeader && props.tabs,\n 'card-header-pills': !props.vertical && props.cardHeader && props.pills && !props.tabs,\n 'flex-column': props.vertical,\n 'nav-fill': !props.vertical && props.fill,\n 'nav-justified': !props.vertical && props.justified\n }, _defineProperty(_class, computeJustifyContent(props.align), !props.vertical && props.align), _defineProperty(_class, \"small\", props.small), _class)\n }), children);\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_NAV_ITEM } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { omit } from '../../utils/object';\nimport { BLink, props as BLinkProps } from '../link/link'; // --- Props ---\n\nexport var props = makePropsConfigurable(_objectSpread(_objectSpread({}, omit(BLinkProps, ['event', 'routerTag'])), {}, {\n linkAttrs: {\n type: Object,\n default: function _default() {}\n },\n linkClasses: {\n type: [String, Object, Array],\n default: null\n }\n}), NAME_NAV_ITEM); // --- Main component ---\n// @vue/component\n\nexport var BNavItem = /*#__PURE__*/Vue.extend({\n name: NAME_NAV_ITEM,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n listeners = _ref.listeners,\n children = _ref.children;\n // We transfer the listeners to the link\n delete data.on;\n return h('li', mergeData(data, {\n staticClass: 'nav-item'\n }), [h(BLink, {\n staticClass: 'nav-link',\n class: props.linkClasses,\n attrs: props.linkAttrs,\n props: props,\n on: listeners\n }, children)]);\n }\n});","import Vue, { mergeData } from '../../vue';\nimport { NAME_NAV_TEXT } from '../../constants/components';\nexport var props = {}; // @vue/component\n\nexport var BNavText = /*#__PURE__*/Vue.extend({\n name: NAME_NAV_TEXT,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var data = _ref.data,\n children = _ref.children;\n return h('li', mergeData(data, {\n staticClass: 'navbar-text'\n }), children);\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_NAV_FORM } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { omit } from '../../utils/object';\nimport { BForm, props as BFormProps } from '../form/form';\nexport var props = makePropsConfigurable(_objectSpread(_objectSpread({}, omit(BFormProps, ['inline'])), {}, {\n formClass: {\n type: [String, Array, Object] // default: null\n\n }\n}), NAME_NAV_FORM); // @vue/component\n\nexport var BNavForm = /*#__PURE__*/Vue.extend({\n name: NAME_NAV_FORM,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children,\n _ref$listeners = _ref.listeners,\n listeners = _ref$listeners === void 0 ? {} : _ref$listeners;\n var attrs = data.attrs; // The following data properties are cleared out\n // as they will be passed to BForm directly\n\n data.attrs = {};\n data.on = {};\n var $form = h(BForm, {\n class: props.formClass,\n props: _objectSpread(_objectSpread({}, props), {}, {\n inline: true\n }),\n attrs: attrs,\n on: listeners\n }, children);\n return h('li', mergeData(data, {\n staticClass: 'form-inline'\n }), [$form]);\n }\n});","import Vue from '../../vue';\nimport { NAME_NAV_ITEM_DROPDOWN } from '../../constants/components';\nimport { SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_DEFAULT, SLOT_NAME_TEXT } from '../../constants/slot-names';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { htmlOrText } from '../../utils/html';\nimport { pluckProps } from '../../utils/props';\nimport dropdownMixin from '../../mixins/dropdown';\nimport idMixin from '../../mixins/id';\nimport normalizeSlotMixin from '../../mixins/normalize-slot';\nimport { props as BDropdownProps } from '../dropdown/dropdown';\nimport { BLink } from '../link/link'; // --- Props ---\n\nexport var props = makePropsConfigurable(pluckProps(['text', 'html', 'menuClass', 'toggleClass', 'noCaret', 'role', 'lazy'], BDropdownProps), NAME_NAV_ITEM_DROPDOWN); // --- Main component ---\n// @vue/component\n\nexport var BNavItemDropdown = /*#__PURE__*/Vue.extend({\n name: NAME_NAV_ITEM_DROPDOWN,\n mixins: [idMixin, dropdownMixin, normalizeSlotMixin],\n props: props,\n computed: {\n toggleId: function toggleId() {\n return this.safeId('_BV_toggle_');\n },\n dropdownClasses: function dropdownClasses() {\n return [this.directionClass, this.boundaryClass, {\n show: this.visible\n }];\n },\n menuClasses: function menuClasses() {\n return [this.menuClass, {\n 'dropdown-menu-right': this.right,\n show: this.visible\n }];\n },\n toggleClasses: function toggleClasses() {\n return [this.toggleClass, {\n 'dropdown-toggle-no-caret': this.noCaret\n }];\n }\n },\n render: function render(h) {\n var toggleId = this.toggleId,\n visible = this.visible;\n var $toggle = h(BLink, {\n staticClass: 'nav-link dropdown-toggle',\n class: this.toggleClasses,\n props: {\n href: \"#\".concat(this.id || ''),\n disabled: this.disabled\n },\n attrs: {\n id: toggleId,\n role: 'button',\n 'aria-haspopup': 'true',\n 'aria-expanded': visible ? 'true' : 'false'\n },\n on: {\n mousedown: this.onMousedown,\n click: this.toggle,\n keydown: this.toggle // Handle ENTER, SPACE and DOWN\n\n },\n ref: 'toggle'\n }, [// TODO: The `text` slot is deprecated in favor of the `button-content` slot\n this.normalizeSlot([SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_TEXT]) || h('span', {\n domProps: htmlOrText(this.html, this.text)\n })]);\n var $menu = h('ul', {\n staticClass: 'dropdown-menu',\n class: this.menuClasses,\n attrs: {\n tabindex: '-1',\n 'aria-labelledby': toggleId\n },\n on: {\n keydown: this.onKeydown // Handle UP, DOWN and ESC\n\n },\n ref: 'menu'\n }, !this.lazy || visible ? this.normalizeSlot(SLOT_NAME_DEFAULT, {\n hide: this.hide\n }) : [h()]);\n return h('li', {\n staticClass: 'nav-item b-nav-dropdown dropdown',\n class: this.dropdownClasses,\n attrs: {\n id: this.safeId()\n }\n }, [$toggle, $menu]);\n }\n});","import { BNav } from './nav';\nimport { BNavItem } from './nav-item';\nimport { BNavText } from './nav-text';\nimport { BNavForm } from './nav-form';\nimport { BNavItemDropdown } from './nav-item-dropdown';\nimport { DropdownPlugin } from '../dropdown';\nimport { pluginFactory } from '../../utils/plugins';\nvar NavPlugin = /*#__PURE__*/pluginFactory({\n components: {\n BNav: BNav,\n BNavItem: BNavItem,\n BNavText: BNavText,\n BNavForm: BNavForm,\n BNavItemDropdown: BNavItemDropdown,\n BNavItemDd: BNavItemDropdown,\n BNavDropdown: BNavItemDropdown,\n BNavDd: BNavItemDropdown\n },\n plugins: {\n DropdownPlugin: DropdownPlugin\n }\n});\nexport { NavPlugin, BNav, BNavItem, BNavText, BNavForm, BNavItemDropdown };","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue from '../../vue';\nimport { NAME_NAVBAR } from '../../constants/components';\nimport { makePropsConfigurable, getBreakpoints } from '../../utils/config';\nimport { isTag } from '../../utils/dom';\nimport { isString } from '../../utils/inspect';\nimport normalizeSlotMixin from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tag: {\n type: String,\n default: 'nav'\n },\n type: {\n type: String,\n default: 'light'\n },\n variant: {\n type: String // default: undefined\n\n },\n toggleable: {\n type: [Boolean, String],\n default: false\n },\n fixed: {\n type: String\n },\n sticky: {\n type: Boolean,\n default: false\n },\n print: {\n type: Boolean,\n default: false\n }\n}, NAME_NAVBAR); // --- Main component ---\n// @vue/component\n\nexport var BNavbar = /*#__PURE__*/Vue.extend({\n name: NAME_NAVBAR,\n mixins: [normalizeSlotMixin],\n provide: function provide() {\n return {\n bvNavbar: this\n };\n },\n props: props,\n computed: {\n breakpointClass: function breakpointClass() {\n var breakpoint = null;\n var xs = getBreakpoints()[0];\n var toggleable = this.toggleable;\n\n if (toggleable && isString(toggleable) && toggleable !== xs) {\n breakpoint = \"navbar-expand-\".concat(toggleable);\n } else if (toggleable === false) {\n breakpoint = 'navbar-expand';\n }\n\n return breakpoint;\n }\n },\n render: function render(h) {\n var _ref;\n\n return h(this.tag, {\n staticClass: 'navbar',\n class: [(_ref = {\n 'd-print': this.print,\n 'sticky-top': this.sticky\n }, _defineProperty(_ref, \"navbar-\".concat(this.type), this.type), _defineProperty(_ref, \"bg-\".concat(this.variant), this.variant), _defineProperty(_ref, \"fixed-\".concat(this.fixed), this.fixed), _ref), this.breakpointClass],\n attrs: {\n role: isTag(this.tag, 'nav') ? null : 'navigation'\n }\n }, [this.normalizeSlot()]);\n }\n});","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_NAVBAR_NAV } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { pluckProps } from '../../utils/props';\nimport { props as BNavProps } from '../nav/nav'; // -- Constants --\n\nexport var props = makePropsConfigurable(pluckProps(['tag', 'fill', 'justified', 'align', 'small'], BNavProps), NAME_NAVBAR_NAV); // -- Utils --\n\nvar computeJustifyContent = function computeJustifyContent(value) {\n // Normalize value\n value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;\n return \"justify-content-\".concat(value);\n}; // @vue/component\n\n\nexport var BNavbarNav = /*#__PURE__*/Vue.extend({\n name: NAME_NAVBAR_NAV,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var _class;\n\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n return h(props.tag, mergeData(data, {\n staticClass: 'navbar-nav',\n class: (_class = {\n 'nav-fill': props.fill,\n 'nav-justified': props.justified\n }, _defineProperty(_class, computeJustifyContent(props.align), props.align), _defineProperty(_class, \"small\", props.small), _class)\n }), children);\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_NAVBAR_BRAND } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { omit } from '../../utils/object';\nimport { pluckProps } from '../../utils/props';\nimport { BLink, props as BLinkProps } from '../link/link'; // --- Props ---\n\nvar linkProps = omit(BLinkProps, ['event', 'routerTag']);\nlinkProps.href.default = undefined;\nlinkProps.to.default = undefined;\nexport var props = makePropsConfigurable(_objectSpread({\n tag: {\n type: String,\n default: 'div'\n }\n}, linkProps), NAME_NAVBAR_BRAND); // --- Main component ---\n// @vue/component\n\nexport var BNavbarBrand = /*#__PURE__*/Vue.extend({\n name: NAME_NAVBAR_BRAND,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var isLink = props.to || props.href;\n var tag = isLink ? BLink : props.tag;\n return h(tag, mergeData(data, {\n staticClass: 'navbar-brand',\n props: isLink ? pluckProps(linkProps, props) : {}\n }), children);\n }\n});","import Vue from '../../vue';\nimport { NAME_NAVBAR_TOGGLE } from '../../constants/components';\nimport { SLOT_NAME_DEFAULT } from '../../constants/slot-names';\nimport { makePropsConfigurable } from '../../utils/config';\nimport listenOnRootMixin from '../../mixins/listen-on-root';\nimport normalizeSlotMixin from '../../mixins/normalize-slot';\nimport { VBToggle, EVENT_STATE, EVENT_STATE_SYNC } from '../../directives/toggle/toggle'; // --- Constants ---\n\nvar CLASS_NAME = 'navbar-toggler'; // --- Main component ---\n// @vue/component\n\nexport var BNavbarToggle = /*#__PURE__*/Vue.extend({\n name: NAME_NAVBAR_TOGGLE,\n directives: {\n VBToggle: VBToggle\n },\n mixins: [listenOnRootMixin, normalizeSlotMixin],\n props: makePropsConfigurable({\n label: {\n type: String,\n default: 'Toggle navigation'\n },\n target: {\n type: [Array, String],\n required: true\n },\n disabled: {\n type: Boolean,\n default: false\n }\n }, NAME_NAVBAR_TOGGLE),\n data: function data() {\n return {\n toggleState: false\n };\n },\n created: function created() {\n this.listenOnRoot(EVENT_STATE, this.handleStateEvt);\n this.listenOnRoot(EVENT_STATE_SYNC, this.handleStateEvt);\n },\n methods: {\n onClick: function onClick(evt) {\n if (!this.disabled) {\n // Emit courtesy `click` event\n this.$emit('click', evt);\n }\n },\n handleStateEvt: function handleStateEvt(id, state) {\n // We listen for state events so that we can pass the\n // boolean expanded state to the default scoped slot\n if (id === this.target) {\n this.toggleState = state;\n }\n }\n },\n render: function render(h) {\n var disabled = this.disabled;\n return h('button', {\n staticClass: CLASS_NAME,\n class: {\n disabled: disabled\n },\n directives: [{\n name: 'VBToggle',\n value: this.target\n }],\n attrs: {\n type: 'button',\n disabled: disabled,\n 'aria-label': this.label\n },\n on: {\n click: this.onClick\n }\n }, [this.normalizeSlot(SLOT_NAME_DEFAULT, {\n expanded: this.toggleState\n }) || h('span', {\n staticClass: \"\".concat(CLASS_NAME, \"-icon\")\n })]);\n }\n});","import { BNavbar } from './navbar';\nimport { BNavbarNav } from './navbar-nav';\nimport { BNavbarBrand } from './navbar-brand';\nimport { BNavbarToggle } from './navbar-toggle';\nimport { NavPlugin } from '../nav';\nimport { CollapsePlugin } from '../collapse';\nimport { DropdownPlugin } from '../dropdown';\nimport { pluginFactory } from '../../utils/plugins';\nvar NavbarPlugin = /*#__PURE__*/pluginFactory({\n components: {\n BNavbar: BNavbar,\n BNavbarNav: BNavbarNav,\n BNavbarBrand: BNavbarBrand,\n BNavbarToggle: BNavbarToggle,\n BNavToggle: BNavbarToggle\n },\n plugins: {\n NavPlugin: NavPlugin,\n CollapsePlugin: CollapsePlugin,\n DropdownPlugin: DropdownPlugin\n }\n});\nexport { NavbarPlugin, BNavbar, BNavbarNav, BNavbarBrand, BNavbarToggle };","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue, { mergeData } from '../../vue';\nimport { NAME_SPINNER } from '../../constants/components';\nimport { SLOT_NAME_LABEL } from '../../constants/slot-names';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { normalizeSlot } from '../../utils/normalize-slot'; // @vue/component\n\nexport var BSpinner = /*#__PURE__*/Vue.extend({\n name: NAME_SPINNER,\n functional: true,\n props: makePropsConfigurable({\n type: {\n type: String,\n default: 'border' // SCSS currently supports 'border' or 'grow'\n\n },\n label: {\n type: String // default: null\n\n },\n variant: {\n type: String // default: undefined\n\n },\n small: {\n type: Boolean,\n default: false\n },\n role: {\n type: String,\n default: 'status'\n },\n tag: {\n type: String,\n default: 'span'\n }\n }, NAME_SPINNER),\n render: function render(h, _ref) {\n var _class;\n\n var props = _ref.props,\n data = _ref.data,\n slots = _ref.slots,\n scopedSlots = _ref.scopedSlots;\n var $slots = slots();\n var $scopedSlots = scopedSlots || {};\n var label = normalizeSlot(SLOT_NAME_LABEL, {}, $scopedSlots, $slots) || props.label;\n\n if (label) {\n label = h('span', {\n staticClass: 'sr-only'\n }, label);\n }\n\n return h(props.tag, mergeData(data, {\n attrs: {\n role: label ? props.role || 'status' : null,\n 'aria-hidden': label ? null : 'true'\n },\n class: (_class = {}, _defineProperty(_class, \"spinner-\".concat(props.type), props.type), _defineProperty(_class, \"spinner-\".concat(props.type, \"-sm\"), props.small), _defineProperty(_class, \"text-\".concat(props.variant), props.variant), _class)\n }), [label || h()]);\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue from '../../vue';\nimport { NAME_OVERLAY } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/config';\nimport { BVTransition } from '../../utils/bv-transition';\nimport { toFloat } from '../../utils/number';\nimport normalizeSlotMixin from '../../mixins/normalize-slot';\nimport { BSpinner } from '../spinner/spinner';\nvar positionCover = {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0\n};\nexport var BOverlay = /*#__PURE__*/Vue.extend({\n name: NAME_OVERLAY,\n mixins: [normalizeSlotMixin],\n props: makePropsConfigurable({\n show: {\n type: Boolean,\n default: false\n },\n variant: {\n type: String,\n default: 'light'\n },\n bgColor: {\n // Alternative to variant, allowing a specific\n // CSS color to be applied to the overlay\n type: String // default: null\n\n },\n opacity: {\n type: [Number, String],\n default: 0.85,\n validator: function validator(value) {\n var number = toFloat(value, 0);\n return number >= 0 && number <= 1;\n }\n },\n blur: {\n type: String,\n default: '2px'\n },\n rounded: {\n type: [Boolean, String],\n default: false\n },\n noCenter: {\n type: Boolean,\n default: false\n },\n noFade: {\n type: Boolean,\n default: false\n },\n spinnerType: {\n type: String,\n default: 'border'\n },\n spinnerVariant: {\n type: String // default: null\n\n },\n spinnerSmall: {\n type: Boolean,\n default: false\n },\n overlayTag: {\n type: String,\n default: 'div'\n },\n wrapTag: {\n type: String,\n default: 'div'\n },\n noWrap: {\n // If set, does not render the default slot\n // and switches to absolute positioning\n type: Boolean,\n default: false\n },\n fixed: {\n type: Boolean,\n default: false\n },\n zIndex: {\n type: [Number, String],\n default: 10\n }\n }, NAME_OVERLAY),\n computed: {\n computedRounded: function computedRounded() {\n var rounded = this.rounded;\n return rounded === true || rounded === '' ? 'rounded' : !rounded ? '' : \"rounded-\".concat(rounded);\n },\n computedVariant: function computedVariant() {\n return this.variant && !this.bgColor ? \"bg-\".concat(this.variant) : '';\n },\n overlayScope: function overlayScope() {\n return {\n spinnerType: this.spinnerType || null,\n spinnerVariant: this.spinnerVariant || null,\n spinnerSmall: this.spinnerSmall\n };\n }\n },\n methods: {\n defaultOverlayFn: function defaultOverlayFn(_ref) {\n var spinnerType = _ref.spinnerType,\n spinnerVariant = _ref.spinnerVariant,\n spinnerSmall = _ref.spinnerSmall;\n return this.$createElement(BSpinner, {\n props: {\n type: spinnerType,\n variant: spinnerVariant,\n small: spinnerSmall\n }\n });\n }\n },\n render: function render(h) {\n var _this = this;\n\n var $overlay = h();\n\n if (this.show) {\n var scope = this.overlayScope; // Overlay backdrop\n\n var $background = h('div', {\n staticClass: 'position-absolute',\n class: [this.computedVariant, this.computedRounded],\n style: _objectSpread(_objectSpread({}, positionCover), {}, {\n opacity: this.opacity,\n backgroundColor: this.bgColor || null,\n backdropFilter: this.blur ? \"blur(\".concat(this.blur, \")\") : null\n })\n }); // Overlay content\n\n var $content = h('div', {\n staticClass: 'position-absolute',\n style: this.noCenter ?\n /* istanbul ignore next */\n _objectSpread({}, positionCover) : {\n top: '50%',\n left: '50%',\n transform: 'translateX(-50%) translateY(-50%)'\n }\n }, [this.normalizeSlot('overlay', scope) || this.defaultOverlayFn(scope)]); // Overlay positioning\n\n $overlay = h(this.overlayTag, {\n key: 'overlay',\n staticClass: 'b-overlay',\n class: {\n 'position-absolute': !this.noWrap || this.noWrap && !this.fixed,\n 'position-fixed': this.noWrap && this.fixed\n },\n style: _objectSpread(_objectSpread({}, positionCover), {}, {\n zIndex: this.zIndex || 10\n }),\n on: {\n click: function click(evt) {\n return _this.$emit('click', evt);\n }\n }\n }, [$background, $content]);\n } // Wrap in a fade transition\n\n\n $overlay = h(BVTransition, {\n props: {\n noFade: this.noFade,\n appear: true\n },\n on: {\n 'after-enter': function afterEnter() {\n return _this.$emit('shown');\n },\n 'after-leave': function afterLeave() {\n return _this.$emit('hidden');\n }\n }\n }, [$overlay]);\n\n if (this.noWrap) {\n return $overlay;\n }\n\n return h(this.wrapTag, {\n staticClass: 'b-overlay-wrap position-relative',\n attrs: {\n 'aria-busy': this.show ? 'true' : null\n }\n }, this.noWrap ? [$overlay] : [this.normalizeSlot(), $overlay]);\n }\n});","import { BOverlay } from './overlay';\nimport { pluginFactory } from '../../utils/plugins';\nvar OverlayPlugin = /*#__PURE__*/pluginFactory({\n components: {\n BOverlay: BOverlay\n }\n});\nexport { OverlayPlugin, BOverlay };","/**\n * @param {number} length\n * @return {Array}\n */\nvar range = function range(length) {\n return Array.apply(null, {\n length: length\n });\n};\n\nexport default range;","import { NAME_PAGINATION } from '../constants/components';\nimport { CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_SPACE, CODE_UP } from '../constants/key-codes';\nimport range from '../utils/range';\nimport { makePropsConfigurable } from '../utils/config';\nimport { attemptFocus, getActiveElement, getAttr, isDisabled, isVisible, selectAll } from '../utils/dom';\nimport { stopEvent } from '../utils/events';\nimport { isFunction, isNull, isUndefined } from '../utils/inspect';\nimport { mathFloor, mathMax, mathMin } from '../utils/math';\nimport { toInteger } from '../utils/number';\nimport { toString } from '../utils/string';\nimport { warn } from '../utils/warn';\nimport normalizeSlotMixin from '../mixins/normalize-slot';\nimport { BLink } from '../components/link/link'; // Common props, computed, data, render function, and methods\n// for `
` and ``\n// --- Constants ---\n// Threshold of limit size when we start/stop showing ellipsis\n\nvar ELLIPSIS_THRESHOLD = 3; // Default # of buttons limit\n\nvar DEFAULT_LIMIT = 5; // --- Helper methods ---\n// Make an array of N to N+X\n\nvar makePageArray = function makePageArray(startNumber, numberOfPages) {\n return range(numberOfPages).map(function (val, i) {\n return {\n number: startNumber + i,\n classes: null\n };\n });\n}; // Sanitize the provided limit value (converting to a number)\n\n\nvar sanitizeLimit = function sanitizeLimit(val) {\n var limit = toInteger(val) || 1;\n return limit < 1 ? DEFAULT_LIMIT : limit;\n}; // Sanitize the provided current page number (converting to a number)\n\n\nvar sanitizeCurrentPage = function sanitizeCurrentPage(val, numberOfPages) {\n var page = toInteger(val) || 1;\n return page > numberOfPages ? numberOfPages : page < 1 ? 1 : page;\n}; // Links don't normally respond to SPACE, so we add that\n// functionality via this handler\n\n\nvar onSpaceKey = function onSpaceKey(evt) {\n if (evt.keyCode === CODE_SPACE) {\n // Stop page from scrolling\n stopEvent(evt, {\n immediatePropagation: true\n }); // Trigger the click event on the link\n\n evt.currentTarget.click();\n return false;\n }\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable({\n disabled: {\n type: Boolean,\n default: false\n },\n value: {\n type: [Number, String],\n default: null,\n\n /* istanbul ignore next */\n validator: function validator(value) {\n if (!isNull(value) && toInteger(value, 0) < 1) {\n warn('\"v-model\" value must be a number greater than \"0\"', NAME_PAGINATION);\n return false;\n }\n\n return true;\n }\n },\n limit: {\n type: [Number, String],\n default: DEFAULT_LIMIT,\n\n /* istanbul ignore next */\n validator: function validator(value) {\n if (toInteger(value, 0) < 1) {\n warn('Prop \"limit\" must be a number greater than \"0\"', NAME_PAGINATION);\n return false;\n }\n\n return true;\n }\n },\n align: {\n type: String,\n default: 'left'\n },\n pills: {\n type: Boolean,\n default: false\n },\n hideGotoEndButtons: {\n type: Boolean,\n default: false\n },\n ariaLabel: {\n type: String,\n default: 'Pagination'\n },\n labelFirstPage: {\n type: String,\n default: 'Go to first page'\n },\n firstText: {\n type: String,\n default: \"\\xAB\" // '«'\n\n },\n firstNumber: {\n type: Boolean,\n default: false\n },\n firstClass: {\n type: [String, Array, Object],\n default: null\n },\n labelPrevPage: {\n type: String,\n default: 'Go to previous page'\n },\n prevText: {\n type: String,\n default: \"\\u2039\" // '‹'\n\n },\n prevClass: {\n type: [String, Array, Object],\n default: null\n },\n labelNextPage: {\n type: String,\n default: 'Go to next page'\n },\n nextText: {\n type: String,\n default: \"\\u203A\" // '›'\n\n },\n nextClass: {\n type: [String, Array, Object] // default: null\n\n },\n labelLastPage: {\n type: String,\n default: 'Go to last page'\n },\n lastText: {\n type: String,\n default: \"\\xBB\" // '»'\n\n },\n lastNumber: {\n type: Boolean,\n default: false\n },\n lastClass: {\n type: [String, Array, Object] // default: null\n\n },\n labelPage: {\n type: [String, Function],\n default: 'Go to page'\n },\n pageClass: {\n type: [String, Array, Object] // default: null\n\n },\n hideEllipsis: {\n type: Boolean,\n default: false\n },\n ellipsisText: {\n type: String,\n default: \"\\u2026\" // '…'\n\n },\n ellipsisClass: {\n type: [String, Array, Object] // default: null\n\n }\n}, NAME_PAGINATION); // --- Mixin ---\n// @vue/component\n\nexport default {\n mixins: [normalizeSlotMixin],\n model: {\n prop: 'value',\n event: 'input'\n },\n props: props,\n data: function data() {\n // `-1` signifies no page initially selected\n var currentPage = toInteger(this.value, 0);\n currentPage = currentPage > 0 ? currentPage : -1;\n return {\n currentPage: currentPage,\n localNumberOfPages: 1,\n localLimit: DEFAULT_LIMIT\n };\n },\n computed: {\n btnSize: function btnSize() {\n return this.size ? \"pagination-\".concat(this.size) : '';\n },\n alignment: function alignment() {\n var align = this.align;\n\n if (align === 'center') {\n return 'justify-content-center';\n } else if (align === 'end' || align === 'right') {\n return 'justify-content-end';\n } else if (align === 'fill') {\n // The page-items will also have 'flex-fill' added\n // We add text centering to make the button appearance better in fill mode\n return 'text-center';\n }\n\n return '';\n },\n styleClass: function styleClass() {\n return this.pills ? 'b-pagination-pills' : '';\n },\n computedCurrentPage: function computedCurrentPage() {\n return sanitizeCurrentPage(this.currentPage, this.localNumberOfPages);\n },\n paginationParams: function paginationParams() {\n // Determine if we should show the the ellipsis\n var limit = this.localLimit,\n numberOfPages = this.localNumberOfPages,\n currentPage = this.computedCurrentPage,\n hideEllipsis = this.hideEllipsis,\n firstNumber = this.firstNumber,\n lastNumber = this.lastNumber;\n var showFirstDots = false;\n var showLastDots = false;\n var numberOfLinks = limit;\n var startNumber = 1;\n\n if (numberOfPages <= limit) {\n // Special case: Less pages available than the limit of displayed pages\n numberOfLinks = numberOfPages;\n } else if (currentPage < limit - 1 && limit > ELLIPSIS_THRESHOLD) {\n if (!hideEllipsis || lastNumber) {\n showLastDots = true;\n numberOfLinks = limit - (firstNumber ? 0 : 1);\n }\n\n numberOfLinks = mathMin(numberOfLinks, limit);\n } else if (numberOfPages - currentPage + 2 < limit && limit > ELLIPSIS_THRESHOLD) {\n if (!hideEllipsis || firstNumber) {\n showFirstDots = true;\n numberOfLinks = limit - (lastNumber ? 0 : 1);\n }\n\n startNumber = numberOfPages - numberOfLinks + 1;\n } else {\n // We are somewhere in the middle of the page list\n if (limit > ELLIPSIS_THRESHOLD) {\n numberOfLinks = limit - (hideEllipsis ? 0 : 2);\n showFirstDots = !!(!hideEllipsis || firstNumber);\n showLastDots = !!(!hideEllipsis || lastNumber);\n }\n\n startNumber = currentPage - mathFloor(numberOfLinks / 2);\n } // Sanity checks\n\n /* istanbul ignore if */\n\n\n if (startNumber < 1) {\n startNumber = 1;\n showFirstDots = false;\n } else if (startNumber > numberOfPages - numberOfLinks) {\n startNumber = numberOfPages - numberOfLinks + 1;\n showLastDots = false;\n }\n\n if (showFirstDots && firstNumber && startNumber < 4) {\n numberOfLinks = numberOfLinks + 2;\n startNumber = 1;\n showFirstDots = false;\n }\n\n var lastPageNumber = startNumber + numberOfLinks - 1;\n\n if (showLastDots && lastNumber && lastPageNumber > numberOfPages - 3) {\n numberOfLinks = numberOfLinks + (lastPageNumber === numberOfPages - 2 ? 2 : 3);\n showLastDots = false;\n } // Special handling for lower limits (where ellipsis are never shown)\n\n\n if (limit <= ELLIPSIS_THRESHOLD) {\n if (firstNumber && startNumber === 1) {\n numberOfLinks = mathMin(numberOfLinks + 1, numberOfPages, limit + 1);\n } else if (lastNumber && numberOfPages === startNumber + numberOfLinks - 1) {\n startNumber = mathMax(startNumber - 1, 1);\n numberOfLinks = mathMin(numberOfPages - startNumber + 1, numberOfPages, limit + 1);\n }\n }\n\n numberOfLinks = mathMin(numberOfLinks, numberOfPages - startNumber + 1);\n return {\n showFirstDots: showFirstDots,\n showLastDots: showLastDots,\n numberOfLinks: numberOfLinks,\n startNumber: startNumber\n };\n },\n pageList: function pageList() {\n // Generates the pageList array\n var _this$paginationParam = this.paginationParams,\n numberOfLinks = _this$paginationParam.numberOfLinks,\n startNumber = _this$paginationParam.startNumber;\n var currentPage = this.computedCurrentPage; // Generate list of page numbers\n\n var pages = makePageArray(startNumber, numberOfLinks); // We limit to a total of 3 page buttons on XS screens\n // So add classes to page links to hide them for XS breakpoint\n // Note: Ellipsis will also be hidden on XS screens\n // TODO: Make this visual limit configurable based on breakpoint(s)\n\n if (pages.length > 3) {\n var idx = currentPage - startNumber; // THe following is a bootstrap-vue custom utility class\n\n var classes = 'bv-d-xs-down-none';\n\n if (idx === 0) {\n // Keep leftmost 3 buttons visible when current page is first page\n for (var i = 3; i < pages.length; i++) {\n pages[i].classes = classes;\n }\n } else if (idx === pages.length - 1) {\n // Keep rightmost 3 buttons visible when current page is last page\n for (var _i = 0; _i < pages.length - 3; _i++) {\n pages[_i].classes = classes;\n }\n } else {\n // Hide all except current page, current page - 1 and current page + 1\n for (var _i2 = 0; _i2 < idx - 1; _i2++) {\n // hide some left button(s)\n pages[_i2].classes = classes;\n }\n\n for (var _i3 = pages.length - 1; _i3 > idx + 1; _i3--) {\n // hide some right button(s)\n pages[_i3].classes = classes;\n }\n }\n }\n\n return pages;\n }\n },\n watch: {\n value: function value(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.currentPage = sanitizeCurrentPage(newValue, this.localNumberOfPages);\n }\n },\n currentPage: function currentPage(newValue, oldValue) {\n if (newValue !== oldValue) {\n // Emit `null` if no page selected\n this.$emit('input', newValue > 0 ? newValue : null);\n }\n },\n limit: function limit(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.localLimit = sanitizeLimit(newValue);\n }\n }\n },\n created: function created() {\n var _this = this;\n\n // Set our default values in data\n this.localLimit = sanitizeLimit(this.limit);\n this.$nextTick(function () {\n // Sanity check\n _this.currentPage = _this.currentPage > _this.localNumberOfPages ? _this.localNumberOfPages : _this.currentPage;\n });\n },\n methods: {\n handleKeyNav: function handleKeyNav(evt) {\n var keyCode = evt.keyCode,\n shiftKey = evt.shiftKey;\n /* istanbul ignore if */\n\n if (this.isNav) {\n // We disable left/right keyboard navigation in ``\n return;\n }\n\n if (keyCode === CODE_LEFT || keyCode === CODE_UP) {\n stopEvent(evt, {\n propagation: false\n });\n shiftKey ? this.focusFirst() : this.focusPrev();\n } else if (keyCode === CODE_RIGHT || keyCode === CODE_DOWN) {\n stopEvent(evt, {\n propagation: false\n });\n shiftKey ? this.focusLast() : this.focusNext();\n }\n },\n getButtons: function getButtons() {\n // Return only buttons that are visible\n return selectAll('button.page-link, a.page-link', this.$el).filter(function (btn) {\n return isVisible(btn);\n });\n },\n focusCurrent: function focusCurrent() {\n var _this2 = this;\n\n // We do this in `$nextTick()` to ensure buttons have finished rendering\n this.$nextTick(function () {\n var btn = _this2.getButtons().find(function (el) {\n return toInteger(getAttr(el, 'aria-posinset'), 0) === _this2.computedCurrentPage;\n });\n\n if (!attemptFocus(btn)) {\n // Fallback if current page is not in button list\n _this2.focusFirst();\n }\n });\n },\n focusFirst: function focusFirst() {\n var _this3 = this;\n\n // We do this in `$nextTick()` to ensure buttons have finished rendering\n this.$nextTick(function () {\n var btn = _this3.getButtons().find(function (el) {\n return !isDisabled(el);\n });\n\n attemptFocus(btn);\n });\n },\n focusLast: function focusLast() {\n var _this4 = this;\n\n // We do this in `$nextTick()` to ensure buttons have finished rendering\n this.$nextTick(function () {\n var btn = _this4.getButtons().reverse().find(function (el) {\n return !isDisabled(el);\n });\n\n attemptFocus(btn);\n });\n },\n focusPrev: function focusPrev() {\n var _this5 = this;\n\n // We do this in `$nextTick()` to ensure buttons have finished rendering\n this.$nextTick(function () {\n var buttons = _this5.getButtons();\n\n var index = buttons.indexOf(getActiveElement());\n\n if (index > 0 && !isDisabled(buttons[index - 1])) {\n attemptFocus(buttons[index - 1]);\n }\n });\n },\n focusNext: function focusNext() {\n var _this6 = this;\n\n // We do this in `$nextTick()` to ensure buttons have finished rendering\n this.$nextTick(function () {\n var buttons = _this6.getButtons();\n\n var index = buttons.indexOf(getActiveElement());\n\n if (index < buttons.length - 1 && !isDisabled(buttons[index + 1])) {\n attemptFocus(buttons[index + 1]);\n }\n });\n }\n },\n render: function render(h) {\n var _this7 = this;\n\n var buttons = [];\n var numberOfPages = this.localNumberOfPages;\n var pageNumbers = this.pageList.map(function (p) {\n return p.number;\n });\n var disabled = this.disabled;\n var _this$paginationParam2 = this.paginationParams,\n showFirstDots = _this$paginationParam2.showFirstDots,\n showLastDots = _this$paginationParam2.showLastDots;\n var currentPage = this.computedCurrentPage;\n var fill = this.align === 'fill'; // Used to control what type of aria attributes are rendered and wrapper\n\n var isNav = this.isNav; // Helper function and flag\n\n var isActivePage = function isActivePage(pageNumber) {\n return pageNumber === currentPage;\n };\n\n var noCurrentPage = this.currentPage < 1; // Factory function for prev/next/first/last buttons\n\n var makeEndBtn = function makeEndBtn(linkTo, ariaLabel, btnSlot, btnText, btnClass, pageTest, key) {\n var isDisabled = disabled || isActivePage(pageTest) || noCurrentPage || linkTo < 1 || linkTo > numberOfPages;\n var pageNumber = linkTo < 1 ? 1 : linkTo > numberOfPages ? numberOfPages : linkTo;\n var scope = {\n disabled: isDisabled,\n page: pageNumber,\n index: pageNumber - 1\n };\n var $btnContent = _this7.normalizeSlot(btnSlot, scope) || toString(btnText) || h();\n var $inner = h(isDisabled ? 'span' : isNav ? BLink : 'button', {\n staticClass: 'page-link',\n class: {\n 'flex-grow-1': !isNav && !isDisabled && fill\n },\n props: isDisabled || !isNav ? {} : _this7.linkProps(linkTo),\n attrs: {\n role: isNav ? null : 'menuitem',\n type: isNav || isDisabled ? null : 'button',\n tabindex: isDisabled || isNav ? null : '-1',\n 'aria-label': ariaLabel,\n 'aria-controls': _this7.ariaControls || null,\n 'aria-disabled': isDisabled ? 'true' : null\n },\n on: isDisabled ? {} : {\n '!click': function click(evt) {\n _this7.onClick(evt, linkTo);\n },\n keydown: onSpaceKey\n }\n }, [$btnContent]);\n return h('li', {\n key: key,\n staticClass: 'page-item',\n class: [{\n disabled: isDisabled,\n 'flex-fill': fill,\n 'd-flex': fill && !isNav && !isDisabled\n }, btnClass],\n attrs: {\n role: isNav ? null : 'presentation',\n 'aria-hidden': isDisabled ? 'true' : null\n }\n }, [$inner]);\n }; // Ellipsis factory\n\n\n var makeEllipsis = function makeEllipsis(isLast) {\n return h('li', {\n key: \"ellipsis-\".concat(isLast ? 'last' : 'first'),\n staticClass: 'page-item',\n class: ['disabled', 'bv-d-xs-down-none', fill ? 'flex-fill' : '', _this7.ellipsisClass],\n attrs: {\n role: 'separator'\n }\n }, [h('span', {\n staticClass: 'page-link'\n }, [_this7.normalizeSlot('ellipsis-text') || toString(_this7.ellipsisText) || h()])]);\n }; // Page button factory\n\n\n var makePageButton = function makePageButton(page, idx) {\n var active = isActivePage(page.number) && !noCurrentPage; // Active page will have tabindex of 0, or if no current page and first page button\n\n var tabIndex = disabled ? null : active || noCurrentPage && idx === 0 ? '0' : '-1';\n var attrs = {\n role: isNav ? null : 'menuitemradio',\n type: isNav || disabled ? null : 'button',\n 'aria-disabled': disabled ? 'true' : null,\n 'aria-controls': _this7.ariaControls || null,\n 'aria-label': isFunction(_this7.labelPage) && !isUndefined(_this7.labelPage(page.number)) ?\n /* istanbul ignore next */\n _this7.labelPage(page.number) : \"\".concat(_this7.labelPage, \" \").concat(page.number),\n 'aria-checked': isNav ? null : active ? 'true' : 'false',\n 'aria-current': isNav && active ? 'page' : null,\n 'aria-posinset': isNav ? null : page.number,\n 'aria-setsize': isNav ? null : numberOfPages,\n // ARIA \"roving tabindex\" method (except in `isNav` mode)\n tabindex: isNav ? null : tabIndex\n };\n var btnContent = toString(_this7.makePage(page.number));\n var scope = {\n page: page.number,\n index: page.number - 1,\n content: btnContent,\n active: active,\n disabled: disabled\n };\n var $inner = h(disabled ? 'span' : isNav ? BLink : 'button', {\n props: disabled || !isNav ? {} : _this7.linkProps(page.number),\n staticClass: 'page-link',\n class: {\n 'flex-grow-1': !isNav && !disabled && fill\n },\n attrs: attrs,\n on: disabled ? {} : {\n '!click': function click(evt) {\n _this7.onClick(evt, page.number);\n },\n keydown: onSpaceKey\n }\n }, [_this7.normalizeSlot('page', scope) || btnContent]);\n return h('li', {\n key: \"page-\".concat(page.number),\n staticClass: 'page-item',\n class: [{\n disabled: disabled,\n active: active,\n 'flex-fill': fill,\n 'd-flex': fill && !isNav && !disabled\n }, page.classes, _this7.pageClass],\n attrs: {\n role: isNav ? null : 'presentation'\n }\n }, [$inner]);\n }; // Goto first page button\n // Don't render button when `hideGotoEndButtons` or `firstNumber` is set\n\n\n var $firstPageBtn = h();\n\n if (!this.firstNumber && !this.hideGotoEndButtons) {\n $firstPageBtn = makeEndBtn(1, this.labelFirstPage, 'first-text', this.firstText, this.firstClass, 1, 'pagination-goto-first');\n }\n\n buttons.push($firstPageBtn); // Goto previous page button\n\n buttons.push(makeEndBtn(currentPage - 1, this.labelPrevPage, 'prev-text', this.prevText, this.prevClass, 1, 'pagination-goto-prev')); // Show first (1) button?\n\n buttons.push(this.firstNumber && pageNumbers[0] !== 1 ? makePageButton({\n number: 1\n }, 0) : h()); // First ellipsis\n\n buttons.push(showFirstDots ? makeEllipsis(false) : h()); // Individual page links\n\n this.pageList.forEach(function (page, idx) {\n var offset = showFirstDots && _this7.firstNumber && pageNumbers[0] !== 1 ? 1 : 0;\n buttons.push(makePageButton(page, idx + offset));\n }); // Last ellipsis\n\n buttons.push(showLastDots ? makeEllipsis(true) : h()); // Show last page button?\n\n buttons.push(this.lastNumber && pageNumbers[pageNumbers.length - 1] !== numberOfPages ? makePageButton({\n number: numberOfPages\n }, -1) : h()); // Goto next page button\n\n buttons.push(makeEndBtn(currentPage + 1, this.labelNextPage, 'next-text', this.nextText, this.nextClass, numberOfPages, 'pagination-goto-next')); // Goto last page button\n // Don't render button when `hideGotoEndButtons` or `lastNumber` is set\n\n var $lastPageBtn = h();\n\n if (!this.lastNumber && !this.hideGotoEndButtons) {\n $lastPageBtn = makeEndBtn(numberOfPages, this.labelLastPage, 'last-text', this.lastText, this.lastClass, numberOfPages, 'pagination-goto-last');\n }\n\n buttons.push($lastPageBtn); // Assemble the pagination buttons\n\n var $pagination = h('ul', {\n ref: 'ul',\n staticClass: 'pagination',\n class: ['b-pagination', this.btnSize, this.alignment, this.styleClass],\n attrs: {\n role: isNav ? null : 'menubar',\n 'aria-disabled': disabled ? 'true' : 'false',\n 'aria-label': isNav ? null : this.ariaLabel || null\n },\n // We disable keyboard left/right nav when ``\n on: isNav ? {} : {\n keydown: this.handleKeyNav\n }\n }, buttons); // If we are ``, wrap in `