var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r["throw"](t))}catch(e){o(e)}}function c(t){t.done?n(t.value):i(t.value).then(a,u)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(e){return c([t,e])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(u){a=[6,u];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-ff3b0bee.system.js","./p-b771bfdd.system.js"],(function(t){"use strict";var e,n,r,i,o;return{setters:[function(t){e=t.r;n=t.c;r=t.h;i=t.g},function(t){o=t.e}],execute:function(){var a=t("anj_navigation_item",function(){function t(t){e(this,t);this.anjNavigationItemSelected=n(this,"anjNavigationItemSelected",7)}t.prototype.onClick=function(t){t.preventDefault();this.anjNavigationItemSelected.emit()};t.prototype.render=function(){var t=this;var e=window.location.pathname;return r("anj-headline",null,r("h4",null,r("a",{href:e+"#"+this.section,onClick:function(e){return t.onClick(e)}},r("slot",null))))};Object.defineProperty(t,"style",{get:function(){return".sc-anj-navigation-item-h{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none}.sc-anj-navigation-item-h, .sc-anj-navigation-item-h:after, .sc-anj-navigation-item-h:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.sc-anj-navigation-item-h:active, .sc-anj-navigation-item-h .sc-anj-navigation-item:active, .sc-anj-navigation-item-h:focus, .sc-anj-navigation-item-h .sc-anj-navigation-item:focus{outline:none}.sc-anj-navigation-item-h:not(:last-child){margin-bottom:.5rem}[active].sc-anj-navigation-item-h a.sc-anj-navigation-item{color:var(--anj-text)}[active].sc-anj-navigation-item-h a.sc-anj-navigation-item:hover{text-decoration:none}"},enumerable:true,configurable:true});return t}());var u=t("anj_navigation_pane",function(){function t(t){e(this,t)}t.prototype.connectedCallback=function(){this.setActive=o(this.setActive.bind(this),50)};t.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.setActive()]}))}))};t.prototype.onItemSelected=function(t,e){var n=t.target;this.getItems().forEach((function(t){return t.active=t===n}));var r=document.getElementById(n.section);if(e)return;if(r){window.scrollTo({top:r.offsetTop,left:0,behavior:"smooth"})}};t.prototype.setActive=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(r){t=this.getItems().map((function(t){return document.getElementById(t.section)}));e=t[0];t.slice(1).forEach((function(t){if(t&&Math.abs(window.scrollY-t.offsetTop)<Math.abs(window.scrollY-e.offsetTop)){e=t}}));if(!e)return[2];n=this.element.querySelector('anj-navigation-item[section="'+e.getAttribute("id")+'"]');this.onItemSelected({target:n},true);return[2]}))}))};t.prototype.getItems=function(){return Array.from(this.element.querySelectorAll("anj-navigation-item"))};Object.defineProperty(t.prototype,"element",{get:function(){return i(this)},enumerable:true,configurable:true});Object.defineProperty(t,"style",{get:function(){return".sc-anj-navigation-pane-h{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;background-color:inherit;position:-webkit-sticky;position:sticky;top:0}.sc-anj-navigation-pane-h, .sc-anj-navigation-pane-h:after, .sc-anj-navigation-pane-h:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.sc-anj-navigation-pane-h:active, .sc-anj-navigation-pane-h .sc-anj-navigation-pane:active, .sc-anj-navigation-pane-h:focus, .sc-anj-navigation-pane-h .sc-anj-navigation-pane:focus{outline:none}"},enumerable:true,configurable:true});return t}())}}}));