Code4Scene / assets /leaderboard-bars.js
KoeYe's picture
Claude Opus 5.5
Text-to-Scene / Image-to-Scene tabs in every section; restore the Image-to-Scene task, views, cases, takeaways and models
5bf5905
Raw History Blame Contribute Delete
36.8 kB
// Bar layout and name wrapping adapted from BuildingBench figure-kit/bar-static/build.py.
// Data is exclusively the existing Code4Scene data/site.js paper board; no reference benchmark scores.
(async function(){
const {bindChartTooltip}=await import("./chart-interactions.js?v=20261004kit");
await Promise.all([document.fonts.load('400 13px Inter'),document.fonts.load('700 13px Inter'),document.fonts.load('500 15.5px "IBM Plex Mono"')]);
const ALL = {"t2s": [{"name": "Claude Fable 5.1 (max)", "org": "Anthropic", "score": 0.78775, "colour": "#D97757", "ink": "#ffffff", "label": "79", "new": false}, {"name": "GPT-6 Astra (max)", "org": "OpenAI", "score": 0.72382, "colour": "#10A37F", "ink": "#ffffff", "label": "72", "new": false}, {"name": "Claude Opus 5 (max)", "org": "Anthropic", "score": 0.7181599999999999, "colour": "#D97757", "ink": "#ffffff", "label": "72", "new": false}, {"name": "GPT-5.6 Sol (high)", "org": "OpenAI", "score": 0.70704, "colour": "#10A37F", "ink": "#ffffff", "label": "71", "new": false}, {"name": "Gemini 3.8 Flash (high)", "org": "Google", "score": 0.65689, "colour": "#7b1fa2", "ink": "#ffffff", "label": "66", "new": false}, {"name": "Muse Spark 1.3 (medium)", "org": "Meta", "score": 0.646195, "colour": "#42a5f5", "ink": "#111111", "label": "65", "new": false}, {"name": "Grok 4.6 (high)", "org": "xAI", "score": 0.56721, "colour": "#111111", "ink": "#ffffff", "label": "57", "new": false}, {"name": "Qwen 3.8 27B (thinking off)", "org": "Alibaba", "score": 0.55666, "colour": "#fe7016", "ink": "#111111", "label": "56", "new": false}, {"name": "Qwen 3.8 27B (thinking on)", "org": "Alibaba", "score": 0.51571, "colour": "#fe7016", "ink": "#111111", "label": "52", "new": false}, {"name": "GLM-5.3 Flash (max)", "org": "Z.ai", "score": 0.5094299999999999, "colour": "#96650b", "ink": "#ffffff", "label": "51", "new": false}, {"name": "Gemma 4 31B (thinking on)", "org": "Google", "score": 0.470705, "colour": "#7b1fa2", "ink": "#ffffff", "label": "47", "new": false}, {"name": "Gemma 4 31B (thinking off)", "org": "Google", "score": 0.45494, "colour": "#7b1fa2", "ink": "#ffffff", "label": "45", "new": false}, {"name": "Inkling (high)", "org": "Thinking Machines", "score": 0.42498500000000006, "colour": "#686868", "ink": "#ffffff", "label": "42", "new": false}, {"name": "DeepSeek V4.1 Flash (high)", "org": "DeepSeek", "score": 0.24269, "colour": "#3f51e0", "ink": "#ffffff", "label": "24", "new": false}], "i2s": [{"name": "Gemini 3.8 Flash (high)", "org": "Google", "score": 0.5810600533333334, "colour": "#7b1fa2", "ink": "#ffffff", "label": "58", "new": false}, {"name": "GPT-6 Astra (max)", "org": "OpenAI", "score": 0.5148505733333334, "colour": "#10A37F", "ink": "#ffffff", "label": "51", "new": false}, {"name": "Claude Opus 5 (max)", "org": "Anthropic", "score": 0.46809998666666675, "colour": "#D97757", "ink": "#ffffff", "label": "47", "new": false}, {"name": "Claude Fable 5.1 (max)", "org": "Anthropic", "score": 0.4243479600000001, "colour": "#D97757", "ink": "#ffffff", "label": "42", "new": false}, {"name": "GPT-5.6 Sol (high)", "org": "OpenAI", "score": 0.3929589333333333, "colour": "#10A37F", "ink": "#ffffff", "label": "39", "new": false}, {"name": "Muse Spark 1.3 (medium)", "org": "Meta", "score": 0.35821573333333334, "colour": "#42a5f5", "ink": "#111111", "label": "36", "new": false}, {"name": "GLM-5.3 Flash (max)", "org": "Z.ai", "score": 0.3199877333333333, "colour": "#96650b", "ink": "#ffffff", "label": "32", "new": false}, {"name": "Qwen 3.8 27B (thinking on)", "org": "Alibaba", "score": 0.2261779866666667, "colour": "#fe7016", "ink": "#111111", "label": "23", "new": false}, {"name": "DeepSeek V4.1 Flash (high)", "org": "DeepSeek", "score": 0.21048916, "colour": "#3f51e0", "ink": "#ffffff", "label": "21", "new": false}, {"name": "Qwen 3.8 27B (thinking off)", "org": "Alibaba", "score": 0.19970338666666668, "colour": "#fe7016", "ink": "#111111", "label": "20", "new": false}, {"name": "Inkling (high)", "org": "Thinking Machines", "score": 0.19801974666666666, "colour": "#686868", "ink": "#ffffff", "label": "20", "new": false}, {"name": "Grok 4.6 (high)", "org": "xAI", "score": 0.18414012, "colour": "#111111", "ink": "#ffffff", "label": "18", "new": false}, {"name": "Gemma 4 31B (thinking on)", "org": "Google", "score": 0.12554015999999998, "colour": "#7b1fa2", "ink": "#ffffff", "label": "13", "new": false}, {"name": "Gemma 4 31B (thinking off)", "org": "Google", "score": 0.11503794666666667, "colour": "#7b1fa2", "ink": "#ffffff", "label": "12", "new": false}]};
const LOGOS = {"Anthropic": {"icon": "anthropic", "fill": "#141413", "viewBox": "0 0 24 24", "inner": "<path d=\"M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z\"></path>", "rule": "evenodd"}, "OpenAI": {"icon": "openai", "fill": "#141413", "viewBox": "0 0 24 24", "inner": "<path d=\"M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z\"></path>", "rule": "evenodd"}, "Meta": {"icon": "meta-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z\" fill=\"url(#lobe-icons-meta-0-_R_0_)\"></path><path d=\"M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z\" fill=\"url(#lobe-icons-meta-1-_R_0_)\"></path><path d=\"M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z\" fill=\"url(#lobe-icons-meta-2-_R_0_)\"></path><path d=\"M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z\" fill=\"url(#lobe-icons-meta-3-_R_0_)\"></path><path d=\"M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z\" fill=\"url(#lobe-icons-meta-4-_R_0_)\"></path><path d=\"M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z\" fill=\"url(#lobe-icons-meta-5-_R_0_)\"></path><path d=\"M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z\" fill=\"#0082FB\"></path><path d=\"M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z\" fill=\"url(#lobe-icons-meta-6-_R_0_)\"></path><path d=\"M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z\" fill=\"#0082FB\"></path><path d=\"M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z\" fill=\"url(#lobe-icons-meta-7-_R_0_)\"></path><path d=\"M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z\" fill=\"url(#lobe-icons-meta-8-_R_0_)\"></path><path d=\"M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z\" fill=\"url(#lobe-icons-meta-9-_R_0_)\"></path><path d=\"M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z\" fill=\"url(#lobe-icons-meta-10-_R_0_)\"></path><path d=\"M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z\" fill=\"url(#lobe-icons-meta-11-_R_0_)\"></path><path d=\"M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z\" fill=\"url(#lobe-icons-meta-12-_R_0_)\"></path><defs><linearGradient id=\"lobe-icons-meta-0-_R_0_\" x1=\"75.897%\" x2=\"26.312%\" y1=\"89.199%\" y2=\"12.194%\"><stop offset=\".06%\" stop-color=\"#0867DF\"></stop><stop offset=\"45.39%\" stop-color=\"#0668E1\"></stop><stop offset=\"85.91%\" stop-color=\"#0064E0\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-1-_R_0_\" x1=\"21.67%\" x2=\"97.068%\" y1=\"75.874%\" y2=\"23.985%\"><stop offset=\"13.23%\" stop-color=\"#0064DF\"></stop><stop offset=\"99.88%\" stop-color=\"#0064E0\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-2-_R_0_\" x1=\"38.263%\" x2=\"60.895%\" y1=\"89.127%\" y2=\"16.131%\"><stop offset=\"1.47%\" stop-color=\"#0072EC\"></stop><stop offset=\"68.81%\" stop-color=\"#0064DF\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-3-_R_0_\" x1=\"47.032%\" x2=\"52.15%\" y1=\"90.19%\" y2=\"15.745%\"><stop offset=\"7.31%\" stop-color=\"#007CF6\"></stop><stop offset=\"99.43%\" stop-color=\"#0072EC\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-4-_R_0_\" x1=\"52.155%\" x2=\"47.591%\" y1=\"58.301%\" y2=\"37.004%\"><stop offset=\"7.31%\" stop-color=\"#007FF9\"></stop><stop offset=\"100%\" stop-color=\"#007CF6\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-5-_R_0_\" x1=\"37.689%\" x2=\"61.961%\" y1=\"12.502%\" y2=\"63.624%\"><stop offset=\"7.31%\" stop-color=\"#007FF9\"></stop><stop offset=\"100%\" stop-color=\"#0082FB\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-6-_R_0_\" x1=\"34.808%\" x2=\"62.313%\" y1=\"68.859%\" y2=\"23.174%\"><stop offset=\"27.99%\" stop-color=\"#007FF8\"></stop><stop offset=\"91.41%\" stop-color=\"#0082FB\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-7-_R_0_\" x1=\"43.762%\" x2=\"57.602%\" y1=\"6.235%\" y2=\"98.514%\"><stop offset=\"0%\" stop-color=\"#0082FB\"></stop><stop offset=\"99.95%\" stop-color=\"#0081FA\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-8-_R_0_\" x1=\"60.055%\" x2=\"39.88%\" y1=\"4.661%\" y2=\"69.077%\"><stop offset=\"6.19%\" stop-color=\"#0081FA\"></stop><stop offset=\"100%\" stop-color=\"#0080F9\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-9-_R_0_\" x1=\"30.282%\" x2=\"61.081%\" y1=\"59.32%\" y2=\"33.244%\"><stop offset=\"0%\" stop-color=\"#027AF3\"></stop><stop offset=\"100%\" stop-color=\"#0080F9\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-10-_R_0_\" x1=\"20.433%\" x2=\"82.112%\" y1=\"50.001%\" y2=\"50.001%\"><stop offset=\"0%\" stop-color=\"#0377EF\"></stop><stop offset=\"99.94%\" stop-color=\"#0279F1\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-11-_R_0_\" x1=\"40.303%\" x2=\"72.394%\" y1=\"35.298%\" y2=\"57.811%\"><stop offset=\".19%\" stop-color=\"#0471E9\"></stop><stop offset=\"100%\" stop-color=\"#0377EF\"></stop></linearGradient><linearGradient id=\"lobe-icons-meta-12-_R_0_\" x1=\"32.254%\" x2=\"68.003%\" y1=\"19.719%\" y2=\"84.908%\"><stop offset=\"27.65%\" stop-color=\"#0867DF\"></stop><stop offset=\"100%\" stop-color=\"#0471E9\"></stop></linearGradient></defs>", "rule": null}, "Google": {"icon": "google-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z\" fill=\"#4285F4\"></path><path d=\"M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z\" fill=\"#34A853\"></path><path d=\"M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z\" fill=\"#FBBC05\"></path><path d=\"M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z\" fill=\"#EB4335\"></path>", "rule": null}, "DeepSeek": {"icon": "deepseek-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z\" fill=\"#4D6BFE\"></path>", "rule": null}, "xAI": {"icon": "xai", "tile": "#111111", "shape": "square", "viewBox": "0 0 24 24", "inner": "<path d=\"M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z\"></path>", "rule": "evenodd"}, "Z.ai": {"icon": "zai", "tile": "#111111", "shape": "square", "viewBox": "0 0 24 24", "inner": "<path d=\"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z\"></path>", "rule": "evenodd"}, "Moonshot": {"icon": "kimi", "tile": "#111111", "shape": "square", "viewBox": "0 0 24 24", "inner": "<path d=\"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z\"></path><path d=\"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z\"></path>", "rule": "evenodd"}, "StepFun": {"icon": "stepfun", "tile": "#01d9cf", "shape": "circle", "viewBox": "0 0 24 24", "inner": "<path d=\"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z\"></path>", "rule": "evenodd"}, "Undisclosed": {"icon": "unionalpha-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M12.5709 13.3706C12.6556 13.4345 12.8442 13.7666 12.9123 13.875L13.4693 14.7624C13.7592 15.2257 14.0526 15.6895 14.3386 16.1555C14.4141 16.2951 14.4587 16.3467 14.3445 16.48C13.9818 16.9035 13.6097 17.321 13.2426 17.7406C12.6047 18.4698 11.5795 19.0999 10.6086 19.2277C10.5721 19.2324 10.5355 19.2366 10.4988 19.2405C10.3741 19.2219 10.2359 19.2226 10.1067 19.2077C9.62828 19.1531 9.13925 18.9833 8.73437 18.7229C8.58284 18.6255 8.20429 18.365 8.13135 18.2015C8.7166 18.0941 8.9971 17.6275 9.36375 17.2093C9.46647 17.0921 9.56558 16.9681 9.66524 16.8481C10.2482 16.1439 10.8249 15.4346 11.3952 14.7202C11.5532 14.5228 12.4352 13.3557 12.5709 13.3706Z\" fill=\"url(#lobe-icons-union-alpha-0-_R_0_)\"></path><path d=\"M23.9999 4.03711C23.9427 4.17731 23.8557 4.29083 23.7726 4.41626C23.5172 4.80162 23.2489 5.18017 22.9952 5.56645C21.7031 7.52279 20.3758 9.45572 19.0141 11.3643L18.2195 12.4575C18.0914 12.6376 17.8772 12.9025 17.8103 13.1017C17.5635 12.8289 17.3373 12.3638 17.1271 12.052C16.7507 11.4939 16.4007 10.8942 16.0072 10.3494C15.964 10.2787 15.9232 10.1649 15.8967 10.0866C15.9509 9.95674 16.2386 9.57362 16.3367 9.43732L17.184 8.26053L19.1886 5.47039C19.3731 5.21667 20.0937 4.17696 20.2819 4.03711H23.9999Z\" fill=\"url(#lobe-icons-union-alpha-1-_R_0_)\"></path><path d=\"M5.67537 4.61919C5.91433 4.59978 6.08153 4.64306 6.2388 4.65534C7.31097 4.73906 7.93546 5.78123 8.52073 6.55699C8.55486 6.60222 8.67307 6.77678 8.67756 6.81818C8.50211 6.78591 8.24062 6.87736 8.10425 6.98766C7.77451 7.25438 7.47306 7.60773 7.16738 7.90822C6.82713 8.24411 6.49119 8.58431 6.15964 8.92879C5.96629 9.12818 5.68162 9.40902 5.50821 9.61426C4.95769 10.264 4.58519 11.0455 4.42712 11.8823C4.38673 12.1047 4.33596 12.4789 4.34474 12.6979C4.38003 13.5788 4.68343 14.4541 5.20029 15.1681C5.44662 15.5083 5.69406 15.7534 5.97744 16.05C6.42647 16.5145 6.87971 16.9749 7.33712 17.4311C8.17604 18.2704 8.83084 19.0614 10.1068 19.2072C10.2359 19.2221 10.3741 19.2214 10.4989 19.24C10.4563 19.2438 10.4156 19.2437 10.3732 19.2456C9.63946 19.2779 8.9074 19.2593 8.17299 19.2571L6.81265 19.2561C6.34052 19.2551 5.82434 19.2555 5.36063 19.1766C4.33929 19.003 3.55816 18.5177 2.78058 17.8624C1.69732 16.9495 0.760791 15.9389 0.316835 14.5629C0.188539 14.1652 0.0845513 13.7688 0.0423572 13.352C0.0341296 13.2704 0.025306 13.1714 0 13.0938V12.1601C0.024482 12.0989 0.0539558 11.7751 0.0701206 11.682C0.118265 11.3996 0.185469 11.1208 0.271272 10.8475C0.464403 10.234 0.818387 9.53555 1.19037 9.01281C1.67633 8.32991 2.33983 7.69834 2.92227 7.09354L3.99839 5.99473C4.54749 5.44174 4.97245 4.98537 5.67537 4.61919Z\" fill=\"url(#lobe-icons-union-alpha-2-_R_0_)\"></path><path d=\"M16.0072 10.3494C16.4008 10.8942 16.7508 11.4939 17.1271 12.052C17.3373 12.3638 17.5635 12.8289 17.8104 13.1017C17.8351 13.1633 18.024 13.4562 18.0701 13.5307L18.6905 14.5371C19.1466 15.2881 19.6091 16.0351 20.078 16.7781C20.4399 17.3561 20.7699 17.9692 21.2574 18.4512C21.5622 18.7524 21.9167 18.9416 22.3073 19.1101C22.4041 19.1518 22.5241 19.1723 22.6131 19.2159L22.5999 19.2374C22.543 19.2593 22.4118 19.2355 22.3393 19.2386C21.4806 19.2765 20.6139 19.2542 19.7541 19.2467C19.2053 19.2419 18.6361 19.2653 18.0899 19.2461C17.9536 19.241 17.8182 19.2222 17.6855 19.1901C17.2306 19.0825 16.8145 18.8188 16.4914 18.4847C16.2155 18.1993 16.0406 17.8931 15.8347 17.558C15.6277 17.2199 15.423 16.8802 15.2208 16.5391L13.5134 13.7217C13.602 13.5224 14.0393 12.9594 14.2007 12.7419L16.0072 10.3494Z\" fill=\"url(#lobe-icons-union-alpha-3-_R_0_)\"></path><path d=\"M11.3662 4.03706C11.4355 4.04736 11.5279 4.0639 11.5825 4.11302C11.7409 4.25538 11.8717 4.45147 12.0009 4.62253C13.1498 6.14388 14.2121 7.73081 15.2749 9.31286C15.3244 9.38658 15.4528 9.56569 15.4748 9.646C15.3946 9.79571 15.0698 10.1847 14.9522 10.3329L13.8456 11.7243C13.647 11.9762 13.455 12.2345 13.2586 12.4878C13.1566 12.6194 13.0064 12.8305 12.8889 12.9425C12.6125 12.5563 12.3581 12.1531 12.0887 11.7623L9.66701 8.22137C9.43592 7.88192 9.20191 7.54448 8.96502 7.20905C8.92518 7.15337 8.69584 6.86111 8.67758 6.81865C8.67307 6.77723 8.55489 6.60269 8.52077 6.55747C7.9355 5.7817 7.311 4.73956 6.23883 4.65583C6.08162 4.64356 5.91434 4.61968 5.67542 4.61968C6.15935 4.35771 6.84659 4.17302 7.38673 4.09926C8.69114 3.92117 10.0523 4.03706 11.3662 4.03706Z\" fill=\"url(#lobe-icons-union-alpha-4-_R_0_)\"></path><path d=\"M15.3619 8.08232L15.874 8.87602L19.2024 4.16504L15.3619 8.08232Z\" fill=\"url(#lobe-icons-union-alpha-5-_R_0_)\"></path><defs><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-0-_R_0_\" x1=\"21.5578\" x2=\"21.5578\" y1=\"4.03711\" y2=\"12.691\"><stop stop-color=\"currentColor\" stop-opacity=\"0.39\"></stop><stop offset=\"1\" stop-color=\"currentColor\" stop-opacity=\"0.22\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-1-_R_0_\" x1=\"21.5578\" x2=\"21.5578\" y1=\"4.03711\" y2=\"12.691\"><stop stop-color=\"currentColor\" stop-opacity=\"0.39\"></stop><stop offset=\"1\" stop-color=\"currentColor\" stop-opacity=\"0.22\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-2-_R_0_\" x1=\"5.27425\" x2=\"5.24944\" y1=\"5.41908\" y2=\"14.0217\"><stop stop-color=\"currentColor\" stop-opacity=\"0.15\"></stop><stop offset=\"1\" stop-color=\"currentColor\" stop-opacity=\"0.87\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-3-_R_0_\" x1=\"14.1443\" x2=\"14.1443\" y1=\"14.4319\" y2=\"19.26\"><stop stop-color=\"currentColor\" stop-opacity=\"0.93\"></stop><stop offset=\"1\" stop-color=\"currentColor\" stop-opacity=\"0.57\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-4-_R_0_\" x1=\"14.1443\" x2=\"14.1443\" y1=\"14.4319\" y2=\"19.26\"><stop stop-color=\"currentColor\" stop-opacity=\"0.93\"></stop><stop offset=\"1\" stop-color=\"currentColor\" stop-opacity=\"0.57\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-union-alpha-5-_R_0_\" x1=\"17.2822\" x2=\"17.2822\" y1=\"4.16504\" y2=\"8.87602\"><stop stop-color=\"#D72725\"></stop><stop offset=\"1\" stop-color=\"#CD2920\"></stop></linearGradient></defs>", "rule": null}, "Cognition": {"icon": "devin-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M2.033 9.867l2.554 1.483a.589.589 0 00.592 0l2.554-1.483.01-.008a.608.608 0 00.11-.084l.013-.015a.631.631 0 00.076-.1c.003-.005.008-.01.01-.016a.558.558 0 00.052-.125l.007-.028a.611.611 0 00.019-.14V7.868c0-.572.307-1.105.8-1.392a1.595 1.595 0 011.598 0l1.277.742a.54.54 0 00.129.053l.028.01c.044.01.088.015.133.016h.006l.013-.002a.587.587 0 00.27-.074l.011-.004 2.554-1.483a.596.596 0 00.297-.516V2.253a.595.595 0 00-.297-.516L12.293.257a.587.587 0 00-.591 0L9.148 1.737l-.01.01a.609.609 0 00-.109.083l-.014.015a.632.632 0 00-.076.1c-.003.005-.008.01-.01.016a.57.57 0 00-.052.124l-.007.028a.612.612 0 00-.018.14v1.483c0 .572-.307 1.105-.8 1.393a1.597 1.597 0 01-1.599 0l-1.276-.742a.603.603 0 00-.13-.053l-.028-.008a.658.658 0 00-.133-.018h-.02a.57.57 0 00-.269.074c-.003.002-.008.002-.012.005L2.033 5.872a.596.596 0 00-.297.515v2.966c0 .213.113.41.297.515z\" fill=\"#3969CA\"></path><path d=\"M15.943 10.607a1.596 1.596 0 011.599 0l1.276.74c.041.025.085.04.13.055l.028.008c.043.01.088.016.133.018h.005c.005 0 .01-.002.014-.003a.474.474 0 00.122-.016l.021-.005a.616.616 0 00.126-.052c.004-.002.009-.002.013-.005l2.554-1.482a.597.597 0 00.297-.516V6.383a.596.596 0 00-.297-.515l-2.552-1.483a.587.587 0 00-.592 0l-2.553 1.482-.011.008a.61.61 0 00-.108.084l-.014.016a.637.637 0 00-.076.1c-.003.005-.008.01-.01.016a.57.57 0 00-.052.124l-.007.029a.612.612 0 00-.018.14v1.482c0 .572-.307 1.105-.8 1.393a1.597 1.597 0 01-1.599 0l-1.276-.742a.584.584 0 00-.13-.053l-.028-.008a.62.62 0 00-.133-.018h-.02a.587.587 0 00-.269.074l-.012.004L9.15 10a.596.596 0 00-.296.516v2.966c0 .212.112.409.296.515l2.554 1.483s.008.002.012.005c.04.022.082.04.126.052l.02.004a.57.57 0 00.123.017l.014.002h.006c.054 0 .108-.01.16-.025a.587.587 0 00.13-.054l1.277-.741a1.597 1.597 0 012.398 1.392v1.482c0 .049.007.095.019.14l.007.028a.619.619 0 00.051.125c.004.006.008.01.01.016a.6.6 0 00.076.1l.014.015c.033.032.069.06.108.084.004.002.006.006.011.008l2.554 1.483a.59.59 0 00.593 0l2.554-1.483a.597.597 0 00.296-.516v-2.965a.595.595 0 00-.296-.516l-2.554-1.483s-.008-.002-.012-.005a.54.54 0 00-.126-.051c-.007-.003-.013-.003-.02-.005a.635.635 0 00-.125-.017h-.018a.557.557 0 00-.16.026.588.588 0 00-.13.053l-1.276.742a1.595 1.595 0 01-1.598 0 1.615 1.615 0 010-2.785l-.005-.001z\" fill=\"#21C19A\"></path><path d=\"M14.848 18.265l-2.554-1.482-.012-.005a.526.526 0 00-.126-.052c-.007-.002-.014-.002-.02-.005a.64.64 0 00-.124-.017h-.02a.56.56 0 00-.16.026.588.588 0 00-.13.053l-1.276.742a1.594 1.594 0 01-1.598 0c-.493-.286-.8-.82-.8-1.393V14.65a.563.563 0 00-.018-.14l-.008-.028a.604.604 0 00-.051-.124l-.01-.017a.603.603 0 00-.076-.1l-.014-.015a.596.596 0 00-.109-.084c-.003-.002-.005-.006-.01-.008L5.178 12.65a.587.587 0 00-.591 0l-2.554 1.483a.596.596 0 00-.297.516v2.965c0 .213.113.41.297.516l2.554 1.483.012.004a.618.618 0 00.267.074l.016.002h.007a.55.55 0 00.16-.026.584.584 0 00.129-.053l1.277-.742a1.597 1.597 0 012.398 1.393v1.482c0 .05.007.095.019.14l.007.028c.013.044.03.085.051.125l.01.016c.022.036.047.07.076.1l.014.015c.032.032.069.06.109.084l.01.008 2.554 1.483a.587.587 0 00.593 0l2.554-1.483a.596.596 0 00.296-.515v-2.966a.596.596 0 00-.296-.516h-.002z\" fill=\"#0294DE\"></path>", "rule": null}, "Fireworks": {"icon": "fireworks-color", "viewBox": "0 0 24 24", "inner": "<path clip-rule=\"evenodd\" d=\"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z\" fill=\"#5019C5\" fill-rule=\"evenodd\"></path>", "rule": null}, "Stealth": {"wordmark": ["STEALTH"]}, "Thinking Machines": {"wordmark": ["THINKING", "MACHINES"]}, "Alibaba": {"icon": "qwen-color", "viewBox": "0 0 24 24", "inner": "<path d=\"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z\" fill=\"url(#lobe-icons-qwen-_R_0_)\" fill-rule=\"nonzero\"></path><defs><linearGradient id=\"lobe-icons-qwen-_R_0_\" x1=\"0%\" x2=\"100%\" y1=\"0%\" y2=\"0%\"><stop offset=\"0%\" stop-color=\"#6336E7\" stop-opacity=\".84\"></stop><stop offset=\"100%\" stop-color=\"#6F69F7\" stop-opacity=\".84\"></stop></linearGradient></defs>", "rule": null}};
for(const [key,DATA] of Object.entries(ALL)){
const svg=document.getElementById('bars-'+key), W=1200, H=420;
const NS='http://www.w3.org/2000/svg', SANS='Inter, Arial, sans-serif', MONO='"IBM Plex Mono", monospace';
const G = { // geometry, CSS px
left: 40, right: 24,
top: 26, // the 100 gridline
base: 248, // zero
barFill: 0.62, // bar width / pitch, as measured off the reference
radius: 4.5, // rounded top corners
logo: 18, logoGap: 8, // logo box, and its gap under the baseline
nameGap: 9, // gap from logo to the end of the name
nameAngle: -60, // degrees
nameSize: 13, nameLead: 14.5,
nameOneLine: 97, // a name this wide or less stays on one line
nameLine: 93, // otherwise, no wrapped line wider than this
nameTol: 12, // splits this close to the most balanced count as ties
};
let current=null;
function el(tag, attrs, parent) {
const e = document.createElementNS(NS, tag);
for (const k in attrs) e.setAttribute(k, attrs[k]);
(parent || current || svg).appendChild(e);
return e;
}
const ctx = document.createElement("canvas").getContext("2d");
function width(text, font) { ctx.font = font; return ctx.measureText(text).width; }
// Wrap a name the way the reference does: one line when it fits; otherwise the
// fewest lines (2, then 3) that keep every line within nameLine. Among those,
// the most balanced split wins -- and splits within nameTol of it count as
// equally balanced, the tie going to the longer last line: the lines are
// right-aligned against the logo, so the weight belongs at the end
// ("DeepSeek / V4.1 / Flash (max)", not "... / V4.1 Flash / (max)").
function wrap(name, font) {
if (width(name, font) <= G.nameOneLine) return [name];
const w = name.split(" ");
const splits = k => {
const out = [];
if (k === 2) for (let i = 1; i < w.length; i++) out.push([w.slice(0, i), w.slice(i)]);
if (k === 3) for (let i = 1; i < w.length; i++) for (let j = i + 1; j < w.length; j++)
out.push([w.slice(0, i), w.slice(i, j), w.slice(j)]);
return out.map(p => p.map(x => x.join(" ")));
};
for (const k of [2, 3]) {
const c = splits(k).map(lines => {
const ws = lines.map(l => width(l, font));
return {lines, worst: Math.max(...ws), last: ws[ws.length - 1]};
}).filter(o => o.worst <= G.nameLine);
if (!c.length) continue;
const floor = Math.min(...c.map(o => o.worst));
return c.filter(o => o.worst <= floor + G.nameTol).sort((a, b) => b.last - a.last)[0].lines;
}
return [name];
}
// A boxed name: at most two lines -- a three-line box is thicker than the spacing
// between neighbouring names at this bar count -- the most balanced split, ties
// to the longer last line.
function wrap2(name, font) {
if (width(name, font) <= G.nameOneLine) return [name];
const w = name.split(" "), c = [];
for (let i = 1; i < w.length; i++) {
const lines = [w.slice(0, i).join(" "), w.slice(i).join(" ")], ws = lines.map(l => width(l, font));
c.push({lines, worst: Math.max(...ws), last: ws[1]});
}
const floor = Math.min(...c.map(o => o.worst));
return c.filter(o => o.worst <= floor + G.nameTol).sort((a, b) => b.last - a.last)[0].lines;
}
// -- grid ---------------------------------------------------------------------
const y = v => G.base - v / 100 * (G.base - G.top);
for (const v of [25, 50, 75, 100])
el("line", {x1: G.left - 8, x2: W - G.right, y1: y(v), y2: y(v), stroke: "#cfcfcf",
"stroke-width": 1.4, "stroke-dasharray": "0.1 4.2", "stroke-linecap": "round"});
el("line", {x1: G.left - 8, x2: W - G.right, y1: G.base, y2: G.base, stroke: "#e6e6e6", "stroke-width": 1});
// -- bars ---------------------------------------------------------------------
const n = DATA.length, pitch = (W - G.left - G.right) / n, bwid = pitch * G.barFill;
const pos = {};
DATA.forEach((d, i) => {
const cx = G.left + (i + 0.5) * pitch, x0 = cx - bwid / 2, x1 = cx + bwid / 2;
const top = y(d.score * 100), r = Math.min(G.radius, bwid / 2);
pos[d.name] = {cx, top, x0, x1};
current=el('g',{'class':'bar-node'},svg);
el('rect',{x:G.left+i*pitch,y:G.top,width:pitch,height:H-G.top,fill:'transparent','class':'bar-hit'});
bindChartTooltip(current,svg,d.name,key,'.bar');
const bar = el("path", {class:"bar", d: `M${x0},${G.base} V${top + r} Q${x0},${top} ${x0 + r},${top} H${x1 - r} ` +
`Q${x1},${top} ${x1},${top + r} V${G.base} Z`, fill: d.colour});
const v = el("text", {x: cx, y: (top + G.base) / 2 + 5.4, "text-anchor": "middle",
"font-family": MONO, "font-weight": 500, "font-size": 15.5, fill: d.ink});
v.textContent = d.label;
// logo
const L = LOGOS[d.org], s = G.logo, lx = cx - s / 2, ly = G.base + G.logoGap;
if (L.wordmark) {
L.wordmark.forEach((w, k) => {
const tw = el("text", {x: cx, y: ly + 7.5 + k * 6.2, "text-anchor": "middle", "font-family": SANS,
"font-weight": 500, "font-size": 5.2, "letter-spacing": 0.35, fill: "#4a4a4a"});
tw.textContent = w;
});
} else {
let pad = 0, fill = L.fill || null;
if (L.tile) {
if (L.shape === "circle") el("circle", {cx, cy: ly + s / 2, r: s / 2, fill: L.tile});
else el("rect", {x: lx, y: ly, width: s, height: s, rx: 3.2, fill: L.tile});
pad = 3.4; fill = "#ffffff";
}
const ic = el("svg", {x: lx + pad, y: ly + pad, width: s - 2 * pad, height: s - 2 * pad, viewBox: L.viewBox});
if (fill) { ic.setAttribute("fill", fill); ic.setAttribute("color", fill); }
if (L.rule) ic.setAttribute("fill-rule", L.rule);
ic.innerHTML = L.inner;
}
// name: rotated, right-aligned against the logo, wrapped
const wt = d.new ? 700 : 400;
const font = `${wt} ${G.nameSize}px ${SANS}`;
const lines = d.new ? wrap2(d.name, font) : wrap(d.name, font);
const ax = cx + 3, ay = G.base + G.logoGap + G.logo + G.nameGap + (d.new ? 5 : 0);
const g = el("g", {transform: `translate(${ax},${ay}) rotate(${G.nameAngle})`});
const off = -(lines.length - 1) / 2 * G.nameLead;
if (d.new) { // the model this figure is about: white on a box of its own colour
const bw_ = Math.max(...lines.map(l => width(l, font)));
const y0_ = off + 4.5 - 0.80 * G.nameSize - 2.5, y1_ = off + (lines.length - 1) * G.nameLead + 4.5 + 0.24 * G.nameSize + 2.5;
el("rect", {x: -bw_ - 5, y: y0_, width: bw_ + 10, height: y1_ - y0_, rx: 4, fill: d.colour}, g);
}
lines.forEach((ln, k) => {
const tl = el("text", {x: 0, y: off + k * G.nameLead + 4.5, "text-anchor": "end", "font-family": SANS,
"font-weight": wt, "font-size": G.nameSize, fill: d.new ? "#ffffff" : "#262626"}, g);
tl.textContent = ln;
});
});
current=null;svg.dataset.ready='true';
}
})();