nction(e) {
        if (!switcher.contains(e.target) && !options.contains(e.target)) {
          switcher.dataset.state = 'closed';
          options.classList.add('hx:hidden');
          if (chevron) chevron.style.transform = 'rotate(0deg)';
        }
      });
    }
  })();
  </script>
{{- end -}}