1System.register(["c-c-advanced-flex-nav.css"],(function(){"use strict";var e;return{setters:[function(n){e=n.default}],execute:function(){document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],function(){(function(){(function(){(function(){(function(){let e,n,t,a,i,l,d,c,s,o=this,r="mouseover",u=!1,m=992,v=new Promise((function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}));this.onResize=()=>{p()};const f=()=>window.matchMedia("(pointer: coarse)").matches,h=()=>{let e=i.children().nextUntil(".hidden-item").last();return 0!==e.length&&e.offset().top>i.children().first().offset().top},p=()=>{if(d.length&&e.is(":visible"))for(i.children().removeClass("hidden-item"),l.find(".visible").removeClass("visible"),d.removeClass("visible");h();){i.children().nextUntil(".hidden-item").last().addClass("hidden-item"),d.addClass("visible"),l.children().nextUntil(".visible").last().addClass("visible")}};this.toggleSubmenu=e=>{e.closest("li").is(".is-open")?o.closeSubmenu(e,!0):o.openSubmenu(e)},this.getOpenPrimaryMenuItem=()=>$(".c-c-advanced-flex-nav__menu-item.is-open"),this.closeSubmenu=(e,n)=>{const t=e.closest("li");t.removeClass("to-left"),e.removeClass("is-open"),b(t,!1),t.removeClass("is-open"),t.find(".c-c-advanced-flex-nav__dropdown-menu-wrapper").css("--c-c-advanced-flex-nav__dropdown-menu-wrapper--offset-top",""),s&&s.removeClass("is-active")},this.findSubmenuTogglesByItem=e=>$(e).children(".c-c-advanced-flex-nav__link-wrapper").find("[data-submenu-toggle]").addBack("[data-submenu-toggle]");const b=(e,n)=>{let t=this.findSubmenuTogglesByItem(e);const a=e.children(".c-c-advanced-flex-nav__link-wrapper");let i=a.find("[data-aria-label-expanded]").addBack("[data-aria-label-expanded]").first().attr("data-aria-label-expanded"),l=a.find("[data-aria-label-closed]").addBack("[data-aria-label-closed]").first().attr("data-aria-label-closed");n?t.attr("aria-expanded","true").attr("aria-label",i):t.attr("aria-expanded","false").attr("aria-label",l)};this.openSubmenu=t=>{const a=t.closest("li");a.is(".level-1")&&(e.find(".no-animation").removeClass("no-animation"),$(".c-c-advanced-flex-nav__primary-item.is-open").length>0&&a.addClass("no-animation"),"number"==typeof c&&(clearTimeout(c),c=null,a.addClass("no-animation"))),a.addClass("is-open"),b(a,!0);let i=a.parents(".c-c-advanced-flex-nav__menu-item").addBack();n.not(i).each((function(){o.closeSubmenu($(this))})),s&&s.addClass("is-active");let l=a.children(".c-c-advanced-flex-nav__dropdown-menu-wrapper.level-3-up");l.length&&setTimeout((()=>((e,n)=>{let t=n.get(0).getBoundingClientRect().x+n.get(0).clientWidth,a=window.innerWidth;e.removeClass("to-left"),t>a&&e.addClass("to-left")})(a,l)),0);const d=new CustomEvent("flexnavMenuItemRevealed",{detail:{menuItemEl:$(a).get(0)},bubbles:!0,cancelable:!0});document.dispatchEvent(d),setTimeout((()=>{let e=a.children(".c-c-advanced-flex-nav__dropdown-menu-wrapper").first();if(e.length){if(!e.children("ul").children("li").filter(".has-children").length){const n=e.get(0).getBoundingClientRect().top;e.css("--c-c-advanced-flex-nav__dropdown-menu-wrapper--offset-top",`${n}px`)}}}),0)};const g=()=>{a.not("button").not("a[href]").keypress((function(e){let n=e.keyCode?e.keyCode:e.which;"13"!=n&&"32"!=n||o.toggleSubmenu($(this).closest("li"))})).on("click",(function(){o.toggleSubmenu($(this).closest("li"))})),a.filter("button").on("click",(function(e){"mouseover"===r&&o.toggleSubmenu($(this).closest("li"))})),n.on("mouseenter",(function(){"mouseover"!==r||f()||o.openSubmenu($(this))})).on("mouseleave",(function(e){if("mouseover"===r&&!f()){$(this).closest("li").is(".level-1")&&("number"==typeof c&&(clearTimeout(c),c=null),c=setTimeout((()=>{c=null}),300)),o.closeSubmenu($(this))}}))};this.init=c=>{v.then((()=>{const v=document.getElementById("c-c-advanced-flexnav");if(!v)return;if(v.classList.add("initialized"),e=$(v),!v.querySelector("li"))return;i=$(v.querySelector(".c-c-advanced-flex-nav.level-1:not(.c-c-advanced-flex-nav__overflow-items__container)")),d=$(".c-c-advanced-flex-nav__overflow-items__container"),l=d.find(".c-c-advanced-flex-nav__dropdown-menu.level-2"),u=JSON.parse(e.attr("data-dark-overlay")),m=c;const f=window.matchMedia(`(min-width: ${m}px)`),h=function(e){e.matches?($("body").addClass("flexnav-active"),$("body").removeClass("flexnav-inactive")):($("body").removeClass("flexnav-active"),$("body").addClass("flexnav-inactive"))};h(f),f.addEventListener("change",h),u&&(s=$('<div class="c-c-advanced-flex-nav__dark-overlay"></div>'),$("body").append(s));let b=e.attr("data-open-behaviour");["mouseover","click"].includes(b)&&(r=b),$("body").is(".template-megaMenuEditor")&&(r="click"),a=e.find("[data-submenu-toggle]"),n=$(".c-c-advanced-flex-nav__menu-item.has-children"),$(".c-c-advanced-flex-nav__menu-link[href].has-children"),$(".c-c-advanced-flex-nav__link-wrapper.has-children:not([data-href='#'])");let _=$(".c-c-advanced-flex-nav__primary-item.has-dropdown-menu .c-c-advanced-flex-nav__link-wrapper.has-children");t=_.filter((function(e,n){return!(n.matches(".has-redirect-to-first-child")||"false"===$(n).attr("data-create-duplicate-link"))})),"click"===r&&t.each((function(e,n){let t=$(n).attr("data-href"),a=$(n).find("a").text(),i=$(n).closest("li").children(".c-c-advanced-flex-nav__menu-wrapper").children().first(),l=$(i.children("li").first().get(0).outerHTML);l.find(".c-c-advanced-flex-nav__menu-wrapper").remove();let d=l.children().first();d.removeAttr("data-submenu-toggle role tabindex data-href"),l.find("button").remove();
1let c=l.find("a");l.add(d).add(c).removeClass("is-active is-current is-trail has-children"),c.removeAttr("role tabindex"),c.find("span").text(a),c.attr("href",t),i.prepend(l),l.add(d).add(c).addClass("is-duplicate");let s=c.find("span"),o=s.text();s.text("Zu "+o)})),g();new ResizeObserver((e=>{for(let n of e)p()})).observe(i[0]),o.onResize(),window.addEventListener("resize",o.onResize),"click"===r&&$("body").on("click",(function(e){if(document.body.matches(".template-megaMenuEditor.mode-editor"))return;const n=o.getOpenPrimaryMenuItem();n.length&&($(e.target).closest(".c-c-advanced-flex-nav__primary-item").length||o.closeSubmenu(n))})),$(window).on("keydown",(function(e){if(27===e.keyCode){let e=$(document.activeElement).closest(".c-c-advanced-flex-nav__menu-item.is-open");if(1===e.length)o.closeSubmenu(e),e.children(".c-c-advanced-flex-nav__link-wrapper").find("[data-submenu-toggle]").addBack("[data-submenu-toggle]").first().focus();else{let e=$(".c-c-advanced-flex-nav__primary-item.is-open");1===e.length&&o.closeSubmenu(e)}}}))}))}}).call(this.FlexNav||(this.FlexNav={}))}).call(this.Advanced||(this.Advanced={}))}).call(this.Common||(this.Common={}))}).call(this.Common||(this.Common={}))}.call(window.Pegasus||(window.Pegasus={}))}}})); 2//# sourceMappingURL=c-c-advanced-flex-nav.system.js.map
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.