// ===================== SoundPaper page app =====================
const { useState, useEffect, useRef } = React;
function Check(){
return ();
}
function PReveal({ children, className='', delay=0 }){
const ref = useRef(null); const [s,setS]=useState(false);
useEffect(()=>{
const io=new IntersectionObserver(es=>es.forEach(e=>{ if(e.isIntersecting){ setS(true); io.disconnect(); } }),{ threshold:0.10, rootMargin:'0px 0px -5% 0px' });
if(ref.current) io.observe(ref.current); return ()=>io.disconnect();
},[]);
return
{children}
;
}
const PH = (html) => ({ dangerouslySetInnerHTML:{ __html:html } });
function SPNav({ lang, setLang, C }){
const [sc,setSc]=useState(false);
useEffect(()=>{ const on=()=>setSc(window.scrollY>40); on(); window.addEventListener('scroll',on,{passive:true}); return ()=>window.removeEventListener('scroll',on); },[]);
return (
);
}
function MacWin({ src, title='SoundPaper', loop=true }){
return (
);
}
function SoundPaperPage({ C }){
const i = C.intro;
return (
{/* intro */}
{i.index}
{i.tag}
{i.tags.map((t,k)=>({t}))}
{/* loop video hero */}
{/* feature rows */}
{C.feats.map((f,k)=>(
{f.num}
{f.p}
{f.points.map((p,j)=>(- {p}
))}
0{k+1}
))}
{/* demo video */}
{C.demo.eyebrow}
{C.demo.h}
{C.demo.p}
{/* cta */}
);
}
function SPApp(){
const [lang,setLang]=useState(()=> localStorage.getItem('pc_lang') || 'pt');
useEffect(()=>{ localStorage.setItem('pc_lang',lang); document.documentElement.lang = lang==='pt'?'pt-BR':'en'; },[lang]);
const C = window.SP[lang];
return ();
}
ReactDOM.createRoot(document.getElementById('root')).render();