/* UpWeDo landing — "Meet your buddy": the five buddies, what a buddy says through the day, and what it does. Copy comes from `L.buddy`. */ const { useState } = React; /* On-screen order, as in the app's picker. */ const BUDDY_KEYS = ['boy','girl','boy2','girl2','boy3']; const BUDDY_COLORS = ['#2563EB','#F47215','#0891B2','#DB2777','#7C3AED']; const BUDDY_MOMENT_MS = 4200; /* Lucide sparkles, brain, sun-moon, sliders. */ const BUDDY_ICONS = [ 'M9.94 14.06 4 20M12 3l1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2z', 'M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18ZM12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18ZM12 5v13', 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2', 'M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6', ]; function Buddy({ L, dir }) { const m = useIsMobile(); /* Side by side needs room for the 420px stage and a readable text column. */ const stack = useViewportWidth() < 1000; const t = L.buddy; const [pick,setPick] = useState(0); const { ref, index, select, cycling } = useAutoCycle(t.moments.length, BUDDY_MOMENT_MS); const moment = t.moments[index]; const color = BUDDY_COLORS[pick]; const who = t.names[pick]; const stage = (
{t.moments.map((mo,i)=>( ))}
{moment.says}
{who.name}
{moment.note}
{cycling &&
}
{BUDDY_KEYS.map((k,i)=>{ const on = i===pick; return ( ); })}
); return (
{t.points.map((pt,i)=>(
{pt.label}

{pt.body}

))}
{stage}
); } Object.assign(window, { Buddy });