1const l=r=>({isOpen:!1,isTransitioning:!1,init(){this.setServicesDimensions(),window.addEventListener("resize",this.setServicesDimensions.bind(this));const e=i=>{i.key==="Escape"&&this.isOpen&&this.toggle()};window.addEventListener("keydown",e),this.$cleanup=()=>{window.removeEventListener("resize",this.setServicesDimensions.bind(this)),window.removeEventListener("keydown",e)}},toggle(){if(window.matchMedia("(min-width: 1024px)").matches){if(this.isTransitioning)return;this.isOpen?(r("toggle-overlay",{isOpen:!1}),this.isTransitioning=!0,this.isOpen=!1,this.$refs.service.style.transform="translateY(0px)",this.$refs.service.style.height=this.$refs.service.scrollHeight+"px",requestAnimationFrame(()=>{this.$refs.service.style.height=this.$refs.serviceWrapper.clientHeight+"px"}),this.$refs.hiddenChildrenWrapper.style.gridTemplateColumns="1fr",this.$refs.hiddenChildren.style.display="none",document.body.style.overflow="",document.body.style.overflowY="",document.body.style.paddingRight="",setTimeout(()=>{this.isTransitioning=!1,this.$refs.service.style.zIndex="0",this.$refs.service.style.height="",this.$refs.service.style.paddingBottom="",document.querySelector(".fixed-overlay").style.zIndex="-1",this.$refs.allServicesButton.style.opacity="1",this.setServicesDimensions()},700)):(this.$refs.service.style.zIndex="100",this.$refs.service.style.paddingBottom="0px",this.$refs.service.style.position="absolute",this.$refs.allServicesButton.style.opacity="0",document.querySelector(".fixed-overlay").style.zIndex="100",document.body.style.overflowX="auto",document.body.style.overflowY="hidden",document.body.style.height="100vh",document.body.style.paddingRight="10px",document.body.addEventListener("wheel",i=>this.preventScroll(i),{passive:!1}),setTimeout(()=>{r("toggle-overlay",{isOpen:!0}),this.isOpen=!0,this.setServicesDimensions()},100),setTimeout(()=>{this.$refs.hiddenChildren.children.length&&(this.$refs.hiddenChildrenWrapper.style.gridTemplateColumns="repeat(2, 1fr)",this.$refs.hiddenChildren.style.display="grid");const i=this.$refs.service.getBoundingClientRect();if(!(i.top>=0&&i.left>=0&&i.bottom<=window.innerHeight-30&&i.right<=window.innerWidth)){const s=window.matchMedia("(max-height: 1024px)").matches?"end":"center";this.$refs.service.scrollIntoView({behavior:"smooth",block:s}),setTimeout(()=>{const n=document.body.classList.contains("scrolling-up")?40:20;this.$refs.service.style.transform=`translateY(-${n}px)`},100)}},500))}else{if(this.isTransitioning)return;this.isTransitioning=!0,this.isOpen?(this.isOpen=!1,requestAnimationFrame(()=>{this.setServicesDimensions()})):(this.isOpen=!0,requestAnimationFrame(()=>{this.setServicesDimensions()})),setTimeout(()=>{this.isTransitioning=!1},600)}},setServicesDimensions(){if(this.$refs.serviceWrapper){if(window.matchMedia("(min-width: 1024px)").matches){const e=this.$refs.service.clientHeight;this.$refs.serviceWrapper.style.height=e+"px",this.$refs.serviceName&&this.$refs.hiddenChildren.children.length&&(this.$refs.serviceName.style.width=this.$refs.serviceName.clientWidth+"px"),this.$refs.visibleChildren&&this.$refs.hiddenChildren.children.length&&(this.$refs.visibleChildren.style.width=this.$refs.visibleChildren.clientWidth+"px")}else if(this.$refs.serviceWrapper.style.height="",this.$refs.serviceName&&(this.$refs.serviceName.style.width=""),this.$refs.visibleChildren&&this.$refs.hiddenChildren.children.length&&(this.$refs.visibleChildren.style.width=""),this.$refs.hiddenChildrenWrapper)if(this.isOpen){const i=Array.from(this.$refs.hiddenChildrenWrapper.querySelectorAll(".child")).reduce((t,s)=>t+s.scrollHeight,0);this.$refs.hiddenChildrenWrapper.style.maxHeight=i+261+"px"}else{const i=Array.from(this.$refs.hiddenChildrenWrapper.querySelectorAll(".child")).slice(0,4).reduce((t,s)=>t+s.scrollHeight,0);this.$refs.hiddenChildrenWrapper.style.maxHeight=i+50+"px"}}},toggleOverlay(e){e?(this.isOverlayOpen=!0,setTimeout(()=>{this.$refs.overlay.classList.add("opacity-100")},50)):(this.$refs.overlay.classList.remove("opacity-100"),setTimeout(()=>{this.isOverlayOpen=!1},300))},preventScroll(e){if(this.isOpen){if(e.preventDefault(),e.stopPropagation(),this.$refs.hiddenChildrenWrapper&&this.$refs.hiddenChildrenWrapper.contains(e.target)){const t=this.$refs.hiddenChildrenWrapper,s=e.deltaY;t.scrollTop+=s}return!1}}});
1export{l as default};
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.