(()=>{
const rng=seed=>()=>{seed=(seed*1664525+1013904223)>>>0;return seed/4294967296};
const jit=rng(77);
const jitter=()=>`translate(0 ${((jit()-.5)*9).toFixed(1)}) rotate(${((jit()-.5)*7).toFixed(1)} 20 100) scale(1 ${(.94+jit()*.1).toFixed(3)})`;
const BRUSH=window.brushTable({"Й":{w:76,d:"M14 12L14 92L62 12L62 92M24 -26Q38 -12 52 -26"}," ":{w:36,d:""}});
function brush(svg){
const word=svg.dataset.word,start=+svg.dataset.start||0;
let cx=0,h="";
[...word].forEach((ch,i)=>{
const g=BRUSH[ch];
if(g.d){const t=`translate(${cx} 0) ${jitter()}`;h+=``;}
cx+=g.w+16;
});
svg.setAttribute("viewBox",`-24 -6 ${cx-16+48} 118`);
const id="brush-"+word.replace(/[^\p{L}\p{N}]/gu,"").toLowerCase();
svg.setAttribute("role","img");svg.setAttribute("aria-label",word.toUpperCase());
svg.innerHTML=`${h}`;
}
function dots(svg){
const r=rng(+svg.dataset.seed||7),id="t"+svg.dataset.seed;
svg.setAttribute("viewBox","0 0 1920 1080");svg.setAttribute("preserveAspectRatio","xMidYMid slice");
let h=``,n=0;
while(n<131){let cx=r()*1920;if(r()<.45)cx=r()<.6?1920-r()*480:r()*480;const cy=r()*1080,k=1+Math.floor(r()*5);
for(let j=0;j`;}
svg.innerHTML=h;
}
document.querySelectorAll(".trust__dots").forEach(dots);
document.querySelectorAll(".trust__brush").forEach(brush);
const io=new IntersectionObserver(es=>es.forEach(e=>{if(e.intersectionRatio>=.5)e.target.classList.add("trust--play");else if(e.intersectionRatio===0)e.target.classList.remove("trust--play")}),{threshold:[0,.5]});
document.querySelectorAll(".trust:not([data-stage] *)").forEach(s=>io.observe(s));
})();