cherrypy-foundation 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. cherrypy_foundation/__init__.py +0 -0
  2. cherrypy_foundation/components/ColorModes.jinja +70 -0
  3. cherrypy_foundation/components/Datatable.css +47 -0
  4. cherrypy_foundation/components/Datatable.jinja +63 -0
  5. cherrypy_foundation/components/Datatable.js +358 -0
  6. cherrypy_foundation/components/Field.css +10 -0
  7. cherrypy_foundation/components/Field.jinja +66 -0
  8. cherrypy_foundation/components/Field.js +56 -0
  9. cherrypy_foundation/components/Fields.jinja +4 -0
  10. cherrypy_foundation/components/Flash.jinja +13 -0
  11. cherrypy_foundation/components/Icon.jinja +3 -0
  12. cherrypy_foundation/components/LocaleSelection.jinja +13 -0
  13. cherrypy_foundation/components/LocaleSelection.js +26 -0
  14. cherrypy_foundation/components/SideBySideMultiSelect.css +25 -0
  15. cherrypy_foundation/components/SideBySideMultiSelect.jinja +9 -0
  16. cherrypy_foundation/components/SideBySideMultiSelect.js +9 -0
  17. cherrypy_foundation/components/Typeahead.css +55 -0
  18. cherrypy_foundation/components/Typeahead.jinja +106 -0
  19. cherrypy_foundation/components/Typeahead.js +8 -0
  20. cherrypy_foundation/components/__init__.py +51 -0
  21. cherrypy_foundation/components/tests/__init__.py +0 -0
  22. cherrypy_foundation/components/tests/test_static.py +90 -0
  23. cherrypy_foundation/components/vendor/bootstrap-icons/bootstrap-icons.css +2106 -0
  24. cherrypy_foundation/components/vendor/bootstrap-icons/bootstrap-icons.min.css +5 -0
  25. cherrypy_foundation/components/vendor/bootstrap-icons/fonts/bootstrap-icons.woff +0 -0
  26. cherrypy_foundation/components/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 +0 -0
  27. cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.css +9262 -0
  28. cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.css.map +95 -0
  29. cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.min.css +6 -0
  30. cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.min.css.map +7 -0
  31. cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.js +4846 -0
  32. cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.js.map +1 -0
  33. cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.min.js +7 -0
  34. cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.min.js.map +7 -0
  35. cherrypy_foundation/components/vendor/bootstrap5/js/color-modes.js +80 -0
  36. cherrypy_foundation/components/vendor/datatables/css/dataTables.dataTables.css +849 -0
  37. cherrypy_foundation/components/vendor/datatables/css/dataTables.dataTables.min.css +1 -0
  38. cherrypy_foundation/components/vendor/datatables/images/sort_asc.png +0 -0
  39. cherrypy_foundation/components/vendor/datatables/images/sort_asc_disabled.png +0 -0
  40. cherrypy_foundation/components/vendor/datatables/images/sort_both.png +0 -0
  41. cherrypy_foundation/components/vendor/datatables/images/sort_desc.png +0 -0
  42. cherrypy_foundation/components/vendor/datatables/images/sort_desc_disabled.png +0 -0
  43. cherrypy_foundation/components/vendor/datatables/js/dataTables.js +14073 -0
  44. cherrypy_foundation/components/vendor/datatables/js/dataTables.min.js +4 -0
  45. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/css/buttons.dataTables.css +556 -0
  46. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/css/buttons.dataTables.min.css +1 -0
  47. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/buttons.html5.js +1700 -0
  48. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/buttons.html5.min.js +8 -0
  49. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/dataTables.buttons.js +2944 -0
  50. cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/dataTables.buttons.min.js +4 -0
  51. cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/css/fixedHeader.dataTables.css +13 -0
  52. cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/css/fixedHeader.dataTables.min.css +1 -0
  53. cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/js/dataTables.fixedHeader.js +1202 -0
  54. cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/js/dataTables.fixedHeader.min.js +4 -0
  55. cherrypy_foundation/components/vendor/datatables-extensions/JSZip/jszip.js +11577 -0
  56. cherrypy_foundation/components/vendor/datatables-extensions/JSZip/jszip.min.js +13 -0
  57. cherrypy_foundation/components/vendor/datatables-extensions/Responsive/css/responsive.dataTables.css +194 -0
  58. cherrypy_foundation/components/vendor/datatables-extensions/Responsive/css/responsive.dataTables.min.css +1 -0
  59. cherrypy_foundation/components/vendor/datatables-extensions/Responsive/js/dataTables.responsive.js +1861 -0
  60. cherrypy_foundation/components/vendor/datatables-extensions/Responsive/js/dataTables.responsive.min.js +4 -0
  61. cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/pdfmake.js +75023 -0
  62. cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/pdfmake.min.js +3 -0
  63. cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/vfs_fonts.js +6 -0
  64. cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/css/rowGroup.dataTables.css +53 -0
  65. cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/css/rowGroup.dataTables.min.css +1 -0
  66. cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/js/dataTables.rowGroup.js +485 -0
  67. cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/js/dataTables.rowGroup.min.js +4 -0
  68. cherrypy_foundation/components/vendor/jquery/jquery.min.js +2 -0
  69. cherrypy_foundation/components/vendor/multi/LICENSE +7 -0
  70. cherrypy_foundation/components/vendor/multi/README.md +109 -0
  71. cherrypy_foundation/components/vendor/multi/multi.css +95 -0
  72. cherrypy_foundation/components/vendor/multi/multi.js +328 -0
  73. cherrypy_foundation/components/vendor/popper/popper.js +1825 -0
  74. cherrypy_foundation/components/vendor/popper/popper.min.js +6 -0
  75. cherrypy_foundation/components/vendor/typeahead/jquery.typeahead.min.css +1 -0
  76. cherrypy_foundation/components/vendor/typeahead/jquery.typeahead.min.js +10 -0
  77. cherrypy_foundation/error_page.py +94 -0
  78. cherrypy_foundation/flash.py +50 -0
  79. cherrypy_foundation/form.py +119 -0
  80. cherrypy_foundation/logging.py +103 -0
  81. cherrypy_foundation/passwd.py +65 -0
  82. cherrypy_foundation/plugins/__init__.py +0 -0
  83. cherrypy_foundation/plugins/db.py +286 -0
  84. cherrypy_foundation/plugins/ldap.py +257 -0
  85. cherrypy_foundation/plugins/restapi.py +74 -0
  86. cherrypy_foundation/plugins/scheduler.py +287 -0
  87. cherrypy_foundation/plugins/smtp.py +223 -0
  88. cherrypy_foundation/plugins/tests/__init__.py +0 -0
  89. cherrypy_foundation/plugins/tests/test_db.py +118 -0
  90. cherrypy_foundation/plugins/tests/test_ldap.py +451 -0
  91. cherrypy_foundation/plugins/tests/test_scheduler.py +100 -0
  92. cherrypy_foundation/plugins/tests/test_scheduler_db.py +107 -0
  93. cherrypy_foundation/plugins/tests/test_smtp.py +140 -0
  94. cherrypy_foundation/sessions.py +93 -0
  95. cherrypy_foundation/tests/__init__.py +72 -0
  96. cherrypy_foundation/tests/templates/test_flash.html +9 -0
  97. cherrypy_foundation/tests/templates/test_form.html +16 -0
  98. cherrypy_foundation/tests/templates/test_url.html +15 -0
  99. cherrypy_foundation/tests/test_error_page.py +78 -0
  100. cherrypy_foundation/tests/test_flash.py +61 -0
  101. cherrypy_foundation/tests/test_form.py +148 -0
  102. cherrypy_foundation/tests/test_logging.py +78 -0
  103. cherrypy_foundation/tests/test_passwd.py +51 -0
  104. cherrypy_foundation/tests/test_sessions.py +89 -0
  105. cherrypy_foundation/tests/test_url.py +161 -0
  106. cherrypy_foundation/tools/__init__.py +0 -0
  107. cherrypy_foundation/tools/auth.py +263 -0
  108. cherrypy_foundation/tools/auth_mfa.py +249 -0
  109. cherrypy_foundation/tools/i18n.py +529 -0
  110. cherrypy_foundation/tools/jinja2.py +158 -0
  111. cherrypy_foundation/tools/ratelimit.py +265 -0
  112. cherrypy_foundation/tools/secure_headers.py +119 -0
  113. cherrypy_foundation/tools/sessions_timeout.py +167 -0
  114. cherrypy_foundation/tools/tests/__init__.py +0 -0
  115. cherrypy_foundation/tools/tests/components/Button.jinja +2 -0
  116. cherrypy_foundation/tools/tests/locales/de/LC_MESSAGES/messages.mo +0 -0
  117. cherrypy_foundation/tools/tests/locales/de/LC_MESSAGES/messages.po +15 -0
  118. cherrypy_foundation/tools/tests/locales/fr/LC_MESSAGES/messages.mo +0 -0
  119. cherrypy_foundation/tools/tests/locales/fr/LC_MESSAGES/messages.po +15 -0
  120. cherrypy_foundation/tools/tests/locales/messages.pot +2 -0
  121. cherrypy_foundation/tools/tests/templates/test_jinja2.html +11 -0
  122. cherrypy_foundation/tools/tests/templates/test_jinjax.html +9 -0
  123. cherrypy_foundation/tools/tests/templates/test_jinjax_i18n.html +22 -0
  124. cherrypy_foundation/tools/tests/test_auth.py +110 -0
  125. cherrypy_foundation/tools/tests/test_auth_mfa.py +369 -0
  126. cherrypy_foundation/tools/tests/test_i18n.py +247 -0
  127. cherrypy_foundation/tools/tests/test_jinja2.py +153 -0
  128. cherrypy_foundation/tools/tests/test_ratelimit.py +109 -0
  129. cherrypy_foundation/tools/tests/test_secure_headers.py +200 -0
  130. cherrypy_foundation/url.py +66 -0
  131. cherrypy_foundation/widgets.py +48 -0
  132. cherrypy_foundation-1.0.0.dist-info/METADATA +71 -0
  133. cherrypy_foundation-1.0.0.dist-info/RECORD +136 -0
  134. cherrypy_foundation-1.0.0.dist-info/WHEEL +5 -0
  135. cherrypy_foundation-1.0.0.dist-info/licenses/LICENSE.md +674 -0
  136. cherrypy_foundation-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4846 @@
1
+ /*!
2
+ * Bootstrap v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2023 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('@popperjs/core')) :
8
+ typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
10
+ })(this, (function (Popper) { 'use strict';
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== 'default') {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
30
+
31
+ function _defineProperties(target, props) {
32
+ for (var i = 0; i < props.length; i++) {
33
+ var descriptor = props[i];
34
+ descriptor.enumerable = descriptor.enumerable || false;
35
+ descriptor.configurable = true;
36
+ if ("value" in descriptor) descriptor.writable = true;
37
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
38
+ }
39
+ }
40
+ function _createClass(Constructor, protoProps, staticProps) {
41
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
42
+ if (staticProps) _defineProperties(Constructor, staticProps);
43
+ Object.defineProperty(Constructor, "prototype", {
44
+ writable: false
45
+ });
46
+ return Constructor;
47
+ }
48
+ function _extends() {
49
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
50
+ for (var i = 1; i < arguments.length; i++) {
51
+ var source = arguments[i];
52
+ for (var key in source) {
53
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
54
+ target[key] = source[key];
55
+ }
56
+ }
57
+ }
58
+ return target;
59
+ };
60
+ return _extends.apply(this, arguments);
61
+ }
62
+ function _inheritsLoose(subClass, superClass) {
63
+ subClass.prototype = Object.create(superClass.prototype);
64
+ subClass.prototype.constructor = subClass;
65
+ _setPrototypeOf(subClass, superClass);
66
+ }
67
+ function _setPrototypeOf(o, p) {
68
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
69
+ o.__proto__ = p;
70
+ return o;
71
+ };
72
+ return _setPrototypeOf(o, p);
73
+ }
74
+ function _assertThisInitialized(self) {
75
+ if (self === void 0) {
76
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
77
+ }
78
+ return self;
79
+ }
80
+ function _unsupportedIterableToArray(o, minLen) {
81
+ if (!o) return;
82
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
83
+ var n = Object.prototype.toString.call(o).slice(8, -1);
84
+ if (n === "Object" && o.constructor) n = o.constructor.name;
85
+ if (n === "Map" || n === "Set") return Array.from(o);
86
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
87
+ }
88
+ function _arrayLikeToArray(arr, len) {
89
+ if (len == null || len > arr.length) len = arr.length;
90
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
91
+ return arr2;
92
+ }
93
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
94
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
95
+ if (it) return (it = it.call(o)).next.bind(it);
96
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
97
+ if (it) o = it;
98
+ var i = 0;
99
+ return function () {
100
+ if (i >= o.length) return {
101
+ done: true
102
+ };
103
+ return {
104
+ done: false,
105
+ value: o[i++]
106
+ };
107
+ };
108
+ }
109
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
110
+ }
111
+ function _toPrimitive(input, hint) {
112
+ if (typeof input !== "object" || input === null) return input;
113
+ var prim = input[Symbol.toPrimitive];
114
+ if (prim !== undefined) {
115
+ var res = prim.call(input, hint || "default");
116
+ if (typeof res !== "object") return res;
117
+ throw new TypeError("@@toPrimitive must return a primitive value.");
118
+ }
119
+ return (hint === "string" ? String : Number)(input);
120
+ }
121
+ function _toPropertyKey(arg) {
122
+ var key = _toPrimitive(arg, "string");
123
+ return typeof key === "symbol" ? key : String(key);
124
+ }
125
+
126
+ /**
127
+ * --------------------------------------------------------------------------
128
+ * Bootstrap dom/data.js
129
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
130
+ * --------------------------------------------------------------------------
131
+ */
132
+
133
+ /**
134
+ * Constants
135
+ */
136
+
137
+ var elementMap = new Map();
138
+ const Data = {
139
+ set: function set(element, key, instance) {
140
+ if (!elementMap.has(element)) {
141
+ elementMap.set(element, new Map());
142
+ }
143
+ var instanceMap = elementMap.get(element);
144
+
145
+ // make it clear we only want one instance per element
146
+ // can be removed later when multiple key/instances are fine to be used
147
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
148
+ // eslint-disable-next-line no-console
149
+ console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: " + Array.from(instanceMap.keys())[0] + ".");
150
+ return;
151
+ }
152
+ instanceMap.set(key, instance);
153
+ },
154
+ get: function get(element, key) {
155
+ if (elementMap.has(element)) {
156
+ return elementMap.get(element).get(key) || null;
157
+ }
158
+ return null;
159
+ },
160
+ remove: function remove(element, key) {
161
+ if (!elementMap.has(element)) {
162
+ return;
163
+ }
164
+ var instanceMap = elementMap.get(element);
165
+ instanceMap["delete"](key);
166
+
167
+ // free up element references if there are no instances left for an element
168
+ if (instanceMap.size === 0) {
169
+ elementMap["delete"](element);
170
+ }
171
+ }
172
+ };
173
+
174
+ /**
175
+ * --------------------------------------------------------------------------
176
+ * Bootstrap util/index.js
177
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
178
+ * --------------------------------------------------------------------------
179
+ */
180
+
181
+ var MAX_UID = 1000000;
182
+ var MILLISECONDS_MULTIPLIER = 1000;
183
+ var TRANSITION_END = 'transitionend';
184
+
185
+ /**
186
+ * Properly escape IDs selectors to handle weird IDs
187
+ * @param {string} selector
188
+ * @returns {string}
189
+ */
190
+ var parseSelector = function parseSelector(selector) {
191
+ if (selector && window.CSS && window.CSS.escape) {
192
+ // document.querySelector needs escaping to handle IDs (html5+) containing for instance /
193
+ selector = selector.replace(/#([^\s"#']+)/g, function (match, id) {
194
+ return "#" + CSS.escape(id);
195
+ });
196
+ }
197
+ return selector;
198
+ };
199
+
200
+ // Shout-out Angus Croll (https://goo.gl/pxwQGp)
201
+ var toType = function toType(object) {
202
+ if (object === null || object === undefined) {
203
+ return "" + object;
204
+ }
205
+ return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase();
206
+ };
207
+
208
+ /**
209
+ * Public Util API
210
+ */
211
+
212
+ var getUID = function getUID(prefix) {
213
+ do {
214
+ prefix += Math.floor(Math.random() * MAX_UID);
215
+ } while (document.getElementById(prefix));
216
+ return prefix;
217
+ };
218
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
219
+ if (!element) {
220
+ return 0;
221
+ }
222
+
223
+ // Get transition-duration of the element
224
+ var _window$getComputedSt = window.getComputedStyle(element),
225
+ transitionDuration = _window$getComputedSt.transitionDuration,
226
+ transitionDelay = _window$getComputedSt.transitionDelay;
227
+ var floatTransitionDuration = Number.parseFloat(transitionDuration);
228
+ var floatTransitionDelay = Number.parseFloat(transitionDelay);
229
+
230
+ // Return 0 if element or transition duration is not found
231
+ if (!floatTransitionDuration && !floatTransitionDelay) {
232
+ return 0;
233
+ }
234
+
235
+ // If multiple durations are defined, take the first
236
+ transitionDuration = transitionDuration.split(',')[0];
237
+ transitionDelay = transitionDelay.split(',')[0];
238
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
239
+ };
240
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
241
+ element.dispatchEvent(new Event(TRANSITION_END));
242
+ };
243
+ var isElement = function isElement(object) {
244
+ if (!object || typeof object !== 'object') {
245
+ return false;
246
+ }
247
+ if (typeof object.jquery !== 'undefined') {
248
+ object = object[0];
249
+ }
250
+ return typeof object.nodeType !== 'undefined';
251
+ };
252
+ var getElement = function getElement(object) {
253
+ // it's a jQuery object or a node element
254
+ if (isElement(object)) {
255
+ return object.jquery ? object[0] : object;
256
+ }
257
+ if (typeof object === 'string' && object.length > 0) {
258
+ return document.querySelector(parseSelector(object));
259
+ }
260
+ return null;
261
+ };
262
+ var isVisible = function isVisible(element) {
263
+ if (!isElement(element) || element.getClientRects().length === 0) {
264
+ return false;
265
+ }
266
+ var elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
267
+ // Handle `details` element as its content may falsie appear visible when it is closed
268
+ var closedDetails = element.closest('details:not([open])');
269
+ if (!closedDetails) {
270
+ return elementIsVisible;
271
+ }
272
+ if (closedDetails !== element) {
273
+ var summary = element.closest('summary');
274
+ if (summary && summary.parentNode !== closedDetails) {
275
+ return false;
276
+ }
277
+ if (summary === null) {
278
+ return false;
279
+ }
280
+ }
281
+ return elementIsVisible;
282
+ };
283
+ var isDisabled = function isDisabled(element) {
284
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
285
+ return true;
286
+ }
287
+ if (element.classList.contains('disabled')) {
288
+ return true;
289
+ }
290
+ if (typeof element.disabled !== 'undefined') {
291
+ return element.disabled;
292
+ }
293
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
294
+ };
295
+ var findShadowRoot = function findShadowRoot(element) {
296
+ if (!document.documentElement.attachShadow) {
297
+ return null;
298
+ }
299
+
300
+ // Can find the shadow root otherwise it'll return the document
301
+ if (typeof element.getRootNode === 'function') {
302
+ var root = element.getRootNode();
303
+ return root instanceof ShadowRoot ? root : null;
304
+ }
305
+ if (element instanceof ShadowRoot) {
306
+ return element;
307
+ }
308
+
309
+ // when we don't find a shadow root
310
+ if (!element.parentNode) {
311
+ return null;
312
+ }
313
+ return findShadowRoot(element.parentNode);
314
+ };
315
+ var noop = function noop() {};
316
+
317
+ /**
318
+ * Trick to restart an element's animation
319
+ *
320
+ * @param {HTMLElement} element
321
+ * @return void
322
+ *
323
+ * @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
324
+ */
325
+ var reflow = function reflow(element) {
326
+ element.offsetHeight; // eslint-disable-line no-unused-expressions
327
+ };
328
+
329
+ var getjQuery = function getjQuery() {
330
+ if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
331
+ return window.jQuery;
332
+ }
333
+ return null;
334
+ };
335
+ var DOMContentLoadedCallbacks = [];
336
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
337
+ if (document.readyState === 'loading') {
338
+ // add listener on the first call when the document is in loading state
339
+ if (!DOMContentLoadedCallbacks.length) {
340
+ document.addEventListener('DOMContentLoaded', function () {
341
+ for (var _i = 0, _DOMContentLoadedCall = DOMContentLoadedCallbacks; _i < _DOMContentLoadedCall.length; _i++) {
342
+ var _callback = _DOMContentLoadedCall[_i];
343
+ _callback();
344
+ }
345
+ });
346
+ }
347
+ DOMContentLoadedCallbacks.push(callback);
348
+ } else {
349
+ callback();
350
+ }
351
+ };
352
+ var isRTL = function isRTL() {
353
+ return document.documentElement.dir === 'rtl';
354
+ };
355
+ var defineJQueryPlugin = function defineJQueryPlugin(plugin) {
356
+ onDOMContentLoaded(function () {
357
+ var $ = getjQuery();
358
+ /* istanbul ignore if */
359
+ if ($) {
360
+ var name = plugin.NAME;
361
+ var JQUERY_NO_CONFLICT = $.fn[name];
362
+ $.fn[name] = plugin.jQueryInterface;
363
+ $.fn[name].Constructor = plugin;
364
+ $.fn[name].noConflict = function () {
365
+ $.fn[name] = JQUERY_NO_CONFLICT;
366
+ return plugin.jQueryInterface;
367
+ };
368
+ }
369
+ });
370
+ };
371
+ var execute = function execute(possibleCallback, args, defaultValue) {
372
+ if (args === void 0) {
373
+ args = [];
374
+ }
375
+ if (defaultValue === void 0) {
376
+ defaultValue = possibleCallback;
377
+ }
378
+ return typeof possibleCallback === 'function' ? possibleCallback.call.apply(possibleCallback, args) : defaultValue;
379
+ };
380
+ var executeAfterTransition = function executeAfterTransition(callback, transitionElement, waitForTransition) {
381
+ if (waitForTransition === void 0) {
382
+ waitForTransition = true;
383
+ }
384
+ if (!waitForTransition) {
385
+ execute(callback);
386
+ return;
387
+ }
388
+ var durationPadding = 5;
389
+ var emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
390
+ var called = false;
391
+ var handler = function handler(_ref) {
392
+ var target = _ref.target;
393
+ if (target !== transitionElement) {
394
+ return;
395
+ }
396
+ called = true;
397
+ transitionElement.removeEventListener(TRANSITION_END, handler);
398
+ execute(callback);
399
+ };
400
+ transitionElement.addEventListener(TRANSITION_END, handler);
401
+ setTimeout(function () {
402
+ if (!called) {
403
+ triggerTransitionEnd(transitionElement);
404
+ }
405
+ }, emulatedDuration);
406
+ };
407
+
408
+ /**
409
+ * Return the previous/next element of a list.
410
+ *
411
+ * @param {array} list The list of elements
412
+ * @param activeElement The active element
413
+ * @param shouldGetNext Choose to get next or previous element
414
+ * @param isCycleAllowed
415
+ * @return {Element|elem} The proper element
416
+ */
417
+ var getNextActiveElement = function getNextActiveElement(list, activeElement, shouldGetNext, isCycleAllowed) {
418
+ var listLength = list.length;
419
+ var index = list.indexOf(activeElement);
420
+
421
+ // if the element does not exist in the list return an element
422
+ // depending on the direction and if cycle is allowed
423
+ if (index === -1) {
424
+ return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
425
+ }
426
+ index += shouldGetNext ? 1 : -1;
427
+ if (isCycleAllowed) {
428
+ index = (index + listLength) % listLength;
429
+ }
430
+ return list[Math.max(0, Math.min(index, listLength - 1))];
431
+ };
432
+
433
+ /**
434
+ * Constants
435
+ */
436
+
437
+ var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
438
+ var stripNameRegex = /\..*/;
439
+ var stripUidRegex = /::\d+$/;
440
+ var eventRegistry = {}; // Events storage
441
+ var uidEvent = 1;
442
+ var customEvents = {
443
+ mouseenter: 'mouseover',
444
+ mouseleave: 'mouseout'
445
+ };
446
+ var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
447
+
448
+ /**
449
+ * Private methods
450
+ */
451
+
452
+ function makeEventUid(element, uid) {
453
+ return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
454
+ }
455
+ function getElementEvents(element) {
456
+ var uid = makeEventUid(element);
457
+ element.uidEvent = uid;
458
+ eventRegistry[uid] = eventRegistry[uid] || {};
459
+ return eventRegistry[uid];
460
+ }
461
+ function bootstrapHandler(element, fn) {
462
+ return function handler(event) {
463
+ hydrateObj(event, {
464
+ delegateTarget: element
465
+ });
466
+ if (handler.oneOff) {
467
+ EventHandler.off(element, event.type, fn);
468
+ }
469
+ return fn.apply(element, [event]);
470
+ };
471
+ }
472
+ function bootstrapDelegationHandler(element, selector, fn) {
473
+ return function handler(event) {
474
+ var domElements = element.querySelectorAll(selector);
475
+ for (var target = event.target; target && target !== this; target = target.parentNode) {
476
+ for (var _iterator = _createForOfIteratorHelperLoose(domElements), _step; !(_step = _iterator()).done;) {
477
+ var domElement = _step.value;
478
+ if (domElement !== target) {
479
+ continue;
480
+ }
481
+ hydrateObj(event, {
482
+ delegateTarget: target
483
+ });
484
+ if (handler.oneOff) {
485
+ EventHandler.off(element, event.type, selector, fn);
486
+ }
487
+ return fn.apply(target, [event]);
488
+ }
489
+ }
490
+ };
491
+ }
492
+ function findHandler(events, callable, delegationSelector) {
493
+ if (delegationSelector === void 0) {
494
+ delegationSelector = null;
495
+ }
496
+ return Object.values(events).find(function (event) {
497
+ return event.callable === callable && event.delegationSelector === delegationSelector;
498
+ });
499
+ }
500
+ function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
501
+ var isDelegated = typeof handler === 'string';
502
+ // TODO: tooltip passes `false` instead of selector, so we need to check
503
+ var callable = isDelegated ? delegationFunction : handler || delegationFunction;
504
+ var typeEvent = getTypeEvent(originalTypeEvent);
505
+ if (!nativeEvents.has(typeEvent)) {
506
+ typeEvent = originalTypeEvent;
507
+ }
508
+ return [isDelegated, callable, typeEvent];
509
+ }
510
+ function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
511
+ if (typeof originalTypeEvent !== 'string' || !element) {
512
+ return;
513
+ }
514
+ var _normalizeParameters = normalizeParameters(originalTypeEvent, handler, delegationFunction),
515
+ isDelegated = _normalizeParameters[0],
516
+ callable = _normalizeParameters[1],
517
+ typeEvent = _normalizeParameters[2];
518
+
519
+ // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
520
+ // this prevents the handler from being dispatched the same way as mouseover or mouseout does
521
+ if (originalTypeEvent in customEvents) {
522
+ var wrapFunction = function wrapFunction(fn) {
523
+ return function (event) {
524
+ if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
525
+ return fn.call(this, event);
526
+ }
527
+ };
528
+ };
529
+ callable = wrapFunction(callable);
530
+ }
531
+ var events = getElementEvents(element);
532
+ var handlers = events[typeEvent] || (events[typeEvent] = {});
533
+ var previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
534
+ if (previousFunction) {
535
+ previousFunction.oneOff = previousFunction.oneOff && oneOff;
536
+ return;
537
+ }
538
+ var uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
539
+ var fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
540
+ fn.delegationSelector = isDelegated ? handler : null;
541
+ fn.callable = callable;
542
+ fn.oneOff = oneOff;
543
+ fn.uidEvent = uid;
544
+ handlers[uid] = fn;
545
+ element.addEventListener(typeEvent, fn, isDelegated);
546
+ }
547
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
548
+ var fn = findHandler(events[typeEvent], handler, delegationSelector);
549
+ if (!fn) {
550
+ return;
551
+ }
552
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
553
+ delete events[typeEvent][fn.uidEvent];
554
+ }
555
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
556
+ var storeElementEvent = events[typeEvent] || {};
557
+ for (var _i = 0, _Object$entries = Object.entries(storeElementEvent); _i < _Object$entries.length; _i++) {
558
+ var _Object$entries$_i = _Object$entries[_i],
559
+ handlerKey = _Object$entries$_i[0],
560
+ event = _Object$entries$_i[1];
561
+ if (handlerKey.includes(namespace)) {
562
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
563
+ }
564
+ }
565
+ }
566
+ function getTypeEvent(event) {
567
+ // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
568
+ event = event.replace(stripNameRegex, '');
569
+ return customEvents[event] || event;
570
+ }
571
+ var EventHandler = {
572
+ on: function on(element, event, handler, delegationFunction) {
573
+ addHandler(element, event, handler, delegationFunction, false);
574
+ },
575
+ one: function one(element, event, handler, delegationFunction) {
576
+ addHandler(element, event, handler, delegationFunction, true);
577
+ },
578
+ off: function off(element, originalTypeEvent, handler, delegationFunction) {
579
+ if (typeof originalTypeEvent !== 'string' || !element) {
580
+ return;
581
+ }
582
+ var _normalizeParameters2 = normalizeParameters(originalTypeEvent, handler, delegationFunction),
583
+ isDelegated = _normalizeParameters2[0],
584
+ callable = _normalizeParameters2[1],
585
+ typeEvent = _normalizeParameters2[2];
586
+ var inNamespace = typeEvent !== originalTypeEvent;
587
+ var events = getElementEvents(element);
588
+ var storeElementEvent = events[typeEvent] || {};
589
+ var isNamespace = originalTypeEvent.startsWith('.');
590
+ if (typeof callable !== 'undefined') {
591
+ // Simplest case: handler is passed, remove that listener ONLY.
592
+ if (!Object.keys(storeElementEvent).length) {
593
+ return;
594
+ }
595
+ removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
596
+ return;
597
+ }
598
+ if (isNamespace) {
599
+ for (var _i2 = 0, _Object$keys = Object.keys(events); _i2 < _Object$keys.length; _i2++) {
600
+ var elementEvent = _Object$keys[_i2];
601
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
602
+ }
603
+ }
604
+ for (var _i3 = 0, _Object$entries2 = Object.entries(storeElementEvent); _i3 < _Object$entries2.length; _i3++) {
605
+ var _Object$entries2$_i = _Object$entries2[_i3],
606
+ keyHandlers = _Object$entries2$_i[0],
607
+ event = _Object$entries2$_i[1];
608
+ var handlerKey = keyHandlers.replace(stripUidRegex, '');
609
+ if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
610
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
611
+ }
612
+ }
613
+ },
614
+ trigger: function trigger(element, event, args) {
615
+ if (typeof event !== 'string' || !element) {
616
+ return null;
617
+ }
618
+ var $ = getjQuery();
619
+ var typeEvent = getTypeEvent(event);
620
+ var inNamespace = event !== typeEvent;
621
+ var jQueryEvent = null;
622
+ var bubbles = true;
623
+ var nativeDispatch = true;
624
+ var defaultPrevented = false;
625
+ if (inNamespace && $) {
626
+ jQueryEvent = $.Event(event, args);
627
+ $(element).trigger(jQueryEvent);
628
+ bubbles = !jQueryEvent.isPropagationStopped();
629
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
630
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
631
+ }
632
+ var evt = hydrateObj(new Event(event, {
633
+ bubbles: bubbles,
634
+ cancelable: true
635
+ }), args);
636
+ if (defaultPrevented) {
637
+ evt.preventDefault();
638
+ }
639
+ if (nativeDispatch) {
640
+ element.dispatchEvent(evt);
641
+ }
642
+ if (evt.defaultPrevented && jQueryEvent) {
643
+ jQueryEvent.preventDefault();
644
+ }
645
+ return evt;
646
+ }
647
+ };
648
+ function hydrateObj(obj, meta) {
649
+ if (meta === void 0) {
650
+ meta = {};
651
+ }
652
+ var _loop = function _loop() {
653
+ var _Object$entries3$_i = _Object$entries3[_i4],
654
+ key = _Object$entries3$_i[0],
655
+ value = _Object$entries3$_i[1];
656
+ try {
657
+ obj[key] = value;
658
+ } catch (_unused) {
659
+ Object.defineProperty(obj, key, {
660
+ configurable: true,
661
+ get: function get() {
662
+ return value;
663
+ }
664
+ });
665
+ }
666
+ };
667
+ for (var _i4 = 0, _Object$entries3 = Object.entries(meta); _i4 < _Object$entries3.length; _i4++) {
668
+ _loop();
669
+ }
670
+ return obj;
671
+ }
672
+
673
+ /**
674
+ * --------------------------------------------------------------------------
675
+ * Bootstrap dom/manipulator.js
676
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
677
+ * --------------------------------------------------------------------------
678
+ */
679
+
680
+ function normalizeData(value) {
681
+ if (value === 'true') {
682
+ return true;
683
+ }
684
+ if (value === 'false') {
685
+ return false;
686
+ }
687
+ if (value === Number(value).toString()) {
688
+ return Number(value);
689
+ }
690
+ if (value === '' || value === 'null') {
691
+ return null;
692
+ }
693
+ if (typeof value !== 'string') {
694
+ return value;
695
+ }
696
+ try {
697
+ return JSON.parse(decodeURIComponent(value));
698
+ } catch (_unused) {
699
+ return value;
700
+ }
701
+ }
702
+ function normalizeDataKey(key) {
703
+ return key.replace(/[A-Z]/g, function (chr) {
704
+ return "-" + chr.toLowerCase();
705
+ });
706
+ }
707
+ var Manipulator = {
708
+ setDataAttribute: function setDataAttribute(element, key, value) {
709
+ element.setAttribute("data-bs-" + normalizeDataKey(key), value);
710
+ },
711
+ removeDataAttribute: function removeDataAttribute(element, key) {
712
+ element.removeAttribute("data-bs-" + normalizeDataKey(key));
713
+ },
714
+ getDataAttributes: function getDataAttributes(element) {
715
+ if (!element) {
716
+ return {};
717
+ }
718
+ var attributes = {};
719
+ var bsKeys = Object.keys(element.dataset).filter(function (key) {
720
+ return key.startsWith('bs') && !key.startsWith('bsConfig');
721
+ });
722
+ for (var _iterator = _createForOfIteratorHelperLoose(bsKeys), _step; !(_step = _iterator()).done;) {
723
+ var key = _step.value;
724
+ var pureKey = key.replace(/^bs/, '');
725
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1);
726
+ attributes[pureKey] = normalizeData(element.dataset[key]);
727
+ }
728
+ return attributes;
729
+ },
730
+ getDataAttribute: function getDataAttribute(element, key) {
731
+ return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
732
+ }
733
+ };
734
+
735
+ /**
736
+ * Class definition
737
+ */
738
+ var Config = /*#__PURE__*/function () {
739
+ function Config() {}
740
+ var _proto = Config.prototype;
741
+ _proto._getConfig = function _getConfig(config) {
742
+ config = this._mergeConfigObj(config);
743
+ config = this._configAfterMerge(config);
744
+ this._typeCheckConfig(config);
745
+ return config;
746
+ };
747
+ _proto._configAfterMerge = function _configAfterMerge(config) {
748
+ return config;
749
+ };
750
+ _proto._mergeConfigObj = function _mergeConfigObj(config, element) {
751
+ var jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse
752
+
753
+ return _extends({}, this.constructor.Default, typeof jsonConfig === 'object' ? jsonConfig : {}, isElement(element) ? Manipulator.getDataAttributes(element) : {}, typeof config === 'object' ? config : {});
754
+ };
755
+ _proto._typeCheckConfig = function _typeCheckConfig(config, configTypes) {
756
+ if (configTypes === void 0) {
757
+ configTypes = this.constructor.DefaultType;
758
+ }
759
+ for (var _i = 0, _Object$entries = Object.entries(configTypes); _i < _Object$entries.length; _i++) {
760
+ var _Object$entries$_i = _Object$entries[_i],
761
+ property = _Object$entries$_i[0],
762
+ expectedTypes = _Object$entries$_i[1];
763
+ var value = config[property];
764
+ var valueType = isElement(value) ? 'element' : toType(value);
765
+ if (!new RegExp(expectedTypes).test(valueType)) {
766
+ throw new TypeError(this.constructor.NAME.toUpperCase() + ": Option \"" + property + "\" provided type \"" + valueType + "\" but expected type \"" + expectedTypes + "\".");
767
+ }
768
+ }
769
+ };
770
+ _createClass(Config, null, [{
771
+ key: "Default",
772
+ get:
773
+ // Getters
774
+ function get() {
775
+ return {};
776
+ }
777
+ }, {
778
+ key: "DefaultType",
779
+ get: function get() {
780
+ return {};
781
+ }
782
+ }, {
783
+ key: "NAME",
784
+ get: function get() {
785
+ throw new Error('You have to implement the static method "NAME", for each component!');
786
+ }
787
+ }]);
788
+ return Config;
789
+ }();
790
+
791
+ /**
792
+ * Constants
793
+ */
794
+
795
+ var VERSION = '5.3.8';
796
+
797
+ /**
798
+ * Class definition
799
+ */
800
+ var BaseComponent = /*#__PURE__*/function (_Config) {
801
+ _inheritsLoose(BaseComponent, _Config);
802
+ function BaseComponent(element, config) {
803
+ var _this;
804
+ _this = _Config.call(this) || this;
805
+ element = getElement(element);
806
+ if (!element) {
807
+ return _assertThisInitialized(_this);
808
+ }
809
+ _this._element = element;
810
+ _this._config = _this._getConfig(config);
811
+ Data.set(_this._element, _this.constructor.DATA_KEY, _assertThisInitialized(_this));
812
+ return _this;
813
+ }
814
+
815
+ // Public
816
+ var _proto = BaseComponent.prototype;
817
+ _proto.dispose = function dispose() {
818
+ Data.remove(this._element, this.constructor.DATA_KEY);
819
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
820
+ for (var _iterator = _createForOfIteratorHelperLoose(Object.getOwnPropertyNames(this)), _step; !(_step = _iterator()).done;) {
821
+ var propertyName = _step.value;
822
+ this[propertyName] = null;
823
+ }
824
+ }
825
+
826
+ // Private
827
+ ;
828
+ _proto._queueCallback = function _queueCallback(callback, element, isAnimated) {
829
+ if (isAnimated === void 0) {
830
+ isAnimated = true;
831
+ }
832
+ executeAfterTransition(callback, element, isAnimated);
833
+ };
834
+ _proto._getConfig = function _getConfig(config) {
835
+ config = this._mergeConfigObj(config, this._element);
836
+ config = this._configAfterMerge(config);
837
+ this._typeCheckConfig(config);
838
+ return config;
839
+ }
840
+
841
+ // Static
842
+ ;
843
+ BaseComponent.getInstance = function getInstance(element) {
844
+ return Data.get(getElement(element), this.DATA_KEY);
845
+ };
846
+ BaseComponent.getOrCreateInstance = function getOrCreateInstance(element, config) {
847
+ if (config === void 0) {
848
+ config = {};
849
+ }
850
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
851
+ };
852
+ BaseComponent.eventName = function eventName(name) {
853
+ return "" + name + this.EVENT_KEY;
854
+ };
855
+ _createClass(BaseComponent, null, [{
856
+ key: "VERSION",
857
+ get: function get() {
858
+ return VERSION;
859
+ }
860
+ }, {
861
+ key: "DATA_KEY",
862
+ get: function get() {
863
+ return "bs." + this.NAME;
864
+ }
865
+ }, {
866
+ key: "EVENT_KEY",
867
+ get: function get() {
868
+ return "." + this.DATA_KEY;
869
+ }
870
+ }]);
871
+ return BaseComponent;
872
+ }(Config);
873
+
874
+ /**
875
+ * --------------------------------------------------------------------------
876
+ * Bootstrap dom/selector-engine.js
877
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
878
+ * --------------------------------------------------------------------------
879
+ */
880
+
881
+ var getSelector = function getSelector(element) {
882
+ var selector = element.getAttribute('data-bs-target');
883
+ if (!selector || selector === '#') {
884
+ var hrefAttribute = element.getAttribute('href');
885
+
886
+ // The only valid content that could double as a selector are IDs or classes,
887
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
888
+ // `document.querySelector` will rightfully complain it is invalid.
889
+ // See https://github.com/twbs/bootstrap/issues/32273
890
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
891
+ return null;
892
+ }
893
+
894
+ // Just in case some CMS puts out a full URL with the anchor appended
895
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
896
+ hrefAttribute = "#" + hrefAttribute.split('#')[1];
897
+ }
898
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
899
+ }
900
+ return selector ? selector.split(',').map(function (sel) {
901
+ return parseSelector(sel);
902
+ }).join(',') : null;
903
+ };
904
+ var SelectorEngine = {
905
+ find: function find(selector, element) {
906
+ var _ref;
907
+ if (element === void 0) {
908
+ element = document.documentElement;
909
+ }
910
+ return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
911
+ },
912
+ findOne: function findOne(selector, element) {
913
+ if (element === void 0) {
914
+ element = document.documentElement;
915
+ }
916
+ return Element.prototype.querySelector.call(element, selector);
917
+ },
918
+ children: function children(element, selector) {
919
+ var _ref2;
920
+ return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) {
921
+ return child.matches(selector);
922
+ });
923
+ },
924
+ parents: function parents(element, selector) {
925
+ var parents = [];
926
+ var ancestor = element.parentNode.closest(selector);
927
+ while (ancestor) {
928
+ parents.push(ancestor);
929
+ ancestor = ancestor.parentNode.closest(selector);
930
+ }
931
+ return parents;
932
+ },
933
+ prev: function prev(element, selector) {
934
+ var previous = element.previousElementSibling;
935
+ while (previous) {
936
+ if (previous.matches(selector)) {
937
+ return [previous];
938
+ }
939
+ previous = previous.previousElementSibling;
940
+ }
941
+ return [];
942
+ },
943
+ // TODO: this is now unused; remove later along with prev()
944
+ next: function next(element, selector) {
945
+ var next = element.nextElementSibling;
946
+ while (next) {
947
+ if (next.matches(selector)) {
948
+ return [next];
949
+ }
950
+ next = next.nextElementSibling;
951
+ }
952
+ return [];
953
+ },
954
+ focusableChildren: function focusableChildren(element) {
955
+ var focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(function (selector) {
956
+ return selector + ":not([tabindex^=\"-\"])";
957
+ }).join(',');
958
+ return this.find(focusables, element).filter(function (el) {
959
+ return !isDisabled(el) && isVisible(el);
960
+ });
961
+ },
962
+ getSelectorFromElement: function getSelectorFromElement(element) {
963
+ var selector = getSelector(element);
964
+ if (selector) {
965
+ return SelectorEngine.findOne(selector) ? selector : null;
966
+ }
967
+ return null;
968
+ },
969
+ getElementFromSelector: function getElementFromSelector(element) {
970
+ var selector = getSelector(element);
971
+ return selector ? SelectorEngine.findOne(selector) : null;
972
+ },
973
+ getMultipleElementsFromSelector: function getMultipleElementsFromSelector(element) {
974
+ var selector = getSelector(element);
975
+ return selector ? SelectorEngine.find(selector) : [];
976
+ }
977
+ };
978
+
979
+ /**
980
+ * --------------------------------------------------------------------------
981
+ * Bootstrap util/component-functions.js
982
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
983
+ * --------------------------------------------------------------------------
984
+ */
985
+
986
+ var enableDismissTrigger = function enableDismissTrigger(component, method) {
987
+ if (method === void 0) {
988
+ method = 'hide';
989
+ }
990
+ var clickEvent = "click.dismiss" + component.EVENT_KEY;
991
+ var name = component.NAME;
992
+ EventHandler.on(document, clickEvent, "[data-bs-dismiss=\"" + name + "\"]", function (event) {
993
+ if (['A', 'AREA'].includes(this.tagName)) {
994
+ event.preventDefault();
995
+ }
996
+ if (isDisabled(this)) {
997
+ return;
998
+ }
999
+ var target = SelectorEngine.getElementFromSelector(this) || this.closest("." + name);
1000
+ var instance = component.getOrCreateInstance(target);
1001
+
1002
+ // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
1003
+ instance[method]();
1004
+ });
1005
+ };
1006
+
1007
+ /**
1008
+ * Constants
1009
+ */
1010
+
1011
+ var NAME$f = 'alert';
1012
+ var DATA_KEY$a = 'bs.alert';
1013
+ var EVENT_KEY$b = "." + DATA_KEY$a;
1014
+ var EVENT_CLOSE = "close" + EVENT_KEY$b;
1015
+ var EVENT_CLOSED = "closed" + EVENT_KEY$b;
1016
+ var CLASS_NAME_FADE$5 = 'fade';
1017
+ var CLASS_NAME_SHOW$8 = 'show';
1018
+
1019
+ /**
1020
+ * Class definition
1021
+ */
1022
+ var Alert = /*#__PURE__*/function (_BaseComponent) {
1023
+ _inheritsLoose(Alert, _BaseComponent);
1024
+ function Alert() {
1025
+ return _BaseComponent.apply(this, arguments) || this;
1026
+ }
1027
+ var _proto = Alert.prototype;
1028
+ // Public
1029
+ _proto.close = function close() {
1030
+ var _this = this;
1031
+ var closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
1032
+ if (closeEvent.defaultPrevented) {
1033
+ return;
1034
+ }
1035
+ this._element.classList.remove(CLASS_NAME_SHOW$8);
1036
+ var isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
1037
+ this._queueCallback(function () {
1038
+ return _this._destroyElement();
1039
+ }, this._element, isAnimated);
1040
+ }
1041
+
1042
+ // Private
1043
+ ;
1044
+ _proto._destroyElement = function _destroyElement() {
1045
+ this._element.remove();
1046
+ EventHandler.trigger(this._element, EVENT_CLOSED);
1047
+ this.dispose();
1048
+ }
1049
+
1050
+ // Static
1051
+ ;
1052
+ Alert.jQueryInterface = function jQueryInterface(config) {
1053
+ return this.each(function () {
1054
+ var data = Alert.getOrCreateInstance(this);
1055
+ if (typeof config !== 'string') {
1056
+ return;
1057
+ }
1058
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
1059
+ throw new TypeError("No method named \"" + config + "\"");
1060
+ }
1061
+ data[config](this);
1062
+ });
1063
+ };
1064
+ _createClass(Alert, null, [{
1065
+ key: "NAME",
1066
+ get:
1067
+ // Getters
1068
+ function get() {
1069
+ return NAME$f;
1070
+ }
1071
+ }]);
1072
+ return Alert;
1073
+ }(BaseComponent);
1074
+ /**
1075
+ * Data API implementation
1076
+ */
1077
+ enableDismissTrigger(Alert, 'close');
1078
+
1079
+ /**
1080
+ * jQuery
1081
+ */
1082
+
1083
+ defineJQueryPlugin(Alert);
1084
+
1085
+ /**
1086
+ * Constants
1087
+ */
1088
+
1089
+ var NAME$e = 'button';
1090
+ var DATA_KEY$9 = 'bs.button';
1091
+ var EVENT_KEY$a = "." + DATA_KEY$9;
1092
+ var DATA_API_KEY$6 = '.data-api';
1093
+ var CLASS_NAME_ACTIVE$3 = 'active';
1094
+ var SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
1095
+ var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$6;
1096
+
1097
+ /**
1098
+ * Class definition
1099
+ */
1100
+ var Button = /*#__PURE__*/function (_BaseComponent) {
1101
+ _inheritsLoose(Button, _BaseComponent);
1102
+ function Button() {
1103
+ return _BaseComponent.apply(this, arguments) || this;
1104
+ }
1105
+ var _proto = Button.prototype;
1106
+ // Public
1107
+ _proto.toggle = function toggle() {
1108
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
1109
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
1110
+ }
1111
+
1112
+ // Static
1113
+ ;
1114
+ Button.jQueryInterface = function jQueryInterface(config) {
1115
+ return this.each(function () {
1116
+ var data = Button.getOrCreateInstance(this);
1117
+ if (config === 'toggle') {
1118
+ data[config]();
1119
+ }
1120
+ });
1121
+ };
1122
+ _createClass(Button, null, [{
1123
+ key: "NAME",
1124
+ get:
1125
+ // Getters
1126
+ function get() {
1127
+ return NAME$e;
1128
+ }
1129
+ }]);
1130
+ return Button;
1131
+ }(BaseComponent);
1132
+ /**
1133
+ * Data API implementation
1134
+ */
1135
+ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, function (event) {
1136
+ event.preventDefault();
1137
+ var button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
1138
+ var data = Button.getOrCreateInstance(button);
1139
+ data.toggle();
1140
+ });
1141
+
1142
+ /**
1143
+ * jQuery
1144
+ */
1145
+
1146
+ defineJQueryPlugin(Button);
1147
+
1148
+ /**
1149
+ * Constants
1150
+ */
1151
+
1152
+ var NAME$d = 'swipe';
1153
+ var EVENT_KEY$9 = '.bs.swipe';
1154
+ var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$9;
1155
+ var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$9;
1156
+ var EVENT_TOUCHEND = "touchend" + EVENT_KEY$9;
1157
+ var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$9;
1158
+ var EVENT_POINTERUP = "pointerup" + EVENT_KEY$9;
1159
+ var POINTER_TYPE_TOUCH = 'touch';
1160
+ var POINTER_TYPE_PEN = 'pen';
1161
+ var CLASS_NAME_POINTER_EVENT = 'pointer-event';
1162
+ var SWIPE_THRESHOLD = 40;
1163
+ var Default$c = {
1164
+ endCallback: null,
1165
+ leftCallback: null,
1166
+ rightCallback: null
1167
+ };
1168
+ var DefaultType$c = {
1169
+ endCallback: '(function|null)',
1170
+ leftCallback: '(function|null)',
1171
+ rightCallback: '(function|null)'
1172
+ };
1173
+
1174
+ /**
1175
+ * Class definition
1176
+ */
1177
+ var Swipe = /*#__PURE__*/function (_Config) {
1178
+ _inheritsLoose(Swipe, _Config);
1179
+ function Swipe(element, config) {
1180
+ var _this;
1181
+ _this = _Config.call(this) || this;
1182
+ _this._element = element;
1183
+ if (!element || !Swipe.isSupported()) {
1184
+ return _assertThisInitialized(_this);
1185
+ }
1186
+ _this._config = _this._getConfig(config);
1187
+ _this._deltaX = 0;
1188
+ _this._supportPointerEvents = Boolean(window.PointerEvent);
1189
+ _this._initEvents();
1190
+ return _this;
1191
+ }
1192
+
1193
+ // Getters
1194
+ var _proto = Swipe.prototype;
1195
+ // Public
1196
+ _proto.dispose = function dispose() {
1197
+ EventHandler.off(this._element, EVENT_KEY$9);
1198
+ }
1199
+
1200
+ // Private
1201
+ ;
1202
+ _proto._start = function _start(event) {
1203
+ if (!this._supportPointerEvents) {
1204
+ this._deltaX = event.touches[0].clientX;
1205
+ return;
1206
+ }
1207
+ if (this._eventIsPointerPenTouch(event)) {
1208
+ this._deltaX = event.clientX;
1209
+ }
1210
+ };
1211
+ _proto._end = function _end(event) {
1212
+ if (this._eventIsPointerPenTouch(event)) {
1213
+ this._deltaX = event.clientX - this._deltaX;
1214
+ }
1215
+ this._handleSwipe();
1216
+ execute(this._config.endCallback);
1217
+ };
1218
+ _proto._move = function _move(event) {
1219
+ this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;
1220
+ };
1221
+ _proto._handleSwipe = function _handleSwipe() {
1222
+ var absDeltaX = Math.abs(this._deltaX);
1223
+ if (absDeltaX <= SWIPE_THRESHOLD) {
1224
+ return;
1225
+ }
1226
+ var direction = absDeltaX / this._deltaX;
1227
+ this._deltaX = 0;
1228
+ if (!direction) {
1229
+ return;
1230
+ }
1231
+ execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);
1232
+ };
1233
+ _proto._initEvents = function _initEvents() {
1234
+ var _this2 = this;
1235
+ if (this._supportPointerEvents) {
1236
+ EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
1237
+ return _this2._start(event);
1238
+ });
1239
+ EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
1240
+ return _this2._end(event);
1241
+ });
1242
+ this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1243
+ } else {
1244
+ EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
1245
+ return _this2._start(event);
1246
+ });
1247
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
1248
+ return _this2._move(event);
1249
+ });
1250
+ EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
1251
+ return _this2._end(event);
1252
+ });
1253
+ }
1254
+ };
1255
+ _proto._eventIsPointerPenTouch = function _eventIsPointerPenTouch(event) {
1256
+ return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
1257
+ }
1258
+
1259
+ // Static
1260
+ ;
1261
+ Swipe.isSupported = function isSupported() {
1262
+ return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1263
+ };
1264
+ _createClass(Swipe, null, [{
1265
+ key: "Default",
1266
+ get: function get() {
1267
+ return Default$c;
1268
+ }
1269
+ }, {
1270
+ key: "DefaultType",
1271
+ get: function get() {
1272
+ return DefaultType$c;
1273
+ }
1274
+ }, {
1275
+ key: "NAME",
1276
+ get: function get() {
1277
+ return NAME$d;
1278
+ }
1279
+ }]);
1280
+ return Swipe;
1281
+ }(Config);
1282
+
1283
+ var _KEY_TO_DIRECTION;
1284
+
1285
+ /**
1286
+ * Constants
1287
+ */
1288
+
1289
+ var NAME$c = 'carousel';
1290
+ var DATA_KEY$8 = 'bs.carousel';
1291
+ var EVENT_KEY$8 = "." + DATA_KEY$8;
1292
+ var DATA_API_KEY$5 = '.data-api';
1293
+ var ARROW_LEFT_KEY$1 = 'ArrowLeft';
1294
+ var ARROW_RIGHT_KEY$1 = 'ArrowRight';
1295
+ var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
1296
+
1297
+ var ORDER_NEXT = 'next';
1298
+ var ORDER_PREV = 'prev';
1299
+ var DIRECTION_LEFT = 'left';
1300
+ var DIRECTION_RIGHT = 'right';
1301
+ var EVENT_SLIDE = "slide" + EVENT_KEY$8;
1302
+ var EVENT_SLID = "slid" + EVENT_KEY$8;
1303
+ var EVENT_KEYDOWN$1 = "keydown" + EVENT_KEY$8;
1304
+ var EVENT_MOUSEENTER$1 = "mouseenter" + EVENT_KEY$8;
1305
+ var EVENT_MOUSELEAVE$1 = "mouseleave" + EVENT_KEY$8;
1306
+ var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8;
1307
+ var EVENT_LOAD_DATA_API$3 = "load" + EVENT_KEY$8 + DATA_API_KEY$5;
1308
+ var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$8 + DATA_API_KEY$5;
1309
+ var CLASS_NAME_CAROUSEL = 'carousel';
1310
+ var CLASS_NAME_ACTIVE$2 = 'active';
1311
+ var CLASS_NAME_SLIDE = 'slide';
1312
+ var CLASS_NAME_END = 'carousel-item-end';
1313
+ var CLASS_NAME_START = 'carousel-item-start';
1314
+ var CLASS_NAME_NEXT = 'carousel-item-next';
1315
+ var CLASS_NAME_PREV = 'carousel-item-prev';
1316
+ var SELECTOR_ACTIVE = '.active';
1317
+ var SELECTOR_ITEM = '.carousel-item';
1318
+ var SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
1319
+ var SELECTOR_ITEM_IMG = '.carousel-item img';
1320
+ var SELECTOR_INDICATORS = '.carousel-indicators';
1321
+ var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1322
+ var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1323
+ var KEY_TO_DIRECTION = (_KEY_TO_DIRECTION = {}, _KEY_TO_DIRECTION[ARROW_LEFT_KEY$1] = DIRECTION_RIGHT, _KEY_TO_DIRECTION[ARROW_RIGHT_KEY$1] = DIRECTION_LEFT, _KEY_TO_DIRECTION);
1324
+ var Default$b = {
1325
+ interval: 5000,
1326
+ keyboard: true,
1327
+ pause: 'hover',
1328
+ ride: false,
1329
+ touch: true,
1330
+ wrap: true
1331
+ };
1332
+ var DefaultType$b = {
1333
+ interval: '(number|boolean)',
1334
+ // TODO:v6 remove boolean support
1335
+ keyboard: 'boolean',
1336
+ pause: '(string|boolean)',
1337
+ ride: '(boolean|string)',
1338
+ touch: 'boolean',
1339
+ wrap: 'boolean'
1340
+ };
1341
+
1342
+ /**
1343
+ * Class definition
1344
+ */
1345
+ var Carousel = /*#__PURE__*/function (_BaseComponent) {
1346
+ _inheritsLoose(Carousel, _BaseComponent);
1347
+ function Carousel(element, config) {
1348
+ var _this;
1349
+ _this = _BaseComponent.call(this, element, config) || this;
1350
+ _this._interval = null;
1351
+ _this._activeElement = null;
1352
+ _this._isSliding = false;
1353
+ _this.touchTimeout = null;
1354
+ _this._swipeHelper = null;
1355
+ _this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, _this._element);
1356
+ _this._addEventListeners();
1357
+ if (_this._config.ride === CLASS_NAME_CAROUSEL) {
1358
+ _this.cycle();
1359
+ }
1360
+ return _this;
1361
+ }
1362
+
1363
+ // Getters
1364
+ var _proto = Carousel.prototype;
1365
+ // Public
1366
+ _proto.next = function next() {
1367
+ this._slide(ORDER_NEXT);
1368
+ };
1369
+ _proto.nextWhenVisible = function nextWhenVisible() {
1370
+ // FIXME TODO use `document.visibilityState`
1371
+ // Don't call next when the page isn't visible
1372
+ // or the carousel or its parent isn't visible
1373
+ if (!document.hidden && isVisible(this._element)) {
1374
+ this.next();
1375
+ }
1376
+ };
1377
+ _proto.prev = function prev() {
1378
+ this._slide(ORDER_PREV);
1379
+ };
1380
+ _proto.pause = function pause() {
1381
+ if (this._isSliding) {
1382
+ triggerTransitionEnd(this._element);
1383
+ }
1384
+ this._clearInterval();
1385
+ };
1386
+ _proto.cycle = function cycle() {
1387
+ var _this2 = this;
1388
+ this._clearInterval();
1389
+ this._updateInterval();
1390
+ this._interval = setInterval(function () {
1391
+ return _this2.nextWhenVisible();
1392
+ }, this._config.interval);
1393
+ };
1394
+ _proto._maybeEnableCycle = function _maybeEnableCycle() {
1395
+ var _this3 = this;
1396
+ if (!this._config.ride) {
1397
+ return;
1398
+ }
1399
+ if (this._isSliding) {
1400
+ EventHandler.one(this._element, EVENT_SLID, function () {
1401
+ return _this3.cycle();
1402
+ });
1403
+ return;
1404
+ }
1405
+ this.cycle();
1406
+ };
1407
+ _proto.to = function to(index) {
1408
+ var _this4 = this;
1409
+ var items = this._getItems();
1410
+ if (index > items.length - 1 || index < 0) {
1411
+ return;
1412
+ }
1413
+ if (this._isSliding) {
1414
+ EventHandler.one(this._element, EVENT_SLID, function () {
1415
+ return _this4.to(index);
1416
+ });
1417
+ return;
1418
+ }
1419
+ var activeIndex = this._getItemIndex(this._getActive());
1420
+ if (activeIndex === index) {
1421
+ return;
1422
+ }
1423
+ var order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1424
+ this._slide(order, items[index]);
1425
+ };
1426
+ _proto.dispose = function dispose() {
1427
+ if (this._swipeHelper) {
1428
+ this._swipeHelper.dispose();
1429
+ }
1430
+ _BaseComponent.prototype.dispose.call(this);
1431
+ }
1432
+
1433
+ // Private
1434
+ ;
1435
+ _proto._configAfterMerge = function _configAfterMerge(config) {
1436
+ config.defaultInterval = config.interval;
1437
+ return config;
1438
+ };
1439
+ _proto._addEventListeners = function _addEventListeners() {
1440
+ var _this5 = this;
1441
+ if (this._config.keyboard) {
1442
+ EventHandler.on(this._element, EVENT_KEYDOWN$1, function (event) {
1443
+ return _this5._keydown(event);
1444
+ });
1445
+ }
1446
+ if (this._config.pause === 'hover') {
1447
+ EventHandler.on(this._element, EVENT_MOUSEENTER$1, function () {
1448
+ return _this5.pause();
1449
+ });
1450
+ EventHandler.on(this._element, EVENT_MOUSELEAVE$1, function () {
1451
+ return _this5._maybeEnableCycle();
1452
+ });
1453
+ }
1454
+ if (this._config.touch && Swipe.isSupported()) {
1455
+ this._addTouchEventListeners();
1456
+ }
1457
+ };
1458
+ _proto._addTouchEventListeners = function _addTouchEventListeners() {
1459
+ var _this6 = this;
1460
+ for (var _iterator = _createForOfIteratorHelperLoose(SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)), _step; !(_step = _iterator()).done;) {
1461
+ var img = _step.value;
1462
+ EventHandler.on(img, EVENT_DRAG_START, function (event) {
1463
+ return event.preventDefault();
1464
+ });
1465
+ }
1466
+ var endCallBack = function endCallBack() {
1467
+ if (_this6._config.pause !== 'hover') {
1468
+ return;
1469
+ }
1470
+
1471
+ // If it's a touch-enabled device, mouseenter/leave are fired as
1472
+ // part of the mouse compatibility events on first tap - the carousel
1473
+ // would stop cycling until user tapped out of it;
1474
+ // here, we listen for touchend, explicitly pause the carousel
1475
+ // (as if it's the second time we tap on it, mouseenter compat event
1476
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
1477
+ // events to fire) we explicitly restart cycling
1478
+
1479
+ _this6.pause();
1480
+ if (_this6.touchTimeout) {
1481
+ clearTimeout(_this6.touchTimeout);
1482
+ }
1483
+ _this6.touchTimeout = setTimeout(function () {
1484
+ return _this6._maybeEnableCycle();
1485
+ }, TOUCHEVENT_COMPAT_WAIT + _this6._config.interval);
1486
+ };
1487
+ var swipeConfig = {
1488
+ leftCallback: function leftCallback() {
1489
+ return _this6._slide(_this6._directionToOrder(DIRECTION_LEFT));
1490
+ },
1491
+ rightCallback: function rightCallback() {
1492
+ return _this6._slide(_this6._directionToOrder(DIRECTION_RIGHT));
1493
+ },
1494
+ endCallback: endCallBack
1495
+ };
1496
+ this._swipeHelper = new Swipe(this._element, swipeConfig);
1497
+ };
1498
+ _proto._keydown = function _keydown(event) {
1499
+ if (/input|textarea/i.test(event.target.tagName)) {
1500
+ return;
1501
+ }
1502
+ var direction = KEY_TO_DIRECTION[event.key];
1503
+ if (direction) {
1504
+ event.preventDefault();
1505
+ this._slide(this._directionToOrder(direction));
1506
+ }
1507
+ };
1508
+ _proto._getItemIndex = function _getItemIndex(element) {
1509
+ return this._getItems().indexOf(element);
1510
+ };
1511
+ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(index) {
1512
+ if (!this._indicatorsElement) {
1513
+ return;
1514
+ }
1515
+ var activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
1516
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
1517
+ activeIndicator.removeAttribute('aria-current');
1518
+ var newActiveIndicator = SelectorEngine.findOne("[data-bs-slide-to=\"" + index + "\"]", this._indicatorsElement);
1519
+ if (newActiveIndicator) {
1520
+ newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);
1521
+ newActiveIndicator.setAttribute('aria-current', 'true');
1522
+ }
1523
+ };
1524
+ _proto._updateInterval = function _updateInterval() {
1525
+ var element = this._activeElement || this._getActive();
1526
+ if (!element) {
1527
+ return;
1528
+ }
1529
+ var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1530
+ this._config.interval = elementInterval || this._config.defaultInterval;
1531
+ };
1532
+ _proto._slide = function _slide(order, element) {
1533
+ var _this7 = this;
1534
+ if (element === void 0) {
1535
+ element = null;
1536
+ }
1537
+ if (this._isSliding) {
1538
+ return;
1539
+ }
1540
+ var activeElement = this._getActive();
1541
+ var isNext = order === ORDER_NEXT;
1542
+ var nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
1543
+ if (nextElement === activeElement) {
1544
+ return;
1545
+ }
1546
+ var nextElementIndex = this._getItemIndex(nextElement);
1547
+ var triggerEvent = function triggerEvent(eventName) {
1548
+ return EventHandler.trigger(_this7._element, eventName, {
1549
+ relatedTarget: nextElement,
1550
+ direction: _this7._orderToDirection(order),
1551
+ from: _this7._getItemIndex(activeElement),
1552
+ to: nextElementIndex
1553
+ });
1554
+ };
1555
+ var slideEvent = triggerEvent(EVENT_SLIDE);
1556
+ if (slideEvent.defaultPrevented) {
1557
+ return;
1558
+ }
1559
+ if (!activeElement || !nextElement) {
1560
+ // Some weirdness is happening, so we bail
1561
+ // TODO: change tests that use empty divs to avoid this check
1562
+ return;
1563
+ }
1564
+ var isCycling = Boolean(this._interval);
1565
+ this.pause();
1566
+ this._isSliding = true;
1567
+ this._setActiveIndicatorElement(nextElementIndex);
1568
+ this._activeElement = nextElement;
1569
+ var directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
1570
+ var orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
1571
+ nextElement.classList.add(orderClassName);
1572
+ reflow(nextElement);
1573
+ activeElement.classList.add(directionalClassName);
1574
+ nextElement.classList.add(directionalClassName);
1575
+ var completeCallBack = function completeCallBack() {
1576
+ nextElement.classList.remove(directionalClassName, orderClassName);
1577
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1578
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1579
+ _this7._isSliding = false;
1580
+ triggerEvent(EVENT_SLID);
1581
+ };
1582
+ this._queueCallback(completeCallBack, activeElement, this._isAnimated());
1583
+ if (isCycling) {
1584
+ this.cycle();
1585
+ }
1586
+ };
1587
+ _proto._isAnimated = function _isAnimated() {
1588
+ return this._element.classList.contains(CLASS_NAME_SLIDE);
1589
+ };
1590
+ _proto._getActive = function _getActive() {
1591
+ return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1592
+ };
1593
+ _proto._getItems = function _getItems() {
1594
+ return SelectorEngine.find(SELECTOR_ITEM, this._element);
1595
+ };
1596
+ _proto._clearInterval = function _clearInterval() {
1597
+ if (this._interval) {
1598
+ clearInterval(this._interval);
1599
+ this._interval = null;
1600
+ }
1601
+ };
1602
+ _proto._directionToOrder = function _directionToOrder(direction) {
1603
+ if (isRTL()) {
1604
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
1605
+ }
1606
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
1607
+ };
1608
+ _proto._orderToDirection = function _orderToDirection(order) {
1609
+ if (isRTL()) {
1610
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
1611
+ }
1612
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
1613
+ }
1614
+
1615
+ // Static
1616
+ ;
1617
+ Carousel.jQueryInterface = function jQueryInterface(config) {
1618
+ return this.each(function () {
1619
+ var data = Carousel.getOrCreateInstance(this, config);
1620
+ if (typeof config === 'number') {
1621
+ data.to(config);
1622
+ return;
1623
+ }
1624
+ if (typeof config === 'string') {
1625
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
1626
+ throw new TypeError("No method named \"" + config + "\"");
1627
+ }
1628
+ data[config]();
1629
+ }
1630
+ });
1631
+ };
1632
+ _createClass(Carousel, null, [{
1633
+ key: "Default",
1634
+ get: function get() {
1635
+ return Default$b;
1636
+ }
1637
+ }, {
1638
+ key: "DefaultType",
1639
+ get: function get() {
1640
+ return DefaultType$b;
1641
+ }
1642
+ }, {
1643
+ key: "NAME",
1644
+ get: function get() {
1645
+ return NAME$c;
1646
+ }
1647
+ }]);
1648
+ return Carousel;
1649
+ }(BaseComponent);
1650
+ /**
1651
+ * Data API implementation
1652
+ */
1653
+ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {
1654
+ var target = SelectorEngine.getElementFromSelector(this);
1655
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1656
+ return;
1657
+ }
1658
+ event.preventDefault();
1659
+ var carousel = Carousel.getOrCreateInstance(target);
1660
+ var slideIndex = this.getAttribute('data-bs-slide-to');
1661
+ if (slideIndex) {
1662
+ carousel.to(slideIndex);
1663
+ carousel._maybeEnableCycle();
1664
+ return;
1665
+ }
1666
+ if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
1667
+ carousel.next();
1668
+ carousel._maybeEnableCycle();
1669
+ return;
1670
+ }
1671
+ carousel.prev();
1672
+ carousel._maybeEnableCycle();
1673
+ });
1674
+ EventHandler.on(window, EVENT_LOAD_DATA_API$3, function () {
1675
+ var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1676
+ for (var _iterator2 = _createForOfIteratorHelperLoose(carousels), _step2; !(_step2 = _iterator2()).done;) {
1677
+ var carousel = _step2.value;
1678
+ Carousel.getOrCreateInstance(carousel);
1679
+ }
1680
+ });
1681
+
1682
+ /**
1683
+ * jQuery
1684
+ */
1685
+
1686
+ defineJQueryPlugin(Carousel);
1687
+
1688
+ /**
1689
+ * Constants
1690
+ */
1691
+
1692
+ var NAME$b = 'collapse';
1693
+ var DATA_KEY$7 = 'bs.collapse';
1694
+ var EVENT_KEY$7 = "." + DATA_KEY$7;
1695
+ var DATA_API_KEY$4 = '.data-api';
1696
+ var EVENT_SHOW$6 = "show" + EVENT_KEY$7;
1697
+ var EVENT_SHOWN$6 = "shown" + EVENT_KEY$7;
1698
+ var EVENT_HIDE$6 = "hide" + EVENT_KEY$7;
1699
+ var EVENT_HIDDEN$6 = "hidden" + EVENT_KEY$7;
1700
+ var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$7 + DATA_API_KEY$4;
1701
+ var CLASS_NAME_SHOW$7 = 'show';
1702
+ var CLASS_NAME_COLLAPSE = 'collapse';
1703
+ var CLASS_NAME_COLLAPSING = 'collapsing';
1704
+ var CLASS_NAME_COLLAPSED = 'collapsed';
1705
+ var CLASS_NAME_DEEPER_CHILDREN = ":scope ." + CLASS_NAME_COLLAPSE + " ." + CLASS_NAME_COLLAPSE;
1706
+ var CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
1707
+ var WIDTH = 'width';
1708
+ var HEIGHT = 'height';
1709
+ var SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
1710
+ var SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
1711
+ var Default$a = {
1712
+ parent: null,
1713
+ toggle: true
1714
+ };
1715
+ var DefaultType$a = {
1716
+ parent: '(null|element)',
1717
+ toggle: 'boolean'
1718
+ };
1719
+
1720
+ /**
1721
+ * Class definition
1722
+ */
1723
+ var Collapse = /*#__PURE__*/function (_BaseComponent) {
1724
+ _inheritsLoose(Collapse, _BaseComponent);
1725
+ function Collapse(element, config) {
1726
+ var _this;
1727
+ _this = _BaseComponent.call(this, element, config) || this;
1728
+ _this._isTransitioning = false;
1729
+ _this._triggerArray = [];
1730
+ var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1731
+ for (var _iterator = _createForOfIteratorHelperLoose(toggleList), _step; !(_step = _iterator()).done;) {
1732
+ var elem = _step.value;
1733
+ var selector = SelectorEngine.getSelectorFromElement(elem);
1734
+ var filterElement = SelectorEngine.find(selector).filter(function (foundElement) {
1735
+ return foundElement === _this._element;
1736
+ });
1737
+ if (selector !== null && filterElement.length) {
1738
+ _this._triggerArray.push(elem);
1739
+ }
1740
+ }
1741
+ _this._initializeChildren();
1742
+ if (!_this._config.parent) {
1743
+ _this._addAriaAndCollapsedClass(_this._triggerArray, _this._isShown());
1744
+ }
1745
+ if (_this._config.toggle) {
1746
+ _this.toggle();
1747
+ }
1748
+ return _this;
1749
+ }
1750
+
1751
+ // Getters
1752
+ var _proto = Collapse.prototype;
1753
+ // Public
1754
+ _proto.toggle = function toggle() {
1755
+ if (this._isShown()) {
1756
+ this.hide();
1757
+ } else {
1758
+ this.show();
1759
+ }
1760
+ };
1761
+ _proto.show = function show() {
1762
+ var _this2 = this;
1763
+ if (this._isTransitioning || this._isShown()) {
1764
+ return;
1765
+ }
1766
+ var activeChildren = [];
1767
+
1768
+ // find active children
1769
+ if (this._config.parent) {
1770
+ activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(function (element) {
1771
+ return element !== _this2._element;
1772
+ }).map(function (element) {
1773
+ return Collapse.getOrCreateInstance(element, {
1774
+ toggle: false
1775
+ });
1776
+ });
1777
+ }
1778
+ if (activeChildren.length && activeChildren[0]._isTransitioning) {
1779
+ return;
1780
+ }
1781
+ var startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);
1782
+ if (startEvent.defaultPrevented) {
1783
+ return;
1784
+ }
1785
+ for (var _iterator2 = _createForOfIteratorHelperLoose(activeChildren), _step2; !(_step2 = _iterator2()).done;) {
1786
+ var activeInstance = _step2.value;
1787
+ activeInstance.hide();
1788
+ }
1789
+ var dimension = this._getDimension();
1790
+ this._element.classList.remove(CLASS_NAME_COLLAPSE);
1791
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1792
+ this._element.style[dimension] = 0;
1793
+ this._addAriaAndCollapsedClass(this._triggerArray, true);
1794
+ this._isTransitioning = true;
1795
+ var complete = function complete() {
1796
+ _this2._isTransitioning = false;
1797
+ _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
1798
+ _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1799
+ _this2._element.style[dimension] = '';
1800
+ EventHandler.trigger(_this2._element, EVENT_SHOWN$6);
1801
+ };
1802
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1803
+ var scrollSize = "scroll" + capitalizedDimension;
1804
+ this._queueCallback(complete, this._element, true);
1805
+ this._element.style[dimension] = this._element[scrollSize] + "px";
1806
+ };
1807
+ _proto.hide = function hide() {
1808
+ var _this3 = this;
1809
+ if (this._isTransitioning || !this._isShown()) {
1810
+ return;
1811
+ }
1812
+ var startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);
1813
+ if (startEvent.defaultPrevented) {
1814
+ return;
1815
+ }
1816
+ var dimension = this._getDimension();
1817
+ this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1818
+ reflow(this._element);
1819
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1820
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1821
+ for (var _iterator3 = _createForOfIteratorHelperLoose(this._triggerArray), _step3; !(_step3 = _iterator3()).done;) {
1822
+ var trigger = _step3.value;
1823
+ var element = SelectorEngine.getElementFromSelector(trigger);
1824
+ if (element && !this._isShown(element)) {
1825
+ this._addAriaAndCollapsedClass([trigger], false);
1826
+ }
1827
+ }
1828
+ this._isTransitioning = true;
1829
+ var complete = function complete() {
1830
+ _this3._isTransitioning = false;
1831
+ _this3._element.classList.remove(CLASS_NAME_COLLAPSING);
1832
+ _this3._element.classList.add(CLASS_NAME_COLLAPSE);
1833
+ EventHandler.trigger(_this3._element, EVENT_HIDDEN$6);
1834
+ };
1835
+ this._element.style[dimension] = '';
1836
+ this._queueCallback(complete, this._element, true);
1837
+ }
1838
+
1839
+ // Private
1840
+ ;
1841
+ _proto._isShown = function _isShown(element) {
1842
+ if (element === void 0) {
1843
+ element = this._element;
1844
+ }
1845
+ return element.classList.contains(CLASS_NAME_SHOW$7);
1846
+ };
1847
+ _proto._configAfterMerge = function _configAfterMerge(config) {
1848
+ config.toggle = Boolean(config.toggle); // Coerce string values
1849
+ config.parent = getElement(config.parent);
1850
+ return config;
1851
+ };
1852
+ _proto._getDimension = function _getDimension() {
1853
+ return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
1854
+ };
1855
+ _proto._initializeChildren = function _initializeChildren() {
1856
+ if (!this._config.parent) {
1857
+ return;
1858
+ }
1859
+ var children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
1860
+ for (var _iterator4 = _createForOfIteratorHelperLoose(children), _step4; !(_step4 = _iterator4()).done;) {
1861
+ var element = _step4.value;
1862
+ var selected = SelectorEngine.getElementFromSelector(element);
1863
+ if (selected) {
1864
+ this._addAriaAndCollapsedClass([element], this._isShown(selected));
1865
+ }
1866
+ }
1867
+ };
1868
+ _proto._getFirstLevelChildren = function _getFirstLevelChildren(selector) {
1869
+ var children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
1870
+ // remove children if greater depth
1871
+ return SelectorEngine.find(selector, this._config.parent).filter(function (element) {
1872
+ return !children.includes(element);
1873
+ });
1874
+ };
1875
+ _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(triggerArray, isOpen) {
1876
+ if (!triggerArray.length) {
1877
+ return;
1878
+ }
1879
+ for (var _iterator5 = _createForOfIteratorHelperLoose(triggerArray), _step5; !(_step5 = _iterator5()).done;) {
1880
+ var element = _step5.value;
1881
+ element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
1882
+ element.setAttribute('aria-expanded', isOpen);
1883
+ }
1884
+ }
1885
+
1886
+ // Static
1887
+ ;
1888
+ Collapse.jQueryInterface = function jQueryInterface(config) {
1889
+ var _config = {};
1890
+ if (typeof config === 'string' && /show|hide/.test(config)) {
1891
+ _config.toggle = false;
1892
+ }
1893
+ return this.each(function () {
1894
+ var data = Collapse.getOrCreateInstance(this, _config);
1895
+ if (typeof config === 'string') {
1896
+ if (typeof data[config] === 'undefined') {
1897
+ throw new TypeError("No method named \"" + config + "\"");
1898
+ }
1899
+ data[config]();
1900
+ }
1901
+ });
1902
+ };
1903
+ _createClass(Collapse, null, [{
1904
+ key: "Default",
1905
+ get: function get() {
1906
+ return Default$a;
1907
+ }
1908
+ }, {
1909
+ key: "DefaultType",
1910
+ get: function get() {
1911
+ return DefaultType$a;
1912
+ }
1913
+ }, {
1914
+ key: "NAME",
1915
+ get: function get() {
1916
+ return NAME$b;
1917
+ }
1918
+ }]);
1919
+ return Collapse;
1920
+ }(BaseComponent);
1921
+ /**
1922
+ * Data API implementation
1923
+ */
1924
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
1925
+ // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1926
+ if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
1927
+ event.preventDefault();
1928
+ }
1929
+ for (var _iterator6 = _createForOfIteratorHelperLoose(SelectorEngine.getMultipleElementsFromSelector(this)), _step6; !(_step6 = _iterator6()).done;) {
1930
+ var element = _step6.value;
1931
+ Collapse.getOrCreateInstance(element, {
1932
+ toggle: false
1933
+ }).toggle();
1934
+ }
1935
+ });
1936
+
1937
+ /**
1938
+ * jQuery
1939
+ */
1940
+
1941
+ defineJQueryPlugin(Collapse);
1942
+
1943
+ /**
1944
+ * Constants
1945
+ */
1946
+
1947
+ var NAME$a = 'dropdown';
1948
+ var DATA_KEY$6 = 'bs.dropdown';
1949
+ var EVENT_KEY$6 = "." + DATA_KEY$6;
1950
+ var DATA_API_KEY$3 = '.data-api';
1951
+ var ESCAPE_KEY$2 = 'Escape';
1952
+ var TAB_KEY$1 = 'Tab';
1953
+ var ARROW_UP_KEY$1 = 'ArrowUp';
1954
+ var ARROW_DOWN_KEY$1 = 'ArrowDown';
1955
+ var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
1956
+
1957
+ var EVENT_HIDE$5 = "hide" + EVENT_KEY$6;
1958
+ var EVENT_HIDDEN$5 = "hidden" + EVENT_KEY$6;
1959
+ var EVENT_SHOW$5 = "show" + EVENT_KEY$6;
1960
+ var EVENT_SHOWN$5 = "shown" + EVENT_KEY$6;
1961
+ var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$6 + DATA_API_KEY$3;
1962
+ var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3;
1963
+ var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3;
1964
+ var CLASS_NAME_SHOW$6 = 'show';
1965
+ var CLASS_NAME_DROPUP = 'dropup';
1966
+ var CLASS_NAME_DROPEND = 'dropend';
1967
+ var CLASS_NAME_DROPSTART = 'dropstart';
1968
+ var CLASS_NAME_DROPUP_CENTER = 'dropup-center';
1969
+ var CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';
1970
+ var SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';
1971
+ var SELECTOR_DATA_TOGGLE_SHOWN = SELECTOR_DATA_TOGGLE$3 + "." + CLASS_NAME_SHOW$6;
1972
+ var SELECTOR_MENU = '.dropdown-menu';
1973
+ var SELECTOR_NAVBAR = '.navbar';
1974
+ var SELECTOR_NAVBAR_NAV = '.navbar-nav';
1975
+ var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1976
+ var PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
1977
+ var PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
1978
+ var PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
1979
+ var PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
1980
+ var PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
1981
+ var PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
1982
+ var PLACEMENT_TOPCENTER = 'top';
1983
+ var PLACEMENT_BOTTOMCENTER = 'bottom';
1984
+ var Default$9 = {
1985
+ autoClose: true,
1986
+ boundary: 'clippingParents',
1987
+ display: 'dynamic',
1988
+ offset: [0, 2],
1989
+ popperConfig: null,
1990
+ reference: 'toggle'
1991
+ };
1992
+ var DefaultType$9 = {
1993
+ autoClose: '(boolean|string)',
1994
+ boundary: '(string|element)',
1995
+ display: 'string',
1996
+ offset: '(array|string|function)',
1997
+ popperConfig: '(null|object|function)',
1998
+ reference: '(string|element|object)'
1999
+ };
2000
+
2001
+ /**
2002
+ * Class definition
2003
+ */
2004
+ var Dropdown = /*#__PURE__*/function (_BaseComponent) {
2005
+ _inheritsLoose(Dropdown, _BaseComponent);
2006
+ function Dropdown(element, config) {
2007
+ var _this;
2008
+ _this = _BaseComponent.call(this, element, config) || this;
2009
+ _this._popper = null;
2010
+ _this._parent = _this._element.parentNode; // dropdown wrapper
2011
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
2012
+ _this._menu = SelectorEngine.next(_this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(_this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, _this._parent);
2013
+ _this._inNavbar = _this._detectNavbar();
2014
+ return _this;
2015
+ }
2016
+
2017
+ // Getters
2018
+ var _proto = Dropdown.prototype;
2019
+ // Public
2020
+ _proto.toggle = function toggle() {
2021
+ return this._isShown() ? this.hide() : this.show();
2022
+ };
2023
+ _proto.show = function show() {
2024
+ if (isDisabled(this._element) || this._isShown()) {
2025
+ return;
2026
+ }
2027
+ var relatedTarget = {
2028
+ relatedTarget: this._element
2029
+ };
2030
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);
2031
+ if (showEvent.defaultPrevented) {
2032
+ return;
2033
+ }
2034
+ this._createPopper();
2035
+
2036
+ // If this is a touch-enabled device we add extra
2037
+ // empty mouseover listeners to the body's immediate children;
2038
+ // only needed because of broken event delegation on iOS
2039
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
2040
+ if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
2041
+ for (var _iterator = _createForOfIteratorHelperLoose((_ref = []).concat.apply(_ref, document.body.children)), _step; !(_step = _iterator()).done;) {
2042
+ var _ref;
2043
+ var element = _step.value;
2044
+ EventHandler.on(element, 'mouseover', noop);
2045
+ }
2046
+ }
2047
+ this._element.focus();
2048
+ this._element.setAttribute('aria-expanded', true);
2049
+ this._menu.classList.add(CLASS_NAME_SHOW$6);
2050
+ this._element.classList.add(CLASS_NAME_SHOW$6);
2051
+ EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);
2052
+ };
2053
+ _proto.hide = function hide() {
2054
+ if (isDisabled(this._element) || !this._isShown()) {
2055
+ return;
2056
+ }
2057
+ var relatedTarget = {
2058
+ relatedTarget: this._element
2059
+ };
2060
+ this._completeHide(relatedTarget);
2061
+ };
2062
+ _proto.dispose = function dispose() {
2063
+ if (this._popper) {
2064
+ this._popper.destroy();
2065
+ }
2066
+ _BaseComponent.prototype.dispose.call(this);
2067
+ };
2068
+ _proto.update = function update() {
2069
+ this._inNavbar = this._detectNavbar();
2070
+ if (this._popper) {
2071
+ this._popper.update();
2072
+ }
2073
+ }
2074
+
2075
+ // Private
2076
+ ;
2077
+ _proto._completeHide = function _completeHide(relatedTarget) {
2078
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);
2079
+ if (hideEvent.defaultPrevented) {
2080
+ return;
2081
+ }
2082
+
2083
+ // If this is a touch-enabled device we remove the extra
2084
+ // empty mouseover listeners we added for iOS support
2085
+ if ('ontouchstart' in document.documentElement) {
2086
+ for (var _iterator2 = _createForOfIteratorHelperLoose((_ref2 = []).concat.apply(_ref2, document.body.children)), _step2; !(_step2 = _iterator2()).done;) {
2087
+ var _ref2;
2088
+ var element = _step2.value;
2089
+ EventHandler.off(element, 'mouseover', noop);
2090
+ }
2091
+ }
2092
+ if (this._popper) {
2093
+ this._popper.destroy();
2094
+ }
2095
+ this._menu.classList.remove(CLASS_NAME_SHOW$6);
2096
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
2097
+ this._element.setAttribute('aria-expanded', 'false');
2098
+ Manipulator.removeDataAttribute(this._menu, 'popper');
2099
+ EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
2100
+ };
2101
+ _proto._getConfig = function _getConfig(config) {
2102
+ config = _BaseComponent.prototype._getConfig.call(this, config);
2103
+ if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
2104
+ // Popper virtual elements require a getBoundingClientRect method
2105
+ throw new TypeError(NAME$a.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.");
2106
+ }
2107
+ return config;
2108
+ };
2109
+ _proto._createPopper = function _createPopper() {
2110
+ if (typeof Popper__namespace === 'undefined') {
2111
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
2112
+ }
2113
+ var referenceElement = this._element;
2114
+ if (this._config.reference === 'parent') {
2115
+ referenceElement = this._parent;
2116
+ } else if (isElement(this._config.reference)) {
2117
+ referenceElement = getElement(this._config.reference);
2118
+ } else if (typeof this._config.reference === 'object') {
2119
+ referenceElement = this._config.reference;
2120
+ }
2121
+ var popperConfig = this._getPopperConfig();
2122
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
2123
+ };
2124
+ _proto._isShown = function _isShown() {
2125
+ return this._menu.classList.contains(CLASS_NAME_SHOW$6);
2126
+ };
2127
+ _proto._getPlacement = function _getPlacement() {
2128
+ var parentDropdown = this._parent;
2129
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
2130
+ return PLACEMENT_RIGHT;
2131
+ }
2132
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
2133
+ return PLACEMENT_LEFT;
2134
+ }
2135
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
2136
+ return PLACEMENT_TOPCENTER;
2137
+ }
2138
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
2139
+ return PLACEMENT_BOTTOMCENTER;
2140
+ }
2141
+
2142
+ // We need to trim the value because custom properties can also include spaces
2143
+ var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
2144
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
2145
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
2146
+ }
2147
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
2148
+ };
2149
+ _proto._detectNavbar = function _detectNavbar() {
2150
+ return this._element.closest(SELECTOR_NAVBAR) !== null;
2151
+ };
2152
+ _proto._getOffset = function _getOffset() {
2153
+ var _this2 = this;
2154
+ var offset = this._config.offset;
2155
+ if (typeof offset === 'string') {
2156
+ return offset.split(',').map(function (value) {
2157
+ return Number.parseInt(value, 10);
2158
+ });
2159
+ }
2160
+ if (typeof offset === 'function') {
2161
+ return function (popperData) {
2162
+ return offset(popperData, _this2._element);
2163
+ };
2164
+ }
2165
+ return offset;
2166
+ };
2167
+ _proto._getPopperConfig = function _getPopperConfig() {
2168
+ var defaultBsPopperConfig = {
2169
+ placement: this._getPlacement(),
2170
+ modifiers: [{
2171
+ name: 'preventOverflow',
2172
+ options: {
2173
+ boundary: this._config.boundary
2174
+ }
2175
+ }, {
2176
+ name: 'offset',
2177
+ options: {
2178
+ offset: this._getOffset()
2179
+ }
2180
+ }]
2181
+ };
2182
+
2183
+ // Disable Popper if we have a static display or Dropdown is in Navbar
2184
+ if (this._inNavbar || this._config.display === 'static') {
2185
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
2186
+ defaultBsPopperConfig.modifiers = [{
2187
+ name: 'applyStyles',
2188
+ enabled: false
2189
+ }];
2190
+ }
2191
+ return _extends({}, defaultBsPopperConfig, execute(this._config.popperConfig, [undefined, defaultBsPopperConfig]));
2192
+ };
2193
+ _proto._selectMenuItem = function _selectMenuItem(_ref3) {
2194
+ var key = _ref3.key,
2195
+ target = _ref3.target;
2196
+ var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(function (element) {
2197
+ return isVisible(element);
2198
+ });
2199
+ if (!items.length) {
2200
+ return;
2201
+ }
2202
+
2203
+ // if target isn't included in items (e.g. when expanding the dropdown)
2204
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
2205
+ getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();
2206
+ }
2207
+
2208
+ // Static
2209
+ ;
2210
+ Dropdown.jQueryInterface = function jQueryInterface(config) {
2211
+ return this.each(function () {
2212
+ var data = Dropdown.getOrCreateInstance(this, config);
2213
+ if (typeof config !== 'string') {
2214
+ return;
2215
+ }
2216
+ if (typeof data[config] === 'undefined') {
2217
+ throw new TypeError("No method named \"" + config + "\"");
2218
+ }
2219
+ data[config]();
2220
+ });
2221
+ };
2222
+ Dropdown.clearMenus = function clearMenus(event) {
2223
+ if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {
2224
+ return;
2225
+ }
2226
+ var openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
2227
+ for (var _iterator3 = _createForOfIteratorHelperLoose(openToggles), _step3; !(_step3 = _iterator3()).done;) {
2228
+ var toggle = _step3.value;
2229
+ var context = Dropdown.getInstance(toggle);
2230
+ if (!context || context._config.autoClose === false) {
2231
+ continue;
2232
+ }
2233
+ var composedPath = event.composedPath();
2234
+ var isMenuTarget = composedPath.includes(context._menu);
2235
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
2236
+ continue;
2237
+ }
2238
+
2239
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
2240
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
2241
+ continue;
2242
+ }
2243
+ var relatedTarget = {
2244
+ relatedTarget: context._element
2245
+ };
2246
+ if (event.type === 'click') {
2247
+ relatedTarget.clickEvent = event;
2248
+ }
2249
+ context._completeHide(relatedTarget);
2250
+ }
2251
+ };
2252
+ Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
2253
+ // If not an UP | DOWN | ESCAPE key => not a dropdown command
2254
+ // If input/textarea && if key is other than ESCAPE => not a dropdown command
2255
+
2256
+ var isInput = /input|textarea/i.test(event.target.tagName);
2257
+ var isEscapeEvent = event.key === ESCAPE_KEY$2;
2258
+ var isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);
2259
+ if (!isUpOrDownEvent && !isEscapeEvent) {
2260
+ return;
2261
+ }
2262
+ if (isInput && !isEscapeEvent) {
2263
+ return;
2264
+ }
2265
+ event.preventDefault();
2266
+
2267
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
2268
+ var getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
2269
+ var instance = Dropdown.getOrCreateInstance(getToggleButton);
2270
+ if (isUpOrDownEvent) {
2271
+ event.stopPropagation();
2272
+ instance.show();
2273
+ instance._selectMenuItem(event);
2274
+ return;
2275
+ }
2276
+ if (instance._isShown()) {
2277
+ // else is escape and we check if it is shown
2278
+ event.stopPropagation();
2279
+ instance.hide();
2280
+ getToggleButton.focus();
2281
+ }
2282
+ };
2283
+ _createClass(Dropdown, null, [{
2284
+ key: "Default",
2285
+ get: function get() {
2286
+ return Default$9;
2287
+ }
2288
+ }, {
2289
+ key: "DefaultType",
2290
+ get: function get() {
2291
+ return DefaultType$9;
2292
+ }
2293
+ }, {
2294
+ key: "NAME",
2295
+ get: function get() {
2296
+ return NAME$a;
2297
+ }
2298
+ }]);
2299
+ return Dropdown;
2300
+ }(BaseComponent);
2301
+ /**
2302
+ * Data API implementation
2303
+ */
2304
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
2305
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2306
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
2307
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2308
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
2309
+ event.preventDefault();
2310
+ Dropdown.getOrCreateInstance(this).toggle();
2311
+ });
2312
+
2313
+ /**
2314
+ * jQuery
2315
+ */
2316
+
2317
+ defineJQueryPlugin(Dropdown);
2318
+
2319
+ /**
2320
+ * Constants
2321
+ */
2322
+
2323
+ var NAME$9 = 'backdrop';
2324
+ var CLASS_NAME_FADE$4 = 'fade';
2325
+ var CLASS_NAME_SHOW$5 = 'show';
2326
+ var EVENT_MOUSEDOWN = "mousedown.bs." + NAME$9;
2327
+ var Default$8 = {
2328
+ className: 'modal-backdrop',
2329
+ clickCallback: null,
2330
+ isAnimated: false,
2331
+ isVisible: true,
2332
+ // if false, we use the backdrop helper without adding any element to the dom
2333
+ rootElement: 'body' // give the choice to place backdrop under different elements
2334
+ };
2335
+
2336
+ var DefaultType$8 = {
2337
+ className: 'string',
2338
+ clickCallback: '(function|null)',
2339
+ isAnimated: 'boolean',
2340
+ isVisible: 'boolean',
2341
+ rootElement: '(element|string)'
2342
+ };
2343
+
2344
+ /**
2345
+ * Class definition
2346
+ */
2347
+ var Backdrop = /*#__PURE__*/function (_Config) {
2348
+ _inheritsLoose(Backdrop, _Config);
2349
+ function Backdrop(config) {
2350
+ var _this;
2351
+ _this = _Config.call(this) || this;
2352
+ _this._config = _this._getConfig(config);
2353
+ _this._isAppended = false;
2354
+ _this._element = null;
2355
+ return _this;
2356
+ }
2357
+
2358
+ // Getters
2359
+ var _proto = Backdrop.prototype;
2360
+ // Public
2361
+ _proto.show = function show(callback) {
2362
+ if (!this._config.isVisible) {
2363
+ execute(callback);
2364
+ return;
2365
+ }
2366
+ this._append();
2367
+ var element = this._getElement();
2368
+ if (this._config.isAnimated) {
2369
+ reflow(element);
2370
+ }
2371
+ element.classList.add(CLASS_NAME_SHOW$5);
2372
+ this._emulateAnimation(function () {
2373
+ execute(callback);
2374
+ });
2375
+ };
2376
+ _proto.hide = function hide(callback) {
2377
+ var _this2 = this;
2378
+ if (!this._config.isVisible) {
2379
+ execute(callback);
2380
+ return;
2381
+ }
2382
+ this._getElement().classList.remove(CLASS_NAME_SHOW$5);
2383
+ this._emulateAnimation(function () {
2384
+ _this2.dispose();
2385
+ execute(callback);
2386
+ });
2387
+ };
2388
+ _proto.dispose = function dispose() {
2389
+ if (!this._isAppended) {
2390
+ return;
2391
+ }
2392
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
2393
+ this._element.remove();
2394
+ this._isAppended = false;
2395
+ }
2396
+
2397
+ // Private
2398
+ ;
2399
+ _proto._getElement = function _getElement() {
2400
+ if (!this._element) {
2401
+ var backdrop = document.createElement('div');
2402
+ backdrop.className = this._config.className;
2403
+ if (this._config.isAnimated) {
2404
+ backdrop.classList.add(CLASS_NAME_FADE$4);
2405
+ }
2406
+ this._element = backdrop;
2407
+ }
2408
+ return this._element;
2409
+ };
2410
+ _proto._configAfterMerge = function _configAfterMerge(config) {
2411
+ // use getElement() with the default "body" to get a fresh Element on each instantiation
2412
+ config.rootElement = getElement(config.rootElement);
2413
+ return config;
2414
+ };
2415
+ _proto._append = function _append() {
2416
+ var _this3 = this;
2417
+ if (this._isAppended) {
2418
+ return;
2419
+ }
2420
+ var element = this._getElement();
2421
+ this._config.rootElement.append(element);
2422
+ EventHandler.on(element, EVENT_MOUSEDOWN, function () {
2423
+ execute(_this3._config.clickCallback);
2424
+ });
2425
+ this._isAppended = true;
2426
+ };
2427
+ _proto._emulateAnimation = function _emulateAnimation(callback) {
2428
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
2429
+ };
2430
+ _createClass(Backdrop, null, [{
2431
+ key: "Default",
2432
+ get: function get() {
2433
+ return Default$8;
2434
+ }
2435
+ }, {
2436
+ key: "DefaultType",
2437
+ get: function get() {
2438
+ return DefaultType$8;
2439
+ }
2440
+ }, {
2441
+ key: "NAME",
2442
+ get: function get() {
2443
+ return NAME$9;
2444
+ }
2445
+ }]);
2446
+ return Backdrop;
2447
+ }(Config);
2448
+
2449
+ /**
2450
+ * Constants
2451
+ */
2452
+
2453
+ var NAME$8 = 'focustrap';
2454
+ var DATA_KEY$5 = 'bs.focustrap';
2455
+ var EVENT_KEY$5 = "." + DATA_KEY$5;
2456
+ var EVENT_FOCUSIN$2 = "focusin" + EVENT_KEY$5;
2457
+ var EVENT_KEYDOWN_TAB = "keydown.tab" + EVENT_KEY$5;
2458
+ var TAB_KEY = 'Tab';
2459
+ var TAB_NAV_FORWARD = 'forward';
2460
+ var TAB_NAV_BACKWARD = 'backward';
2461
+ var Default$7 = {
2462
+ autofocus: true,
2463
+ trapElement: null // The element to trap focus inside of
2464
+ };
2465
+
2466
+ var DefaultType$7 = {
2467
+ autofocus: 'boolean',
2468
+ trapElement: 'element'
2469
+ };
2470
+
2471
+ /**
2472
+ * Class definition
2473
+ */
2474
+ var FocusTrap = /*#__PURE__*/function (_Config) {
2475
+ _inheritsLoose(FocusTrap, _Config);
2476
+ function FocusTrap(config) {
2477
+ var _this;
2478
+ _this = _Config.call(this) || this;
2479
+ _this._config = _this._getConfig(config);
2480
+ _this._isActive = false;
2481
+ _this._lastTabNavDirection = null;
2482
+ return _this;
2483
+ }
2484
+
2485
+ // Getters
2486
+ var _proto = FocusTrap.prototype;
2487
+ // Public
2488
+ _proto.activate = function activate() {
2489
+ var _this2 = this;
2490
+ if (this._isActive) {
2491
+ return;
2492
+ }
2493
+ if (this._config.autofocus) {
2494
+ this._config.trapElement.focus();
2495
+ }
2496
+ EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop
2497
+ EventHandler.on(document, EVENT_FOCUSIN$2, function (event) {
2498
+ return _this2._handleFocusin(event);
2499
+ });
2500
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, function (event) {
2501
+ return _this2._handleKeydown(event);
2502
+ });
2503
+ this._isActive = true;
2504
+ };
2505
+ _proto.deactivate = function deactivate() {
2506
+ if (!this._isActive) {
2507
+ return;
2508
+ }
2509
+ this._isActive = false;
2510
+ EventHandler.off(document, EVENT_KEY$5);
2511
+ }
2512
+
2513
+ // Private
2514
+ ;
2515
+ _proto._handleFocusin = function _handleFocusin(event) {
2516
+ var trapElement = this._config.trapElement;
2517
+ if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {
2518
+ return;
2519
+ }
2520
+ var elements = SelectorEngine.focusableChildren(trapElement);
2521
+ if (elements.length === 0) {
2522
+ trapElement.focus();
2523
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
2524
+ elements[elements.length - 1].focus();
2525
+ } else {
2526
+ elements[0].focus();
2527
+ }
2528
+ };
2529
+ _proto._handleKeydown = function _handleKeydown(event) {
2530
+ if (event.key !== TAB_KEY) {
2531
+ return;
2532
+ }
2533
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
2534
+ };
2535
+ _createClass(FocusTrap, null, [{
2536
+ key: "Default",
2537
+ get: function get() {
2538
+ return Default$7;
2539
+ }
2540
+ }, {
2541
+ key: "DefaultType",
2542
+ get: function get() {
2543
+ return DefaultType$7;
2544
+ }
2545
+ }, {
2546
+ key: "NAME",
2547
+ get: function get() {
2548
+ return NAME$8;
2549
+ }
2550
+ }]);
2551
+ return FocusTrap;
2552
+ }(Config);
2553
+
2554
+ /**
2555
+ * Constants
2556
+ */
2557
+
2558
+ var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2559
+ var SELECTOR_STICKY_CONTENT = '.sticky-top';
2560
+ var PROPERTY_PADDING = 'padding-right';
2561
+ var PROPERTY_MARGIN = 'margin-right';
2562
+
2563
+ /**
2564
+ * Class definition
2565
+ */
2566
+ var ScrollBarHelper = /*#__PURE__*/function () {
2567
+ function ScrollBarHelper() {
2568
+ this._element = document.body;
2569
+ }
2570
+
2571
+ // Public
2572
+ var _proto = ScrollBarHelper.prototype;
2573
+ _proto.getWidth = function getWidth() {
2574
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2575
+ var documentWidth = document.documentElement.clientWidth;
2576
+ return Math.abs(window.innerWidth - documentWidth);
2577
+ };
2578
+ _proto.hide = function hide() {
2579
+ var width = this.getWidth();
2580
+ this._disableOverFlow();
2581
+ // give padding to element to balance the hidden scrollbar width
2582
+ this._setElementAttributes(this._element, PROPERTY_PADDING, function (calculatedValue) {
2583
+ return calculatedValue + width;
2584
+ });
2585
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2586
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, function (calculatedValue) {
2587
+ return calculatedValue + width;
2588
+ });
2589
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, function (calculatedValue) {
2590
+ return calculatedValue - width;
2591
+ });
2592
+ };
2593
+ _proto.reset = function reset() {
2594
+ this._resetElementAttributes(this._element, 'overflow');
2595
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
2596
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
2597
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
2598
+ };
2599
+ _proto.isOverflowing = function isOverflowing() {
2600
+ return this.getWidth() > 0;
2601
+ }
2602
+
2603
+ // Private
2604
+ ;
2605
+ _proto._disableOverFlow = function _disableOverFlow() {
2606
+ this._saveInitialAttribute(this._element, 'overflow');
2607
+ this._element.style.overflow = 'hidden';
2608
+ };
2609
+ _proto._setElementAttributes = function _setElementAttributes(selector, styleProperty, callback) {
2610
+ var _this = this;
2611
+ var scrollbarWidth = this.getWidth();
2612
+ var manipulationCallBack = function manipulationCallBack(element) {
2613
+ if (element !== _this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2614
+ return;
2615
+ }
2616
+ _this._saveInitialAttribute(element, styleProperty);
2617
+ var calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
2618
+ element.style.setProperty(styleProperty, callback(Number.parseFloat(calculatedValue)) + "px");
2619
+ };
2620
+ this._applyManipulationCallback(selector, manipulationCallBack);
2621
+ };
2622
+ _proto._saveInitialAttribute = function _saveInitialAttribute(element, styleProperty) {
2623
+ var actualValue = element.style.getPropertyValue(styleProperty);
2624
+ if (actualValue) {
2625
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
2626
+ }
2627
+ };
2628
+ _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProperty) {
2629
+ var manipulationCallBack = function manipulationCallBack(element) {
2630
+ var value = Manipulator.getDataAttribute(element, styleProperty);
2631
+ // We only want to remove the property if the value is `null`; the value can also be zero
2632
+ if (value === null) {
2633
+ element.style.removeProperty(styleProperty);
2634
+ return;
2635
+ }
2636
+ Manipulator.removeDataAttribute(element, styleProperty);
2637
+ element.style.setProperty(styleProperty, value);
2638
+ };
2639
+ this._applyManipulationCallback(selector, manipulationCallBack);
2640
+ };
2641
+ _proto._applyManipulationCallback = function _applyManipulationCallback(selector, callBack) {
2642
+ if (isElement(selector)) {
2643
+ callBack(selector);
2644
+ return;
2645
+ }
2646
+ for (var _iterator = _createForOfIteratorHelperLoose(SelectorEngine.find(selector, this._element)), _step; !(_step = _iterator()).done;) {
2647
+ var sel = _step.value;
2648
+ callBack(sel);
2649
+ }
2650
+ };
2651
+ return ScrollBarHelper;
2652
+ }();
2653
+
2654
+ /**
2655
+ * Constants
2656
+ */
2657
+
2658
+ var NAME$7 = 'modal';
2659
+ var DATA_KEY$4 = 'bs.modal';
2660
+ var EVENT_KEY$4 = "." + DATA_KEY$4;
2661
+ var DATA_API_KEY$2 = '.data-api';
2662
+ var ESCAPE_KEY$1 = 'Escape';
2663
+ var EVENT_HIDE$4 = "hide" + EVENT_KEY$4;
2664
+ var EVENT_HIDE_PREVENTED$1 = "hidePrevented" + EVENT_KEY$4;
2665
+ var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$4;
2666
+ var EVENT_SHOW$4 = "show" + EVENT_KEY$4;
2667
+ var EVENT_SHOWN$4 = "shown" + EVENT_KEY$4;
2668
+ var EVENT_RESIZE$1 = "resize" + EVENT_KEY$4;
2669
+ var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$4;
2670
+ var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$4;
2671
+ var EVENT_KEYDOWN_DISMISS$1 = "keydown.dismiss" + EVENT_KEY$4;
2672
+ var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$4 + DATA_API_KEY$2;
2673
+ var CLASS_NAME_OPEN = 'modal-open';
2674
+ var CLASS_NAME_FADE$3 = 'fade';
2675
+ var CLASS_NAME_SHOW$4 = 'show';
2676
+ var CLASS_NAME_STATIC = 'modal-static';
2677
+ var OPEN_SELECTOR$1 = '.modal.show';
2678
+ var SELECTOR_DIALOG = '.modal-dialog';
2679
+ var SELECTOR_MODAL_BODY = '.modal-body';
2680
+ var SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
2681
+ var Default$6 = {
2682
+ backdrop: true,
2683
+ focus: true,
2684
+ keyboard: true
2685
+ };
2686
+ var DefaultType$6 = {
2687
+ backdrop: '(boolean|string)',
2688
+ focus: 'boolean',
2689
+ keyboard: 'boolean'
2690
+ };
2691
+
2692
+ /**
2693
+ * Class definition
2694
+ */
2695
+ var Modal = /*#__PURE__*/function (_BaseComponent) {
2696
+ _inheritsLoose(Modal, _BaseComponent);
2697
+ function Modal(element, config) {
2698
+ var _this;
2699
+ _this = _BaseComponent.call(this, element, config) || this;
2700
+ _this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, _this._element);
2701
+ _this._backdrop = _this._initializeBackDrop();
2702
+ _this._focustrap = _this._initializeFocusTrap();
2703
+ _this._isShown = false;
2704
+ _this._isTransitioning = false;
2705
+ _this._scrollBar = new ScrollBarHelper();
2706
+ _this._addEventListeners();
2707
+ return _this;
2708
+ }
2709
+
2710
+ // Getters
2711
+ var _proto = Modal.prototype;
2712
+ // Public
2713
+ _proto.toggle = function toggle(relatedTarget) {
2714
+ return this._isShown ? this.hide() : this.show(relatedTarget);
2715
+ };
2716
+ _proto.show = function show(relatedTarget) {
2717
+ var _this2 = this;
2718
+ if (this._isShown || this._isTransitioning) {
2719
+ return;
2720
+ }
2721
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {
2722
+ relatedTarget: relatedTarget
2723
+ });
2724
+ if (showEvent.defaultPrevented) {
2725
+ return;
2726
+ }
2727
+ this._isShown = true;
2728
+ this._isTransitioning = true;
2729
+ this._scrollBar.hide();
2730
+ document.body.classList.add(CLASS_NAME_OPEN);
2731
+ this._adjustDialog();
2732
+ this._backdrop.show(function () {
2733
+ return _this2._showElement(relatedTarget);
2734
+ });
2735
+ };
2736
+ _proto.hide = function hide() {
2737
+ var _this3 = this;
2738
+ if (!this._isShown || this._isTransitioning) {
2739
+ return;
2740
+ }
2741
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
2742
+ if (hideEvent.defaultPrevented) {
2743
+ return;
2744
+ }
2745
+ this._isShown = false;
2746
+ this._isTransitioning = true;
2747
+ this._focustrap.deactivate();
2748
+ this._element.classList.remove(CLASS_NAME_SHOW$4);
2749
+ this._queueCallback(function () {
2750
+ return _this3._hideModal();
2751
+ }, this._element, this._isAnimated());
2752
+ };
2753
+ _proto.dispose = function dispose() {
2754
+ EventHandler.off(window, EVENT_KEY$4);
2755
+ EventHandler.off(this._dialog, EVENT_KEY$4);
2756
+ this._backdrop.dispose();
2757
+ this._focustrap.deactivate();
2758
+ _BaseComponent.prototype.dispose.call(this);
2759
+ };
2760
+ _proto.handleUpdate = function handleUpdate() {
2761
+ this._adjustDialog();
2762
+ }
2763
+
2764
+ // Private
2765
+ ;
2766
+ _proto._initializeBackDrop = function _initializeBackDrop() {
2767
+ return new Backdrop({
2768
+ isVisible: Boolean(this._config.backdrop),
2769
+ // 'static' option will be translated to true, and booleans will keep their value,
2770
+ isAnimated: this._isAnimated()
2771
+ });
2772
+ };
2773
+ _proto._initializeFocusTrap = function _initializeFocusTrap() {
2774
+ return new FocusTrap({
2775
+ trapElement: this._element
2776
+ });
2777
+ };
2778
+ _proto._showElement = function _showElement(relatedTarget) {
2779
+ var _this4 = this;
2780
+ // try to append dynamic modal
2781
+ if (!document.body.contains(this._element)) {
2782
+ document.body.append(this._element);
2783
+ }
2784
+ this._element.style.display = 'block';
2785
+ this._element.removeAttribute('aria-hidden');
2786
+ this._element.setAttribute('aria-modal', true);
2787
+ this._element.setAttribute('role', 'dialog');
2788
+ this._element.scrollTop = 0;
2789
+ var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2790
+ if (modalBody) {
2791
+ modalBody.scrollTop = 0;
2792
+ }
2793
+ reflow(this._element);
2794
+ this._element.classList.add(CLASS_NAME_SHOW$4);
2795
+ var transitionComplete = function transitionComplete() {
2796
+ if (_this4._config.focus) {
2797
+ _this4._focustrap.activate();
2798
+ }
2799
+ _this4._isTransitioning = false;
2800
+ EventHandler.trigger(_this4._element, EVENT_SHOWN$4, {
2801
+ relatedTarget: relatedTarget
2802
+ });
2803
+ };
2804
+ this._queueCallback(transitionComplete, this._dialog, this._isAnimated());
2805
+ };
2806
+ _proto._addEventListeners = function _addEventListeners() {
2807
+ var _this5 = this;
2808
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, function (event) {
2809
+ if (event.key !== ESCAPE_KEY$1) {
2810
+ return;
2811
+ }
2812
+ if (_this5._config.keyboard) {
2813
+ _this5.hide();
2814
+ return;
2815
+ }
2816
+ _this5._triggerBackdropTransition();
2817
+ });
2818
+ EventHandler.on(window, EVENT_RESIZE$1, function () {
2819
+ if (_this5._isShown && !_this5._isTransitioning) {
2820
+ _this5._adjustDialog();
2821
+ }
2822
+ });
2823
+ EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, function (event) {
2824
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
2825
+ EventHandler.one(_this5._element, EVENT_CLICK_DISMISS, function (event2) {
2826
+ if (_this5._element !== event.target || _this5._element !== event2.target) {
2827
+ return;
2828
+ }
2829
+ if (_this5._config.backdrop === 'static') {
2830
+ _this5._triggerBackdropTransition();
2831
+ return;
2832
+ }
2833
+ if (_this5._config.backdrop) {
2834
+ _this5.hide();
2835
+ }
2836
+ });
2837
+ });
2838
+ };
2839
+ _proto._hideModal = function _hideModal() {
2840
+ var _this6 = this;
2841
+ this._element.style.display = 'none';
2842
+ this._element.setAttribute('aria-hidden', true);
2843
+ this._element.removeAttribute('aria-modal');
2844
+ this._element.removeAttribute('role');
2845
+ this._isTransitioning = false;
2846
+ this._backdrop.hide(function () {
2847
+ document.body.classList.remove(CLASS_NAME_OPEN);
2848
+ _this6._resetAdjustments();
2849
+ _this6._scrollBar.reset();
2850
+ EventHandler.trigger(_this6._element, EVENT_HIDDEN$4);
2851
+ });
2852
+ };
2853
+ _proto._isAnimated = function _isAnimated() {
2854
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
2855
+ };
2856
+ _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
2857
+ var _this7 = this;
2858
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);
2859
+ if (hideEvent.defaultPrevented) {
2860
+ return;
2861
+ }
2862
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2863
+ var initialOverflowY = this._element.style.overflowY;
2864
+ // return if the following background transition hasn't yet completed
2865
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
2866
+ return;
2867
+ }
2868
+ if (!isModalOverflowing) {
2869
+ this._element.style.overflowY = 'hidden';
2870
+ }
2871
+ this._element.classList.add(CLASS_NAME_STATIC);
2872
+ this._queueCallback(function () {
2873
+ _this7._element.classList.remove(CLASS_NAME_STATIC);
2874
+ _this7._queueCallback(function () {
2875
+ _this7._element.style.overflowY = initialOverflowY;
2876
+ }, _this7._dialog);
2877
+ }, this._dialog);
2878
+ this._element.focus();
2879
+ }
2880
+
2881
+ /**
2882
+ * The following methods are used to handle overflowing modals
2883
+ */;
2884
+ _proto._adjustDialog = function _adjustDialog() {
2885
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2886
+ var scrollbarWidth = this._scrollBar.getWidth();
2887
+ var isBodyOverflowing = scrollbarWidth > 0;
2888
+ if (isBodyOverflowing && !isModalOverflowing) {
2889
+ var property = isRTL() ? 'paddingLeft' : 'paddingRight';
2890
+ this._element.style[property] = scrollbarWidth + "px";
2891
+ }
2892
+ if (!isBodyOverflowing && isModalOverflowing) {
2893
+ var _property = isRTL() ? 'paddingRight' : 'paddingLeft';
2894
+ this._element.style[_property] = scrollbarWidth + "px";
2895
+ }
2896
+ };
2897
+ _proto._resetAdjustments = function _resetAdjustments() {
2898
+ this._element.style.paddingLeft = '';
2899
+ this._element.style.paddingRight = '';
2900
+ }
2901
+
2902
+ // Static
2903
+ ;
2904
+ Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
2905
+ return this.each(function () {
2906
+ var data = Modal.getOrCreateInstance(this, config);
2907
+ if (typeof config !== 'string') {
2908
+ return;
2909
+ }
2910
+ if (typeof data[config] === 'undefined') {
2911
+ throw new TypeError("No method named \"" + config + "\"");
2912
+ }
2913
+ data[config](relatedTarget);
2914
+ });
2915
+ };
2916
+ _createClass(Modal, null, [{
2917
+ key: "Default",
2918
+ get: function get() {
2919
+ return Default$6;
2920
+ }
2921
+ }, {
2922
+ key: "DefaultType",
2923
+ get: function get() {
2924
+ return DefaultType$6;
2925
+ }
2926
+ }, {
2927
+ key: "NAME",
2928
+ get: function get() {
2929
+ return NAME$7;
2930
+ }
2931
+ }]);
2932
+ return Modal;
2933
+ }(BaseComponent);
2934
+ /**
2935
+ * Data API implementation
2936
+ */
2937
+ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
2938
+ var _this8 = this;
2939
+ var target = SelectorEngine.getElementFromSelector(this);
2940
+ if (['A', 'AREA'].includes(this.tagName)) {
2941
+ event.preventDefault();
2942
+ }
2943
+ EventHandler.one(target, EVENT_SHOW$4, function (showEvent) {
2944
+ if (showEvent.defaultPrevented) {
2945
+ // only register focus restorer if modal will actually get shown
2946
+ return;
2947
+ }
2948
+ EventHandler.one(target, EVENT_HIDDEN$4, function () {
2949
+ if (isVisible(_this8)) {
2950
+ _this8.focus();
2951
+ }
2952
+ });
2953
+ });
2954
+
2955
+ // avoid conflict when clicking modal toggler while another one is open
2956
+ var alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
2957
+ if (alreadyOpen) {
2958
+ Modal.getInstance(alreadyOpen).hide();
2959
+ }
2960
+ var data = Modal.getOrCreateInstance(target);
2961
+ data.toggle(this);
2962
+ });
2963
+ enableDismissTrigger(Modal);
2964
+
2965
+ /**
2966
+ * jQuery
2967
+ */
2968
+
2969
+ defineJQueryPlugin(Modal);
2970
+
2971
+ /**
2972
+ * Constants
2973
+ */
2974
+
2975
+ var NAME$6 = 'offcanvas';
2976
+ var DATA_KEY$3 = 'bs.offcanvas';
2977
+ var EVENT_KEY$3 = "." + DATA_KEY$3;
2978
+ var DATA_API_KEY$1 = '.data-api';
2979
+ var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$3 + DATA_API_KEY$1;
2980
+ var ESCAPE_KEY = 'Escape';
2981
+ var CLASS_NAME_SHOW$3 = 'show';
2982
+ var CLASS_NAME_SHOWING$1 = 'showing';
2983
+ var CLASS_NAME_HIDING = 'hiding';
2984
+ var CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
2985
+ var OPEN_SELECTOR = '.offcanvas.show';
2986
+ var EVENT_SHOW$3 = "show" + EVENT_KEY$3;
2987
+ var EVENT_SHOWN$3 = "shown" + EVENT_KEY$3;
2988
+ var EVENT_HIDE$3 = "hide" + EVENT_KEY$3;
2989
+ var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$3;
2990
+ var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$3;
2991
+ var EVENT_RESIZE = "resize" + EVENT_KEY$3;
2992
+ var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$3 + DATA_API_KEY$1;
2993
+ var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$3;
2994
+ var SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
2995
+ var Default$5 = {
2996
+ backdrop: true,
2997
+ keyboard: true,
2998
+ scroll: false
2999
+ };
3000
+ var DefaultType$5 = {
3001
+ backdrop: '(boolean|string)',
3002
+ keyboard: 'boolean',
3003
+ scroll: 'boolean'
3004
+ };
3005
+
3006
+ /**
3007
+ * Class definition
3008
+ */
3009
+ var Offcanvas = /*#__PURE__*/function (_BaseComponent) {
3010
+ _inheritsLoose(Offcanvas, _BaseComponent);
3011
+ function Offcanvas(element, config) {
3012
+ var _this;
3013
+ _this = _BaseComponent.call(this, element, config) || this;
3014
+ _this._isShown = false;
3015
+ _this._backdrop = _this._initializeBackDrop();
3016
+ _this._focustrap = _this._initializeFocusTrap();
3017
+ _this._addEventListeners();
3018
+ return _this;
3019
+ }
3020
+
3021
+ // Getters
3022
+ var _proto = Offcanvas.prototype;
3023
+ // Public
3024
+ _proto.toggle = function toggle(relatedTarget) {
3025
+ return this._isShown ? this.hide() : this.show(relatedTarget);
3026
+ };
3027
+ _proto.show = function show(relatedTarget) {
3028
+ var _this2 = this;
3029
+ if (this._isShown) {
3030
+ return;
3031
+ }
3032
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
3033
+ relatedTarget: relatedTarget
3034
+ });
3035
+ if (showEvent.defaultPrevented) {
3036
+ return;
3037
+ }
3038
+ this._isShown = true;
3039
+ this._backdrop.show();
3040
+ if (!this._config.scroll) {
3041
+ new ScrollBarHelper().hide();
3042
+ }
3043
+ this._element.setAttribute('aria-modal', true);
3044
+ this._element.setAttribute('role', 'dialog');
3045
+ this._element.classList.add(CLASS_NAME_SHOWING$1);
3046
+ var completeCallBack = function completeCallBack() {
3047
+ if (!_this2._config.scroll || _this2._config.backdrop) {
3048
+ _this2._focustrap.activate();
3049
+ }
3050
+ _this2._element.classList.add(CLASS_NAME_SHOW$3);
3051
+ _this2._element.classList.remove(CLASS_NAME_SHOWING$1);
3052
+ EventHandler.trigger(_this2._element, EVENT_SHOWN$3, {
3053
+ relatedTarget: relatedTarget
3054
+ });
3055
+ };
3056
+ this._queueCallback(completeCallBack, this._element, true);
3057
+ };
3058
+ _proto.hide = function hide() {
3059
+ var _this3 = this;
3060
+ if (!this._isShown) {
3061
+ return;
3062
+ }
3063
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
3064
+ if (hideEvent.defaultPrevented) {
3065
+ return;
3066
+ }
3067
+ this._focustrap.deactivate();
3068
+ this._element.blur();
3069
+ this._isShown = false;
3070
+ this._element.classList.add(CLASS_NAME_HIDING);
3071
+ this._backdrop.hide();
3072
+ var completeCallback = function completeCallback() {
3073
+ _this3._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);
3074
+ _this3._element.removeAttribute('aria-modal');
3075
+ _this3._element.removeAttribute('role');
3076
+ if (!_this3._config.scroll) {
3077
+ new ScrollBarHelper().reset();
3078
+ }
3079
+ EventHandler.trigger(_this3._element, EVENT_HIDDEN$3);
3080
+ };
3081
+ this._queueCallback(completeCallback, this._element, true);
3082
+ };
3083
+ _proto.dispose = function dispose() {
3084
+ this._backdrop.dispose();
3085
+ this._focustrap.deactivate();
3086
+ _BaseComponent.prototype.dispose.call(this);
3087
+ }
3088
+
3089
+ // Private
3090
+ ;
3091
+ _proto._initializeBackDrop = function _initializeBackDrop() {
3092
+ var _this4 = this;
3093
+ var clickCallback = function clickCallback() {
3094
+ if (_this4._config.backdrop === 'static') {
3095
+ EventHandler.trigger(_this4._element, EVENT_HIDE_PREVENTED);
3096
+ return;
3097
+ }
3098
+ _this4.hide();
3099
+ };
3100
+
3101
+ // 'static' option will be translated to true, and booleans will keep their value
3102
+ var isVisible = Boolean(this._config.backdrop);
3103
+ return new Backdrop({
3104
+ className: CLASS_NAME_BACKDROP,
3105
+ isVisible: isVisible,
3106
+ isAnimated: true,
3107
+ rootElement: this._element.parentNode,
3108
+ clickCallback: isVisible ? clickCallback : null
3109
+ });
3110
+ };
3111
+ _proto._initializeFocusTrap = function _initializeFocusTrap() {
3112
+ return new FocusTrap({
3113
+ trapElement: this._element
3114
+ });
3115
+ };
3116
+ _proto._addEventListeners = function _addEventListeners() {
3117
+ var _this5 = this;
3118
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
3119
+ if (event.key !== ESCAPE_KEY) {
3120
+ return;
3121
+ }
3122
+ if (_this5._config.keyboard) {
3123
+ _this5.hide();
3124
+ return;
3125
+ }
3126
+ EventHandler.trigger(_this5._element, EVENT_HIDE_PREVENTED);
3127
+ });
3128
+ }
3129
+
3130
+ // Static
3131
+ ;
3132
+ Offcanvas.jQueryInterface = function jQueryInterface(config) {
3133
+ return this.each(function () {
3134
+ var data = Offcanvas.getOrCreateInstance(this, config);
3135
+ if (typeof config !== 'string') {
3136
+ return;
3137
+ }
3138
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
3139
+ throw new TypeError("No method named \"" + config + "\"");
3140
+ }
3141
+ data[config](this);
3142
+ });
3143
+ };
3144
+ _createClass(Offcanvas, null, [{
3145
+ key: "Default",
3146
+ get: function get() {
3147
+ return Default$5;
3148
+ }
3149
+ }, {
3150
+ key: "DefaultType",
3151
+ get: function get() {
3152
+ return DefaultType$5;
3153
+ }
3154
+ }, {
3155
+ key: "NAME",
3156
+ get: function get() {
3157
+ return NAME$6;
3158
+ }
3159
+ }]);
3160
+ return Offcanvas;
3161
+ }(BaseComponent);
3162
+ /**
3163
+ * Data API implementation
3164
+ */
3165
+ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
3166
+ var _this6 = this;
3167
+ var target = SelectorEngine.getElementFromSelector(this);
3168
+ if (['A', 'AREA'].includes(this.tagName)) {
3169
+ event.preventDefault();
3170
+ }
3171
+ if (isDisabled(this)) {
3172
+ return;
3173
+ }
3174
+ EventHandler.one(target, EVENT_HIDDEN$3, function () {
3175
+ // focus on trigger when it is closed
3176
+ if (isVisible(_this6)) {
3177
+ _this6.focus();
3178
+ }
3179
+ });
3180
+
3181
+ // avoid conflict when clicking a toggler of an offcanvas, while another is open
3182
+ var alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
3183
+ if (alreadyOpen && alreadyOpen !== target) {
3184
+ Offcanvas.getInstance(alreadyOpen).hide();
3185
+ }
3186
+ var data = Offcanvas.getOrCreateInstance(target);
3187
+ data.toggle(this);
3188
+ });
3189
+ EventHandler.on(window, EVENT_LOAD_DATA_API$2, function () {
3190
+ for (var _iterator = _createForOfIteratorHelperLoose(SelectorEngine.find(OPEN_SELECTOR)), _step; !(_step = _iterator()).done;) {
3191
+ var selector = _step.value;
3192
+ Offcanvas.getOrCreateInstance(selector).show();
3193
+ }
3194
+ });
3195
+ EventHandler.on(window, EVENT_RESIZE, function () {
3196
+ for (var _iterator2 = _createForOfIteratorHelperLoose(SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')), _step2; !(_step2 = _iterator2()).done;) {
3197
+ var element = _step2.value;
3198
+ if (getComputedStyle(element).position !== 'fixed') {
3199
+ Offcanvas.getOrCreateInstance(element).hide();
3200
+ }
3201
+ }
3202
+ });
3203
+ enableDismissTrigger(Offcanvas);
3204
+
3205
+ /**
3206
+ * jQuery
3207
+ */
3208
+
3209
+ defineJQueryPlugin(Offcanvas);
3210
+
3211
+ /**
3212
+ * --------------------------------------------------------------------------
3213
+ * Bootstrap util/sanitizer.js
3214
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3215
+ * --------------------------------------------------------------------------
3216
+ */
3217
+
3218
+ // js-docs-start allow-list
3219
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3220
+ var DefaultAllowlist = {
3221
+ // Global attributes allowed on any supplied element below.
3222
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
3223
+ a: ['target', 'href', 'title', 'rel'],
3224
+ area: [],
3225
+ b: [],
3226
+ br: [],
3227
+ col: [],
3228
+ code: [],
3229
+ dd: [],
3230
+ div: [],
3231
+ dl: [],
3232
+ dt: [],
3233
+ em: [],
3234
+ hr: [],
3235
+ h1: [],
3236
+ h2: [],
3237
+ h3: [],
3238
+ h4: [],
3239
+ h5: [],
3240
+ h6: [],
3241
+ i: [],
3242
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
3243
+ li: [],
3244
+ ol: [],
3245
+ p: [],
3246
+ pre: [],
3247
+ s: [],
3248
+ small: [],
3249
+ span: [],
3250
+ sub: [],
3251
+ sup: [],
3252
+ strong: [],
3253
+ u: [],
3254
+ ul: []
3255
+ };
3256
+ // js-docs-end allow-list
3257
+
3258
+ var uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3259
+
3260
+ /**
3261
+ * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
3262
+ * contexts.
3263
+ *
3264
+ * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
3265
+ */
3266
+ var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
3267
+ var allowedAttribute = function allowedAttribute(attribute, allowedAttributeList) {
3268
+ var attributeName = attribute.nodeName.toLowerCase();
3269
+ if (allowedAttributeList.includes(attributeName)) {
3270
+ if (uriAttributes.has(attributeName)) {
3271
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
3272
+ }
3273
+ return true;
3274
+ }
3275
+
3276
+ // Check if a regular expression validates the attribute.
3277
+ return allowedAttributeList.filter(function (attributeRegex) {
3278
+ return attributeRegex instanceof RegExp;
3279
+ }).some(function (regex) {
3280
+ return regex.test(attributeName);
3281
+ });
3282
+ };
3283
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
3284
+ var _ref;
3285
+ if (!unsafeHtml.length) {
3286
+ return unsafeHtml;
3287
+ }
3288
+ if (sanitizeFunction && typeof sanitizeFunction === 'function') {
3289
+ return sanitizeFunction(unsafeHtml);
3290
+ }
3291
+ var domParser = new window.DOMParser();
3292
+ var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3293
+ var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
3294
+ for (var _iterator = _createForOfIteratorHelperLoose(elements), _step; !(_step = _iterator()).done;) {
3295
+ var _ref2;
3296
+ var element = _step.value;
3297
+ var elementName = element.nodeName.toLowerCase();
3298
+ if (!Object.keys(allowList).includes(elementName)) {
3299
+ element.remove();
3300
+ continue;
3301
+ }
3302
+ var attributeList = (_ref2 = []).concat.apply(_ref2, element.attributes);
3303
+ var allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
3304
+ for (var _iterator2 = _createForOfIteratorHelperLoose(attributeList), _step2; !(_step2 = _iterator2()).done;) {
3305
+ var attribute = _step2.value;
3306
+ if (!allowedAttribute(attribute, allowedAttributes)) {
3307
+ element.removeAttribute(attribute.nodeName);
3308
+ }
3309
+ }
3310
+ }
3311
+ return createdDocument.body.innerHTML;
3312
+ }
3313
+
3314
+ /**
3315
+ * Constants
3316
+ */
3317
+
3318
+ var NAME$5 = 'TemplateFactory';
3319
+ var Default$4 = {
3320
+ allowList: DefaultAllowlist,
3321
+ content: {},
3322
+ // { selector : text , selector2 : text2 , }
3323
+ extraClass: '',
3324
+ html: false,
3325
+ sanitize: true,
3326
+ sanitizeFn: null,
3327
+ template: '<div></div>'
3328
+ };
3329
+ var DefaultType$4 = {
3330
+ allowList: 'object',
3331
+ content: 'object',
3332
+ extraClass: '(string|function)',
3333
+ html: 'boolean',
3334
+ sanitize: 'boolean',
3335
+ sanitizeFn: '(null|function)',
3336
+ template: 'string'
3337
+ };
3338
+ var DefaultContentType = {
3339
+ entry: '(string|element|function|null)',
3340
+ selector: '(string|element)'
3341
+ };
3342
+
3343
+ /**
3344
+ * Class definition
3345
+ */
3346
+ var TemplateFactory = /*#__PURE__*/function (_Config) {
3347
+ _inheritsLoose(TemplateFactory, _Config);
3348
+ function TemplateFactory(config) {
3349
+ var _this;
3350
+ _this = _Config.call(this) || this;
3351
+ _this._config = _this._getConfig(config);
3352
+ return _this;
3353
+ }
3354
+
3355
+ // Getters
3356
+ var _proto = TemplateFactory.prototype;
3357
+ // Public
3358
+ _proto.getContent = function getContent() {
3359
+ var _this2 = this;
3360
+ return Object.values(this._config.content).map(function (config) {
3361
+ return _this2._resolvePossibleFunction(config);
3362
+ }).filter(Boolean);
3363
+ };
3364
+ _proto.hasContent = function hasContent() {
3365
+ return this.getContent().length > 0;
3366
+ };
3367
+ _proto.changeContent = function changeContent(content) {
3368
+ this._checkContent(content);
3369
+ this._config.content = _extends({}, this._config.content, content);
3370
+ return this;
3371
+ };
3372
+ _proto.toHtml = function toHtml() {
3373
+ var templateWrapper = document.createElement('div');
3374
+ templateWrapper.innerHTML = this._maybeSanitize(this._config.template);
3375
+ for (var _i = 0, _Object$entries = Object.entries(this._config.content); _i < _Object$entries.length; _i++) {
3376
+ var _Object$entries$_i = _Object$entries[_i],
3377
+ selector = _Object$entries$_i[0],
3378
+ text = _Object$entries$_i[1];
3379
+ this._setContent(templateWrapper, text, selector);
3380
+ }
3381
+ var template = templateWrapper.children[0];
3382
+ var extraClass = this._resolvePossibleFunction(this._config.extraClass);
3383
+ if (extraClass) {
3384
+ var _template$classList;
3385
+ (_template$classList = template.classList).add.apply(_template$classList, extraClass.split(' '));
3386
+ }
3387
+ return template;
3388
+ }
3389
+
3390
+ // Private
3391
+ ;
3392
+ _proto._typeCheckConfig = function _typeCheckConfig(config) {
3393
+ _Config.prototype._typeCheckConfig.call(this, config);
3394
+ this._checkContent(config.content);
3395
+ };
3396
+ _proto._checkContent = function _checkContent(arg) {
3397
+ for (var _i2 = 0, _Object$entries2 = Object.entries(arg); _i2 < _Object$entries2.length; _i2++) {
3398
+ var _Object$entries2$_i = _Object$entries2[_i2],
3399
+ selector = _Object$entries2$_i[0],
3400
+ content = _Object$entries2$_i[1];
3401
+ _Config.prototype._typeCheckConfig.call(this, {
3402
+ selector: selector,
3403
+ entry: content
3404
+ }, DefaultContentType);
3405
+ }
3406
+ };
3407
+ _proto._setContent = function _setContent(template, content, selector) {
3408
+ var templateElement = SelectorEngine.findOne(selector, template);
3409
+ if (!templateElement) {
3410
+ return;
3411
+ }
3412
+ content = this._resolvePossibleFunction(content);
3413
+ if (!content) {
3414
+ templateElement.remove();
3415
+ return;
3416
+ }
3417
+ if (isElement(content)) {
3418
+ this._putElementInTemplate(getElement(content), templateElement);
3419
+ return;
3420
+ }
3421
+ if (this._config.html) {
3422
+ templateElement.innerHTML = this._maybeSanitize(content);
3423
+ return;
3424
+ }
3425
+ templateElement.textContent = content;
3426
+ };
3427
+ _proto._maybeSanitize = function _maybeSanitize(arg) {
3428
+ return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
3429
+ };
3430
+ _proto._resolvePossibleFunction = function _resolvePossibleFunction(arg) {
3431
+ return execute(arg, [undefined, this]);
3432
+ };
3433
+ _proto._putElementInTemplate = function _putElementInTemplate(element, templateElement) {
3434
+ if (this._config.html) {
3435
+ templateElement.innerHTML = '';
3436
+ templateElement.append(element);
3437
+ return;
3438
+ }
3439
+ templateElement.textContent = element.textContent;
3440
+ };
3441
+ _createClass(TemplateFactory, null, [{
3442
+ key: "Default",
3443
+ get: function get() {
3444
+ return Default$4;
3445
+ }
3446
+ }, {
3447
+ key: "DefaultType",
3448
+ get: function get() {
3449
+ return DefaultType$4;
3450
+ }
3451
+ }, {
3452
+ key: "NAME",
3453
+ get: function get() {
3454
+ return NAME$5;
3455
+ }
3456
+ }]);
3457
+ return TemplateFactory;
3458
+ }(Config);
3459
+
3460
+ /**
3461
+ * Constants
3462
+ */
3463
+
3464
+ var NAME$4 = 'tooltip';
3465
+ var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3466
+ var CLASS_NAME_FADE$2 = 'fade';
3467
+ var CLASS_NAME_MODAL = 'modal';
3468
+ var CLASS_NAME_SHOW$2 = 'show';
3469
+ var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3470
+ var SELECTOR_MODAL = "." + CLASS_NAME_MODAL;
3471
+ var EVENT_MODAL_HIDE = 'hide.bs.modal';
3472
+ var TRIGGER_HOVER = 'hover';
3473
+ var TRIGGER_FOCUS = 'focus';
3474
+ var TRIGGER_CLICK = 'click';
3475
+ var TRIGGER_MANUAL = 'manual';
3476
+ var EVENT_HIDE$2 = 'hide';
3477
+ var EVENT_HIDDEN$2 = 'hidden';
3478
+ var EVENT_SHOW$2 = 'show';
3479
+ var EVENT_SHOWN$2 = 'shown';
3480
+ var EVENT_INSERTED = 'inserted';
3481
+ var EVENT_CLICK$1 = 'click';
3482
+ var EVENT_FOCUSIN$1 = 'focusin';
3483
+ var EVENT_FOCUSOUT$1 = 'focusout';
3484
+ var EVENT_MOUSEENTER = 'mouseenter';
3485
+ var EVENT_MOUSELEAVE = 'mouseleave';
3486
+ var AttachmentMap = {
3487
+ AUTO: 'auto',
3488
+ TOP: 'top',
3489
+ RIGHT: isRTL() ? 'left' : 'right',
3490
+ BOTTOM: 'bottom',
3491
+ LEFT: isRTL() ? 'right' : 'left'
3492
+ };
3493
+ var Default$3 = {
3494
+ allowList: DefaultAllowlist,
3495
+ animation: true,
3496
+ boundary: 'clippingParents',
3497
+ container: false,
3498
+ customClass: '',
3499
+ delay: 0,
3500
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
3501
+ html: false,
3502
+ offset: [0, 6],
3503
+ placement: 'top',
3504
+ popperConfig: null,
3505
+ sanitize: true,
3506
+ sanitizeFn: null,
3507
+ selector: false,
3508
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3509
+ title: '',
3510
+ trigger: 'hover focus'
3511
+ };
3512
+ var DefaultType$3 = {
3513
+ allowList: 'object',
3514
+ animation: 'boolean',
3515
+ boundary: '(string|element)',
3516
+ container: '(string|element|boolean)',
3517
+ customClass: '(string|function)',
3518
+ delay: '(number|object)',
3519
+ fallbackPlacements: 'array',
3520
+ html: 'boolean',
3521
+ offset: '(array|string|function)',
3522
+ placement: '(string|function)',
3523
+ popperConfig: '(null|object|function)',
3524
+ sanitize: 'boolean',
3525
+ sanitizeFn: '(null|function)',
3526
+ selector: '(string|boolean)',
3527
+ template: 'string',
3528
+ title: '(string|element|function)',
3529
+ trigger: 'string'
3530
+ };
3531
+
3532
+ /**
3533
+ * Class definition
3534
+ */
3535
+ var Tooltip = /*#__PURE__*/function (_BaseComponent) {
3536
+ _inheritsLoose(Tooltip, _BaseComponent);
3537
+ function Tooltip(element, config) {
3538
+ var _this;
3539
+ if (typeof Popper__namespace === 'undefined') {
3540
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
3541
+ }
3542
+ _this = _BaseComponent.call(this, element, config) || this;
3543
+
3544
+ // Private
3545
+ _this._isEnabled = true;
3546
+ _this._timeout = 0;
3547
+ _this._isHovered = null;
3548
+ _this._activeTrigger = {};
3549
+ _this._popper = null;
3550
+ _this._templateFactory = null;
3551
+ _this._newContent = null;
3552
+
3553
+ // Protected
3554
+ _this.tip = null;
3555
+ _this._setListeners();
3556
+ if (!_this._config.selector) {
3557
+ _this._fixTitle();
3558
+ }
3559
+ return _this;
3560
+ }
3561
+
3562
+ // Getters
3563
+ var _proto = Tooltip.prototype;
3564
+ // Public
3565
+ _proto.enable = function enable() {
3566
+ this._isEnabled = true;
3567
+ };
3568
+ _proto.disable = function disable() {
3569
+ this._isEnabled = false;
3570
+ };
3571
+ _proto.toggleEnabled = function toggleEnabled() {
3572
+ this._isEnabled = !this._isEnabled;
3573
+ };
3574
+ _proto.toggle = function toggle() {
3575
+ if (!this._isEnabled) {
3576
+ return;
3577
+ }
3578
+ if (this._isShown()) {
3579
+ this._leave();
3580
+ return;
3581
+ }
3582
+ this._enter();
3583
+ };
3584
+ _proto.dispose = function dispose() {
3585
+ clearTimeout(this._timeout);
3586
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3587
+ if (this._element.getAttribute('data-bs-original-title')) {
3588
+ this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
3589
+ }
3590
+ this._disposePopper();
3591
+ _BaseComponent.prototype.dispose.call(this);
3592
+ };
3593
+ _proto.show = function show() {
3594
+ var _this2 = this;
3595
+ if (this._element.style.display === 'none') {
3596
+ throw new Error('Please use show on visible elements');
3597
+ }
3598
+ if (!(this._isWithContent() && this._isEnabled)) {
3599
+ return;
3600
+ }
3601
+ var showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));
3602
+ var shadowRoot = findShadowRoot(this._element);
3603
+ var isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
3604
+ if (showEvent.defaultPrevented || !isInTheDom) {
3605
+ return;
3606
+ }
3607
+
3608
+ // TODO: v6 remove this or make it optional
3609
+ this._disposePopper();
3610
+ var tip = this._getTipElement();
3611
+ this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
3612
+ var container = this._config.container;
3613
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3614
+ container.append(tip);
3615
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
3616
+ }
3617
+ this._popper = this._createPopper(tip);
3618
+ tip.classList.add(CLASS_NAME_SHOW$2);
3619
+
3620
+ // If this is a touch-enabled device we add extra
3621
+ // empty mouseover listeners to the body's immediate children;
3622
+ // only needed because of broken event delegation on iOS
3623
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3624
+ if ('ontouchstart' in document.documentElement) {
3625
+ for (var _iterator = _createForOfIteratorHelperLoose((_ref = []).concat.apply(_ref, document.body.children)), _step; !(_step = _iterator()).done;) {
3626
+ var _ref;
3627
+ var element = _step.value;
3628
+ EventHandler.on(element, 'mouseover', noop);
3629
+ }
3630
+ }
3631
+ var complete = function complete() {
3632
+ EventHandler.trigger(_this2._element, _this2.constructor.eventName(EVENT_SHOWN$2));
3633
+ if (_this2._isHovered === false) {
3634
+ _this2._leave();
3635
+ }
3636
+ _this2._isHovered = false;
3637
+ };
3638
+ this._queueCallback(complete, this.tip, this._isAnimated());
3639
+ };
3640
+ _proto.hide = function hide() {
3641
+ var _this3 = this;
3642
+ if (!this._isShown()) {
3643
+ return;
3644
+ }
3645
+ var hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));
3646
+ if (hideEvent.defaultPrevented) {
3647
+ return;
3648
+ }
3649
+ var tip = this._getTipElement();
3650
+ tip.classList.remove(CLASS_NAME_SHOW$2);
3651
+
3652
+ // If this is a touch-enabled device we remove the extra
3653
+ // empty mouseover listeners we added for iOS support
3654
+ if ('ontouchstart' in document.documentElement) {
3655
+ for (var _iterator2 = _createForOfIteratorHelperLoose((_ref2 = []).concat.apply(_ref2, document.body.children)), _step2; !(_step2 = _iterator2()).done;) {
3656
+ var _ref2;
3657
+ var element = _step2.value;
3658
+ EventHandler.off(element, 'mouseover', noop);
3659
+ }
3660
+ }
3661
+ this._activeTrigger[TRIGGER_CLICK] = false;
3662
+ this._activeTrigger[TRIGGER_FOCUS] = false;
3663
+ this._activeTrigger[TRIGGER_HOVER] = false;
3664
+ this._isHovered = null; // it is a trick to support manual triggering
3665
+
3666
+ var complete = function complete() {
3667
+ if (_this3._isWithActiveTrigger()) {
3668
+ return;
3669
+ }
3670
+ if (!_this3._isHovered) {
3671
+ _this3._disposePopper();
3672
+ }
3673
+ _this3._element.removeAttribute('aria-describedby');
3674
+ EventHandler.trigger(_this3._element, _this3.constructor.eventName(EVENT_HIDDEN$2));
3675
+ };
3676
+ this._queueCallback(complete, this.tip, this._isAnimated());
3677
+ };
3678
+ _proto.update = function update() {
3679
+ if (this._popper) {
3680
+ this._popper.update();
3681
+ }
3682
+ }
3683
+
3684
+ // Protected
3685
+ ;
3686
+ _proto._isWithContent = function _isWithContent() {
3687
+ return Boolean(this._getTitle());
3688
+ };
3689
+ _proto._getTipElement = function _getTipElement() {
3690
+ if (!this.tip) {
3691
+ this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
3692
+ }
3693
+ return this.tip;
3694
+ };
3695
+ _proto._createTipElement = function _createTipElement(content) {
3696
+ var tip = this._getTemplateFactory(content).toHtml();
3697
+
3698
+ // TODO: remove this check in v6
3699
+ if (!tip) {
3700
+ return null;
3701
+ }
3702
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
3703
+ // TODO: v6 the following can be achieved with CSS only
3704
+ tip.classList.add("bs-" + this.constructor.NAME + "-auto");
3705
+ var tipId = getUID(this.constructor.NAME).toString();
3706
+ tip.setAttribute('id', tipId);
3707
+ if (this._isAnimated()) {
3708
+ tip.classList.add(CLASS_NAME_FADE$2);
3709
+ }
3710
+ return tip;
3711
+ };
3712
+ _proto.setContent = function setContent(content) {
3713
+ this._newContent = content;
3714
+ if (this._isShown()) {
3715
+ this._disposePopper();
3716
+ this.show();
3717
+ }
3718
+ };
3719
+ _proto._getTemplateFactory = function _getTemplateFactory(content) {
3720
+ if (this._templateFactory) {
3721
+ this._templateFactory.changeContent(content);
3722
+ } else {
3723
+ this._templateFactory = new TemplateFactory(_extends({}, this._config, {
3724
+ // the `content` var has to be after `this._config`
3725
+ // to override config.content in case of popover
3726
+ content: content,
3727
+ extraClass: this._resolvePossibleFunction(this._config.customClass)
3728
+ }));
3729
+ }
3730
+ return this._templateFactory;
3731
+ };
3732
+ _proto._getContentForTemplate = function _getContentForTemplate() {
3733
+ var _ref3;
3734
+ return _ref3 = {}, _ref3[SELECTOR_TOOLTIP_INNER] = this._getTitle(), _ref3;
3735
+ };
3736
+ _proto._getTitle = function _getTitle() {
3737
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
3738
+ }
3739
+
3740
+ // Private
3741
+ ;
3742
+ _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event) {
3743
+ return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
3744
+ };
3745
+ _proto._isAnimated = function _isAnimated() {
3746
+ return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);
3747
+ };
3748
+ _proto._isShown = function _isShown() {
3749
+ return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
3750
+ };
3751
+ _proto._createPopper = function _createPopper(tip) {
3752
+ var placement = execute(this._config.placement, [this, tip, this._element]);
3753
+ var attachment = AttachmentMap[placement.toUpperCase()];
3754
+ return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
3755
+ };
3756
+ _proto._getOffset = function _getOffset() {
3757
+ var _this4 = this;
3758
+ var offset = this._config.offset;
3759
+ if (typeof offset === 'string') {
3760
+ return offset.split(',').map(function (value) {
3761
+ return Number.parseInt(value, 10);
3762
+ });
3763
+ }
3764
+ if (typeof offset === 'function') {
3765
+ return function (popperData) {
3766
+ return offset(popperData, _this4._element);
3767
+ };
3768
+ }
3769
+ return offset;
3770
+ };
3771
+ _proto._resolvePossibleFunction = function _resolvePossibleFunction(arg) {
3772
+ return execute(arg, [this._element, this._element]);
3773
+ };
3774
+ _proto._getPopperConfig = function _getPopperConfig(attachment) {
3775
+ var _this5 = this;
3776
+ var defaultBsPopperConfig = {
3777
+ placement: attachment,
3778
+ modifiers: [{
3779
+ name: 'flip',
3780
+ options: {
3781
+ fallbackPlacements: this._config.fallbackPlacements
3782
+ }
3783
+ }, {
3784
+ name: 'offset',
3785
+ options: {
3786
+ offset: this._getOffset()
3787
+ }
3788
+ }, {
3789
+ name: 'preventOverflow',
3790
+ options: {
3791
+ boundary: this._config.boundary
3792
+ }
3793
+ }, {
3794
+ name: 'arrow',
3795
+ options: {
3796
+ element: "." + this.constructor.NAME + "-arrow"
3797
+ }
3798
+ }, {
3799
+ name: 'preSetPlacement',
3800
+ enabled: true,
3801
+ phase: 'beforeMain',
3802
+ fn: function fn(data) {
3803
+ // Pre-set Popper's placement attribute in order to read the arrow sizes properly.
3804
+ // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
3805
+ _this5._getTipElement().setAttribute('data-popper-placement', data.state.placement);
3806
+ }
3807
+ }]
3808
+ };
3809
+ return _extends({}, defaultBsPopperConfig, execute(this._config.popperConfig, [undefined, defaultBsPopperConfig]));
3810
+ };
3811
+ _proto._setListeners = function _setListeners() {
3812
+ var _this6 = this;
3813
+ var triggers = this._config.trigger.split(' ');
3814
+ for (var _iterator3 = _createForOfIteratorHelperLoose(triggers), _step3; !(_step3 = _iterator3()).done;) {
3815
+ var trigger = _step3.value;
3816
+ if (trigger === 'click') {
3817
+ EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, function (event) {
3818
+ var context = _this6._initializeOnDelegatedTarget(event);
3819
+ context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]);
3820
+ context.toggle();
3821
+ });
3822
+ } else if (trigger !== TRIGGER_MANUAL) {
3823
+ var eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
3824
+ var eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
3825
+ EventHandler.on(this._element, eventIn, this._config.selector, function (event) {
3826
+ var context = _this6._initializeOnDelegatedTarget(event);
3827
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3828
+ context._enter();
3829
+ });
3830
+ EventHandler.on(this._element, eventOut, this._config.selector, function (event) {
3831
+ var context = _this6._initializeOnDelegatedTarget(event);
3832
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
3833
+ context._leave();
3834
+ });
3835
+ }
3836
+ }
3837
+ this._hideModalHandler = function () {
3838
+ if (_this6._element) {
3839
+ _this6.hide();
3840
+ }
3841
+ };
3842
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3843
+ };
3844
+ _proto._fixTitle = function _fixTitle() {
3845
+ var title = this._element.getAttribute('title');
3846
+ if (!title) {
3847
+ return;
3848
+ }
3849
+ if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
3850
+ this._element.setAttribute('aria-label', title);
3851
+ }
3852
+ this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
3853
+ this._element.removeAttribute('title');
3854
+ };
3855
+ _proto._enter = function _enter() {
3856
+ var _this7 = this;
3857
+ if (this._isShown() || this._isHovered) {
3858
+ this._isHovered = true;
3859
+ return;
3860
+ }
3861
+ this._isHovered = true;
3862
+ this._setTimeout(function () {
3863
+ if (_this7._isHovered) {
3864
+ _this7.show();
3865
+ }
3866
+ }, this._config.delay.show);
3867
+ };
3868
+ _proto._leave = function _leave() {
3869
+ var _this8 = this;
3870
+ if (this._isWithActiveTrigger()) {
3871
+ return;
3872
+ }
3873
+ this._isHovered = false;
3874
+ this._setTimeout(function () {
3875
+ if (!_this8._isHovered) {
3876
+ _this8.hide();
3877
+ }
3878
+ }, this._config.delay.hide);
3879
+ };
3880
+ _proto._setTimeout = function _setTimeout(handler, timeout) {
3881
+ clearTimeout(this._timeout);
3882
+ this._timeout = setTimeout(handler, timeout);
3883
+ };
3884
+ _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
3885
+ return Object.values(this._activeTrigger).includes(true);
3886
+ };
3887
+ _proto._getConfig = function _getConfig(config) {
3888
+ var dataAttributes = Manipulator.getDataAttributes(this._element);
3889
+ for (var _i = 0, _Object$keys = Object.keys(dataAttributes); _i < _Object$keys.length; _i++) {
3890
+ var dataAttribute = _Object$keys[_i];
3891
+ if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
3892
+ delete dataAttributes[dataAttribute];
3893
+ }
3894
+ }
3895
+ config = _extends({}, dataAttributes, typeof config === 'object' && config ? config : {});
3896
+ config = this._mergeConfigObj(config);
3897
+ config = this._configAfterMerge(config);
3898
+ this._typeCheckConfig(config);
3899
+ return config;
3900
+ };
3901
+ _proto._configAfterMerge = function _configAfterMerge(config) {
3902
+ config.container = config.container === false ? document.body : getElement(config.container);
3903
+ if (typeof config.delay === 'number') {
3904
+ config.delay = {
3905
+ show: config.delay,
3906
+ hide: config.delay
3907
+ };
3908
+ }
3909
+ if (typeof config.title === 'number') {
3910
+ config.title = config.title.toString();
3911
+ }
3912
+ if (typeof config.content === 'number') {
3913
+ config.content = config.content.toString();
3914
+ }
3915
+ return config;
3916
+ };
3917
+ _proto._getDelegateConfig = function _getDelegateConfig() {
3918
+ var config = {};
3919
+ for (var _i2 = 0, _Object$entries = Object.entries(this._config); _i2 < _Object$entries.length; _i2++) {
3920
+ var _Object$entries$_i = _Object$entries[_i2],
3921
+ key = _Object$entries$_i[0],
3922
+ value = _Object$entries$_i[1];
3923
+ if (this.constructor.Default[key] !== value) {
3924
+ config[key] = value;
3925
+ }
3926
+ }
3927
+ config.selector = false;
3928
+ config.trigger = 'manual';
3929
+
3930
+ // In the future can be replaced with:
3931
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
3932
+ // `Object.fromEntries(keysWithDifferentValues)`
3933
+ return config;
3934
+ };
3935
+ _proto._disposePopper = function _disposePopper() {
3936
+ if (this._popper) {
3937
+ this._popper.destroy();
3938
+ this._popper = null;
3939
+ }
3940
+ if (this.tip) {
3941
+ this.tip.remove();
3942
+ this.tip = null;
3943
+ }
3944
+ }
3945
+
3946
+ // Static
3947
+ ;
3948
+ Tooltip.jQueryInterface = function jQueryInterface(config) {
3949
+ return this.each(function () {
3950
+ var data = Tooltip.getOrCreateInstance(this, config);
3951
+ if (typeof config !== 'string') {
3952
+ return;
3953
+ }
3954
+ if (typeof data[config] === 'undefined') {
3955
+ throw new TypeError("No method named \"" + config + "\"");
3956
+ }
3957
+ data[config]();
3958
+ });
3959
+ };
3960
+ _createClass(Tooltip, null, [{
3961
+ key: "Default",
3962
+ get: function get() {
3963
+ return Default$3;
3964
+ }
3965
+ }, {
3966
+ key: "DefaultType",
3967
+ get: function get() {
3968
+ return DefaultType$3;
3969
+ }
3970
+ }, {
3971
+ key: "NAME",
3972
+ get: function get() {
3973
+ return NAME$4;
3974
+ }
3975
+ }]);
3976
+ return Tooltip;
3977
+ }(BaseComponent);
3978
+ /**
3979
+ * jQuery
3980
+ */
3981
+ defineJQueryPlugin(Tooltip);
3982
+
3983
+ /**
3984
+ * Constants
3985
+ */
3986
+
3987
+ var NAME$3 = 'popover';
3988
+ var SELECTOR_TITLE = '.popover-header';
3989
+ var SELECTOR_CONTENT = '.popover-body';
3990
+ var Default$2 = _extends({}, Tooltip.Default, {
3991
+ content: '',
3992
+ offset: [0, 8],
3993
+ placement: 'right',
3994
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
3995
+ trigger: 'click'
3996
+ });
3997
+ var DefaultType$2 = _extends({}, Tooltip.DefaultType, {
3998
+ content: '(null|string|element|function)'
3999
+ });
4000
+
4001
+ /**
4002
+ * Class definition
4003
+ */
4004
+ var Popover = /*#__PURE__*/function (_Tooltip) {
4005
+ _inheritsLoose(Popover, _Tooltip);
4006
+ function Popover() {
4007
+ return _Tooltip.apply(this, arguments) || this;
4008
+ }
4009
+ var _proto = Popover.prototype;
4010
+ // Overrides
4011
+ _proto._isWithContent = function _isWithContent() {
4012
+ return this._getTitle() || this._getContent();
4013
+ }
4014
+
4015
+ // Private
4016
+ ;
4017
+ _proto._getContentForTemplate = function _getContentForTemplate() {
4018
+ var _ref;
4019
+ return _ref = {}, _ref[SELECTOR_TITLE] = this._getTitle(), _ref[SELECTOR_CONTENT] = this._getContent(), _ref;
4020
+ };
4021
+ _proto._getContent = function _getContent() {
4022
+ return this._resolvePossibleFunction(this._config.content);
4023
+ }
4024
+
4025
+ // Static
4026
+ ;
4027
+ Popover.jQueryInterface = function jQueryInterface(config) {
4028
+ return this.each(function () {
4029
+ var data = Popover.getOrCreateInstance(this, config);
4030
+ if (typeof config !== 'string') {
4031
+ return;
4032
+ }
4033
+ if (typeof data[config] === 'undefined') {
4034
+ throw new TypeError("No method named \"" + config + "\"");
4035
+ }
4036
+ data[config]();
4037
+ });
4038
+ };
4039
+ _createClass(Popover, null, [{
4040
+ key: "Default",
4041
+ get:
4042
+ // Getters
4043
+ function get() {
4044
+ return Default$2;
4045
+ }
4046
+ }, {
4047
+ key: "DefaultType",
4048
+ get: function get() {
4049
+ return DefaultType$2;
4050
+ }
4051
+ }, {
4052
+ key: "NAME",
4053
+ get: function get() {
4054
+ return NAME$3;
4055
+ }
4056
+ }]);
4057
+ return Popover;
4058
+ }(Tooltip);
4059
+ /**
4060
+ * jQuery
4061
+ */
4062
+ defineJQueryPlugin(Popover);
4063
+
4064
+ /**
4065
+ * Constants
4066
+ */
4067
+
4068
+ var NAME$2 = 'scrollspy';
4069
+ var DATA_KEY$2 = 'bs.scrollspy';
4070
+ var EVENT_KEY$2 = "." + DATA_KEY$2;
4071
+ var DATA_API_KEY = '.data-api';
4072
+ var EVENT_ACTIVATE = "activate" + EVENT_KEY$2;
4073
+ var EVENT_CLICK = "click" + EVENT_KEY$2;
4074
+ var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$2 + DATA_API_KEY;
4075
+ var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
4076
+ var CLASS_NAME_ACTIVE$1 = 'active';
4077
+ var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
4078
+ var SELECTOR_TARGET_LINKS = '[href]';
4079
+ var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
4080
+ var SELECTOR_NAV_LINKS = '.nav-link';
4081
+ var SELECTOR_NAV_ITEMS = '.nav-item';
4082
+ var SELECTOR_LIST_ITEMS = '.list-group-item';
4083
+ var SELECTOR_LINK_ITEMS = SELECTOR_NAV_LINKS + ", " + SELECTOR_NAV_ITEMS + " > " + SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS;
4084
+ var SELECTOR_DROPDOWN = '.dropdown';
4085
+ var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4086
+ var Default$1 = {
4087
+ offset: null,
4088
+ // TODO: v6 @deprecated, keep it for backwards compatibility reasons
4089
+ rootMargin: '0px 0px -25%',
4090
+ smoothScroll: false,
4091
+ target: null,
4092
+ threshold: [0.1, 0.5, 1]
4093
+ };
4094
+ var DefaultType$1 = {
4095
+ offset: '(number|null)',
4096
+ // TODO v6 @deprecated, keep it for backwards compatibility reasons
4097
+ rootMargin: 'string',
4098
+ smoothScroll: 'boolean',
4099
+ target: 'element',
4100
+ threshold: 'array'
4101
+ };
4102
+
4103
+ /**
4104
+ * Class definition
4105
+ */
4106
+ var ScrollSpy = /*#__PURE__*/function (_BaseComponent) {
4107
+ _inheritsLoose(ScrollSpy, _BaseComponent);
4108
+ function ScrollSpy(element, config) {
4109
+ var _this;
4110
+ _this = _BaseComponent.call(this, element, config) || this;
4111
+
4112
+ // this._element is the observablesContainer and config.target the menu links wrapper
4113
+ _this._targetLinks = new Map();
4114
+ _this._observableSections = new Map();
4115
+ _this._rootElement = getComputedStyle(_this._element).overflowY === 'visible' ? null : _this._element;
4116
+ _this._activeTarget = null;
4117
+ _this._observer = null;
4118
+ _this._previousScrollData = {
4119
+ visibleEntryTop: 0,
4120
+ parentScrollTop: 0
4121
+ };
4122
+ _this.refresh(); // initialize
4123
+ return _this;
4124
+ }
4125
+
4126
+ // Getters
4127
+ var _proto = ScrollSpy.prototype;
4128
+ // Public
4129
+ _proto.refresh = function refresh() {
4130
+ this._initializeTargetsAndObservables();
4131
+ this._maybeEnableSmoothScroll();
4132
+ if (this._observer) {
4133
+ this._observer.disconnect();
4134
+ } else {
4135
+ this._observer = this._getNewObserver();
4136
+ }
4137
+ for (var _iterator = _createForOfIteratorHelperLoose(this._observableSections.values()), _step; !(_step = _iterator()).done;) {
4138
+ var section = _step.value;
4139
+ this._observer.observe(section);
4140
+ }
4141
+ };
4142
+ _proto.dispose = function dispose() {
4143
+ this._observer.disconnect();
4144
+ _BaseComponent.prototype.dispose.call(this);
4145
+ }
4146
+
4147
+ // Private
4148
+ ;
4149
+ _proto._configAfterMerge = function _configAfterMerge(config) {
4150
+ // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
4151
+ config.target = getElement(config.target) || document.body;
4152
+
4153
+ // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
4154
+ config.rootMargin = config.offset ? config.offset + "px 0px -30%" : config.rootMargin;
4155
+ if (typeof config.threshold === 'string') {
4156
+ config.threshold = config.threshold.split(',').map(function (value) {
4157
+ return Number.parseFloat(value);
4158
+ });
4159
+ }
4160
+ return config;
4161
+ };
4162
+ _proto._maybeEnableSmoothScroll = function _maybeEnableSmoothScroll() {
4163
+ var _this2 = this;
4164
+ if (!this._config.smoothScroll) {
4165
+ return;
4166
+ }
4167
+
4168
+ // unregister any previous listeners
4169
+ EventHandler.off(this._config.target, EVENT_CLICK);
4170
+ EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, function (event) {
4171
+ var observableSection = _this2._observableSections.get(event.target.hash);
4172
+ if (observableSection) {
4173
+ event.preventDefault();
4174
+ var root = _this2._rootElement || window;
4175
+ var height = observableSection.offsetTop - _this2._element.offsetTop;
4176
+ if (root.scrollTo) {
4177
+ root.scrollTo({
4178
+ top: height,
4179
+ behavior: 'smooth'
4180
+ });
4181
+ return;
4182
+ }
4183
+
4184
+ // Chrome 60 doesn't support `scrollTo`
4185
+ root.scrollTop = height;
4186
+ }
4187
+ });
4188
+ };
4189
+ _proto._getNewObserver = function _getNewObserver() {
4190
+ var _this3 = this;
4191
+ var options = {
4192
+ root: this._rootElement,
4193
+ threshold: this._config.threshold,
4194
+ rootMargin: this._config.rootMargin
4195
+ };
4196
+ return new IntersectionObserver(function (entries) {
4197
+ return _this3._observerCallback(entries);
4198
+ }, options);
4199
+ }
4200
+
4201
+ // The logic of selection
4202
+ ;
4203
+ _proto._observerCallback = function _observerCallback(entries) {
4204
+ var _this4 = this;
4205
+ var targetElement = function targetElement(entry) {
4206
+ return _this4._targetLinks.get("#" + entry.target.id);
4207
+ };
4208
+ var activate = function activate(entry) {
4209
+ _this4._previousScrollData.visibleEntryTop = entry.target.offsetTop;
4210
+ _this4._process(targetElement(entry));
4211
+ };
4212
+ var parentScrollTop = (this._rootElement || document.documentElement).scrollTop;
4213
+ var userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;
4214
+ this._previousScrollData.parentScrollTop = parentScrollTop;
4215
+ for (var _iterator2 = _createForOfIteratorHelperLoose(entries), _step2; !(_step2 = _iterator2()).done;) {
4216
+ var entry = _step2.value;
4217
+ if (!entry.isIntersecting) {
4218
+ this._activeTarget = null;
4219
+ this._clearActiveClass(targetElement(entry));
4220
+ continue;
4221
+ }
4222
+ var entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;
4223
+ // if we are scrolling down, pick the bigger offsetTop
4224
+ if (userScrollsDown && entryIsLowerThanPrevious) {
4225
+ activate(entry);
4226
+ // if parent isn't scrolled, let's keep the first visible item, breaking the iteration
4227
+ if (!parentScrollTop) {
4228
+ return;
4229
+ }
4230
+ continue;
4231
+ }
4232
+
4233
+ // if we are scrolling up, pick the smallest offsetTop
4234
+ if (!userScrollsDown && !entryIsLowerThanPrevious) {
4235
+ activate(entry);
4236
+ }
4237
+ }
4238
+ };
4239
+ _proto._initializeTargetsAndObservables = function _initializeTargetsAndObservables() {
4240
+ this._targetLinks = new Map();
4241
+ this._observableSections = new Map();
4242
+ var targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);
4243
+ for (var _iterator3 = _createForOfIteratorHelperLoose(targetLinks), _step3; !(_step3 = _iterator3()).done;) {
4244
+ var anchor = _step3.value;
4245
+ // ensure that the anchor has an id and is not disabled
4246
+ if (!anchor.hash || isDisabled(anchor)) {
4247
+ continue;
4248
+ }
4249
+ var observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
4250
+
4251
+ // ensure that the observableSection exists & is visible
4252
+ if (isVisible(observableSection)) {
4253
+ this._targetLinks.set(decodeURI(anchor.hash), anchor);
4254
+ this._observableSections.set(anchor.hash, observableSection);
4255
+ }
4256
+ }
4257
+ };
4258
+ _proto._process = function _process(target) {
4259
+ if (this._activeTarget === target) {
4260
+ return;
4261
+ }
4262
+ this._clearActiveClass(this._config.target);
4263
+ this._activeTarget = target;
4264
+ target.classList.add(CLASS_NAME_ACTIVE$1);
4265
+ this._activateParents(target);
4266
+ EventHandler.trigger(this._element, EVENT_ACTIVATE, {
4267
+ relatedTarget: target
4268
+ });
4269
+ };
4270
+ _proto._activateParents = function _activateParents(target) {
4271
+ // Activate dropdown parents
4272
+ if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
4273
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);
4274
+ return;
4275
+ }
4276
+ for (var _iterator4 = _createForOfIteratorHelperLoose(SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)), _step4; !(_step4 = _iterator4()).done;) {
4277
+ var listGroup = _step4.value;
4278
+ // Set triggered links parents as active
4279
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
4280
+ for (var _iterator5 = _createForOfIteratorHelperLoose(SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)), _step5; !(_step5 = _iterator5()).done;) {
4281
+ var item = _step5.value;
4282
+ item.classList.add(CLASS_NAME_ACTIVE$1);
4283
+ }
4284
+ }
4285
+ };
4286
+ _proto._clearActiveClass = function _clearActiveClass(parent) {
4287
+ parent.classList.remove(CLASS_NAME_ACTIVE$1);
4288
+ var activeNodes = SelectorEngine.find(SELECTOR_TARGET_LINKS + "." + CLASS_NAME_ACTIVE$1, parent);
4289
+ for (var _iterator6 = _createForOfIteratorHelperLoose(activeNodes), _step6; !(_step6 = _iterator6()).done;) {
4290
+ var node = _step6.value;
4291
+ node.classList.remove(CLASS_NAME_ACTIVE$1);
4292
+ }
4293
+ }
4294
+
4295
+ // Static
4296
+ ;
4297
+ ScrollSpy.jQueryInterface = function jQueryInterface(config) {
4298
+ return this.each(function () {
4299
+ var data = ScrollSpy.getOrCreateInstance(this, config);
4300
+ if (typeof config !== 'string') {
4301
+ return;
4302
+ }
4303
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
4304
+ throw new TypeError("No method named \"" + config + "\"");
4305
+ }
4306
+ data[config]();
4307
+ });
4308
+ };
4309
+ _createClass(ScrollSpy, null, [{
4310
+ key: "Default",
4311
+ get: function get() {
4312
+ return Default$1;
4313
+ }
4314
+ }, {
4315
+ key: "DefaultType",
4316
+ get: function get() {
4317
+ return DefaultType$1;
4318
+ }
4319
+ }, {
4320
+ key: "NAME",
4321
+ get: function get() {
4322
+ return NAME$2;
4323
+ }
4324
+ }]);
4325
+ return ScrollSpy;
4326
+ }(BaseComponent);
4327
+ /**
4328
+ * Data API implementation
4329
+ */
4330
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () {
4331
+ for (var _iterator7 = _createForOfIteratorHelperLoose(SelectorEngine.find(SELECTOR_DATA_SPY)), _step7; !(_step7 = _iterator7()).done;) {
4332
+ var spy = _step7.value;
4333
+ ScrollSpy.getOrCreateInstance(spy);
4334
+ }
4335
+ });
4336
+
4337
+ /**
4338
+ * jQuery
4339
+ */
4340
+
4341
+ defineJQueryPlugin(ScrollSpy);
4342
+
4343
+ /**
4344
+ * Constants
4345
+ */
4346
+
4347
+ var NAME$1 = 'tab';
4348
+ var DATA_KEY$1 = 'bs.tab';
4349
+ var EVENT_KEY$1 = "." + DATA_KEY$1;
4350
+ var EVENT_HIDE$1 = "hide" + EVENT_KEY$1;
4351
+ var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1;
4352
+ var EVENT_SHOW$1 = "show" + EVENT_KEY$1;
4353
+ var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1;
4354
+ var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1;
4355
+ var EVENT_KEYDOWN = "keydown" + EVENT_KEY$1;
4356
+ var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$1;
4357
+ var ARROW_LEFT_KEY = 'ArrowLeft';
4358
+ var ARROW_RIGHT_KEY = 'ArrowRight';
4359
+ var ARROW_UP_KEY = 'ArrowUp';
4360
+ var ARROW_DOWN_KEY = 'ArrowDown';
4361
+ var HOME_KEY = 'Home';
4362
+ var END_KEY = 'End';
4363
+ var CLASS_NAME_ACTIVE = 'active';
4364
+ var CLASS_NAME_FADE$1 = 'fade';
4365
+ var CLASS_NAME_SHOW$1 = 'show';
4366
+ var CLASS_DROPDOWN = 'dropdown';
4367
+ var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4368
+ var SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
4369
+ var NOT_SELECTOR_DROPDOWN_TOGGLE = ":not(" + SELECTOR_DROPDOWN_TOGGLE + ")";
4370
+ var SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
4371
+ var SELECTOR_OUTER = '.nav-item, .list-group-item';
4372
+ var SELECTOR_INNER = ".nav-link" + NOT_SELECTOR_DROPDOWN_TOGGLE + ", .list-group-item" + NOT_SELECTOR_DROPDOWN_TOGGLE + ", [role=\"tab\"]" + NOT_SELECTOR_DROPDOWN_TOGGLE;
4373
+ var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
4374
+ var SELECTOR_INNER_ELEM = SELECTOR_INNER + ", " + SELECTOR_DATA_TOGGLE;
4375
+ var SELECTOR_DATA_TOGGLE_ACTIVE = "." + CLASS_NAME_ACTIVE + "[data-bs-toggle=\"tab\"], ." + CLASS_NAME_ACTIVE + "[data-bs-toggle=\"pill\"], ." + CLASS_NAME_ACTIVE + "[data-bs-toggle=\"list\"]";
4376
+
4377
+ /**
4378
+ * Class definition
4379
+ */
4380
+ var Tab = /*#__PURE__*/function (_BaseComponent) {
4381
+ _inheritsLoose(Tab, _BaseComponent);
4382
+ function Tab(element) {
4383
+ var _this;
4384
+ _this = _BaseComponent.call(this, element) || this;
4385
+ _this._parent = _this._element.closest(SELECTOR_TAB_PANEL);
4386
+ if (!_this._parent) {
4387
+ return _assertThisInitialized(_this);
4388
+ // TODO: should throw exception in v6
4389
+ // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
4390
+ }
4391
+
4392
+ // Set up initial aria attributes
4393
+ _this._setInitialAttributes(_this._parent, _this._getChildren());
4394
+ EventHandler.on(_this._element, EVENT_KEYDOWN, function (event) {
4395
+ return _this._keydown(event);
4396
+ });
4397
+ return _this;
4398
+ }
4399
+
4400
+ // Getters
4401
+ var _proto = Tab.prototype;
4402
+ // Public
4403
+ _proto.show = function show() {
4404
+ // Shows this elem and deactivate the active sibling if exists
4405
+ var innerElem = this._element;
4406
+ if (this._elemIsActive(innerElem)) {
4407
+ return;
4408
+ }
4409
+
4410
+ // Search for active tab on same parent to deactivate it
4411
+ var active = this._getActiveElem();
4412
+ var hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {
4413
+ relatedTarget: innerElem
4414
+ }) : null;
4415
+ var showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {
4416
+ relatedTarget: active
4417
+ });
4418
+ if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
4419
+ return;
4420
+ }
4421
+ this._deactivate(active, innerElem);
4422
+ this._activate(innerElem, active);
4423
+ }
4424
+
4425
+ // Private
4426
+ ;
4427
+ _proto._activate = function _activate(element, relatedElem) {
4428
+ var _this2 = this;
4429
+ if (!element) {
4430
+ return;
4431
+ }
4432
+ element.classList.add(CLASS_NAME_ACTIVE);
4433
+ this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
4434
+
4435
+ var complete = function complete() {
4436
+ if (element.getAttribute('role') !== 'tab') {
4437
+ element.classList.add(CLASS_NAME_SHOW$1);
4438
+ return;
4439
+ }
4440
+ element.removeAttribute('tabindex');
4441
+ element.setAttribute('aria-selected', true);
4442
+ _this2._toggleDropDown(element, true);
4443
+ EventHandler.trigger(element, EVENT_SHOWN$1, {
4444
+ relatedTarget: relatedElem
4445
+ });
4446
+ };
4447
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4448
+ };
4449
+ _proto._deactivate = function _deactivate(element, relatedElem) {
4450
+ var _this3 = this;
4451
+ if (!element) {
4452
+ return;
4453
+ }
4454
+ element.classList.remove(CLASS_NAME_ACTIVE);
4455
+ element.blur();
4456
+ this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
4457
+
4458
+ var complete = function complete() {
4459
+ if (element.getAttribute('role') !== 'tab') {
4460
+ element.classList.remove(CLASS_NAME_SHOW$1);
4461
+ return;
4462
+ }
4463
+ element.setAttribute('aria-selected', false);
4464
+ element.setAttribute('tabindex', '-1');
4465
+ _this3._toggleDropDown(element, false);
4466
+ EventHandler.trigger(element, EVENT_HIDDEN$1, {
4467
+ relatedTarget: relatedElem
4468
+ });
4469
+ };
4470
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4471
+ };
4472
+ _proto._keydown = function _keydown(event) {
4473
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
4474
+ return;
4475
+ }
4476
+ event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
4477
+ event.preventDefault();
4478
+ var children = this._getChildren().filter(function (element) {
4479
+ return !isDisabled(element);
4480
+ });
4481
+ var nextActiveElement;
4482
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
4483
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
4484
+ } else {
4485
+ var isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
4486
+ nextActiveElement = getNextActiveElement(children, event.target, isNext, true);
4487
+ }
4488
+ if (nextActiveElement) {
4489
+ nextActiveElement.focus({
4490
+ preventScroll: true
4491
+ });
4492
+ Tab.getOrCreateInstance(nextActiveElement).show();
4493
+ }
4494
+ };
4495
+ _proto._getChildren = function _getChildren() {
4496
+ // collection of inner elements
4497
+ return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);
4498
+ };
4499
+ _proto._getActiveElem = function _getActiveElem() {
4500
+ var _this4 = this;
4501
+ return this._getChildren().find(function (child) {
4502
+ return _this4._elemIsActive(child);
4503
+ }) || null;
4504
+ };
4505
+ _proto._setInitialAttributes = function _setInitialAttributes(parent, children) {
4506
+ this._setAttributeIfNotExists(parent, 'role', 'tablist');
4507
+ for (var _iterator = _createForOfIteratorHelperLoose(children), _step; !(_step = _iterator()).done;) {
4508
+ var child = _step.value;
4509
+ this._setInitialAttributesOnChild(child);
4510
+ }
4511
+ };
4512
+ _proto._setInitialAttributesOnChild = function _setInitialAttributesOnChild(child) {
4513
+ child = this._getInnerElement(child);
4514
+ var isActive = this._elemIsActive(child);
4515
+ var outerElem = this._getOuterElement(child);
4516
+ child.setAttribute('aria-selected', isActive);
4517
+ if (outerElem !== child) {
4518
+ this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
4519
+ }
4520
+ if (!isActive) {
4521
+ child.setAttribute('tabindex', '-1');
4522
+ }
4523
+ this._setAttributeIfNotExists(child, 'role', 'tab');
4524
+
4525
+ // set attributes to the related panel too
4526
+ this._setInitialAttributesOnTargetPanel(child);
4527
+ };
4528
+ _proto._setInitialAttributesOnTargetPanel = function _setInitialAttributesOnTargetPanel(child) {
4529
+ var target = SelectorEngine.getElementFromSelector(child);
4530
+ if (!target) {
4531
+ return;
4532
+ }
4533
+ this._setAttributeIfNotExists(target, 'role', 'tabpanel');
4534
+ if (child.id) {
4535
+ this._setAttributeIfNotExists(target, 'aria-labelledby', "" + child.id);
4536
+ }
4537
+ };
4538
+ _proto._toggleDropDown = function _toggleDropDown(element, open) {
4539
+ var outerElem = this._getOuterElement(element);
4540
+ if (!outerElem.classList.contains(CLASS_DROPDOWN)) {
4541
+ return;
4542
+ }
4543
+ var toggle = function toggle(selector, className) {
4544
+ var element = SelectorEngine.findOne(selector, outerElem);
4545
+ if (element) {
4546
+ element.classList.toggle(className, open);
4547
+ }
4548
+ };
4549
+ toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
4550
+ toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
4551
+ outerElem.setAttribute('aria-expanded', open);
4552
+ };
4553
+ _proto._setAttributeIfNotExists = function _setAttributeIfNotExists(element, attribute, value) {
4554
+ if (!element.hasAttribute(attribute)) {
4555
+ element.setAttribute(attribute, value);
4556
+ }
4557
+ };
4558
+ _proto._elemIsActive = function _elemIsActive(elem) {
4559
+ return elem.classList.contains(CLASS_NAME_ACTIVE);
4560
+ }
4561
+
4562
+ // Try to get the inner element (usually the .nav-link)
4563
+ ;
4564
+ _proto._getInnerElement = function _getInnerElement(elem) {
4565
+ return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);
4566
+ }
4567
+
4568
+ // Try to get the outer element (usually the .nav-item)
4569
+ ;
4570
+ _proto._getOuterElement = function _getOuterElement(elem) {
4571
+ return elem.closest(SELECTOR_OUTER) || elem;
4572
+ }
4573
+
4574
+ // Static
4575
+ ;
4576
+ Tab.jQueryInterface = function jQueryInterface(config) {
4577
+ return this.each(function () {
4578
+ var data = Tab.getOrCreateInstance(this);
4579
+ if (typeof config !== 'string') {
4580
+ return;
4581
+ }
4582
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
4583
+ throw new TypeError("No method named \"" + config + "\"");
4584
+ }
4585
+ data[config]();
4586
+ });
4587
+ };
4588
+ _createClass(Tab, null, [{
4589
+ key: "NAME",
4590
+ get: function get() {
4591
+ return NAME$1;
4592
+ }
4593
+ }]);
4594
+ return Tab;
4595
+ }(BaseComponent);
4596
+ /**
4597
+ * Data API implementation
4598
+ */
4599
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
4600
+ if (['A', 'AREA'].includes(this.tagName)) {
4601
+ event.preventDefault();
4602
+ }
4603
+ if (isDisabled(this)) {
4604
+ return;
4605
+ }
4606
+ Tab.getOrCreateInstance(this).show();
4607
+ });
4608
+
4609
+ /**
4610
+ * Initialize on focus
4611
+ */
4612
+ EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
4613
+ for (var _iterator2 = _createForOfIteratorHelperLoose(SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)), _step2; !(_step2 = _iterator2()).done;) {
4614
+ var element = _step2.value;
4615
+ Tab.getOrCreateInstance(element);
4616
+ }
4617
+ });
4618
+ /**
4619
+ * jQuery
4620
+ */
4621
+
4622
+ defineJQueryPlugin(Tab);
4623
+
4624
+ /**
4625
+ * Constants
4626
+ */
4627
+
4628
+ var NAME = 'toast';
4629
+ var DATA_KEY = 'bs.toast';
4630
+ var EVENT_KEY = "." + DATA_KEY;
4631
+ var EVENT_MOUSEOVER = "mouseover" + EVENT_KEY;
4632
+ var EVENT_MOUSEOUT = "mouseout" + EVENT_KEY;
4633
+ var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
4634
+ var EVENT_FOCUSOUT = "focusout" + EVENT_KEY;
4635
+ var EVENT_HIDE = "hide" + EVENT_KEY;
4636
+ var EVENT_HIDDEN = "hidden" + EVENT_KEY;
4637
+ var EVENT_SHOW = "show" + EVENT_KEY;
4638
+ var EVENT_SHOWN = "shown" + EVENT_KEY;
4639
+ var CLASS_NAME_FADE = 'fade';
4640
+ var CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
4641
+ var CLASS_NAME_SHOW = 'show';
4642
+ var CLASS_NAME_SHOWING = 'showing';
4643
+ var DefaultType = {
4644
+ animation: 'boolean',
4645
+ autohide: 'boolean',
4646
+ delay: 'number'
4647
+ };
4648
+ var Default = {
4649
+ animation: true,
4650
+ autohide: true,
4651
+ delay: 5000
4652
+ };
4653
+
4654
+ /**
4655
+ * Class definition
4656
+ */
4657
+ var Toast = /*#__PURE__*/function (_BaseComponent) {
4658
+ _inheritsLoose(Toast, _BaseComponent);
4659
+ function Toast(element, config) {
4660
+ var _this;
4661
+ _this = _BaseComponent.call(this, element, config) || this;
4662
+ _this._timeout = null;
4663
+ _this._hasMouseInteraction = false;
4664
+ _this._hasKeyboardInteraction = false;
4665
+ _this._setListeners();
4666
+ return _this;
4667
+ }
4668
+
4669
+ // Getters
4670
+ var _proto = Toast.prototype;
4671
+ // Public
4672
+ _proto.show = function show() {
4673
+ var _this2 = this;
4674
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
4675
+ if (showEvent.defaultPrevented) {
4676
+ return;
4677
+ }
4678
+ this._clearTimeout();
4679
+ if (this._config.animation) {
4680
+ this._element.classList.add(CLASS_NAME_FADE);
4681
+ }
4682
+ var complete = function complete() {
4683
+ _this2._element.classList.remove(CLASS_NAME_SHOWING);
4684
+ EventHandler.trigger(_this2._element, EVENT_SHOWN);
4685
+ _this2._maybeScheduleHide();
4686
+ };
4687
+ this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
4688
+ reflow(this._element);
4689
+ this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);
4690
+ this._queueCallback(complete, this._element, this._config.animation);
4691
+ };
4692
+ _proto.hide = function hide() {
4693
+ var _this3 = this;
4694
+ if (!this.isShown()) {
4695
+ return;
4696
+ }
4697
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
4698
+ if (hideEvent.defaultPrevented) {
4699
+ return;
4700
+ }
4701
+ var complete = function complete() {
4702
+ _this3._element.classList.add(CLASS_NAME_HIDE); // @deprecated
4703
+ _this3._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);
4704
+ EventHandler.trigger(_this3._element, EVENT_HIDDEN);
4705
+ };
4706
+ this._element.classList.add(CLASS_NAME_SHOWING);
4707
+ this._queueCallback(complete, this._element, this._config.animation);
4708
+ };
4709
+ _proto.dispose = function dispose() {
4710
+ this._clearTimeout();
4711
+ if (this.isShown()) {
4712
+ this._element.classList.remove(CLASS_NAME_SHOW);
4713
+ }
4714
+ _BaseComponent.prototype.dispose.call(this);
4715
+ };
4716
+ _proto.isShown = function isShown() {
4717
+ return this._element.classList.contains(CLASS_NAME_SHOW);
4718
+ }
4719
+
4720
+ // Private
4721
+ ;
4722
+ _proto._maybeScheduleHide = function _maybeScheduleHide() {
4723
+ var _this4 = this;
4724
+ if (!this._config.autohide) {
4725
+ return;
4726
+ }
4727
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
4728
+ return;
4729
+ }
4730
+ this._timeout = setTimeout(function () {
4731
+ _this4.hide();
4732
+ }, this._config.delay);
4733
+ };
4734
+ _proto._onInteraction = function _onInteraction(event, isInteracting) {
4735
+ switch (event.type) {
4736
+ case 'mouseover':
4737
+ case 'mouseout':
4738
+ {
4739
+ this._hasMouseInteraction = isInteracting;
4740
+ break;
4741
+ }
4742
+ case 'focusin':
4743
+ case 'focusout':
4744
+ {
4745
+ this._hasKeyboardInteraction = isInteracting;
4746
+ break;
4747
+ }
4748
+ }
4749
+ if (isInteracting) {
4750
+ this._clearTimeout();
4751
+ return;
4752
+ }
4753
+ var nextElement = event.relatedTarget;
4754
+ if (this._element === nextElement || this._element.contains(nextElement)) {
4755
+ return;
4756
+ }
4757
+ this._maybeScheduleHide();
4758
+ };
4759
+ _proto._setListeners = function _setListeners() {
4760
+ var _this5 = this;
4761
+ EventHandler.on(this._element, EVENT_MOUSEOVER, function (event) {
4762
+ return _this5._onInteraction(event, true);
4763
+ });
4764
+ EventHandler.on(this._element, EVENT_MOUSEOUT, function (event) {
4765
+ return _this5._onInteraction(event, false);
4766
+ });
4767
+ EventHandler.on(this._element, EVENT_FOCUSIN, function (event) {
4768
+ return _this5._onInteraction(event, true);
4769
+ });
4770
+ EventHandler.on(this._element, EVENT_FOCUSOUT, function (event) {
4771
+ return _this5._onInteraction(event, false);
4772
+ });
4773
+ };
4774
+ _proto._clearTimeout = function _clearTimeout() {
4775
+ clearTimeout(this._timeout);
4776
+ this._timeout = null;
4777
+ }
4778
+
4779
+ // Static
4780
+ ;
4781
+ Toast.jQueryInterface = function jQueryInterface(config) {
4782
+ return this.each(function () {
4783
+ var data = Toast.getOrCreateInstance(this, config);
4784
+ if (typeof config === 'string') {
4785
+ if (typeof data[config] === 'undefined') {
4786
+ throw new TypeError("No method named \"" + config + "\"");
4787
+ }
4788
+ data[config](this);
4789
+ }
4790
+ });
4791
+ };
4792
+ _createClass(Toast, null, [{
4793
+ key: "Default",
4794
+ get: function get() {
4795
+ return Default;
4796
+ }
4797
+ }, {
4798
+ key: "DefaultType",
4799
+ get: function get() {
4800
+ return DefaultType;
4801
+ }
4802
+ }, {
4803
+ key: "NAME",
4804
+ get: function get() {
4805
+ return NAME;
4806
+ }
4807
+ }]);
4808
+ return Toast;
4809
+ }(BaseComponent);
4810
+ /**
4811
+ * Data API implementation
4812
+ */
4813
+ enableDismissTrigger(Toast);
4814
+
4815
+ /**
4816
+ * jQuery
4817
+ */
4818
+
4819
+ defineJQueryPlugin(Toast);
4820
+
4821
+ /**
4822
+ * --------------------------------------------------------------------------
4823
+ * Bootstrap index.umd.js
4824
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4825
+ * --------------------------------------------------------------------------
4826
+ */
4827
+
4828
+ const index_umd = {
4829
+ Alert: Alert,
4830
+ Button: Button,
4831
+ Carousel: Carousel,
4832
+ Collapse: Collapse,
4833
+ Dropdown: Dropdown,
4834
+ Modal: Modal,
4835
+ Offcanvas: Offcanvas,
4836
+ Popover: Popover,
4837
+ ScrollSpy: ScrollSpy,
4838
+ Tab: Tab,
4839
+ Toast: Toast,
4840
+ Tooltip: Tooltip
4841
+ };
4842
+
4843
+ return index_umd;
4844
+
4845
+ }));
4846
+ //# sourceMappingURL=bootstrap.js.map