elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n var $trigger = $(this);\n var selector = Util.getSelectorFromElement(this);\n var selectors = [].slice.call(document.querySelectorAll(selector));\n $(selectors).each(function () {\n var $target = $(this);\n var data = $target.data(DATA_KEY);\n var config = data ? 'toggle' : $trigger.data();\n\n Collapse._jQueryInterface.call($target, config);\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface;\n $.fn[NAME].Constructor = Collapse;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Collapse._jQueryInterface;\n };\n\n return Collapse;\n});","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Bootstrap dropdown.js v4.3.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : (global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));\n})(this, function ($, Popper, Util) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;\n Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n }\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n\n var NAME = 'dropdown';\n var VERSION = '4.3.1';\n var DATA_KEY = 'bs.dropdown';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $.fn[NAME];\n var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key\n\n var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key\n\n var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key\n\n var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key\n\n var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + \"|\" + ARROW_DOWN_KEYCODE + \"|\" + ESCAPE_KEYCODE);\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n CLICK: \"click\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY,\n KEYDOWN_DATA_API: \"keydown\" + EVENT_KEY + DATA_API_KEY,\n KEYUP_DATA_API: \"keyup\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n DISABLED: 'disabled',\n SHOW: 'show',\n DROPUP: 'dropup',\n DROPRIGHT: 'dropright',\n DROPLEFT: 'dropleft',\n MENURIGHT: 'dropdown-menu-right',\n MENULEFT: 'dropdown-menu-left',\n POSITION_STATIC: 'position-static'\n };\n var Selector = {\n DATA_TOGGLE: '[data-toggle=\"dropdown\"]',\n FORM_CHILD: '.dropdown form',\n MENU: '.dropdown-menu',\n NAVBAR_NAV: '.navbar-nav',\n VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n };\n var AttachmentMap = {\n TOP: 'top-start',\n TOPEND: 'top-end',\n BOTTOM: 'bottom-start',\n BOTTOMEND: 'bottom-end',\n RIGHT: 'right-start',\n RIGHTEND: 'right-end',\n LEFT: 'left-start',\n LEFTEND: 'left-end'\n };\n var Default = {\n offset: 0,\n flip: true,\n boundary: 'scrollParent',\n reference: 'toggle',\n display: 'dynamic'\n };\n var DefaultType = {\n offset: '(number|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element)',\n display: 'string'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n };\n\n var Dropdown =\n /*#__PURE__*/\n function () {\n function Dropdown(element, config) {\n this._element = element;\n this._popper = null;\n this._config = this._getConfig(config);\n this._menu = this._getMenuElement();\n this._inNavbar = this._detectNavbar();\n\n this._addEventListeners();\n } // Getters\n\n\n var _proto = Dropdown.prototype; // Public\n\n _proto.toggle = function toggle() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {\n return;\n }\n\n var parent = Dropdown._getParentFromElement(this._element);\n\n var isActive = $(this._menu).hasClass(ClassName.SHOW);\n\n Dropdown._clearMenus();\n\n if (isActive) {\n return;\n }\n\n var relatedTarget = {\n relatedTarget: this._element\n };\n var showEvent = $.Event(Event.SHOW, relatedTarget);\n $(parent).trigger(showEvent);\n\n if (showEvent.isDefaultPrevented()) {\n return;\n } // Disable totally Popper.js for Dropdown in Navbar\n\n\n if (!this._inNavbar) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper.js (https://popper.js.org/)');\n }\n\n var referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (Util.isElement(this._config.reference)) {\n referenceElement = this._config.reference; // Check if it's jQuery element\n\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0];\n }\n } // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n\n\n if (this._config.boundary !== 'scrollParent') {\n $(parent).addClass(ClassName.POSITION_STATIC);\n }\n\n this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {\n $(document.body).children().on('mouseover', null, $.noop);\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n $(this._menu).toggleClass(ClassName.SHOW);\n $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));\n };\n\n _proto.show = function show() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {\n return;\n }\n\n var relatedTarget = {\n relatedTarget: this._element\n };\n var showEvent = $.Event(Event.SHOW, relatedTarget);\n\n var parent = Dropdown._getParentFromElement(this._element);\n\n $(parent).trigger(showEvent);\n\n if (showEvent.isDefaultPrevented()) {\n return;\n }\n\n $(this._menu).toggleClass(ClassName.SHOW);\n $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));\n };\n\n _proto.hide = function hide() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {\n return;\n }\n\n var relatedTarget = {\n relatedTarget: this._element\n };\n var hideEvent = $.Event(Event.HIDE, relatedTarget);\n\n var parent = Dropdown._getParentFromElement(this._element);\n\n $(parent).trigger(hideEvent);\n\n if (hideEvent.isDefaultPrevented()) {\n return;\n }\n\n $(this._menu).toggleClass(ClassName.SHOW);\n $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));\n };\n\n _proto.dispose = function dispose() {\n $.removeData(this._element, DATA_KEY);\n $(this._element).off(EVENT_KEY);\n this._element = null;\n this._menu = null;\n\n if (this._popper !== null) {\n this._popper.destroy();\n\n this._popper = null;\n }\n };\n\n _proto.update = function update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper !== null) {\n this._popper.scheduleUpdate();\n }\n } // Private\n ;\n\n _proto._addEventListeners = function _addEventListeners() {\n var _this = this;\n\n $(this._element).on(Event.CLICK, function (event) {\n event.preventDefault();\n event.stopPropagation();\n\n _this.toggle();\n });\n };\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);\n Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);\n return config;\n };\n\n _proto._getMenuElement = function _getMenuElement() {\n if (!this._menu) {\n var parent = Dropdown._getParentFromElement(this._element);\n\n if (parent) {\n this._menu = parent.querySelector(Selector.MENU);\n }\n }\n\n return this._menu;\n };\n\n _proto._getPlacement = function _getPlacement() {\n var $parentDropdown = $(this._element.parentNode);\n var placement = AttachmentMap.BOTTOM; // Handle dropup\n\n if ($parentDropdown.hasClass(ClassName.DROPUP)) {\n placement = AttachmentMap.TOP;\n\n if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.TOPEND;\n }\n } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {\n placement = AttachmentMap.RIGHT;\n } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {\n placement = AttachmentMap.LEFT;\n } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.BOTTOMEND;\n }\n\n return placement;\n };\n\n _proto._detectNavbar = function _detectNavbar() {\n return $(this._element).closest('.navbar').length > 0;\n };\n\n _proto._getOffset = function _getOffset() {\n var _this2 = this;\n\n var offset = {};\n\n if (typeof this._config.offset === 'function') {\n offset.fn = function (data) {\n data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});\n return data;\n };\n } else {\n offset.offset = this._config.offset;\n }\n\n return offset;\n };\n\n _proto._getPopperConfig = function _getPopperConfig() {\n var popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: this._getOffset(),\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n } // Disable Popper.js if we have a static display\n\n }\n };\n\n if (this._config.display === 'static') {\n popperConfig.modifiers.applyStyle = {\n enabled: false\n };\n }\n\n return popperConfig;\n } // Static\n ;\n\n Dropdown._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $(this).data(DATA_KEY);\n\n var _config = _typeof(config) === 'object' ? config : null;\n\n if (!data) {\n data = new Dropdown(this, _config);\n $(this).data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n Dropdown._clearMenus = function _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return;\n }\n\n var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));\n\n for (var i = 0, len = toggles.length; i < len; i++) {\n var parent = Dropdown._getParentFromElement(toggles[i]);\n\n var context = $(toggles[i]).data(DATA_KEY);\n var relatedTarget = {\n relatedTarget: toggles[i]\n };\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n if (!context) {\n continue;\n }\n\n var dropdownMenu = context._menu;\n\n if (!$(parent).hasClass(ClassName.SHOW)) {\n continue;\n }\n\n if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {\n continue;\n }\n\n var hideEvent = $.Event(Event.HIDE, relatedTarget);\n $(parent).trigger(hideEvent);\n\n if (hideEvent.isDefaultPrevented()) {\n continue;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().off('mouseover', null, $.noop);\n }\n\n toggles[i].setAttribute('aria-expanded', 'false');\n $(dropdownMenu).removeClass(ClassName.SHOW);\n $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));\n }\n };\n\n Dropdown._getParentFromElement = function _getParentFromElement(element) {\n var parent;\n var selector = Util.getSelectorFromElement(element);\n\n if (selector) {\n parent = document.querySelector(selector);\n }\n\n return parent || element.parentNode;\n } // eslint-disable-next-line complexity\n ;\n\n Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return;\n }\n\n var parent = Dropdown._getParentFromElement(this);\n\n var isActive = $(parent).hasClass(ClassName.SHOW);\n\n if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n var toggle = parent.querySelector(Selector.DATA_TOGGLE);\n $(toggle).trigger('focus');\n }\n\n $(this).trigger('click');\n return;\n }\n\n var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS));\n\n if (items.length === 0) {\n return;\n }\n\n var index = items.indexOf(event.target);\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) {\n // Up\n index--;\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {\n // Down\n index++;\n }\n\n if (index < 0) {\n index = 0;\n }\n\n items[index].focus();\n };\n\n _createClass(Dropdown, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n\n return Dropdown;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + \" \" + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault();\n event.stopPropagation();\n\n Dropdown._jQueryInterface.call($(this), 'toggle');\n }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {\n e.stopPropagation();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface;\n $.fn[NAME].Constructor = Dropdown;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Dropdown._jQueryInterface;\n };\n\n return Dropdown;\n});","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Bootstrap modal.js v4.3.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : (global = global || self, global.Modal = factory(global.jQuery, global.Util));\n})(this, function ($, Util) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n }\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n\n var NAME = 'modal';\n var VERSION = '4.3.1';\n var DATA_KEY = 'bs.modal';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $.fn[NAME];\n var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n var Default = {\n backdrop: true,\n keyboard: true,\n focus: true,\n show: true\n };\n var DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean',\n show: 'boolean'\n };\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n FOCUSIN: \"focusin\" + EVENT_KEY,\n RESIZE: \"resize\" + EVENT_KEY,\n CLICK_DISMISS: \"click.dismiss\" + EVENT_KEY,\n KEYDOWN_DISMISS: \"keydown.dismiss\" + EVENT_KEY,\n MOUSEUP_DISMISS: \"mouseup.dismiss\" + EVENT_KEY,\n MOUSEDOWN_DISMISS: \"mousedown.dismiss\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n SCROLLABLE: 'modal-dialog-scrollable',\n SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n BACKDROP: 'modal-backdrop',\n OPEN: 'modal-open',\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n DIALOG: '.modal-dialog',\n MODAL_BODY: '.modal-body',\n DATA_TOGGLE: '[data-toggle=\"modal\"]',\n DATA_DISMISS: '[data-dismiss=\"modal\"]',\n FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT: '.sticky-top'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n };\n\n var Modal =\n /*#__PURE__*/\n function () {\n function Modal(element, config) {\n this._config = this._getConfig(config);\n this._element = element;\n this._dialog = element.querySelector(Selector.DIALOG);\n this._backdrop = null;\n this._isShown = false;\n this._isBodyOverflowing = false;\n this._ignoreBackdropClick = false;\n this._isTransitioning = false;\n this._scrollbarWidth = 0;\n } // Getters\n\n\n var _proto = Modal.prototype; // Public\n\n _proto.toggle = function toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n };\n\n _proto.show = function show(relatedTarget) {\n var _this = this;\n\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n if ($(this._element).hasClass(ClassName.FADE)) {\n this._isTransitioning = true;\n }\n\n var showEvent = $.Event(Event.SHOW, {\n relatedTarget: relatedTarget\n });\n $(this._element).trigger(showEvent);\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return;\n }\n\n this._isShown = true;\n\n this._checkScrollbar();\n\n this._setScrollbar();\n\n this._adjustDialog();\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {\n return _this.hide(event);\n });\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {\n $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {\n if ($(event.target).is(_this._element)) {\n _this._ignoreBackdropClick = true;\n }\n });\n });\n\n this._showBackdrop(function () {\n return _this._showElement(relatedTarget);\n });\n };\n\n _proto.hide = function hide(event) {\n var _this2 = this;\n\n if (event) {\n event.preventDefault();\n }\n\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n var hideEvent = $.Event(Event.HIDE);\n $(this._element).trigger(hideEvent);\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return;\n }\n\n this._isShown = false;\n var transition = $(this._element).hasClass(ClassName.FADE);\n\n if (transition) {\n this._isTransitioning = true;\n }\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n $(document).off(Event.FOCUSIN);\n $(this._element).removeClass(ClassName.SHOW);\n $(this._element).off(Event.CLICK_DISMISS);\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS);\n\n if (transition) {\n var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n $(this._element).one(Util.TRANSITION_END, function (event) {\n return _this2._hideModal(event);\n }).emulateTransitionEnd(transitionDuration);\n } else {\n this._hideModal();\n }\n };\n\n _proto.dispose = function dispose() {\n [window, this._element, this._dialog].forEach(function (htmlElement) {\n return $(htmlElement).off(EVENT_KEY);\n });\n /**\n * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `Event.CLICK_DATA_API` event that should remain\n */\n\n $(document).off(Event.FOCUSIN);\n $.removeData(this._element, DATA_KEY);\n this._config = null;\n this._element = null;\n this._dialog = null;\n this._backdrop = null;\n this._isShown = null;\n this._isBodyOverflowing = null;\n this._ignoreBackdropClick = null;\n this._isTransitioning = null;\n this._scrollbarWidth = null;\n };\n\n _proto.handleUpdate = function handleUpdate() {\n this._adjustDialog();\n } // Private\n ;\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, Default, config);\n Util.typeCheckConfig(NAME, config, DefaultType);\n return config;\n };\n\n _proto._showElement = function _showElement(relatedTarget) {\n var _this3 = this;\n\n var transition = $(this._element).hasClass(ClassName.FADE);\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {\n this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0;\n } else {\n this._element.scrollTop = 0;\n }\n\n if (transition) {\n Util.reflow(this._element);\n }\n\n $(this._element).addClass(ClassName.SHOW);\n\n if (this._config.focus) {\n this._enforceFocus();\n }\n\n var shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: relatedTarget\n });\n\n var transitionComplete = function transitionComplete() {\n if (_this3._config.focus) {\n _this3._element.focus();\n }\n\n _this3._isTransitioning = false;\n $(_this3._element).trigger(shownEvent);\n };\n\n if (transition) {\n var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);\n $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);\n } else {\n transitionComplete();\n }\n };\n\n _proto._enforceFocus = function _enforceFocus() {\n var _this4 = this;\n\n $(document).off(Event.FOCUSIN) // Guard against infinite focus loop\n .on(Event.FOCUSIN, function (event) {\n if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {\n _this4._element.focus();\n }\n });\n };\n\n _proto._setEscapeEvent = function _setEscapeEvent() {\n var _this5 = this;\n\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {\n if (event.which === ESCAPE_KEYCODE) {\n event.preventDefault();\n\n _this5.hide();\n }\n });\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS);\n }\n };\n\n _proto._setResizeEvent = function _setResizeEvent() {\n var _this6 = this;\n\n if (this._isShown) {\n $(window).on(Event.RESIZE, function (event) {\n return _this6.handleUpdate(event);\n });\n } else {\n $(window).off(Event.RESIZE);\n }\n };\n\n _proto._hideModal = function _hideModal() {\n var _this7 = this;\n\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._isTransitioning = false;\n\n this._showBackdrop(function () {\n $(document.body).removeClass(ClassName.OPEN);\n\n _this7._resetAdjustments();\n\n _this7._resetScrollbar();\n\n $(_this7._element).trigger(Event.HIDDEN);\n });\n };\n\n _proto._removeBackdrop = function _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove();\n this._backdrop = null;\n }\n };\n\n _proto._showBackdrop = function _showBackdrop(callback) {\n var _this8 = this;\n\n var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div');\n this._backdrop.className = ClassName.BACKDROP;\n\n if (animate) {\n this._backdrop.classList.add(animate);\n }\n\n $(this._backdrop).appendTo(document.body);\n $(this._element).on(Event.CLICK_DISMISS, function (event) {\n if (_this8._ignoreBackdropClick) {\n _this8._ignoreBackdropClick = false;\n return;\n }\n\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (_this8._config.backdrop === 'static') {\n _this8._element.focus();\n } else {\n _this8.hide();\n }\n });\n\n if (animate) {\n Util.reflow(this._backdrop);\n }\n\n $(this._backdrop).addClass(ClassName.SHOW);\n\n if (!callback) {\n return;\n }\n\n if (!animate) {\n callback();\n return;\n }\n\n var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.SHOW);\n\n var callbackRemove = function callbackRemove() {\n _this8._removeBackdrop();\n\n if (callback) {\n callback();\n }\n };\n\n if ($(this._element).hasClass(ClassName.FADE)) {\n var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n\n $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);\n } else {\n callbackRemove();\n }\n } else if (callback) {\n callback();\n }\n } // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n ;\n\n _proto._adjustDialog = function _adjustDialog() {\n var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = this._scrollbarWidth + \"px\";\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = this._scrollbarWidth + \"px\";\n }\n };\n\n _proto._resetAdjustments = function _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n };\n\n _proto._checkScrollbar = function _checkScrollbar() {\n var rect = document.body.getBoundingClientRect();\n this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;\n this._scrollbarWidth = this._getScrollbarWidth();\n };\n\n _proto._setScrollbar = function _setScrollbar() {\n var _this9 = this;\n\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));\n var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding\n\n $(fixedContent).each(function (index, element) {\n var actualPadding = element.style.paddingRight;\n var calculatedPadding = $(element).css('padding-right');\n $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + \"px\");\n }); // Adjust sticky content margin\n\n $(stickyContent).each(function (index, element) {\n var actualMargin = element.style.marginRight;\n var calculatedMargin = $(element).css('margin-right');\n $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + \"px\");\n }); // Adjust body padding\n\n var actualPadding = document.body.style.paddingRight;\n var calculatedPadding = $(document.body).css('padding-right');\n $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + \"px\");\n }\n\n $(document.body).addClass(ClassName.OPEN);\n };\n\n _proto._resetScrollbar = function _resetScrollbar() {\n // Restore fixed content padding\n var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));\n $(fixedContent).each(function (index, element) {\n var padding = $(element).data('padding-right');\n $(element).removeData('padding-right');\n element.style.paddingRight = padding ? padding : '';\n }); // Restore sticky content\n\n var elements = [].slice.call(document.querySelectorAll(\"\" + Selector.STICKY_CONTENT));\n $(elements).each(function (index, element) {\n var margin = $(element).data('margin-right');\n\n if (typeof margin !== 'undefined') {\n $(element).css('margin-right', margin).removeData('margin-right');\n }\n }); // Restore body padding\n\n var padding = $(document.body).data('padding-right');\n $(document.body).removeData('padding-right');\n document.body.style.paddingRight = padding ? padding : '';\n };\n\n _proto._getScrollbarWidth = function _getScrollbarWidth() {\n // thx d.walsh\n var scrollDiv = document.createElement('div');\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER;\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n } // Static\n ;\n\n Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n var data = $(this).data(DATA_KEY);\n\n var _config = _objectSpread({}, Default, $(this).data(), _typeof(config) === 'object' && config ? config : {});\n\n if (!data) {\n data = new Modal(this, _config);\n $(this).data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config](relatedTarget);\n } else if (_config.show) {\n data.show(relatedTarget);\n }\n });\n };\n\n _createClass(Modal, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }]);\n\n return Modal;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n var _this10 = this;\n\n var target;\n var selector = Util.getSelectorFromElement(this);\n\n if (selector) {\n target = document.querySelector(selector);\n }\n\n var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault();\n }\n\n var $target = $(target).one(Event.SHOW, function (showEvent) {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return;\n }\n\n $target.one(Event.HIDDEN, function () {\n if ($(_this10).is(':visible')) {\n _this10.focus();\n }\n });\n });\n\n Modal._jQueryInterface.call($(target), config, this);\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface;\n $.fn[NAME].Constructor = Modal;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Modal._jQueryInterface;\n };\n\n return Modal;\n});","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Bootstrap popover.js v4.3.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) : typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) : (global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));\n})(this, function ($, Tooltip) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n\n var NAME = 'popover';\n var VERSION = '4.3.1';\n var DATA_KEY = 'bs.popover';\n var EVENT_KEY = \".\" + DATA_KEY;\n var JQUERY_NO_CONFLICT = $.fn[NAME];\n var CLASS_PREFIX = 'bs-popover';\n var BSCLS_PREFIX_REGEX = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX + \"\\\\S+\", 'g');\n\n var Default = _objectSpread({}, Tooltip.Default, {\n placement: 'right',\n trigger: 'click',\n content: '',\n template: ''\n });\n\n var DefaultType = _objectSpread({}, Tooltip.DefaultType, {\n content: '(string|element|function)'\n });\n\n var ClassName = {\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n TITLE: '.popover-header',\n CONTENT: '.popover-body'\n };\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n INSERTED: \"inserted\" + EVENT_KEY,\n CLICK: \"click\" + EVENT_KEY,\n FOCUSIN: \"focusin\" + EVENT_KEY,\n FOCUSOUT: \"focusout\" + EVENT_KEY,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n };\n\n var Popover =\n /*#__PURE__*/\n function (_Tooltip) {\n _inheritsLoose(Popover, _Tooltip);\n\n function Popover() {\n return _Tooltip.apply(this, arguments) || this;\n }\n\n var _proto = Popover.prototype; // Overrides\n\n _proto.isWithContent = function isWithContent() {\n return this.getTitle() || this._getContent();\n };\n\n _proto.addAttachmentClass = function addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(CLASS_PREFIX + \"-\" + attachment);\n };\n\n _proto.getTipElement = function getTipElement() {\n this.tip = this.tip || $(this.config.template)[0];\n return this.tip;\n };\n\n _proto.setContent = function setContent() {\n var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events\n\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle());\n\n var content = this._getContent();\n\n if (typeof content === 'function') {\n content = content.call(this.element);\n }\n\n this.setElementContent($tip.find(Selector.CONTENT), content);\n $tip.removeClass(ClassName.FADE + \" \" + ClassName.SHOW);\n } // Private\n ;\n\n _proto._getContent = function _getContent() {\n return this.element.getAttribute('data-content') || this.config.content;\n };\n\n _proto._cleanTipClass = function _cleanTipClass() {\n var $tip = $(this.getTipElement());\n var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);\n\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''));\n }\n } // Static\n ;\n\n Popover._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $(this).data(DATA_KEY);\n\n var _config = _typeof(config) === 'object' ? config : null;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Popover(this, _config);\n $(this).data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(Popover, null, [{\n key: \"VERSION\",\n // Getters\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n\n return Popover;\n }(Tooltip);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n\n $.fn[NAME] = Popover._jQueryInterface;\n $.fn[NAME].Constructor = Popover;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Popover._jQueryInterface;\n };\n\n return Popover;\n});","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Bootstrap tab.js v4.3.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : (global = global || self, global.Tab = factory(global.jQuery, global.Util));\n})(this, function ($, Util) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n\n var NAME = 'tab';\n var VERSION = '4.3.1';\n var DATA_KEY = 'bs.tab';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $.fn[NAME];\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n DROPDOWN_MENU: 'dropdown-menu',\n ACTIVE: 'active',\n DISABLED: 'disabled',\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n DROPDOWN: '.dropdown',\n NAV_LIST_GROUP: '.nav, .list-group',\n ACTIVE: '.active',\n ACTIVE_UL: '> li > .active',\n DATA_TOGGLE: '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]',\n DROPDOWN_TOGGLE: '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n };\n\n var Tab =\n /*#__PURE__*/\n function () {\n function Tab(element) {\n this._element = element;\n } // Getters\n\n\n var _proto = Tab.prototype; // Public\n\n _proto.show = function show() {\n var _this = this;\n\n if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {\n return;\n }\n\n var target;\n var previous;\n var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];\n var selector = Util.getSelectorFromElement(this._element);\n\n if (listElement) {\n var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;\n previous = $.makeArray($(listElement).find(itemSelector));\n previous = previous[previous.length - 1];\n }\n\n var hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n });\n var showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n });\n\n if (previous) {\n $(previous).trigger(hideEvent);\n }\n\n $(this._element).trigger(showEvent);\n\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {\n return;\n }\n\n if (selector) {\n target = document.querySelector(selector);\n }\n\n this._activate(this._element, listElement);\n\n var complete = function complete() {\n var hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: _this._element\n });\n var shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n });\n $(previous).trigger(hiddenEvent);\n $(_this._element).trigger(shownEvent);\n };\n\n if (target) {\n this._activate(target, target.parentNode, complete);\n } else {\n complete();\n }\n };\n\n _proto.dispose = function dispose() {\n $.removeData(this._element, DATA_KEY);\n this._element = null;\n } // Private\n ;\n\n _proto._activate = function _activate(element, container, callback) {\n var _this2 = this;\n\n var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE);\n var active = activeElements[0];\n var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);\n\n var complete = function complete() {\n return _this2._transitionComplete(element, active, callback);\n };\n\n if (active && isTransitioning) {\n var transitionDuration = Util.getTransitionDurationFromElement(active);\n $(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n } else {\n complete();\n }\n };\n\n _proto._transitionComplete = function _transitionComplete(element, active, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE);\n var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE);\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false);\n }\n }\n\n $(element).addClass(ClassName.ACTIVE);\n\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true);\n }\n\n Util.reflow(element);\n\n if (element.classList.contains(ClassName.FADE)) {\n element.classList.add(ClassName.SHOW);\n }\n\n if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {\n var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];\n\n if (dropdownElement) {\n var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));\n $(dropdownToggleList).addClass(ClassName.ACTIVE);\n }\n\n element.setAttribute('aria-expanded', true);\n }\n\n if (callback) {\n callback();\n }\n } // Static\n ;\n\n Tab._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data(DATA_KEY);\n\n if (!data) {\n data = new Tab(this);\n $this.data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n\n data[config]();\n }\n });\n };\n\n _createClass(Tab, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n\n return Tab;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault();\n\n Tab._jQueryInterface.call($(this), 'show');\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tab._jQueryInterface;\n $.fn[NAME].Constructor = Tab;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Tab._jQueryInterface;\n };\n\n return Tab;\n});","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.15.0\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\n\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\n\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\n\n\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n } // NOTE: 1 DOM access here\n\n\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\n\n\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n\n return element.parentNode || element.host;\n}\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\n\n\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n\n case '#document':\n return element.body;\n } // Firefox want us to check `-x` and `-y` variations as well\n\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\n\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n\n if (version === 10) {\n return isIE10;\n }\n\n return isIE11 || isIE10;\n}\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\n\n\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here\n\n var offsetParent = element.offsetParent || null; // Skip hidden elements which don't have an offsetParent\n\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n } // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n\n\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\n\n\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\n\n\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n } // Here we make sure to give as \"start\" the element that comes first in the DOM\n\n\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1; // Get common ancestor container\n\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n } // one of the nodes is inside shadowDOM, find which one\n\n\n var element1root = getRoot(element1);\n\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\n\n\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\n\n\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar defineProperty = function defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\n\n\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\n\n\nfunction getBoundingClientRect(element) {\n var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n }; // subtract scrollbar size from sizes\n\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.right - result.left;\n var height = sizes.height || element.clientHeight || result.bottom - result.top;\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop, 10);\n var marginLeft = parseFloat(styles.marginLeft, 10);\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them\n\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n return getClientRect(offset);\n}\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\n\n\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n\n var parentNode = getParentNode(element);\n\n if (!parentNode) {\n return false;\n }\n\n return isFixed(parentNode);\n}\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n\n var el = element.parentElement;\n\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n\n return el || document.documentElement;\n}\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\n\n\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here\n\n var boundaries = {\n top: 0,\n left: 0\n };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case\n\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation\n\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n } // Add paddings\n\n\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return width * height;\n}\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n var variation = placement.split('-')[1];\n return computedPlacement + (variation ? '-' + variation : '');\n}\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\n\n\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\n\n\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\n\n\nfunction getOppositePlacement(placement) {\n var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\n\n\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0]; // Get popper node sizes\n\n var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object\n\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n }; // depending by the popper placement we have to compute its offsets slightly differently\n\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\n\n\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n } // use `filter` to obtain the same behavior of `find`\n\n\n return arr.filter(check)[0];\n}\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\n\n\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n } // use `find` + `indexOf` if `findIndex` isn't supported\n\n\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\n\n\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n data = fn(data, modifier);\n }\n });\n return data;\n}\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\n\n\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\n\n\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\n\n\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n\n return null;\n}\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\n\n\nfunction destroy() {\n this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled\n\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners(); // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n\n return this;\n}\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\n\n\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, {\n passive: true\n });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n\n scrollParents.push(target);\n}\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\n\n\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\n\n\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\n\n\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\n\n\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\n\n\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\n\n\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = ''; // add unit if the value is numeric and is one of the following\n\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n\n element.style[prop] = styles[prop] + unit;\n });\n}\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\n\n\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\n\n\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n\n setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties\n\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\n\n\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n\n setStyles(popper, {\n position: options.positionFixed ? 'fixed' : 'absolute'\n });\n return options;\n}\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\n\n\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent); // Styles\n\n var styles = {\n position: popper.position\n };\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n\n var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n\n var left = void 0,\n top = void 0;\n\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n } // Attributes\n\n\n var attributes = {\n 'x-placement': data.placement\n }; // Update `data` attributes, styles and arrowStyles\n\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n return data;\n}\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\n\n\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n\n return isRequired;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction arrow(data, options) {\n var _data$offsets$arrow; // arrow depends on keepTogether in order to work\n\n\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector\n\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier\n\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len]; //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n // top/left side\n\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n } // bottom/right side\n\n\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n\n data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper\n\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper\n\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n return data;\n}\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\n\n\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n\n return variation;\n}\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\n\n\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end`\n\nvar validPlacements = placements.slice(3);\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\n\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here\n\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required\n\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; // flips variation if reference element overflows boundaries\n\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); // flips variation if popper content overflows boundaries\n\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\n\n\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2]; // If it's not a number it's an operator, I guess\n\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\n\n\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n }); // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n } // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n\n\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations\n\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, []) // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n }); // Loop trough the offsets arrays and execute the operations\n\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var basePlacement = placement.split('-')[0];\n var offsets = void 0;\n\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n } // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n\n\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n options.boundaries = boundaries;\n var order = options.priority;\n var popper = data.offsets.popper;\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n\n return defineProperty({}, mainSide, value);\n }\n };\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n data.offsets.popper = popper;\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier\n\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n return data;\n}\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\n\n\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: offset,\n\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: arrow,\n\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: flip,\n\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: computeStyle,\n\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: applyStyle,\n\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\n\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n// Utils\n// Methods\n\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n }; // make update() debounced, so that it only runs at most once-per-tick\n\n\n this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it\n\n this.options = _extends({}, Popper.Defaults, options); // init state\n\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n }; // get reference and popper elements (allow jQuery wrappers)\n\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options\n\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n }); // Refactoring modifiers' list (Object => Array)\n\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n }) // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n }); // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n }); // fire the first update to position the popper in the right place\n\n this.update();\n var eventsEnabled = this.options.eventsEnabled;\n\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n } // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\nexport default Popper;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Bootstrap button.js v4.3.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = global || self, global.Button = factory(global.jQuery));\n})(this, function ($) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n\n var NAME = 'button';\n var VERSION = '4.3.1';\n var DATA_KEY = 'bs.button';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $.fn[NAME];\n var ClassName = {\n ACTIVE: 'active',\n BUTTON: 'btn',\n FOCUS: 'focus'\n };\n var Selector = {\n DATA_TOGGLE_CARROT: '[data-toggle^=\"button\"]',\n DATA_TOGGLE: '[data-toggle=\"buttons\"]',\n INPUT: 'input:not([type=\"hidden\"])',\n ACTIVE: '.active',\n BUTTON: '.btn'\n };\n var Event = {\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY,\n FOCUS_BLUR_DATA_API: \"focus\" + EVENT_KEY + DATA_API_KEY + \" \" + (\"blur\" + EVENT_KEY + DATA_API_KEY)\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n };\n\n var Button =\n /*#__PURE__*/\n function () {\n function Button(element) {\n this._element = element;\n } // Getters\n\n\n var _proto = Button.prototype; // Public\n\n _proto.toggle = function toggle() {\n var triggerChangeEvent = true;\n var addAriaPressed = true;\n var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];\n\n if (rootElement) {\n var input = this._element.querySelector(Selector.INPUT);\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {\n triggerChangeEvent = false;\n } else {\n var activeElement = rootElement.querySelector(Selector.ACTIVE);\n\n if (activeElement) {\n $(activeElement).removeClass(ClassName.ACTIVE);\n }\n }\n }\n\n if (triggerChangeEvent) {\n if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {\n return;\n }\n\n input.checked = !this._element.classList.contains(ClassName.ACTIVE);\n $(input).trigger('change');\n }\n\n input.focus();\n addAriaPressed = false;\n }\n }\n\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(ClassName.ACTIVE);\n }\n };\n\n _proto.dispose = function dispose() {\n $.removeData(this._element, DATA_KEY);\n this._element = null;\n } // Static\n ;\n\n Button._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $(this).data(DATA_KEY);\n\n if (!data) {\n data = new Button(this);\n $(this).data(DATA_KEY, data);\n }\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n };\n\n _createClass(Button, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n\n return Button;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n event.preventDefault();\n var button = event.target;\n\n if (!$(button).hasClass(ClassName.BUTTON)) {\n button = $(button).closest(Selector.BUTTON);\n }\n\n Button._jQueryInterface.call($(button), 'toggle');\n }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n var button = $(event.target).closest(Selector.BUTTON)[0];\n $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Button._jQueryInterface;\n $.fn[NAME].Constructor = Button;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Button._jQueryInterface;\n };\n\n return Button;\n});","/*! jQuery UI - v1.12.0 - 2016-08-17\n* http://jqueryui.com\n* Includes: widget.js, data.js, scroll-parent.js, widgets/sortable.js, widgets/mouse.js\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n(function (t) {\n \"function\" == typeof define && define.amd ? define([\"jquery\"], t) : t(jQuery);\n})(function (t) {\n t.ui = t.ui || {}, t.ui.version = \"1.12.0\";\n var e = 0,\n i = Array.prototype.slice;\n t.cleanData = function (e) {\n return function (i) {\n var s, n, o;\n\n for (o = 0; null != (n = i[o]); o++) {\n try {\n s = t._data(n, \"events\"), s && s.remove && t(n).triggerHandler(\"remove\");\n } catch (a) {}\n }\n\n e(i);\n };\n }(t.cleanData), t.widget = function (e, i, s) {\n var n,\n o,\n a,\n r = {},\n l = e.split(\".\")[0];\n e = e.split(\".\")[1];\n var h = l + \"-\" + e;\n return s || (s = i, i = t.Widget), t.isArray(s) && (s = t.extend.apply(null, [{}].concat(s))), t.expr[\":\"][h.toLowerCase()] = function (e) {\n return !!t.data(e, h);\n }, t[l] = t[l] || {}, n = t[l][e], o = t[l][e] = function (t, e) {\n return this._createWidget ? (arguments.length && this._createWidget(t, e), void 0) : new o(t, e);\n }, t.extend(o, n, {\n version: s.version,\n _proto: t.extend({}, s),\n _childConstructors: []\n }), a = new i(), a.options = t.widget.extend({}, a.options), t.each(s, function (e, s) {\n return t.isFunction(s) ? (r[e] = function () {\n function t() {\n return i.prototype[e].apply(this, arguments);\n }\n\n function n(t) {\n return i.prototype[e].apply(this, t);\n }\n\n return function () {\n var e,\n i = this._super,\n o = this._superApply;\n return this._super = t, this._superApply = n, e = s.apply(this, arguments), this._super = i, this._superApply = o, e;\n };\n }(), void 0) : (r[e] = s, void 0);\n }), o.prototype = t.widget.extend(a, {\n widgetEventPrefix: n ? a.widgetEventPrefix || e : e\n }, r, {\n constructor: o,\n namespace: l,\n widgetName: e,\n widgetFullName: h\n }), n ? (t.each(n._childConstructors, function (e, i) {\n var s = i.prototype;\n t.widget(s.namespace + \".\" + s.widgetName, o, i._proto);\n }), delete n._childConstructors) : i._childConstructors.push(o), t.widget.bridge(e, o), o;\n }, t.widget.extend = function (e) {\n for (var s, n, o = i.call(arguments, 1), a = 0, r = o.length; r > a; a++) {\n for (s in o[a]) {\n n = o[a][s], o[a].hasOwnProperty(s) && void 0 !== n && (e[s] = t.isPlainObject(n) ? t.isPlainObject(e[s]) ? t.widget.extend({}, e[s], n) : t.widget.extend({}, n) : n);\n }\n }\n\n return e;\n }, t.widget.bridge = function (e, s) {\n var n = s.prototype.widgetFullName || e;\n\n t.fn[e] = function (o) {\n var a = \"string\" == typeof o,\n r = i.call(arguments, 1),\n l = this;\n return a ? this.each(function () {\n var i,\n s = t.data(this, n);\n return \"instance\" === o ? (l = s, !1) : s ? t.isFunction(s[o]) && \"_\" !== o.charAt(0) ? (i = s[o].apply(s, r), i !== s && void 0 !== i ? (l = i && i.jquery ? l.pushStack(i.get()) : i, !1) : void 0) : t.error(\"no such method '\" + o + \"' for \" + e + \" widget instance\") : t.error(\"cannot call methods on \" + e + \" prior to initialization; \" + \"attempted to call method '\" + o + \"'\");\n }) : (r.length && (o = t.widget.extend.apply(null, [o].concat(r))), this.each(function () {\n var e = t.data(this, n);\n e ? (e.option(o || {}), e._init && e._init()) : t.data(this, n, new s(o, this));\n })), l;\n };\n }, t.Widget = function () {}, t.Widget._childConstructors = [], t.Widget.prototype = {\n widgetName: \"widget\",\n widgetEventPrefix: \"\",\n defaultElement: \"\",\n options: {\n classes: {},\n disabled: !1,\n create: null\n },\n _createWidget: function _createWidget(i, s) {\n s = t(s || this.defaultElement || this)[0], this.element = t(s), this.uuid = e++, this.eventNamespace = \".\" + this.widgetName + this.uuid, this.bindings = t(), this.hoverable = t(), this.focusable = t(), this.classesElementLookup = {}, s !== this && (t.data(s, this.widgetFullName, this), this._on(!0, this.element, {\n remove: function remove(t) {\n t.target === s && this.destroy();\n }\n }), this.document = t(s.style ? s.ownerDocument : s.document || s), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this.options = t.widget.extend({}, this.options, this._getCreateOptions(), i), this._create(), this.options.disabled && this._setOptionDisabled(this.options.disabled), this._trigger(\"create\", null, this._getCreateEventData()), this._init();\n },\n _getCreateOptions: function _getCreateOptions() {\n return {};\n },\n _getCreateEventData: t.noop,\n _create: t.noop,\n _init: t.noop,\n destroy: function destroy() {\n var e = this;\n this._destroy(), t.each(this.classesElementLookup, function (t, i) {\n e._removeClass(i, t);\n }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr(\"aria-disabled\"), this.bindings.off(this.eventNamespace);\n },\n _destroy: t.noop,\n widget: function widget() {\n return this.element;\n },\n option: function option(e, i) {\n var s,\n n,\n o,\n a = e;\n if (0 === arguments.length) return t.widget.extend({}, this.options);\n if (\"string\" == typeof e) if (a = {}, s = e.split(\".\"), e = s.shift(), s.length) {\n for (n = a[e] = t.widget.extend({}, this.options[e]), o = 0; s.length - 1 > o; o++) {\n n[s[o]] = n[s[o]] || {}, n = n[s[o]];\n }\n\n if (e = s.pop(), 1 === arguments.length) return void 0 === n[e] ? null : n[e];\n n[e] = i;\n } else {\n if (1 === arguments.length) return void 0 === this.options[e] ? null : this.options[e];\n a[e] = i;\n }\n return this._setOptions(a), this;\n },\n _setOptions: function _setOptions(t) {\n var e;\n\n for (e in t) {\n this._setOption(e, t[e]);\n }\n\n return this;\n },\n _setOption: function _setOption(t, e) {\n return \"classes\" === t && this._setOptionClasses(e), this.options[t] = e, \"disabled\" === t && this._setOptionDisabled(e), this;\n },\n _setOptionClasses: function _setOptionClasses(e) {\n var i, s, n;\n\n for (i in e) {\n n = this.classesElementLookup[i], e[i] !== this.options.classes[i] && n && n.length && (s = t(n.get()), this._removeClass(n, i), s.addClass(this._classes({\n element: s,\n keys: i,\n classes: e,\n add: !0\n })));\n }\n },\n _setOptionDisabled: function _setOptionDisabled(t) {\n this._toggleClass(this.widget(), this.widgetFullName + \"-disabled\", null, !!t), t && (this._removeClass(this.hoverable, null, \"ui-state-hover\"), this._removeClass(this.focusable, null, \"ui-state-focus\"));\n },\n enable: function enable() {\n return this._setOptions({\n disabled: !1\n });\n },\n disable: function disable() {\n return this._setOptions({\n disabled: !0\n });\n },\n _classes: function _classes(e) {\n function i(i, o) {\n var a, r;\n\n for (r = 0; i.length > r; r++) {\n a = n.classesElementLookup[i[r]] || t(), a = e.add ? t(t.unique(a.get().concat(e.element.get()))) : t(a.not(e.element).get()), n.classesElementLookup[i[r]] = a, s.push(i[r]), o && e.classes[i[r]] && s.push(e.classes[i[r]]);\n }\n }\n\n var s = [],\n n = this;\n return e = t.extend({\n element: this.element,\n classes: this.options.classes || {}\n }, e), e.keys && i(e.keys.match(/\\S+/g) || [], !0), e.extra && i(e.extra.match(/\\S+/g) || []), s.join(\" \");\n },\n _removeClass: function _removeClass(t, e, i) {\n return this._toggleClass(t, e, i, !1);\n },\n _addClass: function _addClass(t, e, i) {\n return this._toggleClass(t, e, i, !0);\n },\n _toggleClass: function _toggleClass(t, e, i, s) {\n s = \"boolean\" == typeof s ? s : i;\n var n = \"string\" == typeof t || null === t,\n o = {\n extra: n ? e : i,\n keys: n ? t : e,\n element: n ? this.element : t,\n add: s\n };\n return o.element.toggleClass(this._classes(o), s), this;\n },\n _on: function _on(e, i, s) {\n var n,\n o = this;\n \"boolean\" != typeof e && (s = i, i = e, e = !1), s ? (i = n = t(i), this.bindings = this.bindings.add(i)) : (s = i, i = this.element, n = this.widget()), t.each(s, function (s, a) {\n function r() {\n return e || o.options.disabled !== !0 && !t(this).hasClass(\"ui-state-disabled\") ? (\"string\" == typeof a ? o[a] : a).apply(o, arguments) : void 0;\n }\n\n \"string\" != typeof a && (r.guid = a.guid = a.guid || r.guid || t.guid++);\n var l = s.match(/^([\\w:-]*)\\s*(.*)$/),\n h = l[1] + o.eventNamespace,\n c = l[2];\n c ? n.on(h, c, r) : i.on(h, r);\n });\n },\n _off: function _off(e, i) {\n i = (i || \"\").split(\" \").join(this.eventNamespace + \" \") + this.eventNamespace, e.off(i).off(i), this.bindings = t(this.bindings.not(e).get()), this.focusable = t(this.focusable.not(e).get()), this.hoverable = t(this.hoverable.not(e).get());\n },\n _delay: function _delay(t, e) {\n function i() {\n return (\"string\" == typeof t ? s[t] : t).apply(s, arguments);\n }\n\n var s = this;\n return setTimeout(i, e || 0);\n },\n _hoverable: function _hoverable(e) {\n this.hoverable = this.hoverable.add(e), this._on(e, {\n mouseenter: function mouseenter(e) {\n this._addClass(t(e.currentTarget), null, \"ui-state-hover\");\n },\n mouseleave: function mouseleave(e) {\n this._removeClass(t(e.currentTarget), null, \"ui-state-hover\");\n }\n });\n },\n _focusable: function _focusable(e) {\n this.focusable = this.focusable.add(e), this._on(e, {\n focusin: function focusin(e) {\n this._addClass(t(e.currentTarget), null, \"ui-state-focus\");\n },\n focusout: function focusout(e) {\n this._removeClass(t(e.currentTarget), null, \"ui-state-focus\");\n }\n });\n },\n _trigger: function _trigger(e, i, s) {\n var n,\n o,\n a = this.options[e];\n if (s = s || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), i.target = this.element[0], o = i.originalEvent) for (n in o) {\n n in i || (i[n] = o[n]);\n }\n return this.element.trigger(i, s), !(t.isFunction(a) && a.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented());\n }\n }, t.each({\n show: \"fadeIn\",\n hide: \"fadeOut\"\n }, function (e, i) {\n t.Widget.prototype[\"_\" + e] = function (s, n, o) {\n \"string\" == typeof n && (n = {\n effect: n\n });\n var a,\n r = n ? n === !0 || \"number\" == typeof n ? i : n.effect || i : e;\n n = n || {}, \"number\" == typeof n && (n = {\n duration: n\n }), a = !t.isEmptyObject(n), n.complete = o, n.delay && s.delay(n.delay), a && t.effects && t.effects.effect[r] ? s[e](n) : r !== e && s[r] ? s[r](n.duration, n.easing, o) : s.queue(function (i) {\n t(this)[e](), o && o.call(s[0]), i();\n });\n };\n }), t.widget, t.extend(t.expr[\":\"], {\n data: t.expr.createPseudo ? t.expr.createPseudo(function (e) {\n return function (i) {\n return !!t.data(i, e);\n };\n }) : function (e, i, s) {\n return !!t.data(e, s[3]);\n }\n }), t.fn.scrollParent = function (e) {\n var i = this.css(\"position\"),\n s = \"absolute\" === i,\n n = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n o = this.parents().filter(function () {\n var e = t(this);\n return s && \"static\" === e.css(\"position\") ? !1 : n.test(e.css(\"overflow\") + e.css(\"overflow-y\") + e.css(\"overflow-x\"));\n }).eq(0);\n return \"fixed\" !== i && o.length ? o : t(this[0].ownerDocument || document);\n }, t.ui.ie = !!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase());\n var s = !1;\n t(document).on(\"mouseup\", function () {\n s = !1;\n }), t.widget(\"ui.mouse\", {\n version: \"1.12.0\",\n options: {\n cancel: \"input, textarea, button, select, option\",\n distance: 1,\n delay: 0\n },\n _mouseInit: function _mouseInit() {\n var e = this;\n this.element.on(\"mousedown.\" + this.widgetName, function (t) {\n return e._mouseDown(t);\n }).on(\"click.\" + this.widgetName, function (i) {\n return !0 === t.data(i.target, e.widgetName + \".preventClickEvent\") ? (t.removeData(i.target, e.widgetName + \".preventClickEvent\"), i.stopImmediatePropagation(), !1) : void 0;\n }), this.started = !1;\n },\n _mouseDestroy: function _mouseDestroy() {\n this.element.off(\".\" + this.widgetName), this._mouseMoveDelegate && this.document.off(\"mousemove.\" + this.widgetName, this._mouseMoveDelegate).off(\"mouseup.\" + this.widgetName, this._mouseUpDelegate);\n },\n _mouseDown: function _mouseDown(e) {\n if (!s) {\n this._mouseMoved = !1, this._mouseStarted && this._mouseUp(e), this._mouseDownEvent = e;\n var i = this,\n n = 1 === e.which,\n o = \"string\" == typeof this.options.cancel && e.target.nodeName ? t(e.target).closest(this.options.cancel).length : !1;\n return n && !o && this._mouseCapture(e) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () {\n i.mouseDelayMet = !0;\n }, this.options.delay)), this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(e) !== !1, !this._mouseStarted) ? (e.preventDefault(), !0) : (!0 === t.data(e.target, this.widgetName + \".preventClickEvent\") && t.removeData(e.target, this.widgetName + \".preventClickEvent\"), this._mouseMoveDelegate = function (t) {\n return i._mouseMove(t);\n }, this._mouseUpDelegate = function (t) {\n return i._mouseUp(t);\n }, this.document.on(\"mousemove.\" + this.widgetName, this._mouseMoveDelegate).on(\"mouseup.\" + this.widgetName, this._mouseUpDelegate), e.preventDefault(), s = !0, !0)) : !0;\n }\n },\n _mouseMove: function _mouseMove(e) {\n if (this._mouseMoved) {\n if (t.ui.ie && (!document.documentMode || 9 > document.documentMode) && !e.button) return this._mouseUp(e);\n if (!e.which) if (e.originalEvent.altKey || e.originalEvent.ctrlKey || e.originalEvent.metaKey || e.originalEvent.shiftKey) this.ignoreMissingWhich = !0;else if (!this.ignoreMissingWhich) return this._mouseUp(e);\n }\n\n return (e.which || e.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(e), e.preventDefault()) : (this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, e) !== !1, this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted);\n },\n _mouseUp: function _mouseUp(e) {\n this.document.off(\"mousemove.\" + this.widgetName, this._mouseMoveDelegate).off(\"mouseup.\" + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, e.target === this._mouseDownEvent.target && t.data(e.target, this.widgetName + \".preventClickEvent\", !0), this._mouseStop(e)), this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), this.ignoreMissingWhich = !1, s = !1, e.preventDefault();\n },\n _mouseDistanceMet: function _mouseDistanceMet(t) {\n return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance;\n },\n _mouseDelayMet: function _mouseDelayMet() {\n return this.mouseDelayMet;\n },\n _mouseStart: function _mouseStart() {},\n _mouseDrag: function _mouseDrag() {},\n _mouseStop: function _mouseStop() {},\n _mouseCapture: function _mouseCapture() {\n return !0;\n }\n }), t.widget(\"ui.sortable\", t.ui.mouse, {\n version: \"1.12.0\",\n widgetEventPrefix: \"sort\",\n ready: !1,\n options: {\n appendTo: \"parent\",\n axis: !1,\n connectWith: !1,\n containment: !1,\n cursor: \"auto\",\n cursorAt: !1,\n dropOnEmpty: !0,\n forcePlaceholderSize: !1,\n forceHelperSize: !1,\n grid: !1,\n handle: !1,\n helper: \"original\",\n items: \"> *\",\n opacity: !1,\n placeholder: !1,\n revert: !1,\n scroll: !0,\n scrollSensitivity: 20,\n scrollSpeed: 20,\n scope: \"default\",\n tolerance: \"intersect\",\n zIndex: 1e3,\n activate: null,\n beforeStop: null,\n change: null,\n deactivate: null,\n out: null,\n over: null,\n receive: null,\n remove: null,\n sort: null,\n start: null,\n stop: null,\n update: null\n },\n _isOverAxis: function _isOverAxis(t, e, i) {\n return t >= e && e + i > t;\n },\n _isFloating: function _isFloating(t) {\n return /left|right/.test(t.css(\"float\")) || /inline|table-cell/.test(t.css(\"display\"));\n },\n _create: function _create() {\n this.containerCache = {}, this._addClass(\"ui-sortable\"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0;\n },\n _setOption: function _setOption(t, e) {\n this._super(t, e), \"handle\" === t && this._setHandleClassName();\n },\n _setHandleClassName: function _setHandleClassName() {\n var e = this;\n this._removeClass(this.element.find(\".ui-sortable-handle\"), \"ui-sortable-handle\"), t.each(this.items, function () {\n e._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, \"ui-sortable-handle\");\n });\n },\n _destroy: function _destroy() {\n this._mouseDestroy();\n\n for (var t = this.items.length - 1; t >= 0; t--) {\n this.items[t].item.removeData(this.widgetName + \"-item\");\n }\n\n return this;\n },\n _mouseCapture: function _mouseCapture(e, i) {\n var s = null,\n n = !1,\n o = this;\n return this.reverting ? !1 : this.options.disabled || \"static\" === this.options.type ? !1 : (this._refreshItems(e), t(e.target).parents().each(function () {\n return t.data(this, o.widgetName + \"-item\") === o ? (s = t(this), !1) : void 0;\n }), t.data(e.target, o.widgetName + \"-item\") === o && (s = t(e.target)), s ? !this.options.handle || i || (t(this.options.handle, s).find(\"*\").addBack().each(function () {\n this === e.target && (n = !0);\n }), n) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1 : !1);\n },\n _mouseStart: function _mouseStart(e, i, s) {\n var n,\n o,\n a = this.options;\n if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {\n top: this.offset.top - this.margins.top,\n left: this.offset.left - this.margins.left\n }, t.extend(this.offset, {\n click: {\n left: e.pageX - this.offset.left,\n top: e.pageY - this.offset.top\n },\n parent: this._getParentOffset(),\n relative: this._getRelativeOffset()\n }), this.helper.css(\"position\", \"absolute\"), this.cssPosition = this.helper.css(\"position\"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, a.cursorAt && this._adjustOffsetFromHelper(a.cursorAt), this.domPosition = {\n prev: this.currentItem.prev()[0],\n parent: this.currentItem.parent()[0]\n }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), a.containment && this._setContainment(), a.cursor && \"auto\" !== a.cursor && (o = this.document.find(\"body\"), this.storedCursor = o.css(\"cursor\"), o.css(\"cursor\", a.cursor), this.storedStylesheet = t(\"\").appendTo(o)), a.opacity && (this.helper.css(\"opacity\") && (this._storedOpacity = this.helper.css(\"opacity\")), this.helper.css(\"opacity\", a.opacity)), a.zIndex && (this.helper.css(\"zIndex\") && (this._storedZIndex = this.helper.css(\"zIndex\")), this.helper.css(\"zIndex\", a.zIndex)), this.scrollParent[0] !== this.document[0] && \"HTML\" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger(\"start\", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s) for (n = this.containers.length - 1; n >= 0; n--) {\n this.containers[n]._trigger(\"activate\", e, this._uiHash(this));\n }\n return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this._addClass(this.helper, \"ui-sortable-helper\"), this._mouseDrag(e), !0;\n },\n _mouseDrag: function _mouseDrag(e) {\n var i,\n s,\n n,\n o,\n a = this.options,\n r = !1;\n\n for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo(\"absolute\"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && \"HTML\" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < a.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + a.scrollSpeed : e.pageY - this.overflowOffset.top < a.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - a.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < a.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + a.scrollSpeed : e.pageX - this.overflowOffset.left < a.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - a.scrollSpeed)) : (e.pageY - this.document.scrollTop() < a.scrollSensitivity ? r = this.document.scrollTop(this.document.scrollTop() - a.scrollSpeed) : this.window.height() - (e.pageY - this.document.scrollTop()) < a.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + a.scrollSpeed)), e.pageX - this.document.scrollLeft() < a.scrollSensitivity ? r = this.document.scrollLeft(this.document.scrollLeft() - a.scrollSpeed) : this.window.width() - (e.pageX - this.document.scrollLeft()) < a.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + a.scrollSpeed))), r !== !1 && t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo(\"absolute\"), this.options.axis && \"y\" === this.options.axis || (this.helper[0].style.left = this.position.left + \"px\"), this.options.axis && \"x\" === this.options.axis || (this.helper[0].style.top = this.position.top + \"px\"), i = this.items.length - 1; i >= 0; i--) {\n if (s = this.items[i], n = s.item[0], o = this._intersectsWithPointer(s), o && s.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === o ? \"next\" : \"prev\"]()[0] !== n && !t.contains(this.placeholder[0], n) && (\"semi-dynamic\" === this.options.type ? !t.contains(this.element[0], n) : !0)) {\n if (this.direction = 1 === o ? \"down\" : \"up\", \"pointer\" !== this.options.tolerance && !this._intersectsWithSides(s)) break;\n this._rearrange(e, s), this._trigger(\"change\", e, this._uiHash());\n break;\n }\n }\n\n return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger(\"sort\", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1;\n },\n _mouseStop: function _mouseStop(e, i) {\n if (e) {\n if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert) {\n var s = this,\n n = this.placeholder.offset(),\n o = this.options.axis,\n a = {};\n o && \"x\" !== o || (a.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), o && \"y\" !== o || (a.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, t(this.helper).animate(a, parseInt(this.options.revert, 10) || 500, function () {\n s._clear(e);\n });\n } else this._clear(e, i);\n\n return !1;\n }\n },\n cancel: function cancel() {\n if (this.dragging) {\n this._mouseUp({\n target: null\n }), \"original\" === this.options.helper ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, \"ui-sortable-helper\")) : this.currentItem.show();\n\n for (var e = this.containers.length - 1; e >= 0; e--) {\n this.containers[e]._trigger(\"deactivate\", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger(\"out\", null, this._uiHash(this)), this.containers[e].containerCache.over = 0);\n }\n }\n\n return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), \"original\" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, {\n helper: null,\n dragging: !1,\n reverting: !1,\n _noFinalSort: null\n }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition.parent).prepend(this.currentItem)), this;\n },\n serialize: function serialize(e) {\n var i = this._getItemsAsjQuery(e && e.connected),\n s = [];\n\n return e = e || {}, t(i).each(function () {\n var i = (t(e.item || this).attr(e.attribute || \"id\") || \"\").match(e.expression || /(.+)[\\-=_](.+)/);\n i && s.push((e.key || i[1] + \"[]\") + \"=\" + (e.key && e.expression ? i[1] : i[2]));\n }), !s.length && e.key && s.push(e.key + \"=\"), s.join(\"&\");\n },\n toArray: function toArray(e) {\n var i = this._getItemsAsjQuery(e && e.connected),\n s = [];\n\n return e = e || {}, i.each(function () {\n s.push(t(e.item || this).attr(e.attribute || \"id\") || \"\");\n }), s;\n },\n _intersectsWith: function _intersectsWith(t) {\n var e = this.positionAbs.left,\n i = e + this.helperProportions.width,\n s = this.positionAbs.top,\n n = s + this.helperProportions.height,\n o = t.left,\n a = o + t.width,\n r = t.top,\n l = r + t.height,\n h = this.offset.click.top,\n c = this.offset.click.left,\n u = \"x\" === this.options.axis || s + h > r && l > s + h,\n d = \"y\" === this.options.axis || e + c > o && a > e + c,\n p = u && d;\n return \"pointer\" === this.options.tolerance || this.options.forcePointerForContainers || \"pointer\" !== this.options.tolerance && this.helperProportions[this.floating ? \"width\" : \"height\"] > t[this.floating ? \"width\" : \"height\"] ? p : e + this.helperProportions.width / 2 > o && a > i - this.helperProportions.width / 2 && s + this.helperProportions.height / 2 > r && l > n - this.helperProportions.height / 2;\n },\n _intersectsWithPointer: function _intersectsWithPointer(t) {\n var e,\n i,\n s = \"x\" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height),\n n = \"y\" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width),\n o = s && n;\n\n return o ? (e = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(), this.floating ? \"right\" === i || \"down\" === e ? 2 : 1 : e && (\"down\" === e ? 2 : 1)) : !1;\n },\n _intersectsWithSides: function _intersectsWithSides(t) {\n var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height),\n i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width),\n s = this._getDragVerticalDirection(),\n n = this._getDragHorizontalDirection();\n\n return this.floating && n ? \"right\" === n && i || \"left\" === n && !i : s && (\"down\" === s && e || \"up\" === s && !e);\n },\n _getDragVerticalDirection: function _getDragVerticalDirection() {\n var t = this.positionAbs.top - this.lastPositionAbs.top;\n return 0 !== t && (t > 0 ? \"down\" : \"up\");\n },\n _getDragHorizontalDirection: function _getDragHorizontalDirection() {\n var t = this.positionAbs.left - this.lastPositionAbs.left;\n return 0 !== t && (t > 0 ? \"right\" : \"left\");\n },\n refresh: function refresh(t) {\n return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this;\n },\n _connectWith: function _connectWith() {\n var t = this.options;\n return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith;\n },\n _getItemsAsjQuery: function _getItemsAsjQuery(e) {\n function i() {\n r.push(this);\n }\n\n var s,\n n,\n o,\n a,\n r = [],\n l = [],\n h = this._connectWith();\n\n if (h && e) for (s = h.length - 1; s >= 0; s--) {\n for (o = t(h[s], this.document[0]), n = o.length - 1; n >= 0; n--) {\n a = t.data(o[n], this.widgetFullName), a && a !== this && !a.options.disabled && l.push([t.isFunction(a.options.items) ? a.options.items.call(a.element) : t(a.options.items, a.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), a]);\n }\n }\n\n for (l.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, {\n options: this.options,\n item: this.currentItem\n }) : t(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]), s = l.length - 1; s >= 0; s--) {\n l[s][0].each(i);\n }\n\n return t(r);\n },\n _removeCurrentsFromItems: function _removeCurrentsFromItems() {\n var e = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n this.items = t.grep(this.items, function (t) {\n for (var i = 0; e.length > i; i++) {\n if (e[i] === t.item[0]) return !1;\n }\n\n return !0;\n });\n },\n _refreshItems: function _refreshItems(e) {\n this.items = [], this.containers = [this];\n\n var i,\n s,\n n,\n o,\n a,\n r,\n l,\n h,\n c = this.items,\n u = [[t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, {\n item: this.currentItem\n }) : t(this.options.items, this.element), this]],\n d = this._connectWith();\n\n if (d && this.ready) for (i = d.length - 1; i >= 0; i--) {\n for (n = t(d[i], this.document[0]), s = n.length - 1; s >= 0; s--) {\n o = t.data(n[s], this.widgetFullName), o && o !== this && !o.options.disabled && (u.push([t.isFunction(o.options.items) ? o.options.items.call(o.element[0], e, {\n item: this.currentItem\n }) : t(o.options.items, o.element), o]), this.containers.push(o));\n }\n }\n\n for (i = u.length - 1; i >= 0; i--) {\n for (a = u[i][1], r = u[i][0], s = 0, h = r.length; h > s; s++) {\n l = t(r[s]), l.data(this.widgetName + \"-item\", a), c.push({\n item: l,\n instance: a,\n width: 0,\n height: 0,\n left: 0,\n top: 0\n });\n }\n }\n },\n refreshPositions: function refreshPositions(e) {\n this.floating = this.items.length ? \"x\" === this.options.axis || this._isFloating(this.items[0].item) : !1, this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());\n var i, s, n, o;\n\n for (i = this.items.length - 1; i >= 0; i--) {\n s = this.items[i], s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? t(this.options.toleranceElement, s.item) : s.item, e || (s.width = n.outerWidth(), s.height = n.outerHeight()), o = n.offset(), s.left = o.left, s.top = o.top);\n }\n\n if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);else for (i = this.containers.length - 1; i >= 0; i--) {\n o = this.containers[i].element.offset(), this.containers[i].containerCache.left = o.left, this.containers[i].containerCache.top = o.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n }\n return this;\n },\n _createPlaceholder: function _createPlaceholder(e) {\n e = e || this;\n var i,\n s = e.options;\n s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = {\n element: function element() {\n var s = e.currentItem[0].nodeName.toLowerCase(),\n n = t(\"<\" + s + \">\", e.document[0]);\n return e._addClass(n, \"ui-sortable-placeholder\", i || e.currentItem[0].className)._removeClass(n, \"ui-sortable-helper\"), \"tbody\" === s ? e._createTrPlaceholder(e.currentItem.find(\"tr\").eq(0), t(\"
\", e.document[0]).appendTo(n)) : \"tr\" === s ? e._createTrPlaceholder(e.currentItem, n) : \"img\" === s && n.attr(\"src\", e.currentItem.attr(\"src\")), i || n.css(\"visibility\", \"hidden\"), n;\n },\n update: function update(t, n) {\n (!i || s.forcePlaceholderSize) && (n.height() || n.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css(\"paddingTop\") || 0, 10) - parseInt(e.currentItem.css(\"paddingBottom\") || 0, 10)), n.width() || n.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css(\"paddingLeft\") || 0, 10) - parseInt(e.currentItem.css(\"paddingRight\") || 0, 10)));\n }\n }), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), s.placeholder.update(e, e.placeholder);\n },\n _createTrPlaceholder: function _createTrPlaceholder(e, i) {\n var s = this;\n e.children().each(function () {\n t(\" | \", s.document[0]).attr(\"colspan\", t(this).attr(\"colspan\") || 1).appendTo(i);\n });\n },\n _contactContainers: function _contactContainers(e) {\n var i,\n s,\n n,\n o,\n a,\n r,\n l,\n h,\n c,\n u,\n d = null,\n p = null;\n\n for (i = this.containers.length - 1; i >= 0; i--) {\n if (!t.contains(this.currentItem[0], this.containers[i].element[0])) if (this._intersectsWith(this.containers[i].containerCache)) {\n if (d && t.contains(this.containers[i].element[0], d.element[0])) continue;\n d = this.containers[i], p = i;\n } else this.containers[i].containerCache.over && (this.containers[i]._trigger(\"out\", e, this._uiHash(this)), this.containers[i].containerCache.over = 0);\n }\n\n if (d) if (1 === this.containers.length) this.containers[p].containerCache.over || (this.containers[p]._trigger(\"over\", e, this._uiHash(this)), this.containers[p].containerCache.over = 1);else {\n for (n = 1e4, o = null, c = d.floating || this._isFloating(this.currentItem), a = c ? \"left\" : \"top\", r = c ? \"width\" : \"height\", u = c ? \"pageX\" : \"pageY\", s = this.items.length - 1; s >= 0; s--) {\n t.contains(this.containers[p].element[0], this.items[s].item[0]) && this.items[s].item[0] !== this.currentItem[0] && (l = this.items[s].item.offset()[a], h = !1, e[u] - l > this.items[s][r] / 2 && (h = !0), n > Math.abs(e[u] - l) && (n = Math.abs(e[u] - l), o = this.items[s], this.direction = h ? \"up\" : \"down\"));\n }\n\n if (!o && !this.options.dropOnEmpty) return;\n if (this.currentContainer === this.containers[p]) return this.currentContainer.containerCache.over || (this.containers[p]._trigger(\"over\", e, this._uiHash()), this.currentContainer.containerCache.over = 1), void 0;\n o ? this._rearrange(e, o, null, !0) : this._rearrange(e, null, this.containers[p].element, !0), this._trigger(\"change\", e, this._uiHash()), this.containers[p]._trigger(\"change\", e, this._uiHash(this)), this.currentContainer = this.containers[p], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[p]._trigger(\"over\", e, this._uiHash(this)), this.containers[p].containerCache.over = 1;\n }\n },\n _createHelper: function _createHelper(e) {\n var i = this.options,\n s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e, this.currentItem])) : \"clone\" === i.helper ? this.currentItem.clone() : this.currentItem;\n return s.parents(\"body\").length || t(\"parent\" !== i.appendTo ? i.appendTo : this.currentItem[0].parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = {\n width: this.currentItem[0].style.width,\n height: this.currentItem[0].style.height,\n position: this.currentItem.css(\"position\"),\n top: this.currentItem.css(\"top\"),\n left: this.currentItem.css(\"left\")\n }), (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()), (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()), s;\n },\n _adjustOffsetFromHelper: function _adjustOffsetFromHelper(e) {\n \"string\" == typeof e && (e = e.split(\" \")), t.isArray(e) && (e = {\n left: +e[0],\n top: +e[1] || 0\n }), \"left\" in e && (this.offset.click.left = e.left + this.margins.left), \"right\" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), \"top\" in e && (this.offset.click.top = e.top + this.margins.top), \"bottom\" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top);\n },\n _getParentOffset: function _getParentOffset() {\n this.offsetParent = this.helper.offsetParent();\n var e = this.offsetParent.offset();\n return \"absolute\" === this.cssPosition && this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && \"html\" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {\n top: 0,\n left: 0\n }), {\n top: e.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"), 10) || 0),\n left: e.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"), 10) || 0)\n };\n },\n _getRelativeOffset: function _getRelativeOffset() {\n if (\"relative\" === this.cssPosition) {\n var t = this.currentItem.position();\n return {\n top: t.top - (parseInt(this.helper.css(\"top\"), 10) || 0) + this.scrollParent.scrollTop(),\n left: t.left - (parseInt(this.helper.css(\"left\"), 10) || 0) + this.scrollParent.scrollLeft()\n };\n }\n\n return {\n top: 0,\n left: 0\n };\n },\n _cacheMargins: function _cacheMargins() {\n this.margins = {\n left: parseInt(this.currentItem.css(\"marginLeft\"), 10) || 0,\n top: parseInt(this.currentItem.css(\"marginTop\"), 10) || 0\n };\n },\n _cacheHelperProportions: function _cacheHelperProportions() {\n this.helperProportions = {\n width: this.helper.outerWidth(),\n height: this.helper.outerHeight()\n };\n },\n _setContainment: function _setContainment() {\n var e,\n i,\n s,\n n = this.options;\n \"parent\" === n.containment && (n.containment = this.helper[0].parentNode), (\"document\" === n.containment || \"window\" === n.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, \"document\" === n.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, (\"document\" === n.containment ? this.document.height() || document.body.parentNode.scrollHeight : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(n.containment) || (e = t(n.containment)[0], i = t(n.containment).offset(), s = \"hidden\" !== t(e).css(\"overflow\"), this.containment = [i.left + (parseInt(t(e).css(\"borderLeftWidth\"), 10) || 0) + (parseInt(t(e).css(\"paddingLeft\"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css(\"borderTopWidth\"), 10) || 0) + (parseInt(t(e).css(\"paddingTop\"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(t(e).css(\"borderLeftWidth\"), 10) || 0) - (parseInt(t(e).css(\"paddingRight\"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(t(e).css(\"borderTopWidth\"), 10) || 0) - (parseInt(t(e).css(\"paddingBottom\"), 10) || 0) - this.helperProportions.height - this.margins.top]);\n },\n _convertPositionTo: function _convertPositionTo(e, i) {\n i || (i = this.position);\n var s = \"absolute\" === e ? 1 : -1,\n n = \"absolute\" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,\n o = /(html|body)/i.test(n[0].tagName);\n return {\n top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - (\"fixed\" === this.cssPosition ? -this.scrollParent.scrollTop() : o ? 0 : n.scrollTop()) * s,\n left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - (\"fixed\" === this.cssPosition ? -this.scrollParent.scrollLeft() : o ? 0 : n.scrollLeft()) * s\n };\n },\n _generatePosition: function _generatePosition(e) {\n var i,\n s,\n n = this.options,\n o = e.pageX,\n a = e.pageY,\n r = \"absolute\" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,\n l = /(html|body)/i.test(r[0].tagName);\n return \"relative\" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (o = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (a = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (o = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (a = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY + Math.round((a - this.originalPageY) / n.grid[1]) * n.grid[1], a = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[1] : i + n.grid[1] : i, s = this.originalPageX + Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0], o = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s - this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)), {\n top: a - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (\"fixed\" === this.cssPosition ? -this.scrollParent.scrollTop() : l ? 0 : r.scrollTop()),\n left: o - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (\"fixed\" === this.cssPosition ? -this.scrollParent.scrollLeft() : l ? 0 : r.scrollLeft())\n };\n },\n _rearrange: function _rearrange(t, e, i, s) {\n i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], \"down\" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1;\n var n = this.counter;\n\n this._delay(function () {\n n === this.counter && this.refreshPositions(!s);\n });\n },\n _clear: function _clear(t, e) {\n function i(t, e, i) {\n return function (s) {\n i._trigger(t, s, e._uiHash(e));\n };\n }\n\n this.reverting = !1;\n var s,\n n = [];\n\n if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {\n for (s in this._storedCSS) {\n (\"auto\" === this._storedCSS[s] || \"static\" === this._storedCSS[s]) && (this._storedCSS[s] = \"\");\n }\n\n this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, \"ui-sortable-helper\");\n } else this.currentItem.show();\n\n for (this.fromOutside && !e && n.push(function (t) {\n this._trigger(\"receive\", t, this._uiHash(this.fromOutside));\n }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(\".ui-sortable-helper\")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || n.push(function (t) {\n this._trigger(\"update\", t, this._uiHash());\n }), this !== this.currentContainer && (e || (n.push(function (t) {\n this._trigger(\"remove\", t, this._uiHash());\n }), n.push(function (t) {\n return function (e) {\n t._trigger(\"receive\", e, this._uiHash(this));\n };\n }.call(this, this.currentContainer)), n.push(function (t) {\n return function (e) {\n t._trigger(\"update\", e, this._uiHash(this));\n };\n }.call(this, this.currentContainer)))), s = this.containers.length - 1; s >= 0; s--) {\n e || n.push(i(\"deactivate\", this, this.containers[s])), this.containers[s].containerCache.over && (n.push(i(\"out\", this, this.containers[s])), this.containers[s].containerCache.over = 0);\n }\n\n if (this.storedCursor && (this.document.find(\"body\").css(\"cursor\", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css(\"opacity\", this._storedOpacity), this._storedZIndex && this.helper.css(\"zIndex\", \"auto\" === this._storedZIndex ? \"\" : this._storedZIndex), this.dragging = !1, e || this._trigger(\"beforeStop\", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !e) {\n for (s = 0; n.length > s; s++) {\n n[s].call(this, t);\n }\n\n this._trigger(\"stop\", t, this._uiHash());\n }\n\n return this.fromOutside = !1, !this.cancelHelperRemoval;\n },\n _trigger: function _trigger() {\n t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel();\n },\n _uiHash: function _uiHash(e) {\n var i = e || this;\n return {\n helper: i.helper,\n placeholder: i.placeholder || t([]),\n position: i.position,\n originalPosition: i.originalPosition,\n offset: i.positionAbs,\n item: i.currentItem,\n sender: e ? e.element : null\n };\n }\n });\n});","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\nTurbolinks 5.2.0\nCopyright © 2018 Basecamp, LLC\n */\n(function () {\n var t = this;\n (function () {\n (function () {\n this.Turbolinks = {\n supported: function () {\n return null != window.history.pushState && null != window.requestAnimationFrame && null != window.addEventListener;\n }(),\n visit: function visit(t, r) {\n return e.controller.visit(t, r);\n },\n clearCache: function clearCache() {\n return e.controller.clearCache();\n },\n setProgressBarDelay: function setProgressBarDelay(t) {\n return e.controller.setProgressBarDelay(t);\n }\n };\n }).call(this);\n }).call(t);\n var e = t.Turbolinks;\n (function () {\n (function () {\n var t,\n r,\n n,\n o = [].slice;\n e.copyObject = function (t) {\n var e, r, n;\n r = {};\n\n for (e in t) {\n n = t[e], r[e] = n;\n }\n\n return r;\n }, e.closest = function (e, r) {\n return t.call(e, r);\n }, t = function () {\n var t, e;\n return t = document.documentElement, null != (e = t.closest) ? e : function (t) {\n var e;\n\n for (e = this; e;) {\n if (e.nodeType === Node.ELEMENT_NODE && r.call(e, t)) return e;\n e = e.parentNode;\n }\n };\n }(), e.defer = function (t) {\n return setTimeout(t, 1);\n }, e.throttle = function (t) {\n var e;\n return e = null, function () {\n var r;\n return r = 1 <= arguments.length ? o.call(arguments, 0) : [], null != e ? e : e = requestAnimationFrame(function (n) {\n return function () {\n return e = null, t.apply(n, r);\n };\n }(this));\n };\n }, e.dispatch = function (t, e) {\n var r, o, i, s, a, u;\n return a = null != e ? e : {}, u = a.target, r = a.cancelable, o = a.data, i = document.createEvent(\"Events\"), i.initEvent(t, !0, r === !0), i.data = null != o ? o : {}, i.cancelable && !n && (s = i.preventDefault, i.preventDefault = function () {\n return this.defaultPrevented || Object.defineProperty(this, \"defaultPrevented\", {\n get: function get() {\n return !0;\n }\n }), s.call(this);\n }), (null != u ? u : document).dispatchEvent(i), i;\n }, n = function () {\n var t;\n return t = document.createEvent(\"Events\"), t.initEvent(\"test\", !0, !0), t.preventDefault(), t.defaultPrevented;\n }(), e.match = function (t, e) {\n return r.call(t, e);\n }, r = function () {\n var t, e, r, n;\n return t = document.documentElement, null != (e = null != (r = null != (n = t.matchesSelector) ? n : t.webkitMatchesSelector) ? r : t.msMatchesSelector) ? e : t.mozMatchesSelector;\n }(), e.uuid = function () {\n var t, e, r;\n\n for (r = \"\", t = e = 1; 36 >= e; t = ++e) {\n r += 9 === t || 14 === t || 19 === t || 24 === t ? \"-\" : 15 === t ? \"4\" : 20 === t ? (Math.floor(4 * Math.random()) + 8).toString(16) : Math.floor(15 * Math.random()).toString(16);\n }\n\n return r;\n };\n }).call(this), function () {\n e.Location = function () {\n function t(t) {\n var e, r;\n null == t && (t = \"\"), r = document.createElement(\"a\"), r.href = t.toString(), this.absoluteURL = r.href, e = r.hash.length, 2 > e ? this.requestURL = this.absoluteURL : (this.requestURL = this.absoluteURL.slice(0, -e), this.anchor = r.hash.slice(1));\n }\n\n var e, r, n, o;\n return t.wrap = function (t) {\n return t instanceof this ? t : new this(t);\n }, t.prototype.getOrigin = function () {\n return this.absoluteURL.split(\"/\", 3).join(\"/\");\n }, t.prototype.getPath = function () {\n var t, e;\n return null != (t = null != (e = this.requestURL.match(/\\/\\/[^\\/]*(\\/[^?;]*)/)) ? e[1] : void 0) ? t : \"/\";\n }, t.prototype.getPathComponents = function () {\n return this.getPath().split(\"/\").slice(1);\n }, t.prototype.getLastPathComponent = function () {\n return this.getPathComponents().slice(-1)[0];\n }, t.prototype.getExtension = function () {\n var t, e;\n return null != (t = null != (e = this.getLastPathComponent().match(/\\.[^.]*$/)) ? e[0] : void 0) ? t : \"\";\n }, t.prototype.isHTML = function () {\n return this.getExtension().match(/^(?:|\\.(?:htm|html|xhtml))$/);\n }, t.prototype.isPrefixedBy = function (t) {\n var e;\n return e = r(t), this.isEqualTo(t) || o(this.absoluteURL, e);\n }, t.prototype.isEqualTo = function (t) {\n return this.absoluteURL === (null != t ? t.absoluteURL : void 0);\n }, t.prototype.toCacheKey = function () {\n return this.requestURL;\n }, t.prototype.toJSON = function () {\n return this.absoluteURL;\n }, t.prototype.toString = function () {\n return this.absoluteURL;\n }, t.prototype.valueOf = function () {\n return this.absoluteURL;\n }, r = function r(t) {\n return e(t.getOrigin() + t.getPath());\n }, e = function e(t) {\n return n(t, \"/\") ? t : t + \"/\";\n }, o = function o(t, e) {\n return t.slice(0, e.length) === e;\n }, n = function n(t, e) {\n return t.slice(-e.length) === e;\n }, t;\n }();\n }.call(this), function () {\n var t = function t(_t, e) {\n return function () {\n return _t.apply(e, arguments);\n };\n };\n\n e.HttpRequest = function () {\n function r(r, n, o) {\n this.delegate = r, this.requestCanceled = t(this.requestCanceled, this), this.requestTimedOut = t(this.requestTimedOut, this), this.requestFailed = t(this.requestFailed, this), this.requestLoaded = t(this.requestLoaded, this), this.requestProgressed = t(this.requestProgressed, this), this.url = e.Location.wrap(n).requestURL, this.referrer = e.Location.wrap(o).absoluteURL, this.createXHR();\n }\n\n return r.NETWORK_FAILURE = 0, r.TIMEOUT_FAILURE = -1, r.timeout = 60, r.prototype.send = function () {\n var t;\n return this.xhr && !this.sent ? (this.notifyApplicationBeforeRequestStart(), this.setProgress(0), this.xhr.send(), this.sent = !0, \"function\" == typeof (t = this.delegate).requestStarted ? t.requestStarted() : void 0) : void 0;\n }, r.prototype.cancel = function () {\n return this.xhr && this.sent ? this.xhr.abort() : void 0;\n }, r.prototype.requestProgressed = function (t) {\n return t.lengthComputable ? this.setProgress(t.loaded / t.total) : void 0;\n }, r.prototype.requestLoaded = function () {\n return this.endRequest(function (t) {\n return function () {\n var e;\n return 200 <= (e = t.xhr.status) && 300 > e ? t.delegate.requestCompletedWithResponse(t.xhr.responseText, t.xhr.getResponseHeader(\"Turbolinks-Location\")) : (t.failed = !0, t.delegate.requestFailedWithStatusCode(t.xhr.status, t.xhr.responseText));\n };\n }(this));\n }, r.prototype.requestFailed = function () {\n return this.endRequest(function (t) {\n return function () {\n return t.failed = !0, t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE);\n };\n }(this));\n }, r.prototype.requestTimedOut = function () {\n return this.endRequest(function (t) {\n return function () {\n return t.failed = !0, t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE);\n };\n }(this));\n }, r.prototype.requestCanceled = function () {\n return this.endRequest();\n }, r.prototype.notifyApplicationBeforeRequestStart = function () {\n return e.dispatch(\"turbolinks:request-start\", {\n data: {\n url: this.url,\n xhr: this.xhr\n }\n });\n }, r.prototype.notifyApplicationAfterRequestEnd = function () {\n return e.dispatch(\"turbolinks:request-end\", {\n data: {\n url: this.url,\n xhr: this.xhr\n }\n });\n }, r.prototype.createXHR = function () {\n return this.xhr = new XMLHttpRequest(), this.xhr.open(\"GET\", this.url, !0), this.xhr.timeout = 1e3 * this.constructor.timeout, this.xhr.setRequestHeader(\"Accept\", \"text/html, application/xhtml+xml\"), this.xhr.setRequestHeader(\"Turbolinks-Referrer\", this.referrer), this.xhr.onprogress = this.requestProgressed, this.xhr.onload = this.requestLoaded, this.xhr.onerror = this.requestFailed, this.xhr.ontimeout = this.requestTimedOut, this.xhr.onabort = this.requestCanceled;\n }, r.prototype.endRequest = function (t) {\n return this.xhr ? (this.notifyApplicationAfterRequestEnd(), null != t && t.call(this), this.destroy()) : void 0;\n }, r.prototype.setProgress = function (t) {\n var e;\n return this.progress = t, \"function\" == typeof (e = this.delegate).requestProgressed ? e.requestProgressed(this.progress) : void 0;\n }, r.prototype.destroy = function () {\n var t;\n return this.setProgress(1), \"function\" == typeof (t = this.delegate).requestFinished && t.requestFinished(), this.delegate = null, this.xhr = null;\n }, r;\n }();\n }.call(this), function () {\n var t = function t(_t2, e) {\n return function () {\n return _t2.apply(e, arguments);\n };\n };\n\n e.ProgressBar = function () {\n function e() {\n this.trickle = t(this.trickle, this), this.stylesheetElement = this.createStylesheetElement(), this.progressElement = this.createProgressElement();\n }\n\n var r;\n return r = 300, e.defaultCSS = \".turbolinks-progress-bar {\\n position: fixed;\\n display: block;\\n top: 0;\\n left: 0;\\n height: 3px;\\n background: #0076ff;\\n z-index: 9999;\\n transition: width \" + r + \"ms ease-out, opacity \" + r / 2 + \"ms \" + r / 2 + \"ms ease-in;\\n transform: translate3d(0, 0, 0);\\n}\", e.prototype.show = function () {\n return this.visible ? void 0 : (this.visible = !0, this.installStylesheetElement(), this.installProgressElement(), this.startTrickling());\n }, e.prototype.hide = function () {\n return this.visible && !this.hiding ? (this.hiding = !0, this.fadeProgressElement(function (t) {\n return function () {\n return t.uninstallProgressElement(), t.stopTrickling(), t.visible = !1, t.hiding = !1;\n };\n }(this))) : void 0;\n }, e.prototype.setValue = function (t) {\n return this.value = t, this.refresh();\n }, e.prototype.installStylesheetElement = function () {\n return document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }, e.prototype.installProgressElement = function () {\n return this.progressElement.style.width = 0, this.progressElement.style.opacity = 1, document.documentElement.insertBefore(this.progressElement, document.body), this.refresh();\n }, e.prototype.fadeProgressElement = function (t) {\n return this.progressElement.style.opacity = 0, setTimeout(t, 1.5 * r);\n }, e.prototype.uninstallProgressElement = function () {\n return this.progressElement.parentNode ? document.documentElement.removeChild(this.progressElement) : void 0;\n }, e.prototype.startTrickling = function () {\n return null != this.trickleInterval ? this.trickleInterval : this.trickleInterval = setInterval(this.trickle, r);\n }, e.prototype.stopTrickling = function () {\n return clearInterval(this.trickleInterval), this.trickleInterval = null;\n }, e.prototype.trickle = function () {\n return this.setValue(this.value + Math.random() / 100);\n }, e.prototype.refresh = function () {\n return requestAnimationFrame(function (t) {\n return function () {\n return t.progressElement.style.width = 10 + 90 * t.value + \"%\";\n };\n }(this));\n }, e.prototype.createStylesheetElement = function () {\n var t;\n return t = document.createElement(\"style\"), t.type = \"text/css\", t.textContent = this.constructor.defaultCSS, t;\n }, e.prototype.createProgressElement = function () {\n var t;\n return t = document.createElement(\"div\"), t.className = \"turbolinks-progress-bar\", t;\n }, e;\n }();\n }.call(this), function () {\n var t = function t(_t3, e) {\n return function () {\n return _t3.apply(e, arguments);\n };\n };\n\n e.BrowserAdapter = function () {\n function r(r) {\n this.controller = r, this.showProgressBar = t(this.showProgressBar, this), this.progressBar = new e.ProgressBar();\n }\n\n var n, o, i;\n return i = e.HttpRequest, n = i.NETWORK_FAILURE, o = i.TIMEOUT_FAILURE, r.prototype.visitProposedToLocationWithAction = function (t, e) {\n return this.controller.startVisitToLocationWithAction(t, e);\n }, r.prototype.visitStarted = function (t) {\n return t.issueRequest(), t.changeHistory(), t.loadCachedSnapshot();\n }, r.prototype.visitRequestStarted = function (t) {\n return this.progressBar.setValue(0), t.hasCachedSnapshot() || \"restore\" !== t.action ? this.showProgressBarAfterDelay() : this.showProgressBar();\n }, r.prototype.visitRequestProgressed = function (t) {\n return this.progressBar.setValue(t.progress);\n }, r.prototype.visitRequestCompleted = function (t) {\n return t.loadResponse();\n }, r.prototype.visitRequestFailedWithStatusCode = function (t, e) {\n switch (e) {\n case n:\n case o:\n return this.reload();\n\n default:\n return t.loadResponse();\n }\n }, r.prototype.visitRequestFinished = function (t) {\n return this.hideProgressBar();\n }, r.prototype.visitCompleted = function (t) {\n return t.followRedirect();\n }, r.prototype.pageInvalidated = function () {\n return this.reload();\n }, r.prototype.showProgressBarAfterDelay = function () {\n return this.progressBarTimeout = setTimeout(this.showProgressBar, this.controller.progressBarDelay);\n }, r.prototype.showProgressBar = function () {\n return this.progressBar.show();\n }, r.prototype.hideProgressBar = function () {\n return this.progressBar.hide(), clearTimeout(this.progressBarTimeout);\n }, r.prototype.reload = function () {\n return window.location.reload();\n }, r;\n }();\n }.call(this), function () {\n var t = function t(_t4, e) {\n return function () {\n return _t4.apply(e, arguments);\n };\n };\n\n e.History = function () {\n function r(e) {\n this.delegate = e, this.onPageLoad = t(this.onPageLoad, this), this.onPopState = t(this.onPopState, this);\n }\n\n return r.prototype.start = function () {\n return this.started ? void 0 : (addEventListener(\"popstate\", this.onPopState, !1), addEventListener(\"load\", this.onPageLoad, !1), this.started = !0);\n }, r.prototype.stop = function () {\n return this.started ? (removeEventListener(\"popstate\", this.onPopState, !1), removeEventListener(\"load\", this.onPageLoad, !1), this.started = !1) : void 0;\n }, r.prototype.push = function (t, r) {\n return t = e.Location.wrap(t), this.update(\"push\", t, r);\n }, r.prototype.replace = function (t, r) {\n return t = e.Location.wrap(t), this.update(\"replace\", t, r);\n }, r.prototype.onPopState = function (t) {\n var r, n, o, i;\n return this.shouldHandlePopState() && (i = null != (n = t.state) ? n.turbolinks : void 0) ? (r = e.Location.wrap(window.location), o = i.restorationIdentifier, this.delegate.historyPoppedToLocationWithRestorationIdentifier(r, o)) : void 0;\n }, r.prototype.onPageLoad = function (t) {\n return e.defer(function (t) {\n return function () {\n return t.pageLoaded = !0;\n };\n }(this));\n }, r.prototype.shouldHandlePopState = function () {\n return this.pageIsLoaded();\n }, r.prototype.pageIsLoaded = function () {\n return this.pageLoaded || \"complete\" === document.readyState;\n }, r.prototype.update = function (t, e, r) {\n var n;\n return n = {\n turbolinks: {\n restorationIdentifier: r\n }\n }, history[t + \"State\"](n, null, e);\n }, r;\n }();\n }.call(this), function () {\n e.HeadDetails = function () {\n function t(t) {\n var e, r, n, s, a, u;\n\n for (this.elements = {}, n = 0, a = t.length; a > n; n++) {\n u = t[n], u.nodeType === Node.ELEMENT_NODE && (s = u.outerHTML, r = null != (e = this.elements)[s] ? e[s] : e[s] = {\n type: i(u),\n tracked: o(u),\n elements: []\n }, r.elements.push(u));\n }\n }\n\n var e, r, n, o, i;\n return t.fromHeadElement = function (t) {\n var e;\n return new this(null != (e = null != t ? t.childNodes : void 0) ? e : []);\n }, t.prototype.hasElementWithKey = function (t) {\n return t in this.elements;\n }, t.prototype.getTrackedElementSignature = function () {\n var t, e;\n return function () {\n var r, n;\n r = this.elements, n = [];\n\n for (t in r) {\n e = r[t].tracked, e && n.push(t);\n }\n\n return n;\n }.call(this).join(\"\");\n }, t.prototype.getScriptElementsNotInDetails = function (t) {\n return this.getElementsMatchingTypeNotInDetails(\"script\", t);\n }, t.prototype.getStylesheetElementsNotInDetails = function (t) {\n return this.getElementsMatchingTypeNotInDetails(\"stylesheet\", t);\n }, t.prototype.getElementsMatchingTypeNotInDetails = function (t, e) {\n var r, n, o, i, s, a;\n o = this.elements, s = [];\n\n for (n in o) {\n i = o[n], a = i.type, r = i.elements, a !== t || e.hasElementWithKey(n) || s.push(r[0]);\n }\n\n return s;\n }, t.prototype.getProvisionalElements = function () {\n var t, e, r, n, o, i, s;\n r = [], n = this.elements;\n\n for (e in n) {\n o = n[e], s = o.type, i = o.tracked, t = o.elements, null != s || i ? t.length > 1 && r.push.apply(r, t.slice(1)) : r.push.apply(r, t);\n }\n\n return r;\n }, t.prototype.getMetaValue = function (t) {\n var e;\n return null != (e = this.findMetaElementByName(t)) ? e.getAttribute(\"content\") : void 0;\n }, t.prototype.findMetaElementByName = function (t) {\n var r, n, o, i;\n r = void 0, i = this.elements;\n\n for (o in i) {\n n = i[o].elements, e(n[0], t) && (r = n[0]);\n }\n\n return r;\n }, i = function i(t) {\n return r(t) ? \"script\" : n(t) ? \"stylesheet\" : void 0;\n }, o = function o(t) {\n return \"reload\" === t.getAttribute(\"data-turbolinks-track\");\n }, r = function r(t) {\n var e;\n return e = t.tagName.toLowerCase(), \"script\" === e;\n }, n = function n(t) {\n var e;\n return e = t.tagName.toLowerCase(), \"style\" === e || \"link\" === e && \"stylesheet\" === t.getAttribute(\"rel\");\n }, e = function e(t, _e) {\n var r;\n return r = t.tagName.toLowerCase(), \"meta\" === r && t.getAttribute(\"name\") === _e;\n }, t;\n }();\n }.call(this), function () {\n e.Snapshot = function () {\n function t(t, e) {\n this.headDetails = t, this.bodyElement = e;\n }\n\n return t.wrap = function (t) {\n return t instanceof this ? t : \"string\" == typeof t ? this.fromHTMLString(t) : this.fromHTMLElement(t);\n }, t.fromHTMLString = function (t) {\n var e;\n return e = document.createElement(\"html\"), e.innerHTML = t, this.fromHTMLElement(e);\n }, t.fromHTMLElement = function (t) {\n var r, n, o, i;\n return o = t.querySelector(\"head\"), r = null != (i = t.querySelector(\"body\")) ? i : document.createElement(\"body\"), n = e.HeadDetails.fromHeadElement(o), new this(n, r);\n }, t.prototype.clone = function () {\n return new this.constructor(this.headDetails, this.bodyElement.cloneNode(!0));\n }, t.prototype.getRootLocation = function () {\n var t, r;\n return r = null != (t = this.getSetting(\"root\")) ? t : \"/\", new e.Location(r);\n }, t.prototype.getCacheControlValue = function () {\n return this.getSetting(\"cache-control\");\n }, t.prototype.getElementForAnchor = function (t) {\n try {\n return this.bodyElement.querySelector(\"[id='\" + t + \"'], a[name='\" + t + \"']\");\n } catch (e) {}\n }, t.prototype.getPermanentElements = function () {\n return this.bodyElement.querySelectorAll(\"[id][data-turbolinks-permanent]\");\n }, t.prototype.getPermanentElementById = function (t) {\n return this.bodyElement.querySelector(\"#\" + t + \"[data-turbolinks-permanent]\");\n }, t.prototype.getPermanentElementsPresentInSnapshot = function (t) {\n var e, r, n, o, i;\n\n for (o = this.getPermanentElements(), i = [], r = 0, n = o.length; n > r; r++) {\n e = o[r], t.getPermanentElementById(e.id) && i.push(e);\n }\n\n return i;\n }, t.prototype.findFirstAutofocusableElement = function () {\n return this.bodyElement.querySelector(\"[autofocus]\");\n }, t.prototype.hasAnchor = function (t) {\n return null != this.getElementForAnchor(t);\n }, t.prototype.isPreviewable = function () {\n return \"no-preview\" !== this.getCacheControlValue();\n }, t.prototype.isCacheable = function () {\n return \"no-cache\" !== this.getCacheControlValue();\n }, t.prototype.isVisitable = function () {\n return \"reload\" !== this.getSetting(\"visit-control\");\n }, t.prototype.getSetting = function (t) {\n return this.headDetails.getMetaValue(\"turbolinks-\" + t);\n }, t;\n }();\n }.call(this), function () {\n var t = [].slice;\n\n e.Renderer = function () {\n function e() {}\n\n var r;\n return e.render = function () {\n var e, r, n, o;\n return n = arguments[0], r = arguments[1], e = 3 <= arguments.length ? t.call(arguments, 2) : [], o = function (t, e, r) {\n r.prototype = t.prototype;\n var n = new r(),\n o = t.apply(n, e);\n return Object(o) === o ? o : n;\n }(this, e, function () {}), o.delegate = n, o.render(r), o;\n }, e.prototype.renderView = function (t) {\n return this.delegate.viewWillRender(this.newBody), t(), this.delegate.viewRendered(this.newBody);\n }, e.prototype.invalidateView = function () {\n return this.delegate.viewInvalidated();\n }, e.prototype.createScriptElement = function (t) {\n var e;\n return \"false\" === t.getAttribute(\"data-turbolinks-eval\") ? t : (e = document.createElement(\"script\"), e.textContent = t.textContent, e.async = !1, r(e, t), e);\n }, r = function r(t, e) {\n var r, n, o, i, s, a, u;\n\n for (i = e.attributes, a = [], r = 0, n = i.length; n > r; r++) {\n s = i[r], o = s.name, u = s.value, a.push(t.setAttribute(o, u));\n }\n\n return a;\n }, e;\n }();\n }.call(this), function () {\n var t,\n r,\n n = function n(t, e) {\n function r() {\n this.constructor = t;\n }\n\n for (var n in e) {\n o.call(e, n) && (t[n] = e[n]);\n }\n\n return r.prototype = e.prototype, t.prototype = new r(), t.__super__ = e.prototype, t;\n },\n o = {}.hasOwnProperty;\n\n e.SnapshotRenderer = function (e) {\n function o(t, e, r) {\n this.currentSnapshot = t, this.newSnapshot = e, this.isPreview = r, this.currentHeadDetails = this.currentSnapshot.headDetails, this.newHeadDetails = this.newSnapshot.headDetails, this.currentBody = this.currentSnapshot.bodyElement, this.newBody = this.newSnapshot.bodyElement;\n }\n\n return n(o, e), o.prototype.render = function (t) {\n return this.shouldRender() ? (this.mergeHead(), this.renderView(function (e) {\n return function () {\n return e.replaceBody(), e.isPreview || e.focusFirstAutofocusableElement(), t();\n };\n }(this))) : this.invalidateView();\n }, o.prototype.mergeHead = function () {\n return this.copyNewHeadStylesheetElements(), this.copyNewHeadScriptElements(), this.removeCurrentHeadProvisionalElements(), this.copyNewHeadProvisionalElements();\n }, o.prototype.replaceBody = function () {\n var t;\n return t = this.relocateCurrentBodyPermanentElements(), this.activateNewBodyScriptElements(), this.assignNewBody(), this.replacePlaceholderElementsWithClonedPermanentElements(t);\n }, o.prototype.shouldRender = function () {\n return this.newSnapshot.isVisitable() && this.trackedElementsAreIdentical();\n }, o.prototype.trackedElementsAreIdentical = function () {\n return this.currentHeadDetails.getTrackedElementSignature() === this.newHeadDetails.getTrackedElementSignature();\n }, o.prototype.copyNewHeadStylesheetElements = function () {\n var t, e, r, n, o;\n\n for (n = this.getNewHeadStylesheetElements(), o = [], e = 0, r = n.length; r > e; e++) {\n t = n[e], o.push(document.head.appendChild(t));\n }\n\n return o;\n }, o.prototype.copyNewHeadScriptElements = function () {\n var t, e, r, n, o;\n\n for (n = this.getNewHeadScriptElements(), o = [], e = 0, r = n.length; r > e; e++) {\n t = n[e], o.push(document.head.appendChild(this.createScriptElement(t)));\n }\n\n return o;\n }, o.prototype.removeCurrentHeadProvisionalElements = function () {\n var t, e, r, n, o;\n\n for (n = this.getCurrentHeadProvisionalElements(), o = [], e = 0, r = n.length; r > e; e++) {\n t = n[e], o.push(document.head.removeChild(t));\n }\n\n return o;\n }, o.prototype.copyNewHeadProvisionalElements = function () {\n var t, e, r, n, o;\n\n for (n = this.getNewHeadProvisionalElements(), o = [], e = 0, r = n.length; r > e; e++) {\n t = n[e], o.push(document.head.appendChild(t));\n }\n\n return o;\n }, o.prototype.relocateCurrentBodyPermanentElements = function () {\n var e, n, o, i, s, a, u;\n\n for (a = this.getCurrentBodyPermanentElements(), u = [], e = 0, n = a.length; n > e; e++) {\n i = a[e], s = t(i), o = this.newSnapshot.getPermanentElementById(i.id), r(i, s.element), r(o, i), u.push(s);\n }\n\n return u;\n }, o.prototype.replacePlaceholderElementsWithClonedPermanentElements = function (t) {\n var e, n, o, i, s, a, u;\n\n for (u = [], o = 0, i = t.length; i > o; o++) {\n a = t[o], n = a.element, s = a.permanentElement, e = s.cloneNode(!0), u.push(r(n, e));\n }\n\n return u;\n }, o.prototype.activateNewBodyScriptElements = function () {\n var t, e, n, o, i, s;\n\n for (i = this.getNewBodyScriptElements(), s = [], e = 0, o = i.length; o > e; e++) {\n n = i[e], t = this.createScriptElement(n), s.push(r(n, t));\n }\n\n return s;\n }, o.prototype.assignNewBody = function () {\n return document.body = this.newBody;\n }, o.prototype.focusFirstAutofocusableElement = function () {\n var t;\n return null != (t = this.newSnapshot.findFirstAutofocusableElement()) ? t.focus() : void 0;\n }, o.prototype.getNewHeadStylesheetElements = function () {\n return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails);\n }, o.prototype.getNewHeadScriptElements = function () {\n return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails);\n }, o.prototype.getCurrentHeadProvisionalElements = function () {\n return this.currentHeadDetails.getProvisionalElements();\n }, o.prototype.getNewHeadProvisionalElements = function () {\n return this.newHeadDetails.getProvisionalElements();\n }, o.prototype.getCurrentBodyPermanentElements = function () {\n return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot);\n }, o.prototype.getNewBodyScriptElements = function () {\n return this.newBody.querySelectorAll(\"script\");\n }, o;\n }(e.Renderer), t = function t(_t5) {\n var e;\n return e = document.createElement(\"meta\"), e.setAttribute(\"name\", \"turbolinks-permanent-placeholder\"), e.setAttribute(\"content\", _t5.id), {\n element: e,\n permanentElement: _t5\n };\n }, r = function r(t, e) {\n var r;\n return (r = t.parentNode) ? r.replaceChild(e, t) : void 0;\n };\n }.call(this), function () {\n var t = function t(_t6, e) {\n function n() {\n this.constructor = _t6;\n }\n\n for (var o in e) {\n r.call(e, o) && (_t6[o] = e[o]);\n }\n\n return n.prototype = e.prototype, _t6.prototype = new n(), _t6.__super__ = e.prototype, _t6;\n },\n r = {}.hasOwnProperty;\n\n e.ErrorRenderer = function (e) {\n function r(t) {\n var e;\n e = document.createElement(\"html\"), e.innerHTML = t, this.newHead = e.querySelector(\"head\"), this.newBody = e.querySelector(\"body\");\n }\n\n return t(r, e), r.prototype.render = function (t) {\n return this.renderView(function (e) {\n return function () {\n return e.replaceHeadAndBody(), e.activateBodyScriptElements(), t();\n };\n }(this));\n }, r.prototype.replaceHeadAndBody = function () {\n var t, e;\n return e = document.head, t = document.body, e.parentNode.replaceChild(this.newHead, e), t.parentNode.replaceChild(this.newBody, t);\n }, r.prototype.activateBodyScriptElements = function () {\n var t, e, r, n, o, i;\n\n for (n = this.getScriptElements(), i = [], e = 0, r = n.length; r > e; e++) {\n o = n[e], t = this.createScriptElement(o), i.push(o.parentNode.replaceChild(t, o));\n }\n\n return i;\n }, r.prototype.getScriptElements = function () {\n return document.documentElement.querySelectorAll(\"script\");\n }, r;\n }(e.Renderer);\n }.call(this), function () {\n e.View = function () {\n function t(t) {\n this.delegate = t, this.htmlElement = document.documentElement;\n }\n\n return t.prototype.getRootLocation = function () {\n return this.getSnapshot().getRootLocation();\n }, t.prototype.getElementForAnchor = function (t) {\n return this.getSnapshot().getElementForAnchor(t);\n }, t.prototype.getSnapshot = function () {\n return e.Snapshot.fromHTMLElement(this.htmlElement);\n }, t.prototype.render = function (t, e) {\n var r, n, o;\n return o = t.snapshot, r = t.error, n = t.isPreview, this.markAsPreview(n), null != o ? this.renderSnapshot(o, n, e) : this.renderError(r, e);\n }, t.prototype.markAsPreview = function (t) {\n return t ? this.htmlElement.setAttribute(\"data-turbolinks-preview\", \"\") : this.htmlElement.removeAttribute(\"data-turbolinks-preview\");\n }, t.prototype.renderSnapshot = function (t, r, n) {\n return e.SnapshotRenderer.render(this.delegate, n, this.getSnapshot(), e.Snapshot.wrap(t), r);\n }, t.prototype.renderError = function (t, r) {\n return e.ErrorRenderer.render(this.delegate, r, t);\n }, t;\n }();\n }.call(this), function () {\n var t = function t(_t7, e) {\n return function () {\n return _t7.apply(e, arguments);\n };\n };\n\n e.ScrollManager = function () {\n function r(r) {\n this.delegate = r, this.onScroll = t(this.onScroll, this), this.onScroll = e.throttle(this.onScroll);\n }\n\n return r.prototype.start = function () {\n return this.started ? void 0 : (addEventListener(\"scroll\", this.onScroll, !1), this.onScroll(), this.started = !0);\n }, r.prototype.stop = function () {\n return this.started ? (removeEventListener(\"scroll\", this.onScroll, !1), this.started = !1) : void 0;\n }, r.prototype.scrollToElement = function (t) {\n return t.scrollIntoView();\n }, r.prototype.scrollToPosition = function (t) {\n var e, r;\n return e = t.x, r = t.y, window.scrollTo(e, r);\n }, r.prototype.onScroll = function (t) {\n return this.updatePosition({\n x: window.pageXOffset,\n y: window.pageYOffset\n });\n }, r.prototype.updatePosition = function (t) {\n var e;\n return this.position = t, null != (e = this.delegate) ? e.scrollPositionChanged(this.position) : void 0;\n }, r;\n }();\n }.call(this), function () {\n e.SnapshotCache = function () {\n function t(t) {\n this.size = t, this.keys = [], this.snapshots = {};\n }\n\n var r;\n return t.prototype.has = function (t) {\n var e;\n return e = r(t), e in this.snapshots;\n }, t.prototype.get = function (t) {\n var e;\n if (this.has(t)) return e = this.read(t), this.touch(t), e;\n }, t.prototype.put = function (t, e) {\n return this.write(t, e), this.touch(t), e;\n }, t.prototype.read = function (t) {\n var e;\n return e = r(t), this.snapshots[e];\n }, t.prototype.write = function (t, e) {\n var n;\n return n = r(t), this.snapshots[n] = e;\n }, t.prototype.touch = function (t) {\n var e, n;\n return n = r(t), e = this.keys.indexOf(n), e > -1 && this.keys.splice(e, 1), this.keys.unshift(n), this.trim();\n }, t.prototype.trim = function () {\n var t, e, r, n, o;\n\n for (n = this.keys.splice(this.size), o = [], t = 0, r = n.length; r > t; t++) {\n e = n[t], o.push(delete this.snapshots[e]);\n }\n\n return o;\n }, r = function r(t) {\n return e.Location.wrap(t).toCacheKey();\n }, t;\n }();\n }.call(this), function () {\n var t = function t(_t8, e) {\n return function () {\n return _t8.apply(e, arguments);\n };\n };\n\n e.Visit = function () {\n function r(r, n, o) {\n this.controller = r, this.action = o, this.performScroll = t(this.performScroll, this), this.identifier = e.uuid(), this.location = e.Location.wrap(n), this.adapter = this.controller.adapter, this.state = \"initialized\", this.timingMetrics = {};\n }\n\n var n;\n return r.prototype.start = function () {\n return \"initialized\" === this.state ? (this.recordTimingMetric(\"visitStart\"), this.state = \"started\", this.adapter.visitStarted(this)) : void 0;\n }, r.prototype.cancel = function () {\n var t;\n return \"started\" === this.state ? (null != (t = this.request) && t.cancel(), this.cancelRender(), this.state = \"canceled\") : void 0;\n }, r.prototype.complete = function () {\n var t;\n return \"started\" === this.state ? (this.recordTimingMetric(\"visitEnd\"), this.state = \"completed\", \"function\" == typeof (t = this.adapter).visitCompleted && t.visitCompleted(this), this.controller.visitCompleted(this)) : void 0;\n }, r.prototype.fail = function () {\n var t;\n return \"started\" === this.state ? (this.state = \"failed\", \"function\" == typeof (t = this.adapter).visitFailed ? t.visitFailed(this) : void 0) : void 0;\n }, r.prototype.changeHistory = function () {\n var t, e;\n return this.historyChanged ? void 0 : (t = this.location.isEqualTo(this.referrer) ? \"replace\" : this.action, e = n(t), this.controller[e](this.location, this.restorationIdentifier), this.historyChanged = !0);\n }, r.prototype.issueRequest = function () {\n return this.shouldIssueRequest() && null == this.request ? (this.progress = 0, this.request = new e.HttpRequest(this, this.location, this.referrer), this.request.send()) : void 0;\n }, r.prototype.getCachedSnapshot = function () {\n var t;\n return !(t = this.controller.getCachedSnapshotForLocation(this.location)) || null != this.location.anchor && !t.hasAnchor(this.location.anchor) || \"restore\" !== this.action && !t.isPreviewable() ? void 0 : t;\n }, r.prototype.hasCachedSnapshot = function () {\n return null != this.getCachedSnapshot();\n }, r.prototype.loadCachedSnapshot = function () {\n var t, e;\n return (e = this.getCachedSnapshot()) ? (t = this.shouldIssueRequest(), this.render(function () {\n var r;\n return this.cacheSnapshot(), this.controller.render({\n snapshot: e,\n isPreview: t\n }, this.performScroll), \"function\" == typeof (r = this.adapter).visitRendered && r.visitRendered(this), t ? void 0 : this.complete();\n })) : void 0;\n }, r.prototype.loadResponse = function () {\n return null != this.response ? this.render(function () {\n var t, e;\n return this.cacheSnapshot(), this.request.failed ? (this.controller.render({\n error: this.response\n }, this.performScroll), \"function\" == typeof (t = this.adapter).visitRendered && t.visitRendered(this), this.fail()) : (this.controller.render({\n snapshot: this.response\n }, this.performScroll), \"function\" == typeof (e = this.adapter).visitRendered && e.visitRendered(this), this.complete());\n }) : void 0;\n }, r.prototype.followRedirect = function () {\n return this.redirectedToLocation && !this.followedRedirect ? (this.location = this.redirectedToLocation, this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation, this.restorationIdentifier), this.followedRedirect = !0) : void 0;\n }, r.prototype.requestStarted = function () {\n var t;\n return this.recordTimingMetric(\"requestStart\"), \"function\" == typeof (t = this.adapter).visitRequestStarted ? t.visitRequestStarted(this) : void 0;\n }, r.prototype.requestProgressed = function (t) {\n var e;\n return this.progress = t, \"function\" == typeof (e = this.adapter).visitRequestProgressed ? e.visitRequestProgressed(this) : void 0;\n }, r.prototype.requestCompletedWithResponse = function (t, r) {\n return this.response = t, null != r && (this.redirectedToLocation = e.Location.wrap(r)), this.adapter.visitRequestCompleted(this);\n }, r.prototype.requestFailedWithStatusCode = function (t, e) {\n return this.response = e, this.adapter.visitRequestFailedWithStatusCode(this, t);\n }, r.prototype.requestFinished = function () {\n var t;\n return this.recordTimingMetric(\"requestEnd\"), \"function\" == typeof (t = this.adapter).visitRequestFinished ? t.visitRequestFinished(this) : void 0;\n }, r.prototype.performScroll = function () {\n return this.scrolled ? void 0 : (\"restore\" === this.action ? this.scrollToRestoredPosition() || this.scrollToTop() : this.scrollToAnchor() || this.scrollToTop(), this.scrolled = !0);\n }, r.prototype.scrollToRestoredPosition = function () {\n var t, e;\n return t = null != (e = this.restorationData) ? e.scrollPosition : void 0, null != t ? (this.controller.scrollToPosition(t), !0) : void 0;\n }, r.prototype.scrollToAnchor = function () {\n return null != this.location.anchor ? (this.controller.scrollToAnchor(this.location.anchor), !0) : void 0;\n }, r.prototype.scrollToTop = function () {\n return this.controller.scrollToPosition({\n x: 0,\n y: 0\n });\n }, r.prototype.recordTimingMetric = function (t) {\n var e;\n return null != (e = this.timingMetrics)[t] ? e[t] : e[t] = new Date().getTime();\n }, r.prototype.getTimingMetrics = function () {\n return e.copyObject(this.timingMetrics);\n }, n = function n(t) {\n switch (t) {\n case \"replace\":\n return \"replaceHistoryWithLocationAndRestorationIdentifier\";\n\n case \"advance\":\n case \"restore\":\n return \"pushHistoryWithLocationAndRestorationIdentifier\";\n }\n }, r.prototype.shouldIssueRequest = function () {\n return \"restore\" === this.action ? !this.hasCachedSnapshot() : !0;\n }, r.prototype.cacheSnapshot = function () {\n return this.snapshotCached ? void 0 : (this.controller.cacheSnapshot(), this.snapshotCached = !0);\n }, r.prototype.render = function (t) {\n return this.cancelRender(), this.frame = requestAnimationFrame(function (e) {\n return function () {\n return e.frame = null, t.call(e);\n };\n }(this));\n }, r.prototype.cancelRender = function () {\n return this.frame ? cancelAnimationFrame(this.frame) : void 0;\n }, r;\n }();\n }.call(this), function () {\n var t = function t(_t9, e) {\n return function () {\n return _t9.apply(e, arguments);\n };\n };\n\n e.Controller = function () {\n function r() {\n this.clickBubbled = t(this.clickBubbled, this), this.clickCaptured = t(this.clickCaptured, this), this.pageLoaded = t(this.pageLoaded, this), this.history = new e.History(this), this.view = new e.View(this), this.scrollManager = new e.ScrollManager(this), this.restorationData = {}, this.clearCache(), this.setProgressBarDelay(500);\n }\n\n return r.prototype.start = function () {\n return e.supported && !this.started ? (addEventListener(\"click\", this.clickCaptured, !0), addEventListener(\"DOMContentLoaded\", this.pageLoaded, !1), this.scrollManager.start(), this.startHistory(), this.started = !0, this.enabled = !0) : void 0;\n }, r.prototype.disable = function () {\n return this.enabled = !1;\n }, r.prototype.stop = function () {\n return this.started ? (removeEventListener(\"click\", this.clickCaptured, !0), removeEventListener(\"DOMContentLoaded\", this.pageLoaded, !1), this.scrollManager.stop(), this.stopHistory(), this.started = !1) : void 0;\n }, r.prototype.clearCache = function () {\n return this.cache = new e.SnapshotCache(10);\n }, r.prototype.visit = function (t, r) {\n var n, o;\n return null == r && (r = {}), t = e.Location.wrap(t), this.applicationAllowsVisitingLocation(t) ? this.locationIsVisitable(t) ? (n = null != (o = r.action) ? o : \"advance\", this.adapter.visitProposedToLocationWithAction(t, n)) : window.location = t : void 0;\n }, r.prototype.startVisitToLocationWithAction = function (t, r, n) {\n var o;\n return e.supported ? (o = this.getRestorationDataForIdentifier(n), this.startVisit(t, r, {\n restorationData: o\n })) : window.location = t;\n }, r.prototype.setProgressBarDelay = function (t) {\n return this.progressBarDelay = t;\n }, r.prototype.startHistory = function () {\n return this.location = e.Location.wrap(window.location), this.restorationIdentifier = e.uuid(), this.history.start(), this.history.replace(this.location, this.restorationIdentifier);\n }, r.prototype.stopHistory = function () {\n return this.history.stop();\n }, r.prototype.pushHistoryWithLocationAndRestorationIdentifier = function (t, r) {\n return this.restorationIdentifier = r, this.location = e.Location.wrap(t), this.history.push(this.location, this.restorationIdentifier);\n }, r.prototype.replaceHistoryWithLocationAndRestorationIdentifier = function (t, r) {\n return this.restorationIdentifier = r, this.location = e.Location.wrap(t), this.history.replace(this.location, this.restorationIdentifier);\n }, r.prototype.historyPoppedToLocationWithRestorationIdentifier = function (t, r) {\n var n;\n return this.restorationIdentifier = r, this.enabled ? (n = this.getRestorationDataForIdentifier(this.restorationIdentifier), this.startVisit(t, \"restore\", {\n restorationIdentifier: this.restorationIdentifier,\n restorationData: n,\n historyChanged: !0\n }), this.location = e.Location.wrap(t)) : this.adapter.pageInvalidated();\n }, r.prototype.getCachedSnapshotForLocation = function (t) {\n var e;\n return null != (e = this.cache.get(t)) ? e.clone() : void 0;\n }, r.prototype.shouldCacheSnapshot = function () {\n return this.view.getSnapshot().isCacheable();\n }, r.prototype.cacheSnapshot = function () {\n var t, r;\n return this.shouldCacheSnapshot() ? (this.notifyApplicationBeforeCachingSnapshot(), r = this.view.getSnapshot(), t = this.lastRenderedLocation, e.defer(function (e) {\n return function () {\n return e.cache.put(t, r.clone());\n };\n }(this))) : void 0;\n }, r.prototype.scrollToAnchor = function (t) {\n var e;\n return (e = this.view.getElementForAnchor(t)) ? this.scrollToElement(e) : this.scrollToPosition({\n x: 0,\n y: 0\n });\n }, r.prototype.scrollToElement = function (t) {\n return this.scrollManager.scrollToElement(t);\n }, r.prototype.scrollToPosition = function (t) {\n return this.scrollManager.scrollToPosition(t);\n }, r.prototype.scrollPositionChanged = function (t) {\n var e;\n return e = this.getCurrentRestorationData(), e.scrollPosition = t;\n }, r.prototype.render = function (t, e) {\n return this.view.render(t, e);\n }, r.prototype.viewInvalidated = function () {\n return this.adapter.pageInvalidated();\n }, r.prototype.viewWillRender = function (t) {\n return this.notifyApplicationBeforeRender(t);\n }, r.prototype.viewRendered = function () {\n return this.lastRenderedLocation = this.currentVisit.location, this.notifyApplicationAfterRender();\n }, r.prototype.pageLoaded = function () {\n return this.lastRenderedLocation = this.location, this.notifyApplicationAfterPageLoad();\n }, r.prototype.clickCaptured = function () {\n return removeEventListener(\"click\", this.clickBubbled, !1), addEventListener(\"click\", this.clickBubbled, !1);\n }, r.prototype.clickBubbled = function (t) {\n var e, r, n;\n return this.enabled && this.clickEventIsSignificant(t) && (r = this.getVisitableLinkForNode(t.target)) && (n = this.getVisitableLocationForLink(r)) && this.applicationAllowsFollowingLinkToLocation(r, n) ? (t.preventDefault(), e = this.getActionForLink(r), this.visit(n, {\n action: e\n })) : void 0;\n }, r.prototype.applicationAllowsFollowingLinkToLocation = function (t, e) {\n var r;\n return r = this.notifyApplicationAfterClickingLinkToLocation(t, e), !r.defaultPrevented;\n }, r.prototype.applicationAllowsVisitingLocation = function (t) {\n var e;\n return e = this.notifyApplicationBeforeVisitingLocation(t), !e.defaultPrevented;\n }, r.prototype.notifyApplicationAfterClickingLinkToLocation = function (t, r) {\n return e.dispatch(\"turbolinks:click\", {\n target: t,\n data: {\n url: r.absoluteURL\n },\n cancelable: !0\n });\n }, r.prototype.notifyApplicationBeforeVisitingLocation = function (t) {\n return e.dispatch(\"turbolinks:before-visit\", {\n data: {\n url: t.absoluteURL\n },\n cancelable: !0\n });\n }, r.prototype.notifyApplicationAfterVisitingLocation = function (t) {\n return e.dispatch(\"turbolinks:visit\", {\n data: {\n url: t.absoluteURL\n }\n });\n }, r.prototype.notifyApplicationBeforeCachingSnapshot = function () {\n return e.dispatch(\"turbolinks:before-cache\");\n }, r.prototype.notifyApplicationBeforeRender = function (t) {\n return e.dispatch(\"turbolinks:before-render\", {\n data: {\n newBody: t\n }\n });\n }, r.prototype.notifyApplicationAfterRender = function () {\n return e.dispatch(\"turbolinks:render\");\n }, r.prototype.notifyApplicationAfterPageLoad = function (t) {\n return null == t && (t = {}), e.dispatch(\"turbolinks:load\", {\n data: {\n url: this.location.absoluteURL,\n timing: t\n }\n });\n }, r.prototype.startVisit = function (t, e, r) {\n var n;\n return null != (n = this.currentVisit) && n.cancel(), this.currentVisit = this.createVisit(t, e, r), this.currentVisit.start(), this.notifyApplicationAfterVisitingLocation(t);\n }, r.prototype.createVisit = function (t, r, n) {\n var o, i, s, a, u;\n return i = null != n ? n : {}, a = i.restorationIdentifier, s = i.restorationData, o = i.historyChanged, u = new e.Visit(this, t, r), u.restorationIdentifier = null != a ? a : e.uuid(), u.restorationData = e.copyObject(s), u.historyChanged = o, u.referrer = this.location, u;\n }, r.prototype.visitCompleted = function (t) {\n return this.notifyApplicationAfterPageLoad(t.getTimingMetrics());\n }, r.prototype.clickEventIsSignificant = function (t) {\n return !(t.defaultPrevented || t.target.isContentEditable || t.which > 1 || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey);\n }, r.prototype.getVisitableLinkForNode = function (t) {\n return this.nodeIsVisitable(t) ? e.closest(t, \"a[href]:not([target]):not([download])\") : void 0;\n }, r.prototype.getVisitableLocationForLink = function (t) {\n var r;\n return r = new e.Location(t.getAttribute(\"href\")), this.locationIsVisitable(r) ? r : void 0;\n }, r.prototype.getActionForLink = function (t) {\n var e;\n return null != (e = t.getAttribute(\"data-turbolinks-action\")) ? e : \"advance\";\n }, r.prototype.nodeIsVisitable = function (t) {\n var r;\n return (r = e.closest(t, \"[data-turbolinks]\")) ? \"false\" !== r.getAttribute(\"data-turbolinks\") : !0;\n }, r.prototype.locationIsVisitable = function (t) {\n return t.isPrefixedBy(this.view.getRootLocation()) && t.isHTML();\n }, r.prototype.getCurrentRestorationData = function () {\n return this.getRestorationDataForIdentifier(this.restorationIdentifier);\n }, r.prototype.getRestorationDataForIdentifier = function (t) {\n var e;\n return null != (e = this.restorationData)[t] ? e[t] : e[t] = {};\n }, r;\n }();\n }.call(this), function () {\n !function () {\n var t, e;\n if ((t = e = document.currentScript) && !e.hasAttribute(\"data-turbolinks-suppress-warning\")) for (; t = t.parentNode;) {\n if (t === document.body) return console.warn(\"You are loading Turbolinks from a