PageSourceSearch

https://noteworthy.app/assets/built/chunks/appearance-B3bJQene.js

js noteworthy.app collected 2026-10-04 08:04:37 UTC 4,648 bytes, 1 lines download raw bytes

1import{N as g,S,a as E,d as A}from"./controller-DbdMgBfR.js";const N={primary:"#222ae2",secondary:"#92298f",tertiary:"#B497CF",background:"#070707"},B={Aurora:{primary:"#3cc1e7",secondary:"#af4bf2",tertiary:"#b83366",background:"#050a13"},Balatro:{primary:"#191727",secondary:"#232c35"},"Color Bends":{primary:"#ffffff",secondary:"#ffffff",background:"#000000"},"Dark Veil":{primary:"#626b76",background:"#000000"},Ferrofluid:{primary:"#63544e",secondary:"#63544e"},"Gradient Blinds":{primary:"#4b6196",secondary:"#4f6063"},Haze:{primary:"#c6abf2",secondary:"#7dd4d8"},Iridescence:{primary:"#dcdcdc"},"Light Rays":{primary:"#ffffff"},Lightning:{primary:"#6084cc"},"Line Waves":{primary:"#5f5b7c",secondary:"#7b8adc"},"Liquid Chrome":{primary:"#271f39"},"Liquid Ether":{primary:"#99528c",tertiary:"#edf3fc"},Nebula:{primary:"#5c5399"},Plasma:{primary:"#7d7d7d"},"Plasma Wave":{primary:"#474e53",secondary:"#454356"},"Prismatic Burst":{primary:"#23259b",secondary:"#432470",tertiary:"#94859e"},"Side Rays":{primary:"#fbfbff",secondary:"#f1ddbb"},Silk:{primary:"#373745"},"Soft Aurora":{primary:"#ab5cbf",secondary:"#e5e8b1"},Spectrum:{background:"#74779c"},Void:{primary:"#8d2c96",secondary:"#ffffff"}},h={primary:"--shader-color-primary",secondary:"--shader-color-secondary",tertiary:"--shader-color-tertiary",background:"--shader-color-background"},v=Object.keys(h);function O(r,e={}){const a=B[r]||{},t={};for(const s of v)t[s]=e[s]||a[s]||N[s];return t}function P(r){if(!r)return;const e=document.documentElement;for(const[a,t]of Object.entries(h)){const s=r[a];s&&e.style.setProperty(t,s)}}function p(r){return O(r)}const c="Shader",f="Image";function d(r,e=1){r&&(r.style.opacity=String(e),r.style.transform="scale(1)")}function C(r){if(!r)return"";const e=r.trim(),a=e.match(/^url\((['"]?)(.+)\1\)$/i);return a?a[2]:e}function _(){const{body:r}=document;let e=document.querySelector(".site-background-shader"),a=document.querySelector(".site-background-shader-noise"),t=document.querySelector(".site-background-image");return e||(e=document.createElement("canvas"),e.className="site-background-shader",e.setAttribute("aria-hidden","true"),r.prepend(e)),a||(a=document.createElement("canvas"),a.className="site-background-shader-noise",a.setAttribute("aria-hidden","true"),e.after(a)),t||(t=document.createElement("div"),t.className="site-background-image",t.setAttribute("aria-hidden","true"),a.after(t)),{shader:e,noise:a,image:t}}function q(r){const e=document.createElement("canvas");return e.className="site-background-shader",e.setAttribute("aria-hidden","true"),e.dataset.shaderLabel=r.dataset.shaderLabel||"Light Pillar",e.dataset.shaderNoise=r.dataset.shaderNoise||"Off",r.replaceWith(e),e}function w(r){const e=document.createElement("canvas");return e.className="site-background-shader-noise",e.setAttribute("aria-hidden","true"),r.replaceWith(e),e}function D(){return{styles:[c,f],shaderLabels:[...S],noiseLabels:[...g]}}function u(){const{body:r}=document,e=document.querySelector(".site-background-shader"),a=getComputedStyle(document.documentElement),t=C(a.getPropertyValue("--site-background-image"));let s=c;return r.classList.contains("site-background--image")?s=f:r.classList.contains("site-background--shader")&&(s=c),{style:s,shaderLabel:e?.dataset.shaderLabel||"Light Pillar",noise:e?.dataset.shaderNoise||"Off",imageUrl:t}}async function R(r={}){const e=u(),a=r.style??e.style,t=r.shaderLabel??e.shaderLabel,s=r.noise??e.noise,i=r.imageUrl??e.imageUrl;if(a===c&&!E[t])throw new Error(`Unknown shader preset: ${t}`);if(s&&!g.includes(s))throw new Error(`Unknown noise level: ${s}`);(r.colors||r.shaderLabel!==void 0)&&P(r.colors?{...p(t),...r.colors}:p(t)),A();const{body:l}=document;let{shader:o,noise:m,image:b}=_();if(o=q(o),m=w(m),o.dataset.shaderLabel=t,o.dataset.shaderNoise=s||"Off",i){const n=i.startsWith("url(")?i:`url('${i}')`;document.documentElement.style.setProperty("--site-background-image",n)}if(l.classList.remove("site-background--shader","site-background--image"),a===f)return l.classList.add("site-background--image"),d(b,1),o.style.opacity="0",m.style.opacity="0",u();l.classList.add("site-background--shader"),d(o,1),b.style.opacity="0";
1const{resetShaderBackground:k,init:L}=await import("./shader-background-BFJV5GY3.js").then(function(n){return n.s});k(),await L(),d(document.querySelector(".site-background-shader"),1);const y=document.querySelector(".site-background-shader-noise");if(y){const n=Number.parseFloat(getComputedStyle(y).getPropertyValue("--shader-noise-opacity"));d(y,Number.isFinite(n)?n:0)}return u()}export{D as getBackgroundOptions,u as getBackgroundState,R as setBackground};

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.