"""Build the page where a visitor pastes a diff and three checks run in the browser: `python -m itemator.tryit --out public/try`. web/try.html is the page, web/try_checks.js holds the checks (the same rules as moving.py, shapes.py and untrusted.py; eval/try_agreement.py compares the two) and web/try_examples.json the example diffs. The numbers beside each check are read from the results files at build time, so the page cannot say more than the files do. The page forbids itself every network request with a Content-Security-Policy. Standard library only.""" from __future__ import annotations import argparse import hashlib import json import pathlib ROOT = pathlib.Path(__file__).resolve().parent.parent WEB = ROOT / "web" RESULTS = ROOT / "results" REPO = "https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/39194174/showcase/-/blob/main/" def safe_json(data) -> str: """JSON for inside a