PageSourceSearch

https://lonelyplanet.es/sites/default/files/js/js_dsSrTsGVNc4BzxZ0…KPbSYXzuPW9NFRHLVbkLdz-5Y6g8xp-yVco_AHLSnAh

js lonelyplanet.es collected 2026-09-24 17:39:27 UTC 24,713 bytes, 23 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2(function($,Drupal){Drupal.behaviors.contentBehaviors={attached:false,attach:function(context,settings){if(!this.attached)this.attached=true;}};})(jQuery,Drupal);;
3(function($,Drupal){Drupal.behaviors.dropdownBehaviors={attached:false,attach:function(context,settings){if(!this.attached){const $dropdown=$('.dropdown');const $dropdownBtn=$('.dropdown button');const $dropdownContent=$('.dropdown-content');$dropdownBtn.on('click',()=>{if($dropdownContent.hasClass('hidden'))$dropdownContent.removeClass('hidden');else $dropdownContent.addClass('hidden');});$(document).on('click',(e)=>{if(!$dropdown.is(e.target)&&$dropdown.has(e.target).length===0)$dropdownContent.addClass('hidden');});this.attached=true;}}};})(jQuery,Drupal);;
4function isMobile(){return window.innerWidth<768;}function toggleMenuOnMobile(){if(isMobile())this.openFooterNav=!this.openFooterNav;};
5(function($,Drupal,once){Drupal.behaviors.swiperBehaviors={attach:function(context,settings){$(once('swiperCarousel','.swiper-carousel',context)).each(function(){let $nextEl=$(this).closest('.carousel-wrapper').find('.swiper-button-next');let $prevEl=$(this).closest('.carousel-wrapper').find('.swiper-button-prev');const swiper=new Swiper(this,{direction:'horizontal',loop:false,slidesPerView:4,slidesPerGroup:4,spaceBetween:32,navigation:{nextEl:$nextEl,prevEl:$prevEl},breakpoints:{576:{slidesPerView:1.15,slidesPerGroup:1,spaceBetween:15},1024:{slidesPerView:2.15,slidesPerGroup:2,spaceBetween:15},1280:{slidesPerView:3,slidesPerGroup:3,spaceBetween:25}}});});$(once('swiperCarouselEssentials','.swiper-carousel-essentials',context)).each(function(){let $nextEl=$(this).closest('.carousel-wrapper').find('.swiper-button-next');let $prevEl=$(this).closest('.carousel-wrapper').find('.swiper-button-prev');const swiper=new Swiper(this,{direction:'horizontal',loop:false,slidesPerView:3,slidesPerGroup:3,spaceBetween:32,navigation:{nextEl:$nextEl,prevEl:$prevEl},breakpoints:{576:{slidesPerView:1.15,slidesPerGroup:1,spaceBetween:15},1024:{slidesPerView:2.15,slidesPerGroup:2,spaceBetween:15},1280:{slidesPerView:3,slidesPerGroup:3,spaceBetween:25}}});});$(once('swiperCarouselNeighborhoods','.swiper-carousel-neighborhoods',context)).each(function(){let $nextEl=$(this).closest('.carousel-wrapper').find('.swiper-button-next');let $prevEl=$(this).closest('.carousel-wrapper').find('.swiper-button-prev');const swiper=new Swiper(this,{direction:'horizontal',loop:false,slidesPerView:4,slidesPerGroup:4,spaceBetween:32,navigation:{nextEl:$nextEl,prevEl:$prevEl},breakpoints:{480:{slidesPerView:1.25,slidesPerGroup:1,spaceBetween:15},576:{slidesPerView:1.45,slidesPerGroup:1,spaceBetween:15},1024:{slidesPerView:2.35,slidesPerGroup:2,spaceBetween:15},1280:{slidesPerView:3,slidesPerGroup:3,spaceBetween:25}}});});}};})(jQuery,Drupal,once);;
6(function($,Drupal){Drupal.behaviors.drawer={attached:false,buildDrawerNav:function(){var active_href=$('[data-drawer].drawer-active').attr('href');$('a[data-drawer]').each(function(){var $nav_item=$('<li class="nav-item"><button class="drawer-nav-btn flex px-4 pb-2 border-b-2" data-drawer-content="'+$(this).attr('href')+'">'+$(this).text()+'</button></li>');if($(this).attr('href')===active_href)$nav_item.find('button').addClass('active border-b-2 border-primary font-bold');$('#drawer-nav').append($nav_item);});},attach:function(context,settings){if(!this.attached){$('#right-drawer-toggle').on('change',function(e){$('body').toggleClass('overflow-hidden');$('body').toggleClass('pr-4');$('body').toggleClass('drawer-open');if(!$('body').hasClass('drawer-open')){$('#drawer-title').html('');$('#drawer-content').html('');$('#drawer-nav').html('');$('a[data-drawer]').removeClass('drawer-active');}});$('body').on('click','.drawer-nav-btn',function(e){var url=$(this).attr('data-drawer-content');$('.drawer-nav-btn').removeClass('active border-transparent border-primary font-bold');$(this).addClass('active border-primary font-bold px-4 pb-2');$.ajax({url:url+'?_format=json',type:'GET',dataType:'json',success:function(data){$('#drawer-title').html(data[0].label);$('#drawer-content').html(data[0].description);}});});$('[data-drawer]',context).each(function(){$link=$(this);$link.on('click',function(e){e.preventDefault();var url=$(this).attr('href');
6$link.removeClass('drawer-active');$(this).addClass('drawer-active');$('#right-drawer-toggle').trigger('click');$.ajax({url:url+'?_format=json',type:'GET',dataType:'json',success:function(data){$('#drawer-title').html(data[0].label);$('#drawer-content').html(data[0].description);Drupal.behaviors.drawer.buildDrawerNav();}});});});var isDragging=false;var startX;var scrollLeft;$("#drawer-nav").on("mousedown touchstart",function(e){if(e.cancelable)e.preventDefault();isDragging=true;startX=e.pageX||e.originalEvent.touches[0].pageX;scrollLeft=$(this).scrollLeft();});$(document).on("mouseup touchend",function(){isDragging=false;});$("#drawer-nav").on("mousemove touchmove",function(e){if(isDragging){var x=e.pageX||e.originalEvent.touches[0].pageX;var walk=(x-startX)*1.5;$(this).scrollLeft(scrollLeft-walk);}});this.attached=true;}}};}(jQuery,Drupal));;
7(function($,Drupal,once){Drupal.behaviors.ajaxCompleteHandler={attach:function(context,settings){once('ajaxCompleteHandler','body').forEach(function(){$(document).ajaxComplete(function(event,xhr,settings){if(settings.url.indexOf('/views/ajax')!==-1&&xhr.responseText.indexOf('views-view--photo-of-the-day')!==-1){if($('.js-pager__next.js-pager__disabled').length)$('.header-pager__next').addClass('invisible');else $('.header-pager__next').removeClass('invisible');if($('.js-pager__previous.js-pager__disabled').length)$('.header-pager__previous').addClass('invisible');else $('.header-pager__previous').removeClass('invisible');}});});}};Drupal.behaviors.contentBehaviors={attached:false,attach:function(context,settings){if(!this.attached){const $intro=$('#intro',context);const $hiddenElements=$intro.find(':header:not(h2:first), p:not(:first)');const that=this;if($hiddenElements.length>0){const $readMoreLink=$('<a href="#" class="block read-more text-md uppercase font-bold mt-4">'+Drupal.t('Read more')+'</a>');$readMoreLink.click(function(event){event.preventDefault();$hiddenElements.toggle();$(this).text($hiddenElements.is(':visible')?Drupal.t('Read less'):Drupal.t('Read more'));});$hiddenElements.hide();$intro.find('h2:first, p:first').show();$intro.append($readMoreLink);}$('[data-bg]').each(function(){var bgImage=$(this).attr('data-bg');$(this).css('background-image','url('+bgImage+')');});$(document).on('click','.header-pager__previous',function(){$('.js-pager__previous').trigger('click');});$(document).on('click','.header-pager__next',function(){$('.js-pager__next').trigger('click');});$(document).ajaxComplete(function(event,xhr,settings){that.initFullscreenImageHandler();});this.initFullscreenImageHandler();this.attached=true;}},initFullscreenImageHandler:function(){const images=document.querySelectorAll('img[data-fullscreen="click"]');if(images.length===0)return;const overlay=document.createElement('div');overlay.className='fullscreen-overlay';const closeBtn=document.createElement('span');closeBtn.className='fullscreen-close';closeBtn.innerHTML='&times;';const overlayImage=document.createElement('img');overlayImage.className='fullscreen-image';overlay.appendChild(closeBtn);overlay.appendChild(overlayImage);document.body.appendChild(overlay);images.forEach((image)=>{if(image.classList.contains('fullscreen-handler-processed'))return false;image.addEventListener('click',()=>{overlayImage.src=image.src;overlay.classList.add('show');document.body.classList.add('no-scroll');});image.classList.add('fullscreen-handler-processed');});closeBtn.addEventListener('click',()=>{overlay.classList.remove('show');overlayImage.src='';document.body.classList.remove('no-scroll');});overlay.addEventListener('click',(e)=>{if(e.target===overlay){overlay.classList.remove('show');overlayImage.src='';document.body.classList.remove('no-scroll');}});}};})(jQuery,Drupal,once);;
8(function($,Drupal){Drupal.behaviors.bookmarkBehaviors={attached:false,attach:function(context,settings){if(!this.attached){function bookmarkPage(){if(window.sidebar&&window.sidebar.addPanel)window.sidebar.addPanel(document.title,window.location.href,'');else if(window.external&&('AddFavorite' in window.external))window.external.AddFavorite(window.location.href,document.title);else if(window.opera&&window.print){var bookmarkLink=document.createElement('a');bookmarkLink.setAttribute('href',window.location.href);bookmarkLink.setAttribute('title',document.title);bookmarkLink.setAttribute('rel','sidebar');bookmarkLink.click();}else alert("Your browser doesn't support this feature. Please use your browser's bookmarking option.");}this.attached=true;}}};})(jQuery,Drupal);;
9(function($,Drupal,window){Drupal.behaviors.guide={attached:false,attach:function(context,settings){if(this.attached)return;const navblock=$('.guides-navigation');const navlinks=navblock.find('a');const activePath=window.location.pathname;navlinks.each(function(){if($(this).attr('href')===activePath)$(this).addClass('active');});this.attached=true;}};})(jQuery,Drupal,this);;
10(function(Drupal,once){Drupal.behaviors.lpMegamenu={attached:false,attach:function(context,settings){if(this.attached)return false;function initializeDesktopMenu(){const megamenuListItems=once('lpMegamenuItems','.megamenu-item',context);const megamenuDetailsDepartments=document.querySelectorAll('.megamenu-details-department');const moreInLink=document.querySelector('.see-all-destinations-link');const moreInLinkText=document.querySelector('.see-all-destinations-text');const lonelyplanetMenuTitle=document.getElementById('lonelyplanetmenu-title');const megamenuContainer=document.getElementById('megamenu-container');const destinationNavigation=document.querySelector('.destination-navigation');const menuToggles=document.querySelectorAll('.menu-toggle');let isMenuOpen=false;let itemsPerPage=12;function updateItemsPerPage(){const screenWidth=window.innerWidth;if(screenWidth>=1024&&screenWidth<1536)itemsPerPage=12;else if(screenWidth>=1536)itemsPerPage=24;else itemsPerPage=12;initializePagination();}function paginateItems(container,items,pagerClass){const pagerControls=container.querySelector(pagerClass);const prevButton=pagerControls.querySelector('.pager-prev');const nextButton=pagerControls.querySelector('.pager-next');let currentPage=0;function updateButtonStates(){prevButton.disabled=(currentPage===0);nextButton.disabled=((currentPage+1)*itemsPerPage>=items.length);prevButton.style.opacity=prevButton.disabled?'0.5':'1';nextButton.style.opacity=nextButton.disabled?'0.5':'1';}function showPage(page){const start=page*itemsPerPage;const end=start+itemsPerPage;const midPoint=start+Math.ceil((end-start)/2);
10items.forEach((item,index)=>{item.classList.remove('hidden','second-half');if(index>=start&&index<end){if(index>=midPoint)item.classList.add('second-half');}else item.classList.add('hidden');});pagerControls.classList.toggle('hidden',items.length<=itemsPerPage);updateButtonStates();}prevButton.addEventListener('click',(e)=>{e.stopPropagation();if(currentPage>0){currentPage-=1;showPage(currentPage);}});nextButton.addEventListener('click',(e)=>{e.stopPropagation();if((currentPage+1)*itemsPerPage<items.length){currentPage+=1;showPage(currentPage);}});showPage(currentPage);}function updateMoreLinkTextAndUrl(item){const continentName=item.querySelector('span').textContent;const continentUrl=item.querySelector('a').getAttribute('href');moreInLinkText.textContent=`${Drupal.t('More in')} ${continentName}`;moreInLink.setAttribute('href',continentUrl);}function initializePagination(){megamenuDetailsDepartments.forEach((department)=>{const countryItems=department.querySelectorAll('.country-item');const cityItems=department.querySelectorAll('.city-item');
10if(countryItems.length>0)paginateItems(department,countryItems,'.countries-pager-controls');if(cityItems.length>0)paginateItems(department,cityItems,'.cities-pager-controls');});}megamenuListItems.forEach((item)=>{item.addEventListener('click',function(e){e.preventDefault();megamenuListItems.forEach((el)=>el.classList.remove('active'));item.classList.add('active');megamenuDetailsDepartments.forEach((detail)=>{detail.classList.add('hidden');});const parentId=item.dataset.id;const department=document.querySelector(`.megamenu-details-department[data-parent-id="${parentId}"]`);if(department){department.classList.remove('hidden');updateMoreLinkTextAndUrl(item);updateItemsPerPage();const countryItems=department.querySelectorAll('.country-item');const cityItems=department.querySelectorAll('.city-item');if(countryItems.length>0)paginateItems(department,countryItems,'.countries-pager-controls');if(cityItems.length>0)paginateItems(department,cityItems,'.cities-pager-controls');}e.stopPropagation();});});function showMenu(){megamenuContainer.classList.remove('hidden');megamenuContainer.style.opacity='0';setTimeout(()=>{megamenuContainer.style.opacity='1';updateMoreLinkTextAndUrl(megamenuListItems[0]);},10);isMenuOpen=true;}function hideMenu(){megamenuContainer.style.opacity='0';setTimeout(()=>{megamenuContainer.classList.add('hidden');},10);isMenuOpen=false;}document.addEventListener('click',function(event){if(isMenuOpen&&!destinationNavigation.contains(event.target)&&!megamenuContainer.contains(event.target))hideMenu();});lonelyplanetMenuTitle.addEventListener('click',function(e){e.stopPropagation();if(isMenuOpen)hideMenu();else showMenu();});if(menuToggles.length)menuToggles.forEach(function(menuToggle){menuToggle.addEventListener('click',function(){hideMenu();});});moreInLink.addEventListener('click',function(e){e.stopPropagation();});document.querySelector('.link-destinations').addEventListener('click',function(e){e.stopPropagation();hideMenu();});megamenuContainer.addEventListener('click',function(e){e.stopPropagation();});updateItemsPerPage();window.addEventListener('resize',updateItemsPerPage);}function initializeMobileMenu(){const megamenuContainer=document.querySelector('.drawer-side #megamenu-container');const mobileMegamenuToggle=document.querySelector('.drawer-side .mobile-megamenu-toggle');const continentWrapper=document.querySelector('.drawer-side .megamenu-list-container');const megamenu=document.querySelector('.drawer-side .megamenu');const drawerSideLogo=document.querySelector('.drawer-side-header__logo');const continentLinks=document.querySelectorAll('.drawer-side .megamenu-list-container .megamenu-item');const megamenuDetails=document.querySelector('.drawer-side .megamenu-details');const allDepartments=document.querySelectorAll('.drawer-side .megamenu-details-department');const megamenuTitle=document.querySelector('.drawer-side #lonelyplanetmenu-title');let currentLevel='top';function updateDrawerLogo(text){drawerSideLogo.innerHTML=`
11            <svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1 mr-2">
12              <polyline points="15 18 9 12 15 6"></polyline>
13            </svg> ${text}`;}function updateSeeAllDestinations(continentName,continentUrl){const seeAllDestinationsLink=document.querySelector('.drawer-side .see-all-destinations-link');const seeAllDestinationsText=document.querySelector('.drawer-side .see-all-destinations-text');if(seeAllDestinationsLink&&seeAllDestinationsText){seeAllDestinationsText.textContent=`${Drupal.t('More in')} ${continentName}`;seeAllDestinationsLink.setAttribute('href',continentUrl);}}function showContinents(){megamenuContainer.classList.remove('hidden','opacity-0');megamenu.classList.remove('hidden');continentWrapper.classList.remove('hidden');continentWrapper.style.opacity='0';setTimeout(()=>{continentWrapper.style.transition='opacity 0.2s ease';continentWrapper.style.opacity='1';},10);updateDrawerLogo(megamenuTitle.textContent.trim());currentLevel='continent';}function showCountriesAndCities(continentId,continentLinkItem){setTimeout(()=>{megamenuDetails.classList.remove('hidden');const department=document.querySelector(`.drawer-side .megamenu-details-department[data-parent-id="${continentId}"]`);
13if(department){allDepartments.forEach((dep)=>dep.classList.add('hidden'));department.style.opacity='0';department.classList.remove('hidden');const megamenuColumns=department.querySelectorAll('.megamenu-column');megamenuColumns.forEach((column)=>column.classList.remove('hidden'));setTimeout(()=>{department.style.transition='opacity 0.2s ease';department.style.opacity='1';},10);const continentName=continentLinkItem.querySelector('span').textContent.trim();const continentUrl=continentLinkItem.querySelector('a').getAttribute('href').trim();updateDrawerLogo(continentName);updateSeeAllDestinations(continentName,continentUrl);currentLevel='country';}},10);}function returnToTopLevel(){const activeDepartment=document.querySelector('.drawer-side .megamenu-details-department:not(.hidden)');if(activeDepartment){activeDepartment.style.opacity='0';setTimeout(()=>{activeDepartment.classList.add('hidden');megamenuDetails.classList.add('hidden');},10);}setTimeout(()=>{continentWrapper.classList.remove('hidden');continentWrapper.style.opacity='0';setTimeout(()=>{continentWrapper.style.transition='opacity 0.2s ease';continentWrapper.style.opacity='1';},10);updateDrawerLogo('Destinations');currentLevel='continent';},10);}function resetMenuToTop(){currentLevel='top';megamenuContainer.classList.add('hidden','opacity-0');continentWrapper.classList.add('hidden');megamenu.classList.add('hidden');}function goBackOneLevel(){if(currentLevel==='country')returnToTopLevel();else{if(currentLevel==='continent'){drawerSideLogo.innerHTML=`
14              <svg xmlns="http://www.w3.org/2000/svg" width="2em" height="25" class="text-primary" viewBox="0 0 40 40" fill="currentColor" aria-hidden="true">
15                <g clip-path="url(#clip0_1583_247)">
16                  <path d="M20 0C8.95431 0 0 8.9543 0 20C0 31.0457 8.95431 40 20 40C31.0457 40 40 31.0457 40 20C40 8.95429 31.0457 0 20 0ZM20.8531 38.2909C19.4356 38.3526 18.0157 38.2508 16.6215 37.9875C16.5874 37.9809 16.5567 37.9627 16.5346 37.9359C16.5125 37.9092 16.5003 37.8757 16.5001 37.841C16.4999 37.8063 16.5118 37.7726 16.5337 37.7457C16.5555 37.7188 16.5861 37.7003 16.6201 37.6933C17.7973 37.4575 20.0977 36.8584 21.871 35.5429C23.5595 34.2903 24.8683 32.2572 23.8947 29.775C21.6183 23.9715 14.8179 25.3858 13.7959 25.6347C13.781 25.6384 13.7654 25.6385 13.7504 25.635C13.7354 25.6315 13.7214 25.6245 13.7096 25.6147C13.6978 25.6048 13.6885 25.5923 13.6825 25.5781C13.6764 25.564 13.6737 25.5486 13.6747 25.5333L13.9238 21.3194C14.3736 17.3993 13.5382 15.9855 13.5382 15.9855C11.5247 11.9798 7.06908 12.8367 7.06908 12.8367C6.32041 12.9666 5.60989 13.261 4.98868 13.6985C3.57982 14.7252 2.57721 16.2149 2.15658 17.9066C2.14791 17.9423 2.12631 17.9735 2.09595 17.9942C2.06559 18.0149 2.02864 18.0236 1.99224 18.0186C1.95584 18.0137 1.92258 17.9953 1.8989 17.9673C1.87521 17.9392 1.86279 17.9033 1.86403 17.8666C1.92949 16.8162 2.13 15.7786 2.46062 14.7795C3.77022 10.3568 6.6966 6.58923 10.6577 4.22606C14.6187 1.8629 19.3242 1.07735 23.8381 2.02569C23.8793 2.03413 23.9165 2.05626 23.9436 2.08849C23.9707 2.12072 23.9861 2.16116 23.9873 2.20323C23.9885 2.24531 23.9754 2.28656 23.9502 2.32029C23.925 2.35402 23.8892 2.37825 23.8485 2.38904C22.7718 2.66486 21.7821 3.20809 20.9713 3.96835C20.9713 3.96835 19.2834 5.28118 19.0848 8.56094C19.0373 9.43151 19.1017 10.3046 19.2764 11.1587L20.953 19.6124C21.1817 20.8159 21.861 21.8868 22.8524 22.6065C23.6394 23.1934 24.6259 23.4467 25.5982 23.3115C25.5982 23.3115 29.3041 23.1402 28.7043 19.4558L28.2518 17.2525C28.2467 17.2278 28.2466 17.2023 28.2516 17.1776C28.2565 17.1529 28.2665 17.1294 28.2808 17.1087C28.2951 17.0879 28.3135 17.0703 28.3348 17.0568C28.3561 17.0434 28.3799 17.0344 28.4048 17.0304C29.448 16.8637 34.3699 15.7435 34.6394 9.42477C34.6408 9.3857 34.6544 9.34804 34.6782 9.31707C34.7021 9.28609 34.735 9.26335 34.7724 9.25202C34.8099 9.24068 34.8499 9.24133 34.8869 9.25386C34.9239 9.2664 34.9561 9.29019 34.979 9.32192C36.8953 12.0086 38.0511 15.1626 38.3245 18.4514C38.5979 21.7401 37.9787 25.0417 36.5323 28.0079C35.0859 30.9741 32.8659 33.4951 30.1064 35.3049C27.3468 37.1147 24.15 38.1463 20.8531 38.2908V38.2909Z"></path>
17                    </g>
18                  </svg>
19                `;resetMenuToTop();}}}if(mobileMegamenuToggle)mobileMegamenuToggle.addEventListener('click',function(){if(currentLevel==='top')showContinents();});continentLinks.forEach((link)=>{link.addEventListener('click',function(e){let menuLink=e.target.closest('li.megamenu-item');
19if(!menuLink.classList.contains('megamenu-item-last')){e.preventDefault();let continentId=this.dataset.id;let continentLinkItem=this;updateDrawerLogo(continentLinkItem.querySelector('span').textContent.trim());showCountriesAndCities(continentId,continentLinkItem);}});});drawerSideLogo.addEventListener('click',goBackOneLevel);}function loadMenuFunctionality(){if(window.innerWidth>=1024)initializeDesktopMenu();else initializeMobileMenu();}loadMenuFunctionality();window.addEventListener('resize',function(){loadMenuFunctionality();});this.attached=true;}};})(Drupal,once);;
20(function(Drupal,once){Drupal.behaviors.primaryMenuToggle={attach:function(context,settings){const isMobileView=()=>window.innerWidth<1024;const drawerSideLogo=document.querySelector('.drawer-side-header__logo');const originalLogoHTML=drawerSideLogo?drawerSideLogo.innerHTML:'';const lonelyPlanetMenuTitle=document.getElementById('lonelyplanetmenu-title');const body=document.body;const drawerButton=document.querySelector('.drawer-button');const mobileToggle=document.querySelector('#mobile-toggle');let currentMenu='none';function updateDrawerLogo(text){if(drawerSideLogo&&currentMenu==='primary')drawerSideLogo.innerHTML=`
21            <svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1 mr-2">
22              <polyline points="15 18 9 12 15 6"></polyline>
23            </svg> ${text}`;}function handleDrawerToggleClick(){once('drawerToggleNoScroll','.drawer-toggle',context).forEach(function(drawerToggle){drawerToggle.addEventListener('click',function(){if(isMobileView())body.classList.add('no-scroll');});});}function resetDrawerLogo(){if(drawerSideLogo&&currentMenu==='primary')drawerSideLogo.innerHTML=originalLogoHTML;}function closeAllPrimaryMenus(){document.querySelectorAll('.primary-menu .menu-content').forEach(function(menuContent){if(!menuContent.classList.contains('hidden'))menuContent.classList.add('hidden');});}function togglePrimaryMenu(menuContent,menuTitle){currentMenu='primary';if(menuContent.classList.contains('hidden')){menuContent.classList.remove('hidden');setTimeout(()=>{menuContent.classList.remove('opacity-0');menuContent.classList.add('opacity-100');},10);if(isMobileView()){updateDrawerLogo(menuTitle);body.classList.add('no-scroll');}}else{menuContent.classList.add('hidden');if(isMobileView())resetDrawerLogo();}}function handlePrimaryMenuToggle(){once('primaryMenuToggle','.menu-toggle',context).forEach(function(menuToggle){menuToggle.addEventListener('click',function(event){event.stopPropagation();const menuContainer=menuToggle.closest('.primary-menu');const menuContent=menuContainer.querySelector('.menu-content');const menuTitle=menuToggle.textContent.trim();closeAllPrimaryMenus();togglePrimaryMenu(menuContent,menuTitle);});});}function handleDrawerLogoClick(){if(drawerSideLogo)drawerSideLogo.addEventListener('click',function(){if(isMobileView()){resetDrawerLogo();closeAllPrimaryMenus();currentMenu='none';}});}function handleOutsideClick(){document.addEventListener('click',function(event){if(!event.target.closest('.primary-menu')){closeAllPrimaryMenus();if(isMobileView())resetDrawerLogo();}});}function handleDrawerCloseButtonClick(){once('drawerCloseButton','.drawer-side-header__close-menu',context).forEach(function(closeButton){closeButton.addEventListener('click',function(){if(mobileToggle){mobileToggle.checked=false;mobileToggle.dispatchEvent(new Event('change'));}body.classList.remove('no-scroll');});});}function handleLonelyPlanetMenuTitleClick(){if(lonelyPlanetMenuTitle)lonelyPlanetMenuTitle.addEventListener('click',function(event){event.stopPropagation();closeAllPrimaryMenus();if(isMobileView())resetDrawerLogo();});}handlePrimaryMenuToggle();handleDrawerLogoClick();handleOutsideClick();handleDrawerCloseButtonClick();handleLonelyPlanetMenuTitleClick();handleDrawerToggleClick();}};})(Drupal,once);;

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.