1/** 2 * FAQãã¼ã¸ï¼/before-contact/ï¼ã¢ã³ã¼ãã£ãªã³ 3 * - åè¨åãåå¥ã«ééï¼ä»ã®è¨åã¯éããªãï¼ 4 * - ééå¾ã« Lenis ã®ã¹ã¯ãã¼ã«ç¯å²ãåè¨ç® 5 * - ãã¼ã¸å ãªã³ã¯ã URL ã®ããã·ã¥ãè¨åãæãå ´åããã®è¨åãèªåã§éã 6 * â»ã¹ã¯ãã¼ã«å¦ç㯠nav-config.jsï¼ãã©ã¦ã¶æ¨æºã«ä»»ãããã®ãã¡ã¤ã«ã§ã¯è¡ããªã 7 */ 8(function () { 9 'use strict'; 10 11 function resetLenis() { 12 if (window.lenis && typeof window.lenis.resize === 'function') { 13 window.lenis.resize(); 14 } 15 } 16 17 function safeDecode(str) { 18 try { 19 return decodeURIComponent(str); 20 } catch (err) { 21 return str; 22 } 23 } 24 25 function setItemState(item, open) { 26 var header = item.querySelector('.faq_item_header'); 27 if (open) { 28 item.classList.add('active'); 29 } else { 30 item.classList.remove('active'); 31 } 32 if (header) { 33 header.setAttribute('aria-expanded', open ? 'true' : 'false'); 34 } 35 resetLenis(); 36 } 37 38 function openItemById(id) { 39 if (!id) return; 40 var target = document.getElementById(id); 41 if (target && target.classList.contains('faq_item') && !target.classList.contains('active')) { 42 setItemState(target, true); 43 } 44 } 45 46 function init() { 47 var page = document.querySelector('.faq_page'); 48 if (!page) return; 49 50 var items = page.querySelectorAll('.faq_item'); 51 items.forEach(function (item) { 52 var header = item.querySelector('.faq_item_header'); 53 var panel = item.querySelector('.faq_item_panel'); 54 if (!header) return; 55 56 header.addEventListener('click', function () { 57 setItemState(item, !item.classList.contains('active')); 58 }); 59 60 if (panel) { 61 panel.addEventListener('transitionend', function (e) { 62 if (e.propertyName === 'grid-template-rows') { 63 resetLenis(); 64 } 65 }); 66 } 67 }); 68 69 page.addEventListener('click', function (e) { 70 var link = e.target.closest('a[href^="#"]'); 71 if (!link) return; 72 openItemById(safeDecode(link.getAttribute('href').slice(1))); 73 }); 74 75 if (window.location.hash) { 76 openItemById(safeDecode(window.location.hash.slice(1))); 77 } 78 } 79 80 if (document.readyState === 'loading') { 81 document.addEventListener('DOMContentLoaded', init); 82 } else { 83 init(); 84 } 85})();
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.