1(function($){ 2 3// For mobile submenu 4$('.main-menu > ul > .menu-item-has-children>a, .lang-switcher .drop > a').after('<span class="arrow-icon"></span>');$(document).on('click','.menu-item-has-children .arrow-icon, .lang-switcher .arrow-icon',function(e){$(this).parent('.menu-item-has-children').find('.sub-menu.menu-depth-1').toggleClass('open-submenu');$(this).siblings('.dropdown-menu').toggleClass('open-submenu');e.preventDefault();e.stopPropagation();}); 5 6// Hamburger menu 7$(window).on("load",function(){$('.ham-icon').on('click',function(e){$('body').toggleClass('open-mobile-menu');$menu_label=$(this).attr('aria-label');if($menu_label=='Open menu'){$(this).attr('aria-label','Close menu');$(this).attr('aria-expanded',true);}else{$(this).attr('aria-label','Open menu');$(this).attr('aria-expanded',false);}e.preventDefault();});}); 8 9// Slick Slider 10$('#fl-slider').length>0&&$('#fl-slider').slick({centerMode:!0,centerPadding:'200px',slidesToShow:1,arrows:!0,prevArrow:'<figure class="slick-prev slick-arrow"><svg fill="#000000" height="64px" width="64px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-20.48 -20.48 552.97 552.97" xml:space="preserve" stroke="#000000" stroke-width="24.064282"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><g><path d="M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0 L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251 c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"></path></g></g></g></svg></figure>',nextArrow:'<figure class="slick-next slick-arrow"><svg fill="#000000" height="64px" width="64px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-20.48 -20.48 552.97 552.97" xml:space="preserve" stroke="#000000" stroke-width="24.064282"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><g><path d="M388.419,475.59L168.834,256.005L388.418,36.421c8.341-8.341,8.341-21.824,0-30.165s-21.824-8.341-30.165,0 L123.586,240.923c-8.341,8.341-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251 c5.461,0,10.923-2.091,15.083-6.251C396.76,497.414,396.76,483.931,388.419,475.59z"></path></g></g></g></svg></figure>',dots:!0,adaptiveHeight:!1,variableWidth:!1,responsive:[{breakpoint:1024,settings:{arrows:!0,centerMode:!0,centerPadding:'40px',slidesToShow:1}},{breakpoint:500,settings:{arrows:!0,centerMode:!0,centerPadding:'20px',slidesToShow:1}}]}); 11 12// Scroll States 13$((()=>{let c=0,l=0,t=!1;const s=()=>{c=$(window).scrollTop();t||(requestAnimationFrame(()=>{const b=$('body');c>10?b.addClass('scrolled'):b.removeClass('scrolled');c>l?b.addClass('scrolled-down'):c<l-10&&b.removeClass('scrolled-down');l=c;t=!1}),t=!0)};$(window).on('load scroll',s)})); 14 15// Smooth scrolling for anchor links 16document.addEventListener('DOMContentLoaded',()=>{document.querySelectorAll('a[href^="#"]:not([href="#"])').forEach(link=>{link.addEventListener('click',e=>{const target=document.querySelector(link.getAttribute('href'));if(target){e.preventDefault();const menu=document.querySelector('.on-screen-menu');if(menu?.classList.contains('animate')){menu.classList.remove('animate');document.querySelector('.background-container')?.classList.remove('animate');document.querySelector('.icon')?.classList.remove('open');}const pos=target.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:pos,behavior:'smooth'});history.pushState?.(null,null,link.getAttribute('href'))}})})}); 17 18// Load more posts functionality 19document.addEventListener('DOMContentLoaded',function(){const btn=document.getElementById('load-more-btn'),container=document.getElementById('news-posts-grid')||document.getElementById('inspiration-posts-grid');if(btn){const textDefault=btn.getAttribute('data-text-default'),textLoading=btn.getAttribute('data-text-loading');btn.addEventListener('click',function(){const offset=parseInt(this.getAttribute('data-offset'),10)||0,postsPerPage=parseInt(this.getAttribute('data-posts-per-page'),10)||0,maxPostsAttr=this.getAttribute('data-max-posts'),hasMaxCap=maxPostsAttr!==null&&maxPostsAttr!==''&&!Number.isNaN(parseInt(maxPostsAttr,10)),maxPosts=hasMaxCap?parseInt(maxPostsAttr,10):0,categoryId=this.getAttribute('data-category'),includeIds=this.getAttribute('data-include-ids'),excludeIds=this.getAttribute('data-exclude-ids'),layout=this.getAttribute('data-layout'),remaining=hasMaxCap?Math.max(0,maxPosts-offset):postsPerPage,requestCount=hasMaxCap?Math.min(postsPerPage,remaining):postsPerPage;if(requestCount<=0){this.style.display='none';return}this.textContent=textLoading,this.disabled=!0;const formData=new FormData;formData.append('action','load_more_category_posts'),formData.append('offset',offset),formData.append('category_id',categoryId),formData.append('posts_per_page',requestCount),formData.append('nonce',ajax_object.nonce),includeIds&&formData.append('include_ids',includeIds),excludeIds&&formData.append('exclude_ids',excludeIds),layout&&formData.append('layout',layout),fetch(ajax_object.ajax_url,{method:'POST',body:formData}).then(response=>response.json()).then(data=>{if(data.success&&data.data.html){const nextOffset=offset+requestCount;container.insertAdjacentHTML('beforeend',data.data.html),this.setAttribute('data-offset',nextOffset),this.textContent=textDefault,this.disabled=!1,(!data.data.has_more||(hasMaxCap&&nextOffset>=maxPosts))&&(this.style.display='none')}else this.style.display='none'}).catch(error=>{console.error('Error:',error),this.textContent=textDefault,this.disabled=!1})})}}); 20 21})(jQuery)
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.