1(()=>{ 2 'use strict'; 3 const body=document.body; 4 const theme=body?.dataset.ambientTheme||''; 5 if(!theme||window.matchMedia('(prefers-reduced-motion: reduce)').matches)return; 6 7 const mobile=window.matchMedia('(max-width: 780px)').matches; 8 const count=mobile?(theme==='hub'?8:12):(theme==='kingshot'?34:28); 9 const palettes={ 10 hub:['#64e3ff','#7d9dff','#b27cff','#ff9c58','#bff8ff'], 11 kingshot:['#ffb24f','#ff7a2f','#ffd887','#f29a38','#fff0bf'] 12 }; 13 const palette=palettes[theme]||palettes.hub; 14 const layer=document.createElement('div'); 15 layer.className='ambient-motion-layer ambient-motion-'+theme; 16 layer.setAttribute('aria-hidden','true'); 17 18 const fragment=document.createDocumentFragment(); 19 for(let index=0;index<count;index+=1){ 20 const particle=document.createElement('i'); 21 particle.className='ambient-motion-particle'; 22 const size=theme==='kingshot'?(2+Math.random()*5):(2+Math.random()*3.6); 23 const duration=(theme==='kingshot'?10:12)+Math.random()*12; 24 particle.style.setProperty('--particle-x',(Math.random()*100).toFixed(2)+'%'); 25 particle.style.setProperty('--particle-size',size.toFixed(2)+'px'); 26 particle.style.setProperty('--particle-color',palette[index%palette.length]); 27 particle.style.setProperty('--particle-opacity',(0.32+Math.random()*0.55).toFixed(2)); 28 particle.style.setProperty('--particle-duration',duration.toFixed(2)+'s'); 29 particle.style.setProperty('--particle-delay',(-Math.random()*duration).toFixed(2)+'s'); 30 particle.style.setProperty('--particle-twinkle',(2.2+Math.random()*3.6).toFixed(2)+'s'); 31 particle.style.setProperty('--particle-twinkle-delay',(-Math.random()*4).toFixed(2)+'s'); 32 particle.style.setProperty('--particle-drift',(-65+Math.random()*130).toFixed(1)+'px'); 33 particle.style.setProperty('--particle-spin',(180+Math.random()*540).toFixed(0)+'deg'); 34 fragment.appendChild(particle); 35 } 36 layer.appendChild(fragment); 37 body.prepend(layer); 38 39 const updateVisibility=()=>layer.classList.toggle('is-paused',document.hidden); 40 document.addEventListener('visibilitychange',updateVisibility,{passive:true}); 41 updateVisibility(); 42})();
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.