publishing_platform_publishing_components 0.1.0

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 (259) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +2 -0
  4. data/Rakefile +41 -0
  5. data/app/assets/builds/gemkeep +0 -0
  6. data/app/assets/config/publishing_platform_publishing_components_manifest.js +2 -0
  7. data/app/assets/images/publishing_platform_publishing_components/gemkeep +0 -0
  8. data/app/assets/stylesheets/publishing_platform_publishing_components/_all_components.scss +3 -0
  9. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment.scss +117 -0
  10. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_summary-list.scss +169 -0
  11. data/app/controllers/publishing_platform_publishing_components/application_controller.rb +4 -0
  12. data/app/helpers/publishing_platform_publishing_components/application_helper.rb +4 -0
  13. data/app/models/publishing_platform_publishing_components/component_doc.rb +90 -0
  14. data/app/models/publishing_platform_publishing_components/component_docs.rb +57 -0
  15. data/app/models/publishing_platform_publishing_components/component_example.rb +104 -0
  16. data/app/models/publishing_platform_publishing_components/shared_accessibility_criteria.rb +37 -0
  17. data/app/views/publishing_platform_publishing_components/component_doc/_component_output.html.erb +15 -0
  18. data/app/views/publishing_platform_publishing_components/components/_attachment.html.erb +91 -0
  19. data/app/views/publishing_platform_publishing_components/components/_error_summary.html.erb +38 -0
  20. data/app/views/publishing_platform_publishing_components/components/_summary_list.html.erb +135 -0
  21. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_document.html.erb +3 -0
  22. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_external.html.erb +3 -0
  23. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_generic.html.erb +4 -0
  24. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_html.html.erb +3 -0
  25. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_pdf.html.erb +3 -0
  26. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +5 -0
  27. data/app/views/publishing_platform_publishing_components/components/docs/attachment.yml +104 -0
  28. data/app/views/publishing_platform_publishing_components/components/docs/error_summary.yml +51 -0
  29. data/app/views/publishing_platform_publishing_components/components/docs/summary_list.yml +137 -0
  30. data/config/initializers/assets.rb +24 -0
  31. data/config/routes.rb +2 -0
  32. data/lib/publishing_platform_publishing_components/config.rb +25 -0
  33. data/lib/publishing_platform_publishing_components/engine.rb +5 -0
  34. data/lib/publishing_platform_publishing_components/presenters/attachment_helper.rb +176 -0
  35. data/lib/publishing_platform_publishing_components/presenters/component_wrapper_helper.rb +290 -0
  36. data/lib/publishing_platform_publishing_components/presenters/shared_helper.rb +24 -0
  37. data/lib/publishing_platform_publishing_components/version.rb +3 -0
  38. data/lib/publishing_platform_publishing_components.rb +10 -0
  39. data/lib/tasks/publishing_platform_publishing_components_tasks.rake +4 -0
  40. data/node_modules/bootstrap/LICENSE +21 -0
  41. data/node_modules/bootstrap/README.md +246 -0
  42. data/node_modules/bootstrap/dist/css/bootstrap-grid.css +4085 -0
  43. data/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  44. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  45. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  46. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
  47. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
  48. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  49. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
  50. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css +601 -0
  51. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  52. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
  53. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  54. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css +598 -0
  55. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
  56. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
  57. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
  58. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css +5406 -0
  59. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
  60. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  61. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
  62. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css +5397 -0
  63. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
  64. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  65. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
  66. data/node_modules/bootstrap/dist/css/bootstrap.css +12048 -0
  67. data/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  68. data/node_modules/bootstrap/dist/css/bootstrap.min.css +6 -0
  69. data/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  70. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css +12021 -0
  71. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
  72. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  73. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
  74. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6312 -0
  75. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  76. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  77. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  78. data/node_modules/bootstrap/dist/js/bootstrap.esm.js +4447 -0
  79. data/node_modules/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
  80. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
  81. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
  82. data/node_modules/bootstrap/dist/js/bootstrap.js +4494 -0
  83. data/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
  84. data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  85. data/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  86. data/node_modules/bootstrap/js/dist/alert.js +90 -0
  87. data/node_modules/bootstrap/js/dist/alert.js.map +1 -0
  88. data/node_modules/bootstrap/js/dist/base-component.js +86 -0
  89. data/node_modules/bootstrap/js/dist/base-component.js.map +1 -0
  90. data/node_modules/bootstrap/js/dist/button.js +79 -0
  91. data/node_modules/bootstrap/js/dist/button.js.map +1 -0
  92. data/node_modules/bootstrap/js/dist/carousel.js +388 -0
  93. data/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
  94. data/node_modules/bootstrap/js/dist/collapse.js +249 -0
  95. data/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
  96. data/node_modules/bootstrap/js/dist/dom/data.js +63 -0
  97. data/node_modules/bootstrap/js/dist/dom/data.js.map +1 -0
  98. data/node_modules/bootstrap/js/dist/dom/event-handler.js +237 -0
  99. data/node_modules/bootstrap/js/dist/dom/event-handler.js.map +1 -0
  100. data/node_modules/bootstrap/js/dist/dom/manipulator.js +72 -0
  101. data/node_modules/bootstrap/js/dist/dom/manipulator.js.map +1 -0
  102. data/node_modules/bootstrap/js/dist/dom/selector-engine.js +104 -0
  103. data/node_modules/bootstrap/js/dist/dom/selector-engine.js.map +1 -0
  104. data/node_modules/bootstrap/js/dist/dropdown.js +402 -0
  105. data/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
  106. data/node_modules/bootstrap/js/dist/modal.js +320 -0
  107. data/node_modules/bootstrap/js/dist/modal.js.map +1 -0
  108. data/node_modules/bootstrap/js/dist/offcanvas.js +246 -0
  109. data/node_modules/bootstrap/js/dist/offcanvas.js.map +1 -0
  110. data/node_modules/bootstrap/js/dist/popover.js +96 -0
  111. data/node_modules/bootstrap/js/dist/popover.js.map +1 -0
  112. data/node_modules/bootstrap/js/dist/scrollspy.js +275 -0
  113. data/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
  114. data/node_modules/bootstrap/js/dist/tab.js +285 -0
  115. data/node_modules/bootstrap/js/dist/tab.js.map +1 -0
  116. data/node_modules/bootstrap/js/dist/toast.js +198 -0
  117. data/node_modules/bootstrap/js/dist/toast.js.map +1 -0
  118. data/node_modules/bootstrap/js/dist/tooltip.js +546 -0
  119. data/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
  120. data/node_modules/bootstrap/js/dist/util/backdrop.js +139 -0
  121. data/node_modules/bootstrap/js/dist/util/backdrop.js.map +1 -0
  122. data/node_modules/bootstrap/js/dist/util/component-functions.js +42 -0
  123. data/node_modules/bootstrap/js/dist/util/component-functions.js.map +1 -0
  124. data/node_modules/bootstrap/js/dist/util/config.js +68 -0
  125. data/node_modules/bootstrap/js/dist/util/config.js.map +1 -0
  126. data/node_modules/bootstrap/js/dist/util/focustrap.js +113 -0
  127. data/node_modules/bootstrap/js/dist/util/focustrap.js.map +1 -0
  128. data/node_modules/bootstrap/js/dist/util/index.js +281 -0
  129. data/node_modules/bootstrap/js/dist/util/index.js.map +1 -0
  130. data/node_modules/bootstrap/js/dist/util/sanitizer.js +113 -0
  131. data/node_modules/bootstrap/js/dist/util/sanitizer.js.map +1 -0
  132. data/node_modules/bootstrap/js/dist/util/scrollbar.js +113 -0
  133. data/node_modules/bootstrap/js/dist/util/scrollbar.js.map +1 -0
  134. data/node_modules/bootstrap/js/dist/util/swipe.js +135 -0
  135. data/node_modules/bootstrap/js/dist/util/swipe.js.map +1 -0
  136. data/node_modules/bootstrap/js/dist/util/template-factory.js +151 -0
  137. data/node_modules/bootstrap/js/dist/util/template-factory.js.map +1 -0
  138. data/node_modules/bootstrap/js/index.esm.js +19 -0
  139. data/node_modules/bootstrap/js/index.umd.js +34 -0
  140. data/node_modules/bootstrap/js/src/alert.js +87 -0
  141. data/node_modules/bootstrap/js/src/base-component.js +86 -0
  142. data/node_modules/bootstrap/js/src/button.js +72 -0
  143. data/node_modules/bootstrap/js/src/carousel.js +474 -0
  144. data/node_modules/bootstrap/js/src/collapse.js +297 -0
  145. data/node_modules/bootstrap/js/src/dom/data.js +55 -0
  146. data/node_modules/bootstrap/js/src/dom/event-handler.js +317 -0
  147. data/node_modules/bootstrap/js/src/dom/manipulator.js +71 -0
  148. data/node_modules/bootstrap/js/src/dom/selector-engine.js +126 -0
  149. data/node_modules/bootstrap/js/src/dropdown.js +455 -0
  150. data/node_modules/bootstrap/js/src/modal.js +378 -0
  151. data/node_modules/bootstrap/js/src/offcanvas.js +282 -0
  152. data/node_modules/bootstrap/js/src/popover.js +97 -0
  153. data/node_modules/bootstrap/js/src/scrollspy.js +296 -0
  154. data/node_modules/bootstrap/js/src/tab.js +315 -0
  155. data/node_modules/bootstrap/js/src/toast.js +224 -0
  156. data/node_modules/bootstrap/js/src/tooltip.js +633 -0
  157. data/node_modules/bootstrap/js/src/util/backdrop.js +151 -0
  158. data/node_modules/bootstrap/js/src/util/component-functions.js +35 -0
  159. data/node_modules/bootstrap/js/src/util/config.js +65 -0
  160. data/node_modules/bootstrap/js/src/util/focustrap.js +115 -0
  161. data/node_modules/bootstrap/js/src/util/index.js +306 -0
  162. data/node_modules/bootstrap/js/src/util/sanitizer.js +116 -0
  163. data/node_modules/bootstrap/js/src/util/scrollbar.js +114 -0
  164. data/node_modules/bootstrap/js/src/util/swipe.js +146 -0
  165. data/node_modules/bootstrap/js/src/util/template-factory.js +160 -0
  166. data/node_modules/bootstrap/package.json +210 -0
  167. data/node_modules/bootstrap/scss/_accordion.scss +153 -0
  168. data/node_modules/bootstrap/scss/_alert.scss +68 -0
  169. data/node_modules/bootstrap/scss/_badge.scss +38 -0
  170. data/node_modules/bootstrap/scss/_breadcrumb.scss +40 -0
  171. data/node_modules/bootstrap/scss/_button-group.scss +147 -0
  172. data/node_modules/bootstrap/scss/_buttons.scss +216 -0
  173. data/node_modules/bootstrap/scss/_card.scss +238 -0
  174. data/node_modules/bootstrap/scss/_carousel.scss +226 -0
  175. data/node_modules/bootstrap/scss/_close.scss +66 -0
  176. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  177. data/node_modules/bootstrap/scss/_dropdown.scss +250 -0
  178. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  179. data/node_modules/bootstrap/scss/_functions.scss +302 -0
  180. data/node_modules/bootstrap/scss/_grid.scss +39 -0
  181. data/node_modules/bootstrap/scss/_helpers.scss +12 -0
  182. data/node_modules/bootstrap/scss/_images.scss +42 -0
  183. data/node_modules/bootstrap/scss/_list-group.scss +199 -0
  184. data/node_modules/bootstrap/scss/_maps.scss +174 -0
  185. data/node_modules/bootstrap/scss/_mixins.scss +42 -0
  186. data/node_modules/bootstrap/scss/_modal.scss +240 -0
  187. data/node_modules/bootstrap/scss/_nav.scss +197 -0
  188. data/node_modules/bootstrap/scss/_navbar.scss +289 -0
  189. data/node_modules/bootstrap/scss/_offcanvas.scss +147 -0
  190. data/node_modules/bootstrap/scss/_pagination.scss +109 -0
  191. data/node_modules/bootstrap/scss/_placeholders.scss +51 -0
  192. data/node_modules/bootstrap/scss/_popover.scss +196 -0
  193. data/node_modules/bootstrap/scss/_progress.scss +68 -0
  194. data/node_modules/bootstrap/scss/_reboot.scss +617 -0
  195. data/node_modules/bootstrap/scss/_root.scss +187 -0
  196. data/node_modules/bootstrap/scss/_spinners.scss +86 -0
  197. data/node_modules/bootstrap/scss/_tables.scss +171 -0
  198. data/node_modules/bootstrap/scss/_toasts.scss +73 -0
  199. data/node_modules/bootstrap/scss/_tooltip.scss +119 -0
  200. data/node_modules/bootstrap/scss/_transitions.scss +27 -0
  201. data/node_modules/bootstrap/scss/_type.scss +106 -0
  202. data/node_modules/bootstrap/scss/_utilities.scss +806 -0
  203. data/node_modules/bootstrap/scss/_variables-dark.scss +102 -0
  204. data/node_modules/bootstrap/scss/_variables.scss +1753 -0
  205. data/node_modules/bootstrap/scss/bootstrap-grid.scss +62 -0
  206. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +10 -0
  207. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +19 -0
  208. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  209. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +97 -0
  210. data/node_modules/bootstrap/scss/forms/_form-check.scss +189 -0
  211. data/node_modules/bootstrap/scss/forms/_form-control.scss +214 -0
  212. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  213. data/node_modules/bootstrap/scss/forms/_form-select.scss +80 -0
  214. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  215. data/node_modules/bootstrap/scss/forms/_input-group.scss +132 -0
  216. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  217. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  218. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  219. data/node_modules/bootstrap/scss/helpers/_color-bg.scss +7 -0
  220. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +30 -0
  221. data/node_modules/bootstrap/scss/helpers/_focus-ring.scss +5 -0
  222. data/node_modules/bootstrap/scss/helpers/_icon-link.scss +25 -0
  223. data/node_modules/bootstrap/scss/helpers/_position.scss +36 -0
  224. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  225. data/node_modules/bootstrap/scss/helpers/_stacks.scss +15 -0
  226. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  227. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  228. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  229. data/node_modules/bootstrap/scss/helpers/_vr.scss +8 -0
  230. data/node_modules/bootstrap/scss/mixins/_alert.scss +18 -0
  231. data/node_modules/bootstrap/scss/mixins/_backdrop.scss +14 -0
  232. data/node_modules/bootstrap/scss/mixins/_banner.scss +7 -0
  233. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  234. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +24 -0
  235. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  236. data/node_modules/bootstrap/scss/mixins/_buttons.scss +70 -0
  237. data/node_modules/bootstrap/scss/mixins/_caret.scss +69 -0
  238. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  239. data/node_modules/bootstrap/scss/mixins/_color-mode.scss +21 -0
  240. data/node_modules/bootstrap/scss/mixins/_color-scheme.scss +7 -0
  241. data/node_modules/bootstrap/scss/mixins/_container.scss +11 -0
  242. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  243. data/node_modules/bootstrap/scss/mixins/_forms.scss +163 -0
  244. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  245. data/node_modules/bootstrap/scss/mixins/_grid.scss +151 -0
  246. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  247. data/node_modules/bootstrap/scss/mixins/_list-group.scss +26 -0
  248. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  249. data/node_modules/bootstrap/scss/mixins/_pagination.scss +10 -0
  250. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  251. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  252. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +24 -0
  253. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  254. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  255. data/node_modules/bootstrap/scss/mixins/_utilities.scss +97 -0
  256. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +38 -0
  257. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  258. data/node_modules/bootstrap/scss/vendor/_rfs.scss +348 -0
  259. metadata +448 -0
@@ -0,0 +1,90 @@
1
+ /*!
2
+ * Bootstrap alert.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 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('./base-component.js'), require('./dom/event-handler.js'), require('./util/component-functions.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/component-functions', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.BaseComponent, global.EventHandler, global.ComponentFunctions, global.Index));
10
+ })(this, (function (BaseComponent, EventHandler, componentFunctions_js, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap alert.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'alert';
25
+ const DATA_KEY = 'bs.alert';
26
+ const EVENT_KEY = `.${DATA_KEY}`;
27
+ const EVENT_CLOSE = `close${EVENT_KEY}`;
28
+ const EVENT_CLOSED = `closed${EVENT_KEY}`;
29
+ const CLASS_NAME_FADE = 'fade';
30
+ const CLASS_NAME_SHOW = 'show';
31
+
32
+ /**
33
+ * Class definition
34
+ */
35
+
36
+ class Alert extends BaseComponent {
37
+ // Getters
38
+ static get NAME() {
39
+ return NAME;
40
+ }
41
+
42
+ // Public
43
+ close() {
44
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
45
+ if (closeEvent.defaultPrevented) {
46
+ return;
47
+ }
48
+ this._element.classList.remove(CLASS_NAME_SHOW);
49
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
50
+ this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
51
+ }
52
+
53
+ // Private
54
+ _destroyElement() {
55
+ this._element.remove();
56
+ EventHandler.trigger(this._element, EVENT_CLOSED);
57
+ this.dispose();
58
+ }
59
+
60
+ // Static
61
+ static jQueryInterface(config) {
62
+ return this.each(function () {
63
+ const data = Alert.getOrCreateInstance(this);
64
+ if (typeof config !== 'string') {
65
+ return;
66
+ }
67
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
68
+ throw new TypeError(`No method named "${config}"`);
69
+ }
70
+ data[config](this);
71
+ });
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Data API implementation
77
+ */
78
+
79
+ componentFunctions_js.enableDismissTrigger(Alert, 'close');
80
+
81
+ /**
82
+ * jQuery
83
+ */
84
+
85
+ index_js.defineJQueryPlugin(Alert);
86
+
87
+ return Alert;
88
+
89
+ }));
90
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["NAME","DATA_KEY","EVENT_KEY","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","closeEvent","EventHandler","trigger","_element","defaultPrevented","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","dispose","jQueryInterface","config","each","data","getOrCreateInstance","undefined","startsWith","TypeError","enableDismissTrigger","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,OAAO;EACpB,MAAMC,QAAQ,GAAG,UAAU;EAC3B,MAAMC,SAAS,GAAG,CAAA,CAAA,EAAID,QAAQ,CAAA,CAAE;EAEhC,MAAME,WAAW,GAAG,CAAA,KAAA,EAAQD,SAAS,CAAA,CAAE;EACvC,MAAME,YAAY,GAAG,CAAA,MAAA,EAASF,SAAS,CAAA,CAAE;EACzC,MAAMG,eAAe,GAAG,MAAM;EAC9B,MAAMC,eAAe,GAAG,MAAM;;EAE9B;EACA;EACA;;EAEA,MAAMC,KAAK,SAASC,aAAa,CAAC;EAChC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI;EACb,EAAA;;EAEA;EACAS,EAAAA,KAAKA,GAAG;MACN,MAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAEV,WAAW,CAAC;MAEnE,IAAIO,UAAU,CAACI,gBAAgB,EAAE;EAC/B,MAAA;EACF,IAAA;MAEA,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACC,MAAM,CAACV,eAAe,CAAC;MAE/C,MAAMW,UAAU,GAAG,IAAI,CAACJ,QAAQ,CAACE,SAAS,CAACG,QAAQ,CAACb,eAAe,CAAC;EACpE,IAAA,IAAI,CAACc,cAAc,CAAC,MAAM,IAAI,CAACC,eAAe,EAAE,EAAE,IAAI,CAACP,QAAQ,EAAEI,UAAU,CAAC;EAC9E,EAAA;;EAEA;EACAG,EAAAA,eAAeA,GAAG;EAChB,IAAA,IAAI,CAACP,QAAQ,CAACG,MAAM,EAAE;MACtBL,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAET,YAAY,CAAC;MACjD,IAAI,CAACiB,OAAO,EAAE;EAChB,EAAA;;EAEA;IACA,OAAOC,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGlB,KAAK,CAACmB,mBAAmB,CAAC,IAAI,CAAC;EAE5C,MAAA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA;EACF,MAAA;EAEA,MAAA,IAAIE,IAAI,CAACF,MAAM,CAAC,KAAKI,SAAS,IAAIJ,MAAM,CAACK,UAAU,CAAC,GAAG,CAAC,IAAIL,MAAM,KAAK,aAAa,EAAE;EACpF,QAAA,MAAM,IAAIM,SAAS,CAAC,CAAA,iBAAA,EAAoBN,MAAM,GAAG,CAAC;EACpD,MAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,CAAC,IAAI,CAAC;EACpB,IAAA,CAAC,CAAC;EACJ,EAAA;EACF;;EAEA;EACA;EACA;;AAEAO,4CAAoB,CAACvB,KAAK,EAAE,OAAO,CAAC;;EAEpC;EACA;EACA;;AAEAwB,6BAAkB,CAACxB,KAAK,CAAC;;;;;;;;"}
@@ -0,0 +1,86 @@
1
+ /*!
2
+ * Bootstrap base-component.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./util/config.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './util/config', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.EventHandler, global.Config, global.Index));
10
+ })(this, (function (Data, EventHandler, Config, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap base-component.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const VERSION = '5.3.8';
25
+
26
+ /**
27
+ * Class definition
28
+ */
29
+
30
+ class BaseComponent extends Config {
31
+ constructor(element, config) {
32
+ super();
33
+ element = index_js.getElement(element);
34
+ if (!element) {
35
+ return;
36
+ }
37
+ this._element = element;
38
+ this._config = this._getConfig(config);
39
+ Data.set(this._element, this.constructor.DATA_KEY, this);
40
+ }
41
+
42
+ // Public
43
+ dispose() {
44
+ Data.remove(this._element, this.constructor.DATA_KEY);
45
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
46
+ for (const propertyName of Object.getOwnPropertyNames(this)) {
47
+ this[propertyName] = null;
48
+ }
49
+ }
50
+
51
+ // Private
52
+ _queueCallback(callback, element, isAnimated = true) {
53
+ index_js.executeAfterTransition(callback, element, isAnimated);
54
+ }
55
+ _getConfig(config) {
56
+ config = this._mergeConfigObj(config, this._element);
57
+ config = this._configAfterMerge(config);
58
+ this._typeCheckConfig(config);
59
+ return config;
60
+ }
61
+
62
+ // Static
63
+ static getInstance(element) {
64
+ return Data.get(index_js.getElement(element), this.DATA_KEY);
65
+ }
66
+ static getOrCreateInstance(element, config = {}) {
67
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
68
+ }
69
+ static get VERSION() {
70
+ return VERSION;
71
+ }
72
+ static get DATA_KEY() {
73
+ return `bs.${this.NAME}`;
74
+ }
75
+ static get EVENT_KEY() {
76
+ return `.${this.DATA_KEY}`;
77
+ }
78
+ static eventName(name) {
79
+ return `${name}${this.EVENT_KEY}`;
80
+ }
81
+ }
82
+
83
+ return BaseComponent;
84
+
85
+ }));
86
+ //# sourceMappingURL=base-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.8'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n // Private\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAO;;EAEvB;EACA;EACA;;EAEA,MAAMC,aAAa,SAASC,MAAM,CAAC;EACjCC,EAAAA,WAAWA,CAACC,OAAO,EAAEC,MAAM,EAAE;EAC3B,IAAA,KAAK,EAAE;EAEPD,IAAAA,OAAO,GAAGE,mBAAU,CAACF,OAAO,CAAC;MAC7B,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA;EACF,IAAA;MAEA,IAAI,CAACG,QAAQ,GAAGH,OAAO;MACvB,IAAI,CAACI,OAAO,GAAG,IAAI,CAACC,UAAU,CAACJ,MAAM,CAAC;EAEtCK,IAAAA,IAAI,CAACC,GAAG,CAAC,IAAI,CAACJ,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,EAAE,IAAI,CAAC;EAC1D,EAAA;;EAEA;EACAC,EAAAA,OAAOA,GAAG;EACRH,IAAAA,IAAI,CAACI,MAAM,CAAC,IAAI,CAACP,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,CAAC;EACrDG,IAAAA,YAAY,CAACC,GAAG,CAAC,IAAI,CAACT,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACc,SAAS,CAAC;MAE3D,KAAK,MAAMC,YAAY,IAAIC,MAAM,CAACC,mBAAmB,CAAC,IAAI,CAAC,EAAE;EAC3D,MAAA,IAAI,CAACF,YAAY,CAAC,GAAG,IAAI;EAC3B,IAAA;EACF,EAAA;;EAEA;IACAG,cAAcA,CAACC,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,GAAG,IAAI,EAAE;EACnDC,IAAAA,+BAAsB,CAACF,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,CAAC;EACvD,EAAA;IAEAd,UAAUA,CAACJ,MAAM,EAAE;MACjBA,MAAM,GAAG,IAAI,CAACoB,eAAe,CAACpB,MAAM,EAAE,IAAI,CAACE,QAAQ,CAAC;EACpDF,IAAAA,MAAM,GAAG,IAAI,CAACqB,iBAAiB,CAACrB,MAAM,CAAC;EACvC,IAAA,IAAI,CAACsB,gBAAgB,CAACtB,MAAM,CAAC;EAC7B,IAAA,OAAOA,MAAM;EACf,EAAA;;EAEA;IACA,OAAOuB,WAAWA,CAACxB,OAAO,EAAE;EAC1B,IAAA,OAAOM,IAAI,CAACmB,GAAG,CAACvB,mBAAU,CAACF,OAAO,CAAC,EAAE,IAAI,CAACQ,QAAQ,CAAC;EACrD,EAAA;IAEA,OAAOkB,mBAAmBA,CAAC1B,OAAO,EAAEC,MAAM,GAAG,EAAE,EAAE;MAC/C,OAAO,IAAI,CAACuB,WAAW,CAACxB,OAAO,CAAC,IAAI,IAAI,IAAI,CAACA,OAAO,EAAE,OAAOC,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,IAAI,CAAC;EACnG,EAAA;IAEA,WAAWL,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO;EAChB,EAAA;IAEA,WAAWY,QAAQA,GAAG;EACpB,IAAA,OAAO,CAAA,GAAA,EAAM,IAAI,CAACmB,IAAI,CAAA,CAAE;EAC1B,EAAA;IAEA,WAAWd,SAASA,GAAG;EACrB,IAAA,OAAO,CAAA,CAAA,EAAI,IAAI,CAACL,QAAQ,CAAA,CAAE;EAC5B,EAAA;IAEA,OAAOoB,SAASA,CAACC,IAAI,EAAE;EACrB,IAAA,OAAO,GAAGA,IAAI,CAAA,EAAG,IAAI,CAAChB,SAAS,CAAA,CAAE;EACnC,EAAA;EACF;;;;;;;;"}
@@ -0,0 +1,79 @@
1
+ /*!
2
+ * Bootstrap button.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 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('./base-component.js'), require('./dom/event-handler.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.BaseComponent, global.EventHandler, global.Index));
10
+ })(this, (function (BaseComponent, EventHandler, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap button.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'button';
25
+ const DATA_KEY = 'bs.button';
26
+ const EVENT_KEY = `.${DATA_KEY}`;
27
+ const DATA_API_KEY = '.data-api';
28
+ const CLASS_NAME_ACTIVE = 'active';
29
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
30
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
31
+
32
+ /**
33
+ * Class definition
34
+ */
35
+
36
+ class Button extends BaseComponent {
37
+ // Getters
38
+ static get NAME() {
39
+ return NAME;
40
+ }
41
+
42
+ // Public
43
+ toggle() {
44
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
45
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
46
+ }
47
+
48
+ // Static
49
+ static jQueryInterface(config) {
50
+ return this.each(function () {
51
+ const data = Button.getOrCreateInstance(this);
52
+ if (config === 'toggle') {
53
+ data[config]();
54
+ }
55
+ });
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Data API implementation
61
+ */
62
+
63
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
64
+ event.preventDefault();
65
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE);
66
+ const data = Button.getOrCreateInstance(button);
67
+ data.toggle();
68
+ });
69
+
70
+ /**
71
+ * jQuery
72
+ */
73
+
74
+ index_js.defineJQueryPlugin(Button);
75
+
76
+ return Button;
77
+
78
+ }));
79
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","jQueryInterface","config","each","data","getOrCreateInstance","EventHandler","on","document","event","preventDefault","button","target","closest","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAMA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,QAAQ;EACrB,MAAMC,QAAQ,GAAG,WAAW;EAC5B,MAAMC,SAAS,GAAG,CAAA,CAAA,EAAID,QAAQ,CAAA,CAAE;EAChC,MAAME,YAAY,GAAG,WAAW;EAEhC,MAAMC,iBAAiB,GAAG,QAAQ;EAClC,MAAMC,oBAAoB,GAAG,2BAA2B;EACxD,MAAMC,oBAAoB,GAAG,CAAA,KAAA,EAAQJ,SAAS,CAAA,EAAGC,YAAY,CAAA,CAAE;;EAE/D;EACA;EACA;;EAEA,MAAMI,MAAM,SAASC,aAAa,CAAC;EACjC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI;EACb,EAAA;;EAEA;EACAS,EAAAA,MAAMA,GAAG;EACP;EACA,IAAA,IAAI,CAACC,QAAQ,CAACC,YAAY,CAAC,cAAc,EAAE,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACH,MAAM,CAACL,iBAAiB,CAAC,CAAC;EAC/F,EAAA;;EAEA;IACA,OAAOS,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAAC,IAAI,CAAC;QAE7C,IAAIH,MAAM,KAAK,QAAQ,EAAE;EACvBE,QAAAA,IAAI,CAACF,MAAM,CAAC,EAAE;EAChB,MAAA;EACF,IAAA,CAAC,CAAC;EACJ,EAAA;EACF;;EAEA;EACA;EACA;;EAEAI,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEd,oBAAoB,EAAED,oBAAoB,EAAEgB,KAAK,IAAI;IAC7EA,KAAK,CAACC,cAAc,EAAE;IAEtB,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAM,CAACC,OAAO,CAACpB,oBAAoB,CAAC;EACzD,EAAA,MAAMW,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAACM,MAAM,CAAC;IAE/CP,IAAI,CAACP,MAAM,EAAE;EACf,CAAC,CAAC;;EAEF;EACA;EACA;;AAEAiB,6BAAkB,CAACnB,MAAM,CAAC;;;;;;;;"}
@@ -0,0 +1,388 @@
1
+ /*!
2
+ * Bootstrap carousel.js v5.3.8 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 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('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./util/index.js'), require('./util/swipe.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/index', './util/swipe'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.BaseComponent, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Index, global.Swipe));
10
+ })(this, (function (BaseComponent, EventHandler, Manipulator, SelectorEngine, index_js, Swipe) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap carousel.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'carousel';
25
+ const DATA_KEY = 'bs.carousel';
26
+ const EVENT_KEY = `.${DATA_KEY}`;
27
+ const DATA_API_KEY = '.data-api';
28
+ const ARROW_LEFT_KEY = 'ArrowLeft';
29
+ const ARROW_RIGHT_KEY = 'ArrowRight';
30
+ const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
31
+
32
+ const ORDER_NEXT = 'next';
33
+ const ORDER_PREV = 'prev';
34
+ const DIRECTION_LEFT = 'left';
35
+ const DIRECTION_RIGHT = 'right';
36
+ const EVENT_SLIDE = `slide${EVENT_KEY}`;
37
+ const EVENT_SLID = `slid${EVENT_KEY}`;
38
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;
39
+ const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`;
40
+ const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`;
41
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY}`;
42
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`;
43
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
44
+ const CLASS_NAME_CAROUSEL = 'carousel';
45
+ const CLASS_NAME_ACTIVE = 'active';
46
+ const CLASS_NAME_SLIDE = 'slide';
47
+ const CLASS_NAME_END = 'carousel-item-end';
48
+ const CLASS_NAME_START = 'carousel-item-start';
49
+ const CLASS_NAME_NEXT = 'carousel-item-next';
50
+ const CLASS_NAME_PREV = 'carousel-item-prev';
51
+ const SELECTOR_ACTIVE = '.active';
52
+ const SELECTOR_ITEM = '.carousel-item';
53
+ const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
54
+ const SELECTOR_ITEM_IMG = '.carousel-item img';
55
+ const SELECTOR_INDICATORS = '.carousel-indicators';
56
+ const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
57
+ const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
58
+ const KEY_TO_DIRECTION = {
59
+ [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
60
+ [ARROW_RIGHT_KEY]: DIRECTION_LEFT
61
+ };
62
+ const Default = {
63
+ interval: 5000,
64
+ keyboard: true,
65
+ pause: 'hover',
66
+ ride: false,
67
+ touch: true,
68
+ wrap: true
69
+ };
70
+ const DefaultType = {
71
+ interval: '(number|boolean)',
72
+ // TODO:v6 remove boolean support
73
+ keyboard: 'boolean',
74
+ pause: '(string|boolean)',
75
+ ride: '(boolean|string)',
76
+ touch: 'boolean',
77
+ wrap: 'boolean'
78
+ };
79
+
80
+ /**
81
+ * Class definition
82
+ */
83
+
84
+ class Carousel extends BaseComponent {
85
+ constructor(element, config) {
86
+ super(element, config);
87
+ this._interval = null;
88
+ this._activeElement = null;
89
+ this._isSliding = false;
90
+ this.touchTimeout = null;
91
+ this._swipeHelper = null;
92
+ this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
93
+ this._addEventListeners();
94
+ if (this._config.ride === CLASS_NAME_CAROUSEL) {
95
+ this.cycle();
96
+ }
97
+ }
98
+
99
+ // Getters
100
+ static get Default() {
101
+ return Default;
102
+ }
103
+ static get DefaultType() {
104
+ return DefaultType;
105
+ }
106
+ static get NAME() {
107
+ return NAME;
108
+ }
109
+
110
+ // Public
111
+ next() {
112
+ this._slide(ORDER_NEXT);
113
+ }
114
+ nextWhenVisible() {
115
+ // FIXME TODO use `document.visibilityState`
116
+ // Don't call next when the page isn't visible
117
+ // or the carousel or its parent isn't visible
118
+ if (!document.hidden && index_js.isVisible(this._element)) {
119
+ this.next();
120
+ }
121
+ }
122
+ prev() {
123
+ this._slide(ORDER_PREV);
124
+ }
125
+ pause() {
126
+ if (this._isSliding) {
127
+ index_js.triggerTransitionEnd(this._element);
128
+ }
129
+ this._clearInterval();
130
+ }
131
+ cycle() {
132
+ this._clearInterval();
133
+ this._updateInterval();
134
+ this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
135
+ }
136
+ _maybeEnableCycle() {
137
+ if (!this._config.ride) {
138
+ return;
139
+ }
140
+ if (this._isSliding) {
141
+ EventHandler.one(this._element, EVENT_SLID, () => this.cycle());
142
+ return;
143
+ }
144
+ this.cycle();
145
+ }
146
+ to(index) {
147
+ const items = this._getItems();
148
+ if (index > items.length - 1 || index < 0) {
149
+ return;
150
+ }
151
+ if (this._isSliding) {
152
+ EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
153
+ return;
154
+ }
155
+ const activeIndex = this._getItemIndex(this._getActive());
156
+ if (activeIndex === index) {
157
+ return;
158
+ }
159
+ const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
160
+ this._slide(order, items[index]);
161
+ }
162
+ dispose() {
163
+ if (this._swipeHelper) {
164
+ this._swipeHelper.dispose();
165
+ }
166
+ super.dispose();
167
+ }
168
+
169
+ // Private
170
+ _configAfterMerge(config) {
171
+ config.defaultInterval = config.interval;
172
+ return config;
173
+ }
174
+ _addEventListeners() {
175
+ if (this._config.keyboard) {
176
+ EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
177
+ }
178
+ if (this._config.pause === 'hover') {
179
+ EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause());
180
+ EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle());
181
+ }
182
+ if (this._config.touch && Swipe.isSupported()) {
183
+ this._addTouchEventListeners();
184
+ }
185
+ }
186
+ _addTouchEventListeners() {
187
+ for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {
188
+ EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());
189
+ }
190
+ const endCallBack = () => {
191
+ if (this._config.pause !== 'hover') {
192
+ return;
193
+ }
194
+
195
+ // If it's a touch-enabled device, mouseenter/leave are fired as
196
+ // part of the mouse compatibility events on first tap - the carousel
197
+ // would stop cycling until user tapped out of it;
198
+ // here, we listen for touchend, explicitly pause the carousel
199
+ // (as if it's the second time we tap on it, mouseenter compat event
200
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
201
+ // events to fire) we explicitly restart cycling
202
+
203
+ this.pause();
204
+ if (this.touchTimeout) {
205
+ clearTimeout(this.touchTimeout);
206
+ }
207
+ this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
208
+ };
209
+ const swipeConfig = {
210
+ leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
211
+ rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
212
+ endCallback: endCallBack
213
+ };
214
+ this._swipeHelper = new Swipe(this._element, swipeConfig);
215
+ }
216
+ _keydown(event) {
217
+ if (/input|textarea/i.test(event.target.tagName)) {
218
+ return;
219
+ }
220
+ const direction = KEY_TO_DIRECTION[event.key];
221
+ if (direction) {
222
+ event.preventDefault();
223
+ this._slide(this._directionToOrder(direction));
224
+ }
225
+ }
226
+ _getItemIndex(element) {
227
+ return this._getItems().indexOf(element);
228
+ }
229
+ _setActiveIndicatorElement(index) {
230
+ if (!this._indicatorsElement) {
231
+ return;
232
+ }
233
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
234
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
235
+ activeIndicator.removeAttribute('aria-current');
236
+ const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
237
+ if (newActiveIndicator) {
238
+ newActiveIndicator.classList.add(CLASS_NAME_ACTIVE);
239
+ newActiveIndicator.setAttribute('aria-current', 'true');
240
+ }
241
+ }
242
+ _updateInterval() {
243
+ const element = this._activeElement || this._getActive();
244
+ if (!element) {
245
+ return;
246
+ }
247
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
248
+ this._config.interval = elementInterval || this._config.defaultInterval;
249
+ }
250
+ _slide(order, element = null) {
251
+ if (this._isSliding) {
252
+ return;
253
+ }
254
+ const activeElement = this._getActive();
255
+ const isNext = order === ORDER_NEXT;
256
+ const nextElement = element || index_js.getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
257
+ if (nextElement === activeElement) {
258
+ return;
259
+ }
260
+ const nextElementIndex = this._getItemIndex(nextElement);
261
+ const triggerEvent = eventName => {
262
+ return EventHandler.trigger(this._element, eventName, {
263
+ relatedTarget: nextElement,
264
+ direction: this._orderToDirection(order),
265
+ from: this._getItemIndex(activeElement),
266
+ to: nextElementIndex
267
+ });
268
+ };
269
+ const slideEvent = triggerEvent(EVENT_SLIDE);
270
+ if (slideEvent.defaultPrevented) {
271
+ return;
272
+ }
273
+ if (!activeElement || !nextElement) {
274
+ // Some weirdness is happening, so we bail
275
+ // TODO: change tests that use empty divs to avoid this check
276
+ return;
277
+ }
278
+ const isCycling = Boolean(this._interval);
279
+ this.pause();
280
+ this._isSliding = true;
281
+ this._setActiveIndicatorElement(nextElementIndex);
282
+ this._activeElement = nextElement;
283
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
284
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
285
+ nextElement.classList.add(orderClassName);
286
+ index_js.reflow(nextElement);
287
+ activeElement.classList.add(directionalClassName);
288
+ nextElement.classList.add(directionalClassName);
289
+ const completeCallBack = () => {
290
+ nextElement.classList.remove(directionalClassName, orderClassName);
291
+ nextElement.classList.add(CLASS_NAME_ACTIVE);
292
+ activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
293
+ this._isSliding = false;
294
+ triggerEvent(EVENT_SLID);
295
+ };
296
+ this._queueCallback(completeCallBack, activeElement, this._isAnimated());
297
+ if (isCycling) {
298
+ this.cycle();
299
+ }
300
+ }
301
+ _isAnimated() {
302
+ return this._element.classList.contains(CLASS_NAME_SLIDE);
303
+ }
304
+ _getActive() {
305
+ return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
306
+ }
307
+ _getItems() {
308
+ return SelectorEngine.find(SELECTOR_ITEM, this._element);
309
+ }
310
+ _clearInterval() {
311
+ if (this._interval) {
312
+ clearInterval(this._interval);
313
+ this._interval = null;
314
+ }
315
+ }
316
+ _directionToOrder(direction) {
317
+ if (index_js.isRTL()) {
318
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
319
+ }
320
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
321
+ }
322
+ _orderToDirection(order) {
323
+ if (index_js.isRTL()) {
324
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
325
+ }
326
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
327
+ }
328
+
329
+ // Static
330
+ static jQueryInterface(config) {
331
+ return this.each(function () {
332
+ const data = Carousel.getOrCreateInstance(this, config);
333
+ if (typeof config === 'number') {
334
+ data.to(config);
335
+ return;
336
+ }
337
+ if (typeof config === 'string') {
338
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
339
+ throw new TypeError(`No method named "${config}"`);
340
+ }
341
+ data[config]();
342
+ }
343
+ });
344
+ }
345
+ }
346
+
347
+ /**
348
+ * Data API implementation
349
+ */
350
+
351
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {
352
+ const target = SelectorEngine.getElementFromSelector(this);
353
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
354
+ return;
355
+ }
356
+ event.preventDefault();
357
+ const carousel = Carousel.getOrCreateInstance(target);
358
+ const slideIndex = this.getAttribute('data-bs-slide-to');
359
+ if (slideIndex) {
360
+ carousel.to(slideIndex);
361
+ carousel._maybeEnableCycle();
362
+ return;
363
+ }
364
+ if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
365
+ carousel.next();
366
+ carousel._maybeEnableCycle();
367
+ return;
368
+ }
369
+ carousel.prev();
370
+ carousel._maybeEnableCycle();
371
+ });
372
+ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
373
+ const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
374
+ for (const carousel of carousels) {
375
+ Carousel.getOrCreateInstance(carousel);
376
+ }
377
+ });
378
+
379
+ /**
380
+ * jQuery
381
+ */
382
+
383
+ index_js.defineJQueryPlugin(Carousel);
384
+
385
+ return Carousel;
386
+
387
+ }));
388
+ //# sourceMappingURL=carousel.js.map