PageSourceSearch

https://beamosearch.com/JS/dist/theme.js?v=81ab57cf58ef

js beamosearch.com collected 2026-10-02 01:24:33 UTC 2,900 bytes, 4 lines download raw bytes

1/* AUTO-GENERATED by tools/build-js-bundles.mjs — do not edit by hand. */
2/* Entry: JS/bundle-entries/theme.ts */
3globalThis.Beamo = globalThis.Beamo || {};
4"use strict";(()=>{var T="beamo-theme",_=["light","dark","system"];function q(n,s=globalThis){if(n.__themeAttached)return n.theme;let c=document.documentElement,a="system",d=null;function k(){return s.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function u(e){return _.includes(e)?e:"system"}function A(){try{let e=s.localStorage?.getItem(T);return u(e)}catch{return"system"}}function b(e){return e==="dark"||e==="light"?e:k()}function h(e){let r=document.querySelector('meta[name="theme-color"]:not([media])')||document.getElementById("beamo-theme-color");r&&r.setAttribute("content",e==="dark"?"#0b1220":"#fafafa")}function f(e,r){document.querySelectorAll("[data-beamo-theme-toggle]").forEach(t=>{let o=e==="dark";t.setAttribute("aria-pressed",o?"true":"false");let p=o?"light":"dark",H=r==="system";t.setAttribute("aria-label",H?"Switch to ".concat(p," theme (currently following system)"):"Switch to ".concat(p," theme")),t.setAttribute("title",o?"Light mode":"Dark mode")})}function L(e){document.querySelectorAll("[data-beamo-logo]").forEach(r=>{let t=r.dataset.logoLight,o=r.dataset.logoDark;!t||!o||(r.src=e==="dark"?o:t)})}function g(){document.querySelectorAll("[data-beamo-theme-pref]").forEach(e=>{let t=e.getAttribute("data-beamo-theme-pref")===a;e.setAttribute("aria-checked",t?"true":"false"),e.classList.toggle("is-active",t)})}function l(e,{persist:r=!1}={}){a=u(e);let t=b(a);if(c.setAttribute("data-theme",t),c.setAttribute("data-theme-preference",a),c.style.colorScheme=t,h(t),r)try{s.localStorage?.setItem(T,a)}catch{}f(t,a),L(t),g()}function S(){return a}function m(){return c.getAttribute("data-theme")==="dark"?"dark":"light"}function i(e){l(e,{persist:!0}),s.Beamo?.accounts?.schedulePushWithChat?.()}function E(){i(m()==="dark"?"light":"dark")}function M(){document.querySelectorAll("[data-beamo-theme-toggle]").forEach(e=>{e.dataset.beamoThemeBound!=="true"&&(e.dataset.beamoThemeBound="true",e.addEventListener("click",()=>{E()}))})}function P(){document.querySelectorAll("[data-beamo-theme-pref]").forEach(e=>{e.dataset.beamoThemePrefBound!=="true"&&(e.dataset.beamoThemePrefBound="true",e.addEventListener("click",r=>{r?.stopPropagation?.();let t=e.getAttribute("data-beamo-theme-pref");t&&i(t)}))}),g()}function B(){d=s.matchMedia("(prefers-color-scheme: dark)"),d.addEventListener("change",()=>{a==="system"&&l("system",{persist:!1})})}function y(){M(),P(),f(m(),a),h(m())}return l(A(),{persist:!1}),B(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y(),n.__themeAttached=!0,n.theme={getTheme:m,getPreference:S,setPreference:i,setTheme:i,toggleTheme:E},n.theme}if(typeof document<"u"){let n=globalThis.Beamo||(globalThis.Beamo={});q(n,globalThis)}})();

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.