/*! For license information please see site.js.LICENSE.txt */
(()=>{var e={482:()=>{window.loadScript=function(e,t,n){var i=document.getElementById(t);if(i)n&&(i.loaded?n():i.addEventListener("load",n));else{var o=document.createElement("script");o.type="text/javascript",o.id=t,o.loaded=!1,o.defer=!0,o.async=!0,o.onload=function(){o.loaded=!0,n&&n()},o.src=e,document.getElementsByTagName("body")[0].appendChild(o)}},window.debounce=function(e,t){e._tId&&clearTimeout(e._tId),e._tId=setTimeout((function(){e()}),t)},window.swipeDetect=function(e,t){var n,i,o,r,a;e.addEventListener("touchstart",(function(e){var t=e.changedTouches[0];0,n=t.pageX,i=t.pageY,a=(new Date).getTime()}),!1),(t.up||t.down)&&e.addEventListener("touchmove",(function(e){e.preventDefault()}),!1),e.addEventListener("touchend",(function(e){var s,l=e.changedTouches[0];(o=l.pageX-n,r=l.pageY-i,(new Date).getTime()-a<=500)&&(Math.abs(o)>=15&&Math.abs(r)<=100?s=o<0?t.left:t.right:Math.abs(r)>=15&&Math.abs(o)<=100&&(s=r<0?t.up:t.down),"function"==typeof s&&s())}),!1)},window.slidableEffect=function(e,t){var n=Array.from(e.children),i=(t||5e3)+500;if(switchFn=function(){var t=n.find((function(e){return e.classList.contains("active")}));if(t){var i=t.nextElementSibling||e.firstElementChild;t.style.opacity=0,t.classList.remove("active"),i.style.opacity=1,i.classList.add("active")}},n.length){var o=setInterval(switchFn,i);e.addEventListener("mouseover",(function(){clearInterval(o)})),e.addEventListener("mouseleave",(function(){o=setInterval(switchFn,i)}))}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function r(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(r=o.key,a=void 0,a=function(t,n){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(r,"string"),"symbol"===e(a)?a:String(a)),o)}var r,a}var a=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$body=$("body"),this.$window=$(window),this.resizeTimer=null,this.resizeFn=[],this.isInit=!0,this.blogBuffer={},this.blogTopics=[],this.currentTopic=null,this.breakPointMobileMax=575,this.breakPointDesktopMin=1024,this.isPreview=window._vars&&!0===window._vars.preview;var n=lozad("[data-lazy-load]");n.observe(),this.$window.on("elements-added",(function(e){n.observe()})),$(document).ready((function(){t.initLayout(),t.initModules(),t.initEffects(),t.initAnchorScroll(),t.initModalLinks(),t.initBackgroundVideos()})),this.isInit=!1,this.$window.on("resize",(function(){t.resizeTimer&&window.clearTimeout(t.resizeTimer),t.resizeTimer=window.setTimeout((function(){t.resizeFn.forEach((function(e){return e.apply(t)}),t)}),500)}));var i=document.getElementById("grow-content");if(i){var o=this.$window.outerHeight()-this.$body.outerHeight();o>0&&(i.style.minHeight=(o+i.offsetHeight).toString()+"px")}}var n,o,a;return n=e,a=[{key:"scrollToElement",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=document.getElementById(e);if(o){var r=document.querySelector("header.fix-header"),a=document.querySelector("nav.nav"),s=r?r.offsetHeight:0,l=a?a.offsetHeight:0,c=s||l,u=o.getBoundingClientRect().top+window.scrollY-c,d=window.scrollY,f=u-d,p=performance.now();requestAnimationFrame((function e(t){var o,r=t-p,a=Math.min(r/n,1),s=(o=a)<.5?2*o*o:(4-2*o)*o-1;window.scrollTo(0,d+f*s),a<1?requestAnimationFrame(e):v(i)}))}function v(e){setTimeout((function(){var n=o.getBoundingClientRect().top-c;if(Math.abs(n)>10&&e<t){var i=window.scrollY+n;window.scrollTo({top:i,behavior:"smooth"}),v(e+1)}}),0===e?n:0)}}},{key:"ajax",value:function(e,t,n,i){$.ajax({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},method:e,url:t,data:n}).done((function(e){"function"==typeof i&&i(e)}))}},{key:"serializeJSON",value:function(e){var t={},n=e.serializeArray();return $.each(n,(function(){t[this.name]?(t[this.name].push||(t[this.name]=[t[this.name]]),t[this.name].push(this.value||"")):t[this.name]=this.value||""})),t}},{key:"loadSwalLib",value:function(e){window.loadScript("/static/js/sweetalert.min.js","swal_scr",e)}},{key:"loadSwiperLib",value:function(e){window.loadScript("/static/js/swiper.min.js","swiper_scr",e)}},{key:"handleAnimation",value:function(e,t){e.classList.contains("animated")||e.classList.contains("animationstart")||(e.addEventListener("animationstart",(function(){e.classList.add("animationstart"),e.classList.remove("anim-opacity-0")}),{once:!0}),e.addEventListener("animationend",(function(){e.classList.remove("animationstart"),e.classList.add("animated")}),{once:!0}),e.classList.add("animate","animationstart",t))}}],(o=[{key:"initLayout",value:function(){this.initScrollIcon(),this.initMenu()}},{key:"initScrollIcon",value:function(){var e=document.getElementById("scroll-top-el");if(e){e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),window.scrollTo({top:0,behavior:"smooth"})}));var t=function(){window.scrollY>30?(e.classList.add("visible"),e.classList.remove("hidden")):(e.classList.add("hidden"),e.classList.remove("visible"))};window.addEventListener("scroll",(function(){debounce(t,100)}))}}},{key:"initMenu",value:function(){document.querySelectorAll(".navbar-toggler").forEach((function(e){var t=e.closest(".module.nav");if(t){e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),document.body.classList.contains("menu-visible")?(document.body.classList.remove("menu-visible"),setTimeout((function(){document.body.classList.contains("menu-visible")||t.classList.remove("menu-opened")}),250)):(t.classList.add("menu-opened"),document.body.classList.add("menu-visible"))}));var n=t.querySelector(".close-mobile-nav");n&&n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.dispatchEvent(new Event("click"))}))}}));var e=document.getElementsByTagName("header")[0];e&&e.classList.contains("fix-header")&&this.initHeader(e),$(".quick-link").each((function(e,t){var n=t.children[0].classList.contains("info-text")?t.children[0]:t.children[1];t.dataset.text_width=n.offsetWidth.toString()+"px",n.style.width="0px",t.addEventListener("mouseenter",(function(){(t.children[0].classList.contains("info-text")?t.children[0]:t.children[1]).style.width=t.dataset.text_width})),t.addEventListener("mouseleave",(function(){(t.children[0].classList.contains("info-text")?t.children[0]:t.children[1]).style.width="0px"})),t.style.opacity=1}))}},{key:"initHeader",value:function(e){if(!document.body.classList.contains("header_absolute")){var t=e.getBoundingClientRect();e.style.left=t.left>0?t.left+"px":"0";var n=document.documentElement.clientWidth-t.right;e.style.right=n>0?n+"px":"0",document.getElementById("main-container").style.paddingTop=e.offsetHeight.toString()+"px"}if(e.classList.add("fixed"),e.classList.contains("nav-only")&&e.childElementCount>1){var o=document.getElementsByTagName("nav")[0];if(o){var r=o.parentNode.parentNode.parentNode;if(r.parentNode===e){var a,s=0,l=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(e.children);try{for(l.s();!(a=l.n()).done;){var c=a.value;c!==r&&(s+=c.offsetHeight)}}catch(e){l.e(e)}finally{l.f()}if(s>0){e.style.transition="top 0.25s ease";var u=!1,d=function(){window.scrollY>s?u||(e.style.top=(-1*s).toString()+"px",u=!0):u&&(e.style.top="0",u=!1)};window.addEventListener("scroll",(function(){debounce(d,100)}))}}}}}},{key:"initBackgroundVideos",value:function(){Array.from(document.getElementsByClassName("has-bg-video")).forEach((function(e){var t=e.dataset.bgVideo;if(t){var n=document.createElement("video"),i=getComputedStyle(e);["left","right","top","bottom"].forEach((function(e){var t=i.getPropertyValue("padding-"+e);if(t&&!t.startsWith("0")){var o=e.charAt(0).toUpperCase()+e.slice(1);n.style["padding"+o]=t}})),n.classList.add("bg-video-container"),n.controls=!1,n.autoplay=!0,n.loop=!0,n.muted=!0,n.preload="auto",n.playsInline=!0;var o=document.createElement("source");if(o.src=t,n.appendChild(o),e.insertAdjacentElement("afterbegin",n),e.dataset.audioControl){var r=document.createElement("i");r.className="fal fa-volume-slash audio-toggle",e.insertBefore(r,n.nextSibling),r.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault(),e.target.classList.contains("fa-volume-slash")?(n.muted=!1,e.target.classList.add("fa-volume"),e.target.classList.remove("fa-volume-slash")):(n.muted=!0,e.target.classList.add("fa-volume-slash"),e.target.classList.remove("fa-volume"))}))}}}))}},{key:"initModules",value:function(){this.initBlogSlider(),this.blogGridFilter(),this.initOffersModule(),this.initArchiveSliderModule(),this.initSliderModule(),this.initSearchModule(),this.initGalleries(),this.initSwipers(),this.initPopups(),this.socialWall()}},{key:"blogGridFilter",value:function(){var t=this;$(".module.blog.archive").each((function(){var n=$(this),i=n.id,o=n.find(".blog-filter-container a");if(o.length)for(var r=n.find(".blog-container"),a=0;a<o.length;a++)o[a].dataset.topic_id&&("all"!==o[a].dataset.topic_id?t.blogTopics.push(o[a].dataset.topic_id):o[a].classList.add("btn-filter-active")),o[a].addEventListener("click",(function(n){o.each((function(e,t){return t.classList.remove("btn-filter-active")})),n.target.classList.add("btn-filter-active"),n.preventDefault();var a=n.target.dataset.topic_id;a&&a!==t.currentTopic&&(t.currentTopic=a,t.blogBuffer[i+a]?r.html(t.blogBuffer[i+a]):e.ajax("GET","/content/posts",{topic:"all"===a?n.target.dataset.topics:a},(function(e){t.blogBuffer[i+a]=e,r.html(t.blogBuffer[i+a])})))}))}))}},{key:"socialWall",value:function(){var t=$(".social-wall-container");if(t.length){var n=this;t.each((function(){var t=$(this),i=t.attr("id");e.ajax("GET","/content/socialwall",{id:i,count:t.data("count"),pages:t.data("pages"),type:t.data("type")},(function(o){t.html(o),n.initSocialWall(),"carousel"===t.data("type")&&(window["swiper_"+i]={images_per_page:2,space_between:30,breakpoints:{1400:{slidesPerView:6,spaceBetween:0},1200:{slidesPerView:4,spaceBetween:0},1024:{slidesPerView:4,spaceBetween:0},768:{slidesPerView:2},320:{slidesPerView:1}},pagination:".swiper-pagination"},e.loadSwiperLib((function(){n.initCarousel(t)})))}))}))}}},{key:"initSocialWall",value:function(){var e=Array.prototype.slice.call(document.querySelectorAll(".social-wall__item")),t=Array.prototype.slice.call(document.querySelectorAll(".social-wall__item-overlay")),n=48,i=14,o=.8;function r(e,t){var a=window.getComputedStyle(e).fontSize,s=Math.max(i,Math.min(parseFloat(a)-1,n)),l=parseFloat(a);e.style.fontSize=s+"px",e.clientHeight>=t.clientHeight*o&&s!=l&&r(e,t)}function a(e,t){e.style.fontSize="100px",r(e,t)}t.forEach((function(e){window.addEventListener("load",(function(){a(e.querySelector(".social-wall__item-content"),e)})),window.addEventListener("resize",(function(){a(e.querySelector(".social-wall__item-content"),e)}))})),e.forEach((function(e){$(e).on("touchend",(function(){$(this).toggleClass("hover")}))}))}},{key:"initEffects",value:function(){if(!(this.$window.width()<360)){var t=$("[data-fade-in]");if(window._vars.feEdit)t.each((function(e,t){t.classList.remove("anim-opacity-0")}));else if(t.length)if(window.IntersectionObserver){var n={"from-left":"fadeInLeft","from-right":"fadeInRight","from-bottom":"fadeInDown","zoom-in":"zoomIn"},i=new IntersectionObserver((function(t){t.forEach((function(t){var i=t.target,o=n.hasOwnProperty(i.dataset.fadeIn)?n[i.dataset.fadeIn]:i.dataset.fadeIn;t.isIntersecting?e.handleAnimation(i,o):i.classList.contains("animated")&&"1"===i.dataset.repeat&&(i.classList.remove(o,"animated"),i.classList.add("anim-opacity-0"))}))}),{root:null,rootMargin:"0px",threshold:.06});t.each((function(e,t){i.observe(t)}))}else t.each((function(e,t){t.classList.remove("anim-opacity-0")}))}}},{key:"initPopups",value:function(){var e=this,t=$(".popup-modal");t.length&&t.each((function(t,n){if(e.isDesktop()&&"1"===n.dataset.lg||e.isTablet()&&"1"===n.dataset.md||e.isMobile()&&"1"===n.dataset.sm){var i=parseInt(n.dataset.show_delay);setTimeout((function(){e.showPopup(n)}),1e3*i)}}))}},{key:"showPopup",value:function(t){var n=t.dataset.animation,i="p_"+t.id,o=parseInt(t.dataset.close_after);t.parentElement.classList.remove("d-none"),e.handleAnimation(t,n),t.addEventListener("animationend",(function(){t.classList.remove("animationstart"),t.classList.add("animated")}),{once:!0}),t.getElementsByClassName("popup-close")[0].addEventListener("click",(function(){return t.parentElement.classList.add("d-none")})),o>0&&setTimeout((function(){return t.classList.add("d-none")}),1e3*o),this.isPreview||e.ajax("POST","/popup-settings",{popup_shown:i})}},{key:"initBlogSlider",value:function(){$(".module.slider").each((function(e,t){var n=$(t),i=n.find(".single-item"),o=i.eq(0),r=n.find(".carousel-control-prev"),a=n.find(".carousel-control-next");n.data("moved",0),r.click((function(){0!=n.data("moved")&&(n.data("moved",n.data("moved")-1),o.css("margin-left","-"+o.outerWidth()*n.data("moved")+"px"))})),a.click((function(){n.data("moved")>=i.length-1||(n.data("moved",n.data("moved")+1),o.css("margin-left","-"+o.outerWidth()*n.data("moved")+"px"))})),swipeDetect(t,{left:function(){a.trigger("click")},right:function(){r.trigger("click")}})}))}},{key:"initArchiveSliderModule",value:function(){var e=$(".pages.archive");e.length&&e.each((function(e,t){var n=$(t).find(".single-item");if(n.length){var i=$(t).find("a[data-topic_id]");i.each((function(e,t){"all"===t.dataset.topic_id&&t.classList.add("btn-filter-active"),t.addEventListener("click",(function(e){i.each((function(e,t){return t.classList.remove("btn-filter-active")})),t.classList.add("btn-filter-active"),e.preventDefault(),e.stopPropagation();var o=e.target.dataset.topic_id;n.each((function(e,t){"all"===o?t.classList.remove("d-none"):-1===t.dataset.page_topic.split(",").indexOf(o)?t.classList.add("d-none"):t.classList.remove("d-none")}))}))}))}}))}},{key:"initSliderModule",value:function(){var e=this;this.isInit&&this.resizeFn.push(this.initSliderModule),$(".row-slidable").each((function(e,n){var i=n.firstElementChild;if(i){var o=i.children[0].offsetHeight;n.style.height=o.toString()+"px",i.style.height=o.toString()+"px",t(i.children).forEach((function(e,t){0===t&&e.classList.add("active"),e.style.height=o.toString()+"px",e.classList.add("slideable-item")})),slidableEffect(i)}})),$(".module.slider.default").each((function(t,n){e.initSlider(n)}))}},{key:"initSlider",value:function(e){var t=$(e),n=t.find(".carousel"),i=n.find(".carousel-item"),o=0,r=n.find(".indicators-bar-large").length>0;n.data("init")?n.carousel("dispose"):t.hasClass("mobile-behaviour-split")&&this.$window.width()<=990&&(i.addClass("active"),i.each((function(e,t){var n=$(t),i=n.find(".carousel-caption");i.removeAttr("style");var r=i.outerHeight();o=r>o?r:o,e>0&&n.removeClass("active")})),i.find(".carousel-caption").css({height:o+(r?0:30)+"px"})),n.carousel({ride:!0}),n.data("init",!0)}},{key:"initOffersModule",value:function(){var e=$(".offer");e.length&&e.each((function(e,t){var n=$(t),i=n.find(".show-offer-details");i.on("click",(function(){var e=n.find(".offer-wrapper").clone();e.find(".show-offer-details").remove(),e.find(".offer-details").append('<div class="offer-description-details">'+i.data("details")+"</div>"),$("#offerModalBody").html(e),$("#offerModal").modal("show")}))}))}},{key:"initSearchModule",value:function(){var e=$("#search-overlay");if(e.length){var t=$("#search-field"),n=$("#search-form");$("[data-show-search]").each((function(n,i){$(i).on("click",(function(n){n.preventDefault(),e.addClass("shown"),window.setTimeout((function(){t.focus()}),500)}))})),e.on("click",(function(t){if(t.target!==e[0])return!1;e.removeClass("shown")})),t.on("keydown",(function(e){10!==e.which&&13!==e.which||n.submit()})),n.find(".btn").on("click",(function(){n.submit()})),n.on("submit",(function(e){return!!(t.val().length>=3)||(e.preventDefault(),e.stopPropagation(),!1)}))}}},{key:"initGalleries",value:function(){var t=this,n=$(".module.gallery");n.length&&n.each((function(n,i){if(i.classList.contains("v2"));else if(i.classList.contains("d-none"))e.loadSwiperLib((function(){var e=$(i);e.removeClass("d-none"),t.initSwiper(e)}));else{var o=i.firstElementChild,r=Array.from(i.getElementsByClassName("swiper-slide")),a=parseInt(i.dataset.spaceBetween||0),s=o.style.paddingLeft||0,l=o.style.paddingRight||0;if(document.body.offsetWidth<=768){var c=o.firstElementChild;r.forEach((function(e,t){e.style.maxWidth="50%"})),a&&(c.style.gap=a.toString()+"px")}else{var u=((o.offsetWidth-s-l-a*(r.length-1))/r.length).toString();r.forEach((function(e,t){e.style.width=u.toString()+"px",a>0&&t<r.length-1&&(e.style.marginRight=a.toString()+"px")}))}if(i.dataset.equalSize){var d=r[0].offsetWidth.toString()+"px";Array.from(i.getElementsByClassName("equal-height")).forEach((function(e){e.style.height=d}))}}}))}},{key:"initSwipers",value:function(){var t=this;this.swipers={},this.swiperModules=$(".module.has-swiper"),this.swiperModules.length&&(e.loadSwiperLib((function(){t.swiperModules.each((function(e,n){var i=$(n);i.removeClass("d-none"),t.initSwiper(i)}))})),this.$window.resize((function(){t.swiperModules.each((function(e,n){var i=$(n),o=i.attr("id");o in t.swipers&&(t.swipers[o].destroy(),t.initSwiper(i))}))})))}},{key:"initSwiper",value:function(e){var t=e.attr("id"),n=e.find(".swiper-container");n.css("display","none");var i=e.width();n.css({width:i+"px",display:"block"});var o=parseInt(e.data("slides-per-view"));this.swipers[t]=new Swiper("#"+t+" > .swiper-container",{spaceBetween:e.data("space-between"),autoplay:!!e.data("autoplay"),loop:!0,breakpoints:{1200:{slidesPerView:o},1024:{slidesPerView:3<o?3:o},768:{slidesPerView:2<o?2:o},320:{slidesPerView:1}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},on:{init:function(){if(e.data("equal-size")){var t=n.find(".swiper-slide");if(t){var i=t[0].offsetWidth.toString()+"px";Array.from(n.find(".equal-height")).forEach((function(e){e.style.height=i}))}}}},pagination:!1})}},{key:"initModalLinks",value:function(){var e=this;$("a[data-open-in-modal]").each((function(t,n){n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.showIframeModal(n.href)}))}))}},{key:"showIframeModal",value:function(e){var t=document.createElement("div");t.classList.add("modal-backdrop","fade"),document.body.appendChild(t),setTimeout((function(){t.classList.add("show")}),100),t.addEventListener("click",this.destroyIframeModal);var n=document.createElement("div");n.classList.add("iframe-modal");var i=document.createElement("button");i.classList.add("close"),i.type="button",i.innerHTML='<i class="fal fa-times"></i>',i.addEventListener("click",this.destroyIframeModal);var o=document.createElement("div");o.classList.add("close-bar"),o.appendChild(i),n.appendChild(o);var r=document.createElement("iframe");if(e.includes("https")){var a=new URL(e);if(a.hostname.match(/youtu(\.)?be/)){var s=null;(s=a.search&&a.searchParams.get("v")?a.searchParams.get("v"):a.pathname.trim().replace(/^\/|\/$/g,"").split("/").pop())&&(e="https://www.youtube-nocookie.com/embed/"+s+"?rel=0",r.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",r.allowFullscreen=!0)}else if(a.hostname.match(/vimeo/)){var l=e.match(/\/([0-9]+)$/i);l&&(e="https://player.vimeo.com/video/"+l[1]),r.allow="autoplay",r.allowFullscreen=!0}}r.src=e,n.appendChild(r),setTimeout((function(){document.body.appendChild(n)}),500)}},{key:"destroyIframeModal",value:function(){$(".modal-backdrop").remove(),$(".iframe-modal").remove()}},{key:"initAnchorScroll",value:function(){var t=document.querySelector("header");t&&t.classList.contains("fix-header")&&document.querySelectorAll('a[href^="#"]').forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var n=this.getAttribute("href").substring(1);document.getElementById(n)?e.scrollToElement(n,3):console.warn("Target element not found on current page: "+n)}))}));var n=window.location.hash;if("#"!==n){var i=n.replace("#","").split(":");if("goto"===i[0]){var o=i[1];e.scrollToElement(o,3)}}$("[data-scroll-to]").each((function(t,n){var i=$(n),o=i.data("scroll-to");i.click((function(t){t.preventDefault(),t.stopPropagation(),e.scrollToElement(o.replace("#",""),3)}))}))}},{key:"isDesktop",value:function(){return document.body.offsetWidth>=this.breakPointDesktopMin}},{key:"isTablet",value:function(){return document.body.offsetWidth>this.breakPointMobileMax&&document.body.offsetWidth<this.breakPointDesktopMin}},{key:"isMobile",value:function(){return document.body.offsetWidth<=this.breakPointMobileMax}}])&&r(n.prototype,o),a&&r(n,a),Object.defineProperty(n,"prototype",{writable:!1}),e}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===s(r)?r:String(r)),i)}var o,r}var c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dependenciesLoaded=!1,this.cbStack=[],this.serverURL="",this.mapMarkers=[],this.activeTopicEl=null,this.locations=null,this.topics=null,this.locales=null;var n=$(".module.map>div:last-child");this.customIconPath="M112 316.94v156.69l22.02 33.02c4.75 7.12 15.22 7.12 19.97 0L176 473.63V316.94c-10.39 1.92-21.06 3.06-32 3.06s-21.61-1.14-32-3.06zM144 0C64.47 0 0 64.47 0 144s64.47 144 144 144 144-64.47 144-144S223.53 0 144 0zm0 76c-37.5 0-68 30.5-68 68 0 6.62-5.38 12-12 12s-12-5.38-12-12c0-50.73 41.28-92 92-92 6.62 0 12 5.38 12 12s-5.38 12-12 12z",n.length&&(this.cbStack.push((function(){n.each((function(e,n){t.initMap(n)}))})),this.loadDependencies())}var t,n,i;return t=e,(n=[{key:"loadDependencies",value:function(e){var t=this;if(this.dependenciesLoaded)e&&this.cbStack.push(e);else{if(this.dependenciesLoaded=!0,""===_vars.google_maps_key)return void alert("Google Maps API Key is missing");a.ajax("get","/content/maplocales",{},(function(e){t.locales=e,t.loadScript()}))}}},{key:"loadScript",value:function(){var e=this,t=document.getElementsByTagName("body")[0],n=document.createElement("script");n.type="text/javascript",n.onload=function(){e.cbStack.forEach((function(e){return e()}))},n.src="https://maps.googleapis.com/maps/api/js?key="+_vars.google_maps_key+"&libraries=places",t.appendChild(n)}},{key:"initMap",value:function(e){var t=$(e),n={lat:parseFloat(t.data("lat")),lng:parseFloat(t.data("lng"))},i=t.data("google-map"),o=new google.maps.Map(e,{zoom:parseInt(t.data("zoom")),center:n});if(i){var r={position:n,map:o},a=t.data("marker-color");a&&(r.icon={path:this.customIconPath,strokeColor:a,fillColor:a,fillOpacity:1,scale:.08}),new google.maps.Marker(r)}(t.data("group-locations")||t.data("company-locations"))&&(this.serverURL=$(".groupStoreLocations").attr("data-url"),this.addGroupStoreMarkers(o,t),this.enableAutocomplete(o,t))}},{key:"bindTopics",value:function(e){var t='<a href="#" data-topic_id="" class="btn btn-rounded ml-1 mr-1 mb-2 topic-toggle active">'+this.locales.all+"</a>";e.forEach((function(e){t+='<a href="#" data-topic_id="'+e.id+'" class="btn btn-rounded ml-1 mr-1 mb-2 topic-toggle">'+e.name+"</a>"})),$(".groupStoreLocations .topics").html(t);var n=this;$(".groupStoreLocations .topic-toggle").each((function(e,t){t.classList.contains("active")&&(n.activeTopicEl=t),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),e.target.classList.contains("active")||(n.activeTopicEl&&n.activeTopicEl.classList.remove("active"),n.activeTopicEl=e.target,n.activeTopicEl.classList.add("active"),n.filterByTopic(e.target))}))}))}},{key:"filterByTopic",value:function(e){var t=0,n=e.dataset.topic_id;$(".storeInfo").each((function(e,i){if(""===n)i.classList.remove("d-none"),t++;else{var o=i.dataset.topics,r=!!o&&o.split(",");r&&-1!==r.indexOf(n)?(i.classList.remove("d-none"),t++):i.classList.add("d-none")}})),t?$(".no-topic-match")[0].classList.add("d-none"):$(".no-topic-match")[0].classList.remove("d-none")}},{key:"bindStoreHover",value:function(){var e=this;$(".groupStoreLocations li.storeInfo").hover((function(){var t=$(this).data("id");e.mapMarkers.forEach((function(e){e.id===t&&e.htmlMarker.setAnimation(google.maps.Animation.BOUNCE)}))}),(function(){var t=$(this).data("id");e.mapMarkers.forEach((function(e){e.id===t&&e.htmlMarker.setAnimation(null)}))}))}},{key:"setZoomAndShowMinOneStore",value:function(e,t){var n=!1;if(e.setZoom(t),this.mapMarkers.length>0)for(var i=0;i<this.mapMarkers.length&&!(n=e.getBounds().contains(this.mapMarkers[i].htmlMarker.getPosition()));i++);return n}},{key:"enableAutocomplete",value:function(e,t){$("#location").val("");var n=this,i=document.getElementById("location"),o=new google.maps.places.Autocomplete(i),r=new google.maps.Marker({map:e}),a=new google.maps.InfoWindow;$(".groupStoreLocations form").submit((function(i){if(i.preventDefault(),""===$("#location").val()){var s,l;alert(null!==(s=null===(l=n.locales.errors)||void 0===l?void 0:l.type_location)&&void 0!==s?s:"Please provide an location.")}else{var c=o.getPlace();if(!("geometry"in c))return;c.geometry.viewport?e.fitBounds(c.geometry.viewport):e.setCenter(c.geometry.location),r.setPosition(c.geometry.location);for(var u=!1,d=11;!u;)u=n.setZoomAndShowMinOneStore(e,d),d--;r.setVisible(!0),this.currentLocation=c,google.maps.event.addListener(r,"click",function(t){return function(){a.setContent("<div class='markerInfo'><div class='header'>"+c.formatted_address+"</div></div>"),a.open(e,t)}}(r));var f=c.geometry.location.lat(),p=c.geometry.location.lng();this.serverURL=$(".groupStoreLocations").attr("data-url"),$.ajax({async:!1,type:"GET",url:this.serverURL+"/module/stores?group_locations="+t.data("group-locations")+"&company_locations="+t.data("company-locations")+"&topics="+t.data("topics")+"&lat="+f+"&lng="+p,success:function(e){n.setLocationList(e);var t="https://www.google.com/maps/dir/"+encodeURI(c.formatted_address).replace("/","%20");$("a.routePlaner").each((function(){var e=$(this).attr("data-href");this.href=t+"/"+e}))},error:function(){console.log("Error getting stores for location")}})}}))}},{key:"bindOpeningHoursClick",value:function(){var e=this;$("ul.days").hide(),$("a.openingHoursLink").click((function(t){t.preventDefault();var n=$(this).parent().find("ul.days");n.is(":visible")?(n.hide(),$(this).html(e.locales.opening_hours+' <i class="fas fa-sort-down"></i>')):(n.show(),$(this).html(e.locales.opening_hours+' <i class="fas fa-sort-up"></i>'))}))}},{key:"setLocationList",value:function(e){var t,n,i="<p>"+(null===(t=this.locales.errors)||void 0===t?void 0:t.no_locations_found)+"</p>",o=this;e.locations.length&&(i="<ul>",e.locations.forEach((function(e){var t=null!==e.email?"<i class='fas fa-envelope'></i><a href='mailto:"+e.email+"'>"+e.email+"</a><br/>":"",n=null!==e.phone?"<i class='fas fa-phone-square'></i><a href='tel:"+e.phone+"'>"+e.phone+"</a><br/>":"",r="",a=e.contact_person?'<i class="fas fa-user"></i>'+e.contact_person+"<br/>":"",s="";e.description&&(s="<p>"+o.nl2br(e.description)+"</p>"),null!==e.domain?r="<i class='fas fa-globe-americas'></i><a target='_blank' href='https://"+e.domain+"'>"+e.domain+"</a><br/>":e.website&&null!==e.website.domain&&(r="<i class='fas fa-globe-americas'></i><a target='_blank' href='https://"+e.website.domain+"'>"+e.website.domain+"</a><br/>");var l=null!==e.distance&&void 0!==e.distance?"<span class='distance'>"+Math.floor(e.distance)+"km</span>":"",c='<i class="fas fa-map-marked"></i><a class="routePlaner" data-href="'+encodeURI(e.street).replace("/","%20")+"%2C%20"+encodeURI(e.city).replace("/","%20")+'" href="https://www.google.com/maps/dir//'+encodeURI(e.street).replace("/","%20")+"%2C%20"+encodeURI(e.city).replace("/","%20")+'" target="_blank">Zum Routenplaner</a><br/>',u="";if(null!==e.times){var d="";null!==e.times_info&&(d='<p><i class="fas fa-info-circle"></i> <span>'+o.nl2br(e.times_info)+"</span></p>"),e.times.forEach((function(e,t){for(var n=e.from.length,i="",r=0;r<n;r++){if(e.closed){i+="<li>"+o.locales.closed+"</li>";break}""!==e.from[r]&&""!==e.to[r]&&null!==e.from[r]&&null!==e.to[r]&&(i+="<li>"+e.from[r]+"Uhr - "+e.to[r]+"Uhr</li>")}if(""!==i){var a,s=null!==(a=o.locales["day_"+(t+1)])&&void 0!==a?a:"--";d+='<li><span class="headline">'+s+'</span><ul class="times">',d+=i,d+="</ul></li>"}})),""!==d&&(u+='<ul class="days">',u+=d,u+="</ul>",u='<i class="fas fa-clock"></i><a class="openingHoursLink" href>'+o.locales.opening_hours+'<i class="fas fa-sort-down"></i></a><div class="openings">'+u+"</div>")}i+='<li class="storeInfo" data-topics="'+(e.topics||"")+'" data-id="'+e.id+'"><span class="header">'+e.name+"</span>"+l+"<br/>"+s+'<p><i class="fas fa-home"></i>'+e.street+'<br/><span class="iconPlaceholder"></span>'+e.zip+" "+e.city+"</p><p>"+a+t+n+r+c+"</p>"+u+"</li>"})),i+='<li class="no-topic-match d-none">'+(null===(n=o.locales.errors)||void 0===n?void 0:n.no_locations_found)+"</li></ul>"),$("div.storeList").html(i),this.bindOpeningHoursClick(),this.bindStoreHover()}},{key:"nl2br",value:function(e,t){return null==e?"":(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(t||void 0===t?"<br />":"<br>")+"$2")}},{key:"addGroupStoreMarkers",value:function(e,t){var n=this,i=new google.maps.LatLngBounds,o=new google.maps.InfoWindow;$.ajax({async:!1,type:"GET",url:this.serverURL+"/module/stores?group_locations="+t.data("group-locations")+"&company_locations="+t.data("company-locations")+"&topics="+t.data("topics"),success:function(r){r.topics.length&&n.bindTopics(r.topics),n.setLocationList(r),r.locations.forEach((function(r){var a={lat:parseFloat(r.lat),lng:parseFloat(r.lng)},s=t.data("marker-color"),l=new google.maps.Marker({position:a,map:e,icon:{path:n.customIconPath,strokeColor:s,fillColor:s,fillOpacity:1,scale:.08,anchor:new google.maps.Point(120,550)}});n.mapMarkers[n.mapMarkers.length]={id:r.id,htmlMarker:l},i.extend(l.position),n.attachMessage(l,r,o,e)})),r.locations.length>1&&e.fitBounds(i)},error:function(){console.log("Error getting stores")}})}},{key:"attachMessage",value:function(e,t,n,i){var o='<a class="routePlaner" data-href="'+encodeURI(t.street).replace("/","%20")+"%2C%20"+encodeURI(t.city).replace("/","%20")+'" href="https://www.google.com/maps/dir//'+encodeURI(t.street).replace("/","%20")+"%2C%20"+encodeURI(t.city).replace("/","%20")+'" target="_blank">Zum Routenplaner</a><br/>',r="<div class='markerInfo' data-id='"+t.id+"'><div class='header'>"+t.name+"</div><p>"+o+"</p></div>",a=this,s=t.id;google.maps.event.addListener(e,"click",(function(){var t=$('.storeInfo[data-id="'+s+'"]');n.setContent(r),n.open(i,e),t.length>0&&a.highlight(t,1e3)})),google.maps.event.addListener(n,"domready",(function(){var e=$('.storeInfo[data-id="'+s+'"] a.routePlaner').attr("href");$('.markerInfo[data-id="'+s+'"] a.routePlaner').attr("href",e)}))}},{key:"highlight",value:function(e,t){$(".storeList ul").scrollTop($(".storeList ul").scrollTop()+e.position().top),e.addClass("highlight"),setTimeout((function(){e.removeClass("highlight")}),t)}},{key:"encode_utf8",value:function(e){return unescape(encodeURIComponent(e))}},{key:"decode_utf8",value:function(e){return decodeURIComponent(escape(e))}}])&&l(t.prototype,n),i&&l(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===u(r)?r:String(r)),i)}var o,r}var f=function(){function e(){var t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isPreview=(null===(t=window._vars)||void 0===t?void 0:t.preview)||!1,this.isFeEdit=(null===(n=window._vars)||void 0===n?void 0:n.feEdit)||!1,this.setup()}var t,n,i;return t=e,n=[{key:"setup",value:function(){var e=this;fetch("/cc-setup",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((function(e){return e.json()})).then((function(t){t.success&&(e.processSettings(t.settings),!e.isFeEdit&&t.html&&(document.body.insertAdjacentHTML("beforeend",t.html),e.init()))})).catch((function(e){return console.error("Setup error:",e)}))}},{key:"processSettings",value:function(e){e.csrf&&this.appendCsrfMeta(e.csrf),this.isPreview||this.isFeEdit||(e.ga&&this.initGa(e.ga),e.fp&&this.initFp(e.fp)),this.initModules(e)}},{key:"moduleEnabled",value:function(e,t){return this.isPreview||this.isFeEdit||t.modules[e]}},{key:"initModules",value:function(e){var t=this;["youtube","vimeo"].forEach((function(n){t.moduleEnabled("video.".concat(n),e)&&t.initVideoModule(n)})),!this.isFeEdit&&this.moduleEnabled("google_maps",e)&&this.initGoogleMapsModule(),this.showDisabledOverlays()}},{key:"showDisabledOverlays",value:function(){document.querySelectorAll(".module.loading").forEach((function(e){e.classList.remove("loading")}))}},{key:"initVideoModule",value:function(e){document.querySelectorAll(".module.video.".concat(e)).forEach((function(e){var t;null===(t=e.querySelector(".cc-module-disabled-notification"))||void 0===t||t.remove(),e.classList.remove("disabled"),e.querySelectorAll("iframe").forEach((function(e){e.src=e.dataset.videoSrc}))}))}},{key:"initGoogleMapsModule",value:function(){document.querySelectorAll(".module.map").forEach((function(e){var t;null===(t=e.querySelector(".cc-module-disabled-notification"))||void 0===t||t.remove(),e.classList.remove("disabled")})),new c}},{key:"appendCsrfMeta",value:function(e){var t=document.createElement("meta");t.name="csrf-token",t.content=e,document.head.appendChild(t)}},{key:"initGa",value:function(e){var t=document.createElement("script");t.src="https://www.googletagmanager.com/gtag/js?id=".concat(e),t.async=!0,t.onload=function(){function t(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],t("js",new Date),t("config",e,{anonymize_ip:!0})},document.body.appendChild(t)}},{key:"initFp",value:function(e){if(!window.fbq){window.fbq=function(){window.fbq.callMethod?window.fbq.callMethod.apply(window.fbq,arguments):window.fbq.queue.push(arguments)},window._fbq=window.fbq,window.fbq.push=window.fbq,window.fbq.loaded=!0,window.fbq.version="2.0",window.fbq.queue=[];var t=document.createElement("script");t.src="https://connect.facebook.net/en_US/fbevents.js",t.async=!0,t.onload=function(){fbq("init",e),fbq("track","PageView")},document.body.appendChild(t)}}},{key:"handleModal",value:function(){this.isPreview?$("#ccModal").modal("hide"):document.getElementById("ccForm").submit()}},{key:"init",value:function(){var e=this;document.getElementById("ccAllowSelected").addEventListener("click",(function(){e.handleModal()})),document.getElementById("ccAllowAll").addEventListener("click",(function(){e.toggleCheckboxes(!0),e.handleModal()})),document.getElementById("ccDisallow").addEventListener("click",(function(){e.toggleCheckboxes(!1),e.handleModal()})),document.querySelectorAll('*[href$="#cookieconsent"]').forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),$("#ccModal").modal("show")}))})),document.getElementById("autoOpenCC")&&$("#ccModal").modal("show");var t="";document.querySelectorAll(".openTextModal").forEach((function(n){n.addEventListener("click",(function(n){n.preventDefault(),e.openTextModal(n.target,t),t=n.target.dataset.type}))}))}},{key:"toggleCheckboxes",value:function(e){document.querySelectorAll(".cc-paragraph-checkbox").forEach((function(t){t.checked=e||"essential"===t.name}))}},{key:"openTextModal",value:function(e,t){var n=e.dataset.type;$("#textModal").modal("show"),n!==t&&(document.getElementById("textModalTitle").innerHTML=e.innerHTML,document.getElementById("textModalBody").innerHTML='<p class="text-center"><i class="fas fa-circle-notch fa-spin"></i></p>',fetch("content/".concat(n)).then((function(e){return e.text()})).then((function(e){document.getElementById("textModalBody").innerHTML=e})).catch((function(e){return console.error("Error fetching content:",e)})))}}],n&&d(t.prototype,n),i&&d(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function v(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==p(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===p(r)?r:String(r)),i)}var o,r}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initialized=!1;var t=$(".newsletter-form");t.length&&this.initForms(t);var n=$(".topic-check");n.length&&this.initTopicSelect(n)}var t,n,i;return t=e,(n=[{key:"initForms",value:function(e){var t=this;if("undefined"==typeof grecaptcha){var n=document.getElementsByTagName("body")[0],i=document.createElement("script");i.type="text/javascript",i.onload=function(){e.each((function(e,n){t.initForm($(n))}))},i.src="https://www.google.com/recaptcha/api.js?render="+_vars.google_recaptcha_key,n.appendChild(i)}else e.each((function(e,n){t.initForm($(n))}))}},{key:"initForm",value:function(e){var t=this;this.initialized||(this.initialized=!0,e.submit((function(n){if(n.preventDefault(),t.setFormLocked(e,!0),_vars.google_recaptcha_key)grecaptcha.ready((function(){grecaptcha.execute(_vars.google_recaptcha_key,{action:"homepage"}).then((function(n){var i=a.serializeJSON(e);i.recaptcha_response=n,a.ajax("POST","/newsletter/subscribe",i,(function(n){n.success&&(t.setFormLocked(e,!1),e[0].reset(),e.find(".status-message").addClass("in").find("span").text(n.message))}))}))}));else{var i=a.serializeJSON(e);a.ajax("POST","/newsletter/subscribe",i,(function(n){n.success&&(t.setFormLocked(e,!1),e[0].reset(),e.find(".status-message").addClass("in").find("span").text(n.message))}))}})))}},{key:"setFormLocked",value:function(e,t){e.find("input").each((function(e,n){t?$(n).attr("readonly",!0):$(n).removeAttr("readonly")}));var n=e.find('button[type="submit"]');t?(e.addClass("processing"),n.attr("disabled",!0)):(e.removeClass("processing"),n.removeAttr("disabled"))}},{key:"initTopicSelect",value:function(e){e.each((function(e,t){var n=$(t);n.data("locked",!1),n.on("change",(function(e){if(n.data("locked"))n.prop("checked",!n.is(":checked"));else{n.data("locked",!0);var t={topicId:n.data("topic"),selected:n.is(":checked")};a.ajax("POST","/newsletter/topic",t,(function(e){e.success&&n.data("locked",!1)}))}}))}))}}])&&v(t.prototype,n),i&&v(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===m(r)?r:String(r)),i)}var o,r}var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.meds=0,this.rowTemplate=null,this.$form=$("#preorder_form"),this.initialized=!1,this.$form.length&&this.checkRequirement()}var t,n,i;return t=e,(n=[{key:"checkRequirement",value:function(){var e=this;if(_vars.google_recaptcha_key&&"undefined"==typeof grecaptcha){var t=document.getElementsByTagName("body")[0],n=document.createElement("script");n.type="text/javascript",n.onload=function(){e.initForm()},n.src="https://www.google.com/recaptcha/api.js?render="+_vars.google_recaptcha_key,t.appendChild(n)}else this.initForm()}},{key:"initForm",value:function(){var e=this;if(!this.initialized){a.loadSwalLib(),this.initialized=!0;var t=this;this.rowTemplate=$("#meds .med").clone(),this.rowTemplate.find(".btn-add").remove(),$(".datepicker").datepicker({language:"de",format:"dd.mm.yyyy",startDate:"+0d",autoclose:!0}),$(".btn-add").on("click",(function(t){t.preventDefault(),e.addRow()})),$("#preorder_submit").on("click",(function(e){e.preventDefault();var n=!0;$("#basic_data").find('[data-required="1"]').each((function(e,t){var i=$(t);""==i.val()?(n=!1,i.addClass("is-invalid")):i.removeClass("is-invalid")})),$("#manual-tab").hasClass("active")?($("#_type").val("manual"),$("#manual").find('[data-required="1"]').each((function(e,t){var i=$(t);""==i.val()?(n=!1,i.addClass("is-invalid")):i.removeClass("is-invalid")}))):""==$("#_imageInput").val()&&(n=!1,$("#_imageInput").addClass("is-invalid")),$("#_accept").is(":checked")||(n=!1,$("#_accept").addClass("is-invalid")),n?_vars.google_recaptcha_key?grecaptcha.ready((function(){grecaptcha.execute(_vars.google_recaptcha_key,{action:"homepage"}).then((function(e){$("#_rresp").val(e),t.$form.submit()}))})):window.setTimeout((function(){t.$form.submit()}),250):swal("Oops","Bitte füllen Sie alle Pflichtfelder aus!","error")}))}}},{key:"initRowRemove",value:function(){$(".btn-remove").off("click").on("click",(function(e){e.preventDefault(),$(this).parents(".med").remove()}))}},{key:"addRow",value:function(){$("#meds").append(this.rowTemplate.clone()),this.initRowRemove(),this.meds++}}])&&y(t.prototype,n),i&&y(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),w=function(e,t){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},w(e,t)};function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function k(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function S(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}Object.create;function E(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var _="1.9.0",L="awesomium",x="cef",C="cefsharp",P="coachjs",T="electron",M="fminer",j="geb",I="nightmarejs",A="phantomas",O="phantomjs",D="rhino",B="selenium",F="sequentum",q="slimerjs",z="webdriverio",R="webdriver",N="headless_chrome",G="unknown",W=function(e){function t(n,i){var o=e.call(this,i)||this;return o.state=n,o.name="BotdError",Object.setPrototypeOf(o,t.prototype),o}return b(t,e),t}(Error);function H(e){return k(this,void 0,void 0,(function(){var t,n,i=this;return S(this,(function(o){switch(o.label){case 0:return t={},n=Object.keys(e),[4,Promise.all(n.map((function(n){return k(i,void 0,void 0,(function(){var i,o,r,a,s;return S(this,(function(l){switch(l.label){case 0:i=e[n],l.label=1;case 1:return l.trys.push([1,3,,4]),o=t,r=n,s={},[4,i()];case 2:return o[r]=(s.value=l.sent(),s.state=0,s),[3,4];case 3:return a=l.sent(),t[n]=a instanceof W?{state:a.state,error:"".concat(a.name,": ").concat(a.message)}:{state:-3,error:a instanceof Error?"".concat(a.name,": ").concat(a.message):String(a)},[3,4];case 4:return[2]}}))}))})))];case 1:return o.sent(),[2,t]}}))}))}function V(e,t){return-1!==e.indexOf(t)}function U(e,t){return-1!==e.indexOf(t)}function K(e){return Object.getOwnPropertyNames(e)}function Y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=function(t){if("string"==typeof t){if(V(e,t))return{value:!0}}else if(null!=function(e,t){if("find"in e)return e.find(t);for(var n=0;n<e.length;n++)if(t(e[n],n,e))return e[n]}(e,(function(e){return t.test(e)})))return{value:!0}},o=0,r=t;o<r.length;o++){var a=i(r[o]);if("object"==typeof a)return a.value}return!1}function J(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}var Z={detectAppVersion:function(e){var t=e.appVersion;return 0===t.state&&(/headless/i.test(t.value)?N:/electron/i.test(t.value)?T:/slimerjs/i.test(t.value)?q:void 0)},detectDocumentAttributes:function(e){var t=e.documentElementKeys;return 0===t.state&&(Y(t.value,"selenium","webdriver","driver")?B:void 0)},detectErrorTrace:function(e){var t=e.errorTrace;return 0===t.state&&(/PhantomJS/i.test(t.value)?O:void 0)},detectEvalLengthInconsistency:function(e){var t=e.evalLength,n=e.browserKind,i=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state){var o=t.value;return"unknown"!==i.value&&(37===o&&!V(["webkit","gecko"],i.value)||39===o&&!V(["internet_explorer"],n.value)||33===o&&!V(["chromium"],i.value))}},detectFunctionBind:function(e){if(-2===e.functionBind.state)return O},detectLanguagesLengthInconsistency:function(e){var t=e.languages;if(0===t.state&&0===t.value.length)return N},detectNotificationPermissions:function(e){var t=e.notificationPermissions,n=e.browserKind;return 0===n.state&&"chrome"===n.value&&(0===t.state&&t.value?N:void 0)},detectPluginsArray:function(e){var t=e.pluginsArray;if(0===t.state&&!t.value)return N},detectPluginsLengthInconsistency:function(e){var t=e.pluginsLength,n=e.android,i=e.browserKind,o=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state&&0===o.state&&"chrome"===i.value&&!n.value&&"chromium"===o.value)return 0===t.value?N:void 0},detectProcess:function(e){var t,n=e.process;return 0===n.state&&("renderer"===n.value.type||null!=(null===(t=n.value.versions)||void 0===t?void 0:t.electron)?T:void 0)},detectUserAgent:function(e){var t=e.userAgent;return 0===t.state&&(/PhantomJS/i.test(t.value)?O:/Headless/i.test(t.value)?N:/Electron/i.test(t.value)?T:/slimerjs/i.test(t.value)?q:void 0)},detectWebDriver:function(e){var t=e.webDriver;if(0===t.state&&t.value)return N},detectWebGL:function(e){var t=e.webGL;if(0===t.state){var n=t.value,i=n.vendor,o=n.renderer;if("Brian Paul"==i&&"Mesa OffScreen"==o)return N}},detectWindowExternal:function(e){var t=e.windowExternal;return 0===t.state&&(/Sequentum/i.test(t.value)?F:void 0)},detectWindowSize:function(e){var t=e.windowSize,n=e.documentFocus;if(0!==t.state||0!==n.state)return!1;var i=t.value,o=i.outerWidth,r=i.outerHeight;return n.value&&0===o&&0===r?N:void 0},detectMimeTypesConsistent:function(e){var t=e.mimeTypesConsistent;if(0===t.state&&!t.value)return G},detectProductSub:function(e){var t=e.productSub,n=e.browserKind;return 0===t.state&&0===n.state&&("chrome"!==n.value&&"safari"!==n.value&&"opera"!==n.value&&"wechat"!==n.value||"20030107"===t.value?void 0:G)},detectDistinctiveProperties:function(e){var t=e.distinctiveProps;if(0!==t.state)return!1;var n,i=t.value;for(n in i)if(i[n])return n}};function X(){var e,t,n=window,i=navigator;return J(["webkitPersistentStorage"in i,"webkitTemporaryStorage"in i,0===i.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in n,"BatteryManager"in n,"webkitMediaStream"in n,"webkitSpeechGrammar"in n])>=5?"chromium":J(["ApplePayError"in n,"CSSPrimitiveValue"in n,"Counter"in n,0===i.vendor.indexOf("Apple"),"getStorageUpdates"in i,"WebKitMediaKeys"in n])>=4?"webkit":J(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4?"gecko":"unknown"}var Q={android:function(){var e=X(),t="chromium"===e,n="gecko"===e;if(!t&&!n)return!1;var i=window;return J(["onorientationchange"in i,"orientation"in i,t&&!("SharedWorker"in i),n&&/android/i.test(navigator.appVersion)])>=2},browserKind:function(){var e,t=null===(e=navigator.userAgent)||void 0===e?void 0:e.toLowerCase();return U(t,"edg/")?"edge":U(t,"trident")||U(t,"msie")?"internet_explorer":U(t,"wechat")?"wechat":U(t,"firefox")?"firefox":U(t,"opera")||U(t,"opr")?"opera":U(t,"chrome")?"chrome":U(t,"safari")?"safari":"unknown"},browserEngineKind:X,documentFocus:function(){return void 0!==document.hasFocus&&document.hasFocus()},userAgent:function(){return navigator.userAgent},appVersion:function(){var e=navigator.appVersion;if(null==e)throw new W(-1,"navigator.appVersion is undefined");return e},rtt:function(){if(void 0===navigator.connection)throw new W(-1,"navigator.connection is undefined");if(void 0===navigator.connection.rtt)throw new W(-1,"navigator.connection.rtt is undefined");return navigator.connection.rtt},windowSize:function(){return{outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight}},pluginsLength:function(){if(void 0===navigator.plugins)throw new W(-1,"navigator.plugins is undefined");if(void 0===navigator.plugins.length)throw new W(-3,"navigator.plugins.length is undefined");return navigator.plugins.length},pluginsArray:function(){if(void 0===navigator.plugins)throw new W(-1,"navigator.plugins is undefined");if(void 0===window.PluginArray)throw new W(-1,"window.PluginArray is undefined");return navigator.plugins instanceof PluginArray},errorTrace:function(){try{null[0]()}catch(e){if(e instanceof Error&&null!=e.stack)return e.stack.toString()}throw new W(-3,"errorTrace signal unexpected behaviour")},productSub:function(){var e=navigator.productSub;if(void 0===e)throw new W(-1,"navigator.productSub is undefined");return e},windowExternal:function(){if(void 0===window.external)throw new W(-1,"window.external is undefined");var e=window.external;if("function"!=typeof e.toString)throw new W(-2,"window.external.toString is not a function");return e.toString()},mimeTypesConsistent:function(){if(void 0===navigator.mimeTypes)throw new W(-1,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,n=0;n<e.length;n++)t&&(t=Object.getPrototypeOf(e[n])===MimeType.prototype);return t},evalLength:function(){return eval.toString().length},webGL:function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)throw new W(-2,"HTMLCanvasElement.getContext is not a function");var t=e.getContext("webgl");if(null===t)throw new W(-4,"WebGLRenderingContext is null");if("function"!=typeof t.getParameter)throw new W(-2,"WebGLRenderingContext.getParameter is not a function");return{vendor:t.getParameter(t.VENDOR),renderer:t.getParameter(t.RENDERER)}},webDriver:function(){if(null==navigator.webdriver)throw new W(-1,"navigator.webdriver is undefined");return navigator.webdriver},languages:function(){var e,t=navigator,n=[],i=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==i&&n.push([i]),Array.isArray(t.languages))"chromium"===X()&&J([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||n.push(t.languages);else if("string"==typeof t.languages){var o=t.languages;o&&n.push(o.split(","))}return n},notificationPermissions:function(){return k(this,void 0,void 0,(function(){var e,t;return S(this,(function(n){switch(n.label){case 0:if(void 0===window.Notification)throw new W(-1,"window.Notification is undefined");if(void 0===navigator.permissions)throw new W(-1,"navigator.permissions is undefined");if("function"!=typeof(e=navigator.permissions).query)throw new W(-2,"navigator.permissions.query is not a function");n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.query({name:"notifications"})];case 2:return t=n.sent(),[2,"denied"===window.Notification.permission&&"prompt"===t.state];case 3:throw n.sent(),new W(-3,"notificationPermissions signal unexpected behaviour");case 4:return[2]}}))}))},documentElementKeys:function(){if(void 0===document.documentElement)throw new W(-1,"document.documentElement is undefined");var e=document.documentElement;if("function"!=typeof e.getAttributeNames)throw new W(-2,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()},functionBind:function(){if(void 0===Function.prototype.bind)throw new W(-2,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()},process:function(){if(void 0===window.process)throw new W(-1,"window.process is undefined");return window.process},distinctiveProps:function(){var e,t,n=((e={})[L]={window:["awesomium"]},e[x]={window:["RunPerfTest"]},e[C]={window:["CefSharp"]},e[P]={window:["emit"]},e[M]={window:["fmget_targets"]},e[j]={window:["geb"]},e[I]={window:["__nightmare","nightmare"]},e[A]={window:["__phantomas"]},e[O]={window:["callPhantom","_phantom"]},e[D]={window:["spawn"]},e[B]={window:["_Selenium_IDE_Recorder","_selenium","calledSelenium",/^([a-z]){3}_.*_(Array|Promise|Symbol)$/],document:["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped"]},e[z]={window:["wdioElectron"]},e[R]={window:["webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw"],document:["__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__fxdriver_unwrapped","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","$cdc_asdjflasutopfhvcZLmcf","$cdc_asdjflasutopfhvcZLmcfl_","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"]},e[N]={window:["domAutomation","domAutomationController"]},e),i={},o=K(window),r=[];for(t in void 0!==window.document&&(r=K(window.document)),n){var a=n[t];if(void 0!==a){var s=void 0!==a.window&&Y.apply(void 0,E([o],a.window,!1)),l=!(void 0===a.document||!r.length)&&Y.apply(void 0,E([r],a.document,!1));i[t]=s||l}}return i}},ee=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.detect=function(){if(void 0===this.components)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var e=function(e,t){var n={},i={bot:!1};for(var o in t){var r=(0,t[o])(e),a={bot:!1};"string"==typeof r?a={bot:!0,botKind:r}:r&&(a={bot:!0,botKind:G}),n[o]=a,a.bot&&(i=a)}return[n,i]}(this.components,Z),t=e[0],n=e[1];return this.detections=t,n},e.prototype.collect=function(){return k(this,void 0,void 0,(function(){var e;return S(this,(function(t){switch(t.label){case 0:return e=this,[4,H(Q)];case 1:return e.components=t.sent(),[2,this.components]}}))}))},e}();function te(e){var t=(void 0===e?{}:e).monitoring,n=void 0===t||t;return k(this,void 0,void 0,(function(){var e;return S(this,(function(t){switch(t.label){case 0:return n&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(_,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),[4,(e=new ee).collect()];case 1:return t.sent(),[2,e]}}))}))}function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function ie(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function re(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==ne(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==ne(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===ne(r)?r:String(r)),i)}var o,r}var ae=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$forms=$(".module.form"),this.disabledConfValues=null,this.disabledConfKey=null,this.$loadingTimesMsg=$("#loading-times-info"),this.$timeDropdown=$("#times"),this.selectedCompany=null,this.conditionalFieldMap={},this.botPromise=null,this.initialized=!1,this.locales={},this.$forms.length&&(this.botPromise=te(),a.ajax("get","/content/formlocales",{},(function(e){t.locales=e})),this.initForm())}var t,n,i;return t=e,(n=[{key:"validateRequiredFields",value:function(e){var t=!0;return e.find('[data-required="1"]').each((function(e,n){var i=$(n);"checkbox"===i.attr("type")?i.is(":checked")?i.removeClass("is-invalid"):(t=!1,i.addClass("is-invalid")):"file"===i.attr("type")||(""===i.val()||null===i.val()?n.classList.contains("f-conditional")&&n.classList.contains("d-none")||(t=!1,i.addClass("is-invalid")):i.removeClass("is-invalid"))})),t}},{key:"validateFiles",value:function(e){var t=!0,n=this;return e.find('input[type="file"]').each((function(e,i){var o=$(i);"1"===o.data("required")&&0===o.files.length&&(t=!1,o.addClass("is-invalid")),t&&(t=n.checkFileSize(o)),t?o.removeClass("is-invalid"):o.addClass("is-invalid")})),t}},{key:"checkFileSize",value:function(e){var t=0,n=parseInt(e.data("max-size"));n||(n=10);var i,o=1048576*n,r=ie(e.prop("files"));try{for(r.s();!(i=r.n()).done;)t+=i.value.size}catch(e){r.e(e)}finally{r.f()}return o>=t}},{key:"initDatepicker",value:function(){var e=this,t=this;$(".datepicker").each((function(n,i){var o=$(i),r={format:"dd.mm.yyyy",startDate:"+"+o.data("day-buffer")+"d",orientation:"bottom",language:"de-DE",autoclose:!0};e.disabledConfValues&&(r[e.disabledConfKey]=e.disabledConfValues),o.data("init")&&o.datepicker("destroy");var s=o.data("time-interval"),l=o.data("ob");o.data("init",!0);var c=o.datepicker(r);"1"===i.dataset.booking&&c.on("changeDate",(function(n){var i=n.format("dd.mm.yyyy");e.$loadingTimesMsg.removeClass("d-none"),a.ajax("post","/module/booking/times",{company:e.selectedCompany,date:i,interval:s,ob:l},(function(n){if(n.success){if(!n.times||0===n.times.length)return e.$loadingTimesMsg.addClass("d-none"),void swal("Hinweis",t.locales.error_no_date,"error");e.$loadingTimesMsg.addClass("d-none"),e.$timeDropdown.parent().removeClass("d-none"),e.$timeDropdown.html('<option value="">Uhrzeit wählen</option>'),n.times.forEach((function(t){e.$timeDropdown.append("<option>"+t+"</option>")}))}}))}))}))}},{key:"getDisabledDates",value:function(){var e=this;a.ajax("post","/module/booking/dates",{company:this.selectedCompany},(function(t){t.success&&(t.closed_week_days?(e.disabledConfKey="daysOfWeekDisabled",e.disabledConfValues=t.closed_week_days):(e.disabledConfKey="datesDisabled",e.disabledConfValues=t.dates),e.initDatepicker())}))}},{key:"initForm",value:function(){var e=this;if(!this.initialized){a.loadSwalLib(),this.initialized=!0;var t=this;this.$forms.each((function(n,i){var o=$(i),r=(o.hasClass("wizard-form"),o.find(".form-submit"));$(".wizard-next").on("click",(function(e){e.preventDefault(),e.stopPropagation();var n=$(this).parents(".tab-pane"),i=t.validateRequiredFields(n),o=t.validateFiles(n);i&&o?$("#"+n.next().attr("aria-labelledby")).removeClass("disabled").trigger("click"):swal(t.locales.error_swal_title,i?t.locales.error_max_size:t.locales.error_mandatory,"error")}));var a=$("select[name='group_company_id']");a.length?a.on("change",(function(){var n=a.val();if(!n)return t.disabledConfValues=null,void t.initDatepicker();e.selectedCompany=n,e.getDisabledDates()})):e.getDisabledDates(),r.on("click",(function(e){e.preventDefault();var n=t.validateRequiredFields(o),i=t.validateFiles(o);n&&i?t.handleBotDetectionAndSubmit(o):swal(t.locales.error_swal_title,n?t.locales.error_max_size:t.locales.error_mandatory,"error")})),t.handleConditionalFields(o)}))}}},{key:"handleBotDetectionAndSubmit",value:function(e){var t=e.find('input[name="_brv"]'),n=this;t.val("0"),this.botPromise.then((function(e){return e.detect()})).then((function(i){i.bot?swal(n.locales.error_swal_title,n.locales.error_bot_detection,"error"):n.submitForm(t,e)})).catch((function(i){console.error(i),n.submitForm(t,e)}))}},{key:"submitForm",value:function(e,t){e.val(Math.floor(Date.now()/1e3));var n=document.querySelector('meta[name="csrf-token"]').getAttribute("content");t.append('<input type="hidden" name="_token" value="'+n+'">'),t.submit()}},{key:"handleConditionalFields",value:function(e){var t=e.find(".f-conditional"),n=this;if(t.length){t.each((function(e,t){n.conditionalFieldMap[t.dataset.ciid]=t}));var i=function(e){e.target.checked?n.conditionalFieldMap[e.target.dataset.iid].classList.remove("d-none"):(n.conditionalFieldMap[e.target.dataset.iid].classList.add("d-none"),n.conditionalFieldMap[e.target.dataset.iid].getElementsByClassName("form-control")[0].value="")};e.find(".form-check-input").each((function(e,t){n.conditionalFieldMap[t.dataset.iid]&&t.addEventListener("click",i)}))}}}])&&re(t.prototype,n),i&&re(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function le(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==se(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===se(r)?r:String(r)),i)}var o,r}var ce=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.geodata={},this.$locations=[],this.$window=$(window),this.itemid=0;var n=$('[data-chg-banner="1"]');n.length&&(n.each((function(e,n){var i=$(n);t.itemid=i.data("chg-itemid"),t.$locations.push({name:i.data("chg-location"),$el:i})})),this.getGeolocation())}var t,n,i;return t=e,(n=[{key:"fetchBanner",value:function(e,t){var n=this;a.ajax("post","/module/contenthub",{coords:e,error:t,cid:this.itemid,locations:this.$locations.map((function(e){return e.name}))},(function(e){if("elements"in e&&e.elements){for(var t=function(){var t=o[i],r=e.elements[t],a=n.$locations.filter((function(e){return e.name===t}));a&&a.length&&a[0].$el.append(r)},i=0,o=Object.keys(e.elements);i<o.length;i++)t();n.$window.trigger("elements-added")}}))}},{key:"getGeolocation",value:function(){var e=this;"geolocation"in navigator?navigator.geolocation.getCurrentPosition((function(t){e.fetchBanner({latitude:t.coords.latitude,longitude:t.coords.longitude},null)}),(function(t){e.fetchBanner(null,t.message)})):this.fetchBanner(null,"geolocation is not available")}}])&&le(t.prototype,n),i&&le(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function de(){de=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,o){var r=t&&t.prototype instanceof f?t:f,a=Object.create(r.prototype),s=new L(o||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function p(){}function v(){}var h={};l(h,r,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(x([])));y&&y!==t&&n.call(y,r)&&(h=y);var g=v.prototype=f.prototype=Object.create(h);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function o(i,r,a,s){var l=u(e[i],e,r);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==ue(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var r;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){o(e,n,t,i)}))}return r=r?r.then(i,i):i()}})}function k(e,t,n){var i="suspendedStart";return function(o,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw r;return{value:void 0,done:!0}}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=u(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function S(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(e){if(e||""===e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}throw new TypeError(ue(e)+" is not iterable")}return p.prototype=v,i(g,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},w(b.prototype),l(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new b(c(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(g),l(g,s,"Generator"),l(g,r,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function fe(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}function pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==ue(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==ue(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===ue(r)?r:String(r)),i)}var o,r}var ve=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n,i,o,r;return t=e,n=[{key:"init",value:function(){var e=this,t=document.querySelectorAll("[data-openingtimes-type]");if(0!==t.length){var n=t[0].dataset.checksum,i=this.getStoredData();i&&i.checksum===n?this.updateElements(t,i.data):this.fetchOpeningTimesData().then((function(i){e.updateElements(t,i),e.storeData(i,n)})).catch((function(e){return console.error("Error fetching data from backend:",e)}))}}},{key:"fetchOpeningTimesData",value:(o=de().mark((function e(){var t;return de().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/module/openingtimes",{method:"POST",headers:{"Content-Type":"application/json"}});case 2:if((t=e.sent).ok){e.next=5;break}throw new Error("Error in request: ".concat(t.statusText));case 5:return e.next=7,t.json();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})),r=function(){var e=this,t=arguments;return new Promise((function(n,i){var r=o.apply(e,t);function a(e){fe(r,n,i,a,s,"next",e)}function s(e){fe(r,n,i,a,s,"throw",e)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"replacePlaceholders",value:function(e,t){var n=t.dataset,i=n.textOpen,o=void 0===i?"":i,r=n.textClosed,a=void 0===r?"":r,s=n.textStyle,l=void 0===s?"":s;return e.replace(/{{text_open}}/g,o).replace(/{{text_closed}}/g,a).replace(/{{text_style}}/g,l)}},{key:"updateElements",value:function(e,t){var n=this;e.forEach((function(e){var i=e.dataset.openingtimesType,o=n.getHtmlContentByType(i,t.html);o?e.innerHTML=n.replacePlaceholders(o,e):console.warn("Unknown type: ".concat(i))}))}},{key:"getHtmlContentByType",value:function(e,t){switch(e){case"opennow":return t.opennow;case"openinghours":return t.openinghours;case"openinghoursGrouped":return t.openinghoursGrouped;default:return null}}},{key:"storeData",value:function(e,t){sessionStorage.setItem("openingTimesData",JSON.stringify({data:e,checksum:t}))}},{key:"getStoredData",value:function(){var e=sessionStorage.getItem("openingTimesData");return e?JSON.parse(e):null}}],n&&pe(t.prototype,n),i&&pe(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,r=function(e,t){if("object"!==he(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==he(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===he(r)?r:String(r)),i)}var o,r}var ye=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.galleries=[],this.swipers={},this.initGalleries()}var t,n,i;return t=e,(n=[{key:"initGalleries",value:function(){var e=document.querySelectorAll(".module.gallery.v2");if(e.length){var t=this;a.loadSwiperLib((function(){Array.from(e).forEach((function(e){t.galleries.push(e),t.initGallery(e)})),window.screen&&window.screen.orientation&&(window.screen.orientation.onchange=function(){t.galleries.forEach((function(e){t.initGallery(e)}))})}))}}},{key:"addGallery",value:function(e){this.galleries.push(e),this.initGallery(e)}},{key:"removeGallery",value:function(e){this.swipers[e.id]&&(this.swipers[e.id].destroy(),delete this.swipers[e.id]);var t=this.galleries.indexOf((function(t){return t===e}));t>-1&&this.galleries.splice(t,1)}},{key:"initGallery",value:function(e){e.classList.remove("d-none");var t=e.classList.contains("grid"),n=parseInt(e.dataset.spaceBetween||0),i=parseInt(e.dataset.cols||0),o=parseInt(e.dataset.colsMd||0),r=parseInt(e.dataset.colsSm||0),a=parseInt(e.dataset.img),s=parseInt(e.dataset.imgMd),l=parseInt(e.dataset.imgSm),c=document.body.offsetWidth<this.breakPointDesktopMin,u=document.body.offsetWidth<=this.breakPointMobileMax,d=u?l:c?s:a,f=Array.from(e.getElementsByClassName("swiper-slide")),p=!1,v="1"===e.dataset.equalSize,h=0;if(t){var m=Array.from(e.getElementsByClassName("grid-item")),y=u?r:c?o:i,g=Math.ceil(d/y),w=Math.ceil(m.length/d);if(h=1===y?e.firstElementChild.offsetWidth:(e.firstElementChild.offsetWidth-n*(y-1))/y,f.length!==w){var b=document.createDocumentFragment(),k=f[0].parentNode;for(f=[];f.length<w;){var S=document.createElement("div");for(S.classList.add("swiper-slide");S.children.length<d&&m.length>0;)S.appendChild(m.shift());f.push(S),b.appendChild(S)}k.replaceChildren(b)}f.forEach((function(e){var t=Array.from(e.children),i=1,o=1;t.forEach((function(e){e.style.width=h.toString()+"px",n>0&&(e.style.marginBottom=i<g?n.toString()+"px":"0",e.style.marginRight=o<y?n.toString()+"px":"0",++o>y&&(i++,o=1))}))})),f.length>1&&(this.initGallerySwiper(e,1,1,1),p=!0),1===d&&1===y&&(v=!1)}else h=1===d?e.firstElementChild.offsetWidth:(e.firstElementChild.offsetWidth-n*(d-1))/d,f.forEach((function(e,t){n>0&&t<f.length-1&&(e.style.marginRight=n.toString()+"px"),e.style.width=h.toString()+"px"})),f.length>d&&(this.initGallerySwiper(e,a,s,l),p=!0);p||Array.from(e.firstElementChild.getElementsByClassName("g-ctrl")).forEach((function(e){e.classList.add("d-none")})),h>0&&v&&Array.from(e.getElementsByClassName("equal-height")).forEach((function(e){e.style.height=h.toString()+"px"}))}},{key:"initGallerySwiper",value:function(e,t,n,i){this.swipers[e.id]||(this.swipers[e.id]=new Swiper(e.firstElementChild,{autoplay:!!parseInt(e.dataset.autoplay),delay:parseInt(e.dataset.interval||5e3),slidesPerView:i,spaceBetween:parseInt(e.dataset.spaceBetween||0),loop:!0,breakpoints:{1024:{slidesPerView:t},768:{slidesPerView:n}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:!1}))}}])&&me(t.prototype,n),i&&me(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();n(482),window.addEventListener("load",(function(){lightbox.option({showImageNumberLabel:!1}),new f;var e=new a,t=new ye;if(new ve,new ce,new ae,new h,new g,window._vars.feEdit){var n=new c;a.loadSwiperLib(),n.loadDependencies(),window._SITE={core:e,gallery:t,map:n}}}))})()})();