import{j as K,$ as l}from"./iframe-976FVEjJ.js";import{c as I}from"./ButtonComponent-C01NN-p4.js";(function(d,e){(function(t){t(K)})(function(t){t.easing.jswing=t.easing.swing;var n=Math.pow,a=Math.sqrt,o=Math.sin,s=Math.cos,c=Math.PI,u=1.70158,h=u*1.525,p=u+1,g=2*c/3,C=2*c/4.5;function w(i){var m=7.5625,f=2.75;return i<1/f?m*i*i:i<2/f?m*(i-=1.5/f)*i+.75:i<2.5/f?m*(i-=2.25/f)*i+.9375:m*(i-=2.625/f)*i+.984375}t.extend(t.easing,{def:"easeOutQuad",swing:function(i){return t.easing[t.easing.def](i)},easeInQuad:function(i){return i*i},easeOutQuad:function(i){return 1-(1-i)*(1-i)},easeInOutQuad:function(i){return i<.5?2*i*i:1-n(-2*i+2,2)/2},easeInCubic:function(i){return i*i*i},easeOutCubic:function(i){return 1-n(1-i,3)},easeInOutCubic:function(i){return i<.5?4*i*i*i:1-n(-2*i+2,3)/2},easeInQuart:function(i){return i*i*i*i},easeOutQuart:function(i){return 1-n(1-i,4)},easeInOutQuart:function(i){return i<.5?8*i*i*i*i:1-n(-2*i+2,4)/2},easeInQuint:function(i){return i*i*i*i*i},easeOutQuint:function(i){return 1-n(1-i,5)},easeInOutQuint:function(i){return i<.5?16*i*i*i*i*i:1-n(-2*i+2,5)/2},easeInSine:function(i){return 1-s(i*c/2)},easeOutSine:function(i){return o(i*c/2)},easeInOutSine:function(i){return-(s(c*i)-1)/2},easeInExpo:function(i){return i===0?0:n(2,10*i-10)},easeOutExpo:function(i){return i===1?1:1-n(2,-10*i)},easeInOutExpo:function(i){return i===0?0:i===1?1:i<.5?n(2,20*i-10)/2:(2-n(2,-20*i+10))/2},easeInCirc:function(i){return 1-a(1-n(i,2))},easeOutCirc:function(i){return a(1-n(i-1,2))},easeInOutCirc:function(i){return i<.5?(1-a(1-n(2*i,2)))/2:(a(1-n(-2*i+2,2))+1)/2},easeInElastic:function(i){return i===0?0:i===1?1:-n(2,10*i-10)*o((i*10-10.75)*g)},easeOutElastic:function(i){return i===0?0:i===1?1:n(2,-10*i)*o((i*10-.75)*g)+1},easeInOutElastic:function(i){return i===0?0:i===1?1:i<.5?-(n(2,20*i-10)*o((20*i-11.125)*C))/2:n(2,-20*i+10)*o((20*i-11.125)*C)/2+1},easeInBack:function(i){return p*i*i*i-u*i*i},easeOutBack:function(i){return 1+p*n(i-1,3)+u*n(i-1,2)},easeInOutBack:function(i){return i<.5?n(2*i,2)*((h+1)*2*i-h)/2:(n(2*i-2,2)*((h+1)*(i*2-2)+h)+2)/2},easeInBounce:function(i){return 1-w(1-i)},easeOutBounce:w,easeInOutBounce:function(i){return i<.5?(1-w(1-2*i))/2:(1+w(2*i-1))/2}})})})();class z{static isStudioPreview(){return document.querySelector("html").classList.contains("cm-studio-preview")}}class j{constructor(e){this.header=e.addClass("initiated"),this.window=l(window),this.body=l("body"),this.overlayOpen=!1,this.showOpenedNav=this.header.find(".primary").data("show-opened-menu");const t=this;this.initLogo(),this.initTopLink(),this.initScroll(),this.initSearch(),this.initPrimaryNav(),this.initSecondaryNav(),this.initToggling(),this.initLanguage(),this.showOpenedNav&&t.header.find(".toggle-nav").click(),this.body.on("open-navigation",function(n,a){a.openMenu&&t.header.find(".toggle-nav").click(),t.initPrimaryNav(a.rootUrl)})}initLogo(){const t=this.header.find(".logo"),n=t.find("img"),a=l('').appendTo(t);new ResizeObserver(()=>{n.height()<44?a.css("left",n.height()*2.1):a.removeAttr("style")}).observe(n.get(0))}initTopLink(){const e=this;l('').text("Top").prependTo(e.header).on("click",function(n){n.preventDefault(),l("html, body").animate({scrollTop:0},Math.round(l(window).scrollTop()/12+300),"easeOutQuad")})}initSearch(){const e=this,t=l('
').appendTo(e.header.find(".search form"));e.header.find("nav .secondary").clone().appendTo(t),e.header.find("nav .meta").clone().appendTo(t),e.header.find(".open-search, .close-search").on("click",function(n){e.header.toggleClass("search-open").removeClass("nav-open"),e.header.hasClass("search-open")&&setTimeout(function(){e.header.find(".search-field").focus()},200),e.toggleContentScroll()})}initScroll(){const e=this;e.scrollState={current:"top",lastPosition:0,transitioning:!1},window.addEventListener("scroll",function(){e.scrollState.transitioning||window.requestAnimationFrame(function(){e.checkScrollWithStateMachine()})},{passive:!0})}checkScrollWithStateMachine(){const e=this,t=this.window.scrollTop(),n=e.scrollState;if(e.overlayOpen||l(".gallery-popup.open").length)return!1;const a=t-n.lastPosition,o=a>0,s=a<0;switch(n.current){case"top":t>100&&o&&e.transitionTo("scrolled");break;case"scrolled":t<30&&s&&e.transitionTo("top");break}n.lastPosition=t,t>this.window.height()*1.2?this.header.addClass("show-toplink"):this.header.removeClass("show-toplink")}transitionTo(e){const t=this;t.scrollState.transitioning=!0,e==="scrolled"?(this.header.addClass("scrolled"),this.body.addClass("header-scrolled")):e==="top"&&(this.header.removeClass("scrolled"),this.body.removeClass("header-scrolled")),t.scrollState.current=e,setTimeout(()=>{t.scrollState.transitioning=!1},150)}initToggling(){this.header.find(".overlay-holder").on("click touch",this.toggleNavigation.bind(this)),this.header.find(".toggle-nav").on("click touch",this.toggleNavigation.bind(this))}toggleNavigation(){const e=this;z&&z.isStudioPreview()?l("html").stop().animate({scrollTop:0},300,"swing",function(){e.header.toggleClass("nav-open"),e.toggleContentScroll()}):(e.header.toggleClass("nav-open"),e.toggleContentScroll())}initPrimaryNav(e){const t=this,n=t.header.find("nav .primary");l(n).empty(),t.baseUrl=n.attr("data-base-url"),t.rootUrl=n.attr("data-root-url"),e&&(t.rootUrl=e,n.off("click","a")),n.append(l('