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A6B,IAAZA,EAA0BA,EAAU,CAAC,GAE5CwM,iBAAiBC,YAAczM,EAAQwM,MAAQpR,SAErCmR,EAAOlR,iBAAiB,iCAChCK,SAAQ,SAACgR,GACnB,IAAI/R,EAAAA,UAAU+R,EAChB,IAEA,IAAMpQ,EAAeiQ,EAAOrR,cAAc,mCACtCoB,GACF,IAAIF,EAAAA,YAAYE,GAGlB,IAAMqQ,EAAgBJ,EAAOrR,cAC3B,qCAEEyR,GACF,IAAIlP,EAAAA,aAAakP,GAGnB,IAAMC,EAAgBL,EAAOrR,cAC3B,qCAEE0R,GACF,IAAIjN,EAAAA,aAAaiN,GAAe9D,OAGlC,IAAM+D,EAAUN,EAAOrR,cAAc,8BACjC2R,GACF,IAAIrM,EAAAA,OAAOqM,GAGMN,EAAOlR,iBAAiB,+BAChCK,SAAQ,SAACoR,GAClB,IAAIhL,EAAAA,QAAQgL,EACd,IAEA,IAAMC,EAAgBR,EAAOrR,cAC3B,qCAEE6R,GACF,IAAIxK,EAAAA,aAAawK,GAGnB,IAAMC,EAAUT,EAAOrR,cAAc,8BACjC8R,GACF,IAAIvJ,EAAAA,OAAOuJ,GAGKT,EAAOlR,iBAAiB,+BAChCK,SAAQ,SAACuR,GACjB,IAAIvJ,EAAAA,QAAQuJ,EACd,IAEuBV,EAAOlR,iBAC5B,sCAEaK,SAAQ,SAACwR,GACtB,IAAIhJ,EAAAA,cAAcgJ,EACpB,IAEyBX,EAAOlR,iBAC9B,uCAEeK,SAAQ,SAACyR,GACxB,IAAI1I,EAAAA,eAAe0I,EACrB,IAEmBZ,EAAOlR,iBAAiB,iCAChCK,SAAQ,SAAC0R,GAClB,IAAIpI,EAAAA,SAASoI,EACf,IAEcb,EAAOlR,iBAAiB,4BAChCK,SAAQ,SAAC2R,GACb,IAAI7H,EAAAA,KAAK6H,EACX,GACF,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/accordion/accordion.mjs","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs","webpack://TNAFrontend/./src/nationalarchives/components/error-summary/error-summary.mjs","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/search-filters/search-filters.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/all.mjs"],"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 if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","export class Accordion {\n  polyfillRequired = null;\n\n  constructor($module) {\n    this.$module = $module;\n    this.$firstDetailsElement =\n      $module && $module.querySelector(\".tna-accordion__details[name]\");\n    this.$detailsElements =\n      $module &&\n      this.$firstDetailsElement &&\n      document.querySelectorAll(\n        `.tna-accordion__details[name=\"${this.$firstDetailsElement.getAttribute(\"name\")}\"]`,\n      );\n    if (!this.$module || !this.$detailsElements) {\n      return;\n    }\n\n    Array.from(this.$detailsElements).forEach(($detailsElement) => {\n      $detailsElement.addEventListener(\"toggle\", (e) => {\n        const $thisDetailsElement = e.target;\n        if ($thisDetailsElement.hasAttribute(\"open\")) {\n          Array.from(this.$detailsElements)\n            .filter(\n              ($eachDetailsElement) =>\n                $eachDetailsElement !== $thisDetailsElement &&\n                $eachDetailsElement.hasAttribute(\"open\"),\n            )\n            .forEach(($eachDetailsElement) =>\n              $eachDetailsElement.removeAttribute(\"open\"),\n            );\n        }\n      });\n    });\n  }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n  constructor($module) {\n    this.$module = $module;\n    this.$breadcrumbsList =\n      $module && $module.querySelector(\".tna-breadcrumbs__list\");\n    this.$breadcrumbs =\n      $module &&\n      this.$breadcrumbsList &&\n      $module.querySelectorAll(\".tna-breadcrumbs__item\");\n\n    if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\n      return;\n    }\n\n    if (\n      this.$breadcrumbs.length > 2 &&\n      !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n    ) {\n      const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n      const $expandable = document.createElement(\"li\");\n      $expandable.classList.add(\n        \"tna-breadcrumbs__item\",\n        \"tna-breadcrumbs__item--expandable\",\n      );\n      $expandable.style.display = \"none\";\n\n      const $expandButton = document.createElement(\"button\");\n      $expandButton.classList.add(\"tna-breadcrumbs__link\");\n      $expandButton.innerHTML =\n        \"<span class='tna-!--visually-hidden'>Expand breadcrumbs</span>&hellip;\";\n      $expandButton.setAttribute(\"aria-expanded\", \"false\");\n      $expandButton.setAttribute(\"aria-controls\", uniqueId);\n      $expandButton.addEventListener(\"click\", () => {\n        this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n        $expandable.remove();\n        this.$module.setAttribute(\"tabindex\", \"0\");\n        this.$module.focus();\n        this.$module.setAttribute(\"tabindex\", \"-1\");\n      });\n\n      $expandable.appendChild($expandButton);\n\n      this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n      this.$breadcrumbsList.insertBefore(\n        $expandable,\n        this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n      );\n\n      this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n    }\n  }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n  constructor($module) {\n    this.$module = $module;\n    this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n    this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n    this.$prompt =\n      $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n    this.$acceptedMessage =\n      $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n    this.$rejectedMessage =\n      $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n    this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n    if (\n      !this.$module ||\n      !this.$acceptButton ||\n      !this.$rejectButton ||\n      !this.$prompt ||\n      !this.$acceptedMessage ||\n      !this.$rejectedMessage ||\n      !this.$closeButtons\n    ) {\n      return;\n    }\n\n    const policies = this.$module.getAttribute(\"data-policies\") || \"\";\n    const extraPolicies = policies\n      .split(\",\")\n      .filter((x) => x)\n      .map((policy) => policy.trim());\n    const domain = this.$module.getAttribute(\"data-domain\") || undefined;\n    const path = this.$module.getAttribute(\"data-path\") || undefined;\n    const secure = this.$module.getAttribute(\"data-secure\") || undefined;\n    const policiesKey =\n      this.$module.getAttribute(\"data-policieskey\") || undefined;\n\n    this.cookies = new Cookies({\n      extraPolicies,\n      domain,\n      path,\n      secure,\n      policiesKey,\n      newInstance: true,\n    });\n\n    this.cookiePreferencesSet =\n      this.$module.getAttribute(\"data-preferenceskey\") ||\n      \"cookie_preferences_set\";\n    const cookiePreferencesSet = this.cookies.hasValue(\n      this.cookiePreferencesSet,\n      \"true\",\n    );\n\n    if (!cookiePreferencesSet) {\n      this.$module.removeAttribute(\"hidden\");\n\n      this.$acceptButton.addEventListener(\"click\", () => this.accept());\n      this.$rejectButton.addEventListener(\"click\", () => this.reject());\n    }\n  }\n\n  accept() {\n    this.$prompt.setAttribute(\"hidden\", true);\n    this.complete();\n    this.$acceptedMessage.removeAttribute(\"hidden\");\n    this.$acceptedMessage.focus();\n    this.$acceptedMessage.setAttribute(\"tabindex\", \"-1\");\n    this.cookies.acceptAllPolicies();\n  }\n\n  reject() {\n    this.$prompt.setAttribute(\"hidden\", true);\n    this.complete();\n    this.$rejectedMessage.removeAttribute(\"hidden\");\n    this.$rejectedMessage.focus();\n    this.$rejectedMessage.setAttribute(\"tabindex\", \"-1\");\n    this.cookies.rejectAllPolicies();\n  }\n\n  complete() {\n    this.cookies.set(this.cookiePreferencesSet, true);\n    this.$closeButtons.forEach(($closeButton) => {\n      $closeButton.addEventListener(\"click\", () => this.close());\n    });\n  }\n\n  close() {\n    this.$module.setAttribute(\"hidden\", true);\n  }\n}\n","export class ErrorSummary {\n  constructor($module) {\n    this.$module = $module;\n  }\n\n  init() {\n    if (!this.$module) {\n      return;\n    }\n\n    const disableAutoFocus =\n      this.$module.getAttribute(\"data-disableautofocus\") === \"true\" ?? false;\n\n    if (!disableAutoFocus) {\n      this.setFocus(this.$module);\n    }\n  }\n\n  setFocus($element, options = {}) {\n    const isFocusable = $element.getAttribute(\"tabindex\");\n\n    if (!isFocusable) {\n      $element.setAttribute(\"tabindex\", \"-1\");\n    }\n\n    /**\n     * Handle element focus\n     */\n    function onFocus() {\n      $element.addEventListener(\"blur\", onBlur, { once: true });\n    }\n\n    /**\n     * Handle element blur\n     */\n    function onBlur() {\n      options.onBlur?.call($element);\n\n      if (!isFocusable) {\n        $element.removeAttribute(\"tabindex\");\n      }\n    }\n\n    // Add listener to reset element on blur, after focus\n    $element.addEventListener(\"focus\", onFocus, { once: true });\n\n    // Focus element\n    options.onBeforeFocus?.call($element);\n    $element.focus();\n  }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n  constructor($module) {\n    this.$module = $module;\n    this.$themeSelector =\n      $module && $module.querySelector(\".tna-footer__theme-selector\");\n    this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n    if (!this.$module || !this.$themeSelector || !this.$tnaTemplate) {\n      return;\n    }\n\n    this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n      \"button.tna-footer__theme-selector-button[value]\",\n    );\n\n    Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n      $themeSelectorButton.addEventListener(\"click\", (e) => {\n        const $button = e.target;\n        this.setTheme($button.value);\n        this.selectThemeSelectorButton($button);\n      });\n    });\n\n    this.cookies = new Cookies();\n    if (this.cookies.isPolicyAccepted(\"settings\")) {\n      this.showThemeSelector();\n    }\n    this.cookies.on(\"changePolicy\", (data) => {\n      if (Object.hasOwn(data, \"settings\")) {\n        if (data.settings === true) {\n          this.showThemeSelector();\n        } else {\n          this.cookies.delete(\"theme\");\n          this.hideThemeSelector();\n        }\n      }\n    });\n  }\n\n  showThemeSelector() {\n    this.$themeSelector.removeAttribute(\"hidden\");\n    if (this.cookies.exists(\"theme\")) {\n      const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n        ($button) => $button.value === this.cookies.get(\"theme\"),\n      );\n      if ($currentThemeButton) {\n        this.selectThemeSelectorButton($currentThemeButton);\n      }\n    }\n  }\n\n  hideThemeSelector() {\n    this.$themeSelector.setAttribute(\"hidden\", true);\n  }\n\n  setTheme(theme) {\n    if (theme === \"light\") {\n      this.$tnaTemplate.classList.remove(\n        \"tna-template--system-theme\",\n        \"tna-template--dark-theme\",\n      );\n    } else if (theme === \"dark\") {\n      this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n      this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n    } else if (theme === \"system\") {\n      this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n      this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n    } else {\n      return;\n    }\n    this.cookies.set(\"theme\", theme);\n  }\n\n  selectThemeSelectorButton($selectedButton) {\n    Array.from(this.$themeSelectorButtons).forEach(($button) => {\n      if ($button.value === $selectedButton.value) {\n        $button.classList.remove(\"tna-button--plain\");\n        $button.setAttribute(\"aria-current\", true);\n      } else {\n        $button.classList.add(\"tna-button--plain\");\n        $button.removeAttribute(\"aria-current\");\n      }\n    });\n  }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Gallery {\n  constructor($module) {\n    this.$module = $module;\n    this.$items = $module && $module.querySelector(\".tna-gallery__items\");\n    this.opened = false;\n\n    if (!this.$module || !this.$items) {\n      return;\n    }\n\n    const supportTouchHorizontal = false;\n\n    this.items = this.$module.querySelectorAll(\".tna-gallery__item\").length;\n\n    if (this.items > 1) {\n      const uniqueId = `tna-gallery-${uuidv4()}`;\n\n      this.$module.classList.add(\"tna-gallery--collapsed\");\n      this.$items.setAttribute(\"tabindex\", \"-1\");\n\n      this.$galleryToggle = document.createElement(\"button\");\n      this.$galleryToggle.classList.add(\n        \"tna-gallery__toggle\",\n        \"tna-button\",\n        \"tna-button--accent\",\n      );\n      this.$galleryToggle.setAttribute(\"aria-controls\", uniqueId);\n      this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n      this.$galleryToggle.innerText = `View ${this.items} images`;\n\n      const onFirstTouch = () => {\n        this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n        this.$module.classList.add(\"tna-gallery--touchable\");\n      };\n\n      if (supportTouchHorizontal) {\n        this.$module.addEventListener(\"touchstart\", onFirstTouch);\n      }\n\n      this.$galleryToggle.addEventListener(\"click\", () => {\n        if (supportTouchHorizontal) {\n          this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n        }\n        this.handleToggleGallery();\n      });\n\n      this.$galleryToggleWrapper = document.createElement(\"div\");\n      this.$galleryToggleWrapper.classList.add(\n        \"tna-column\",\n        \"tna-column--full\",\n        \"tna-gallery__toggle-wrapper\",\n      );\n\n      this.$galleryToggleWrapper.appendChild(this.$galleryToggle);\n      this.$items.parentElement.appendChild(this.$galleryToggleWrapper);\n\n      this.$items.setAttribute(\"id\", uniqueId);\n    }\n  }\n\n  handleToggleGallery() {\n    this.opened = !this.opened;\n    if (this.opened) {\n      this.$module.classList.remove(\"tna-gallery--collapsed\");\n      this.$galleryToggle.setAttribute(\"aria-expanded\", true);\n      this.$galleryToggle.innerText = \"Close images\";\n      this.$items.setAttribute(\"tabindex\", \"0\");\n      this.$items.focus();\n      this.$items.setAttribute(\"tabindex\", \"-1\");\n    } else {\n      this.$module.classList.add(\"tna-gallery--collapsed\");\n      this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n      this.$galleryToggle.innerText = `View ${this.items} images`;\n    }\n  }\n}\n","export class GlobalHeader {\n  constructor($module) {\n    this.$module = $module;\n    this.$toggleButton =\n      $module && $module.querySelector(\".tna-global-header__navigation-button\");\n    this.$navigation =\n      $module &&\n      $module.querySelector(\".tna-global-header__navigation-wrapper\");\n    this.$topNavigation =\n      $module &&\n      $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n    this.$links =\n      $module &&\n      ((this.$navigation &&\n        this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n        (this.$topNavigation &&\n          this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n    this.menuOpened = false;\n    this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n    if (\n      !this.$module ||\n      !this.$toggleButton ||\n      (!this.$navigation && !this.$topNavigation)\n    ) {\n      return;\n    }\n\n    this.$toggleButton.removeAttribute(\"hidden\");\n    this.syncState();\n    this.$toggleButton.addEventListener(\"click\", () =>\n      this.handleToggleNavigation(),\n    );\n    if (\"addEventListener\" in this.mql) {\n      this.mql.addEventListener(\"change\", () => this.syncState());\n    } else {\n      this.mql.addListener(() => this.syncState());\n    }\n\n    this.$navigation.addEventListener(\"keyup\", (e) => {\n      if (e.code === \"Escape\") {\n        this.menuOpened = false;\n        this.syncState();\n        this.$toggleButton.focus();\n      }\n    });\n    this.$topNavigation.addEventListener(\"keyup\", (e) => {\n      if (e.code === \"Escape\") {\n        this.menuOpened = false;\n        this.syncState();\n        this.$toggleButton.focus();\n      }\n    });\n  }\n\n  handleToggleNavigation() {\n    this.menuOpened = !this.menuOpened;\n    this.syncState();\n  }\n\n  syncState() {\n    if (this.mql.matches) {\n      if (this.menuOpened) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    } else {\n      this.show();\n    }\n  }\n\n  hide() {\n    if (this.$navigation) {\n      this.$navigation.hidden = true;\n      this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n    }\n    if (this.$topNavigation) {\n      this.$topNavigation.hidden = true;\n      this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n    }\n    this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n    this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n    this.$toggleButton.classList.remove(\n      \"tna-global-header__navigation-button--opened\",\n    );\n    for (let i = 0; i < this.$links.length; i++) {\n      this.$links[i].setAttribute(\"tabindex\", \"-1\");\n    }\n  }\n\n  show() {\n    if (this.$navigation) {\n      this.$navigation.hidden = false;\n      this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n    }\n    if (this.$topNavigation) {\n      this.$topNavigation.hidden = false;\n      this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n    }\n    this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n    this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n    this.$toggleButton.classList.add(\n      \"tna-global-header__navigation-button--opened\",\n    );\n    for (let i = 0; i < this.$links.length; i++) {\n      this.$links[i].setAttribute(\"tabindex\", \"0\");\n    }\n  }\n}\n","export class Header {\n  constructor($module) {\n    this.$module = $module;\n    this.$toggleButton =\n      $module && $module.querySelector(\".tna-header__navigation-toggle-button\");\n    this.$navigation =\n      $module && $module.querySelector(\".tna-header__navigation\");\n    this.$links =\n      $module &&\n      this.$navigation &&\n      this.$navigation.querySelectorAll(\"[tabindex='0']\");\n    this.menuOpened = false;\n    this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n    if (!this.$module || !this.$toggleButton || !this.$navigation) {\n      return;\n    }\n\n    this.$toggleButton.removeAttribute(\"hidden\");\n    this.syncState();\n    this.$toggleButton.addEventListener(\"click\", () =>\n      this.handleToggleNavigation(),\n    );\n    if (\"addEventListener\" in this.mql) {\n      this.mql.addEventListener(\"change\", () => this.syncState());\n    } else {\n      this.mql.addListener(() => this.syncState());\n    }\n\n    this.$navigation.addEventListener(\"keyup\", (e) => {\n      if (e.code === \"Escape\") {\n        this.menuOpened = false;\n        this.syncState();\n        this.$toggleButton.focus();\n      }\n    });\n  }\n\n  handleToggleNavigation() {\n    this.menuOpened = !this.menuOpened;\n    this.syncState();\n  }\n\n  syncState() {\n    if (this.mql.matches) {\n      if (this.menuOpened) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    } else {\n      this.show();\n    }\n  }\n\n  show() {\n    this.$navigation.classList.add(\"tna-header__navigation--open\");\n    this.$navigation.hidden = false;\n    this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n    this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n    this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n    this.$toggleButton.classList.add(\n      \"tna-header__navigation-toggle-button--opened\",\n    );\n\n    for (let i = 0; i < this.$links.length; i++) {\n      this.$links[i].setAttribute(\"tabindex\", \"0\");\n    }\n  }\n\n  hide() {\n    this.$navigation.classList.remove(\"tna-header__navigation--open\");\n    this.$navigation.hidden = true;\n    this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n    this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n    this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n    this.$toggleButton.classList.remove(\n      \"tna-header__navigation-toggle-button--opened\",\n    );\n\n    for (let i = 0; i < this.$links.length; i++) {\n      this.$links[i].setAttribute(\"tabindex\", \"-1\");\n    }\n  }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n  constructor($module) {\n    this.$module = $module;\n    this.$imageWrapper =\n      $module && $module.querySelector(\".tna-picture__image-wrapper\");\n    this.$transcript =\n      $module && $module.querySelector(\".tna-picture__transcript\");\n    this.transcriptOpened = false;\n\n    if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n      return;\n    }\n\n    this.openLabel =\n      this.$module.getAttribute(\"data-informationlabelopen\") ||\n      \"Open transcript\";\n    this.closeLabel =\n      this.$module.getAttribute(\"data-informationlabelclose\") ||\n      \"Close transcript\";\n\n    const uniqueId = `tna-picture-${uuidv4()}`;\n\n    this.$transcriptToggle = document.createElement(\"button\");\n    this.$transcriptToggle.classList.add(\n      \"tna-picture__toggle-transcript\",\n      \"tna-button\",\n      \"tna-button--small\",\n      \"tna-button--solid-hover\",\n    );\n    this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n    this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n    this.$transcriptToggle.innerText = this.openLabel;\n    this.$transcriptToggle.addEventListener(\"click\", () =>\n      this.handleToggleTranscript(),\n    );\n    this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n    this.$transcript.setAttribute(\"id\", uniqueId);\n    this.$transcript.setAttribute(\"hidden\", true);\n  }\n\n  handleToggleTranscript() {\n    this.transcriptOpened = !this.transcriptOpened;\n    if (this.transcriptOpened) {\n      this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n      this.$transcriptToggle.innerText = this.closeLabel;\n      this.$transcript.removeAttribute(\"hidden\");\n    } else {\n      this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n      this.$transcriptToggle.innerText = this.openLabel;\n      this.$transcript.setAttribute(\"hidden\", true);\n    }\n  }\n}\n","export class SearchFilters {\n  constructor($module) {\n    this.$module = $module;\n\n    if (!this.$module) {\n      return;\n    }\n\n    this.$module.classList.add(\"tna-search-filters--js-enabled\");\n\n    Array.from(\n      this.$module.querySelectorAll(\".tna-search-filters__fieldset\"),\n    ).forEach(($fieldset) => {\n      // const type = $fieldset.dataset.type;\n      const $toggle = $fieldset.querySelector(\n        \".tna-search-filters__item-toggle\",\n      );\n      const $headingInner = $fieldset.querySelector(\n        \".tna-search-filters__heading-inner\",\n      );\n      const $item = $fieldset.querySelector(\".tna-search-filters__item\");\n\n      if (!$toggle || !$headingInner || !$item) {\n        return;\n      }\n\n      $toggle.removeAttribute(\"hidden\");\n      $headingInner.remove();\n\n      this.syncItem($toggle, $item);\n\n      $toggle.addEventListener(\"click\", () => {\n        this.toggleItem($toggle, $item);\n      });\n\n      // if (type === \"multiple\") {\n      //   const $count = $toggle.querySelector(\n      //     \".tna-search-filters__item-toggle-info\",\n      //   );\n      //   if ($count) {\n      //     $item.addEventListener(\"change\", () => {\n      //       const selected = Array.from(\n      //         $item.querySelectorAll('input[type=\"checkbox\"]:checked'),\n      //       ).length;\n      //       $count.innerText = selected ? `(${selected} selected)` : \"\";\n      //     });\n      //   }\n      // }\n    });\n  }\n\n  toggleItem($toggle, $item) {\n    $toggle.setAttribute(\n      \"aria-expanded\",\n      $toggle.getAttribute(\"aria-expanded\") == \"false\",\n    );\n    this.syncItem($toggle, $item);\n  }\n\n  syncItem($toggle, $item) {\n    if ($toggle.getAttribute(\"aria-expanded\") == \"true\") {\n      $item.removeAttribute(\"hidden\");\n    } else {\n      $item.setAttribute(\"hidden\", true);\n    }\n  }\n}\n","export class SensitiveImage {\n  constructor($module) {\n    this.$module = $module;\n    this.$imageDetails =\n      $module && $module.querySelector(\".tna-sensitive-image__details\");\n    this.$image =\n      $module && $module.querySelector(\".tna-sensitive-image__image\");\n    this.imageIsVisible = false;\n\n    if (!this.$module || !this.$imageDetails || !this.$image) {\n      return;\n    }\n    this.$imageDetails.addEventListener(\"toggle\", () =>\n      this.handleImageDetailsToggle(),\n    );\n  }\n\n  handleImageDetailsToggle() {\n    if (this.$imageDetails.hasAttribute(\"open\")) {\n      this.$image.focus({ preventScroll: true, focusVisible: true });\n    }\n  }\n}\n","export class SkipLink {\n  linkedElementListener = false;\n\n  constructor($module) {\n    this.$module = $module;\n    this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n    this.$linkedElement =\n      $module &&\n      this.linkedElementId &&\n      document.getElementById(this.linkedElementId);\n\n    if (!this.$module || !this.$linkedElement) {\n      return;\n    }\n    this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n  }\n\n  focusLinkedElement() {\n    if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n      this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n      this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n      if (!this.linkedElementListener) {\n        this.$linkedElement.addEventListener(\"blur\", () =>\n          this.removeFocusProperties(),\n        );\n        this.linkedElementListener = true;\n      }\n    }\n\n    this.$linkedElement.focus();\n  }\n\n  removeFocusProperties() {\n    this.$linkedElement.removeAttribute(\"tabindex\");\n    this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n  }\n}\n","export class Tabs {\n  constructor($module) {\n    this.$module = $module;\n    this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n    this.$tabListItemLinks =\n      $module &&\n      this.$tabList &&\n      $module.querySelectorAll(\".tna-tabs__list-item-link\");\n    this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n\n    if (\n      !this.$module ||\n      !this.$tabList ||\n      !this.$tabListItemLinks ||\n      !this.$tabItems ||\n      this.$tabListItemLinks.length !== this.$tabItems.length\n    ) {\n      return;\n    }\n\n    this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n    const startingTarget = window.location.hash.replace(/^#/, \"\");\n    const doesStartingTargetExist = [...this.$tabItems].some(\n      ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n    );\n\n    this.$newTabList = document.createElement(\"div\");\n    this.$newTabList.setAttribute(\"role\", \"tablist\");\n    this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n    this.$tabItems.forEach(($tabItem, index) => {\n      $tabItem.setAttribute(\"role\", \"tabpanel\");\n      $tabItem.setAttribute(\n        \"aria-labelledby\",\n        `${$tabItem.getAttribute(\"id\")}-tab`,\n      );\n      $tabItem.setAttribute(\"tabindex\", \"0\");\n      if (\n        (doesStartingTargetExist &&\n          $tabItem.getAttribute(\"id\") !== startingTarget) ||\n        (!doesStartingTargetExist && index > 0)\n      ) {\n        $tabItem.setAttribute(\"hidden\", true);\n      }\n    });\n\n    this.$tabListItemLinks.forEach(($tabListItemLink) => {\n      const $replacementButton = document.createElement(\"button\");\n      $replacementButton.innerText = $tabListItemLink.innerText;\n      $replacementButton.setAttribute(\n        \"class\",\n        $tabListItemLink.getAttribute(\"class\"),\n      );\n      $replacementButton.setAttribute(\"role\", \"tab\");\n      $replacementButton.setAttribute(\n        \"id\",\n        $tabListItemLink.getAttribute(\"id\"),\n      );\n      $replacementButton.setAttribute(\n        \"aria-controls\",\n        $tabListItemLink.getAttribute(\"href\")?.replace(/^#/, \"\"),\n      );\n      $replacementButton.setAttribute(\"tabindex\", \"-1\");\n      this.$newTabList.appendChild($replacementButton);\n    });\n\n    this.$tabList.replaceWith(this.$newTabList);\n\n    this.$tabListItemLinks = this.$module.querySelectorAll(\n      \".tna-tabs__list-item-link\",\n    );\n\n    this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n      if (\n        (startingTarget &&\n          $tabListItemLink.getAttribute(\"aria-controls\") ===\n            `${startingTarget}`) ||\n        (!startingTarget && index === 0)\n      ) {\n        $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n        $tabListItemLink.setAttribute(\"aria-selected\", true);\n        $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n      } else {\n        $tabListItemLink.setAttribute(\"aria-selected\", false);\n      }\n\n      $tabListItemLink.addEventListener(\n        \"keydown\",\n        (e) => this.handleItemLinkKeyDown(e),\n        true,\n      );\n      $tabListItemLink.addEventListener(\n        \"click\",\n        (e) => this.handleItemLinkClick(e),\n        true,\n      );\n    });\n  }\n\n  handleItemLinkClick(itemLinkClickEvent) {\n    itemLinkClickEvent.preventDefault();\n    const targetItem =\n      itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n    this.switchTab(targetItem);\n  }\n\n  handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n    const targetItem = itemLinkKeyDownEvent.currentTarget;\n    let overwriteKeyAction = false;\n\n    switch (itemLinkKeyDownEvent.key) {\n      case \"ArrowLeft\":\n      case \"ArrowUp\":\n        this.setSelectedToPreviousTab(targetItem);\n        overwriteKeyAction = true;\n        break;\n\n      case \"ArrowRight\":\n      case \"ArrowDown\":\n        this.setSelectedToNextTab(targetItem);\n        overwriteKeyAction = true;\n        break;\n\n      case \"Home\":\n        this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n        overwriteKeyAction = true;\n        break;\n\n      case \"End\":\n        this.switchTab(\n          this.$tabListItemLinks[\n            this.$tabListItemLinks.length - 1\n          ].getAttribute(\"aria-controls\"),\n        );\n        overwriteKeyAction = true;\n        break;\n\n      default:\n        break;\n    }\n\n    if (overwriteKeyAction) {\n      itemLinkKeyDownEvent.stopPropagation();\n      itemLinkKeyDownEvent.preventDefault();\n    }\n  }\n\n  setSelectedToNextTab(targetItem) {\n    const currentIndex = [...this.$tabListItemLinks].findIndex(\n      ($tabListItemLink) =>\n        $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n    );\n    let newIndex;\n    if (currentIndex < this.$tabListItemLinks.length - 1) {\n      newIndex = currentIndex + 1;\n    } else {\n      newIndex = 0;\n    }\n    this.switchTab(\n      this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n    );\n  }\n\n  setSelectedToPreviousTab(targetItem) {\n    const currentIndex = [...this.$tabListItemLinks].findIndex(\n      ($tabListItemLink) =>\n        $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n    );\n    let newIndex;\n    if (currentIndex >= 1) {\n      newIndex = currentIndex - 1;\n    } else {\n      newIndex = this.$tabListItemLinks.length - 1;\n    }\n    this.switchTab(\n      this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n    );\n  }\n\n  switchTab(targetId) {\n    this.$tabListItemLinks.forEach(($tabListItemLink) => {\n      if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n        $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n        $tabListItemLink.setAttribute(\"aria-selected\", true);\n        $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n        $tabListItemLink.focus();\n      } else {\n        $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n        $tabListItemLink.setAttribute(\"aria-selected\", false);\n        $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n      }\n    });\n\n    this.$tabItems.forEach(($tabItem) => {\n      if ($tabItem.getAttribute(\"id\") === targetId) {\n        $tabItem.removeAttribute(\"hidden\");\n        $tabItem.setAttribute(\"tabindex\", \"0\");\n      } else {\n        $tabItem.setAttribute(\"hidden\", true);\n        $tabItem.setAttribute(\"tabindex\", \"-1\");\n      }\n    });\n\n    if (this.sticky) {\n      if (history.replaceState) {\n        history.replaceState(null, null, `#${targetId}`);\n      } else {\n        location.hash = `#${targetId}`;\n      }\n    }\n  }\n}\n","window.TNAFrontendCookies = window.TNAFrontendCookies || null;\nwindow.TNAFrontendCookieEvents = window.TNAFrontendCookieEvents || null;\n\nexport class CookieEventHandler {\n  events = {};\n  oneTimeEvents = {};\n\n  constructor() {\n    if (window.TNAFrontendCookieEvents) {\n      return window.TNAFrontendCookieEvents;\n    }\n    window.TNAFrontendCookieEvents = this;\n  }\n\n  /**\n   * Add an event listener.\n   * @param {String} event - The event to add a listener for.\n   * @param {Function} callback - The callback function to call when the event is triggered.\n   */\n  on(event, callback) {\n    if (!Object.hasOwn(this.events, event)) {\n      this.events[event] = [];\n    }\n    this.events[event] = [...this.events[event], callback];\n  }\n\n  once(event, callback) {\n    if (!Object.hasOwn(this.oneTimeEvents, event)) {\n      this.oneTimeEvents[event] = [];\n    }\n    this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n  }\n\n  /** @protected */\n  trigger(event, data = {}) {\n    if (Object.hasOwn(this.events, event)) {\n      this.events[event].forEach((eventToTrigger) =>\n        eventToTrigger.call(this, data),\n      );\n    }\n    if (Object.hasOwn(this.oneTimeEvents, event)) {\n      for (let i = this.oneTimeEvents[event].length - 1; i >= 0; i--) {\n        const eventToTrigger = this.oneTimeEvents[event][i];\n        eventToTrigger.call(this, data);\n        this.oneTimeEvents[event].splice(i, 1);\n      }\n    }\n  }\n}\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n  /** @protected */\n  extraPolicies = [];\n  /** @protected */\n  domain = \"\";\n  /** @protected */\n  path = \"\";\n  /** @protected */\n  secure = true;\n  /** @protected */\n  policiesKey = \"\";\n  /** @protected */\n  events = null;\n\n  /**\n   * Create a cookie handler.\n   * @param {String} [options.extraPolicies=[]] - The extra cookie policies to manage in addition to essential, settings and usage.\n   * @param {String} [options.domain=\"\"] - The domain to register the cookie with.\n   * @param {String} [options.path=\"\"] - The domain to register the cookie with.\n   * @param {String} [options.secure=true] - Only set cookie in HTTPS environments.\n   * @param {String} [options.policiesKey=\"cookies_policy\"] - The name of the cookie.\n   * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n   */\n  constructor(options = {}) {\n    const {\n      extraPolicies = [],\n      domain = \"\",\n      path = \"/\",\n      secure = true,\n      policiesKey = \"cookies_policy\",\n      newInstance = false,\n    } = options;\n    if (newInstance) {\n      this.destroyInstance();\n    } else if (window.TNAFrontendCookies) {\n      return window.TNAFrontendCookies;\n    }\n    this.extraPolicies = extraPolicies;\n    this.domain = domain;\n    this.path = path;\n    this.secure = secure;\n    this.policiesKey = policiesKey;\n    this.events = new CookieEventHandler();\n    this.init();\n    window.TNAFrontendCookies = this;\n  }\n\n  /** @protected */\n  init() {\n    this.savePolicies({\n      ...Object.fromEntries(\n        this.extraPolicies.map((k) => [k.toLowerCase(), false]),\n      ),\n      usage: false,\n      settings: false,\n      ...this.policies,\n      essential: true,\n    });\n  }\n\n  destroyInstance() {\n    window.TNAFrontendCookies = null;\n  }\n\n  /** @protected */\n  get all() {\n    const deserialised = {};\n    document.cookie\n      .split(\"; \")\n      .filter((x) => x)\n      .forEach((cookie) => {\n        const parts = cookie.trim().split(\"=\");\n        if (parts[0]) {\n          deserialised[parts[0]] = parts[1];\n        }\n      });\n    return deserialised;\n  }\n\n  /** @protected */\n  get policies() {\n    try {\n      return JSON.parse(this.get(this.policiesKey) || \"{}\");\n    } catch (e) {\n      return {};\n    }\n  }\n\n  /**\n   * Check to see whether a cookie exists or not.\n   * @param {String} key - The cookie name.\n   * @returns {Boolean}\n   */\n  exists(key) {\n    return Object.hasOwn(this.all, key);\n  }\n\n  /**\n   * Check to see whether a cookie has a particular value.\n   * @param {String} key - The cookie name.\n   * @param {String|Number|Boolean} value - The value to check against.\n   * @returns\n   */\n  hasValue(key, value) {\n    return this.get(key) == value;\n  }\n\n  /**\n   * Get a cookie.\n   * @param {String} key - The cookie name.\n   * @returns {String|Number|Boolean}\n   */\n  get(key) {\n    return this.exists(key) ? decodeURIComponent(this.all[key]) : null;\n  }\n\n  /**\n   * Set a cookie.\n   * @param {String} key - The cookie name.\n   * @param {String|Number|Boolean} value - The cookie value.\n   * @param {Object} options\n   * @param {Number} [options.maxAge=31536000] - The maximum age of the cookie in seconds.\n   * @param {String} [options.path=/] - The path to register the cookie for.\n   * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n   * @param {String} [options.domain=this.domain] - The domain to register the cookie with.\n   * @param {String} [options.path=this.path] - The path to register the cookie with.\n   * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n   */\n  set(key, value, options = {}) {\n    const {\n      maxAge = 60 * 60 * 24 * 365,\n      sameSite = \"Lax\",\n      domain = this.domain,\n      path = this.path,\n      secure = this.secure,\n    } = options;\n    if (!key) {\n      return;\n    }\n    const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n      domain ? ` domain=${domain}; ` : \"\"\n    } samesite=${sameSite}; path=${path}; max-age=${maxAge}${\n      secure ? \"; secure\" : \"\"\n    }`;\n    document.cookie = cookie;\n    this.events.trigger(\"setCookie\", {\n      key,\n      value,\n      maxAge,\n      path,\n      sameSite,\n      domain,\n      secure,\n      cookie,\n    });\n  }\n\n  /**\n   * Delete a cookie.\n   * @param {String} key - The cookie name.\n   * @param {String} [path=/] - The path to the cookie is registered on.\n   */\n  delete(key, path = \"/\", domain = null) {\n    const options = { maxAge: -1, path, domain: domain || undefined };\n    this.set(key, \"\", options);\n    this.events.trigger(\"deleteCookie\", { key, ...options });\n  }\n\n  /**\n   * Delete all cookies.\n   */\n  deleteAll(path = \"/\", domain = null) {\n    Object.keys(this.all).forEach((cookie) => {\n      this.delete(cookie, path, domain);\n    });\n    this.events.trigger(\"deleteAllCookies\", { path, domain });\n  }\n\n  /**\n   * Accept a policy.\n   * @param {String} policy - The name of the policy.\n   */\n  acceptPolicy(policy) {\n    this.setPolicy(policy, true);\n    this.events.trigger(\"acceptPolicy\", policy);\n    this.events.trigger(\"changePolicy\", { [policy]: true });\n  }\n\n  /**\n   * Reject a policy.\n   * @param {String} policy - The name of the policy.\n   */\n  rejectPolicy(policy) {\n    this.setPolicy(policy, false);\n    this.events.trigger(\"rejectPolicy\", policy);\n    this.events.trigger(\"changePolicy\", { [policy]: false });\n  }\n\n  /**\n   * Set a policy.\n   * @param {String} policy - The name of the policy.\n   * @param {Boolean} accepted - Whether the policy is accepted or not.\n   */\n  setPolicy(policy, accepted) {\n    if (policy === \"essential\") {\n      return;\n    }\n    this.savePolicies({\n      ...this.policies,\n      [policy]: accepted,\n      essential: true,\n    });\n    this.events.trigger(\"changePolicy\", { [policy]: accepted });\n  }\n\n  /**\n   * Accept all the cookie policies.\n   */\n  acceptAllPolicies() {\n    const allPolicies = Object.fromEntries(\n      Object.keys(this.policies).map((k) => [k.toLowerCase(), true]),\n    );\n    this.savePolicies(allPolicies);\n    this.events.trigger(\"acceptAllPolicies\");\n    this.events.trigger(\"changePolicy\", allPolicies);\n  }\n\n  /**\n   * Reject all the cookie policies.\n   */\n  rejectAllPolicies() {\n    const allPolicies = {\n      ...Object.fromEntries(\n        Object.keys(this.policies).map((k) => [k.toLowerCase(), false]),\n      ),\n      essential: true,\n    };\n    this.savePolicies(allPolicies);\n    this.events.trigger(\"rejectAllPolicies\");\n    this.events.trigger(\"changePolicy\", allPolicies);\n  }\n\n  /**\n   * Commit policy preferences to the browser.\n   * @param {object} policies - The policies to commit.\n   */\n  savePolicies(policies) {\n    this.set(this.policiesKey, JSON.stringify(policies));\n  }\n\n  /**\n   * Get the acceptance status of a policy.\n   * @param {String} policy - The name of the policy.\n   * @returns {Boolean}\n   */\n  isPolicyAccepted(policy) {\n    return Object.hasOwn(this.policies, policy)\n      ? this.policies[policy] === true\n      : null;\n  }\n\n  /**\n   * Add an event listener.\n   * @param {String} event - The event to add a listener for.\n   * @param {Function} callback - The callback function to call when the event is triggered.\n   */\n  on(event, callback) {\n    this.events.on(event, callback);\n  }\n\n  /**\n   * Add a one-time event listener.\n   * @param {String} event - The event to add a listener for.\n   * @param {Function} callback - The callback function to call when the event is triggered.\n   */\n  once(event, callback) {\n    this.events.once(event, callback);\n  }\n}\n","const uuidv4 = () =>\n  ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n    (\n      c ^\n      (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n    ).toString(16),\n  );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Accordion } from \"./components/accordion/accordion.mjs\";\nimport { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { CookieBanner } from \"./components/cookie-banner/cookie-banner.mjs\";\nimport { ErrorSummary } from \"./components/error-summary/error-summary.mjs\";\nimport { Footer } from \"./components/footer/footer.mjs\";\nimport { Gallery } from \"./components/gallery/gallery.mjs\";\nimport { GlobalHeader } from \"./components/global-header/global-header.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SearchFilters } from \"./components/search-filters/search-filters.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { SkipLink } from \"./components/skip-link/skip-link.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\nimport Cookies from \"./lib/cookies.mjs\";\n\nconst $body = document.documentElement;\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n  window.removeEventListener(\"touchstart\", onFirstTouch);\n  $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n  if (e.key === \"Tab\") {\n    $body.classList.add(\"tna-template--tabbed\");\n    $body.classList.remove(\"tna-template--clicked\");\n  }\n};\n\nconst onMouseDown = () => {\n  $body.classList.add(\"tna-template--clicked\");\n  $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nconst initAll = (options) => {\n  options = typeof options !== \"undefined\" ? options : {};\n  const $scope =\n    options.scope instanceof HTMLElement ? options.scope : document;\n\n  const $accordions = $scope.querySelectorAll('[data-module=\"tna-accordion\"]');\n  $accordions.forEach(($accordion) => {\n    new Accordion($accordion);\n  });\n\n  const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n  if ($breadcrumbs) {\n    new Breadcrumbs($breadcrumbs);\n  }\n\n  const $cookieBanner = $scope.querySelector(\n    '[data-module=\"tna-cookie-banner\"]',\n  );\n  if ($cookieBanner) {\n    new CookieBanner($cookieBanner);\n  }\n\n  const $errorSummary = $scope.querySelector(\n    '[data-module=\"tna-error-summary\"]',\n  );\n  if ($errorSummary) {\n    new ErrorSummary($errorSummary).init();\n  }\n\n  const $footer = $scope.querySelector('[data-module=\"tna-footer\"]');\n  if ($footer) {\n    new Footer($footer);\n  }\n\n  const $galleries = $scope.querySelectorAll('[data-module=\"tna-gallery\"]');\n  $galleries.forEach(($gallery) => {\n    new Gallery($gallery);\n  });\n\n  const $globalHeader = $scope.querySelector(\n    '[data-module=\"tna-global-header\"]',\n  );\n  if ($globalHeader) {\n    new GlobalHeader($globalHeader);\n  }\n\n  const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n  if ($header) {\n    new Header($header);\n  }\n\n  const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n  $pictures.forEach(($picture) => {\n    new Picture($picture);\n  });\n\n  const $searchFilters = $scope.querySelectorAll(\n    '[data-module=\"tna-search-filters\"]',\n  );\n  $searchFilters.forEach(($searchFilter) => {\n    new SearchFilters($searchFilter);\n  });\n\n  const $sensitiveImages = $scope.querySelectorAll(\n    '[data-module=\"tna-sensitive-image\"]',\n  );\n  $sensitiveImages.forEach(($sensitiveImage) => {\n    new SensitiveImage($sensitiveImage);\n  });\n\n  const $skipLinks = $scope.querySelectorAll('[data-module=\"tna-skip-link\"]');\n  $skipLinks.forEach(($skipLink) => {\n    new SkipLink($skipLink);\n  });\n\n  const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n  $tabs.forEach(($tabModule) => {\n    new Tabs($tabModule);\n  });\n};\n\nexport {\n  initAll,\n  Cookies,\n  Accordion,\n  Breadcrumbs,\n  CookieBanner,\n  ErrorSummary,\n  Footer,\n  Gallery,\n  GlobalHeader,\n  Header,\n  Picture,\n  SearchFilters,\n  SensitiveImage,\n  SkipLink,\n  Tabs,\n};\n"],"names":["root","factory","exports","module","define","amd","self","Accordion","_createClass","$module","_this","_classCallCheck","this","$firstDetailsElement","querySelector","$detailsElements","document","querySelectorAll","concat","getAttribute","Array","from","forEach","$detailsElement","addEventListener","e","$thisDetailsElement","target","hasAttribute","filter","$eachDetailsElement","removeAttribute","Breadcrumbs","$breadcrumbsList","$breadcrumbs","length","classList","contains","uniqueId","uuidv4","$expandable","createElement","add","style","display","$expandButton","innerHTML","setAttribute","remove","focus","appendChild","insertBefore","nextSibling","CookieBanner","$acceptButton","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","extraPolicies","split","x","map","policy","trim","domain","undefined","path","secure","policiesKey","cookies","Cookies","newInstance","cookiePreferencesSet","hasValue","accept","reject","key","value","complete","acceptAllPolicies","rejectAllPolicies","_this2","set","$closeButton","close","ErrorSummary","_ref","setFocus","$element","_options$onBeforeFocu","options","arguments","isFocusable","onBlur","_options$onBlur","call","once","onBeforeFocus","Footer","$themeSelector","$tnaTemplate","$themeSelectorButtons","$themeSelectorButton","$button","setTheme","selectThemeSelectorButton","isPolicyAccepted","showThemeSelector","on","data","Object","hasOwn","settings","hideThemeSelector","exists","$currentThemeButton","find","get","theme","$selectedButton","Gallery","$items","opened","items","$galleryToggle","innerText","handleToggleGallery","$galleryToggleWrapper","parentElement","GlobalHeader","$toggleButton","$navigation","$topNavigation","$links","menuOpened","mql","window","matchMedia","syncState","handleToggleNavigation","addListener","code","matches","show","hide","hidden","i","Header","Picture","$imageWrapper","$transcript","transcriptOpened","openLabel","closeLabel","$transcriptToggle","handleToggleTranscript","SearchFilters","$fieldset","$toggle","$headingInner","$item","syncItem","toggleItem","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","preventScroll","focusVisible","SkipLink","linkedElementId","pop","$linkedElement","getElementById","focusLinkedElement","linkedElementListener","removeFocusProperties","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","$newTabList","index","$tabListItemLink","_$tabListItemLink$get","$replacementButton","replaceWith","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","newIndex","currentIndex","findIndex","targetId","history","replaceState","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_defineProperty","event","callback","events","oneTimeEvents","eventToTrigger","splice","_options$extraPolicie","_options$domain","_options$path","_options$secure","_options$policiesKey","_options$newInstance","destroyInstance","init","savePolicies","_objectSpread","fromEntries","k","toLowerCase","usage","policies","essential","deserialised","cookie","parts","JSON","parse","all","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain2","_options$path2","_options$secure2","encodeURIComponent","trigger","keys","setPolicy","accepted","allPolicies","stringify","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","$scope","scope","HTMLElement","$accordion","$cookieBanner","$errorSummary","$footer","$gallery","$globalHeader","$header","$picture","$searchFilter","$sensitiveImage","$skipLink","$tabModule"],"sourceRoot":""}