1AppRegistry.registerBundle({applicationId:'bra-menu|1.1.1',bundle: {"en":{"settings":"Settings","themeLight":"Light","themeTitle":"Set theme for this website","name":"Name","themeAuto":"Auto (system choice)","theme":"Theme","hello":"Hello","themeDark":"Dark"},"sv":{"settings":"Inställningar","themeLight":"Ljust","themeTitle":"Ställ in utseende på denna webbplats","name":"Namn","themeAuto":"Automatiskt (systemval)","theme":"Utseende","hello":"Hej","themeDark":"Mörkt"}}}); 2AppRegistry.registerModule({applicationId:'bra-menu|1.1.1',path:'/main',module:function(define){'use strict';/*! For license information please see main.js.LICENSE.txt */ 3define(["events","react","react-dom","requester","router"],function(e,t,n,r,a){return function(){var s={214:function(e){"use strict";e.exports=r},342:function(e,t,n){"use strict";var r=n(398);t.H=r.createRoot,r.hydrateRoot},398:function(e){"use strict";e.exports=n},697:function(e){"use strict";e.exports=a},797:function(t){"use strict";t.exports=e},937:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=u(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=u(t,n));return t}function u(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},959:function(e){"use strict";e.exports=t}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return s[e](n,n.exports,l),n.exports}l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){"use strict";l.r(c),l.d(c,{default:function(){return h}});var e=l(959),t=l.n(e),n=l(342),r=l(937),a=l.n(r),s=l(214),u=l.n(s),o=l(697),i=l.n(o),m=l(797),d=l.n(m),f=({id:n,name:r,href:s,isActive:l,hasChildren:c,subMenuIsOpen:o,subMenu:m,parentLevel:f,isDesktop:b,isLanguageMenu:h,isLanguageSelection:v,isTitle:y,language:_,isThemeMenu:g,theme:E,isThemeSelection:S,icon:k,currentTheme:w,setCurrentTheme:L})=>{const[T,x]=(0,e.useState)(o),[N,q]=(0,e.useState)(m),O=(0,e.useRef)(null);(0,e.useEffect)(()=>{const e=e=>{x(!1)};return document.addEventListener("closeOtherSubmenus",e),()=>{document.removeEventListener("closeOtherSubmenus",e)}},[]),(0,e.useEffect)(()=>{if(c&&O.current){const e=window.matchMedia("(prefers-reduced-motion: reduce)");if(b=window.innerWidth>990,"1"===O.current.dataset.level&&b)if(T){O.current.style.display="block";const t=null!=document.querySelector(".bra-menu__panel--open"),n=e&&e.matches?0:15;setTimeout(()=>{var e;t&&(null===(e=O.current)||void 0===e||e.classList.add("bra-menu__submenu--fade"))},n)}else O.current.style.display="none";else{const t=O.current.querySelector("ul");null!=t&&(O.current.style.boxSizing="border-box",e&&e.matches||(O.current.style.transition="height 200ms cubic-bezier(0.4, 0, 0.2, 1) 0s"),O.current.style.willChange="height",T?(O.current.style.display="block",O.current.style.height=t.clientHeight+"px"):O.current.style.height="0px",O.current.style.overflow="hidden",setTimeout(()=>{O.current&&(O.current.style.removeProperty("transition"),O.current.style.removeProperty("will-change"),T?(O.current.style.removeProperty("height"),O.current.style.removeProperty("display"),O.current.style.removeProperty("overflow")):(O.current.style.height="0px",O.current.style.display="none"))},200))}}},[T]);const M={"aria-current":l?"page":void 0},C={href:s,lang:_,"aria-current":l&&v?"true":void 0};return t().createElement("li",Object.assign({className:a()("bra-menu__item",{"bra-menu__item--active":!S&&l||w===E},{"bra-menu__item--child-active":o},{"bra-menu__item--open":T},{"bra-menu__item--has-children":c},{"bra-menu__item--language":h},{"bra-menu__item--theme":g&&!b},{"bra-menu__item--title":y})}
3,M),!h&&!g&&!y&&!S&&t().createElement("a",Object.assign({className:"bra-menu__item-link"},C,{"aria-current":l?"true":"false"}),t().createElement("span",{className:"bra-menu__item-link--name"},r),v&&l&&t().createElement("span",{className:"fa-solid fa-check bra-menu__item-link--check"})),S&&t().createElement("button",{className:"bra-menu__item-link",onClick:(P=E,e=>{e.preventDefault();const t=P||"system",n=document.body;"system"===t?(n.classList.remove("bra-light","bra-dark"),localStorage.removeItem("bra-color-scheme")):"light"===t?(n.classList.add("bra-light"),n.classList.remove("bra-dark"),localStorage.setItem("bra-color-scheme","light")):"dark"===t&&(n.classList.add("bra-dark"),n.classList.remove("bra-light"),localStorage.setItem("bra-color-scheme","dark")),d().trigger("colorSchemeChanged",{colorScheme:t,emitter:"menu"}),L(t)})},t().createElement("span",{className:k,"aria-hidden":"true"}),t().createElement("span",{className:"bra-menu__item-link--name"},r),w===E&&t().createElement("span",{className:"fa-solid fa-check bra-menu__item-link--check"})),y&&t().createElement("span",{lang:_},r),c?t().createElement("button",{onClick:e=>{if(O.current)if(e.currentTarget&&b&&"1"===O.current.dataset.level){O.current.querySelector("ul"),O.current.style.height="auto";const e=new Event("closeOtherSubmenus");document.dispatchEvent(e)}else if(null!=N||T){if(T){const e=O.current.querySelector("ul");O.current.style.height=(null==e?void 0:e.clientHeight)+"px"}}else O.current.style.height="0px";null==N?u().doGet({url:i().getStandaloneUrl("/getSubmenu"),data:{id:n}}).then(e=>{q(e),x(!T)}):x(!T)},"aria-label":h?`Submenu for ${r}`:`Undermeny för ${r}`,"aria-controls":`submenu-${n.replace(".","")}`,"aria-expanded":T,lang:h?"en":"sv"},t().createElement("span",null,h&&t().createElement("span",null,t().createElement("span",{"aria-hidden":"true",className:k}),t().createElement("span",{lang:"en"},r)),g&&t().createElement("span",null,t().createElement("span",{"aria-hidden":"true",className:k}),t().createElement("span",null,r)),!h&&!g&&t().createElement("span",{className:"sv-visuallyhidden"},T?"-":"+"),t().createElement("span",{className:a()("fa-solid",b&&0===f?"fa-chevron-right":T?"fa-minus":"fa-plus"),"aria-hidden":"true"}))):null,c?t().createElement("div",{id:`submenu-${n.replace(".","")}`,ref:O,className:a()("bra-menu__submenu",{"bra-menu__submenu--open":T}),"aria-hidden":!T,"data-level":f+1},null!=N?t().createElement(p,{menu:N,level:f+1,isDesktop:b,currentTheme:w,setCurrentTheme:L}):null):null);var P},p=({menu:e,level:n,isDesktop:r,currentTheme:a,setCurrentTheme:s})=>t().createElement("ul",{className:"bra-menu__items"},e.map(e=>t().createElement(t().Fragment,null,e.isThemeMenu&&r?null:t().createElement(f,Object.assign({key:e.id},e,{parentLevel:n,isDesktop:r,currentTheme:a,setCurrentTheme:s}))))),b=({menu:n,lang:r})=>{const[s,u]=(0,e.useState)(n),[l,c]=(0,e.useState)(!1),[o,i]=(0,e.useState)(!1),m=(0,e.useRef)(null),f=(0,e.useRef)(null),b=(0,e.useRef)(null),[h,v]=(0,e.useState)("system"),y=(0,e.useRef)(l);(0,e.useEffect)(()=>{y.current=l},[l]),(0,e.useEffect)(()=>{const e=localStorage.getItem("bra-color-scheme");e&&v(e);const t=e=>{"Escape"===e.key&&y.current&&(c(!1),b.current&&b.current.focus())};d().on("colorSchemeChanged",e=>{v(e.colorScheme||"system")});const n=e=>{e.composedPath().find(e=>e.dataset&&e.dataset.menu)||c(!1)};return window.addEventListener("keydown",t),window.addEventListener("click",n),E(),window.addEventListener("resize",E),()=>{window.removeEventListener("keydown",t),window.removeEventListener("click",n),window.removeEventListener("resize",E)}},[]),(0,e.useEffect)(()=>{S(),l?_():g();const e=m.current;if(l&&e){const t=()=>{const t=e.querySelectorAll("button, a");if(b.current,t.length>0){const n=t[0],r=t[t.length-1],a=e=>{if("Tab"===e.key)if(e.shiftKey&&document.activeElement===n)r.focus();else if(!e.shiftKey&&document.activeElement===r){e.preventDefault();const t=document.querySelector('.bra-menu__submenu--open[data-level="1"]');if(t){const e=t.querySelectorAll("button, a");e.length>0?e[0].focus():n.focus()}else n.focus()}};return e.addEventListener("keydown",a),()=>{e.removeEventListener("keydown",a)}}};t();const n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0}),()=>{e.removeEventListener("keydown",t),n.disconnect()}}},[l]),(0,e.useEffect)(()=>{const e=document.querySelector("body");o?(e.classList.remove("mobile"),e.classList.add("desktop")):(e.classList.add("mobile"),e.classList.remove("desktop"))},[o]);const _=()=>{const e=document.querySelector(".sv-cookie-consent-banner"),t=document.querySelectorAll(".bra-menu__panel, .bra-menu__submenu "),n=document.querySelector("header"),r=n?n.offsetHeight:0,a=window.scrollY||document.documentElement.scrollTop;if(e){const n=e.offsetHeight;
3t.forEach(e=>{e.style.top=r+n-a+"px"})}else t.forEach(e=>{e.style.top=r-a+"px"});if(f.current){f.current.style.display="block",setTimeout(()=>{var e;null===(e=f.current)||void 0===e||e.classList.add("bra-menu__panel--open")},15);const e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=e&&e.matches?0:300;setTimeout(()=>{const e=document.querySelector('.bra-menu__submenu--open[data-level="1"]');e&&e.classList.add("bra-menu__submenu--fade")},t)}},g=()=>{var e;const t=document.querySelector(".bra-menu");if(t){const e=()=>{};t.removeEventListener("keydown",e)}const n=document.querySelector('.bra-menu__submenu--open[data-level="1"]');window.innerWidth>990&&n&&n.classList.remove("bra-menu__submenu--fade"),null===(e=f.current)||void 0===e||e.classList.remove("bra-menu__panel--open"),setTimeout(()=>{f.current&&(f.current.style.display="none")},100)},E=()=>{c(!1),window.innerWidth>990?i(!0):i(!1)},S=()=>{const e=document.querySelector("body");l?(e.classList.add("overlay"),setTimeout(()=>{e.classList.add("fade","in")},100)):(e.classList.remove("fade","in"),setTimeout(()=>{e.classList.remove("overlay")},100))};return t().createElement("nav",{ref:m,className:"bra-menu","aria-label":"Huvudmeny","data-menu":!0},t().createElement("button",{ref:b,className:"bra-menu__toggle-menu-button","aria-expanded":l,onClick:e=>{c(e=>!e)},"aria-controls":"bra-menu__panel"},t().createElement("span",{className:"fa-solid fa-bars","aria-hidden":"true"}),t().createElement("span",null,"sv"===r?"Meny":"Menu")),t().createElement("div",{ref:f,id:"bra-menu__panel",className:a()("bra-menu__panel",o?"bra-menu__panel--desktop":"bra-menu__panel--mobile"),"aria-hidden":!l},t().createElement(p,{menu:s,level:0,isDesktop:o,currentTheme:h,setCurrentTheme:v})))},h=(t,r)=>{(0,n.H)(r).render(e.createElement(b,Object.assign({},t)))}}(),c}()});}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.