(window.blocksyJsonP=window.blocksyJsonP||[]).push([[13],{44:function(e,t,n){"use strict";n.r(t),n.d(t,"mount",function(){return s});var r=n(0),i=n.n(r);function o(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t5&&(n-=Array.from(e.parentNode.children).filter(function(t){return t.dataset.id!==e.dataset.id}).reduce(function(e,t){return e+t.getBoundingClientRect().width},0)),Math.abs(e.parentNode.getBoundingClientRect().width-e.parentNode.parentNode.getBoundingClientRect().width)>5&&(n+=c(e.parentNode.parentNode.children).filter(function(t){return t.dataset.items!==e.parentNode.dataset.items}).reduce(function(e,t){return e+(t.getBoundingClientRect().width-c(t.children).reduce(function(e,t){return e+t.getBoundingClientRect().width},0))},0)),e.closest('[class*="ct-container"]')&&1===e.closest('[class*="ct-container"]').querySelectorAll('[data-id*="menu"]').length&&e.closest('[data-column="middle"]')&&(n=c(e.closest('[class*="ct-container"]').children).reduce(function(e,t){return e+t.getBoundingClientRect().width},0)-2*Math.max(c(e.closest('[class*="ct-container"]').querySelectorAll('[data-column="start"] [data-id]')).reduce(function(e,t){var n=window.getComputedStyle(t);return e+t.getBoundingClientRect().width+parseInt(n.getPropertyValue("margin-left"))+parseInt(n.getPropertyValue("margin-right"))},0),c(e.closest('[class*="ct-container"]').querySelectorAll('[data-column="end"] [data-id]')).reduce(function(e,t){var n=window.getComputedStyle(t);return e+t.getBoundingClientRect().width+parseInt(n.getPropertyValue("margin-left"))+parseInt(n.getPropertyValue("margin-right"))},0))),d[e.dataset.id].itemsWidth.reduce(function(e,t){return e+t},0)>n-10?d[e.dataset.id].children.reduce(function(t,r,i){var u=t.fit,l=t.notFit;return function(e){for(var t=1;t".concat(t.innerHTML,"");var n=window.getComputedStyle(t,null),r=t.firstElementChild.getBoundingClientRect().width+parseInt(n.getPropertyValue("padding-left"),10)+parseInt(n.getPropertyValue("padding-right"),10)+(t.querySelector(".child-indicator")?13:0);return t.innerHTML=t.firstElementChild.innerHTML,r})},s=function(e){if(d[e.dataset.id]||(d[e.dataset.id]={el:e,previousRenderedWidth:null,children:[].concat(c(Array.from(e.firstElementChild.children).filter(function(e){return!e.classList.contains("more-items-container")})),c(e.firstElementChild.querySelector(".more-items-container")?c(e.firstElementChild.querySelector(".more-items-container .sub-menu").children):[])),itemsWidth:l(e)},e.removeAttribute("data-responsive")),!d[e.dataset.id].previousRenderedWidth||d[e.dataset.id].previousRenderedWidth!==window.innerWidth){d[e.dataset.id].previousRenderedWidth=window.innerWidth;var t=u(e),n=t.fit,r=t.notFit;if(0===r.length)return e.querySelector(".more-items-container")&&(n.map(function(t){e.firstElementChild.insertBefore(t,e.querySelector(".more-items-container"))}),e.querySelector(".more-items-container").remove()),m(),void i.a.trigger("ct:header:init-popper");document.querySelector('header[data-device="desktop"]')&&function(e,t){if(e.querySelector(".more-items-container"))t();else{var n=document.createElement("li");n.classList.add("menu-item-has-children"),n.classList.add("more-items-container"),n.insertAdjacentHTML("afterbegin",'\n '.concat(ct_localizations.more_text,'\n \n \n \n \n \n \n ')),e.firstElementChild.appendChild(n),t&&t()}}(e,function(){r.map(function(t){return e.querySelector(".more-items-container .sub-menu").appendChild(t)}),n.map(function(t){return e.firstElementChild.insertBefore(t,e.querySelector(".more-items-container"))}),m(),i.a.trigger("ct:header:init-popper")})}},m=function(){c(document.querySelectorAll('header[data-device="desktop"] [data-id*="menu"] > .menu')).map(function(e){e.hasFirstLevelPoppers=!1,c(e.children).filter(function(e){return e.classList.contains("menu-item-has-children")||e.classList.contains("page_item_has_children")}).map(function(e){return e.querySelector(".sub-menu")}).map(function(e){c(e.querySelectorAll("[data-submenu]")).map(function(e){e.removeAttribute("data-submenu")}),e._popper&&(e._popper.destroy(),e._popper=null)})})}}}]);