PageSourceSearch

https://www.fh-erfurt.de/typo3temp/assets/compressed/merged-6dcd58…23553d37d6f5b4e6514d7e7fc3.js.gz?1789721050

js fh-erfurt.de collected 2026-09-24 17:44:00 UTC 201,745 bytes, 2,050 lines download raw bytes

1
2function prepareForPrint(){$(".c-m-single-module__content").slick("unslick"),$(".c-m-slider__slider-0").slick("unslick")}function afterPrint(){var e=$(".c-m-single-module__content").data("slider-options");console.log(e),$(".c-m-single-module__content").slick(e);e=$(".c-m-slider__slider-0").data("slider-options");console.log(e),$(".c-m-slider__slider-0").slick(e)}window.addEventListener("beforeprint",prepareForPrint,{passive:!0}),window.addEventListener("afterprint",afterPrint,{passive:!0});var removeFooterSpace={vars:{footer:$(".c-o-footer"),specialElementsArray:$(".c-o-footer").data("rm-element-gap"),lastMainElement:$(".c-t-main > section.c-t-container-wrapper").last(),classToRemove:"o-margin-top-small"},init:function(){$.when(removeFooterSpace.prepare()).promise().done(function(){removeFooterSpace.checkElementOccurrence()})},prepare:function(){try{removeFooterSpace.vars.specialElementsArray.length}catch(e){removeFooterSpace.vars.specialElementsArray="",console.log(e)}},checkElementOccurrence:function(){var e=removeFooterSpace.vars.lastMainElement.attr("class"),t=removeFooterSpace.vars.specialElementsArray.length;for(removeFooterSpace.vars.specialElementsArray=removeFooterSpace.vars.specialElementsArray.split(",");t--;)(-1!=e.indexOf(removeFooterSpace.vars.specialElementsArray[t])||removeFooterSpace.vars.lastMainElement.find("."+removeFooterSpace.vars.specialElementsArray[t]).length)&&removeFooterSpace.removeGap()},removeGap:function(){removeFooterSpace.vars.footer.removeClass(removeFooterSpace.vars.classToRemove)}};document.addEventListener("DOMContentLoaded",function(){document.getElementById("footer")&&removeFooterSpace.init(),document.querySelectorAll("a:not([title])").forEach(function(e){var t=e.querySelector("img");t&&""!==t.alt?e.title=t.alt:e.title=e.innerText})});var linkPopup={vars:{popupLinks:document.querySelectorAll(".c-a-btn--extern, .c-a-btn--haspopup"),pageWrapper:document.getElementsByClassName("c-t-page-wrapper")[0],dataContainer:document.getElementById("button-labels")},init:function(){this.attachEventListeners()},attachEventListeners:function(){linkPopup.vars.dataContainer&&linkPopup.vars.popupLinks.forEach(function(t){t.addEventListener("click",function(e){e.preventDefault(),linkPopup.showPopup(t)})})},showPopup:function(t){var e=linkPopup.vars.dataContainer.dataset.popupTitle,a=linkPopup.vars.dataContainer.dataset.popupText,n=linkPopup.vars.dataContainer.dataset.popupBtnAbort,i=t.getAttribute("href"),s=t.dataset.popupHeadline||e,e=t.dataset.popupText||a,a=t.dataset.popupBtnOk||"Ok",n=t.dataset.popupBtnAbort||n;$.featherlight(`
3            <div class="featherlight-inner--large-padding">
4                <h4>${s}</h4>
5                <p>${e}</p>
6                <div class="o-margin-top-small">
7                    <button onclick="window.open('${i}');" class="c-a-btn c-a-btn--animation c-a-btn--small o-display-inline-important featherlight-close">${a}</button>
8                    <button class="c-a-btn c-a-btn--animation c-a-btn--small o-margin-left-small featherlight-close">${n}</button>
9                </div>
10            </div>
11        `,{type:"html",afterOpen:function(e){this.$currentTarget=$(t)}})}};document.querySelector(".c-a-btn--extern, .c-a-btn--haspopup")&&linkPopup.init(),$(document).ready(function(){$(".c-t-page-wrapper input").not(".radio input").iCheck({cursor:!0})}),$(document).ready(function(){var t,a;jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdaysFull:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],today:"Heute",clear:"Löschen",close:"Schließen",firstDay:1,format:"dd.mm.yyyy",formatSubmit:"dd.mm.yyyy"}),$(".c-a-input--datepicker input").each(function(e,t){$("html").attr("lang");$(this).addClass("date-input-"+e);var a=$("input.date-input-"+e).pickadate({format:"dd.mm.yyyy",formatSubmit:"dd.mm.yyyy",onClose:function(){$(document.activeElement).blur()}}).pickadate("picker");$("input.date-input-"+e).parent().append('<span class="icon"></span>').addClass("date-field-"+e+" date-field js-date-field"),$(".date-field-"+e+" .icon-thw-date").on("click",function(e){e.stopPropagation(),a.get("open")||a.open()})}),$(".date-field #date_from").length&&$(".date-field #date_to").length&&(t=$(".date-field #date_from").pickadate().pickadate("picker"),a=$(".date-field #date_to").pickadate().pickadate("picker"),t.get("value")&&a.set("min",t.get("select")),a.get("value")&&t.set("max",a.get("select")),t.on("set",function(e){e.select?(a.set("min",t.get("select")),$("#date_to").focus(),setTimeout(function(){$("#date_to + .picker .picker__holder").focus()},100)):"clear"in e&&a.set("min",!1)}),a.on("set",function(e){e.select?t.set("max",a.get("select")):"clear"in e&&t.set("max",!1)}))});var formValidation={vars:{formElement:document.getElementsByTagName("form")[0],inputElement:document.querySelector('input[type="text"]'),errorElement:document.querySelector(".c-a-input__error"),formToValidate:document.querySelectorAll(".validate")},init:function(){formValidation.prepare(),formValidation.checkInput()},prepare:function(){for(var e=0;e<formValidation.vars.formToValidate.length;e++)formValidation.vars.formToValidate[e].setAttribute("novalidate",!0)},checkInput:function(){document.addEventListener("blur",function(e){var t;
11console.log(123),e.target.form.classList.contains("validate")&&(console.log(456),t=formValidation.validateFormField(e.target),console.log(t),t?formValidation.showFieldError(e.target,t):formValidation.removeFieldError(e.target))},{passive:!0})},validateFormField:function(e){if(!e.disabled&&"file"!==e.type&&"reset"!==e.type&&"submit"!==e.type&&"button"!==e.type){var t=e.validity;if(!t.valid){if(t.valueMissing)return"Please fill out this field.";if(t.typeMismatch){if("email"===e.type)return"Please enter an email address.";if("url"===e.type)return"Please enter a URL."}return t.tooShort?"Please lengthen this text to "+e.getAttribute("minLength")+" characters or more. You are currently using "+e.value.length+" characters.":t.tooLong?"Please short this text to no more than "+e.getAttribute("maxLength")+" characters. You are currently using "+e.value.length+" characters.":t.badInput?"Please enter a number.":t.stepMismatch?"Please select a valid value.":t.rangeOverflow?"Please select a value that is no more than "+e.getAttribute("max")+".":t.rangeUnderflow?"Please select a value that is no less than "+e.getAttribute("min")+".":t.patternMismatch?e.hasAttribute("title")?e.getAttribute("title"):"Please match the requested format.":"The value you entered for this field is invalid."}}},showFieldError:function(e,t){e.classList.add("error");var a,n=e.id||e.name;n&&((a=e.form.querySelector(".error-message#error-for-"+n))||((a=document.createElement("div")).className="error-message",a.id="error-for-"+n,e.parentNode.insertBefore(a,e.nextSibling)),a.innerHTML=t,a.style.display="block",a.style.visibility="visible")},removeFieldError:function(e){e.classList.remove("error"),e.removeAttribute("aria-describedby");var t=e.id||e.name;!t||(t=e.form.querySelector(".error-message#error-for-"+t))&&(t.innerHTML="",t.style.display="none",t.style.visibility="hidden")}},formValidationBouncer={init:function(){formValidationBouncer.prepare()},prepare:function(){new Bouncer("form",{fieldClass:"c-a-input--error",errorClass:"c-a-error",fieldPrefix:"bouncer-field_",errorPrefix:"bouncer-error_",patterns:{email:/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*(\.\w{2,})+$/,url:/^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*(?:\.(?:[a-zA-Z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/,number:/[-+]?[0-9]*[.,]?[0-9]+/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/,time:/(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9])/,month:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2]))/},messageAfterField:!0,messageCustom:"data-bouncer-message",messageTarget:"data-bouncer-target",messages:{missingValue:{checkbox:"Dieses Feld ist ein Pflichtfeld.",radio:"Please select a value.",select:"Please select a value.","select-multiple":"Please select at least one value.",default:"Bitte füllen Sie dieses Feld aus."},patternMismatch:{email:"Please enter a valid email address.",url:"Please enter a URL.",number:"Please enter a number",color:"Please match the following format: #rrggbb",date:"Please use the YYYY-MM-DD format",time:"Please use the 24-hour time format. Ex. 23:00",month:"Please use the YYYY-MM format",default:"Please match the requested format."},outOfRange:{over:"Please select a value that is no more than {max}.",under:"Please select a value that is no less than {min}."},wrongLength:{over:"Please shorten this text to no more than {maxLength} characters. You are currently using {length} characters.",under:"Please lengthen this text to {minLength} characters or more. You are currently using {length} characters."}},disableSubmit:!1,emitEvents:!0})}};function checkViewport(){return 768<window.innerWidth?"desktop":"mobile"}function accordionOpen(e){var t=$(".c-m-accordion");e.hasClass("open")?("mobile"==checkViewport()&&(t.find(".c-m-accordion__title").removeClass("open js-open"),t.find(".c-m-accordion__title").attr("aria-expanded","fal
11se"),t.find(".c-m-accordion__content").removeClass("open js-open").slideUp(200)),e.removeClass("open js-open"),e.attr("aria-expanded","false"),e.next().removeClass("open js-open").slideUp(200)):($(".c-m-accordion__title").removeClass("open js-open"),t.find(".c-m-accordion__title").attr("aria-expanded","true"),$(".c-m-accordion__content").removeClass("open js-open").slideUp(200),"mobile"==checkViewport()&&(t.find(".c-m-accordion__title").removeClass("open js-open"),t.find(".c-m-accordion__content").removeClass("open js-open").slideUp(200)),e.addClass("open js-open"),e.attr("aria-expanded","true"),e.next().addClass("open js-open").slideDown(200))}function accordionController(){$(".c-m-accordion__controll-settings select").on("selectric-change",function(e,t,a){$(".c-t-container-wrapper[data-accordion-controller-id]").addClass("o-display-none"),$('.c-t-container-wrapper[data-accordion-controller-id="'+a.state.currValue+'"]').removeClass("o-display-none")})}function galleryPercentToPixelWidth(){var e,t;0<$(".c-m-gallery").length&&768<=$(window).width()&&(e=$(window).width(),t=(e=1920<=e?1920:e)/100*33.333,$(".c-m-gallery.c-m-slider").each(function(){$(this).find(".c-m-gallery__wrapper").css("width",t+"px")}))}function initFeatherlight(){$(".c-m-gallery").each(function(){$(this).find(".c-m-gallery__link").featherlightGallery({gallery:{fadeIn:300,fadeOut:300},openSpeed:300,closeSpeed:300})}),$.detectSwipe.preventDefault=!1}$(document).ready(function(){}),$(document).ready(function(){$(function(){$(".c-a-select").selectric({disableOnMobile:!1,nativeOnMobile:!1,onInit:function(){$(".selectric-wrapper").attr("role","listbox"),$(".selectric-wrapper").attr("tabindex","0"),$(".c-a-select").attr("tabindex","0"),$(".selectric-scroll").find("ul").addClass("selectric-dropdown"),$(".selectric-c-a-select--search-filter .selectric-hide-select select").change(function(){location.href=$(this).val()}),$(".selectric-input").attr("aria-label","hidden label"),this.id&&$(".selectric-input").attr("name",this.id)},onRefresh:function(){$(".selectric-wrapper").attr("role","listbox"),$(".selectric-wrapper").attr("tabindex","0"),$(".c-a-select").attr("tabindex","0"),$(".selectric-scroll").find("ul").addClass("selectric-dropdown")}})})}),$(document).ready(function(){$(".c-a-input__tooltip-icon").tooltip({position:{my:"left+5 center-15",at:"right center"},hide:{duration:250}})}),$(document).ready(function(){accordionController(),$(".c-m-accordion").find(".c-m-accordion__title").click(function(){accordionOpen($(this))}),$(".c-m-accordion").find(".c-m-accordion__title").bind("focus",function(){$(this).unbind("keypress"),$(this).bind("keypress",function(e){13==e.which&&accordionOpen($(this))})})}),$(document).ready(function(){galleryPercentToPixelWidth(),$(".c-m-gallery").on("init",function(){galleryPercentToPixelWidth(),initFeatherlight(),768<$(window).width()&&setTimeout(function(){$(".c-m-gallery.c-m-slider").slick("slickNext")},200)}),$(window).width()<768?$(".c-m-gallery").each(function(){$(this).slick({variableWidth:!0,slidesToShow:1,slidesToScroll:1})}):$(".c-m-gallery").each(function(){$(this).slick({variableWidth:!0,centerMode:!0,slidesToShow:1,slidesToScroll:1})}),initFeatherlight(),$.featherlightGallery.prototype.afterContent=function(){var e=this.$currentTarget.find("footer").text(),t=this.$currentTarget.find("figcaption").html(),a=this.$currentTarget.data("slide-id"),n="featherlight-content__caption-wrap--inside";this.$instance.find("."+n).remove(),this.$instance.find(".featherlight-content__caption").remove(),this.$instance.find(".featherlight-content__copyright").remove(),$('<div class="'+n+'">').appendTo(this.$instance.find(".featherlight-content")),$('<div class="featherlight-content__caption">').text(t).appendTo(this.$instance.find("."+n)),$('<div class="featherlight-content__copyright">').text(e).appendTo(this.$instance.find("."+n)),this.$instance.find(".featherlight-image").attr("alt",this.$currentTarget.data("alt")||""),this.$currentTarget.closest(".c-m-gallery.c-m-slider").slick("slickGoTo",a-1)},$.featherlight.prototype.afterContent=function(){var e,t,a;this.$currentTarget&&(e=this.$currentTarget.find("footer").text(),t=this.$currentTarget.find("figcaption").html(),this.$instance.find("."+(a="featherlight-content__caption-wrap--inside")).remove(),this.$instance.find(".featherlight-content__caption").remove(),this.$instance.find(".featherlight-content__copyright").remove(),(e||t)&&($('<div class="'+a+'">').appendTo(this.$instance.find(".featherlight-content")),$('<div class="featherlight-content__caption">').text(t).appendTo(this.$instance.find("."+a)),$('<div class="featherlight-content__copyright">').text(e).appendTo(this.$instance.find("."+a))))}}),$(window).resize(function(){galleryPercentToPixelWidth()});var tabcontent={vars:{isMobile:!1,isDesktop:!0,headerWrapper:$("header"),pageWrapper:$(".c-t-page-wrapper"),tabsWrapper:$(".c-m-tabs"),tabsSections:$(".c-m-tabs__tabpanel"),tabsWrapperSticky:$(".c-m-tabs--sticky-nav"),tabsItemAnchor:$(".c-m-tabs__tabitemanchor"),currentTabNavItem:"",startStickyPosition:0,stopStickyPosition:0,positionFromTop:0,tabContentHeight:0,tabNavigationHeight:0,tabNavigationOffsetTop:8,nav:$(".c-m-tabs nav"),line:$("<div />").addClass("c-m-tabs__line"),active:$(".c-m-tabs nav").find(".active"),pos:[],wid:[],cache:{},last:[]},init:function(){tabcontent.getViewport();var e=tabcontent.vars.tabsWrapper.find(".c-m-tabs__tabitem").first();e.addClass("active"),e.find("a").attr("aria-selected",!0),$.when(tabcontent.prepare(),tabcontent.setAriaOnload()).promise().done(function(){$.when(tabcontent.setActiveTab(),tabcontent.changeTab(),tabcontent.onTabContentUpdate()).promise().done(function(){$(window).on("load",function(){$.when(tabcontent.stickyTabNavigation()).promise().done(function(){0!==tabcontent.vars.tabsItemAnchor.length&&(tabcontent.vars.tabsSections.first().removeAttr("hidden"),tabcontent.scrollToTabFromHash())})})})})},prepare:function(){$.when(tabcontent.vars.tabsWrapper.each(function(t,e){$(this).attr("data-module-index",t+1),$(this).find(".c-m-tabs__tabitem").each(function(){var e=$
11(this).find(".c-m-tabs__tabitemanchor").attr("href");$(e).attr("data-tab-content-index",t+1)})})).promise().done(function(){tabcontent.setTabFromHash()})},setTabFromHash:function(){var e;window.location.hash&&$('.c-m-tabs__tabitemanchor[href="'+window.location.hash+'"]').length&&(e=$('.c-m-tabs__tabitemanchor[href="'+window.location.hash+'"]').closest(".c-m-tabs").attr("data-module-index"),$('[data-module-index="'+e+'"]').find("a").removeAttr("aria-selected").attr("tabindex",-1),$('[data-tab-content-index="'+e+'"]').attr("hidden",""),$('.c-m-tabs__tabitemanchor[href="'+window.location.hash+'"]').attr("aria-selected",!0).removeAttr("tabindex",-1),$(window.location.hash).removeAttr("hidden"))},setActiveTab:function(){$(document).ready(function(){tabcontent.vars.tabsWrapper.each(function(){var e=$(this).data("module-index"),t=$(this).hasClass("c-m-tabs--sticky-nav");tabcontent.vars.active=$(this).find("nav .active"),$(this).find("nav").append('<div class="c-m-tabs__line">'),tabcontent.vars.active.length&&(tabcontent.vars.pos[e]=tabcontent.vars.active.position().left,tabcontent.vars.wid[e]=tabcontent.vars.active.width(),$(this).find(".c-m-tabs__line").css({left:tabcontent.vars.pos[e],width:tabcontent.vars.wid[e]})),tabcontent.vars.isMobile&&t&&tabcontent.stickyTabNavigation(!0,!1)})})},changeTab:function(){tabcontent.vars.nav.find("ul li").on("click","a",function(e){return e.preventDefault(),!$(this).attr("aria-selected")&&(tabcontent.vars.currentTabNavItem=$(this),tabcontent.animateTabChange($(this)),void tabcontent.handleTabContentChange($(this)))}),tabcontent.vars.pageWrapper.on("click","a",function(e){if(-1!==this.href.indexOf("#")){var t=$(this).attr("href").split("#")[1];if($('.c-m-tabs__tabitemanchor[href="#'+t+'"]').length){e.preventDefault();t=$('.c-m-tabs__tabitemanchor[href="#'+t+'"]');
11if(t.attr("aria-selected"))return!1;t.trigger("click"),tabcontent.vars.isDesktop&&$("html, body").animate({scrollTop:t.offset().top},200,function(){tabcontent.vars.headerWrapper.removeClass("headroom--pinned").addClass("headroom--unpinned")})}}})},animateTabChange:function(e){var t,a,n,i=e,s=i.closest("nav"),o=i.closest("nav").find(".c-m-tabs__line"),e=i.closest(".c-m-tabs").data("module-index");$(this).parent().hasClass("active")||s.hasClass("animate")||(s.addClass("animate"),t=i,s.find("ul li").removeClass("active"),a=t.parent().position(),n=t.parent().width(),a.left>=tabcontent.vars.pos[e]?o.animate({width:a.left-tabcontent.vars.pos[e]+n},300,function(){o.animate({width:n,left:a.left},150,function(){s.removeClass("animate")}),t.parent().addClass("active")}):o.animate({left:a.left,width:tabcontent.vars.pos[e]-a.left+tabcontent.vars.wid[e]},300,function(){o.animate({width:n},150,function(){s.removeClass("animate")}),t.parent().addClass("active")}),tabcontent.vars.pos[e]=a.left,tabcontent.vars.wid[e]=n)},handleTabContentChange:function(e){var t=e,a=t.attr("aria-controls"),n=t.closest(".c-m-tabs").hasClass("c-m-tabs--sticky-nav"),i=t.closest(".c-m-tabs").data("module-index"),e=t.closest(".c-m-tabs").innerHeight(),e=$('[data-tab-content-index="'+i+'"]:visible').offset().top-e;$('.c-m-tabs[data-module-index="'+i+'"]').find("nav a").removeAttr("aria-selected").attr("tabindex",-1),(tabcontent.vars.isDesktop||tabcontent.vars.isMobile&&!n)&&$('[data-tab-content-index="'+i+'"]').fadeOut("fast").promise().done(function(){$("#"+a).fadeIn("fast").promise().done(function(){$("#"+a).find(".slick-slider").length&&($("#"+a).find(".slick-slider").slick("setPosition"),$("#"+a).find(".slick-slider").addClass("slick-visible js-slick-visible")),tabcontent.stickyTabNavigation(!0)})}),tabcontent.vars.isMobile&&n&&$("html, body").animate({scrollTop:e},"200",function(){$('[data-tab-content-index="'+i+'"]').fadeOut("fast").promise().done(function(){$("#"+a).fadeIn("fast").promise().done(function(){$("#"+a).find(".slick-slider").length&&($("#"+a).find(".slick-slider").slick("setPosition"),$("#"+a).find(".slick-slider").addClass("slick-visible js-slick-visible"),setTimeout(function(){tabcontent.stickyTabNavigation(!1,!0)},300)),tabcontent.stickyTabNavigation(!0),$(window).trigger("scroll")})})}),t.removeAttr("tabindex").attr("aria-selected",!0)},stickyTabNavigation:function(a,n){tabcontent.vars.isMobile&&tabcontent.vars.tabsWrapperSticky.each(function(){var e=$
11(this).data("module-index"),t=$('[data-tab-content-index="'+e+'"]:visible');tabcontent.vars.positionFromTop=$(this).offset().top,tabcontent.vars.tabNavigationHeight=$(this).outerHeight()-tabcontent.vars.tabNavigationOffsetTop,tabcontent.vars.startStickyPosition=n?t.offset().top-tabcontent.vars.tabNavigationHeight:tabcontent.vars.positionFromTop,tabcontent.vars.tabContentHeight=0,n?setTimeout(function(){tabcontent.vars.tabContentHeight=0,t.each(function(){tabcontent.vars.tabContentHeight=tabcontent.vars.tabContentHeight+$(this).height()}),tabcontent.vars.stopStickyPosition=t.offset().top+tabcontent.vars.tabContentHeight-tabcontent.vars.tabNavigationHeight-10},300):t.each(function(){tabcontent.vars.tabContentHeight=tabcontent.vars.tabContentHeight+$(this).height()}),a?tabcontent.vars.stopStickyPosition=tabcontent.vars.positionFromTop+tabcontent.vars.tabContentHeight:n||(tabcontent.vars.stopStickyPosition=tabcontent.vars.positionFromTop+tabcontent.vars.tabContentHeight-tabcontent.vars.tabNavigationHeight-10),a||n||$(window).scroll(function(){$(this).scrollTop()>tabcontent.vars.startStickyPosition&&$(this).scrollTop()<tabcontent.vars.stopStickyPosition?(tabcontent.vars.tabsWrapperSticky.addClass("is-sticky js-is-sticky"),$('[data-tab-content-index="'+e+'"]:visible').eq(0).css("margin-top",tabcontent.vars.tabNavigationHeight)):(tabcontent.vars.tabsWrapperSticky.removeClass("is-sticky js-is-sticky"),$('[data-tab-content-index="'+e+'"]:visible').eq(0).css("margin-top",""))})})},onTabContentUpdate:function(){tabcontent.vars.isMobile&&$('[role="tabpanel"]').on("click",function(e){tabcontent.stickyTabNavigation(!1,!0)})},setAriaOnload:function(){Array.prototype.forEach.call(document.querySelectorAll('[role="tablist"]'),function(e){for(var t=e.querySelectorAll("li"),a=0;a<t.length;a++)t[a].classList.remove("active");Array.prototype.forEach.call(e.querySelectorAll('[href^="#"][role="tab"]'),function(e,t,a){tabcontent.vars.cache[e.hash]=[e,document.getElementById(e.getAttribute("aria-controls"))],"true"===e.getAttribute("aria-selected")?(tabcontent.vars.last=tabcontent.vars.cache[""]=tabcontent.vars.cache[e.hash],e.parentNode.classList.add("active")):e.setAttribute("tabindex",-1),e.addEventListener("keydown",function(e){e=37===e.keyCode?a[t-1]:39===e.keyCode?a[t+1]:null;e&&(e.focus(),$(e).trigger("click"))})},{passive:!0})})},setAriaOnchange:function(){var e=tabcontent.vars.cache[location.hash];if(e){tabcontent.vars.last&&(tabcontent.vars.last[0].removeAttribute("aria-selected"),tabcontent.vars.last[0].setAttribute("tabindex",-1),tabcontent.vars.last[1]&&tabcontent.vars.last[1].setAttribute("hidden","")),e[0].setAttribute("aria-selected","true"),e[1]&&e[1].removeAttribute("hidden","");for(var t=e[0].parentNode.parentNode.querySelectorAll("li"),a=0;a<t.length;a++)t[a].classList.remove("active");e[0].parentNode.classList.add("active"),tabcontent.vars.last=e}},scrollToTabFromHash:function(){window.location.hash&&$('.c-m-tabs__tabitemanchor[href="'+window.location.hash+'"]').length&&setTimeout(function(){$("html, body").animate({scrollTop:$('.c-m-tabs__tabitemanchor[href="'+window.location.hash+'"]').offset().top},200,function(){tabcontent.vars.headerWrapper.removeClass("headroom--pinned").addClass("headroom--unpinned")})},500)},getViewport:function(){$(window).resize(function(){window.innerWidth<1024?(tabcontent.vars.isMobile=!0,tabcontent.vars.isDesktop=!1):(tabcontent.vars.isDesktop=!0,tabcontent.vars.isMobile=!1)}),$(window).trigger("resize")}};$(".c-m-tabs").length&&(tabcontent.init(),$(document).on("lazyloaded",function(e){tabcontent.stickyTabNavigation(!1,!0)}));var timetable={vars:{defaultLocale:"en",calendarWeeks:[],currentWeek:moment().isoWeek(),currentDate:moment(moment.now()).format("YYYY-MM-DD"),pageLang:$("html").attr("lang"),timetableElement:$(".c-m-timetable"),timetableElementSelector:".c-m-timetable",timetableWeekSelect:".c-m-timetable__week-select",timetableDay:".c-m-timetable__day",timetableDayActiveClass:"c-m-timetable__day--active",timetableDayDate:".c-m-timetable__day-highlight",timetableDayContentTrigger:".c-m-timetable__day-content-trigger",timetableDayContentMatter:".c-m-timetable__day-content-matter",sliderContainer:".c-m-timetable__content",sliderClass:"c-m-timetable__content-slider",sliderArrowContainer:".c-t-wrap",sliderActiveClass:".slick-active",elementOpenClass:"opened",timetableInstance:"data-timetable-instance",calendarWeekPrefix:"data-calendar-week-prefix",dynamicCalendarWeek:"data-calendar-week",sliderOptionsData:"slider-options",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden"},init:function(){$.when(this.prepare()).promise().done(function(){timetable.prepareSlider(),timetable.setCurrentWeek(),timetable.checkWeekChange(),timetable.handleWeekChange(),timetable.handleDayContentAction()})},prepare:function(){this.setTimezone(),this.getTimetables()},setTimezone:function(){void 0!==timetable.vars.pageLang?moment.locale(timetable.vars.pageLang):moment.locale(timetable.vars.defaultLocale)},getTimetables:function(){timetable.vars.timetableElement.each(function(e,t){var a=$(this);a.attr(timetable.vars.timetableInstance,e),$.when(timetable.getCalendarWeeks(a)).promise().done(function(){timetable.buildCalendarWeekSelect(a)})})},getCalendarWeeks:function(e){var t=e?e.find(timetable.vars.timetableDay):$(timetable.vars.timetableDay),a=e.attr(timetable.vars.timetableInstance);timetable.vars.calendarWeeks[a]||(timetable.vars.calendarWeeks[a]=[]),t.each(function(){var e=$
11(this).find(timetable.vars.timetableDayDate).find("time"),t=e.attr("datetime"),t=moment(t,"YYYYMMDD").isoWeek();e.attr(timetable.vars.dynamicCalendarWeek,t),-1<timetable.vars.calendarWeeks[a].indexOf(t)||timetable.vars.calendarWeeks[a].push(t)})},buildCalendarWeekSelect:function(e){var t=e?e.find(timetable.vars.timetableWeekSelect):$(timetable.vars.timetableWeekSelect),a=e.attr(timetable.vars.timetableInstance),n=e.attr(timetable.vars.calendarWeekPrefix);for(i=0;i<timetable.vars.calendarWeeks[a].length;++i)t.append('<option value="'+timetable.vars.calendarWeeks[a][i]+'">'+n+" "+timetable.vars.calendarWeeks[a][i]+"</option>");t.selectric()},getCurrentVisibleWeek:function(e){return e.find(timetable.vars.sliderActiveClass).find(timetable.vars.timetableDayDate).find("time").attr(timetable.vars.dynamicCalendarWeek)},setCurrentWeek:function(){timetable.vars.timetableElement.each(function(e,t){timetable.getCurrentVisibleWeek($(this));var a=$(this).attr(timetable.vars.timetableInstance);-1<timetable.vars.calendarWeeks[a].indexOf(timetable.vars.currentWeek)&&($(this).find(timetable.vars.timetableDay+":not(.slick-cloned)").find(timetable.vars.timetableDayDate).find("time["+timetable.vars.dynamicCalendarWeek+'="'+timetable.vars.currentWeek+'"]').first().closest(timetable.vars.timetableDay).attr("data-slick-index"),timetable.updateWeekSelect($(this),timetable.vars.currentWeek),timetable.setCurrentDay($(this)))})},setCurrentDay:function(e){var t=e.find(timetable.vars.timetableDay+":not(.slick-cloned)").find(timetable.vars.timetableDayDate).find('time[datetime="'+timetable.vars.currentDate+'"]').first().closest(timetable.vars.timetableDay);t.addClass(timetable.vars.timetableDayActiveClass),e.find(timetable.vars.sliderContainer).slick("slickGoTo",t.data("slick-index"))},updateWeekSelect:function(e,t){e=e?e.find(timetable.vars.timetableWeekSelect):$(timetable.vars.timetableWeekSelect);e.val(t).change().selectric("refresh")},checkWeekChange:function(){$(timetable.vars.sliderContainer).on("beforeChange",function(e,t,a,n){var i=$(this).closest(timetable.vars.timetableElementSelector),a=(a=$(this).find(timetable.vars.timetableDay+'[data-slick-index="'+a+'"]')).find(timetable.vars.timetableDayDate).find("time").attr(timetable.vars.dynamicCalendarWeek),n=(n=$(this).find(timetable.vars.timetableDay+'[data-slick-index="'+n+'"]')).find(timetable.vars.timetableDayDate).find("time").attr(timetable.vars.dynamicCalendarWeek);n!=a&&(timetable.updateWeekSelect(i,n),timetable.closeDayContentAction(i))})},handleWeekChange:function(){$(timetable.vars.timetableWeekSelect).on("change",function(){var e=$
11(this).closest(timetable.vars.timetableElementSelector),t=$(this).val(),t=e.find(timetable.vars.timetableDay+":not(.slick-cloned)").find(timetable.vars.timetableDayDate).find("time["+timetable.vars.dynamicCalendarWeek+'="'+t+'"]').first().closest(timetable.vars.timetableDay).attr("data-slick-index");e.find(timetable.vars.sliderContainer).slick("slickGoTo",t)})},handleDayContentAction:function(){$(timetable.vars.timetableDayContentTrigger).on("click",function(){var e=$(this).closest(timetable.vars.timetableElementSelector),t=e.find(timetable.vars.timetableDay),a=$(this).closest(timetable.vars.timetableDay),n=e.find(timetable.vars.timetableDayContentTrigger),i=$(this),s=e.find(timetable.vars.timetableDayContentMatter),e=i.next(timetable.vars.timetableDayContentMatter);a.hasClass(timetable.vars.timetableDayActiveClass)||(t.removeClass(timetable.vars.timetableDayActiveClass+" js-"+timetable.timetableDayActiveClass),a.addClass(timetable.vars.timetableDayActiveClass+" js-"+timetable.timetableDayActiveClass)),i.hasClass(timetable.vars.elementOpenClass)?(a.removeClass(timetable.vars.timetableDayActiveClass+" js-"+timetable.timetableDayActiveClass),i.removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),n.attr(timetable.vars.ariaExpanded,"false"),e.removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),s.attr(timetable.vars.ariaHidden,"true"),e.slideUp()):(n.removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),n.attr(timetable.vars.ariaExpanded,"false"),s.removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),s.attr(timetable.vars.ariaHidden,"true"),s.slideUp(),i.addClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),i.attr(timetable.vars.ariaExpanded,"true"),e.addClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),e.attr(timetable.vars.ariaHidden,"false"),e.slideDown())})},closeDayContentAction:function(e){e.find(timetable.vars.timetableDay).removeClass(timetable.vars.timetableDayActiveClass+" js-"+timetable.timetableDayActiveClass),e.find(timetable.vars.timetableDayContentTrigger).removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),e.find(timetable.vars.timetableDayContentTrigger).attr(timetable.vars.ariaExpanded,"false"),e.find(timetable.vars.timetableDayContentMatter).removeClass(timetable.vars.elementOpenClass+" js-"+timetable.vars.elementOpenClass),e.find(timetable.vars.timetableDayContentMatter).attr(timetable.vars.ariaHidden,"true"),e.find(timetable.vars.timetableDayContentMatter).slideUp()},prepareSlider:function(){$(timetable.vars.sliderContainer).each(function(e,t){var a=$(this),n=a,i={};i=void 0!==(i=n.data(timetable.vars.sliderOptionsData))?i:"",a.addClass(timetable.vars.sliderClass+" "+timetable.vars.sliderClass+"-"+e);a={infinite:!1,speed:500,slidesToShow:6,slidesToScroll:6,cssEase:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",fade:!1,arrows:!0,appendArrows:a.closest(timetable.vars.sliderArrowContainer),adaptiveHeight:!1,dots:!1,rows:0,responsive:[{breakpoint:1025,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:769,settings:{slidesToShow:1,slidesToScroll:1}}]};$.extend(a,i),timetable.initSlider(n,a)})},initSlider:function(e,t){e.slick(t)}};function isInViewport(e){e=e.getBoundingClientRect();return 0<=e.top&&0<=e.left&&0<e.width&&0<e.height}function getAnchor(){return 1<document.URL.split("#").length?document.URL.split("#")[1]:null}function scrollToAnchor(){let t=getAnchor(),a=!!t&&document.getElementById(t);t&&"reset"===t&&document.querySelectorAll("a.js-btn-abc-reset").forEach(e=>{e.closest("section").parentElement&&"SECTION"===e.closest("section").parentElement.tagName&&(a=e)});const n=!!a&&a.closest("form");if(a&&!isInViewport(a)){let e=!1;var i=a.closest('section[role="tabpanel"]');if(i){const s=document.querySelector('[aria-controls="'+i.id+'"]');s&&s.click(),n&&(e=!0,window.setTimeout(function(){n.querySelector("section").scrollIntoView()},400))}!e&&n&&window.setTimeout(function(){n.querySelector("section").scrollIntoView()},400)}else a&&(n?window.setTimeout(function(){n.querySelector("section").scrollIntoView()},400):window.setTimeout(function(){a.closest("section").firstElementChild.scrollIntoView()},400));
11t?document.querySelectorAll("a.js-btn-abc-reset").forEach(e=>{e.href+="#"+t}):document.querySelectorAll("a.js-btn-abc-reset").forEach(e=>{e.closest("section").parentElement&&"SECTION"===e.closest("section").parentElement.tagName&&(e.href+="#reset")})}function createCookie(e,t,a){var n=a?((n=new Date).setTime(n.getTime()+24*a*60*60*1e3),"; expires="+n.toGMTString()):"";document.cookie=e+"="+t+n+"; path=/"}function deleteCookie(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"}$(document).ready(function(){$(".c-m-timetable").length&&timetable.init()}),$(document).ready(function(){$(".c-o-footer").find("a.phone").each(function(){$(this).prepend('<i class="icon-14_phone"></i>')})}),$(document).ready(function(){$(".c-m-to-top").on("click",function(e){var t=$(this).attr("href");$("html, body").animate({scrollTop:$(t).offset().top},"300"),e.preventDefault()})}),$(document).ready(function(){var e=$(".c-m-alphabetic-filter");scrollToAnchor(),0<e.length&&(e.find("input").on("ifChecked",function(){var a=$(this);a.hasClass("active")||($(".c-m-alphabetic-filter input").removeClass("active"),a.addClass("active"),setTimeout(function(){$(".c-m-alphabetic-filter input").iCheck("uncheck"),a.iCheck("check");var t=a.closest("form");if(0<t.length&&!a.closest(".c-a-checkbox").hasClass("c-a-checkbox--initial")){let e=a[0];t[0].action+="#"+e.closest("label").querySelector(".c-a-checkbox__label").id,t.submit()}a.closest(".c-a-checkbox").removeClass("c-a-checkbox--initial")},10))}
11),e.find(".c-a-checkbox__label").on("click",function(){var e=$(this),t=e.siblings("div.icheckbox");t.hasClass("checked")&&(t.find("input").iCheck("uncheck"),0<(t=e.closest("form")).length&&(t[0].action+="#"+e[0].id,t.submit()))}),e.find(".c-a-checkbox").each(function(){var e=$(this);e.hasClass("c-a-checkbox--initial")&&e.find("input").iCheck("check"),$(this).focus(function(){$(this).on("keypress",function(e){13===e.which&&($(this).find(".icheckbox").hasClass("checked")?$(this).find("input").iCheck("uncheck"):$(this).find("input").iCheck("check"))})})}))}),document.addEventListener("DOMContentLoaded",function(){function n(e){let t=20,a=e;for(;0<t&&a&&!a.id;)a=a.parentElement,t--;return a.id||null}const t=getAnchor();t&&document.getElementById(t)&&window.setTimeout(function(){window.scrollBy(0,document.getElementById(t).getBoundingClientRect().y-150)},800),document.querySelectorAll("a.js-jumper").forEach(function(e){var t,a=n(e);a&&(t=window.location.origin+window.location.pathname,console.log(t),e.href=t+"?#"+a)}),$(".dynamic-filter-input").on("change",function(){var e;t||""===this.id?t?this.form.action+="#"+t:(e=n(this))&&(this.form.action+="#"+e):this.form.action+="#"+this.id,this.classList.contains("picker__input")?(this.parentElement.querySelector('input[type="hidden"]').value=this.value,window.setTimeout(this.form.submit(),100)):this.form.submit()})},{passive:!0}),document.addEventListener("DOMContentLoaded",function(){var e=document.getElementById("password");!e||""===location.hash||(e=e.closest("form"))&&e.action.match(/\/login\?/)&&(e.action+=location.hash)},{passive:!0}),$(document).ready(function(){$(".c-m-search-d__indicator, .selectric-wrapper, .selectric-wrapper *, .c-m-tabs__tabitemanchor, .c-m-accordion__title, .c-a-checkbox__label, .c-m-search-box__submit").on("mousedown",function(e){e.preventDefault()}),setTimeout(function(){$(".c-m-search-d__indicator, .selectric-wrapper, .selectric-wrapper *, .c-m-tabs__tabitemanchor, .c-m-accordion__title, .c-a-checkbox__label, .c-m-search-box__submit").on("mousedown",function(e){e.preventDefault()})},3e3)});var cookieNotification={notificationWrapper:$(".c-m-cookie-notification"),getNotificationContent:function(){var e=cookieNotification.notificationWrapper.data("header"),t=cookieNotification.notificationWrapper.data("message"),a=cookieNotification.notificationWrapper.data("dismiss"),n=cookieNotification.notificationWrapper.data("allow"),i=cookieNotification.notificationWrapper.data("decline"),s=cookieNotification.notificationWrapper.data("linktext"),o=cookieNotification.notificationWrapper.data("linktarget"),r=cookieNotification.notificationWrapper.data("close");cookieNotification.init(e,t,a,n,i,s,o,r)},init:function(e,t,a,n,i,s,o,r){var c=cookieNotification.checkCookie("LawCookieAllowed"),l=cookieNotification.checkCookie("LawCookieDenied");null==c&&null==l&&document.getElementById("cookie")?(window.cookieconsent.initialise({container:document.getElementById("cookie"),content:{header:e,message:t,dismiss:a,allow:n,deny:i,link:s,href:o,close:'<span class="icon icon-25_close"></span>'},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="{{message}} {{link}}" tabindex="0" class="c-a--link-underline cc-link" href="{{href}}" target="_blank" title="{{link}}">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" tabindex="0" class="cc-dismiss btn c-a-btn-internal c-a-btn-internal--white">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" tabindex="0" class="c-m-cookie-notification__allow btn c-a-btn c-a-btn--light c-a-btn--animation" title="{{allow}}"><span class="slope"></span><span class="content">{{allow}}</span></a>',deny:'<a aria-label="deny cookies" tabindex="0" class="c-m-cookie-notification__deny btn c-a-btn c-a-btn--light c-a-btn--animation"><span class="slope"></span><span class="content">{{deny}}</span></a>',link:'<a aria-label="learn more about cookies" tabindex="0" class="c-a--link-underline cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="'+r+'" tabindex="0" class="c-m-cookie-notification__close cc-close">{{close}}</span>'}
11,compliance:{info:'<div class="cc-compliance">{{allow}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":'{{messagelink}}<div class="c-m-cookie-notification__interaction">{{compliance}}{{close}}</div>',"basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic-close",type:"opt-in",revokable:!1,onStatusChange:function(e){console.log(this.hasConsented()?"enable cookies":"disable cookies")},law:{countryCode:"DE",regionalLaw:!1},location:!0}),cookieNotification.setCookie()):null!=c&&null==l&&cookieNotification.insertAllowedScripts()},setCookie:function(){var e=cookieNotification.checkCookie("LawCookieAllowed"),t=cookieNotification.checkCookie("LawCookieDenied"),a=new Date;a.setFullYear(a.getFullYear()+1),null==e&&null==t&&($(".c-m-cookie-notification").on("click",".c-m-cookie-notification__allow",function(){createCookie("LawCookieAllowed","allowed",365),$(this).closest(".c-m-cookie-notification").fadeOut("slow"),cookieNotification.insertAllowedScripts()}),$(".c-m-cookie-notification").on("click",".c-m-cookie-notification__deny",function(){createCookie("LawCookieDenied","denied",365),$(this).closest(".c-m-cookie-notification").fadeOut("slow")}),$(".c-m-cookie-notification").on("click",".c-m-cookie-notification__close",function(){$(this).closest(".c-m-cookie-notification").fadeOut("slow")}))},checkCookie:function(e){var t=document.cookie,a=e+"=",e=t.indexOf("; "+a);if(-1==e){if(0!=(e=t.indexOf(a)))return null}else{e+=2;var n=document.cookie.indexOf(";",e);-1==n&&(n=t.length)}return decodeURI(t.substring(e+a.length,n))},insertAllowedScripts:function(){if(e=cookieNotification.notificationWrapper.data("allowed-scripts"))for(var e=e.split(","),t=0;t<e.length;t++){var a=document.createElement("script");a.src=e[t],document.body.appendChild(a)}}};$(document).ready(function(){cookieNotification.getNotificationContent()});var resizeThresholdState=0;function breakpointHandler(e,t,a){if(1024<$(window).width()){if(1!=resizeThresholdState)return a?a():void(resizeThresholdState=1)}else if(0!=resizeThresholdState)return t?t():void(resizeThresholdState=0)}var mobileNavigation={vars:{barOpen:!1,sectionOpen:!1,secondLevelOpen:!1,openSection:"",$body:$("body"),indicatorShrinkDistance:200},init:function(){$(".c-m-mobile-navigation__indicator").click(function(){mobileNavigation.openBar()}),$(".c-m-mobile-navigation__bar-close").click(function(){mobileNavigation.closeBar()}),$(".c-m-mobile-navigation__overlay").click(function(){mobileNavigation.closeBar()}),$.detectSwipe.threshold=100,$(".c-m-mobile-navigation__navigation-second-level").on("swiperight",function(){mobileNavigation.closeSecondLevel()}),$(".c-m-mobile-navigation__navigation-second-level-close").on("click",function(){mobileNavigation.closeSecondLevel()}),$(window).scroll(function(){mobileNavigation.shrinkIndicator($(window).scrollTop())}),$("[data-second-level]").on("click",function(e){e.preventDefault(),mobileNavigation.showSecondLevel(this)}),$(".c-m-mobile-navigation__bar-element").on("click",function(e){var t=this.dataset.menu;mobileNavigation.openSection(t)}),mobileNavigation.prepare.sectionHeight(),mobileNavigation.prepare.secondLevelHeight()},prepare:{sectionHeight:function(){$(".c-m-mobile-navigation__section").each(function(){var e=$
11(this),t=e.find(".c-m-mobile-navigation__navigation, .c-m-search-m").height();e.hasClass("c-m-mobile-navigation__section--full")||(e.css("top","auto"),e.height(t+70))}),$(".js-prevent-click").each(function(){$(this).attr("href","javascript:;")})},secondLevelHeight:function(){$(".c-m-mobile-navigation__navigation-second-level").each(function(){var e=$(this),t=e.find(".c-m-mobile-navigation__navigation-second-level-inner").height();$(window).height()<t+80&&e.addClass("scrollable"),0<$(this).find("form").length&&(e.addClass("contains-form"),e.find("form, ul").wrapAll('<div class="js-scrollbox" />'))})}},shrinkIndicator:function(e){e>mobileNavigation.vars.indicatorShrinkDistance?$(".c-m-mobile-navigation__indicator").addClass("small"):$(".c-m-mobile-navigation__indicator").removeClass("small")},showOverlay:function(){mobileNavigation.disableScroll(),$(".c-m-mobile-navigation__overlay").addClass("show")},closeOverlay:function(){mobileNavigation.enableScroll(),$(".c-m-mobile-navigation__overlay").removeClass("show")}
11,disableScroll:function(){var e=$(window).scrollTop();mobileNavigation.vars.$body.css({position:"fixed",top:"-"+e+"px"}),$("body").attr("data-scroll-position",e),$("body").attr("data-js-info","scrolling disabled by mobileNavigation.disableScroll()")},enableScroll:function(){var e=$("body").attr("data-scroll-position");mobileNavigation.vars.$body.css({position:"static",top:"auto"}),$(window).scrollTop(e),$("body").removeAttr("data-scroll-position"),$("body").removeAttr("data-js-info")},openBar:function(){$(".c-m-mobile-navigation__indicator").addClass("hide"),setTimeout(function(){$(".c-m-mobile-navigation__bar").addClass("show")},150),mobileNavigation.vars.barOpen=!0},closeBar:function(){mobileNavigation.closeOverlay(),mobileNavigation.vars.openSection="",1==mobileNavigation.vars.sectionOpen?(mobileNavigation.closeSection("search"),mobileNavigation.closeSection("menu"),mobileNavigation.closeSection("service"),setTimeout(function(){mobileNavigation.closeBar(),mobileNavigation.closeSecondLevel()},500)):($(".c-m-mobile-navigation__bar").removeClass("show"),setTimeout(function(){$(".c-m-mobile-navigation__indicator").removeClass("hide")},150)),mobileNavigation.vars.barOpen=!1},openSection:function(e){if(mobileNavigation.showOverlay(),mobileNavigation.vars.openSection==e)return!1;1==mobileNavigation.vars.sectionOpen?(mobileNavigation.closeSection("search"),mobileNavigation.closeSection("menu"),mobileNavigation.closeSection("service"),setTimeout(function(){$('.c-m-mobile-navigation__bar-element[data-menu="'+e+'"]').addClass("active")},150),setTimeout(function(){$('.c-m-mobile-navigation__section[data-menu="'+e+'"]').addClass("show")},300)):($('.c-m-mobile-navigation__bar-element[data-menu="'+e+'"]').addClass("active"),setTimeout(function(){$('.c-m-mobile-navigation__section[data-menu="'+e+'"]').addClass("show")},50)),mobileNavigation.vars.openSection=e,mobileNavigation.vars.sectionOpen=!0,"search"==e&&$(".c-m-search-m__search-input").focus()},closeSection:function(e){mobileNavigation.vars.openSection="",$('.c-m-mobile-navigation__section[data-menu="'+e+'"]').removeClass("show"),setTimeout(function(){$('.c-m-mobile-navigation__bar-element[data-menu="'+e+'"]').removeClass("active")},150),mobileNavigation.vars.sectionOpen=!1},showSecondLevel:function(e){window.matchMedia("(orientation: landscape)").matches&&($(".c-m-mobile-navigation__section").addClass("second-level-show"),$(".c-m-mobile-navigation__section").scrollTop(0)),$(e).next().addClass("show"),mobileNavigation.vars.secondLevelOpen=!0},closeSecondLevel:function(){window.matchMedia("(orientation: landscape)").matches&&$(".c-m-mobile-navigation__section").removeClass("second-level-show"),$(".c-m-mobile-navigation__navigation-second-level").removeClass("show"),mobileNavigation.vars.secondLevelOpen=!1}};$(document).ready(function(){mobileNavigation.init()}),$(window).resize(function(){breakpointHandler(1024,mobileNavigation.init)});var mainmenu={vars:{isMobile:!1,isDesktop:!0,desktopStyles:!0,mobileStyles:!0,menuKeepOpen:!1,stickyNavOffset:200,isOpen:!1,headerContainer:$(".c-o-header"),navsContainer:$(".c-o-header__navs"),searchContainer:$(".c-o-header__search"),navFirstLevelSelector:$(".c-m-main-nav__level_1 > li"),navSecondLevelSelector:$(".c-m-main-nav__level_2 > li"),navSubmenuSelector:$(".c-m-main-nav__submenu"),menuToggle:$(".c-m-menu-toggle"),menuClose:$(".c-m-main-nav__submenu-close"),menuCloseToggle:$(".c-m-main-nav__submenu-close-btn"),searchToggleParent:$(".c-m-meta-actions__search"),searchToggle:$(".c-m-meta-actions__search .btn-search"),pageOverlaySelector:$(".c-m-page-overlay"),openClasses:"opened js-opened",activeClasses:"active js-active",overflowClasses:"o-overflow-hidden js-o-overflow-hidden o-overflow-hidden--not-win",menuOpenClasses:"menu-opened js-menu-opened",ariaExpandAttribute:"aria-expanded"},init:function(){this.getViewport(),this.initMenu(),this.initStickyNav()},initMenu:function(){mainmenu.vars.navFirstLevelSelector.on("click","> a:not(.c-m-main-nav__level_1--linkable)",function(e){mainmenu.vars.isDesktop&&!metamenu.vars.isOpen&&$(this).hasClass("has-sub")&&(e.preventDefault(),mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),mainmenu.vars.headerContainer.addClass("opened js-opened"),mainmenu.vars.navsContainer.addClass("opened js-opened"),$(this).parent().addClass("opened js-opened"),$(this).attr(mainmenu.vars.ariaExpandAttribute,!0),mainmenu.vars.pageOverlaySelector.addClass("active js-active"),mainmenu.vars.isOpen=!0)}),mainmenu.vars.navFirstLevelSelector.focusin(function(){mainmenu.vars.isDesktop&&!metamenu.vars.isOpen&&(mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),mainmenu.vars.headerContainer.addClass("opened js-opened"),mainmenu.vars.navsContainer.addClass("opened js-opened"),$(this).addClass("opened js-opened"),$(this).find("> a").attr(mainmenu.vars.ariaExpandAttribute,!0),mainmenu.vars.pageOverlaySelector.addClass("active js-active"),mainmenu.vars.isOpen=!0)}),mainmenu.vars.navsContainer.mouseleave(function(){mainmenu.vars.isDesktop&&!metamenu.vars.isOpen&&(mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.navsContainer.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),mainmenu.vars.isOpen=!1)}),mainmenu.vars.navsContainer.focusout(function(){mainmenu.vars.isDesktop&&!metamenu.vars.isOpen&&(mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.navsContainer.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),mainmenu.vars.isOpen=!1)}),$(".c-m-menu-toggle").bind("click","button",function(e){e.stopPropagation();try{transformicons.toggle(".tcon")}catch(e){}$(this).find(".tcon-menu--xbutterfly").toggleClass("tcon-transform"),$("body").toggleClass("o-overflow-hidden js-o-overflow-hidden"),mainmenu.vars.headerContainer.toggleClass("opened js-opened"),mainmenu.vars.pageOverlaySelector.toggleClass("active js-active"),$(".c-o-header__navs").slideToggle().toggleClass("opened js-opened"),mainmenu.vars.isMobile&&(mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find(".c-m-main-nav__submenu").slideUp(),mainmenu.vars.navSecondLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navSecondLevelSelector.find(".c-m-main-nav__level_3, p").slide
11Up(),mainmenu.vars.isOpen=!1)}),mainmenu.vars.menuCloseToggle.on("click",function(e){let t=$(this).parents("li").next();(0<t.length?t.find("> a"):$(".c-m-search-d__indicator")).focus(),e.stopPropagation(),mainmenu.closeDesktopMenu(),mainmenu.vars.menuKeepOpen=!1,mainmenu.vars.isOpen=!1}),$(document).bind("click",function(){if(mainmenu.vars.isMobile){try{transformicons.toggle(".tcon")}catch(e){}$(this).find(".tcon-menu--xbutterfly").toggleClass("tcon-transform"),$(".c-o-header__navs").slideUp().removeClass("opened js-opened"),$(".c-m-menu-toggle button").removeClass("tcon-transform"),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),mainmenu.vars.navFirstLevelSelector.find(".c-m-main-nav__submenu").slideUp(),mainmenu.vars.navSecondLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navSecondLevelSelector.find(".c-m-main-nav__level_3, p").slideUp(),mainmenu.vars.isOpen=!1}}),$(".c-m-main-nav").bind("click",function(e){mainmenu.vars.isMobile&&e.stopPropagation()})},closeDesktopMenu:function(){mainmenu.vars.isDesktop&&(mainmenu.vars.headerContainer.removeClass("opened js-opened fixed js-fixed"),mainmenu.vars.navsContainer.removeClass(mainmenu.vars.openClasses),mainmenu.vars.navFirstLevelSelector.removeClass(mainmenu.vars.openClasses),mainmenu.vars.navFirstLevelSelector.find("> a").attr(mainmenu.vars.ariaExpandAttribute,!1),mainmenu.vars.menuClose.removeClass(mainmenu.vars.activeClasses),$("body").removeClass(mainmenu.vars.overflowClasses),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||mainmenu.vars.pageOverlaySelector.removeClass(mainmenu.vars.activeClasses),mainmenu.vars.isOpen=!1)},resetMenu:function(){mainmenu.vars.isDesktop&&!mainmenu.vars.desktopStyles?($(".c-o-header__navs").hasClass("opened")?($(".c-o-header__navs").css("display","").removeClass("opened js-opened"),$(".c-m-menu-toggle button").removeClass("tcon-transform"),mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.isOpen=!1):($(".c-o-header__navs").css("display",""),mainmenu.vars.navFirstLevelSelector.find(".c-m-main-nav__submenu").css("display",""),mainmenu.vars.navSecondLevelSelector.find(".c-m-main-nav__level_3, p").css("display","")),$(".c-m-main-nav__level_1 > li, c-m-main-nav__level_2 > li").hasClass("opened")&&(mainmenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navFirstLevelSelector.find(".c-m-main-nav__submenu").css("display",""),mainmenu.vars.navSecondLevelSelector.removeClass("opened js-opened"),mainmenu.vars.navSecondLevelSelector.find(".c-m-main-nav__level_3, p").css("display",""),mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.isOpen=!1),mainmenu.vars.desktopStyles=!0,mainmenu.vars.mobileStyles=!1):mainmenu.vars.isMobile&&!mainmenu.vars.mobileStyles&&($(".c-o-header__navs").hasClass("opened")?($(".c-o-header__navs").css("display","").removeClass("opened js-opened"),$(".c-m-menu-toggle button").removeClass("tcon-transform"),mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),mainmenu.vars.headerContainer.removeClass("opened js-opened"),mainmenu.vars.isOpen=!1):$(".c-o-header__navs").css("display",""),mainmenu.vars.desktopStyles=!1,mainmenu.vars.mobileStyles=!0)},initStickyNav:function(){mainmenu.vars.isDesktop&&mainmenu.vars.headerContainer.headroom({offset:mainmenu.vars.stickyNavOffset,tolerance:5})},getViewport:function(){$(window).resize(function(){window.innerWidth<1025?(mainmenu.vars.isMobile=!0,mainmenu.vars.isDesktop=!1):(mainmenu.vars.isDesktop=!0,mainmenu.vars.isMobile=!1),mainmenu.resetMenu()}),$(window).trigger("resize"),window.innerWidth<1025?(mainmenu.vars.desktopStyles=!1,mainmenu.vars.mobileStyles=!0):(mainmenu.vars.desktopStyles=!0,mainmenu.vars.mobileStyles=!1)}};$(document).ready(function(){mainmenu.init()});var metamenu={vars:{isMobile:!1,isDesktop:!0,desktopStyles:!0,mobileStyles:!0,menuKeepOpen:!1,isOpen:!1,windowLoaded:!1,headerContainer:$(".c-o-header"),navsContainer:$(".c-o-header__navs"),searchContainer:$(".c-o-header__search"),navSelector:$(".c-m-meta-nav"),navFirstLevelSelector:$(".c-m-meta-nav__level_1 > li"),navSecondLevelSelector:$(".c-m-meta-nav__level_2 > li"),navSubmenuSelector:$(".c-m-meta-nav__submenu"),menuToggle:$(".c-m-meta-toggle"),menuClose:$(".c-m-meta-nav__submenu-close"),menuCloseToggle:$(".c-m-meta-nav__submenu-close-btn"),logoutTimerSelector:$(".c-m-meta-nav__logout-timer"),logoutTimerSelectorShort:$(".c-m-meta-nav__logout-timer--short"),logoutTimerSelectorShortWrap:$(".c-m-meta-nav__logout-timer--short").closest("li"),logoutTimerSelectorLong:$(".c-m-meta-nav__logout-timer--long"),logoutTimerSelectorLongWrap:$(".c-m-meta-nav__logout-timer--long").closest("p"),pageOverlaySelector:$(".c-m-page-overlay"),openClasses:"opened js-opened",activeClasses:"active js-active",overflowClasse
11s:"o-overflow-hidden js-o-overflow-hidden o-overflow-hidden--not-win",menuOpenClasses:"menu-opened js-menu-opened",ariaExpandAttribute:"aria-expanded",frontendDevUrl:"frontend.fhe.dd.rsm-development.de"},init:function(){this.getViewport(),this.initMenu(),this.getMenuItemHeights(),this.setLogoutTimer(600),this.logoutOnTabClose()},initMenu:function(){metamenu.vars.navFirstLevelSelector.on("click","> a:not(.c-m-meta-nav__level_1--linkable)",function(e){e.preventDefault(),metamenu.vars.isDesktop&&metamenu.vars.windowLoaded&&(mainmenu.closeDesktopMenu(),metamenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),metamenu.vars.navFirstLevelSelector.find("> a").attr(metamenu.vars.ariaExpandAttribute,!1),metamenu.vars.navsContainer.addClass("opened js-opened"),$(this).parent().addClass("opened js-opened"),$(this).attr(metamenu.vars.ariaExpandAttribute,!0),metamenu.vars.pageOverlaySelector.addClass("active js-active"),metamenu.moveContent($(this).parent(),!0,!1),metamenu.vars.headerContainer.addClass("opened js-opened metanav-opened js-metanav-opened"),metamenu.vars.isOpen=!0)}),metamenu.vars.menuCloseToggle.on("click",function(e){e.stopPropagation(),metamenu.closeDesktopMenu(),metamenu.moveContent("",!1,!0,!0)}),$(document).bind("click",function(){metamenu.vars.headerContainer.removeClass("opened js-opened fixed js-fixed metanav-opened js-metanav-opened"),metamenu.vars.navsContainer.removeClass(metamenu.vars.openClasses),metamenu.vars.navFirstLevelSelector.removeClass(metamenu.vars.openClasses),metamenu.vars.navFirstLevelSelector.find("> a").attr(metamenu.vars.ariaExpandAttribute,!1),metamenu.vars.menuClose.removeClass(metamenu.vars.activeClasses),$("body").removeClass(metamenu.vars.overflowClasses),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||metamenu.vars.pageOverlaySelector.removeClass(metamenu.vars.activeClasses),metamenu.moveContent("",!1,!0,!0),metamenu.vars.isOpen=!1}),$(".c-m-meta-nav").bind("click",function(e){e.stopPropagation()})},closeDesktopMenu:function(){metamenu.vars.isDesktop&&(metamenu.vars.headerContainer.removeClass("opened js-opened fixed js-fixed metanav-opened js-metanav-opened"),metamenu.vars.navsContainer.removeClass(metamenu.vars.openClasses),metamenu.vars.navFirstLevelSelector.removeClass(metamenu.vars.openClasses),metamenu.vars.navFirstLevelSelector.find("> a").attr(metamenu.vars.ariaExpandAttribute,!1),metamenu.vars.menuClose.removeClass(metamenu.vars.activeClasses),$("body").removeClass(metamenu.vars.overflowClasses),$(".c-m-search-d").hasClass("c-m-search-d--indicator-open-animation")||metamenu.vars.pageOverlaySelector.removeClass(metamenu.vars.activeClasses),metamenu.vars.isOpen=!1)},resetMenu:function(){metamenu.vars.isDesktop&&!metamenu.vars.desktopStyles?($(".c-o-header__navs").hasClass("opened")?($(".c-o-header__navs").css("display","").removeClass("opened js-opened"),$(".c-m-menu-toggle button").removeClass("tcon-transform"),metamenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),metamenu.vars.headerContainer.removeClass("opened js-opened metanav-opened js-metanav-opened"),metamenu.moveContent("",!1,!0,!0),metamenu.vars.isOpen=!1):($(".c-o-header__navs").css("display",""),metamenu.vars.navFirstLevelSelector.find(".c-m-meta-nav__submenu").css("display",""),metamenu.vars.navSecondLevelSelector.find(".c-m-meta-nav__level_3, p").css("display","")),$(".c-m-meta-nav__level_1 > li, c-m-meta-nav__level_2 > li").hasClass("opened")&&(metamenu.vars.navFirstLevelSelector.removeClass("opened js-opened"),metamenu.vars.navFirstLevelSelector.find(".c-m-meta-nav__submenu").css("display",""),metamenu.vars.navSecondLevelSelector.removeClass("opened js-opened"),metamenu.vars.navSecondLevelSelector.find(".c-m-meta-nav__level_3, p").css("display",""),metamenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),metamenu.vars.headerContainer.removeClass("opened js-opened metanav-opened js-metanav-opened"),metamenu.moveContent("",!1,!0,!0),metamenu.vars.isOpen=!1),metamenu.vars.desktopStyles=!0,metamenu.vars.mobileStyles=!1):metamenu.vars.isMobile&&!metamenu.vars.mobileStyles&&($(".c-o-header__navs").hasClass("opened")?($(".c-o-header__navs").css("display","").removeClass("opened js-opened"),$(".c-m-menu-toggle button").removeClass("tcon-transform"),metamenu.vars.pageOverlaySelector.removeClass("active js-active"),$("body").removeClass("o-overflow-hidden js-o-overflow-hidden"),metamenu.vars.headerContainer.removeClass("opened js-opened metanav-opened js-metanav-opened"),metamenu.moveContent("",!1,!0,!0),metamenu.vars.isOpen=!1):$(".c-o-header__navs").css("display",""),metamenu.vars.desktopStyles=!1,metamenu.vars.mobileStyles=!0)},getMenuItemHeights:function(){metamenu.vars.isDesktop&&metamenu.vars.navFirstLevelSelector.each(function(){var e,t=$(this).find(".c-m-meta-nav__submenu");t.css({visiblity:"hidden",height:"auto"}
11),e=t.outerHeight()?t.outerHeight():0,t.css({visiblity:"",height:""}),$(this).attr("data-item-height",Math.floor(e)),t.css("top",-1*e+"px")})},moveContent:function(e,t,a,n){var i,s;t&&!metamenu.vars.headerContainer.hasClass("metanav-opened")?(i=e.attr("data-item-height"),s=e.find(".c-m-meta-nav__submenu"),$(".c-t-main").css("margin-top","0"),metamenu.vars.headerContainer.css({position:"relative"}),s.css({visibility:"visible",top:-1*i+"px"}),$(".c-t-page-wrapper").css("padding-top",i-1+"px"),$("html, body").animate({scrollTop:0},"fast")):t&&(i=e.attr("data-item-height"),s=e.find(".c-m-meta-nav__submenu"),metamenu.vars.navSubmenuSelector.css({visibility:"",opacity:"0"}),$(".c-t-main").css("margin-top","0"),metamenu.vars.headerContainer.css({position:"relative"}),s.css({visibility:"visible",opacity:"1"}),$(".c-t-page-wrapper").css("padding-top",i-1+"px"),$("html, body").animate({scrollTop:0},"fast")),a&&n&&($(".c-t-page-wrapper").css("padding-top",""),setTimeout(function(){metamenu.vars.headerContainer.css({top:"",position:""}),$(".c-t-main").css("margin-top",""),metamenu.vars.navSubmenuSelector.css({visibility:"",opacity:""})},500),metamenu.getMenuItemHeights())},setLogoutTimer:function(e){var t,a,n,i,s,o,r,c,l,d,m,v,u,p,f;metamenu.vars.logoutTimerSelector.length&&(t=metamenu.vars.logoutTimerSelector,o=metamenu.vars.logoutTimerSelectorShort,a=metamenu.vars.logoutTimerSelectorShortWrap,r=metamenu.vars.logoutTimerSelectorLong,n=metamenu.vars.logoutTimerSelectorLongWrap,i=t.data("logout-duration"),s=t.data("logout-target"),o=o.data("logout-finish"),r=r.data("logout-finish"),l=void 0!==o?o:"Logged out",d=void 0!==r?r:"You were logged out.",m=(c=void 0!==i?i:e)+1,v=new Date,f=setInterval(function(){u=parseInt(c/60,10),p=parseInt(c%60,10),u=u<10?"0"+u:u,p=p<10?"0"+p:p,t.text(u+":"+p),p=new Date,p=(p.getTime()-v.getTime())/1e3,c=m-p,m<p&&(clearInterval(f),a.text(l),n.text(d),-1===window.location.hostname.indexOf(metamenu.vars.frontendDevUrl)&&(window.location=s||window.location.href))},1e3))},logoutOnTabClose:function(){function e(e){if((e=e||window.event).newValue)if("getSessionStorage"==e.key)localStorage.setItem("sessionStorage",JSON.stringify(sessionStorage)),localStorage.removeItem("sessionStorage");else if("sessionStorage"==e.key&&!sessionStorage.length){var t,a=JSON.parse(e.newValue);for(t in a)sessionStorage.setItem(t,a[t]);window.sessionStorage&&!sessionStorage.getItem("fe_typo_user_active")&&(document.cookie=n+"; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")}}var n="fe_typo_user=";window.addEventListener?window.addEventListener("storage",e,{passive:!0}):window.attachEvent("onstorage",e),sessionStorage.length||(localStorage.setItem("getSessionStorage","foobar"),localStorage.removeItem("getSessionStorage","foobar")),window.addEventListener("beforeunload",function(e){0<=document.cookie.indexOf(n)&&window.sessionStorage&&sessionStorage.setItem("fe_typo_user_active","true"),window.sessionStorage&&!sessionStorage.getItem("fe_typo_user_active")&&(document.cookie=n+"; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")},{passive:!0}),"loading"!==document.readyState?setTimeout(function(){window.sessionStorage&&!sessionStorage.getItem("fe_typo_user_active")&&(document.cookie=n+"; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")},1e3):document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){window.sessionStorage&&!sessionStorage.getItem("fe_typo_user_active")&&(document.cookie=n+"; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")},1e3)},{passive:!0})},getViewport:function(){$(window).resize(function(){window.innerWidth<1025?(metamenu.vars.isMobile=!0,metamenu.vars.isDesktop=!1,metamenu.vars.isOpen&&metamenu.moveContent("",!1,!0)):(metamenu.vars.isDesktop=!0,metamenu.vars.isMobile=!1,metamenu.getMenuItemHeights(),metamenu.vars.isOpen&&metamenu.moveContent($(".c-m-meta-nav__level_1 > li.opened"),!0,!1)),metamenu.resetMenu()}),$(window).trigger("resize"),window.innerWidth<1025?(metamenu.vars.desktopStyles=!1,metamenu.vars.mobileStyles=!0):(metamenu.vars.desktopStyles=!0,metamenu.vars.mobileStyles=!1)}};$(document).ready(function(){metamenu.init()}),$(window).on("load",function(){metamenu.vars.windowLoaded=!0}
11),$(document).ready(function(){var e=$(".c-m-table.c-m-table--vertical");$("table .has-tooltip").each(function(){var e=$(this).data("tooltip");$(this).hover(function(){$('<span class="tooltip">'+e+"</span>").appendTo($(this))},function(){$(this).find(".tooltip").remove()})}),e.each(function(){$(this).find("tr").each(function(){$(this).find("td").first().addClass("first-td js-first-td"),$(this).find("td").last().addClass("last-td js-last-td")}),$(this).find("tr").last().addClass("last-tr js-last-tr")}),e.each(function(){var a=[];$(this).find("thead tr th").each(function(){a.push($(this)[0].innerHTML)}),$(this).find("tbody tr:not(.c-m-table__tr--no-mobile-adjustment)").each(function(){$(this).find("td").each(function(e,t){$(this).attr("data-label",a[e])})})})}),$(document).ready(function(){var a=["ActionScript","AppleScript","Asp","BASIC","C","C++","Clojure","COBOL","ColdFusion","Erlang","Fortran","Groovy","Haskell","Java","JavaScript","Lisp","Perl","PHP","Python","Ruby","Scala","Scheme"];$(".c-m-search-box").each(function(e,t){$(this).addClass("c-m-search-box__index-"+e),$(this).find(".c-m-search-box__autocomplete").addClass("c-m-search-box__autocomplete-"+e),$(this).find(".c-m-search-box__search-input").autocomplete({source:a,appendTo:".c-m-search-box__autocomplete-"+e})}
11),$(".c-m-search-box").each(function(){var e=$(this);e.find(".c-m-search-box__delete").click(function(){e.find(".c-m-search-box__search-input").val(""),e.find(".c-m-search-box__search-input").focus()})})});var openSearch=function(){$(".c-m-search-d").addClass("c-m-search-d--indicator-open-animation"),mainmenu.vars.pageOverlaySelector.addClass("active js-active"),setTimeout(function(){$(".c-m-search-d").addClass("c-m-search-d--wrapper-open-animation")},450),setTimeout(function(){$(".c-m-search-d__wrapper .c-m-search-box__search-input").focus()},1e3)},closeSearch=function(){$(".c-m-search-d").addClass("c-m-search-d--wrapper-close-animation"),mainmenu.vars.pageOverlaySelector.removeClass("active js-active"),setTimeout(function(){$(".c-m-search-d").removeClass("c-m-search-d--indicator-open-animation c-m-search-d--wrapper-open-animation c-m-search-d--wrapper-close-animation")},450)};$(document).ready(function(){$(".c-m-search-d__indicator").click(function(){openSearch()}),$(".c-m-search-d__indicator").focus(function(){$(document).on("keypress",function(e){13==e.which&&$(".c-m-search-d__indicator").is(":focus")&&openSearch()})}),$("#main *").focus(function(){closeSearch()}),$(".c-m-search-d__close").click(function(){closeSearch()})}),$(document).ready(function(){0<$(".c-m-slider").length&&$(".c-m-slider").each(function(e,t){var a,n=$(this),i=n;i[0].querySelectorAll(".c-m-image-text-teaser").length<=1||n.hasClass("c-m-gallery")&&$(window).width()<768||(n.addClass("c-m-slider__slider-"+e),a=n.closest(".c-t-wrap"),n.hasClass("c-m-gallery")&&(n.closest(".c-t-container-wrapper").css("position","relative"),a=n.closest(".c-t-container-wrapper")),e={infinite:!0,speed:500,slidesToShow:1,cssEase:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",fade:!1,appendArrows:a,adaptiveHeight:!0,dots:!0,responsive:[{breakpoint:1023,settings:{arrows:!0}}]},a={},i.attr("data-slider-options")&&(a=i.data("slider-options")),$.extend(e,a),$(this).hasClass("wrap__inner--equal-height-columns")?i.attr("data-slider-init-viewport-max")?(sliderInitViewport=i.data("slider-init-viewport-max"),$(window).width()<=sliderInitViewport&&n.slick(e).on("setPosition afterChange edge",function(e,t){n.find(".slick-slide").css("height",t.$slideTrack.height()+"px")})):n.slick(e).on("setPosition afterChange edge",function(e,t){n.find(".slick-slide").css("height",t.$slideTrack.height()+"px")}):i.attr("data-slider-init-viewport-max")?(sliderInitViewport=i.data("slider-init-viewport-max"),$(window).width()<=sliderInitViewport&&n.slick(e)):n.slick(e),n.hasClass("c-m-slider--fixed-arrow-position")&&n.closest(".c-t-wrap").find(".slick-arrow").addClass("slick-arrow--fixed-position"),$(".slick-arrow").attr("tabindex","0"),$(".slick-arrow").attr("role","button"),$(".slick-arrow").mouseout(function(){$(".slick-arrow").focusout()}))})});var stageContentSlider={sliderElement:$(".c-m-teaser-slider__content-slider"),specialClass:"js-teaser-slider-content-slider-",getSlider:function(){stageContentSlider.sliderElement.each(function(i,e){var t=$(this).data("slides-to-show"),a=!!$(this).data("slides-autoplay")&&$(this).data("slides-autoplay"),s=$(this).data("slides-interval"),o=$(this).data("progress-bar"),r=$(this).data("pause-on-hover"),n=$(this).data("slide-caption").split(",").map(JSON.parse),c=$(this).find(".c-m-teaser-slider__content-slider-slide").length;$(this).addClass(stageContentSlider.specialClass+i),$(this).attr("data-content-slider-index",i),$(this).parent().attr("data-content-slider-slide-count",c),$.when(stageContentSlider.initSlider(i,t,a,s,o,r,n)).done(function(){var e,t,a,n;o&&(1!==(e=$("."+stageContentSlider.specialClass+i).find(".slick-dots li")).length?(t=$("."+stageContentSlider.specialClass+i).find(".slick-arrow"),a=$("."+stageContentSlider.specialClass+i).find(".slick-dots li.slick-active .progress-bar"),n=$("."+stageContentSlider.specialClass+i).find(".slick-dots li .progress-bar"),contentSliderProgressbar.initProgressbar($("."+stageContentSlider.specialClass+i),s,r,i,e,t,a,n)):$("."+stageContentSlider.specialClass+i).find(".slick-dots").remove())})})},initSlider:function(e,t,a,n,i,s,o){var r=$("."+stageContentSlider.specialClass+e);r.slick({autoplay:a,dots:!0,arrows:!0,slidesToShow:t,centerMode:!1,mobileFirst:!0,fade:!0,speed:400,draggable:!1,swipe:!0,swipeToSlide:!1,verticalSwiping:!1,touchMove:!1,dotsClass:"slick-dots slick-dots--captions",accessibility:!0,customPaging:function(e,t){return i?(4<e.slideCount&&r.addClass("small-dots js-small-dots"),$('<button type="button" data-role="none" role="button" tabindex="0"><span class="progress-bar">'+(t+1)+'</span><span class="caption">'+o[t]+"</span></button>")):$('<button class="no-progress-bar" type="button" data-role="none" role="button" tabindex="0"><span class="progress-bar">'+(t+1)+'</span><span class="caption">'+o[t]+"</span></button>")},asNavFor:".js-teaser-slider-img-slider-"+e}),r.on("beforeChange",function(e,t,a,n){r.find(".slick-arrow").addClass("o-pointer-events-none"),r.find(".slick-dots button, .slick-dots li").addClass("o-pointer-events-none")}),r.on("afterChange",function(e,t,a,n){setTimeout(function(){r.find(".slick-arrow").removeClass("o-pointer-events-none"),r.find(".slick-dots button, .slick-dots li").removeClass("o-pointer-events-none")},200)}),$(".pause-slider").click(function(){r.find(".progress-bar");contentSliderProgressbar.resetProgressbar($("."+stageContentSlider.specialClass+e).find(".slick-dots li .progress-bar"),e),r.find("button").addClass("no-progress-bar"),r.slick("slickSetOption",{autoplay:!1},!0),$(this).addClass("invisible"),$(".play-slider").removeClass("invisible")}),$(".play-slider").click(function(){r.slick("slickSetOption",{autoplay:!0},!0),$(this).addClass("invisible"),$(".pause-slider").removeClass("invisible")})}},contentSliderProgressbar={tick:[],isPause:[],percentTime:[],initProgressbar:function(e,t,a,n,i,s,o,r){contentSliderProgressbar.resetProgressbar(o,n),contentSliderProgressbar.percentTime[n]=0,contentSliderProgressbar.isPause[n]=!1,contentSliderProgressbar.tick[n]=setInterval(function(){contentSliderProgressbar.intervalProgressbar(e,o,t,n)},10),i.parent().addClass("slick-dots--progressbar"),e.on("click",".slick-dots li",function(){$(this).find(".progress-bar");contentSliderProgressbar.resetProgressbar(r,n),$(this).find("button").addClass("no-progress-bar")}),e.on("click",".slick-arrow",function(){e.find(".slick-dots li.slick-active .progress-bar");contentSliderProgressbar.resetProgressbar(r,n),e.find(".slick-dots li.slick-active").find("button").addClass("no-progress-bar")}),e.on("click",".c-o-lightbox",function(){e.find(".slick-dots li.slick-active .progress-bar");contentSliderProgressbar.resetProgressbar(r,n),e.find(".slick-dots li.slick-active").find("button").addClass("no-progress-bar")}),a&&e.on({mouseenter:function(){contentSliderProgressbar.isPause[n]=!0},mouseleave:function(){contentSliderProgressbar.isPause[n]=!1}})},intervalProgressbar:function(e,t,a,n){var i=e.find(".slick-dots li"),s=e.find(".slick-arrow"),t=e.find(".slick-dots li.slick-active .progress-bar"),o=e.find(".slick-dots li .progress-bar");!1===contentSliderProgressbar.isPause[n]&&(contentSliderProgressbar.percentTime[n]+=1/(a+.1),t.css({width:Math.round(contentSliderProgressbar.percentTime[n])+"%"}),100<=contentSliderProgressbar.percentTime[n]&&(e.slick("slickNext"),t.css({width:"0%"}),contentSliderProgressbar.initProgressbar(e,a,contentSliderProgressbar.isPause[n],n,i,s,t,o)))},resetProgressbar:function(e,t){e.css({width:"0%"}),clearTimeout(contentSliderProgressbar.tick[t])}};$(document).ready(function(){stageContentSlider.getSlider()});var stageImageSlider={sliderElement:$(".c-m-teaser-slider__img-slider"),specialClass:"js-teaser-slider-img-slider-",getSlider:function(){stageImageSlider.sliderElement.each(function(e,t){var a=$(this).data("slides-to-show"),n=$(this).data("slides-autoplay"),i=$(this).data("slides-interval");$(this).addClass(stageImageSlider.specialClass+e),stageImageSlider.initSlider(e,a,n,i)})},initSlider:function(e,t,a,n){var i=$("."+stageImageSlider.specialClass+e),s=".js-teaser-slider-content-slider-"+e,o=$(i[0]).closest(".c-m-teaser-slider__img").find(".c-m-teaser-slider__img__copyright-container");
11i.on("init",function(){var e=$(i[0]).find(".slick-active").find(".c-m-teaser-slider__img-slider-slide").data("copyright");o.css("opacity",0).html(e).fadeTo(150,1)}),i.on("beforeChange",function(){o.css("opacity",0).html("")}),i.on("afterChange",function(e,t,a){a=t.$slides.get(a),a=$(a).find(".c-m-teaser-slider__img-slider-slide").data("copyright");o.html(a).fadeTo(150,1)}),i.slick({dots:!1,arrows:!1,slidesToShow:1,adaptiveHeight:!0,variableWidth:!0,centerMode:!1,asNavFor:s,draggable:!1,swipe:!0,swipeToSlide:!1,verticalSwiping:!1,touchMove:!1,centerPadding:0,responsive:[{breakpoint:767,settings:{variableWidth:!1,adaptiveHeight:!0,centerMode:!1}}]}),i.on("swipe",function(e,t,a){"left"!==a&&"right"!==a||($(s).find(".slick-dots li .progress-bar").css({width:"0%"}),clearTimeout(contentSliderProgressbar.tick),$(s).find(".slick-dots li.slick-active").find("button").addClass("no-progress-bar"))}),$(s).on("swipe",function(e,t,a){"left"!==a&&"right"!==a||($(s).find(".slick-dots li .progress-bar").css({width:"0%"}),clearTimeout(contentSliderProgressbar.tick),$(s).find(".slick-dots li.slick-active").find("button").addClass("no-progress-bar"))}),stageImageSlider.refreshSlider()},refreshSlider:function(){stageImageSlider.sliderElement.find("img").on("lazyloaded",function(e){$(e.target).closest(".c-m-teaser-slider__img-slider").slick("refresh")})}};function adjustStageHeightMobile(){$(window).width()<768&&$(".c-m-stage").each(function(){$(this).outerHeight();var e=$(this).find(".c-m-stage__content").outerHeight(),t=$(this).find(".c-m-stage__image img"),a=$(window).width();$(this).hasClass("c-m-stage--small")||(t.css({width:"auto",height:a+"px"}),$(this).find(".c-m-stage__inner").css("top",a+"px"),$(".c-m-stage").css("padding-bottom",e))})}$(document).ready(function(){stageImageSlider.getSlider()}),$(document).ready(function(){}),$(document).ready(function(){$(".c-m-contact-teaser__mail-copy").click(function(){var e=$
11(this),t=$("<input>");$("body").append(t),t.val(e.attr("data-copy")).select(),document.execCommand("copy"),t.remove(),$(e).addClass("copy-successful"),setTimeout(function(){$(e).removeClass("copy-successful")},2e3)})}),$(document).ready(function(){$(".c-m-course-list  ").each(function(){$(this).closest(".c-t-grid-s-12").addClass("o-display-none-print")})}),$(document).ready(function(){$(".c-m-download-list ").each(function(){$(this).closest(".c-t-grid-s-12").addClass("o-display-none-print")})}),$(document).ready(function(){$(".c-m-faculty-teaser__list a").mousedown(function(e){e.preventDefault()}),$(".c-m-faculty-teaser__list a").focus(function(){$(this).closest(".c-m-faculty-teaser").addClass("open")}),$(window).width()<768&&$(".c-m-faculty-teaser__title-wrapper").click(function(){$(this).closest(".c-m-faculty-teaser").hasClass("c-m-faculty-teaser--open")?$(this).closest(".c-m-faculty-teaser").removeClass("c-m-faculty-teaser--open"):($(this).closest("section").find(".c-m-faculty-teaser").removeClass("c-m-faculty-teaser--open"),$(this).closest(".c-m-faculty-teaser").addClass("c-m-faculty-teaser--open"))})});var deviceDetector=function(){function e(e){return void 0===e?e=t:t=e.toLowerCase(),a.classList.remove("tablet","phone","desktop"),/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(t)?(a.classList.add("tablet"),"tablet"):/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/.test(t)?(a.classList.add("phone"),"phone"):(a.classList.add("desktop"),"desktop")}var t=navigator.userAgent.toLowerCase(),a=document.documentElement;return{device:e(),detect:e,isMobile:"desktop"!=e(),userAgent:t}}();$(document).ready(function(){$(".molecules").length&&($("header").css("height","auto"),$('<ul class="molecules-nav" style="background:white;padding:5px 20px;"></ul>').insertBefore("header h1"),$('h2[id^="feature"]').each(function(){var e=$
11(this).text().split(" - "),e='<li style="display: inline-block;"> <a href="#'+$(this).closest(".blue-box").attr("id")+'">'+e[0]+"</a> ~&nbsp;</li> ";$(e).appendTo(".molecules-nav")}))}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.transformicons=t()}(this||window,function(){"use strict";function m(e){return"string"==typeof e?Array.prototype.slice.call(document.querySelectorAll(e)):void 0===e||e instanceof Array?e:[e]}function a(e,t,a){var n,i,s=(a?"remove":"add")+"EventListener",o=m(e),r=o.length,c={};for(n in v)c[n]=t&&t[n]?(i=t[n],"string"==typeof i?i.toLowerCase().split(" "):i):v[n];for(;r--;)for(var l in c)for(var d=c[l].length;d--;)o[r][s](c[l][d],u)}var n={},t="tcon-transform",v={transform:["click"],revert:["click"]},u=function(e){n.toggle(e.currentTarget)};return n.add=function(e,t){return a(e,t),n},n.remove=function(e,t){return a(e,t,!0),n},n.transform=function(e){return m(e).forEach(function(e){e.classList.add(t)}),n},n.revert=function(e){return m(e).forEach(function(e){e.classList.remove(t)}),n},n.toggle=function(e){return m(e).forEach(function(e){n[e.classList.contains(t)?"revert":"transform"](e)}),n},n}),transformicons.add(".tcon"),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.transformicons=t()}(this||window,function(){"use strict";function m(e){return"string"==typeof e?Array.prototype.slice.call(document.querySelectorAll(e)):void 0===e||e instanceof Array?e:[e]}function a(e,t,a){var n,i,s=(a?"remove":"add")+"EventListener",o=m(e),r=o.length,c={};for(n in v)c[n]=t&&t[n]?"string"==typeof(i=t[n])?i.toLowerCase().split(" "):i:v[n];for(;r--;)for(var l in c)for(var d=c[l].length;d--;)o[r][s](c[l][d],u)}var n={},t="tcon-transform",v={transform:["click"],revert:["click"]},u=function(e){n.toggle(e.currentTarget)};return n.add=function(e,t){return a(e,t),n},n.remove=function(e,t){return a(e,t,!0),n},n.transform=function(e){return m(e).forEach(function(e){e.classList.add(t)}),n},n.revert=function(e){return m(e).forEach(function(e){e.classList.remove(t)}),n},n.toggle=function(e){return m(e).forEach(function(e){n[e.classList.contains(t)?"revert":"transform"](e)}),n},n}),transformicons.add(".tcon"),jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdaysFull:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],today:"Heute",clear:"Löschen",close:"Schließen",firstDay:1,format:"dd.mm.yyyy",formatSubmit:"dd.mm.yyyy"});
12;(function($) {
13    var $facetforms = $('.o-rsmsolr-facetform');
14    $facetforms.on('submit', function() {
15        var nb = 0;
16        var $form = $(this);
17        $form.find('.o-rsmsolr-facetform__field input[type=checkbox]').each(function() {
18            $field = $(this);
19            $field.attr('name', 'tx_solr[filter][' + nb + ']');
20            nb += 1;
21        });
22    });
23    $facetforms.addClass('o-rsmsolr-facetform--js-eventhandler');
24})(jQuery);
25
26/*! URI.js v1.19.11 http://medialize.github.io/URI.js/ */
27/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, jquery.URI.js */
28/*
29 URI.js - Mutating URLs
30 IPv6 Support
31
32 Version: 1.19.11
33
34 Author: Rodney Rehm
35 Web: http://medialize.github.io/URI.js/
36
37 Licensed under
38   MIT License http://www.opensource.org/licenses/mit-license
39
40 https://mths.be/punycode v1.4.0 by @mathias  URI.js - Mutating URLs
41 Second Level Domain (SLD) Support
42
43 Version: 1.19.11
44
45 Author: Rodney Rehm
46 Web: http://medialize.github.io/URI.js/
47
48 Licensed under
49   MIT License http://www.opensource.org/licenses/mit-license
50
51 URI.js - Mutating URLs
52
53 Version: 1.19.11
54
55 Author: Rodney Rehm
56 Web: http://medialize.github.io/URI.js/
57
58 Licensed under
59   MIT License http://www.opensource.org/licenses/mit-license
60
61 URI.js - Mutating URLs
62 jQuery Plugin
63
64 Version: 1.19.11
65
66 Author: Rodney Rehm
67 Web: http://medialize.github.io/URI.js/jquery-uri-plugin.html
68
69 Licensed under
70   MIT License http://www.opensource.org/licenses/mit-license
71
72*/
73(function(m,u){"object"===typeof module&&module.exports?module.exports=u():"function"===typeof define&&define.amd?define(u):m.IPv6=u(m)})(this,function(m){var u=m&&m.IPv6;return{best:function(q){q=q.toLowerCase().split(":");var k=q.length,d=8;""===q[0]&&""===q[1]&&""===q[2]?(q.shift(),q.shift()):""===q[0]&&""===q[1]?q.shift():""===q[k-1]&&""===q[k-2]&&q.pop();k=q.length;-1!==q[k-1].indexOf(".")&&(d=7);var n;for(n=0;n<k&&""!==q[n];n++);if(n<d)for(q.splice(n,1,"0000");q.length<d;)q.splice(n,0,"0000");
74    for(n=0;n<d;n++){k=q[n].split("");for(var z=0;3>z;z++)if("0"===k[0]&&1<k.length)k.splice(0,1);else break;q[n]=k.join("")}k=-1;var x=z=0,M=-1,F=!1;for(n=0;n<d;n++)F?"0"===q[n]?x+=1:(F=!1,x>z&&(k=M,z=x)):"0"===q[n]&&(F=!0,M=n,x=1);x>z&&(k=M,z=x);1<z&&q.splice(k,z,"");k=q.length;d="";""===q[0]&&(d=":");for(n=0;n<k;n++){d+=q[n];if(n===k-1)break;d+=":"}""===q[k-1]&&(d+=":");return d},noConflict:function(){m.IPv6===this&&(m.IPv6=u);return this}}});
75(function(m){function u(p){throw new RangeError(J[p]);}function q(p,t){for(var y=p.length,v=[];y--;)v[y]=t(p[y]);return v}function k(p,t){var y=p.split("@"),v="";1<y.length&&(v=y[0]+"@",p=y[1]);p=p.replace(G,".");y=p.split(".");y=q(y,t).join(".");return v+y}function d(p){for(var t=[],y=0,v=p.length,C,H;y<v;
vendor: 4,849 bytes, lines 75-85
75)C=p.charCodeAt(y++),55296<=C&&56319>=C&&y<v?(H=p.charCodeAt(y++),56320==(H&64512)?t.push(((C&1023)<<10)+(H&1023)+65536):(t.push(C),y--)):t.push(C);return t}function n(p){return q(p,function(t){var y=
76  "";65535<t&&(t-=65536,y+=g(t>>>10&1023|55296),t=56320|t&1023);return y+=g(t)}).join("")}function z(p,t,y){var v=0;p=y?K(p/700):p>>1;for(p+=K(p/t);455<p;v+=36)p=K(p/35);return K(v+36*p/(p+38))}function x(p){var t=[],y=p.length,v=0,C=128,H=72,a,b;var c=p.lastIndexOf("-");0>c&&(c=0);for(a=0;a<c;++a)128<=p.charCodeAt(a)&&u("not-basic"),t.push(p.charCodeAt(a));for(c=0<c?c+1:0;c<y;){a=v;var e=1;for(b=36;;b+=36){c>=y&&u("invalid-input");var f=p.charCodeAt(c++);f=10>f-48?f-22:26>f-65?f-65:26>f-97?f-97:36;
77  (36<=f||f>K((2147483647-v)/e))&&u("overflow");v+=f*e;var l=b<=H?1:b>=H+26?26:b-H;if(f<l)break;f=36-l;e>K(2147483647/f)&&u("overflow");e*=f}e=t.length+1;H=z(v-a,e,0==a);K(v/e)>2147483647-C&&u("overflow");C+=K(v/e);v%=e;t.splice(v++,0,C)}return n(t)}function M(p){var t,y,v,C=[];p=d(p);var H=p.length;var a=128;var b=0;var c=72;for(v=0;v<H;++v){var e=p[v];128>e&&C.push(g(e))}for((t=y=C.length)&&C.push("-");t<H;){var f=2147483647;for(v=0;v<H;++v)e=p[v],e>=a&&e<f&&(f=e);var l=t+1;f-a>K((2147483647-b)/l)&&
78u("overflow");b+=(f-a)*l;a=f;for(v=0;v<H;++v)if(e=p[v],e<a&&2147483647<++b&&u("overflow"),e==a){var w=b;for(f=36;;f+=36){e=f<=c?1:f>=c+26?26:f-c;if(w<e)break;var B=w-e;w=36-e;var D=C;e+=B%w;D.push.call(D,g(e+22+75*(26>e)-0));w=K(B/w)}C.push(g(w+22+75*(26>w)-0));c=z(b,l,t==y);b=0;++t}++b;++a}return C.join("")}var F="object"==typeof exports&&exports&&!exports.nodeType&&exports,P="object"==typeof module&&module&&!module.nodeType&&module,h="object"==typeof global&&global;if(h.global===h||h.window===h||
79  h.self===h)m=h;var r=/^xn--/,A=/[^\x20-\x7E]/,G=/[\x2E\u3002\uFF0E\uFF61]/g,J={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},K=Math.floor,g=String.fromCharCode,E;var I={version:"1.3.2",ucs2:{decode:d,encode:n},decode:x,encode:M,toASCII:function(p){return k(p,function(t){return A.test(t)?"xn--"+M(t):t})},toUnicode:function(p){return k(p,function(t){return r.test(t)?x(t.slice(4).toLowerCase()):
80    t})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return I});else if(F&&P)if(module.exports==F)P.exports=I;else for(E in I)I.hasOwnProperty(E)&&(F[E]=I[E]);else m.punycode=I})(this);
81(function(m,u){"object"===typeof module&&module.exports?module.exports=u():"function"===typeof define&&define.amd?define(u):m.SecondLevelDomains=u(m)})(this,function(m){var u=m&&m.SecondLevelDomains,q={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",
82    bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",
83    ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",
84    es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
85    id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" c
85o net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
86    kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",
87    mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",
88    ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",
89    ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
90    tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
91    rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
92    tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk d
vendor: 30,898 bytes, lines 92-150
92p edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
93    us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",
94    org:"ae",de:"com "},has:function(k){var d=k.lastIndexOf(".");if(0>=d||d>=k.length-1)return!1;var n=k.lastIndexOf(".",d-1);if(0>=n||n>=d-1)return!1;var z=q.list[k.slice(d+1)];return z?0<=z.indexOf(" "+k.slice(n+1,d)+" "):!1},is:function(k){var d=k.lastIndexOf(".");if(0>=d||d>=k.length-1||0<=k.lastIndexOf(".",d-1))return!1;var n=q.list[k.slice(d+1)];return n?0<=n.indexOf(" "+k.slice(0,d)+" "):!1},get:function(k){var d=k.lastIndexOf(".");if(0>=d||d>=k.length-1)return null;var n=k.lastIndexOf(".",d-1);
95    if(0>=n||n>=d-1)return null;var z=q.list[k.slice(d+1)];return!z||0>z.indexOf(" "+k.slice(n+1,d)+" ")?null:k.slice(n+1)},noConflict:function(){m.SecondLevelDomains===this&&(m.SecondLevelDomains=u);return this}};return q});
96(function(m,u){"object"===typeof module&&module.exports?module.exports=u(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],u):m.URI=u(m.punycode,m.IPv6,m.SecondLevelDomains,m)})(this,function(m,u,q,k){function d(a,b){var c=1<=arguments.length,e=2<=arguments.length;if(!(this instanceof d))return c?e?new d(a,b):new d(a):new d;if(void 0===a){if(c)throw new TypeError("undefined is not a valid argument for URI");
97  a="undefined"!==typeof location?location.href+"":""}if(null===a&&c)throw new TypeError("null is not a valid argument for URI");this.href(a);return void 0!==b?this.absoluteTo(b):this}function n(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function z(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function x(a){return"Array"===z(a)}function M(a,b){var c={},e;if("RegExp"===z(b))c=null;else if(x(b)){var f=0;for(e=b.length;f<e;f++)c[b[f]]=!0}else c[b]=
98  !0;f=0;for(e=a.length;f<e;f++)if(c&&void 0!==c[a[f]]||!c&&b.test(a[f]))a.splice(f,1),e--,f--;return a}function F(a,b){var c;if(x(b)){var e=0;for(c=b.length;e<c;e++)if(!F(a,b[e]))return!1;return!0}var f=z(b);e=0;for(c=a.length;e<c;e++)if("RegExp"===f){if("string"===typeof a[e]&&a[e].match(b))return!0}else if(a[e]===b)return!0;return!1}function P(a,b){if(!x(a)||!x(b)||a.length!==b.length)return!1;a.sort();b.sort();for(var c=0,e=a.length;c<e;c++)if(a[c]!==b[c])return!1;return!0}function h(a){return a.replace(/^\/+|\/+$/g,
99  "")}function r(a){return escape(a)}function A(a){return encodeURIComponent(a).replace(/[!'()*]/g,r).replace(/\*/g,"%2A")}function G(a){return function(b,c){if(void 0===b)return this._parts[a]||"";this._parts[a]=b||null;this.build(!c);return this}}function J(a,b){return function(c,e){if(void 0===c)return this._parts[a]||"";null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!e);return this}}var K=k&&k.URI;d.version="1.19.11";var g=d.prototype,E=Object.prototype.hasOwnProperty;
100  d._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:d.preventInvalidHostname,duplicateQueryParameters:d.duplicateQueryParameters,escapeQuerySpace:d.escapeQuerySpace}};d.preventInvalidHostname=!1;d.duplicateQueryParameters=!1;d.escapeQuerySpace=!0;d.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;d.idn_expression=/[^a-z0-9\._-]/i;d.punycode_expression=/(xn--)/i;d.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
101  d.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
102  d.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;d.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g};d.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;
103  d.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g;d.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};d.hostProtocols=["http","https"];d.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/;d.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();if("input"!==
104    b||"image"===a.type)return d.domAttributes[b]}};d.encode=A;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=A;d.decode=decodeURIComponent};d.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
105        map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};d.encodeQuery=function(a,b){var c=d.encode(a+"");
106    void 0===b&&(b=d.escapeQuerySpace);return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";void 0===b&&(b=d.escapeQuerySpace);try{return d.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}};var I={encode:"encode",decode:"decode"},p,t=function(a,b){return function(c){try{return d[b](c+"").replace(d.characters[a][b].expression,function(e){return d.characters[a][b].map[e]})}catch(e){return c}}};for(p in I)d[p+"PathSegment"]=t("pathname",I[p]),d[p+"UrnPathSegment"]=t("urnpath",I[p]);I=
107    function(a,b,c){return function(e){var f=c?function(B){return d[b](d[c](B))}:d[b];e=(e+"").split(a);for(var l=0,w=e.length;l<w;l++)e[l]=f(e[l]);return e.join(a)}};d.decodePath=I("/","decodePathSegment");d.decodeUrnPath=I(":","decodeUrnPathSegment");d.recodePath=I("/","encodePathSegment","decode");d.recodeUrnPath=I(":","encodeUrnPathSegment","decode");d.encodeReserved=t("reserved","encode");d.parse=function(a,b){b||(b={preventInvalidHostname:d.preventInvalidHostname});a=a.replace(d.leading_whitespace_expression,
108    "");a=a.replace(d.ascii_tab_whitespace,"");var c=a.indexOf("#");-1<c&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c));c=a.indexOf("?");-1<c&&(b.query=a.substring(c+1)||null,a=a.substring(0,c));a=a.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://");a=a.replace(/^[/\\]{2,}/i,"//");"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=d.parseAuthority(a,b)):(c=a.indexOf(":"),-1<c&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(d.protocol_expression)?b.protocol=void 0:"//"===
109  a.substring(c+1,c+3).replace(/\\/g,"/")?(a=a.substring(c+3),a=d.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0)));b.path=a;return b};d.parseHost=function(a,b){a||(a="");a=a.replace(/\\/g,"/");var c=a.indexOf("/");-1===c&&(c=a.length);if("["===a.charAt(0)){var e=a.indexOf("]");b.hostname=a.substring(1,e)||null;b.port=a.substring(e+2,c)||null;"/"===b.port&&(b.port=null)}else{var f=a.indexOf(":");e=a.indexOf("/");f=a.indexOf(":",f+1);-1!==f&&(-1===e||f<e)?(b.hostname=a.substring(0,c)||null,b.port=
110    null):(e=a.substring(0,c).split(":"),b.hostname=e[0]||null,b.port=e[1]||null)}b.hostname&&"/"!==a.substring(c).charAt(0)&&(c++,a="/"+a);b.preventInvalidHostname&&d.ensureValidHostname(b.hostname,b.protocol);b.port&&d.ensureValidPort(b.port);return a.substring(c)||"/"};d.parseAuthority=function(a,b){a=d.parseUserinfo(a,b);return d.parseHost(a,b)};d.parseUserinfo=function(a,b){var c=a;-1!==a.indexOf("\\")&&(a=a.replace(/\\/g,"/"));var e=a.indexOf("/"),f=a.lastIndexOf("@",-1<e?e:a.length-1);-1<f&&(-1===
111    e||f<e)?(e=a.substring(0,f).split(":"),b.username=e[0]?d.decode(e[0]):null,e.shift(),b.password=e[0]?d.decode(e.join(":")):null,a=c.substring(f+1)):(b.username=null,b.password=null);return a};d.parseQuery=function(a,b){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var c={},e=a.split("&"),f=e.length,l,w,B=0;B<f;B++)if(l=e[B].split("="),w=d.decodeQuery(l.shift(),b),l=l.length?d.decodeQuery(l.join("="),b):null,"__proto__"!==w)if(E.call(c,w)){if("string"===typeof c[w]||
112    null===c[w])c[w]=[c[w]];c[w].push(l)}else c[w]=l;return c};d.build=function(a){var b="",c=!1;a.protocol&&(b+=a.protocol+":");a.urn||!b&&!a.hostname||(b+="//",c=!0);b+=d.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&c&&(b+="/"),b+=a.path);"string"===typeof a.query&&a.query&&(b+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(b+="#"+a.fragment);return b};d.buildHost=function(a){var b="";if(a.hostname)b=d.ip6_expression.test(a.hostname)?b+("["+a.hostname+"]"):b+a.hostname;
113  else return"";a.port&&(b+=":"+a.port);return b};d.buildAuthority=function(a){return d.buildUserinfo(a)+d.buildHost(a)};d.buildUserinfo=function(a){var b="";a.username&&(b+=d.encode(a.username));a.password&&(b+=":"+d.encode(a.password));b&&(b+="@");return b};d.buildQuery=function(a,b,c){var e="",f,l;for(f in a)if("__proto__"!==f&&E.call(a,f))if(x(a[f])){var w={};var B=0;for(l=a[f].length;B<l;B++)void 0!==a[f][B]&&void 0===w[a[f][B]+""]&&(e+="&"+d.buildQueryParameter(f,a[f][B],c),!0!==b&&(w[a[f][B]+
114  ""]=!0))}else void 0!==a[f]&&(e+="&"+d.buildQueryParameter(f,a[f],c));return e.substring(1)};d.buildQueryParameter=function(a,b,c){return d.encodeQuery(a,c)+(null!==b?"="+d.encodeQuery(b,c):"")};d.addQuery=function(a,b,c){if("object"===typeof b)for(var e in b)E.call(b,e)&&d.addQuery(a,e,b[e]);else if("string"===typeof b)void 0===a[b]?a[b]=c:("string"===typeof a[b]&&(a[b]=[a[b]]),x(c)||(c=[c]),a[b]=(a[b]||[]).concat(c));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
115  };d.setQuery=function(a,b,c){if("object"===typeof b)for(var e in b)E.call(b,e)&&d.setQuery(a,e,b[e]);else if("string"===typeof b)a[b]=void 0===c?null:c;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");};d.removeQuery=function(a,b,c){var e;if(x(b))for(c=0,e=b.length;c<e;c++)a[b[c]]=void 0;else if("RegExp"===z(b))for(e in a)b.test(e)&&(a[e]=void 0);else if("object"===typeof b)for(e in b)E.call(b,e)&&d.removeQuery(a,e,b[e]);else if("string"===typeof b)void 0!==
116  c?"RegExp"===z(c)?!x(a[b])&&c.test(a[b])?a[b]=void 0:a[b]=M(a[b],c):a[b]!==String(c)||x(c)&&1!==c.length?x(a[b])&&(a[b]=M(a[b],c)):a[b]=void 0:a[b]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};d.hasQuery=function(a,b,c,e){switch(z(b)){case "String":break;case "RegExp":for(var f in a)if(E.call(a,f)&&b.test(f)&&(void 0===c||d.hasQuery(a,f,c)))return!0;return!1;case "Object":for(var l in b)if(E.call(b,l)&&!d.hasQuery(a,l,b[l]))return!1;
117    return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(z(c)){case "Undefined":return b in a;case "Boolean":return a=!(x(a[b])?!a[b].length:!a[b]),c===a;case "Function":return!!c(a[b],b,a);case "Array":return x(a[b])?(e?F:P)(a[b],c):!1;case "RegExp":return x(a[b])?e?F(a[b],c):!1:!(!a[b]||!a[b].match(c));case "Number":c=String(c);case "String":return x(a[b])?e?F(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");
118  }};d.joinPaths=function(){for(var a=[],b=[],c=0,e=0;e<arguments.length;e++){var f=new d(arguments[e]);a.push(f);f=f.segment();for(var l=0;l<f.length;l++)"string"===typeof f[l]&&b.push(f[l]),f[l]&&c++}if(!b.length||!c)return new d("");b=(new d("")).segment(b);""!==a[0].path()&&"/"!==a[0].path().slice(0,1)||b.path("/"+b.path());return b.normalize()};d.commonPath=function(a,b){var c=Math.min(a.length,b.length),e;for(e=0;e<c;e++)if(a.charAt(e)!==b.charAt(e)){e--;break}if(1>e)return a.charAt(0)===b.charAt(0)&&
119  "/"===a.charAt(0)?"/":"";if("/"!==a.charAt(e)||"/"!==b.charAt(e))e=a.substring(0,e).lastIndexOf("/");return a.substring(0,e+1)};d.withinString=function(a,b,c){c||(c={});var e=c.start||d.findUri.start,f=c.end||d.findUri.end,l=c.trim||d.findUri.trim,w=c.parens||d.findUri.parens,B=/[a-z0-9-]=["']?$/i;for(e.lastIndex=0;;){var D=e.exec(a);if(!D)break;var O=D.index;if(c.ignoreHtml){var L=a.slice(Math.max(O-3,0),O);if(L&&B.test(L))continue}var N=O+a.slice(O).search(f);L=a.slice(O,N);for(N=-1;;){var Q=w.exec(L);
120    if(!Q)break;N=Math.max(N,Q.index+Q[0].length)}L=-1<N?L.slice(0,N)+L.slice(N).replace(l,""):L.replace(l,"");L.length<=D[0].length||c.ignore&&c.ignore.test(L)||(N=O+L.length,D=b(L,O,N,a),void 0===D?e.lastIndex=N:(D=String(D),a=a.slice(0,O)+D+a.slice(N),e.lastIndex=O+D.length))}e.lastIndex=0;return a};d.ensureValidHostname=function(a,b){var c=!!a,e=!1;b&&(e=F(d.hostProtocols,b));if(e&&!c)throw new TypeError("Hostname cannot be empty, if protocol is "+b);if(a&&a.match(d.invalid_hostname_characters)){if(!m)throw new TypeError('Hostname "'+
121    a+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(m.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-:_]');}};d.ensureValidPort=function(a){if(a){var b=Number(a);if(!(/^[0-9]+$/.test(b)&&0<b&&65536>b))throw new TypeError('Port "'+a+'" is not a valid port');}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},k.URITemplate&&"function"===typeof k.URITemplate.noConflict&&(a.URITemplate=
122    k.URITemplate.noConflict()),k.IPv6&&"function"===typeof k.IPv6.noConflict&&(a.IPv6=k.IPv6.noConflict()),k.SecondLevelDomains&&"function"===typeof k.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=k.SecondLevelDomains.noConflict()),a;k.URI===this&&(k.URI=K);return this};g.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};g.clone=function(){return new d(this)};g.valueOf=g.toString=
123    function(){return this.build(!1)._string};g.protocol=G("protocol");g.username=G("username");g.password=G("password");g.hostname=G("hostname");g.port=G("port");g.query=J("query","?");g.fragment=J("fragment","#");g.search=function(a,b){var c=this.query(a,b);return"string"===typeof c&&c.length?"?"+c:c};g.hash=function(a,b){var c=this.fragment(a,b);return"string"===typeof c&&c.length?"#"+c:c};g.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?
124    (this._parts.urn?d.decodeUrnPath:d.decodePath)(c):c}this._parts.path=this._parts.urn?a?d.recodeUrnPath(a):"":a?d.recodePath(a):"/";this.build(!b);return this};g.path=g.pathname;g.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="";this._parts=d._parts();var e=a instanceof d,f="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(f=d.getDomAttribute(a),a=a[f]||"",f=!1);!e&&f&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=
125    d.parse(String(a),this._parts);else if(e||f){e=e?a._parts:a;for(c in e)"query"!==c&&E.call(this._parts,c)&&(this._parts[c]=e[c]);e.query&&this.query(e.query,!1)}else throw new TypeError("invalid input");this.build(!b);return this};g.is=function(a){var b=!1,c=!1,e=!1,f=!1,l=!1,w=!1,B=!1,D=!this._parts.urn;this._parts.hostname&&(D=!1,c=d.ip4_expression.test(this._parts.hostname),e=d.ip6_expression.test(this._parts.hostname),b=c||e,l=(f=!b)&&q&&q.has(this._parts.hostname),w=f&&d.idn_expression.test(this._parts.hostname),
126    B=f&&d.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return D;case "absolute":return!D;case "domain":case "name":return f;case "sld":return l;case "ip":return b;case "ip4":case "ipv4":case "inet4":return c;case "ip6":case "ipv6":case "inet6":return e;case "idn":return w;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return B}return null};var y=g.protocol,v=g.port,C=g.hostname;g.protocol=function(a,b){if(a&&(a=a.replace(/:(\/\/)?$/,
127    ""),!a.match(d.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return y.call(this,a,b)};g.scheme=g.protocol;g.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),d.ensureValidPort(a)));return v.call(this,a,b)};g.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={preventInvalidHostname:this._parts.preventInvalidHostname};
128    if("/"!==d.parseHost(a,c))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=c.hostname;this._parts.preventInvalidHostname&&d.ensureValidHostname(a,this._parts.protocol)}return C.call(this,a,b)};g.origin=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var c=this.protocol();return this.authority()?(c?c+"://":"")+this.authority():""}c=d(a);this.protocol(c.protocol()).authority(c.authority()).build(!b);return this};g.host=function(a,b){if(this._parts.urn)return void 0===
129  a?"":this;if(void 0===a)return this._parts.hostname?d.buildHost(this._parts):"";if("/"!==d.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};g.authority=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildAuthority(this._parts):"";if("/"!==d.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);
130    return this};g.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var c=d.buildUserinfo(this._parts);return c?c.substring(0,c.length-1):c}"@"!==a[a.length-1]&&(a+="@");d.parseUserinfo(a,this._parts);this.build(!b);return this};g.resource=function(a,b){if(void 0===a)return this.path()+this.search()+this.hash();var c=d.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};g.subdomain=function(a,b){if(this._parts.urn)return void 0===
131  a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}c=this._parts.hostname.length-this.domain().length;c=this._parts.hostname.substring(0,c);c=new RegExp("^"+n(c));a&&"."!==a.charAt(a.length-1)&&(a+=".");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");a&&d.ensureValidHostname(a,this._parts.protocol);this._parts.hostname=this._parts.hostname.replace(c,
132    a);this.build(!b);return this};g.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);if(c&&2>c.length)return this._parts.hostname;c=this._parts.hostname.length-this.tld(b).length-1;c=this._parts.hostname.lastIndexOf(".",c-1)+1;return this._parts.hostname.substring(c)||""}if(!a)throw new TypeError("cannot set domain empty");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");
133    d.ensureValidHostname(a,this._parts.protocol);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=new RegExp(n(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a));this.build(!b);return this};g.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.lastIndexOf(".");c=this._parts.hostname.substring(c+1);return!0!==b&&q&&q.list[c.toLowerCase()]?
134    q.get(this._parts.hostname)||c:c}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(q&&q.is(a))c=new RegExp(n(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");c=new RegExp(n(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(c,a)}else throw new TypeError("cannot set TLD empty");this.build(!b);
135    return this};g.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1;c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?d.decodePath(c):c}c=this._parts.path.length-this.filename().length;c=this._parts.path.substring(0,c);c=new RegExp("^"+n(c));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&
136  (a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=d.recodePath(a);this._parts.path=this._parts.path.replace(c,a);this.build(!b);return this};g.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("string"!==typeof a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/");c=this._parts.path.substring(c+1);return a?d.decodePathSegment(c):c}c=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(c=!0);var e=new RegExp(n(this.filename())+
137    "$");a=d.recodePath(a);this._parts.path=this._parts.path.replace(e,a);c?this.normalizePath(b):this.build(!b);return this};g.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),e=c.lastIndexOf(".");if(-1===e)return"";c=c.substring(e+1);c=/^[a-z0-9%]+$/i.test(c)?c:"";return a?d.decodePathSegment(c):c}"."===a.charAt(0)&&(a=a.substring(1));if(c=this.suffix())e=a?new RegExp(n(c)+"$"):new RegExp(n("."+
138    c)+"$");else{if(!a)return this;this._parts.path+="."+d.recodePath(a)}e&&(a=d.recodePath(a),this._parts.path=this._parts.path.replace(e,a));this.build(!b);return this};g.segment=function(a,b,c){var e=this._parts.urn?":":"/",f=this.path(),l="/"===f.substring(0,1);f=f.split(e);void 0!==a&&"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');l&&f.shift();0>a&&(a=Math.max(f.length+a,0));if(void 0===b)return void 0===a?f:
139    f[a];if(null===a||void 0===f[a])if(x(b)){f=[];a=0;for(var w=b.length;a<w;a++)if(b[a].length||f.length&&f[f.length-1].length)f.length&&!f[f.length-1].length&&f.pop(),f.push(h(b[a]))}else{if(b||"string"===typeof b)b=h(b),""===f[f.length-1]?f[f.length-1]=b:f.push(b)}else b?f[a]=h(b):f.splice(a,1);l&&f.unshift("");return this.path(f.join(e),c)};g.segmentCoded=function(a,b,c){var e;"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0===b){a=this.segment(a,b,c);if(x(a)){var f=0;for(e=a.length;f<e;f++)a[f]=
140    d.decode(a[f])}else a=void 0!==a?d.decode(a):void 0;return a}if(x(b))for(f=0,e=b.length;f<e;f++)b[f]=d.encode(b[f]);else b="string"===typeof b||b instanceof String?d.encode(b):b;return this.segment(a,b,c)};var H=g.query;g.query=function(a,b){if(!0===a)return d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var c=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,c);this._parts.query=d.buildQuery(e||c,this._parts.duplicateQueryParameters,
141    this._parts.escapeQuerySpace);this.build(!b);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=d.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):H.call(this,a,b)};g.setQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==b?b:null;else if("object"===typeof a)for(var f in a)E.call(a,f)&&(e[f]=a[f]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
142    this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};g.addQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.addQuery(e,a,void 0===b?null:b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};g.removeQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,
143    this._parts.escapeQuerySpace);d.removeQuery(e,a,b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};g.hasQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return d.hasQuery(e,a,b,c)};g.setSearch=g.setQuery;g.addSearch=g.addQuery;g.removeSearch=g.removeQuery;g.hasSearch=g.hasQuery;g.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():
144    this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};g.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};g.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&m?this._parts.hostname=m.toASCII(this._parts.hostname):this.is("IPv6")&&u&&(this._parts.hostname=u.best(this._parts.hostname)),this._parts.hostname=
145    this._parts.hostname.toLowerCase(),this.build(!a));return this};g.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===d.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};g.normalizePath=function(a){var b=this._parts.path;if(!b)return this;if(this._parts.urn)return this._parts.path=d.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;b=d.recodePath(b);var c="";if("/"!==b.charAt(0)){var e=!0;
146    b="/"+b}if("/.."===b.slice(-3)||"/."===b.slice(-2))b+="/";b=b.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");e&&(c=b.substring(1).match(/^(\.\.\/)+/)||"")&&(c=c[0]);for(;;){var f=b.search(/\/\.\.(\/|$)/);if(-1===f)break;else if(0===f){b=b.substring(3);continue}var l=b.substring(0,f).lastIndexOf("/");-1===l&&(l=f);b=b.substring(0,l)+b.substring(f+3)}e&&this.is("relative")&&(b=c+b.substring(1));this._parts.path=b;this.build(!a);return this};g.normalizePathname=g.normalizePath;g.normalizeQuery=
147    function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(d.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};g.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};g.normalizeSearch=g.normalizeQuery;g.normalizeHash=g.normalizeFragment;g.iso8859=function(){var a=d.encode,b=d.decode;d.encode=escape;d.decode=decodeURIComponent;try{this.normalize()}finally{d.encode=
148    a,d.decode=b}return this};g.unicode=function(){var a=d.encode,b=d.decode;d.encode=A;d.decode=unescape;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};g.readable=function(){var a=this.clone();a.username("").password("").normalize();var b="";a._parts.protocol&&(b+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&m?(b+=m.toUnicode(a._parts.hostname),a._parts.port&&(b+=":"+a._parts.port)):b+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(b+="/");
149    b+=a.path(!0);if(a._parts.query){for(var c="",e=0,f=a._parts.query.split("&"),l=f.length;e<l;e++){var w=(f[e]||"").split("=");c+="&"+d.decodeQuery(w[0],this._parts.escapeQuerySpace).replace(/&/g,"%26");void 0!==w[1]&&(c+="="+d.decodeQuery(w[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}b+="?"+c.substring(1)}return b+=d.decodeQuery(a.hash(),!0)};g.absoluteTo=function(a){var b=this.clone(),c=["protocol","username","password","hostname","port"],e,f;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");
150    a instanceof d||(a=new d(a));if(b._parts.protocol)return b;b._parts.protocol=a._parts.protocol;if(this._parts.hostname)return b;for(e=0;f=c[e];e++)b._parts[f]=a._parts[f];b._parts.path?(".."===b._parts.path.substring(-2)&&(b._parts.path+="/"),"/"!==b.path().charAt(0)&&(c=(c=a.directory())?c:0===a.path().indexOf("/")?"/":"",b._parts.path=(c?c+"/":"")+b._parts.path,b.normalizePath())):(b._parts.path=a._parts.path,b._parts.query||(b._parts.query=a._parts.query
150));b.build();return b};g.relativeTo=function(a){var b=
151    this.clone().normalize();if(b._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new d(a)).normalize();var c=b._parts;var e=a._parts;var f=b.path();a=a.path();if("/"!==f.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");c.protocol===e.protocol&&(c.protocol=null);if(c.username===e.username&&c.password===e.password&&null===c.protocol&&null===c.username&&null===c.password&&
152    c.hostname===e.hostname&&c.port===e.port)c.hostname=null,c.port=null;else return b.build();if(f===a)return c.path="",b.build();f=d.commonPath(f,a);if(!f)return b.build();e=e.path.substring(f.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=e+c.path.substring(f.length)||"./";return b.build()};g.equals=function(a){var b=this.clone(),c=new d(a);a={};var e;b.normalize();c.normalize();if(b.toString()===c.toString())return!0;var f=b.query();var l=c.query();b.query("");c.query("");if(b.toString()!==
153    c.toString()||f.length!==l.length)return!1;b=d.parseQuery(f,this._parts.escapeQuerySpace);l=d.parseQuery(l,this._parts.escapeQuerySpace);for(e in b)if(E.call(b,e)){if(!x(b[e])){if(b[e]!==l[e])return!1}else if(!P(b[e],l[e]))return!1;a[e]=!0}for(e in l)if(E.call(l,e)&&!a[e])return!1;return!0};g.preventInvalidHostname=function(a){this._parts.preventInvalidHostname=!!a;return this};g.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};g.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=
154    !!a;return this};return d});
155(function(m,u){"object"===typeof module&&module.exports?module.exports=u(require("jquery"),require("./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],u):u(m.jQuery,m.URI)})(this,function(m,u){function q(h){return h.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function k(h){var r=h.nodeName.toLowerCase();if("input"!==r||"image"===h.type)return u.domAttributes[r]}function d(h){return{get:function(r){return m(r).uri()[h]()},set:function(r,A){m(r).uri()[h](A);return A}}}function n(h,
156                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          r){if(!k(h)||!r)return!1;var A=r.match(F);if(!A||!A[5]&&":"!==A[2]&&!x[A[2]])return!1;var G=m(h).uri();if(A[5])return G.is(A[5]);if(":"===A[2]){var J=A[1].toLowerCase()+":";return x[J]?x[J](G,A[4]):!1}J=A[1].toLowerCase();return z[J]?x[A[2]](G[J](),A[4],J):!1}var z={},x={"=":function(h,r){return h===r},"^=":function(h,r){return!!(h+"").match(new RegExp("^"+q(r),"i"))},"$=":function(h,r){return!!(h+"").match(new RegExp(q(r)+"$","i"))},"*=":function(h,r,A){"directory"===A&&(h+="/");return!!(h+"").match(new RegExp(q(r),
157    "i"))},"equals:":function(h,r){return h.equals(r)},"is:":function(h,r){return h.is(r)}};m.each("origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(h,r){z[r]=!0;m.attrHooks["uri:"+r]=d(r)});var M=function(h,r){return m(h).uri().href(r).toString()};m.each(["src","href","action","uri","cite"],function(h,r){m.attrHooks[r]={set:M}});m.attrHooks.uri.get=function(h){return m(h).uri()};
158  m.fn.uri=function(h){var r=this.first(),A=r.get(0),G=k(A);if(!G)throw Error('Element "'+A.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==h){var J=r.data("uri");if(J)return J.href(h);h instanceof u||(h=u(h||""))}else{if(h=r.data("uri"))return h;h=u(r.attr(G)||"")}h._dom_element=A;h._dom_attribute=G;h.normalize();r.data("uri",h);return h};u.prototype.build=function(h){if(this._dom_element)this._string=u.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,
159    this._string),this._dom_element[this._dom_attribute]=this._string;else if(!0===h)this._deferred_build=!0;else if(void 0===h||this._deferred_build)this._string=u.build(this._parts),this._deferred_build=!1;return this};var F=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;var P=m.expr.createPseudo?m.expr.createPseudo(function(h){return function(r){return n(r,h)}}):function(h,r,A){return n(h,A[3])};m.expr[":"].uri=P;return m});
160
161
162function LoadMoreController() {
163    var _this = this;
164    var targetIdAttr = 'data-rsmsolr-loadmore-resultscontainer-id';
165    var btnAnimationClassInit   = 'js-ajax-progress';
166    var btnAnimationClassRun    = 'js-ajax-start';
167
168    _this.ajaxType = 7383;
169
170    this.init = function() {
171        jQuery("body").delegate(".o-rsmsolr-loadmore__button", "click", _this.handleClickOnLoadMoreUri);
172    };
173
174    this.initLoadAnimation = function ($btn) {
175        $btn.addClass(btnAnimationClassInit);
176        return setTimeout(function () {
177            $btn.addClass(btnAnimationClassRun);
178        }, 50);
179    };
180
181    this.stopLoadAnimation = function ($btn, startTimeout) {
182        clearTimeout(startTimeout);
183        $btn.removeClass(btnAnimationClassInit + ' ' + btnAnimationClassRun);
184    };
185
186    this.handleClickOnLoadMoreUri = function() {
187        var clickedBtn = jQuery(this);
188        var resultsContainer;
189        var uri;
190        var animationTimeout;
191
192        if (clickedBtn.data('rsm-solr-disabled') === true) {
193            return false;
194        }
195        clickedBtn.data('rsm-solr-disabled', true);
196
197        resultsContainer = $('#' + clickedBtn.attr(targetIdAttr));
198        uri = clickedBtn.uri();
199
200        animationTimeout = _this.initLoadAnimation(clickedBtn);
201
202        uri.addQuery("type", _this.ajaxType);
203
204        jQuery.get(
205            uri.href(),
206            function(data) {
207                var newResults = $(data).find('.o-rsmsolr-loadmore__resultscontainer').children();
208                var newButton = $(data).find('.o-rsmsolr-loadmore__button');
209
210                newButton.attr(targetIdAttr, clickedBtn.attr(targetIdAttr));
211                _this.stopLoadAnimation(clickedBtn, animationTimeout);
212
213                resultsContainer.append(newResults);
214                clickedBtn.replaceWith(newButton);
215                jQuery("body").trigger("tx_solr_updated");
216            }
217        );
218        return false;
219    };
220
221    this.setAjaxType = function(ajaxType) {
222        _this.ajaxType = ajaxType;
223    };
224}
225
226jQuery(document).ready(function() {
227    var solrSearchController = new LoadMoreController();
228    solrSearchController.init();
229
230    if(typeof solrSearchAjaxType !== "undefined") {
231        solrSearchController.setAjaxType(solrSearchAjaxType);
232    }
233});
234
235/**
236 * Old jQuery.ui.autocomplete suggest controller adapted to the new api and
237 * jsonp-type requests.
238 * We do that because we already use jQuery.ui in our layout and the
239 * autocomplete frontend layout has already been built on that.
240 *
241 * Caution: This does not support top results (with result grouping) yet.
242 */
243function SuggestController() {
244    var _this = this;
245
246    var addToInputClassName = 'add-to-input';
247    // TODO Make configurable. E.g. through form[data-addToInputClass].
248    //      Accessible in _renderItem through $(this.element).closest('form').
249    var className = 'icon-35_arrow-upper-left tr-hide-desktop ' +
250        addToInputClassName;
251    var addToInputBtn = '<i class="' + className + '"></i>';
252
253    var request = {};
254
255    var response = {};
256
257    this.init = function() {
258        if (!jQuery.ui || !jQuery.ui.autocomplete) {
259            return;
260        }
261        // Change back to the old behavior of auto-complete
262        // http://jqueryui.com/docs/Upgrade_Guide_184#Autocomplete
263        jQuery.ui.autocomplete.prototype._renderItem = function (ul, item) {
264            return jQuery("<li></li>")
265                .data("item.autocomplete", item)
266                .append("<div>" + item.label + addToInputBtn + "</div>")
267                .appendTo(ul);
268        };
269
270        var req = false;
271
272        jQuery('form[data-suggest]').each(function () {
273            var $form = $(this);
274            var $autocompleteList = $form
275                .find('.c-m-search-box__autocomplete');
276
277            $form.find('input.js-solr-q').autocomplete({
278                source: function (request, response) {
279                    _this.request = request;
280                    _this.response = response;
281                    if (req) {
282                        req.abort();
283                        response();
284                    }
285
286                    req = jQuery.ajax({
287                        url: $form.data('suggest'),
288                        dataType: 'json',
289                        json: 'tx_solr[callback]',
290                        data: {
291                            'tx_solr[queryString]': request.term,
292                            L: $form.find('input[name="L"]').val()
293                        },
294                        success: _this.handleSuggestResponse
295                    });
296                },
297                select: function (event, ui) {
298                    // Copy the selected value into the input.
299                    this.value = ui.item.value;
300
301                    // If the 'copy to input' icon was clicked, we do not
302                    // want to submit the form.
303                    try {
304                        // Event chain:
305                        //
306                        //  event
307                        //    -> jQuery.Event[type="autocompleteselect"]
308                        //
309                        //  event.originalEvent
310                        //    -> jQuery.Event[type="menuselect"]
311                        //
312                        //  event.originalEvent.originalEvent
313                        //    -> jQuery.Event[type="click"]
314                        //         (or maybe something like "touch" too)
315                        //
316                        //  event.originalEvent.originalEvent.originalEvent
317                        //    -> native Event
318                        //         (at least in case of click)
319                        //
320                        // We use the jQuery click event, because jQuery
321                        // normalizes the target value.
322                        var originalEvent = event.originalEvent.originalEvent;
323                        var $eventTarget = $(originalEvent.target);
324
325                        if ($eventTarget.hasClass(addToInputClassName)) {
326                            return;
327                        }
328                    } catch (e) {
329
330                    }
331
332                    // Submit the form - a.k.a. search.
333                    $form.submit();
334                },
335                delay: 0,
336                minLength: 3,
337                appendTo: $autocompleteList
338            });
339        });
340    };
341
342    this.handleSuggestResponse = function (data) {
343        req = false;
344        var output = [];
345        jQuery.each(data.suggestions, function (term, count) {
346            output.push({
347                label: term.replace(new RegExp('(?![^&;]+;)(?!<[^<>]*)(' +
348                    jQuery.ui.autocomplete.escapeRegex(_this.request.term) +
349                    ')(?![^<>]*>)(?![^&;]+;)', 'gi'), '<strong>$1</strong>'),
350                value: term
351            });
352        });
353
354        _this.response(output);
355    };
356}
357jQuery(document).ready(function () {
358    var solrSuggestController = new SuggestController();
359    solrSuggestController.init();
360
361    jQuery("body").on("tx_solr_updated", function() {
362        solrSuggestController.init();
363    });
364});
365
366
367
vendor: 29,167 bytes, lines 368-1233
368(function (global, factory) {
369  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
370  typeof define === 'function' && define.amd ? define(factory) :
371  (global = global || self, global.dialogPolyfill = factory());
372}(this, function () { 'use strict';
373
374  // nb. This is for IE10 and lower _only_.
375  var supportCustomEvent = window.CustomEvent;
376  if (!supportCustomEvent || typeof supportCustomEvent === 'object') {
377    supportCustomEvent = function CustomEvent(event, x) {
378      x = x || {};
379      var ev = document.createEvent('CustomEvent');
380      ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
381      return ev;
382    };
383    supportCustomEvent.prototype = window.Event.prototype;
384  }
385
386  /**
387   * Dispatches the passed event to both an "on<type>" handler as well as via the
388   * normal dispatch operation. Does not bubble.
389   *
390   * @param {!EventTarget} target
391   * @param {!Event} event
392   * @return {boolean}
393   */
394  function safeDispatchEvent(target, event) {
395    var check = 'on' + event.type.toLowerCase();
396    if (typeof target[check] === 'function') {
397      target[check](event);
398    }
399    return target.dispatchEvent(event);
400  }
401
402  /**
403   * @param {Element} el to check for stacking context
404   * @return {boolean} whether this el or its parents creates a stacking context
405   */
406  function createsStackingContext(el) {
407    while (el && el !== document.body) {
408      var s = window.getComputedStyle(el);
409      var invalid = function(k, ok) {
410        return !(s[k] === undefined || s[k] === ok);
411      };
412
413      if (s.opacity < 1 ||
414          invalid('zIndex', 'auto') ||
415          invalid('transform', 'none') ||
416          invalid('mixBlendMode', 'normal') ||
417          invalid('filter', 'none') ||
418          invalid('perspective', 'none') ||
419          s['isolation'] === 'isolate' ||
420          s.position === 'fixed' ||
421          s.webkitOverflowScrolling === 'touch') {
422        return true;
423      }
424      el = el.parentElement;
425    }
426    return false;
427  }
428
429  /**
430   * Finds the nearest <dialog> from the passed element.
431   *
432   * @param {Element} el to search from
433   * @return {HTMLDialogElement} dialog found
434   */
435  function findNearestDialog(el) {
436    while (el) {
437      if (el.localName === 'dialog') {
438        return /** @type {HTMLDialogElement} */ (el);
439      }
440      if (el.parentElement) {
441        el = el.parentElement;
442      } else if (el.parentNode) {
443        el = el.parentNode.host;
444      } else {
445        el = null;
446      }
447    }
448    return null;
449  }
450
451  /**
452   * Blur the specified element, as long as it's not the HTML body element.
453   * This works around an IE9/10 bug - blurring the body causes Windows to
454   * blur the whole application.
455   *
456   * @param {Element} el to blur
457   */
458  function safeBlur(el) {
459    // Find the actual focused element when the active element is inside a shadow root
460    while (el && el.shadowRoot && el.shadowRoot.activeElement) {
461      el = el.shadowRoot.activeElement;
462    }
463
464    if (el && el.blur && el !== document.body) {
465      el.blur();
466    }
467  }
468
469  /**
470   * @param {!NodeList} nodeList to search
471   * @param {Node} node to find
472   * @return {boolean} whether node is inside nodeList
473   */
474  function inNodeList(nodeList, node) {
475    for (var i = 0; i < nodeList.length; ++i) {
476      if (nodeList[i] === node) {
477        return true;
478      }
479    }
480    return false;
481  }
482
483  /**
484   * @param {HTMLFormElement} el to check
485   * @return {boolean} whether this form has method="dialog"
486   */
487  function isFormMethodDialog(el) {
488    if (!el || !el.hasAttribute('method')) {
489      return false;
490    }
491    return el.getAttribute('method').toLowerCase() === 'dialog';
492  }
493
494  /**
495   * @param {!DocumentFragment|!Element} hostElement
496   * @return {?Element}
497   */
498  function findFocusableElementWithin(hostElement) {
499    // Note that this is 'any focusable area'. This list is probably not exhaustive, but the
500    // alternative involves stepping through and trying to focus everything.
501    var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
502    var query = opts.map(function(el) {
503      return el + ':not([disabled])';
504    });
505    // TODO(samthor): tabindex values that are not numeric are not focusable.
506    query.push('[tabindex]:not([disabled]):not([tabindex=""])');  // tabindex != "", not disabled
507    var target = hostElement.querySelector(query.join(', '));
508
509    if (!target && 'attachShadow' in Element.prototype) {
510      // If we haven't found a focusable target, see if the host element contains an element
511      // which has a shadowRoot.
512      // Recursively search for the first focusable item in shadow roots.
513      var elems = hostElement.querySelectorAll('*');
514      for (var i = 0; i < elems.length; i++) {
515        if (elems[i].tagName && elems[i].shadowRoot) {
516          target = findFocusableElementWithin(elems[i].shadowRoot);
517          if (target) {
518            break;
519          }
520        }
521      }
522    }
523    return target;
524  }
525
526  /**
527   * Determines if an element is attached to the DOM.
528   * @param {Element} element to check
529   * @return {boolean} whether the element is in DOM
530   */
531  function isConnected(element) {
532    return element.isConnected || document.body.contains(element);
533  }
534
535  /**
536   * @param {!Event} event
537   * @return {?Element}
538   */
539  function findFormSubmitter(event) {
540    if (event.submitter) {
541      return event.submitter;
542    }
543
544    var form = event.target;
545    if (!(form instanceof HTMLFormElement)) {
546      return null;
547    }
548
549    var submitter = dialogPolyfill.formSubmitter;
550    if (!submitter) {
551      var target = event.target;
552      var root = ('getRootNode' in target && target.getRootNode() || document);
553      submitter = root.activeElement;
554    }
555
556    if (!submitter || submitter.form !== form) {
557      return null;
558    }
559    return submitter;
560  }
561
562  /**
563   * @param {!Event} event
564   */
565  function maybeHandleSubmit(event) {
566    if (event.defaultPrevented) {
567      return;
568    }
569    var form = /** @type {!HTMLFormElement} */ (event.target);
570
571    // We'd have a value if we clicked on an imagemap.
572    var value = dialogPolyfill.imagemapUseValue;
573    var submitter = findFormSubmitter(event);
574    if (value === null && submitter) {
575      value = submitter.value;
576    }
577
578    // There should always be a dialog as this handler is added specifically on them, but check just
579    // in case.
580    var dialog = findNearestDialog(form);
581    if (!dialog) {
582      return;
583    }
584
585    // Prefer formmethod on the button.
586    var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
587    if (formmethod !== 'dialog') {
588      return;
589    }
590    event.preventDefault();
591
592    if (value != null) {
593      // nb. we explicitly check against null/undefined
594      dialog.close(value);
595    } else {
596      dialog.close();
597    }
598  }
599
600  /**
601   * @param {!HTMLDialogElement} dialog to upgrade
602   * @constructor
603   */
604  function dialogPolyfillInfo(dialog) {
605    this.dialog_ = dialog;
606    this.replacedStyleTop_ = false;
607    this.openAsModal_ = false;
608
609    // Set a11y role. Browsers that support dialog implicitly know this already.
610    if (!dialog.hasAttribute('role')) {
611      dialog.setAttribute('role', 'dialog');
612    }
613
614    dialog.show = this.show.bind(this);
615    dialog.showModal = this.showModal.bind(this);
616    dialog.close = this.close.bind(this);
617
618    dialog.addEventListener('submit', maybeHandleSubmit, false);
619
620    if (!('returnValue' in dialog)) {
621      dialog.returnValue = '';
622    }
623
624    if ('MutationObserver' in window) {
625      var mo = new MutationObserver(this.maybeHideModal.bind(this));
626      mo.observe(dialog, {attributes: true, attributeFilter: ['open']});
627    } else {
628      // IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also
629      // seem to fire even if the element was removed as part of a parent removal. Use the removed
630      // events to force downgrade (useful if removed/immediately added).
631      var removed = false;
632      var cb = function() {
633        removed ? this.downgradeModal() : this.maybeHideModal();
634        removed = false;
635      }.bind(this);
636      var timeout;
637      var delayModel = function(ev) {
638        if (ev.target !== dialog) { return; }  // not for a child element
639        var cand = 'DOMNodeRemoved';
640        removed |= (ev.type.substr(0, cand.length) === cand);
641        window.clearTimeout(timeout);
642        timeout = window.setTimeout(cb, 0);
643      };
644      ['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {
645        dialog.addEventListener(name, delayModel);
646      });
647    }
648    // Note that the DOM is observed inside DialogManager while any dialog
649    // is being displayed as a modal, to catch modal removal from the DOM.
650
651    Object.defineProperty(dialog, 'open', {
652      set: this.setOpen.bind(this),
653      get: dialog.hasAttribute.bind(dialog, 'open')
654    });
655
656    this.backdrop_ = document.createElement('div');
657    this.backdrop_.className = 'backdrop';
658    this.backdrop_.addEventListener('mouseup'  , this.backdropMouseEvent_.bind(this));
659    this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));
660    this.backdrop_.addEventListener('click'    , this.backdropMouseEvent_.bind(this));
661  }
662
663  dialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({
664
665    get dialog() {
666      return this.dialog_;
667    },
668
669    /**
670     * Maybe remove this dialog from the modal top layer. This is called when
671     * a modal dialog may no longer be tenable, e.g., when the dialog is no
672     * longer open or is no longer part of the DOM.
673     */
674    maybeHideModal: function() {
675      if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }
676      this.downgradeModal();
677    },
678
679    /**
680     * Remove this dialog from the modal top layer, leaving it as a non-modal.
681     */
682    downgradeModal: function() {
683      if (!this.openAsModal_) { return; }
684      this.openAsModal_ = false;
685      this.dialog_.style.zIndex = '';
686
687      // This won't match the native <dialog> exactly because if the user set top on a centered
688      // polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's
689      // possible to polyfill this perfectly.
690      if (this.replacedStyleTop_) {
691        this.dialog_.style.top = '';
692        this.replacedStyleTop_ = false;
693      }
694
695      // Clear the backdrop and remove from the manager.
696      this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);
697      dialogPolyfill.dm.removeDialog(this);
698    },
699
700    /**
701     * @param {boolean} value whether to open or close this dialog
702     */
703    setOpen: function(value) {
704      if (value) {
705        this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');
706      } else {
707        this.dialog_.removeAttribute('open');
708        this.maybeHideModal();  // nb. redundant with MutationObserver
709      }
710    },
711
712    /**
713     * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
714     * they were on the dialog itself.
715     *
716     * @param {!Event} e to redirect
717     */
718    backdropMouseEvent_: function(e) {
719      if (!this.dialog_.hasAttribute('tabindex')) {
720        // Clicking on the backdrop should move the implicit cursor, even if dialog cannot be
721        // focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this
722        // would not be needed - clicks would move the implicit cursor there.
723        var fake = document.createElement('div');
724        this.dialog_.insertBefore(fake, this.dialog_.firstChild);
725        fake.tabIndex = -1;
726        fake.focus();
727        this.dialog_.removeChild(fake);
728      } else {
729        this.dialog_.focus();
730      }
731
732      var redirectedEvent = document.createEvent('MouseEvents');
733      redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
734          e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
735          e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
736      this.dialog_.dispatchEvent(redirectedEvent);
737      e.stopPropagation();
738    },
739
740    /**
741     * Focuses on the first focusable element within the dialog. This will always blur the current
742     * focus, even if nothing within the dialog is found.
743     */
744    focus_: function() {
745      // Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
746      var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
747      if (!target && this.dialog_.tabIndex >= 0) {
748        target = this.dialog_;
749      }
750      if (!target) {
751        target = findFocusableElementWithin(this.dialog_);
752      }
753      safeBlur(document.activeElement);
754      target && target.focus();
755    },
756
757    /**
758     * Sets the zIndex for the backdrop and dialog.
759     *
760     * @param {number} dialogZ
761     * @param {number} backdropZ
762     */
763    updateZIndex: function(dialogZ, backdropZ) {
764      if (dialogZ < backdropZ) {
765        throw new Error('dialogZ should never be < backdropZ');
766      }
767      this.dialog_.style.zIndex = dialogZ;
768      this.backdrop_.style.zIndex = backdropZ;
769    },
770
771    /**
772     * Shows the dialog. If the dialog is already open, this does nothing.
773     */
774    show: function() {
775      if (!this.dialog_.open) {
776        this.setOpen(true);
777        this.focus_();
778      }
779    },
780
781    /**
782     * Show this dialog modally.
783     */
784    showModal: function() {
785      if (this.dialog_.hasAttribute('open')) {
786        throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
787      }
788      if (!isConnected(this.dialog_)) {
789        throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
790      }
791      if (!dialogPolyfill.dm.pushDialog(this)) {
792        throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
793      }
794
795      if (createsStackingContext(this.dialog_.parentElement)) {
796        console.warn('A dialog is being shown inside a stacking context. ' +
797            'This may cause it to be unusable. For more information, see this link: ' +
798            'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
799      }
800
801      this.setOpen(true);
802      this.openAsModal_ = true;
803
804      // Optionally center vertically, relative to the current viewport.
805      if (dialogPolyfill.needsCentering(this.dialog_)) {
806        dialogPolyfill.reposition(this.dialog_);
807        this.replacedStyleTop_ = true;
808      } else {
809        this.replacedStyleTop_ = false;
810      }
811
812      // Insert backdrop.
813      this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);
814
815      // Focus on whatever inside the dialog.
816      this.focus_();
817    },
818
819    /**
820     * Closes this HTMLDialogElement. This is optional vs clearing the open
821     * attribute, however this fires a 'close' event.
822     *
823     * @param {string=} opt_returnValue to use as the returnValue
824     */
825    close: function(opt_returnValue) {
826      if (!this.dialog_.hasAttribute('open')) {
827        throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');
828      }
829      this.setOpen(false);
830
831      // Leave returnValue untouched in case it was set directly on the element
832      if (opt_returnValue !== undefined) {
833        this.dialog_.returnValue = opt_returnValue;
834      }
835
836      // Triggering "close" event for any attached listeners on the <dialog>.
837      var closeEvent = new supportCustomEvent('close', {
838        bubbles: false,
839        cancelable: false
840      });
841      safeDispatchEvent(this.dialog_, closeEvent);
842    }
843
844  });
845
846  var dialogPolyfill = {};
847
848  dialogPolyfill.reposition = function(element) {
849    var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
850    var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
851    element.style.top = Math.max(scrollTop, topValue) + 'px';
852  };
853
854  dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
855    for (var i = 0; i < document.styleSheets.length; ++i) {
856      var styleSheet = document.styleSheets[i];
857      var cssRules = null;
858      // Some browsers throw on cssRules.
859      try {
860        cssRules = styleSheet.cssRules;
861      } catch (e) {}
862      if (!cssRules) { continue; }
863      for (var j = 0; j < cssRules.length; ++j) {
864        var rule = cssRules[j];
865        var selectedNodes = null;
866        // Ignore errors on invalid selector texts.
867        try {
868          selectedNodes = document.querySelectorAll(rule.selectorText);
869        } catch(e) {}
870        if (!selectedNodes || !inNodeList(selectedNodes, element)) {
871          continue;
872        }
873        var cssTop = rule.style.getPropertyValue('top');
874        var cssBottom = rule.style.getPropertyValue('bottom');
875        if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {
876          return true;
877        }
878      }
879    }
880    return false;
881  };
882
883  dialogPolyfill.needsCentering = function(dialog) {
884    var computedStyle = window.getComputedStyle(dialog);
885    if (computedStyle.position !== 'absolute') {
886      return false;
887    }
888
889    // We must determine whether the top/bottom specified value is non-auto.  In
890    // WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
891    // Firefox returns the used value. So we do this crazy thing instead: check
892    // the inline style and then go through CSS rules.
893    if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||
894        (dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {
895      return false;
896    }
897    return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
898  };
899
900  /**
901   * @param {!Element} element to force upgrade
902   */
903  dialogPolyfill.forceRegisterDialog = function(element) {
904    if (window.HTMLDialogElement || element.showModal) {
905      console.warn('This browser already supports <dialog>, the polyfill ' +
906          'may not work correctly', element);
907    }
908    if (element.localName !== 'dialog') {
909      throw new Error('Failed to register dialog: The element is not a dialog.');
910    }
911    new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));
912  };
913
914  /**
915   * @param {!Element} element to upgrade, if necessary
916   */
917  dialogPolyfill.registerDialog = function(element) {
918    if (!element.showModal) {
919      dialogPolyfill.forceRegisterDialog(element);
920    }
921  };
922
923  /**
924   * @constructor
925   */
926  dialogPolyfill.DialogManager = function() {
927    /** @type {!Array<!dialogPolyfillInfo>} */
928    this.pendingDialogStack = [];
929
930    var checkDOM = this.checkDOM_.bind(this);
931
932    // The overlay is used to simulate how a modal dialog blocks the document.
933    // The blocking dialog is positioned on top of the overlay, and the rest of
934    // the dialogs on the pending dialog stack are positioned below it. In the
935    // actual implementation, the modal dialog stacking is controlled by the
936    // top layer, where z-index has no effect.
937    this.overlay = document.createElement('div');
938    this.overlay.className = '_dialog_overlay';
939    this.overlay.addEventListener('click', function(e) {
940      this.forwardTab_ = undefined;
941      e.stopPropagation();
942      checkDOM([]);  // sanity-check DOM
943    }.bind(this));
944
945    this.handleKey_ = this.handleKey_.bind(this);
946    this.handleFocus_ = this.handleFocus_.bind(this);
947
948    this.zIndexLow_ = 100000;
949    this.zIndexHigh_ = 100000 + 150;
950
951    this.forwardTab_ = undefined;
952
953    if ('MutationObserver' in window) {
954      this.mo_ = new MutationObserver(function(records) {
955        var removed = [];
956        records.forEach(function(rec) {
957          for (var i = 0, c; c = rec.removedNodes[i]; ++i) {
958            if (!(c instanceof Element)) {
959              continue;
960            } else if (c.localName === 'dialog') {
961              removed.push(c);
962            }
963            removed = removed.concat(c.querySelectorAll('dialog'));
964          }
965        });
966        removed.length && checkDOM(removed);
967      });
968    }
969  };
970
971  /**
972   * Called on the first modal dialog being shown. Adds the overlay and related
973   * handlers.
974   */
975  dialogPolyfill.DialogManager.prototype.blockDocument = function() {
976    document.documentElement.addEventListener('focus', this.handleFocus_, true);
977    document.addEventListener('keydown', this.handleKey_);
978    this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});
979  };
980
981  /**
982   * Called on the first modal dialog being removed, i.e., when no more modal
983   * dialogs are visible.
984   */
985  dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
986    document.documentElement.removeEventListener('focus', this.handleFocus_, true);
987    document.removeEventListener('keydown', this.handleKey_);
988    this.mo_ && this.mo_.disconnect();
989  };
990
991  /**
992   * Updates the stacking of all known dialogs.
993   */
994  dialogPolyfill.DialogManager.prototype.updateStacking = function() {
995    var zIndex = this.zIndexHigh_;
996
997    for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
998      dpi.updateZIndex(--zIndex, --zIndex);
999      if (i === 0) {
1000        this.overlay.style.zIndex = --zIndex;
1001      }
1002    }
1003
1004    // Make the overlay a sibling of the dialog itself.
1005    var last = this.pendingDialogStack[0];
1006    if (last) {
1007      var p = last.dialog.parentNode || document.body;
1008      p.appendChild(this.overlay);
1009    } else if (this.overlay.parentNode) {
1010      this.overlay.parentNode.removeChild(this.overlay);
1011    }
1012  };
1013
1014  /**
1015   * @param {Element} candidate to check if contained or is the top-most modal dialog
1016   * @return {boolean} whether candidate is contained in top dialog
1017   */
1018  dialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {
1019    while (candidate = findNearestDialog(candidate)) {
1020      for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
1021        if (dpi.dialog === candidate) {
1022          return i === 0;  // only valid if top-most
1023        }
1024      }
1025      candidate = candidate.parentElement;
1026    }
1027    return false;
1028  };
1029
1030  dialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {
1031    var target = event.composedPath ? event.composedPath()[0] : event.target;
1032
1033    if (this.containedByTopDialog_(target)) { return; }
1034
1035    if (document.activeElement === document.documentElement) { return; }
1036
1037    event.preventDefault();
1038    event.stopPropagation();
1039    safeBlur(/** @type {Element} */ (target));
1040
1041    if (this.forwardTab_ === undefined) { return; }  // move focus only from a tab key
1042
1043    var dpi = this.pendingDialogStack[0];
1044    var dialog = dpi.dialog;
1045    var position = dialog.compareDocumentPosition(target);
1046    if (position & Node.DOCUMENT_POSITION_PRECEDING) {
1047      if (this.forwardTab_) {
1048        // forward
1049        dpi.focus_();
1050      } else if (target !== document.documentElement) {
1051        // backwards if we're not already focused on <html>
1052        document.documentElement.focus();
1053      }
1054    }
1055
1056    return false;
1057  };
1058
1059  dialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {
1060    this.forwardTab_ = undefined;
1061    if (event.keyCode === 27) {
1062      event.preventDefault();
1063      event.stopPropagation();
1064      var cancelEvent = new supportCustomEvent('cancel', {
1065        bubbles: false,
1066        cancelable: true
1067      });
1068      var dpi = this.pendingDialogStack[0];
1069      if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {
1070        dpi.dialog.close();
1071      }
1072    } else if (event.keyCode === 9) {
1073      this.forwardTab_ = !event.shiftKey;
1074    }
1075  };
1076
1077  /**
1078   * Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are
1079   * removed and immediately readded don't stay modal, they become normal.
1080   *
1081   * @param {!Array<!HTMLDialogElement>} removed that have definitely been removed
1082   */
1083  dialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {
1084    // This operates on a clone because it may cause it to change. Each change also calls
1085    // updateStacking, which only actually needs to happen once. But who removes many modal dialogs
1086    // at a time?!
1087    var clone = this.pendingDialogStack.slice();
1088    clone.forEach(function(dpi) {
1089      if (removed.indexOf(dpi.dialog) !== -1) {
1090        dpi.downgradeModal();
1091      } else {
1092        dpi.maybeHideModal();
1093      }
1094    });
1095  };
1096
1097  /**
1098   * @param {!dialogPolyfillInfo} dpi
1099   * @return {boolean} whether the dialog was allowed
1100   */
1101  dialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {
1102    var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
1103    if (this.pendingDialogStack.length >= allowed) {
1104      return false;
1105    }
1106    if (this.pendingDialogStack.unshift(dpi) === 1) {
1107      this.blockDocument();
1108    }
1109    this.updateStacking();
1110    return true;
1111  };
1112
1113  /**
1114   * @param {!dialogPolyfillInfo} dpi
1115   */
1116  dialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {
1117    var index = this.pendingDialogStack.indexOf(dpi);
1118    if (index === -1) { return; }
1119
1120    this.pendingDialogStack.splice(index, 1);
1121    if (this.pendingDialogStack.length === 0) {
1122      this.unblockDocument();
1123    }
1124    this.updateStacking();
1125  };
1126
1127  dialogPolyfill.dm = new dialogPolyfill.DialogManager();
1128  dialogPolyfill.formSubmitter = null;
1129  dialogPolyfill.imagemapUseValue = null;
1130
1131  /**
1132   * Installs global handlers, such as click listers and native method overrides. These are needed
1133   * even if a no dialog is registered, as they deal with <form method="dialog">.
1134   */
1135  if (window.HTMLDialogElement === undefined) {
1136
1137    /**
1138     * If HTMLFormElement translates method="DIALOG" into 'get', then replace the descriptor with
1139     * one that returns the correct value.
1140     */
1141    var testForm = document.createElement('form');
1142    testForm.setAttribute('method', 'dialog');
1143    if (testForm.method !== 'dialog') {
1144      var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');
1145      if (methodDescriptor) {
1146        // nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything
1147        // and don't bother to update the element.
1148        var realGet = methodDescriptor.get;
1149        methodDescriptor.get = function() {
1150          if (isFormMethodDialog(this)) {
1151            return 'dialog';
1152          }
1153          return realGet.call(this);
1154        };
1155        var realSet = methodDescriptor.set;
1156        /** @this {HTMLElement} */
1157        methodDescriptor.set = function(v) {
1158          if (typeof v === 'string' && v.toLowerCase() === 'dialog') {
1159            return this.setAttribute('method', v);
1160          }
1161          return realSet.call(this, v);
1162        };
1163        Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);
1164      }
1165    }
1166
1167    /**
1168     * Global 'click' handler, to capture the <input type="submit"> or <button> element which has
1169     * submitted a <form method="dialog">. Needed as Safari and others don't report this inside
1170     * document.activeElement.
1171     */
1172    document.addEventListener('click', function(ev) {
1173      dialogPolyfill.formSubmitter = null;
1174      dialogPolyfill.imagemapUseValue = null;
1175      if (ev.defaultPrevented) { return; }  // e.g. a submit which prevents default submission
1176
1177      var target = /** @type {Element} */ (ev.target);
1178      if ('composedPath' in ev) {
1179        var path = ev.composedPath();
1180        target = path.shift() || target;
1181      }
1182      if (!target || !isFormMethodDialog(target.form)) { return; }
1183
1184      var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);
1185      if (!valid) {
1186        if (!(target.localName === 'input' && target.type === 'image')) { return; }
1187        // this is a <input type="image">, which can submit forms
1188        dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;
1189      }
1190
1191      var dialog = findNearestDialog(target);
1192      if (!dialog) { return; }
1193
1194      dialogPolyfill.formSubmitter = target;
1195
1196    }, false);
1197
1198    /**
1199     * Global 'submit' handler. This handles submits of `method="dialog"` which are invalid, i.e.,
1200     * outside a dialog. They get prevented.
1201     */
1202    document.addEventListener('submit', function(ev) {
1203      var form = ev.target;
1204      var dialog = findNearestDialog(form);
1205      if (dialog) {
1206        return;  // ignore, handle there
1207      }
1208
1209      var submitter = findFormSubmitter(ev);
1210      var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
1211      if (formmethod === 'dialog') {
1212        ev.preventDefault();
1213      }
1214    });
1215
1216    /**
1217     * Replace the native HTMLFormElement.submit() method, as it won't fire the
1218     * submit event and give us a chance to respond.
1219     */
1220    var nativeFormSubmit = HTMLFormElement.prototype.submit;
1221    var replacementFormSubmit = function () {
1222      if (!isFormMethodDialog(this)) {
1223        return nativeFormSubmit.call(this);
1224      }
1225      var dialog = findNearestDialog(this);
1226      dialog && dialog.close();
1227    };
1228    HTMLFormElement.prototype.submit = replacementFormSubmit;
1229  }
1230
1231  return dialogPolyfill;
1232
1233}));
1234
1235/**
1236 * This file is part of the "ccm" Extension for TYPO3 CMS.
1237 *
1238 * For the full copyright and license information, please read the
1239 * LICENSE.txt file that was distributed with this source code.
1240 */
1241class CcmConfiguration {
1242    constructor() {
1243        this.tracker = { enabled: false, pageExcluded: false, snippet: '' };
1244        this.isProductionEnvironment = false;
1245        this.baseUrl = '';
1246        this.statisticsAllowedCookieName = '';
1247        this.externalVideosAllowedCookieName = '';
1248        this.externalMapsAllowedCookieName = '';
1249        this.externalContentAllowedCookieName = '';
1250        this.trackingScriptClassName = '';
1251        this.cookieTimestamp = 0;
1252    }
1253}
1254// The setConfiguration method does not check whether these fields are present in the configuration
1255CcmConfiguration.nonMandantoryFields = ['snippet'];
1256class Ccm {
1257    constructor(configuration) {
1258        this.configuration = new CcmConfiguration();
1259        this.theUserSelectedSomethingCookieName = 'cookie_consent_manager';
1260        this.expireDays = 90;
1261        this.setConfiguration(configuration);
1262        this.createCcmSettingsButton();
1263        this.setAfterLoadEvents();
1264        this.setSubmitSelectionEvent();
1265        this.setSubmitEssentialEvent();
1266        this.setSubmitAllEvent();
1267        this.setShowCcmEvent();
1268    }
1269    loadCookieConsentManager() {
1270        const bodyElement = document.querySelector('body');
1271        if (bodyElement) {
1272            const spinnerElement = this.elementFromHTML('<div class="ccm-loading-spinner-wrapper"><div class="loading-spinner"><div></div></div></div>');
1273                bodyElement.appendChild(spinnerElement);
1274        }
1275        const endpoint = this.configuration.baseUrl + '?ccm[action]=default';
1276        this.fetchAjaxData(endpoint, function (responseHandler) {
1277            if (responseHandler.readyState === XMLHttpRequest.DONE) {
1278                if (responseHandler.status === 200) {
1279                    let ccmElement = null;
1280                    let dialog = null;
1281                    try {
1282                        const responseObject = JSON.parse(responseHandler.responseText);
1283                        ccmElement = this.elementFromHTML(responseObject.content, 'text/html');
1284                        if (ccmElement) {
1285                            dialog = ccmElement.querySelector('[data-ccm-dialog]');
1286                        }
1287                    }
1288                    catch (e) { }
1289                    if (bodyElement && ccmElement && dialog) {
1290                        const spinner = bodyElement.querySelector('.ccm-loading-spinner-wrapper');
1291                        if (spinner) {
1292                            spinner.remove();
1293                        }
1294                        ccmElement = bodyElement.appendChild(ccmElement);
1295                        this.runScriptTagsWithinElement(ccmElement);
1296                        if (dialog) {
1297                            // @ts-ignore
1298                            dialogPolyfill.registerDialog(dialog);
1299                            // @ts-ignore
1300                            dialog.showModal();
1301                            // Prevent the CCM from being closed (ESC) without a selection having been made.
1302                            dialog.addEventListener('cancel', (e) => {
1303                                e.preventDefault();
1304                            });
1305                        }
1306                        this.dispatchCustomEvent('ccm-after-load', ccmElement, this.configuration);
1307                    }
1308                }
1309            }
1310        }.bind(this));
1311    }
1312    /**
1313     * Executes script tags found within the given HTML element.
1314     * Script tags will be re-added to the DOM to ensure they execute. Without
1315     * that, script tags will not be executed because the content is added via
1316     * `innerHTML`.
1317     */
1318    // @ts-ignore
1319    runScriptTagsWithinElement(ccmElement) {
1320        const scripts = ccmElement.querySelectorAll("script");
1321        scripts.forEach((script) => {
1322            const newScript = document.createElement("script");
1323            if (script.src) {
1324                newScript.src = script.src;
1325            }
1326            else {
1327                newScript.textContent = script.textContent;
1328            }
1329            // Remove the original script
1330            script.parentNode?.removeChild(script);
1331            // Add the new script
1332            ccmElement.appendChild(newScript);
1333        });
1334    }
1335    injectSnippetsFromCookieData() {
1336        if (!Number.isNaN(parseInt(this.getCookie(this.configuration.statisticsAllowedCookieName)))
1337            && Boolean(this.configuration.tracker.enabled)) {
1338            this.injectTrackingCodeIntoDocumentHead();
1339        }
1340        if (!Number.isNaN(parseInt(this.getCookie(this.configuration.externalVideosAllowedCookieName)))) {
1341            this.showVideos();
1342        }
1343        else {
1344            this.setupVideoEvents();
1345        }
1346        if (!Number.isNaN(parseInt(this.getCookie(this.configuration.externalMapsAllowedCookieName)))) {
1347            this.showMaps();
1348        }
1349        else {
1350            this.setupMapsEvents();
1351        }
1352        if (!Number.isNaN(parseInt(this.getCookie(this.configuration.externalContentAllowedCookieName)))) {
1353            this.showExternalContent();
1354        }
1355        else {
1356            this.setupExternalContentEvents();
1357        }
1358    }
1359    clearAllOldCookies() {
1360        const moduleLastShown = parseInt(this.getCookie(this.theUserSelectedSomethingCookieName));
1361        let showModule = false;
1362        if (this.configuration.cookieTimestamp > moduleLastShown) {
1363            const cookieArray = decodeURIComponent(document.cookie).split(';');
1364            for (var i = 0; i < cookieArray.length; ++i) {
1365                const cookie = (cookieArray[i] ?? '').trim().split('=');
1366                this.setCookie(cookie[0] ?? '', '', true);
1367            }
1368            showModule = true;
1369        }
1370        return showModule;
1371    }
1372    showVideos() {
1373        const videoElements = document.querySelectorAll('[data-video=load]');
1374        for (const videoElement of videoElements) {
1375            this.activateVideo(videoElement);
1376        }
1377    }
1378    showMaps() {
1379        const mapElements = document.querySelectorAll('[data-maps=load]');
1380        for (const mapElement of mapElements) {
1381            this.activateMaps(mapElement);
1382        }
1383    }
1384    showExternalContent() {
1385        const externalElements = document.querySelectorAll('[data-external-content=load]');
1386        for (const externalElement of externalElements) {
1387            this.activateExternalContent(externalElement);
1388        }
1389    }
1390    setupVideoEvents() {
1391        const videoElements = document.querySelectorAll('[data-video=load]');
1392        for (const videoElement of videoElements) {
1393            videoElement.addEventListener('click', function () {
1394                this.activateVideo(videoElement);
1395            }.bind(this));
1396        }
1397    }
1398    setupMapsEvents() {
1399        const mapElements = document.querySelectorAll('[data-maps=load]');
1400        for (const mapElement of mapElements) {
1401            mapElement.addEventListener('click', function () {
1402                this.activateMaps(mapElement);
1403            }.bind(this));
1404        }
1405    }
1406    setupExternalContentEvents() {
1407        const externalElements = document.querySelectorAll('[data-external-content=load]');
1408        for (const externalElement of externalElements) {
1409            externalElement.addEventListener('click', function () {
1410                this.activateExternalContent(externalElement);
1411            }.bind(this));
1412        }
1413    }
1414    activateVideo(videoElement) {
1415        const iframeId = videoElement.dataset.iframeId ?? null;
1416        if (iframeId) {
1417            const iframe = document.querySelector('#' + iframeId);
1418            if (iframe) {
1419                iframe.src = iframe.dataset.src ?? '';
1420                const wrapper = videoElement.closest('[data-ccm-twostep-wrapper]');
1421                if (wrapper) {
1422                    wrapper.removeAttribute('style');
1423                    wrapper.classList.remove('show');
1424                }
1425                const overlay = videoElement.closest('[data-ccm-twostep-overlay]');
1426                if (overlay) {
1427                    overlay.remove();
1428                }
1429            }
1430        }
1431    }
1432    activateMaps(mapElement) {
1433        const mapsId = mapElement.dataset.mapId ?? null;
1434        if (mapsId) {
1435            const map = document.querySelector('#' + mapsId);
1436            if (map) {
1437                map.classList.remove('invisible');
1438            }
1439            const scriptId = mapElement.dataset.scriptId ?? null;
1440            if (scriptId) {
1441                const script = document.querySelector('#' + scriptId);
1442                if (script) {
1443                    script.setAttribute('src', script.dataset.src ?? '');
1444                }
1445            }
1446        }
1447        else {
1448            const iframeId = mapElement.dataset.iframeId ?? null;
1449            if (iframeId) {
1450                const iframe = document.querySelector('#' + iframeId);
1451                if (iframe) {
1452                    iframe.src = iframe.dataset.src ?? '';
1453                }
1454            }
1455        }
1456        const wrapper = mapElement.closest('[data-ccm-twostep-wrapper]');
1457        if (wrapper) {
1458            wrapper.classList.remove('show');
1459        }
1460        const overlay = mapElement.closest('[data-ccm-twostep-overlay]');
1461        if (overlay) {
1462            overlay.remove();
1463        }
1464    }
1465    activateExternalContent(externalElement) {
1466        const iframeId = externalElement.dataset.iframeId ?? null;
1467        const scriptId = externalElement.dataset.scriptId ?? null;
1468        if (iframeId) {
1469            const iframe = document.querySelector('#' + iframeId);
1470            if (iframe) {
1471                iframe.src = iframe.dataset.src ?? '';
1472            }
1473        }
1474        else if (scriptId) {
1475            const content = document.querySelector('#script-content-' + scriptId);
1476            const commentRegex = /<!--(.*?)-->/s;
1477            let commentContent;
1478            // Extract the content of the HTML comment
1479            if (content) {
1480                let contentHTML = content.innerHTML;
1481                commentContent = contentHTML.replace(commentRegex, function (_, group) {
1482                    return group.trim();
1483                    // Trim any leading/trailing whitespace
1484                });
1485                // Parse the extracted string into an HTML document
1486                let parser = new DOMParser();
1487                let doc = parser.parseFromString(commentContent, 'text/html');
1488                // Find the script tag in the parsed document
1489                if (content && commentContent) {
1490                    const scriptTags = doc.querySelectorAll('script');
1491                    for (const scriptTag of scriptTags) {
1492                        // Create new script tag
1493                        let script = document.createElement('script');
1494                        script.type = 'text/javascript';
1495                        // If the script tag in the parsed document exists...
1496                        if (scriptTag) {
1497                            // If the script has inline content...
1498                            if (scriptTag.innerHTML.trim()) {
1499                                script.innerHTML = scriptTag.innerHTML;
1500                            }
1501                            // If the script tag has a src attribute...
1502                            else if (scriptTag.hasAttribute('src')) {
1503                                script.src = scriptTag.getAttribute('src');
1504                            }
1505                            scriptTag.remove();
1506                            // Append the newly created script tag to content
1507                            document.head.appendChild(script);
1508                        }
1509                    }
1510                    content.innerHTML = doc.body.innerHTML;
1511                }
1512            }
1513        }
1514        const wrapper = externalElement.closest('[data-ccm-twostep-wrapper]');
1515        if (wrapper) {
1516            wrapper.classList.remove('show');
1517        }
1518        const overlay = externalElement.closest('[data-ccm-twostep-overlay]');
1519        if (overlay) {
1520            overlay.remove();
1521        }
1522    }
1523    getUnixTimestamp() {
1524        return Math.floor((new Date()).getTime() / 1000);
1525    }
1526    // @ts-ignore
1527    unloadCookieConsentManager() {
1528        const ccm = document.querySelector('#cookie-consent-manager');
1529        if (ccm) {
1530            ccm.remove();
1531        }
1532    }
1533    // @ts-ignore
1534    toggleDetailsContent(timeout = 200) {
1535        const detailContent = document.querySelector('[data-ccm-details-content]');
1536        if (detailContent) {
1537            if (detailContent.classList.contains('invisible')) {
1538                detailContent.classList.remove('invisible');
1539
1540            }
1541            else {
1542                detailContent.classList.add('invisible');
1543            }
1544        }
1545    }
1546    // @ts-ignore
1547    initializeTabbedContent() {
1548        const container2 = document.querySelector('[data-ccm-container="2"]');
1549        const container1 = document.querySelector('[data-ccm-container="1"]');
1550        const container2Links = document.querySelectorAll('[data-ccm-open-container]');
1551        const panels = document.querySelectorAll('[data-ccm-panel]');
1552        const closeElements = document.querySelectorAll('[data-ccm-container-close]');
1553        for (const panel of panels) {
1554            const pageUid = panel.dataset.ccmPanelContentUid ?? null;
1555            if (pageUid) {
1556                this.fetchAjaxData(this.configuration.baseUrl + '?ccm[action]=getPage&ccm[pageUid]=' + pageUid, function (responseHandler) {
1557                    if (responseHandler.readyState === XMLHttpRequest.DONE) {
1558                        if (responseHandler.status === 200) {
1559                            try {
1560                                const responseObject = JSON.parse(responseHandler.responseText);
1561                                panel.innerHTML = responseObject.content;
1562                            }
1563                            catch (e) { }
1564                        }
1565                    }
1566                });
1567            }
1568        }
1569        ;
1570        for (const container2Link of container2Links) {
1571            container2Link.addEventListener('click', function (e) {
1572                e.preventDefault();
1573                const id = container2Link.getAttribute('href');
1574                if (id && container1 && container2) {
1575                    container2.classList.remove('invisible');
1576                    container1.classList.add('invisible');
1577                    if (id) {
1578                        const inactiveTabs = document.querySelectorAll('[data-ccm-tab]:not(' + id + '-tab)');
1579                        for (const tab of inactiveTabs) {
1580                            tab.classList.remove('is-active');
1581                            tab.ariaSelected = 'false';
1582                        }
1583                        const activeTab = document.querySelector('[data-ccm-tab]' + id + '-tab');
1584                        if (activeTab) {
1585                            activeTab.classList.add('is-active');
1586                            activeTab.ariaSelected = 'true';
1587                            activeTab.focus();
1588                        }
1589                        this.switchTabs(id, panels);
1590                    }
1591                }
1592            }.bind(this));
1593        }
1594        const tabs = document.querySelectorAll('[data-ccm-tab]');
1595        for (const tab of tabs) {
1596            tab.addEventListener('click', function (e) {
1597                e.preventDefault();
1598                const id = tab.getAttribute('href');
1599                if (id) {
1600                    for (const tab of tabs) {
1601                        if (!tab.classList.contains(id + '-tab')) {
1602                            tab.classList.remove('is-active');
1603                            tab.ariaSelected = 'false';
1604                        }
1605                    }
1606                    tab.classList.add('is-active');
1607                    tab.ariaSelected = 'true';
1608                    this.switchTabs(id, panels);
1609                }
1610            }.bind(this));
1611        }
1612        for (const close of closeElements) {
1613            close.addEventListener('click', function () {
1614                if (container1 && container2) {
1615                    container2.classList.add('invisible');
1616                    container1.classList.remove('invisible');
1617                }
1618                const dialog = document.querySelector('[data-ccm-dialog]');
1619                if (dialog) {
1620                    dialog.focus();
1621                }
1622            });
1623        }
1624    }
1625    // @ts-ignore
1626    switchTabs(id, panels) {
1627        for (const panel of panels) {
1628            panel.classList.add('invisible');
1629            panel.ariaSelected = 'false';
1630        }
1631        const panelToShow = document.querySelector(id);
1632        if (panelToShow) {
1633            panelToShow.classList.remove('invisible');
1634            panelToShow.ariaSelected = 'true';
1635        }
1636    }
1637    injectTrackingCodeIntoDocumentHead() {
1638        // enable only for live context
1639        if (this.configuration.isProductionEnvironment && typeof this.configuration.tracker.snippet !== 'undefined') {
1640            const urls = this.configuration.tracker.snippet.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]+\.[a-z]{2,4}\b/g);
1641            if (urls && urls.length) {
1642                urls.forEach(function (url) {
1643                    const linkTag = document.createElement('link');
1644                    linkTag.rel = 'preconnect';
1645                    linkTag.href = url;
1646                    document.head.appendChild(linkTag);
1647                });
1648            }
1649            const trackingScriptElement = document.createElement('script');
1650            trackingScriptElement.classList.add(this.configuration.trackingScriptClassName);
1651            if (this.configuration.tracker.snippet.startsWith('http')) {
1652                trackingScriptElement.src = this.configuration.tracker.snippet;
1653            }
1654            else {
1655                trackingScriptElement.innerText = this.configuration.tracker.snippet;
1656            }
1657            document.head.appendChild(trackingScriptElement);
1658        }
1659    }
1660    // @ts-ignore
1661    removeTrackingCodeFromDocumentHead() {
1662        const trackingScriptElements = document.querySelectorAll('script.' + this.configuration.trackingScriptClassName);
1663        for (const node of trackingScriptElements) {
1664            node.remove();
1665        }
1666    }
1667    // @ts-ignore
1668    setCheckboxesFromCookieData() {
1669        this.setCheckbox('#ccm-option-statistics', !Number.isNaN(parseInt(this.getCookie(this.configuration.statisticsAllowedCookieName))));
1670        this.setCheckbox('#ccm-option-external-videos', !Number.isNaN(parseInt(this.getCookie(this.configuration.externalVideosAllowedCookieName))));
1671        this.setCheckbox('#ccm-option-external-maps', !Number.isNaN(parseInt(this.getCookie(this.configuration.externalMapsAllowedCookieName))));
1672        this.setCheckbox('#ccm-option-external-content', !Number.isNaN(parseInt(this.getCookie(this.configuration.externalContentAllowedCookieName))));
1673    }
1674    setCheckbox(id, check) {
1675        const checkbox = document.querySelector(id);
1676        if (checkbox) {
1677            if (check) {
1678                if (checkbox) {
1679                    checkbox.checked = true;
1680                    checkbox.dataset.initValue = '1';
1681                }
1682            }
1683            else {
1684                checkbox.dataset.initValue = '0';
1685            }
1686        }
1687    }
1688    // @ts-ignore
1689    clearAllCookies() {
1690        this.setCookie(this.theUserSelectedSomethingCookieName, '', true);
1691        this.setCookie(this.configuration.statisticsAllowedCookieName, '', true);
1692        this.setCookie(this.configuration.externalVideosAllowedCookieName, '', true);
1693        this.setCookie(this.configuration.externalMapsAllowedCookieName, '', true);
1694        this.setCookie(this.configuration.externalContentAllowedCookieName, '', true);
1695    }
1696    // @ts-ignore
1697    setAllCookies() {
1698        const timestamp = this.getUnixTimestamp().toString();
1699        this.setCookie(this.theUserSelectedSomethingCookieName, timestamp);
1700        this.setCookie(this.configuration.statisticsAllowedCookieName, timestamp);
1701        this.setCookie(this.configuration.externalVideosAllowedCookieName, timestamp);
1702        this.setCookie(this.configuration.externalMapsAllowedCookieName, timestamp);
1703        this.setCookie(this.configuration.externalContentAllowedCookieName, timestamp);
1704        location.reload();
1705    }
1706    getCookie(cookieName) {
1707        if (cookieName !== '') {
1708            const name = cookieName + '=';
1709            const cookieArray = decodeURIComponent(document.cookie).split(';');
1710            for (let i = 0; i < cookieArray.length; i++) {
1711                let cookie = cookieArray[i];
1712                if (cookie) {
1713                    while (cookie.charAt(0) === ' ') {
1714                        cookie = cookie.substring(1);
1715                    }
1716                    if (cookie.indexOf(name) == 0) {
1717                        return cookie.substring(name.length, cookie.length);
1718                    }
1719                }
1720            }
1721        }
1722        return '';
1723    }
1724    setCookie(cookieName, cookieValue, remove = false) {
1725        if (cookieName !== '') {
1726            const date = new Date();
1727            date.setTime(date.getTime() + (this.expireDays * 24 * 60 * 60 * 1000));
1728            if (remove) {
1729                var expires = 'expires=Thu, 01 Jan 1970 00:00:00 UTC';
1730            }
1731            else {
1732                var expires = 'expires=' + date.toUTCString();
1733            }
1734            document.cookie = cookieName + '=' + cookieValue + ';' + expires + ';path=/;SameSite=Strict';
1735        }
1736    }
1737    // @ts-ignore
1738    getCookieNameforInput(dataName) {
1739        switch (dataName) {
1740            case 'statistics':
1741                return this.configuration.statisticsAllowedCookieName;
1742            case 'externalVideos':
1743                return this.configuration.externalVideosAllowedCookieName;
1744            case 'externalMaps':
1745                return this.configuration.externalMapsAllowedCookieName;
1746            case 'externalContent':
1747                return this.configuration.externalContentAllowedCookieName;
1748            default:
1749                return '';
1750        }
1751    }
1752    cookieConsentManagerShouldBeShown() {
1753        return Number.isNaN(parseInt(this.getCookie(this.theUserSelectedSomethingCookieName)));
1754    }
1755    isPageExcluded() {
1756        return !!this.configuration.tracker.pageExcluded;
1757    }
1758    setAfterLoadEvents() {
1759        document.addEventListener('ccm-after-load', function (event) {
1760            this.setCheckboxesFromCookieData();
1761            this.initializeTabbedContent();
1762            // register detail link click event
1763            const toggles = document.querySelectorAll('[data-ccm-details-toggle]');
1764            for (const toggle of toggles) {
1765                toggle.addEventListener('click', function () {
1766                    this.toggleDetailsContent();
1767                    if (toggle.ariaExpanded == 'true') {
1768                        toggle.ariaExpanded = 'false';
1769                    }
1770                    else {
1771                        toggle.ariaExpanded = 'true';
1772                    }
1773                }.bind(this));
1774            }
1775            // register submit (selection) button click event
1776            const submits = document.querySelectorAll('[data-cookie-consent="submit"]');
1777            for (const submit of submits) {
1778                submit.addEventListener('click', function () {
1779                    this.dispatchCustomEvent('ccm-submit-selection-button-clicked', event.detail.ccmElement, event.detail.configuration);
1780                }.bind(this));
1781            }
1782            // register submit (all) button click event
1783            const submitAllElements = document.querySelectorAll('[data-cookie-consent="submit-all"]');
1784            for (const submit of submitAllElements) {
1785                submit.addEventListener('click', function () {
1786                    this.dispatchCustomEvent('ccm-submit-all-button-clicked', event.detail.ccmElement, event.detail.configuration);
1787                }.bind(this));
1788            }
1789            // register submit (all) button click event
1790            const submitEssentials = document.querySelectorAll('[data-cookie-consent="submit-essential"]');
1791            for (const submit of submitEssentials) {
1792                submit.addEventListener('click', function () {
1793                    this.dispatchCustomEvent('ccm-submit-essential-button-clicked', event.detail.ccmElement, event.detail.configuration);
1794                }.bind(this));
1795            }
1796        }.bind(this));
1797    }
1798    setSubmitSelectionEvent() {
1799        document.addEventListener('ccm-submit-selection-button-clicked', function () {
1800            this.clearAllCookies();
1801            const timestamp = this.getUnixTimestamp();
1802            let reload = false;
1803            this.setCookie(this.theUserSelectedSomethingCookieName, timestamp);
1804            const statCheckbox = document.querySelector('[data-ccm-checkbox="statistics"]');
1805            if (statCheckbox) {
1806                if (statCheckbox.checked) {
1807                    this.setCookie(this.configuration.statisticsAllowedCookieName, timestamp);
1808                    if (!Number(statCheckbox.dataset.initValue ?? 0)) {
1809                        this.injectTrackingCodeIntoDocumentHead();
1810                    }
1811                }
1812                else {
1813                    this.setCookie(this.configuration.statisticsAllowedCookieName, '', true);
1814                    this.removeTrackingCodeFromDocumentHead();
1815                }
1816            }
1817            const videoCheckbox = document.querySelector('[data-ccm-checkbox="externalVideos"]');
1818            if (videoCheckbox) {
1819                if (videoCheckbox.checked) {
1820                    this.setCookie(this.configuration.externalVideosAllowedCookieName, timestamp);
1821                }
1822                else {
1823                    this.setCookie(this.configuration.externalVideosAllowedCookieName, '', true);
1824                }
1825                reload = reload || (videoCheckbox.checked != Boolean(Number(videoCheckbox.dataset.initValue ?? 0)));
1826            }
1827            const mapCheckbox = document.querySelector('[data-ccm-checkbox="externalMaps"]');
1828            if (mapCheckbox) {
1829                if (mapCheckbox.checked) {
1830                    this.setCookie(this.configuration.externalMapsAllowedCookieName, timestamp);
1831                }
1832                else {
1833                    this.setCookie(this.configuration.externalMapsAllowedCookieName, '', true);
1834                }
1835                reload = reload || (mapCheckbox.checked != Boolean(Number(mapCheckbox.dataset.initValue ?? 0)));
1836            }
1837            const externalCheckbox = document.querySelector('[data-ccm-checkbox="externalContent"]');
1838            if (externalCheckbox) {
1839                if (externalCheckbox.checked) {
1840                    this.setCookie(this.configuration.externalContentAllowedCookieName, timestamp);
1841                }
1842                else {
1843                    this.setCookie(this.configuration.externalContentAllowedCookieName, '', true);
1844                }
1845                reload = reload || (externalCheckbox.checked != Boolean(Number(externalCheckbox.dataset.initValue ?? 0)));
1846            }
1847            if (reload) {
1848                location.reload();
1849            }
1850            const ccm = this.getCcmElement();
1851            if (ccm) {
1852                this.fadeOut(ccm, function () {
1853                    this.unloadCookieConsentManager();
1854                }.bind(this));
1855            }
1856        }.bind(this));
1857    }
1858    setSubmitEssentialEvent() {
1859        document.addEventListener('ccm-submit-essential-button-clicked', function () {
1860            let reload = false;
1861            const timestamp = this.getUnixTimestamp();
1862            this.clearAllCookies();
1863            this.setCookie(this.theUserSelectedSomethingCookieName, timestamp);
1864            const statCheckbox = document.querySelector('[data-ccm-checkbox="statistics"]');
1865            if (statCheckbox) {
1866                if (statCheckbox.checked) {
1867                    this.removeTrackingCodeFromDocumentHead();
1868                    reload = true;
1869                }
1870            }
1871            if (reload) {
1872                location.reload();
1873            }
1874            const ccm = this.getCcmElement();
1875            if (ccm) {
1876                this.fadeOut(ccm, function () {
1877                    this.unloadCookieConsentManager();
1878                }.bind(this));
1879            }
1880        }.bind(this));
1881    }
1882    setSubmitAllEvent() {
1883        document.addEventListener('ccm-submit-all-button-clicked', function () {
1884            let reload = false;
1885            let inject = false;
1886            const timestamp = this.getUnixTimestamp();
1887            this.setCookie(this.theUserSelectedSomethingCookieName, timestamp);
1888            const ccmDialog = document.querySelector('[data-ccm-dialog]');
1889            if (ccmDialog) {
1890                const checkBoxes = ccmDialog.querySelectorAll('input[type="checkbox"]');
1891                for (const checkbox of checkBoxes) {
1892                    checkbox.checked = true;
1893                    const cookieName = this.getCookieNameforInput(checkbox.dataset.ccmCheckbox ?? '');
1894                    if (cookieName) {
1895                        this.setCookie(cookieName, timestamp);
1896                    }
1897                    const action = checkbox.dataset.action ?? '';
1898                    switch (action) {
1899                        case 'inject':
1900                            inject = inject || !Number(checkbox.dataset.initValue ?? 0);
1901                            break;
1902                        case 'reload':
1903                            reload = reload || !Number(checkbox.dataset.initValue ?? 0);
1904                            break;
1905                        default:
1906                            break;
1907                    }
1908                }
1909                ;
1910            }
1911            setTimeout(function () {
1912                const ccm = this.getCcmElement();
1913                if (ccm) {
1914                    this.fadeOut(ccm, function () {
1915                        this.unloadCookieConsentManager();
1916                    }.bind(this));
1917                }
1918                if (inject) {
1919                    this.injectTrackingCodeIntoDocumentHead();
1920                }
1921                if (reload) {
1922                    location.reload();
1923                }
1924            }.bind(this), 300);
1925        }.bind(this));
1926    }
1927    /**
1928     * Show link (page footer) click event.
1929     * Create Ccm-Settings-Button based on class given by RTE.
1930     */
1931    createCcmSettingsButton() {
1932        const CcmSettingsSpans = document.querySelectorAll('.js-btn-ccm-settings');
1933        for (const ccmSettingsSpan of CcmSettingsSpans) {
1934            const ccmSettingsLink = document.createElement('button');
1935            const ccmSettingsLinkInnerWrap = document.createElement('span');
1936            if (ccmSettingsLink && ccmSettingsLinkInnerWrap) {
1937                // Create button
1938                ccmSettingsLinkInnerWrap.innerHTML = ccmSettingsSpan.innerHTML;
1939                ccmSettingsLink.appendChild(ccmSettingsLinkInnerWrap);
1940                ccmSettingsLink.classList.add('btn', 'btn-ccm-link');
1941                ccmSettingsLink.name = 'show_ccm';
1942                ccmSettingsLink.dataset.ccmShow = '';
1943                // replace span with button
1944                if (ccmSettingsSpan.parentNode) {
1945                    ccmSettingsSpan.parentNode.replaceChild(ccmSettingsLink, ccmSettingsSpan);
1946                }
1947            }
1948        }
1949    }
1950    /**
1951     * show link (page footer) click event
1952     **/
1953    setShowCcmEvent() {
1954        const showElements = document.querySelectorAll('[data-ccm-show]');
1955        for (const showElement of showElements) {
1956            showElement.addEventListener('click', function (e) {
1957                e.preventDefault();
1958                this.loadCookieConsentManager();
1959            }.bind(this));
1960        }
1961    }
1962    // @ts-ignore
1963    dispatchCustomEvent(eventName, ccmElement, configuration) {
1964        document.dispatchEvent(new CustomEvent(eventName, {
1965            detail: {
1966                ccmElement: ccmElement,
1967                configuration: configuration
1968            }
1969        }));
1970    }
1971    // @ts-ignore
1972    getCcmElement() {
1973        return document.querySelector('#cookie-consent-manager');
1974    }
1975    // @ts-ignore
1976    fadeOut(element, afterCallback = () => { }) {
1977        element.classList.add('fadeout');
1978        setTimeout(function () {
1979            element.classList.add('invisible');
1980            element.classList.remove('fadeout');
1981            afterCallback();
1982        }.bind(this), 200);
1983    }
1984    fetchAjaxData(endpoint, callback) {
1985        let httpRequest;
1986        httpRequest = new XMLHttpRequest();
1987        httpRequest.onreadystatechange = function () {
1988            callback(httpRequest);
1989        }.bind(this);
1990        httpRequest.open("GET", endpoint);
1991        httpRequest.setRequestHeader('Cache-Control', 'no-cache');
1992        httpRequest.send();
1993    }
1994    // @ts-ignore
1995    elementFromHTML(html, trim = true) {
1996        // Process the HTML string.
1997        html = trim ? html.trim() : html;
1998        if (!html)
1999            return null;
2000        // Then set up a new template element.
2001        const template = document.createElement('template');
2002        template.innerHTML = html;
2003        const result = template.content.children;
2004        return result[0] ?? null;
2005    }
2006    /**
2007     * As it is not guaranteed that a complete and correct configuration is provided,
2008     * invalid values are filtered out here.
2009     */
2010    setConfiguration(sourceConfiguration, destConfiguration = this.configuration) {
2011        for (const property in destConfiguration) {
2012            if (sourceConfiguration.hasOwnProperty(property)) {
2013                // @ts-ignore
2014                if (typeof sourceConfiguration[property] != 'object') {
2015                    // @ts-ignore
2016                    destConfiguration[property] = sourceConfiguration[property];
2017                }
2018                else {
2019                    // @ts-ignore
2020                    this.setConfiguration(sourceConfiguration[property], destConfiguration[property]);
2021                }
2022            }
2023            else {
2024                if (!(sourceConfiguration.isProductionEnvironment ?? false)) {
2025                    if (!CcmConfiguration.nonMandantoryFields.includes(property)) {
2026                        console.warn('CCM configuration parameter "' + property + '" missing.');
2027                    }
2028                }
2029            }
2030        }
2031    }
2032}
2033
2034
2035var DSL = DSL || {};
2036window.addEventListener('load', function() {
2037    // avoid multiple set
2038    if (!DSL.cookieConsentManager) {
2039        DSL.cookieConsentManager = new Ccm({"tracker":{"enabled":1,"pageExcluded":false,"snippet":"var _paq = window._paq = window._paq || [];\r\n  \/* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" *\/\r\n  _paq.push(['trackPageView']);\r\n  _paq.push(['enableLinkTracking']);\r\n  (function() {\r\n    var u=\"https:\/\/web-analyse.fh-erfurt.de\/\";\r\n    _paq.push(['setTrackerUrl', u+'matomo.php']);\r\n    _paq.push(['setSiteId', '1']);\r\n    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\r\n    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\r\n  })();\r\n\r\nvar _mtm = window._mtm = window._mtm || [];\r\n  _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});\r\n  (function() {\r\n    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\r\n    g.async=true; g.src='https:\/\/web-analyse.fh-erfurt.de\/js\/container_T8NlRuf8.js'; s.parentNode.insertBefore(g,s);\r\n  })();"},"isProductionEnvironment":true,"baseUrl":"https:\/\/www.fh-erfurt.de\/","statisticsAllowedCookieName":"ccm_statistics","externalVideosAllowedCookieName":"ccm_external_videos","externalMapsAllowedCookieName":"ccm_external_maps","externalContentAllowedCookieName":"ccm_external_content","trackingScriptClassName":"ccm-tracking-script","cookieTimestamp":1787303965});
2040    }
2041
2042    // Nested ifs are not recognised correctly by the Fluid Parser.
2043    // Therefore double check on cookieConsentManager.isPageExcluded()
2044    if (!DSL.cookieConsentManager.isPageExcluded() && (DSL.cookieConsentManager.clearAllOldCookies() || DSL.cookieConsentManager.cookieConsentManagerShouldBeShown())) {
2045        DSL.cookieConsentManager.loadCookieConsentManager();
2046    }
2047    if (!DSL.cookieConsentManager.isPageExcluded()) {
2048        DSL.cookieConsentManager.injectSnippetsFromCookieData();
2049    }
2050});

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.