1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function(Drupal,drupalSettings,once){const dataAttr='[data-dark-mode-switch]';const darkClass=drupalSettings.dark_mode_switch.dark_class;const parentElement=drupalSettings.dark_mode_switch.parent_element;Drupal.behaviors.dark_mode_switch={attach:function(context){if(context===document){const elements=once('dark_mode_switch',dataAttr,context);elements.forEach(processingCallback);document.querySelector(dataAttr).onchange=(event)=>{document.querySelector(parentElement).classList.toggle(darkClass);localStorage.theme=event.target.checked;};}}};function processingCallback(){let darkmodeState=window.matchMedia('(prefers-color-scheme: dark)').matches;if('theme' in localStorage)darkmodeState=(localStorage.theme!=='false');document.querySelector(parentElement).classList.toggle(darkClass,darkmodeState);document.querySelector(dataAttr).checked=darkmodeState;}})(Drupal,drupalSettings,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.