@aarhus-university/au-designsystem-delphinus 0.34.10 → 0.34.12

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 (117) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/build/changelog.html +33 -1
  3. package/build/js/app.js +1 -1
  4. package/build/js/app.js.map +1 -1
  5. package/build/js/components/tabs.ts +63 -3
  6. package/build/projects/bachelor-applications/js/app.js +1 -1
  7. package/build/projects/bachelor-applications/js/app.js.map +1 -1
  8. package/build/projects/bachelor-applications/style.css +1 -1
  9. package/build/projects/bachelor-applications/style.css.map +1 -1
  10. package/build/projects/brightspace/style.css +1 -1
  11. package/build/projects/brightspace/style.css.map +1 -1
  12. package/build/projects/course-catalogue/js/app.js +1 -1
  13. package/build/projects/course-catalogue/js/app.js.map +1 -1
  14. package/build/projects/course-catalogue/style.css +1 -1
  15. package/build/projects/course-catalogue/style.css.map +1 -1
  16. package/build/projects/medarbejdere/js/app.js +1 -1
  17. package/build/projects/medarbejdere/js/app.js.map +1 -1
  18. package/build/projects/medarbejdere/style.css +1 -1
  19. package/build/projects/medarbejdere/style.css.map +1 -1
  20. package/build/projects/mitstudie/js/app.js +1 -1
  21. package/build/projects/mitstudie/js/app.js.map +1 -1
  22. package/build/projects/mitstudie/style.css +1 -1
  23. package/build/projects/mitstudie/style.css.map +1 -1
  24. package/build/projects/typo3/style.css +1 -1
  25. package/build/projects/typo3/style.css.map +2 -1
  26. package/build/style.css +1 -1
  27. package/build/style.css.map +1 -1
  28. package/package.json +1 -1
  29. package/source/assets/{demo/profile-pic-1.jpg → profile-images/originals/profile-image-1.jpg} +0 -0
  30. package/source/assets/{demo/profile-pic-10.jpg → profile-images/originals/profile-image-10.jpg} +0 -0
  31. package/source/assets/{demo/profile-pic-2.jpg → profile-images/originals/profile-image-2.jpg} +0 -0
  32. package/source/assets/{demo/profile-pic-3.jpg → profile-images/originals/profile-image-3.jpg} +0 -0
  33. package/source/assets/{demo/profile-pic-4.jpg → profile-images/originals/profile-image-4.jpg} +0 -0
  34. package/source/assets/{demo/profile-pic-5.jpg → profile-images/originals/profile-image-5.jpg} +0 -0
  35. package/source/assets/profile-images/originals/profile-image-6.jpg +0 -0
  36. package/source/assets/{demo/profile-pic-7.jpg → profile-images/originals/profile-image-7.jpg} +0 -0
  37. package/source/assets/{demo/profile-pic-8.jpg → profile-images/originals/profile-image-8.jpg} +0 -0
  38. package/source/assets/{demo/profile-pic-9.jpg → profile-images/originals/profile-image-9.jpg} +0 -0
  39. package/source/assets/profile-images/portrait/default/profile-image-1.jpg +0 -0
  40. package/source/assets/profile-images/portrait/default/profile-image-2.jpg +0 -0
  41. package/source/assets/profile-images/portrait/default/profile-image-3.jpg +0 -0
  42. package/source/assets/profile-images/portrait/default/profile-image-4.jpg +0 -0
  43. package/source/assets/profile-images/portrait/default/profile-image-5.jpg +0 -0
  44. package/source/assets/profile-images/portrait/default/profile-image-6.jpg +0 -0
  45. package/source/assets/profile-images/portrait/large/profile-image-1.jpg +0 -0
  46. package/source/assets/profile-images/portrait/large/profile-image-2.jpg +0 -0
  47. package/source/assets/profile-images/portrait/large/profile-image-3.jpg +0 -0
  48. package/source/assets/profile-images/portrait/large/profile-image-4.jpg +0 -0
  49. package/source/assets/profile-images/portrait/large/profile-image-5.jpg +0 -0
  50. package/source/assets/profile-images/portrait/large/profile-image-6.jpg +0 -0
  51. package/source/assets/profile-images/square/default/profile-image-1.jpg +0 -0
  52. package/source/assets/profile-images/square/default/profile-image-10.jpg +0 -0
  53. package/source/assets/profile-images/square/default/profile-image-2.jpg +0 -0
  54. package/source/assets/profile-images/square/default/profile-image-3.jpg +0 -0
  55. package/source/assets/profile-images/square/default/profile-image-4.jpg +0 -0
  56. package/source/assets/profile-images/square/default/profile-image-5.jpg +0 -0
  57. package/source/assets/profile-images/square/default/profile-image-6.jpg +0 -0
  58. package/source/assets/profile-images/square/default/profile-image-7.jpg +0 -0
  59. package/source/assets/profile-images/square/default/profile-image-8.jpg +0 -0
  60. package/source/assets/profile-images/square/default/profile-image-9.jpg +0 -0
  61. package/source/assets/profile-images/square/large/profile-image-1.jpg +0 -0
  62. package/source/assets/profile-images/square/large/profile-image-10.jpg +0 -0
  63. package/source/assets/profile-images/square/large/profile-image-2.jpg +0 -0
  64. package/source/assets/profile-images/square/large/profile-image-3.jpg +0 -0
  65. package/source/assets/profile-images/square/large/profile-image-4.jpg +0 -0
  66. package/source/assets/profile-images/square/large/profile-image-5.jpg +0 -0
  67. package/source/assets/profile-images/square/large/profile-image-6.jpg +0 -0
  68. package/source/assets/profile-images/square/large/profile-image-7.jpg +0 -0
  69. package/source/assets/profile-images/square/large/profile-image-8.jpg +0 -0
  70. package/source/assets/profile-images/square/large/profile-image-9.jpg +0 -0
  71. package/source/assets/profile-images/square/small/profile-image-1.jpg +0 -0
  72. package/source/assets/profile-images/square/small/profile-image-10.jpg +0 -0
  73. package/source/assets/profile-images/square/small/profile-image-2.jpg +0 -0
  74. package/source/assets/profile-images/square/small/profile-image-3.jpg +0 -0
  75. package/source/assets/profile-images/square/small/profile-image-4.jpg +0 -0
  76. package/source/assets/profile-images/square/small/profile-image-5.jpg +0 -0
  77. package/source/assets/profile-images/square/small/profile-image-6.jpg +0 -0
  78. package/source/assets/profile-images/square/small/profile-image-7.jpg +0 -0
  79. package/source/assets/profile-images/square/small/profile-image-8.jpg +0 -0
  80. package/source/assets/profile-images/square/small/profile-image-9.jpg +0 -0
  81. package/source/atoms/fonts/_fonts.scss +1 -1
  82. package/source/js/components/tabs.ts +63 -3
  83. package/source/markup/components/cards.pug +3 -3
  84. package/source/markup/components/profile-image.pug +10 -10
  85. package/source/markup/components/switch.pug +17 -4
  86. package/source/markup/components/tabbed-content.pug +10 -9
  87. package/source/projects/course-catalogue/markup/_course-details.pug +8 -8
  88. package/source/projects/typo3/employee-profiles/index.pug +12 -3
  89. package/source/projects/typo3/employee-profiles/mixins/_contact-list.pug +93 -73
  90. package/source/projects/typo3/employee-profiles/mixins/_person-profile.pug +4 -9
  91. package/source/projects/typo3/employee-profiles/mixins/_profile-header-variants.pug +79 -0
  92. package/source/projects/typo3/employee-profiles/mixins/_profile-header.pug +97 -59
  93. package/source/projects/typo3/employee-profiles/mixins/_pure-cards.pug +3 -3
  94. package/source/projects/typo3/employee-profiles/person-profile-framed-full-width.pug +1 -1
  95. package/source/projects/typo3/employee-profiles/person-profile-full-width-many-affiliations.pug +8 -0
  96. package/source/projects/typo3/employee-profiles/person-profile-full-width-vip.pug +1 -1
  97. package/source/projects/typo3/employee-profiles/profile-header-variants-framed.pug +8 -0
  98. package/source/projects/typo3/employee-profiles/profile-header-variants-left-menu.pug +9 -0
  99. package/source/projects/typo3/employee-profiles/profile-header-variants.pug +8 -0
  100. package/source/projects/typo3/style/_component-sass-variables.scss +3 -0
  101. package/source/projects/typo3/style/_contact-list.scss +27 -10
  102. package/source/projects/typo3/style/_person-profile.scss +0 -4
  103. package/source/projects/typo3/style/_profile-header.scss +453 -159
  104. package/source/projects/typo3/style/_typo3-overwrites.scss +29 -0
  105. package/source/projects/typo3/style.scss +1 -0
  106. package/source/projects/typo3/typo3-markup/_typo3-framed-header.pug +1 -0
  107. package/source/projects/typo3/typo3-markup/_typo3-header.pug +1 -1
  108. package/source/style/_mixins/_screenreader-only.scss +3 -2
  109. package/source/style/_sass-variables.scss +5 -0
  110. package/source/style/base/_forms.scss +1 -1
  111. package/source/style/module/_copy-to-clipboard.scss +1 -2
  112. package/source/style/module/_tabbed-content.scss +9 -1
  113. package/source/style/module/_toolbar.scss +5 -5
  114. package/source/assets/demo/profile-pic-6.jpg +0 -0
  115. package/source/assets/demo/profile-pic-odd-left.jpg +0 -0
  116. package/source/assets/demo/profile-pic-odd-right.jpg +0 -0
  117. package/source/projects/typo3/js/typo3.js +0 -47
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 0.34.12 (February 14, 2023)
2
+
3
+ ### Core Delphinus Updates
4
+ * Fixes an issue with positioning of submit button in `.form__inline-submit` that was introduced in 0.34.11
5
+ * Updates z-index of `.toolbar__popout`
6
+
7
+ ### Delphinus Projects Updates
8
+ #### Typo3
9
+ Fine tunings of `.profile-header` component:
10
+ * Optimize margins for various page layouts.
11
+ * Optimize for long emails and long subject-areas.
12
+ * Adds use of `<picture>` element for the profile picture, in order to serve the image resource in various sizes.
13
+
14
+ Optimized image sizes in cards.
15
+
16
+
17
+
18
+ ## 0.34.11 (February 10, 2023)
19
+
20
+ ### Core Delphinus Updates
21
+ * Adds javascript for [Tabbed Content](https://delphinus.au.dk/components/tabbed-content) component using [Switch](https://delphinus.au.dk/components/switch) component as tabs.
22
+
23
+ ### Delphinus Projects Updates
24
+ #### Typo3
25
+ * Many fine tunings of `.profile-header` component.
26
+
27
+
1
28
  ## 0.34.10 (February 1, 2023)
2
29
 
3
30
  ### Core Delphinus Updates
@@ -17,7 +17,39 @@ a(href="/components" class= active_nav_item=="components" ? "nav__item--active"
17
17
  a(href="/atom-fonts.html" class= active_nav_item=="atoms" ? "nav__item--active" : "").nav__item Atoms
18
18
  a(href="/code.html" class= active_nav_item=="code" ? "nav__item--active" : "").nav__item Code
19
19
  a(href="/projects" class= active_nav_item=="projects" ? "nav__item--active" : "").nav__item Projects
20
- a(href="/changelog.html" class= active_nav_item=="changelog" ? "nav__item--active" : "").nav__item Changelog--><!--button(title="Show full menu" aria-label="Show full menu" aria-haspopup="true" aria-expanded="false" aria-controls="nav-items-global").nav__toggle Menu--></div></nav></header><main class="page__content theme--normal" id="content"><div class="page__content__block"><h1> <strong>Changelog</strong></h1><div class="changelog"><h2>0.34.9 (February 1, 2023)</h2>
20
+ a(href="/changelog.html" class= active_nav_item=="changelog" ? "nav__item--active" : "").nav__item Changelog--><!--button(title="Show full menu" aria-label="Show full menu" aria-haspopup="true" aria-expanded="false" aria-controls="nav-items-global").nav__toggle Menu--></div></nav></header><main class="page__content theme--normal" id="content"><div class="page__content__block"><h1> <strong>Changelog</strong></h1><div class="changelog"><h2>0.34.12 (February 14, 2023)</h2>
21
+ <h3>Core Delphinus Updates</h3>
22
+ <ul>
23
+ <li>Fixes an issue with positioning of submit button in <code>.form__inline-submit</code> that was introduced in 0.34.11</li>
24
+ <li>Updates z-index of <code>.toolbar__popout</code></li>
25
+ </ul>
26
+ <h3>Delphinus Projects Updates</h3>
27
+ <h4>Typo3</h4>
28
+ <p>Fine tunings of <code>.profile-header</code> component:</p>
29
+ <ul>
30
+ <li>Optimize margins for various page layouts.</li>
31
+ <li>Optimize for long emails and long subject-areas.</li>
32
+ <li>Adds use of <code>&lt;picture&gt;</code> element for the profile picture, in order to serve the image resource in various sizes.</li>
33
+ </ul>
34
+ <p>Optimized image sizes in cards.</p>
35
+ <h2>0.34.11 (February 10, 2023)</h2>
36
+ <h3>Core Delphinus Updates</h3>
37
+ <ul>
38
+ <li>Adds javascript for <a href="https://delphinus.au.dk/components/tabbed-content">Tabbed Content</a> component using <a href="https://delphinus.au.dk/components/switch">Switch</a> component as tabs.</li>
39
+ </ul>
40
+ <h3>Delphinus Projects Updates</h3>
41
+ <h4>Typo3</h4>
42
+ <ul>
43
+ <li>Many fine tunings of <code>.profile-header</code> component.</li>
44
+ </ul>
45
+ <h2>0.34.10 (February 1, 2023)</h2>
46
+ <h3>Core Delphinus Updates</h3>
47
+ <ul>
48
+ <li>Fix issue where Fact list component would cause horizontal overflow i default viewport width.</li>
49
+ </ul>
50
+ <h3>Delphinus Projects Updates</h3>
51
+ <p>None</p>
52
+ <h2>0.34.9 (February 1, 2023)</h2>
21
53
  <h3>Core Delphinus Updates</h3>
22
54
  <ul>
23
55
  <li>Fix color in <code>.icon--heading</code></li>
package/build/js/app.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(t[c].hidden=!1,n){t[Array.prototype.indexOf.call(e,n)].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},p=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:p(t):e};let f=0;const v=[],b=()=>{v.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>v.push({domElement:e,rendered:!1})),b(),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const e=document.querySelectorAll(".nav:not(.nav--vertical)");e.forEach(t=>s(e,t)),i(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".content-toggle__content").forEach(e=>{((e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}})(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>m(p(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=p(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(m(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{f=window.innerWidth}),window.addEventListener("resize",()=>{f>0&&window.innerWidth!==f&&(f=window.innerWidth,e.forEach(t=>s(e,t)),b())})})}])}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.contains("switch__segment")?o.classList.add("switch__segment--active"):o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.contains("switch__segment")?n.classList.remove("switch__segment--active"):n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(Array.from(document.querySelectorAll(`[data-for="${t[c].id}"]`)).forEach(e=>{e.classList.add("tabbed-content-peripheral--active"),e.hidden=!1}),t[c].hidden=!1,n){const o=Array.prototype.indexOf.call(e,n);Array.from(document.querySelectorAll(`[data-for="${t[o].id}"]`)).forEach(e=>{e.classList.remove("tabbed-content-peripheral--active"),e.hidden=!0}),t[o].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},p=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:p(t):e};let f=0;const v=[],b=()=>{v.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".switch,.nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>v.push({domElement:e,rendered:!1})),b(),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const e=document.querySelectorAll(".nav:not(.nav--vertical)");e.forEach(t=>s(e,t)),i(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".content-toggle__content").forEach(e=>{((e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}})(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>m(p(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=p(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(m(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{f=window.innerWidth}),window.addEventListener("resize",()=>{f>0&&window.innerWidth!==f&&(f=window.innerWidth,e.forEach(t=>s(e,t)),b())})})}])}));
2
2
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","hidden","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","id","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAA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AAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzDuG","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n newTab.classList.add('nav__item--active');\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n oldTab.classList.remove('nav__item--active');\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","from","id","link","hidden","oldIndex","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS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kD,EAAmB,GAAKrI,OAAOuD,aAAe8E,IAChDA,EAAmBrI,OAAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzD2G","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /*let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n });*/\n let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n });*/\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
@@ -46,6 +46,27 @@ const destroyTabs = (tabbed: Element): void => {
46
46
  });
47
47
  };
48
48
 
49
+ const destroySwitches = (tabbed: Element): void => {
50
+ const switchlist = tabbed.querySelector('.switch');
51
+ const switches = switchlist?.querySelectorAll('a');
52
+ const panels: HTMLElement[] = [];
53
+ const sections = tabbed.querySelectorAll('section');
54
+ sections.forEach((section) => {
55
+ if (section.parentNode === tabbed) {
56
+ panels.push(section);
57
+ }
58
+ });
59
+ switches?.forEach((tab) => {
60
+ tab.removeAttribute('aria-selected');
61
+ tab.classList.remove('switch__segment--active');
62
+ });
63
+
64
+ panels.forEach((panel) => {
65
+ panel.hidden = false;
66
+ panel.removeAttribute('role');
67
+ });
68
+ };
69
+
49
70
  const switchTab = (
50
71
  tabs: NodeListOf<HTMLAnchorElement>,
51
72
  panels: HTMLElement[],
@@ -63,20 +84,58 @@ const switchTab = (
63
84
  newTab.removeAttribute('tabindex');
64
85
  // Set the selected state
65
86
  newTab.setAttribute('aria-selected', 'true');
66
- newTab.classList.add('nav__item--active');
87
+
88
+ // Check if switch // should this be more pretty?
89
+ if (newTab.classList.contains('switch__segment')) {
90
+ newTab.classList.add('switch__segment--active');
91
+ } else {
92
+ newTab.classList.add('nav__item--active');
93
+ }
94
+
67
95
  if (oldTab) {
68
96
  oldTab.removeAttribute('aria-selected');
69
97
  oldTab.setAttribute('tabindex', '-1');
70
- oldTab.classList.remove('nav__item--active');
98
+
99
+ if (oldTab.classList.contains('switch__segment')) {
100
+ oldTab.classList.remove('switch__segment--active');
101
+ } else {
102
+ oldTab.classList.remove('nav__item--active');
103
+ }
71
104
  }
72
105
 
73
106
  const index = Array.prototype.indexOf.call(tabs, newTab);
74
107
 
108
+ // More links
109
+ /*let moreLinks;
110
+ var moreLink: HTMLElement;
111
+ moreLinks = document.querySelectorAll(`[data-for="${panels[index].id}"]`);
112
+ moreLinks.forEach((moreLink) => {
113
+ moreLink.classList.add('tabbed-content-peripheral--active');
114
+ moreLink.hidden = false;
115
+ });*/
116
+ let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for="${panels[index].id}"]`));
117
+ moreLinks.forEach((link) => {
118
+ link.classList.add('tabbed-content-peripheral--active');
119
+ link.hidden = false;
120
+ });
121
+
75
122
  // Get the indices of the new and old tabs to find the correct
76
123
  // tab panels to show and hide
77
124
  panels[index].hidden = false;
78
125
  if (oldTab) {
79
126
  const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);
127
+
128
+ let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for="${panels[oldIndex].id}"]`));
129
+ oldMoreLinks.forEach((link) => {
130
+ link.classList.remove('tabbed-content-peripheral--active');
131
+ link.hidden = true;
132
+ });
133
+
134
+ /* moreLinks.forEach((moreLink) => {
135
+ moreLink.classList.remove('tabbed-content-peripheral--active');
136
+ moreLink.hidden = true;
137
+ });*/
138
+
80
139
  panels[oldIndex].hidden = true;
81
140
  }
82
141
 
@@ -96,7 +155,7 @@ const setTabbedContent = (
96
155
  // eslint-disable-next-line no-console
97
156
  callback = (index: number) => console.log(index),
98
157
  ): void => {
99
- const tablist = tabbed.querySelector('.nav__items') as HTMLElement;
158
+ const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;
100
159
  const tabs = tablist.querySelectorAll('a');
101
160
  const panels: HTMLElement[] = [];
102
161
  const sections = tabbed.querySelectorAll('section');
@@ -197,4 +256,5 @@ export {
197
256
  setTabbedContent,
198
257
  isBelowViewportLimit,
199
258
  destroyTabs,
259
+ destroySwitches,
200
260
  };
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(t[c].hidden=!1,n){t[Array.prototype.indexOf.call(e,n)].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},p=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:p(t):e};let f=0;const v=[],b=()=>{v.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>v.push({domElement:e,rendered:!1})),b(),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const e=document.querySelectorAll(".nav:not(.nav--vertical)");e.forEach(t=>s(e,t)),i(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".content-toggle__content").forEach(e=>{((e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}})(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>m(p(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=p(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(m(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{f=window.innerWidth}),window.addEventListener("resize",()=>{f>0&&window.innerWidth!==f&&(f=window.innerWidth,e.forEach(t=>s(e,t)),b())})})}])}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.contains("switch__segment")?o.classList.add("switch__segment--active"):o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.contains("switch__segment")?n.classList.remove("switch__segment--active"):n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(Array.from(document.querySelectorAll(`[data-for="${t[c].id}"]`)).forEach(e=>{e.classList.add("tabbed-content-peripheral--active"),e.hidden=!1}),t[c].hidden=!1,n){const o=Array.prototype.indexOf.call(e,n);Array.from(document.querySelectorAll(`[data-for="${t[o].id}"]`)).forEach(e=>{e.classList.remove("tabbed-content-peripheral--active"),e.hidden=!0}),t[o].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},p=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:p(t):e};let f=0;const v=[],b=()=>{v.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".switch,.nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>v.push({domElement:e,rendered:!1})),b(),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const e=document.querySelectorAll(".nav:not(.nav--vertical)");e.forEach(t=>s(e,t)),i(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".content-toggle__content").forEach(e=>{((e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}})(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>m(p(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=p(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(m(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{f=window.innerWidth}),window.addEventListener("resize",()=>{f>0&&window.innerWidth!==f&&(f=window.innerWidth,e.forEach(t=>s(e,t)),b())})})}])}));
2
2
  //# sourceMappingURL=app.js.map