administrate-bootstrap-theme 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +14 -0
  3. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +16 -0
  4. data/lib/administrate-bootstrap-theme/version.rb +1 -1
  5. data/node_modules/bootstrap/LICENSE +22 -0
  6. data/node_modules/bootstrap/README.md +239 -0
  7. data/node_modules/bootstrap/dist/css/bootstrap-grid.css +4997 -0
  8. data/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  9. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +7 -0
  10. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  11. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css +4996 -0
  12. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
  13. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css +7 -0
  14. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
  15. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css +426 -0
  16. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  17. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +8 -0
  18. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  19. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css +423 -0
  20. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
  21. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +8 -0
  22. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
  23. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css +4752 -0
  24. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
  25. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css +7 -0
  26. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
  27. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css +4743 -0
  28. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
  29. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +7 -0
  30. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
  31. data/node_modules/bootstrap/dist/css/bootstrap.css +10819 -0
  32. data/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  33. data/node_modules/bootstrap/dist/css/bootstrap.min.css +7 -0
  34. data/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  35. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css +10795 -0
  36. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
  37. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css +7 -0
  38. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
  39. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6714 -0
  40. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  41. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  42. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  43. data/node_modules/bootstrap/dist/js/bootstrap.esm.js +4944 -0
  44. data/node_modules/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
  45. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
  46. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
  47. data/node_modules/bootstrap/dist/js/bootstrap.js +4993 -0
  48. data/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
  49. data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  50. data/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  51. data/node_modules/bootstrap/js/dist/alert.js +264 -0
  52. data/node_modules/bootstrap/js/dist/alert.js.map +1 -0
  53. data/node_modules/bootstrap/js/dist/base-component.js +62 -0
  54. data/node_modules/bootstrap/js/dist/base-component.js.map +1 -0
  55. data/node_modules/bootstrap/js/dist/button.js +146 -0
  56. data/node_modules/bootstrap/js/dist/button.js.map +1 -0
  57. data/node_modules/bootstrap/js/dist/carousel.js +757 -0
  58. data/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
  59. data/node_modules/bootstrap/js/dist/collapse.js +551 -0
  60. data/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
  61. data/node_modules/bootstrap/js/dist/dom/data.js +69 -0
  62. data/node_modules/bootstrap/js/dist/dom/data.js.map +1 -0
  63. data/node_modules/bootstrap/js/dist/dom/event-handler.js +305 -0
  64. data/node_modules/bootstrap/js/dist/dom/event-handler.js.map +1 -0
  65. data/node_modules/bootstrap/js/dist/dom/manipulator.js +89 -0
  66. data/node_modules/bootstrap/js/dist/dom/manipulator.js.map +1 -0
  67. data/node_modules/bootstrap/js/dist/dom/selector-engine.js +86 -0
  68. data/node_modules/bootstrap/js/dist/dom/selector-engine.js.map +1 -0
  69. data/node_modules/bootstrap/js/dist/dropdown.js +662 -0
  70. data/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
  71. data/node_modules/bootstrap/js/dist/modal.js +752 -0
  72. data/node_modules/bootstrap/js/dist/modal.js.map +1 -0
  73. data/node_modules/bootstrap/js/dist/offcanvas.js +509 -0
  74. data/node_modules/bootstrap/js/dist/offcanvas.js.map +1 -0
  75. data/node_modules/bootstrap/js/dist/popover.js +216 -0
  76. data/node_modules/bootstrap/js/dist/popover.js.map +1 -0
  77. data/node_modules/bootstrap/js/dist/scrollspy.js +400 -0
  78. data/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
  79. data/node_modules/bootstrap/js/dist/tab.js +347 -0
  80. data/node_modules/bootstrap/js/dist/tab.js.map +1 -0
  81. data/node_modules/bootstrap/js/dist/toast.js +335 -0
  82. data/node_modules/bootstrap/js/dist/toast.js.map +1 -0
  83. data/node_modules/bootstrap/js/dist/tooltip.js +1055 -0
  84. data/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
  85. data/node_modules/bootstrap/js/src/alert.js +141 -0
  86. data/node_modules/bootstrap/js/src/base-component.js +46 -0
  87. data/node_modules/bootstrap/js/src/button.js +95 -0
  88. data/node_modules/bootstrap/js/src/carousel.js +624 -0
  89. data/node_modules/bootstrap/js/src/collapse.js +410 -0
  90. data/node_modules/bootstrap/js/src/dom/data.js +57 -0
  91. data/node_modules/bootstrap/js/src/dom/event-handler.js +331 -0
  92. data/node_modules/bootstrap/js/src/dom/manipulator.js +80 -0
  93. data/node_modules/bootstrap/js/src/dom/selector-engine.js +75 -0
  94. data/node_modules/bootstrap/js/src/dropdown.js +543 -0
  95. data/node_modules/bootstrap/js/src/modal.js +582 -0
  96. data/node_modules/bootstrap/js/src/offcanvas.js +279 -0
  97. data/node_modules/bootstrap/js/src/popover.js +171 -0
  98. data/node_modules/bootstrap/js/src/scrollspy.js +319 -0
  99. data/node_modules/bootstrap/js/src/tab.js +220 -0
  100. data/node_modules/bootstrap/js/src/toast.js +219 -0
  101. data/node_modules/bootstrap/js/src/tooltip.js +802 -0
  102. data/node_modules/bootstrap/js/src/util/index.js +253 -0
  103. data/node_modules/bootstrap/js/src/util/sanitizer.js +127 -0
  104. data/node_modules/bootstrap/js/src/util/scrollbar.js +70 -0
  105. data/node_modules/bootstrap/package.json +177 -0
  106. data/node_modules/bootstrap/scss/_accordion.scss +116 -0
  107. data/node_modules/bootstrap/scss/_alert.scss +57 -0
  108. data/node_modules/bootstrap/scss/_badge.scss +29 -0
  109. data/node_modules/bootstrap/scss/_breadcrumb.scss +28 -0
  110. data/node_modules/bootstrap/scss/_button-group.scss +139 -0
  111. data/node_modules/bootstrap/scss/_buttons.scss +111 -0
  112. data/node_modules/bootstrap/scss/_card.scss +215 -0
  113. data/node_modules/bootstrap/scss/_carousel.scss +229 -0
  114. data/node_modules/bootstrap/scss/_close.scss +40 -0
  115. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  116. data/node_modules/bootstrap/scss/_dropdown.scss +246 -0
  117. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  118. data/node_modules/bootstrap/scss/_functions.scss +205 -0
  119. data/node_modules/bootstrap/scss/_grid.scss +22 -0
  120. data/node_modules/bootstrap/scss/_helpers.scss +7 -0
  121. data/node_modules/bootstrap/scss/_images.scss +42 -0
  122. data/node_modules/bootstrap/scss/_list-group.scss +174 -0
  123. data/node_modules/bootstrap/scss/_mixins.scss +41 -0
  124. data/node_modules/bootstrap/scss/_modal.scss +237 -0
  125. data/node_modules/bootstrap/scss/_nav.scss +139 -0
  126. data/node_modules/bootstrap/scss/_navbar.scss +306 -0
  127. data/node_modules/bootstrap/scss/_offcanvas.scss +77 -0
  128. data/node_modules/bootstrap/scss/_pagination.scss +64 -0
  129. data/node_modules/bootstrap/scss/_popover.scss +158 -0
  130. data/node_modules/bootstrap/scss/_progress.scss +48 -0
  131. data/node_modules/bootstrap/scss/_reboot.scss +621 -0
  132. data/node_modules/bootstrap/scss/_root.scss +16 -0
  133. data/node_modules/bootstrap/scss/_spinners.scss +69 -0
  134. data/node_modules/bootstrap/scss/_tables.scss +150 -0
  135. data/node_modules/bootstrap/scss/_toasts.scss +51 -0
  136. data/node_modules/bootstrap/scss/_tooltip.scss +115 -0
  137. data/node_modules/bootstrap/scss/_transitions.scss +21 -0
  138. data/node_modules/bootstrap/scss/_type.scss +104 -0
  139. data/node_modules/bootstrap/scss/_utilities.scss +594 -0
  140. data/node_modules/bootstrap/scss/_variables.scss +1464 -0
  141. data/node_modules/bootstrap/scss/bootstrap-grid.scss +65 -0
  142. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +15 -0
  143. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +18 -0
  144. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  145. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +61 -0
  146. data/node_modules/bootstrap/scss/forms/_form-check.scss +152 -0
  147. data/node_modules/bootstrap/scss/forms/_form-control.scss +219 -0
  148. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  149. data/node_modules/bootstrap/scss/forms/_form-select.scss +67 -0
  150. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  151. data/node_modules/bootstrap/scss/forms/_input-group.scss +121 -0
  152. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  153. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  154. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  155. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +12 -0
  156. data/node_modules/bootstrap/scss/helpers/_position.scss +30 -0
  157. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  158. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  159. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  160. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  161. data/node_modules/bootstrap/scss/mixins/_alert.scss +11 -0
  162. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  163. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +18 -0
  164. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  165. data/node_modules/bootstrap/scss/mixins/_buttons.scss +133 -0
  166. data/node_modules/bootstrap/scss/mixins/_caret.scss +64 -0
  167. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  168. data/node_modules/bootstrap/scss/mixins/_container.scss +9 -0
  169. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  170. data/node_modules/bootstrap/scss/mixins/_forms.scss +134 -0
  171. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  172. data/node_modules/bootstrap/scss/mixins/_grid.scss +120 -0
  173. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  174. data/node_modules/bootstrap/scss/mixins/_list-group.scss +24 -0
  175. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  176. data/node_modules/bootstrap/scss/mixins/_pagination.scss +31 -0
  177. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  178. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  179. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +21 -0
  180. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  181. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  182. data/node_modules/bootstrap/scss/mixins/_utilities.scss +68 -0
  183. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
  184. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  185. data/node_modules/bootstrap/scss/vendor/_rfs.scss +312 -0
  186. metadata +182 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.js","sources":["../src/util/index.js","../src/dropdown.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1]\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => (obj[0] || obj).nodeType\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => function () {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nexport {\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isElement,\n isVisible,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst SPACE_KEY = 'Space'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_NAVBAR = 'navbar'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\n\nconst Default = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n}\n\nconst DefaultType = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element)\n\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 }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW)\n\n Dropdown.clearMenus()\n\n if (isActive) {\n return\n }\n\n this.show()\n }\n\n show() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none')\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (isElement(this._config.reference)) {\n referenceElement = this._config.reference\n\n // Check if it's jQuery element\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0]\n }\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference\n }\n\n const popperConfig = this._getPopperConfig()\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)\n\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static')\n }\n }\n\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 if ('ontouchstart' in document.documentElement &&\n !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.on(elem, 'mouseover', null, noop()))\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n Manipulator.removeDataAttribute(this._menu, 'popper')\n EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n }\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY)\n this._menu = null\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n\n super.dispose()\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (typeof config.reference === 'object' && !isElement(config.reference) &&\n typeof config.reference.getBoundingClientRect !== 'function'\n ) {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n }\n\n return config\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0]\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n // Static\n\n static dropdownInterface(element, config) {\n let data = Data.get(element, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(element, _config)\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 static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config)\n })\n }\n\n static clearMenus(event) {\n if (event) {\n if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) {\n return\n }\n\n if (/input|select|textarea|form/i.test(event.target.tagName)) {\n return\n }\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Data.get(toggles[i], DATA_KEY)\n const 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 const dropdownMenu = context._menu\n if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {\n continue\n }\n\n if (event) {\n // Don't close the menu if the clicked element or one of its parents is the dropdown button\n if ([context._element].some(element => event.composedPath().includes(element))) {\n continue\n }\n\n // Tab navigation through the dropdown menu shouldn't close the menu\n if (event.type === 'keyup' && event.key === TAB_KEY && dropdownMenu.contains(event.target)) {\n continue\n }\n }\n\n const hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()))\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n if (context._popper) {\n context._popper.destroy()\n }\n\n dropdownMenu.classList.remove(CLASS_NAME_SHOW)\n toggles[i].classList.remove(CLASS_NAME_SHOW)\n Manipulator.removeDataAttribute(dropdownMenu, 'popper')\n EventHandler.trigger(toggles[i], EVENT_HIDDEN, relatedTarget)\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode\n }\n\n static 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) ?\n event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&\n ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||\n event.target.closest(SELECTOR_MENU))) :\n !REGEXP_KEYDOWN.test(event.key)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this)\n const isActive = this.classList.contains(CLASS_NAME_SHOW)\n\n if (event.key === ESCAPE_KEY) {\n const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n button.focus()\n Dropdown.clearMenus()\n return\n }\n\n if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {\n const button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n button.click()\n return\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus()\n return\n }\n\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible)\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n // Up\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--\n }\n\n // Down\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++\n }\n\n // index is -1 if the first keydown is an ArrowUp\n index = index === -1 ? 0 : index\n\n items[index].focus()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n Dropdown.dropdownInterface(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME, Dropdown)\n\nexport default Dropdown\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","getComputedStyle","parentNodeStyle","display","visibility","noop","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","defineJQueryPlugin","name","plugin","$","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","RIGHT_MOUSE_BUTTON","REGEXP_KEYDOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_DISABLED","CLASS_NAME_SHOW","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_NAVBAR","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default","offset","boundary","reference","popperConfig","DefaultType","Dropdown","BaseComponent","constructor","_popper","_config","_getConfig","_menu","_getMenuElement","_inNavbar","_detectNavbar","_addEventListeners","toggle","_element","disabled","classList","contains","isActive","clearMenus","show","parent","getParentFromElement","relatedTarget","showEvent","EventHandler","trigger","defaultPrevented","Manipulator","setDataAttribute","Popper","referenceElement","jquery","_getPopperConfig","isDisplayStatic","modifiers","find","modifier","enabled","createPopper","closest","concat","children","elem","on","focus","setAttribute","hide","hideEvent","destroy","removeDataAttribute","dispose","off","update","event","preventDefault","getDataAttributes","getBoundingClientRect","SelectorEngine","next","_getPlacement","parentDropdown","isEnd","getPropertyValue","_getOffset","map","val","Number","parseInt","popperData","defaultBsPopperConfig","placement","options","dropdownInterface","data","Data","get","each","button","type","key","target","tagName","toggles","i","len","length","context","clickEvent","dropdownMenu","some","composedPath","remove","dataApiKeydownHandler","stopPropagation","matches","prev","click","items","filter","index","indexOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAOA,MAAMA,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,MAAMC,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA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iE,oBAA1B,EAAgDyB,QAAQ,CAACiB,UAAzD;AACAM,kCAAY,CAACmB,EAAb,CAAgBpI,QAAhB,EAA0BmE,oBAA1B,EAAgDuB,QAAQ,CAACiB,UAAzD;AACAM,kCAAY,CAACmB,EAAb,CAAgBpI,QAAhB,EAA0BiE,oBAA1B,EAAgDS,oBAAhD,EAAsE,UAAUoE,KAAV,EAAiB;EACrFA,EAAAA,KAAK,CAACC,cAAN;EACArD,EAAAA,QAAQ,CAACuE,iBAAT,CAA2B,IAA3B;EACD,CAHD;EAKA;EACA;EACA;EACA;EACA;EACA;;EAEAzH,kBAAkB,CAACS,IAAD,EAAOyC,QAAP,CAAlB;;;;;;;;"}
@@ -0,0 +1,752 @@
1
+ /*!
2
+ * Bootstrap modal.js v5.0.0-beta3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
10
+ }(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
17
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
18
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
19
+
20
+ /**
21
+ * --------------------------------------------------------------------------
22
+ * Bootstrap (v5.0.0-beta3): util/index.js
23
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
24
+ * --------------------------------------------------------------------------
25
+ */
26
+ const MILLISECONDS_MULTIPLIER = 1000;
27
+ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
28
+
29
+ const toType = obj => {
30
+ if (obj === null || obj === undefined) {
31
+ return `${obj}`;
32
+ }
33
+
34
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
35
+ };
36
+
37
+ const getSelector = element => {
38
+ let selector = element.getAttribute('data-bs-target');
39
+
40
+ if (!selector || selector === '#') {
41
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
42
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
43
+ // `document.querySelector` will rightfully complain it is invalid.
44
+ // See https://github.com/twbs/bootstrap/issues/32273
45
+
46
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
47
+ return null;
48
+ } // Just in case some CMS puts out a full URL with the anchor appended
49
+
50
+
51
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
52
+ hrefAttr = '#' + hrefAttr.split('#')[1];
53
+ }
54
+
55
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
56
+ }
57
+
58
+ return selector;
59
+ };
60
+
61
+ const getElementFromSelector = element => {
62
+ const selector = getSelector(element);
63
+ return selector ? document.querySelector(selector) : null;
64
+ };
65
+
66
+ const getTransitionDurationFromElement = element => {
67
+ if (!element) {
68
+ return 0;
69
+ } // Get transition-duration of the element
70
+
71
+
72
+ let {
73
+ transitionDuration,
74
+ transitionDelay
75
+ } = window.getComputedStyle(element);
76
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
77
+ const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
78
+
79
+ if (!floatTransitionDuration && !floatTransitionDelay) {
80
+ return 0;
81
+ } // If multiple durations are defined, take the first
82
+
83
+
84
+ transitionDuration = transitionDuration.split(',')[0];
85
+ transitionDelay = transitionDelay.split(',')[0];
86
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
87
+ };
88
+
89
+ const triggerTransitionEnd = element => {
90
+ element.dispatchEvent(new Event(TRANSITION_END));
91
+ };
92
+
93
+ const isElement = obj => (obj[0] || obj).nodeType;
94
+
95
+ const emulateTransitionEnd = (element, duration) => {
96
+ let called = false;
97
+ const durationPadding = 5;
98
+ const emulatedDuration = duration + durationPadding;
99
+
100
+ function listener() {
101
+ called = true;
102
+ element.removeEventListener(TRANSITION_END, listener);
103
+ }
104
+
105
+ element.addEventListener(TRANSITION_END, listener);
106
+ setTimeout(() => {
107
+ if (!called) {
108
+ triggerTransitionEnd(element);
109
+ }
110
+ }, emulatedDuration);
111
+ };
112
+
113
+ const typeCheckConfig = (componentName, config, configTypes) => {
114
+ Object.keys(configTypes).forEach(property => {
115
+ const expectedTypes = configTypes[property];
116
+ const value = config[property];
117
+ const valueType = value && isElement(value) ? 'element' : toType(value);
118
+
119
+ if (!new RegExp(expectedTypes).test(valueType)) {
120
+ throw new TypeError(`${componentName.toUpperCase()}: ` + `Option "${property}" provided type "${valueType}" ` + `but expected type "${expectedTypes}".`);
121
+ }
122
+ });
123
+ };
124
+
125
+ const isVisible = element => {
126
+ if (!element) {
127
+ return false;
128
+ }
129
+
130
+ if (element.style && element.parentNode && element.parentNode.style) {
131
+ const elementStyle = getComputedStyle(element);
132
+ const parentNodeStyle = getComputedStyle(element.parentNode);
133
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
134
+ }
135
+
136
+ return false;
137
+ };
138
+
139
+ const reflow = element => element.offsetHeight;
140
+
141
+ const getjQuery = () => {
142
+ const {
143
+ jQuery
144
+ } = window;
145
+
146
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
147
+ return jQuery;
148
+ }
149
+
150
+ return null;
151
+ };
152
+
153
+ const onDOMContentLoaded = callback => {
154
+ if (document.readyState === 'loading') {
155
+ document.addEventListener('DOMContentLoaded', callback);
156
+ } else {
157
+ callback();
158
+ }
159
+ };
160
+
161
+ const isRTL = () => document.documentElement.dir === 'rtl';
162
+
163
+ const defineJQueryPlugin = (name, plugin) => {
164
+ onDOMContentLoaded(() => {
165
+ const $ = getjQuery();
166
+ /* istanbul ignore if */
167
+
168
+ if ($) {
169
+ const JQUERY_NO_CONFLICT = $.fn[name];
170
+ $.fn[name] = plugin.jQueryInterface;
171
+ $.fn[name].Constructor = plugin;
172
+
173
+ $.fn[name].noConflict = () => {
174
+ $.fn[name] = JQUERY_NO_CONFLICT;
175
+ return plugin.jQueryInterface;
176
+ };
177
+ }
178
+ });
179
+ };
180
+
181
+ /**
182
+ * --------------------------------------------------------------------------
183
+ * Bootstrap (v5.0.0-beta3): modal.js
184
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
185
+ * --------------------------------------------------------------------------
186
+ */
187
+ /**
188
+ * ------------------------------------------------------------------------
189
+ * Constants
190
+ * ------------------------------------------------------------------------
191
+ */
192
+
193
+ const NAME = 'modal';
194
+ const DATA_KEY = 'bs.modal';
195
+ const EVENT_KEY = `.${DATA_KEY}`;
196
+ const DATA_API_KEY = '.data-api';
197
+ const ESCAPE_KEY = 'Escape';
198
+ const Default = {
199
+ backdrop: true,
200
+ keyboard: true,
201
+ focus: true
202
+ };
203
+ const DefaultType = {
204
+ backdrop: '(boolean|string)',
205
+ keyboard: 'boolean',
206
+ focus: 'boolean'
207
+ };
208
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
209
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`;
210
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
211
+ const EVENT_SHOW = `show${EVENT_KEY}`;
212
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
213
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
214
+ const EVENT_RESIZE = `resize${EVENT_KEY}`;
215
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
216
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;
217
+ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`;
218
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`;
219
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
220
+ const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
221
+ const CLASS_NAME_BACKDROP = 'modal-backdrop';
222
+ const CLASS_NAME_OPEN = 'modal-open';
223
+ const CLASS_NAME_FADE = 'fade';
224
+ const CLASS_NAME_SHOW = 'show';
225
+ const CLASS_NAME_STATIC = 'modal-static';
226
+ const SELECTOR_DIALOG = '.modal-dialog';
227
+ const SELECTOR_MODAL_BODY = '.modal-body';
228
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]';
229
+ const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
230
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
231
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
232
+ /**
233
+ * ------------------------------------------------------------------------
234
+ * Class Definition
235
+ * ------------------------------------------------------------------------
236
+ */
237
+
238
+ class Modal extends BaseComponent__default['default'] {
239
+ constructor(element, config) {
240
+ super(element);
241
+ this._config = this._getConfig(config);
242
+ this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, this._element);
243
+ this._backdrop = null;
244
+ this._isShown = false;
245
+ this._isBodyOverflowing = false;
246
+ this._ignoreBackdropClick = false;
247
+ this._isTransitioning = false;
248
+ this._scrollbarWidth = 0;
249
+ } // Getters
250
+
251
+
252
+ static get Default() {
253
+ return Default;
254
+ }
255
+
256
+ static get DATA_KEY() {
257
+ return DATA_KEY;
258
+ } // Public
259
+
260
+
261
+ toggle(relatedTarget) {
262
+ return this._isShown ? this.hide() : this.show(relatedTarget);
263
+ }
264
+
265
+ show(relatedTarget) {
266
+ if (this._isShown || this._isTransitioning) {
267
+ return;
268
+ }
269
+
270
+ if (this._isAnimated()) {
271
+ this._isTransitioning = true;
272
+ }
273
+
274
+ const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
275
+ relatedTarget
276
+ });
277
+
278
+ if (this._isShown || showEvent.defaultPrevented) {
279
+ return;
280
+ }
281
+
282
+ this._isShown = true;
283
+
284
+ this._checkScrollbar();
285
+
286
+ this._setScrollbar();
287
+
288
+ this._adjustDialog();
289
+
290
+ this._setEscapeEvent();
291
+
292
+ this._setResizeEvent();
293
+
294
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event));
295
+ EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
296
+ EventHandler__default['default'].one(this._element, EVENT_MOUSEUP_DISMISS, event => {
297
+ if (event.target === this._element) {
298
+ this._ignoreBackdropClick = true;
299
+ }
300
+ });
301
+ });
302
+
303
+ this._showBackdrop(() => this._showElement(relatedTarget));
304
+ }
305
+
306
+ hide(event) {
307
+ if (event) {
308
+ event.preventDefault();
309
+ }
310
+
311
+ if (!this._isShown || this._isTransitioning) {
312
+ return;
313
+ }
314
+
315
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
316
+
317
+ if (hideEvent.defaultPrevented) {
318
+ return;
319
+ }
320
+
321
+ this._isShown = false;
322
+
323
+ const isAnimated = this._isAnimated();
324
+
325
+ if (isAnimated) {
326
+ this._isTransitioning = true;
327
+ }
328
+
329
+ this._setEscapeEvent();
330
+
331
+ this._setResizeEvent();
332
+
333
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN);
334
+
335
+ this._element.classList.remove(CLASS_NAME_SHOW);
336
+
337
+ EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
338
+ EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
339
+
340
+ if (isAnimated) {
341
+ const transitionDuration = getTransitionDurationFromElement(this._element);
342
+ EventHandler__default['default'].one(this._element, 'transitionend', event => this._hideModal(event));
343
+ emulateTransitionEnd(this._element, transitionDuration);
344
+ } else {
345
+ this._hideModal();
346
+ }
347
+ }
348
+
349
+ dispose() {
350
+ [window, this._element, this._dialog].forEach(htmlElement => EventHandler__default['default'].off(htmlElement, EVENT_KEY));
351
+ super.dispose();
352
+ /**
353
+ * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
354
+ * Do not move `document` in `htmlElements` array
355
+ * It will remove `EVENT_CLICK_DATA_API` event that should remain
356
+ */
357
+
358
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN);
359
+ this._config = null;
360
+ this._dialog = null;
361
+ this._backdrop = null;
362
+ this._isShown = null;
363
+ this._isBodyOverflowing = null;
364
+ this._ignoreBackdropClick = null;
365
+ this._isTransitioning = null;
366
+ this._scrollbarWidth = null;
367
+ }
368
+
369
+ handleUpdate() {
370
+ this._adjustDialog();
371
+ } // Private
372
+
373
+
374
+ _getConfig(config) {
375
+ config = { ...Default,
376
+ ...config
377
+ };
378
+ typeCheckConfig(NAME, config, DefaultType);
379
+ return config;
380
+ }
381
+
382
+ _showElement(relatedTarget) {
383
+ const isAnimated = this._isAnimated();
384
+
385
+ const modalBody = SelectorEngine__default['default'].findOne(SELECTOR_MODAL_BODY, this._dialog);
386
+
387
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
388
+ // Don't move modal's DOM position
389
+ document.body.appendChild(this._element);
390
+ }
391
+
392
+ this._element.style.display = 'block';
393
+
394
+ this._element.removeAttribute('aria-hidden');
395
+
396
+ this._element.setAttribute('aria-modal', true);
397
+
398
+ this._element.setAttribute('role', 'dialog');
399
+
400
+ this._element.scrollTop = 0;
401
+
402
+ if (modalBody) {
403
+ modalBody.scrollTop = 0;
404
+ }
405
+
406
+ if (isAnimated) {
407
+ reflow(this._element);
408
+ }
409
+
410
+ this._element.classList.add(CLASS_NAME_SHOW);
411
+
412
+ if (this._config.focus) {
413
+ this._enforceFocus();
414
+ }
415
+
416
+ const transitionComplete = () => {
417
+ if (this._config.focus) {
418
+ this._element.focus();
419
+ }
420
+
421
+ this._isTransitioning = false;
422
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, {
423
+ relatedTarget
424
+ });
425
+ };
426
+
427
+ if (isAnimated) {
428
+ const transitionDuration = getTransitionDurationFromElement(this._dialog);
429
+ EventHandler__default['default'].one(this._dialog, 'transitionend', transitionComplete);
430
+ emulateTransitionEnd(this._dialog, transitionDuration);
431
+ } else {
432
+ transitionComplete();
433
+ }
434
+ }
435
+
436
+ _enforceFocus() {
437
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop
438
+
439
+ EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => {
440
+ if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
441
+ this._element.focus();
442
+ }
443
+ });
444
+ }
445
+
446
+ _setEscapeEvent() {
447
+ if (this._isShown) {
448
+ EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => {
449
+ if (this._config.keyboard && event.key === ESCAPE_KEY) {
450
+ event.preventDefault();
451
+ this.hide();
452
+ } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {
453
+ this._triggerBackdropTransition();
454
+ }
455
+ });
456
+ } else {
457
+ EventHandler__default['default'].off(this._element, EVENT_KEYDOWN_DISMISS);
458
+ }
459
+ }
460
+
461
+ _setResizeEvent() {
462
+ if (this._isShown) {
463
+ EventHandler__default['default'].on(window, EVENT_RESIZE, () => this._adjustDialog());
464
+ } else {
465
+ EventHandler__default['default'].off(window, EVENT_RESIZE);
466
+ }
467
+ }
468
+
469
+ _hideModal() {
470
+ this._element.style.display = 'none';
471
+
472
+ this._element.setAttribute('aria-hidden', true);
473
+
474
+ this._element.removeAttribute('aria-modal');
475
+
476
+ this._element.removeAttribute('role');
477
+
478
+ this._isTransitioning = false;
479
+
480
+ this._showBackdrop(() => {
481
+ document.body.classList.remove(CLASS_NAME_OPEN);
482
+
483
+ this._resetAdjustments();
484
+
485
+ this._resetScrollbar();
486
+
487
+ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
488
+ });
489
+ }
490
+
491
+ _removeBackdrop() {
492
+ this._backdrop.parentNode.removeChild(this._backdrop);
493
+
494
+ this._backdrop = null;
495
+ }
496
+
497
+ _showBackdrop(callback) {
498
+ const isAnimated = this._isAnimated();
499
+
500
+ if (this._isShown && this._config.backdrop) {
501
+ this._backdrop = document.createElement('div');
502
+ this._backdrop.className = CLASS_NAME_BACKDROP;
503
+
504
+ if (isAnimated) {
505
+ this._backdrop.classList.add(CLASS_NAME_FADE);
506
+ }
507
+
508
+ document.body.appendChild(this._backdrop);
509
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, event => {
510
+ if (this._ignoreBackdropClick) {
511
+ this._ignoreBackdropClick = false;
512
+ return;
513
+ }
514
+
515
+ if (event.target !== event.currentTarget) {
516
+ return;
517
+ }
518
+
519
+ if (this._config.backdrop === 'static') {
520
+ this._triggerBackdropTransition();
521
+ } else {
522
+ this.hide();
523
+ }
524
+ });
525
+
526
+ if (isAnimated) {
527
+ reflow(this._backdrop);
528
+ }
529
+
530
+ this._backdrop.classList.add(CLASS_NAME_SHOW);
531
+
532
+ if (!isAnimated) {
533
+ callback();
534
+ return;
535
+ }
536
+
537
+ const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
538
+ EventHandler__default['default'].one(this._backdrop, 'transitionend', callback);
539
+ emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
540
+ } else if (!this._isShown && this._backdrop) {
541
+ this._backdrop.classList.remove(CLASS_NAME_SHOW);
542
+
543
+ const callbackRemove = () => {
544
+ this._removeBackdrop();
545
+
546
+ callback();
547
+ };
548
+
549
+ if (isAnimated) {
550
+ const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
551
+ EventHandler__default['default'].one(this._backdrop, 'transitionend', callbackRemove);
552
+ emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
553
+ } else {
554
+ callbackRemove();
555
+ }
556
+ } else {
557
+ callback();
558
+ }
559
+ }
560
+
561
+ _isAnimated() {
562
+ return this._element.classList.contains(CLASS_NAME_FADE);
563
+ }
564
+
565
+ _triggerBackdropTransition() {
566
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE_PREVENTED);
567
+
568
+ if (hideEvent.defaultPrevented) {
569
+ return;
570
+ }
571
+
572
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
573
+
574
+ if (!isModalOverflowing) {
575
+ this._element.style.overflowY = 'hidden';
576
+ }
577
+
578
+ this._element.classList.add(CLASS_NAME_STATIC);
579
+
580
+ const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
581
+ EventHandler__default['default'].off(this._element, 'transitionend');
582
+ EventHandler__default['default'].one(this._element, 'transitionend', () => {
583
+ this._element.classList.remove(CLASS_NAME_STATIC);
584
+
585
+ if (!isModalOverflowing) {
586
+ EventHandler__default['default'].one(this._element, 'transitionend', () => {
587
+ this._element.style.overflowY = '';
588
+ });
589
+ emulateTransitionEnd(this._element, modalTransitionDuration);
590
+ }
591
+ });
592
+ emulateTransitionEnd(this._element, modalTransitionDuration);
593
+
594
+ this._element.focus();
595
+ } // ----------------------------------------------------------------------
596
+ // the following methods are used to handle overflowing modals
597
+ // ----------------------------------------------------------------------
598
+
599
+
600
+ _adjustDialog() {
601
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
602
+
603
+ if (!this._isBodyOverflowing && isModalOverflowing && !isRTL() || this._isBodyOverflowing && !isModalOverflowing && isRTL()) {
604
+ this._element.style.paddingLeft = `${this._scrollbarWidth}px`;
605
+ }
606
+
607
+ if (this._isBodyOverflowing && !isModalOverflowing && !isRTL() || !this._isBodyOverflowing && isModalOverflowing && isRTL()) {
608
+ this._element.style.paddingRight = `${this._scrollbarWidth}px`;
609
+ }
610
+ }
611
+
612
+ _resetAdjustments() {
613
+ this._element.style.paddingLeft = '';
614
+ this._element.style.paddingRight = '';
615
+ }
616
+
617
+ _checkScrollbar() {
618
+ const rect = document.body.getBoundingClientRect();
619
+ this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
620
+ this._scrollbarWidth = this._getScrollbarWidth();
621
+ }
622
+
623
+ _setScrollbar() {
624
+ if (this._isBodyOverflowing) {
625
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);
626
+
627
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - this._scrollbarWidth);
628
+
629
+ this._setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);
630
+ }
631
+
632
+ document.body.classList.add(CLASS_NAME_OPEN);
633
+ }
634
+
635
+ _setElementAttributes(selector, styleProp, callback) {
636
+ SelectorEngine__default['default'].find(selector).forEach(element => {
637
+ if (element !== document.body && window.innerWidth > element.clientWidth + this._scrollbarWidth) {
638
+ return;
639
+ }
640
+
641
+ const actualValue = element.style[styleProp];
642
+ const calculatedValue = window.getComputedStyle(element)[styleProp];
643
+ Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
644
+ element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';
645
+ });
646
+ }
647
+
648
+ _resetScrollbar() {
649
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
650
+
651
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
652
+
653
+ this._resetElementAttributes('body', 'paddingRight');
654
+ }
655
+
656
+ _resetElementAttributes(selector, styleProp) {
657
+ SelectorEngine__default['default'].find(selector).forEach(element => {
658
+ const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
659
+
660
+ if (typeof value === 'undefined' && element === document.body) {
661
+ element.style[styleProp] = '';
662
+ } else {
663
+ Manipulator__default['default'].removeDataAttribute(element, styleProp);
664
+ element.style[styleProp] = value;
665
+ }
666
+ });
667
+ }
668
+
669
+ _getScrollbarWidth() {
670
+ // thx d.walsh
671
+ const scrollDiv = document.createElement('div');
672
+ scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
673
+ document.body.appendChild(scrollDiv);
674
+ const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
675
+ document.body.removeChild(scrollDiv);
676
+ return scrollbarWidth;
677
+ } // Static
678
+
679
+
680
+ static jQueryInterface(config, relatedTarget) {
681
+ return this.each(function () {
682
+ let data = Data__default['default'].get(this, DATA_KEY);
683
+ const _config = { ...Default,
684
+ ...Manipulator__default['default'].getDataAttributes(this),
685
+ ...(typeof config === 'object' && config ? config : {})
686
+ };
687
+
688
+ if (!data) {
689
+ data = new Modal(this, _config);
690
+ }
691
+
692
+ if (typeof config === 'string') {
693
+ if (typeof data[config] === 'undefined') {
694
+ throw new TypeError(`No method named "${config}"`);
695
+ }
696
+
697
+ data[config](relatedTarget);
698
+ }
699
+ });
700
+ }
701
+
702
+ }
703
+ /**
704
+ * ------------------------------------------------------------------------
705
+ * Data Api implementation
706
+ * ------------------------------------------------------------------------
707
+ */
708
+
709
+
710
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
711
+ const target = getElementFromSelector(this);
712
+
713
+ if (this.tagName === 'A' || this.tagName === 'AREA') {
714
+ event.preventDefault();
715
+ }
716
+
717
+ EventHandler__default['default'].one(target, EVENT_SHOW, showEvent => {
718
+ if (showEvent.defaultPrevented) {
719
+ // only register focus restorer if modal will actually get shown
720
+ return;
721
+ }
722
+
723
+ EventHandler__default['default'].one(target, EVENT_HIDDEN, () => {
724
+ if (isVisible(this)) {
725
+ this.focus();
726
+ }
727
+ });
728
+ });
729
+ let data = Data__default['default'].get(target, DATA_KEY);
730
+
731
+ if (!data) {
732
+ const config = { ...Manipulator__default['default'].getDataAttributes(target),
733
+ ...Manipulator__default['default'].getDataAttributes(this)
734
+ };
735
+ data = new Modal(target, config);
736
+ }
737
+
738
+ data.toggle(this);
739
+ });
740
+ /**
741
+ * ------------------------------------------------------------------------
742
+ * jQuery
743
+ * ------------------------------------------------------------------------
744
+ * add .Modal to jQuery only if jQuery is present
745
+ */
746
+
747
+ defineJQueryPlugin(NAME, Modal);
748
+
749
+ return Modal;
750
+
751
+ })));
752
+ //# sourceMappingURL=modal.js.map