/* Playing cards — suit glyphs + Card component. Exports to window. */ const SUIT_PATHS = { s: "M12 2C12 2 4 8.5 4 14.2 4 17.4 6.4 19.6 9.2 19.6 10.3 19.6 11.2 19.2 12 18.5 12.8 19.2 13.7 19.6 14.8 19.6 17.6 19.6 20 17.4 20 14.2 20 8.5 12 2 12 2ZM10.6 18.5C10.6 20.4 9.8 21.6 8.5 22.4L15.5 22.4C14.2 21.6 13.4 20.4 13.4 18.5Z", h: "M12 21.4C12 21.4 2.5 14.9 2.5 8.6 2.5 5.5 4.9 3.2 7.8 3.2 9.6 3.2 11.2 4.2 12 5.6 12.8 4.2 14.4 3.2 16.2 3.2 19.1 3.2 21.5 5.5 21.5 8.6 21.5 14.9 12 21.4 12 21.4Z", d: "M12 1.5L21 12 12 22.5 3 12Z", c: "M12 2.2C9.7 2.2 7.9 4 7.9 6.3 7.9 7 8 7.5 8.3 8.1 6.6 7.5 4.5 8.3 3.7 10.1 2.9 12.2 3.9 14.6 6 15.4 7.3 15.9 8.7 15.7 9.8 15L9.8 15.2C9.8 17.1 9 18.6 7.7 19.4L16.3 19.4C15 18.6 14.2 17.1 14.2 15.2L14.2 15C15.3 15.7 16.7 15.9 18 15.4 20.1 14.6 21.1 12.2 20.3 10.1 19.5 8.3 17.4 7.5 15.7 8.1 16 7.5 16.1 7 16.1 6.3 16.1 4 14.3 2.2 12 2.2Z" }; const SUIT_NAME = { s: "spade", h: "heart", d: "diamond", c: "club" }; const RANK_LABEL = { T: "10" }; function Suit({ s, size }) { return ( ); } /* card string like "As", "Kh", "Td", "9c" — or {back:true} */ function Card({ c, back, folded, dealing, className, style, delay }) { if (back || !c) { return (
); } const rank = c[0]; const suit = c[1]; const cls = ["card", "s-" + SUIT_NAME[suit]]; if (folded) cls.push("folded"); if (dealing) cls.push("dealing"); if (className) cls.push(className); const st = Object.assign({}, style); if (dealing && delay != null) st.animationDelay = delay + "ms"; return (
{RANK_LABEL[rank] || rank}
); } /* {s} brace mark from Somnia brand (two braces + mono s) */ function BraceMark({ className, style }) { return ( ); } /* The {s} composed logo — braces with a mono s centered */ function BraceLogo({ size = 20, withS = true }) { return ( {withS && s} ); } /* SOMI token glyph */ function SomiIcon({ className, style }) { return ( ); } Object.assign(window, { Card, Suit, BraceMark, BraceLogo, SomiIcon });