child.style.display = 'block'); } else { $el.querySelectorAll(`[data-parent='${path}']`).forEach(child => child.style.display = 'none'); $el.querySelectorAll(`[data-parent^='${path}/']`).forEach(child => child.style.display = 'none'); $el.querySelectorAll(`[data-parent^='${path}/'][data-is-folder='true']`).forEach(folder => { const folder_path = folder.dataset.path; expanded[folder_path] = false; const fi = folder.querySelector('.folder-icon'); if (fi) fi.textContent = '▶'; }); } }">